Commit Graph

4 Commits

Author SHA1 Message Date
Dries Peeters 115db52b2b feat(time-approvals): complete time entry approval workflow and fix bugs
- 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).
2026-02-13 21:06:18 +01:00
Dries Peeters bd00e01876 Add configurable date/time format and misc fixes
- 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>
2026-02-07 08:22:34 +01:00
Dries Peeters d8d1757e55 feat: Add image insertion support to time log notes
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
2026-01-27 21:03:07 +01:00
Dries Peeters f3a3a40480 Add project custom fields and file attachments for projects and clients
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
2025-12-03 08:30:15 +01:00