- Fix approve crash: make _mark_entry_approved a no-op (approval state from
TimeEntryApproval only; TimeEntry has no metadata column).
- Fix PostgreSQL enum: use values_callable on ApprovalStatus so DB receives
'pending' not 'PENDING' (matches approvalstatus enum).
- Fix approval templates: use requester/approver, request_comment,
time_entry.notes; reject form field name 'reason'; add can_approve to
view and pass from route.
- Filter get_pending_approvals by current approver (policy/project fallback).
- Add Time Approvals nav link under Work in base.html (module-enabled).
- Add Request approval in time entries list (icon) and view_timer (sidebar);
redirect to list_approvals after request.
- Fix empty_state calls in approvals/list.html (use icon_class positional
args to match components/ui.html macro).
- Settings: add date_format and time_format (model, migration 119, admin UI)
- Use user date/time prefs in templates, calendar, and PDF export
- Expense: eager-load client instead of category in repo, service, and API
- Mobile: clarify server URL and certificate docs, bump to 4.18.0, improve connection diagnostics
- Ignore mobile/android/.gradle/
Co-authored-by: Cursor <cursoragent@cursor.com>
Implement image/picture insertion capability in time log notes by
replacing plain textareas with ToastUI Editor (markdown editor with
image upload support), similar to task descriptions.
Changes:
- Replace textarea with markdown editor in manual time entry form
- Replace textarea with markdown editor in edit time entry form
- Replace textarea with markdown editor in dashboard timer start form
- Update all display views to render markdown with images
- Add image upload support via existing /api/uploads/images endpoint
- Support dark mode theme switching in editors
Features:
- Drag-and-drop or toolbar button image upload
- Full markdown support (headings, bold, italic, lists, links, code, tables, images)
- Backward compatible with existing plain text notes
- Images stored in app/static/uploads/editor/ directory
This addresses GitHub discussion #455 and allows users to add visual
proof/documentation to time entries, particularly useful for
maintenance tasks and general work tracking.
Files modified:
- app/templates/timer/manual_entry.html
- templates/timer/edit_timer.html
- app/templates/main/dashboard.html
- app/templates/timer/view_timer.html
- app/templates/timer/_time_entries_list.html
- app/templates/tasks/view.html
- app/templates/projects/time_entries_overview.html
- app/templates/clients/view.html
- app/templates/client_portal/approval_detail.html
This commit introduces two major features:
1. Project Custom Fields: Add custom_fields JSON column to projects table (migration 085), support for flexible custom data storage, display and edit in project views
2. File Attachments System: Add project_attachments and client_attachments tables (migration 086), new ProjectAttachment and ClientAttachment models, full CRUD operations, file upload/download/delete, client-visible attachments support
Additional improvements: Enhanced data tables, updated project/client/invoice/timer views, improved UI for attachments and custom fields management