diff --git a/src/clj/auto_ap/routes/ezcater_xls.clj b/src/clj/auto_ap/routes/ezcater_xls.clj index 1e52cba2..5745c87d 100644 --- a/src/clj/auto_ap/routes/ezcater_xls.clj +++ b/src/clj/auto_ap/routes/ezcater_xls.clj @@ -140,20 +140,23 @@ (com/link {:href "https://www.ezcater.com/ez_manage/reports/new" :target "_blank"} "EZCater's report page") " to generate a new report. Then drop it below."] [:div#page-notification.notification.block {:style {:display "none"}}] - [:form.bg-blue-300 {:action (bidi/path-for ssr-routes/only-routes - :admin-ezcater-xls) - :method "POST" - :class "dropzone" - :id "ezcater"}] + [:form.bg-blue-100.border-2.border-dashed.rounded-lg.border-blue-300.p-4.max-w-md.w-md.text-center.cursor-pointer + {:action (bidi/path-for ssr-routes/only-routes + :admin-ezcater-xls) + :method "POST" + :id "ezcater"} + "Drop the ezcater xls here."] [:script (hiccup/raw " - Dropzone.options.ezcater = { + ezcater_dropzone = new Dropzone (\"#ezcater\", { success: function (file, response) { document.getElementById(\"page-notification\").innerHTML = response; document.getElementById(\"page-notification\").style[\"display\"] = \"block\"; - } - }")]])]) + }, + acceptedFiles: '.xls,.xlsx', + disablePreviews: true + });")]])]) (defn upload-xls [{:keys [identity] :as request}] diff --git a/src/clj/auto_ap/ssr/invoice/glimpse.clj b/src/clj/auto_ap/ssr/invoice/glimpse.clj index ad85d4f0..19b10069 100644 --- a/src/clj/auto_ap/ssr/invoice/glimpse.clj +++ b/src/clj/auto_ap/ssr/invoice/glimpse.clj @@ -119,8 +119,6 @@ :invoice-number (first invoice-number-options) :invoice-number-options (seq invoice-number-options)})) - - (defn upload-form* [] [:div [:form.bg-blue-100.border-2.border-dashed.rounded-lg.border-blue-300.p-4.max-w-md.w-md.text-center.cursor-pointer