           (notifications/clear-button-state :vubis :vubis-file)))))
 
 (rf/reg-event-db
- ::ack-failure
+ ::ack-extract-failure
  (fn [db [_ response]]
    (-> db
        (assoc-in [:errors :version] (or (get-in response [:response :status-text])
                                         (get response :status-text)))
        (notifications/clear-button-state :vubis :vubis-file))))
+
+(rf/reg-event-fx
+  ::save-production
+  (fn [{:keys [db]} [_ id]]
+    (let [production (get-in db [:productions :vubis id])
+          cleaned (dissoc production :uuid)]
+      {:db (notifications/set-button-state db id :vubis)
+       :http-xhrio
+       (as-transit
+        {:method          :put
+         :headers         (auth/auth-header db)
+         :uri             "/api/productions"
+         :params          cleaned
+         :on-success      [::ack-save id]
+         :on-failure      [::ack-failure id :vubis]})})))
+
+(rf/reg-event-db
+  ::ack-save
+  (fn [db [_ id]]
+    (-> db
+        (update-in [:productions :vubis] dissoc id)
+        (notifications/clear-button-state id :vubis))))
+
+(rf/reg-event-db
+ ::ack-failure
+ (fn [db [_ id request-type response]]
+   (-> db
+       (assoc-in [:errors request-type] (or (get-in response [:response :status-text])
+                                            (get response :status-text)))
+       (notifications/clear-button-state id request-type))))
+
+(rf/reg-event-fx
+  ::save-all-productions
+  (fn [{:keys [db]} _]
+    (let [ids (keys (get-in db [:productions :vubis]))]
+      {:dispatch-n (map (fn [id] [::save-production id]) ids)})))
+
+(rf/reg-event-db
+  ::ignore-production
+  (fn [db [_ uuid]]
+    (update-in db [:productions :vubis] dissoc uuid)))
+
+(rf/reg-event-db
+  ::ignore-all-productions
+  (fn [db _]
+    (update-in db [:productions] dissoc :vubis)))
 
 (rf/reg-sub
  ::productions

      [:th (tr [:description])]
      [:th (tr [:library_number])]
      [:th (tr [:source_publisher])]
      [:th (tr [:source_date])]]]
    [:tbody
     (for [{:keys [uuid]} @(rf/subscribe [::productions-sorted])]
       ^{:key uuid} [production uuid])]]
   [:div.buttons.has-addons.is-right
    [:button.button
     {:on-click (fn [e] (rf/dispatch ::confirm-all))}
     [:span (tr [:approve-all])]
     [:span.icon.is-small
      [:span.material-icons "done"]]]]])

(defn page []
  (let [loading? @(rf/subscribe [::notifications/loading? :vubis])

                     :headers 	     (auth/auth-header db)
                     :uri             "/api/vubis/upload"
                     :body            form-data
                     :on-success      [::ack-extract-productions]
                     :on-failure      [::ack-extract-failure]})})))

(rf/reg-event-db
  ::ack-extract-productions
  (fn [db [_ productions]]
    (let [productions (->> productions
                           (map #(assoc % :uuid (str (random-uuid)))))]
