Implement adding orders to the cart and viewing it

This commit is contained in:
2023-08-21 14:45:45 +02:00
parent cb41e61c47
commit 86828a67d0
5 changed files with 107 additions and 42 deletions
+4 -4
View File
@@ -210,19 +210,19 @@ view { globals, state } = case state of
]
]
ItemEditor model ->
Html.form [ method "POST", action "/entry/add-to-cart" ]
Html.form [ method "POST" ]
[ fieldset []
[ legend [] [ text "Neuer Inventareintrag" ]
, div [ class "form-input" ]
[ label [ for "barcode" ] [ text "Barcode" ]
, input [ onInput SetBarcode, value model.barcode, disabled True, name "barcode", id "barcode" ] []
, input [ onInput SetBarcode, value model.barcode, name "barcode", id "barcode" ] []
]
, div [ class "form-input" ]
[ label [ for "name" ] [ text "Name" ]
, input [ onInput SetName, value model.name, name "name", id "name" ] []
]
, div [ class "form-input" ]
[ label [ for "sales-units" ] [ text "Stückzahl" ]
[ label [ for "sales-units" ] [ text "Eingekauft" ]
, input [ onInput SetSalesUnits, value <| NumberInput.show model.salesUnits, name "sales-units", id "sales-units", type_ "number" ] []
]
, div [ class "form-input" ]
@@ -264,7 +264,7 @@ view { globals, state } = case state of
[]
, viewSetSuggestedPriceButton model
]
, button [] [ text "In den Warenkorb" ]
, button [] [ text "Auftrag anlegen" ]
]
]