@open-mercato/core 0.4.5-develop-754ef4d2f0 → 0.4.5-develop-9f9549ebc8
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/dist/generated/entities/message/index.js +65 -0
- package/dist/generated/entities/message/index.js.map +7 -0
- package/dist/generated/entities/message_access_token/index.js +19 -0
- package/dist/generated/entities/message_access_token/index.js.map +7 -0
- package/dist/generated/entities/message_confirmation/index.js +21 -0
- package/dist/generated/entities/message_confirmation/index.js.map +7 -0
- package/dist/generated/entities/message_object/index.js +23 -0
- package/dist/generated/entities/message_object/index.js.map +7 -0
- package/dist/generated/entities/message_recipient/index.js +31 -0
- package/dist/generated/entities/message_recipient/index.js.map +7 -0
- package/dist/generated/entities.ids.generated.js +8 -0
- package/dist/generated/entities.ids.generated.js.map +2 -2
- package/dist/generated/entity-fields-registry.js +10 -0
- package/dist/generated/entity-fields-registry.js.map +2 -2
- package/dist/modules/auth/components/AclEditor.js +4 -2
- package/dist/modules/auth/components/AclEditor.js.map +2 -2
- package/dist/modules/auth/frontend/reset.js +3 -3
- package/dist/modules/auth/frontend/reset.js.map +2 -2
- package/dist/modules/customers/backend/customers/deals/[id]/page.js +27 -8
- package/dist/modules/customers/backend/customers/deals/[id]/page.js.map +2 -2
- package/dist/modules/customers/lib/messageObjectPreviews.js +131 -0
- package/dist/modules/customers/lib/messageObjectPreviews.js.map +7 -0
- package/dist/modules/customers/message-objects.js +71 -0
- package/dist/modules/customers/message-objects.js.map +7 -0
- package/dist/modules/customers/widgets/messages/CustomerMessageObjectDetail.js +51 -0
- package/dist/modules/customers/widgets/messages/CustomerMessageObjectDetail.js.map +7 -0
- package/dist/modules/customers/widgets/messages/CustomerMessageObjectPreview.js +35 -0
- package/dist/modules/customers/widgets/messages/CustomerMessageObjectPreview.js.map +7 -0
- package/dist/modules/customers/widgets/messages/index.js +7 -0
- package/dist/modules/customers/widgets/messages/index.js.map +7 -0
- package/dist/modules/dashboards/components/WidgetVisibilityEditor.js +35 -6
- package/dist/modules/dashboards/components/WidgetVisibilityEditor.js.map +2 -2
- package/dist/modules/messages/acl.js +15 -0
- package/dist/modules/messages/acl.js.map +7 -0
- package/dist/modules/messages/api/[id]/actions/[actionId]/route.js +92 -0
- package/dist/modules/messages/api/[id]/actions/[actionId]/route.js.map +7 -0
- package/dist/modules/messages/api/[id]/archive/route.js +120 -0
- package/dist/modules/messages/api/[id]/archive/route.js.map +7 -0
- package/dist/modules/messages/api/[id]/attachments/route.js +195 -0
- package/dist/modules/messages/api/[id]/attachments/route.js.map +7 -0
- package/dist/modules/messages/api/[id]/confirmation/route.js +67 -0
- package/dist/modules/messages/api/[id]/confirmation/route.js.map +7 -0
- package/dist/modules/messages/api/[id]/conversation/archive/route.js +68 -0
- package/dist/modules/messages/api/[id]/conversation/archive/route.js.map +7 -0
- package/dist/modules/messages/api/[id]/conversation/read/route.js +68 -0
- package/dist/modules/messages/api/[id]/conversation/read/route.js.map +7 -0
- package/dist/modules/messages/api/[id]/conversation/route.js +68 -0
- package/dist/modules/messages/api/[id]/conversation/route.js.map +7 -0
- package/dist/modules/messages/api/[id]/forward/route.js +85 -0
- package/dist/modules/messages/api/[id]/forward/route.js.map +7 -0
- package/dist/modules/messages/api/[id]/forward-preview/route.js +70 -0
- package/dist/modules/messages/api/[id]/forward-preview/route.js.map +7 -0
- package/dist/modules/messages/api/[id]/read/route.js +120 -0
- package/dist/modules/messages/api/[id]/read/route.js.map +7 -0
- package/dist/modules/messages/api/[id]/reply/route.js +87 -0
- package/dist/modules/messages/api/[id]/reply/route.js.map +7 -0
- package/dist/modules/messages/api/[id]/route.js +350 -0
- package/dist/modules/messages/api/[id]/route.js.map +7 -0
- package/dist/modules/messages/api/object-types/route.js +54 -0
- package/dist/modules/messages/api/object-types/route.js.map +7 -0
- package/dist/modules/messages/api/openapi.js +261 -0
- package/dist/modules/messages/api/openapi.js.map +7 -0
- package/dist/modules/messages/api/route.js +262 -0
- package/dist/modules/messages/api/route.js.map +7 -0
- package/dist/modules/messages/api/token/[token]/route.js +99 -0
- package/dist/modules/messages/api/token/[token]/route.js.map +7 -0
- package/dist/modules/messages/api/types/route.js +40 -0
- package/dist/modules/messages/api/types/route.js.map +7 -0
- package/dist/modules/messages/api/unread-count/route.js +43 -0
- package/dist/modules/messages/api/unread-count/route.js.map +7 -0
- package/dist/modules/messages/backend/messages/[id]/page.js +10 -0
- package/dist/modules/messages/backend/messages/[id]/page.js.map +7 -0
- package/dist/modules/messages/backend/messages/[id]/page.meta.js +16 -0
- package/dist/modules/messages/backend/messages/[id]/page.meta.js.map +7 -0
- package/dist/modules/messages/backend/messages/compose/page.js +10 -0
- package/dist/modules/messages/backend/messages/compose/page.js.map +7 -0
- package/dist/modules/messages/backend/messages/compose/page.meta.js +17 -0
- package/dist/modules/messages/backend/messages/compose/page.meta.js.map +7 -0
- package/dist/modules/messages/backend/page.js +10 -0
- package/dist/modules/messages/backend/page.js.map +7 -0
- package/dist/modules/messages/backend/page.meta.js +33 -0
- package/dist/modules/messages/backend/page.meta.js.map +7 -0
- package/dist/modules/messages/commands/actions.js +265 -0
- package/dist/modules/messages/commands/actions.js.map +7 -0
- package/dist/modules/messages/commands/attachments.js +217 -0
- package/dist/modules/messages/commands/attachments.js.map +7 -0
- package/dist/modules/messages/commands/confirmations.js +151 -0
- package/dist/modules/messages/commands/confirmations.js.map +7 -0
- package/dist/modules/messages/commands/conversation.js +240 -0
- package/dist/modules/messages/commands/conversation.js.map +7 -0
- package/dist/modules/messages/commands/messages.js +748 -0
- package/dist/modules/messages/commands/messages.js.map +7 -0
- package/dist/modules/messages/commands/recipients.js +259 -0
- package/dist/modules/messages/commands/recipients.js.map +7 -0
- package/dist/modules/messages/commands/shared.js +258 -0
- package/dist/modules/messages/commands/shared.js.map +7 -0
- package/dist/modules/messages/commands/tokens.js +69 -0
- package/dist/modules/messages/commands/tokens.js.map +7 -0
- package/dist/modules/messages/components/ComposeMessagePageClient.js +24 -0
- package/dist/modules/messages/components/ComposeMessagePageClient.js.map +7 -0
- package/dist/modules/messages/components/MessageDetailPageClient.js +261 -0
- package/dist/modules/messages/components/MessageDetailPageClient.js.map +7 -0
- package/dist/modules/messages/components/MessagesInboxPageClient.js +390 -0
- package/dist/modules/messages/components/MessagesInboxPageClient.js.map +7 -0
- package/dist/modules/messages/components/confirmation/MessageConfirmationActions.js +31 -0
- package/dist/modules/messages/components/confirmation/MessageConfirmationActions.js.map +7 -0
- package/dist/modules/messages/components/confirmation/MessageConfirmationContent.js +69 -0
- package/dist/modules/messages/components/confirmation/MessageConfirmationContent.js.map +7 -0
- package/dist/modules/messages/components/defaults/DefaultMessageActions.js +31 -0
- package/dist/modules/messages/components/defaults/DefaultMessageActions.js.map +7 -0
- package/dist/modules/messages/components/defaults/DefaultMessageContent.js +19 -0
- package/dist/modules/messages/components/defaults/DefaultMessageContent.js.map +7 -0
- package/dist/modules/messages/components/defaults/DefaultMessageListItem.js +90 -0
- package/dist/modules/messages/components/defaults/DefaultMessageListItem.js.map +7 -0
- package/dist/modules/messages/components/defaults/MessageRecordObjectDetail.js +86 -0
- package/dist/modules/messages/components/defaults/MessageRecordObjectDetail.js.map +7 -0
- package/dist/modules/messages/components/defaults/MessageRecordObjectPreview.js +61 -0
- package/dist/modules/messages/components/defaults/MessageRecordObjectPreview.js.map +7 -0
- package/dist/modules/messages/components/message-detail/detail-panels.js +27 -0
- package/dist/modules/messages/components/message-detail/detail-panels.js.map +7 -0
- package/dist/modules/messages/components/message-detail/hooks/useMessageDetails.js +52 -0
- package/dist/modules/messages/components/message-detail/hooks/useMessageDetails.js.map +7 -0
- package/dist/modules/messages/components/message-detail/hooks/useMessageDetailsActions.js +289 -0
- package/dist/modules/messages/components/message-detail/hooks/useMessageDetailsActions.js.map +7 -0
- package/dist/modules/messages/components/message-detail/hooks/useMessageDetailsConversation.js +103 -0
- package/dist/modules/messages/components/message-detail/hooks/useMessageDetailsConversation.js.map +7 -0
- package/dist/modules/messages/components/message-detail/hooks/useMessageDetailsQueries.js +78 -0
- package/dist/modules/messages/components/message-detail/hooks/useMessageDetailsQueries.js.map +7 -0
- package/dist/modules/messages/components/message-detail/panels/MainMessageHeader.js +94 -0
- package/dist/modules/messages/components/message-detail/panels/MainMessageHeader.js.map +7 -0
- package/dist/modules/messages/components/message-detail/panels/MessageHeader.js +110 -0
- package/dist/modules/messages/components/message-detail/panels/MessageHeader.js.map +7 -0
- package/dist/modules/messages/components/message-detail/panels/MessageListComponent.js +58 -0
- package/dist/modules/messages/components/message-detail/panels/MessageListComponent.js.map +7 -0
- package/dist/modules/messages/components/message-detail/panels/actions-panel.js +51 -0
- package/dist/modules/messages/components/message-detail/panels/actions-panel.js.map +7 -0
- package/dist/modules/messages/components/message-detail/panels/attachments-panel.js +66 -0
- package/dist/modules/messages/components/message-detail/panels/attachments-panel.js.map +7 -0
- package/dist/modules/messages/components/message-detail/panels/body-panel.js +20 -0
- package/dist/modules/messages/components/message-detail/panels/body-panel.js.map +7 -0
- package/dist/modules/messages/components/message-detail/panels/composer-dialogs.js +36 -0
- package/dist/modules/messages/components/message-detail/panels/composer-dialogs.js.map +7 -0
- package/dist/modules/messages/components/message-detail/panels/dialogs.js +96 -0
- package/dist/modules/messages/components/message-detail/panels/dialogs.js.map +7 -0
- package/dist/modules/messages/components/message-detail/panels/index.js +25 -0
- package/dist/modules/messages/components/message-detail/panels/index.js.map +7 -0
- package/dist/modules/messages/components/message-detail/panels/meta-panel.js +14 -0
- package/dist/modules/messages/components/message-detail/panels/meta-panel.js.map +7 -0
- package/dist/modules/messages/components/message-detail/panels/objects-panel.js +51 -0
- package/dist/modules/messages/components/message-detail/panels/objects-panel.js.map +7 -0
- package/dist/modules/messages/components/message-detail/panels/thread-panel.js +54 -0
- package/dist/modules/messages/components/message-detail/panels/thread-panel.js.map +7 -0
- package/dist/modules/messages/components/message-detail/types.js +1 -0
- package/dist/modules/messages/components/message-detail/types.js.map +7 -0
- package/dist/modules/messages/components/message-detail/utils.js +54 -0
- package/dist/modules/messages/components/message-detail/utils.js.map +7 -0
- package/dist/modules/messages/components/utils/PriorityBadge.js +52 -0
- package/dist/modules/messages/components/utils/PriorityBadge.js.map +7 -0
- package/dist/modules/messages/components/utils/typeUiRegistry.js +77 -0
- package/dist/modules/messages/components/utils/typeUiRegistry.js.map +7 -0
- package/dist/modules/messages/data/entities.js +309 -0
- package/dist/modules/messages/data/entities.js.map +7 -0
- package/dist/modules/messages/data/validators.js +272 -0
- package/dist/modules/messages/data/validators.js.map +7 -0
- package/dist/modules/messages/emails/MessageEmail.js +108 -0
- package/dist/modules/messages/emails/MessageEmail.js.map +7 -0
- package/dist/modules/messages/events.js +24 -0
- package/dist/modules/messages/events.js.map +7 -0
- package/dist/modules/messages/frontend/messages/view/[token]/page.js +247 -0
- package/dist/modules/messages/frontend/messages/view/[token]/page.js.map +7 -0
- package/dist/modules/messages/frontend/messages/view/[token]/page.meta.js +9 -0
- package/dist/modules/messages/frontend/messages/view/[token]/page.meta.js.map +7 -0
- package/dist/modules/messages/index.js +21 -0
- package/dist/modules/messages/index.js.map +7 -0
- package/dist/modules/messages/lib/actions.js +141 -0
- package/dist/modules/messages/lib/actions.js.map +7 -0
- package/dist/modules/messages/lib/attachments.js +131 -0
- package/dist/modules/messages/lib/attachments.js.map +7 -0
- package/dist/modules/messages/lib/constants.js +7 -0
- package/dist/modules/messages/lib/constants.js.map +7 -0
- package/dist/modules/messages/lib/email-sender.js +201 -0
- package/dist/modules/messages/lib/email-sender.js.map +7 -0
- package/dist/modules/messages/lib/forwarding.js +179 -0
- package/dist/modules/messages/lib/forwarding.js.map +7 -0
- package/dist/modules/messages/lib/message-objects-registry.js +49 -0
- package/dist/modules/messages/lib/message-objects-registry.js.map +7 -0
- package/dist/modules/messages/lib/message-types-registry.js +41 -0
- package/dist/modules/messages/lib/message-types-registry.js.map +7 -0
- package/dist/modules/messages/lib/object-validation.js +20 -0
- package/dist/modules/messages/lib/object-validation.js.map +7 -0
- package/dist/modules/messages/lib/operationMetadata.js +21 -0
- package/dist/modules/messages/lib/operationMetadata.js.map +7 -0
- package/dist/modules/messages/lib/priorityUtils.js +61 -0
- package/dist/modules/messages/lib/priorityUtils.js.map +7 -0
- package/dist/modules/messages/lib/routeHelpers.js +44 -0
- package/dist/modules/messages/lib/routeHelpers.js.map +7 -0
- package/dist/modules/messages/message-objects.js +7 -0
- package/dist/modules/messages/message-objects.js.map +7 -0
- package/dist/modules/messages/message-types.js +67 -0
- package/dist/modules/messages/message-types.js.map +7 -0
- package/dist/modules/messages/migrations/Migration20260213181243.js +31 -0
- package/dist/modules/messages/migrations/Migration20260213181243.js.map +7 -0
- package/dist/modules/messages/migrations/Migration20260215165126.js +16 -0
- package/dist/modules/messages/migrations/Migration20260215165126.js.map +7 -0
- package/dist/modules/messages/notifications.js +27 -0
- package/dist/modules/messages/notifications.js.map +7 -0
- package/dist/modules/messages/setup.js +21 -0
- package/dist/modules/messages/setup.js.map +7 -0
- package/dist/modules/messages/subscribers/message-notification.js +108 -0
- package/dist/modules/messages/subscribers/message-notification.js.map +7 -0
- package/dist/modules/messages/workers/send-email.worker.js +253 -0
- package/dist/modules/messages/workers/send-email.worker.js.map +7 -0
- package/dist/modules/sales/backend/sales/documents/[id]/page.js +30 -11
- package/dist/modules/sales/backend/sales/documents/[id]/page.js.map +2 -2
- package/dist/modules/sales/commands/payments.js +12 -6
- package/dist/modules/sales/commands/payments.js.map +2 -2
- package/dist/modules/sales/lib/messageObjectPreviews.js +114 -0
- package/dist/modules/sales/lib/messageObjectPreviews.js.map +7 -0
- package/dist/modules/sales/message-objects.js +57 -0
- package/dist/modules/sales/message-objects.js.map +7 -0
- package/dist/modules/sales/widgets/messages/SalesDocumentMessageDetail.js +51 -0
- package/dist/modules/sales/widgets/messages/SalesDocumentMessageDetail.js.map +7 -0
- package/dist/modules/sales/widgets/messages/SalesDocumentMessagePreview.js +36 -0
- package/dist/modules/sales/widgets/messages/SalesDocumentMessagePreview.js.map +7 -0
- package/dist/modules/sales/widgets/messages/index.js +7 -0
- package/dist/modules/sales/widgets/messages/index.js.map +7 -0
- package/dist/modules/staff/backend/staff/leave-requests/[id]/page.js +55 -1
- package/dist/modules/staff/backend/staff/leave-requests/[id]/page.js.map +2 -2
- package/dist/modules/staff/backend/staff/my-leave-requests/[id]/page.js +60 -1
- package/dist/modules/staff/backend/staff/my-leave-requests/[id]/page.js.map +2 -2
- package/dist/modules/staff/backend/staff/team-members/[id]/page.js +2 -19
- package/dist/modules/staff/backend/staff/team-members/[id]/page.js.map +2 -2
- package/dist/modules/staff/components/LeaveRequestDetail.js +112 -0
- package/dist/modules/staff/components/LeaveRequestDetail.js.map +7 -0
- package/dist/modules/staff/components/LeaveRequestForm.js +3 -1
- package/dist/modules/staff/components/LeaveRequestForm.js.map +2 -2
- package/dist/modules/staff/components/LeaveRequestPreview.js +43 -0
- package/dist/modules/staff/components/LeaveRequestPreview.js.map +7 -0
- package/dist/modules/staff/lib/messageObjectPreviews.js +148 -0
- package/dist/modules/staff/lib/messageObjectPreviews.js.map +7 -0
- package/dist/modules/staff/message-objects.js +104 -0
- package/dist/modules/staff/message-objects.js.map +7 -0
- package/dist/modules/staff/message-types.js +23 -0
- package/dist/modules/staff/message-types.js.map +7 -0
- package/dist/modules/staff/widgets/messages/StaffMessageObjectDetail.js +51 -0
- package/dist/modules/staff/widgets/messages/StaffMessageObjectDetail.js.map +7 -0
- package/dist/modules/staff/widgets/messages/StaffMessageObjectPreview.js +34 -0
- package/dist/modules/staff/widgets/messages/StaffMessageObjectPreview.js.map +7 -0
- package/dist/modules/staff/widgets/messages/index.js +7 -0
- package/dist/modules/staff/widgets/messages/index.js.map +7 -0
- package/dist/modules/workflows/backend/definitions/visual-editor/page.js +6 -6
- package/dist/modules/workflows/backend/definitions/visual-editor/page.js.map +2 -2
- package/generated/entities/message/index.ts +31 -0
- package/generated/entities/message_access_token/index.ts +8 -0
- package/generated/entities/message_confirmation/index.ts +9 -0
- package/generated/entities/message_object/index.ts +10 -0
- package/generated/entities/message_recipient/index.ts +14 -0
- package/generated/entities.ids.generated.ts +8 -0
- package/generated/entity-fields-registry.ts +10 -0
- package/jest.setup.ts +5 -0
- package/package.json +2 -2
- 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/auth/components/AclEditor.tsx +4 -2
- package/src/modules/auth/frontend/reset.tsx +3 -3
- package/src/modules/auth/i18n/de.json +5 -0
- package/src/modules/auth/i18n/en.json +5 -0
- package/src/modules/auth/i18n/es.json +5 -0
- package/src/modules/auth/i18n/pl.json +5 -0
- package/src/modules/catalog/i18n/de.json +21 -0
- package/src/modules/catalog/i18n/en.json +21 -0
- package/src/modules/catalog/i18n/es.json +21 -0
- package/src/modules/catalog/i18n/pl.json +21 -0
- package/src/modules/currencies/i18n/de.json +6 -0
- package/src/modules/currencies/i18n/en.json +6 -0
- package/src/modules/currencies/i18n/es.json +6 -0
- package/src/modules/currencies/i18n/pl.json +6 -0
- package/src/modules/customers/backend/customers/deals/[id]/page.tsx +20 -4
- package/src/modules/customers/i18n/de.json +26 -1
- package/src/modules/customers/i18n/en.json +25 -0
- package/src/modules/customers/i18n/es.json +25 -0
- package/src/modules/customers/i18n/pl.json +25 -0
- package/src/modules/customers/lib/messageObjectPreviews.ts +154 -0
- package/src/modules/customers/message-objects.ts +70 -0
- package/src/modules/customers/widgets/messages/CustomerMessageObjectDetail.tsx +57 -0
- package/src/modules/customers/widgets/messages/CustomerMessageObjectPreview.tsx +49 -0
- package/src/modules/customers/widgets/messages/index.ts +2 -0
- package/src/modules/dashboards/components/WidgetVisibilityEditor.tsx +41 -5
- package/src/modules/dashboards/i18n/de.json +5 -1
- package/src/modules/dashboards/i18n/en.json +5 -1
- package/src/modules/dashboards/i18n/es.json +5 -1
- package/src/modules/dashboards/i18n/pl.json +5 -1
- package/src/modules/dictionaries/i18n/de.json +14 -1
- package/src/modules/dictionaries/i18n/en.json +14 -1
- package/src/modules/dictionaries/i18n/es.json +14 -1
- package/src/modules/dictionaries/i18n/pl.json +14 -1
- package/src/modules/feature_toggles/i18n/de.json +3 -0
- package/src/modules/feature_toggles/i18n/en.json +3 -0
- package/src/modules/feature_toggles/i18n/es.json +3 -0
- package/src/modules/feature_toggles/i18n/pl.json +3 -0
- package/src/modules/messages/acl.ts +11 -0
- package/src/modules/messages/api/[id]/actions/[actionId]/route.ts +103 -0
- package/src/modules/messages/api/[id]/archive/route.ts +138 -0
- package/src/modules/messages/api/[id]/attachments/route.ts +217 -0
- package/src/modules/messages/api/[id]/confirmation/route.ts +73 -0
- package/src/modules/messages/api/[id]/conversation/archive/route.ts +69 -0
- package/src/modules/messages/api/[id]/conversation/read/route.ts +69 -0
- package/src/modules/messages/api/[id]/conversation/route.ts +69 -0
- package/src/modules/messages/api/[id]/forward/route.ts +87 -0
- package/src/modules/messages/api/[id]/forward-preview/route.ts +75 -0
- package/src/modules/messages/api/[id]/read/route.ts +138 -0
- package/src/modules/messages/api/[id]/reply/route.ts +89 -0
- package/src/modules/messages/api/[id]/route.ts +401 -0
- package/src/modules/messages/api/object-types/route.ts +54 -0
- package/src/modules/messages/api/openapi.ts +261 -0
- package/src/modules/messages/api/route.ts +374 -0
- package/src/modules/messages/api/token/[token]/route.ts +103 -0
- package/src/modules/messages/api/types/route.ts +39 -0
- package/src/modules/messages/api/unread-count/route.ts +55 -0
- package/src/modules/messages/backend/messages/[id]/page.meta.ts +12 -0
- package/src/modules/messages/backend/messages/[id]/page.tsx +12 -0
- package/src/modules/messages/backend/messages/compose/page.meta.ts +13 -0
- package/src/modules/messages/backend/messages/compose/page.tsx +12 -0
- package/src/modules/messages/backend/page.meta.ts +31 -0
- package/src/modules/messages/backend/page.tsx +12 -0
- package/src/modules/messages/commands/actions.ts +307 -0
- package/src/modules/messages/commands/attachments.ts +227 -0
- package/src/modules/messages/commands/confirmations.ts +183 -0
- package/src/modules/messages/commands/conversation.ts +292 -0
- package/src/modules/messages/commands/messages.ts +845 -0
- package/src/modules/messages/commands/recipients.ts +281 -0
- package/src/modules/messages/commands/shared.ts +350 -0
- package/src/modules/messages/commands/tokens.ts +80 -0
- package/src/modules/messages/components/ComposeMessagePageClient.tsx +23 -0
- package/src/modules/messages/components/MessageDetailPageClient.tsx +287 -0
- package/src/modules/messages/components/MessagesInboxPageClient.tsx +469 -0
- package/src/modules/messages/components/confirmation/MessageConfirmationActions.tsx +35 -0
- package/src/modules/messages/components/confirmation/MessageConfirmationContent.tsx +88 -0
- package/src/modules/messages/components/defaults/DefaultMessageActions.tsx +37 -0
- package/src/modules/messages/components/defaults/DefaultMessageContent.tsx +21 -0
- package/src/modules/messages/components/defaults/DefaultMessageListItem.tsx +102 -0
- package/src/modules/messages/components/defaults/MessageRecordObjectDetail.tsx +114 -0
- package/src/modules/messages/components/defaults/MessageRecordObjectPreview.tsx +74 -0
- package/src/modules/messages/components/message-detail/detail-panels.ts +13 -0
- package/src/modules/messages/components/message-detail/hooks/useMessageDetails.ts +56 -0
- package/src/modules/messages/components/message-detail/hooks/useMessageDetailsActions.ts +367 -0
- package/src/modules/messages/components/message-detail/hooks/useMessageDetailsConversation.ts +134 -0
- package/src/modules/messages/components/message-detail/hooks/useMessageDetailsQueries.ts +102 -0
- package/src/modules/messages/components/message-detail/panels/MainMessageHeader.tsx +108 -0
- package/src/modules/messages/components/message-detail/panels/MessageHeader.tsx +144 -0
- package/src/modules/messages/components/message-detail/panels/MessageListComponent.tsx +63 -0
- package/src/modules/messages/components/message-detail/panels/actions-panel.tsx +66 -0
- package/src/modules/messages/components/message-detail/panels/attachments-panel.tsx +86 -0
- package/src/modules/messages/components/message-detail/panels/body-panel.tsx +32 -0
- package/src/modules/messages/components/message-detail/panels/composer-dialogs.tsx +42 -0
- package/src/modules/messages/components/message-detail/panels/dialogs.tsx +107 -0
- package/src/modules/messages/components/message-detail/panels/index.ts +11 -0
- package/src/modules/messages/components/message-detail/panels/meta-panel.tsx +19 -0
- package/src/modules/messages/components/message-detail/panels/objects-panel.tsx +65 -0
- package/src/modules/messages/components/message-detail/panels/thread-panel.tsx +65 -0
- package/src/modules/messages/components/message-detail/types.ts +114 -0
- package/src/modules/messages/components/message-detail/utils.ts +62 -0
- package/src/modules/messages/components/utils/PriorityBadge.tsx +63 -0
- package/src/modules/messages/components/utils/typeUiRegistry.ts +106 -0
- package/src/modules/messages/data/entities.ts +284 -0
- package/src/modules/messages/data/validators.ts +297 -0
- package/src/modules/messages/emails/MessageEmail.tsx +143 -0
- package/src/modules/messages/events.ts +24 -0
- package/src/modules/messages/frontend/messages/view/[token]/page.meta.ts +5 -0
- package/src/modules/messages/frontend/messages/view/[token]/page.tsx +389 -0
- package/src/modules/messages/i18n/de.json +240 -0
- package/src/modules/messages/i18n/en.json +240 -0
- package/src/modules/messages/i18n/es.json +240 -0
- package/src/modules/messages/i18n/pl.json +240 -0
- package/src/modules/messages/index.ts +19 -0
- package/src/modules/messages/lib/actions.ts +204 -0
- package/src/modules/messages/lib/attachments.ts +197 -0
- package/src/modules/messages/lib/constants.ts +2 -0
- package/src/modules/messages/lib/email-sender.ts +255 -0
- package/src/modules/messages/lib/forwarding.ts +240 -0
- package/src/modules/messages/lib/message-objects-registry.ts +60 -0
- package/src/modules/messages/lib/message-types-registry.ts +48 -0
- package/src/modules/messages/lib/object-validation.ts +26 -0
- package/src/modules/messages/lib/operationMetadata.ts +43 -0
- package/src/modules/messages/lib/priorityUtils.ts +76 -0
- package/src/modules/messages/lib/routeHelpers.ts +65 -0
- package/src/modules/messages/message-objects.ts +5 -0
- package/src/modules/messages/message-types.ts +65 -0
- package/src/modules/messages/migrations/.snapshot-open-mercato.json +957 -0
- package/src/modules/messages/migrations/Migration20260213181243.ts +34 -0
- package/src/modules/messages/migrations/Migration20260215165126.ts +16 -0
- package/src/modules/messages/notifications.ts +25 -0
- package/src/modules/messages/setup.ts +19 -0
- package/src/modules/messages/subscribers/message-notification.ts +138 -0
- package/src/modules/messages/workers/send-email.worker.ts +321 -0
- package/src/modules/query_index/i18n/es.json +2 -2
- package/src/modules/resources/i18n/de.json +57 -0
- package/src/modules/resources/i18n/en.json +57 -0
- package/src/modules/resources/i18n/es.json +57 -0
- package/src/modules/resources/i18n/pl.json +57 -0
- package/src/modules/sales/backend/sales/documents/[id]/page.tsx +23 -7
- package/src/modules/sales/commands/payments.ts +12 -6
- package/src/modules/sales/i18n/de.json +26 -0
- package/src/modules/sales/i18n/en.json +26 -0
- package/src/modules/sales/i18n/es.json +26 -0
- package/src/modules/sales/i18n/pl.json +26 -0
- package/src/modules/sales/lib/messageObjectPreviews.ts +150 -0
- package/src/modules/sales/message-objects.ts +56 -0
- package/src/modules/sales/widgets/messages/SalesDocumentMessageDetail.tsx +57 -0
- package/src/modules/sales/widgets/messages/SalesDocumentMessagePreview.tsx +46 -0
- package/src/modules/sales/widgets/messages/index.ts +2 -0
- package/src/modules/staff/backend/staff/leave-requests/[id]/page.tsx +54 -0
- package/src/modules/staff/backend/staff/my-leave-requests/[id]/page.tsx +58 -0
- package/src/modules/staff/backend/staff/team-members/[id]/page.tsx +2 -32
- package/src/modules/staff/components/LeaveRequestDetail.tsx +135 -0
- package/src/modules/staff/components/LeaveRequestForm.tsx +3 -0
- package/src/modules/staff/components/LeaveRequestPreview.tsx +74 -0
- package/src/modules/staff/i18n/de.json +22 -0
- package/src/modules/staff/i18n/en.json +22 -0
- package/src/modules/staff/i18n/es.json +22 -0
- package/src/modules/staff/i18n/pl.json +22 -0
- package/src/modules/staff/lib/messageObjectPreviews.ts +182 -0
- package/src/modules/staff/message-objects.ts +102 -0
- package/src/modules/staff/message-types.ts +21 -0
- package/src/modules/staff/widgets/messages/StaffMessageObjectDetail.tsx +57 -0
- package/src/modules/staff/widgets/messages/StaffMessageObjectPreview.tsx +44 -0
- package/src/modules/staff/widgets/messages/index.ts +2 -0
- package/src/modules/workflows/backend/definitions/visual-editor/page.tsx +6 -6
- package/src/modules/workflows/i18n/de.json +41 -0
- package/src/modules/workflows/i18n/en.json +41 -0
- package/src/modules/workflows/i18n/es.json +41 -0
- package/src/modules/workflows/i18n/pl.json +41 -0
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"customers.audit.tags.delete": "Eliminar etiqueta",
|
|
31
31
|
"customers.audit.tags.unassign": "Quitar etiqueta",
|
|
32
32
|
"customers.audit.tags.update": "Actualizar etiqueta",
|
|
33
|
+
"customers.audit.todos.create": "Crear tarea de cliente",
|
|
33
34
|
"customers.audit.todos.link": "Vincular tarea",
|
|
34
35
|
"customers.audit.todos.unlink": "Desvincular tarea",
|
|
35
36
|
"customers.companies.create.title": "Crear empresa",
|
|
@@ -41,18 +42,26 @@
|
|
|
41
42
|
"customers.companies.detail.addresses.add": "Agregar dirección",
|
|
42
43
|
"customers.companies.detail.addresses.error": "No se pudo guardar la dirección.",
|
|
43
44
|
"customers.companies.detail.currency.add": "Agregar divisa",
|
|
45
|
+
"customers.companies.detail.currency.addPrompt": "Proporcione un código de moneda.",
|
|
44
46
|
"customers.companies.detail.currency.cancel": "Cancelar",
|
|
45
47
|
"customers.companies.detail.currency.clear": "Limpiar",
|
|
48
|
+
"customers.companies.detail.currency.createError": "Error al agregar la moneda.",
|
|
46
49
|
"customers.companies.detail.currency.dialogTitle": "Agregar divisa",
|
|
50
|
+
"customers.companies.detail.currency.emptyError": "El código de moneda es obligatorio.",
|
|
47
51
|
"customers.companies.detail.currency.errorLoad": "No se pudo cargar el diccionario de divisas.",
|
|
48
52
|
"customers.companies.detail.currency.errorRequired": "El código de divisa es obligatorio.",
|
|
49
53
|
"customers.companies.detail.currency.errorSave": "No se pudo guardar la divisa.",
|
|
54
|
+
"customers.companies.detail.currency.fetchError": "Error al cargar las monedas.",
|
|
55
|
+
"customers.companies.detail.currency.invalidAmount": "Ingrese un monto válido.",
|
|
50
56
|
"customers.companies.detail.currency.labelLabel": "Etiqueta",
|
|
51
57
|
"customers.companies.detail.currency.labelPlaceholder": "Nombre que se muestra en la interfaz",
|
|
52
58
|
"customers.companies.detail.currency.loading": "Cargando divisas…",
|
|
53
59
|
"customers.companies.detail.currency.manage": "Administrar diccionario de divisas",
|
|
60
|
+
"customers.companies.detail.currency.manageTitle": "Administrar monedas",
|
|
54
61
|
"customers.companies.detail.currency.placeholder": "Selecciona una divisa…",
|
|
55
62
|
"customers.companies.detail.currency.save": "Guardar",
|
|
63
|
+
"customers.companies.detail.currency.saveShortcutHint": "Presione Enter para guardar",
|
|
64
|
+
"customers.companies.detail.currency.success": "Moneda agregada.",
|
|
56
65
|
"customers.companies.detail.currency.valueLabel": "Código de divisa",
|
|
57
66
|
"customers.companies.detail.currency.valuePlaceholder": "p. ej. USD",
|
|
58
67
|
"customers.companies.detail.deals.loading": "Cargando oportunidades…",
|
|
@@ -440,6 +449,7 @@
|
|
|
440
449
|
"customers.errors.organization_forbidden": "Organización no accesible",
|
|
441
450
|
"customers.errors.organization_required": "Se requiere contexto de organización",
|
|
442
451
|
"customers.errors.person_required": "Se requiere el ID de la persona",
|
|
452
|
+
"customers.errors.save_failed": "Error al guardar el registro del cliente.",
|
|
443
453
|
"customers.errors.tag_required": "Se requiere el ID de la etiqueta",
|
|
444
454
|
"customers.errors.tenant_required": "Se requiere contexto de inquilino",
|
|
445
455
|
"customers.errors.todo_create_failed": "No se pudo crear la tarea",
|
|
@@ -452,6 +462,10 @@
|
|
|
452
462
|
"customers.errors.todo_unlink_failed": "No se pudo desvincular la tarea",
|
|
453
463
|
"customers.errors.unassign_failed": "No se pudo quitar la etiqueta",
|
|
454
464
|
"customers.errors.unauthorized": "No autorizado",
|
|
465
|
+
"customers.messageObjects.company.title": "Empresa",
|
|
466
|
+
"customers.messageObjects.deal.title": "Trato",
|
|
467
|
+
"customers.messageObjects.notFound": "No encontrado",
|
|
468
|
+
"customers.messageObjects.person.title": "Persona",
|
|
455
469
|
"customers.nav.activities": "Actividades",
|
|
456
470
|
"customers.nav.companies": "Empresas",
|
|
457
471
|
"customers.nav.companies.create": "Nueva empresa",
|
|
@@ -542,6 +556,7 @@
|
|
|
542
556
|
"customers.people.detail.addresses.streetFormatHint": "Formato calle primero activo.",
|
|
543
557
|
"customers.people.detail.addresses.success": "Dirección guardada",
|
|
544
558
|
"customers.people.detail.addresses.types.add": "Agregar tipo",
|
|
559
|
+
"customers.people.detail.addresses.types.addHint": "Cree un nuevo tipo de dirección para reutilizar.",
|
|
545
560
|
"customers.people.detail.addresses.types.cancel": "Cancelar",
|
|
546
561
|
"customers.people.detail.addresses.types.dialogTitle": "Agregar tipo de dirección",
|
|
547
562
|
"customers.people.detail.addresses.types.emptyError": "Ingresa un nombre",
|
|
@@ -554,6 +569,7 @@
|
|
|
554
569
|
"customers.people.detail.addresses.types.placeholder": "Elige un tipo",
|
|
555
570
|
"customers.people.detail.addresses.types.prompt": "Ingresa un nuevo tipo de dirección.",
|
|
556
571
|
"customers.people.detail.addresses.types.save": "Guardar",
|
|
572
|
+
"customers.people.detail.addresses.types.saveError": "Error al guardar el tipo de dirección.",
|
|
557
573
|
"customers.people.detail.addresses.update": "Actualizar dirección ⌘⏎ / Ctrl+Enter",
|
|
558
574
|
"customers.people.detail.addresses.updating": "Actualizando…",
|
|
559
575
|
"customers.people.detail.addresses.validation.generic": "Revisa {{field}}",
|
|
@@ -786,6 +802,7 @@
|
|
|
786
802
|
"customers.people.detail.tasks.viewAll": "Ver todas las tareas",
|
|
787
803
|
"customers.people.detail.title": "Detalles de la persona",
|
|
788
804
|
"customers.people.form.activityType.placeholder": "Selecciona un tipo de actividad",
|
|
805
|
+
"customers.people.form.addressType.placeholder": "Seleccionar tipo de dirección",
|
|
789
806
|
"customers.people.form.company": "Empresa",
|
|
790
807
|
"customers.people.form.company.add": "Agregar empresa",
|
|
791
808
|
"customers.people.form.company.dialogTitle": "Agregar empresa",
|
|
@@ -795,13 +812,17 @@
|
|
|
795
812
|
"customers.people.form.company.placeholder": "Selecciona una empresa",
|
|
796
813
|
"customers.people.form.company.prompt": "Ingresa el nombre de la nueva empresa",
|
|
797
814
|
"customers.people.form.description": "Descripción",
|
|
815
|
+
"customers.people.form.dictionary.add": "Agregar entrada",
|
|
798
816
|
"customers.people.form.dictionary.addActivityType": "Agregar tipo de actividad",
|
|
817
|
+
"customers.people.form.dictionary.addAddressType": "Agregar tipo de dirección",
|
|
799
818
|
"customers.people.form.dictionary.addJobTitle": "Agregar cargo",
|
|
800
819
|
"customers.people.form.dictionary.addLifecycleStage": "Agregar etapa del ciclo",
|
|
801
820
|
"customers.people.form.dictionary.addSource": "Agregar fuente",
|
|
802
821
|
"customers.people.form.dictionary.addStatus": "Agregar estado",
|
|
803
822
|
"customers.people.form.dictionary.cancel": "Cancelar",
|
|
823
|
+
"customers.people.form.dictionary.dialogTitle": "Agregar entrada de diccionario",
|
|
804
824
|
"customers.people.form.dictionary.dialogTitleActivityType": "Agregar tipo de actividad",
|
|
825
|
+
"customers.people.form.dictionary.dialogTitleAddressType": "Agregar tipo de dirección",
|
|
805
826
|
"customers.people.form.dictionary.dialogTitleJobTitle": "Agregar cargo",
|
|
806
827
|
"customers.people.form.dictionary.dialogTitleLifecycleStage": "Agregar etapa del ciclo",
|
|
807
828
|
"customers.people.form.dictionary.dialogTitleSource": "Agregar fuente",
|
|
@@ -809,10 +830,14 @@
|
|
|
809
830
|
"customers.people.form.dictionary.error": "No se pudo guardar la opción",
|
|
810
831
|
"customers.people.form.dictionary.errorLoad": "No se pudieron cargar las opciones",
|
|
811
832
|
"customers.people.form.dictionary.errorRequired": "Ingresa un nombre",
|
|
833
|
+
"customers.people.form.dictionary.labelLabel": "Etiqueta",
|
|
812
834
|
"customers.people.form.dictionary.labelPlaceholder": "Nombre mostrado en la interfaz",
|
|
813
835
|
"customers.people.form.dictionary.loading": "Cargando opciones…",
|
|
814
836
|
"customers.people.form.dictionary.manage": "Gestionar diccionarios",
|
|
837
|
+
"customers.people.form.dictionary.placeholder": "Seleccionar un valor",
|
|
838
|
+
"customers.people.form.dictionary.prompt": "Ingrese un nombre",
|
|
815
839
|
"customers.people.form.dictionary.promptActivityType": "Ingresa un nuevo tipo de actividad",
|
|
840
|
+
"customers.people.form.dictionary.promptAddressType": "Ingrese un nuevo nombre de tipo de dirección",
|
|
816
841
|
"customers.people.form.dictionary.promptJobTitle": "Ingresa un nuevo cargo",
|
|
817
842
|
"customers.people.form.dictionary.promptLifecycleStage": "Ingresa una nueva etapa del ciclo",
|
|
818
843
|
"customers.people.form.dictionary.promptSource": "Ingresa una nueva fuente",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"customers.audit.tags.delete": "Usuń tag",
|
|
31
31
|
"customers.audit.tags.unassign": "Odepnij tag",
|
|
32
32
|
"customers.audit.tags.update": "Zaktualizuj tag",
|
|
33
|
+
"customers.audit.todos.create": "Utwórz zadanie klienta",
|
|
33
34
|
"customers.audit.todos.link": "Powiąż zadanie",
|
|
34
35
|
"customers.audit.todos.unlink": "Odepnij zadanie",
|
|
35
36
|
"customers.companies.create.title": "Utwórz firmę",
|
|
@@ -41,18 +42,26 @@
|
|
|
41
42
|
"customers.companies.detail.addresses.add": "Dodaj adres",
|
|
42
43
|
"customers.companies.detail.addresses.error": "Nie udało się zapisać adresu.",
|
|
43
44
|
"customers.companies.detail.currency.add": "Dodaj walutę",
|
|
45
|
+
"customers.companies.detail.currency.addPrompt": "Podaj kod waluty.",
|
|
44
46
|
"customers.companies.detail.currency.cancel": "Anuluj",
|
|
45
47
|
"customers.companies.detail.currency.clear": "Wyczyść",
|
|
48
|
+
"customers.companies.detail.currency.createError": "Nie udało się dodać waluty.",
|
|
46
49
|
"customers.companies.detail.currency.dialogTitle": "Dodaj walutę",
|
|
50
|
+
"customers.companies.detail.currency.emptyError": "Kod waluty jest wymagany.",
|
|
47
51
|
"customers.companies.detail.currency.errorLoad": "Nie udało się wczytać słownika walut.",
|
|
48
52
|
"customers.companies.detail.currency.errorRequired": "Kod waluty jest wymagany.",
|
|
49
53
|
"customers.companies.detail.currency.errorSave": "Nie udało się zapisać waluty.",
|
|
54
|
+
"customers.companies.detail.currency.fetchError": "Nie udało się załadować walut.",
|
|
55
|
+
"customers.companies.detail.currency.invalidAmount": "Wprowadź prawidłową kwotę.",
|
|
50
56
|
"customers.companies.detail.currency.labelLabel": "Etykieta",
|
|
51
57
|
"customers.companies.detail.currency.labelPlaceholder": "Nazwa wyświetlana w interfejsie",
|
|
52
58
|
"customers.companies.detail.currency.loading": "Ładowanie walut…",
|
|
53
59
|
"customers.companies.detail.currency.manage": "Zarządzaj słownikiem walut",
|
|
60
|
+
"customers.companies.detail.currency.manageTitle": "Zarządzaj walutami",
|
|
54
61
|
"customers.companies.detail.currency.placeholder": "Wybierz walutę…",
|
|
55
62
|
"customers.companies.detail.currency.save": "Zapisz",
|
|
63
|
+
"customers.companies.detail.currency.saveShortcutHint": "Naciśnij Enter, aby zapisać",
|
|
64
|
+
"customers.companies.detail.currency.success": "Waluta została dodana.",
|
|
56
65
|
"customers.companies.detail.currency.valueLabel": "Kod waluty",
|
|
57
66
|
"customers.companies.detail.currency.valuePlaceholder": "np. USD",
|
|
58
67
|
"customers.companies.detail.deals.loading": "Ładowanie szans sprzedaży…",
|
|
@@ -440,6 +449,7 @@
|
|
|
440
449
|
"customers.errors.organization_forbidden": "Organizacja jest niedostępna",
|
|
441
450
|
"customers.errors.organization_required": "Wymagany jest kontekst organizacji",
|
|
442
451
|
"customers.errors.person_required": "Wymagany identyfikator osoby",
|
|
452
|
+
"customers.errors.save_failed": "Nie udało się zapisać rekordu klienta.",
|
|
443
453
|
"customers.errors.tag_required": "Wymagany identyfikator tagu",
|
|
444
454
|
"customers.errors.tenant_required": "Wymagany jest kontekst najemcy",
|
|
445
455
|
"customers.errors.todo_create_failed": "Nie udało się utworzyć zadania",
|
|
@@ -452,6 +462,10 @@
|
|
|
452
462
|
"customers.errors.todo_unlink_failed": "Nie udało się odpiąć zadania",
|
|
453
463
|
"customers.errors.unassign_failed": "Nie udało się odpiąć tagu",
|
|
454
464
|
"customers.errors.unauthorized": "Brak autoryzacji",
|
|
465
|
+
"customers.messageObjects.company.title": "Firma",
|
|
466
|
+
"customers.messageObjects.deal.title": "Transakcja",
|
|
467
|
+
"customers.messageObjects.notFound": "Nie znaleziono",
|
|
468
|
+
"customers.messageObjects.person.title": "Osoba",
|
|
455
469
|
"customers.nav.activities": "Aktywności",
|
|
456
470
|
"customers.nav.companies": "Firmy",
|
|
457
471
|
"customers.nav.companies.create": "Nowa firma",
|
|
@@ -542,6 +556,7 @@
|
|
|
542
556
|
"customers.people.detail.addresses.streetFormatHint": "Aktywny jest układ z ulicą na początku.",
|
|
543
557
|
"customers.people.detail.addresses.success": "Adres zapisany",
|
|
544
558
|
"customers.people.detail.addresses.types.add": "Dodaj typ",
|
|
559
|
+
"customers.people.detail.addresses.types.addHint": "Utwórz nowy typ adresu do wielokrotnego użycia.",
|
|
545
560
|
"customers.people.detail.addresses.types.cancel": "Anuluj",
|
|
546
561
|
"customers.people.detail.addresses.types.dialogTitle": "Dodaj typ adresu",
|
|
547
562
|
"customers.people.detail.addresses.types.emptyError": "Wpisz nazwę",
|
|
@@ -554,6 +569,7 @@
|
|
|
554
569
|
"customers.people.detail.addresses.types.placeholder": "Wybierz typ",
|
|
555
570
|
"customers.people.detail.addresses.types.prompt": "Wpisz nazwę nowego typu adresu.",
|
|
556
571
|
"customers.people.detail.addresses.types.save": "Zapisz",
|
|
572
|
+
"customers.people.detail.addresses.types.saveError": "Nie udało się zapisać typu adresu.",
|
|
557
573
|
"customers.people.detail.addresses.update": "Zaktualizuj adres ⌘⏎ / Ctrl+Enter",
|
|
558
574
|
"customers.people.detail.addresses.updating": "Aktualizowanie…",
|
|
559
575
|
"customers.people.detail.addresses.validation.generic": "Sprawdź pole {{field}}",
|
|
@@ -786,6 +802,7 @@
|
|
|
786
802
|
"customers.people.detail.tasks.viewAll": "Przejdź do listy zadań",
|
|
787
803
|
"customers.people.detail.title": "Szczegóły osoby",
|
|
788
804
|
"customers.people.form.activityType.placeholder": "Wybierz typ aktywności",
|
|
805
|
+
"customers.people.form.addressType.placeholder": "Wybierz typ adresu",
|
|
789
806
|
"customers.people.form.company": "Firma",
|
|
790
807
|
"customers.people.form.company.add": "Dodaj firmę",
|
|
791
808
|
"customers.people.form.company.dialogTitle": "Dodaj firmę",
|
|
@@ -795,13 +812,17 @@
|
|
|
795
812
|
"customers.people.form.company.placeholder": "Wybierz firmę",
|
|
796
813
|
"customers.people.form.company.prompt": "Wpisz nazwę nowej firmy",
|
|
797
814
|
"customers.people.form.description": "Opis",
|
|
815
|
+
"customers.people.form.dictionary.add": "Dodaj wpis",
|
|
798
816
|
"customers.people.form.dictionary.addActivityType": "Dodaj typ aktywności",
|
|
817
|
+
"customers.people.form.dictionary.addAddressType": "Dodaj typ adresu",
|
|
799
818
|
"customers.people.form.dictionary.addJobTitle": "Dodaj stanowisko",
|
|
800
819
|
"customers.people.form.dictionary.addLifecycleStage": "Dodaj etap cyklu",
|
|
801
820
|
"customers.people.form.dictionary.addSource": "Dodaj źródło",
|
|
802
821
|
"customers.people.form.dictionary.addStatus": "Dodaj status",
|
|
803
822
|
"customers.people.form.dictionary.cancel": "Anuluj",
|
|
823
|
+
"customers.people.form.dictionary.dialogTitle": "Dodaj wpis słownikowy",
|
|
804
824
|
"customers.people.form.dictionary.dialogTitleActivityType": "Dodaj typ aktywności",
|
|
825
|
+
"customers.people.form.dictionary.dialogTitleAddressType": "Dodaj typ adresu",
|
|
805
826
|
"customers.people.form.dictionary.dialogTitleJobTitle": "Dodaj stanowisko",
|
|
806
827
|
"customers.people.form.dictionary.dialogTitleLifecycleStage": "Dodaj etap cyklu",
|
|
807
828
|
"customers.people.form.dictionary.dialogTitleSource": "Dodaj źródło",
|
|
@@ -809,10 +830,14 @@
|
|
|
809
830
|
"customers.people.form.dictionary.error": "Nie udało się zapisać opcji",
|
|
810
831
|
"customers.people.form.dictionary.errorLoad": "Nie udało się załadować opcji",
|
|
811
832
|
"customers.people.form.dictionary.errorRequired": "Podaj nazwę",
|
|
833
|
+
"customers.people.form.dictionary.labelLabel": "Etykieta",
|
|
812
834
|
"customers.people.form.dictionary.labelPlaceholder": "Nazwa wyświetlana w interfejsie",
|
|
813
835
|
"customers.people.form.dictionary.loading": "Ładowanie opcji…",
|
|
814
836
|
"customers.people.form.dictionary.manage": "Zarządzaj słownikami",
|
|
837
|
+
"customers.people.form.dictionary.placeholder": "Wybierz wartość",
|
|
838
|
+
"customers.people.form.dictionary.prompt": "Wprowadź nazwę",
|
|
815
839
|
"customers.people.form.dictionary.promptActivityType": "Podaj nazwę nowego typu aktywności",
|
|
840
|
+
"customers.people.form.dictionary.promptAddressType": "Wprowadź nazwę nowego typu adresu",
|
|
816
841
|
"customers.people.form.dictionary.promptJobTitle": "Podaj nazwę nowego stanowiska",
|
|
817
842
|
"customers.people.form.dictionary.promptLifecycleStage": "Podaj nazwę nowego etapu cyklu",
|
|
818
843
|
"customers.people.form.dictionary.promptSource": "Podaj nazwę nowego źródła",
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { createRequestContainer } from '@open-mercato/shared/lib/di/container'
|
|
2
|
+
import { findOneWithDecryption } from '@open-mercato/shared/lib/encryption/find'
|
|
3
|
+
import { resolveTranslations } from '@open-mercato/shared/lib/i18n/server'
|
|
4
|
+
import type { ObjectPreviewData } from '@open-mercato/shared/modules/messages/types'
|
|
5
|
+
import type { EntityManager } from '@mikro-orm/postgresql'
|
|
6
|
+
import { CustomerDeal, CustomerEntity } from '../data/entities'
|
|
7
|
+
|
|
8
|
+
type PreviewContext = {
|
|
9
|
+
tenantId: string
|
|
10
|
+
organizationId?: string | null
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function formatCurrency(amount: string | null | undefined, currency: string | null | undefined): string | null {
|
|
14
|
+
if (!amount) return null
|
|
15
|
+
const value = Number(amount)
|
|
16
|
+
if (!Number.isFinite(value)) return currency ? `${amount} ${currency}` : amount
|
|
17
|
+
if (!currency) return value.toLocaleString()
|
|
18
|
+
try {
|
|
19
|
+
return new Intl.NumberFormat(undefined, { style: 'currency', currency }).format(value)
|
|
20
|
+
} catch {
|
|
21
|
+
return `${value.toLocaleString()} ${currency}`
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function statusColor(status: string | null | undefined): string | undefined {
|
|
26
|
+
if (!status) return undefined
|
|
27
|
+
const value = status.toLowerCase()
|
|
28
|
+
if (value.includes('won') || value.includes('active') || value.includes('qualified')) return 'green'
|
|
29
|
+
if (value.includes('lost') || value.includes('rejected') || value.includes('inactive')) return 'red'
|
|
30
|
+
if (value.includes('open') || value.includes('new') || value.includes('pending')) return 'amber'
|
|
31
|
+
return 'blue'
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
async function resolveEm() {
|
|
35
|
+
const { resolve } = await createRequestContainer()
|
|
36
|
+
return resolve('em') as EntityManager
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export async function loadCustomerPersonPreview(entityId: string, ctx: PreviewContext): Promise<ObjectPreviewData> {
|
|
40
|
+
const { t } = await resolveTranslations()
|
|
41
|
+
const defaultTitle = t('customers.messageObjects.person.title')
|
|
42
|
+
|
|
43
|
+
if (!ctx.organizationId) {
|
|
44
|
+
return { title: defaultTitle, subtitle: entityId }
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const em = await resolveEm()
|
|
48
|
+
const entity = await findOneWithDecryption(
|
|
49
|
+
em,
|
|
50
|
+
CustomerEntity,
|
|
51
|
+
{
|
|
52
|
+
id: entityId,
|
|
53
|
+
kind: 'person',
|
|
54
|
+
tenantId: ctx.tenantId,
|
|
55
|
+
organizationId: ctx.organizationId,
|
|
56
|
+
deletedAt: null,
|
|
57
|
+
},
|
|
58
|
+
undefined,
|
|
59
|
+
{ tenantId: ctx.tenantId, organizationId: ctx.organizationId },
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
if (!entity) {
|
|
63
|
+
return { title: defaultTitle, subtitle: entityId, status: t('customers.messageObjects.notFound'), statusColor: 'gray' }
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const subtitleParts = [entity.primaryEmail, entity.primaryPhone]
|
|
67
|
+
.filter((part): part is string => Boolean(part && part.trim().length > 0))
|
|
68
|
+
return {
|
|
69
|
+
title: entity.displayName,
|
|
70
|
+
subtitle: subtitleParts.join(' • ') || entityId,
|
|
71
|
+
status: entity.status ?? undefined,
|
|
72
|
+
statusColor: statusColor(entity.status),
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export async function loadCustomerCompanyPreview(entityId: string, ctx: PreviewContext): Promise<ObjectPreviewData> {
|
|
77
|
+
const { t } = await resolveTranslations()
|
|
78
|
+
const defaultTitle = t('customers.messageObjects.company.title')
|
|
79
|
+
|
|
80
|
+
if (!ctx.organizationId) {
|
|
81
|
+
return { title: defaultTitle, subtitle: entityId }
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const em = await resolveEm()
|
|
85
|
+
const entity = await findOneWithDecryption(
|
|
86
|
+
em,
|
|
87
|
+
CustomerEntity,
|
|
88
|
+
{
|
|
89
|
+
id: entityId,
|
|
90
|
+
kind: 'company',
|
|
91
|
+
tenantId: ctx.tenantId,
|
|
92
|
+
organizationId: ctx.organizationId,
|
|
93
|
+
deletedAt: null,
|
|
94
|
+
},
|
|
95
|
+
undefined,
|
|
96
|
+
{ tenantId: ctx.tenantId, organizationId: ctx.organizationId },
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
if (!entity) {
|
|
100
|
+
return { title: defaultTitle, subtitle: entityId, status: t('customers.messageObjects.notFound'), statusColor: 'gray' }
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const subtitleParts = [entity.primaryEmail, entity.primaryPhone]
|
|
104
|
+
.filter((part): part is string => Boolean(part && part.trim().length > 0))
|
|
105
|
+
return {
|
|
106
|
+
title: entity.displayName,
|
|
107
|
+
subtitle: subtitleParts.join(' • ') || entityId,
|
|
108
|
+
status: entity.status ?? undefined,
|
|
109
|
+
statusColor: statusColor(entity.status),
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export async function loadCustomerDealPreview(entityId: string, ctx: PreviewContext): Promise<ObjectPreviewData> {
|
|
114
|
+
const { t } = await resolveTranslations()
|
|
115
|
+
const defaultTitle = t('customers.messageObjects.deal.title')
|
|
116
|
+
|
|
117
|
+
if (!ctx.organizationId) {
|
|
118
|
+
return { title: defaultTitle, subtitle: entityId }
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const em = await resolveEm()
|
|
122
|
+
const deal = await findOneWithDecryption(
|
|
123
|
+
em,
|
|
124
|
+
CustomerDeal,
|
|
125
|
+
{
|
|
126
|
+
id: entityId,
|
|
127
|
+
tenantId: ctx.tenantId,
|
|
128
|
+
organizationId: ctx.organizationId,
|
|
129
|
+
deletedAt: null,
|
|
130
|
+
},
|
|
131
|
+
undefined,
|
|
132
|
+
{ tenantId: ctx.tenantId, organizationId: ctx.organizationId },
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
if (!deal) {
|
|
136
|
+
return { title: defaultTitle, subtitle: entityId, status: t('customers.messageObjects.notFound'), statusColor: 'gray' }
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
const amount = formatCurrency(deal.valueAmount, deal.valueCurrency)
|
|
140
|
+
const probability = typeof deal.probability === 'number' ? `${deal.probability}%` : null
|
|
141
|
+
const subtitle = [amount, probability].filter((part): part is string => Boolean(part && part.length > 0)).join(' • ')
|
|
142
|
+
const metadata: Record<string, string> = {}
|
|
143
|
+
if (amount) metadata.Value = amount
|
|
144
|
+
if (probability) metadata.Probability = probability
|
|
145
|
+
|
|
146
|
+
return {
|
|
147
|
+
title: deal.title,
|
|
148
|
+
subtitle: subtitle || entityId,
|
|
149
|
+
status: deal.status ?? undefined,
|
|
150
|
+
statusColor: statusColor(deal.status),
|
|
151
|
+
metadata: Object.keys(metadata).length > 0 ? metadata : undefined,
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { MessageObjectTypeDefinition } from '@open-mercato/shared/modules/messages/types'
|
|
2
|
+
import { CustomerMessageObjectDetail } from './widgets/messages/CustomerMessageObjectDetail'
|
|
3
|
+
import { CustomerMessageObjectPreview } from './widgets/messages/CustomerMessageObjectPreview'
|
|
4
|
+
|
|
5
|
+
const objectMessageTypes = ['default', 'messages.defaultWithObjects']
|
|
6
|
+
|
|
7
|
+
export const messageObjectTypes: MessageObjectTypeDefinition[] = [
|
|
8
|
+
{
|
|
9
|
+
module: 'customers',
|
|
10
|
+
entityType: 'person',
|
|
11
|
+
messageTypes: objectMessageTypes,
|
|
12
|
+
entityId: 'customers:customer_person_profile',
|
|
13
|
+
optionLabelField: 'name',
|
|
14
|
+
optionSubtitleField: 'email',
|
|
15
|
+
labelKey: 'customers.people.list.title',
|
|
16
|
+
icon: 'user-round',
|
|
17
|
+
PreviewComponent: CustomerMessageObjectPreview,
|
|
18
|
+
DetailComponent: CustomerMessageObjectDetail,
|
|
19
|
+
actions: [],
|
|
20
|
+
loadPreview: async (entityId, ctx) => {
|
|
21
|
+
if (typeof window !== 'undefined') {
|
|
22
|
+
return { title: 'Person', subtitle: entityId }
|
|
23
|
+
}
|
|
24
|
+
const { loadCustomerPersonPreview } = await import('./lib/messageObjectPreviews')
|
|
25
|
+
return loadCustomerPersonPreview(entityId, ctx)
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
module: 'customers',
|
|
30
|
+
entityType: 'company',
|
|
31
|
+
messageTypes: objectMessageTypes,
|
|
32
|
+
entityId: 'customers:customer_company_profile',
|
|
33
|
+
optionLabelField: 'name',
|
|
34
|
+
optionSubtitleField: 'taxId',
|
|
35
|
+
labelKey: 'customers.companies.list.title',
|
|
36
|
+
icon: 'building2',
|
|
37
|
+
PreviewComponent: CustomerMessageObjectPreview,
|
|
38
|
+
DetailComponent: CustomerMessageObjectDetail,
|
|
39
|
+
actions: [],
|
|
40
|
+
loadPreview: async (entityId, ctx) => {
|
|
41
|
+
if (typeof window !== 'undefined') {
|
|
42
|
+
return { title: 'Company', subtitle: entityId }
|
|
43
|
+
}
|
|
44
|
+
const { loadCustomerCompanyPreview } = await import('./lib/messageObjectPreviews')
|
|
45
|
+
return loadCustomerCompanyPreview(entityId, ctx)
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
module: 'customers',
|
|
50
|
+
entityType: 'deal',
|
|
51
|
+
messageTypes: objectMessageTypes,
|
|
52
|
+
entityId: 'customers:customer_deal',
|
|
53
|
+
optionLabelField: 'title',
|
|
54
|
+
optionSubtitleField: 'status',
|
|
55
|
+
labelKey: 'customers.deals.list.title',
|
|
56
|
+
icon: 'briefcase-business',
|
|
57
|
+
PreviewComponent: CustomerMessageObjectPreview,
|
|
58
|
+
DetailComponent: CustomerMessageObjectDetail,
|
|
59
|
+
actions: [],
|
|
60
|
+
loadPreview: async (entityId, ctx) => {
|
|
61
|
+
if (typeof window !== 'undefined') {
|
|
62
|
+
return { title: 'Deal', subtitle: entityId }
|
|
63
|
+
}
|
|
64
|
+
const { loadCustomerDealPreview } = await import('./lib/messageObjectPreviews')
|
|
65
|
+
return loadCustomerDealPreview(entityId, ctx)
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
]
|
|
69
|
+
|
|
70
|
+
export default messageObjectTypes
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from 'react'
|
|
4
|
+
import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
5
|
+
import type { ObjectDetailProps } from '@open-mercato/shared/modules/messages/types'
|
|
6
|
+
import { Button } from '@open-mercato/ui/primitives/button'
|
|
7
|
+
import { CustomerMessageObjectPreview } from './CustomerMessageObjectPreview'
|
|
8
|
+
|
|
9
|
+
export function CustomerMessageObjectDetail(props: ObjectDetailProps) {
|
|
10
|
+
const t = useT()
|
|
11
|
+
const [executingActionId, setExecutingActionId] = React.useState<string | null>(null)
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<div className="space-y-3 rounded border p-3">
|
|
15
|
+
<CustomerMessageObjectPreview
|
|
16
|
+
entityId={props.entityId}
|
|
17
|
+
entityModule={props.entityModule}
|
|
18
|
+
entityType={props.entityType}
|
|
19
|
+
snapshot={props.snapshot}
|
|
20
|
+
previewData={props.previewData}
|
|
21
|
+
actionRequired={props.actionRequired}
|
|
22
|
+
actionType={props.actionType}
|
|
23
|
+
actionLabel={props.actionLabel}
|
|
24
|
+
/>
|
|
25
|
+
|
|
26
|
+
{props.actions.length > 0 ? (
|
|
27
|
+
<div className="flex flex-wrap gap-2">
|
|
28
|
+
{props.actions.map((action) => (
|
|
29
|
+
<Button
|
|
30
|
+
key={action.id}
|
|
31
|
+
type="button"
|
|
32
|
+
size="sm"
|
|
33
|
+
variant={action.variant ?? 'default'}
|
|
34
|
+
disabled={executingActionId !== null}
|
|
35
|
+
onClick={async () => {
|
|
36
|
+
if (executingActionId) return
|
|
37
|
+
setExecutingActionId(action.id)
|
|
38
|
+
try {
|
|
39
|
+
await props.onAction(action.id, { id: props.entityId })
|
|
40
|
+
} finally {
|
|
41
|
+
setExecutingActionId(null)
|
|
42
|
+
}
|
|
43
|
+
}}
|
|
44
|
+
>
|
|
45
|
+
{executingActionId === action.id
|
|
46
|
+
? t('messages.actions.executing', 'Executing...')
|
|
47
|
+
: t(action.labelKey ?? action.id, action.id)}
|
|
48
|
+
</Button>
|
|
49
|
+
))}
|
|
50
|
+
</div>
|
|
51
|
+
) : null}
|
|
52
|
+
</div>
|
|
53
|
+
)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export default CustomerMessageObjectDetail
|
|
57
|
+
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { Building2, BriefcaseBusiness, UserRound } from 'lucide-react'
|
|
4
|
+
import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
5
|
+
import type { ObjectPreviewProps } from '@open-mercato/shared/modules/messages/types'
|
|
6
|
+
import { Badge } from '@open-mercato/ui/primitives/badge'
|
|
7
|
+
|
|
8
|
+
export function CustomerMessageObjectPreview({
|
|
9
|
+
entityType,
|
|
10
|
+
entityId,
|
|
11
|
+
previewData,
|
|
12
|
+
actionRequired,
|
|
13
|
+
actionLabel,
|
|
14
|
+
}: ObjectPreviewProps) {
|
|
15
|
+
const t = useT()
|
|
16
|
+
|
|
17
|
+
const isCompany = entityType === 'company'
|
|
18
|
+
const isDeal = entityType === 'deal'
|
|
19
|
+
const Icon = isDeal ? BriefcaseBusiness : isCompany ? Building2 : UserRound
|
|
20
|
+
|
|
21
|
+
const fallbackTitle = isDeal
|
|
22
|
+
? t('customers.deals.list.title', 'Deals')
|
|
23
|
+
: isCompany
|
|
24
|
+
? t('customers.companies.list.title', 'Companies')
|
|
25
|
+
: t('customers.people.list.title', 'People')
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<div className="flex items-start gap-3 rounded-md border bg-muted/20 p-3">
|
|
29
|
+
<Icon className="mt-0.5 h-4 w-4 text-muted-foreground" />
|
|
30
|
+
<div className="min-w-0 flex-1 space-y-1">
|
|
31
|
+
<div className="flex items-center gap-2">
|
|
32
|
+
<p className="truncate text-sm font-medium">{previewData?.title || fallbackTitle}</p>
|
|
33
|
+
{actionRequired ? (
|
|
34
|
+
<Badge variant="secondary" className="text-xs">
|
|
35
|
+
{actionLabel || t('messages.composer.objectActionRequired', 'Action required')}
|
|
36
|
+
</Badge>
|
|
37
|
+
) : null}
|
|
38
|
+
</div>
|
|
39
|
+
<p className="truncate text-xs text-muted-foreground">{previewData?.subtitle || entityId}</p>
|
|
40
|
+
{previewData?.status ? (
|
|
41
|
+
<Badge variant="outline" className="text-xs">{previewData.status}</Badge>
|
|
42
|
+
) : null}
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export default CustomerMessageObjectPreview
|
|
49
|
+
|
|
@@ -50,8 +50,44 @@ export type WidgetVisibilityEditorHandle = {
|
|
|
50
50
|
|
|
51
51
|
const EMPTY: string[] = []
|
|
52
52
|
|
|
53
|
+
function resolveWidgetText(
|
|
54
|
+
t: (key: string, fallback: string) => string,
|
|
55
|
+
id: string,
|
|
56
|
+
field: 'title' | 'description',
|
|
57
|
+
fallback: string,
|
|
58
|
+
): string {
|
|
59
|
+
const key1 = `${id}.${field}`
|
|
60
|
+
const result1 = t(key1, '')
|
|
61
|
+
if (result1 && result1 !== key1) return result1
|
|
62
|
+
|
|
63
|
+
const key2 = `dashboard.widgets.${id}.${field}`
|
|
64
|
+
const result2 = t(key2, '')
|
|
65
|
+
if (result2 && result2 !== key2) return result2
|
|
66
|
+
|
|
67
|
+
const dotIndex = id.lastIndexOf('.')
|
|
68
|
+
if (dotIndex > 0) {
|
|
69
|
+
const prefix = id.slice(0, dotIndex)
|
|
70
|
+
const lastPart = id.slice(dotIndex + 1)
|
|
71
|
+
const key3 = `${prefix}.widgets.${lastPart}.${field}`
|
|
72
|
+
const result3 = t(key3, '')
|
|
73
|
+
if (result3 && result3 !== key3) return result3
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return fallback
|
|
77
|
+
}
|
|
78
|
+
|
|
53
79
|
export const WidgetVisibilityEditor = React.forwardRef<WidgetVisibilityEditorHandle, WidgetVisibilityEditorProps>(function WidgetVisibilityEditor(props, ref) {
|
|
54
80
|
const t = useT()
|
|
81
|
+
|
|
82
|
+
const resolveTitle = React.useCallback(
|
|
83
|
+
(widget: WidgetCatalogItem) => resolveWidgetText(t, widget.id, 'title', widget.title),
|
|
84
|
+
[t],
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
const resolveDescription = React.useCallback(
|
|
88
|
+
(widget: WidgetCatalogItem) => resolveWidgetText(t, widget.id, 'description', widget.description || ''),
|
|
89
|
+
[t],
|
|
90
|
+
)
|
|
55
91
|
const { kind, targetId, tenantId, organizationId } = props
|
|
56
92
|
const [catalog, setCatalog] = React.useState<WidgetCatalogItem[]>([])
|
|
57
93
|
const [loading, setLoading] = React.useState(true)
|
|
@@ -282,8 +318,8 @@ export const WidgetVisibilityEditor = React.forwardRef<WidgetVisibilityEditorHan
|
|
|
282
318
|
onChange={() => toggle(widget.id)}
|
|
283
319
|
/>
|
|
284
320
|
<div>
|
|
285
|
-
<div className="text-sm font-medium leading-none">{widget
|
|
286
|
-
{widget.description ? <div className="mt-1 text-xs text-muted-foreground">{widget
|
|
321
|
+
<div className="text-sm font-medium leading-none">{resolveTitle(widget)}</div>
|
|
322
|
+
{widget.description ? <div className="mt-1 text-xs text-muted-foreground">{resolveDescription(widget)}</div> : null}
|
|
287
323
|
</div>
|
|
288
324
|
</label>
|
|
289
325
|
))}
|
|
@@ -292,16 +328,16 @@ export const WidgetVisibilityEditor = React.forwardRef<WidgetVisibilityEditorHan
|
|
|
292
328
|
|
|
293
329
|
{kind === 'user' && effective.length > 0 && (
|
|
294
330
|
<div className="rounded-md border bg-muted/30 px-3 py-2 text-xs text-muted-foreground">
|
|
295
|
-
Effective widgets: {effective.map((id) => catalog.find((
|
|
331
|
+
{t('dashboards.widgets.effective', 'Effective widgets:')} {effective.map((id) => { const meta = catalog.find((m) => m.id === id); return meta ? resolveTitle(meta) : id }).join(', ')}
|
|
296
332
|
</div>
|
|
297
333
|
)}
|
|
298
334
|
|
|
299
335
|
<div className="flex items-center gap-2">
|
|
300
336
|
<Button type="button" onClick={save} disabled={saving || !dirty}>
|
|
301
|
-
{saving ? 'Saving…' : 'Save widgets'}
|
|
337
|
+
{saving ? t('dashboards.widgets.saving', 'Saving…') : t('dashboards.widgets.save', 'Save widgets')}
|
|
302
338
|
</Button>
|
|
303
339
|
<Button type="button" variant="ghost" onClick={resetSelections} disabled={!dirty}>
|
|
304
|
-
Reset
|
|
340
|
+
{t('dashboards.widgets.reset', 'Reset')}
|
|
305
341
|
</Button>
|
|
306
342
|
</div>
|
|
307
343
|
</div>
|
|
@@ -102,5 +102,9 @@
|
|
|
102
102
|
"dashboards.widgets.loading": "Widget-Optionen werden geladen…",
|
|
103
103
|
"dashboards.widgets.mode.hint": "Dieser Benutzer erbt derzeit Widgets von seinen Rollen. Wechseln Sie zu \"Überschreiben\", um anzupassen.",
|
|
104
104
|
"dashboards.widgets.mode.inherit": "Von Rollen übernehmen",
|
|
105
|
-
"dashboards.widgets.mode.override": "Für diesen Benutzer überschreiben"
|
|
105
|
+
"dashboards.widgets.mode.override": "Für diesen Benutzer überschreiben",
|
|
106
|
+
"dashboards.widgets.effective": "Aktive Widgets:",
|
|
107
|
+
"dashboards.widgets.reset": "Zurücksetzen",
|
|
108
|
+
"dashboards.widgets.save": "Widgets speichern",
|
|
109
|
+
"dashboards.widgets.saving": "Speichern…"
|
|
106
110
|
}
|
|
@@ -102,5 +102,9 @@
|
|
|
102
102
|
"dashboards.widgets.loading": "Loading widget options…",
|
|
103
103
|
"dashboards.widgets.mode.hint": "This user currently inherits widgets from their assigned roles. Switch to override to customize.",
|
|
104
104
|
"dashboards.widgets.mode.inherit": "Inherit from roles",
|
|
105
|
-
"dashboards.widgets.mode.override": "Override for this user"
|
|
105
|
+
"dashboards.widgets.mode.override": "Override for this user",
|
|
106
|
+
"dashboards.widgets.effective": "Effective widgets:",
|
|
107
|
+
"dashboards.widgets.reset": "Reset",
|
|
108
|
+
"dashboards.widgets.save": "Save widgets",
|
|
109
|
+
"dashboards.widgets.saving": "Saving…"
|
|
106
110
|
}
|