@endora-commerce/mod-inventory 0.100.0
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/LICENSE +21 -0
- package/README.md +61 -0
- package/dist/admin/api/warehouses-client.d.ts +22 -0
- package/dist/admin/api/warehouses-client.d.ts.map +1 -0
- package/dist/admin/api/warehouses-client.js +32 -0
- package/dist/admin/api/warehouses-client.js.map +1 -0
- package/dist/admin/index.d.ts +43 -0
- package/dist/admin/index.d.ts.map +1 -0
- package/dist/admin/index.js +190 -0
- package/dist/admin/index.js.map +1 -0
- package/dist/admin/pages/AvailabilityNotificationsPage.d.ts +15 -0
- package/dist/admin/pages/AvailabilityNotificationsPage.d.ts.map +1 -0
- package/dist/admin/pages/AvailabilityNotificationsPage.js +111 -0
- package/dist/admin/pages/AvailabilityNotificationsPage.js.map +1 -0
- package/dist/admin/pages/InventoryPage.d.ts +17 -0
- package/dist/admin/pages/InventoryPage.d.ts.map +1 -0
- package/dist/admin/pages/InventoryPage.js +135 -0
- package/dist/admin/pages/InventoryPage.js.map +1 -0
- package/dist/admin/pages/LowStockPage.d.ts +16 -0
- package/dist/admin/pages/LowStockPage.d.ts.map +1 -0
- package/dist/admin/pages/LowStockPage.js +61 -0
- package/dist/admin/pages/LowStockPage.js.map +1 -0
- package/dist/admin/pages/StockImportWizard.d.ts +17 -0
- package/dist/admin/pages/StockImportWizard.d.ts.map +1 -0
- package/dist/admin/pages/StockImportWizard.js +111 -0
- package/dist/admin/pages/StockImportWizard.js.map +1 -0
- package/dist/admin/pages/WarehouseEditor.d.ts +12 -0
- package/dist/admin/pages/WarehouseEditor.d.ts.map +1 -0
- package/dist/admin/pages/WarehouseEditor.js +194 -0
- package/dist/admin/pages/WarehouseEditor.js.map +1 -0
- package/dist/admin/pages/WarehousesList.d.ts +12 -0
- package/dist/admin/pages/WarehousesList.d.ts.map +1 -0
- package/dist/admin/pages/WarehousesList.js +69 -0
- package/dist/admin/pages/WarehousesList.js.map +1 -0
- package/dist/admin/zones/ChannelWarehouses.d.ts +49 -0
- package/dist/admin/zones/ChannelWarehouses.d.ts.map +1 -0
- package/dist/admin/zones/ChannelWarehouses.js +109 -0
- package/dist/admin/zones/ChannelWarehouses.js.map +1 -0
- package/dist/backend/demo/reset.d.ts +18 -0
- package/dist/backend/demo/reset.d.ts.map +1 -0
- package/dist/backend/demo/reset.js +20 -0
- package/dist/backend/demo/reset.js.map +1 -0
- package/dist/backend/demo/rows.d.ts +38 -0
- package/dist/backend/demo/rows.d.ts.map +1 -0
- package/dist/backend/demo/rows.js +38 -0
- package/dist/backend/demo/rows.js.map +1 -0
- package/dist/backend/demo/seed.d.ts +26 -0
- package/dist/backend/demo/seed.d.ts.map +1 -0
- package/dist/backend/demo/seed.js +65 -0
- package/dist/backend/demo/seed.js.map +1 -0
- package/dist/backend/email-templates/transactional-defaults.d.ts +11 -0
- package/dist/backend/email-templates/transactional-defaults.d.ts.map +1 -0
- package/dist/backend/email-templates/transactional-defaults.js +49 -0
- package/dist/backend/email-templates/transactional-defaults.js.map +1 -0
- package/dist/backend/entities/availability-notification.entity.d.ts +49 -0
- package/dist/backend/entities/availability-notification.entity.d.ts.map +1 -0
- package/dist/backend/entities/availability-notification.entity.js +93 -0
- package/dist/backend/entities/availability-notification.entity.js.map +1 -0
- package/dist/backend/entities/inventory-threshold.entity.d.ts +24 -0
- package/dist/backend/entities/inventory-threshold.entity.d.ts.map +1 -0
- package/dist/backend/entities/inventory-threshold.entity.js +61 -0
- package/dist/backend/entities/inventory-threshold.entity.js.map +1 -0
- package/dist/backend/entities/product-warehouse-low-stock-threshold.entity.d.ts +15 -0
- package/dist/backend/entities/product-warehouse-low-stock-threshold.entity.d.ts.map +1 -0
- package/dist/backend/entities/product-warehouse-low-stock-threshold.entity.js +51 -0
- package/dist/backend/entities/product-warehouse-low-stock-threshold.entity.js.map +1 -0
- package/dist/backend/entities/stock-allocation.entity.d.ts +22 -0
- package/dist/backend/entities/stock-allocation.entity.d.ts.map +1 -0
- package/dist/backend/entities/stock-allocation.entity.js +69 -0
- package/dist/backend/entities/stock-allocation.entity.js.map +1 -0
- package/dist/backend/entities/stock-level.entity.d.ts +24 -0
- package/dist/backend/entities/stock-level.entity.d.ts.map +1 -0
- package/dist/backend/entities/stock-level.entity.js +74 -0
- package/dist/backend/entities/stock-level.entity.js.map +1 -0
- package/dist/backend/entities/warehouse-channel-assignment.entity.d.ts +17 -0
- package/dist/backend/entities/warehouse-channel-assignment.entity.d.ts.map +1 -0
- package/dist/backend/entities/warehouse-channel-assignment.entity.js +60 -0
- package/dist/backend/entities/warehouse-channel-assignment.entity.js.map +1 -0
- package/dist/backend/entities/warehouse.entity.d.ts +37 -0
- package/dist/backend/entities/warehouse.entity.d.ts.map +1 -0
- package/dist/backend/entities/warehouse.entity.js +90 -0
- package/dist/backend/entities/warehouse.entity.js.map +1 -0
- package/dist/backend/index.d.ts +139 -0
- package/dist/backend/index.d.ts.map +1 -0
- package/dist/backend/index.js +351 -0
- package/dist/backend/index.js.map +1 -0
- package/dist/backend/plugin.d.ts +113 -0
- package/dist/backend/plugin.d.ts.map +1 -0
- package/dist/backend/plugin.js +75 -0
- package/dist/backend/plugin.js.map +1 -0
- package/dist/backend/prompt-tools.d.ts +23 -0
- package/dist/backend/prompt-tools.d.ts.map +1 -0
- package/dist/backend/prompt-tools.js +77 -0
- package/dist/backend/prompt-tools.js.map +1 -0
- package/dist/backend/routes.admin.d.ts +62 -0
- package/dist/backend/routes.admin.d.ts.map +1 -0
- package/dist/backend/routes.admin.js +383 -0
- package/dist/backend/routes.admin.js.map +1 -0
- package/dist/backend/routes.d.ts +40 -0
- package/dist/backend/routes.d.ts.map +1 -0
- package/dist/backend/routes.js +263 -0
- package/dist/backend/routes.js.map +1 -0
- package/dist/backend/services/audit-references.d.ts +15 -0
- package/dist/backend/services/audit-references.d.ts.map +1 -0
- package/dist/backend/services/audit-references.js +27 -0
- package/dist/backend/services/audit-references.js.map +1 -0
- package/dist/backend/services/availability-notification-service.d.ts +155 -0
- package/dist/backend/services/availability-notification-service.d.ts.map +1 -0
- package/dist/backend/services/availability-notification-service.js +363 -0
- package/dist/backend/services/availability-notification-service.js.map +1 -0
- package/dist/backend/services/availability-worker.d.ts +57 -0
- package/dist/backend/services/availability-worker.d.ts.map +1 -0
- package/dist/backend/services/availability-worker.js +135 -0
- package/dist/backend/services/availability-worker.js.map +1 -0
- package/dist/backend/services/csv-stock-importer.d.ts +52 -0
- package/dist/backend/services/csv-stock-importer.d.ts.map +1 -0
- package/dist/backend/services/csv-stock-importer.js +154 -0
- package/dist/backend/services/csv-stock-importer.js.map +1 -0
- package/dist/backend/services/display-band-resolver.d.ts +19 -0
- package/dist/backend/services/display-band-resolver.d.ts.map +1 -0
- package/dist/backend/services/display-band-resolver.js +21 -0
- package/dist/backend/services/display-band-resolver.js.map +1 -0
- package/dist/backend/services/effective-fulfilment-strategy.d.ts +16 -0
- package/dist/backend/services/effective-fulfilment-strategy.d.ts.map +1 -0
- package/dist/backend/services/effective-fulfilment-strategy.js +16 -0
- package/dist/backend/services/effective-fulfilment-strategy.js.map +1 -0
- package/dist/backend/services/fulfilment-strategy-resolver.d.ts +13 -0
- package/dist/backend/services/fulfilment-strategy-resolver.d.ts.map +1 -0
- package/dist/backend/services/fulfilment-strategy-resolver.js +13 -0
- package/dist/backend/services/fulfilment-strategy-resolver.js.map +1 -0
- package/dist/backend/services/inventory-read-port.d.ts +65 -0
- package/dist/backend/services/inventory-read-port.d.ts.map +1 -0
- package/dist/backend/services/inventory-read-port.js +168 -0
- package/dist/backend/services/inventory-read-port.js.map +1 -0
- package/dist/backend/services/inventory-reservation-apply-port.d.ts +62 -0
- package/dist/backend/services/inventory-reservation-apply-port.d.ts.map +1 -0
- package/dist/backend/services/inventory-reservation-apply-port.js +134 -0
- package/dist/backend/services/inventory-reservation-apply-port.js.map +1 -0
- package/dist/backend/services/low-stock-alert-service.d.ts +87 -0
- package/dist/backend/services/low-stock-alert-service.d.ts.map +1 -0
- package/dist/backend/services/low-stock-alert-service.js +164 -0
- package/dist/backend/services/low-stock-alert-service.js.map +1 -0
- package/dist/backend/services/product-threshold-write.service.d.ts +38 -0
- package/dist/backend/services/product-threshold-write.service.d.ts.map +1 -0
- package/dist/backend/services/product-threshold-write.service.js +80 -0
- package/dist/backend/services/product-threshold-write.service.js.map +1 -0
- package/dist/backend/services/stock-import.service.d.ts +43 -0
- package/dist/backend/services/stock-import.service.d.ts.map +1 -0
- package/dist/backend/services/stock-import.service.js +124 -0
- package/dist/backend/services/stock-import.service.js.map +1 -0
- package/dist/backend/services/stock-level-service.d.ts +146 -0
- package/dist/backend/services/stock-level-service.d.ts.map +1 -0
- package/dist/backend/services/stock-level-service.js +489 -0
- package/dist/backend/services/stock-level-service.js.map +1 -0
- package/dist/backend/services/threshold-admin-service.d.ts +73 -0
- package/dist/backend/services/threshold-admin-service.d.ts.map +1 -0
- package/dist/backend/services/threshold-admin-service.js +167 -0
- package/dist/backend/services/threshold-admin-service.js.map +1 -0
- package/dist/backend/services/threshold-resolver.d.ts +23 -0
- package/dist/backend/services/threshold-resolver.d.ts.map +1 -0
- package/dist/backend/services/threshold-resolver.js +29 -0
- package/dist/backend/services/threshold-resolver.js.map +1 -0
- package/dist/backend/services/threshold-settings-mirror.d.ts +55 -0
- package/dist/backend/services/threshold-settings-mirror.d.ts.map +1 -0
- package/dist/backend/services/threshold-settings-mirror.js +84 -0
- package/dist/backend/services/threshold-settings-mirror.js.map +1 -0
- package/dist/backend/services/warehouse-channel-reconciler.d.ts +19 -0
- package/dist/backend/services/warehouse-channel-reconciler.d.ts.map +1 -0
- package/dist/backend/services/warehouse-channel-reconciler.js +65 -0
- package/dist/backend/services/warehouse-channel-reconciler.js.map +1 -0
- package/dist/backend/services/warehouse-channel-service.d.ts +57 -0
- package/dist/backend/services/warehouse-channel-service.d.ts.map +1 -0
- package/dist/backend/services/warehouse-channel-service.js +205 -0
- package/dist/backend/services/warehouse-channel-service.js.map +1 -0
- package/dist/backend/services/warehouse-country-reference.d.ts +14 -0
- package/dist/backend/services/warehouse-country-reference.d.ts.map +1 -0
- package/dist/backend/services/warehouse-country-reference.js +27 -0
- package/dist/backend/services/warehouse-country-reference.js.map +1 -0
- package/dist/backend/services/warehouse-service.d.ts +86 -0
- package/dist/backend/services/warehouse-service.d.ts.map +1 -0
- package/dist/backend/services/warehouse-service.js +267 -0
- package/dist/backend/services/warehouse-service.js.map +1 -0
- package/dist/manifest.d.ts +219 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +377 -0
- package/dist/manifest.js.map +1 -0
- package/dist/migrations/20260503T182812_inventory_workflow.d.ts +39 -0
- package/dist/migrations/20260503T182812_inventory_workflow.d.ts.map +1 -0
- package/dist/migrations/20260503T182812_inventory_workflow.js +205 -0
- package/dist/migrations/20260503T182812_inventory_workflow.js.map +1 -0
- package/dist/migrations/20260611T140347_inventory_warehouse_default_low_stock_threshold.d.ts +14 -0
- package/dist/migrations/20260611T140347_inventory_warehouse_default_low_stock_threshold.d.ts.map +1 -0
- package/dist/migrations/20260611T140347_inventory_warehouse_default_low_stock_threshold.js +18 -0
- package/dist/migrations/20260611T140347_inventory_warehouse_default_low_stock_threshold.js.map +1 -0
- package/dist/migrations/20260611T140348_inventory_per_warehouse_low_stock_thresholds.d.ts +28 -0
- package/dist/migrations/20260611T140348_inventory_per_warehouse_low_stock_thresholds.d.ts.map +1 -0
- package/dist/migrations/20260611T140348_inventory_per_warehouse_low_stock_thresholds.js +48 -0
- package/dist/migrations/20260611T140348_inventory_per_warehouse_low_stock_thresholds.js.map +1 -0
- package/dist/migrations/20260818T081243_inventory_stock_allocation_order_item_fk.d.ts +44 -0
- package/dist/migrations/20260818T081243_inventory_stock_allocation_order_item_fk.d.ts.map +1 -0
- package/dist/migrations/20260818T081243_inventory_stock_allocation_order_item_fk.js +81 -0
- package/dist/migrations/20260818T081243_inventory_stock_allocation_order_item_fk.js.map +1 -0
- package/dist/migrations/20260830T182139_inventory_organization_attribution.d.ts +109 -0
- package/dist/migrations/20260830T182139_inventory_organization_attribution.d.ts.map +1 -0
- package/dist/migrations/20260830T182139_inventory_organization_attribution.js +178 -0
- package/dist/migrations/20260830T182139_inventory_organization_attribution.js.map +1 -0
- package/dist/migrations/20260912T125716_inventory_organization_warehouses.d.ts +34 -0
- package/dist/migrations/20260912T125716_inventory_organization_warehouses.d.ts.map +1 -0
- package/dist/migrations/20260912T125716_inventory_organization_warehouses.js +50 -0
- package/dist/migrations/20260912T125716_inventory_organization_warehouses.js.map +1 -0
- package/dist/migrations/index.d.ts +32 -0
- package/dist/migrations/index.d.ts.map +1 -0
- package/dist/migrations/index.js +39 -0
- package/dist/migrations/index.js.map +1 -0
- package/dist/ports/index.d.ts +183 -0
- package/dist/ports/index.d.ts.map +1 -0
- package/dist/ports/index.js +2 -0
- package/dist/ports/index.js.map +1 -0
- package/docs/inventory.md +177 -0
- package/i18n/en.json +32 -0
- package/i18n/pl.json +32 -0
- package/package.json +105 -0
- package/tailwind.css +14 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Endora sp. z o.o. and the Endora Commerce contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<!-- Generated by `pnpm --filter backend run manifests:generate`. Delete this line to take the file over; a README without it is never regenerated. -->
|
|
2
|
+
|
|
3
|
+
# @endora-commerce/mod-inventory
|
|
4
|
+
|
|
5
|
+
Multi-warehouse stock levels, fulfilment strategy, and storefront display modes.
|
|
6
|
+
|
|
7
|
+
## What this is
|
|
8
|
+
|
|
9
|
+
An **Endora Commerce module package**. Its module id is `inventory` — the identity of record in the platform's registries, in its migrations and in its setting, permission and translation codes.
|
|
10
|
+
|
|
11
|
+
A module is not imported by application code. The platform discovers the extension packages an instance has installed, reads the manifest on the root subpath and composes the module from it, so installing this package and starting the instance is the whole integration.
|
|
12
|
+
|
|
13
|
+
## Entry points
|
|
14
|
+
|
|
15
|
+
| Import | Contents |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| `@endora-commerce/mod-inventory` | the module manifest — its id, version, dependencies, settings and activation |
|
|
18
|
+
| `@endora-commerce/mod-inventory/admin` | the Admin UI contribution: the screens, navigation and palette actions it adds |
|
|
19
|
+
| `@endora-commerce/mod-inventory/backend` | the composition root the platform calls, with the entities, services, routes and workers it registers |
|
|
20
|
+
| `@endora-commerce/mod-inventory/migrations` | the module’s own schema migrations, in the order the platform runs them |
|
|
21
|
+
| `@endora-commerce/mod-inventory/ports` | type-only — the port interfaces other modules resolve this one through |
|
|
22
|
+
| `@endora-commerce/mod-inventory/tailwind.css` | the Tailwind source declaration for the admin code above |
|
|
23
|
+
|
|
24
|
+
## Depends on
|
|
25
|
+
|
|
26
|
+
Everything below is a **peer** dependency, so the application resolves exactly one copy of each — two copies of a host or of React are a runtime failure rather than a type error. An entry marked *optional* is needed only by the layers that use it.
|
|
27
|
+
|
|
28
|
+
**Endora packages**
|
|
29
|
+
|
|
30
|
+
- `@endora-commerce/admin-kit` — *optional*
|
|
31
|
+
- `@endora-commerce/contracts`
|
|
32
|
+
- `@endora-commerce/email-components`
|
|
33
|
+
- `@endora-commerce/platform`
|
|
34
|
+
|
|
35
|
+
**Third-party**
|
|
36
|
+
|
|
37
|
+
- `@mikro-orm/core` ^6
|
|
38
|
+
- `@mikro-orm/migrations` ^6
|
|
39
|
+
- `@mikro-orm/postgresql` ^6
|
|
40
|
+
- `fastify` ^5
|
|
41
|
+
- `lucide-react` ^1 — *optional*
|
|
42
|
+
- `react` ^19 — *optional*
|
|
43
|
+
- `react-router-dom` ^7 — *optional*
|
|
44
|
+
- `zod` ^4
|
|
45
|
+
|
|
46
|
+
## What the tarball carries
|
|
47
|
+
|
|
48
|
+
- `dist/` — the compiled JavaScript and its type declarations
|
|
49
|
+
- `i18n/` — the translation bundles this package ships (`en`, `pl`), loaded by the platform
|
|
50
|
+
- `docs/` — the package’s own pages in the Endora Commerce documentation site
|
|
51
|
+
- `tailwind.css` — the Tailwind source declaration
|
|
52
|
+
|
|
53
|
+
## Install
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
pnpm add @endora-commerce/mod-inventory
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Licence
|
|
60
|
+
|
|
61
|
+
MIT — the text is in `LICENSE`, beside this file.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { CreateWarehouseRequest, UpdateWarehouseRequest, Warehouse } from '@endora-commerce/contracts';
|
|
2
|
+
interface ListResponse {
|
|
3
|
+
items: Warehouse[];
|
|
4
|
+
page: number;
|
|
5
|
+
pageSize: number;
|
|
6
|
+
total: number;
|
|
7
|
+
}
|
|
8
|
+
interface ListParams {
|
|
9
|
+
page?: number;
|
|
10
|
+
pageSize?: number;
|
|
11
|
+
activeOnly?: boolean;
|
|
12
|
+
withTotals?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const warehousesClient: {
|
|
15
|
+
list(params?: ListParams): Promise<ListResponse>;
|
|
16
|
+
get(id: string): Promise<Warehouse>;
|
|
17
|
+
create(body: CreateWarehouseRequest): Promise<Warehouse>;
|
|
18
|
+
update(id: string, body: UpdateWarehouseRequest): Promise<Warehouse>;
|
|
19
|
+
remove(id: string): Promise<void>;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=warehouses-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warehouses-client.d.ts","sourceRoot":"","sources":["../../../src/admin/api/warehouses-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,sBAAsB,EACtB,SAAS,EACV,MAAM,4BAA4B,CAAC;AAEpC,UAAU,YAAY;IACpB,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAMD,UAAU,UAAU;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,gBAAgB;kBACR,UAAU,GAAQ,OAAO,CAAC,YAAY,CAAC;YAW5C,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;iBAItB,sBAAsB,GAAG,OAAO,CAAC,SAAS,CAAC;eAI7C,MAAM,QAAQ,sBAAsB,GAAG,OAAO,CAAC,SAAS,CAAC;eAIzD,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGxC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { apiClient } from '@endora-commerce/admin-kit/lib';
|
|
2
|
+
export const warehousesClient = {
|
|
3
|
+
async list(params = {}) {
|
|
4
|
+
const search = new URLSearchParams();
|
|
5
|
+
if (params.page !== undefined)
|
|
6
|
+
search.set('page', String(params.page));
|
|
7
|
+
if (params.pageSize !== undefined)
|
|
8
|
+
search.set('pageSize', String(params.pageSize));
|
|
9
|
+
if (params.activeOnly)
|
|
10
|
+
search.set('activeOnly', 'true');
|
|
11
|
+
if (params.withTotals === false)
|
|
12
|
+
search.set('withTotals', 'false');
|
|
13
|
+
const qs = search.toString();
|
|
14
|
+
return apiClient.get(`/api/v1/admin/warehouses${qs ? `?${qs}` : ''}`);
|
|
15
|
+
},
|
|
16
|
+
async get(id) {
|
|
17
|
+
const res = await apiClient.get(`/api/v1/admin/warehouses/${id}`);
|
|
18
|
+
return res.data;
|
|
19
|
+
},
|
|
20
|
+
async create(body) {
|
|
21
|
+
const res = await apiClient.post('/api/v1/admin/warehouses', body);
|
|
22
|
+
return res.data;
|
|
23
|
+
},
|
|
24
|
+
async update(id, body) {
|
|
25
|
+
const res = await apiClient.patch(`/api/v1/admin/warehouses/${id}`, body);
|
|
26
|
+
return res.data;
|
|
27
|
+
},
|
|
28
|
+
async remove(id) {
|
|
29
|
+
await apiClient.delete(`/api/v1/admin/warehouses/${id}`);
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=warehouses-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warehouses-client.js","sourceRoot":"","sources":["../../../src/admin/api/warehouses-client.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAmB3D,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,KAAK,CAAC,IAAI,CAAC,SAAqB,EAAE;QAChC,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;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QACrB,MAAM,SAAS,CAAC,MAAM,CAAO,4BAA4B,EAAE,EAAE,CAAC,CAAC;IACjE,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `inventory`'s admin surface — seven routes, five sidebar entries and one zone
|
|
3
|
+
* contribution (feature 091, P7c for the zone, Phase 4 batch 13 for the
|
|
4
|
+
* registrations;
|
|
5
|
+
* `specs/091-module-owned-admin-surfaces/contracts/admin-component-contribution.md`
|
|
6
|
+
* §10).
|
|
7
|
+
*
|
|
8
|
+
* **Two surface directories, one module**, which is the case AGENTS.md records
|
|
9
|
+
* for `check:module-boundary` and the reason this is the batch's largest
|
|
10
|
+
* conversion. `AppShell.tsx` attributes `/warehouses` to `module: 'inventory'`,
|
|
11
|
+
* so `admin/src/modules/warehouses/` was this module's second surface directory
|
|
12
|
+
* — the boundary ledger keyed P7c's panel `inventory/ChannelMembershipPanel`
|
|
13
|
+
* for exactly that reason — and both directories are `src/admin/` now. The
|
|
14
|
+
* warehouse client travelled with them, so the reach
|
|
15
|
+
* `WarehousesList` makes into it is an intra-package relative import; leaving
|
|
16
|
+
* it behind is what would have made a package name something under
|
|
17
|
+
* `admin/src`, which is the failure `ChannelWarehouses` had to rebuild its way
|
|
18
|
+
* out of.
|
|
19
|
+
*
|
|
20
|
+
* **The zone came first, and that is the property the batch rests on.** P7c
|
|
21
|
+
* declared the contribution below while these screens were still
|
|
22
|
+
* `admin/src/App.tsx`'s, because `check:admin-registrations` counts routes and
|
|
23
|
+
* nav entries and a zone is neither — so a contributor can be scheduled
|
|
24
|
+
* independently of the host that renders its place.
|
|
25
|
+
*
|
|
26
|
+
* **What it drains**: the single key in
|
|
27
|
+
* `backend/scripts/ledgers/cross-module-imports/sales_channels.ts` —
|
|
28
|
+
* `SalesChannelEditPage.tsx` importing `ChannelMembershipPanel` from
|
|
29
|
+
* `admin/src/modules/warehouses/`. P7c deleted that shard and took this
|
|
30
|
+
* module's admin reaches to zero, which is why batch 13 pays nothing: its one
|
|
31
|
+
* remaining boundary key is a backend SQL reach and is feature 077's.
|
|
32
|
+
*
|
|
33
|
+
* **Zone and not a published component**, decided from the signature read off
|
|
34
|
+
* the file in this merge request (§9.3): `(channelId)` — one identifier in,
|
|
35
|
+
* nothing back, no `onChange` — which is Z1 question 2, an addition this module
|
|
36
|
+
* makes because this module is installed.
|
|
37
|
+
*
|
|
38
|
+
* **This entry exports data and nothing else** (R2); every component is a
|
|
39
|
+
* dynamic-import factory (R6).
|
|
40
|
+
*/
|
|
41
|
+
import { type AdminContributions } from '@endora-commerce/admin-kit/contributions';
|
|
42
|
+
export declare const contributions: AdminContributions;
|
|
43
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/admin/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,0CAA0C,CAAC;AAqClD,eAAO,MAAM,aAAa,EAAE,kBAoH3B,CAAC"}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `inventory`'s admin surface — seven routes, five sidebar entries and one zone
|
|
3
|
+
* contribution (feature 091, P7c for the zone, Phase 4 batch 13 for the
|
|
4
|
+
* registrations;
|
|
5
|
+
* `specs/091-module-owned-admin-surfaces/contracts/admin-component-contribution.md`
|
|
6
|
+
* §10).
|
|
7
|
+
*
|
|
8
|
+
* **Two surface directories, one module**, which is the case AGENTS.md records
|
|
9
|
+
* for `check:module-boundary` and the reason this is the batch's largest
|
|
10
|
+
* conversion. `AppShell.tsx` attributes `/warehouses` to `module: 'inventory'`,
|
|
11
|
+
* so `admin/src/modules/warehouses/` was this module's second surface directory
|
|
12
|
+
* — the boundary ledger keyed P7c's panel `inventory/ChannelMembershipPanel`
|
|
13
|
+
* for exactly that reason — and both directories are `src/admin/` now. The
|
|
14
|
+
* warehouse client travelled with them, so the reach
|
|
15
|
+
* `WarehousesList` makes into it is an intra-package relative import; leaving
|
|
16
|
+
* it behind is what would have made a package name something under
|
|
17
|
+
* `admin/src`, which is the failure `ChannelWarehouses` had to rebuild its way
|
|
18
|
+
* out of.
|
|
19
|
+
*
|
|
20
|
+
* **The zone came first, and that is the property the batch rests on.** P7c
|
|
21
|
+
* declared the contribution below while these screens were still
|
|
22
|
+
* `admin/src/App.tsx`'s, because `check:admin-registrations` counts routes and
|
|
23
|
+
* nav entries and a zone is neither — so a contributor can be scheduled
|
|
24
|
+
* independently of the host that renders its place.
|
|
25
|
+
*
|
|
26
|
+
* **What it drains**: the single key in
|
|
27
|
+
* `backend/scripts/ledgers/cross-module-imports/sales_channels.ts` —
|
|
28
|
+
* `SalesChannelEditPage.tsx` importing `ChannelMembershipPanel` from
|
|
29
|
+
* `admin/src/modules/warehouses/`. P7c deleted that shard and took this
|
|
30
|
+
* module's admin reaches to zero, which is why batch 13 pays nothing: its one
|
|
31
|
+
* remaining boundary key is a backend SQL reach and is feature 077's.
|
|
32
|
+
*
|
|
33
|
+
* **Zone and not a published component**, decided from the signature read off
|
|
34
|
+
* the file in this merge request (§9.3): `(channelId)` — one identifier in,
|
|
35
|
+
* nothing back, no `onChange` — which is Z1 question 2, an addition this module
|
|
36
|
+
* makes because this module is installed.
|
|
37
|
+
*
|
|
38
|
+
* **This entry exports data and nothing else** (R2); every component is a
|
|
39
|
+
* dynamic-import factory (R6).
|
|
40
|
+
*/
|
|
41
|
+
import { zoneComponent, } from '@endora-commerce/admin-kit/contributions';
|
|
42
|
+
/**
|
|
43
|
+
* The code that opens the contributed surface.
|
|
44
|
+
*
|
|
45
|
+
* `packages/modules/inventory/src/backend/routes.admin.ts` gates
|
|
46
|
+
* `GET /api/v1/admin/warehouses` and
|
|
47
|
+
* `GET /api/v1/admin/sales-channels/:channelId/warehouses` with
|
|
48
|
+
* `inventory:read`; the assign, promote and unassign behind the panel's
|
|
49
|
+
* controls take `inventory:write`, which a contribution cannot declare a second
|
|
50
|
+
* time and which the panel keeps asking for itself.
|
|
51
|
+
*/
|
|
52
|
+
const READ_PERMISSION = 'inventory:read';
|
|
53
|
+
/**
|
|
54
|
+
* The code the CSV importer needs, and the only row of the five that differs.
|
|
55
|
+
*
|
|
56
|
+
* `AppShell.tsx` carried it on that row alone and this declaration keeps it:
|
|
57
|
+
* the screen exists to write stock, so advertising it to a read-only operator
|
|
58
|
+
* would be a promise the API refuses. The other four screens open on
|
|
59
|
+
* {@link READ_PERMISSION} and gate their own controls on this code.
|
|
60
|
+
*/
|
|
61
|
+
const WRITE_PERMISSION = 'inventory:write';
|
|
62
|
+
/** The module's landing route: the stock roster. */
|
|
63
|
+
const ROUTE_PATH = '/inventory';
|
|
64
|
+
/**
|
|
65
|
+
* The warehouse screens' route prefix.
|
|
66
|
+
*
|
|
67
|
+
* A second top-level path for one module, and it is the host table's: warehouses
|
|
68
|
+
* are addressed as their own noun rather than as a subpath of stock, which is
|
|
69
|
+
* what the sidebar has always said and what every deep link an operator holds
|
|
70
|
+
* still spells.
|
|
71
|
+
*/
|
|
72
|
+
const WAREHOUSES_PATH = '/warehouses';
|
|
73
|
+
export const contributions = {
|
|
74
|
+
routes: [
|
|
75
|
+
{
|
|
76
|
+
path: ROUTE_PATH,
|
|
77
|
+
component: () => import('./pages/InventoryPage.js'),
|
|
78
|
+
requiredPermission: READ_PERMISSION,
|
|
79
|
+
index: true,
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
path: `${ROUTE_PATH}/low-stock`,
|
|
83
|
+
component: () => import('./pages/LowStockPage.js'),
|
|
84
|
+
requiredPermission: READ_PERMISSION,
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
path: `${ROUTE_PATH}/notifications`,
|
|
88
|
+
component: () => import('./pages/AvailabilityNotificationsPage.js'),
|
|
89
|
+
requiredPermission: READ_PERMISSION,
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
path: `${ROUTE_PATH}/import`,
|
|
93
|
+
component: () => import('./pages/StockImportWizard.js'),
|
|
94
|
+
requiredPermission: WRITE_PERMISSION,
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
path: WAREHOUSES_PATH,
|
|
98
|
+
component: () => import('./pages/WarehousesList.js'),
|
|
99
|
+
requiredPermission: READ_PERMISSION,
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
// Declared before `/warehouses/:id`, and `App.tsx` declared it before it
|
|
103
|
+
// too. `<Routes>` ranks by specificity rather than by declaration order,
|
|
104
|
+
// so the static segment wins whatever the order — the ordering is kept
|
|
105
|
+
// anyway, so a reader does not have to know that to see why the editor
|
|
106
|
+
// route is safe here.
|
|
107
|
+
path: `${WAREHOUSES_PATH}/new`,
|
|
108
|
+
component: () => import('./pages/WarehouseEditor.js'),
|
|
109
|
+
requiredPermission: READ_PERMISSION,
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
path: `${WAREHOUSES_PATH}/:id`,
|
|
113
|
+
component: () => import('./pages/WarehouseEditor.js'),
|
|
114
|
+
requiredPermission: READ_PERMISSION,
|
|
115
|
+
},
|
|
116
|
+
],
|
|
117
|
+
// Five rows, in the order the hand-written table had them, at the hand-written
|
|
118
|
+
// position times a hundred (batch four's convention). *Inventory* holds no
|
|
119
|
+
// host-declared row once these leave and no other module contributes to it,
|
|
120
|
+
// so these weights order the section outright.
|
|
121
|
+
nav: [
|
|
122
|
+
{
|
|
123
|
+
to: ROUTE_PATH,
|
|
124
|
+
// Module-relative (R8), resolved in this module's own namespace out of
|
|
125
|
+
// `packages/modules/inventory/i18n/`. All five were `appShell.nav.*` in
|
|
126
|
+
// the shared `_i18n` bundle, one of the four shared files a module author
|
|
127
|
+
// had to edit.
|
|
128
|
+
labelKey: 'nav.stockOverview.label',
|
|
129
|
+
// The glyph `AppShell.tsx` rendered by hand, and already on
|
|
130
|
+
// `KnownIconNameSchema` — this module's own `open-inventory` action names
|
|
131
|
+
// `Boxes`, and the sidebar's is kept: this row is the sidebar's row.
|
|
132
|
+
icon: 'Box',
|
|
133
|
+
section: 'inventory',
|
|
134
|
+
weight: 100,
|
|
135
|
+
requiredPermission: READ_PERMISSION,
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
to: WAREHOUSES_PATH,
|
|
139
|
+
labelKey: 'nav.warehouses.label',
|
|
140
|
+
// `Warehouse`, `TrendingDown`, `Bell` and `PackageOpen` join
|
|
141
|
+
// `KnownIconNameSchema` and the kit's `icon-map.ts` in this merge request
|
|
142
|
+
// rather than these four rows silently degrading to names that happen to
|
|
143
|
+
// be on the allowlist already: `AppShell.tsx` imported all four from
|
|
144
|
+
// `lucide-react` by hand, and a module declaration has to name its icon
|
|
145
|
+
// rather than import it.
|
|
146
|
+
icon: 'Warehouse',
|
|
147
|
+
section: 'inventory',
|
|
148
|
+
weight: 200,
|
|
149
|
+
requiredPermission: READ_PERMISSION,
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
to: `${ROUTE_PATH}/low-stock`,
|
|
153
|
+
labelKey: 'nav.lowStock.label',
|
|
154
|
+
icon: 'TrendingDown',
|
|
155
|
+
section: 'inventory',
|
|
156
|
+
weight: 300,
|
|
157
|
+
requiredPermission: READ_PERMISSION,
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
to: `${ROUTE_PATH}/notifications`,
|
|
161
|
+
labelKey: 'nav.notifyWhenAvailable.label',
|
|
162
|
+
icon: 'Bell',
|
|
163
|
+
section: 'inventory',
|
|
164
|
+
weight: 400,
|
|
165
|
+
requiredPermission: READ_PERMISSION,
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
to: `${ROUTE_PATH}/import`,
|
|
169
|
+
labelKey: 'nav.importStock.label',
|
|
170
|
+
icon: 'PackageOpen',
|
|
171
|
+
section: 'inventory',
|
|
172
|
+
weight: 500,
|
|
173
|
+
requiredPermission: WRITE_PERMISSION,
|
|
174
|
+
},
|
|
175
|
+
],
|
|
176
|
+
zones: [
|
|
177
|
+
zoneComponent('sales_channel.editor.after', () => import('./zones/ChannelWarehouses.js'), {
|
|
178
|
+
// The only contribution to this place, so the weight orders nothing
|
|
179
|
+
// today. Declared rather than defaulted so a second contributor arrives
|
|
180
|
+
// beside it rather than ahead of it by accident.
|
|
181
|
+
weight: 100,
|
|
182
|
+
// No `match`: `match` narrows the mounts of one place (Z13), and this
|
|
183
|
+
// place has one host and one mount. Asserted absent in
|
|
184
|
+
// `admin/test/modules/inventory/channel-warehouses-zone.test.tsx` so a
|
|
185
|
+
// later author cannot add one quietly.
|
|
186
|
+
requiredPermission: READ_PERMISSION,
|
|
187
|
+
}),
|
|
188
|
+
],
|
|
189
|
+
};
|
|
190
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/admin/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,OAAO,EACL,aAAa,GAEd,MAAM,0CAA0C,CAAC;AAElD;;;;;;;;;GASG;AACH,MAAM,eAAe,GAAG,gBAAgB,CAAC;AAEzC;;;;;;;GAOG;AACH,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;AAE3C,oDAAoD;AACpD,MAAM,UAAU,GAAG,YAAY,CAAC;AAEhC;;;;;;;GAOG;AACH,MAAM,eAAe,GAAG,aAAa,CAAC;AAEtC,MAAM,CAAC,MAAM,aAAa,GAAuB;IAC/C,MAAM,EAAE;QACN;YACE,IAAI,EAAE,UAAU;YAChB,SAAS,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,0BAA0B,CAAC;YACnD,kBAAkB,EAAE,eAAe;YACnC,KAAK,EAAE,IAAI;SACZ;QACD;YACE,IAAI,EAAE,GAAG,UAAU,YAAY;YAC/B,SAAS,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,yBAAyB,CAAC;YAClD,kB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AAwE;YACxE,yBAAyB;YACzB,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE,WAAW;YACpB,MAAM,EAAE,GAAG;YACX,kBAAkB,EAAE,eAAe;SACpC;QACD;YACE,EAAE,EAAE,GAAG,UAAU,YAAY;YAC7B,QAAQ,EAAE,oBAAoB;YAC9B,IAAI,EAAE,cAAc;YACpB,OAAO,EAAE,WAAW;YACpB,MAAM,EAAE,GAAG;YACX,kBAAkB,EAAE,eAAe;SACpC;QACD;YACE,EAAE,EAAE,GAAG,UAAU,gBAAgB;YACjC,QAAQ,EAAE,+BAA+B;YACzC,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,WAAW;YACpB,MAAM,EAAE,GAAG;YACX,kBAAkB,EAAE,eAAe;SACpC;QACD;YACE,EAAE,EAAE,GAAG,UAAU,SAAS;YAC1B,QAAQ,EAAE,uBAAuB;YACjC,IAAI,EAAE,aAAa;YACnB,OAAO,EAAE,WAAW;YACpB,MAAM,EAAE,GAAG;YACX,kBAAkB,EAAE,gBAAgB;SACrC;KACF;IACD,KAAK,EAAE;QACL,aAAa,CAAC,4BAA4B,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,8BAA8B,CAAC,EAAE;YACxF,oEAAoE;YACpE,wEAAwE;YACxE,iDAAiD;YACjD,MAAM,EAAE,GAAG;YACX,sEAAsE;YACtE,uDAAuD;YACvD,uEAAuE;YACvE,uCAAuC;YACvC,kBAAkB,EAAE,eAAe;SACpC,CAAC;KACH;CACF,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* AvailabilityNotificationsPage — feature 010 / US6 (T070).
|
|
4
|
+
*
|
|
5
|
+
* Admin browser of the back-in-stock queue. Operators can filter by
|
|
6
|
+
* status + product, search by SKU or email, and cancel a queued row.
|
|
7
|
+
*/
|
|
8
|
+
export declare function AvailabilityNotificationsPage(): ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* The registry loads a route component through a dynamic-import factory and
|
|
11
|
+
* reads its default export (feature 091, FR-013). The named export stays: it is
|
|
12
|
+
* the spelling this module's own code and its tests use.
|
|
13
|
+
*/
|
|
14
|
+
export default AvailabilityNotificationsPage;
|
|
15
|
+
//# sourceMappingURL=AvailabilityNotificationsPage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AvailabilityNotificationsPage.d.ts","sourceRoot":"","sources":["../../../src/admin/pages/AvailabilityNotificationsPage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AA8BlF;;;;;GAKG;AACH,wBAAgB,6BAA6B,IAAI,SAAS,CAsOzD;AAED;;;;GAIG;AACH,eAAe,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
3
|
+
import { Bell, Search } from 'lucide-react';
|
|
4
|
+
import { scopeNoticeOf } from '@endora-commerce/contracts';
|
|
5
|
+
import { ApiError, apiClient, formatDateTime, cn, useSurfaceVisibility, normalize } from '@endora-commerce/admin-kit/lib';
|
|
6
|
+
import { ScopeNotice } from '@endora-commerce/admin-kit/components';
|
|
7
|
+
import { useTranslation } from '@endora-commerce/admin-kit/i18n';
|
|
8
|
+
/**
|
|
9
|
+
* AvailabilityNotificationsPage — feature 010 / US6 (T070).
|
|
10
|
+
*
|
|
11
|
+
* Admin browser of the back-in-stock queue. Operators can filter by
|
|
12
|
+
* status + product, search by SKU or email, and cancel a queued row.
|
|
13
|
+
*/
|
|
14
|
+
export function AvailabilityNotificationsPage() {
|
|
15
|
+
const t = useTranslation('core');
|
|
16
|
+
// The screen's own gate (2026-08-29) — see `InventoryPage` for the reasoning
|
|
17
|
+
// in full. The cancel button is the write half: it was `catalog:write` while
|
|
18
|
+
// the list beside it was `orders:read`.
|
|
19
|
+
const isVisible = useSurfaceVisibility();
|
|
20
|
+
const canRead = isVisible({ module: 'inventory', requiredPermission: 'inventory:read' });
|
|
21
|
+
const canWrite = isVisible({ module: 'inventory', requiredPermission: 'inventory:write' });
|
|
22
|
+
const [rows, setRows] = useState([]);
|
|
23
|
+
const [loading, setLoading] = useState(true);
|
|
24
|
+
const [error, setError] = useState(null);
|
|
25
|
+
const [info, setInfo] = useState(null);
|
|
26
|
+
const [statusFilter, setStatusFilter] = useState('queued');
|
|
27
|
+
const [query, setQuery] = useState('');
|
|
28
|
+
const [busyId, setBusyId] = useState(null);
|
|
29
|
+
// Why the queue looks empty, when it does (feature 087).
|
|
30
|
+
const [scopeNotice, setScopeNotice] = useState(null);
|
|
31
|
+
const refresh = useCallback(async () => {
|
|
32
|
+
if (!canRead) {
|
|
33
|
+
setLoading(false);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
setLoading(true);
|
|
37
|
+
setError(null);
|
|
38
|
+
try {
|
|
39
|
+
const search = new URLSearchParams();
|
|
40
|
+
if (statusFilter !== 'all')
|
|
41
|
+
search.set('status', statusFilter);
|
|
42
|
+
search.set('pageSize', '200');
|
|
43
|
+
const res = await apiClient.get(`/api/v1/admin/inventory/availability-notifications?${search.toString()}`);
|
|
44
|
+
setRows(res.items);
|
|
45
|
+
setScopeNotice(scopeNoticeOf(res));
|
|
46
|
+
}
|
|
47
|
+
catch (err) {
|
|
48
|
+
setError(err instanceof ApiError ? err.envelope.error.message : t('inventory.availability.error.load'));
|
|
49
|
+
}
|
|
50
|
+
finally {
|
|
51
|
+
setLoading(false);
|
|
52
|
+
}
|
|
53
|
+
}, [canRead, statusFilter, t]);
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
void refresh();
|
|
56
|
+
}, [refresh]);
|
|
57
|
+
const filtered = useMemo(() => {
|
|
58
|
+
const q = normalize(query);
|
|
59
|
+
if (!q)
|
|
60
|
+
return rows;
|
|
61
|
+
return rows.filter((r) => normalize(r.productSku).includes(q) ||
|
|
62
|
+
normalize(r.productName).includes(q) ||
|
|
63
|
+
normalize(r.email).includes(q));
|
|
64
|
+
}, [rows, query]);
|
|
65
|
+
const handleCancel = async (id) => {
|
|
66
|
+
if (!window.confirm(t('inventory.availability.confirmCancel'))) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
setBusyId(id);
|
|
70
|
+
setError(null);
|
|
71
|
+
setInfo(null);
|
|
72
|
+
try {
|
|
73
|
+
await apiClient.patch(`/api/v1/admin/inventory/availability-notifications/${id}`, { status: 'cancelled' });
|
|
74
|
+
setInfo(t('inventory.availability.info.cancelled'));
|
|
75
|
+
await refresh();
|
|
76
|
+
}
|
|
77
|
+
catch (err) {
|
|
78
|
+
setError(err instanceof ApiError ? err.envelope.error.message : t('inventory.availability.error.cancel'));
|
|
79
|
+
}
|
|
80
|
+
finally {
|
|
81
|
+
setBusyId(null);
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
if (!canRead) {
|
|
85
|
+
return _jsx("div", { className: "b2b-page", children: t('inventory.noPermission') });
|
|
86
|
+
}
|
|
87
|
+
return (_jsxs("div", { className: "b2b-page b2b-page--wide", children: [_jsx("div", { className: "b2b-page-head", children: _jsxs("div", { className: "b2b-grow", children: [_jsx("div", { className: "b2b-page-head__title", children: t('inventory.availability.title') }), _jsx("div", { className: "b2b-page-head__sub", children: t('inventory.availability.description') })] }) }), error ? (_jsx("div", { className: "b2b-card", style: {
|
|
88
|
+
background: 'var(--danger-soft)',
|
|
89
|
+
color: 'var(--danger-soft-fg)',
|
|
90
|
+
padding: 12,
|
|
91
|
+
marginBottom: 16,
|
|
92
|
+
border: '1px solid hsl(8 80% 85%)',
|
|
93
|
+
}, children: error })) : null, info ? (_jsx("div", { className: "b2b-card", style: {
|
|
94
|
+
background: 'var(--success-soft)',
|
|
95
|
+
color: 'var(--success-soft-fg)',
|
|
96
|
+
padding: 12,
|
|
97
|
+
marginBottom: 16,
|
|
98
|
+
border: '1px solid hsl(142 50% 80%)',
|
|
99
|
+
}, children: info })) : null, _jsxs("div", { className: "b2b-card", children: [_jsxs("div", { className: "b2b-filterbar", children: [_jsx("div", { className: "b2b-filterbar__search", children: _jsxs("div", { className: "b2b-input-wrap", children: [_jsx(Search, { size: 16, className: "lead" }), _jsx("input", { className: "b2b-field b2b-field--addon", placeholder: t('inventory.availability.searchPlaceholder'), value: query, onChange: (e) => setQuery(e.target.value) })] }) }), ['all', 'queued', 'notified', 'cancelled'].map((s) => (_jsx("button", { type: "button", className: cn('b2b-filterchip', statusFilter === s && 'is-on'), onClick: () => setStatusFilter(s), children: _jsx("span", { style: { textTransform: 'capitalize' }, children: t(`inventory.availability.status.${s}`) }) }, s)))] }), _jsx("div", { className: "b2b-card__body b2b-card__body--flush", children: loading ? (_jsx("div", { style: { padding: 32, color: 'var(--fg-muted)', fontSize: 13 }, children: t('inventory.loading') })) : filtered.length === 0 ? (
|
|
100
|
+
// The notice replaces the empty state rather than sitting beside
|
|
101
|
+
// it: "no subscriptions match the current filters" is a claim about
|
|
102
|
+
// the data, and it is the false one here.
|
|
103
|
+
scopeNotice ? (_jsx("div", { style: { padding: 16 }, children: _jsx(ScopeNotice, { notice: scopeNotice }) })) : (_jsxs("div", { className: "b2b-empty", children: [_jsx("div", { className: "b2b-empty__icon", children: _jsx(Bell, { size: 20 }) }), _jsx("div", { className: "b2b-empty__title", children: t('inventory.availability.empty') })] }))) : (_jsxs("table", { className: "b2b-tbl", children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { children: t('inventory.column.product') }), _jsx("th", { children: t('inventory.column.sku') }), _jsx("th", { children: t('inventory.availability.column.email') }), _jsx("th", { children: t('inventory.availability.column.status') }), _jsx("th", { children: t('inventory.availability.column.queued') }), _jsx("th", { children: t('inventory.availability.column.notified') }), _jsx("th", {})] }) }), _jsx("tbody", { children: filtered.map((r) => (_jsxs("tr", { children: [_jsx("td", { children: r.productName }), _jsx("td", { children: _jsx("span", { className: "b2b-mono", style: { fontSize: 12, color: 'var(--fg-muted)' }, children: r.productSku }) }), _jsx("td", { children: r.email }), _jsx("td", { children: _jsx("span", { className: cn('b2b-badge', r.status === 'queued' && 'b2b-badge--warn', r.status === 'notified' && 'b2b-badge--success', r.status === 'cancelled' && 'b2b-badge--muted'), children: r.status }) }), _jsx("td", { children: _jsx("span", { className: "b2b-muted", style: { fontSize: 12 }, children: formatDateTime(r.queuedAt) }) }), _jsx("td", { children: _jsx("span", { className: "b2b-muted", style: { fontSize: 12 }, children: r.notifiedAt ? formatDateTime(r.notifiedAt) : '—' }) }), _jsx("td", { className: "actions", children: canWrite && r.status === 'queued' ? (_jsx("button", { type: "button", className: "b2b-btn b2b-btn--ghost b2b-btn--sm", disabled: busyId === r.id, onClick: () => { void handleCancel(r.id); }, children: t('inventory.availability.cancel') })) : null })] }, r.id))) })] })) })] })] }));
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* The registry loads a route component through a dynamic-import factory and
|
|
107
|
+
* reads its default export (feature 091, FR-013). The named export stays: it is
|
|
108
|
+
* the spelling this module's own code and its tests use.
|
|
109
|
+
*/
|
|
110
|
+
export default AvailabilityNotificationsPage;
|
|
111
|
+
//# sourceMappingURL=AvailabilityNotificationsPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AvailabilityNotificationsPage.js","sourceRoot":"","sources":["../../../src/admin/pages/AvailabilityNotificationsPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AAClF,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAwB,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,EAAE,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC1H,OAAO,EAAE,WAA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EAAE,EACzB,OAAO,EAAE,GAAS,EAAE,GAAG,KAAK,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,YAEhD,CAAC,CAAC,+BAA+B,CAAC,GAC5B,CACV,CAAC,CAAC,CAAC,IAAI,GACL,KAzCE,CAAC,CAAC,EAAE,CA0CR,CACN,CAAC,GACI,IACF,CACT,GACG,IACF,IACF,CACP,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,eAAe,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Inventory landing — feature 010 / US2.
|
|
4
|
+
*
|
|
5
|
+
* KPI strip backed by `GET /api/v1/admin/inventory`.
|
|
6
|
+
* Per-product roster from `GET /api/v1/admin/inventory/levels`.
|
|
7
|
+
* Per-row edit lands in the product editor's Inventory tab; the import
|
|
8
|
+
* wizard ships in US7.
|
|
9
|
+
*/
|
|
10
|
+
export declare function InventoryPage(): ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* The registry loads a route component through a dynamic-import factory and
|
|
13
|
+
* reads its default export (feature 091, FR-013). The named export stays: it is
|
|
14
|
+
* the spelling this module's own code and its tests use.
|
|
15
|
+
*/
|
|
16
|
+
export default InventoryPage;
|
|
17
|
+
//# sourceMappingURL=InventoryPage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InventoryPage.d.ts","sourceRoot":"","sources":["../../../src/admin/pages/InventoryPage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAqBf;;;;;;;GAOG;AACH,wBAAgB,aAAa,IAAI,SAAS,CAqRzC;AA2CD;;;;GAIG;AACH,eAAe,aAAa,CAAC"}
|