Simplified forms considerably

This commit is contained in:
2022-07-16 10:15:47 -07:00
parent d16b9c9a5e
commit 16a1d243e8
16 changed files with 519 additions and 592 deletions

View File

@@ -139,12 +139,12 @@
[multi-field {:type "multi-field"
:field [:client-overrides]
:template [[typeahead-v3 {:entities @(re-frame/subscribe [::subs/clients])
:style {:width "20em"}
:style {:width "13em"}
:entity->text :name
:type "typeahead-v3"
:field [:client]}]
[:input.input {:type "text"
:style {:width "20em"}
:style {:width "15em"}
:placeholder "Bubblegum"
:field [:name]}]
]}])

View File

@@ -9,6 +9,7 @@
[auto-ap.views.components.address :refer [address2-field]]
[react-signature-canvas]
[auto-ap.views.components.typeahead :refer [typeahead-v3]]
[auto-ap.views.components.level :refer [left-stack]]
[auto-ap.views.components.typeahead.vendor
:refer [search-backed-typeahead]]
[auto-ap.views.utils
@@ -350,8 +351,6 @@
(#{:credit ":credit"} type) [:span.icon-credit-card-1]
:else [:span.icon-accounting-bill])]]
#_[:div.level-item
]
[:div.level-item code ": " name]]
[:div.level-right
[:div.level-item
@@ -647,7 +646,7 @@
:style { :width "15em"}}]
[:input.input {:field [:location]
:placeholder "DT"
:maxlength 2
:max-length 2
:style { :width "4em"}}]]}]]])
(defn bank-accounts-section []
@@ -674,41 +673,35 @@
[form-builder/section {:title "Cash Flow"}
[:label.label (str "Week A (" next-week-a ")")]
[:div.level
[:div.level-left
[:div.level-item
[form-builder/field
"Regular Credits"
[:input.input {:type "number"
:style {:width "10em"}
:placeholder "500.00"
:field [:week-a-credits]
:step "0.01"}]]]
[:div.level-item
[form-builder/field
"Regular Debits"
[:input.input {:type "number"
:style {:width "10em"}
:placeholder "150.00"
:field [:week-a-debits]
:step "0.01"}]]]]]
[left-stack
[form-builder/field
"Regular Credits"
[:input.input {:type "number"
:style {:width "10em"}
:placeholder "500.00"
:field [:week-a-credits]
:step "0.01"}]]
[form-builder/field
"Regular Debits"
[:input.input {:type "number"
:style {:width "10em"}
:placeholder "150.00"
:field [:week-a-debits]
:step "0.01"}]]]
[:label.label (str "Week B (" next-week-b ")")]
[:div.level
[:div.level-left
[:div.level-item
[form-builder/field "Regular Credits"
[:input.input {:type "number"
:style {:width "10em"}
:placeholder "1000.00"
:field [:week-b-credits]
:step "0.01"}]]]
[:div.level-item
[form-builder/field "Regular Debits"
[:input.input {:type "number"
:style {:width "10em"}
:placeholder "250.00"
:field [:week-b-debits]
:step "0.01"}]]]]]
[left-stack
[form-builder/field "Regular Credits"
[:input.input {:type "number"
:style {:width "10em"}
:placeholder "1000.00"
:field [:week-b-credits]
:step "0.01"}]]
[form-builder/field "Regular Debits"
[:input.input {:type "number"
:style {:width "10em"}
:placeholder "250.00"
:field [:week-b-debits]
:step "0.01"}]]]
[:div.field
[:label.label "Forecasted transactions"]