diff --git a/resources/public/index.html b/resources/public/index.html
index 010858af..01324142 100644
--- a/resources/public/index.html
+++ b/resources/public/index.html
@@ -34,7 +34,16 @@
to { -webkit-transform: translateY(-100%); transform:
translateY(-100%); }
}
+
+ @keyframes flashPrimary {
+ from {
+ background-color: #00d1b2;
+ }
+ }
+ tr.live-added {
+ animation: flashPrimary .7s ease both;
+ }
.left-nav {
width: 300px;
}
diff --git a/src/clj/auto_ap/time.clj b/src/clj/auto_ap/time.clj
index fd233b80..e3abf766 100644
--- a/src/clj/auto_ap/time.clj
+++ b/src/clj/auto_ap/time.clj
@@ -8,5 +8,8 @@
(def normal-date "MM/dd/yyyy")
(defn parse [v format]
- (time/from-time-zone (f/parse (f/formatter format) v)
- (time/time-zone-for-id "America/Los_Angeles")))
+ (try
+ (time/from-time-zone (f/parse (f/formatter format) v)
+ (time/time-zone-for-id "America/Los_Angeles"))
+ (catch Exception e
+ nil)))
diff --git a/src/cljs/auto_ap/views/components/invoice_table.cljs b/src/cljs/auto_ap/views/components/invoice_table.cljs
index 16ddd9c9..14f6981f 100644
--- a/src/cljs/auto_ap/views/components/invoice_table.cljs
+++ b/src/cljs/auto_ap/views/components/invoice_table.cljs
@@ -90,7 +90,7 @@
[:i.fa.fa-spin.fa-spinner]]]
(for [{:keys [company checks invoice-number date total outstanding-balance id vendor] :as i} (:invoices @invoice-page)]
^{:key id}
- [:tr
+ [:tr {:class (:class i)}
(when check-boxes
[:td [:input.checkbox {:type "checkbox"
:checked (if (get checked id)
diff --git a/src/cljs/auto_ap/views/pages/unpaid_invoices.cljs b/src/cljs/auto_ap/views/pages/unpaid_invoices.cljs
index 9aae8279..f7351ecd 100644
--- a/src/cljs/auto_ap/views/pages/unpaid_invoices.cljs
+++ b/src/cljs/auto_ap/views/pages/unpaid_invoices.cljs
@@ -206,12 +206,12 @@
(re-frame/reg-event-fx
::invoice-created
- (fn [{:keys [db]} [_ result]]
+ (fn [{:keys [db]} [_ {:keys [add-invoice]}]]
{:dispatch [::events/modal-completed ::new-invoice]
:db (-> db
(update-in [::invoice-page :invoices]
(fn [is]
- (into [(:add-invoice result)]
+ (into [(assoc add-invoice :class "live-added")]
is)))
(dissoc ::new-invoice))}))