More condition work.
This commit is contained in:
parent
f9d950c425
commit
acefd96958
3 changed files with 4 additions and 4 deletions
|
|
@ -53,7 +53,7 @@ def _fields_for_model(model: str):
|
|||
"attrs": {"class": "form-control"}, "label_attrs": {"class": "form-label"},
|
||||
"label_spec": "{name} - {room_function.description}"},
|
||||
{"name": "condition", "label": "Condition", "row": "status", "wrap": {"class": "col"},
|
||||
"label_attrs": {"class": "form-label"}},
|
||||
"label_attrs": {"class": "form-label"}, "label_spec": "{description}"},
|
||||
# {"name": "condition", "label": "Condition", "row": "status", "wrap": {"class": "col"},
|
||||
# "type": "select", "options": [
|
||||
# {"label": "Deployed", "value": "Deployed"},
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ def init_listing_routes(app):
|
|||
if model.lower() == 'inventory':
|
||||
spec = {"fields": [
|
||||
"label", "name", "barcode", "serial", "brand.name", "model",
|
||||
"device_type.description", "condition", "owner.label", "location.label",
|
||||
"device_type.description", "condition.description", "owner.label", "location.label",
|
||||
]}
|
||||
columns = [
|
||||
{"field": "label"},
|
||||
|
|
@ -46,7 +46,7 @@ def init_listing_routes(app):
|
|||
{"field": "brand.name", "label": "Brand"},
|
||||
{"field": "model"},
|
||||
{"field": "device_type.description", "label": "Device Type"},
|
||||
{"field": "condition"},
|
||||
{"field": "condition.description", "label": "Condition"},
|
||||
{"field": "owner.label", "label": "Contact",
|
||||
"link": {"endpoint": "entry.entry", "params": {"id": "{owner.id}", "model": "user"}}},
|
||||
{"field": "location.label", "label": "Room"},
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<div class="btn-group">
|
||||
<button type="submit" class="btn btn-outline-primary" id="submit">Save</button>
|
||||
<button type="button" class="btn btn-outline-success"
|
||||
onclick="location.assign({{ url_for('entry.entry_new', model=field['attrs']['data-model']) | tojson }})"
|
||||
onclick="location.href='{{ url_for('entry.entry_new', model=field['attrs']['data-model']) }}'"
|
||||
id="new">New</button>
|
||||
<button type="button" class="btn btn-outline-danger" id="delete" onclick="deleteEntry()">Delete</button>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue