@open-mercato/core 0.6.6-develop.6094.1.28b081ea16 → 0.6.6-develop.6121.1.5797a901b3
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/catalog_product/index.js +52 -0
- package/dist/generated/entities/catalog_product/index.js.map +2 -2
- package/dist/generated/entities/catalog_product_variant/index.js +4 -0
- package/dist/generated/entities/catalog_product_variant/index.js.map +2 -2
- package/dist/generated/entity-fields-registry.js +28 -0
- package/dist/generated/entity-fields-registry.js.map +2 -2
- package/dist/modules/catalog/api/products/route.js +103 -33
- package/dist/modules/catalog/api/products/route.js.map +2 -2
- package/dist/modules/catalog/api/variants/route.js +4 -0
- package/dist/modules/catalog/api/variants/route.js.map +2 -2
- package/dist/modules/catalog/backend/catalog/products/[id]/page.js +46 -2
- package/dist/modules/catalog/backend/catalog/products/[id]/page.js.map +2 -2
- package/dist/modules/catalog/backend/catalog/products/[productId]/variants/[variantId]/page.js +4 -0
- package/dist/modules/catalog/backend/catalog/products/[productId]/variants/[variantId]/page.js.map +2 -2
- package/dist/modules/catalog/backend/catalog/products/[productId]/variants/create/page.js +2 -0
- package/dist/modules/catalog/backend/catalog/products/[productId]/variants/create/page.js.map +2 -2
- package/dist/modules/catalog/backend/catalog/products/create/page.js +42 -2
- package/dist/modules/catalog/backend/catalog/products/create/page.js.map +2 -2
- package/dist/modules/catalog/commands/products.js +251 -14
- package/dist/modules/catalog/commands/products.js.map +2 -2
- package/dist/modules/catalog/commands/variants.js +72 -1
- package/dist/modules/catalog/commands/variants.js.map +2 -2
- package/dist/modules/catalog/components/products/ProductComplianceSection.js +500 -0
- package/dist/modules/catalog/components/products/ProductComplianceSection.js.map +7 -0
- package/dist/modules/catalog/components/products/VariantBuilder.js +39 -1
- package/dist/modules/catalog/components/products/VariantBuilder.js.map +2 -2
- package/dist/modules/catalog/components/products/productForm.js +164 -2
- package/dist/modules/catalog/components/products/productForm.js.map +2 -2
- package/dist/modules/catalog/components/products/variantForm.js +2 -0
- package/dist/modules/catalog/components/products/variantForm.js.map +2 -2
- package/dist/modules/catalog/data/entities.js +93 -0
- package/dist/modules/catalog/data/entities.js.map +2 -2
- package/dist/modules/catalog/data/types.js +28 -0
- package/dist/modules/catalog/data/types.js.map +2 -2
- package/dist/modules/catalog/data/validators.js +100 -5
- package/dist/modules/catalog/data/validators.js.map +2 -2
- package/dist/modules/catalog/lib/gtin.js +61 -0
- package/dist/modules/catalog/lib/gtin.js.map +7 -0
- package/dist/modules/catalog/migrations/Migration20260611090000.js +17 -0
- package/dist/modules/catalog/migrations/Migration20260611090000.js.map +7 -0
- package/dist/modules/catalog/translations.js +1 -1
- package/dist/modules/catalog/translations.js.map +2 -2
- package/dist/modules/configs/api/cache/route.js +60 -10
- package/dist/modules/configs/api/cache/route.js.map +3 -3
- package/dist/modules/configs/components/CachePanel.js +52 -29
- package/dist/modules/configs/components/CachePanel.js.map +2 -2
- package/dist/modules/currencies/api/currencies/options/route.js +18 -4
- package/dist/modules/currencies/api/currencies/options/route.js.map +2 -2
- package/dist/modules/currencies/services/rateFetchingService.js +35 -18
- package/dist/modules/currencies/services/rateFetchingService.js.map +2 -2
- package/dist/modules/customer_accounts/backend/customer_accounts/users/[id]/page.js +16 -16
- package/dist/modules/customer_accounts/backend/customer_accounts/users/[id]/page.js.map +2 -2
- package/dist/modules/customer_accounts/backend/customer_accounts/users/page.js +1 -1
- package/dist/modules/customer_accounts/backend/customer_accounts/users/page.js.map +2 -2
- package/dist/modules/customers/backend/calendar/page.js +10 -0
- package/dist/modules/customers/backend/calendar/page.js.map +7 -0
- package/dist/modules/customers/backend/calendar/page.meta.js +25 -0
- package/dist/modules/customers/backend/calendar/page.meta.js.map +7 -0
- package/dist/modules/customers/cli.js +1 -0
- package/dist/modules/customers/cli.js.map +2 -2
- package/dist/modules/customers/components/calendar/AgendaList.js +182 -0
- package/dist/modules/customers/components/calendar/AgendaList.js.map +7 -0
- package/dist/modules/customers/components/calendar/CalendarEventEditor.js +331 -0
- package/dist/modules/customers/components/calendar/CalendarEventEditor.js.map +7 -0
- package/dist/modules/customers/components/calendar/CalendarFooter.js +48 -0
- package/dist/modules/customers/components/calendar/CalendarFooter.js.map +7 -0
- package/dist/modules/customers/components/calendar/CalendarHeader.js +36 -0
- package/dist/modules/customers/components/calendar/CalendarHeader.js.map +7 -0
- package/dist/modules/customers/components/calendar/CalendarScreen.js +516 -0
- package/dist/modules/customers/components/calendar/CalendarScreen.js.map +7 -0
- package/dist/modules/customers/components/calendar/CalendarSettingsModal.js +163 -0
- package/dist/modules/customers/components/calendar/CalendarSettingsModal.js.map +7 -0
- package/dist/modules/customers/components/calendar/CalendarTabs.js +60 -0
- package/dist/modules/customers/components/calendar/CalendarTabs.js.map +7 -0
- package/dist/modules/customers/components/calendar/CalendarToolbar.js +262 -0
- package/dist/modules/customers/components/calendar/CalendarToolbar.js.map +7 -0
- package/dist/modules/customers/components/calendar/EventBlock.js +149 -0
- package/dist/modules/customers/components/calendar/EventBlock.js.map +7 -0
- package/dist/modules/customers/components/calendar/EventPeekPopover.js +72 -0
- package/dist/modules/customers/components/calendar/EventPeekPopover.js.map +7 -0
- package/dist/modules/customers/components/calendar/MonthGrid.js +214 -0
- package/dist/modules/customers/components/calendar/MonthGrid.js.map +7 -0
- package/dist/modules/customers/components/calendar/ShortcutsDialog.js +44 -0
- package/dist/modules/customers/components/calendar/ShortcutsDialog.js.map +7 -0
- package/dist/modules/customers/components/calendar/TimeGrid.js +410 -0
- package/dist/modules/customers/components/calendar/TimeGrid.js.map +7 -0
- package/dist/modules/customers/components/calendar/UpcomingCards.js +175 -0
- package/dist/modules/customers/components/calendar/UpcomingCards.js.map +7 -0
- package/dist/modules/customers/components/calendar/editor/CategoryField.js +75 -0
- package/dist/modules/customers/components/calendar/editor/CategoryField.js.map +7 -0
- package/dist/modules/customers/components/calendar/editor/LocationField.js +30 -0
- package/dist/modules/customers/components/calendar/editor/LocationField.js.map +7 -0
- package/dist/modules/customers/components/calendar/editor/PeopleField.js +135 -0
- package/dist/modules/customers/components/calendar/editor/PeopleField.js.map +7 -0
- package/dist/modules/customers/components/calendar/editor/RelatedToField.js +218 -0
- package/dist/modules/customers/components/calendar/editor/RelatedToField.js.map +7 -0
- package/dist/modules/customers/components/calendar/editor/RepeatField.js +119 -0
- package/dist/modules/customers/components/calendar/editor/RepeatField.js.map +7 -0
- package/dist/modules/customers/components/calendar/editor/ScheduleSection.js +83 -0
- package/dist/modules/customers/components/calendar/editor/ScheduleSection.js.map +7 -0
- package/dist/modules/customers/components/calendar/editor/SegmentGroup.js +44 -0
- package/dist/modules/customers/components/calendar/editor/SegmentGroup.js.map +7 -0
- package/dist/modules/customers/components/calendar/editor/hooks.js +132 -0
- package/dist/modules/customers/components/calendar/editor/hooks.js.map +7 -0
- package/dist/modules/customers/components/calendar/editor/inputs.js +160 -0
- package/dist/modules/customers/components/calendar/editor/inputs.js.map +7 -0
- package/dist/modules/customers/components/calendar/editor/lookups.js +107 -0
- package/dist/modules/customers/components/calendar/editor/lookups.js.map +7 -0
- package/dist/modules/customers/components/calendar/types.js +30 -0
- package/dist/modules/customers/components/calendar/types.js.map +7 -0
- package/dist/modules/customers/components/calendar/useCalendarItems.js +131 -0
- package/dist/modules/customers/components/calendar/useCalendarItems.js.map +7 -0
- package/dist/modules/customers/components/calendar/useCalendarPreferences.js +41 -0
- package/dist/modules/customers/components/calendar/useCalendarPreferences.js.map +7 -0
- package/dist/modules/customers/lib/calendar/categories.js +28 -0
- package/dist/modules/customers/lib/calendar/categories.js.map +7 -0
- package/dist/modules/customers/lib/calendar/conflicts.js +72 -0
- package/dist/modules/customers/lib/calendar/conflicts.js.map +7 -0
- package/dist/modules/customers/lib/calendar/editorPayload.js +271 -0
- package/dist/modules/customers/lib/calendar/editorPayload.js.map +7 -0
- package/dist/modules/customers/lib/calendar/grid.js +48 -0
- package/dist/modules/customers/lib/calendar/grid.js.map +7 -0
- package/dist/modules/customers/lib/calendar/layout.js +39 -0
- package/dist/modules/customers/lib/calendar/layout.js.map +7 -0
- package/dist/modules/customers/lib/calendar/mapItem.js +79 -0
- package/dist/modules/customers/lib/calendar/mapItem.js.map +7 -0
- package/dist/modules/customers/lib/calendar/preferences.js +71 -0
- package/dist/modules/customers/lib/calendar/preferences.js.map +7 -0
- package/dist/modules/customers/lib/calendar/range.js +46 -0
- package/dist/modules/customers/lib/calendar/range.js.map +7 -0
- package/dist/modules/customers/lib/calendar/recurrence.js +113 -0
- package/dist/modules/customers/lib/calendar/recurrence.js.map +7 -0
- package/dist/modules/dashboards/services/widgetDataService.js +5 -5
- package/dist/modules/dashboards/services/widgetDataService.js.map +2 -2
- package/dist/modules/dictionaries/api/[dictionaryId]/entries/[entryId]/route.js +61 -1
- package/dist/modules/dictionaries/api/[dictionaryId]/entries/[entryId]/route.js.map +2 -2
- package/dist/modules/dictionaries/api/[dictionaryId]/entries/route.js +33 -1
- package/dist/modules/dictionaries/api/[dictionaryId]/entries/route.js.map +2 -2
- package/dist/modules/dictionaries/api/[dictionaryId]/route.js +61 -1
- package/dist/modules/dictionaries/api/[dictionaryId]/route.js.map +2 -2
- package/dist/modules/dictionaries/api/route.js +33 -1
- package/dist/modules/dictionaries/api/route.js.map +2 -2
- package/dist/modules/feature_toggles/lib/queries.js +36 -52
- package/dist/modules/feature_toggles/lib/queries.js.map +2 -2
- package/dist/modules/perspectives/api/[tableId]/[perspectiveId]/route.js +32 -1
- package/dist/modules/perspectives/api/[tableId]/[perspectiveId]/route.js.map +2 -2
- package/dist/modules/perspectives/api/[tableId]/roles/[roleId]/route.js +32 -1
- package/dist/modules/perspectives/api/[tableId]/roles/[roleId]/route.js.map +2 -2
- package/dist/modules/perspectives/api/[tableId]/route.js +73 -2
- package/dist/modules/perspectives/api/[tableId]/route.js.map +2 -2
- package/dist/modules/perspectives/services/perspectiveService.js +5 -3
- package/dist/modules/perspectives/services/perspectiveService.js.map +2 -2
- package/dist/modules/planner/api/access.js +9 -0
- package/dist/modules/planner/api/access.js.map +2 -2
- package/dist/modules/planner/api/availability-date-specific.js +22 -1
- package/dist/modules/planner/api/availability-date-specific.js.map +2 -2
- package/dist/modules/planner/api/availability-weekly.js +22 -1
- package/dist/modules/planner/api/availability-weekly.js.map +2 -2
- package/dist/modules/resources/api/resources/tags/assign/route.js +39 -0
- package/dist/modules/resources/api/resources/tags/assign/route.js.map +2 -2
- package/dist/modules/resources/api/resources/tags/unassign/route.js +39 -0
- package/dist/modules/resources/api/resources/tags/unassign/route.js.map +2 -2
- package/dist/modules/sales/api/settings/document-numbers/route.js +33 -1
- package/dist/modules/sales/api/settings/document-numbers/route.js.map +2 -2
- package/dist/modules/sales/api/settings/order-editing/route.js +35 -3
- package/dist/modules/sales/api/settings/order-editing/route.js.map +2 -2
- package/dist/modules/staff/api/leave-requests/accept/route.js +41 -0
- package/dist/modules/staff/api/leave-requests/accept/route.js.map +2 -2
- package/dist/modules/staff/api/leave-requests/reject/route.js +41 -0
- package/dist/modules/staff/api/leave-requests/reject/route.js.map +2 -2
- package/dist/modules/staff/api/team-members/self/route.js +40 -0
- package/dist/modules/staff/api/team-members/self/route.js.map +2 -2
- package/dist/modules/staff/api/team-members/tags/assign/route.js +41 -0
- package/dist/modules/staff/api/team-members/tags/assign/route.js.map +2 -2
- package/dist/modules/staff/api/team-members/tags/unassign/route.js +41 -0
- package/dist/modules/staff/api/team-members/tags/unassign/route.js.map +2 -2
- package/dist/modules/translations/api/[entityType]/[entityId]/route.js +61 -1
- package/dist/modules/translations/api/[entityType]/[entityId]/route.js.map +2 -2
- package/dist/modules/translations/api/context.js +7 -0
- package/dist/modules/translations/api/context.js.map +2 -2
- package/dist/modules/translations/api/put/locales.js +33 -1
- package/dist/modules/translations/api/put/locales.js.map +2 -2
- package/dist/modules/workflows/backend/definitions/visual-editor/page.js +6 -7
- package/dist/modules/workflows/backend/definitions/visual-editor/page.js.map +2 -2
- package/dist/modules/workflows/backend/instances/[id]/page.js.map +1 -1
- package/dist/modules/workflows/components/EdgeEditDialog.js.map +1 -1
- package/dist/modules/workflows/components/EdgeEditDialogCrudForm.js.map +1 -1
- package/dist/modules/workflows/components/NodeEditDialog.js.map +1 -1
- package/dist/modules/workflows/components/NodeEditDialogCrudForm.js.map +1 -1
- package/dist/modules/workflows/components/WorkflowGraph.js.map +1 -1
- package/dist/modules/workflows/components/WorkflowGraphImpl.js +17 -9
- package/dist/modules/workflows/components/WorkflowGraphImpl.js.map +2 -2
- package/dist/modules/workflows/components/mobile/MobileVisualEditor.js.map +1 -1
- package/dist/modules/workflows/frontend/checkout-demo/deriveCurrentStep.js +8 -0
- package/dist/modules/workflows/frontend/checkout-demo/deriveCurrentStep.js.map +7 -0
- package/dist/modules/workflows/frontend/checkout-demo/page.js +2 -20
- package/dist/modules/workflows/frontend/checkout-demo/page.js.map +2 -2
- package/dist/modules/workflows/lib/graph-utils.js +8 -0
- package/dist/modules/workflows/lib/graph-utils.js.map +2 -2
- package/generated/entities/catalog_product/index.ts +26 -0
- package/generated/entities/catalog_product_variant/index.ts +2 -0
- package/generated/entity-fields-registry.ts +28 -0
- package/package.json +7 -7
- package/src/modules/catalog/api/products/route.ts +123 -39
- package/src/modules/catalog/api/variants/route.ts +4 -0
- package/src/modules/catalog/backend/catalog/products/[id]/page.tsx +43 -0
- package/src/modules/catalog/backend/catalog/products/[productId]/variants/[variantId]/page.tsx +14 -0
- package/src/modules/catalog/backend/catalog/products/[productId]/variants/create/page.tsx +2 -0
- package/src/modules/catalog/backend/catalog/products/create/page.tsx +41 -0
- package/src/modules/catalog/commands/products.ts +307 -2
- package/src/modules/catalog/commands/variants.ts +90 -1
- package/src/modules/catalog/components/products/ProductComplianceSection.tsx +497 -0
- package/src/modules/catalog/components/products/VariantBuilder.tsx +43 -0
- package/src/modules/catalog/components/products/productForm.ts +262 -0
- package/src/modules/catalog/components/products/variantForm.ts +4 -0
- package/src/modules/catalog/data/entities.ts +97 -0
- package/src/modules/catalog/data/types.ts +36 -0
- package/src/modules/catalog/data/validators.ts +159 -3
- package/src/modules/catalog/i18n/de.json +64 -0
- package/src/modules/catalog/i18n/en.json +64 -0
- package/src/modules/catalog/i18n/es.json +64 -0
- package/src/modules/catalog/i18n/pl.json +64 -0
- package/src/modules/catalog/lib/gtin.ts +66 -0
- package/src/modules/catalog/migrations/.snapshot-open-mercato.json +457 -0
- package/src/modules/catalog/migrations/Migration20260611090000.ts +17 -0
- package/src/modules/catalog/translations.ts +1 -1
- package/src/modules/configs/api/cache/route.ts +72 -10
- package/src/modules/configs/components/CachePanel.tsx +59 -29
- package/src/modules/currencies/api/currencies/options/route.ts +22 -4
- package/src/modules/currencies/services/rateFetchingService.ts +63 -26
- package/src/modules/customer_accounts/backend/customer_accounts/users/[id]/page.tsx +18 -18
- package/src/modules/customer_accounts/backend/customer_accounts/users/page.tsx +1 -1
- package/src/modules/customer_accounts/i18n/de.json +1 -1
- package/src/modules/customer_accounts/i18n/en.json +1 -1
- package/src/modules/customer_accounts/i18n/es.json +1 -1
- package/src/modules/customer_accounts/i18n/pl.json +1 -1
- package/src/modules/customers/backend/calendar/page.meta.ts +23 -0
- package/src/modules/customers/backend/calendar/page.tsx +12 -0
- package/src/modules/customers/cli.ts +1 -0
- package/src/modules/customers/components/calendar/AgendaList.tsx +219 -0
- package/src/modules/customers/components/calendar/CalendarEventEditor.tsx +386 -0
- package/src/modules/customers/components/calendar/CalendarFooter.tsx +61 -0
- package/src/modules/customers/components/calendar/CalendarHeader.tsx +40 -0
- package/src/modules/customers/components/calendar/CalendarScreen.tsx +590 -0
- package/src/modules/customers/components/calendar/CalendarSettingsModal.tsx +207 -0
- package/src/modules/customers/components/calendar/CalendarTabs.tsx +63 -0
- package/src/modules/customers/components/calendar/CalendarToolbar.tsx +295 -0
- package/src/modules/customers/components/calendar/EventBlock.tsx +205 -0
- package/src/modules/customers/components/calendar/EventPeekPopover.tsx +100 -0
- package/src/modules/customers/components/calendar/MonthGrid.tsx +236 -0
- package/src/modules/customers/components/calendar/ShortcutsDialog.tsx +57 -0
- package/src/modules/customers/components/calendar/TimeGrid.tsx +510 -0
- package/src/modules/customers/components/calendar/UpcomingCards.tsx +220 -0
- package/src/modules/customers/components/calendar/editor/CategoryField.tsx +79 -0
- package/src/modules/customers/components/calendar/editor/LocationField.tsx +37 -0
- package/src/modules/customers/components/calendar/editor/PeopleField.tsx +148 -0
- package/src/modules/customers/components/calendar/editor/RelatedToField.tsx +242 -0
- package/src/modules/customers/components/calendar/editor/RepeatField.tsx +132 -0
- package/src/modules/customers/components/calendar/editor/ScheduleSection.tsx +110 -0
- package/src/modules/customers/components/calendar/editor/SegmentGroup.tsx +50 -0
- package/src/modules/customers/components/calendar/editor/hooks.ts +162 -0
- package/src/modules/customers/components/calendar/editor/inputs.tsx +158 -0
- package/src/modules/customers/components/calendar/editor/lookups.ts +160 -0
- package/src/modules/customers/components/calendar/types.ts +163 -0
- package/src/modules/customers/components/calendar/useCalendarItems.ts +162 -0
- package/src/modules/customers/components/calendar/useCalendarPreferences.ts +52 -0
- package/src/modules/customers/i18n/de.json +195 -0
- package/src/modules/customers/i18n/en.json +195 -0
- package/src/modules/customers/i18n/es.json +195 -0
- package/src/modules/customers/i18n/pl.json +195 -0
- package/src/modules/customers/lib/calendar/categories.ts +26 -0
- package/src/modules/customers/lib/calendar/conflicts.ts +117 -0
- package/src/modules/customers/lib/calendar/editorPayload.ts +388 -0
- package/src/modules/customers/lib/calendar/grid.ts +50 -0
- package/src/modules/customers/lib/calendar/layout.ts +47 -0
- package/src/modules/customers/lib/calendar/mapItem.ts +94 -0
- package/src/modules/customers/lib/calendar/preferences.ts +95 -0
- package/src/modules/customers/lib/calendar/range.ts +45 -0
- package/src/modules/customers/lib/calendar/recurrence.ts +137 -0
- package/src/modules/dashboards/services/widgetDataService.ts +8 -6
- package/src/modules/dictionaries/api/[dictionaryId]/entries/[entryId]/route.ts +61 -1
- package/src/modules/dictionaries/api/[dictionaryId]/entries/route.ts +33 -1
- package/src/modules/dictionaries/api/[dictionaryId]/route.ts +65 -1
- package/src/modules/dictionaries/api/route.ts +36 -1
- package/src/modules/feature_toggles/lib/queries.ts +41 -60
- package/src/modules/perspectives/api/[tableId]/[perspectiveId]/route.ts +34 -1
- package/src/modules/perspectives/api/[tableId]/roles/[roleId]/route.ts +34 -1
- package/src/modules/perspectives/api/[tableId]/route.ts +107 -32
- package/src/modules/perspectives/services/perspectiveService.ts +9 -5
- package/src/modules/planner/api/access.ts +9 -0
- package/src/modules/planner/api/availability-date-specific.ts +22 -1
- package/src/modules/planner/api/availability-weekly.ts +22 -1
- package/src/modules/resources/api/resources/tags/assign/route.ts +42 -0
- package/src/modules/resources/api/resources/tags/unassign/route.ts +42 -0
- package/src/modules/sales/api/settings/document-numbers/route.ts +35 -1
- package/src/modules/sales/api/settings/order-editing/route.ts +37 -3
- package/src/modules/staff/api/leave-requests/accept/route.ts +45 -0
- package/src/modules/staff/api/leave-requests/reject/route.ts +45 -0
- package/src/modules/staff/api/team-members/self/route.ts +43 -0
- package/src/modules/staff/api/team-members/tags/assign/route.ts +45 -0
- package/src/modules/staff/api/team-members/tags/unassign/route.ts +45 -0
- package/src/modules/translations/api/[entityType]/[entityId]/route.ts +65 -1
- package/src/modules/translations/api/context.ts +7 -0
- package/src/modules/translations/api/put/locales.ts +35 -1
- package/src/modules/workflows/backend/definitions/visual-editor/page.tsx +11 -9
- package/src/modules/workflows/backend/instances/[id]/page.tsx +1 -1
- package/src/modules/workflows/components/EdgeEditDialog.tsx +1 -1
- package/src/modules/workflows/components/EdgeEditDialogCrudForm.tsx +1 -1
- package/src/modules/workflows/components/NodeEditDialog.tsx +1 -1
- package/src/modules/workflows/components/NodeEditDialogCrudForm.tsx +1 -1
- package/src/modules/workflows/components/WorkflowGraph.tsx +2 -2
- package/src/modules/workflows/components/WorkflowGraphImpl.tsx +27 -13
- package/src/modules/workflows/components/mobile/MobileVisualEditor.tsx +3 -3
- package/src/modules/workflows/frontend/checkout-demo/deriveCurrentStep.ts +12 -0
- package/src/modules/workflows/frontend/checkout-demo/page.tsx +3 -23
- package/src/modules/workflows/lib/graph-utils.ts +21 -1
|
@@ -790,6 +790,32 @@ async function loadProductSnapshot(em, id) {
|
|
|
790
790
|
weightValue,
|
|
791
791
|
weightUnit,
|
|
792
792
|
dimensions,
|
|
793
|
+
countryOfOriginCode: record.countryOfOriginCode ?? null,
|
|
794
|
+
pkwiuCode: record.pkwiuCode ?? null,
|
|
795
|
+
cnCode: record.cnCode ?? null,
|
|
796
|
+
hsCode: record.hsCode ?? null,
|
|
797
|
+
taxClassificationCode: record.taxClassificationCode ?? null,
|
|
798
|
+
gtuCodes: record.gtuCodes?.length ? [...record.gtuCodes] : null,
|
|
799
|
+
ageMin: record.ageMin ?? null,
|
|
800
|
+
isExciseGood: record.isExciseGood ?? false,
|
|
801
|
+
exciseCategory: record.exciseCategory ?? null,
|
|
802
|
+
requiresPrescription: record.requiresPrescription ?? false,
|
|
803
|
+
hazmatClass: record.hazmatClass ?? null,
|
|
804
|
+
unNumber: record.unNumber ?? null,
|
|
805
|
+
hazmatPackingGroup: record.hazmatPackingGroup ?? null,
|
|
806
|
+
containsLithiumBattery: record.containsLithiumBattery ?? false,
|
|
807
|
+
launchAt: record.launchAt ? record.launchAt.toISOString() : null,
|
|
808
|
+
endOfLifeAt: record.endOfLifeAt ? record.endOfLifeAt.toISOString() : null,
|
|
809
|
+
availableFrom: record.availableFrom ? record.availableFrom.toISOString() : null,
|
|
810
|
+
availableUntil: record.availableUntil ? record.availableUntil.toISOString() : null,
|
|
811
|
+
minOrderQty: record.minOrderQty ?? null,
|
|
812
|
+
maxOrderQty: record.maxOrderQty ?? null,
|
|
813
|
+
orderQtyIncrement: record.orderQtyIncrement ?? null,
|
|
814
|
+
requiresShipping: record.requiresShipping ?? true,
|
|
815
|
+
isQuoteOnly: record.isQuoteOnly ?? false,
|
|
816
|
+
seoTitle: record.seoTitle ?? null,
|
|
817
|
+
seoDescription: record.seoDescription ?? null,
|
|
818
|
+
canonicalUrl: record.canonicalUrl ?? null,
|
|
793
819
|
customFieldsetCode: record.customFieldsetCode ?? null,
|
|
794
820
|
metadata,
|
|
795
821
|
isConfigurable: record.isConfigurable,
|
|
@@ -831,6 +857,32 @@ function productSeedFromSnapshot(snapshot) {
|
|
|
831
857
|
weightValue: snapshot.weightValue ?? null,
|
|
832
858
|
weightUnit: snapshot.weightUnit ?? null,
|
|
833
859
|
dimensions: snapshot.dimensions ? cloneJson(snapshot.dimensions) : null,
|
|
860
|
+
countryOfOriginCode: snapshot.countryOfOriginCode ?? null,
|
|
861
|
+
pkwiuCode: snapshot.pkwiuCode ?? null,
|
|
862
|
+
cnCode: snapshot.cnCode ?? null,
|
|
863
|
+
hsCode: snapshot.hsCode ?? null,
|
|
864
|
+
taxClassificationCode: snapshot.taxClassificationCode ?? null,
|
|
865
|
+
gtuCodes: snapshot.gtuCodes ? [...snapshot.gtuCodes] : null,
|
|
866
|
+
ageMin: snapshot.ageMin ?? null,
|
|
867
|
+
isExciseGood: snapshot.isExciseGood ?? false,
|
|
868
|
+
exciseCategory: snapshot.exciseCategory ?? null,
|
|
869
|
+
requiresPrescription: snapshot.requiresPrescription ?? false,
|
|
870
|
+
hazmatClass: snapshot.hazmatClass ?? null,
|
|
871
|
+
unNumber: snapshot.unNumber ?? null,
|
|
872
|
+
hazmatPackingGroup: snapshot.hazmatPackingGroup ?? null,
|
|
873
|
+
containsLithiumBattery: snapshot.containsLithiumBattery ?? false,
|
|
874
|
+
launchAt: snapshot.launchAt ? new Date(snapshot.launchAt) : null,
|
|
875
|
+
endOfLifeAt: snapshot.endOfLifeAt ? new Date(snapshot.endOfLifeAt) : null,
|
|
876
|
+
availableFrom: snapshot.availableFrom ? new Date(snapshot.availableFrom) : null,
|
|
877
|
+
availableUntil: snapshot.availableUntil ? new Date(snapshot.availableUntil) : null,
|
|
878
|
+
minOrderQty: snapshot.minOrderQty ?? null,
|
|
879
|
+
maxOrderQty: snapshot.maxOrderQty ?? null,
|
|
880
|
+
orderQtyIncrement: snapshot.orderQtyIncrement ?? null,
|
|
881
|
+
requiresShipping: snapshot.requiresShipping ?? true,
|
|
882
|
+
isQuoteOnly: snapshot.isQuoteOnly ?? false,
|
|
883
|
+
seoTitle: snapshot.seoTitle ?? null,
|
|
884
|
+
seoDescription: snapshot.seoDescription ?? null,
|
|
885
|
+
canonicalUrl: snapshot.canonicalUrl ?? null,
|
|
834
886
|
metadata: snapshot.metadata ? cloneJson(snapshot.metadata) : null,
|
|
835
887
|
customFieldsetCode: snapshot.customFieldsetCode ?? null,
|
|
836
888
|
isConfigurable: snapshot.isConfigurable,
|
|
@@ -865,6 +917,32 @@ function applyProductSnapshot(em, record, snapshot) {
|
|
|
865
917
|
record.weightValue = snapshot.weightValue ?? null;
|
|
866
918
|
record.weightUnit = snapshot.weightUnit ?? null;
|
|
867
919
|
record.dimensions = snapshot.dimensions ? cloneJson(snapshot.dimensions) : null;
|
|
920
|
+
record.countryOfOriginCode = snapshot.countryOfOriginCode ?? null;
|
|
921
|
+
record.pkwiuCode = snapshot.pkwiuCode ?? null;
|
|
922
|
+
record.cnCode = snapshot.cnCode ?? null;
|
|
923
|
+
record.hsCode = snapshot.hsCode ?? null;
|
|
924
|
+
record.taxClassificationCode = snapshot.taxClassificationCode ?? null;
|
|
925
|
+
record.gtuCodes = snapshot.gtuCodes ? [...snapshot.gtuCodes] : null;
|
|
926
|
+
record.ageMin = snapshot.ageMin ?? null;
|
|
927
|
+
record.isExciseGood = snapshot.isExciseGood ?? false;
|
|
928
|
+
record.exciseCategory = snapshot.exciseCategory ?? null;
|
|
929
|
+
record.requiresPrescription = snapshot.requiresPrescription ?? false;
|
|
930
|
+
record.hazmatClass = snapshot.hazmatClass ?? null;
|
|
931
|
+
record.unNumber = snapshot.unNumber ?? null;
|
|
932
|
+
record.hazmatPackingGroup = snapshot.hazmatPackingGroup ?? null;
|
|
933
|
+
record.containsLithiumBattery = snapshot.containsLithiumBattery ?? false;
|
|
934
|
+
record.launchAt = snapshot.launchAt ? new Date(snapshot.launchAt) : null;
|
|
935
|
+
record.endOfLifeAt = snapshot.endOfLifeAt ? new Date(snapshot.endOfLifeAt) : null;
|
|
936
|
+
record.availableFrom = snapshot.availableFrom ? new Date(snapshot.availableFrom) : null;
|
|
937
|
+
record.availableUntil = snapshot.availableUntil ? new Date(snapshot.availableUntil) : null;
|
|
938
|
+
record.minOrderQty = snapshot.minOrderQty ?? null;
|
|
939
|
+
record.maxOrderQty = snapshot.maxOrderQty ?? null;
|
|
940
|
+
record.orderQtyIncrement = snapshot.orderQtyIncrement ?? null;
|
|
941
|
+
record.requiresShipping = snapshot.requiresShipping ?? true;
|
|
942
|
+
record.isQuoteOnly = snapshot.isQuoteOnly ?? false;
|
|
943
|
+
record.seoTitle = snapshot.seoTitle ?? null;
|
|
944
|
+
record.seoDescription = snapshot.seoDescription ?? null;
|
|
945
|
+
record.canonicalUrl = snapshot.canonicalUrl ?? null;
|
|
868
946
|
record.metadata = snapshot.metadata ? cloneJson(snapshot.metadata) : null;
|
|
869
947
|
record.customFieldsetCode = snapshot.customFieldsetCode ?? null;
|
|
870
948
|
record.optionSchemaTemplate = snapshot.optionSchemaId ? em.getReference(CatalogOptionSchemaTemplate, snapshot.optionSchemaId) : null;
|
|
@@ -934,6 +1012,32 @@ const createProductCommand = {
|
|
|
934
1012
|
weightValue,
|
|
935
1013
|
weightUnit,
|
|
936
1014
|
dimensions,
|
|
1015
|
+
countryOfOriginCode: parsed.countryOfOriginCode ?? null,
|
|
1016
|
+
pkwiuCode: parsed.pkwiuCode ?? null,
|
|
1017
|
+
cnCode: parsed.cnCode ?? null,
|
|
1018
|
+
hsCode: parsed.hsCode ?? null,
|
|
1019
|
+
taxClassificationCode: parsed.taxClassificationCode ?? null,
|
|
1020
|
+
gtuCodes: parsed.gtuCodes ?? null,
|
|
1021
|
+
ageMin: parsed.ageMin ?? null,
|
|
1022
|
+
isExciseGood: parsed.isExciseGood ?? false,
|
|
1023
|
+
exciseCategory: parsed.exciseCategory ?? null,
|
|
1024
|
+
requiresPrescription: parsed.requiresPrescription ?? false,
|
|
1025
|
+
hazmatClass: parsed.hazmatClass ?? null,
|
|
1026
|
+
unNumber: parsed.unNumber ?? null,
|
|
1027
|
+
hazmatPackingGroup: parsed.hazmatPackingGroup ?? null,
|
|
1028
|
+
containsLithiumBattery: parsed.containsLithiumBattery ?? false,
|
|
1029
|
+
launchAt: parsed.launchAt ?? null,
|
|
1030
|
+
endOfLifeAt: parsed.endOfLifeAt ?? null,
|
|
1031
|
+
availableFrom: parsed.availableFrom ?? null,
|
|
1032
|
+
availableUntil: parsed.availableUntil ?? null,
|
|
1033
|
+
minOrderQty: parsed.minOrderQty ?? null,
|
|
1034
|
+
maxOrderQty: parsed.maxOrderQty ?? null,
|
|
1035
|
+
orderQtyIncrement: parsed.orderQtyIncrement ?? null,
|
|
1036
|
+
requiresShipping: parsed.requiresShipping ?? true,
|
|
1037
|
+
isQuoteOnly: parsed.isQuoteOnly ?? false,
|
|
1038
|
+
seoTitle: parsed.seoTitle ?? null,
|
|
1039
|
+
seoDescription: parsed.seoDescription ?? null,
|
|
1040
|
+
canonicalUrl: parsed.canonicalUrl ?? null,
|
|
937
1041
|
metadata,
|
|
938
1042
|
customFieldsetCode: parsed.customFieldsetCode ?? null,
|
|
939
1043
|
isConfigurable: parsed.isConfigurable ?? false,
|
|
@@ -1140,6 +1244,54 @@ const updateProductCommand = {
|
|
|
1140
1244
|
ensureTenantScope(ctx, tenantId);
|
|
1141
1245
|
ensureOrganizationScope(ctx, organizationId);
|
|
1142
1246
|
ensureSameScope(record, organizationId, tenantId);
|
|
1247
|
+
const mergedRangeViolation = (() => {
|
|
1248
|
+
const minOrderQty = parsed.minOrderQty !== void 0 ? parsed.minOrderQty ?? null : record.minOrderQty ?? null;
|
|
1249
|
+
const maxOrderQty = parsed.maxOrderQty !== void 0 ? parsed.maxOrderQty ?? null : record.maxOrderQty ?? null;
|
|
1250
|
+
if (minOrderQty != null && maxOrderQty != null && maxOrderQty < minOrderQty) {
|
|
1251
|
+
return {
|
|
1252
|
+
field: "maxOrderQty",
|
|
1253
|
+
key: "catalog.products.validation.orderQtyRange",
|
|
1254
|
+
fallback: "Maximum order quantity cannot be lower than the minimum."
|
|
1255
|
+
};
|
|
1256
|
+
}
|
|
1257
|
+
const launchAt = parsed.launchAt !== void 0 ? parsed.launchAt ?? null : record.launchAt ?? null;
|
|
1258
|
+
const endOfLifeAt = parsed.endOfLifeAt !== void 0 ? parsed.endOfLifeAt ?? null : record.endOfLifeAt ?? null;
|
|
1259
|
+
if (launchAt && endOfLifeAt && endOfLifeAt < launchAt) {
|
|
1260
|
+
return {
|
|
1261
|
+
field: "endOfLifeAt",
|
|
1262
|
+
key: "catalog.products.validation.lifecycleDateRange",
|
|
1263
|
+
fallback: "End of life cannot be before the launch date."
|
|
1264
|
+
};
|
|
1265
|
+
}
|
|
1266
|
+
const availableFrom = parsed.availableFrom !== void 0 ? parsed.availableFrom ?? null : record.availableFrom ?? null;
|
|
1267
|
+
const availableUntil = parsed.availableUntil !== void 0 ? parsed.availableUntil ?? null : record.availableUntil ?? null;
|
|
1268
|
+
if (availableFrom && availableUntil && availableUntil < availableFrom) {
|
|
1269
|
+
return {
|
|
1270
|
+
field: "availableUntil",
|
|
1271
|
+
key: "catalog.products.validation.availabilityDateRange",
|
|
1272
|
+
fallback: "Available until cannot be before available from."
|
|
1273
|
+
};
|
|
1274
|
+
}
|
|
1275
|
+
return null;
|
|
1276
|
+
})();
|
|
1277
|
+
if (mergedRangeViolation) {
|
|
1278
|
+
const message = translate(
|
|
1279
|
+
mergedRangeViolation.key,
|
|
1280
|
+
mergedRangeViolation.fallback
|
|
1281
|
+
);
|
|
1282
|
+
throw new CrudHttpError(400, {
|
|
1283
|
+
error: message,
|
|
1284
|
+
fieldErrors: { [mergedRangeViolation.field]: message },
|
|
1285
|
+
details: [
|
|
1286
|
+
{
|
|
1287
|
+
path: [mergedRangeViolation.field],
|
|
1288
|
+
message,
|
|
1289
|
+
code: "invalid",
|
|
1290
|
+
origin: "validation"
|
|
1291
|
+
}
|
|
1292
|
+
]
|
|
1293
|
+
});
|
|
1294
|
+
}
|
|
1143
1295
|
const dataEngine = ctx.container.resolve("dataEngine");
|
|
1144
1296
|
const lookupEm = em.fork();
|
|
1145
1297
|
const taxRateProvided = parsed.taxRateId !== void 0 || parsed.taxRate !== void 0;
|
|
@@ -1262,6 +1414,55 @@ const updateProductCommand = {
|
|
|
1262
1414
|
if (parsed.isConfigurable !== void 0)
|
|
1263
1415
|
record.isConfigurable = parsed.isConfigurable;
|
|
1264
1416
|
if (parsed.isActive !== void 0) record.isActive = parsed.isActive;
|
|
1417
|
+
if (parsed.countryOfOriginCode !== void 0)
|
|
1418
|
+
record.countryOfOriginCode = parsed.countryOfOriginCode ?? null;
|
|
1419
|
+
if (parsed.pkwiuCode !== void 0)
|
|
1420
|
+
record.pkwiuCode = parsed.pkwiuCode ?? null;
|
|
1421
|
+
if (parsed.cnCode !== void 0) record.cnCode = parsed.cnCode ?? null;
|
|
1422
|
+
if (parsed.hsCode !== void 0) record.hsCode = parsed.hsCode ?? null;
|
|
1423
|
+
if (parsed.taxClassificationCode !== void 0)
|
|
1424
|
+
record.taxClassificationCode = parsed.taxClassificationCode ?? null;
|
|
1425
|
+
if (parsed.gtuCodes !== void 0)
|
|
1426
|
+
record.gtuCodes = parsed.gtuCodes ?? null;
|
|
1427
|
+
if (parsed.ageMin !== void 0) record.ageMin = parsed.ageMin ?? null;
|
|
1428
|
+
if (parsed.isExciseGood !== void 0)
|
|
1429
|
+
record.isExciseGood = parsed.isExciseGood;
|
|
1430
|
+
if (parsed.exciseCategory !== void 0)
|
|
1431
|
+
record.exciseCategory = parsed.exciseCategory ?? null;
|
|
1432
|
+
if (parsed.requiresPrescription !== void 0)
|
|
1433
|
+
record.requiresPrescription = parsed.requiresPrescription;
|
|
1434
|
+
if (parsed.hazmatClass !== void 0)
|
|
1435
|
+
record.hazmatClass = parsed.hazmatClass ?? null;
|
|
1436
|
+
if (parsed.unNumber !== void 0)
|
|
1437
|
+
record.unNumber = parsed.unNumber ?? null;
|
|
1438
|
+
if (parsed.hazmatPackingGroup !== void 0)
|
|
1439
|
+
record.hazmatPackingGroup = parsed.hazmatPackingGroup ?? null;
|
|
1440
|
+
if (parsed.containsLithiumBattery !== void 0)
|
|
1441
|
+
record.containsLithiumBattery = parsed.containsLithiumBattery;
|
|
1442
|
+
if (parsed.launchAt !== void 0)
|
|
1443
|
+
record.launchAt = parsed.launchAt ?? null;
|
|
1444
|
+
if (parsed.endOfLifeAt !== void 0)
|
|
1445
|
+
record.endOfLifeAt = parsed.endOfLifeAt ?? null;
|
|
1446
|
+
if (parsed.availableFrom !== void 0)
|
|
1447
|
+
record.availableFrom = parsed.availableFrom ?? null;
|
|
1448
|
+
if (parsed.availableUntil !== void 0)
|
|
1449
|
+
record.availableUntil = parsed.availableUntil ?? null;
|
|
1450
|
+
if (parsed.minOrderQty !== void 0)
|
|
1451
|
+
record.minOrderQty = parsed.minOrderQty ?? null;
|
|
1452
|
+
if (parsed.maxOrderQty !== void 0)
|
|
1453
|
+
record.maxOrderQty = parsed.maxOrderQty ?? null;
|
|
1454
|
+
if (parsed.orderQtyIncrement !== void 0)
|
|
1455
|
+
record.orderQtyIncrement = parsed.orderQtyIncrement ?? null;
|
|
1456
|
+
if (parsed.requiresShipping !== void 0)
|
|
1457
|
+
record.requiresShipping = parsed.requiresShipping;
|
|
1458
|
+
if (parsed.isQuoteOnly !== void 0)
|
|
1459
|
+
record.isQuoteOnly = parsed.isQuoteOnly;
|
|
1460
|
+
if (parsed.seoTitle !== void 0)
|
|
1461
|
+
record.seoTitle = parsed.seoTitle ?? null;
|
|
1462
|
+
if (parsed.seoDescription !== void 0)
|
|
1463
|
+
record.seoDescription = parsed.seoDescription ?? null;
|
|
1464
|
+
if (parsed.canonicalUrl !== void 0)
|
|
1465
|
+
record.canonicalUrl = parsed.canonicalUrl ?? null;
|
|
1265
1466
|
try {
|
|
1266
1467
|
await withAtomicFlush(
|
|
1267
1468
|
em,
|
|
@@ -1302,6 +1503,14 @@ const updateProductCommand = {
|
|
|
1302
1503
|
const after = snapshots.after;
|
|
1303
1504
|
if (!before || !after) return null;
|
|
1304
1505
|
const { translate } = await resolveTranslations();
|
|
1506
|
+
const beforeGtuCodes = (before.gtuCodes ?? []).join(",");
|
|
1507
|
+
const afterGtuCodes = (after.gtuCodes ?? []).join(",");
|
|
1508
|
+
const gtuCodesChange = beforeGtuCodes !== afterGtuCodes ? {
|
|
1509
|
+
gtuCodes: {
|
|
1510
|
+
from: before.gtuCodes ?? null,
|
|
1511
|
+
to: after.gtuCodes ?? null
|
|
1512
|
+
}
|
|
1513
|
+
} : null;
|
|
1305
1514
|
return {
|
|
1306
1515
|
actionLabel: translate(
|
|
1307
1516
|
"catalog.audit.products.update",
|
|
@@ -1311,20 +1520,48 @@ const updateProductCommand = {
|
|
|
1311
1520
|
resourceId: before.id,
|
|
1312
1521
|
tenantId: before.tenantId,
|
|
1313
1522
|
organizationId: before.organizationId,
|
|
1314
|
-
changes:
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1523
|
+
changes: {
|
|
1524
|
+
...buildChanges(before, after, [
|
|
1525
|
+
"title",
|
|
1526
|
+
"sku",
|
|
1527
|
+
"productType",
|
|
1528
|
+
"defaultUnit",
|
|
1529
|
+
"defaultSalesUnit",
|
|
1530
|
+
"defaultSalesUnitQuantity",
|
|
1531
|
+
"uomRoundingScale",
|
|
1532
|
+
"uomRoundingMode",
|
|
1533
|
+
"unitPriceEnabled",
|
|
1534
|
+
"unitPriceReferenceUnit",
|
|
1535
|
+
"unitPriceBaseQuantity",
|
|
1536
|
+
"isActive",
|
|
1537
|
+
"countryOfOriginCode",
|
|
1538
|
+
"pkwiuCode",
|
|
1539
|
+
"cnCode",
|
|
1540
|
+
"hsCode",
|
|
1541
|
+
"taxClassificationCode",
|
|
1542
|
+
"ageMin",
|
|
1543
|
+
"isExciseGood",
|
|
1544
|
+
"exciseCategory",
|
|
1545
|
+
"requiresPrescription",
|
|
1546
|
+
"hazmatClass",
|
|
1547
|
+
"unNumber",
|
|
1548
|
+
"hazmatPackingGroup",
|
|
1549
|
+
"containsLithiumBattery",
|
|
1550
|
+
"launchAt",
|
|
1551
|
+
"endOfLifeAt",
|
|
1552
|
+
"availableFrom",
|
|
1553
|
+
"availableUntil",
|
|
1554
|
+
"minOrderQty",
|
|
1555
|
+
"maxOrderQty",
|
|
1556
|
+
"orderQtyIncrement",
|
|
1557
|
+
"requiresShipping",
|
|
1558
|
+
"isQuoteOnly",
|
|
1559
|
+
"seoTitle",
|
|
1560
|
+
"seoDescription",
|
|
1561
|
+
"canonicalUrl"
|
|
1562
|
+
]),
|
|
1563
|
+
...gtuCodesChange
|
|
1564
|
+
},
|
|
1328
1565
|
snapshotBefore: before,
|
|
1329
1566
|
snapshotAfter: after,
|
|
1330
1567
|
payload: {
|