loading relations
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
[auto-ap.events :as events]
|
||||
[auto-ap.subs :as subs]
|
||||
[auto-ap.entities.companies :as company]
|
||||
[auto-ap.entities.vendors :as vendor]
|
||||
[cljsjs.dropzone :as dropzone]
|
||||
[cljs.reader :as edn]))
|
||||
(def dropzone
|
||||
@@ -57,12 +58,12 @@
|
||||
[:th "Date"]
|
||||
[:th "Amount"]
|
||||
[:th]]]
|
||||
[:tbody (for [{:keys [vendor-id potential-duplicate company-id customer-identifier invoice-number date total id] :as i} @invoices]
|
||||
[:tbody (for [{:keys [vendor vendor-id 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-id]
|
||||
[:td (::vendor/name (:vendor i))]
|
||||
(if company-id
|
||||
[:td company-id]
|
||||
[:td (::company/name (:company i))]
|
||||
[:td [:i.icon.fa.fa-warning {:title "potential duplicate"}]
|
||||
(str "'" customer-identifier "' doesn't match any known company")])
|
||||
[:td invoice-number]
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
(ns auto-ap.views.pages.unpaid-invoices
|
||||
(:require [re-frame.core :as re-frame]
|
||||
[auto-ap.entities.companies :as company]
|
||||
[auto-ap.entities.vendors :as vendor]
|
||||
[auto-ap.subs :as subs]
|
||||
[auto-ap.events :as events]
|
||||
))
|
||||
@@ -27,8 +29,8 @@
|
||||
[:tbody (for [{:keys [company invoice-number date total id vendor] :as i} @invoices]
|
||||
^{:key (str company "-" invoice-number "-" date "-" total "-" id)}
|
||||
[:tr
|
||||
[:td vendor]
|
||||
[:td company]
|
||||
[:td (::vendor/name vendor)]
|
||||
[:td (::company/name company)]
|
||||
[:td invoice-number]
|
||||
[:td date]
|
||||
[:td total]])]])]))
|
||||
|
||||
Reference in New Issue
Block a user