@open-mercato/core 0.6.4-develop.4217.1.c9aa050183 → 0.6.4-develop.4236.1.9fa6806b34
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 +37 -0
- package/dist/generated/entities/staff_time_entry/index.js.map +7 -0
- package/dist/generated/entities/staff_time_entry_segment/index.js +23 -0
- package/dist/generated/entities/staff_time_entry_segment/index.js.map +7 -0
- package/dist/generated/entities/staff_time_project/index.js +35 -0
- package/dist/generated/entities/staff_time_project/index.js.map +7 -0
- package/dist/generated/entities/staff_time_project_member/index.js +29 -0
- package/dist/generated/entities/staff_time_project_member/index.js.map +7 -0
- package/dist/generated/entities.ids.generated.js +5 -1
- package/dist/generated/entities.ids.generated.js.map +2 -2
- package/dist/generated/entity-fields-registry.js +64 -0
- package/dist/generated/entity-fields-registry.js.map +2 -2
- package/dist/helpers/integration/timesheetFixtures.js +50 -0
- package/dist/helpers/integration/timesheetFixtures.js.map +7 -0
- package/dist/modules/attachments/api/library/[id]/route.js +20 -16
- package/dist/modules/attachments/api/library/[id]/route.js.map +2 -2
- package/dist/modules/attachments/api/route.js +18 -14
- package/dist/modules/attachments/api/route.js.map +2 -2
- package/dist/modules/auth/api/roles/acl/route.js +10 -4
- package/dist/modules/auth/api/roles/acl/route.js.map +2 -2
- package/dist/modules/auth/api/sidebar/preferences/route.js +27 -20
- package/dist/modules/auth/api/sidebar/preferences/route.js.map +2 -2
- package/dist/modules/auth/api/users/acl/route.js +16 -11
- package/dist/modules/auth/api/users/acl/route.js.map +2 -2
- package/dist/modules/auth/commands/users.js +87 -71
- package/dist/modules/auth/commands/users.js.map +2 -2
- package/dist/modules/auth/services/sidebarPreferencesService.js +39 -30
- package/dist/modules/auth/services/sidebarPreferencesService.js.map +2 -2
- package/dist/modules/catalog/commands/categories.js +61 -12
- package/dist/modules/catalog/commands/categories.js.map +2 -2
- package/dist/modules/catalog/commands/products.js +79 -54
- package/dist/modules/catalog/commands/products.js.map +2 -2
- package/dist/modules/catalog/commands/variants.js +29 -16
- package/dist/modules/catalog/commands/variants.js.map +2 -2
- package/dist/modules/currencies/commands/currencies.js +15 -8
- package/dist/modules/currencies/commands/currencies.js.map +2 -2
- package/dist/modules/customer_accounts/api/admin/users.js +27 -26
- package/dist/modules/customer_accounts/api/admin/users.js.map +2 -2
- package/dist/modules/customer_accounts/api/password/reset-confirm.js +5 -5
- package/dist/modules/customer_accounts/api/password/reset-confirm.js.map +2 -2
- package/dist/modules/customer_accounts/api/portal/users/[id]/roles.js +11 -10
- package/dist/modules/customer_accounts/api/portal/users/[id]/roles.js.map +2 -2
- package/dist/modules/customers/commands/addresses.js +35 -21
- package/dist/modules/customers/commands/addresses.js.map +2 -2
- package/dist/modules/customers/commands/companies.js +163 -162
- package/dist/modules/customers/commands/companies.js.map +2 -2
- package/dist/modules/customers/commands/deals.js +3 -4
- package/dist/modules/customers/commands/deals.js.map +2 -2
- package/dist/modules/customers/commands/interactions.js +19 -22
- package/dist/modules/customers/commands/interactions.js.map +2 -2
- package/dist/modules/customers/commands/people.js +18 -15
- package/dist/modules/customers/commands/people.js.map +2 -2
- package/dist/modules/customers/commands/personCompanyLinks.js +105 -94
- package/dist/modules/customers/commands/personCompanyLinks.js.map +2 -2
- package/dist/modules/customers/commands/pipeline-stages.js +30 -23
- package/dist/modules/customers/commands/pipeline-stages.js.map +2 -2
- package/dist/modules/customers/commands/pipelines.js +27 -20
- package/dist/modules/customers/commands/pipelines.js.map +2 -2
- package/dist/modules/customers/commands/tags.js +13 -5
- package/dist/modules/customers/commands/tags.js.map +2 -2
- package/dist/modules/dashboards/api/users/widgets/route.js +0 -1
- package/dist/modules/dashboards/api/users/widgets/route.js.map +2 -2
- package/dist/modules/dashboards/api/widgets/data/route.js +29 -1
- package/dist/modules/dashboards/api/widgets/data/route.js.map +2 -2
- package/dist/modules/data_sync/lib/sync-engine.js +4 -4
- package/dist/modules/data_sync/lib/sync-engine.js.map +2 -2
- package/dist/modules/data_sync/lib/sync-run-service.js +51 -27
- package/dist/modules/data_sync/lib/sync-run-service.js.map +2 -2
- package/dist/modules/directory/commands/organizations.js +192 -158
- package/dist/modules/directory/commands/organizations.js.map +3 -3
- package/dist/modules/inbox_ops/api/emails/[id]/reprocess/route.js +22 -16
- package/dist/modules/inbox_ops/api/emails/[id]/reprocess/route.js.map +2 -2
- package/dist/modules/messages/commands/messages.js +77 -75
- package/dist/modules/messages/commands/messages.js.map +2 -2
- package/dist/modules/messages/commands/shared.js +132 -132
- package/dist/modules/messages/commands/shared.js.map +2 -2
- package/dist/modules/perspectives/api/[tableId]/route.js +37 -26
- package/dist/modules/perspectives/api/[tableId]/route.js.map +2 -2
- package/dist/modules/resources/commands/resources.js +125 -117
- package/dist/modules/resources/commands/resources.js.map +2 -2
- package/dist/modules/resources/commands/tags.js +7 -3
- package/dist/modules/resources/commands/tags.js.map +2 -2
- package/dist/modules/sales/api/quotes/send/route.js +12 -11
- package/dist/modules/sales/api/quotes/send/route.js.map +2 -2
- package/dist/modules/sales/commands/documents.js +629 -478
- package/dist/modules/sales/commands/documents.js.map +2 -2
- package/dist/modules/sales/commands/payments.js +146 -146
- package/dist/modules/sales/commands/payments.js.map +2 -2
- package/dist/modules/sales/commands/returns.js +68 -60
- package/dist/modules/sales/commands/returns.js.map +2 -2
- package/dist/modules/staff/acl.js +10 -1
- package/dist/modules/staff/acl.js.map +2 -2
- package/dist/modules/staff/analytics.js +33 -0
- package/dist/modules/staff/analytics.js.map +7 -0
- package/dist/modules/staff/api/guards.js +31 -0
- package/dist/modules/staff/api/guards.js.map +7 -0
- package/dist/modules/staff/api/interceptors.js +96 -0
- package/dist/modules/staff/api/interceptors.js.map +7 -0
- package/dist/modules/staff/api/timesheets/my-projects/[projectId]/route.js +170 -0
- package/dist/modules/staff/api/timesheets/my-projects/[projectId]/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/my-projects/route.js +103 -0
- package/dist/modules/staff/api/timesheets/my-projects/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/projects/kpis/route.js +147 -0
- package/dist/modules/staff/api/timesheets/projects/kpis/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/time-entries/[id]/segments/[segmentId]/route.js +171 -0
- package/dist/modules/staff/api/timesheets/time-entries/[id]/segments/[segmentId]/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/time-entries/[id]/segments/route.js +180 -0
- package/dist/modules/staff/api/timesheets/time-entries/[id]/segments/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/time-entries/[id]/timer-start/route.js +155 -0
- package/dist/modules/staff/api/timesheets/time-entries/[id]/timer-start/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/time-entries/[id]/timer-stop/route.js +173 -0
- package/dist/modules/staff/api/timesheets/time-entries/[id]/timer-stop/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/time-entries/bulk/route.js +260 -0
- package/dist/modules/staff/api/timesheets/time-entries/bulk/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/time-entries/route.js +188 -0
- package/dist/modules/staff/api/timesheets/time-entries/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/time-projects/[id]/employees/route.js +159 -0
- package/dist/modules/staff/api/timesheets/time-projects/[id]/employees/route.js.map +7 -0
- package/dist/modules/staff/api/timesheets/time-projects/route.js +230 -0
- package/dist/modules/staff/api/timesheets/time-projects/route.js.map +7 -0
- package/dist/modules/staff/backend/staff/timesheets/page.js +710 -0
- package/dist/modules/staff/backend/staff/timesheets/page.js.map +7 -0
- package/dist/modules/staff/backend/staff/timesheets/page.meta.js +22 -0
- package/dist/modules/staff/backend/staff/timesheets/page.meta.js.map +7 -0
- package/dist/modules/staff/backend/staff/timesheets/projects/[id]/edit/page.js +125 -0
- package/dist/modules/staff/backend/staff/timesheets/projects/[id]/edit/page.js.map +7 -0
- package/dist/modules/staff/backend/staff/timesheets/projects/[id]/edit/page.meta.js +16 -0
- package/dist/modules/staff/backend/staff/timesheets/projects/[id]/edit/page.meta.js.map +7 -0
- package/dist/modules/staff/backend/staff/timesheets/projects/[id]/page.js +418 -0
- package/dist/modules/staff/backend/staff/timesheets/projects/[id]/page.js.map +7 -0
- package/dist/modules/staff/backend/staff/timesheets/projects/[id]/page.meta.js +16 -0
- package/dist/modules/staff/backend/staff/timesheets/projects/[id]/page.meta.js.map +7 -0
- package/dist/modules/staff/backend/staff/timesheets/projects/create/page.js +79 -0
- package/dist/modules/staff/backend/staff/timesheets/projects/create/page.js.map +7 -0
- package/dist/modules/staff/backend/staff/timesheets/projects/create/page.meta.js +16 -0
- package/dist/modules/staff/backend/staff/timesheets/projects/create/page.meta.js.map +7 -0
- package/dist/modules/staff/backend/staff/timesheets/projects/page.js +602 -0
- package/dist/modules/staff/backend/staff/timesheets/projects/page.js.map +7 -0
- package/dist/modules/staff/backend/staff/timesheets/projects/page.meta.js +25 -0
- package/dist/modules/staff/backend/staff/timesheets/projects/page.meta.js.map +7 -0
- package/dist/modules/staff/backend/staff/timesheets/projects/projectFormConfig.js +123 -0
- package/dist/modules/staff/backend/staff/timesheets/projects/projectFormConfig.js.map +7 -0
- package/dist/modules/staff/cli.js +38 -1
- package/dist/modules/staff/cli.js.map +2 -2
- package/dist/modules/staff/commands/index.js +2 -0
- package/dist/modules/staff/commands/index.js.map +2 -2
- package/dist/modules/staff/commands/leave-requests.js +30 -28
- package/dist/modules/staff/commands/leave-requests.js.map +3 -3
- package/dist/modules/staff/commands/team-members.js +21 -20
- package/dist/modules/staff/commands/team-members.js.map +2 -2
- package/dist/modules/staff/commands/timesheets-entries.js +409 -0
- package/dist/modules/staff/commands/timesheets-entries.js.map +7 -0
- package/dist/modules/staff/commands/timesheets-projects.js +618 -0
- package/dist/modules/staff/commands/timesheets-projects.js.map +7 -0
- package/dist/modules/staff/data/enrichers.js +104 -0
- package/dist/modules/staff/data/enrichers.js.map +7 -0
- package/dist/modules/staff/data/entities.js +226 -1
- package/dist/modules/staff/data/entities.js.map +2 -2
- package/dist/modules/staff/data/validators.js +113 -1
- package/dist/modules/staff/data/validators.js.map +2 -2
- package/dist/modules/staff/events.js +13 -1
- package/dist/modules/staff/events.js.map +2 -2
- package/dist/modules/staff/lib/crud.js +7 -1
- package/dist/modules/staff/lib/crud.js.map +2 -2
- package/dist/modules/staff/lib/staffMemberResolver.js +15 -0
- package/dist/modules/staff/lib/staffMemberResolver.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-projects/computeProjectHoursTrend.js +60 -0
- package/dist/modules/staff/lib/timesheets-projects/computeProjectHoursTrend.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-projects/computeProjectsKpis.js +260 -0
- package/dist/modules/staff/lib/timesheets-projects/computeProjectsKpis.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-projects/dateBuckets.js +41 -0
- package/dist/modules/staff/lib/timesheets-projects/dateBuckets.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-projects/initials.js +10 -0
- package/dist/modules/staff/lib/timesheets-projects/initials.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-projects/kpiMath.js +12 -0
- package/dist/modules/staff/lib/timesheets-projects/kpiMath.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-projects/listProjectMembersPreview.js +55 -0
- package/dist/modules/staff/lib/timesheets-projects/listProjectMembersPreview.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-projects-ui/HoursSparkline.js +66 -0
- package/dist/modules/staff/lib/timesheets-projects-ui/HoursSparkline.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-projects-ui/ProjectCard.js +81 -0
- package/dist/modules/staff/lib/timesheets-projects-ui/ProjectCard.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-projects-ui/ProjectMembersAvatarStack.js +58 -0
- package/dist/modules/staff/lib/timesheets-projects-ui/ProjectMembersAvatarStack.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-projects-ui/ProjectsKpiStrip.js +152 -0
- package/dist/modules/staff/lib/timesheets-projects-ui/ProjectsKpiStrip.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-projects-ui/SavedViewTabs.js +37 -0
- package/dist/modules/staff/lib/timesheets-projects-ui/SavedViewTabs.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-projects-ui/ViewModeToggle.js +57 -0
- package/dist/modules/staff/lib/timesheets-projects-ui/ViewModeToggle.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-projects-ui/useProjectsViewMode.js +50 -0
- package/dist/modules/staff/lib/timesheets-projects-ui/useProjectsViewMode.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-ui/AddRowDropdown.js +163 -0
- package/dist/modules/staff/lib/timesheets-ui/AddRowDropdown.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-ui/CalendarPicker.js +209 -0
- package/dist/modules/staff/lib/timesheets-ui/CalendarPicker.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-ui/ColorPicker.js +52 -0
- package/dist/modules/staff/lib/timesheets-ui/ColorPicker.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-ui/CreateProjectDialog.js +77 -0
- package/dist/modules/staff/lib/timesheets-ui/CreateProjectDialog.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-ui/ListView.js +173 -0
- package/dist/modules/staff/lib/timesheets-ui/ListView.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-ui/ProjectColorDot.js +32 -0
- package/dist/modules/staff/lib/timesheets-ui/ProjectColorDot.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-ui/TimerBar.js +270 -0
- package/dist/modules/staff/lib/timesheets-ui/TimerBar.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-ui/ViewSwitcher.js +57 -0
- package/dist/modules/staff/lib/timesheets-ui/ViewSwitcher.js.map +7 -0
- package/dist/modules/staff/lib/timesheets-ui/colors.js +43 -0
- package/dist/modules/staff/lib/timesheets-ui/colors.js.map +7 -0
- package/dist/modules/staff/migrations/Migration20260326135612.js +24 -0
- package/dist/modules/staff/migrations/Migration20260326135612.js.map +7 -0
- package/dist/modules/staff/migrations/Migration20260413102715.js +23 -0
- package/dist/modules/staff/migrations/Migration20260413102715.js.map +7 -0
- package/dist/modules/staff/migrations/Migration20260413111602.js +13 -0
- package/dist/modules/staff/migrations/Migration20260413111602.js.map +7 -0
- package/dist/modules/staff/migrations/Migration20260511112759.js +19 -0
- package/dist/modules/staff/migrations/Migration20260511112759.js.map +7 -0
- package/dist/modules/staff/search.js +35 -0
- package/dist/modules/staff/search.js.map +2 -2
- package/dist/modules/staff/setup.js +15 -1
- package/dist/modules/staff/setup.js.map +2 -2
- package/dist/modules/staff/widgets/dashboard/timesheets-hours-by-project/config.js +16 -0
- package/dist/modules/staff/widgets/dashboard/timesheets-hours-by-project/config.js.map +7 -0
- package/dist/modules/staff/widgets/dashboard/timesheets-hours-by-project/widget.client.js +126 -0
- package/dist/modules/staff/widgets/dashboard/timesheets-hours-by-project/widget.client.js.map +7 -0
- package/dist/modules/staff/widgets/dashboard/timesheets-hours-by-project/widget.js +26 -0
- package/dist/modules/staff/widgets/dashboard/timesheets-hours-by-project/widget.js.map +7 -0
- package/dist/modules/staff/widgets/dashboard/timesheets-time-reporting/config.js +15 -0
- package/dist/modules/staff/widgets/dashboard/timesheets-time-reporting/config.js.map +7 -0
- package/dist/modules/staff/widgets/dashboard/timesheets-time-reporting/widget.client.js +238 -0
- package/dist/modules/staff/widgets/dashboard/timesheets-time-reporting/widget.client.js.map +7 -0
- package/dist/modules/staff/widgets/dashboard/timesheets-time-reporting/widget.js +26 -0
- package/dist/modules/staff/widgets/dashboard/timesheets-time-reporting/widget.js.map +7 -0
- package/dist/modules/staff/widgets/injection/timer-sidebar-indicator/widget.js +145 -0
- package/dist/modules/staff/widgets/injection/timer-sidebar-indicator/widget.js.map +7 -0
- package/dist/modules/staff/widgets/injection-table.js +12 -0
- package/dist/modules/staff/widgets/injection-table.js.map +7 -0
- package/dist/modules/sync_excel/api/import/route.js +19 -17
- package/dist/modules/sync_excel/api/import/route.js.map +2 -2
- package/dist/modules/translations/commands/translations.js +22 -19
- package/dist/modules/translations/commands/translations.js.map +2 -2
- package/generated/entities/staff_time_entry/index.ts +17 -0
- package/generated/entities/staff_time_entry_segment/index.ts +10 -0
- package/generated/entities/staff_time_project/index.ts +16 -0
- package/generated/entities/staff_time_project_member/index.ts +13 -0
- package/generated/entities.ids.generated.ts +5 -1
- package/generated/entity-fields-registry.ts +64 -0
- package/package.json +7 -7
- package/src/helpers/integration/timesheetFixtures.ts +61 -0
- package/src/modules/attachments/api/library/[id]/route.ts +24 -17
- package/src/modules/attachments/api/route.ts +20 -14
- package/src/modules/auth/api/roles/acl/route.ts +11 -5
- package/src/modules/auth/api/sidebar/preferences/route.ts +33 -24
- package/src/modules/auth/api/users/acl/route.ts +17 -12
- package/src/modules/auth/commands/users.ts +96 -80
- package/src/modules/auth/services/sidebarPreferencesService.ts +40 -32
- package/src/modules/catalog/commands/categories.ts +61 -12
- package/src/modules/catalog/commands/products.ts +93 -60
- package/src/modules/catalog/commands/variants.ts +29 -16
- package/src/modules/currencies/commands/currencies.ts +27 -14
- package/src/modules/customer_accounts/api/admin/users.ts +31 -26
- package/src/modules/customer_accounts/api/password/reset-confirm.ts +5 -6
- package/src/modules/customer_accounts/api/portal/users/[id]/roles.ts +14 -13
- package/src/modules/customers/commands/addresses.ts +35 -23
- package/src/modules/customers/commands/companies.ts +166 -165
- package/src/modules/customers/commands/deals.ts +2 -4
- package/src/modules/customers/commands/interactions.ts +20 -26
- package/src/modules/customers/commands/people.ts +18 -15
- package/src/modules/customers/commands/personCompanyLinks.ts +109 -100
- package/src/modules/customers/commands/pipeline-stages.ts +31 -27
- package/src/modules/customers/commands/pipelines.ts +29 -23
- package/src/modules/customers/commands/tags.ts +13 -5
- package/src/modules/dashboards/api/users/widgets/route.ts +0 -1
- package/src/modules/dashboards/api/widgets/data/route.ts +36 -1
- package/src/modules/data_sync/lib/sync-engine.ts +4 -5
- package/src/modules/data_sync/lib/sync-run-service.ts +57 -28
- package/src/modules/directory/commands/organizations.ts +203 -166
- package/src/modules/inbox_ops/api/emails/[id]/reprocess/route.ts +26 -18
- package/src/modules/messages/commands/messages.ts +82 -80
- package/src/modules/messages/commands/shared.ts +138 -133
- package/src/modules/perspectives/api/[tableId]/route.ts +38 -27
- package/src/modules/resources/commands/resources.ts +127 -117
- package/src/modules/resources/commands/tags.ts +7 -3
- package/src/modules/sales/api/quotes/send/route.ts +17 -12
- package/src/modules/sales/commands/documents.ts +673 -481
- package/src/modules/sales/commands/payments.ts +158 -152
- package/src/modules/sales/commands/returns.ts +74 -63
- package/src/modules/staff/acl.ts +11 -0
- package/src/modules/staff/analytics.ts +30 -0
- package/src/modules/staff/api/guards.ts +59 -0
- package/src/modules/staff/api/interceptors.ts +122 -0
- package/src/modules/staff/api/timesheets/my-projects/[projectId]/route.ts +191 -0
- package/src/modules/staff/api/timesheets/my-projects/route.ts +115 -0
- package/src/modules/staff/api/timesheets/projects/kpis/route.ts +159 -0
- package/src/modules/staff/api/timesheets/time-entries/[id]/segments/[segmentId]/route.ts +187 -0
- package/src/modules/staff/api/timesheets/time-entries/[id]/segments/route.ts +191 -0
- package/src/modules/staff/api/timesheets/time-entries/[id]/timer-start/route.ts +168 -0
- package/src/modules/staff/api/timesheets/time-entries/[id]/timer-stop/route.ts +191 -0
- package/src/modules/staff/api/timesheets/time-entries/bulk/route.ts +292 -0
- package/src/modules/staff/api/timesheets/time-entries/route.ts +193 -0
- package/src/modules/staff/api/timesheets/time-projects/[id]/employees/route.ts +167 -0
- package/src/modules/staff/api/timesheets/time-projects/route.ts +244 -0
- package/src/modules/staff/backend/staff/timesheets/page.meta.ts +20 -0
- package/src/modules/staff/backend/staff/timesheets/page.tsx +899 -0
- package/src/modules/staff/backend/staff/timesheets/projects/[id]/edit/page.meta.ts +12 -0
- package/src/modules/staff/backend/staff/timesheets/projects/[id]/edit/page.tsx +141 -0
- package/src/modules/staff/backend/staff/timesheets/projects/[id]/page.meta.ts +12 -0
- package/src/modules/staff/backend/staff/timesheets/projects/[id]/page.tsx +579 -0
- package/src/modules/staff/backend/staff/timesheets/projects/create/page.meta.ts +12 -0
- package/src/modules/staff/backend/staff/timesheets/projects/create/page.tsx +90 -0
- package/src/modules/staff/backend/staff/timesheets/projects/page.meta.ts +23 -0
- package/src/modules/staff/backend/staff/timesheets/projects/page.tsx +765 -0
- package/src/modules/staff/backend/staff/timesheets/projects/projectFormConfig.ts +138 -0
- package/src/modules/staff/cli.ts +40 -1
- package/src/modules/staff/commands/index.ts +2 -0
- package/src/modules/staff/commands/leave-requests.ts +37 -29
- package/src/modules/staff/commands/team-members.ts +25 -20
- package/src/modules/staff/commands/timesheets-entries.ts +504 -0
- package/src/modules/staff/commands/timesheets-projects.ts +699 -0
- package/src/modules/staff/data/enrichers.ts +134 -0
- package/src/modules/staff/data/entities.ts +198 -0
- package/src/modules/staff/data/validators.ts +129 -0
- package/src/modules/staff/events.ts +13 -0
- package/src/modules/staff/i18n/de.json +209 -1
- package/src/modules/staff/i18n/en.json +209 -1
- package/src/modules/staff/i18n/es.json +209 -1
- package/src/modules/staff/i18n/pl.json +209 -1
- package/src/modules/staff/lib/crud.ts +8 -0
- package/src/modules/staff/lib/staffMemberResolver.ts +22 -0
- package/src/modules/staff/lib/timesheets-projects/computeProjectHoursTrend.ts +89 -0
- package/src/modules/staff/lib/timesheets-projects/computeProjectsKpis.ts +311 -0
- package/src/modules/staff/lib/timesheets-projects/dateBuckets.ts +37 -0
- package/src/modules/staff/lib/timesheets-projects/initials.ts +6 -0
- package/src/modules/staff/lib/timesheets-projects/kpiMath.ts +8 -0
- package/src/modules/staff/lib/timesheets-projects/listProjectMembersPreview.ts +83 -0
- package/src/modules/staff/lib/timesheets-projects-ui/HoursSparkline.tsx +75 -0
- package/src/modules/staff/lib/timesheets-projects-ui/ProjectCard.tsx +110 -0
- package/src/modules/staff/lib/timesheets-projects-ui/ProjectMembersAvatarStack.tsx +73 -0
- package/src/modules/staff/lib/timesheets-projects-ui/ProjectsKpiStrip.tsx +185 -0
- package/src/modules/staff/lib/timesheets-projects-ui/SavedViewTabs.tsx +53 -0
- package/src/modules/staff/lib/timesheets-projects-ui/ViewModeToggle.tsx +63 -0
- package/src/modules/staff/lib/timesheets-projects-ui/useProjectsViewMode.ts +63 -0
- package/src/modules/staff/lib/timesheets-ui/AddRowDropdown.tsx +188 -0
- package/src/modules/staff/lib/timesheets-ui/CalendarPicker.tsx +229 -0
- package/src/modules/staff/lib/timesheets-ui/ColorPicker.tsx +65 -0
- package/src/modules/staff/lib/timesheets-ui/CreateProjectDialog.tsx +99 -0
- package/src/modules/staff/lib/timesheets-ui/ListView.tsx +230 -0
- package/src/modules/staff/lib/timesheets-ui/ProjectColorDot.tsx +40 -0
- package/src/modules/staff/lib/timesheets-ui/TimerBar.tsx +327 -0
- package/src/modules/staff/lib/timesheets-ui/ViewSwitcher.tsx +60 -0
- package/src/modules/staff/lib/timesheets-ui/colors.ts +58 -0
- package/src/modules/staff/migrations/.snapshot-open-mercato.json +1148 -0
- package/src/modules/staff/migrations/Migration20260326135612.ts +26 -0
- package/src/modules/staff/migrations/Migration20260413102715.ts +25 -0
- package/src/modules/staff/migrations/Migration20260413111602.ts +13 -0
- package/src/modules/staff/migrations/Migration20260511112759.ts +21 -0
- package/src/modules/staff/search.ts +35 -0
- package/src/modules/staff/setup.ts +15 -0
- package/src/modules/staff/widgets/dashboard/timesheets-hours-by-project/config.ts +17 -0
- package/src/modules/staff/widgets/dashboard/timesheets-hours-by-project/widget.client.tsx +158 -0
- package/src/modules/staff/widgets/dashboard/timesheets-hours-by-project/widget.ts +25 -0
- package/src/modules/staff/widgets/dashboard/timesheets-time-reporting/config.ts +15 -0
- package/src/modules/staff/widgets/dashboard/timesheets-time-reporting/widget.client.tsx +297 -0
- package/src/modules/staff/widgets/dashboard/timesheets-time-reporting/widget.ts +25 -0
- package/src/modules/staff/widgets/injection/timer-sidebar-indicator/widget.tsx +161 -0
- package/src/modules/staff/widgets/injection-table.ts +10 -0
- package/src/modules/sync_excel/api/import/route.ts +23 -18
- package/src/modules/translations/commands/translations.ts +49 -41
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { z } from 'zod'
|
|
3
|
+
import type { CrudField, CrudFormGroup } from '@open-mercato/ui/backend/CrudForm'
|
|
4
|
+
import type { TranslateFn } from '@open-mercato/shared/lib/i18n/context'
|
|
5
|
+
import { ColorPicker } from '../../../../lib/timesheets-ui/ColorPicker'
|
|
6
|
+
import { PROJECT_COLOR_KEYS } from '../../../../lib/timesheets-ui/colors'
|
|
7
|
+
|
|
8
|
+
export type ProjectFormValues = {
|
|
9
|
+
id?: string
|
|
10
|
+
name: string
|
|
11
|
+
code: string
|
|
12
|
+
description?: string | null
|
|
13
|
+
projectType?: string | null
|
|
14
|
+
color?: string | null
|
|
15
|
+
startDate?: string | null
|
|
16
|
+
costCenter?: string | null
|
|
17
|
+
status?: string
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function createProjectFormSchema() {
|
|
21
|
+
return z.object({
|
|
22
|
+
name: z.string().min(1),
|
|
23
|
+
code: z.string().min(1).max(50).regex(/^[a-zA-Z0-9-]+$/),
|
|
24
|
+
description: z.string().max(2000).optional().nullable(),
|
|
25
|
+
projectType: z.string().max(100).optional().nullable(),
|
|
26
|
+
color: z
|
|
27
|
+
.string()
|
|
28
|
+
.refine(
|
|
29
|
+
(value) => (PROJECT_COLOR_KEYS as readonly string[]).includes(value),
|
|
30
|
+
{ message: 'Invalid project color key.' },
|
|
31
|
+
)
|
|
32
|
+
.optional()
|
|
33
|
+
.nullable(),
|
|
34
|
+
startDate: z.string().optional().nullable(),
|
|
35
|
+
costCenter: z.string().max(100).optional().nullable(),
|
|
36
|
+
status: z.enum(['active', 'on_hold', 'completed']).optional(),
|
|
37
|
+
})
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function createProjectFormFields(t: TranslateFn): CrudField[] {
|
|
41
|
+
return [
|
|
42
|
+
{
|
|
43
|
+
id: 'name',
|
|
44
|
+
type: 'text',
|
|
45
|
+
label: t('staff.timesheets.projects.form.name', 'Name'),
|
|
46
|
+
placeholder: t('staff.timesheets.projects.form.namePlaceholder', 'Project name'),
|
|
47
|
+
required: true,
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
id: 'code',
|
|
51
|
+
type: 'text',
|
|
52
|
+
label: t('staff.timesheets.projects.form.code', 'Code'),
|
|
53
|
+
placeholder: t('staff.timesheets.projects.form.codePlaceholder', 'PROJECT-001'),
|
|
54
|
+
required: true,
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: 'status',
|
|
58
|
+
type: 'select',
|
|
59
|
+
label: t('staff.timesheets.projects.form.status', 'Status'),
|
|
60
|
+
options: [
|
|
61
|
+
{ value: 'active', label: t('staff.timesheets.projects.statuses.active', 'Active') },
|
|
62
|
+
{ value: 'on_hold', label: t('staff.timesheets.projects.statuses.onHold', 'On Hold') },
|
|
63
|
+
{ value: 'completed', label: t('staff.timesheets.projects.statuses.completed', 'Completed') },
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
id: 'description',
|
|
68
|
+
type: 'textarea',
|
|
69
|
+
label: t('staff.timesheets.projects.form.description', 'Description'),
|
|
70
|
+
placeholder: t('staff.timesheets.projects.form.descriptionPlaceholder', 'Project description'),
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: 'projectType',
|
|
74
|
+
type: 'text',
|
|
75
|
+
label: t('staff.timesheets.projects.form.projectType', 'Project type'),
|
|
76
|
+
placeholder: t('staff.timesheets.projects.form.projectTypePlaceholder', 'e.g. Internal, Client, R&D'),
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: 'color',
|
|
80
|
+
type: 'custom',
|
|
81
|
+
label: t('staff.timesheets.projects.form.color', 'Project color'),
|
|
82
|
+
component: ({ value, setValue }) => {
|
|
83
|
+
const current = typeof value === 'string' ? value : null
|
|
84
|
+
return React.createElement(ColorPicker, {
|
|
85
|
+
value: current,
|
|
86
|
+
onChange: (next: string | null) => setValue(next),
|
|
87
|
+
resetLabel: t('staff.timesheets.projects.form.colorAuto', 'Auto'),
|
|
88
|
+
})
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
id: 'startDate',
|
|
93
|
+
type: 'date',
|
|
94
|
+
label: t('staff.timesheets.projects.form.startDate', 'Start date'),
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
id: 'costCenter',
|
|
98
|
+
type: 'text',
|
|
99
|
+
label: t('staff.timesheets.projects.form.costCenter', 'Cost center'),
|
|
100
|
+
placeholder: t('staff.timesheets.projects.form.costCenterPlaceholder', 'Cost center code'),
|
|
101
|
+
},
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function createProjectFormGroups(t: TranslateFn): CrudFormGroup[] {
|
|
106
|
+
return [
|
|
107
|
+
{
|
|
108
|
+
id: 'main',
|
|
109
|
+
title: t('staff.timesheets.projects.form.groupMain', 'Project Details'),
|
|
110
|
+
fields: ['name', 'code', 'status', 'color', 'projectType', 'startDate'],
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
id: 'details',
|
|
114
|
+
title: t('staff.timesheets.projects.form.groupDetails', 'Additional Information'),
|
|
115
|
+
fields: ['description', 'costCenter'],
|
|
116
|
+
},
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function buildProjectPayload(values: ProjectFormValues): Record<string, unknown> {
|
|
121
|
+
const payload: Record<string, unknown> = {
|
|
122
|
+
name: values.name.trim(),
|
|
123
|
+
code: values.code.trim(),
|
|
124
|
+
}
|
|
125
|
+
if (values.id) payload.id = values.id
|
|
126
|
+
if (values.description?.trim()) payload.description = values.description.trim()
|
|
127
|
+
else payload.description = null
|
|
128
|
+
if (values.projectType?.trim()) payload.projectType = values.projectType.trim()
|
|
129
|
+
else payload.projectType = null
|
|
130
|
+
if (values.color?.trim()) payload.color = values.color.trim()
|
|
131
|
+
else payload.color = null
|
|
132
|
+
if (values.startDate) payload.startDate = values.startDate
|
|
133
|
+
else payload.startDate = null
|
|
134
|
+
if (values.costCenter?.trim()) payload.costCenter = values.costCenter.trim()
|
|
135
|
+
else payload.costCenter = null
|
|
136
|
+
if (values.status) payload.status = values.status
|
|
137
|
+
return payload
|
|
138
|
+
}
|
package/src/modules/staff/cli.ts
CHANGED
|
@@ -2,6 +2,12 @@ import type { ModuleCli } from '@open-mercato/shared/modules/registry'
|
|
|
2
2
|
import { createRequestContainer } from '@open-mercato/shared/lib/di/container'
|
|
3
3
|
import type { EntityManager } from '@mikro-orm/postgresql'
|
|
4
4
|
import { seedStaffActivityTypes, seedStaffAddressTypes, seedStaffTeamExamples, type StaffSeedScope } from './lib/seeds'
|
|
5
|
+
import { appendWidgetsToRoles } from '@open-mercato/core/modules/dashboards/lib/role-widgets'
|
|
6
|
+
|
|
7
|
+
const TIMESHEETS_DASHBOARD_WIDGET_IDS = [
|
|
8
|
+
'staff.timesheets.timeReporting',
|
|
9
|
+
'staff.timesheets.hoursByProject',
|
|
10
|
+
]
|
|
5
11
|
|
|
6
12
|
function parseArgs(rest: string[]) {
|
|
7
13
|
const args: Record<string, string> = {}
|
|
@@ -101,4 +107,37 @@ const seedAddressTypesCommand: ModuleCli = {
|
|
|
101
107
|
},
|
|
102
108
|
}
|
|
103
109
|
|
|
104
|
-
|
|
110
|
+
const seedTimesheetsWidgetsCommand: ModuleCli = {
|
|
111
|
+
command: 'seed-timesheets-widgets',
|
|
112
|
+
async run(rest) {
|
|
113
|
+
const args = parseArgs(rest)
|
|
114
|
+
const tenantId = String(args.tenantId ?? args.tenant ?? '')
|
|
115
|
+
const organizationId = String(args.organizationId ?? args.org ?? args.orgId ?? '')
|
|
116
|
+
if (!tenantId || !organizationId) {
|
|
117
|
+
console.error('Usage: mercato staff seed-timesheets-widgets --tenant <tenantId> --org <organizationId>')
|
|
118
|
+
console.error('Backfills timesheets dashboard widgets (timeReporting, hoursByProject) to existing tenant roles.')
|
|
119
|
+
process.exit(1)
|
|
120
|
+
return
|
|
121
|
+
}
|
|
122
|
+
const container = await createRequestContainer()
|
|
123
|
+
try {
|
|
124
|
+
const em = container.resolve<EntityManager>('em')
|
|
125
|
+
await em.transactional(async (tem) => {
|
|
126
|
+
await appendWidgetsToRoles(tem, {
|
|
127
|
+
tenantId,
|
|
128
|
+
organizationId,
|
|
129
|
+
roleNames: ['superadmin', 'admin', 'employee'],
|
|
130
|
+
widgetIds: TIMESHEETS_DASHBOARD_WIDGET_IDS,
|
|
131
|
+
})
|
|
132
|
+
})
|
|
133
|
+
console.log('📊 Timesheets dashboard widgets seeded for organization', organizationId)
|
|
134
|
+
} finally {
|
|
135
|
+
const disposable = container as unknown as { dispose?: () => Promise<void> }
|
|
136
|
+
if (typeof disposable.dispose === 'function') {
|
|
137
|
+
await disposable.dispose()
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export default [seedActivityTypesCommand, seedAddressTypesCommand, seedExamplesCommand, seedTimesheetsWidgetsCommand]
|
|
@@ -5,6 +5,7 @@ import type { EntityManager } from '@mikro-orm/postgresql'
|
|
|
5
5
|
import { CrudHttpError } from '@open-mercato/shared/lib/crud/errors'
|
|
6
6
|
import { resolveTranslations } from '@open-mercato/shared/lib/i18n/server'
|
|
7
7
|
import { emitCrudSideEffects, emitCrudUndoSideEffects, buildChanges } from '@open-mercato/shared/lib/commands/helpers'
|
|
8
|
+
import { withAtomicFlush } from '@open-mercato/shared/lib/commands/flush'
|
|
8
9
|
import type { CrudIndexerConfig } from '@open-mercato/shared/lib/crud/types'
|
|
9
10
|
import type { DataEngine } from '@open-mercato/shared/lib/data/engine'
|
|
10
11
|
import { invalidateCrudCache } from '@open-mercato/shared/lib/crud/cache'
|
|
@@ -694,12 +695,30 @@ const acceptLeaveRequestCommand: CommandHandler<StaffLeaveRequestDecisionInput,
|
|
|
694
695
|
const em = (ctx.container.resolve('em') as EntityManager).fork()
|
|
695
696
|
const request = await em.findOne(StaffLeaveRequest, { id: before.id })
|
|
696
697
|
if (!request) return
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
request
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
698
|
+
|
|
699
|
+
// Fetch rules before mutating so the query cannot reset unit-of-work tracking
|
|
700
|
+
// between the request scalar mutations and the flush (SPEC-018 Problem 1).
|
|
701
|
+
const rules = availabilityRuleIds.length
|
|
702
|
+
? await em.find(PlannerAvailabilityRule, { id: { $in: availabilityRuleIds } })
|
|
703
|
+
: []
|
|
704
|
+
|
|
705
|
+
await withAtomicFlush(em, [
|
|
706
|
+
() => {
|
|
707
|
+
request.status = before.status
|
|
708
|
+
request.decisionComment = before.decisionComment
|
|
709
|
+
request.decidedByUserId = before.decidedByUserId
|
|
710
|
+
request.decidedAt = before.decidedAt ? new Date(before.decidedAt) : null
|
|
711
|
+
request.updatedAt = new Date()
|
|
712
|
+
|
|
713
|
+
if (rules.length) {
|
|
714
|
+
const now = new Date()
|
|
715
|
+
rules.forEach((rule) => {
|
|
716
|
+
rule.deletedAt = now
|
|
717
|
+
rule.updatedAt = now
|
|
718
|
+
})
|
|
719
|
+
}
|
|
720
|
+
},
|
|
721
|
+
], { transaction: true })
|
|
703
722
|
|
|
704
723
|
const de = (ctx.container.resolve('dataEngine') as DataEngine)
|
|
705
724
|
await emitCrudUndoSideEffects({
|
|
@@ -715,30 +734,19 @@ const acceptLeaveRequestCommand: CommandHandler<StaffLeaveRequestDecisionInput,
|
|
|
715
734
|
indexer: leaveRequestCrudIndexer,
|
|
716
735
|
})
|
|
717
736
|
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
rule
|
|
723
|
-
|
|
737
|
+
for (const rule of rules) {
|
|
738
|
+
await emitCrudUndoSideEffects({
|
|
739
|
+
dataEngine: de,
|
|
740
|
+
action: 'deleted',
|
|
741
|
+
entity: rule,
|
|
742
|
+
identifiers: {
|
|
743
|
+
id: rule.id,
|
|
744
|
+
organizationId: rule.organizationId,
|
|
745
|
+
tenantId: rule.tenantId,
|
|
746
|
+
},
|
|
747
|
+
events: plannerAvailabilityRuleCrudEvents,
|
|
748
|
+
indexer: availabilityRuleCrudIndexer,
|
|
724
749
|
})
|
|
725
|
-
await em.flush()
|
|
726
|
-
|
|
727
|
-
const de = (ctx.container.resolve('dataEngine') as DataEngine)
|
|
728
|
-
for (const rule of rules) {
|
|
729
|
-
await emitCrudUndoSideEffects({
|
|
730
|
-
dataEngine: de,
|
|
731
|
-
action: 'deleted',
|
|
732
|
-
entity: rule,
|
|
733
|
-
identifiers: {
|
|
734
|
-
id: rule.id,
|
|
735
|
-
organizationId: rule.organizationId,
|
|
736
|
-
tenantId: rule.tenantId,
|
|
737
|
-
},
|
|
738
|
-
events: plannerAvailabilityRuleCrudEvents,
|
|
739
|
-
indexer: availabilityRuleCrudIndexer,
|
|
740
|
-
})
|
|
741
|
-
}
|
|
742
750
|
}
|
|
743
751
|
await invalidateAvailabilityCache({
|
|
744
752
|
container: ctx.container,
|
|
@@ -6,6 +6,7 @@ import { resolveTranslations } from '@open-mercato/shared/lib/i18n/server'
|
|
|
6
6
|
import { findOneWithDecryption, findWithDecryption } from '@open-mercato/shared/lib/encryption/find'
|
|
7
7
|
import { buildChanges, emitCrudSideEffects, emitCrudUndoSideEffects, parseWithCustomFields, setCustomFieldsIfAny } from '@open-mercato/shared/lib/commands/helpers'
|
|
8
8
|
import { buildCustomFieldResetMap, diffCustomFieldChanges, loadCustomFieldSnapshot, type CustomFieldSnapshot } from '@open-mercato/shared/lib/commands/customFieldSnapshots'
|
|
9
|
+
import { withAtomicFlush } from '@open-mercato/shared/lib/commands/flush'
|
|
9
10
|
import type { DataEngine } from '@open-mercato/shared/lib/data/engine'
|
|
10
11
|
import type { CrudIndexerConfig } from '@open-mercato/shared/lib/crud/types'
|
|
11
12
|
import { User } from '@open-mercato/core/modules/auth/data/entities'
|
|
@@ -270,30 +271,34 @@ const updateTeamMemberCommand: CommandHandler<StaffTeamMemberUpdateInput, { memb
|
|
|
270
271
|
ensureTenantScope(ctx, member.tenantId)
|
|
271
272
|
ensureOrganizationScope(ctx, member.organizationId)
|
|
272
273
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
274
|
+
// Resolve validation queries BEFORE mutating scalars: `ensure*` runs `em.find`,
|
|
275
|
+
// which would otherwise reset unit-of-work tracking between mutations and the
|
|
276
|
+
// flush and silently drop earlier scalar changes (SPEC-018 Problem 1).
|
|
277
|
+
if (parsed.userId !== undefined && parsed.userId) {
|
|
278
|
+
await ensureUserExists(em, parsed.userId, member.tenantId, member.organizationId)
|
|
278
279
|
}
|
|
279
|
-
if (parsed.teamId !== undefined) {
|
|
280
|
-
|
|
281
|
-
await ensureTeamExists(em, parsed.teamId, member.tenantId, member.organizationId)
|
|
282
|
-
}
|
|
283
|
-
member.teamId = parsed.teamId ?? null
|
|
280
|
+
if (parsed.teamId !== undefined && parsed.teamId) {
|
|
281
|
+
await ensureTeamExists(em, parsed.teamId, member.tenantId, member.organizationId)
|
|
284
282
|
}
|
|
283
|
+
let nextRoleIds: string[] | undefined
|
|
285
284
|
if (parsed.roleIds !== undefined) {
|
|
286
|
-
|
|
287
|
-
await ensureRolesExist(em,
|
|
288
|
-
member.roleIds = roleIds
|
|
285
|
+
nextRoleIds = normalizeStringList(parsed.roleIds)
|
|
286
|
+
await ensureRolesExist(em, nextRoleIds, member.tenantId, member.organizationId)
|
|
289
287
|
}
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
288
|
+
|
|
289
|
+
await withAtomicFlush(em, [
|
|
290
|
+
() => {
|
|
291
|
+
if (parsed.userId !== undefined) member.userId = parsed.userId ?? null
|
|
292
|
+
if (parsed.teamId !== undefined) member.teamId = parsed.teamId ?? null
|
|
293
|
+
if (parsed.roleIds !== undefined) member.roleIds = nextRoleIds ?? []
|
|
294
|
+
if (parsed.tags !== undefined) member.tags = normalizeStringList(parsed.tags)
|
|
295
|
+
if (parsed.availabilityRuleSetId !== undefined) member.availabilityRuleSetId = parsed.availabilityRuleSetId ?? null
|
|
296
|
+
if (parsed.displayName !== undefined) member.displayName = parsed.displayName
|
|
297
|
+
if (parsed.description !== undefined) member.description = parsed.description ?? null
|
|
298
|
+
if (parsed.isActive !== undefined) member.isActive = parsed.isActive
|
|
299
|
+
member.updatedAt = new Date()
|
|
300
|
+
},
|
|
301
|
+
], { transaction: true })
|
|
297
302
|
|
|
298
303
|
const de = (ctx.container.resolve('dataEngine') as DataEngine)
|
|
299
304
|
await setCustomFieldsIfAny({
|