slightly better report
This commit is contained in:
@@ -99,11 +99,11 @@ NOTE: Please review the transactions we may have question for you here: https://
|
||||
{:dispatch [::modal/modal-requested {:title "Your report is ready"
|
||||
:body [:div
|
||||
[:div "Click "
|
||||
[:a {:href (-> result :profit-and-loss-pdf :url) :target "_new"} "here"] " to view it."]
|
||||
[:a {:href (-> result :journal-detail-report-pdf :url) :target "_new"} "here"] " to view it."]
|
||||
(when (and single-client? (seq client-emails))
|
||||
[:div "Once you've confirmed you're happy with it, click "
|
||||
[:a {:href (str "mailto:" (str/join ";" (map :email client-emails)) "?body=" (email-body (-> result :profit-and-loss-pdf :url))
|
||||
"&subject=" (-> result :profit-and-loss-pdf :name) " is ready")}
|
||||
[:a {:href (str "mailto:" (str/join ";" (map :email client-emails)) "?body=" (email-body (-> result :journal-detail-report-pdf :url))
|
||||
"&subject=" (-> result :journal-detail-report-pdf :name) " is ready")}
|
||||
"here"] " to open your email client and to send it to " (str/join "," (map (fn [e]
|
||||
(str (:email e) " (" (:description e) ")"))
|
||||
client-emails)) "."])]}]})))
|
||||
@@ -113,11 +113,13 @@ NOTE: Please review the transactions we may have question for you here: https://
|
||||
(fn [{:keys [db user]}]
|
||||
(cond-> {:graphql {:token user
|
||||
:owns-state {:single ::page}
|
||||
:query-obj {:venia/queries [[:profit-and-loss-pdf
|
||||
:query-obj {:venia/queries [[:journal-detail-report-pdf
|
||||
{:client-ids (map (comp :id :client) (:clients (:data db)))
|
||||
:include-deltas (:include-deltas (:data db))
|
||||
:column-per-location (:column-per-location (:data db))
|
||||
:periods (mapv #(select-keys % #{:start :end}) (:periods (:data db)))}
|
||||
:date-range {:start (date->str (:start (:date-range (:data db))) standard)
|
||||
:end (date->str (:end (:date-range (:data db))) standard)}
|
||||
:categories [:sales
|
||||
:cogs
|
||||
:payroll]}
|
||||
[:url :name]]]}
|
||||
:on-success [::received-pdf]}
|
||||
:set-uri-params {:date-range (:date-range (:data db))
|
||||
|
||||
Reference in New Issue
Block a user