From 0427eca8a8f6e27423d4c329c02a2661247baf24 Mon Sep 17 00:00:00 2001 From: Bryce Date: Fri, 4 Aug 2023 12:54:56 -0700 Subject: [PATCH] makes ezcater xls look like the other pages. --- src/clj/auto_ap/routes/ezcater_xls.clj | 19 +++++++++++-------- src/clj/auto_ap/ssr/invoice/glimpse.clj | 2 -- 2 files changed, 11 insertions(+), 10 deletions(-) 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