Minor fix in CRUDKit build_href: We don't necessarily only want to link to CRUDKit blueprints.

This commit is contained in:
Yaro Kasear 2025-09-22 15:04:15 -05:00
parent d8e8790987
commit 15d0de44fe
4 changed files with 11 additions and 11 deletions

View file

@ -43,7 +43,7 @@ def init_listing_routes(app):
{"field": "model"},
{"field": "device_type.description", "label": "Device Type"},
{"field": "condition"},
{"field": "owner.label", "label": "Contact", "link": {"endpoint": "user.get_item", "params": {"id": "{owner.id}"}}},
{"field": "owner.label", "label": "Contact", "link": {"endpoint": "entry.entry", "params": {"id": "{owner.id}", "model": "user"}}},
{"field": "location.label", "label": "Room"},
]
elif model.lower() == 'user':
@ -60,7 +60,7 @@ def init_listing_routes(app):
{"field": "label", "label": "Full Name"},
{"field": "last_name"},
{"field": "first_name"},
{"field": "supervisor.label", "label": "Supervisor", "link": {"endpoint": "user.get_item", "params": {"id": "{supervisor.id}"}}},
{"field": "supervisor.label", "label": "Supervisor", "link": {"endpoint": "entry.entry", "params": {"id": "{supervisor.id}", "model": "user"}}},
{"field": "staff", "format": "yesno"},
{"field": "active", "format": "yesno"},
]
@ -80,8 +80,8 @@ def init_listing_routes(app):
"complete",
]}
columns = [
{"field": "work_item.label", "label": "Work Item", "link": {"endpoint": "inventory.get_item", "params": {"id": "{work_item.id}"}}},
{"field": "contact.label", "label": "Contact", "link": {"endpoint": "user.get_item", "params": {"id": "{contact.id}"}}},
{"field": "work_item.label", "label": "Work Item", "link": {"endpoint": "entry.entry", "params": {"id": "{work_item.id}", "model": "inventory"}}},
{"field": "contact.label", "label": "Contact", "link": {"endpoint": "entry.entry", "params": {"id": "{contact.id}", "model": "user"}}},
{"field": "start_time", "format": "datetime"},
{"field": "end_time", "format": "datetime"},
{"field": "complete", "format": "yesno"},