@feedmepos/mf-inventory-portal 1.7.13-dev.4 → 1.7.14

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.
Files changed (138) hide show
  1. package/dist/App-Blx6Ojzj.js +311 -0
  2. package/dist/{ApprovalView-DO91AQ5f.js → ApprovalView-BPDiAWh_.js} +9 -9
  3. package/dist/{BindingsDialog-DUj0z6N7.js → BindingsDialog-RUlhC05W.js} +2 -2
  4. package/dist/{BindingsPicker-CD2J6-_Z.js → BindingsPicker-voEXbc8p.js} +2 -2
  5. package/dist/{BindingsTable-B2FEKZXU.js → BindingsTable-QuFV3fHq.js} +4 -4
  6. package/dist/BulkReceiveRequestView-Bix6MV0Z.js +2595 -0
  7. package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-ashHOuZt.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-CSxFa-Hr.js} +2 -6
  8. package/dist/{ClosingDraftView-tIvrsfYH.js → ClosingDraftView-BUWt7ufW.js} +19 -19
  9. package/dist/ClosingHistoryView-BzQ7f_31.js +761 -0
  10. package/dist/{ClosingTemplateView-C-hL9uPv.js → ClosingTemplateView-BoDHKL2a.js} +16 -16
  11. package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-BffF8S_q.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-B-t0N1PO.js} +1 -1
  12. package/dist/{DefaultView-BLbtx0Ho.js → DefaultView-CO4Fk0X3.js} +2 -2
  13. package/dist/{DeliveryOrderPrintPreview-BLQHL7aB.js → DeliveryOrderPrintPreview-Clslc2Wf.js} +2 -2
  14. package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-BnTAuutB.js → EmailDialog.vue_vue_type_script_setup_true_lang-BfQdw5-j.js} +2254 -2259
  15. package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-Mxhn0b6c.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-Brtj-hCD.js} +6 -6
  16. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-hrk0cTBX.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CHUQOFif.js} +2 -2
  17. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-hTQmIyaf.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BqIWvN-i.js} +2 -2
  18. package/dist/{FmMultiselectDialog-Bpi5rI0h.js → FmMultiselectDialog-D7cnUmM5.js} +1 -1
  19. package/dist/{FmMultiselectDialog-Bi6XlAAU.js → FmMultiselectDialog-GAdb6F9O.js} +2 -2
  20. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-e55tnl4u.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DAjM0Dya.js} +6 -6
  21. package/dist/{ImportView-xPTzBekx.js → ImportView-CrmY9zsK.js} +496 -499
  22. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-tvmS42s_.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-Sm0goJ7U.js} +1 -1
  23. package/dist/{IngredientGroupView-RFcqjF8T.js → IngredientGroupView-BebnVDQI.js} +5 -5
  24. package/dist/{IngredientsView-CvWOgquN.js → IngredientsView-CZ6Angq_.js} +17 -18
  25. package/dist/{IntegrationExplorerView-CYNhsJSS.js → IntegrationExplorerView-DxjMZi_f.js} +4 -4
  26. package/dist/{IntegrationView-ZtLokbu3.js → IntegrationView-Dm6Bkv1g.js} +15 -19
  27. package/dist/{InventoryBindingForm-DwiAIf5v.js → InventoryBindingForm-B5Dd6UGk.js} +1 -1
  28. package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-D4shlQ9Z.js +441 -0
  29. package/dist/{InventoryBindingSummary-zim_Bp5_.js → InventoryBindingSummary-BO8imeDG.js} +1 -1
  30. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CfTgt5xW.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Dp6O-oVL.js} +1 -1
  31. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-LLtd1VvM.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Mkt2BoGf.js} +1 -1
  32. package/dist/{ProductionView-BWn7RBEg.js → ProductionView-DIwvqo6L.js} +7 -7
  33. package/dist/{PublishView-DFXOi7Hx.js → PublishView-CbeljE1v.js} +3 -3
  34. package/dist/{PurchaseOrderPrintPreview-CG6kBQ26.js → PurchaseOrderPrintPreview-PzYdJJW9.js} +2 -2
  35. package/dist/{ReceiveRequestView-DKMVMo7M.js → ReceiveRequestView-NKnqWM_b.js} +14 -14
  36. package/dist/RecipeView-COQ6WUcz.js +3584 -0
  37. package/dist/{SettingsView-Cmf2ZOUL.js → SettingsView-BjX4I2pe.js} +4 -4
  38. package/dist/{StockView-DTai8l8U.js → StockView--9-NLfX0.js} +21 -21
  39. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BlKm7GLw.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BWHPauQW.js} +1 -1
  40. package/dist/{SupplierView-CRAHOOLm.js → SupplierView-B8T6cose.js} +12 -12
  41. package/dist/{SurchargeView-3XymEvcr.js → SurchargeView-eVcM29Ss.js} +6 -6
  42. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-DcXfQr_8.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-CYXfguPD.js} +2 -2
  43. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-qhJVHahS.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CMM1DWU3.js} +1 -1
  44. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CuNAt9UU.js +4733 -0
  45. package/dist/{TransferTemplateView-ByhvK4Ua.js → TransferTemplateView-D_oKyOUD.js} +20 -20
  46. package/dist/{UnitCostHistoryView-DHHWNJYA.js → UnitCostHistoryView-DThFdkNP.js} +4 -4
  47. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-bQu2KOI7.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-B6cHxf2Q.js} +4 -4
  48. package/dist/{UnitView-BZTS-Ahu.js → UnitView-BQZepbTS.js} +8 -8
  49. package/dist/WarehouseView-BZSn9BHl.js +1079 -0
  50. package/dist/{WastageTemplateView-CUDL3HUD.js → WastageTemplateView-BQO1geZz.js} +14 -14
  51. package/dist/api/purchase-order.d.ts +0 -2
  52. package/dist/api/stock.d.ts +0 -6
  53. package/dist/{app-BUQUpe4c.js → app-KaSY7GIt.js} +9137 -10098
  54. package/dist/app.d.ts +9 -952
  55. package/dist/app.js +1 -1
  56. package/dist/{closing-template-DzxDiEQB.js → closing-template-BFEWl8-N.js} +1 -1
  57. package/dist/cypress/support/component.d.ts +2 -1
  58. package/dist/{date2-6jkfRNS_.js → date2-DnqAk4pp.js} +5 -5
  59. package/dist/{dayjs.min-ByRnXzrl.js → dayjs.min-e3pyVvVk.js} +1 -1
  60. package/dist/{decimal-CqWBdj8E.js → decimal-DUKpY1WE.js} +2 -2
  61. package/dist/{defineDeepModel-CaT-4fiq.js → defineDeepModel-T75uoBAd.js} +1 -1
  62. package/dist/{duplicate-template-Cyvx-WK7.js → duplicate-template-CdBNGLA2.js} +1 -1
  63. package/dist/{feature-FjXz4WXw.js → feature-dE--ixN-.js} +2 -2
  64. package/dist/{format-time-from-id-cSri3OoO.js → format-time-from-id-D8SWSpBR.js} +1 -1
  65. package/dist/{format-unit-display-DPbcT7Ff.js → format-unit-display-ChGKpRsq.js} +27 -27
  66. package/dist/{import-export.helper-_yqcePYs.js → import-export.helper-BGjE6JjK.js} +6 -6
  67. package/dist/{index-nSL5yxNn.js → index-D_QylMOJ.js} +3 -3
  68. package/dist/{index-CyJVMHQW.js → index-DdMg0SgN.js} +1 -1
  69. package/dist/{index-CGvNoBid.js → index-JPtVC3tk.js} +3232 -3306
  70. package/dist/{inventory-core-dart.default-DSYRPQNZ.js → inventory-core-dart.default-0h8jmf3F.js} +1428 -1322
  71. package/dist/{lz-string-iyER1Klb.js → lz-string-NnYfN1XC.js} +1 -1
  72. package/dist/{netsuite-BD8LVxaA.js → netsuite-CAphkhg7.js} +1387 -1397
  73. package/dist/{number-C7CJ9ZfE.js → number-C8J8sC6d.js} +3 -3
  74. package/dist/{predefined-templates-o-_pKVSM.js → predefined-templates-CB1opHrA.js} +1 -1
  75. package/dist/{purchase-order-template-BHS8T1VA.js → purchase-order-template-p6EdpieI.js} +1 -1
  76. package/dist/{recalculationUtils-BCByr_CU.js → recalculationUtils-C5whNKrN.js} +1 -1
  77. package/dist/{rules-wZo-8FZ0.js → rules-sRZqLpuQ.js} +2 -2
  78. package/dist/{stock-CnAjxV7P.js → stock-BpfRRZPr.js} +3 -3
  79. package/dist/stock-DWrhlch4.js +85 -0
  80. package/dist/stores/bulk-job.d.ts +0 -13
  81. package/dist/style.css +1 -1
  82. package/dist/{supplier-DkqNwQmi.js → supplier-MzC5sRqv.js} +2 -2
  83. package/dist/{surcharge-Csj1WYbH.js → surcharge-ClMtrRgS.js} +8 -8
  84. package/dist/tsconfig.app.tsbuildinfo +1 -1
  85. package/dist/{uom-rules-BI1CdWeS.js → uom-rules-Di7y-2Xl.js} +1 -1
  86. package/dist/{use-ingredient-select-dialog-5AqoZJDA.js → use-ingredient-select-dialog-BPhQJhXq.js} +2 -2
  87. package/dist/{use-inventory-binding-dialog-ChiyhiuP.js → use-inventory-binding-dialog-BStbsMsT.js} +2 -2
  88. package/dist/{use-template-enabled-locations-BqXxegct.js → use-template-enabled-locations-ChCTz0-t.js} +2 -2
  89. package/dist/{use-transfer-locations-Ckj_diGt.js → use-transfer-locations-D8N8x1cE.js} +2 -2
  90. package/dist/{useHrmPermission-USG_KRoq.js → useHrmPermission-DCSqbLxW.js} +1 -1
  91. package/dist/{useNavigationMenu-BhYf87KI.js → useNavigationMenu-D3-zmwIs.js} +2 -2
  92. package/dist/{useSseClient-BqoE-ir6.js → useSseClient-BRHLaPnM.js} +1 -1
  93. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +0 -2
  94. package/dist/views/ingredients/components/inventory-binding/v2/InventoryBindingFormV2.vue.d.ts +0 -2
  95. package/dist/views/ingredients/components/inventory-binding/v2/components/InventoryRecipeBindingV2Field.vue.d.ts +0 -4
  96. package/dist/views/receive-request/components/email-dialog/EmailDialogProps.d.ts +9 -23
  97. package/dist/views/recipe/composables/use-recipe-table.d.ts +0 -11
  98. package/dist/views/stock/components/dialog/RecalculationDialog.vue.d.ts +2 -17
  99. package/dist/{vue-i18n-DoKioQ81.js → vue-i18n-BMo8ADYz.js} +196 -196
  100. package/dist/{xlsx.util-BXjE2o-3.js → xlsx.util-BSzjcX4G.js} +2 -2
  101. package/package.json +2 -2
  102. package/dist/App-Cfp4CqzQ.js +0 -1470
  103. package/dist/BulkReceiveRequestView-ejHyukEp.js +0 -2657
  104. package/dist/ClosingHistoryView-BYVZ01Ma.js +0 -1112
  105. package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-njDaQe10.js +0 -563
  106. package/dist/RecipeView-cLLKlLmE.js +0 -3625
  107. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CibsrZXw.js +0 -4781
  108. package/dist/WarehouseView-DVak1RPs.js +0 -1082
  109. package/dist/api/changelog.d.ts +0 -132
  110. package/dist/cypress/component/ChangelogPanel.cy.d.ts +0 -1
  111. package/dist/stock-DwqEvWM5.js +0 -95
  112. package/dist/views/changelog/components/ChangelogDialog.vue.d.ts +0 -19
  113. package/dist/views/changelog/components/ChangelogFloatingButton.spec.d.ts +0 -1
  114. package/dist/views/changelog/components/ChangelogFloatingButton.vue.d.ts +0 -2
  115. package/dist/views/changelog/components/ChangelogPanel.spec.d.ts +0 -1
  116. package/dist/views/changelog/components/ChangelogPanel.vue.d.ts +0 -20
  117. package/dist/views/changelog/composables/change-path.d.ts +0 -10
  118. package/dist/views/changelog/composables/commit-message.d.ts +0 -9
  119. package/dist/views/changelog/composables/commit-message.spec.d.ts +0 -1
  120. package/dist/views/changelog/composables/fab-position.d.ts +0 -21
  121. package/dist/views/changelog/composables/json-line-diff.d.ts +0 -10
  122. package/dist/views/changelog/composables/json-line-diff.spec.d.ts +0 -1
  123. package/dist/views/changelog/composables/use-changelog.d.ts +0 -90
  124. package/dist/views/changelog/composables/use-changelog.spec.d.ts +0 -1
  125. package/dist/views/changelog/composables/use-inventory-record-commits.d.ts +0 -97
  126. package/dist/views/changelog/composables/use-inventory-record-commits.spec.d.ts +0 -1
  127. package/dist/views/changelog/composables/use-snapshot-diff.d.ts +0 -29
  128. package/dist/views/changelog/composables/use-snapshot-diff.spec.d.ts +0 -1
  129. package/dist/views/changelog/composables/value-tree.d.ts +0 -14
  130. package/dist/views/changelog/composables/value-tree.spec.d.ts +0 -1
  131. package/dist/views/import/helper/submit-rows.d.ts +0 -13
  132. package/dist/views/import/helper/submit-rows.spec.d.ts +0 -1
  133. package/dist/views/ingredients/components/inventory-binding/RecipeBindingBreakdown.vue.d.ts +0 -25
  134. package/dist/views/ingredients/components/inventory-binding/composables/recipe-breakdown.d.ts +0 -34
  135. package/dist/views/ingredients/components/inventory-binding/composables/recipe-breakdown.spec.d.ts +0 -1
  136. package/dist/views/receive-request/components/email-dialog/EmailDialog.spec.d.ts +0 -1
  137. package/dist/views/stock/components/StockRecalculateDialog.vue.d.ts +0 -9
  138. package/dist/views/stock/components/dialog/SnapshotRecalculationDialog.vue.d.ts +0 -24
@@ -1,132 +0,0 @@
1
- import type { FdtoChangeLog } from '@feedmepos/zod-inventory';
2
- /** A domain the changelog browser lists generically (backend `changelog/domains`). */
3
- export interface BrowsableChangelogDomain {
4
- domain: string;
5
- labelKey: string;
6
- }
7
- /** A resolved value tree the server attaches to a change's from/to when explain=1 (mirrors kit's ValueNode). */
8
- export interface ValueNode {
9
- label?: string;
10
- value?: string;
11
- display?: string;
12
- list?: boolean;
13
- bookkeeping?: boolean;
14
- kids?: ValueNode[];
15
- }
16
- /** The `schema` query param for explain=1 — field-trail labels/identity, mirroring kit httpapi's explainOptions. */
17
- export interface ExplainSchema {
18
- array_keys?: Record<string, string>;
19
- identity_fields?: string[];
20
- name_fields?: string[];
21
- ignored_fields?: string[];
22
- names?: Record<string, string>;
23
- label_keys?: {
24
- prefix: string;
25
- fields: string[];
26
- };
27
- }
28
- /**
29
- * Domain-agnostic explain schema for domains without their own: keyed-array
30
- * pairing falls back to `_id`/`id`, and field labels reuse the inventory i18n
31
- * keys — consistent with the differ, whose label resolver is registered once
32
- * app-wide, so stored human paths already use these keys in every domain.
33
- */
34
- export declare const DEFAULT_EXPLAIN_SCHEMA: ExplainSchema;
35
- /**
36
- * Inventory domain's explain schema: the default plus the nested-array
37
- * identity declarations the `_id`/`id` fallback can't express, and the same
38
- * field labels the differ already translates (LABELED_FIELDS,
39
- * apps/inventory-backend/src/inventory/changelog-labels.ts) so a resolved
40
- * value tree's field labels go through the same i18n keys as field-level diffs.
41
- */
42
- export declare const INVENTORY_EXPLAIN_SCHEMA: ExplainSchema;
43
- /** The keyed-array element a kit-dialect change sits inside (mirrors kit's Element). */
44
- export interface ChangelogElement {
45
- trail?: string[];
46
- name?: string;
47
- id?: string;
48
- }
49
- /** Resolved display names for id-valued from/to (mirrors kit's Display). */
50
- export interface ChangelogDisplay {
51
- from?: string;
52
- to?: string;
53
- }
54
- /** One diff line within a commit (mirrors the changelog server's Change). */
55
- export interface ChangelogChange {
56
- at?: string;
57
- actor?: string;
58
- path: string;
59
- kind: string;
60
- from?: string;
61
- to?: string;
62
- from_value?: ValueNode;
63
- to_value?: ValueNode;
64
- /** kit-dialect only: human label trail of the changed field, relative to element when set. */
65
- field?: string[];
66
- /** kit-dialect only: set when the change sits inside a keyed array element. */
67
- element?: ChangelogElement;
68
- /** kit-dialect only: resolved display names when from/to are known ids. */
69
- display?: ChangelogDisplay;
70
- }
71
- /** One sealed commit for a record (the server's CommitEnvelope). */
72
- export interface ChangelogCommit {
73
- doc_id: string;
74
- id: string;
75
- parent: string;
76
- at: string;
77
- authors: string[];
78
- message?: string;
79
- changes: ChangelogChange[];
80
- }
81
- /**
82
- * True when an API call rejected with a 409 — the backend's changelog/state
83
- * passthrough answers this way when the document's history has any pre-kit
84
- * (legacy-dialect) commit, since kit's state replay cannot fold those.
85
- */
86
- export declare function isStateConflict(error: unknown): boolean;
87
- export declare const useChangelogApi: () => {
88
- /**
89
- * Commits for one record. recordId is the changelog docId, `${dbName}/${id}`.
90
- * The dbName scopes the (access-checked) backend route; only the bare id is
91
- * sent — the backend rebuilds the docId server-side.
92
- */
93
- getRecordChangelog(recordId: string, limit?: number, explain?: ExplainSchema, before?: string): Promise<ChangelogCommit[]>;
94
- /**
95
- * Purchase orders in a date range, each with when it last changed. The
96
- * backend joins the orders to their newest commit, so no ids travel and the
97
- * browser makes one request instead of list-then-ask-for-timestamps.
98
- */
99
- listPurchaseOrders(dbName: string, start: string, end: string): Promise<FdtoChangeLog[]>;
100
- /**
101
- * Closing drafts created in a date range, each with when it last changed.
102
- * Closing groups come back as rows of their own — their submit/approve/
103
- * reject is recorded against the group document, not its parent.
104
- */
105
- listClosingDrafts(dbName: string, start: string, end: string): Promise<FdtoChangeLog[]>;
106
- /**
107
- * A kit-dialect record's whole document, at HEAD or as of (and including)
108
- * commit `at`. Same dbName/id split as getRecordChangelog. Rejects with a
109
- * 409 (see isStateConflict) when the record's history predates the kit
110
- * write path — the backend passthrough for kit httpapi's GET /api/state.
111
- */
112
- getState(dbName: string, docId: string, at?: string): Promise<Record<string, unknown>>;
113
- /**
114
- * The domains the browser lists generically, declared in
115
- * changelog-domains-pkg and served by the backend — a new browsable domain
116
- * becomes a tab without a portal change. Backends predating the route
117
- * yield an error the caller treats as "no extra domains".
118
- */
119
- listDomains(businessId: string): Promise<BrowsableChangelogDomain[]>;
120
- /**
121
- * One generic domain's records, each with when it last changed. Business-
122
- * scoped: the generic domains are configuration documents of the business
123
- * db, not of a location.
124
- */
125
- listDomainRecords(businessId: string, domain: string): Promise<FdtoChangeLog[]>;
126
- /**
127
- * One inventory module's records, each with when it last changed. Business-
128
- * scoped, so the db is `business_<id>` — the same prefixed name the record's
129
- * own changelog docId carries.
130
- */
131
- listInventory(businessId: string, module: 'sku' | 'recipe' | 'unit'): Promise<FdtoChangeLog[]>;
132
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,95 +0,0 @@
1
- import { d as m, u as $ } from "./app-BUQUpe4c.js";
2
- import { useCoreStore as B } from "@feedmepos/mf-common";
3
- import { useSnackbar as k } from "@feedmepos/ui-library";
4
- const N = m((r, a) => {
5
- const s = $(), u = B(), i = k();
6
- return a.onError(async (e) => {
7
- e.name === "SvcForbiddenError" && (i == null || i.open({
8
- title: e.title,
9
- message: e.message,
10
- type: "error"
11
- }));
12
- }), {
13
- async readStockBalance() {
14
- const e = s.currentLocationDBName, t = `${r.inventoryBackendUrl}/${e}/stock-balance`;
15
- return await a.get(t);
16
- },
17
- async readSkuBalance() {
18
- var o;
19
- const e = s.currentLocationDBName, t = `${r.inventoryBackendUrl}/${e}/sku/balance`;
20
- return (((o = u.currentBusiness.value) == null ? void 0 : o.menuVersion) ?? "") === "v3" ? await a.get(t) : await a.get(`${t}?useInventoryDoc=true`);
21
- },
22
- async readSingleAdjustment(e) {
23
- const t = s.currentLocationDBName, n = `${r.inventoryBackendUrl}/${t}/adjustment`;
24
- return await a.get(`${n}?adjustmentId=${e}`);
25
- },
26
- async readStockAdjustment(e, t, n) {
27
- const o = s.currentLocationDBName, c = `${r.inventoryBackendUrl}/${o}/sku`;
28
- return await a.get(`${c}?skuId=${e}&start=${t}&end=${n}`);
29
- },
30
- async readAdjustmentById(e) {
31
- const t = s.currentLocationDBName, n = `${r.inventoryBackendUrl}/${t}/adjustment`;
32
- return await a.get(`${n}?adjustmentId=${e}`);
33
- },
34
- async convertSku(e) {
35
- var c;
36
- const t = s.currentLocationDBName, n = `${r.inventoryBackendUrl}/${t}/sku/convert`;
37
- return (((c = u.currentBusiness.value) == null ? void 0 : c.menuVersion) ?? "") === "v3" ? await a.post(n, e) : await a.post(`${n}?useInventoryDoc=true`, e);
38
- },
39
- async adjustSku(e) {
40
- var c;
41
- const t = s.currentLocationDBName, n = `${r.inventoryBackendUrl}/${t}/sku/adjust`;
42
- return (((c = u.currentBusiness.value) == null ? void 0 : c.menuVersion) ?? "") === "v3" ? await a.post(n, e) : await a.post(`${n}?useInventoryDoc=true`, e);
43
- },
44
- async revertWastageAdjustment(e) {
45
- const t = s.currentLocationDBName, n = `${r.inventoryBackendUrl}/${t}/sku/revert-wastage-adjustment`;
46
- return await a.post(n, e);
47
- },
48
- recalculation: {
49
- getRecalculateAbility() {
50
- var o;
51
- const t = `business_${(o = u.currentBusiness.value) == null ? void 0 : o._id}`, n = `${r.inventoryBackendUrl}/${t}/stock/operations/recalculate`;
52
- return a.get(n);
53
- },
54
- startRecalculateTask() {
55
- var o;
56
- const t = `business_${(o = u.currentBusiness.value) == null ? void 0 : o._id}`, n = `${r.inventoryBackendUrl}/${t}/stock/operations/recalculate?refundFromPreviousAdjustment=true`;
57
- return a.post(n);
58
- },
59
- refreshCurrentBalances() {
60
- const e = s.currentLocationDBName, t = `${r.inventoryBackendUrl}/${e}/stock/operations/recalculate/refresh-current-balances`;
61
- return a.post(t);
62
- },
63
- scheduleInvalidateClosingDraftCache(e) {
64
- const t = s.currentLocationDBName, n = `${r.inventoryBackendUrl}/${t}/stock/operations/recalculate/schedule/invalidate-closing-draft-cache`;
65
- return a.post(n, { closingDraftIds: e });
66
- },
67
- recalculationRequests() {
68
- const e = s.currentLocationDBName, t = `${r.inventoryBackendUrl}/${e}/stock/operations/recalculate/recalculation/requests`;
69
- return a.get(t);
70
- },
71
- scheduleRecalculation(e) {
72
- const t = s.currentLocationDBName, n = `${r.inventoryBackendUrl}/${t}/stock/operations/recalculate/schedule/recalculation`;
73
- return a.post(n, {
74
- openingId: e.openingId,
75
- untilDate: e.untilDate,
76
- recalculateBySnapshot: e.recalculateBySnapshot
77
- });
78
- },
79
- getAffectedClosingDrafts(e, t) {
80
- const n = s.currentLocationDBName, o = `${r.inventoryBackendUrl}/${n}/closing-draft/recalculation/affected-closing-drafts?openingId=${encodeURIComponent(e)}&untilDate=${encodeURIComponent(t)}`;
81
- return a.get(o);
82
- }
83
- },
84
- async readUnitCostHistory(e, t, n) {
85
- var d;
86
- const o = s.currentLocation.doc._id, c = ((d = u.currentBusiness.value) == null ? void 0 : d._id) ?? "", l = `${r.inventoryBackendUrl}/${c}/api/unit-cost-history`;
87
- return await a.get(
88
- `${l}?locationId=${o}&skuId=${e}&startDate=${t}&endDate=${n}`
89
- );
90
- }
91
- };
92
- });
93
- export {
94
- N as u
95
- };
@@ -1,19 +0,0 @@
1
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
2
- modelValue: boolean;
3
- }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
4
- "update:modelValue": (value: boolean) => void;
5
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
6
- modelValue: boolean;
7
- }>>> & Readonly<{
8
- "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
9
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
10
- export default _default;
11
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
12
- type __VLS_TypePropsToRuntimeProps<T> = {
13
- [K in keyof T]-?: {} extends Pick<T, K> ? {
14
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
15
- } : {
16
- type: import('vue').PropType<T[K]>;
17
- required: true;
18
- };
19
- };
@@ -1,2 +0,0 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
- export default _default;
@@ -1,20 +0,0 @@
1
- import type { ChangelogCommit } from '@/api/changelog';
2
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
3
- commits: ChangelogCommit[];
4
- isLoading: boolean;
5
- resolveName?: ((id: string) => string | undefined) | undefined;
6
- }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
7
- commits: ChangelogCommit[];
8
- isLoading: boolean;
9
- resolveName?: ((id: string) => string | undefined) | undefined;
10
- }>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
11
- export default _default;
12
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
13
- type __VLS_TypePropsToRuntimeProps<T> = {
14
- [K in keyof T]-?: {} extends Pick<T, K> ? {
15
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
16
- } : {
17
- type: import('vue').PropType<T[K]>;
18
- required: true;
19
- };
20
- };
@@ -1,10 +0,0 @@
1
- export declare const PATH_DELIM: string;
2
- export declare function splitPath(path: string): {
3
- raw: string;
4
- human: string;
5
- };
6
- export declare function parseHuman(path: string): {
7
- type: string;
8
- name: string;
9
- field: string[];
10
- };
@@ -1,9 +0,0 @@
1
- /** Structured commit message stored by inventory-backend: label key + verb + optional item name. */
2
- export interface StructuredMessage {
3
- labelKey: string;
4
- verb: string;
5
- name?: string;
6
- }
7
- export declare function parseStructuredMessage(message?: string): StructuredMessage | null;
8
- /** True when a human path segment is a changelog i18n key (vs a literal like an entity name). */
9
- export declare function isLabelKey(segment: string): boolean;
@@ -1,21 +0,0 @@
1
- /**
2
- * Where the floating changelog button parks. Kept out of the component so the
3
- * rule is testable as arithmetic: asserting it through the rendered style made
4
- * the spec depend on the template re-rendering, which is not something every
5
- * environment agrees on (CI hoists the wrapper vnode and freezes its style at
6
- * the first-render values).
7
- */
8
- /** Gap it parks with — small enough to read as docked, wide enough that the
9
- * shadow isn't clipped. */
10
- export declare const MARGIN = 8;
11
- /**
12
- * The load-time spot: bottom-left. The layout's own mobile FAB sits
13
- * bottom-right (SingleColumnLayout), so the opposite corner keeps both
14
- * reachable, and a corner is less in the way than a button parked halfway down
15
- * the content. No badge-overhang allowance here — FmAdminBadge's marker
16
- * overhangs to the right, which only crowds the viewport on the right edge.
17
- */
18
- export declare function defaultPosition(height: number, viewportHeight: number): {
19
- x: number;
20
- y: number;
21
- };
@@ -1,10 +0,0 @@
1
- export type DiffLine = {
2
- type: 'same' | 'add' | 'del' | 'skip';
3
- text: string;
4
- };
5
- /**
6
- * Diffs two JSON-encoded values line by line, git-style. Returns null unless
7
- * both parse to objects/arrays whose changed region is small enough to diff —
8
- * callers fall back to the plain from/to blocks.
9
- */
10
- export declare function jsonLineDiff(from: string, to: string, context?: number): DiffLine[] | null;
@@ -1,90 +0,0 @@
1
- import { type ChangelogCommit, type ExplainSchema } from '@/api/changelog';
2
- export declare function useChangelog(): {
3
- commits: import("vue").Ref<{
4
- doc_id: string;
5
- id: string;
6
- parent: string;
7
- at: string;
8
- authors: string[];
9
- message?: string | undefined;
10
- changes: {
11
- at?: string | undefined;
12
- actor?: string | undefined;
13
- path: string;
14
- kind: string;
15
- from?: string | undefined;
16
- to?: string | undefined;
17
- from_value?: {
18
- label?: string | undefined;
19
- value?: string | undefined;
20
- display?: string | undefined;
21
- list?: boolean | undefined;
22
- bookkeeping?: boolean | undefined;
23
- kids?: any[] | undefined;
24
- } | undefined;
25
- to_value?: {
26
- label?: string | undefined;
27
- value?: string | undefined;
28
- display?: string | undefined;
29
- list?: boolean | undefined;
30
- bookkeeping?: boolean | undefined;
31
- kids?: any[] | undefined;
32
- } | undefined;
33
- field?: string[] | undefined;
34
- element?: {
35
- trail?: string[] | undefined;
36
- name?: string | undefined;
37
- id?: string | undefined;
38
- } | undefined;
39
- display?: {
40
- from?: string | undefined;
41
- to?: string | undefined;
42
- } | undefined;
43
- }[];
44
- }[], ChangelogCommit[] | {
45
- doc_id: string;
46
- id: string;
47
- parent: string;
48
- at: string;
49
- authors: string[];
50
- message?: string | undefined;
51
- changes: {
52
- at?: string | undefined;
53
- actor?: string | undefined;
54
- path: string;
55
- kind: string;
56
- from?: string | undefined;
57
- to?: string | undefined;
58
- from_value?: {
59
- label?: string | undefined;
60
- value?: string | undefined;
61
- display?: string | undefined;
62
- list?: boolean | undefined;
63
- bookkeeping?: boolean | undefined;
64
- kids?: any[] | undefined;
65
- } | undefined;
66
- to_value?: {
67
- label?: string | undefined;
68
- value?: string | undefined;
69
- display?: string | undefined;
70
- list?: boolean | undefined;
71
- bookkeeping?: boolean | undefined;
72
- kids?: any[] | undefined;
73
- } | undefined;
74
- field?: string[] | undefined;
75
- element?: {
76
- trail?: string[] | undefined;
77
- name?: string | undefined;
78
- id?: string | undefined;
79
- } | undefined;
80
- display?: {
81
- from?: string | undefined;
82
- to?: string | undefined;
83
- } | undefined;
84
- }[];
85
- }[]>;
86
- isLoading: import("vue").Ref<boolean, boolean>;
87
- hasMore: import("vue").Ref<boolean, boolean>;
88
- load: (recordId: string, limit?: number, explain?: ExplainSchema) => Promise<void>;
89
- loadMore: () => Promise<void>;
90
- };
@@ -1,97 +0,0 @@
1
- import { type ChangelogCommit } from '@/api/changelog';
2
- export declare const INVENTORY_COMMIT_LIMIT = 1000;
3
- /** Newest-first merge of two commit lists — ISO-8601 `at` compares lexicographically in chronological order. */
4
- export declare function mergeCommitsNewestFirst(a: ChangelogCommit[], b: ChangelogCommit[]): ChangelogCommit[];
5
- /**
6
- * A record's per-entity changelog doc (Phase D-inventory:
7
- * `${sharedDocId}/${module}/${entityId}`), to merge alongside its legacy
8
- * shared-doc history. Most records predate the migration and have no
9
- * per-entity doc yet, so an empty or failed fetch here is expected, not an
10
- * error — the caller's legacy list is unaffected either way.
11
- */
12
- export declare function usePerEntityCommits(): {
13
- commits: import("vue").Ref<{
14
- doc_id: string;
15
- id: string;
16
- parent: string;
17
- at: string;
18
- authors: string[];
19
- message?: string | undefined;
20
- changes: {
21
- at?: string | undefined;
22
- actor?: string | undefined;
23
- path: string;
24
- kind: string;
25
- from?: string | undefined;
26
- to?: string | undefined;
27
- from_value?: {
28
- label?: string | undefined;
29
- value?: string | undefined;
30
- display?: string | undefined;
31
- list?: boolean | undefined;
32
- bookkeeping?: boolean | undefined;
33
- kids?: any[] | undefined;
34
- } | undefined;
35
- to_value?: {
36
- label?: string | undefined;
37
- value?: string | undefined;
38
- display?: string | undefined;
39
- list?: boolean | undefined;
40
- bookkeeping?: boolean | undefined;
41
- kids?: any[] | undefined;
42
- } | undefined;
43
- field?: string[] | undefined;
44
- element?: {
45
- trail?: string[] | undefined;
46
- name?: string | undefined;
47
- id?: string | undefined;
48
- } | undefined;
49
- display?: {
50
- from?: string | undefined;
51
- to?: string | undefined;
52
- } | undefined;
53
- }[];
54
- }[], ChangelogCommit[] | {
55
- doc_id: string;
56
- id: string;
57
- parent: string;
58
- at: string;
59
- authors: string[];
60
- message?: string | undefined;
61
- changes: {
62
- at?: string | undefined;
63
- actor?: string | undefined;
64
- path: string;
65
- kind: string;
66
- from?: string | undefined;
67
- to?: string | undefined;
68
- from_value?: {
69
- label?: string | undefined;
70
- value?: string | undefined;
71
- display?: string | undefined;
72
- list?: boolean | undefined;
73
- bookkeeping?: boolean | undefined;
74
- kids?: any[] | undefined;
75
- } | undefined;
76
- to_value?: {
77
- label?: string | undefined;
78
- value?: string | undefined;
79
- display?: string | undefined;
80
- list?: boolean | undefined;
81
- bookkeeping?: boolean | undefined;
82
- kids?: any[] | undefined;
83
- } | undefined;
84
- field?: string[] | undefined;
85
- element?: {
86
- trail?: string[] | undefined;
87
- name?: string | undefined;
88
- id?: string | undefined;
89
- } | undefined;
90
- display?: {
91
- from?: string | undefined;
92
- to?: string | undefined;
93
- } | undefined;
94
- }[];
95
- }[]>;
96
- load: (recordId: string) => Promise<void>;
97
- };
@@ -1,29 +0,0 @@
1
- import { type ChangelogCommit } from '@/api/changelog';
2
- import { type DiffLine } from './json-line-diff';
3
- export interface SnapshotResult {
4
- diff: DiffLine[] | null;
5
- conflict: boolean;
6
- }
7
- /**
8
- * Per-commit whole-document diff (kit-dialect records only): state at the
9
- * commit vs state at its parent, over the backend's changelog/state
10
- * passthrough. Cached per commit id so re-toggling the view is free; a 409
11
- * (pre-kit history) is cached too, so it doesn't re-fetch on every toggle.
12
- */
13
- export declare function useSnapshotDiff(): {
14
- isLoading: import("vue").Ref<boolean, boolean>;
15
- result: import("vue").Ref<{
16
- diff: {
17
- type: "add" | "del" | "same" | "skip";
18
- text: string;
19
- }[] | null;
20
- conflict: boolean;
21
- } | null, SnapshotResult | {
22
- diff: {
23
- type: "add" | "del" | "same" | "skip";
24
- text: string;
25
- }[] | null;
26
- conflict: boolean;
27
- } | null>;
28
- load: (commit: ChangelogCommit) => Promise<void>;
29
- };
@@ -1,14 +0,0 @@
1
- import type { ValueNode } from '@/api/changelog';
2
- export interface ValueTreeLine {
3
- depth: number;
4
- label?: string;
5
- text?: string;
6
- bookkeeping: boolean;
7
- }
8
- /**
9
- * Flattens one ValueNode tree; i18n-key labels are translated via `t`, literals
10
- * pass through. `resolveName` fills in a display name for id-valued leaves the
11
- * server couldn't resolve — ids referencing entities outside the explained
12
- * value (kit's document walk only sees the value itself).
13
- */
14
- export declare function flattenValueTree(node: ValueNode, t: (key: string) => string, depth?: number, resolveName?: (id: string) => string | undefined): ValueTreeLine[];
@@ -1 +0,0 @@
1
- export {};
@@ -1,13 +0,0 @@
1
- /**
2
- * The import preview merges transient validation state onto each entity row
3
- * (`{ ...entity, errors }`) so the summary table can show per-row problems.
4
- * The bulk API must receive the entity alone: rows submitted whole persisted
5
- * `errors: []` into the inventory doc's skus/recipes/units, which then
6
- * surfaced in the changelog as a phantom "Errors" field on every later edit.
7
- * One boundary, one strip: valid rows only, `errors` removed.
8
- *
9
- * Untyped by necessity: the rows come off `importSummary` (a `ref<any>`), so a
10
- * generic would only infer its own constraint and then fail against the typed
11
- * bulk-request params. The spec pins the runtime contract instead.
12
- */
13
- export declare function submittableRows(rows: Array<Record<string, any>> | undefined): any[];
@@ -1 +0,0 @@
1
- export {};
@@ -1,25 +0,0 @@
1
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
2
- recipeId: string;
3
- /**
4
- * The amount keyed in on the row, as typed — every contained amount previews as
5
- * configured × this. Raw text rather than a number so a cleared field is not read as 0.
6
- */
7
- multiplier: string;
8
- }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
9
- recipeId: string;
10
- /**
11
- * The amount keyed in on the row, as typed — every contained amount previews as
12
- * configured × this. Raw text rather than a number so a cleared field is not read as 0.
13
- */
14
- multiplier: string;
15
- }>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
16
- export default _default;
17
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
18
- type __VLS_TypePropsToRuntimeProps<T> = {
19
- [K in keyof T]-?: {} extends Pick<T, K> ? {
20
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
21
- } : {
22
- type: import('vue').PropType<T[K]>;
23
- required: true;
24
- };
25
- };