@open-mercato/core 0.5.1-develop.2663.2c29774b5b → 0.5.1-develop.2681.c559bb2bc3
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 +1 -1
- package/dist/generated/entities/action_log/index.js +8 -0
- package/dist/generated/entities/action_log/index.js.map +2 -2
- package/dist/generated/entities/customer_company_billing/index.js +23 -0
- package/dist/generated/entities/customer_company_billing/index.js.map +7 -0
- package/dist/generated/entities/customer_deal/index.js +8 -0
- package/dist/generated/entities/customer_deal/index.js.map +2 -2
- package/dist/generated/entities/customer_deal_stage_transition/index.js +31 -0
- package/dist/generated/entities/customer_deal_stage_transition/index.js.map +7 -0
- package/dist/generated/entities/customer_dictionary_kind_setting/index.js +21 -0
- package/dist/generated/entities/customer_dictionary_kind_setting/index.js.map +7 -0
- package/dist/generated/entities/customer_entity/index.js +8 -0
- package/dist/generated/entities/customer_entity/index.js.map +2 -2
- package/dist/generated/entities/customer_entity_role/index.js +23 -0
- package/dist/generated/entities/customer_entity_role/index.js.map +7 -0
- package/dist/generated/entities/customer_interaction/index.js +23 -1
- package/dist/generated/entities/customer_interaction/index.js.map +2 -2
- package/dist/generated/entities/customer_label/index.js +19 -0
- package/dist/generated/entities/customer_label/index.js.map +7 -0
- package/dist/generated/entities/customer_label_assignment/index.js +17 -0
- package/dist/generated/entities/customer_label_assignment/index.js.map +7 -0
- package/dist/generated/entities/customer_person_company_link/index.js +21 -0
- package/dist/generated/entities/customer_person_company_link/index.js.map +7 -0
- package/dist/generated/entities/customer_person_company_role/index.js +17 -0
- package/dist/generated/entities/customer_person_company_role/index.js.map +7 -0
- package/dist/generated/entities/dictionary_entry/index.js +4 -0
- package/dist/generated/entities/dictionary_entry/index.js.map +2 -2
- package/dist/generated/entities.ids.generated.js +9 -1
- package/dist/generated/entities.ids.generated.js.map +2 -2
- package/dist/generated/entity-fields-registry.js +116 -1
- package/dist/generated/entity-fields-registry.js.map +2 -2
- package/dist/modules/attachments/api/route.js +46 -8
- package/dist/modules/attachments/api/route.js.map +2 -2
- package/dist/modules/audit_logs/api/audit-logs/actions/export/route.js +208 -0
- package/dist/modules/audit_logs/api/audit-logs/actions/export/route.js.map +7 -0
- package/dist/modules/audit_logs/api/audit-logs/actions/route.js +52 -6
- package/dist/modules/audit_logs/api/audit-logs/actions/route.js.map +2 -2
- package/dist/modules/audit_logs/cli.js +62 -0
- package/dist/modules/audit_logs/cli.js.map +7 -0
- package/dist/modules/audit_logs/data/entities.js +21 -1
- package/dist/modules/audit_logs/data/entities.js.map +2 -2
- package/dist/modules/audit_logs/data/validators.js +9 -1
- package/dist/modules/audit_logs/data/validators.js.map +2 -2
- package/dist/modules/audit_logs/lib/changeRows.js +34 -0
- package/dist/modules/audit_logs/lib/changeRows.js.map +7 -0
- package/dist/modules/audit_logs/lib/display-helpers.js +2 -20
- package/dist/modules/audit_logs/lib/display-helpers.js.map +3 -3
- package/dist/modules/audit_logs/lib/projections.js +58 -0
- package/dist/modules/audit_logs/lib/projections.js.map +7 -0
- package/dist/modules/audit_logs/migrations/Migration20260412160533.js +21 -0
- package/dist/modules/audit_logs/migrations/Migration20260412160533.js.map +7 -0
- package/dist/modules/audit_logs/services/actionLogService.js +313 -79
- package/dist/modules/audit_logs/services/actionLogService.js.map +2 -2
- package/dist/modules/customers/acl.js +3 -1
- package/dist/modules/customers/acl.js.map +2 -2
- package/dist/modules/customers/api/activities/route.js +4 -0
- package/dist/modules/customers/api/activities/route.js.map +2 -2
- package/dist/modules/customers/api/assignable-staff/route.js +208 -0
- package/dist/modules/customers/api/assignable-staff/route.js.map +7 -0
- package/dist/modules/customers/api/companies/[id]/people/route.js +205 -0
- package/dist/modules/customers/api/companies/[id]/people/route.js.map +7 -0
- package/dist/modules/customers/api/companies/[id]/roles/route.js +22 -0
- package/dist/modules/customers/api/companies/[id]/roles/route.js.map +7 -0
- package/dist/modules/customers/api/companies/[id]/route.js +374 -32
- package/dist/modules/customers/api/companies/[id]/route.js.map +2 -2
- package/dist/modules/customers/api/companies/route.js +82 -7
- package/dist/modules/customers/api/companies/route.js.map +2 -2
- package/dist/modules/customers/api/deals/[id]/companies/route.js +172 -0
- package/dist/modules/customers/api/deals/[id]/companies/route.js.map +7 -0
- package/dist/modules/customers/api/deals/[id]/people/route.js +156 -0
- package/dist/modules/customers/api/deals/[id]/people/route.js.map +7 -0
- package/dist/modules/customers/api/deals/[id]/route.js +459 -53
- package/dist/modules/customers/api/deals/[id]/route.js.map +2 -2
- package/dist/modules/customers/api/deals/[id]/stats/route.js +195 -0
- package/dist/modules/customers/api/deals/[id]/stats/route.js.map +7 -0
- package/dist/modules/customers/api/deals/route.js +20 -10
- package/dist/modules/customers/api/deals/route.js.map +3 -3
- package/dist/modules/customers/api/dictionaries/[kind]/[id]/route.js +105 -4
- package/dist/modules/customers/api/dictionaries/[kind]/[id]/route.js.map +2 -2
- package/dist/modules/customers/api/dictionaries/[kind]/route.js +118 -42
- package/dist/modules/customers/api/dictionaries/[kind]/route.js.map +2 -2
- package/dist/modules/customers/api/dictionaries/context.js +30 -6
- package/dist/modules/customers/api/dictionaries/context.js.map +2 -2
- package/dist/modules/customers/api/dictionaries/kind-settings/route.js +207 -0
- package/dist/modules/customers/api/dictionaries/kind-settings/route.js.map +7 -0
- package/dist/modules/customers/api/entity-roles-factory.js +471 -0
- package/dist/modules/customers/api/entity-roles-factory.js.map +7 -0
- package/dist/modules/customers/api/interactions/conflicts/route.js +158 -0
- package/dist/modules/customers/api/interactions/conflicts/route.js.map +7 -0
- package/dist/modules/customers/api/interactions/counts/route.js +92 -0
- package/dist/modules/customers/api/interactions/counts/route.js.map +7 -0
- package/dist/modules/customers/api/interactions/route.js +83 -4
- package/dist/modules/customers/api/interactions/route.js.map +2 -2
- package/dist/modules/customers/api/labels/assign/route.js +189 -0
- package/dist/modules/customers/api/labels/assign/route.js.map +7 -0
- package/dist/modules/customers/api/labels/auth.js +17 -0
- package/dist/modules/customers/api/labels/auth.js.map +7 -0
- package/dist/modules/customers/api/labels/route.js +281 -0
- package/dist/modules/customers/api/labels/route.js.map +7 -0
- package/dist/modules/customers/api/labels/table-errors.js +38 -0
- package/dist/modules/customers/api/labels/table-errors.js.map +7 -0
- package/dist/modules/customers/api/labels/unassign/route.js +184 -0
- package/dist/modules/customers/api/labels/unassign/route.js.map +7 -0
- package/dist/modules/customers/api/people/[id]/companies/[linkId]/route.js +292 -0
- package/dist/modules/customers/api/people/[id]/companies/[linkId]/route.js.map +7 -0
- package/dist/modules/customers/api/people/[id]/companies/context.js +66 -0
- package/dist/modules/customers/api/people/[id]/companies/context.js.map +7 -0
- package/dist/modules/customers/api/people/[id]/companies/enriched/route.js +334 -0
- package/dist/modules/customers/api/people/[id]/companies/enriched/route.js.map +7 -0
- package/dist/modules/customers/api/people/[id]/companies/route.js +205 -0
- package/dist/modules/customers/api/people/[id]/companies/route.js.map +7 -0
- package/dist/modules/customers/api/people/[id]/roles/route.js +22 -0
- package/dist/modules/customers/api/people/[id]/roles/route.js.map +7 -0
- package/dist/modules/customers/api/people/[id]/route.js +134 -21
- package/dist/modules/customers/api/people/[id]/route.js.map +2 -2
- package/dist/modules/customers/api/people/route.js +122 -23
- package/dist/modules/customers/api/people/route.js.map +2 -2
- package/dist/modules/customers/api/todos/route.js +4 -0
- package/dist/modules/customers/api/todos/route.js.map +2 -2
- package/dist/modules/customers/api/utils.js +22 -0
- package/dist/modules/customers/api/utils.js.map +2 -2
- package/dist/modules/customers/backend/config/customers/page.js +2 -6
- package/dist/modules/customers/backend/config/customers/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/companies/page.js +37 -26
- package/dist/modules/customers/backend/customers/companies/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/companies-v2/[id]/page.js +265 -262
- package/dist/modules/customers/backend/customers/companies-v2/[id]/page.js.map +3 -3
- package/dist/modules/customers/backend/customers/deals/[id]/hooks/formatters.js +23 -0
- package/dist/modules/customers/backend/customers/deals/[id]/hooks/formatters.js.map +7 -0
- package/dist/modules/customers/backend/customers/deals/[id]/hooks/types.js +1 -0
- package/dist/modules/customers/backend/customers/deals/[id]/hooks/types.js.map +7 -0
- package/dist/modules/customers/backend/customers/deals/[id]/hooks/useDealActivities.js +43 -0
- package/dist/modules/customers/backend/customers/deals/[id]/hooks/useDealActivities.js.map +7 -0
- package/dist/modules/customers/backend/customers/deals/[id]/hooks/useDealAssociations.js +264 -0
- package/dist/modules/customers/backend/customers/deals/[id]/hooks/useDealAssociations.js.map +7 -0
- package/dist/modules/customers/backend/customers/deals/[id]/hooks/useDealClosure.js +88 -0
- package/dist/modules/customers/backend/customers/deals/[id]/hooks/useDealClosure.js.map +7 -0
- package/dist/modules/customers/backend/customers/deals/[id]/hooks/useDealData.js +41 -0
- package/dist/modules/customers/backend/customers/deals/[id]/hooks/useDealData.js.map +7 -0
- package/dist/modules/customers/backend/customers/deals/[id]/hooks/useDealFormHandlers.js +66 -0
- package/dist/modules/customers/backend/customers/deals/[id]/hooks/useDealFormHandlers.js.map +7 -0
- package/dist/modules/customers/backend/customers/deals/[id]/hooks/useDealInjectedTabs.js +39 -0
- package/dist/modules/customers/backend/customers/deals/[id]/hooks/useDealInjectedTabs.js.map +7 -0
- package/dist/modules/customers/backend/customers/deals/[id]/hooks/useDealMutationContext.js +49 -0
- package/dist/modules/customers/backend/customers/deals/[id]/hooks/useDealMutationContext.js.map +7 -0
- package/dist/modules/customers/backend/customers/deals/[id]/hooks/useDealPipeline.js +43 -0
- package/dist/modules/customers/backend/customers/deals/[id]/hooks/useDealPipeline.js.map +7 -0
- package/dist/modules/customers/backend/customers/deals/[id]/hooks/useScheduleDialog.js +28 -0
- package/dist/modules/customers/backend/customers/deals/[id]/hooks/useScheduleDialog.js.map +7 -0
- package/dist/modules/customers/backend/customers/deals/[id]/page.js +556 -503
- package/dist/modules/customers/backend/customers/deals/[id]/page.js.map +3 -3
- package/dist/modules/customers/backend/customers/deals/page.js +66 -21
- package/dist/modules/customers/backend/customers/deals/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/people/page.js +36 -28
- package/dist/modules/customers/backend/customers/people/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/people-v2/[id]/page.js +318 -203
- package/dist/modules/customers/backend/customers/people-v2/[id]/page.js.map +3 -3
- package/dist/modules/customers/cli.js +105 -13
- package/dist/modules/customers/cli.js.map +2 -2
- package/dist/modules/customers/commands/activities.js +6 -0
- package/dist/modules/customers/commands/activities.js.map +2 -2
- package/dist/modules/customers/commands/deals.js +315 -107
- package/dist/modules/customers/commands/deals.js.map +2 -2
- package/dist/modules/customers/commands/dictionaries.js +166 -32
- package/dist/modules/customers/commands/dictionaries.js.map +2 -2
- package/dist/modules/customers/commands/dictionaryKindSettings.js +208 -0
- package/dist/modules/customers/commands/dictionaryKindSettings.js.map +7 -0
- package/dist/modules/customers/commands/entity-roles.js +415 -0
- package/dist/modules/customers/commands/entity-roles.js.map +7 -0
- package/dist/modules/customers/commands/index.js +4 -0
- package/dist/modules/customers/commands/index.js.map +2 -2
- package/dist/modules/customers/commands/interactions.js +108 -21
- package/dist/modules/customers/commands/interactions.js.map +2 -2
- package/dist/modules/customers/commands/labels.js +539 -0
- package/dist/modules/customers/commands/labels.js.map +7 -0
- package/dist/modules/customers/commands/people.js +560 -463
- package/dist/modules/customers/commands/people.js.map +3 -3
- package/dist/modules/customers/commands/personCompanyLinks.js +568 -0
- package/dist/modules/customers/commands/personCompanyLinks.js.map +7 -0
- package/dist/modules/customers/commands/shared.js +12 -4
- package/dist/modules/customers/commands/shared.js.map +2 -2
- package/dist/modules/customers/commands/todos.js +10 -1
- package/dist/modules/customers/commands/todos.js.map +2 -2
- package/dist/modules/customers/components/AddressEditor.js +1 -1
- package/dist/modules/customers/components/AddressEditor.js.map +2 -2
- package/dist/modules/customers/components/CustomersConfigurationSections.js +31 -0
- package/dist/modules/customers/components/CustomersConfigurationSections.js.map +7 -0
- package/dist/modules/customers/components/DictionarySettings.js +37 -2
- package/dist/modules/customers/components/DictionarySettings.js.map +2 -2
- package/dist/modules/customers/components/detail/ActiveDealCard.js +121 -0
- package/dist/modules/customers/components/detail/ActiveDealCard.js.map +7 -0
- package/dist/modules/customers/components/detail/ActivitiesSection.js +222 -331
- package/dist/modules/customers/components/detail/ActivitiesSection.js.map +3 -3
- package/dist/modules/customers/components/detail/ActivityAiActions.js +36 -0
- package/dist/modules/customers/components/detail/ActivityAiActions.js.map +7 -0
- package/dist/modules/customers/components/detail/ActivityCard.js +126 -0
- package/dist/modules/customers/components/detail/ActivityCard.js.map +7 -0
- package/dist/modules/customers/components/detail/ActivityHistorySection.js +340 -0
- package/dist/modules/customers/components/detail/ActivityHistorySection.js.map +7 -0
- package/dist/modules/customers/components/detail/ActivityLogTab.js +56 -0
- package/dist/modules/customers/components/detail/ActivityLogTab.js.map +7 -0
- package/dist/modules/customers/components/detail/ActivityTimeline.js +108 -0
- package/dist/modules/customers/components/detail/ActivityTimeline.js.map +7 -0
- package/dist/modules/customers/components/detail/ActivityTimelineFilters.js +139 -0
- package/dist/modules/customers/components/detail/ActivityTimelineFilters.js.map +7 -0
- package/dist/modules/customers/components/detail/ActivityTypeSelector.js +42 -0
- package/dist/modules/customers/components/detail/ActivityTypeSelector.js.map +7 -0
- package/dist/modules/customers/components/detail/AiActionChips.js +38 -0
- package/dist/modules/customers/components/detail/AiActionChips.js.map +7 -0
- package/dist/modules/customers/components/detail/AssignRoleDialog.js +534 -0
- package/dist/modules/customers/components/detail/AssignRoleDialog.js.map +7 -0
- package/dist/modules/customers/components/detail/ChangelogEntryRow.js +79 -0
- package/dist/modules/customers/components/detail/ChangelogEntryRow.js.map +7 -0
- package/dist/modules/customers/components/detail/ChangelogFilters.js +176 -0
- package/dist/modules/customers/components/detail/ChangelogFilters.js.map +7 -0
- package/dist/modules/customers/components/detail/ChangelogKpiCards.js +88 -0
- package/dist/modules/customers/components/detail/ChangelogKpiCards.js.map +7 -0
- package/dist/modules/customers/components/detail/ChangelogTab.js +470 -0
- package/dist/modules/customers/components/detail/ChangelogTab.js.map +7 -0
- package/dist/modules/customers/components/detail/ComingSoonPlaceholder.js +16 -0
- package/dist/modules/customers/components/detail/ComingSoonPlaceholder.js.map +7 -0
- package/dist/modules/customers/components/detail/CompanyCard.js +283 -0
- package/dist/modules/customers/components/detail/CompanyCard.js.map +7 -0
- package/dist/modules/customers/components/detail/CompanyDashboardTab.js +133 -0
- package/dist/modules/customers/components/detail/CompanyDashboardTab.js.map +7 -0
- package/dist/modules/customers/components/detail/CompanyDetailHeader.js +191 -0
- package/dist/modules/customers/components/detail/CompanyDetailHeader.js.map +7 -0
- package/dist/modules/customers/components/detail/CompanyDetailTabs.js +123 -0
- package/dist/modules/customers/components/detail/CompanyDetailTabs.js.map +7 -0
- package/dist/modules/customers/components/detail/CompanyKpiBar.js +174 -0
- package/dist/modules/customers/components/detail/CompanyKpiBar.js.map +7 -0
- package/dist/modules/customers/components/detail/CompanyPeopleSection.js +514 -230
- package/dist/modules/customers/components/detail/CompanyPeopleSection.js.map +2 -2
- package/dist/modules/customers/components/detail/CompanyTagsDialog.js +22 -0
- package/dist/modules/customers/components/detail/CompanyTagsDialog.js.map +7 -0
- package/dist/modules/customers/components/detail/ConfirmDealLostDialog.js +159 -0
- package/dist/modules/customers/components/detail/ConfirmDealLostDialog.js.map +7 -0
- package/dist/modules/customers/components/detail/CreatePersonDialog.js +135 -0
- package/dist/modules/customers/components/detail/CreatePersonDialog.js.map +7 -0
- package/dist/modules/customers/components/detail/DealClosureActionBar.js +59 -0
- package/dist/modules/customers/components/detail/DealClosureActionBar.js.map +7 -0
- package/dist/modules/customers/components/detail/DealDetailHeader.js +237 -0
- package/dist/modules/customers/components/detail/DealDetailHeader.js.map +7 -0
- package/dist/modules/customers/components/detail/DealDetailTabs.js +109 -0
- package/dist/modules/customers/components/detail/DealDetailTabs.js.map +7 -0
- package/dist/modules/customers/components/detail/DealForm.js +219 -92
- package/dist/modules/customers/components/detail/DealForm.js.map +2 -2
- package/dist/modules/customers/components/detail/DealLinkedEntitiesTab.js +295 -0
- package/dist/modules/customers/components/detail/DealLinkedEntitiesTab.js.map +7 -0
- package/dist/modules/customers/components/detail/DealLostSummaryDialog.js +107 -0
- package/dist/modules/customers/components/detail/DealLostSummaryDialog.js.map +7 -0
- package/dist/modules/customers/components/detail/DealWonPopup.js +113 -0
- package/dist/modules/customers/components/detail/DealWonPopup.js.map +7 -0
- package/dist/modules/customers/components/detail/DealsSection.js +206 -193
- package/dist/modules/customers/components/detail/DealsSection.js.map +2 -2
- package/dist/modules/customers/components/detail/DecisionMakersFooter.js +39 -0
- package/dist/modules/customers/components/detail/DecisionMakersFooter.js.map +7 -0
- package/dist/modules/customers/components/detail/EntityTagsDialog.js +1096 -0
- package/dist/modules/customers/components/detail/EntityTagsDialog.js.map +7 -0
- package/dist/modules/customers/components/detail/InlineActivityComposer.js +197 -0
- package/dist/modules/customers/components/detail/InlineActivityComposer.js.map +7 -0
- package/dist/modules/customers/components/detail/ManageTagsDialog.js +1091 -0
- package/dist/modules/customers/components/detail/ManageTagsDialog.js.map +7 -0
- package/dist/modules/customers/components/detail/MiniWeekCalendar.js +272 -0
- package/dist/modules/customers/components/detail/MiniWeekCalendar.js.map +7 -0
- package/dist/modules/customers/components/detail/MobilePersonDetail.js +106 -0
- package/dist/modules/customers/components/detail/MobilePersonDetail.js.map +7 -0
- package/dist/modules/customers/components/detail/NextStepCard.js +72 -0
- package/dist/modules/customers/components/detail/NextStepCard.js.map +7 -0
- package/dist/modules/customers/components/detail/PersonCard.js +192 -0
- package/dist/modules/customers/components/detail/PersonCard.js.map +7 -0
- package/dist/modules/customers/components/detail/PersonCompaniesSection.js +345 -0
- package/dist/modules/customers/components/detail/PersonCompaniesSection.js.map +7 -0
- package/dist/modules/customers/components/detail/PersonDetailHeader.js +220 -0
- package/dist/modules/customers/components/detail/PersonDetailHeader.js.map +7 -0
- package/dist/modules/customers/components/detail/PersonDetailTabs.js +122 -0
- package/dist/modules/customers/components/detail/PersonDetailTabs.js.map +7 -0
- package/dist/modules/customers/components/detail/PersonTagsDialog.js +24 -0
- package/dist/modules/customers/components/detail/PersonTagsDialog.js.map +7 -0
- package/dist/modules/customers/components/detail/PipelineStepper.js +191 -0
- package/dist/modules/customers/components/detail/PipelineStepper.js.map +7 -0
- package/dist/modules/customers/components/detail/PlannedActivitiesSection.js +222 -0
- package/dist/modules/customers/components/detail/PlannedActivitiesSection.js.map +7 -0
- package/dist/modules/customers/components/detail/RelationshipHealthCard.js +49 -0
- package/dist/modules/customers/components/detail/RelationshipHealthCard.js.map +7 -0
- package/dist/modules/customers/components/detail/RoleAssignmentRow.js +189 -0
- package/dist/modules/customers/components/detail/RoleAssignmentRow.js.map +7 -0
- package/dist/modules/customers/components/detail/RolesSection.js +234 -0
- package/dist/modules/customers/components/detail/RolesSection.js.map +7 -0
- package/dist/modules/customers/components/detail/ScheduleActivityDialog.js +410 -0
- package/dist/modules/customers/components/detail/ScheduleActivityDialog.js.map +7 -0
- package/dist/modules/customers/components/detail/aiActionCatalog.js +41 -0
- package/dist/modules/customers/components/detail/aiActionCatalog.js.map +7 -0
- package/dist/modules/customers/components/detail/assignableStaff.js +48 -0
- package/dist/modules/customers/components/detail/assignableStaff.js.map +7 -0
- package/dist/modules/customers/components/detail/dashboard/ActiveDealWidget.js +48 -0
- package/dist/modules/customers/components/detail/dashboard/ActiveDealWidget.js.map +7 -0
- package/dist/modules/customers/components/detail/dashboard/OpenTasksWidget.js +86 -0
- package/dist/modules/customers/components/detail/dashboard/OpenTasksWidget.js.map +7 -0
- package/dist/modules/customers/components/detail/dashboard/RecentActivityWidget.js +53 -0
- package/dist/modules/customers/components/detail/dashboard/RecentActivityWidget.js.map +7 -0
- package/dist/modules/customers/components/detail/dashboard/RelationshipHealthWidget.js +30 -0
- package/dist/modules/customers/components/detail/dashboard/RelationshipHealthWidget.js.map +7 -0
- package/dist/modules/customers/components/detail/dashboard/UpcomingMeetingsWidget.js +43 -0
- package/dist/modules/customers/components/detail/dashboard/UpcomingMeetingsWidget.js.map +7 -0
- package/dist/modules/customers/components/detail/dashboard/helpers.js +71 -0
- package/dist/modules/customers/components/detail/dashboard/helpers.js.map +7 -0
- package/dist/modules/customers/components/detail/healthScoreUtils.js +69 -0
- package/dist/modules/customers/components/detail/healthScoreUtils.js.map +7 -0
- package/dist/modules/customers/components/detail/hooks/useCurrencyDictionary.js +5 -5
- package/dist/modules/customers/components/detail/hooks/useCurrencyDictionary.js.map +2 -2
- package/dist/modules/customers/components/detail/hooks/useCustomerDictionary.js +9 -8
- package/dist/modules/customers/components/detail/hooks/useCustomerDictionary.js.map +3 -3
- package/dist/modules/customers/components/detail/hooks/useInteractionMutations.js +65 -0
- package/dist/modules/customers/components/detail/hooks/useInteractionMutations.js.map +7 -0
- package/dist/modules/customers/components/detail/notesAdapter.js +70 -30
- package/dist/modules/customers/components/detail/notesAdapter.js.map +2 -2
- package/dist/modules/customers/components/detail/pipelineStageUtils.js +26 -0
- package/dist/modules/customers/components/detail/pipelineStageUtils.js.map +7 -0
- package/dist/modules/customers/components/detail/schedule/DateTimeFields.js +144 -0
- package/dist/modules/customers/components/detail/schedule/DateTimeFields.js.map +7 -0
- package/dist/modules/customers/components/detail/schedule/FooterFields.js +60 -0
- package/dist/modules/customers/components/detail/schedule/FooterFields.js.map +7 -0
- package/dist/modules/customers/components/detail/schedule/LinkedEntitiesField.js +216 -0
- package/dist/modules/customers/components/detail/schedule/LinkedEntitiesField.js.map +7 -0
- package/dist/modules/customers/components/detail/schedule/LocationField.js +34 -0
- package/dist/modules/customers/components/detail/schedule/LocationField.js.map +7 -0
- package/dist/modules/customers/components/detail/schedule/ParticipantsField.js +226 -0
- package/dist/modules/customers/components/detail/schedule/ParticipantsField.js.map +7 -0
- package/dist/modules/customers/components/detail/schedule/fieldConfig.js +69 -0
- package/dist/modules/customers/components/detail/schedule/fieldConfig.js.map +7 -0
- package/dist/modules/customers/components/detail/schedule/index.js +21 -0
- package/dist/modules/customers/components/detail/schedule/index.js.map +7 -0
- package/dist/modules/customers/components/detail/schedule/useScheduleFormState.js +172 -0
- package/dist/modules/customers/components/detail/schedule/useScheduleFormState.js.map +7 -0
- package/dist/modules/customers/components/detail/utils.js +23 -0
- package/dist/modules/customers/components/detail/utils.js.map +2 -2
- package/dist/modules/customers/components/formConfig.js +144 -22
- package/dist/modules/customers/components/formConfig.js.map +2 -2
- package/dist/modules/customers/components/linking/LinkEntityDialog.js +661 -0
- package/dist/modules/customers/components/linking/LinkEntityDialog.js.map +7 -0
- package/dist/modules/customers/components/linking/adapters/companyAdapter.js +252 -0
- package/dist/modules/customers/components/linking/adapters/companyAdapter.js.map +7 -0
- package/dist/modules/customers/components/linking/adapters/dealAdapter.js +384 -0
- package/dist/modules/customers/components/linking/adapters/dealAdapter.js.map +7 -0
- package/dist/modules/customers/components/linking/adapters/personAdapter.js +324 -0
- package/dist/modules/customers/components/linking/adapters/personAdapter.js.map +7 -0
- package/dist/modules/customers/components/list/CollectionPreviewCell.js +53 -0
- package/dist/modules/customers/components/list/CollectionPreviewCell.js.map +7 -0
- package/dist/modules/customers/data/entities.js +407 -1
- package/dist/modules/customers/data/entities.js.map +2 -2
- package/dist/modules/customers/data/validators.js +139 -21
- package/dist/modules/customers/data/validators.js.map +2 -2
- package/dist/modules/customers/events.js +19 -1
- package/dist/modules/customers/events.js.map +2 -2
- package/dist/modules/customers/lib/customerRoleTypes.js +19 -0
- package/dist/modules/customers/lib/customerRoleTypes.js.map +7 -0
- package/dist/modules/customers/lib/dealClosureNotification.js +39 -0
- package/dist/modules/customers/lib/dealClosureNotification.js.map +7 -0
- package/dist/modules/customers/lib/dealStageTransitionTable.js +29 -0
- package/dist/modules/customers/lib/dealStageTransitionTable.js.map +7 -0
- package/dist/modules/customers/lib/dictionaries.js +25 -0
- package/dist/modules/customers/lib/dictionaries.js.map +2 -2
- package/dist/modules/customers/lib/interactionReadModel.js +10 -0
- package/dist/modules/customers/lib/interactionReadModel.js.map +2 -2
- package/dist/modules/customers/lib/personCompanies.js +235 -0
- package/dist/modules/customers/lib/personCompanies.js.map +7 -0
- package/dist/modules/customers/lib/personCompanyLinkTable.js +42 -0
- package/dist/modules/customers/lib/personCompanyLinkTable.js.map +7 -0
- package/dist/modules/customers/lib/roleTypeUsage.js +104 -0
- package/dist/modules/customers/lib/roleTypeUsage.js.map +7 -0
- package/dist/modules/customers/migrations/Migration20260406214502.js +18 -0
- package/dist/modules/customers/migrations/Migration20260406214502.js.map +7 -0
- package/dist/modules/customers/migrations/Migration20260408135736.js +17 -0
- package/dist/modules/customers/migrations/Migration20260408135736.js.map +7 -0
- package/dist/modules/customers/migrations/Migration20260408225345.js +21 -0
- package/dist/modules/customers/migrations/Migration20260408225345.js.map +7 -0
- package/dist/modules/customers/migrations/Migration20260411075533.js +27 -0
- package/dist/modules/customers/migrations/Migration20260411075533.js.map +7 -0
- package/dist/modules/customers/migrations/Migration20260411103551.js +13 -0
- package/dist/modules/customers/migrations/Migration20260411103551.js.map +7 -0
- package/dist/modules/customers/migrations/Migration20260411130944.js +26 -0
- package/dist/modules/customers/migrations/Migration20260411130944.js.map +7 -0
- package/dist/modules/customers/migrations/Migration20260415095203.js +13 -0
- package/dist/modules/customers/migrations/Migration20260415095203.js.map +7 -0
- package/dist/modules/customers/migrations/Migration20260415135056.js +20 -0
- package/dist/modules/customers/migrations/Migration20260415135056.js.map +7 -0
- package/dist/modules/customers/migrations/Migration20260417140000.js +15 -0
- package/dist/modules/customers/migrations/Migration20260417140000.js.map +7 -0
- package/dist/modules/customers/migrations/Migration20260417160000.js +17 -0
- package/dist/modules/customers/migrations/Migration20260417160000.js.map +7 -0
- package/dist/modules/customers/migrations/Migration20260417235407.js +13 -0
- package/dist/modules/customers/migrations/Migration20260417235407.js.map +7 -0
- package/dist/modules/customers/setup.js +16 -1
- package/dist/modules/customers/setup.js.map +2 -2
- package/dist/modules/customers/subscribers/deal-closure-notification.js +16 -0
- package/dist/modules/customers/subscribers/deal-closure-notification.js.map +7 -0
- package/dist/modules/customers/subscribers/deal-lost-notification.js +16 -0
- package/dist/modules/customers/subscribers/deal-lost-notification.js.map +7 -0
- package/dist/modules/dictionaries/api/[dictionaryId]/entries/[entryId]/route.js +2 -0
- package/dist/modules/dictionaries/api/[dictionaryId]/entries/[entryId]/route.js.map +2 -2
- package/dist/modules/dictionaries/api/[dictionaryId]/entries/reorder/route.js +154 -0
- package/dist/modules/dictionaries/api/[dictionaryId]/entries/reorder/route.js.map +7 -0
- package/dist/modules/dictionaries/api/[dictionaryId]/entries/route.js +6 -2
- package/dist/modules/dictionaries/api/[dictionaryId]/entries/route.js.map +2 -2
- package/dist/modules/dictionaries/api/[dictionaryId]/entries/set-default/route.js +154 -0
- package/dist/modules/dictionaries/api/[dictionaryId]/entries/set-default/route.js.map +7 -0
- package/dist/modules/dictionaries/api/context.js +8 -1
- package/dist/modules/dictionaries/api/context.js.map +2 -2
- package/dist/modules/dictionaries/api/openapi.js +18 -1
- package/dist/modules/dictionaries/api/openapi.js.map +2 -2
- package/dist/modules/dictionaries/commands/entry-operations.js +388 -0
- package/dist/modules/dictionaries/commands/entry-operations.js.map +7 -0
- package/dist/modules/dictionaries/commands/factory.js +24 -3
- package/dist/modules/dictionaries/commands/factory.js.map +2 -2
- package/dist/modules/dictionaries/commands/index.js +1 -0
- package/dist/modules/dictionaries/commands/index.js.map +2 -2
- package/dist/modules/dictionaries/components/DictionaryTable.js +6 -3
- package/dist/modules/dictionaries/components/DictionaryTable.js.map +2 -2
- package/dist/modules/dictionaries/data/entities.js +11 -1
- package/dist/modules/dictionaries/data/entities.js.map +2 -2
- package/dist/modules/dictionaries/data/validators.js +28 -2
- package/dist/modules/dictionaries/data/validators.js.map +2 -2
- package/dist/modules/dictionaries/events.js +18 -0
- package/dist/modules/dictionaries/events.js.map +7 -0
- package/dist/modules/dictionaries/lib/clientEntries.js +43 -0
- package/dist/modules/dictionaries/lib/clientEntries.js.map +7 -0
- package/dist/modules/dictionaries/migrations/Migration20260410171544.js +45 -0
- package/dist/modules/dictionaries/migrations/Migration20260410171544.js.map +7 -0
- package/dist/modules/inbox_ops/api/proposals/[id]/route.js +4 -1
- package/dist/modules/inbox_ops/api/proposals/[id]/route.js.map +2 -2
- package/dist/modules/query_index/lib/engine.js +1 -1
- package/dist/modules/query_index/lib/engine.js.map +2 -2
- package/dist/modules/sales/components/documents/AddressesSection.js +82 -42
- package/dist/modules/sales/components/documents/AddressesSection.js.map +2 -2
- package/dist/modules/sales/lib/dictionaries.js +16 -0
- package/dist/modules/sales/lib/dictionaries.js.map +2 -2
- package/dist/modules/sales/widgets/injection-table.js +5 -1
- package/dist/modules/sales/widgets/injection-table.js.map +2 -2
- package/generated/entities/action_log/index.ts +4 -0
- package/generated/entities/customer_company_billing/index.ts +10 -0
- package/generated/entities/customer_deal/index.ts +4 -0
- package/generated/entities/customer_deal_stage_transition/index.ts +14 -0
- package/generated/entities/customer_dictionary_kind_setting/index.ts +9 -0
- package/generated/entities/customer_entity/index.ts +4 -0
- package/generated/entities/customer_entity_role/index.ts +10 -0
- package/generated/entities/customer_interaction/index.ts +11 -0
- package/generated/entities/customer_label/index.ts +8 -0
- package/generated/entities/customer_label_assignment/index.ts +7 -0
- package/generated/entities/customer_person_company_link/index.ts +9 -0
- package/generated/entities/customer_person_company_role/index.ts +7 -0
- package/generated/entities/dictionary_entry/index.ts +2 -0
- package/generated/entities.ids.generated.ts +9 -1
- package/generated/entity-fields-registry.ts +116 -1
- package/package.json +3 -3
- package/src/modules/attachments/api/route.ts +48 -6
- package/src/modules/attachments/i18n/de.json +4 -0
- package/src/modules/attachments/i18n/en.json +4 -0
- package/src/modules/attachments/i18n/es.json +4 -0
- package/src/modules/attachments/i18n/pl.json +4 -0
- package/src/modules/audit_logs/api/audit-logs/actions/export/route.ts +260 -0
- package/src/modules/audit_logs/api/audit-logs/actions/route.ts +81 -6
- package/src/modules/audit_logs/cli.ts +79 -0
- package/src/modules/audit_logs/data/entities.ts +17 -0
- package/src/modules/audit_logs/data/validators.ts +9 -1
- package/src/modules/audit_logs/lib/changeRows.ts +47 -0
- package/src/modules/audit_logs/lib/display-helpers.tsx +4 -30
- package/src/modules/audit_logs/lib/projections.ts +110 -0
- package/src/modules/audit_logs/migrations/.snapshot-open-mercato.json +325 -2
- package/src/modules/audit_logs/migrations/Migration20260412160533.ts +21 -0
- package/src/modules/audit_logs/services/actionLogService.ts +455 -85
- package/src/modules/catalog/i18n/de.json +1 -0
- package/src/modules/catalog/i18n/en.json +1 -0
- package/src/modules/catalog/i18n/es.json +1 -0
- package/src/modules/catalog/i18n/pl.json +1 -0
- package/src/modules/customer_accounts/i18n/de.json +2 -0
- package/src/modules/customer_accounts/i18n/en.json +2 -0
- package/src/modules/customer_accounts/i18n/es.json +2 -0
- package/src/modules/customer_accounts/i18n/pl.json +2 -0
- package/src/modules/customers/acl.ts +2 -0
- package/src/modules/customers/api/activities/route.ts +4 -0
- package/src/modules/customers/api/assignable-staff/route.ts +250 -0
- package/src/modules/customers/api/companies/[id]/people/route.ts +244 -0
- package/src/modules/customers/api/companies/[id]/roles/route.ts +15 -0
- package/src/modules/customers/api/companies/[id]/route.ts +458 -40
- package/src/modules/customers/api/companies/route.ts +93 -15
- package/src/modules/customers/api/deals/[id]/companies/route.ts +203 -0
- package/src/modules/customers/api/deals/[id]/people/route.ts +182 -0
- package/src/modules/customers/api/deals/[id]/route.ts +554 -57
- package/src/modules/customers/api/deals/[id]/stats/route.ts +221 -0
- package/src/modules/customers/api/deals/route.ts +35 -46
- package/src/modules/customers/api/dictionaries/[kind]/[id]/route.ts +105 -3
- package/src/modules/customers/api/dictionaries/[kind]/route.ts +143 -44
- package/src/modules/customers/api/dictionaries/context.ts +45 -16
- package/src/modules/customers/api/dictionaries/kind-settings/route.ts +232 -0
- package/src/modules/customers/api/entity-roles-factory.ts +520 -0
- package/src/modules/customers/api/interactions/conflicts/route.ts +196 -0
- package/src/modules/customers/api/interactions/counts/route.ts +112 -0
- package/src/modules/customers/api/interactions/route.ts +95 -2
- package/src/modules/customers/api/labels/assign/route.ts +202 -0
- package/src/modules/customers/api/labels/auth.ts +19 -0
- package/src/modules/customers/api/labels/route.ts +310 -0
- package/src/modules/customers/api/labels/table-errors.ts +36 -0
- package/src/modules/customers/api/labels/unassign/route.ts +197 -0
- package/src/modules/customers/api/people/[id]/companies/[linkId]/route.ts +331 -0
- package/src/modules/customers/api/people/[id]/companies/context.ts +70 -0
- package/src/modules/customers/api/people/[id]/companies/enriched/route.ts +384 -0
- package/src/modules/customers/api/people/[id]/companies/route.ts +215 -0
- package/src/modules/customers/api/people/[id]/roles/route.ts +15 -0
- package/src/modules/customers/api/people/[id]/route.ts +153 -26
- package/src/modules/customers/api/people/route.ts +134 -31
- package/src/modules/customers/api/todos/route.ts +4 -0
- package/src/modules/customers/api/utils.ts +36 -0
- package/src/modules/customers/backend/config/customers/page.tsx +2 -6
- package/src/modules/customers/backend/customers/companies/page.tsx +36 -26
- package/src/modules/customers/backend/customers/companies-v2/[id]/page.tsx +277 -262
- package/src/modules/customers/backend/customers/deals/[id]/hooks/formatters.ts +19 -0
- package/src/modules/customers/backend/customers/deals/[id]/hooks/types.ts +104 -0
- package/src/modules/customers/backend/customers/deals/[id]/hooks/useDealActivities.ts +60 -0
- package/src/modules/customers/backend/customers/deals/[id]/hooks/useDealAssociations.ts +362 -0
- package/src/modules/customers/backend/customers/deals/[id]/hooks/useDealClosure.ts +113 -0
- package/src/modules/customers/backend/customers/deals/[id]/hooks/useDealData.ts +52 -0
- package/src/modules/customers/backend/customers/deals/[id]/hooks/useDealFormHandlers.ts +86 -0
- package/src/modules/customers/backend/customers/deals/[id]/hooks/useDealInjectedTabs.tsx +60 -0
- package/src/modules/customers/backend/customers/deals/[id]/hooks/useDealMutationContext.ts +76 -0
- package/src/modules/customers/backend/customers/deals/[id]/hooks/useDealPipeline.ts +56 -0
- package/src/modules/customers/backend/customers/deals/[id]/hooks/useScheduleDialog.ts +38 -0
- package/src/modules/customers/backend/customers/deals/[id]/page.tsx +587 -624
- package/src/modules/customers/backend/customers/deals/page.tsx +71 -28
- package/src/modules/customers/backend/customers/people/page.tsx +35 -29
- package/src/modules/customers/backend/customers/people-v2/[id]/page.tsx +343 -209
- package/src/modules/customers/cli.ts +107 -12
- package/src/modules/customers/commands/activities.ts +13 -0
- package/src/modules/customers/commands/deals.ts +386 -114
- package/src/modules/customers/commands/dictionaries.ts +175 -32
- package/src/modules/customers/commands/dictionaryKindSettings.ts +268 -0
- package/src/modules/customers/commands/entity-roles.ts +494 -0
- package/src/modules/customers/commands/index.ts +4 -0
- package/src/modules/customers/commands/interactions.ts +125 -21
- package/src/modules/customers/commands/labels.ts +626 -0
- package/src/modules/customers/commands/people.ts +373 -259
- package/src/modules/customers/commands/personCompanyLinks.ts +654 -0
- package/src/modules/customers/commands/shared.ts +16 -15
- package/src/modules/customers/commands/todos.ts +17 -1
- package/src/modules/customers/components/AddressEditor.tsx +1 -1
- package/src/modules/customers/components/CustomersConfigurationSections.tsx +36 -0
- package/src/modules/customers/components/DictionarySettings.tsx +43 -2
- package/src/modules/customers/components/detail/ActiveDealCard.tsx +175 -0
- package/src/modules/customers/components/detail/ActivitiesSection.tsx +267 -361
- package/src/modules/customers/components/detail/ActivityAiActions.tsx +49 -0
- package/src/modules/customers/components/detail/ActivityCard.tsx +154 -0
- package/src/modules/customers/components/detail/ActivityHistorySection.tsx +412 -0
- package/src/modules/customers/components/detail/ActivityLogTab.tsx +67 -0
- package/src/modules/customers/components/detail/ActivityTimeline.tsx +158 -0
- package/src/modules/customers/components/detail/ActivityTimelineFilters.tsx +163 -0
- package/src/modules/customers/components/detail/ActivityTypeSelector.tsx +53 -0
- package/src/modules/customers/components/detail/AiActionChips.tsx +48 -0
- package/src/modules/customers/components/detail/AssignRoleDialog.tsx +672 -0
- package/src/modules/customers/components/detail/ChangelogEntryRow.tsx +132 -0
- package/src/modules/customers/components/detail/ChangelogFilters.tsx +193 -0
- package/src/modules/customers/components/detail/ChangelogKpiCards.tsx +107 -0
- package/src/modules/customers/components/detail/ChangelogTab.tsx +629 -0
- package/src/modules/customers/components/detail/ComingSoonPlaceholder.tsx +21 -0
- package/src/modules/customers/components/detail/CompanyCard.tsx +419 -0
- package/src/modules/customers/components/detail/CompanyDashboardTab.tsx +161 -0
- package/src/modules/customers/components/detail/CompanyDetailHeader.tsx +243 -0
- package/src/modules/customers/components/detail/CompanyDetailTabs.tsx +172 -0
- package/src/modules/customers/components/detail/CompanyKpiBar.tsx +206 -0
- package/src/modules/customers/components/detail/CompanyPeopleSection.tsx +582 -288
- package/src/modules/customers/components/detail/CompanyTagsDialog.tsx +23 -0
- package/src/modules/customers/components/detail/ConfirmDealLostDialog.tsx +210 -0
- package/src/modules/customers/components/detail/CreatePersonDialog.tsx +178 -0
- package/src/modules/customers/components/detail/DealClosureActionBar.tsx +63 -0
- package/src/modules/customers/components/detail/DealDetailHeader.tsx +335 -0
- package/src/modules/customers/components/detail/DealDetailTabs.tsx +154 -0
- package/src/modules/customers/components/detail/DealForm.tsx +253 -101
- package/src/modules/customers/components/detail/DealLinkedEntitiesTab.tsx +349 -0
- package/src/modules/customers/components/detail/DealLostSummaryDialog.tsx +156 -0
- package/src/modules/customers/components/detail/DealWonPopup.tsx +164 -0
- package/src/modules/customers/components/detail/DealsSection.tsx +276 -221
- package/src/modules/customers/components/detail/DecisionMakersFooter.tsx +56 -0
- package/src/modules/customers/components/detail/EntityTagsDialog.tsx +1372 -0
- package/src/modules/customers/components/detail/InlineActivityComposer.tsx +239 -0
- package/src/modules/customers/components/detail/ManageTagsDialog.tsx +1331 -0
- package/src/modules/customers/components/detail/MiniWeekCalendar.tsx +338 -0
- package/src/modules/customers/components/detail/MobilePersonDetail.tsx +124 -0
- package/src/modules/customers/components/detail/NextStepCard.tsx +104 -0
- package/src/modules/customers/components/detail/PersonCard.tsx +238 -0
- package/src/modules/customers/components/detail/PersonCompaniesSection.tsx +426 -0
- package/src/modules/customers/components/detail/PersonDetailHeader.tsx +294 -0
- package/src/modules/customers/components/detail/PersonDetailTabs.tsx +172 -0
- package/src/modules/customers/components/detail/PersonTagsDialog.tsx +26 -0
- package/src/modules/customers/components/detail/PipelineStepper.tsx +245 -0
- package/src/modules/customers/components/detail/PlannedActivitiesSection.tsx +255 -0
- package/src/modules/customers/components/detail/RelationshipHealthCard.tsx +63 -0
- package/src/modules/customers/components/detail/RoleAssignmentRow.tsx +248 -0
- package/src/modules/customers/components/detail/RolesSection.tsx +311 -0
- package/src/modules/customers/components/detail/ScheduleActivityDialog.tsx +481 -0
- package/src/modules/customers/components/detail/aiActionCatalog.ts +77 -0
- package/src/modules/customers/components/detail/assignableStaff.ts +124 -0
- package/src/modules/customers/components/detail/dashboard/ActiveDealWidget.tsx +63 -0
- package/src/modules/customers/components/detail/dashboard/OpenTasksWidget.tsx +114 -0
- package/src/modules/customers/components/detail/dashboard/RecentActivityWidget.tsx +69 -0
- package/src/modules/customers/components/detail/dashboard/RelationshipHealthWidget.tsx +40 -0
- package/src/modules/customers/components/detail/dashboard/UpcomingMeetingsWidget.tsx +64 -0
- package/src/modules/customers/components/detail/dashboard/helpers.ts +78 -0
- package/src/modules/customers/components/detail/healthScoreUtils.ts +91 -0
- package/src/modules/customers/components/detail/hooks/useCurrencyDictionary.ts +8 -8
- package/src/modules/customers/components/detail/hooks/useCustomerDictionary.ts +10 -6
- package/src/modules/customers/components/detail/hooks/useInteractionMutations.ts +91 -0
- package/src/modules/customers/components/detail/notesAdapter.ts +91 -30
- package/src/modules/customers/components/detail/pipelineStageUtils.ts +29 -0
- package/src/modules/customers/components/detail/schedule/DateTimeFields.tsx +187 -0
- package/src/modules/customers/components/detail/schedule/FooterFields.tsx +79 -0
- package/src/modules/customers/components/detail/schedule/LinkedEntitiesField.tsx +277 -0
- package/src/modules/customers/components/detail/schedule/LocationField.tsx +42 -0
- package/src/modules/customers/components/detail/schedule/ParticipantsField.tsx +255 -0
- package/src/modules/customers/components/detail/schedule/fieldConfig.ts +70 -0
- package/src/modules/customers/components/detail/schedule/index.ts +9 -0
- package/src/modules/customers/components/detail/schedule/useScheduleFormState.ts +221 -0
- package/src/modules/customers/components/detail/types.ts +16 -0
- package/src/modules/customers/components/detail/utils.ts +25 -0
- package/src/modules/customers/components/formConfig.tsx +223 -28
- package/src/modules/customers/components/linking/LinkEntityDialog.tsx +920 -0
- package/src/modules/customers/components/linking/adapters/companyAdapter.tsx +398 -0
- package/src/modules/customers/components/linking/adapters/dealAdapter.tsx +578 -0
- package/src/modules/customers/components/linking/adapters/personAdapter.tsx +512 -0
- package/src/modules/customers/components/list/CollectionPreviewCell.tsx +66 -0
- package/src/modules/customers/data/entities.ts +353 -1
- package/src/modules/customers/data/validators.ts +170 -19
- package/src/modules/customers/events.ts +22 -0
- package/src/modules/customers/i18n/de.json +841 -2
- package/src/modules/customers/i18n/en.json +841 -2
- package/src/modules/customers/i18n/es.json +840 -1
- package/src/modules/customers/i18n/pl.json +841 -2
- package/src/modules/customers/lib/customerRoleTypes.ts +24 -0
- package/src/modules/customers/lib/dealClosureNotification.ts +64 -0
- package/src/modules/customers/lib/dealStageTransitionTable.ts +32 -0
- package/src/modules/customers/lib/dictionaries.ts +26 -10
- package/src/modules/customers/lib/interactionReadModel.ts +10 -0
- package/src/modules/customers/lib/personCompanies.ts +317 -0
- package/src/modules/customers/lib/personCompanyLinkTable.ts +58 -0
- package/src/modules/customers/lib/roleTypeUsage.ts +146 -0
- package/src/modules/customers/migrations/.snapshot-open-mercato.json +2747 -798
- package/src/modules/customers/migrations/Migration20260406214502.ts +19 -0
- package/src/modules/customers/migrations/Migration20260408135736.ts +15 -0
- package/src/modules/customers/migrations/Migration20260408225345.ts +23 -0
- package/src/modules/customers/migrations/Migration20260411075533.ts +30 -0
- package/src/modules/customers/migrations/Migration20260411103551.ts +13 -0
- package/src/modules/customers/migrations/Migration20260411130944.ts +30 -0
- package/src/modules/customers/migrations/Migration20260415095203.ts +13 -0
- package/src/modules/customers/migrations/Migration20260415135056.ts +22 -0
- package/src/modules/customers/migrations/Migration20260417140000.ts +15 -0
- package/src/modules/customers/migrations/Migration20260417160000.ts +17 -0
- package/src/modules/customers/migrations/Migration20260417235407.ts +13 -0
- package/src/modules/customers/setup.ts +15 -0
- package/src/modules/customers/subscribers/deal-closure-notification.ts +22 -0
- package/src/modules/customers/subscribers/deal-lost-notification.ts +22 -0
- package/src/modules/dictionaries/api/[dictionaryId]/entries/[entryId]/route.ts +2 -0
- package/src/modules/dictionaries/api/[dictionaryId]/entries/reorder/route.ts +162 -0
- package/src/modules/dictionaries/api/[dictionaryId]/entries/route.ts +6 -2
- package/src/modules/dictionaries/api/[dictionaryId]/entries/set-default/route.ts +162 -0
- package/src/modules/dictionaries/api/context.ts +9 -0
- package/src/modules/dictionaries/api/openapi.ts +17 -0
- package/src/modules/dictionaries/commands/entry-operations.ts +457 -0
- package/src/modules/dictionaries/commands/factory.ts +31 -3
- package/src/modules/dictionaries/commands/index.ts +1 -0
- package/src/modules/dictionaries/components/DictionaryTable.tsx +15 -6
- package/src/modules/dictionaries/data/entities.ts +9 -0
- package/src/modules/dictionaries/data/validators.ts +34 -0
- package/src/modules/dictionaries/events.ts +20 -0
- package/src/modules/dictionaries/i18n/de.json +2 -0
- package/src/modules/dictionaries/i18n/en.json +2 -0
- package/src/modules/dictionaries/i18n/es.json +2 -0
- package/src/modules/dictionaries/i18n/pl.json +2 -0
- package/src/modules/dictionaries/lib/clientEntries.ts +66 -0
- package/src/modules/dictionaries/migrations/.snapshot-open-mercato.json +185 -3
- package/src/modules/dictionaries/migrations/Migration20260410171544.ts +49 -0
- package/src/modules/inbox_ops/api/proposals/[id]/route.ts +4 -1
- package/src/modules/query_index/lib/engine.ts +9 -1
- package/src/modules/sales/components/documents/AddressesSection.tsx +92 -42
- package/src/modules/sales/i18n/de.json +28 -0
- package/src/modules/sales/i18n/en.json +28 -0
- package/src/modules/sales/i18n/es.json +28 -0
- package/src/modules/sales/i18n/pl.json +28 -0
- package/src/modules/sales/lib/dictionaries.ts +18 -0
- package/src/modules/sales/widgets/injection-table.ts +4 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/modules/customers/components/detail/PersonDetailHeader.tsx"],
|
|
4
|
+
"sourcesContent": ["\"use client\"\n\nimport * as React from 'react'\nimport Link from 'next/link'\nimport { Phone, Mail, Building2, Trash2, Pencil } from 'lucide-react'\nimport { cn } from '@open-mercato/shared/lib/utils'\nimport { useT } from '@open-mercato/shared/lib/i18n/context'\nimport { Button } from '@open-mercato/ui/primitives/button'\nimport { IconButton } from '@open-mercato/ui/primitives/icon-button'\nimport { Badge } from '@open-mercato/ui/primitives/badge'\nimport { useQueryClient } from '@tanstack/react-query'\nimport { PersonTagsDialog } from './PersonTagsDialog'\nimport { useCustomerDictionary, invalidateCustomerDictionary } from './hooks/useCustomerDictionary'\nimport { renderDictionaryIcon } from '../../../dictionaries/components/dictionaryAppearance'\nimport type { TagSummary } from './types'\nimport type { TagsSectionController } from '@open-mercato/ui/backend/detail'\nimport type { PersonOverview } from '../formConfig'\nimport type { CustomerDictionaryMap } from '@open-mercato/core/modules/customers/lib/dictionaries'\nimport { getInitials, formatFallbackLabel } from './utils'\n\ntype PersonDetailHeaderProps = {\n data: PersonOverview\n onTagsChange: (tags: TagSummary[]) => void\n tagsSectionControllerRef: React.RefObject<TagsSectionController | null>\n onSave: () => void\n onDelete: () => Promise<void>\n isDirty: boolean\n isSaving: boolean\n /** Callback to focus a specific field in the Zone 1 CrudForm by field name. */\n onFocusField?: (fieldName: string) => void\n /**\n * @deprecated Kept for backward compatibility. The \"+ Link company\" header CTA was removed;\n * company linking now happens exclusively through the Zone 2 Companies tab via\n * `PersonCompaniesSection`. This prop is a no-op and will be removed in a future major release.\n */\n onOpenCompaniesTab?: () => void\n /** Callback to reload person data after tags dialog save. */\n onDataReload?: () => void\n}\n\nfunction DictionaryBadge({ value, map, categoryIcon, className }: { value: string; map: CustomerDictionaryMap | undefined; categoryIcon?: React.ReactNode; className?: string }) {\n const entry = map?.[value]\n const color = entry?.color ?? null\n const icon = entry?.icon ?? null\n const label = entry?.label ?? formatFallbackLabel(value)\n const colorStyle: React.CSSProperties | undefined = color\n ? { color, borderColor: color, backgroundColor: `${color}1A` }\n : undefined\n return (\n <Badge\n variant=\"outline\"\n className={cn(\n 'rounded-sm gap-1.5 text-xs font-medium',\n className,\n )}\n style={colorStyle}\n >\n {icon ? renderDictionaryIcon(icon, 'size-2.5') : categoryIcon ?? null}\n {label}\n </Badge>\n )\n}\n\n/** Renders a tag badge with color-based text/border/background from TagSummary.color. */\nfunction TagBadge({ tag }: { tag: TagSummary }) {\n const colorStyle: React.CSSProperties | undefined = tag.color\n ? { color: tag.color, borderColor: tag.color, backgroundColor: `${tag.color}1A` }\n : undefined\n return (\n <Badge variant=\"outline\" className=\"rounded-sm gap-1.5 text-xs font-medium\" style={colorStyle}>\n {tag.label}\n </Badge>\n )\n}\n\nexport function PersonDetailHeader({\n data,\n onTagsChange,\n tagsSectionControllerRef,\n onSave,\n onDelete,\n isDirty,\n isSaving,\n onFocusField,\n onOpenCompaniesTab,\n onDataReload,\n}: PersonDetailHeaderProps) {\n const t = useT()\n const queryClient = useQueryClient()\n const [manageTagsOpen, setManageTagsOpen] = React.useState(false)\n const person = data.person\n const profile = data.profile\n const displayName = person.displayName || t('customers.people.detail.untitled', 'Untitled')\n\n const jobTitle = profile?.jobTitle ?? null\n const linkedCompanies = React.useMemo(() => {\n const items = Array.isArray(data.companies) && data.companies.length > 0\n ? data.companies\n : data.company\n ? [{ ...data.company, isPrimary: Boolean(data.isPrimary) }]\n : []\n return items\n }, [data.companies, data.company, data.isPrimary])\n const visibleCompanies = React.useMemo(() => linkedCompanies.slice(0, 3), [linkedCompanies])\n const hiddenCompaniesCount = Math.max(0, linkedCompanies.length - visibleCompanies.length)\n const visibleTags = React.useMemo(() => data.tags.slice(0, 6), [data.tags])\n const hiddenTagsCount = Math.max(0, data.tags.length - visibleTags.length)\n const primaryCompany = linkedCompanies.find((entry) => entry.isPrimary) ?? linkedCompanies[0] ?? null\n const companyName = primaryCompany?.displayName ?? null\n const companyId = primaryCompany?.id ?? profile?.companyEntityId ?? null\n\n // Fetch dictionary maps for colored badge rendering (scoped to person's organization)\n const personOrgId = person.organizationId ?? null\n const { data: statusDict } = useCustomerDictionary('statuses', 0, personOrgId)\n const { data: lifecycleDict } = useCustomerDictionary('lifecycle-stages', 0, personOrgId)\n const { data: sourceDict } = useCustomerDictionary('sources', 0, personOrgId)\n const { data: temperatureDict } = useCustomerDictionary('temperature', 0, personOrgId)\n const { data: renewalQuarterDict } = useCustomerDictionary('renewal-quarters', 0, personOrgId)\n\n return (\n <div className=\"rounded-lg border bg-card px-6 py-5\">\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-start sm:gap-5\">\n {/* Avatar */}\n <div className=\"flex size-18 shrink-0 items-center justify-center rounded-full bg-muted text-xl font-bold text-muted-foreground\">\n {getInitials(displayName)}\n </div>\n\n {/* Person info */}\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-center gap-2\">\n <h1 className=\"truncate text-2xl font-bold text-foreground\">{displayName}</h1>\n {data.isPrimary && (\n <span className=\"shrink-0 rounded-sm bg-status-warning-bg px-1.5 py-0.5 text-overline font-bold text-status-warning-text\">\n {t('customers.people.detail.header.primary', 'PRIMARY')}\n </span>\n )}\n </div>\n\n {/* Subtitle: job title + company link */}\n {(jobTitle || companyName) && (\n <p className=\"mt-0.5 text-sm text-muted-foreground\">\n {jobTitle}\n {jobTitle && companyName && ` ${t('customers.people.detail.header.at', 'at')} `}\n {companyName && companyId && (\n <Link href={`/backend/customers/companies-v2/${companyId}`} className=\"text-primary hover:underline\">\n {companyName}\n </Link>\n )}\n {companyName && !companyId && companyName}\n </p>\n )}\n\n {/* Contact row */}\n <div className=\"mt-1.5 flex flex-wrap items-center gap-x-5 gap-y-1 text-sm text-muted-foreground\">\n {person.primaryPhone && (\n <span className=\"inline-flex items-center gap-1.5\">\n <Phone className=\"size-3.5\" />\n <a href={`tel:${person.primaryPhone}`} className=\"hover:text-foreground\">{person.primaryPhone}</a>\n </span>\n )}\n {person.primaryEmail && (\n <span className=\"inline-flex items-center gap-1.5\">\n <Mail className=\"size-3.5\" />\n <a href={`mailto:${person.primaryEmail}`} className=\"hover:text-foreground\">{person.primaryEmail}</a>\n </span>\n )}\n </div>\n\n {/* Company chips (annotation 1a) */}\n {linkedCompanies.length > 0 && (\n <div className=\"mt-1.5 flex flex-wrap items-center gap-2 text-sm\">\n <span className=\"text-muted-foreground\">\n <Building2 className=\"mr-1 inline size-3.5\" />\n {t('customers.people.detail.header.companies', 'Companies')} ({linkedCompanies.length}):\n </span>\n {visibleCompanies.map((company) => (\n <Link\n key={company.id}\n href={`/backend/customers/companies-v2/${company.id}`}\n className={cn(\n 'inline-flex items-center gap-1.5 rounded-sm border px-2 py-0.5 text-xs font-semibold transition-colors hover:bg-status-info-bg',\n company.isPrimary\n ? 'border-status-info-border bg-status-info-bg text-status-info-text'\n : 'border-border bg-background text-foreground',\n )}\n >\n <Building2 className=\"size-3\" />\n {company.displayName}\n {company.isPrimary ? (\n <span className=\"rounded-sm bg-status-info-icon px-1 py-px text-overline font-bold text-white\">\n {t('customers.people.detail.header.primary', 'PRIMARY')}\n </span>\n ) : null}\n </Link>\n ))}\n {hiddenCompaniesCount > 0 ? (\n <Badge variant=\"outline\" className=\"rounded-sm text-xs font-semibold\">\n +{hiddenCompaniesCount} {t('customers.people.detail.header.more', 'more')}\n </Badge>\n ) : null}\n </div>\n )}\n\n {/* Status badges + inline tags + manage tags */}\n <div className=\"mt-2.5 flex flex-wrap items-center gap-2\">\n {person.status && (\n <DictionaryBadge value={person.status} map={statusDict?.map} />\n )}\n {person.lifecycleStage && (\n <DictionaryBadge value={person.lifecycleStage} map={lifecycleDict?.map} />\n )}\n {person.source && (\n <DictionaryBadge value={person.source} map={sourceDict?.map} />\n )}\n {person.temperature && (\n <DictionaryBadge value={person.temperature} map={temperatureDict?.map} />\n )}\n {person.renewalQuarter && (\n <DictionaryBadge value={person.renewalQuarter} map={renewalQuarterDict?.map} />\n )}\n {/* Inline tag pills */}\n {visibleTags.map((tag) => (\n <TagBadge key={tag.id ?? tag.label} tag={tag} />\n ))}\n {hiddenTagsCount > 0 ? (\n <Badge variant=\"outline\" className=\"rounded-sm gap-1.5 text-xs font-medium\">\n +{hiddenTagsCount} {t('customers.people.detail.header.more', 'more')}\n </Badge>\n ) : null}\n {/* Manage tags \u2014 opens dialog directly */}\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n className=\"h-auto rounded-sm px-2 py-1 text-xs font-medium text-muted-foreground hover:text-foreground\"\n onClick={() => setManageTagsOpen(true)}\n >\n <Pencil className=\"mr-1 size-3\" />\n {t('customers.people.detail.actions.manageTags', 'Edit tags')}\n </Button>\n </div>\n </div>\n\n {/* Right side: actions */}\n <div className=\"flex w-full shrink-0 items-center justify-start gap-2 sm:w-auto sm:justify-end\">\n <IconButton\n variant=\"outline\"\n size=\"sm\"\n type=\"button\"\n aria-label={t('customers.people.detail.actions.delete', 'Delete')}\n onClick={() => {\n void onDelete()\n }}\n >\n <Trash2 className=\"size-4\" />\n </IconButton>\n <Button\n type=\"button\"\n size=\"sm\"\n onClick={onSave}\n disabled={!isDirty || isSaving}\n >\n {t('customers.people.detail.actions.save', 'Save')}\n </Button>\n </div>\n </div>\n <PersonTagsDialog\n open={manageTagsOpen}\n onClose={() => setManageTagsOpen(false)}\n personId={person.id}\n personOrganizationId={person.organizationId ?? null}\n personData={{\n status: person.status,\n lifecycleStage: person.lifecycleStage,\n source: person.source,\n temperature: person.temperature,\n renewalQuarter: person.renewalQuarter,\n jobTitle: data.profile?.jobTitle ?? null,\n customFields: data.customFields,\n tags: data.tags,\n }}\n onSaved={() => {\n // Invalidate dictionary caches so header badges pick up fresh colors\n void invalidateCustomerDictionary(queryClient, 'statuses')\n void invalidateCustomerDictionary(queryClient, 'lifecycle-stages')\n void invalidateCustomerDictionary(queryClient, 'sources')\n void invalidateCustomerDictionary(queryClient, 'temperature')\n void invalidateCustomerDictionary(queryClient,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a,kBAAkB;AACjE,eAAK,6BAA6B,aAAa,SAAS;AACxD,eAAK,6BAA6B,aAAa,aAAa;AAC5D,eAAK,6BAA6B,aAAa,kBAAkB;AACjE,yBAAe;AAAA,QACjB;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "@open-mercato/shared/lib/utils";
|
|
5
|
+
import { useT } from "@open-mercato/shared/lib/i18n/context";
|
|
6
|
+
import { Button } from "@open-mercato/ui/primitives/button";
|
|
7
|
+
import {
|
|
8
|
+
SquareCheckBig,
|
|
9
|
+
Briefcase,
|
|
10
|
+
Building2,
|
|
11
|
+
Check,
|
|
12
|
+
History,
|
|
13
|
+
Paperclip
|
|
14
|
+
} from "lucide-react";
|
|
15
|
+
const SUPPORTED_TAB_IDS = /* @__PURE__ */ new Set(["activities", "deals", "companies", "tasks", "changelog", "files"]);
|
|
16
|
+
function resolveLegacyTab(tab) {
|
|
17
|
+
if (!tab) return "activities";
|
|
18
|
+
return SUPPORTED_TAB_IDS.has(tab) ? tab : "activities";
|
|
19
|
+
}
|
|
20
|
+
function CountBadge({ count }) {
|
|
21
|
+
if (count <= 0) return null;
|
|
22
|
+
return /* @__PURE__ */ jsx("span", { className: "ml-1 rounded-full bg-muted px-1.5 py-0.5 text-xs font-medium leading-none text-muted-foreground", children: count > 999 ? "999+" : count });
|
|
23
|
+
}
|
|
24
|
+
function NewBadge() {
|
|
25
|
+
return /* @__PURE__ */ jsx("span", { className: "ml-1.5 rounded bg-foreground px-1.5 py-0.5 text-overline font-semibold leading-none text-background", children: "NEW" });
|
|
26
|
+
}
|
|
27
|
+
function PersonDetailTabs({
|
|
28
|
+
activeTab,
|
|
29
|
+
onTabChange,
|
|
30
|
+
injectedTabs = [],
|
|
31
|
+
activitiesCount = 0,
|
|
32
|
+
dealsCount = 0,
|
|
33
|
+
companiesCount = 0,
|
|
34
|
+
tasksCount = 0,
|
|
35
|
+
filesCount = 0,
|
|
36
|
+
children
|
|
37
|
+
}) {
|
|
38
|
+
const t = useT();
|
|
39
|
+
const builtInTabs = React.useMemo(
|
|
40
|
+
() => [
|
|
41
|
+
{
|
|
42
|
+
id: "activities",
|
|
43
|
+
label: t("customers.people.detail.tabs.activities", "Activities"),
|
|
44
|
+
icon: /* @__PURE__ */ jsx(SquareCheckBig, { className: "size-4" }),
|
|
45
|
+
badge: /* @__PURE__ */ jsx(CountBadge, { count: activitiesCount })
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: "deals",
|
|
49
|
+
label: t("customers.people.detail.tabs.deals", "Deals"),
|
|
50
|
+
icon: /* @__PURE__ */ jsx(Briefcase, { className: "size-4" }),
|
|
51
|
+
badge: /* @__PURE__ */ jsx(CountBadge, { count: dealsCount })
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
id: "companies",
|
|
55
|
+
label: t("customers.people.detail.tabs.companies", "Companies"),
|
|
56
|
+
icon: /* @__PURE__ */ jsx(Building2, { className: "size-4" }),
|
|
57
|
+
badge: /* @__PURE__ */ jsx(CountBadge, { count: companiesCount })
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: "tasks",
|
|
61
|
+
label: t("customers.people.detail.tabs.tasks", "Tasks"),
|
|
62
|
+
icon: /* @__PURE__ */ jsx(Check, { className: "size-4" }),
|
|
63
|
+
badge: /* @__PURE__ */ jsx(CountBadge, { count: tasksCount })
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: "changelog",
|
|
67
|
+
label: t("customers.people.detail.tabs.changelog", "Change log"),
|
|
68
|
+
icon: /* @__PURE__ */ jsx(History, { className: "size-4" }),
|
|
69
|
+
badge: /* @__PURE__ */ jsx(NewBadge, {})
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
id: "files",
|
|
73
|
+
label: t("customers.people.detail.tabs.files", "Files"),
|
|
74
|
+
icon: /* @__PURE__ */ jsx(Paperclip, { className: "size-4" }),
|
|
75
|
+
badge: /* @__PURE__ */ jsx(CountBadge, { count: filesCount })
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
[t, activitiesCount, dealsCount, companiesCount, tasksCount, filesCount]
|
|
79
|
+
);
|
|
80
|
+
const allTabs = React.useMemo(
|
|
81
|
+
() => [
|
|
82
|
+
...builtInTabs,
|
|
83
|
+
...injectedTabs.map((tab) => ({
|
|
84
|
+
id: tab.id,
|
|
85
|
+
label: tab.label
|
|
86
|
+
}))
|
|
87
|
+
],
|
|
88
|
+
[builtInTabs, injectedTabs]
|
|
89
|
+
);
|
|
90
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
91
|
+
/* @__PURE__ */ jsx("div", { className: "border-b", role: "tablist", "aria-label": t("customers.people.detail.tabs.label", "Person detail sections"), children: /* @__PURE__ */ jsx("nav", { className: "-mb-px flex gap-1 overflow-x-auto px-1", children: allTabs.map((tab) => {
|
|
92
|
+
const isActive = activeTab === tab.id;
|
|
93
|
+
return /* @__PURE__ */ jsxs(
|
|
94
|
+
Button,
|
|
95
|
+
{
|
|
96
|
+
type: "button",
|
|
97
|
+
variant: "ghost",
|
|
98
|
+
size: "sm",
|
|
99
|
+
role: "tab",
|
|
100
|
+
"aria-selected": isActive,
|
|
101
|
+
onClick: () => onTabChange(tab.id),
|
|
102
|
+
className: cn(
|
|
103
|
+
"h-auto shrink-0 rounded-none border-b-2 px-3 py-2.5 hover:bg-transparent",
|
|
104
|
+
isActive ? "border-foreground text-foreground font-semibold" : "border-transparent text-muted-foreground hover:text-foreground"
|
|
105
|
+
),
|
|
106
|
+
children: [
|
|
107
|
+
tab.icon && /* @__PURE__ */ jsx("span", { className: "mr-1.5", children: tab.icon }),
|
|
108
|
+
tab.label,
|
|
109
|
+
tab.badge
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
tab.id
|
|
113
|
+
);
|
|
114
|
+
}) }) }),
|
|
115
|
+
/* @__PURE__ */ jsx("div", { className: "pt-6", children })
|
|
116
|
+
] });
|
|
117
|
+
}
|
|
118
|
+
export {
|
|
119
|
+
PersonDetailTabs,
|
|
120
|
+
resolveLegacyTab
|
|
121
|
+
};
|
|
122
|
+
//# sourceMappingURL=PersonDetailTabs.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/modules/customers/components/detail/PersonDetailTabs.tsx"],
|
|
4
|
+
"sourcesContent": ["\"use client\"\n\nimport * as React from 'react'\nimport { cn } from '@open-mercato/shared/lib/utils'\nimport { useT } from '@open-mercato/shared/lib/i18n/context'\nimport { Button } from '@open-mercato/ui/primitives/button'\nimport {\n SquareCheckBig,\n Briefcase,\n Building2,\n Check,\n History,\n Paperclip,\n} from 'lucide-react'\n\nexport type PersonTabId =\n | 'activities'\n | 'deals'\n | 'companies'\n | 'tasks'\n | 'changelog'\n | 'files'\n | string\n\ntype TabDef = {\n id: PersonTabId\n label: string\n icon?: React.ReactNode\n badge?: React.ReactNode\n}\n\ntype PersonDetailTabsProps = {\n activeTab: PersonTabId\n onTabChange: (tab: PersonTabId) => void\n injectedTabs?: Array<{ id: string; label: string }>\n activitiesCount?: number\n dealsCount?: number\n companiesCount?: number\n tasksCount?: number\n filesCount?: number\n children: React.ReactNode\n}\n\nconst SUPPORTED_TAB_IDS = new Set<PersonTabId>(['activities', 'deals', 'companies', 'tasks', 'changelog', 'files'])\n\nexport function resolveLegacyTab(tab: string | null | undefined): PersonTabId {\n if (!tab) return 'activities'\n return SUPPORTED_TAB_IDS.has(tab as PersonTabId) ? (tab as PersonTabId) : 'activities'\n}\n\nfunction CountBadge({ count }: { count: number }) {\n if (count <= 0) return null\n return (\n <span className=\"ml-1 rounded-full bg-muted px-1.5 py-0.5 text-xs font-medium leading-none text-muted-foreground\">\n {count > 999 ? '999+' : count}\n </span>\n )\n}\n\nfunction NewBadge() {\n return (\n <span className=\"ml-1.5 rounded bg-foreground px-1.5 py-0.5 text-overline font-semibold leading-none text-background\">\n NEW\n </span>\n )\n}\n\nexport function PersonDetailTabs({\n activeTab,\n onTabChange,\n injectedTabs = [],\n activitiesCount = 0,\n dealsCount = 0,\n companiesCount = 0,\n tasksCount = 0,\n filesCount = 0,\n children,\n}: PersonDetailTabsProps) {\n const t = useT()\n\n const builtInTabs: TabDef[] = React.useMemo(\n () => [\n {\n id: 'activities',\n label: t('customers.people.detail.tabs.activities', 'Activities'),\n icon: <SquareCheckBig className=\"size-4\" />,\n badge: <CountBadge count={activitiesCount} />,\n },\n {\n id: 'deals',\n label: t('customers.people.detail.tabs.deals', 'Deals'),\n icon: <Briefcase className=\"size-4\" />,\n badge: <CountBadge count={dealsCount} />,\n },\n {\n id: 'companies',\n label: t('customers.people.detail.tabs.companies', 'Companies'),\n icon: <Building2 className=\"size-4\" />,\n badge: <CountBadge count={companiesCount} />,\n },\n {\n id: 'tasks',\n label: t('customers.people.detail.tabs.tasks', 'Tasks'),\n icon: <Check className=\"size-4\" />,\n badge: <CountBadge count={tasksCount} />,\n },\n {\n id: 'changelog',\n label: t('customers.people.detail.tabs.changelog', 'Change log'),\n icon: <History className=\"size-4\" />,\n badge: <NewBadge />,\n },\n {\n id: 'files',\n label: t('customers.people.detail.tabs.files', 'Files'),\n icon: <Paperclip className=\"size-4\" />,\n badge: <CountBadge count={filesCount} />,\n },\n ],\n [t, activitiesCount, dealsCount, companiesCount, tasksCount, filesCount],\n )\n\n const allTabs: TabDef[] = React.useMemo(\n () => [\n ...builtInTabs,\n ...injectedTabs.map((tab) => ({\n id: tab.id as PersonTabId,\n label: tab.label,\n })),\n ],\n [builtInTabs, injectedTabs],\n )\n\n return (\n <div>\n {/* Tab navigation \u2014 full width above both zones */}\n <div className=\"border-b\" role=\"tablist\" aria-label={t('customers.people.detail.tabs.label', 'Person detail sections')}>\n <nav className=\"-mb-px flex gap-1 overflow-x-auto px-1\">\n {allTabs.map((tab) => {\n const isActive = activeTab === tab.id\n return (\n <Button\n key={tab.id}\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n role=\"tab\"\n aria-selected={isActive}\n onClick={() => onTabChange(tab.id)}\n className={cn(\n 'h-auto shrink-0 rounded-none border-b-2 px-3 py-2.5 hover:bg-transparent',\n isActive\n ? 'border-foreground text-foreground font-semibold'\n : 'border-transparent text-muted-foreground hover:text-foreground',\n )}\n >\n {tab.icon && <span className=\"mr-1.5\">{tab.icon}</span>}\n {tab.label}\n {tab.badge}\n </Button>\n )\n })}\n </nav>\n </div>\n\n {/* Two-column content below tabs */}\n <div className=\"pt-6\">\n {children}\n </div>\n </div>\n )\n}\n"],
|
|
5
|
+
"mappings": ";AAqDI,cAwFU,YAxFV;AAnDJ,YAAY,WAAW;AACvB,SAAS,UAAU;AACnB,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AA8BP,MAAM,oBAAoB,oBAAI,IAAiB,CAAC,cAAc,SAAS,aAAa,SAAS,aAAa,OAAO,CAAC;AAE3G,SAAS,iBAAiB,KAA6C;AAC5E,MAAI,CAAC,IAAK,QAAO;AACjB,SAAO,kBAAkB,IAAI,GAAkB,IAAK,MAAsB;AAC5E;AAEA,SAAS,WAAW,EAAE,MAAM,GAAsB;AAChD,MAAI,SAAS,EAAG,QAAO;AACvB,SACE,oBAAC,UAAK,WAAU,mGACb,kBAAQ,MAAM,SAAS,OAC1B;AAEJ;AAEA,SAAS,WAAW;AAClB,SACE,oBAAC,UAAK,WAAU,uGAAsG,iBAEtH;AAEJ;AAEO,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA,eAAe,CAAC;AAAA,EAChB,kBAAkB;AAAA,EAClB,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,aAAa;AA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GAAG,aAAa,IAAI,CAAC,SAAS;AAAA,QAC5B,IAAI,IAAI;AAAA,QACR,OAAO,IAAI;AAAA,MACb,EAAE;AAAA,IACJ;AAAA,IACA,CAAC,aAAa,YAAY;AAAA,EAC5B;AAEA,SACE,qBAAC,SAEC;AAAA,wBAAC,SAAI,WAAU,YAAW,MAAK,WAAU,cAAY,EAAE,sCAAsC,wBAAwB,GACnH,8BAAC,SAAI,WAAU,0CACZ,kBAAQ,IAAI,CAAC,QAAQ;AACpB,YAAM,WAAW,cAAc,IAAI;AACnC,aACE;AAAA,QAAC;AAAA;AAAA,UAEC,MAAK;AAAA,UACL,SAAQ;AAAA,UACR,MAAK;AAAA,UACL,MAAK;AAAA,UACL,iBAAe;AAAA,UACf,SAAS,MAAM,YAAY,IAAI,EAAE;AAAA,UACjC,WAAW;AAAA,YACT;AAAA,YACA,WACI,oDACA;AAAA,UACN;AAAA,UAEC;AAAA,gBAAI,QAAQ,oBAAC,UAAK,WAAU,UAAU,cAAI,MAAK;AAAA,YAC/C,IAAI;AAAA,YACJ,IAAI;AAAA;AAAA;AAAA,QAhBA,IAAI;AAAA,MAiBX;AAAA,IAEJ,CAAC,GACH,GACF;AAAA,IAGA,oBAAC,SAAI,WAAU,QACZ,UACH;AAAA,KACF;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { EntityTagsDialog } from "./EntityTagsDialog.js";
|
|
4
|
+
function PersonTagsDialog({
|
|
5
|
+
personId,
|
|
6
|
+
personOrganizationId,
|
|
7
|
+
personData,
|
|
8
|
+
...props
|
|
9
|
+
}) {
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
EntityTagsDialog,
|
|
12
|
+
{
|
|
13
|
+
...props,
|
|
14
|
+
entityId: personId,
|
|
15
|
+
entityType: "person",
|
|
16
|
+
entityOrganizationId: personOrganizationId,
|
|
17
|
+
entityData: personData
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
PersonTagsDialog
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=PersonTagsDialog.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/modules/customers/components/detail/PersonTagsDialog.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client'\n\nimport { EntityTagsDialog, type EntityTagsDialogProps } from './EntityTagsDialog'\n\ntype PersonTagsDialogProps = Omit<EntityTagsDialogProps, 'entityId' | 'entityType' | 'entityOrganizationId' | 'entityData'> & {\n personId: string\n personOrganizationId: string | null\n personData: EntityTagsDialogProps['entityData']\n}\n\nexport function PersonTagsDialog({\n personId,\n personOrganizationId,\n personData,\n ...props\n}: PersonTagsDialogProps) {\n return (\n <EntityTagsDialog\n {...props}\n entityId={personId}\n entityType=\"person\"\n entityOrganizationId={personOrganizationId}\n entityData={personData}\n />\n )\n}\n"],
|
|
5
|
+
"mappings": ";AAiBI;AAfJ,SAAS,wBAAoD;AAQtD,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAA0B;AACxB,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,UAAU;AAAA,MACV,YAAW;AAAA,MACX,sBAAsB;AAAA,MACtB,YAAY;AAAA;AAAA,EACd;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Check } from "lucide-react";
|
|
5
|
+
import { cn } from "@open-mercato/shared/lib/utils";
|
|
6
|
+
import { useT } from "@open-mercato/shared/lib/i18n/context";
|
|
7
|
+
import { isTerminalPipelineOutcomeLabel } from "./pipelineStageUtils.js";
|
|
8
|
+
function isTerminalOutcomeStage(stage) {
|
|
9
|
+
return isTerminalPipelineOutcomeLabel(stage.label);
|
|
10
|
+
}
|
|
11
|
+
function formatTransitionDate(value, t) {
|
|
12
|
+
const date = new Date(value);
|
|
13
|
+
if (Number.isNaN(date.getTime())) return t("customers.deals.detail.pipeline.current", "current");
|
|
14
|
+
return date.toLocaleDateString(void 0, { month: "short", day: "numeric" });
|
|
15
|
+
}
|
|
16
|
+
function formatStageSubtitle(transition, isCurrent, t) {
|
|
17
|
+
if (transition && isCurrent) {
|
|
18
|
+
return t("customers.deals.detail.pipeline.currentWithDate", "{{date}} \xB7 {{state}}", {
|
|
19
|
+
date: formatTransitionDate(transition.transitionedAt, t),
|
|
20
|
+
state: t("customers.deals.detail.pipeline.current", "current")
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
if (transition) return formatTransitionDate(transition.transitionedAt, t);
|
|
24
|
+
if (isCurrent) return t("customers.deals.detail.pipeline.current", "current");
|
|
25
|
+
return "\u2014";
|
|
26
|
+
}
|
|
27
|
+
function PipelineStepper({
|
|
28
|
+
stages,
|
|
29
|
+
transitions,
|
|
30
|
+
currentStageId,
|
|
31
|
+
pipelineName,
|
|
32
|
+
closureOutcome = null,
|
|
33
|
+
footer = null
|
|
34
|
+
}) {
|
|
35
|
+
const t = useT();
|
|
36
|
+
const allStages = React.useMemo(
|
|
37
|
+
() => [...stages].sort((left, right) => left.order - right.order),
|
|
38
|
+
[stages]
|
|
39
|
+
);
|
|
40
|
+
const sortedStages = React.useMemo(
|
|
41
|
+
() => allStages.filter((stage) => !isTerminalOutcomeStage(stage)),
|
|
42
|
+
[allStages]
|
|
43
|
+
);
|
|
44
|
+
const transitionByStageId = React.useMemo(
|
|
45
|
+
() => new Map(transitions.map((transition) => [transition.stageId, transition])),
|
|
46
|
+
[transitions]
|
|
47
|
+
);
|
|
48
|
+
const lastVisibleTransitionStage = React.useMemo(() => {
|
|
49
|
+
const transitionedStageIds = new Set(transitions.map((transition) => transition.stageId));
|
|
50
|
+
const visibleTransitionStages = sortedStages.filter((stage) => transitionedStageIds.has(stage.id));
|
|
51
|
+
return visibleTransitionStages[visibleTransitionStages.length - 1] ?? null;
|
|
52
|
+
}, [sortedStages, transitions]);
|
|
53
|
+
const currentVisibleStage = React.useMemo(() => {
|
|
54
|
+
const exactVisibleStage = sortedStages.find((stage) => stage.id === currentStageId) ?? null;
|
|
55
|
+
if (exactVisibleStage) return exactVisibleStage;
|
|
56
|
+
const currentStage = allStages.find((stage) => stage.id === currentStageId) ?? null;
|
|
57
|
+
if (currentStage && isTerminalOutcomeStage(currentStage)) {
|
|
58
|
+
const earlierVisibleStages = sortedStages.filter((stage) => stage.order < currentStage.order);
|
|
59
|
+
return earlierVisibleStages[earlierVisibleStages.length - 1] ?? sortedStages[sortedStages.length - 1] ?? null;
|
|
60
|
+
}
|
|
61
|
+
return lastVisibleTransitionStage;
|
|
62
|
+
}, [allStages, currentStageId, lastVisibleTransitionStage, sortedStages]);
|
|
63
|
+
const currentIndex = currentVisibleStage ? sortedStages.findIndex((stage) => stage.id === currentVisibleStage.id) : -1;
|
|
64
|
+
const compactStage = currentVisibleStage ?? sortedStages[0] ?? null;
|
|
65
|
+
const renderClosedProgress = closureOutcome !== null;
|
|
66
|
+
const progressValue = currentIndex >= 0 ? currentIndex + 1 : 0;
|
|
67
|
+
const progressValueText = renderClosedProgress ? closureOutcome === "won" ? t("customers.deals.detail.pipeline.ariaClosedWon", "Pipeline closed \u2014 deal won.") : t("customers.deals.detail.pipeline.ariaClosedLost", "Pipeline closed \u2014 deal lost.") : t("customers.deals.detail.pipeline.ariaValueText", "Stage {{current}} of {{total}}: {{label}}", {
|
|
68
|
+
current: progressValue,
|
|
69
|
+
total: sortedStages.length,
|
|
70
|
+
label: currentVisibleStage?.label ?? t("customers.deals.detail.pipeline.noCurrent", "no current stage")
|
|
71
|
+
});
|
|
72
|
+
const progressLabel = pipelineName ? t("customers.deals.detail.pipeline.ariaLabelNamed", "Pipeline progress \u2014 {{name}}", { name: pipelineName }) : t("customers.deals.detail.pipeline.ariaLabel", "Pipeline progress");
|
|
73
|
+
if (!sortedStages.length) return null;
|
|
74
|
+
return /* @__PURE__ */ jsxs(
|
|
75
|
+
"div",
|
|
76
|
+
{
|
|
77
|
+
className: "rounded-lg border border-border bg-card px-5 py-3.5 sm:px-6",
|
|
78
|
+
role: "progressbar",
|
|
79
|
+
"aria-label": progressLabel,
|
|
80
|
+
"aria-valuemin": 0,
|
|
81
|
+
"aria-valuemax": sortedStages.length,
|
|
82
|
+
"aria-valuenow": progressValue,
|
|
83
|
+
"aria-valuetext": progressValueText,
|
|
84
|
+
children: [
|
|
85
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-5 flex flex-wrap items-center gap-2 text-xs leading-none", children: [
|
|
86
|
+
/* @__PURE__ */ jsx("p", { className: "font-semibold uppercase tracking-[0.02em] text-muted-foreground", children: t("customers.deals.detail.pipeline.label", "Pipeline stages") }),
|
|
87
|
+
/* @__PURE__ */ jsx("span", { className: "text-border", children: "\xB7" }),
|
|
88
|
+
/* @__PURE__ */ jsx("p", { className: "font-normal text-muted-foreground", children: t("customers.deals.detail.pipeline.stageOf", "Stage {{current}} of {{total}}", {
|
|
89
|
+
current: currentIndex >= 0 ? currentIndex + 1 : 0,
|
|
90
|
+
total: sortedStages.length
|
|
91
|
+
}) }),
|
|
92
|
+
/* @__PURE__ */ jsx("span", { className: "text-border", children: "\xB7" }),
|
|
93
|
+
/* @__PURE__ */ jsx("p", { className: "font-normal text-muted-foreground", children: pipelineName ?? t("customers.deals.detail.pipeline.defaultName", "Current pipeline") })
|
|
94
|
+
] }),
|
|
95
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-4 sm:hidden", children: compactStage ? /* @__PURE__ */ jsx(
|
|
96
|
+
"div",
|
|
97
|
+
{
|
|
98
|
+
className: "rounded-lg border border-border bg-muted/20 px-4 py-4",
|
|
99
|
+
"aria-current": !renderClosedProgress && compactStage.id === currentVisibleStage?.id ? "step" : void 0,
|
|
100
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
101
|
+
/* @__PURE__ */ jsx(
|
|
102
|
+
"div",
|
|
103
|
+
{
|
|
104
|
+
className: cn(
|
|
105
|
+
"flex size-9 items-center justify-center rounded-full border-2 bg-background text-foreground",
|
|
106
|
+
renderClosedProgress ? "border-status-success-icon bg-status-success-icon text-white" : "border-foreground"
|
|
107
|
+
),
|
|
108
|
+
children: renderClosedProgress ? /* @__PURE__ */ jsx(Check, { className: "size-4 stroke-[2.5]" }) : /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold leading-none", children: (currentIndex >= 0 ? currentIndex : 0) + 1 })
|
|
109
|
+
}
|
|
110
|
+
),
|
|
111
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
112
|
+
/* @__PURE__ */ jsx("div", { className: "truncate text-sm font-semibold text-foreground", children: compactStage.label }),
|
|
113
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground", children: formatStageSubtitle(transitionByStageId.get(compactStage.id) ?? null, !renderClosedProgress, t) })
|
|
114
|
+
] })
|
|
115
|
+
] })
|
|
116
|
+
}
|
|
117
|
+
) : null }),
|
|
118
|
+
/* @__PURE__ */ jsx("div", { className: "hidden min-h-[115px] items-start sm:flex", children: sortedStages.map((stage, index) => {
|
|
119
|
+
const transition = transitionByStageId.get(stage.id) ?? null;
|
|
120
|
+
const isCurrent = !renderClosedProgress && currentVisibleStage?.id === stage.id;
|
|
121
|
+
const isCompleted = renderClosedProgress ? currentIndex >= 0 && index <= currentIndex : !isCurrent && (transition !== null || currentIndex >= 0 && index < currentIndex);
|
|
122
|
+
const isFuture = !isCurrent && !isCompleted;
|
|
123
|
+
const isFirst = index === 0;
|
|
124
|
+
const isLast = index === sortedStages.length - 1;
|
|
125
|
+
const beforeFilled = renderClosedProgress ? index <= currentIndex : index <= currentIndex;
|
|
126
|
+
const afterFilled = renderClosedProgress ? index < currentIndex : index < currentIndex;
|
|
127
|
+
return /* @__PURE__ */ jsxs(
|
|
128
|
+
"div",
|
|
129
|
+
{
|
|
130
|
+
className: "flex min-w-0 flex-1 flex-col items-center justify-center gap-2",
|
|
131
|
+
"aria-current": isCurrent ? "step" : void 0,
|
|
132
|
+
children: [
|
|
133
|
+
/* @__PURE__ */ jsxs("div", { className: "flex w-full items-center", "aria-hidden": "true", children: [
|
|
134
|
+
/* @__PURE__ */ jsx(
|
|
135
|
+
"div",
|
|
136
|
+
{
|
|
137
|
+
className: cn(
|
|
138
|
+
"h-[2px] flex-1",
|
|
139
|
+
isFirst ? "bg-transparent" : beforeFilled ? "bg-status-success-icon" : "bg-border/60"
|
|
140
|
+
)
|
|
141
|
+
}
|
|
142
|
+
),
|
|
143
|
+
/* @__PURE__ */ jsx(
|
|
144
|
+
"div",
|
|
145
|
+
{
|
|
146
|
+
className: cn(
|
|
147
|
+
"mx-0 flex size-9 items-center justify-center rounded-full border-2 text-sm leading-none transition-colors",
|
|
148
|
+
isCurrent && "border-foreground bg-background font-bold text-foreground",
|
|
149
|
+
isCompleted && !isCurrent && "border-status-success-icon bg-status-success-icon text-white",
|
|
150
|
+
isFuture && "border-border bg-background font-medium text-muted-foreground"
|
|
151
|
+
),
|
|
152
|
+
children: isCompleted ? /* @__PURE__ */ jsx(Check, { className: "size-4 stroke-[2.5]" }) : /* @__PURE__ */ jsx("span", { children: index + 1 })
|
|
153
|
+
}
|
|
154
|
+
),
|
|
155
|
+
/* @__PURE__ */ jsx(
|
|
156
|
+
"div",
|
|
157
|
+
{
|
|
158
|
+
className: cn(
|
|
159
|
+
"h-[2px] flex-1",
|
|
160
|
+
isLast ? "bg-transparent" : afterFilled ? "bg-status-success-icon" : "bg-border/60"
|
|
161
|
+
)
|
|
162
|
+
}
|
|
163
|
+
)
|
|
164
|
+
] }),
|
|
165
|
+
/* @__PURE__ */ jsxs("div", { className: "flex max-w-[12rem] flex-col items-center gap-0.5 text-center", children: [
|
|
166
|
+
/* @__PURE__ */ jsx(
|
|
167
|
+
"div",
|
|
168
|
+
{
|
|
169
|
+
className: cn(
|
|
170
|
+
"text-xs leading-[1.2]",
|
|
171
|
+
isCurrent ? "font-bold text-foreground" : isFuture ? "font-medium text-muted-foreground" : "font-semibold text-foreground"
|
|
172
|
+
),
|
|
173
|
+
children: stage.label
|
|
174
|
+
}
|
|
175
|
+
),
|
|
176
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground", children: formatStageSubtitle(transition, isCurrent, t) })
|
|
177
|
+
] })
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
stage.id
|
|
181
|
+
);
|
|
182
|
+
}) }),
|
|
183
|
+
footer ? /* @__PURE__ */ jsx("div", { className: "mt-5 border-t border-border/80 pt-4", children: footer }) : null
|
|
184
|
+
]
|
|
185
|
+
}
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
export {
|
|
189
|
+
PipelineStepper
|
|
190
|
+
};
|
|
191
|
+
//# sourceMappingURL=PipelineStepper.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/modules/customers/components/detail/PipelineStepper.tsx"],
|
|
4
|
+
"sourcesContent": ["\"use client\"\n\nimport * as React from 'react'\nimport { Check } from 'lucide-react'\nimport { cn } from '@open-mercato/shared/lib/utils'\nimport { useT } from '@open-mercato/shared/lib/i18n/context'\nimport { isTerminalPipelineOutcomeLabel } from './pipelineStageUtils'\n\ntype PipelineStageInfo = {\n id: string\n label: string\n order: number\n color?: string | null\n icon?: string | null\n}\n\ntype StageTransitionInfo = {\n stageId: string\n stageLabel: string\n stageOrder: number\n transitionedAt: string\n}\n\ntype PipelineStepperProps = {\n stages: PipelineStageInfo[]\n transitions: StageTransitionInfo[]\n currentStageId: string | null\n pipelineName?: string | null\n closureOutcome?: 'won' | 'lost' | null\n footer?: React.ReactNode\n}\n\nfunction isTerminalOutcomeStage(stage: PipelineStageInfo): boolean {\n return isTerminalPipelineOutcomeLabel(stage.label)\n}\n\nfunction formatTransitionDate(value: string, t: ReturnType<typeof useT>): string {\n const date = new Date(value)\n if (Number.isNaN(date.getTime())) return t('customers.deals.detail.pipeline.current', 'current')\n return date.toLocaleDateString(undefined, { month: 'short', day: 'numeric' })\n}\n\nfunction formatStageSubtitle(\n transition: StageTransitionInfo | null,\n isCurrent: boolean,\n t: ReturnType<typeof useT>,\n): string {\n if (transition && isCurrent) {\n return t('customers.deals.detail.pipeline.currentWithDate', '{{date}} \u00B7 {{state}}', {\n date: formatTransitionDate(transition.transitionedAt, t),\n state: t('customers.deals.detail.pipeline.current', 'current'),\n })\n }\n if (transition) return formatTransitionDate(transition.transitionedAt, t)\n if (isCurrent) return t('customers.deals.detail.pipeline.current', 'current')\n return '\u2014'\n}\n\nexport function PipelineStepper({\n stages,\n transitions,\n currentStageId,\n pipelineName,\n closureOutcome = null,\n footer = null,\n}: PipelineStepperProps) {\n const t = useT()\n const allStages = React.useMemo(\n () => [...stages].sort((left, right) => left.order - right.order),\n [stages],\n )\n const sortedStages = React.useMemo(\n () => allStages.filter((stage) => !isTerminalOutcomeStage(stage)),\n [allStages],\n )\n const transitionByStageId = React.useMemo(\n () => new Map(transitions.map((transition) => [transition.stageId, transition])),\n [transitions],\n )\n const lastVisibleTransitionStage = React.useMemo(() => {\n const transitionedStageIds = new Set(transitions.map((transition) => transition.stageId))\n const visibleTransitionStages = sortedStages.filter((stage) => transitionedStageIds.has(stage.id))\n return visibleTransitionStages[visibleTransitionStages.length - 1] ?? null\n }, [sortedStages, transitions])\n const currentVisibleStage = React.useMemo(() => {\n const exactVisibleStage = sortedStages.find((stage) => stage.id === currentStageId) ?? null\n if (exactVisibleStage) return exactVisibleStage\n const currentStage = allStages.find((stage) => stage.id === currentStageId) ?? null\n if (currentStage && isTerminalOutcomeStage(currentStage)) {\n const earlierVisibleStages = sortedStages.filter((stage) => stage.order < currentStage.order)\n return earlierVisibleStages[earlierVisibleStages.length - 1] ?? sortedStages[sortedStages.length - 1] ?? null\n }\n return lastVisibleTransitionStage\n }, [allStages, currentStageId, lastVisibleTransitionStage, sortedStages])\n const currentIndex = currentVisibleStage ? sortedStages.findIndex((stage) => stage.id === currentVisibleStage.id) : -1\n const compactStage = currentVisibleStage ?? sortedStages[0] ?? null\n const renderClosedProgress = closureOutcome !== null\n const progressValue = currentIndex >= 0 ? currentIndex + 1 : 0\n const progressValueText = renderClosedProgress\n ? closureOutcome === 'won'\n ? t('customers.deals.detail.pipeline.ariaClosedWon', 'Pipeline closed \u2014 deal won.')\n : t('customers.deals.detail.pipeline.ariaClosedLost', 'Pipeline closed \u2014 deal lost.')\n : t('customers.deals.detail.pipeline.ariaValueText', 'Stage {{current}} of {{total}}: {{label}}', {\n current: progressValue,\n total: sortedStages.length,\n label: currentVisibleStage?.label ?? t('customers.deals.detail.pipeline.noCurrent', 'no current stage'),\n })\n const progressLabel = pipelineName\n ? t('customers.deals.detail.pipeline.ariaLabelNamed', 'Pipeline progress \u2014 {{name}}', { name: pipelineName })\n : t('customers.deals.detail.pipeline.ariaLabel', 'Pipeline progress')\n\n if (!sortedStages.length) return null\n\n return (\n <div\n className=\"rounded-lg border border-border bg-card px-5 py-3.5 sm:px-6\"\n role=\"progressbar\"\n aria-label={progressLabel}\n aria-valuemin={0}\n aria-valuemax={sortedStages.length}\n aria-valuenow={progressValue}\n aria-valuetext={progressValueText}\n >\n <div className=\"mb-5 flex flex-wrap items-center gap-2 text-xs leading-none\">\n <p className=\"font-semibold uppercase tracking-[0.02em] text-muted-foreground\">\n {t('customers.deals.detail.pipeline.label', 'Pipeline stages')}\n </p>\n <span className=\"text-border\">\u00B7</span>\n <p className=\"font-normal text-muted-foreground\">\n {t('customers.deals.detail.pipeline.stageOf', 'Stage {{current}} of {{total}}', {\n current: currentIndex >= 0 ? currentIndex + 1 : 0,\n total: sortedStages.length,\n })}\n </p>\n <span className=\"text-border\">\u00B7</span>\n <p className=\"font-normal text-muted-foreground\">\n {pipelineName ?? t('customers.deals.detail.pipeline.defaultName', 'Current pipeline')}\n </p>\n </div>\n\n <div className=\"space-y-4 sm:hidden\">\n {compactStage ? (\n <div\n className=\"rounded-lg border border-border bg-muted/20 px-4 py-4\"\n aria-current={!renderClosedProgress && compactStage.id === currentVisibleStage?.id ? 'step' : undefined}\n >\n <div className=\"flex items-center gap-3\">\n <div\n className={cn(\n 'flex size-9 items-center justify-center rounded-full border-2 bg-background text-foreground',\n renderClosedProgress ? 'border-status-success-icon bg-status-success-icon text-white' : 'border-foreground',\n )}\n >\n {renderClosedProgress ? (\n <Check className=\"size-4 stroke-[2.5]\" />\n ) : (\n <span className=\"text-sm font-semibold leading-none\">\n {(currentIndex >= 0 ? currentIndex : 0) + 1}\n </span>\n )}\n </div>\n <div className=\"min-w-0\">\n <div className=\"truncate text-sm font-semibold text-foreground\">{compactStage.label}</div>\n <div className=\"text-xs text-muted-foreground\">\n {formatStageSubtitle(transitionByStageId.get(compactStage.id) ?? null, !renderClosedProgress, t)}\n </div>\n </div>\n </div>\n </div>\n ) : null}\n </div>\n\n <div className=\"hidden min-h-[115px] items-start sm:flex\">\n {sortedStages.map((stage, index) => {\n const transition = transitionByStageId.get(stage.id) ?? null\n const isCurrent = !renderClosedProgress && currentVisibleStage?.id === stage.id\n const isCompleted = renderClosedProgress\n ? currentIndex >= 0 && index <= currentIndex\n : !isCurrent && (transition !== null || (currentIndex >= 0 && index < currentIndex))\n const isFuture = !isCurrent && !isCompleted\n const isFirst = index === 0\n const isLast = index === sortedStages.length - 1\n const beforeFilled = renderClosedProgress ? index <= currentIndex : index <= currentIndex\n const afterFilled = renderClosedProgress ? index < currentIndex : index < currentIndex\n\n return (\n <div\n key={stage.id}\n className=\"flex min-w-0 flex-1 flex-col items-center justify-center gap-2\"\n aria-current={isCurrent ? 'step' : undefined}\n >\n <div className=\"flex w-full items-center\" aria-hidden=\"true\">\n <div\n className={cn(\n 'h-[2px] flex-1',\n isFirst ? 'bg-transparent' : beforeFilled ? 'bg-status-success-icon' : 'bg-border/60',\n )}\n />\n <div\n className={cn(\n 'mx-0 flex size-9 items-center justify-center rounded-full border-2 text-sm leading-none transition-colors',\n isCurrent && 'border-foreground bg-background font-bold text-foreground',\n isCompleted && !isCurrent && 'border-status-success-icon bg-status-success-icon text-white',\n isFuture && 'border-border bg-background font-medium text-muted-foreground',\n )}\n >\n {isCompleted ? (\n <Check className=\"size-4 stroke-[2.5]\" />\n ) : (\n <span>{index + 1}</span>\n )}\n </div>\n <div\n className={cn(\n 'h-[2px] flex-1',\n isLast ? 'bg-transparent' : afterFilled ? 'bg-status-success-icon' : 'bg-border/60',\n )}\n />\n </div>\n <div className=\"flex max-w-[12rem] flex-col items-center gap-0.5 text-center\">\n <div\n className={cn(\n 'text-xs leading-[1.2]',\n isCurrent ? 'font-bold text-foreground' : isFuture ? 'font-medium text-muted-foreground' : 'font-semibold text-foreground',\n )}\n >\n {stage.label}\n </div>\n <div className=\"text-xs text-muted-foreground\">\n {formatStageSubtitle(transition, isCurrent, t)}\n </div>\n </div>\n </div>\n )\n })}\n </div>\n\n {footer ? (\n <div className=\"mt-5 border-t border-border/80 pt-4\">\n {footer}\n </div>\n ) : null}\n </div>\n )\n}\n"],
|
|
5
|
+
"mappings": ";AA2HM,SACE,KADF;AAzHN,YAAY,WAAW;AACvB,SAAS,aAAa;AACtB,SAAS,UAAU;AACnB,SAAS,YAAY;AACrB,SAAS,sCAAsC;AA0B/C,SAAS,uBAAuB,OAAmC;AACjE,SAAO,+BAA+B,MAAM,KAAK;AACnD;AAEA,SAAS,qBAAqB,OAAe,GAAoC;AAC/E,QAAM,OAAO,IAAI,KAAK,KAAK;AAC3B,MAAI,OAAO,MAAM,KAAK,QAAQ,CAAC,EAAG,QAAO,EAAE,2CAA2C,SAAS;AAC/F,SAAO,KAAK,mBAAmB,QAAW,EAAE,OAAO,SAAS,KAAK,UAAU,CAAC;AAC9E;AAEA,SAAS,oBACP,YAC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