working on making splitting accounts work properly.
This commit is contained in:
@@ -273,10 +273,20 @@
|
|||||||
|
|
||||||
.typeahead {
|
.typeahead {
|
||||||
position:relative;
|
position:relative;
|
||||||
|
overflow:visible;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal {
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-card-body {
|
||||||
|
overflow: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
.typeahead-menu {
|
.typeahead-menu {
|
||||||
position: absolute;
|
position:absolute;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
top: 100%;
|
top: 100%;
|
||||||
@@ -296,7 +306,8 @@
|
|||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
|
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
|
||||||
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
|
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
|
||||||
background-clip: padding-box;
|
/* background-clip: padding-box; */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.typeahead-suggestion {
|
.typeahead-suggestion {
|
||||||
|
|||||||
@@ -279,6 +279,14 @@
|
|||||||
(update-in db [::change-expense-accounts :invoice :expense-accounts]
|
(update-in db [::change-expense-accounts :invoice :expense-accounts]
|
||||||
conj {:amount 0 :expense-account-id nil})))
|
conj {:amount 0 :expense-account-id nil})))
|
||||||
|
|
||||||
|
(re-frame/reg-event-db
|
||||||
|
::remove-expense-account-split
|
||||||
|
(fn [db [_ index]]
|
||||||
|
(update-in db [::change-expense-accounts :invoice :expense-accounts]
|
||||||
|
(fn [expense-accounts]
|
||||||
|
(concat (take index expense-accounts)
|
||||||
|
(drop (inc index) expense-accounts))))))
|
||||||
|
|
||||||
(defn change-expense-accounts-modal []
|
(defn change-expense-accounts-modal []
|
||||||
(let [{{:keys [expense-accounts]} :invoice :as data} @(re-frame/subscribe [::change-expense-accounts])
|
(let [{{:keys [expense-accounts]} :invoice :as data} @(re-frame/subscribe [::change-expense-accounts])
|
||||||
change-event [::events/change-form [::change-expense-accounts]]]
|
change-event [::events/change-form [::change-expense-accounts]]]
|
||||||
@@ -323,7 +331,7 @@
|
|||||||
|
|
||||||
:max (:total data)
|
:max (:total data)
|
||||||
:step "0.01"}]]]]]]
|
:step "0.01"}]]]]]]
|
||||||
[:td [:a.button [:i.fa.fa-times]]]]
|
[:td [:a.button {:on-click (dispatch-event [::remove-expense-account-split index])} [:i.fa.fa-times]]]]
|
||||||
)]]]))
|
)]]]))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user