@open-mercato/core 0.6.7-develop.6669.1.40b669666b → 0.6.7-develop.6670.1.4efa7961c6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +2 -2
- package/dist/generated/entities/inventory_balance/index.js +21 -0
- package/dist/generated/entities/inventory_balance/index.js.map +7 -0
- package/dist/generated/entities/inventory_lot/index.js +19 -0
- package/dist/generated/entities/inventory_lot/index.js.map +7 -0
- package/dist/generated/entities/inventory_movement/index.js +35 -0
- package/dist/generated/entities/inventory_movement/index.js.map +7 -0
- package/dist/generated/entities/inventory_reservation/index.js +23 -0
- package/dist/generated/entities/inventory_reservation/index.js.map +7 -0
- package/dist/generated/entities/product_inventory_profile/index.js +21 -0
- package/dist/generated/entities/product_inventory_profile/index.js.map +7 -0
- package/dist/generated/entities/sales_order_warehouse_assignment/index.js +11 -0
- package/dist/generated/entities/sales_order_warehouse_assignment/index.js.map +7 -0
- package/dist/generated/entities/warehouse/index.js +25 -0
- package/dist/generated/entities/warehouse/index.js.map +7 -0
- package/dist/generated/entities/warehouse_location/index.js +21 -0
- package/dist/generated/entities/warehouse_location/index.js.map +7 -0
- package/dist/generated/entities/warehouse_zone/index.js +11 -0
- package/dist/generated/entities/warehouse_zone/index.js.map +7 -0
- package/dist/generated/entities.ids.generated.js +12 -0
- package/dist/generated/entities.ids.generated.js.map +2 -2
- package/dist/generated/entity-fields-registry.js +98 -0
- package/dist/generated/entity-fields-registry.js.map +2 -2
- package/dist/modules/auth/backend/roles/page.js +12 -4
- package/dist/modules/auth/backend/roles/page.js.map +2 -2
- package/dist/modules/auth/lib/backendChrome.js +1 -0
- package/dist/modules/auth/lib/backendChrome.js.map +2 -2
- package/dist/modules/auth/services/rbacService.js +16 -17
- package/dist/modules/auth/services/rbacService.js.map +2 -2
- package/dist/modules/catalog/api/products/route.js +3 -0
- package/dist/modules/catalog/api/products/route.js.map +2 -2
- package/dist/modules/catalog/api/variants/route.js +3 -0
- package/dist/modules/catalog/api/variants/route.js.map +2 -2
- package/dist/modules/query_index/lib/engine.js +6 -6
- package/dist/modules/query_index/lib/engine.js.map +2 -2
- package/dist/modules/sales/api/documents/factory.js +1 -0
- package/dist/modules/sales/api/documents/factory.js.map +2 -2
- package/dist/modules/sales/commands/documents.js +53 -0
- package/dist/modules/sales/commands/documents.js.map +2 -2
- package/dist/modules/sales/components/documents/ItemsSection.js +51 -2
- package/dist/modules/sales/components/documents/ItemsSection.js.map +2 -2
- package/dist/modules/sales/events.js +2 -0
- package/dist/modules/sales/events.js.map +2 -2
- package/dist/modules/sales/widgets/injection/order-items-context.js +11 -0
- package/dist/modules/sales/widgets/injection/order-items-context.js.map +7 -0
- package/dist/modules/wms/acl.js +18 -0
- package/dist/modules/wms/acl.js.map +7 -0
- package/dist/modules/wms/analytics.js +11 -0
- package/dist/modules/wms/analytics.js.map +7 -0
- package/dist/modules/wms/api/dashboard/operational/route.js +80 -0
- package/dist/modules/wms/api/dashboard/operational/route.js.map +7 -0
- package/dist/modules/wms/api/interceptors.js +90 -0
- package/dist/modules/wms/api/interceptors.js.map +7 -0
- package/dist/modules/wms/api/inventory/adjust/route.js +51 -0
- package/dist/modules/wms/api/inventory/adjust/route.js.map +7 -0
- package/dist/modules/wms/api/inventory/allocate/route.js +51 -0
- package/dist/modules/wms/api/inventory/allocate/route.js.map +7 -0
- package/dist/modules/wms/api/inventory/balances/route.js +172 -0
- package/dist/modules/wms/api/inventory/balances/route.js.map +7 -0
- package/dist/modules/wms/api/inventory/cycle-count/route.js +52 -0
- package/dist/modules/wms/api/inventory/cycle-count/route.js.map +7 -0
- package/dist/modules/wms/api/inventory/helpers.js +113 -0
- package/dist/modules/wms/api/inventory/helpers.js.map +7 -0
- package/dist/modules/wms/api/inventory/import/apply/route.js +46 -0
- package/dist/modules/wms/api/inventory/import/apply/route.js.map +7 -0
- package/dist/modules/wms/api/inventory/import/helpers.js +195 -0
- package/dist/modules/wms/api/inventory/import/helpers.js.map +7 -0
- package/dist/modules/wms/api/inventory/import/template/route.js +32 -0
- package/dist/modules/wms/api/inventory/import/template/route.js.map +7 -0
- package/dist/modules/wms/api/inventory/import/validate/route.js +54 -0
- package/dist/modules/wms/api/inventory/import/validate/route.js.map +7 -0
- package/dist/modules/wms/api/inventory/move/route.js +51 -0
- package/dist/modules/wms/api/inventory/move/route.js.map +7 -0
- package/dist/modules/wms/api/inventory/movements/route.js +164 -0
- package/dist/modules/wms/api/inventory/movements/route.js.map +7 -0
- package/dist/modules/wms/api/inventory/receive/route.js +50 -0
- package/dist/modules/wms/api/inventory/receive/route.js.map +7 -0
- package/dist/modules/wms/api/inventory/release/route.js +44 -0
- package/dist/modules/wms/api/inventory/release/route.js.map +7 -0
- package/dist/modules/wms/api/inventory/reservations/route.js +128 -0
- package/dist/modules/wms/api/inventory/reservations/route.js.map +7 -0
- package/dist/modules/wms/api/inventory/reserve/route.js +59 -0
- package/dist/modules/wms/api/inventory/reserve/route.js.map +7 -0
- package/dist/modules/wms/api/inventory-profiles/route.js +178 -0
- package/dist/modules/wms/api/inventory-profiles/route.js.map +7 -0
- package/dist/modules/wms/api/listEnrichers.js +181 -0
- package/dist/modules/wms/api/listEnrichers.js.map +7 -0
- package/dist/modules/wms/api/listSearch.js +77 -0
- package/dist/modules/wms/api/listSearch.js.map +7 -0
- package/dist/modules/wms/api/locations/route.js +172 -0
- package/dist/modules/wms/api/locations/route.js.map +7 -0
- package/dist/modules/wms/api/lots/route.js +204 -0
- package/dist/modules/wms/api/lots/route.js.map +7 -0
- package/dist/modules/wms/api/openapi.js +27 -0
- package/dist/modules/wms/api/openapi.js.map +7 -0
- package/dist/modules/wms/api/sales-orders/[salesOrderId]/re-run-reservation/route.js +54 -0
- package/dist/modules/wms/api/sales-orders/[salesOrderId]/re-run-reservation/route.js.map +7 -0
- package/dist/modules/wms/api/sales-orders/[salesOrderId]/warehouse-assignment/route.js +279 -0
- package/dist/modules/wms/api/sales-orders/[salesOrderId]/warehouse-assignment/route.js.map +7 -0
- package/dist/modules/wms/api/sales-orders/assign-warehouse/route.js +56 -0
- package/dist/modules/wms/api/sales-orders/assign-warehouse/route.js.map +7 -0
- package/dist/modules/wms/api/sales-orders/unassign-warehouse/route.js +43 -0
- package/dist/modules/wms/api/sales-orders/unassign-warehouse/route.js.map +7 -0
- package/dist/modules/wms/api/warehouses/route.js +181 -0
- package/dist/modules/wms/api/warehouses/route.js.map +7 -0
- package/dist/modules/wms/api/zones/route.js +159 -0
- package/dist/modules/wms/api/zones/route.js.map +7 -0
- package/dist/modules/wms/backend/config/wms/page.js +9 -0
- package/dist/modules/wms/backend/config/wms/page.js.map +7 -0
- package/dist/modules/wms/backend/config/wms/page.meta.js +18 -0
- package/dist/modules/wms/backend/config/wms/page.meta.js.map +7 -0
- package/dist/modules/wms/backend/page.js +9 -0
- package/dist/modules/wms/backend/page.js.map +7 -0
- package/dist/modules/wms/backend/page.meta.js +16 -0
- package/dist/modules/wms/backend/page.meta.js.map +7 -0
- package/dist/modules/wms/backend/wms/inventory/page.js +9 -0
- package/dist/modules/wms/backend/wms/inventory/page.js.map +7 -0
- package/dist/modules/wms/backend/wms/inventory/page.meta.js +18 -0
- package/dist/modules/wms/backend/wms/inventory/page.meta.js.map +7 -0
- package/dist/modules/wms/backend/wms/location/[id]/page.js +9 -0
- package/dist/modules/wms/backend/wms/location/[id]/page.js.map +7 -0
- package/dist/modules/wms/backend/wms/location/[id]/page.meta.js +18 -0
- package/dist/modules/wms/backend/wms/location/[id]/page.meta.js.map +7 -0
- package/dist/modules/wms/backend/wms/locations/page.js +10 -0
- package/dist/modules/wms/backend/wms/locations/page.js.map +7 -0
- package/dist/modules/wms/backend/wms/locations/page.meta.js +18 -0
- package/dist/modules/wms/backend/wms/locations/page.meta.js.map +7 -0
- package/dist/modules/wms/backend/wms/lot/[id]/page.js +9 -0
- package/dist/modules/wms/backend/wms/lot/[id]/page.js.map +7 -0
- package/dist/modules/wms/backend/wms/lot/[id]/page.meta.js +18 -0
- package/dist/modules/wms/backend/wms/lot/[id]/page.meta.js.map +7 -0
- package/dist/modules/wms/backend/wms/lots/page.js +9 -0
- package/dist/modules/wms/backend/wms/lots/page.js.map +7 -0
- package/dist/modules/wms/backend/wms/lots/page.meta.js +18 -0
- package/dist/modules/wms/backend/wms/lots/page.meta.js.map +7 -0
- package/dist/modules/wms/backend/wms/movements/page.js +22 -0
- package/dist/modules/wms/backend/wms/movements/page.js.map +7 -0
- package/dist/modules/wms/backend/wms/movements/page.meta.js +18 -0
- package/dist/modules/wms/backend/wms/movements/page.meta.js.map +7 -0
- package/dist/modules/wms/backend/wms/reservations/page.js +23 -0
- package/dist/modules/wms/backend/wms/reservations/page.js.map +7 -0
- package/dist/modules/wms/backend/wms/reservations/page.meta.js +18 -0
- package/dist/modules/wms/backend/wms/reservations/page.meta.js.map +7 -0
- package/dist/modules/wms/backend/wms/sku/[id]/page.js +9 -0
- package/dist/modules/wms/backend/wms/sku/[id]/page.js.map +7 -0
- package/dist/modules/wms/backend/wms/sku/[id]/page.meta.js +18 -0
- package/dist/modules/wms/backend/wms/sku/[id]/page.meta.js.map +7 -0
- package/dist/modules/wms/backend/wms/warehouses/page.js +10 -0
- package/dist/modules/wms/backend/wms/warehouses/page.js.map +7 -0
- package/dist/modules/wms/backend/wms/warehouses/page.meta.js +18 -0
- package/dist/modules/wms/backend/wms/warehouses/page.meta.js.map +7 -0
- package/dist/modules/wms/backend/wms/zones/page.js +10 -0
- package/dist/modules/wms/backend/wms/zones/page.js.map +7 -0
- package/dist/modules/wms/backend/wms/zones/page.meta.js +18 -0
- package/dist/modules/wms/backend/wms/zones/page.meta.js.map +7 -0
- package/dist/modules/wms/ce.js +80 -0
- package/dist/modules/wms/ce.js.map +7 -0
- package/dist/modules/wms/cli.js +83 -0
- package/dist/modules/wms/cli.js.map +7 -0
- package/dist/modules/wms/commands/configuration.js +1519 -0
- package/dist/modules/wms/commands/configuration.js.map +7 -0
- package/dist/modules/wms/commands/index.js +4 -0
- package/dist/modules/wms/commands/index.js.map +7 -0
- package/dist/modules/wms/commands/inventory-actions.js +1539 -0
- package/dist/modules/wms/commands/inventory-actions.js.map +7 -0
- package/dist/modules/wms/commands/sales-order-assignment.js +277 -0
- package/dist/modules/wms/commands/sales-order-assignment.js.map +7 -0
- package/dist/modules/wms/commands/shared.js +82 -0
- package/dist/modules/wms/commands/shared.js.map +7 -0
- package/dist/modules/wms/components/backend/AdjustInventoryDialog.js +755 -0
- package/dist/modules/wms/components/backend/AdjustInventoryDialog.js.map +7 -0
- package/dist/modules/wms/components/backend/ChangeLotStatusDialog.js +269 -0
- package/dist/modules/wms/components/backend/ChangeLotStatusDialog.js.map +7 -0
- package/dist/modules/wms/components/backend/CycleCountWizardDialog.js +1783 -0
- package/dist/modules/wms/components/backend/CycleCountWizardDialog.js.map +7 -0
- package/dist/modules/wms/components/backend/ImportInventoryDialog.js +766 -0
- package/dist/modules/wms/components/backend/ImportInventoryDialog.js.map +7 -0
- package/dist/modules/wms/components/backend/InventoryOperationsSection.js +119 -0
- package/dist/modules/wms/components/backend/InventoryOperationsSection.js.map +7 -0
- package/dist/modules/wms/components/backend/LocationEditDialog.js +140 -0
- package/dist/modules/wms/components/backend/LocationEditDialog.js.map +7 -0
- package/dist/modules/wms/components/backend/MoveInventoryDialog.js +791 -0
- package/dist/modules/wms/components/backend/MoveInventoryDialog.js.map +7 -0
- package/dist/modules/wms/components/backend/ReceiveInventoryDialog.js +656 -0
- package/dist/modules/wms/components/backend/ReceiveInventoryDialog.js.map +7 -0
- package/dist/modules/wms/components/backend/ReleaseReservationDialog.js +344 -0
- package/dist/modules/wms/components/backend/ReleaseReservationDialog.js.map +7 -0
- package/dist/modules/wms/components/backend/ReserveInventoryDialog.js +475 -0
- package/dist/modules/wms/components/backend/ReserveInventoryDialog.js.map +7 -0
- package/dist/modules/wms/components/backend/WmsConfigurationPage.js +1112 -0
- package/dist/modules/wms/components/backend/WmsConfigurationPage.js.map +7 -0
- package/dist/modules/wms/components/backend/WmsInventoryConsolePage.js +908 -0
- package/dist/modules/wms/components/backend/WmsInventoryConsolePage.js.map +7 -0
- package/dist/modules/wms/components/backend/WmsLocationDetailPage.js +1015 -0
- package/dist/modules/wms/components/backend/WmsLocationDetailPage.js.map +7 -0
- package/dist/modules/wms/components/backend/WmsLotDetailPage.js +1049 -0
- package/dist/modules/wms/components/backend/WmsLotDetailPage.js.map +7 -0
- package/dist/modules/wms/components/backend/WmsLotsListPage.js +297 -0
- package/dist/modules/wms/components/backend/WmsLotsListPage.js.map +7 -0
- package/dist/modules/wms/components/backend/WmsOperationalDashboardPage.js +757 -0
- package/dist/modules/wms/components/backend/WmsOperationalDashboardPage.js.map +7 -0
- package/dist/modules/wms/components/backend/WmsSkuDetailPage.js +975 -0
- package/dist/modules/wms/components/backend/WmsSkuDetailPage.js.map +7 -0
- package/dist/modules/wms/components/backend/inventoryMutationLoaders.js +710 -0
- package/dist/modules/wms/components/backend/inventoryMutationLoaders.js.map +7 -0
- package/dist/modules/wms/components/backend/useWmsInventoryMutationAccess.js +79 -0
- package/dist/modules/wms/components/backend/useWmsInventoryMutationAccess.js.map +7 -0
- package/dist/modules/wms/components/backend/useWmsInventoryScopeFromSearchParams.js +24 -0
- package/dist/modules/wms/components/backend/useWmsInventoryScopeFromSearchParams.js.map +7 -0
- package/dist/modules/wms/components/backend/wmsLookupLoaders.js +55 -0
- package/dist/modules/wms/components/backend/wmsLookupLoaders.js.map +7 -0
- package/dist/modules/wms/data/enrichers.js +501 -0
- package/dist/modules/wms/data/enrichers.js.map +7 -0
- package/dist/modules/wms/data/entities.js +467 -0
- package/dist/modules/wms/data/entities.js.map +7 -0
- package/dist/modules/wms/data/validators.js +399 -0
- package/dist/modules/wms/data/validators.js.map +7 -0
- package/dist/modules/wms/di.js +27 -0
- package/dist/modules/wms/di.js.map +7 -0
- package/dist/modules/wms/events.js +42 -0
- package/dist/modules/wms/events.js.map +7 -0
- package/dist/modules/wms/index.js +17 -0
- package/dist/modules/wms/index.js.map +7 -0
- package/dist/modules/wms/lib/catalogInventoryProfileIntent.js +54 -0
- package/dist/modules/wms/lib/catalogInventoryProfileIntent.js.map +7 -0
- package/dist/modules/wms/lib/catalogInventoryProfileSync.js +144 -0
- package/dist/modules/wms/lib/catalogInventoryProfileSync.js.map +7 -0
- package/dist/modules/wms/lib/expiry.js +29 -0
- package/dist/modules/wms/lib/expiry.js.map +7 -0
- package/dist/modules/wms/lib/flashMutationError.js +51 -0
- package/dist/modules/wms/lib/flashMutationError.js.map +7 -0
- package/dist/modules/wms/lib/inventoryDisplayUi.js +188 -0
- package/dist/modules/wms/lib/inventoryDisplayUi.js.map +7 -0
- package/dist/modules/wms/lib/inventoryIdempotency.js +37 -0
- package/dist/modules/wms/lib/inventoryIdempotency.js.map +7 -0
- package/dist/modules/wms/lib/inventoryImportCsv.js +173 -0
- package/dist/modules/wms/lib/inventoryImportCsv.js.map +7 -0
- package/dist/modules/wms/lib/inventoryImportService.js +468 -0
- package/dist/modules/wms/lib/inventoryImportService.js.map +7 -0
- package/dist/modules/wms/lib/inventoryMutationUi.js +25 -0
- package/dist/modules/wms/lib/inventoryMutationUi.js.map +7 -0
- package/dist/modules/wms/lib/inventoryPolicy.js +61 -0
- package/dist/modules/wms/lib/inventoryPolicy.js.map +7 -0
- package/dist/modules/wms/lib/inventoryReconciliation.js +193 -0
- package/dist/modules/wms/lib/inventoryReconciliation.js.map +7 -0
- package/dist/modules/wms/lib/inventoryTrackingValidation.js +13 -0
- package/dist/modules/wms/lib/inventoryTrackingValidation.js.map +7 -0
- package/dist/modules/wms/lib/loadOperationalDashboard.js +580 -0
- package/dist/modules/wms/lib/loadOperationalDashboard.js.map +7 -0
- package/dist/modules/wms/lib/lowStockBalanceFilter.js +49 -0
- package/dist/modules/wms/lib/lowStockBalanceFilter.js.map +7 -0
- package/dist/modules/wms/lib/primaryWarehousePolicy.js +32 -0
- package/dist/modules/wms/lib/primaryWarehousePolicy.js.map +7 -0
- package/dist/modules/wms/lib/roleFeatures.js +30 -0
- package/dist/modules/wms/lib/roleFeatures.js.map +7 -0
- package/dist/modules/wms/lib/salesOrderInventoryAutomation.js +291 -0
- package/dist/modules/wms/lib/salesOrderInventoryAutomation.js.map +7 -0
- package/dist/modules/wms/lib/salesOrderWarehouseAssignment.js +54 -0
- package/dist/modules/wms/lib/salesOrderWarehouseAssignment.js.map +7 -0
- package/dist/modules/wms/lib/wmsIntegrationToggles.js +71 -0
- package/dist/modules/wms/lib/wmsIntegrationToggles.js.map +7 -0
- package/dist/modules/wms/migrations/Migration20260428110546.js +78 -0
- package/dist/modules/wms/migrations/Migration20260428110546.js.map +7 -0
- package/dist/modules/wms/migrations/Migration20260527120000.js +15 -0
- package/dist/modules/wms/migrations/Migration20260527120000.js.map +7 -0
- package/dist/modules/wms/migrations/Migration20260527140000.js +37 -0
- package/dist/modules/wms/migrations/Migration20260527140000.js.map +7 -0
- package/dist/modules/wms/migrations/Migration20260613120000.js +23 -0
- package/dist/modules/wms/migrations/Migration20260613120000.js.map +7 -0
- package/dist/modules/wms/migrations/Migration20260616090000.js +13 -0
- package/dist/modules/wms/migrations/Migration20260616090000.js.map +7 -0
- package/dist/modules/wms/migrations/Migration20260707180000.js +15 -0
- package/dist/modules/wms/migrations/Migration20260707180000.js.map +7 -0
- package/dist/modules/wms/notifications.client.js +18 -0
- package/dist/modules/wms/notifications.client.js.map +7 -0
- package/dist/modules/wms/notifications.js +53 -0
- package/dist/modules/wms/notifications.js.map +7 -0
- package/dist/modules/wms/search.js +196 -0
- package/dist/modules/wms/search.js.map +7 -0
- package/dist/modules/wms/setup.js +30 -0
- package/dist/modules/wms/setup.js.map +7 -0
- package/dist/modules/wms/subscribers/low-stock-notification.js +40 -0
- package/dist/modules/wms/subscribers/low-stock-notification.js.map +7 -0
- package/dist/modules/wms/subscribers/reservation-shortfall-notification.js +69 -0
- package/dist/modules/wms/subscribers/reservation-shortfall-notification.js.map +7 -0
- package/dist/modules/wms/subscribers/sales-order-cancelled-release.js +14 -0
- package/dist/modules/wms/subscribers/sales-order-cancelled-release.js.map +7 -0
- package/dist/modules/wms/subscribers/sales-order-confirmed-reserve.js +14 -0
- package/dist/modules/wms/subscribers/sales-order-confirmed-reserve.js.map +7 -0
- package/dist/modules/wms/translations.js +10 -0
- package/dist/modules/wms/translations.js.map +7 -0
- package/dist/modules/wms/vector.js +9 -0
- package/dist/modules/wms/vector.js.map +7 -0
- package/dist/modules/wms/widgets/injection/catalog-inventory-profile/widget.js +200 -0
- package/dist/modules/wms/widgets/injection/catalog-inventory-profile/widget.js.map +7 -0
- package/dist/modules/wms/widgets/injection/order-items-stock-column/widget.js +104 -0
- package/dist/modules/wms/widgets/injection/order-items-stock-column/widget.js.map +7 -0
- package/dist/modules/wms/widgets/injection/sales-order-stock-context/widget.client.js +389 -0
- package/dist/modules/wms/widgets/injection/sales-order-stock-context/widget.client.js.map +7 -0
- package/dist/modules/wms/widgets/injection/sales-order-stock-context/widget.js +16 -0
- package/dist/modules/wms/widgets/injection/sales-order-stock-context/widget.js.map +7 -0
- package/dist/modules/wms/widgets/injection-table.js +36 -0
- package/dist/modules/wms/widgets/injection-table.js.map +7 -0
- package/dist/modules/wms/widgets/notifications/WmsLowStockRenderer.js +150 -0
- package/dist/modules/wms/widgets/notifications/WmsLowStockRenderer.js.map +7 -0
- package/dist/modules/wms/widgets/notifications/WmsReservationShortfallRenderer.js +186 -0
- package/dist/modules/wms/widgets/notifications/WmsReservationShortfallRenderer.js.map +7 -0
- package/dist/modules/wms/widgets/notifications/index.js +7 -0
- package/dist/modules/wms/widgets/notifications/index.js.map +7 -0
- package/generated/entities/inventory_balance/index.ts +9 -0
- package/generated/entities/inventory_lot/index.ts +8 -0
- package/generated/entities/inventory_movement/index.ts +16 -0
- package/generated/entities/inventory_reservation/index.ts +10 -0
- package/generated/entities/product_inventory_profile/index.ts +9 -0
- package/generated/entities/sales_order_warehouse_assignment/index.ts +4 -0
- package/generated/entities/warehouse/index.ts +11 -0
- package/generated/entities/warehouse_location/index.ts +9 -0
- package/generated/entities/warehouse_zone/index.ts +4 -0
- package/generated/entities.ids.generated.ts +12 -0
- package/generated/entity-fields-registry.ts +98 -0
- package/package.json +7 -7
- package/src/modules/auth/backend/roles/page.tsx +13 -4
- package/src/modules/auth/i18n/de.json +2 -0
- package/src/modules/auth/i18n/en.json +2 -0
- package/src/modules/auth/i18n/es.json +2 -0
- package/src/modules/auth/i18n/pl.json +2 -0
- package/src/modules/auth/lib/backendChrome.tsx +1 -0
- package/src/modules/auth/services/rbacService.ts +25 -21
- package/src/modules/catalog/api/products/route.ts +3 -0
- package/src/modules/catalog/api/variants/route.ts +3 -0
- package/src/modules/query_index/lib/engine.ts +18 -6
- package/src/modules/sales/api/documents/factory.ts +1 -0
- package/src/modules/sales/commands/documents.ts +71 -0
- package/src/modules/sales/components/documents/ItemsSection.tsx +58 -0
- package/src/modules/sales/events.ts +2 -0
- package/src/modules/sales/widgets/injection/order-items-context.ts +15 -0
- package/src/modules/wms/acl.ts +14 -0
- package/src/modules/wms/analytics.ts +9 -0
- package/src/modules/wms/api/dashboard/operational/route.ts +83 -0
- package/src/modules/wms/api/interceptors.ts +108 -0
- package/src/modules/wms/api/inventory/adjust/route.ts +50 -0
- package/src/modules/wms/api/inventory/allocate/route.ts +50 -0
- package/src/modules/wms/api/inventory/balances/route.ts +178 -0
- package/src/modules/wms/api/inventory/cycle-count/route.ts +51 -0
- package/src/modules/wms/api/inventory/helpers.ts +128 -0
- package/src/modules/wms/api/inventory/import/apply/route.ts +47 -0
- package/src/modules/wms/api/inventory/import/helpers.ts +223 -0
- package/src/modules/wms/api/inventory/import/template/route.ts +31 -0
- package/src/modules/wms/api/inventory/import/validate/route.ts +56 -0
- package/src/modules/wms/api/inventory/move/route.ts +50 -0
- package/src/modules/wms/api/inventory/movements/route.ts +164 -0
- package/src/modules/wms/api/inventory/receive/route.ts +49 -0
- package/src/modules/wms/api/inventory/release/route.ts +43 -0
- package/src/modules/wms/api/inventory/reservations/route.ts +128 -0
- package/src/modules/wms/api/inventory/reserve/route.ts +59 -0
- package/src/modules/wms/api/inventory-profiles/route.ts +177 -0
- package/src/modules/wms/api/listEnrichers.ts +312 -0
- package/src/modules/wms/api/listSearch.ts +121 -0
- package/src/modules/wms/api/locations/route.ts +171 -0
- package/src/modules/wms/api/lots/route.ts +205 -0
- package/src/modules/wms/api/openapi.ts +28 -0
- package/src/modules/wms/api/sales-orders/[salesOrderId]/re-run-reservation/route.ts +58 -0
- package/src/modules/wms/api/sales-orders/[salesOrderId]/warehouse-assignment/route.ts +306 -0
- package/src/modules/wms/api/sales-orders/assign-warehouse/route.ts +57 -0
- package/src/modules/wms/api/sales-orders/unassign-warehouse/route.ts +43 -0
- package/src/modules/wms/api/warehouses/route.ts +181 -0
- package/src/modules/wms/api/zones/route.ts +158 -0
- package/src/modules/wms/backend/config/wms/page.meta.ts +14 -0
- package/src/modules/wms/backend/config/wms/page.tsx +5 -0
- package/src/modules/wms/backend/page.meta.ts +12 -0
- package/src/modules/wms/backend/page.tsx +5 -0
- package/src/modules/wms/backend/wms/inventory/page.meta.ts +14 -0
- package/src/modules/wms/backend/wms/inventory/page.tsx +5 -0
- package/src/modules/wms/backend/wms/location/[id]/page.meta.ts +14 -0
- package/src/modules/wms/backend/wms/location/[id]/page.tsx +5 -0
- package/src/modules/wms/backend/wms/locations/page.meta.ts +14 -0
- package/src/modules/wms/backend/wms/locations/page.tsx +12 -0
- package/src/modules/wms/backend/wms/lot/[id]/page.meta.ts +14 -0
- package/src/modules/wms/backend/wms/lot/[id]/page.tsx +5 -0
- package/src/modules/wms/backend/wms/lots/page.meta.ts +14 -0
- package/src/modules/wms/backend/wms/lots/page.tsx +5 -0
- package/src/modules/wms/backend/wms/movements/page.meta.ts +14 -0
- package/src/modules/wms/backend/wms/movements/page.tsx +23 -0
- package/src/modules/wms/backend/wms/reservations/page.meta.ts +14 -0
- package/src/modules/wms/backend/wms/reservations/page.tsx +24 -0
- package/src/modules/wms/backend/wms/sku/[id]/page.meta.ts +14 -0
- package/src/modules/wms/backend/wms/sku/[id]/page.tsx +5 -0
- package/src/modules/wms/backend/wms/warehouses/page.meta.ts +14 -0
- package/src/modules/wms/backend/wms/warehouses/page.tsx +12 -0
- package/src/modules/wms/backend/wms/zones/page.meta.ts +14 -0
- package/src/modules/wms/backend/wms/zones/page.tsx +12 -0
- package/src/modules/wms/ce.ts +76 -0
- package/src/modules/wms/cli.ts +96 -0
- package/src/modules/wms/commands/configuration.ts +1844 -0
- package/src/modules/wms/commands/index.ts +3 -0
- package/src/modules/wms/commands/inventory-actions.ts +1866 -0
- package/src/modules/wms/commands/sales-order-assignment.ts +346 -0
- package/src/modules/wms/commands/shared.ts +90 -0
- package/src/modules/wms/components/backend/AdjustInventoryDialog.tsx +820 -0
- package/src/modules/wms/components/backend/ChangeLotStatusDialog.tsx +312 -0
- package/src/modules/wms/components/backend/CycleCountWizardDialog.tsx +2007 -0
- package/src/modules/wms/components/backend/ImportInventoryDialog.tsx +1018 -0
- package/src/modules/wms/components/backend/InventoryOperationsSection.tsx +159 -0
- package/src/modules/wms/components/backend/LocationEditDialog.tsx +185 -0
- package/src/modules/wms/components/backend/MoveInventoryDialog.tsx +907 -0
- package/src/modules/wms/components/backend/ReceiveInventoryDialog.tsx +695 -0
- package/src/modules/wms/components/backend/ReleaseReservationDialog.tsx +424 -0
- package/src/modules/wms/components/backend/ReserveInventoryDialog.tsx +511 -0
- package/src/modules/wms/components/backend/WmsConfigurationPage.tsx +1340 -0
- package/src/modules/wms/components/backend/WmsInventoryConsolePage.tsx +1132 -0
- package/src/modules/wms/components/backend/WmsLocationDetailPage.tsx +1310 -0
- package/src/modules/wms/components/backend/WmsLotDetailPage.tsx +1355 -0
- package/src/modules/wms/components/backend/WmsLotsListPage.tsx +359 -0
- package/src/modules/wms/components/backend/WmsOperationalDashboardPage.tsx +958 -0
- package/src/modules/wms/components/backend/WmsSkuDetailPage.tsx +1245 -0
- package/src/modules/wms/components/backend/inventoryMutationLoaders.ts +960 -0
- package/src/modules/wms/components/backend/useWmsInventoryMutationAccess.ts +89 -0
- package/src/modules/wms/components/backend/useWmsInventoryScopeFromSearchParams.ts +32 -0
- package/src/modules/wms/components/backend/wmsLookupLoaders.ts +78 -0
- package/src/modules/wms/data/enrichers.ts +718 -0
- package/src/modules/wms/data/entities.ts +436 -0
- package/src/modules/wms/data/validators.ts +463 -0
- package/src/modules/wms/di.ts +25 -0
- package/src/modules/wms/events.ts +41 -0
- package/src/modules/wms/i18n/de.json +1051 -0
- package/src/modules/wms/i18n/en.json +1051 -0
- package/src/modules/wms/i18n/es.json +1051 -0
- package/src/modules/wms/i18n/pl.json +1051 -0
- package/src/modules/wms/index.ts +15 -0
- package/src/modules/wms/lib/catalogInventoryProfileIntent.ts +65 -0
- package/src/modules/wms/lib/catalogInventoryProfileSync.ts +199 -0
- package/src/modules/wms/lib/expiry.ts +30 -0
- package/src/modules/wms/lib/flashMutationError.ts +74 -0
- package/src/modules/wms/lib/inventoryDisplayUi.ts +249 -0
- package/src/modules/wms/lib/inventoryIdempotency.ts +54 -0
- package/src/modules/wms/lib/inventoryImportCsv.ts +212 -0
- package/src/modules/wms/lib/inventoryImportService.ts +629 -0
- package/src/modules/wms/lib/inventoryMutationUi.ts +21 -0
- package/src/modules/wms/lib/inventoryPolicy.ts +111 -0
- package/src/modules/wms/lib/inventoryReconciliation.ts +263 -0
- package/src/modules/wms/lib/inventoryTrackingValidation.ts +23 -0
- package/src/modules/wms/lib/loadOperationalDashboard.ts +776 -0
- package/src/modules/wms/lib/lowStockBalanceFilter.ts +74 -0
- package/src/modules/wms/lib/primaryWarehousePolicy.ts +46 -0
- package/src/modules/wms/lib/roleFeatures.ts +32 -0
- package/src/modules/wms/lib/salesOrderInventoryAutomation.ts +390 -0
- package/src/modules/wms/lib/salesOrderWarehouseAssignment.ts +78 -0
- package/src/modules/wms/lib/wmsIntegrationToggles.ts +81 -0
- package/src/modules/wms/migrations/.snapshot-open-mercato.json +2880 -0
- package/src/modules/wms/migrations/Migration20260428110546.ts +91 -0
- package/src/modules/wms/migrations/Migration20260527120000.ts +15 -0
- package/src/modules/wms/migrations/Migration20260527140000.ts +35 -0
- package/src/modules/wms/migrations/Migration20260613120000.ts +21 -0
- package/src/modules/wms/migrations/Migration20260616090000.ts +11 -0
- package/src/modules/wms/migrations/Migration20260707180000.ts +13 -0
- package/src/modules/wms/notifications.client.ts +18 -0
- package/src/modules/wms/notifications.ts +51 -0
- package/src/modules/wms/search.ts +230 -0
- package/src/modules/wms/setup.ts +29 -0
- package/src/modules/wms/subscribers/low-stock-notification.ts +54 -0
- package/src/modules/wms/subscribers/reservation-shortfall-notification.ts +98 -0
- package/src/modules/wms/subscribers/sales-order-cancelled-release.ts +21 -0
- package/src/modules/wms/subscribers/sales-order-confirmed-reserve.ts +21 -0
- package/src/modules/wms/translations.ts +6 -0
- package/src/modules/wms/vector.ts +7 -0
- package/src/modules/wms/widgets/injection/catalog-inventory-profile/widget.ts +238 -0
- package/src/modules/wms/widgets/injection/order-items-stock-column/widget.tsx +153 -0
- package/src/modules/wms/widgets/injection/sales-order-stock-context/widget.client.tsx +476 -0
- package/src/modules/wms/widgets/injection/sales-order-stock-context/widget.ts +15 -0
- package/src/modules/wms/widgets/injection-table.ts +34 -0
- package/src/modules/wms/widgets/notifications/WmsLowStockRenderer.tsx +153 -0
- package/src/modules/wms/widgets/notifications/WmsReservationShortfallRenderer.tsx +194 -0
- package/src/modules/wms/widgets/notifications/index.ts +2 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { AlertTriangle, ExternalLink, Loader2, X } from "lucide-react";
|
|
5
|
+
import { useRouter } from "next/navigation";
|
|
6
|
+
import { Button } from "@open-mercato/ui/primitives/button";
|
|
7
|
+
import { IconButton } from "@open-mercato/ui/primitives/icon-button";
|
|
8
|
+
import { cn } from "@open-mercato/shared/lib/utils";
|
|
9
|
+
import { formatRelativeTime } from "@open-mercato/shared/lib/time";
|
|
10
|
+
import { useT } from "@open-mercato/shared/lib/i18n/context";
|
|
11
|
+
function WmsLowStockRenderer({
|
|
12
|
+
notification,
|
|
13
|
+
onAction,
|
|
14
|
+
onDismiss,
|
|
15
|
+
actions = []
|
|
16
|
+
}) {
|
|
17
|
+
const t = useT();
|
|
18
|
+
const router = useRouter();
|
|
19
|
+
const [executing, setExecuting] = React.useState(false);
|
|
20
|
+
const isUnread = notification.status === "unread";
|
|
21
|
+
const availableQuantity = notification.bodyVariables?.availableQuantity;
|
|
22
|
+
const reorderPoint = notification.bodyVariables?.reorderPoint;
|
|
23
|
+
const state = notification.bodyVariables?.state;
|
|
24
|
+
const viewAction = actions.find((action) => action.id === "view") ?? actions[0] ?? null;
|
|
25
|
+
const handleView = async () => {
|
|
26
|
+
if (!viewAction) {
|
|
27
|
+
if (notification.linkHref) router.push(notification.linkHref);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
setExecuting(true);
|
|
31
|
+
try {
|
|
32
|
+
await onAction(viewAction.id);
|
|
33
|
+
} finally {
|
|
34
|
+
setExecuting(false);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
const timeAgo = formatRelativeTime(notification.createdAt, { translate: t }) ?? "";
|
|
38
|
+
const stateLabel = state === "below_safety_stock" ? t("wms.notifications.lowStock.renderer.belowSafetyStock", "Below safety stock") : t("wms.notifications.lowStock.renderer.belowReorderPoint", "Below reorder point");
|
|
39
|
+
return /* @__PURE__ */ jsxs(
|
|
40
|
+
"div",
|
|
41
|
+
{
|
|
42
|
+
className: cn(
|
|
43
|
+
"group relative flex gap-4 items-start rounded-xl p-3 transition-colors hover:bg-muted/40 cursor-pointer",
|
|
44
|
+
isUnread && "bg-muted/20"
|
|
45
|
+
),
|
|
46
|
+
onClick: handleView,
|
|
47
|
+
onKeyDown: (e) => {
|
|
48
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
49
|
+
e.preventDefault();
|
|
50
|
+
handleView();
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
role: "button",
|
|
54
|
+
tabIndex: 0,
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ jsxs("div", { className: "relative shrink-0 flex size-10 items-center justify-center rounded-full bg-status-warning-bg", children: [
|
|
57
|
+
/* @__PURE__ */ jsx(AlertTriangle, { className: "size-5 text-status-warning-icon", "aria-hidden": "true" }),
|
|
58
|
+
isUnread ? /* @__PURE__ */ jsx(
|
|
59
|
+
"span",
|
|
60
|
+
{
|
|
61
|
+
className: "absolute -right-1 -top-1 size-3 rounded-full bg-status-warning-icon ring-2 ring-background",
|
|
62
|
+
"aria-hidden": "true"
|
|
63
|
+
}
|
|
64
|
+
) : null
|
|
65
|
+
] }),
|
|
66
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
67
|
+
/* @__PURE__ */ jsx("p", { className: "truncate text-sm font-medium leading-5 tracking-tight text-foreground", children: notification.title }),
|
|
68
|
+
/* @__PURE__ */ jsxs("div", { className: "text-xs leading-4 text-muted-foreground", children: [
|
|
69
|
+
timeAgo ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
70
|
+
/* @__PURE__ */ jsx("span", { className: "whitespace-nowrap", children: timeAgo }),
|
|
71
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "mx-1 text-text-disabled", children: "\xB7" })
|
|
72
|
+
] }) : null,
|
|
73
|
+
/* @__PURE__ */ jsx("span", { className: "whitespace-nowrap", children: stateLabel }),
|
|
74
|
+
availableQuantity !== void 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
75
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "mx-1 text-text-disabled", children: "\xB7" }),
|
|
76
|
+
/* @__PURE__ */ jsxs("span", { className: "whitespace-nowrap font-medium text-foreground", children: [
|
|
77
|
+
t("wms.notifications.lowStock.renderer.available", "Available"),
|
|
78
|
+
": ",
|
|
79
|
+
availableQuantity
|
|
80
|
+
] })
|
|
81
|
+
] }) : null,
|
|
82
|
+
reorderPoint !== void 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
83
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "mx-1 text-text-disabled", children: "\xB7" }),
|
|
84
|
+
/* @__PURE__ */ jsxs("span", { className: "whitespace-nowrap", children: [
|
|
85
|
+
t("wms.notifications.lowStock.renderer.reorderPoint", "Reorder"),
|
|
86
|
+
": ",
|
|
87
|
+
reorderPoint
|
|
88
|
+
] })
|
|
89
|
+
] }) : null
|
|
90
|
+
] }),
|
|
91
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-2 flex items-center gap-2", children: [
|
|
92
|
+
/* @__PURE__ */ jsxs(
|
|
93
|
+
Button,
|
|
94
|
+
{
|
|
95
|
+
type: "button",
|
|
96
|
+
variant: "default",
|
|
97
|
+
size: "sm",
|
|
98
|
+
onClick: (e) => {
|
|
99
|
+
e.stopPropagation();
|
|
100
|
+
handleView();
|
|
101
|
+
},
|
|
102
|
+
disabled: executing || !viewAction && !notification.linkHref,
|
|
103
|
+
children: [
|
|
104
|
+
/* @__PURE__ */ jsx(ExternalLink, { className: "size-3.5", "aria-hidden": "true" }),
|
|
105
|
+
t("wms.notifications.lowStock.renderer.viewSku", "View SKU"),
|
|
106
|
+
executing ? /* @__PURE__ */ jsx(Loader2, { className: "ml-1 size-3 animate-spin" }) : null
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
),
|
|
110
|
+
/* @__PURE__ */ jsx(
|
|
111
|
+
Button,
|
|
112
|
+
{
|
|
113
|
+
type: "button",
|
|
114
|
+
variant: "outline",
|
|
115
|
+
size: "sm",
|
|
116
|
+
className: "h-8 rounded-md px-2.5",
|
|
117
|
+
onClick: (e) => {
|
|
118
|
+
e.stopPropagation();
|
|
119
|
+
onDismiss();
|
|
120
|
+
},
|
|
121
|
+
children: t("notifications.actions.dismiss", "Dismiss")
|
|
122
|
+
}
|
|
123
|
+
)
|
|
124
|
+
] })
|
|
125
|
+
] }),
|
|
126
|
+
/* @__PURE__ */ jsx(
|
|
127
|
+
IconButton,
|
|
128
|
+
{
|
|
129
|
+
type: "button",
|
|
130
|
+
variant: "ghost",
|
|
131
|
+
size: "xs",
|
|
132
|
+
className: "absolute right-2 top-2 opacity-0 transition-opacity group-hover:opacity-100 focus-visible:opacity-100",
|
|
133
|
+
onClick: (e) => {
|
|
134
|
+
e.stopPropagation();
|
|
135
|
+
onDismiss();
|
|
136
|
+
},
|
|
137
|
+
"aria-label": t("notifications.actions.dismiss", "Dismiss"),
|
|
138
|
+
children: /* @__PURE__ */ jsx(X, { className: "size-3.5" })
|
|
139
|
+
}
|
|
140
|
+
)
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
var WmsLowStockRenderer_default = WmsLowStockRenderer;
|
|
146
|
+
export {
|
|
147
|
+
WmsLowStockRenderer,
|
|
148
|
+
WmsLowStockRenderer_default as default
|
|
149
|
+
};
|
|
150
|
+
//# sourceMappingURL=WmsLowStockRenderer.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/modules/wms/widgets/notifications/WmsLowStockRenderer.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { AlertTriangle, ExternalLink, Loader2, X } from 'lucide-react'\nimport { useRouter } from 'next/navigation'\nimport { Button } from '@open-mercato/ui/primitives/button'\nimport { IconButton } from '@open-mercato/ui/primitives/icon-button'\nimport { cn } from '@open-mercato/shared/lib/utils'\nimport { formatRelativeTime } from '@open-mercato/shared/lib/time'\nimport { useT } from '@open-mercato/shared/lib/i18n/context'\nimport type { NotificationRendererProps } from '@open-mercato/shared/modules/notifications/types'\n\nexport function WmsLowStockRenderer({\n notification,\n onAction,\n onDismiss,\n actions = [],\n}: NotificationRendererProps) {\n const t = useT()\n const router = useRouter()\n const [executing, setExecuting] = React.useState(false)\n const isUnread = notification.status === 'unread'\n const availableQuantity = notification.bodyVariables?.availableQuantity\n const reorderPoint = notification.bodyVariables?.reorderPoint\n const state = notification.bodyVariables?.state\n\n const viewAction = actions.find((action) => action.id === 'view') ?? actions[0] ?? null\n\n const handleView = async () => {\n if (!viewAction) {\n if (notification.linkHref) router.push(notification.linkHref)\n return\n }\n setExecuting(true)\n try {\n await onAction(viewAction.id)\n } finally {\n setExecuting(false)\n }\n }\n\n const timeAgo = formatRelativeTime(notification.createdAt, { translate: t }) ?? ''\n\n const stateLabel =\n state === 'below_safety_stock'\n ? t('wms.notifications.lowStock.renderer.belowSafetyStock', 'Below safety stock')\n : t('wms.notifications.lowStock.renderer.belowReorderPoint', 'Below reorder point')\n\n return (\n <div\n className={cn(\n 'group relative flex gap-4 items-start rounded-xl p-3 transition-colors hover:bg-muted/40 cursor-pointer',\n isUnread && 'bg-muted/20',\n )}\n onClick={handleView}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault()\n handleView()\n }\n }}\n role=\"button\"\n tabIndex={0}\n >\n <div className=\"relative shrink-0 flex size-10 items-center justify-center rounded-full bg-status-warning-bg\">\n <AlertTriangle className=\"size-5 text-status-warning-icon\" aria-hidden=\"true\" />\n {isUnread ? (\n <span\n className=\"absolute -right-1 -top-1 size-3 rounded-full bg-status-warning-icon ring-2 ring-background\"\n aria-hidden=\"true\"\n />\n ) : null}\n </div>\n\n <div className=\"flex min-w-0 flex-1 flex-col gap-1\">\n <p className=\"truncate text-sm font-medium leading-5 tracking-tight text-foreground\">\n {notification.title}\n </p>\n\n <div className=\"text-xs leading-4 text-muted-foreground\">\n {timeAgo ? (\n <>\n <span className=\"whitespace-nowrap\">{timeAgo}</span>\n <span aria-hidden=\"true\" className=\"mx-1 text-text-disabled\">\u00B7</span>\n </>\n ) : null}\n <span className=\"whitespace-nowrap\">{stateLabel}</span>\n {availableQuantity !== undefined ? (\n <>\n <span aria-hidden=\"true\" className=\"mx-1 text-text-disabled\">\u00B7</span>\n <span className=\"whitespace-nowrap font-medium text-foreground\">\n {t('wms.notifications.lowStock.renderer.available', 'Available')}: {availableQuantity}\n </span>\n </>\n ) : null}\n {reorderPoint !== undefined ? (\n <>\n <span aria-hidden=\"true\" className=\"mx-1 text-text-disabled\">\u00B7</span>\n <span className=\"whitespace-nowrap\">\n {t('wms.notifications.lowStock.renderer.reorderPoint', 'Reorder')}: {reorderPoint}\n </span>\n </>\n ) : null}\n </div>\n\n <div className=\"mt-2 flex items-center gap-2\">\n <Button\n type=\"button\"\n variant=\"default\"\n size=\"sm\"\n onClick={(e) => {\n e.stopPropagation()\n handleView()\n }}\n disabled={executing || (!viewAction && !notification.linkHref)}\n >\n <ExternalLink className=\"size-3.5\" aria-hidden=\"true\" />\n {t('wms.notifications.lowStock.renderer.viewSku', 'View SKU')}\n {executing ? <Loader2 className=\"ml-1 size-3 animate-spin\" /> : null}\n </Button>\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n className=\"h-8 rounded-md px-2.5\"\n onClick={(e) => {\n e.stopPropagation()\n onDismiss()\n }}\n >\n {t('notifications.actions.dismiss', 'Dismiss')}\n </Button>\n </div>\n </div>\n\n <IconButton\n type=\"button\"\n variant=\"ghost\"\n size=\"xs\"\n className=\"absolute right-2 top-2 opacity-0 transition-opacity group-hover:opacity-100 focus-visible:opacity-100\"\n onClick={(e) => {\n e.stopPropagation()\n onDismiss()\n }}\n aria-label={t('notifications.actions.dismiss', 'Dismiss')}\n >\n <X className=\"size-3.5\" />\n </IconButton>\n </div>\n )\n}\n\nexport default WmsLowStockRenderer\n"],
|
|
5
|
+
"mappings": ";AAgEM,SAiBM,UAhBJ,KADF;AA9DN,YAAY,WAAW;AACvB,SAAS,eAAe,cAAc,SAAS,SAAS;AACxD,SAAS,iBAAiB;AAC1B,SAAS,cAAc;AACvB,SAAS,kBAAkB;AAC3B,SAAS,UAAU;AACn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BACC,MAAK;AAAA,gBACL,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,WAAU;AAAA,gBACV,SAAS,CAAC,MAAM;AACd,oBAAE,gBAAgB;AAClB,4BAAU;AAAA,gBACZ;AAAA,gBAEC,YAAE,iCAAiC,SAAS;AAAA;AAAA,YAC/C;AAAA,aACF;AAAA,WACF;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,SAAQ;AAAA,YACR,MAAK;AAAA,YACL,WAAU;AAAA,YACV,SAAS,CAAC,MAAM;AACd,gBAAE,gBAAgB;AAClB,wBAAU;AAAA,YACZ;AAAA,YACA,cAAY,EAAE,iCAAiC,SAAS;AAAA,YAExD,8BAAC,KAAE,WAAU,YAAW;AAAA;AAAA,QAC1B;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,8BAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { AlertTriangle, ExternalLink, Loader2, X } from "lucide-react";
|
|
5
|
+
import { useRouter } from "next/navigation";
|
|
6
|
+
import { Button } from "@open-mercato/ui/primitives/button";
|
|
7
|
+
import { IconButton } from "@open-mercato/ui/primitives/icon-button";
|
|
8
|
+
import { cn } from "@open-mercato/shared/lib/utils";
|
|
9
|
+
import { formatRelativeTime } from "@open-mercato/shared/lib/time";
|
|
10
|
+
import { useT } from "@open-mercato/shared/lib/i18n/context";
|
|
11
|
+
function WmsReservationShortfallRenderer({
|
|
12
|
+
notification,
|
|
13
|
+
onAction,
|
|
14
|
+
onDismiss,
|
|
15
|
+
actions = []
|
|
16
|
+
}) {
|
|
17
|
+
const t = useT();
|
|
18
|
+
const router = useRouter();
|
|
19
|
+
const [executing, setExecuting] = React.useState(null);
|
|
20
|
+
const isUnread = notification.status === "unread";
|
|
21
|
+
const orderNumber = notification.bodyVariables?.orderNumber;
|
|
22
|
+
const shortfallCount = notification.bodyVariables?.shortfallCount;
|
|
23
|
+
const shortfallSku = notification.bodyVariables?.shortfallSku;
|
|
24
|
+
const shortfallQuantity = notification.bodyVariables?.shortfallQuantity;
|
|
25
|
+
const shortfallVariantId = notification.bodyVariables?.shortfallVariantId;
|
|
26
|
+
const orderAction = actions.find((action) => action.id === "view-order") ?? actions[0] ?? null;
|
|
27
|
+
const inventoryAction = actions.find((action) => action.id === "view-inventory") ?? actions[1] ?? null;
|
|
28
|
+
const inventoryHref = shortfallVariantId ? `/backend/wms/inventory?catalogVariantId=${encodeURIComponent(shortfallVariantId)}` : "/backend/wms/inventory";
|
|
29
|
+
const handleAction = async (actionId, fallbackHref) => {
|
|
30
|
+
const action = actionId === "view-order" ? orderAction : actionId === "view-inventory" ? inventoryAction : null;
|
|
31
|
+
if (!action && fallbackHref) {
|
|
32
|
+
router.push(fallbackHref);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
if (!action) return;
|
|
36
|
+
setExecuting(actionId);
|
|
37
|
+
try {
|
|
38
|
+
await onAction(action.id);
|
|
39
|
+
} finally {
|
|
40
|
+
setExecuting(null);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
const timeAgo = formatRelativeTime(notification.createdAt, { translate: t }) ?? "";
|
|
44
|
+
return /* @__PURE__ */ jsxs(
|
|
45
|
+
"div",
|
|
46
|
+
{
|
|
47
|
+
className: cn(
|
|
48
|
+
"group relative flex gap-4 items-start rounded-xl p-3 transition-colors hover:bg-muted/40 cursor-pointer",
|
|
49
|
+
isUnread && "bg-muted/20"
|
|
50
|
+
),
|
|
51
|
+
onClick: () => void handleAction("view-order", notification.linkHref ?? void 0),
|
|
52
|
+
onKeyDown: (event) => {
|
|
53
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
54
|
+
event.preventDefault();
|
|
55
|
+
void handleAction("view-order", notification.linkHref ?? void 0);
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
role: "button",
|
|
59
|
+
tabIndex: 0,
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ jsxs("div", { className: "relative shrink-0 flex size-10 items-center justify-center rounded-full bg-status-warning-bg", children: [
|
|
62
|
+
/* @__PURE__ */ jsx(AlertTriangle, { className: "size-5 text-status-warning-icon", "aria-hidden": "true" }),
|
|
63
|
+
isUnread ? /* @__PURE__ */ jsx(
|
|
64
|
+
"span",
|
|
65
|
+
{
|
|
66
|
+
className: "absolute -right-1 -top-1 size-3 rounded-full bg-status-warning-icon ring-2 ring-background",
|
|
67
|
+
"aria-hidden": "true"
|
|
68
|
+
}
|
|
69
|
+
) : null
|
|
70
|
+
] }),
|
|
71
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
72
|
+
/* @__PURE__ */ jsx("p", { className: "truncate text-sm font-medium leading-5 tracking-tight text-foreground", children: notification.title }),
|
|
73
|
+
/* @__PURE__ */ jsxs("div", { className: "text-xs leading-4 text-muted-foreground", children: [
|
|
74
|
+
timeAgo ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
75
|
+
/* @__PURE__ */ jsx("span", { className: "whitespace-nowrap", children: timeAgo }),
|
|
76
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "mx-1 text-text-disabled", children: "\xB7" })
|
|
77
|
+
] }) : null,
|
|
78
|
+
orderNumber ? /* @__PURE__ */ jsxs("span", { className: "whitespace-nowrap", children: [
|
|
79
|
+
t("wms.notifications.reservationShortfall.renderer.order", "Order"),
|
|
80
|
+
": ",
|
|
81
|
+
orderNumber
|
|
82
|
+
] }) : null,
|
|
83
|
+
shortfallSku ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
84
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "mx-1 text-text-disabled", children: "\xB7" }),
|
|
85
|
+
/* @__PURE__ */ jsxs("span", { className: "whitespace-nowrap", children: [
|
|
86
|
+
t("wms.notifications.reservationShortfall.renderer.sku", "SKU"),
|
|
87
|
+
": ",
|
|
88
|
+
shortfallSku
|
|
89
|
+
] })
|
|
90
|
+
] }) : null,
|
|
91
|
+
shortfallQuantity !== void 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
92
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "mx-1 text-text-disabled", children: "\xB7" }),
|
|
93
|
+
/* @__PURE__ */ jsx("span", { className: "whitespace-nowrap font-medium text-foreground", children: t(
|
|
94
|
+
"wms.notifications.reservationShortfall.renderer.shortQty",
|
|
95
|
+
"Short {quantity}",
|
|
96
|
+
{ quantity: shortfallQuantity }
|
|
97
|
+
) })
|
|
98
|
+
] }) : null,
|
|
99
|
+
shortfallCount !== void 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
100
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "mx-1 text-text-disabled", children: "\xB7" }),
|
|
101
|
+
/* @__PURE__ */ jsxs("span", { className: "whitespace-nowrap", children: [
|
|
102
|
+
t("wms.notifications.reservationShortfall.renderer.lines", "Lines with shortfall"),
|
|
103
|
+
": ",
|
|
104
|
+
shortfallCount
|
|
105
|
+
] })
|
|
106
|
+
] }) : null
|
|
107
|
+
] }),
|
|
108
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-2 flex flex-wrap items-center gap-2", children: [
|
|
109
|
+
/* @__PURE__ */ jsxs(
|
|
110
|
+
Button,
|
|
111
|
+
{
|
|
112
|
+
type: "button",
|
|
113
|
+
size: "sm",
|
|
114
|
+
className: "h-8 rounded-md px-2.5 bg-accent-indigo text-accent-indigo-foreground hover:bg-accent-indigo/90",
|
|
115
|
+
onClick: (event) => {
|
|
116
|
+
event.stopPropagation();
|
|
117
|
+
void handleAction("view-order", notification.linkHref ?? void 0);
|
|
118
|
+
},
|
|
119
|
+
disabled: executing !== null,
|
|
120
|
+
children: [
|
|
121
|
+
/* @__PURE__ */ jsx(ExternalLink, { className: "size-3.5", "aria-hidden": "true" }),
|
|
122
|
+
t("wms.notifications.reservationShortfall.renderer.viewOrder", "View order"),
|
|
123
|
+
executing === "view-order" ? /* @__PURE__ */ jsx(Loader2, { className: "ml-1 size-3 animate-spin" }) : null
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
),
|
|
127
|
+
/* @__PURE__ */ jsxs(
|
|
128
|
+
Button,
|
|
129
|
+
{
|
|
130
|
+
type: "button",
|
|
131
|
+
variant: "outline",
|
|
132
|
+
size: "sm",
|
|
133
|
+
className: "h-8 rounded-md px-2.5",
|
|
134
|
+
onClick: (event) => {
|
|
135
|
+
event.stopPropagation();
|
|
136
|
+
void handleAction("view-inventory", inventoryHref);
|
|
137
|
+
},
|
|
138
|
+
disabled: executing !== null,
|
|
139
|
+
children: [
|
|
140
|
+
/* @__PURE__ */ jsx(ExternalLink, { className: "size-3.5", "aria-hidden": "true" }),
|
|
141
|
+
t("wms.notifications.reservationShortfall.renderer.viewInventory", "View inventory"),
|
|
142
|
+
executing === "view-inventory" ? /* @__PURE__ */ jsx(Loader2, { className: "ml-1 size-3 animate-spin" }) : null
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
),
|
|
146
|
+
/* @__PURE__ */ jsx(
|
|
147
|
+
Button,
|
|
148
|
+
{
|
|
149
|
+
type: "button",
|
|
150
|
+
variant: "outline",
|
|
151
|
+
size: "sm",
|
|
152
|
+
className: "h-8 rounded-md px-2.5",
|
|
153
|
+
onClick: (event) => {
|
|
154
|
+
event.stopPropagation();
|
|
155
|
+
onDismiss();
|
|
156
|
+
},
|
|
157
|
+
children: t("notifications.actions.dismiss", "Dismiss")
|
|
158
|
+
}
|
|
159
|
+
)
|
|
160
|
+
] })
|
|
161
|
+
] }),
|
|
162
|
+
/* @__PURE__ */ jsx(
|
|
163
|
+
IconButton,
|
|
164
|
+
{
|
|
165
|
+
type: "button",
|
|
166
|
+
variant: "ghost",
|
|
167
|
+
size: "xs",
|
|
168
|
+
className: "absolute right-2 top-2 opacity-0 transition-opacity group-hover:opacity-100 focus-visible:opacity-100",
|
|
169
|
+
onClick: (event) => {
|
|
170
|
+
event.stopPropagation();
|
|
171
|
+
onDismiss();
|
|
172
|
+
},
|
|
173
|
+
"aria-label": t("notifications.actions.dismiss", "Dismiss"),
|
|
174
|
+
children: /* @__PURE__ */ jsx(X, { className: "size-3.5" })
|
|
175
|
+
}
|
|
176
|
+
)
|
|
177
|
+
]
|
|
178
|
+
}
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
var WmsReservationShortfallRenderer_default = WmsReservationShortfallRenderer;
|
|
182
|
+
export {
|
|
183
|
+
WmsReservationShortfallRenderer,
|
|
184
|
+
WmsReservationShortfallRenderer_default as default
|
|
185
|
+
};
|
|
186
|
+
//# sourceMappingURL=WmsReservationShortfallRenderer.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/modules/wms/widgets/notifications/WmsReservationShortfallRenderer.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { AlertTriangle, ExternalLink, Loader2, X } from 'lucide-react'\nimport { useRouter } from 'next/navigation'\nimport { Button } from '@open-mercato/ui/primitives/button'\nimport { IconButton } from '@open-mercato/ui/primitives/icon-button'\nimport { cn } from '@open-mercato/shared/lib/utils'\nimport { formatRelativeTime } from '@open-mercato/shared/lib/time'\nimport { useT } from '@open-mercato/shared/lib/i18n/context'\nimport type { NotificationRendererProps } from '@open-mercato/shared/modules/notifications/types'\n\nexport function WmsReservationShortfallRenderer({\n notification,\n onAction,\n onDismiss,\n actions = [],\n}: NotificationRendererProps) {\n const t = useT()\n const router = useRouter()\n const [executing, setExecuting] = React.useState<string | null>(null)\n const isUnread = notification.status === 'unread'\n const orderNumber = notification.bodyVariables?.orderNumber\n const shortfallCount = notification.bodyVariables?.shortfallCount\n const shortfallSku = notification.bodyVariables?.shortfallSku\n const shortfallQuantity = notification.bodyVariables?.shortfallQuantity\n const shortfallVariantId = notification.bodyVariables?.shortfallVariantId\n\n const orderAction = actions.find((action) => action.id === 'view-order') ?? actions[0] ?? null\n const inventoryAction =\n actions.find((action) => action.id === 'view-inventory') ?? actions[1] ?? null\n\n const inventoryHref = shortfallVariantId\n ? `/backend/wms/inventory?catalogVariantId=${encodeURIComponent(shortfallVariantId)}`\n : '/backend/wms/inventory'\n\n const handleAction = async (actionId: string, fallbackHref?: string) => {\n const action =\n actionId === 'view-order'\n ? orderAction\n : actionId === 'view-inventory'\n ? inventoryAction\n : null\n if (!action && fallbackHref) {\n router.push(fallbackHref)\n return\n }\n if (!action) return\n setExecuting(actionId)\n try {\n await onAction(action.id)\n } finally {\n setExecuting(null)\n }\n }\n\n const timeAgo = formatRelativeTime(notification.createdAt, { translate: t }) ?? ''\n\n return (\n <div\n className={cn(\n 'group relative flex gap-4 items-start rounded-xl p-3 transition-colors hover:bg-muted/40 cursor-pointer',\n isUnread && 'bg-muted/20',\n )}\n onClick={() => void handleAction('view-order', notification.linkHref ?? undefined)}\n onKeyDown={(event) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault()\n void handleAction('view-order', notification.linkHref ?? undefined)\n }\n }}\n role=\"button\"\n tabIndex={0}\n >\n <div className=\"relative shrink-0 flex size-10 items-center justify-center rounded-full bg-status-warning-bg\">\n <AlertTriangle className=\"size-5 text-status-warning-icon\" aria-hidden=\"true\" />\n {isUnread ? (\n <span\n className=\"absolute -right-1 -top-1 size-3 rounded-full bg-status-warning-icon ring-2 ring-background\"\n aria-hidden=\"true\"\n />\n ) : null}\n </div>\n\n <div className=\"flex min-w-0 flex-1 flex-col gap-1\">\n <p className=\"truncate text-sm font-medium leading-5 tracking-tight text-foreground\">\n {notification.title}\n </p>\n\n <div className=\"text-xs leading-4 text-muted-foreground\">\n {timeAgo ? (\n <>\n <span className=\"whitespace-nowrap\">{timeAgo}</span>\n <span aria-hidden=\"true\" className=\"mx-1 text-text-disabled\">\u00B7</span>\n </>\n ) : null}\n {orderNumber ? (\n <span className=\"whitespace-nowrap\">\n {t('wms.notifications.reservationShortfall.renderer.order', 'Order')}: {orderNumber}\n </span>\n ) : null}\n {shortfallSku ? (\n <>\n <span aria-hidden=\"true\" className=\"mx-1 text-text-disabled\">\u00B7</span>\n <span className=\"whitespace-nowrap\">\n {t('wms.notifications.reservationShortfall.renderer.sku', 'SKU')}: {shortfallSku}\n </span>\n </>\n ) : null}\n {shortfallQuantity !== undefined ? (\n <>\n <span aria-hidden=\"true\" className=\"mx-1 text-text-disabled\">\u00B7</span>\n <span className=\"whitespace-nowrap font-medium text-foreground\">\n {t(\n 'wms.notifications.reservationShortfall.renderer.shortQty',\n 'Short {quantity}',\n { quantity: shortfallQuantity },\n )}\n </span>\n </>\n ) : null}\n {shortfallCount !== undefined ? (\n <>\n <span aria-hidden=\"true\" className=\"mx-1 text-text-disabled\">\u00B7</span>\n <span className=\"whitespace-nowrap\">\n {t('wms.notifications.reservationShortfall.renderer.lines', 'Lines with shortfall')}: {shortfallCount}\n </span>\n </>\n ) : null}\n </div>\n\n <div className=\"mt-2 flex flex-wrap items-center gap-2\">\n <Button\n type=\"button\"\n size=\"sm\"\n className=\"h-8 rounded-md px-2.5 bg-accent-indigo text-accent-indigo-foreground hover:bg-accent-indigo/90\"\n onClick={(event) => {\n event.stopPropagation()\n void handleAction('view-order', notification.linkHref ?? undefined)\n }}\n disabled={executing !== null}\n >\n <ExternalLink className=\"size-3.5\" aria-hidden=\"true\" />\n {t('wms.notifications.reservationShortfall.renderer.viewOrder', 'View order')}\n {executing === 'view-order' ? <Loader2 className=\"ml-1 size-3 animate-spin\" /> : null}\n </Button>\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n className=\"h-8 rounded-md px-2.5\"\n onClick={(event) => {\n event.stopPropagation()\n void handleAction('view-inventory', inventoryHref)\n }}\n disabled={executing !== null}\n >\n <ExternalLink className=\"size-3.5\" aria-hidden=\"true\" />\n {t('wms.notifications.reservationShortfall.renderer.viewInventory', 'View inventory')}\n {executing === 'view-inventory' ? <Loader2 className=\"ml-1 size-3 animate-spin\" /> : null}\n </Button>\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n className=\"h-8 rounded-md px-2.5\"\n onClick={(event) => {\n event.stopPropagation()\n onDismiss()\n }}\n >\n {t('notifications.actions.dismiss', 'Dismiss')}\n </Button>\n </div>\n </div>\n\n <IconButton\n type=\"button\"\n variant=\"ghost\"\n size=\"xs\"\n className=\"absolute right-2 top-2 opacity-0 transition-opacity group-hover:opacity-100 focus-visible:opacity-100\"\n onClick={(event) => {\n event.stopPropagation()\n onDismiss()\n }}\n aria-label={t('notifications.actions.dismiss', 'Dismiss')}\n >\n <X className=\"size-3.5\" />\n </IconButton>\n </div>\n )\n}\n\nexport default WmsReservationShortfallRenderer\n"],
|
|
5
|
+
"mappings": ";AA0EM,SAiBM,UAhBJ,KADF;AAxEN,YAAY,WAAW;AACvB,SAAS,eAAe,cAAc,SAAS,SAAS;AACxD,SAAS,iBAAiB;AAC1B,SAAS,cAAc;AACvB,SAAS,kBAAkB;AAC3B,SAAS,UAAU;AACnB,SAAS,0BAA0B;AACnC,SAAS,YAAY;AAGd,SAAS,gCAAgC;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU,CAAC;AACb,GAA8B;AAC5B,QAAM,IAAI,KAAK;AACf,QAAM,SAAS,UAAU;AACzB,QAAM,CAAC,WAAW,YAAY,IAAI,MAAM,SAAwB,IAAI;AACpE,QAAM,WAAW,aAAa,WAAW;AACzC,QAAM,cAAc,aAAa,eAAe;AAChD,QAAM,iBAAiB,aAAa,eAAe;AACnD,QAAM,eAAe,aAAa,eAAe;AACjD,QAAM,oBAAoB,aAAa,eAAe;AACtD,QAAM,qBAAqB,aAAa,eAAe;AAEvD,QAAM,cAAc,QAAQ,KAAK,CAAC,WAAW,OAAO,OAAO,YAAY,KAAK,QAAQ,CAAC,K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,IAAK;AAAA;AAAA;AAAA,YACnF;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,MAAK;AAAA,gBACL,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,WAAU;AAAA,gBACV,SAAS,CAAC,UAAU;AAClB,wBAAM,gBAAgB;AACtB,uBAAK,aAAa,kBAAkB,aAAa;AAAA,gBACnD;AAAA,gBACA,UAAU,cAAc;AAAA,gBAExB;AAAA,sCAAC,gBAAa,WAAU,YAAW,eAAY,QAAO;AAAA,kBACrD,EAAE,iEAAiE,gBAAgB;AAAA,kBACnF,cAAc,mBAAmB,oBAAC,WAAQ,WAAU,4BAA2B,IAAK;AAAA;AAAA;AAAA,YACvF;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,MAAK;AAAA,gBACL,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,WAAU;AAAA,gBACV,SAAS,CAAC,UAAU;AAClB,wBAAM,gBAAgB;AACtB,4BAAU;AAAA,gBACZ;AAAA,gBAEC,YAAE,iCAAiC,SAAS;AAAA;AAAA,YAC/C;AAAA,aACF;AAAA,WACF;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,SAAQ;AAAA,YACR,MAAK;AAAA,YACL,WAAU;AAAA,YACV,SAAS,CAAC,UAAU;AAClB,oBAAM,gBAAgB;AACtB,wBAAU;AAAA,YACZ;AAAA,YACA,cAAY,EAAE,iCAAiC,SAAS;AAAA,YAExD,8BAAC,KAAE,WAAU,YAAW;AAAA;AAAA,QAC1B;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,0CAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/modules/wms/widgets/notifications/index.ts"],
|
|
4
|
+
"sourcesContent": ["export { WmsLowStockRenderer } from './WmsLowStockRenderer'\nexport { WmsReservationShortfallRenderer } from './WmsReservationShortfallRenderer'\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,2BAA2B;AACpC,SAAS,uCAAuC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const warehouse = "warehouse";
|
|
2
|
+
export const location = "location";
|
|
3
|
+
export const catalog_variant_id = "catalog_variant_id";
|
|
4
|
+
export const lot = "lot";
|
|
5
|
+
export const serial_number = "serial_number";
|
|
6
|
+
export const quantity_on_hand = "quantity_on_hand";
|
|
7
|
+
export const quantity_reserved = "quantity_reserved";
|
|
8
|
+
export const quantity_allocated = "quantity_allocated";
|
|
9
|
+
export const quantity_available = "quantity_available";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export const catalog_variant_id = "catalog_variant_id";
|
|
2
|
+
export const sku = "sku";
|
|
3
|
+
export const lot_number = "lot_number";
|
|
4
|
+
export const batch_number = "batch_number";
|
|
5
|
+
export const manufactured_at = "manufactured_at";
|
|
6
|
+
export const best_before_at = "best_before_at";
|
|
7
|
+
export const expires_at = "expires_at";
|
|
8
|
+
export const status = "status";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const warehouse = "warehouse";
|
|
2
|
+
export const location_from = "location_from";
|
|
3
|
+
export const location_to = "location_to";
|
|
4
|
+
export const catalog_variant_id = "catalog_variant_id";
|
|
5
|
+
export const lot = "lot";
|
|
6
|
+
export const serial_number = "serial_number";
|
|
7
|
+
export const quantity = "quantity";
|
|
8
|
+
export const type = "type";
|
|
9
|
+
export const reference_type = "reference_type";
|
|
10
|
+
export const reference_id = "reference_id";
|
|
11
|
+
export const performed_by = "performed_by";
|
|
12
|
+
export const performed_at = "performed_at";
|
|
13
|
+
export const received_at = "received_at";
|
|
14
|
+
export const reason = "reason";
|
|
15
|
+
export const reason_code = "reason_code";
|
|
16
|
+
export const idempotency_key = "idempotency_key";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const warehouse = "warehouse";
|
|
2
|
+
export const catalog_variant_id = "catalog_variant_id";
|
|
3
|
+
export const lot = "lot";
|
|
4
|
+
export const serial_number = "serial_number";
|
|
5
|
+
export const quantity = "quantity";
|
|
6
|
+
export const source_type = "source_type";
|
|
7
|
+
export const source_id = "source_id";
|
|
8
|
+
export const expires_at = "expires_at";
|
|
9
|
+
export const status = "status";
|
|
10
|
+
export const idempotency_key = "idempotency_key";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const catalog_product_id = "catalog_product_id";
|
|
2
|
+
export const catalog_variant_id = "catalog_variant_id";
|
|
3
|
+
export const default_uom = "default_uom";
|
|
4
|
+
export const track_lot = "track_lot";
|
|
5
|
+
export const track_serial = "track_serial";
|
|
6
|
+
export const track_expiration = "track_expiration";
|
|
7
|
+
export const default_strategy = "default_strategy";
|
|
8
|
+
export const reorder_point = "reorder_point";
|
|
9
|
+
export const safety_stock = "safety_stock";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const name = "name";
|
|
2
|
+
export const code = "code";
|
|
3
|
+
export const is_active = "is_active";
|
|
4
|
+
export const is_primary = "is_primary";
|
|
5
|
+
export const address_line1 = "address_line1";
|
|
6
|
+
export const city = "city";
|
|
7
|
+
export const postal_code = "postal_code";
|
|
8
|
+
export const country = "country";
|
|
9
|
+
export const timezone = "timezone";
|
|
10
|
+
export const zones = "zones";
|
|
11
|
+
export const locations = "locations";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const warehouse = "warehouse";
|
|
2
|
+
export const code = "code";
|
|
3
|
+
export const type = "type";
|
|
4
|
+
export const parent = "parent";
|
|
5
|
+
export const children = "children";
|
|
6
|
+
export const is_active = "is_active";
|
|
7
|
+
export const capacity_units = "capacity_units";
|
|
8
|
+
export const capacity_weight = "capacity_weight";
|
|
9
|
+
export const constraints = "constraints";
|
|
@@ -12,6 +12,7 @@ export const M = {
|
|
|
12
12
|
"attachments": "attachments",
|
|
13
13
|
"catalog": "catalog",
|
|
14
14
|
"sales": "sales",
|
|
15
|
+
"wms": "wms",
|
|
15
16
|
"api_keys": "api_keys",
|
|
16
17
|
"dictionaries": "dictionaries",
|
|
17
18
|
"api_docs": "api_docs",
|
|
@@ -160,6 +161,17 @@ export const M = {
|
|
|
160
161
|
"sales_document_tag": "sales:sales_document_tag",
|
|
161
162
|
"sales_document_tag_assignment": "sales:sales_document_tag_assignment"
|
|
162
163
|
},
|
|
164
|
+
"wms": {
|
|
165
|
+
"warehouse": "wms:warehouse",
|
|
166
|
+
"warehouse_zone": "wms:warehouse_zone",
|
|
167
|
+
"warehouse_location": "wms:warehouse_location",
|
|
168
|
+
"product_inventory_profile": "wms:product_inventory_profile",
|
|
169
|
+
"inventory_lot": "wms:inventory_lot",
|
|
170
|
+
"inventory_balance": "wms:inventory_balance",
|
|
171
|
+
"inventory_reservation": "wms:inventory_reservation",
|
|
172
|
+
"sales_order_warehouse_assignment": "wms:sales_order_warehouse_assignment",
|
|
173
|
+
"inventory_movement": "wms:inventory_movement"
|
|
174
|
+
},
|
|
163
175
|
"api_keys": {
|
|
164
176
|
"api_key": "api_keys:api_key"
|
|
165
177
|
},
|