Archived
1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
SOD/views/admin/orders/edit.pug

76 lines
3.6 KiB
Text
Raw Normal View History

extends ../../layout
block content
2020-09-28 22:55:35 +02:00
div.container
h1=__("admin.ordersManagement")
2020-09-28 22:55:35 +02:00
div.row
form#order.col.s12(method="POST")
input(type="hidden" name="id" value=order.id)
div.row
div.input-field.col.s12
select(name="department" required)
each department in departments
option(value=department.name selected=order.Department.name === department.name)=department.name
label=__("department") + ":"
2020-09-28 22:55:35 +02:00
div.row
div.input-field.col.s12
select(name="username")
each user in users
option(value=user.username selected=order.User && order.User.username === user.username)=user.username
label=__("username") + ":"
div.row
div.input-field.col.s6
input#firstname(type="text" name="firstName" value=order.firstName required)
label(for="firstname")=__("firstName") + ":"
div.input-field.col.s6
input#lastname(type="text" name="lastName" value=order.lastName required)
label(for="lastname")=__("lastName") + ":"
div#oderCreator.row
h5=__("order")
div.input-field.col.s6
select#sandwich
option(value="" disabled selected hidden)=__("index.chooseSandwich")
each sandwich in sandwiches
option(value=sandwich.name)=sandwich.name
label=__("sandwich") + ":"
div.input-field.col.s6
input#day(type="date")
label(for="day")=__("index.day") + ":"
a#addOrder.btn-floating.btn-large.waves-effect.waves-light.blue: i.material-icons add
div#orders
- i = 0;
each sandwich in order.Sandwiches
- i++;
div.row(id="order"+i)
div.input-field.col.s6
input(id="sandwich"+i type="text" name="sandwiches[#{i}]" value=sandwich.name readonly required)
label(for="sandwich"+i)=__("sandwich")
div.input-field.col.s6
input(id="date"+i type="date" name="dates[#{i}]" value=sandwich.SandwichOrder.date readonly required)
label(for="date"+i)=__("index.day")
div.input-field.col.s12.center
p
label
input(type="checkbox" name="give[#{i}]" checked=sandwich.SandwichOrder.give)
span=__("admin.given")
a.btn-floating.btn-large.waves-effect.waves-light.red
i.material-icons remove
div.row.center
div.input-field.col.s12
p
label(for="paid")
input#paid(type="checkbox" name="paid" checked=order.paid)
span=__("admin.paid")
div.row.center
div.input-field.col.s12
+submit(__("save"))
script(src="/javascripts/admin/orders/add.js")
2020-09-28 22:55:35 +02:00
script(src="/javascripts/admin/orders/edit.js")