hvp-shared 6.75.0 → 6.77.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.
|
@@ -5,12 +5,29 @@
|
|
|
5
5
|
* Sessions track physical inventory counts across multiple uploads
|
|
6
6
|
* until closure is detected from QVET movements sync.
|
|
7
7
|
*/
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* Lifecycle status of an inventory session.
|
|
10
|
+
*
|
|
11
|
+
* counting → reviewing → validating → exported → closed
|
|
12
|
+
*
|
|
13
|
+
* - counting: Session created, physical counting in progress, no uploads yet
|
|
14
|
+
* - reviewing: First upload done, collaborator reviewing counts
|
|
15
|
+
* - validating: Collaborator done, manager validating/deciding
|
|
16
|
+
* - exported: Final sheet downloaded, data propagated to CatalogItem
|
|
17
|
+
* - closed: QVET import detected via movement sync
|
|
18
|
+
*/
|
|
9
19
|
export declare enum InventorySessionStatus {
|
|
10
|
-
|
|
20
|
+
counting = "counting",
|
|
21
|
+
reviewing = "reviewing",
|
|
22
|
+
validating = "validating",
|
|
23
|
+
exported = "exported",
|
|
11
24
|
closed = "closed"
|
|
12
25
|
}
|
|
13
26
|
export declare const INVENTORY_SESSION_STATUS_LABELS: Record<InventorySessionStatus, string>;
|
|
27
|
+
/** Statuses where editing (upload, count edits, collaborator actions) is allowed */
|
|
28
|
+
export declare const EDITABLE_SESSION_STATUSES: Set<InventorySessionStatus>;
|
|
29
|
+
/** Statuses where the session is still active (downloads, refresh, manager decisions) */
|
|
30
|
+
export declare const ACTIVE_SESSION_STATUSES: Set<InventorySessionStatus>;
|
|
14
31
|
/**
|
|
15
32
|
* Status of an individual item within a session.
|
|
16
33
|
* This is THE field to display. No priority logic needed.
|
|
@@ -7,18 +7,45 @@
|
|
|
7
7
|
* until closure is detected from QVET movements sync.
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.COLLABORATOR_ACTION_LABELS = exports.CollaboratorAction = exports.MANAGER_DECISION_LABELS = exports.ManagerDecision = exports.TERMINAL_ITEM_STATUSES = exports.INVENTORY_ITEM_STATUS_LABELS = exports.InventoryItemStatus = exports.INVENTORY_SESSION_STATUS_LABELS = exports.InventorySessionStatus = void 0;
|
|
10
|
+
exports.COLLABORATOR_ACTION_LABELS = exports.CollaboratorAction = exports.MANAGER_DECISION_LABELS = exports.ManagerDecision = exports.TERMINAL_ITEM_STATUSES = exports.INVENTORY_ITEM_STATUS_LABELS = exports.InventoryItemStatus = exports.ACTIVE_SESSION_STATUSES = exports.EDITABLE_SESSION_STATUSES = exports.INVENTORY_SESSION_STATUS_LABELS = exports.InventorySessionStatus = void 0;
|
|
11
11
|
// --- Session Status ---
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Lifecycle status of an inventory session.
|
|
14
|
+
*
|
|
15
|
+
* counting → reviewing → validating → exported → closed
|
|
16
|
+
*
|
|
17
|
+
* - counting: Session created, physical counting in progress, no uploads yet
|
|
18
|
+
* - reviewing: First upload done, collaborator reviewing counts
|
|
19
|
+
* - validating: Collaborator done, manager validating/deciding
|
|
20
|
+
* - exported: Final sheet downloaded, data propagated to CatalogItem
|
|
21
|
+
* - closed: QVET import detected via movement sync
|
|
22
|
+
*/
|
|
13
23
|
var InventorySessionStatus;
|
|
14
24
|
(function (InventorySessionStatus) {
|
|
15
|
-
InventorySessionStatus["
|
|
25
|
+
InventorySessionStatus["counting"] = "counting";
|
|
26
|
+
InventorySessionStatus["reviewing"] = "reviewing";
|
|
27
|
+
InventorySessionStatus["validating"] = "validating";
|
|
28
|
+
InventorySessionStatus["exported"] = "exported";
|
|
16
29
|
InventorySessionStatus["closed"] = "closed";
|
|
17
30
|
})(InventorySessionStatus || (exports.InventorySessionStatus = InventorySessionStatus = {}));
|
|
18
31
|
exports.INVENTORY_SESSION_STATUS_LABELS = {
|
|
19
|
-
[InventorySessionStatus.
|
|
20
|
-
[InventorySessionStatus.
|
|
32
|
+
[InventorySessionStatus.counting]: "Contando",
|
|
33
|
+
[InventorySessionStatus.reviewing]: "En revisión",
|
|
34
|
+
[InventorySessionStatus.validating]: "Validando",
|
|
35
|
+
[InventorySessionStatus.exported]: "Exportado",
|
|
36
|
+
[InventorySessionStatus.closed]: "Cerrado",
|
|
21
37
|
};
|
|
38
|
+
/** Statuses where editing (upload, count edits, collaborator actions) is allowed */
|
|
39
|
+
exports.EDITABLE_SESSION_STATUSES = new Set([
|
|
40
|
+
InventorySessionStatus.counting,
|
|
41
|
+
InventorySessionStatus.reviewing,
|
|
42
|
+
]);
|
|
43
|
+
/** Statuses where the session is still active (downloads, refresh, manager decisions) */
|
|
44
|
+
exports.ACTIVE_SESSION_STATUSES = new Set([
|
|
45
|
+
InventorySessionStatus.counting,
|
|
46
|
+
InventorySessionStatus.reviewing,
|
|
47
|
+
InventorySessionStatus.validating,
|
|
48
|
+
]);
|
|
22
49
|
// --- Item Status (unified — single source of truth for display) ---
|
|
23
50
|
/**
|
|
24
51
|
* Status of an individual item within a session.
|
|
@@ -16,8 +16,6 @@ export interface InventorySessionItem {
|
|
|
16
16
|
description: string;
|
|
17
17
|
section: string;
|
|
18
18
|
family: string;
|
|
19
|
-
/** Stock at session creation (reference only, does not change) */
|
|
20
|
-
initialQvetStock: number;
|
|
21
19
|
/** Latest QVET stock (refreshed on each upload/download) */
|
|
22
20
|
currentQvetStock: number;
|
|
23
21
|
/** QVET stock at the moment this item was last counted (frozen at upload time) */
|