Implement work log creation and update API; add new worklog entry route and enhance worklog template with JavaScript functionality
This commit is contained in:
parent
146dcafab3
commit
bb564809ea
5 changed files with 209 additions and 33 deletions
|
@ -61,16 +61,5 @@ worklog_headers = {
|
|||
"Quick Analysis?": lambda i: {"text": i.analysis, "type": "bool", "html": checked_box if i.analysis else unchecked_box},
|
||||
}
|
||||
|
||||
worklog_form_fields = {
|
||||
"start": lambda log: {"label": "Start Timestamp", "type": "date", "value": log.start_time.date().isoformat() if log.start_time else ""},
|
||||
"end": lambda log: {"label": "End Timestamp", "type": "date", "value": log.end_time.date().isoformat() if log.end_time else ""},
|
||||
"contact": lambda log: {"label": "Contact", "type": "datalist", "value": log.contact.full_name if log.contact else "", "list": "contactList"},
|
||||
"item": lambda log: {"label": "Work Item", "type": "datalist", "value": log.work_item.identifier if log.work_item else "", "list": "itemList"},
|
||||
"complete": lambda log: {"label": "Complete?", "type": "checkbox", "value": log.complete},
|
||||
"followup": lambda log: {"label": "Follow Up?", "type": "checkbox", "value": log.followup},
|
||||
"analysis": lambda log: {"label": "Quick Analysis?", "type": "checkbox", "value": log.analysis},
|
||||
"notes": lambda log: {"label": "Notes", "type": "textarea", "value": log.notes or "", "rows": 15}
|
||||
}
|
||||
|
||||
def link(text, endpoint, **values):
|
||||
return {"text": text, "url": url_for(endpoint, **values)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue