CRUDkit fixes and changes.

This commit is contained in:
Yaro Kasear 2025-09-10 09:18:31 -05:00
parent 9d36d600bb
commit 7ddfe084ba
5 changed files with 98 additions and 43 deletions

View file

@ -16,11 +16,23 @@ def init_index_routes(app):
def index():
session = get_session()
work_log_service = CRUDService(WorkLog, session)
work_logs = work_log_service.list({"complete__ne": 1, "fields": ["start_time"]})
print(work_logs)
logs = render_table(work_logs)
work_logs = work_log_service.list({
"complete__ne": 1,
"fields": [
"start_time",
"contact.last_name",
"work_item.name"
],
"limit": 10
})
headers = [
"Start Time",
"Contact Last Name",
"Work Item"
]
logs = render_table(work_logs, headers)
return render_template("index.html", logs=logs)
return render_template("index.html", logs=logs, headers=headers)
@bp_index.get("/LICENSE")
def license():