     (notifications/clear-button-state db id :save)))
 
 (rf/reg-event-fx
-  ::ack-delete
-  (fn [{:keys [db]} [_ id]]
+  ::ack-success
+  (fn [{:keys [db]} [_ uuid request-type]]
     (let [db (-> db
-                 (update-in [:productions :in-production] dissoc id)
-                 (notifications/clear-button-state id :delete))
+                 (update-in [:productions :in-production] dissoc uuid)
+                 (notifications/clear-button-state uuid request-type))
           empty? (-> db (get-in [:productions :in-production]) count (< 1))]
       (if empty?
         {:db db :dispatch [::fetch-productions]}

     (-> db
         (fork/set-submitting path false)
         (fork/set-server-message path message)))))

(rf/reg-sub
 ::productions


(rf/reg-event-fx
  ::delete-production
  (fn [{:keys [db]} [_ uuid]]
    (let [production (get-in db [:productions :in-production uuid])]
      {:db (notifications/set-button-state db uuid :delete)
       :http-xhrio
       (as-transit {:method          :delete
                    :headers 	     (auth/auth-header db)
                    :uri             (str "/api/productions/" (:id production))
                    :on-success      [::ack-success uuid :delete]
                    :on-failure      [::ack-failure uuid :delete]
                    })})))

(rf/reg-event-db
