Less error prone

This commit is contained in:
2022-01-19 08:05:43 -08:00
parent cd5b1cbb8a
commit 6e0720c3b3
8 changed files with 284 additions and 308 deletions

View File

@@ -5,7 +5,7 @@
[auto-ap.subs :as subs]
[auto-ap.views.components.layouts :refer [side-bar-layout]]
[auto-ap.views.components.invoices.side-bar :refer [invoices-side-bar]]
[auto-ap.views.utils :refer [dispatch-event with-user]]
[auto-ap.views.utils :refer [dispatch-event with-user ->%]]
[auto-ap.utils :refer [by]]
[auto-ap.views.components.typeahead :refer [typeahead-v3]]
[auto-ap.views.components.invoice-table :refer [invoice-table] :as invoice-table]
@@ -16,7 +16,9 @@
[dropzone :as dz]
[auto-ap.views.pages.data-page :as data-page]
[clojure.set :as set]
[auto-ap.effects.forward :as forward]))
[auto-ap.effects.forward :as forward]
[goog.string :as gstring]
))
(defn dropzone []
@@ -69,9 +71,7 @@
[:span
[:span {:class "icon"}
[:i {:class "fa fa-cloud-download"}]]
"Drop any invoices you want to process here"]]]])})
))
"Drop any invoices you want to process here"]]]])})))
@@ -207,7 +207,13 @@
:data-page :import-invoices
:overrides {:client (fn [row]
[:p (:name (:client row))
[:p [:i.is-size-7 (:client-identifier row)]]])}
[:p [:i.is-size-7 (:client-identifier row)]
" "
[:span
{:style {:background-color (gstring/format "rgba(255, 0,0,%.2f)" (- 1.0 (:similarity row)))
}}
(->% (:similarity row))]]])}
:check-boxes true}]
[:span "No pending invoices"])]]]))
{:component-did-mount (fn []