@7365admin1/core 3.128.0 → 3.129.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@7365admin1/core",
3
3
  "license": "MIT",
4
- "version": "3.128.0",
4
+ "version": "3.129.0",
5
5
  "author": "7365admin1",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.mjs",
@@ -369,3 +369,16 @@ test("inventory store-type repair: its row keeps only the type and the store nam
369
369
  assert.ok(CONSOLE_AUDIT_LABELS[action]);
370
370
  assert.deepEqual(pickAuditFields(action, { ownerType: "service_provider", name: "Main Store", createdBy: "x", email: "a@b.c" }), { ownerType: "service_provider", name: "Main Store" });
371
371
  });
372
+
373
+ test("inventory item archive/restore: the row keeps status, item name, store and reason only", async () => {
374
+ const { ConsoleAuditAction, pickAuditFields, CONSOLE_AUDIT_LABELS, ConsoleAuditTarget } = await import("./.build/utils/console-audit.util.mjs");
375
+ for (const action of [ConsoleAuditAction.INVENTORY_ITEM_ARCHIVED, ConsoleAuditAction.INVENTORY_ITEM_RESTORED]) {
376
+ assert.ok(CONSOLE_AUDIT_LABELS[action]);
377
+ assert.deepEqual(
378
+ pickAuditFields(action, { status: "archived", name: "Bulb", store: "Main Store", reason: "old", onHand: 0, createdBy: "x" }),
379
+ { status: "archived", name: "Bulb", store: "Main Store", reason: "old" },
380
+ );
381
+ }
382
+ assert.equal(ConsoleAuditAction.INVENTORY_ITEM_ARCHIVED, "inventory.item-archived");
383
+ if (ConsoleAuditTarget) assert.equal(ConsoleAuditTarget.INVENTORY_ITEM, "inventory-item");
384
+ });