      [:td source_publisher]
      [:td (tf/unparse (tf/formatters :date) source_date)]]))
 
-(defn productions []
+(defn- productions []
   [:<>
    [:table.table.is-striped
     [:thead

  ::set-vubis-file
  (fn [db [_ file]] (assoc db :vubis-file file)))

(defn- vubis-file []
  (let [get-value (fn [e] (-> e .-target .-files (aget 0)))
        save!     #(rf/dispatch [::set-vubis-file %])
        file      @(rf/subscribe [::vubis-file])]

        [:span.file-label (tr [:choose-vubis])]]
       [:span.file-name (if file (.-name file) (tr [:no-file]))]]]]))

(defn- file-upload []
  (let [klass (when @(rf/subscribe [::notifications/button-loading? :vubis :vubis-file]) "is-loading")
        admin? @(rf/subscribe [::auth/is-admin?])
        file @(rf/subscribe [::vubis-file])]
    [:div.field.is-grouped
     [file-input]
     [:p.control
      [:button.button
       {:disabled (or (nil? file) (not admin?))
        :class klass
        :on-click (fn [e] (rf/dispatch [::vubis-file file]))}
       [:span.material-icons "upload_file"]]]])  )

(defn- production [id]
  (let [{:keys [title creator source description
                library_number source_publisher source_date]
         :as production} @(rf/subscribe [::production id])]
