tracking companies by id

This commit is contained in:
Bryce Covert
2018-04-06 07:08:17 -07:00
parent 0baf1e0e65
commit 68964e2e2c
7 changed files with 31 additions and 18 deletions

View File

@@ -25,7 +25,7 @@
:paramName "file"
:headers {"Authorization" (str "Token " @token)}
:url (str "/pdf-upload"
(when-let [company-name (-> @company :name)]
(when-let [company-name (-> @company :id)]
(str "?company=" company-name)))
:previewsContainer "#dz-hidden"
:previewTemplate "<div class='dz-hidden-preview'></div>"})))})))
@@ -56,12 +56,12 @@
[:th "Date"]
[:th "Amount"]
[:th]]]
[:tbody (for [{:keys [vendor potential-duplicate company customer-identifier invoice-number date total id] :as i} @invoices]
^{:key (str company "-" invoice-number "-" date "-" total "-" id)}
[:tbody (for [{:keys [vendor potential-duplicate company-id customer-identifier invoice-number date total id] :as i} @invoices]
^{:key (str company-id "-" invoice-number "-" date "-" total "-" id)}
[:tr
[:td vendor]
(if company
[:td company]
(if company-id
[:td company-id]
[:td [:i.icon.fa.fa-warning {:title "potential duplicate"}]
(str "'" customer-identifier "' doesn't match any known company")])
[:td invoice-number]