@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/CHANGELOG.md +6 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/test/console-audit.test.mjs +13 -0
package/package.json
CHANGED
|
@@ -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
|
+
});
|