@open-mercato/core 0.7.1-develop.7178.1.ab93fbaf4e → 0.7.1-develop.7180.1.9717fbbb43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +2 -2
- package/dist/generated/entities/staff_time_entry/index.js +14 -0
- package/dist/generated/entities/staff_time_entry/index.js.map +2 -2
- package/dist/generated/entities/staff_time_entry_tag/index.js +15 -0
- package/dist/generated/entities/staff_time_entry_tag/index.js.map +7 -0
- package/dist/generated/entities/staff_time_project/index.js +16 -0
- package/dist/generated/entities/staff_time_project/index.js.map +2 -2
- package/dist/generated/entities/staff_time_report/index.js +57 -0
- package/dist/generated/entities/staff_time_report/index.js.map +7 -0
- package/dist/generated/entities/staff_time_report_entry/index.js +27 -0
- package/dist/generated/entities/staff_time_report_entry/index.js.map +7 -0
- package/dist/generated/entities/staff_time_report_event/index.js +21 -0
- package/dist/generated/entities/staff_time_report_event/index.js.map +7 -0
- package/dist/generated/entities/staff_time_report_project/index.js +15 -0
- package/dist/generated/entities/staff_time_report_project/index.js.map +7 -0
- package/dist/generated/entities/staff_time_tag/index.js +21 -0
- package/dist/generated/entities/staff_time_tag/index.js.map +7 -0
- package/dist/generated/entities/staff_time_task/index.js +37 -0
- package/dist/generated/entities/staff_time_task/index.js.map +7 -0
- package/dist/generated/entities/staff_time_task_comment/index.js +21 -0
- package/dist/generated/entities/staff_time_task_comment/index.js.map +7 -0
- package/dist/generated/entities/staff_time_task_status/index.js +29 -0
- package/dist/generated/entities/staff_time_task_status/index.js.map +7 -0
- package/dist/generated/entities/staff_time_task_tag/index.js +15 -0
- package/dist/generated/entities/staff_time_task_tag/index.js.map +7 -0
- package/dist/generated/entities.ids.generated.js +11 -1
- package/dist/generated/entities.ids.generated.js.map +2 -2
- package/dist/generated/entity-fields-registry.js +149 -0
- package/dist/generated/entity-fields-registry.js.map +2 -2
- package/dist/helpers/integration/timesheetFixtures.js +7 -0
- package/dist/helpers/integration/timesheetFixtures.js.map +2 -2
- package/dist/modules/auth/cli.js +16 -0
- package/dist/modules/auth/cli.js.map +2 -2
- package/dist/modules/auth/lib/backendChrome.js +1 -0
- package/dist/modules/auth/lib/backendChrome.js.map +2 -2
- package/dist/modules/customer_accounts/lib/customerRoleAcls.js +44 -0
- package/dist/modules/customer_accounts/lib/customerRoleAcls.js.map +7 -0
- package/dist/modules/customer_accounts/setup.js +1 -28
- package/dist/modules/customer_accounts/setup.js.map +2 -2
- package/dist/modules/data_sync/api/options.js +2 -0
- package/dist/modules/data_sync/api/options.js.map +2 -2
- package/dist/modules/data_sync/backend/data-sync/page.js +39 -17
- package/dist/modules/data_sync/backend/data-sync/page.js.map +2 -2
- package/dist/modules/data_sync/lib/start-controls.js +42 -0
- package/dist/modules/data_sync/lib/start-controls.js.map +7 -0
- package/dist/modules/staff/acl.js +9 -1
- package/dist/modules/staff/acl.js.map +2 -2
- package/dist/modules/staff/ai-agents.js +142 -0
- package/dist/modules/staff/ai-agents.js.map +7 -0
- package/dist/modules/staff/ai-tools/time-tracking-pack.js +348 -0
- package/dist/modules/staff/ai-tools/time-tracking-pack.js.map +7 -0
- package/dist/modules/staff/ai-tools/types.js +54 -0
- package/dist/modules/staff/ai-tools/types.js.map +7 -0
- package/dist/modules/staff/ai-tools.js +8 -0
- package/dist/modules/staff/ai-tools.js.map +7 -0
- package/dist/modules/staff/analytics.js +84 -1
- package/dist/modules/staff/analytics.js.map +2 -2
- package/dist/modules/staff/api/guards.js +37 -3
- package/dist/modules/staff/api/guards.js.map +2 -2
- package/dist/modules/staff/api/leave-requests/accept/route.js +1 -3
- package/dist/modules/staff/api/leave-requests/accept/route.js.map +2 -2
- package/dist/modules/staff/api/leave-requests/reject/route.js +1 -3
- package/dist/modules/staff/api/leave-requests/reject/route.js.map +2 -2
- package/dist/modules/staff/api/portal/time-reports/[id]/route.js +131 -0
- package/dist/modules/staff/api/portal/time-reports/[id]/route.js.map +7 -0
- package/dist/modules/staff/api/portal/time-reports/route.js +179 -0
- package/dist/modules/staff/api/portal/time-reports/route.js.map +7 -0
- package/dist/modules/staff/api/team-members/self/route.js +1 -3
- package/dist/modules/staff/api/team-members/self/route.js.map +2 -2
- package/dist/modules/staff/api/team-members/tags/assign/route.js +1 -3
- package/dist/modules/staff/api/team-members/tags/assign/route.js.map +2 -2
- package/dist/modules/staff/api/team-members/tags/unassign/route.js +1 -3
- package/dist/modules/staff/api/team-members/tags/unassign/route.js.map +2 -2
- package/dist/modules/staff/api/timesheets/_shared/withTimesheetInterceptors.js +174 -0
- package/dist/modules/staff/api/timesheets/_shared/withTimesheetInterceptors.js.map +7 -0
- package/dist/modules/staff/api/timesheets/access-requests/route.js +226 -0
- package/dist/modules/staff/api/timesheets/access-requests/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/my-projects/[projectId]/route.js +15 -8
- package/dist/modules/staff/api/timesheets/my-projects/[projectId]/route.js.map +2 -2
- package/dist/modules/staff/api/timesheets/my-projects/route.js +13 -1
- package/dist/modules/staff/api/timesheets/my-projects/route.js.map +2 -2
- package/dist/modules/staff/api/timesheets/my-work/myWorkAggregate.js +42 -0
- package/dist/modules/staff/api/timesheets/my-work/myWorkAggregate.js.map +7 -0
- package/dist/modules/staff/api/timesheets/my-work/route.js +383 -0
- package/dist/modules/staff/api/timesheets/my-work/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/projects/kpis/route.js +14 -2
- package/dist/modules/staff/api/timesheets/projects/kpis/route.js.map +2 -2
- package/dist/modules/staff/api/timesheets/reports/[id]/close/route.js +168 -0
- package/dist/modules/staff/api/timesheets/reports/[id]/close/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/reports/[id]/export/route.js +246 -0
- package/dist/modules/staff/api/timesheets/reports/[id]/export/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/reports/[id]/sheet/route.js +183 -0
- package/dist/modules/staff/api/timesheets/reports/[id]/sheet/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/reports/[id]/unlock/route.js +164 -0
- package/dist/modules/staff/api/timesheets/reports/[id]/unlock/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/reports/preview/route.js +360 -0
- package/dist/modules/staff/api/timesheets/reports/preview/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/reports/route.js +316 -0
- package/dist/modules/staff/api/timesheets/reports/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/reports/shared.js +63 -0
- package/dist/modules/staff/api/timesheets/reports/shared.js.map +7 -0
- package/dist/modules/staff/api/timesheets/settings/reapply-rounding/route.js +164 -0
- package/dist/modules/staff/api/timesheets/settings/reapply-rounding/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/settings/rounding-impact/route.js +168 -0
- package/dist/modules/staff/api/timesheets/settings/rounding-impact/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/settings/route.js +199 -0
- package/dist/modules/staff/api/timesheets/settings/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/tags/access.js +76 -0
- package/dist/modules/staff/api/timesheets/tags/access.js.map +7 -0
- package/dist/modules/staff/api/timesheets/tags/entry-assignments/route.js +235 -0
- package/dist/modules/staff/api/timesheets/tags/entry-assignments/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/tags/route.js +160 -0
- package/dist/modules/staff/api/timesheets/tags/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/tags/task-assignments/route.js +233 -0
- package/dist/modules/staff/api/timesheets/tags/task-assignments/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/task-statuses/route.js +188 -0
- package/dist/modules/staff/api/timesheets/task-statuses/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/tasks/[id]/comments/route.js +399 -0
- package/dist/modules/staff/api/timesheets/tasks/[id]/comments/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/tasks/[id]/status/route.js +210 -0
- package/dist/modules/staff/api/timesheets/tasks/[id]/status/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/tasks/route.js +333 -0
- package/dist/modules/staff/api/timesheets/tasks/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/time-entries/[id]/duplicate/route.js +228 -0
- package/dist/modules/staff/api/timesheets/time-entries/[id]/duplicate/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/time-entries/[id]/segments/[segmentId]/route.js +29 -10
- package/dist/modules/staff/api/timesheets/time-entries/[id]/segments/[segmentId]/route.js.map +2 -2
- package/dist/modules/staff/api/timesheets/time-entries/[id]/segments/route.js +31 -18
- package/dist/modules/staff/api/timesheets/time-entries/[id]/segments/route.js.map +2 -2
- package/dist/modules/staff/api/timesheets/time-entries/[id]/timer-start/route.js +21 -7
- package/dist/modules/staff/api/timesheets/time-entries/[id]/timer-start/route.js.map +2 -2
- package/dist/modules/staff/api/timesheets/time-entries/[id]/timer-stop/route.js +27 -7
- package/dist/modules/staff/api/timesheets/time-entries/[id]/timer-stop/route.js.map +2 -2
- package/dist/modules/staff/api/timesheets/time-entries/bulk/route.js +215 -32
- package/dist/modules/staff/api/timesheets/time-entries/bulk/route.js.map +2 -2
- package/dist/modules/staff/api/timesheets/time-entries/copy-day/route.js +378 -0
- package/dist/modules/staff/api/timesheets/time-entries/copy-day/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/time-entries/overlaps/route.js +340 -0
- package/dist/modules/staff/api/timesheets/time-entries/overlaps/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/time-entries/route.js +238 -26
- package/dist/modules/staff/api/timesheets/time-entries/route.js.map +2 -2
- package/dist/modules/staff/api/timesheets/time-entries/start-timer/route.js +23 -8
- package/dist/modules/staff/api/timesheets/time-entries/start-timer/route.js.map +2 -2
- package/dist/modules/staff/api/timesheets/time-projects/[id]/change-currency/route.js +209 -0
- package/dist/modules/staff/api/timesheets/time-projects/[id]/change-currency/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/time-projects/[id]/employees/route.js +59 -2
- package/dist/modules/staff/api/timesheets/time-projects/[id]/employees/route.js.map +2 -2
- package/dist/modules/staff/api/timesheets/time-projects/route.js +264 -22
- package/dist/modules/staff/api/timesheets/time-projects/route.js.map +2 -2
- package/dist/modules/staff/backend/staff/time-tracking/board/page.js +110 -0
- package/dist/modules/staff/backend/staff/time-tracking/board/page.js.map +7 -0
- package/dist/modules/staff/backend/staff/time-tracking/board/page.meta.js +18 -0
- package/dist/modules/staff/backend/staff/time-tracking/board/page.meta.js.map +7 -0
- package/dist/modules/staff/backend/staff/time-tracking/entries/page.js +981 -0
- package/dist/modules/staff/backend/staff/time-tracking/entries/page.js.map +7 -0
- package/dist/modules/staff/backend/staff/time-tracking/entries/page.meta.js +18 -0
- package/dist/modules/staff/backend/staff/time-tracking/entries/page.meta.js.map +7 -0
- package/dist/modules/staff/backend/staff/time-tracking/page.js +583 -0
- package/dist/modules/staff/backend/staff/time-tracking/page.js.map +7 -0
- package/dist/modules/staff/backend/staff/time-tracking/page.meta.js +15 -0
- package/dist/modules/staff/backend/staff/time-tracking/page.meta.js.map +7 -0
- package/dist/modules/staff/backend/staff/time-tracking/projects/[id]/board/page.js +65 -0
- package/dist/modules/staff/backend/staff/time-tracking/projects/[id]/board/page.js.map +7 -0
- package/dist/modules/staff/backend/staff/time-tracking/projects/[id]/board/page.meta.js +16 -0
- package/dist/modules/staff/backend/staff/time-tracking/projects/[id]/board/page.meta.js.map +7 -0
- package/dist/modules/staff/backend/staff/time-tracking/projects/[id]/edit/page.js +229 -0
- package/dist/modules/staff/backend/staff/time-tracking/projects/[id]/edit/page.js.map +7 -0
- package/dist/modules/staff/backend/staff/time-tracking/projects/[id]/edit/page.meta.js +16 -0
- package/dist/modules/staff/backend/staff/time-tracking/projects/[id]/edit/page.meta.js.map +7 -0
- package/dist/modules/staff/backend/staff/time-tracking/projects/[id]/page.js +1014 -0
- package/dist/modules/staff/backend/staff/time-tracking/projects/[id]/page.js.map +7 -0
- package/dist/modules/staff/backend/staff/time-tracking/projects/[id]/page.meta.js +16 -0
- package/dist/modules/staff/backend/staff/time-tracking/projects/[id]/page.meta.js.map +7 -0
- package/dist/modules/staff/backend/staff/time-tracking/projects/create/page.js +97 -0
- package/dist/modules/staff/backend/staff/time-tracking/projects/create/page.js.map +7 -0
- package/dist/modules/staff/backend/staff/time-tracking/projects/create/page.meta.js +16 -0
- package/dist/modules/staff/backend/staff/time-tracking/projects/create/page.meta.js.map +7 -0
- package/dist/modules/staff/backend/staff/time-tracking/projects/page.js +1040 -0
- package/dist/modules/staff/backend/staff/time-tracking/projects/page.js.map +7 -0
- package/dist/modules/staff/backend/staff/time-tracking/projects/page.meta.js +19 -0
- package/dist/modules/staff/backend/staff/time-tracking/projects/page.meta.js.map +7 -0
- package/dist/modules/staff/backend/staff/time-tracking/projects/projectFormConfig.js +353 -0
- package/dist/modules/staff/backend/staff/time-tracking/projects/projectFormConfig.js.map +7 -0
- package/dist/modules/staff/backend/staff/time-tracking/reports/[id]/page.js +457 -0
- package/dist/modules/staff/backend/staff/time-tracking/reports/[id]/page.js.map +7 -0
- package/dist/modules/staff/backend/staff/time-tracking/reports/[id]/page.meta.js +16 -0
- package/dist/modules/staff/backend/staff/time-tracking/reports/[id]/page.meta.js.map +7 -0
- package/dist/modules/staff/backend/staff/time-tracking/reports/create/page.js +697 -0
- package/dist/modules/staff/backend/staff/time-tracking/reports/create/page.js.map +7 -0
- package/dist/modules/staff/backend/staff/time-tracking/reports/create/page.meta.js +16 -0
- package/dist/modules/staff/backend/staff/time-tracking/reports/create/page.meta.js.map +7 -0
- package/dist/modules/staff/backend/staff/time-tracking/reports/page.js +174 -0
- package/dist/modules/staff/backend/staff/time-tracking/reports/page.js.map +7 -0
- package/dist/modules/staff/backend/staff/time-tracking/reports/page.meta.js +18 -0
- package/dist/modules/staff/backend/staff/time-tracking/reports/page.meta.js.map +7 -0
- package/dist/modules/staff/backend/staff/time-tracking/settings/page.js +546 -0
- package/dist/modules/staff/backend/staff/time-tracking/settings/page.js.map +7 -0
- package/dist/modules/staff/backend/staff/time-tracking/settings/page.meta.js +18 -0
- package/dist/modules/staff/backend/staff/time-tracking/settings/page.meta.js.map +7 -0
- package/dist/modules/staff/backend/staff/time-tracking/timesheet/GridView.js +710 -0
- package/dist/modules/staff/backend/staff/time-tracking/timesheet/GridView.js.map +7 -0
- package/dist/modules/staff/backend/staff/time-tracking/timesheet/page.js +646 -0
- package/dist/modules/staff/backend/staff/time-tracking/timesheet/page.js.map +7 -0
- package/dist/modules/staff/backend/staff/time-tracking/timesheet/page.meta.js +18 -0
- package/dist/modules/staff/backend/staff/time-tracking/timesheet/page.meta.js.map +7 -0
- package/dist/modules/staff/backend/staff/timesheets/page.js +4 -793
- package/dist/modules/staff/backend/staff/timesheets/page.js.map +2 -2
- package/dist/modules/staff/backend/staff/timesheets/page.meta.js +2 -7
- package/dist/modules/staff/backend/staff/timesheets/page.meta.js.map +2 -2
- package/dist/modules/staff/backend/staff/timesheets/projects/[id]/edit/page.js +5 -136
- package/dist/modules/staff/backend/staff/timesheets/projects/[id]/edit/page.js.map +2 -2
- package/dist/modules/staff/backend/staff/timesheets/projects/[id]/edit/page.meta.js +1 -7
- package/dist/modules/staff/backend/staff/timesheets/projects/[id]/edit/page.meta.js.map +2 -2
- package/dist/modules/staff/backend/staff/timesheets/projects/[id]/page.js +5 -445
- package/dist/modules/staff/backend/staff/timesheets/projects/[id]/page.js.map +3 -3
- package/dist/modules/staff/backend/staff/timesheets/projects/[id]/page.meta.js +1 -7
- package/dist/modules/staff/backend/staff/timesheets/projects/[id]/page.meta.js.map +2 -2
- package/dist/modules/staff/backend/staff/timesheets/projects/create/page.js +4 -76
- package/dist/modules/staff/backend/staff/timesheets/projects/create/page.js.map +2 -2
- package/dist/modules/staff/backend/staff/timesheets/projects/create/page.meta.js +1 -7
- package/dist/modules/staff/backend/staff/timesheets/projects/create/page.meta.js.map +2 -2
- package/dist/modules/staff/backend/staff/timesheets/projects/page.js +4 -613
- package/dist/modules/staff/backend/staff/timesheets/projects/page.js.map +2 -2
- package/dist/modules/staff/backend/staff/timesheets/projects/page.meta.js +2 -17
- package/dist/modules/staff/backend/staff/timesheets/projects/page.meta.js.map +2 -2
- package/dist/modules/staff/ce.js +40 -0
- package/dist/modules/staff/ce.js.map +2 -2
- package/dist/modules/staff/cli.js +166 -1
- package/dist/modules/staff/cli.js.map +2 -2
- package/dist/modules/staff/commands/index.js +5 -0
- package/dist/modules/staff/commands/index.js.map +2 -2
- package/dist/modules/staff/commands/timesheets-entries.js +569 -21
- package/dist/modules/staff/commands/timesheets-entries.js.map +3 -3
- package/dist/modules/staff/commands/timesheets-projects.js +450 -7
- package/dist/modules/staff/commands/timesheets-projects.js.map +2 -2
- package/dist/modules/staff/commands/timesheets-reports.js +1036 -0
- package/dist/modules/staff/commands/timesheets-reports.js.map +7 -0
- package/dist/modules/staff/commands/timesheets-tags.js +1015 -0
- package/dist/modules/staff/commands/timesheets-tags.js.map +7 -0
- package/dist/modules/staff/commands/timesheets-task-comments.js +438 -0
- package/dist/modules/staff/commands/timesheets-task-comments.js.map +7 -0
- package/dist/modules/staff/commands/timesheets-task-statuses.js +723 -0
- package/dist/modules/staff/commands/timesheets-task-statuses.js.map +7 -0
- package/dist/modules/staff/commands/timesheets-tasks.js +834 -0
- package/dist/modules/staff/commands/timesheets-tasks.js.map +7 -0
- package/dist/modules/staff/data/enrichers.js +426 -12
- package/dist/modules/staff/data/enrichers.js.map +2 -2
- package/dist/modules/staff/data/entities.js +552 -3
- package/dist/modules/staff/data/entities.js.map +2 -2
- package/dist/modules/staff/data/extensions.js +41 -0
- package/dist/modules/staff/data/extensions.js.map +7 -0
- package/dist/modules/staff/data/validators.js +254 -9
- package/dist/modules/staff/data/validators.js.map +2 -2
- package/dist/modules/staff/di.js +42 -1
- package/dist/modules/staff/di.js.map +2 -2
- package/dist/modules/staff/events.js +84 -6
- package/dist/modules/staff/events.js.map +2 -2
- package/dist/modules/staff/events.payloads.js +158 -0
- package/dist/modules/staff/events.payloads.js.map +7 -0
- package/dist/modules/staff/extension-points.js +261 -0
- package/dist/modules/staff/extension-points.js.map +7 -0
- package/dist/modules/staff/frontend/[orgSlug]/portal/time-reports/[id]/page.js +138 -0
- package/dist/modules/staff/frontend/[orgSlug]/portal/time-reports/[id]/page.js.map +7 -0
- package/dist/modules/staff/frontend/[orgSlug]/portal/time-reports/[id]/page.meta.js +12 -0
- package/dist/modules/staff/frontend/[orgSlug]/portal/time-reports/[id]/page.meta.js.map +7 -0
- package/dist/modules/staff/frontend/[orgSlug]/portal/time-reports/page.js +133 -0
- package/dist/modules/staff/frontend/[orgSlug]/portal/time-reports/page.js.map +7 -0
- package/dist/modules/staff/frontend/[orgSlug]/portal/time-reports/page.meta.js +19 -0
- package/dist/modules/staff/frontend/[orgSlug]/portal/time-reports/page.meta.js.map +7 -0
- package/dist/modules/staff/lib/crud.js +11 -1
- package/dist/modules/staff/lib/crud.js.map +2 -2
- package/dist/modules/staff/lib/time-tracking/access.js +92 -0
- package/dist/modules/staff/lib/time-tracking/access.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking/billability.js +39 -0
- package/dist/modules/staff/lib/time-tracking/billability.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking/capacity.js +68 -0
- package/dist/modules/staff/lib/time-tracking/capacity.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking/componentContracts.js +15 -0
- package/dist/modules/staff/lib/time-tracking/componentContracts.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking/cost.js +82 -0
- package/dist/modules/staff/lib/time-tracking/cost.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking/duration.js +55 -0
- package/dist/modules/staff/lib/time-tracking/duration.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking/featureAccess.js +41 -0
- package/dist/modules/staff/lib/time-tracking/featureAccess.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking/interval.js +72 -0
- package/dist/modules/staff/lib/time-tracking/interval.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking/migrateProjectCodes.js +88 -0
- package/dist/modules/staff/lib/time-tracking/migrateProjectCodes.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking/moneyVisibility.js +10 -0
- package/dist/modules/staff/lib/time-tracking/moneyVisibility.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking/overlap.js +87 -0
- package/dist/modules/staff/lib/time-tracking/overlap.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking/portalRecipients.js +27 -0
- package/dist/modules/staff/lib/time-tracking/portalRecipients.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking/portalReports.js +16 -0
- package/dist/modules/staff/lib/time-tracking/portalReports.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking/projectCode.js +135 -0
- package/dist/modules/staff/lib/time-tracking/projectCode.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking/reapplyRounding.js +187 -0
- package/dist/modules/staff/lib/time-tracking/reapplyRounding.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking/recalculationRunner.js +80 -0
- package/dist/modules/staff/lib/time-tracking/recalculationRunner.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking/recalculations.js +56 -0
- package/dist/modules/staff/lib/time-tracking/recalculations.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking/registries/invoke.js +63 -0
- package/dist/modules/staff/lib/time-tracking/registries/invoke.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking/registries/registry.js +62 -0
- package/dist/modules/staff/lib/time-tracking/registries/registry.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking/registries/scope.js +21 -0
- package/dist/modules/staff/lib/time-tracking/registries/scope.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking/rollup.js +34 -0
- package/dist/modules/staff/lib/time-tracking/rollup.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking/rounding.js +66 -0
- package/dist/modules/staff/lib/time-tracking/rounding.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking/roundingImpact.js +39 -0
- package/dist/modules/staff/lib/time-tracking/roundingImpact.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking/settingKeys.js +214 -0
- package/dist/modules/staff/lib/time-tracking/settingKeys.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking/settings.js +87 -0
- package/dist/modules/staff/lib/time-tracking/settings.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking/sqlInClause.js +9 -0
- package/dist/modules/staff/lib/time-tracking/sqlInClause.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking/timeEntrySources.js +48 -0
- package/dist/modules/staff/lib/time-tracking/timeEntrySources.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/BoardFilterChips.js +283 -0
- package/dist/modules/staff/lib/time-tracking-ui/BoardFilterChips.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/CustomerPicker.js +324 -0
- package/dist/modules/staff/lib/time-tracking-ui/CustomerPicker.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/DurationInput.js +121 -0
- package/dist/modules/staff/lib/time-tracking-ui/DurationInput.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/EntryDetailsFields.js +188 -0
- package/dist/modules/staff/lib/time-tracking-ui/EntryDetailsFields.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/EntryFilterBar.js +89 -0
- package/dist/modules/staff/lib/time-tracking-ui/EntryFilterBar.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/KanbanBoard.js +855 -0
- package/dist/modules/staff/lib/time-tracking-ui/KanbanBoard.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/KanbanCard.js +360 -0
- package/dist/modules/staff/lib/time-tracking-ui/KanbanCard.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/KanbanColumn.js +259 -0
- package/dist/modules/staff/lib/time-tracking-ui/KanbanColumn.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/NewTaskDialog.js +238 -0
- package/dist/modules/staff/lib/time-tracking-ui/NewTaskDialog.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/NoProjectAccess.js +130 -0
- package/dist/modules/staff/lib/time-tracking-ui/NoProjectAccess.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/PeriodSelector.js +98 -0
- package/dist/modules/staff/lib/time-tracking-ui/PeriodSelector.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/PhasePlaceholder.js +27 -0
- package/dist/modules/staff/lib/time-tracking-ui/PhasePlaceholder.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/ProjectCodeField.js +166 -0
- package/dist/modules/staff/lib/time-tracking-ui/ProjectCodeField.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/ProjectCurrencyField.js +295 -0
- package/dist/modules/staff/lib/time-tracking-ui/ProjectCurrencyField.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/ProjectFormSections.js +212 -0
- package/dist/modules/staff/lib/time-tracking-ui/ProjectFormSections.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/ProjectTeamDrawer.js +729 -0
- package/dist/modules/staff/lib/time-tracking-ui/ProjectTeamDrawer.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/ReportSheet.js +217 -0
- package/dist/modules/staff/lib/time-tracking-ui/ReportSheet.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/TagPicker.js +158 -0
- package/dist/modules/staff/lib/time-tracking-ui/TagPicker.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/TaskBoardScreen.js +224 -0
- package/dist/modules/staff/lib/time-tracking-ui/TaskBoardScreen.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/TaskCommentThread.js +93 -0
- package/dist/modules/staff/lib/time-tracking-ui/TaskCommentThread.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/TaskDrawer.js +1196 -0
- package/dist/modules/staff/lib/time-tracking-ui/TaskDrawer.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/TaskListView.js +176 -0
- package/dist/modules/staff/lib/time-tracking-ui/TaskListView.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/TaskPicker.js +307 -0
- package/dist/modules/staff/lib/time-tracking-ui/TaskPicker.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/TaskQuickLog.js +284 -0
- package/dist/modules/staff/lib/time-tracking-ui/TaskQuickLog.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/TimeEntriesSummaryFooter.js +73 -0
- package/dist/modules/staff/lib/time-tracking-ui/TimeEntriesSummaryFooter.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/TimeEntryDialog.js +1499 -0
- package/dist/modules/staff/lib/time-tracking-ui/TimeEntryDialog.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/TimeEntryDurationCell.js +95 -0
- package/dist/modules/staff/lib/time-tracking-ui/TimeEntryDurationCell.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/TimesheetCalendar.js +188 -0
- package/dist/modules/staff/lib/time-tracking-ui/TimesheetCalendar.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/TimesheetPeriodFooter.js +61 -0
- package/dist/modules/staff/lib/time-tracking-ui/TimesheetPeriodFooter.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/TimesheetViewSwitch.js +45 -0
- package/dist/modules/staff/lib/time-tracking-ui/TimesheetViewSwitch.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/boardDirectory.js +176 -0
- package/dist/modules/staff/lib/time-tracking-ui/boardDirectory.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/boardFilters.js +82 -0
- package/dist/modules/staff/lib/time-tracking-ui/boardFilters.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/boardSummary.js +5 -0
- package/dist/modules/staff/lib/time-tracking-ui/boardSummary.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/kanbanBoardData.js +152 -0
- package/dist/modules/staff/lib/time-tracking-ui/kanbanBoardData.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/projectTeamAssignment.js +92 -0
- package/dist/modules/staff/lib/time-tracking-ui/projectTeamAssignment.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/taskDrawerData.js +111 -0
- package/dist/modules/staff/lib/time-tracking-ui/taskDrawerData.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/timeEntryDialogState.js +243 -0
- package/dist/modules/staff/lib/time-tracking-ui/timeEntryDialogState.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/timeEntryListData.js +151 -0
- package/dist/modules/staff/lib/time-tracking-ui/timeEntryListData.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/timeTrackingSettingsForm.js +105 -0
- package/dist/modules/staff/lib/time-tracking-ui/timeTrackingSettingsForm.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/timesheetData.js +132 -0
- package/dist/modules/staff/lib/time-tracking-ui/timesheetData.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/timesheetPeriod.js +205 -0
- package/dist/modules/staff/lib/time-tracking-ui/timesheetPeriod.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/timesheetTargets.js +53 -0
- package/dist/modules/staff/lib/time-tracking-ui/timesheetTargets.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/useBoardFilters.js +77 -0
- package/dist/modules/staff/lib/time-tracking-ui/useBoardFilters.js.map +7 -0
- package/dist/modules/staff/lib/time-tracking-ui/useTimesheetPreferences.js +151 -0
- package/dist/modules/staff/lib/time-tracking-ui/useTimesheetPreferences.js.map +7 -0
- package/dist/modules/staff/lib/timeTrackingSeeds.js +809 -0
- package/dist/modules/staff/lib/timeTrackingSeeds.js.map +7 -0
- package/dist/modules/staff/lib/timesheets/timeEntryCacheInvalidation.js +2 -3
- package/dist/modules/staff/lib/timesheets/timeEntryCacheInvalidation.js.map +2 -2
- package/dist/modules/staff/lib/timesheets/timeEntryDecoration.js +152 -0
- package/dist/modules/staff/lib/timesheets/timeEntryDecoration.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-projects/budgetBurn.js +36 -0
- package/dist/modules/staff/lib/timesheets-projects/budgetBurn.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-projects/budgetThreshold.js +66 -0
- package/dist/modules/staff/lib/timesheets-projects/budgetThreshold.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-projects/budgetThresholdState.js +78 -0
- package/dist/modules/staff/lib/timesheets-projects/budgetThresholdState.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-projects/computeProjectFinancials.js +81 -0
- package/dist/modules/staff/lib/timesheets-projects/computeProjectFinancials.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-projects/reportSelection.js +44 -0
- package/dist/modules/staff/lib/timesheets-projects/reportSelection.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-projects-ui/AssignMembersDialog.js +169 -0
- package/dist/modules/staff/lib/timesheets-projects-ui/AssignMembersDialog.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-projects-ui/ProjectBudgetCell.js +22 -0
- package/dist/modules/staff/lib/timesheets-projects-ui/ProjectBudgetCell.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-projects-ui/ProjectCard.js +51 -1
- package/dist/modules/staff/lib/timesheets-projects-ui/ProjectCard.js.map +2 -2
- package/dist/modules/staff/lib/timesheets-projects-ui/ProjectsBulkActionsBar.js +70 -0
- package/dist/modules/staff/lib/timesheets-projects-ui/ProjectsBulkActionsBar.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-reports/buildReportSheet.js +63 -0
- package/dist/modules/staff/lib/timesheets-reports/buildReportSheet.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-reports/loadReportData.js +170 -0
- package/dist/modules/staff/lib/timesheets-reports/loadReportData.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-reports/pdf.js +205 -0
- package/dist/modules/staff/lib/timesheets-reports/pdf.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-reports/reportApprovalPolicies.js +68 -0
- package/dist/modules/staff/lib/timesheets-reports/reportApprovalPolicies.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-reports/reportConfigData.js +135 -0
- package/dist/modules/staff/lib/timesheets-reports/reportConfigData.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-reports/reportConfigState.js +48 -0
- package/dist/modules/staff/lib/timesheets-reports/reportConfigState.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-reports/reportExport.js +262 -0
- package/dist/modules/staff/lib/timesheets-reports/reportExport.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-reports/reportExportFormats.js +34 -0
- package/dist/modules/staff/lib/timesheets-reports/reportExportFormats.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-reports/reportGroupings.js +79 -0
- package/dist/modules/staff/lib/timesheets-reports/reportGroupings.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-reports/reportLabels.js +11 -0
- package/dist/modules/staff/lib/timesheets-reports/reportLabels.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-reports/reportReference.js +83 -0
- package/dist/modules/staff/lib/timesheets-reports/reportReference.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-reports/reportRows.js +42 -0
- package/dist/modules/staff/lib/timesheets-reports/reportRows.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-reports/reportSheetData.js +107 -0
- package/dist/modules/staff/lib/timesheets-reports/reportSheetData.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-reports/reportTotals.js +289 -0
- package/dist/modules/staff/lib/timesheets-reports/reportTotals.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-reports/xlsx.js +145 -0
- package/dist/modules/staff/lib/timesheets-reports/xlsx.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-tasks/computeTaskRollups.js +116 -0
- package/dist/modules/staff/lib/timesheets-tasks/computeTaskRollups.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-tasks/defaultStatusTemplate.js +50 -0
- package/dist/modules/staff/lib/timesheets-tasks/defaultStatusTemplate.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-tasks/seedProjectStatuses.js +27 -0
- package/dist/modules/staff/lib/timesheets-tasks/seedProjectStatuses.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-tasks/statusPositions.js +65 -0
- package/dist/modules/staff/lib/timesheets-tasks/statusPositions.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-tasks/statusSlug.js +31 -0
- package/dist/modules/staff/lib/timesheets-tasks/statusSlug.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-tasks/taskHierarchy.js +31 -0
- package/dist/modules/staff/lib/timesheets-tasks/taskHierarchy.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-tasks/taskHoursTotals.js +17 -0
- package/dist/modules/staff/lib/timesheets-tasks/taskHoursTotals.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-tasks/taskReference.js +51 -0
- package/dist/modules/staff/lib/timesheets-tasks/taskReference.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-ui/CreateProjectDialog.js +11 -4
- package/dist/modules/staff/lib/timesheets-ui/CreateProjectDialog.js.map +2 -2
- package/dist/modules/staff/lib/timesheets-ui/ListView.js +369 -111
- package/dist/modules/staff/lib/timesheets-ui/ListView.js.map +2 -2
- package/dist/modules/staff/lib/timesheets-ui/TimerBar.js +47 -2
- package/dist/modules/staff/lib/timesheets-ui/TimerBar.js.map +2 -2
- package/dist/modules/staff/migrations/Migration20260813073131_staff.js +79 -0
- package/dist/modules/staff/migrations/Migration20260813073131_staff.js.map +7 -0
- package/dist/modules/staff/migrations/Migration20260824143357_staff.js +15 -0
- package/dist/modules/staff/migrations/Migration20260824143357_staff.js.map +7 -0
- package/dist/modules/staff/notifications.client.js +16 -0
- package/dist/modules/staff/notifications.client.js.map +7 -0
- package/dist/modules/staff/notifications.handlers.js +80 -0
- package/dist/modules/staff/notifications.handlers.js.map +7 -0
- package/dist/modules/staff/notifications.js +168 -0
- package/dist/modules/staff/notifications.js.map +2 -2
- package/dist/modules/staff/search.js +159 -1
- package/dist/modules/staff/search.js.map +2 -2
- package/dist/modules/staff/setup.js +20 -1
- package/dist/modules/staff/setup.js.map +2 -2
- package/dist/modules/staff/subscribers/time-project-access-requested-notification.js +68 -0
- package/dist/modules/staff/subscribers/time-project-access-requested-notification.js.map +7 -0
- package/dist/modules/staff/subscribers/time-project-budget-threshold-notification.js +149 -0
- package/dist/modules/staff/subscribers/time-project-budget-threshold-notification.js.map +7 -0
- package/dist/modules/staff/subscribers/time-report-approved-notification.js +78 -0
- package/dist/modules/staff/subscribers/time-report-approved-notification.js.map +7 -0
- package/dist/modules/staff/subscribers/time-report-portal-broadcast.js +78 -0
- package/dist/modules/staff/subscribers/time-report-portal-broadcast.js.map +7 -0
- package/dist/modules/staff/translations.js +4 -1
- package/dist/modules/staff/translations.js.map +2 -2
- package/dist/modules/staff/widgets/components.js +7 -0
- package/dist/modules/staff/widgets/components.js.map +7 -0
- package/dist/modules/staff/widgets/injection/timer-sidebar-indicator/widget.js +5 -4
- package/dist/modules/staff/widgets/injection/timer-sidebar-indicator/widget.js.map +2 -2
- package/dist/modules/staff/widgets/notifications/TimeProjectAccessRequestedRenderer.js +135 -0
- package/dist/modules/staff/widgets/notifications/TimeProjectAccessRequestedRenderer.js.map +7 -0
- package/dist/modules/staff/widgets/notifications/index.js +5 -0
- package/dist/modules/staff/widgets/notifications/index.js.map +7 -0
- package/dist/modules/staff/workers/timesheets-reapply-rounding.js +43 -0
- package/dist/modules/staff/workers/timesheets-reapply-rounding.js.map +7 -0
- package/generated/entities/staff_time_entry/index.ts +7 -0
- package/generated/entities/staff_time_entry_tag/index.ts +6 -0
- package/generated/entities/staff_time_project/index.ts +8 -0
- package/generated/entities/staff_time_report/index.ts +27 -0
- package/generated/entities/staff_time_report_entry/index.ts +12 -0
- package/generated/entities/staff_time_report_event/index.ts +9 -0
- package/generated/entities/staff_time_report_project/index.ts +6 -0
- package/generated/entities/staff_time_tag/index.ts +9 -0
- package/generated/entities/staff_time_task/index.ts +17 -0
- package/generated/entities/staff_time_task_comment/index.ts +9 -0
- package/generated/entities/staff_time_task_status/index.ts +13 -0
- package/generated/entities/staff_time_task_tag/index.ts +6 -0
- package/generated/entities.ids.generated.ts +11 -1
- package/generated/entity-fields-registry.ts +149 -0
- package/package.json +7 -7
- package/src/helpers/integration/timesheetFixtures.ts +31 -1
- package/src/modules/auth/README.md +1 -1
- package/src/modules/auth/cli.ts +35 -1
- package/src/modules/auth/i18n/de.json +7 -0
- package/src/modules/auth/i18n/en.json +7 -0
- package/src/modules/auth/i18n/es.json +7 -0
- package/src/modules/auth/i18n/ko.json +7 -0
- package/src/modules/auth/i18n/pl.json +7 -0
- package/src/modules/auth/lib/backendChrome.tsx +1 -0
- package/src/modules/customer_accounts/lib/customerRoleAcls.ts +79 -0
- package/src/modules/customer_accounts/setup.ts +1 -45
- package/src/modules/data_sync/AGENTS.md +34 -0
- package/src/modules/data_sync/api/options.ts +2 -0
- package/src/modules/data_sync/backend/data-sync/page.tsx +82 -33
- package/src/modules/data_sync/i18n/de.json +1 -0
- package/src/modules/data_sync/i18n/en.json +1 -0
- package/src/modules/data_sync/i18n/es.json +1 -0
- package/src/modules/data_sync/i18n/ko.json +1 -0
- package/src/modules/data_sync/i18n/pl.json +1 -0
- package/src/modules/data_sync/lib/adapter.ts +45 -0
- package/src/modules/data_sync/lib/start-controls.ts +89 -0
- package/src/modules/staff/AGENTS.md +769 -1
- package/src/modules/staff/acl.ts +9 -0
- package/src/modules/staff/ai-agents.ts +189 -0
- package/src/modules/staff/ai-tools/time-tracking-pack.ts +494 -0
- package/src/modules/staff/ai-tools/types.ts +82 -0
- package/src/modules/staff/ai-tools.ts +13 -0
- package/src/modules/staff/analytics.ts +113 -0
- package/src/modules/staff/api/guards.ts +85 -3
- package/src/modules/staff/api/leave-requests/accept/route.ts +0 -2
- package/src/modules/staff/api/leave-requests/reject/route.ts +0 -2
- package/src/modules/staff/api/portal/time-reports/[id]/route.ts +182 -0
- package/src/modules/staff/api/portal/time-reports/route.ts +270 -0
- package/src/modules/staff/api/team-members/self/route.ts +0 -2
- package/src/modules/staff/api/team-members/tags/assign/route.ts +0 -2
- package/src/modules/staff/api/team-members/tags/unassign/route.ts +0 -2
- package/src/modules/staff/api/timesheets/_shared/withTimesheetInterceptors.ts +292 -0
- package/src/modules/staff/api/timesheets/access-requests/route.ts +299 -0
- package/src/modules/staff/api/timesheets/my-projects/[projectId]/route.ts +15 -7
- package/src/modules/staff/api/timesheets/my-projects/route.ts +14 -1
- package/src/modules/staff/api/timesheets/my-work/myWorkAggregate.ts +90 -0
- package/src/modules/staff/api/timesheets/my-work/route.ts +475 -0
- package/src/modules/staff/api/timesheets/projects/kpis/route.ts +15 -2
- package/src/modules/staff/api/timesheets/reports/[id]/close/route.ts +203 -0
- package/src/modules/staff/api/timesheets/reports/[id]/export/route.ts +315 -0
- package/src/modules/staff/api/timesheets/reports/[id]/sheet/route.ts +220 -0
- package/src/modules/staff/api/timesheets/reports/[id]/unlock/route.ts +208 -0
- package/src/modules/staff/api/timesheets/reports/preview/route.ts +449 -0
- package/src/modules/staff/api/timesheets/reports/route.ts +386 -0
- package/src/modules/staff/api/timesheets/reports/shared.ts +121 -0
- package/src/modules/staff/api/timesheets/settings/reapply-rounding/route.ts +205 -0
- package/src/modules/staff/api/timesheets/settings/rounding-impact/route.ts +226 -0
- package/src/modules/staff/api/timesheets/settings/route.ts +242 -0
- package/src/modules/staff/api/timesheets/tags/access.ts +134 -0
- package/src/modules/staff/api/timesheets/tags/entry-assignments/route.ts +290 -0
- package/src/modules/staff/api/timesheets/tags/route.ts +177 -0
- package/src/modules/staff/api/timesheets/tags/task-assignments/route.ts +294 -0
- package/src/modules/staff/api/timesheets/task-statuses/route.ts +232 -0
- package/src/modules/staff/api/timesheets/tasks/[id]/comments/route.ts +532 -0
- package/src/modules/staff/api/timesheets/tasks/[id]/status/route.ts +271 -0
- package/src/modules/staff/api/timesheets/tasks/route.ts +443 -0
- package/src/modules/staff/api/timesheets/time-entries/[id]/duplicate/route.ts +306 -0
- package/src/modules/staff/api/timesheets/time-entries/[id]/segments/[segmentId]/route.ts +32 -10
- package/src/modules/staff/api/timesheets/time-entries/[id]/segments/route.ts +32 -17
- package/src/modules/staff/api/timesheets/time-entries/[id]/timer-start/route.ts +27 -6
- package/src/modules/staff/api/timesheets/time-entries/[id]/timer-stop/route.ts +36 -6
- package/src/modules/staff/api/timesheets/time-entries/bulk/route.ts +331 -34
- package/src/modules/staff/api/timesheets/time-entries/copy-day/route.ts +533 -0
- package/src/modules/staff/api/timesheets/time-entries/overlaps/route.ts +457 -0
- package/src/modules/staff/api/timesheets/time-entries/route.ts +378 -24
- package/src/modules/staff/api/timesheets/time-entries/start-timer/route.ts +31 -9
- package/src/modules/staff/api/timesheets/time-projects/[id]/change-currency/route.ts +246 -0
- package/src/modules/staff/api/timesheets/time-projects/[id]/employees/route.ts +62 -2
- package/src/modules/staff/api/timesheets/time-projects/route.ts +397 -22
- package/src/modules/staff/backend/staff/time-tracking/board/page.meta.ts +14 -0
- package/src/modules/staff/backend/staff/time-tracking/board/page.tsx +151 -0
- package/src/modules/staff/backend/staff/time-tracking/entries/page.meta.ts +14 -0
- package/src/modules/staff/backend/staff/time-tracking/entries/page.tsx +1229 -0
- package/src/modules/staff/backend/staff/time-tracking/page.meta.ts +11 -0
- package/src/modules/staff/backend/staff/time-tracking/page.tsx +823 -0
- package/src/modules/staff/backend/staff/time-tracking/projects/[id]/board/page.meta.ts +12 -0
- package/src/modules/staff/backend/staff/time-tracking/projects/[id]/board/page.tsx +81 -0
- package/src/modules/staff/backend/staff/time-tracking/projects/[id]/edit/page.meta.ts +12 -0
- package/src/modules/staff/backend/staff/time-tracking/projects/[id]/edit/page.tsx +275 -0
- package/src/modules/staff/backend/staff/time-tracking/projects/[id]/page.meta.ts +12 -0
- package/src/modules/staff/backend/staff/time-tracking/projects/[id]/page.tsx +1420 -0
- package/src/modules/staff/backend/staff/time-tracking/projects/create/page.meta.ts +12 -0
- package/src/modules/staff/backend/staff/time-tracking/projects/create/page.tsx +109 -0
- package/src/modules/staff/backend/staff/time-tracking/projects/page.meta.ts +15 -0
- package/src/modules/staff/backend/staff/time-tracking/projects/page.tsx +1254 -0
- package/src/modules/staff/backend/staff/time-tracking/projects/projectFormConfig.ts +466 -0
- package/src/modules/staff/backend/staff/time-tracking/reports/[id]/page.meta.ts +12 -0
- package/src/modules/staff/backend/staff/time-tracking/reports/[id]/page.tsx +632 -0
- package/src/modules/staff/backend/staff/time-tracking/reports/create/page.meta.ts +12 -0
- package/src/modules/staff/backend/staff/time-tracking/reports/create/page.tsx +867 -0
- package/src/modules/staff/backend/staff/time-tracking/reports/page.meta.ts +14 -0
- package/src/modules/staff/backend/staff/time-tracking/reports/page.tsx +246 -0
- package/src/modules/staff/backend/staff/time-tracking/settings/page.meta.ts +14 -0
- package/src/modules/staff/backend/staff/time-tracking/settings/page.tsx +701 -0
- package/src/modules/staff/backend/staff/time-tracking/timesheet/GridView.tsx +953 -0
- package/src/modules/staff/backend/staff/time-tracking/timesheet/page.meta.ts +14 -0
- package/src/modules/staff/backend/staff/time-tracking/timesheet/page.tsx +800 -0
- package/src/modules/staff/backend/staff/timesheets/page.meta.ts +6 -6
- package/src/modules/staff/backend/staff/timesheets/page.tsx +12 -1010
- package/src/modules/staff/backend/staff/timesheets/projects/[id]/edit/page.meta.ts +0 -6
- package/src/modules/staff/backend/staff/timesheets/projects/[id]/edit/page.tsx +4 -158
- package/src/modules/staff/backend/staff/timesheets/projects/[id]/page.meta.ts +0 -6
- package/src/modules/staff/backend/staff/timesheets/projects/[id]/page.tsx +4 -609
- package/src/modules/staff/backend/staff/timesheets/projects/create/page.meta.ts +0 -6
- package/src/modules/staff/backend/staff/timesheets/projects/create/page.tsx +3 -89
- package/src/modules/staff/backend/staff/timesheets/projects/page.meta.ts +2 -19
- package/src/modules/staff/backend/staff/timesheets/projects/page.tsx +3 -778
- package/src/modules/staff/ce.ts +63 -0
- package/src/modules/staff/cli.ts +207 -1
- package/src/modules/staff/commands/index.ts +5 -0
- package/src/modules/staff/commands/timesheets-entries.ts +1006 -28
- package/src/modules/staff/commands/timesheets-projects.ts +593 -7
- package/src/modules/staff/commands/timesheets-reports.ts +1329 -0
- package/src/modules/staff/commands/timesheets-tags.ts +1315 -0
- package/src/modules/staff/commands/timesheets-task-comments.ts +583 -0
- package/src/modules/staff/commands/timesheets-task-statuses.ts +889 -0
- package/src/modules/staff/commands/timesheets-tasks.ts +1121 -0
- package/src/modules/staff/data/enrichers.ts +675 -10
- package/src/modules/staff/data/entities.ts +494 -2
- package/src/modules/staff/data/extensions.ts +68 -0
- package/src/modules/staff/data/validators.ts +348 -3
- package/src/modules/staff/di.ts +96 -0
- package/src/modules/staff/events.payloads.ts +268 -0
- package/src/modules/staff/events.ts +87 -5
- package/src/modules/staff/extension-points.ts +308 -0
- package/src/modules/staff/frontend/[orgSlug]/portal/time-reports/[id]/page.meta.ts +10 -0
- package/src/modules/staff/frontend/[orgSlug]/portal/time-reports/[id]/page.tsx +225 -0
- package/src/modules/staff/frontend/[orgSlug]/portal/time-reports/page.meta.ts +17 -0
- package/src/modules/staff/frontend/[orgSlug]/portal/time-reports/page.tsx +182 -0
- package/src/modules/staff/i18n/de.json +899 -0
- package/src/modules/staff/i18n/en.json +899 -0
- package/src/modules/staff/i18n/es.json +899 -0
- package/src/modules/staff/i18n/ko.json +899 -0
- package/src/modules/staff/i18n/pl.json +899 -0
- package/src/modules/staff/lib/crud.ts +14 -3
- package/src/modules/staff/lib/time-tracking/access.ts +155 -0
- package/src/modules/staff/lib/time-tracking/billability.ts +68 -0
- package/src/modules/staff/lib/time-tracking/capacity.ts +124 -0
- package/src/modules/staff/lib/time-tracking/componentContracts.ts +26 -0
- package/src/modules/staff/lib/time-tracking/cost.ts +144 -0
- package/src/modules/staff/lib/time-tracking/duration.ts +68 -0
- package/src/modules/staff/lib/time-tracking/featureAccess.ts +115 -0
- package/src/modules/staff/lib/time-tracking/interval.ts +90 -0
- package/src/modules/staff/lib/time-tracking/migrateProjectCodes.ts +161 -0
- package/src/modules/staff/lib/time-tracking/moneyVisibility.ts +37 -0
- package/src/modules/staff/lib/time-tracking/overlap.ts +159 -0
- package/src/modules/staff/lib/time-tracking/portalRecipients.ts +76 -0
- package/src/modules/staff/lib/time-tracking/portalReports.ts +31 -0
- package/src/modules/staff/lib/time-tracking/projectCode.ts +221 -0
- package/src/modules/staff/lib/time-tracking/reapplyRounding.ts +313 -0
- package/src/modules/staff/lib/time-tracking/recalculationRunner.ts +118 -0
- package/src/modules/staff/lib/time-tracking/recalculations.ts +135 -0
- package/src/modules/staff/lib/time-tracking/registries/invoke.ts +122 -0
- package/src/modules/staff/lib/time-tracking/registries/registry.ts +124 -0
- package/src/modules/staff/lib/time-tracking/registries/scope.ts +56 -0
- package/src/modules/staff/lib/time-tracking/rollup.ts +59 -0
- package/src/modules/staff/lib/time-tracking/rounding.ts +126 -0
- package/src/modules/staff/lib/time-tracking/roundingImpact.ts +75 -0
- package/src/modules/staff/lib/time-tracking/settingKeys.ts +274 -0
- package/src/modules/staff/lib/time-tracking/settings.ts +168 -0
- package/src/modules/staff/lib/time-tracking/sqlInClause.ts +22 -0
- package/src/modules/staff/lib/time-tracking/timeEntrySources.ts +85 -0
- package/src/modules/staff/lib/time-tracking-ui/BoardFilterChips.tsx +360 -0
- package/src/modules/staff/lib/time-tracking-ui/CustomerPicker.tsx +427 -0
- package/src/modules/staff/lib/time-tracking-ui/DurationInput.tsx +192 -0
- package/src/modules/staff/lib/time-tracking-ui/EntryDetailsFields.tsx +224 -0
- package/src/modules/staff/lib/time-tracking-ui/EntryFilterBar.tsx +144 -0
- package/src/modules/staff/lib/time-tracking-ui/KanbanBoard.tsx +1065 -0
- package/src/modules/staff/lib/time-tracking-ui/KanbanCard.tsx +435 -0
- package/src/modules/staff/lib/time-tracking-ui/KanbanColumn.tsx +316 -0
- package/src/modules/staff/lib/time-tracking-ui/NewTaskDialog.tsx +291 -0
- package/src/modules/staff/lib/time-tracking-ui/NoProjectAccess.tsx +162 -0
- package/src/modules/staff/lib/time-tracking-ui/PeriodSelector.tsx +149 -0
- package/src/modules/staff/lib/time-tracking-ui/PhasePlaceholder.tsx +31 -0
- package/src/modules/staff/lib/time-tracking-ui/ProjectCodeField.tsx +230 -0
- package/src/modules/staff/lib/time-tracking-ui/ProjectCurrencyField.tsx +432 -0
- package/src/modules/staff/lib/time-tracking-ui/ProjectFormSections.tsx +323 -0
- package/src/modules/staff/lib/time-tracking-ui/ProjectTeamDrawer.tsx +930 -0
- package/src/modules/staff/lib/time-tracking-ui/ReportSheet.tsx +357 -0
- package/src/modules/staff/lib/time-tracking-ui/TagPicker.tsx +195 -0
- package/src/modules/staff/lib/time-tracking-ui/TaskBoardScreen.tsx +243 -0
- package/src/modules/staff/lib/time-tracking-ui/TaskCommentThread.tsx +137 -0
- package/src/modules/staff/lib/time-tracking-ui/TaskDrawer.tsx +1405 -0
- package/src/modules/staff/lib/time-tracking-ui/TaskListView.tsx +260 -0
- package/src/modules/staff/lib/time-tracking-ui/TaskPicker.tsx +435 -0
- package/src/modules/staff/lib/time-tracking-ui/TaskQuickLog.tsx +296 -0
- package/src/modules/staff/lib/time-tracking-ui/TimeEntriesSummaryFooter.tsx +97 -0
- package/src/modules/staff/lib/time-tracking-ui/TimeEntryDialog.tsx +1929 -0
- package/src/modules/staff/lib/time-tracking-ui/TimeEntryDurationCell.tsx +126 -0
- package/src/modules/staff/lib/time-tracking-ui/TimesheetCalendar.tsx +265 -0
- package/src/modules/staff/lib/time-tracking-ui/TimesheetPeriodFooter.tsx +78 -0
- package/src/modules/staff/lib/time-tracking-ui/TimesheetViewSwitch.tsx +70 -0
- package/src/modules/staff/lib/time-tracking-ui/boardDirectory.ts +231 -0
- package/src/modules/staff/lib/time-tracking-ui/boardFilters.ts +128 -0
- package/src/modules/staff/lib/time-tracking-ui/boardSummary.ts +20 -0
- package/src/modules/staff/lib/time-tracking-ui/kanbanBoardData.ts +228 -0
- package/src/modules/staff/lib/time-tracking-ui/projectTeamAssignment.ts +143 -0
- package/src/modules/staff/lib/time-tracking-ui/taskDrawerData.ts +194 -0
- package/src/modules/staff/lib/time-tracking-ui/timeEntryDialogState.ts +400 -0
- package/src/modules/staff/lib/time-tracking-ui/timeEntryListData.ts +271 -0
- package/src/modules/staff/lib/time-tracking-ui/timeTrackingSettingsForm.ts +168 -0
- package/src/modules/staff/lib/time-tracking-ui/timesheetData.ts +225 -0
- package/src/modules/staff/lib/time-tracking-ui/timesheetPeriod.ts +278 -0
- package/src/modules/staff/lib/time-tracking-ui/timesheetTargets.ts +93 -0
- package/src/modules/staff/lib/time-tracking-ui/useBoardFilters.ts +107 -0
- package/src/modules/staff/lib/time-tracking-ui/useTimesheetPreferences.ts +245 -0
- package/src/modules/staff/lib/timeTrackingSeeds.ts +1037 -0
- package/src/modules/staff/lib/timesheets/timeEntryCacheInvalidation.ts +11 -10
- package/src/modules/staff/lib/timesheets/timeEntryDecoration.ts +256 -0
- package/src/modules/staff/lib/timesheets-projects/budgetBurn.ts +60 -0
- package/src/modules/staff/lib/timesheets-projects/budgetThreshold.ts +135 -0
- package/src/modules/staff/lib/timesheets-projects/budgetThresholdState.ts +137 -0
- package/src/modules/staff/lib/timesheets-projects/computeProjectFinancials.ts +142 -0
- package/src/modules/staff/lib/timesheets-projects/reportSelection.ts +82 -0
- package/src/modules/staff/lib/timesheets-projects-ui/AssignMembersDialog.tsx +237 -0
- package/src/modules/staff/lib/timesheets-projects-ui/ProjectBudgetCell.tsx +33 -0
- package/src/modules/staff/lib/timesheets-projects-ui/ProjectCard.tsx +56 -1
- package/src/modules/staff/lib/timesheets-projects-ui/ProjectsBulkActionsBar.tsx +90 -0
- package/src/modules/staff/lib/timesheets-reports/buildReportSheet.ts +125 -0
- package/src/modules/staff/lib/timesheets-reports/loadReportData.ts +251 -0
- package/src/modules/staff/lib/timesheets-reports/pdf.ts +263 -0
- package/src/modules/staff/lib/timesheets-reports/reportApprovalPolicies.ts +137 -0
- package/src/modules/staff/lib/timesheets-reports/reportConfigData.ts +247 -0
- package/src/modules/staff/lib/timesheets-reports/reportConfigState.ts +89 -0
- package/src/modules/staff/lib/timesheets-reports/reportExport.ts +373 -0
- package/src/modules/staff/lib/timesheets-reports/reportExportFormats.ts +71 -0
- package/src/modules/staff/lib/timesheets-reports/reportGroupings.ts +153 -0
- package/src/modules/staff/lib/timesheets-reports/reportLabels.ts +23 -0
- package/src/modules/staff/lib/timesheets-reports/reportReference.ts +146 -0
- package/src/modules/staff/lib/timesheets-reports/reportRows.ts +89 -0
- package/src/modules/staff/lib/timesheets-reports/reportSheetData.ts +196 -0
- package/src/modules/staff/lib/timesheets-reports/reportTotals.ts +544 -0
- package/src/modules/staff/lib/timesheets-reports/xlsx.ts +207 -0
- package/src/modules/staff/lib/timesheets-tasks/computeTaskRollups.ts +238 -0
- package/src/modules/staff/lib/timesheets-tasks/defaultStatusTemplate.ts +90 -0
- package/src/modules/staff/lib/timesheets-tasks/seedProjectStatuses.ts +43 -0
- package/src/modules/staff/lib/timesheets-tasks/statusPositions.ts +132 -0
- package/src/modules/staff/lib/timesheets-tasks/statusSlug.ts +43 -0
- package/src/modules/staff/lib/timesheets-tasks/taskHierarchy.ts +99 -0
- package/src/modules/staff/lib/timesheets-tasks/taskHoursTotals.ts +42 -0
- package/src/modules/staff/lib/timesheets-tasks/taskReference.ts +108 -0
- package/src/modules/staff/lib/timesheets-ui/CreateProjectDialog.tsx +18 -4
- package/src/modules/staff/lib/timesheets-ui/ListView.tsx +504 -149
- package/src/modules/staff/lib/timesheets-ui/TimerBar.tsx +50 -2
- package/src/modules/staff/migrations/.snapshot-open-mercato.json +3244 -228
- package/src/modules/staff/migrations/Migration20260813073131_staff.ts +94 -0
- package/src/modules/staff/migrations/Migration20260824143357_staff.ts +17 -0
- package/src/modules/staff/notifications.client.ts +16 -0
- package/src/modules/staff/notifications.handlers.ts +88 -0
- package/src/modules/staff/notifications.ts +163 -0
- package/src/modules/staff/search.ts +191 -1
- package/src/modules/staff/setup.ts +22 -0
- package/src/modules/staff/subscribers/time-project-access-requested-notification.ts +95 -0
- package/src/modules/staff/subscribers/time-project-budget-threshold-notification.ts +226 -0
- package/src/modules/staff/subscribers/time-report-approved-notification.ts +116 -0
- package/src/modules/staff/subscribers/time-report-portal-broadcast.ts +120 -0
- package/src/modules/staff/translations.ts +17 -0
- package/src/modules/staff/widgets/components.ts +34 -0
- package/src/modules/staff/widgets/injection/timer-sidebar-indicator/widget.tsx +6 -5
- package/src/modules/staff/widgets/notifications/TimeProjectAccessRequestedRenderer.tsx +138 -0
- package/src/modules/staff/widgets/notifications/index.ts +1 -0
- package/src/modules/staff/workers/timesheets-reapply-rounding.ts +59 -0
- package/dist/modules/staff/backend/staff/timesheets/projects/projectFormConfig.js +0 -123
- package/dist/modules/staff/backend/staff/timesheets/projects/projectFormConfig.js.map +0 -7
- package/src/modules/staff/backend/staff/timesheets/projects/projectFormConfig.ts +0 -138
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { OptionalProps } from '@mikro-orm/core'
|
|
1
2
|
import { Entity, Enum, Index, ManyToOne, PrimaryKey, Property } from '@mikro-orm/decorators/legacy'
|
|
3
|
+
import type { TimeEntrySource } from '../lib/time-tracking/timeEntrySources'
|
|
4
|
+
import type { ReportGrouping } from '../lib/timesheets-reports/reportGroupings'
|
|
2
5
|
|
|
3
6
|
export type StaffLeaveRequestStatus = 'pending' | 'approved' | 'rejected'
|
|
4
7
|
|
|
@@ -365,16 +368,33 @@ export class StaffTeamMemberAddress {
|
|
|
365
368
|
|
|
366
369
|
// --- Timesheets entities (Phase 1) ---
|
|
367
370
|
|
|
368
|
-
|
|
371
|
+
/**
|
|
372
|
+
* EP-37: the accepted values are the time-entry source registry, not a database
|
|
373
|
+
* enum, so an import integration can ship its own source. Re-exported from the
|
|
374
|
+
* registry so the entity and the registry cannot drift.
|
|
375
|
+
*/
|
|
376
|
+
export type StaffTimeEntrySource = TimeEntrySource
|
|
369
377
|
export type StaffTimeProjectStatus = 'active' | 'on_hold' | 'completed'
|
|
370
378
|
export type StaffTimeProjectMemberStatus = 'active' | 'inactive'
|
|
371
379
|
export type StaffTimeEntrySegmentType = 'work' | 'break'
|
|
380
|
+
export type StaffTimeProjectBudgetKind = 'none' | 'hours' | 'amount'
|
|
381
|
+
export type StaffTimeReportPeriodKind = 'week' | 'month' | 'year' | 'custom'
|
|
382
|
+
/** EP-36: the accepted values are the report grouping registry, not a DB enum. */
|
|
383
|
+
export type StaffTimeReportGrouping = ReportGrouping
|
|
384
|
+
export type StaffTimeReportNonBillableMode = 'separate' | 'exclude'
|
|
385
|
+
export type StaffTimeReportStatus = 'draft' | 'closed'
|
|
386
|
+
export type StaffTimeReportEventType = 'closed' | 'unlocked' | 'exported'
|
|
372
387
|
|
|
373
388
|
@Entity({ tableName: 'staff_time_entries' })
|
|
374
389
|
@Index({ name: 'staff_time_entries_tenant_org_idx', properties: ['tenantId', 'organizationId'] })
|
|
375
390
|
@Index({ name: 'staff_time_entries_member_date_idx', properties: ['organizationId', 'staffMemberId', 'date'] })
|
|
376
391
|
@Index({ name: 'staff_time_entries_project_date_idx', properties: ['organizationId', 'timeProjectId', 'date'] })
|
|
392
|
+
@Index({ name: 'staff_time_entries_task_idx', properties: ['organizationId', 'taskId'] })
|
|
393
|
+
@Index({ name: 'staff_time_entries_member_overlap_idx', properties: ['organizationId', 'staffMemberId', 'date', 'startedAt'] })
|
|
394
|
+
@Index({ name: 'staff_time_entries_locked_report_idx', properties: ['organizationId', 'lockedReportId'] })
|
|
377
395
|
export class StaffTimeEntry {
|
|
396
|
+
[OptionalProps]?: 'durationMinutes' | 'isBillable' | 'source' | 'createdAt' | 'updatedAt'
|
|
397
|
+
|
|
378
398
|
@PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })
|
|
379
399
|
id!: string
|
|
380
400
|
|
|
@@ -405,6 +425,9 @@ export class StaffTimeEntry {
|
|
|
405
425
|
@Property({ name: 'time_project_id', type: 'uuid', nullable: true })
|
|
406
426
|
timeProjectId?: string | null
|
|
407
427
|
|
|
428
|
+
@Property({ name: 'task_id', type: 'uuid', nullable: true })
|
|
429
|
+
taskId?: string | null
|
|
430
|
+
|
|
408
431
|
@Property({ name: 'customer_id', type: 'uuid', nullable: true })
|
|
409
432
|
customerId?: string | null
|
|
410
433
|
|
|
@@ -414,7 +437,25 @@ export class StaffTimeEntry {
|
|
|
414
437
|
@Property({ name: 'order_id', type: 'uuid', nullable: true })
|
|
415
438
|
orderId?: string | null
|
|
416
439
|
|
|
417
|
-
@
|
|
440
|
+
@Property({ name: 'is_billable', type: 'boolean', default: true })
|
|
441
|
+
isBillable: boolean = true
|
|
442
|
+
|
|
443
|
+
@Property({ name: 'rounded_minutes', type: 'integer', nullable: true })
|
|
444
|
+
roundedMinutes?: number | null
|
|
445
|
+
|
|
446
|
+
@Property({ name: 'rate_override_amount', type: 'numeric', precision: 14, scale: 4, nullable: true })
|
|
447
|
+
rateOverrideAmount?: string | null
|
|
448
|
+
|
|
449
|
+
@Property({ name: 'rate_currency_code', type: 'text', nullable: true })
|
|
450
|
+
rateCurrencyCode?: string | null
|
|
451
|
+
|
|
452
|
+
@Property({ name: 'locked_report_id', type: 'uuid', nullable: true })
|
|
453
|
+
lockedReportId?: string | null
|
|
454
|
+
|
|
455
|
+
@Property({ name: 'locked_at', type: Date, nullable: true })
|
|
456
|
+
lockedAt?: Date | null
|
|
457
|
+
|
|
458
|
+
@Property({ name: 'source', type: 'text', default: 'manual' })
|
|
418
459
|
source: StaffTimeEntrySource = 'manual'
|
|
419
460
|
|
|
420
461
|
@Property({ name: 'created_at', type: Date, onCreate: () => new Date() })
|
|
@@ -466,6 +507,8 @@ export class StaffTimeEntrySegment {
|
|
|
466
507
|
@Index({ name: 'staff_time_projects_tenant_org_idx', properties: ['tenantId', 'organizationId'] })
|
|
467
508
|
@Index({ name: 'staff_time_projects_code_unique_idx', properties: ['organizationId', 'tenantId', 'code'], options: { unique: true, where: 'deleted_at IS NULL' } })
|
|
468
509
|
export class StaffTimeProject {
|
|
510
|
+
[OptionalProps]?: 'status' | 'billableByDefault' | 'budgetKind' | 'budgetWarnAtPercent' | 'createdAt' | 'updatedAt'
|
|
511
|
+
|
|
469
512
|
@PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })
|
|
470
513
|
id!: string
|
|
471
514
|
|
|
@@ -481,6 +524,9 @@ export class StaffTimeProject {
|
|
|
481
524
|
@Property({ name: 'customer_id', type: 'uuid', nullable: true })
|
|
482
525
|
customerId?: string | null
|
|
483
526
|
|
|
527
|
+
@Property({ name: 'customer_snapshot', type: 'jsonb', nullable: true })
|
|
528
|
+
customerSnapshot?: Record<string, unknown> | null
|
|
529
|
+
|
|
484
530
|
@Property({ type: 'text' })
|
|
485
531
|
code!: string
|
|
486
532
|
|
|
@@ -505,6 +551,27 @@ export class StaffTimeProject {
|
|
|
505
551
|
@Property({ name: 'start_date', type: 'date', nullable: true })
|
|
506
552
|
startDate?: Date | null
|
|
507
553
|
|
|
554
|
+
@Property({ name: 'hourly_rate', type: 'numeric', precision: 14, scale: 4, nullable: true })
|
|
555
|
+
hourlyRate?: string | null
|
|
556
|
+
|
|
557
|
+
@Property({ name: 'currency_code', type: 'text', nullable: true })
|
|
558
|
+
currencyCode?: string | null
|
|
559
|
+
|
|
560
|
+
@Property({ name: 'billable_by_default', type: 'boolean', default: true })
|
|
561
|
+
billableByDefault: boolean = true
|
|
562
|
+
|
|
563
|
+
@Enum({ items: ['none', 'hours', 'amount'], type: 'text', name: 'budget_kind', default: 'none' })
|
|
564
|
+
budgetKind: StaffTimeProjectBudgetKind = 'none'
|
|
565
|
+
|
|
566
|
+
@Property({ name: 'budget_value', type: 'numeric', precision: 14, scale: 4, nullable: true })
|
|
567
|
+
budgetValue?: string | null
|
|
568
|
+
|
|
569
|
+
@Property({ name: 'budget_warn_at_percent', type: 'integer', default: 80 })
|
|
570
|
+
budgetWarnAtPercent: number = 80
|
|
571
|
+
|
|
572
|
+
@Property({ name: 'budget_alerted_at_percent', type: 'integer', nullable: true })
|
|
573
|
+
budgetAlertedAtPercent?: number | null
|
|
574
|
+
|
|
508
575
|
@Property({ name: 'created_at', type: Date, onCreate: () => new Date() })
|
|
509
576
|
createdAt: Date = new Date()
|
|
510
577
|
|
|
@@ -560,3 +627,428 @@ export class StaffTimeProjectMember {
|
|
|
560
627
|
@Property({ name: 'deleted_at', type: Date, nullable: true })
|
|
561
628
|
deletedAt?: Date | null
|
|
562
629
|
}
|
|
630
|
+
|
|
631
|
+
// --- Time tracking consulting suite entities ---
|
|
632
|
+
|
|
633
|
+
@Entity({ tableName: 'staff_time_task_statuses' })
|
|
634
|
+
@Index({ name: 'staff_time_task_statuses_tenant_org_idx', properties: ['tenantId', 'organizationId'] })
|
|
635
|
+
@Index({ name: 'staff_time_task_statuses_project_idx', properties: ['organizationId', 'timeProjectId', 'position'] })
|
|
636
|
+
@Index({ name: 'staff_time_task_statuses_slug_unique_idx', properties: ['organizationId', 'tenantId', 'timeProjectId', 'slug'], options: { unique: true, where: 'deleted_at IS NULL' } })
|
|
637
|
+
export class StaffTimeTaskStatus {
|
|
638
|
+
[OptionalProps]?: 'position' | 'isDefault' | 'isDone' | 'createdAt' | 'updatedAt'
|
|
639
|
+
|
|
640
|
+
@PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })
|
|
641
|
+
id!: string
|
|
642
|
+
|
|
643
|
+
@Property({ name: 'tenant_id', type: 'uuid' })
|
|
644
|
+
tenantId!: string
|
|
645
|
+
|
|
646
|
+
@Property({ name: 'organization_id', type: 'uuid' })
|
|
647
|
+
organizationId!: string
|
|
648
|
+
|
|
649
|
+
@Property({ name: 'time_project_id', type: 'uuid' })
|
|
650
|
+
timeProjectId!: string
|
|
651
|
+
|
|
652
|
+
@Property({ type: 'text' })
|
|
653
|
+
name!: string
|
|
654
|
+
|
|
655
|
+
@Property({ type: 'text' })
|
|
656
|
+
slug!: string
|
|
657
|
+
|
|
658
|
+
@Property({ type: 'text', nullable: true })
|
|
659
|
+
color?: string | null
|
|
660
|
+
|
|
661
|
+
@Property({ type: 'integer', default: 0 })
|
|
662
|
+
position: number = 0
|
|
663
|
+
|
|
664
|
+
@Property({ name: 'is_default', type: 'boolean', default: false })
|
|
665
|
+
isDefault: boolean = false
|
|
666
|
+
|
|
667
|
+
@Property({ name: 'is_done', type: 'boolean', default: false })
|
|
668
|
+
isDone: boolean = false
|
|
669
|
+
|
|
670
|
+
@Property({ name: 'created_at', type: Date, onCreate: () => new Date() })
|
|
671
|
+
createdAt: Date = new Date()
|
|
672
|
+
|
|
673
|
+
@Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })
|
|
674
|
+
updatedAt: Date = new Date()
|
|
675
|
+
|
|
676
|
+
@Property({ name: 'deleted_at', type: Date, nullable: true })
|
|
677
|
+
deletedAt?: Date | null
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
@Entity({ tableName: 'staff_time_tasks' })
|
|
681
|
+
@Index({ name: 'staff_time_tasks_tenant_org_idx', properties: ['tenantId', 'organizationId'] })
|
|
682
|
+
@Index({ name: 'staff_time_tasks_board_idx', properties: ['organizationId', 'timeProjectId', 'taskStatusId', 'position'] })
|
|
683
|
+
@Index({ name: 'staff_time_tasks_parent_idx', properties: ['organizationId', 'parentTaskId'] })
|
|
684
|
+
@Index({ name: 'staff_time_tasks_assignee_idx', properties: ['organizationId', 'assigneeStaffMemberId'] })
|
|
685
|
+
@Index({ name: 'staff_time_tasks_sequence_unique_idx', properties: ['organizationId', 'tenantId', 'timeProjectId', 'sequenceNumber'], options: { unique: true, where: 'deleted_at IS NULL' } })
|
|
686
|
+
@Index({ name: 'staff_time_tasks_reference_unique_idx', properties: ['organizationId', 'tenantId', 'reference'], options: { unique: true, where: 'deleted_at IS NULL' } })
|
|
687
|
+
export class StaffTimeTask {
|
|
688
|
+
[OptionalProps]?: 'sequenceNumber' | 'position' | 'createdAt' | 'updatedAt'
|
|
689
|
+
|
|
690
|
+
@PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })
|
|
691
|
+
id!: string
|
|
692
|
+
|
|
693
|
+
@Property({ name: 'tenant_id', type: 'uuid' })
|
|
694
|
+
tenantId!: string
|
|
695
|
+
|
|
696
|
+
@Property({ name: 'organization_id', type: 'uuid' })
|
|
697
|
+
organizationId!: string
|
|
698
|
+
|
|
699
|
+
@Property({ name: 'time_project_id', type: 'uuid' })
|
|
700
|
+
timeProjectId!: string
|
|
701
|
+
|
|
702
|
+
@Property({ name: 'parent_task_id', type: 'uuid', nullable: true })
|
|
703
|
+
parentTaskId?: string | null
|
|
704
|
+
|
|
705
|
+
@Property({ name: 'task_status_id', type: 'uuid' })
|
|
706
|
+
taskStatusId!: string
|
|
707
|
+
|
|
708
|
+
@Property({ name: 'sequence_number', type: 'integer', default: 0 })
|
|
709
|
+
sequenceNumber: number = 0
|
|
710
|
+
|
|
711
|
+
@Property({ type: 'text' })
|
|
712
|
+
reference!: string
|
|
713
|
+
|
|
714
|
+
@Property({ type: 'text' })
|
|
715
|
+
title!: string
|
|
716
|
+
|
|
717
|
+
@Property({ type: 'text', nullable: true })
|
|
718
|
+
description?: string | null
|
|
719
|
+
|
|
720
|
+
@Property({ name: 'assignee_staff_member_id', type: 'uuid', nullable: true })
|
|
721
|
+
assigneeStaffMemberId?: string | null
|
|
722
|
+
|
|
723
|
+
@Property({ type: 'integer', default: 0 })
|
|
724
|
+
position: number = 0
|
|
725
|
+
|
|
726
|
+
@Property({ name: 'created_by_user_id', type: 'uuid', nullable: true })
|
|
727
|
+
createdByUserId?: string | null
|
|
728
|
+
|
|
729
|
+
@Property({ name: 'closed_at', type: Date, nullable: true })
|
|
730
|
+
closedAt?: Date | null
|
|
731
|
+
|
|
732
|
+
@Property({ name: 'created_at', type: Date, onCreate: () => new Date() })
|
|
733
|
+
createdAt: Date = new Date()
|
|
734
|
+
|
|
735
|
+
@Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })
|
|
736
|
+
updatedAt: Date = new Date()
|
|
737
|
+
|
|
738
|
+
@Property({ name: 'deleted_at', type: Date, nullable: true })
|
|
739
|
+
deletedAt?: Date | null
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
@Entity({ tableName: 'staff_time_task_comments' })
|
|
743
|
+
@Index({ name: 'staff_time_task_comments_tenant_org_idx', properties: ['tenantId', 'organizationId'] })
|
|
744
|
+
@Index({ name: 'staff_time_task_comments_task_idx', properties: ['organizationId', 'taskId', 'createdAt'] })
|
|
745
|
+
export class StaffTimeTaskComment {
|
|
746
|
+
[OptionalProps]?: 'createdAt' | 'updatedAt'
|
|
747
|
+
|
|
748
|
+
@PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })
|
|
749
|
+
id!: string
|
|
750
|
+
|
|
751
|
+
@Property({ name: 'tenant_id', type: 'uuid' })
|
|
752
|
+
tenantId!: string
|
|
753
|
+
|
|
754
|
+
@Property({ name: 'organization_id', type: 'uuid' })
|
|
755
|
+
organizationId!: string
|
|
756
|
+
|
|
757
|
+
@Property({ name: 'task_id', type: 'uuid' })
|
|
758
|
+
taskId!: string
|
|
759
|
+
|
|
760
|
+
@Property({ type: 'text' })
|
|
761
|
+
body!: string
|
|
762
|
+
|
|
763
|
+
@Property({ name: 'author_user_id', type: 'uuid', nullable: true })
|
|
764
|
+
authorUserId?: string | null
|
|
765
|
+
|
|
766
|
+
@Property({ name: 'created_at', type: Date, onCreate: () => new Date() })
|
|
767
|
+
createdAt: Date = new Date()
|
|
768
|
+
|
|
769
|
+
@Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })
|
|
770
|
+
updatedAt: Date = new Date()
|
|
771
|
+
|
|
772
|
+
@Property({ name: 'deleted_at', type: Date, nullable: true })
|
|
773
|
+
deletedAt?: Date | null
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
@Entity({ tableName: 'staff_time_tags' })
|
|
777
|
+
@Index({ name: 'staff_time_tags_tenant_org_idx', properties: ['tenantId', 'organizationId'] })
|
|
778
|
+
@Index({ name: 'staff_time_tags_slug_unique_idx', properties: ['organizationId', 'tenantId', 'slug'], options: { unique: true, where: 'deleted_at IS NULL' } })
|
|
779
|
+
export class StaffTimeTag {
|
|
780
|
+
[OptionalProps]?: 'createdAt' | 'updatedAt'
|
|
781
|
+
|
|
782
|
+
@PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })
|
|
783
|
+
id!: string
|
|
784
|
+
|
|
785
|
+
@Property({ name: 'tenant_id', type: 'uuid' })
|
|
786
|
+
tenantId!: string
|
|
787
|
+
|
|
788
|
+
@Property({ name: 'organization_id', type: 'uuid' })
|
|
789
|
+
organizationId!: string
|
|
790
|
+
|
|
791
|
+
@Property({ type: 'text' })
|
|
792
|
+
slug!: string
|
|
793
|
+
|
|
794
|
+
@Property({ type: 'text' })
|
|
795
|
+
label!: string
|
|
796
|
+
|
|
797
|
+
@Property({ type: 'text', nullable: true })
|
|
798
|
+
color?: string | null
|
|
799
|
+
|
|
800
|
+
@Property({ name: 'created_at', type: Date, onCreate: () => new Date() })
|
|
801
|
+
createdAt: Date = new Date()
|
|
802
|
+
|
|
803
|
+
@Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })
|
|
804
|
+
updatedAt: Date = new Date()
|
|
805
|
+
|
|
806
|
+
@Property({ name: 'deleted_at', type: Date, nullable: true })
|
|
807
|
+
deletedAt?: Date | null
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
@Entity({ tableName: 'staff_time_task_tags' })
|
|
811
|
+
@Index({ name: 'staff_time_task_tags_tenant_org_idx', properties: ['tenantId', 'organizationId'] })
|
|
812
|
+
@Index({ name: 'staff_time_task_tags_task_idx', properties: ['organizationId', 'taskId'] })
|
|
813
|
+
@Index({ name: 'staff_time_task_tags_unique_idx', properties: ['tagId', 'taskId'], options: { unique: true } })
|
|
814
|
+
export class StaffTimeTaskTag {
|
|
815
|
+
[OptionalProps]?: 'createdAt'
|
|
816
|
+
|
|
817
|
+
@PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })
|
|
818
|
+
id!: string
|
|
819
|
+
|
|
820
|
+
@Property({ name: 'tenant_id', type: 'uuid' })
|
|
821
|
+
tenantId!: string
|
|
822
|
+
|
|
823
|
+
@Property({ name: 'organization_id', type: 'uuid' })
|
|
824
|
+
organizationId!: string
|
|
825
|
+
|
|
826
|
+
@Property({ name: 'tag_id', type: 'uuid' })
|
|
827
|
+
tagId!: string
|
|
828
|
+
|
|
829
|
+
@Property({ name: 'task_id', type: 'uuid' })
|
|
830
|
+
taskId!: string
|
|
831
|
+
|
|
832
|
+
@Property({ name: 'created_at', type: Date, onCreate: () => new Date() })
|
|
833
|
+
createdAt: Date = new Date()
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
@Entity({ tableName: 'staff_time_entry_tags' })
|
|
837
|
+
@Index({ name: 'staff_time_entry_tags_tenant_org_idx', properties: ['tenantId', 'organizationId'] })
|
|
838
|
+
@Index({ name: 'staff_time_entry_tags_entry_idx', properties: ['organizationId', 'timeEntryId'] })
|
|
839
|
+
@Index({ name: 'staff_time_entry_tags_unique_idx', properties: ['tagId', 'timeEntryId'], options: { unique: true } })
|
|
840
|
+
export class StaffTimeEntryTag {
|
|
841
|
+
[OptionalProps]?: 'createdAt'
|
|
842
|
+
|
|
843
|
+
@PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })
|
|
844
|
+
id!: string
|
|
845
|
+
|
|
846
|
+
@Property({ name: 'tenant_id', type: 'uuid' })
|
|
847
|
+
tenantId!: string
|
|
848
|
+
|
|
849
|
+
@Property({ name: 'organization_id', type: 'uuid' })
|
|
850
|
+
organizationId!: string
|
|
851
|
+
|
|
852
|
+
@Property({ name: 'tag_id', type: 'uuid' })
|
|
853
|
+
tagId!: string
|
|
854
|
+
|
|
855
|
+
@Property({ name: 'time_entry_id', type: 'uuid' })
|
|
856
|
+
timeEntryId!: string
|
|
857
|
+
|
|
858
|
+
@Property({ name: 'created_at', type: Date, onCreate: () => new Date() })
|
|
859
|
+
createdAt: Date = new Date()
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
@Entity({ tableName: 'staff_time_reports' })
|
|
863
|
+
@Index({ name: 'staff_time_reports_tenant_org_idx', properties: ['tenantId', 'organizationId'] })
|
|
864
|
+
@Index({ name: 'staff_time_reports_customer_idx', properties: ['organizationId', 'customerId'] })
|
|
865
|
+
@Index({ name: 'staff_time_reports_status_idx', properties: ['organizationId', 'status', 'periodFrom'] })
|
|
866
|
+
@Index({ name: 'staff_time_reports_reference_unique_idx', properties: ['organizationId', 'tenantId', 'reference'], options: { unique: true, where: 'deleted_at IS NULL' } })
|
|
867
|
+
export class StaffTimeReport {
|
|
868
|
+
[OptionalProps]?: 'periodKind' | 'grouping' | 'nonbillableMode' | 'includeAlreadyReported' | 'showRates' | 'roundingUnitMinutes' | 'roundingDirection' | 'status' | 'createdAt' | 'updatedAt'
|
|
869
|
+
|
|
870
|
+
@PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })
|
|
871
|
+
id!: string
|
|
872
|
+
|
|
873
|
+
@Property({ name: 'tenant_id', type: 'uuid' })
|
|
874
|
+
tenantId!: string
|
|
875
|
+
|
|
876
|
+
@Property({ name: 'organization_id', type: 'uuid' })
|
|
877
|
+
organizationId!: string
|
|
878
|
+
|
|
879
|
+
@Property({ name: 'customer_id', type: 'uuid' })
|
|
880
|
+
customerId!: string
|
|
881
|
+
|
|
882
|
+
@Property({ name: 'customer_snapshot', type: 'jsonb', nullable: true })
|
|
883
|
+
customerSnapshot?: Record<string, unknown> | null
|
|
884
|
+
|
|
885
|
+
@Property({ type: 'text' })
|
|
886
|
+
reference!: string
|
|
887
|
+
|
|
888
|
+
@Property({ type: 'text' })
|
|
889
|
+
title!: string
|
|
890
|
+
|
|
891
|
+
@Enum({ items: ['week', 'month', 'year', 'custom'], type: 'text', name: 'period_kind', default: 'month' })
|
|
892
|
+
periodKind: StaffTimeReportPeriodKind = 'month'
|
|
893
|
+
|
|
894
|
+
@Property({ name: 'period_from', type: 'date' })
|
|
895
|
+
periodFrom!: Date
|
|
896
|
+
|
|
897
|
+
@Property({ name: 'period_to', type: 'date' })
|
|
898
|
+
periodTo!: Date
|
|
899
|
+
|
|
900
|
+
@Property({ name: 'currency_code', type: 'text' })
|
|
901
|
+
currencyCode!: string
|
|
902
|
+
|
|
903
|
+
@Property({ name: 'grouping', type: 'text', default: 'project_task' })
|
|
904
|
+
grouping: StaffTimeReportGrouping = 'project_task'
|
|
905
|
+
|
|
906
|
+
@Enum({ items: ['separate', 'exclude'], type: 'text', name: 'nonbillable_mode', default: 'separate' })
|
|
907
|
+
nonbillableMode: StaffTimeReportNonBillableMode = 'separate'
|
|
908
|
+
|
|
909
|
+
@Property({ name: 'include_already_reported', type: 'boolean', default: false })
|
|
910
|
+
includeAlreadyReported: boolean = false
|
|
911
|
+
|
|
912
|
+
@Property({ name: 'show_rates', type: 'boolean', default: true })
|
|
913
|
+
showRates: boolean = true
|
|
914
|
+
|
|
915
|
+
@Property({ name: 'rounding_unit_minutes', type: 'integer', default: 0 })
|
|
916
|
+
roundingUnitMinutes: number = 0
|
|
917
|
+
|
|
918
|
+
@Property({ name: 'rounding_direction', type: 'text', default: 'up' })
|
|
919
|
+
roundingDirection: string = 'up'
|
|
920
|
+
|
|
921
|
+
@Enum({ items: ['draft', 'closed'], type: 'text', name: 'status', default: 'draft' })
|
|
922
|
+
status: StaffTimeReportStatus = 'draft'
|
|
923
|
+
|
|
924
|
+
@Property({ name: 'total_billable_minutes', type: 'integer', nullable: true })
|
|
925
|
+
totalBillableMinutes?: number | null
|
|
926
|
+
|
|
927
|
+
@Property({ name: 'total_nonbillable_minutes', type: 'integer', nullable: true })
|
|
928
|
+
totalNonbillableMinutes?: number | null
|
|
929
|
+
|
|
930
|
+
@Property({ name: 'total_amount', type: 'numeric', precision: 14, scale: 2, nullable: true })
|
|
931
|
+
totalAmount?: string | null
|
|
932
|
+
|
|
933
|
+
@Property({ name: 'closed_at', type: Date, nullable: true })
|
|
934
|
+
closedAt?: Date | null
|
|
935
|
+
|
|
936
|
+
@Property({ name: 'closed_by_user_id', type: 'uuid', nullable: true })
|
|
937
|
+
closedByUserId?: string | null
|
|
938
|
+
|
|
939
|
+
@Property({ name: 'created_by_user_id', type: 'uuid', nullable: true })
|
|
940
|
+
createdByUserId?: string | null
|
|
941
|
+
|
|
942
|
+
@Property({ name: 'created_at', type: Date, onCreate: () => new Date() })
|
|
943
|
+
createdAt: Date = new Date()
|
|
944
|
+
|
|
945
|
+
@Property({ name: 'updated_at', type: Date, onUpdate: () => new Date() })
|
|
946
|
+
updatedAt: Date = new Date()
|
|
947
|
+
|
|
948
|
+
@Property({ name: 'deleted_at', type: Date, nullable: true })
|
|
949
|
+
deletedAt?: Date | null
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
@Entity({ tableName: 'staff_time_report_projects' })
|
|
953
|
+
@Index({ name: 'staff_time_report_projects_tenant_org_idx', properties: ['tenantId', 'organizationId'] })
|
|
954
|
+
@Index({ name: 'staff_time_report_projects_project_idx', properties: ['organizationId', 'timeProjectId'] })
|
|
955
|
+
@Index({ name: 'staff_time_report_projects_unique_idx', properties: ['reportId', 'timeProjectId'], options: { unique: true } })
|
|
956
|
+
export class StaffTimeReportProject {
|
|
957
|
+
[OptionalProps]?: 'createdAt'
|
|
958
|
+
|
|
959
|
+
@PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })
|
|
960
|
+
id!: string
|
|
961
|
+
|
|
962
|
+
@Property({ name: 'tenant_id', type: 'uuid' })
|
|
963
|
+
tenantId!: string
|
|
964
|
+
|
|
965
|
+
@Property({ name: 'organization_id', type: 'uuid' })
|
|
966
|
+
organizationId!: string
|
|
967
|
+
|
|
968
|
+
@Property({ name: 'report_id', type: 'uuid' })
|
|
969
|
+
reportId!: string
|
|
970
|
+
|
|
971
|
+
@Property({ name: 'time_project_id', type: 'uuid' })
|
|
972
|
+
timeProjectId!: string
|
|
973
|
+
|
|
974
|
+
@Property({ name: 'created_at', type: Date, onCreate: () => new Date() })
|
|
975
|
+
createdAt: Date = new Date()
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
@Entity({ tableName: 'staff_time_report_entries' })
|
|
979
|
+
@Index({ name: 'staff_time_report_entries_tenant_org_idx', properties: ['tenantId', 'organizationId'] })
|
|
980
|
+
@Index({ name: 'staff_time_report_entries_entry_idx', properties: ['organizationId', 'timeEntryId'] })
|
|
981
|
+
@Index({ name: 'staff_time_report_entries_unique_idx', properties: ['reportId', 'timeEntryId'], options: { unique: true } })
|
|
982
|
+
export class StaffTimeReportEntry {
|
|
983
|
+
[OptionalProps]?: 'frozenRawMinutes' | 'frozenRoundedMinutes' | 'frozenIsBillable' | 'createdAt'
|
|
984
|
+
|
|
985
|
+
@PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })
|
|
986
|
+
id!: string
|
|
987
|
+
|
|
988
|
+
@Property({ name: 'tenant_id', type: 'uuid' })
|
|
989
|
+
tenantId!: string
|
|
990
|
+
|
|
991
|
+
@Property({ name: 'organization_id', type: 'uuid' })
|
|
992
|
+
organizationId!: string
|
|
993
|
+
|
|
994
|
+
@Property({ name: 'report_id', type: 'uuid' })
|
|
995
|
+
reportId!: string
|
|
996
|
+
|
|
997
|
+
@Property({ name: 'time_entry_id', type: 'uuid' })
|
|
998
|
+
timeEntryId!: string
|
|
999
|
+
|
|
1000
|
+
@Property({ name: 'frozen_raw_minutes', type: 'integer', default: 0 })
|
|
1001
|
+
frozenRawMinutes: number = 0
|
|
1002
|
+
|
|
1003
|
+
@Property({ name: 'frozen_rounded_minutes', type: 'integer', default: 0 })
|
|
1004
|
+
frozenRoundedMinutes: number = 0
|
|
1005
|
+
|
|
1006
|
+
@Property({ name: 'frozen_rate_amount', type: 'numeric', precision: 14, scale: 4, nullable: true })
|
|
1007
|
+
frozenRateAmount?: string | null
|
|
1008
|
+
|
|
1009
|
+
@Property({ name: 'frozen_currency_code', type: 'text' })
|
|
1010
|
+
frozenCurrencyCode!: string
|
|
1011
|
+
|
|
1012
|
+
@Property({ name: 'frozen_amount', type: 'numeric', precision: 14, scale: 2, nullable: true })
|
|
1013
|
+
frozenAmount?: string | null
|
|
1014
|
+
|
|
1015
|
+
@Property({ name: 'frozen_is_billable', type: 'boolean', default: true })
|
|
1016
|
+
frozenIsBillable: boolean = true
|
|
1017
|
+
|
|
1018
|
+
@Property({ name: 'created_at', type: Date, onCreate: () => new Date() })
|
|
1019
|
+
createdAt: Date = new Date()
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
@Entity({ tableName: 'staff_time_report_events' })
|
|
1023
|
+
@Index({ name: 'staff_time_report_events_tenant_org_idx', properties: ['tenantId', 'organizationId'] })
|
|
1024
|
+
@Index({ name: 'staff_time_report_events_report_idx', properties: ['organizationId', 'reportId', 'createdAt'] })
|
|
1025
|
+
export class StaffTimeReportEvent {
|
|
1026
|
+
[OptionalProps]?: 'createdAt'
|
|
1027
|
+
|
|
1028
|
+
@PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })
|
|
1029
|
+
id!: string
|
|
1030
|
+
|
|
1031
|
+
@Property({ name: 'tenant_id', type: 'uuid' })
|
|
1032
|
+
tenantId!: string
|
|
1033
|
+
|
|
1034
|
+
@Property({ name: 'organization_id', type: 'uuid' })
|
|
1035
|
+
organizationId!: string
|
|
1036
|
+
|
|
1037
|
+
@Property({ name: 'report_id', type: 'uuid' })
|
|
1038
|
+
reportId!: string
|
|
1039
|
+
|
|
1040
|
+
@Enum({ items: ['closed', 'unlocked', 'exported'], type: 'text', name: 'event_type' })
|
|
1041
|
+
eventType!: StaffTimeReportEventType
|
|
1042
|
+
|
|
1043
|
+
@Property({ type: 'text', nullable: true })
|
|
1044
|
+
reason?: string | null
|
|
1045
|
+
|
|
1046
|
+
@Property({ name: 'actor_user_id', type: 'uuid', nullable: true })
|
|
1047
|
+
actorUserId?: string | null
|
|
1048
|
+
|
|
1049
|
+
@Property({ type: 'jsonb', nullable: true })
|
|
1050
|
+
metadata?: Record<string, unknown> | null
|
|
1051
|
+
|
|
1052
|
+
@Property({ name: 'created_at', type: Date, onCreate: () => new Date() })
|
|
1053
|
+
createdAt: Date = new Date()
|
|
1054
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { EntityExtension } from '@open-mercato/shared/modules/entities'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* EP-44 — cross-module entity links declared by the staff module.
|
|
5
|
+
*
|
|
6
|
+
* Per root `AGENTS.md`, modules do NOT form direct ORM relationships across boundaries.
|
|
7
|
+
* `staff_time_entries.customer_id` / `.deal_id` / `.order_id` and
|
|
8
|
+
* `staff_time_projects.customer_id` are plain uuid columns; the declarations below are
|
|
9
|
+
* the traversal contract over them and nothing more. They contain **string ids only** —
|
|
10
|
+
* no import of a customers or sales symbol — so they add no load-time dependency and
|
|
11
|
+
* staff's `requires: ['planner', 'resources']` in `index.ts` does not grow. That matters:
|
|
12
|
+
* staff is slated for extraction into a standalone package, and a link that pulled in
|
|
13
|
+
* `@open-mercato/core/modules/customers` would break the extraction.
|
|
14
|
+
*
|
|
15
|
+
* `base` is the OTHER module's entity and `extension` is the staff entity that carries
|
|
16
|
+
* the foreign key, matching every other `data/extensions.ts` in the repo — the query
|
|
17
|
+
* engine only ever looks a link up by `base` (`shared/lib/query/engine.ts`,
|
|
18
|
+
* `opts.includeExtensions`), joining the extension table onto the base entity's query.
|
|
19
|
+
*
|
|
20
|
+
* NOTE — declaration-only extension point, exactly as in
|
|
21
|
+
* `apps/mercato/src/modules/example/data/extensions.ts`. Nothing in the platform passes
|
|
22
|
+
* `includeExtensions` to a query today, the basic engine's extension join adds no
|
|
23
|
+
* projection and exposes no filterable or sortable alias, and the hybrid engine DI
|
|
24
|
+
* registers ignores the flag outside its basic-engine fallback. The declaration is still
|
|
25
|
+
* the live contract: it is what `yarn generate` emits into the module registry as
|
|
26
|
+
* `entityExtensions`, and it is what a reverse-navigation or join feature will read.
|
|
27
|
+
*
|
|
28
|
+
* `table` is declared rather than derived. The engine would reach the same names with
|
|
29
|
+
* its regular pluralizer (`staff_time_entry` → `staff_time_entries`), but the explicit
|
|
30
|
+
* form is pinned against the physical schema by `__tests__/entityExtensions.test.ts`.
|
|
31
|
+
*/
|
|
32
|
+
const entityExtensions: EntityExtension[] = [
|
|
33
|
+
{
|
|
34
|
+
base: 'customers:customer_entity',
|
|
35
|
+
extension: 'staff:staff_time_entry',
|
|
36
|
+
join: { baseKey: 'id', extensionKey: 'customer_id' },
|
|
37
|
+
table: 'staff_time_entries',
|
|
38
|
+
cardinality: 'one-to-many',
|
|
39
|
+
description: 'Time logged directly against a customer record',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
base: 'customers:customer_deal',
|
|
43
|
+
extension: 'staff:staff_time_entry',
|
|
44
|
+
join: { baseKey: 'id', extensionKey: 'deal_id' },
|
|
45
|
+
table: 'staff_time_entries',
|
|
46
|
+
cardinality: 'one-to-many',
|
|
47
|
+
description: 'Time logged against a CRM deal',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
base: 'sales:sales_order',
|
|
51
|
+
extension: 'staff:staff_time_entry',
|
|
52
|
+
join: { baseKey: 'id', extensionKey: 'order_id' },
|
|
53
|
+
table: 'staff_time_entries',
|
|
54
|
+
cardinality: 'one-to-many',
|
|
55
|
+
description: 'Time logged against a sales order',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
base: 'customers:customer_entity',
|
|
59
|
+
extension: 'staff:staff_time_project',
|
|
60
|
+
join: { baseKey: 'id', extensionKey: 'customer_id' },
|
|
61
|
+
table: 'staff_time_projects',
|
|
62
|
+
cardinality: 'one-to-many',
|
|
63
|
+
description: 'Time projects owned by a customer record (D-9: the customers supertype)',
|
|
64
|
+
},
|
|
65
|
+
]
|
|
66
|
+
|
|
67
|
+
export const extensions = entityExtensions
|
|
68
|
+
export default entityExtensions
|