From 4aed529b3f3ecad1dd18d818e103745c2f74685f Mon Sep 17 00:00:00 2001 From: Bryce Date: Fri, 28 Jun 2024 12:22:12 -0700 Subject: [PATCH] Always shows client for multi location --- src/clj/auto_ap/ssr/invoice/import.clj | 3 ++- src/clj/auto_ap/ssr/invoices.clj | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/clj/auto_ap/ssr/invoice/import.clj b/src/clj/auto_ap/ssr/invoice/import.clj index b5a63fc9..4532cb73 100644 --- a/src/clj/auto_ap/ssr/invoice/import.clj +++ b/src/clj/auto_ap/ssr/invoice/import.clj @@ -486,7 +486,8 @@ :name "Client" :sort-key "client" :hide? (fn [args] - (= (count (:clients args)) 1)) + (and (= (count (:clients args)) 1) + (= 1 (count (:client/locations (:client args)))))) :render (fn [x] [:div.flex.items-center.gap-2 (-> x :invoice/client :client/name) (com/pill {:color :primary} (-> x :invoice/location)) ])} diff --git a/src/clj/auto_ap/ssr/invoices.clj b/src/clj/auto_ap/ssr/invoices.clj index bb993696..41a924d6 100644 --- a/src/clj/auto_ap/ssr/invoices.clj +++ b/src/clj/auto_ap/ssr/invoices.clj @@ -489,10 +489,10 @@ :name "Client" :sort-key "client" :hide? (fn [args] - (= (count (:clients args)) 1)) + (and (= (count (:clients args)) 1) + (= 1 (count (:client/locations (:client args)))))) :render (fn [x] [:div.flex.items-center.gap-2 (-> x :invoice/client :client/name) - (com/pill {:color :primary} (-> x :invoice/location)) - ])} + (com/pill {:color :primary} (-> x :invoice/location)) ])} {:key "vendor" :name "Vendor" :sort-key "vendor"