@feedmepos/mf-inventory-portal 1.2.60-dev.2 → 1.2.60

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 (129) hide show
  1. package/dist/{App-B_yr-6yL.js → App-B6JtYLP4.js} +78 -82
  2. package/dist/{ApprovalView-DoYBBuSD.js → ApprovalView-fiHlFJKJ.js} +5 -5
  3. package/dist/{BindingsDialog-DG7HOy6J.js → BindingsDialog-BlF79qCu.js} +5 -5
  4. package/dist/{BindingsPicker-DVCYpyrR.js → BindingsPicker-BS2OcyII.js} +3 -3
  5. package/dist/{BindingsTable-CCel2b_W.js → BindingsTable-RyfzT4g6.js} +5 -5
  6. package/dist/{ClosingDraftView-CfM7gNBX.js → ClosingDraftView-B2d-XA_E.js} +216 -217
  7. package/dist/{ClosingHistoryView-DWH4bFgg.js → ClosingHistoryView-DZPNorN6.js} +36 -36
  8. package/dist/{ClosingTemplateView-JYnnvm7L.js → ClosingTemplateView-L596UQJH.js} +14 -14
  9. package/dist/{DeliveryOrderPrintPreview-BihBTJGj.js → DeliveryOrderPrintPreview-C82JPcVR.js} +7 -7
  10. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CWjtQajS.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CNf3PA0N.js} +17 -17
  11. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CUIrR73y.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-WWzwaGw-.js} +2 -2
  12. package/dist/{FmMultiselectDialog-CxDviJZM.js → FmMultiselectDialog-CcMB_4yD.js} +16 -16
  13. package/dist/{FmMultiselectDialog-D51nW6yj.js → FmMultiselectDialog-DTLcPYaF.js} +1 -1
  14. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DLqUnROc.js → FmUnitInput.vue_vue_type_script_setup_true_lang-ChqG8Av1.js} +22 -23
  15. package/dist/{ImportView-C52rZFib.js → ImportView-diTEPSKt.js} +6 -6
  16. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-CjZmd-Sa.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-Cu-dNL-B.js} +1 -1
  17. package/dist/{IngredientGroupView-DTHpZP2L.js → IngredientGroupView-CYqZOXH1.js} +5 -5
  18. package/dist/{IngredientsView-CrCW6heJ.js → IngredientsView-DoCTezXa.js} +24 -25
  19. package/dist/{IntegrationView--DZANrHj.js → IntegrationView-JboVfhvd.js} +17 -18
  20. package/dist/{InventoryBindingForm-DLTpv-zQ.js → InventoryBindingForm-B1MrDzRK.js} +1 -1
  21. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-hkIg4Rbp.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-Br1hzlQ5.js} +16 -17
  22. package/dist/{InventoryBindingSummary-D9ptV8Cw.js → InventoryBindingSummary-B09SU9pE.js} +1 -1
  23. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CdPxhkg0.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BX26mYQG.js} +5 -5
  24. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Ci3esisT.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DIk5aP_6.js} +2 -2
  25. package/dist/{PublishView-DxzL_D61.js → PublishView-BLu0VGTW.js} +8 -8
  26. package/dist/{PurchaseOrderPrintPreview-D0tg-2TC.js → PurchaseOrderPrintPreview-CFZX2Yen.js} +11 -11
  27. package/dist/{ReceiveRequestView-2U534J1_.js → ReceiveRequestView-DD0kz7x8.js} +37 -38
  28. package/dist/RecipeView-Cg7v20hW.js +646 -0
  29. package/dist/{StockView-CvWbnYGz.js → StockView-CJk1YeM_.js} +105 -106
  30. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CxjceLuZ.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BFCjZO6S.js} +1 -1
  31. package/dist/{SupplierView-DMIunLvv.js → SupplierView-CTEInwI-.js} +19 -20
  32. package/dist/{SurchargeView-jteWYvQz.js → SurchargeView-CKJ2LS9l.js} +6 -6
  33. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-CyoUVoDH.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-DVhI5Qy6.js} +2 -2
  34. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-DAkKiy0Z.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-DjjLI4tM.js} +1 -1
  35. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-Dte8E0MX.js +3354 -0
  36. package/dist/{TransferTemplateView-DMQ1WIij.js → TransferTemplateView-rmrQtfX8.js} +21 -22
  37. package/dist/{UnitView-p6eZ8G2C.js → UnitView-Drvo3Tew.js} +10 -11
  38. package/dist/{WarehouseView-BIShkEPs.js → WarehouseView-DIBgCCzG.js} +5 -5
  39. package/dist/{WastageTemplateView-DCbczB_0.js → WastageTemplateView-Cdvx4Ist.js} +14 -14
  40. package/dist/api/inventory.d.ts +36 -126
  41. package/dist/api/netsuite.d.ts +1 -8
  42. package/dist/{app-BAVBNKKH.js → app-BQahEYX9.js} +6700 -7673
  43. package/dist/app.d.ts +24 -228
  44. package/dist/app.js +1 -1
  45. package/dist/{closing-template-DqxA750a.js → closing-template-ByR8ktYf.js} +1 -1
  46. package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +1 -37
  47. package/dist/components/shell/inventory/binding-dialog.vue.d.ts +0 -14
  48. package/dist/components/shell/inventory/binding-ui.vue.d.ts +1 -16
  49. package/dist/{date2-CgwRU403.js → date2-BTP8kRm1.js} +1 -1
  50. package/dist/{dayjs.min-CjWVK_Fe.js → dayjs.min-1rxaqCQM.js} +16 -16
  51. package/dist/{defineDeepModel-B1j_kSRA.js → defineDeepModel-BaJIlpWC.js} +1 -1
  52. package/dist/{duplicate-template-iHtqE_uw.js → duplicate-template-XaB2svr5.js} +1 -1
  53. package/dist/{feature-DEryk-Cv.js → feature-Ce7hky70.js} +1044 -908
  54. package/dist/{format-time-from-id-C-mbWMLS.js → format-time-from-id-DwTuSEMw.js} +1 -1
  55. package/dist/{format-unit-display-C8Hzskg0.js → format-unit-display-DviFIF9R.js} +15 -16
  56. package/dist/{import-export.helper-DGg16RXI.js → import-export.helper-CyeFjIHv.js} +15 -16
  57. package/dist/{index-BLowSL6G.js → index-CC_ls9B4.js} +1412 -1471
  58. package/dist/{index-CLr4DPan.js → index-CeTIFqwk.js} +3 -3
  59. package/dist/{index-BAkoTUB0.js → index-f1rjUE_a.js} +1 -1
  60. package/dist/{lodash-D1_0uR01.js → lodash-Be4onxQF.js} +1 -1
  61. package/dist/{netsuite-Bbxz8tiD.js → netsuite-CB9u725A.js} +374 -372
  62. package/dist/{purchase-order-template-B-sXEbRE.js → purchase-order-template-DoBDYEtP.js} +1 -1
  63. package/dist/router/name.d.ts +0 -1
  64. package/dist/rules-DZnC9R5E.js +327 -0
  65. package/dist/stock-DcXdnfU0.js +75 -0
  66. package/dist/{stock-BYPFH5a_.js → stock-DjHGX36M.js} +1 -1
  67. package/dist/stores/feature.d.ts +0 -2
  68. package/dist/stores/integration/netsuite.d.ts +1 -8
  69. package/dist/stores/inventory.d.ts +30 -119
  70. package/dist/style.css +1 -1
  71. package/dist/{supplier-wQYh275s.js → supplier-BtZvsnMx.js} +2 -2
  72. package/dist/{surcharge-Bi21qFa0.js → surcharge-CDGjoxGm.js} +1 -1
  73. package/dist/tsconfig.app.tsbuildinfo +1 -1
  74. package/dist/{use-ingredient-select-dialog-DH-mXl8H.js → use-ingredient-select-dialog-l54ucmfp.js} +2 -2
  75. package/dist/{use-inventory-binding-dialog-i8E2CNuV.js → use-inventory-binding-dialog-adxsJaIL.js} +2 -2
  76. package/dist/{use-template-enabled-locations-2-DRk9TskI.js → use-template-enabled-locations-2-CgWtnf8k.js} +2 -2
  77. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +8 -64
  78. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +24 -192
  79. package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +1 -8
  80. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +12 -96
  81. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +12 -96
  82. package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +18 -18
  83. package/dist/views/ingredients/components/convert/ConvertForm.vue.d.ts +0 -14
  84. package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +4 -32
  85. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +0 -28
  86. package/dist/views/ingredients/composables/use-ingredient-table.d.ts +1 -8
  87. package/dist/views/integration/components/netsuite/InventoryTransferIngredientTable.vue.d.ts +2 -16
  88. package/dist/views/receive-request/components/transfer-details/RejectDraftForm.vue.d.ts +19 -0
  89. package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +5 -1
  90. package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +6 -33
  91. package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +2 -16
  92. package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +4 -32
  93. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +1 -8
  94. package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +7 -41
  95. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +42 -246
  96. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +49 -287
  97. package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +0 -16
  98. package/dist/views/stock/components/StockRecordCard.vue.d.ts +0 -1
  99. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -16
  100. package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +2 -16
  101. package/dist/views/transfer-template/components/transfer-template-form/components/NetSuiteCustomCodeSelection.vue.d.ts +2 -16
  102. package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItemTable.vue.d.ts +2 -16
  103. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +1 -8
  104. package/dist/views/transfer-template/composables/use-netsuite-custom-field.d.ts +3 -24
  105. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +12 -96
  106. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +12 -96
  107. package/dist/vue-i18n-CgWPe8oO.js +2365 -0
  108. package/dist/{xlsx-lp5RXzSw.js → xlsx-FLEhrhiP.js} +398 -398
  109. package/dist/{xlsx.util-BxpZNkEZ.js → xlsx.util-DoAD8sxa.js} +1 -1
  110. package/package.json +2 -2
  111. package/dist/RecipeView-VZRyX3Mm.js +0 -1558
  112. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CEXA3vvS.js +0 -3241
  113. package/dist/UnitCostHistoryView-DQ3sXVAQ.js +0 -651
  114. package/dist/api/unit-cost-history.d.ts +0 -28
  115. package/dist/number-Cof88Fjz.js +0 -232
  116. package/dist/rules-CzPUVxD_.js +0 -98
  117. package/dist/stock-D9E1uFb1.js +0 -75
  118. package/dist/views/ingredients/components/inventory-binding/v2/InventoryBindingFormV2.vue.d.ts +0 -169
  119. package/dist/views/ingredients/components/inventory-binding/v2/components/InventoryBindingAlternative.vue.d.ts +0 -43
  120. package/dist/views/ingredients/components/inventory-binding/v2/components/InventoryBindingRule.vue.d.ts +0 -25
  121. package/dist/views/ingredients/components/inventory-binding/v2/components/InventoryRecipeBindingV2Field.vue.d.ts +0 -125
  122. package/dist/views/ingredients/components/inventory-binding/v2/components/InventorySkuBindingV2Field.vue.d.ts +0 -129
  123. package/dist/views/ingredients/components/inventory-binding/v2/composables/use-inventory-binding-alternative-table.d.ts +0 -30
  124. package/dist/views/ingredients/components/inventory-binding/v2/composables/use-inventory-binding-dialog.d.ts +0 -4
  125. package/dist/views/unit-cost-history/UnitCostHistoryView.vue.d.ts +0 -2
  126. package/dist/views/unit-cost-history/components/UnitCostDetailsSideSheet.vue.d.ts +0 -19
  127. package/dist/views/unit-cost-history/components/UnitCostRecalculationDialog.vue.d.ts +0 -11
  128. package/dist/views/unit-cost-history/composables/use-unit-cost-history.d.ts +0 -65
  129. package/dist/vue-i18n-Cf9iDkfk.js +0 -2365
@@ -1,21 +1,20 @@
1
- import { defineComponent as Ve, ref as Y, computed as U, onMounted as et, resolveComponent as O, openBlock as A, createElementBlock as R, Fragment as ce, createTextVNode as ue, createBlock as pe, withCtx as q, createElementVNode as n, toDisplayString as W, unref as v, createVNode as _, createCommentVNode as se, h as S, watch as He, renderList as je, reactive as Lt, isRef as _t, normalizeClass as Ie, normalizeStyle as xt, Teleport as Et, mergeProps as zt } from "vue";
1
+ import { defineComponent as Ve, ref as Y, computed as U, onMounted as et, resolveComponent as O, openBlock as D, createElementBlock as R, Fragment as ce, createTextVNode as ue, createBlock as pe, withCtx as q, createElementVNode as n, toDisplayString as W, unref as v, createVNode as k, createCommentVNode as se, h as S, watch as He, renderList as je, reactive as Lt, isRef as kt, normalizeClass as Ie, normalizeStyle as xt, Teleport as Et, mergeProps as zt } from "vue";
2
2
  import { F as bt, u as Ht, _ as Ot } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js";
3
- import { useCoreStore as Dt, useI18n as tt } from "@feedmepos/mf-common";
4
- import { useSnackbar as at, useDialog as Kt, components as ke, useProxiedModel as Yt, useBreakpoints as qt } from "@feedmepos/ui-library";
5
- import { o as Gt, u as Ge, K as Z, y as H, s as At, v as Ue, L as _e, D as Oe, c as Qt, a as wt } from "./app-BAVBNKKH.js";
3
+ import { useCoreStore as At, useI18n as tt } from "@feedmepos/mf-common";
4
+ import { useSnackbar as at, useDialog as Kt, components as _e, useProxiedModel as Yt, useBreakpoints as qt } from "@feedmepos/ui-library";
5
+ import { o as Gt, u as Ge, J as Z, w as H, s as Dt, v as Ue, K as ke, B as Oe, c as Qt, a as wt } from "./app-BQahEYX9.js";
6
6
  import { defineStore as St, storeToRefs as Wt } from "pinia";
7
- import { d as Ye, e as Ct, f as Zt, a as De } from "./date2-CgwRU403.js";
8
- import { R as Jt } from "./rules-CzPUVxD_.js";
9
- import { e as nt, a as Xe, t as Xt, c as Re, m as $t, o as Ft, k as Bt, l as Tt, p as te, F as ea } from "./number-Cof88Fjz.js";
10
- import { b as ta, d as aa } from "./xlsx.util-BxpZNkEZ.js";
11
- import { u as jt } from "./stock-D9E1uFb1.js";
12
- import { u as ot } from "./stock-BYPFH5a_.js";
7
+ import { d as Ye, e as Ct, f as Zt, a as Ae } from "./date2-BTP8kRm1.js";
8
+ import { R as Jt, f as nt, a as Xe, t as Xt, d as Re, p as $t, q as Ft, m as Bt, o as Tt, r as te, F as ea } from "./rules-DZnC9R5E.js";
9
+ import { b as ta, d as aa } from "./xlsx.util-DoAD8sxa.js";
10
+ import { u as jt } from "./stock-DcXdnfU0.js";
11
+ import { u as ot } from "./stock-DjHGX36M.js";
13
12
  import { D as ht, R as Te } from "./row-action.enum-BcW_L_nE.js";
14
13
  import { c as na } from "./component-DpCUABT3.js";
15
- import { f as oa } from "./format-time-from-id-C-mbWMLS.js";
16
- import { _ as sa } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CUIrR73y.js";
14
+ import { f as oa } from "./format-time-from-id-DwTuSEMw.js";
15
+ import { _ as sa } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-WWzwaGw-.js";
17
16
  import { E as ra } from "./empty-placeholder-wf6-BWE8.js";
18
- import { u as la } from "./vue-i18n-Cf9iDkfk.js";
17
+ import { u as la } from "./vue-i18n-CgWPe8oO.js";
19
18
  import { _ as ia, F as ze } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-Ca_eYa8-.js";
20
19
  const Qe = Gt((c, s) => {
21
20
  function e() {
@@ -23,27 +22,27 @@ const Qe = Gt((c, s) => {
23
22
  }
24
23
  return {
25
24
  async getDraft(u) {
26
- const k = e(), h = `${c.inventoryBackendUrl}/${k}/closing-draft/${u}`;
25
+ const _ = e(), h = `${c.inventoryBackendUrl}/${_}/closing-draft/${u}`;
27
26
  return s.get(h);
28
27
  },
29
28
  async readDrafts() {
30
- const u = e(), k = `${c.inventoryBackendUrl}/${u}/closing-draft`;
31
- return s.get(k);
29
+ const u = e(), _ = `${c.inventoryBackendUrl}/${u}/closing-draft`;
30
+ return s.get(_);
32
31
  },
33
32
  async runOperation(u) {
34
- const k = e(), h = `${c.inventoryBackendUrl}/${k}/closing-draft/run-operation`;
33
+ const _ = e(), h = `${c.inventoryBackendUrl}/${_}/closing-draft/run-operation`;
35
34
  return s.post(h, u);
36
35
  },
37
36
  async runOperationV1(u) {
38
- const k = e(), h = `${c.inventoryBackendUrl}/${k}/closing-draft/v1/run-operation`;
37
+ const _ = e(), h = `${c.inventoryBackendUrl}/${_}/closing-draft/v1/run-operation`;
39
38
  return s.post(h, u);
40
39
  },
41
40
  async sync(u) {
42
- const k = e(), h = `${c.inventoryBackendUrl}/${k}/closing-draft/sync`;
41
+ const _ = e(), h = `${c.inventoryBackendUrl}/${_}/closing-draft/sync`;
43
42
  return s.post(h, u);
44
43
  },
45
44
  async cloneDraft(u) {
46
- const k = e(), h = `${c.inventoryBackendUrl}/${k}/closing-draft/${u}/clone`;
45
+ const _ = e(), h = `${c.inventoryBackendUrl}/${_}/closing-draft/${u}/clone`;
47
46
  return s.post(h, {});
48
47
  }
49
48
  };
@@ -62,7 +61,7 @@ const Qe = Gt((c, s) => {
62
61
  onFinished: { type: Function }
63
62
  },
64
63
  setup(c) {
65
- const s = c, e = Y(), u = Qe(), k = at(), h = Y(!1), r = Y(null), L = Y(!1), V = U(() => {
64
+ const s = c, e = Y(), u = Qe(), _ = at(), h = Y(!1), r = Y(null), L = Y(!1), V = U(() => {
66
65
  switch (s.action) {
67
66
  case Z.enum.approveDraft:
68
67
  return "Approve";
@@ -134,13 +133,13 @@ const Qe = Gt((c, s) => {
134
133
  effectiveAt: r.value ? r.value.toISOString() : null,
135
134
  remark: e.value
136
135
  }
137
- }).delayed(500), k.open({
136
+ }).delayed(500), _.open({
138
137
  title: "Success",
139
138
  message: "Action submitted",
140
139
  type: "success"
141
140
  }), s.onFinished();
142
141
  } catch (t) {
143
- k.open({
142
+ _.open({
144
143
  title: "Something went wrong",
145
144
  message: (t == null ? void 0 : t.message) ?? "Unable to submit action. Please try again",
146
145
  type: "error"
@@ -150,8 +149,8 @@ const Qe = Gt((c, s) => {
150
149
  }
151
150
  }
152
151
  return (d, t) => {
153
- const j = O("FmLabel"), D = O("FmDatePicker"), Q = O("FmTimePicker"), y = O("FmTextField"), m = O("FmButton"), F = O("FmForm");
154
- return L.value ? (A(), pe(F, {
152
+ const j = O("FmLabel"), A = O("FmDatePicker"), Q = O("FmTimePicker"), y = O("FmTextField"), m = O("FmButton"), F = O("FmForm");
153
+ return L.value ? (D(), pe(F, {
155
154
  key: 1,
156
155
  onValidationSuccess: K,
157
156
  class: "flex flex-col gap-32",
@@ -163,31 +162,31 @@ const Qe = Gt((c, s) => {
163
162
  n("span", ua, W(V.value), 1),
164
163
  t[5] || (t[5] = ue(" this draft. Please provide a remark to justify this action. "))
165
164
  ]),
166
- d.action === v(Z).enum.approveDraft ? (A(), R("div", da, [
167
- _(j, { class: "fm-typo-en-body-lg-600" }, {
165
+ d.action === v(Z).enum.approveDraft ? (D(), R("div", da, [
166
+ k(j, { class: "fm-typo-en-body-lg-600" }, {
168
167
  default: q(() => t[6] || (t[6] = [
169
168
  ue("Closing Date")
170
169
  ])),
171
170
  _: 1
172
171
  }),
173
- _(D, {
172
+ k(A, {
174
173
  modelValue: x.value,
175
174
  "onUpdate:modelValue": t[0] || (t[0] = (z) => x.value = z),
176
175
  max: v(Ye)(/* @__PURE__ */ new Date())
177
176
  }, null, 8, ["modelValue", "max"]),
178
- _(j, { class: "fm-typo-en-body-lg-600" }, {
177
+ k(j, { class: "fm-typo-en-body-lg-600" }, {
179
178
  default: q(() => t[7] || (t[7] = [
180
179
  ue("Closing Time")
181
180
  ])),
182
181
  _: 1
183
182
  }),
184
- _(Q, {
183
+ k(Q, {
185
184
  modelValue: M.value,
186
185
  "onUpdate:modelValue": t[1] || (t[1] = (z) => M.value = z)
187
186
  }, null, 8, ["modelValue"]),
188
- G.value ? (A(), R("div", ma, " Cannot select future date ")) : se("", !0)
187
+ G.value ? (D(), R("div", ma, " Cannot select future date ")) : se("", !0)
189
188
  ])) : se("", !0),
190
- _(y, {
189
+ k(y, {
191
190
  modelValue: e.value,
192
191
  "onUpdate:modelValue": t[2] || (t[2] = (z) => e.value = z),
193
192
  label: "Remark",
@@ -195,12 +194,12 @@ const Qe = Gt((c, s) => {
195
194
  rules: [v(Jt)()]
196
195
  }, null, 8, ["modelValue", "rules"]),
197
196
  n("div", fa, [
198
- _(m, {
197
+ k(m, {
199
198
  label: "Cancel",
200
199
  variant: "tertiary",
201
200
  onClick: t[3] || (t[3] = (z) => d.onCancel())
202
201
  }),
203
- _(m, {
202
+ k(m, {
204
203
  label: V.value,
205
204
  type: "submit",
206
205
  variant: I.value,
@@ -209,22 +208,22 @@ const Qe = Gt((c, s) => {
209
208
  ])
210
209
  ]),
211
210
  _: 1
212
- }, 8, ["disabled"])) : (A(), R(ce, { key: 0 }, [
211
+ }, 8, ["disabled"])) : (D(), R(ce, { key: 0 }, [
213
212
  ue("Loading")
214
213
  ], 64));
215
214
  };
216
215
  }
217
216
  }), pa = Re(0);
218
217
  function It(c) {
219
- const s = c.measurementsAmounts.groupBy((u) => u.measurement.id), e = c.sku.unit.measurements.reduce((u, k) => {
218
+ const s = c.measurementsAmounts.groupBy((u) => u.measurement.id), e = c.sku.unit.measurements.reduce((u, _) => {
220
219
  var L, V;
221
- const h = ((V = (L = s.get(k.id)) == null ? void 0 : L[0]) == null ? void 0 : V.amount) ?? pa, r = nt(k.conversion, h);
220
+ const h = ((V = (L = s.get(_.id)) == null ? void 0 : L[0]) == null ? void 0 : V.amount) ?? pa, r = nt(_.conversion, h);
222
221
  return u + +Xe(r);
223
222
  }, +Xe(c.baseAmount));
224
223
  return Xt(e, c.baseAmount.precision);
225
224
  }
226
225
  const va = Re(0), ya = Re(100);
227
- function ga(c, s, e, u, k, h, r) {
226
+ function ga(c, s, e, u, _, h, r) {
228
227
  var ne, le, me, $, w;
229
228
  const L = It(c), V = u ?? L, I = $t(V, s), x = s.amount === 0 ? null : Ft(I, {
230
229
  ...s,
@@ -234,7 +233,7 @@ function ga(c, s, e, u, k, h, r) {
234
233
  precision: 0
235
234
  }, t = Number(
236
235
  H.toFormatString({ value: d })
237
- ), j = k ? Number(H.toFormatString({ value: k })) : 0, D = Number(H.toFormatString({ value: s })), Q = Number(H.toFormatString({ value: V })), y = Q - D, m = y * K / t, F = Q * K / t, z = D * K / t, ae = {};
236
+ ), j = _ ? Number(H.toFormatString({ value: _ })) : 0, A = Number(H.toFormatString({ value: s })), Q = Number(H.toFormatString({ value: V })), y = Q - A, m = y * K / t, F = Q * K / t, z = A * K / t, ae = {};
238
237
  return r && h && r.forEach((g) => {
239
238
  const P = { amount: 0, precision: 0 }, J = h[g];
240
239
  if (J) {
@@ -254,7 +253,7 @@ function ga(c, s, e, u, k, h, r) {
254
253
  (g, P, J) => (g[`measurementAbbrev${J}`] = `(${P.measurement.abbrev}) × ${H.toFormatString({ value: P.measurement.conversion })}`, g[`measurementAmount${J}`] = Number(H.toFormatString({ value: P.amount })), g),
255
254
  {}
256
255
  ),
257
- systemBalance: D,
256
+ systemBalance: A,
258
257
  physicalBalance: Q,
259
258
  adjustedAmount: Number(H.toFormatString({ value: I })),
260
259
  adjustedDiffPercentage: M ? Number(
@@ -278,8 +277,8 @@ function ha(c) {
278
277
  const s = Pt(c);
279
278
  return c.reduce(
280
279
  (e, u) => {
281
- var k;
282
- return Math.max(e, ((k = s == null ? void 0 : s.get(u.sku._id)) == null ? void 0 : k[0].length) ?? 0);
280
+ var _;
281
+ return Math.max(e, ((_ = s == null ? void 0 : s.get(u.sku._id)) == null ? void 0 : _[0].length) ?? 0);
283
282
  },
284
283
  0
285
284
  );
@@ -290,8 +289,8 @@ function Pt(c) {
290
289
  (s) => s.measurementsAmounts.filter((e) => !e.measurement.abbrev.toLocaleLowerCase().includes("inactive")).map((e) => e.measurement.id)
291
290
  );
292
291
  }
293
- function ka(c, s = []) {
294
- const e = At(), u = e === "MYR" ? "RM" : e;
292
+ function _a(c, s = []) {
293
+ const e = Dt(), u = e === "MYR" ? "RM" : e;
295
294
  return [
296
295
  {
297
296
  id: "code",
@@ -366,12 +365,12 @@ function ka(c, s = []) {
366
365
  ])
367
366
  ];
368
367
  }
369
- function _a(c, s, e) {
368
+ function ka(c, s, e) {
370
369
  var ae, de, ne, le, me, $, w;
371
370
  const u = s.groupBy(
372
371
  (g) => g.id,
373
372
  (g) => g.balance
374
- ), k = e.groupBy(
373
+ ), _ = e.groupBy(
375
374
  (g) => g.id,
376
375
  (g) => g.balance
377
376
  ), h = /* @__PURE__ */ new Map();
@@ -387,21 +386,21 @@ function _a(c, s, e) {
387
386
  r.has(g) && (I.push(g), r.delete(g));
388
387
  });
389
388
  const x = Array.from(r).sort(), M = [...I, ...x], G = [...c.items, ...c.negativeStockItems ?? []], K = Pt(G), d = G.map((g) => {
390
- var xe, Ae, be;
391
- const P = ((xe = u.get(g.sku._id)) == null ? void 0 : xe[0]) ?? va, J = ((Ae = K == null ? void 0 : K.get(g.sku._id)) == null ? void 0 : Ae[0]) ?? [], ee = h.get(g.sku._id), X = L.get(g.sku._id);
389
+ var xe, De, be;
390
+ const P = ((xe = u.get(g.sku._id)) == null ? void 0 : xe[0]) ?? va, J = ((De = K == null ? void 0 : K.get(g.sku._id)) == null ? void 0 : De[0]) ?? [], ee = h.get(g.sku._id), X = L.get(g.sku._id);
392
391
  return ga(
393
392
  g,
394
393
  P,
395
394
  J,
396
- (be = k.get(g.sku._id)) == null ? void 0 : be[0],
395
+ (be = _.get(g.sku._id)) == null ? void 0 : be[0],
397
396
  ee,
398
397
  X,
399
398
  M
400
399
  );
401
- }), t = ha(G), D = Dt().currentBusiness.value, Q = ka(t, M), y = [
402
- ["Business name:", D == null ? void 0 : D.name],
403
- ["Business ID:", D == null ? void 0 : D._id],
404
- ["Menu version", D == null ? void 0 : D.menuVersion],
400
+ }), t = ha(G), A = At().currentBusiness.value, Q = _a(t, M), y = [
401
+ ["Business name:", A == null ? void 0 : A.name],
402
+ ["Business ID:", A == null ? void 0 : A._id],
403
+ ["Menu version", A == null ? void 0 : A.menuVersion],
405
404
  ["Created at", new Date(c.createdAt)],
406
405
  ["Created by", (ae = c.createdBy) == null ? void 0 : ae.name],
407
406
  ["Updated at", new Date(c.updatedAt)],
@@ -422,13 +421,13 @@ function _a(c, s, e) {
422
421
  [],
423
422
  Q.map((g) => g.name),
424
423
  ...d.map((g) => Q.map((P) => g[P.id]))
425
- ], m = Q.map((g) => `system:${g.id}`), F = ta(y, m), z = `[${D == null ? void 0 : D.name}] closing draft (${Zt(new Date(c.updatedAt))}).xlsx`;
424
+ ], m = Q.map((g) => `system:${g.id}`), F = ta(y, m), z = `[${A == null ? void 0 : A.name}] closing draft (${Zt(new Date(c.updatedAt))}).xlsx`;
426
425
  return aa(F, z), z;
427
426
  }
428
- const xa = { class: "flex flex-col" }, Da = {
427
+ const xa = { class: "flex flex-col" }, Aa = {
429
428
  key: 0,
430
429
  class: "fm-typo-en-body-sm-400 text-fm-color-typo-error mt-4"
431
- }, Aa = { class: "flex gap-12 py-8 justify-end w-full" }, wa = /* @__PURE__ */ Ve({
430
+ }, Da = { class: "flex gap-12 py-8 justify-end w-full" }, wa = /* @__PURE__ */ Ve({
432
431
  __name: "RefreshBalanceAction",
433
432
  props: {
434
433
  draft: {},
@@ -438,7 +437,7 @@ const xa = { class: "flex flex-col" }, Da = {
438
437
  setup(c) {
439
438
  const s = c;
440
439
  ot();
441
- const e = Y(!1), u = Y(null), k = Y(!1);
440
+ const e = Y(!1), u = Y(null), _ = Y(!1);
442
441
  et(() => {
443
442
  if (s.draft.effectiveAt)
444
443
  u.value = new Date(s.draft.effectiveAt);
@@ -446,7 +445,7 @@ const xa = { class: "flex flex-col" }, Da = {
446
445
  const I = new Date(s.draft.createdAt);
447
446
  I.setHours(23, 59, 59, 999), u.value = I;
448
447
  }
449
- k.value = !0;
448
+ _.value = !0;
450
449
  });
451
450
  const h = U({
452
451
  get() {
@@ -476,7 +475,7 @@ const xa = { class: "flex flex-col" }, Da = {
476
475
  }
477
476
  return (I, x) => {
478
477
  const M = O("FmLabel"), G = O("FmDatePicker"), K = O("FmTimePicker"), d = O("FmButton"), t = O("FmForm");
479
- return k.value ? (A(), pe(t, {
478
+ return _.value ? (D(), pe(t, {
480
479
  key: 1,
481
480
  onValidationSuccess: V,
482
481
  class: "flex flex-col gap-32",
@@ -496,36 +495,36 @@ const xa = { class: "flex flex-col" }, Da = {
496
495
  ])
497
496
  ], -1)),
498
497
  n("div", xa, [
499
- _(M, { class: "fm-typo-en-body-lg-600" }, {
498
+ k(M, { class: "fm-typo-en-body-lg-600" }, {
500
499
  default: q(() => x[3] || (x[3] = [
501
500
  ue("Closing Date")
502
501
  ])),
503
502
  _: 1
504
503
  }),
505
- _(G, {
504
+ k(G, {
506
505
  modelValue: h.value,
507
506
  "onUpdate:modelValue": x[0] || (x[0] = (j) => h.value = j),
508
507
  max: v(Ye)(/* @__PURE__ */ new Date())
509
508
  }, null, 8, ["modelValue", "max"]),
510
- _(M, { class: "fm-typo-en-body-lg-600" }, {
509
+ k(M, { class: "fm-typo-en-body-lg-600" }, {
511
510
  default: q(() => x[4] || (x[4] = [
512
511
  ue("Closing Time")
513
512
  ])),
514
513
  _: 1
515
514
  }),
516
- _(K, {
515
+ k(K, {
517
516
  modelValue: r.value,
518
517
  "onUpdate:modelValue": x[1] || (x[1] = (j) => r.value = j)
519
518
  }, null, 8, ["modelValue"]),
520
- L.value ? (A(), R("div", Da, " Cannot select future date ")) : se("", !0)
519
+ L.value ? (D(), R("div", Aa, " Cannot select future date ")) : se("", !0)
521
520
  ]),
522
- n("div", Aa, [
523
- _(d, {
521
+ n("div", Da, [
522
+ k(d, {
524
523
  label: "Cancel",
525
524
  variant: "tertiary",
526
525
  onClick: x[2] || (x[2] = (j) => I.onCancel())
527
526
  }),
528
- _(d, {
527
+ k(d, {
529
528
  label: "Refresh balance",
530
529
  type: "submit",
531
530
  variant: "primary",
@@ -535,7 +534,7 @@ const xa = { class: "flex flex-col" }, Da = {
535
534
  ])
536
535
  ]),
537
536
  _: 1
538
- }, 8, ["disabled"])) : (A(), R(ce, { key: 0 }, [
537
+ }, 8, ["disabled"])) : (D(), R(ce, { key: 0 }, [
539
538
  ue("Loading")
540
539
  ], 64));
541
540
  };
@@ -543,7 +542,7 @@ const xa = { class: "flex flex-col" }, Da = {
543
542
  }), qe = St(
544
543
  "closingDraftActions",
545
544
  function() {
546
- const s = Kt(), e = at(), u = ot(), k = Qe(), h = jt(), r = Y(!1), L = Y();
545
+ const s = Kt(), e = at(), u = ot(), _ = Qe(), h = jt(), r = Y(!1), L = Y();
547
546
  function V(y) {
548
547
  const m = {
549
548
  draft: y
@@ -552,7 +551,7 @@ const xa = { class: "flex flex-col" }, Da = {
552
551
  }
553
552
  async function I(y) {
554
553
  var F;
555
- if (y.status === _e.enum.COMPLETED) {
554
+ if (y.status === ke.enum.COMPLETED) {
556
555
  const z = y.closingAdjustmentId;
557
556
  if (!z)
558
557
  return e.open({
@@ -575,7 +574,7 @@ const xa = { class: "flex flex-col" }, Da = {
575
574
  m || (e.open({
576
575
  title: "Exporting",
577
576
  message: "Fetching data..."
578
- }), m = await I(y)), _a(y, m, F ?? []);
577
+ }), m = await I(y)), ka(y, m, F ?? []);
579
578
  }
580
579
  function M(y, m, F) {
581
580
  s.open({
@@ -624,7 +623,7 @@ const xa = { class: "flex flex-col" }, Da = {
624
623
  });
625
624
  }
626
625
  async function d(y, m) {
627
- await k.sync({
626
+ await _.sync({
628
627
  _id: y._id,
629
628
  _rev: y._rev ?? "",
630
629
  action: Z.enum.approveDraft,
@@ -655,7 +654,7 @@ const xa = { class: "flex flex-col" }, Da = {
655
654
  }
656
655
  });
657
656
  }
658
- async function D(y) {
657
+ async function A(y) {
659
658
  await s.open({
660
659
  title: "Invalidate closing draft cache",
661
660
  message: "It will invalidate opening and stock movement cache for this draft.",
@@ -674,7 +673,7 @@ const xa = { class: "flex flex-col" }, Da = {
674
673
  e.open({
675
674
  title: "Cloning",
676
675
  message: "Creating a copy of the draft..."
677
- }), await k.cloneDraft(y._id), e.open({
676
+ }), await _.cloneDraft(y._id), e.open({
678
677
  title: "Success",
679
678
  message: "Draft cloned successfully",
680
679
  type: "success"
@@ -699,7 +698,7 @@ const xa = { class: "flex flex-col" }, Da = {
699
698
  cloneDraft: Q,
700
699
  viewClosingDraftShow: r,
701
700
  viewClosingDraftProps: L,
702
- invalidateDraftCache: D
701
+ invalidateDraftCache: A
703
702
  };
704
703
  }
705
704
  );
@@ -718,13 +717,13 @@ function Ke(c) {
718
717
  const Sa = St(
719
718
  "closingDraftTable",
720
719
  function() {
721
- const { t: s } = tt(), e = Dt(), u = qe(), k = Y(new Array()), h = Y(!1), r = Ge(), L = Qe();
720
+ const { t: s } = tt(), e = At(), u = qe(), _ = Y(new Array()), h = Y(!1), r = Ge(), L = Qe();
722
721
  async function V() {
723
- if (k.value = [], !!r._currentLocation) {
722
+ if (_.value = [], !!r._currentLocation) {
724
723
  h.value = !0;
725
724
  try {
726
725
  const [d] = await Promise.all([L.readDrafts()]).delayed(1e3);
727
- k.value = d.reverse();
726
+ _.value = d.reverse();
728
727
  } catch (d) {
729
728
  console.log("Something went wrong when fetching drafts:", d);
730
729
  } finally {
@@ -733,14 +732,14 @@ const Sa = St(
733
732
  }
734
733
  }
735
734
  async function I(d) {
736
- if (!k.value.find((t) => t._id) && r._currentLocation) {
735
+ if (!_.value.find((t) => t._id) && r._currentLocation) {
737
736
  h.value = !0;
738
737
  try {
739
738
  const [t] = await Promise.all([
740
739
  L.getDraft(d),
741
740
  new Promise((j) => setTimeout(j, 1e3))
742
741
  ]);
743
- k.value = [t];
742
+ _.value = [t];
744
743
  } catch (t) {
745
744
  console.log("Something went wrong when fetching drafts:", t);
746
745
  } finally {
@@ -749,7 +748,7 @@ const Sa = St(
749
748
  }
750
749
  }
751
750
  function x(d) {
752
- k.value = k.value.map((t) => t._id === d._id ? {
751
+ _.value = _.value.map((t) => t._id === d._id ? {
753
752
  ...d,
754
753
  _rev: t._rev
755
754
  } : t);
@@ -790,14 +789,14 @@ const Sa = St(
790
789
  cell(d) {
791
790
  const t = d.row.original;
792
791
  let j = d.getValue();
793
- return j || (j = Oe(t._id)), De(j);
792
+ return j || (j = Oe(t._id)), Ae(j);
794
793
  },
795
794
  enableSorting: !0,
796
795
  size: 200
797
796
  },
798
797
  {
799
798
  id: "updatedAt",
800
- accessorFn: (d) => De(d.updatedAt),
799
+ accessorFn: (d) => Ae(d.updatedAt),
801
800
  header: () => "Updated at",
802
801
  enableSorting: !0,
803
802
  size: 200
@@ -837,8 +836,8 @@ const Sa = St(
837
836
  enableSorting: !1,
838
837
  cell(d) {
839
838
  var m;
840
- const t = d.row.original, j = t.status, D = new Date(t.updatedAt), Q = (m = t == null ? void 0 : t.rejectionHistory) == null ? void 0 : m.computeFirst((F) => F.rejectedAt), y = Q ? new Date(Q) : null;
841
- return j === "DRAFT" && y ? y.getTime() > D.getTime() ? S(
839
+ const t = d.row.original, j = t.status, A = new Date(t.updatedAt), Q = (m = t == null ? void 0 : t.rejectionHistory) == null ? void 0 : m.computeFirst((F) => F.rejectedAt), y = Q ? new Date(Q) : null;
840
+ return j === "DRAFT" && y ? y.getTime() > A.getTime() ? S(
842
841
  "div",
843
842
  {
844
843
  class: "flex"
@@ -881,7 +880,7 @@ const Sa = St(
881
880
  id: "action",
882
881
  cell(d) {
883
882
  var m;
884
- const t = d.row.original, j = ((m = e.sessionUser.value) == null ? void 0 : m.role.isAdmin) ?? !1, D = [
883
+ const t = d.row.original, j = ((m = e.sessionUser.value) == null ? void 0 : m.role.isAdmin) ?? !1, A = [
885
884
  ht[Te.Details],
886
885
  ht[Te.Export]
887
886
  ], Q = [
@@ -900,7 +899,7 @@ const Sa = St(
900
899
  color: "text-fm-color-typo-error",
901
900
  value: Z.enum.markAsFailed
902
901
  }
903
- ], y = j && t.status !== _e.enum.DRAFT ? [
902
+ ], y = j && t.status !== ke.enum.DRAFT ? [
904
903
  {
905
904
  translationKey: "inventory.closing.draft.cloneDraft",
906
905
  color: "text-fm-color-typo-primary",
@@ -909,8 +908,8 @@ const Sa = St(
909
908
  ] : [];
910
909
  return na(
911
910
  [
912
- ...D,
913
- ...t.status === _e.enum.DRAFT ? Q : []
911
+ ...A,
912
+ ...t.status === ke.enum.DRAFT ? Q : []
914
913
  ],
915
914
  (F) => G(F, t),
916
915
  y
@@ -924,7 +923,7 @@ const Sa = St(
924
923
  }
925
924
  }
926
925
  ],
927
- drafts: k,
926
+ drafts: _,
928
927
  loading: h,
929
928
  fetchDrafts: V,
930
929
  loadDraft: I,
@@ -953,7 +952,7 @@ const Sa = St(
953
952
  },
954
953
  emits: ["update:show", "refresh", "approve"],
955
954
  setup(c, { emit: s }) {
956
- const { FmStepper: e, FmStep: u, FmDialog: k, FmButton: h } = ke, { t: r } = la(), L = wt(), V = c, I = s, x = U(
955
+ const { FmStepper: e, FmStep: u, FmDialog: _, FmButton: h } = _e, { t: r } = la(), L = wt(), V = c, I = s, x = U(
957
956
  () => {
958
957
  var $, w;
959
958
  return (($ = V.draft) == null ? void 0 : $.stockSnapshot) && ((w = V.draft) == null ? void 0 : w.stockSnapshot) !== void 0;
@@ -991,7 +990,7 @@ const Sa = St(
991
990
  }), d = U({
992
991
  get: () => V.show,
993
992
  set: ($) => I("update:show", $)
994
- }), t = Y(1), j = () => t.value > 1, D = () => t.value > 2, Q = () => !1;
993
+ }), t = Y(1), j = () => t.value > 1, A = () => t.value > 2, Q = () => !1;
995
994
  function y($) {
996
995
  return $ === 1 ? x.value : $ === 2 ? K.value.length == 0 : !1;
997
996
  }
@@ -1039,7 +1038,7 @@ const Sa = St(
1039
1038
  }
1040
1039
  return ($, w) => {
1041
1040
  const g = O("FmIcon");
1042
- return A(), pe(v(k), {
1041
+ return D(), pe(v(_), {
1043
1042
  modelValue: d.value,
1044
1043
  "onUpdate:modelValue": w[1] || (w[1] = (P) => d.value = P),
1045
1044
  "max-width": 600
@@ -1049,21 +1048,21 @@ const Sa = St(
1049
1048
  ]),
1050
1049
  default: q(() => [
1051
1050
  n("div", $a, [
1052
- _(v(e), {
1051
+ k(v(e), {
1053
1052
  modelValue: t.value,
1054
1053
  "onUpdate:modelValue": w[0] || (w[0] = (P) => t.value = P),
1055
1054
  orientation: "vertical"
1056
1055
  }, {
1057
1056
  default: q(() => [
1058
- _(v(u), {
1057
+ k(v(u), {
1059
1058
  value: 1,
1060
1059
  title: v(r)("inventory.closing.approval.step.generateReport.title"),
1061
1060
  complete: j
1062
1061
  }, {
1063
1062
  default: q(() => [
1064
1063
  n("div", Fa, W(v(r)("inventory.closing.approval.step.generateReport.description")), 1),
1065
- t.value === 1 ? (A(), R("div", Ba, [
1066
- _(v(h), {
1064
+ t.value === 1 ? (D(), R("div", Ba, [
1065
+ k(v(h), {
1067
1066
  label: v(r)("inventory.stock.stock_balance.refreshBalance"),
1068
1067
  "prepend-icon": "refresh",
1069
1068
  variant: "secondary",
@@ -1071,7 +1070,7 @@ const Sa = St(
1071
1070
  onClick: de
1072
1071
  }, null, 8, ["label", "loading"]),
1073
1072
  n("div", Ta, [
1074
- _(v(h), {
1073
+ k(v(h), {
1075
1074
  label: v(r)("inventory.common.continue"),
1076
1075
  disabled: !x.value,
1077
1076
  onClick: ne
@@ -1081,30 +1080,30 @@ const Sa = St(
1081
1080
  ]),
1082
1081
  _: 1
1083
1082
  }, 8, ["title"]),
1084
- _(v(u), {
1083
+ k(v(u), {
1085
1084
  value: 2,
1086
1085
  title: v(r)("inventory.closing.approval.step.negativeItems.title"),
1087
1086
  disabled: () => !x.value,
1088
- complete: D
1087
+ complete: A
1089
1088
  }, {
1090
1089
  default: q(() => [
1091
1090
  n("div", ja, W(G.value.length > 0 ? `${v(r)("inventory.closing.approval.step.negativeItems.resolveMessage")} [${v(r)("inventory.closing.approval.step.negativeItems.itemsHeader")} (${K.value.length})]` : v(r)("inventory.closing.approval.step.negativeItems.noItemsMessage")), 1),
1092
- t.value === 2 ? (A(), R("div", Ia, [
1093
- G.value.length > 0 ? (A(), R("div", Pa, [
1091
+ t.value === 2 ? (D(), R("div", Ia, [
1092
+ G.value.length > 0 ? (D(), R("div", Pa, [
1094
1093
  w[2] || (w[2] = n("div", { class: "fm-typo-en-body-md-600 mb-2" }, null, -1)),
1095
1094
  n("div", Ua, [
1096
- (A(!0), R(ce, null, je(G.value, (P) => (A(), R("div", {
1095
+ (D(!0), R(ce, null, je(G.value, (P) => (D(), R("div", {
1097
1096
  key: P.id,
1098
1097
  class: "flex gap-8"
1099
1098
  }, [
1100
1099
  n("div", Ra, [
1101
- M.value[P.id] ? (A(), R("span", Va, [
1102
- _(g, {
1100
+ M.value[P.id] ? (D(), R("span", Va, [
1101
+ k(g, {
1103
1102
  name: "check_circle",
1104
1103
  size: "sm"
1105
1104
  })
1106
- ])) : (A(), R("span", Ma, [
1107
- _(g, {
1105
+ ])) : (D(), R("span", Ma, [
1106
+ k(g, {
1108
1107
  name: "error",
1109
1108
  size: "sm"
1110
1109
  })
@@ -1116,12 +1115,12 @@ const Sa = St(
1116
1115
  ])
1117
1116
  ])) : se("", !0),
1118
1117
  n("div", La, [
1119
- _(v(h), {
1118
+ k(v(h), {
1120
1119
  label: v(r)("inventory.common.back"),
1121
1120
  variant: "secondary",
1122
1121
  onClick: le
1123
1122
  }, null, 8, ["label"]),
1124
- _(v(h), {
1123
+ k(v(h), {
1125
1124
  label: v(r)("inventory.common.continue"),
1126
1125
  disabled: m.value,
1127
1126
  onClick: ne
@@ -1131,7 +1130,7 @@ const Sa = St(
1131
1130
  ]),
1132
1131
  _: 1
1133
1132
  }, 8, ["title", "disabled"]),
1134
- _(v(u), {
1133
+ k(v(u), {
1135
1134
  value: 3,
1136
1135
  title: v(r)("inventory.closing.approval.step.approval.title"),
1137
1136
  disabled: () => m.value,
@@ -1139,13 +1138,13 @@ const Sa = St(
1139
1138
  }, {
1140
1139
  default: q(() => [
1141
1140
  n("div", Ea, W(v(r)("inventory.closing.approval.step.approval.warning")), 1),
1142
- t.value === 3 ? (A(), R("div", za, [
1143
- _(v(h), {
1141
+ t.value === 3 ? (D(), R("div", za, [
1142
+ k(v(h), {
1144
1143
  label: v(r)("inventory.common.back"),
1145
1144
  variant: "secondary",
1146
1145
  onClick: le
1147
1146
  }, null, 8, ["label"]),
1148
- _(v(h), {
1147
+ k(v(h), {
1149
1148
  label: v(r)("inventory.common.approve"),
1150
1149
  variant: "destructive",
1151
1150
  disabled: m.value,
@@ -1192,10 +1191,10 @@ const Sa = St(
1192
1191
  }, yn = { class: "fm-typo-en-body-lg-400" }, gn = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, bn = { class: "flex gap-12 content-stretch" }, hn = {
1193
1192
  class: "flex flex-col w-24",
1194
1193
  name: "circles"
1195
- }, kn = { class: "flex-1 flex flex-col items-center" }, _n = {
1194
+ }, _n = { class: "flex-1 flex flex-col items-center" }, kn = {
1196
1195
  class: "py-12 flex flex-col gap-4 flex-1",
1197
1196
  name: "delivery details"
1198
- }, xn = { class: "flex flex-col gap-8" }, Dn = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, An = { class: "flex flex-col gap-4" }, wn = { class: "flex items-center justify-between gap-8 w-full" }, Sn = { class: "flex items-center gap-8" }, Cn = { class: "flex flex-col items-end" }, $n = { class: "text-2xl font-semibold" }, kt = "N/A", Fn = /* @__PURE__ */ Ve({
1197
+ }, xn = { class: "flex flex-col gap-8" }, An = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Dn = { class: "flex flex-col gap-4" }, wn = { class: "flex items-center justify-between gap-8 w-full" }, Sn = { class: "flex items-center gap-8" }, Cn = { class: "flex flex-col items-end" }, $n = { class: "text-2xl font-semibold" }, _t = "N/A", Fn = /* @__PURE__ */ Ve({
1199
1198
  __name: "ClosingDraftDialog",
1200
1199
  props: {
1201
1200
  show: { type: Boolean },
@@ -1205,14 +1204,14 @@ const Sa = St(
1205
1204
  setup(c, { emit: s }) {
1206
1205
  tt();
1207
1206
  const e = c, u = U(() => {
1208
- const l = At();
1207
+ const l = Dt();
1209
1208
  return l === "MYR" ? "RM" : l;
1210
1209
  });
1211
1210
  jt();
1212
- const k = qe(), h = Yt(e, "show"), r = Y(!1), L = Y(!1), V = Y(!1), I = Y(new Array()), x = Y(new Array()), M = Y([]), G = ot(), K = Qe(), d = at(), t = wt(), j = Ge(), D = Lt({}), Q = U(() => new Set(
1211
+ const _ = qe(), h = Yt(e, "show"), r = Y(!1), L = Y(!1), V = Y(!1), I = Y(new Array()), x = Y(new Array()), M = Y([]), G = ot(), K = Qe(), d = at(), t = wt(), j = Ge(), A = Lt({}), Q = U(() => new Set(
1213
1212
  t.skus.filter((l) => {
1214
1213
  var a;
1215
- return D[(a = l.customAttributes) == null ? void 0 : a.tag];
1214
+ return A[(a = l.customAttributes) == null ? void 0 : a.tag];
1216
1215
  }).map((l) => l._id)
1217
1216
  )), y = s, m = Y({
1218
1217
  templateItem: !0,
@@ -1242,7 +1241,7 @@ const Sa = St(
1242
1241
  var a, p, o, i;
1243
1242
  if (!j._currentLocation) return;
1244
1243
  r.value = !0;
1245
- const l = ((a = e.draft) == null ? void 0 : a.status) === _e.enum.COMPLETED;
1244
+ const l = ((a = e.draft) == null ? void 0 : a.status) === ke.enum.COMPLETED;
1246
1245
  x.value = [];
1247
1246
  try {
1248
1247
  if (await t.init(), l) {
@@ -1302,7 +1301,7 @@ const Sa = St(
1302
1301
  });
1303
1302
  return;
1304
1303
  }
1305
- await k.refreshBalance(
1304
+ await _.refreshBalance(
1306
1305
  e.draft,
1307
1306
  () => {
1308
1307
  },
@@ -1350,7 +1349,7 @@ const Sa = St(
1350
1349
  });
1351
1350
  return;
1352
1351
  }
1353
- await k.invalidateDraftCache(e.draft);
1352
+ await _.invalidateDraftCache(e.draft);
1354
1353
  }
1355
1354
  const g = U(
1356
1355
  () => I.value.groupBy(
@@ -1366,7 +1365,7 @@ const Sa = St(
1366
1365
  });
1367
1366
  function X(l, a) {
1368
1367
  return S(
1369
- ke.FmTooltip,
1368
+ _e.FmTooltip,
1370
1369
  { zIndex: 51, placement: "left", class: "w-full flex justify-end" },
1371
1370
  {
1372
1371
  default() {
@@ -1413,7 +1412,7 @@ const Sa = St(
1413
1412
  )
1414
1413
  ]);
1415
1414
  return S(
1416
- ke.FmTooltip,
1415
+ _e.FmTooltip,
1417
1416
  {
1418
1417
  zIndex: 51
1419
1418
  },
@@ -1586,7 +1585,7 @@ const Sa = St(
1586
1585
  return S(
1587
1586
  "div",
1588
1587
  { class: "flex items-center gap-4 justify-end fm-typo-en-body-lg-400" },
1589
- kt
1588
+ _t
1590
1589
  );
1591
1590
  const i = te(o);
1592
1591
  if (o === 0)
@@ -1595,7 +1594,7 @@ const Sa = St(
1595
1594
  ]);
1596
1595
  const f = o > 0;
1597
1596
  return S("div", { class: "flex items-center gap-4 justify-end fm-typo-en-body-lg-400" }, [
1598
- S(ke.FmIcon, {
1597
+ S(_e.FmIcon, {
1599
1598
  name: f ? "arrow_drop_up" : "arrow_drop_down",
1600
1599
  color: f ? "system-success-300" : "system-error-300",
1601
1600
  size: "md"
@@ -1618,7 +1617,7 @@ const Sa = St(
1618
1617
  if (b) {
1619
1618
  const E = H.toFormatString({ value: b.conversion }), fe = `${te(B, { minPrecision: 2, maxPrecision: 4 })} ${o.baseUnit} ÷ ${E} × ${C} ${u.value}`;
1620
1619
  return S(
1621
- ke.FmTooltip,
1620
+ _e.FmTooltip,
1622
1621
  { zIndex: 51 },
1623
1622
  {
1624
1623
  content() {
@@ -1636,7 +1635,7 @@ const Sa = St(
1636
1635
  } else {
1637
1636
  const E = `${te(B, { minPrecision: 2, maxPrecision: 4 })} ${o.baseUnit} × ${C} ${u.value}`;
1638
1637
  return S(
1639
- ke.FmTooltip,
1638
+ _e.FmTooltip,
1640
1639
  { zIndex: 51 },
1641
1640
  {
1642
1641
  content() {
@@ -1668,7 +1667,7 @@ const Sa = St(
1668
1667
  if (b) {
1669
1668
  const E = H.toFormatString({ value: b.conversion }), fe = `${te(B, { minPrecision: 2, maxPrecision: 4 })} ${o.baseUnit} ÷ ${E} × ${C} ${u.value}`;
1670
1669
  return S(
1671
- ke.FmTooltip,
1670
+ _e.FmTooltip,
1672
1671
  { zIndex: 51 },
1673
1672
  {
1674
1673
  content() {
@@ -1686,7 +1685,7 @@ const Sa = St(
1686
1685
  } else {
1687
1686
  const E = `${te(B, { minPrecision: 2, maxPrecision: 4 })} ${o.baseUnit} × ${C} ${u.value}`;
1688
1687
  return S(
1689
- ke.FmTooltip,
1688
+ _e.FmTooltip,
1690
1689
  { zIndex: 51 },
1691
1690
  {
1692
1691
  content() {
@@ -1713,7 +1712,7 @@ const Sa = St(
1713
1712
  enableSorting: !1,
1714
1713
  cell(p) {
1715
1714
  const o = p.row.original, i = (b, B) => S(
1716
- ke.FmTooltip,
1715
+ _e.FmTooltip,
1717
1716
  { zIndex: 50 },
1718
1717
  {
1719
1718
  default() {
@@ -1759,7 +1758,7 @@ const Sa = St(
1759
1758
  }
1760
1759
  }
1761
1760
  ];
1762
- }), Ae = U(() => xe.value.map((l) => l.size ?? 0).reduce((l, a) => l + a)), be = Y(""), Pe = U(() => {
1761
+ }), De = U(() => xe.value.map((l) => l.size ?? 0).reduce((l, a) => l + a)), be = Y(""), Pe = U(() => {
1763
1762
  var p, o;
1764
1763
  const l = ((o = (p = e.draft) == null ? void 0 : p.negativeStockItems) == null ? void 0 : o.reduce(
1765
1764
  (i, f) => (i[f.sku._id] = f, i),
@@ -1841,12 +1840,12 @@ const Sa = St(
1841
1840
  var a, p, o, i, f;
1842
1841
  if (!e.draft) return [];
1843
1842
  const l = e.draft.approvedAt ? {
1844
- action: `Approve at ${De(e.draft.approvedAt)}`,
1843
+ action: `Approve at ${Ae(e.draft.approvedAt)}`,
1845
1844
  // actionAt: props.draft.approvedAt,
1846
1845
  actionBy: e.draft.approvedBy,
1847
1846
  remark: e.draft.approveRemark
1848
1847
  } : (a = e.draft.rejectionHistory) == null ? void 0 : a.computeFirst((b) => ({
1849
- action: `Reject at ${De(b.rejectedAt)}`,
1848
+ action: `Reject at ${Ae(b.rejectedAt)}`,
1850
1849
  // actionAt: e.rejectedAt,
1851
1850
  actionBy: b.rejectedBy,
1852
1851
  remark: b.rejectRemark
@@ -1854,11 +1853,11 @@ const Sa = St(
1854
1853
  return [
1855
1854
  {
1856
1855
  label: "Location",
1857
- value: ((p = j._currentLocation) == null ? void 0 : p.name) ?? kt
1856
+ value: ((p = j._currentLocation) == null ? void 0 : p.name) ?? _t
1858
1857
  },
1859
1858
  {
1860
1859
  label: "Created at",
1861
- value: De(e.draft.createdAt)
1860
+ value: Ae(e.draft.createdAt)
1862
1861
  },
1863
1862
  {
1864
1863
  label: "Created by",
@@ -1866,7 +1865,7 @@ const Sa = St(
1866
1865
  },
1867
1866
  {
1868
1867
  label: "Updated at",
1869
- value: De(e.draft.updatedAt)
1868
+ value: Ae(e.draft.updatedAt)
1870
1869
  },
1871
1870
  {
1872
1871
  label: "Updated by",
@@ -1874,7 +1873,7 @@ const Sa = St(
1874
1873
  },
1875
1874
  {
1876
1875
  label: "Effective at",
1877
- value: De(e.draft.effectiveAt ?? Oe((o = e.draft) == null ? void 0 : o._id))
1876
+ value: Ae(e.draft.effectiveAt ?? Oe((o = e.draft) == null ? void 0 : o._id))
1878
1877
  },
1879
1878
  {
1880
1879
  label: "Using template",
@@ -1931,7 +1930,7 @@ const Sa = St(
1931
1930
  })), l.sort((b, B) => new Date(B.performedAt).getTime() - new Date(b.performedAt).getTime()).map(
1932
1931
  (b) => ({
1933
1932
  header: Ue(b.action),
1934
- date: De(b.performedAt),
1933
+ date: Ae(b.performedAt),
1935
1934
  info: [
1936
1935
  {
1937
1936
  label: "Performed by",
@@ -1946,10 +1945,10 @@ const Sa = St(
1946
1945
  );
1947
1946
  }), Me = Y(!1), Ne = Y(!1), st = U(() => {
1948
1947
  var l;
1949
- return ((l = e.draft) == null ? void 0 : l.status) !== _e.enum.DRAFT ? "Status is not draft." : null;
1948
+ return ((l = e.draft) == null ? void 0 : l.status) !== ke.enum.DRAFT ? "Status is not draft." : null;
1950
1949
  });
1951
1950
  function Ut() {
1952
- e.draft && (Ne.value = !0, k.approveDraft(
1951
+ e.draft && (Ne.value = !0, _.approveDraft(
1953
1952
  e.draft,
1954
1953
  () => {
1955
1954
  Ne.value = !1, Me.value = !1, y("submitted");
@@ -1961,12 +1960,12 @@ const Sa = St(
1961
1960
  }
1962
1961
  return (l, a) => {
1963
1962
  const p = O("FmButtonGroup"), o = O("FmMenuDivider"), i = O("FmCard"), f = O("FmButton"), b = O("FmCircularProgress"), B = O("FmChip"), C = O("FmTextField"), N = O("FmIcon"), E = O("FmTable"), fe = O("FmSpacer"), ve = O("FmTooltip"), Se = O("FmSideSheet");
1964
- return A(), R(ce, null, [
1965
- _(Se, {
1963
+ return D(), R(ce, null, [
1964
+ k(Se, {
1966
1965
  "dismiss-away": "",
1967
1966
  "max-width": 9999,
1968
1967
  "model-value": v(h),
1969
- "onUpdate:modelValue": a[9] || (a[9] = (T) => _t(h) ? h.value = T : null),
1968
+ "onUpdate:modelValue": a[9] || (a[9] = (T) => kt(h) ? h.value = T : null),
1970
1969
  header: "Closing details"
1971
1970
  }, {
1972
1971
  "side-sheet-footer": q(() => {
@@ -1974,8 +1973,8 @@ const Sa = St(
1974
1973
  return [
1975
1974
  n("div", wn, [
1976
1975
  n("div", Sn, [
1977
- ((T = e.draft) == null ? void 0 : T.status) === v(_e).enum.DRAFT ? (A(), R(ce, { key: 0 }, [
1978
- st.value ? (A(), pe(ve, {
1976
+ ((T = e.draft) == null ? void 0 : T.status) === v(ke).enum.DRAFT ? (D(), R(ce, { key: 0 }, [
1977
+ st.value ? (D(), pe(ve, {
1979
1978
  key: 0,
1980
1979
  "z-index": 51,
1981
1980
  placement: "right"
@@ -1984,37 +1983,37 @@ const Sa = St(
1984
1983
  ue(W(st.value), 1)
1985
1984
  ]),
1986
1985
  default: q(() => [
1987
- _(f, {
1986
+ k(f, {
1988
1987
  disabled: "",
1989
1988
  key: "approve key",
1990
1989
  label: "Approve"
1991
1990
  })
1992
1991
  ]),
1993
1992
  _: 1
1994
- })) : (A(), pe(f, {
1993
+ })) : (D(), pe(f, {
1995
1994
  key: "approve key",
1996
1995
  label: "Approve",
1997
1996
  onClick: a[5] || (a[5] = (Be) => Me.value = !0)
1998
1997
  }))
1999
1998
  ], 64)) : se("", !0),
2000
- ((oe = e.draft) == null ? void 0 : oe.status) === v(_e).enum.DRAFT ? (A(), pe(f, {
1999
+ ((oe = e.draft) == null ? void 0 : oe.status) === v(ke).enum.DRAFT ? (D(), pe(f, {
2001
2000
  key: 1,
2002
2001
  label: "Reject",
2003
2002
  variant: "destructive",
2004
- onClick: a[6] || (a[6] = () => e.draft && v(k).rejectDraft(e.draft, () => y("submitted")))
2003
+ onClick: a[6] || (a[6] = () => e.draft && v(_).rejectDraft(e.draft, () => y("submitted")))
2005
2004
  })) : se("", !0),
2006
- _(f, {
2005
+ k(f, {
2007
2006
  label: "Close",
2008
2007
  variant: "tertiary",
2009
2008
  onClick: a[7] || (a[7] = (Be) => h.value = !1)
2010
2009
  }),
2011
- (ie = e.draft) != null && ie.approvedAt && ((he = e.draft) == null ? void 0 : he.status) !== v(_e).enum.COMPLETED ? (A(), pe(bt, { key: 2 }, {
2010
+ (ie = e.draft) != null && ie.approvedAt && ((he = e.draft) == null ? void 0 : he.status) !== v(ke).enum.COMPLETED ? (D(), pe(bt, { key: 2 }, {
2012
2011
  default: q(() => [
2013
- _(f, {
2012
+ k(f, {
2014
2013
  label: "Sync",
2015
2014
  loading: V.value,
2016
2015
  onClick: a[8] || (a[8] = () => {
2017
- e.draft && (V.value = !0, v(k).syncDraft(e.draft, () => {
2016
+ e.draft && (V.value = !0, v(_).syncDraft(e.draft, () => {
2018
2017
  V.value = !1, y("submitted");
2019
2018
  }));
2020
2019
  })
@@ -2033,14 +2032,14 @@ const Sa = St(
2033
2032
  default: q(() => [
2034
2033
  n("div", Oa, [
2035
2034
  n("div", null, [
2036
- _(p, {
2035
+ k(p, {
2037
2036
  items: $e,
2038
2037
  modelValue: we.value,
2039
2038
  "onUpdate:modelValue": a[0] || (a[0] = (T) => we.value = T)
2040
2039
  }, null, 8, ["modelValue"])
2041
2040
  ]),
2042
- we.value.value === "overview" ? (A(), R(ce, { key: 0 }, [
2043
- _(i, {
2041
+ we.value.value === "overview" ? (D(), R(ce, { key: 0 }, [
2042
+ k(i, {
2044
2043
  variant: "outlined",
2045
2044
  class: "flex flex-col gap-8 px-12 py-16"
2046
2045
  }, {
@@ -2055,9 +2054,9 @@ const Sa = St(
2055
2054
  }, W(v(Ue)(((oe = l.draft) == null ? void 0 : oe.status) ?? "")), 3)
2056
2055
  ])
2057
2056
  ]),
2058
- _(o),
2057
+ k(o),
2059
2058
  n("div", qa, [
2060
- (A(!0), R(ce, null, je(Ce.value, (ie, he) => (A(), R("div", {
2059
+ (D(!0), R(ce, null, je(Ce.value, (ie, he) => (D(), R("div", {
2061
2060
  class: "flex flex-col gap-4",
2062
2061
  key: he
2063
2062
  }, [
@@ -2074,8 +2073,8 @@ const Sa = St(
2074
2073
  n("div", Za, [
2075
2074
  n("div", Ja, [
2076
2075
  a[12] || (a[12] = n("div", { class: "flex-1 fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, " Closing items ", -1)),
2077
- r.value ? se("", !0) : (A(), R("div", Xa, [
2078
- l.draft && l.draft.status !== v(_e).enum.COMPLETED ? (A(), pe(f, {
2076
+ r.value ? se("", !0) : (D(), R("div", Xa, [
2077
+ l.draft && l.draft.status !== v(ke).enum.COMPLETED ? (D(), pe(f, {
2079
2078
  key: 0,
2080
2079
  label: "Refresh balance",
2081
2080
  "prepend-icon": "refresh",
@@ -2086,9 +2085,9 @@ const Sa = St(
2086
2085
  loading: L.value,
2087
2086
  onClick: $
2088
2087
  }, null, 8, ["loading"])) : se("", !0),
2089
- _(bt, null, {
2088
+ k(bt, null, {
2090
2089
  default: q(() => [
2091
- _(f, {
2090
+ k(f, {
2092
2091
  label: "Invalidate Draft Cache",
2093
2092
  "prepend-icon": "refresh",
2094
2093
  variant: "secondary",
@@ -2101,14 +2100,14 @@ const Sa = St(
2101
2100
  ]),
2102
2101
  _: 1
2103
2102
  }),
2104
- _(f, {
2103
+ k(f, {
2105
2104
  label: "Export data",
2106
2105
  "prepend-icon": "download",
2107
2106
  variant: "secondary",
2108
2107
  "text-color": "primary",
2109
2108
  "bg-color": "transparent",
2110
2109
  "border-color": "primary",
2111
- onClick: a[1] || (a[1] = (T) => l.draft ? v(k).exportDraft(
2110
+ onClick: a[1] || (a[1] = (T) => l.draft ? v(_).exportDraft(
2112
2111
  l.draft,
2113
2112
  I.value,
2114
2113
  x.value
@@ -2116,45 +2115,45 @@ const Sa = St(
2116
2115
  })
2117
2116
  ]))
2118
2117
  ]),
2119
- r.value ? (A(), R("div", en, [
2118
+ r.value ? (D(), R("div", en, [
2120
2119
  a[14] || (a[14] = n("div", { class: "h-80" }, null, -1)),
2121
2120
  n("div", tn, [
2122
2121
  n("div", null, [
2123
- _(b, { size: "md" })
2122
+ k(b, { size: "md" })
2124
2123
  ]),
2125
2124
  a[13] || (a[13] = n("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Fetching info... ", -1))
2126
2125
  ]),
2127
2126
  a[15] || (a[15] = n("div", { class: "h-80" }, null, -1))
2128
- ])) : (A(), R(ce, { key: 1 }, [
2127
+ ])) : (D(), R(ce, { key: 1 }, [
2129
2128
  n("div", an, [
2130
2129
  n("div", nn, [
2131
- _(B, {
2130
+ k(B, {
2132
2131
  label: "Template Item(s)",
2133
2132
  selected: m.value.templateItem,
2134
2133
  onClick: a[2] || (a[2] = (T) => m.value.templateItem = !m.value.templateItem)
2135
2134
  }, null, 8, ["selected"]),
2136
- _(B, {
2135
+ k(B, {
2137
2136
  label: "Non-template Item(s)",
2138
2137
  selected: m.value.nonTemplateItem,
2139
2138
  onClick: a[3] || (a[3] = (T) => m.value.nonTemplateItem = !m.value.nonTemplateItem)
2140
2139
  }, null, 8, ["selected"])
2141
2140
  ]),
2142
- _(C, {
2141
+ k(C, {
2143
2142
  modelValue: be.value,
2144
2143
  "onUpdate:modelValue": a[4] || (a[4] = (T) => be.value = T),
2145
2144
  placeholder: "Filter items"
2146
2145
  }, null, 8, ["modelValue"])
2147
2146
  ]),
2148
- v(t).skuTags.size ? (A(), R("div", on, [
2149
- (A(!0), R(ce, null, je(v(t).skuTags.keys(), (T) => (A(), pe(B, {
2147
+ v(t).skuTags.size ? (D(), R("div", on, [
2148
+ (D(!0), R(ce, null, je(v(t).skuTags.keys(), (T) => (D(), pe(B, {
2150
2149
  key: `${T}`,
2151
2150
  label: `${T}`,
2152
2151
  selectable: "",
2153
- selected: D[`${T}`],
2154
- onClick: (oe) => D[`${T}`] = !D[`${T}`]
2152
+ selected: A[`${T}`],
2153
+ onClick: (oe) => A[`${T}`] = !A[`${T}`]
2155
2154
  }, {
2156
2155
  default: q(() => [
2157
- D[`${T}`] ? (A(), pe(N, {
2156
+ A[`${T}`] ? (D(), pe(N, {
2158
2157
  key: 0,
2159
2158
  name: "check",
2160
2159
  class: "text-white",
@@ -2164,8 +2163,8 @@ const Sa = St(
2164
2163
  class: Ie([
2165
2164
  "",
2166
2165
  {
2167
- "text-white fm-typo-en-body-md-600": D[`${T}`],
2168
- "text-fm-color-typo-primary fm-typo-en-body-md-400": !D[`${T}`]
2166
+ "text-white fm-typo-en-body-md-600": A[`${T}`],
2167
+ "text-fm-color-typo-primary fm-typo-en-body-md-400": !A[`${T}`]
2169
2168
  }
2170
2169
  ])
2171
2170
  }, W(T), 3)
@@ -2175,9 +2174,9 @@ const Sa = St(
2175
2174
  ])) : se("", !0),
2176
2175
  n("div", sn, [
2177
2176
  n("div", {
2178
- style: xt({ height: "600px", minWidth: `${Ae.value}px` })
2177
+ style: xt({ height: "600px", minWidth: `${De.value}px` })
2179
2178
  }, [
2180
- _(E, {
2179
+ k(E, {
2181
2180
  "column-defs": xe.value,
2182
2181
  "row-data": Pe.value,
2183
2182
  "search-value": be.value
@@ -2187,9 +2186,9 @@ const Sa = St(
2187
2186
  ], 64))
2188
2187
  ])
2189
2188
  ], 64)) : se("", !0),
2190
- we.value.value === "history" ? (A(), R("div", rn, [
2191
- Fe.value.length ? (A(), R("div", un, [
2192
- (A(!0), R(ce, null, je(Fe.value, (T, oe) => (A(), R(ce, { key: oe }, [
2189
+ we.value.value === "history" ? (D(), R("div", rn, [
2190
+ Fe.value.length ? (D(), R("div", un, [
2191
+ (D(!0), R(ce, null, je(Fe.value, (T, oe) => (D(), R(ce, { key: oe }, [
2193
2192
  n("div", dn, [
2194
2193
  n("div", mn, [
2195
2194
  n("div", fn, [
@@ -2223,7 +2222,7 @@ const Sa = St(
2223
2222
  ]),
2224
2223
  n("div", bn, [
2225
2224
  n("div", hn, [
2226
- n("div", kn, [
2225
+ n("div", _n, [
2227
2226
  n("div", {
2228
2227
  class: Ie([
2229
2228
  {
@@ -2235,20 +2234,20 @@ const Sa = St(
2235
2234
  }, null, 2)
2236
2235
  ])
2237
2236
  ]),
2238
- n("div", _n, [
2239
- _(i, {
2237
+ n("div", kn, [
2238
+ k(i, {
2240
2239
  variant: "outlined",
2241
2240
  class: "py-12 px-16"
2242
2241
  }, {
2243
2242
  default: q(() => [
2244
2243
  n("div", xn, [
2245
- (A(!0), R(ce, null, je(T.info, (ie, he) => (A(), R("div", {
2244
+ (D(!0), R(ce, null, je(T.info, (ie, he) => (D(), R("div", {
2246
2245
  key: he,
2247
2246
  class: "flex flex-col gap-4"
2248
2247
  }, [
2249
- n("div", Dn, W(ie == null ? void 0 : ie.label), 1),
2250
- n("div", An, [
2251
- (A(!0), R(ce, null, je(ie == null ? void 0 : ie.values, (Be, Le) => (A(), R("div", {
2248
+ n("div", An, W(ie == null ? void 0 : ie.label), 1),
2249
+ n("div", Dn, [
2250
+ (D(!0), R(ce, null, je(ie == null ? void 0 : ie.values, (Be, Le) => (D(), R("div", {
2252
2251
  key: Le,
2253
2252
  class: "fm-typo-en-body-lg-600"
2254
2253
  }, W(Be), 1))), 128))
@@ -2261,8 +2260,8 @@ const Sa = St(
2261
2260
  ])
2262
2261
  ])
2263
2262
  ], 64))), 128))
2264
- ])) : (A(), R("div", ln, [
2265
- _(fe),
2263
+ ])) : (D(), R("div", ln, [
2264
+ k(fe),
2266
2265
  n("div", null, [
2267
2266
  n("img", {
2268
2267
  src: v(ra),
@@ -2271,15 +2270,15 @@ const Sa = St(
2271
2270
  ]),
2272
2271
  a[16] || (a[16] = n("div", { class: "fm-typo-en-body-lg-600" }, W("No records found"), -1)),
2273
2272
  a[17] || (a[17] = n("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary px-16" }, W("You can track approval and rejection history here"), -1)),
2274
- _(fe),
2275
- _(fe)
2273
+ k(fe),
2274
+ k(fe)
2276
2275
  ]))
2277
2276
  ])) : se("", !0)
2278
2277
  ])
2279
2278
  ]),
2280
2279
  _: 1
2281
2280
  }, 8, ["model-value"]),
2282
- v(h) && e.draft ? (A(), pe(Ha, {
2281
+ v(h) && e.draft ? (D(), pe(Ha, {
2283
2282
  key: 0,
2284
2283
  show: Me.value,
2285
2284
  "onUpdate:show": a[10] || (a[10] = (T) => Me.value = T),
@@ -2292,10 +2291,10 @@ const Sa = St(
2292
2291
  ], 64);
2293
2292
  };
2294
2293
  }
2295
- }), Bn = { class: "flex-1 flex flex-col gap-8" }, Tn = { class: "flex flex-col" }, jn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, In = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Pn = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, Un = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, no = /* @__PURE__ */ Ve({
2294
+ }), Bn = { class: "flex-1 flex flex-col gap-8" }, Tn = { class: "flex flex-col" }, jn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, In = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Pn = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, Un = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, ao = /* @__PURE__ */ Ve({
2296
2295
  __name: "ClosingDraftView",
2297
2296
  setup(c) {
2298
- const { t: s } = tt(), { viewDraft: e } = qe(), { viewClosingDraftProps: u, viewClosingDraftShow: k } = Wt(qe()), h = Ge(), r = Sa(), L = Ht(), { breakpoints: V } = qt();
2297
+ const { t: s } = tt(), { viewDraft: e } = qe(), { viewClosingDraftProps: u, viewClosingDraftShow: _ } = Wt(qe()), h = Ge(), r = Sa(), L = Ht(), { breakpoints: V } = qt();
2299
2298
  h.watchLocation(r.fetchDrafts);
2300
2299
  const I = U(() => r.loading), x = Y(""), M = U(() => V.value.xs || V.value.sm), G = U(() => M.value ? 10 : 20);
2301
2300
  function K(j) {
@@ -2320,10 +2319,10 @@ const Sa = St(
2320
2319
  isPrimary: !1
2321
2320
  }
2322
2321
  ]);
2323
- return (j, D) => {
2322
+ return (j, A) => {
2324
2323
  const Q = O("FmTable");
2325
- return A(), R(ce, null, [
2326
- _(Ot, {
2324
+ return D(), R(ce, null, [
2325
+ k(Ot, {
2327
2326
  title: v(s)("inventory.closing.draft.title"),
2328
2327
  actions: t.value,
2329
2328
  "onClick:action": K
@@ -2338,39 +2337,39 @@ const Sa = St(
2338
2337
  }
2339
2338
  ])
2340
2339
  }, [
2341
- _(sa, {
2340
+ k(sa, {
2342
2341
  "change-location": "",
2343
2342
  searchable: "",
2344
2343
  search: x.value,
2345
- "onUpdate:search": D[0] || (D[0] = (y) => x.value = y)
2344
+ "onUpdate:search": A[0] || (A[0] = (y) => x.value = y)
2346
2345
  }, null, 8, ["search"]),
2347
- _(Q, {
2346
+ k(Q, {
2348
2347
  style: xt(v(L).tableHeight),
2349
2348
  "column-defs": v(r).columnDefs,
2350
2349
  "row-data": v(r).drafts,
2351
2350
  "search-value": x.value,
2352
2351
  loading: I.value,
2353
- onRowClick: D[1] || (D[1] = (y) => v(e)(y.original)),
2352
+ onRowClick: A[1] || (A[1] = (y) => v(e)(y.original)),
2354
2353
  "page-size": G.value
2355
2354
  }, {
2356
2355
  "list-row": q((y) => [
2357
- _(ia, {
2356
+ k(ia, {
2358
2357
  row: y,
2359
2358
  onRowClick: (m) => v(e)(m)
2360
2359
  }, {
2361
2360
  default: q((m) => {
2362
- var F, z, ae, de, ne, le, me, $, w, g, P, J, ee, X, xe, Ae, be, Pe, Ce, $e;
2361
+ var F, z, ae, de, ne, le, me, $, w, g, P, J, ee, X, xe, De, be, Pe, Ce, $e;
2363
2362
  return [
2364
2363
  n("div", Bn, [
2365
2364
  n("div", Tn, [
2366
2365
  n("div", jn, [
2367
- _(v(ze), {
2366
+ k(v(ze), {
2368
2367
  render: (ae = (z = (F = m._id) == null ? void 0 : F.column) == null ? void 0 : z.columnDef) == null ? void 0 : ae.cell,
2369
2368
  props: (ne = (de = m._id) == null ? void 0 : de.getContext) == null ? void 0 : ne.call(de)
2370
2369
  }, null, 8, ["render", "props"])
2371
2370
  ]),
2372
2371
  n("div", In, [
2373
- _(v(ze), {
2372
+ k(v(ze), {
2374
2373
  render: ($ = (me = (le = m.name) == null ? void 0 : le.column) == null ? void 0 : me.columnDef) == null ? void 0 : $.cell,
2375
2374
  props: (g = (w = m.name) == null ? void 0 : w.getContext) == null ? void 0 : g.call(w)
2376
2375
  }, null, 8, ["render", "props"])
@@ -2380,15 +2379,15 @@ const Sa = St(
2380
2379
  ...y.original.items.length >= 3 ? [`and ${y.original.items.length - 3} more items`] : []
2381
2380
  ].join(", ")), 1),
2382
2381
  n("div", Un, [
2383
- _(v(ze), {
2382
+ k(v(ze), {
2384
2383
  render: (ee = (J = (P = m.ref) == null ? void 0 : P.column) == null ? void 0 : J.columnDef) == null ? void 0 : ee.cell,
2385
2384
  props: (xe = (X = m.ref) == null ? void 0 : X.getContext) == null ? void 0 : xe.call(X)
2386
2385
  }, null, 8, ["render", "props"])
2387
2386
  ])
2388
2387
  ]),
2389
2388
  n("div", null, [
2390
- _(v(ze), {
2391
- render: (Pe = (be = (Ae = m.status) == null ? void 0 : Ae.column) == null ? void 0 : be.columnDef) == null ? void 0 : Pe.cell,
2389
+ k(v(ze), {
2390
+ render: (Pe = (be = (De = m.status) == null ? void 0 : De.column) == null ? void 0 : be.columnDef) == null ? void 0 : Pe.cell,
2392
2391
  props: ($e = (Ce = m.status) == null ? void 0 : Ce.getContext) == null ? void 0 : $e.call(Ce)
2393
2392
  }, null, 8, ["render", "props"])
2394
2393
  ])
@@ -2404,12 +2403,12 @@ const Sa = St(
2404
2403
  ]),
2405
2404
  _: 1
2406
2405
  }, 8, ["title", "actions"]),
2407
- (A(), pe(Et, { to: "body" }, [
2408
- _(Fn, zt(v(u), {
2409
- show: v(k),
2410
- "onUpdate:show": D[2] || (D[2] = (y) => _t(k) ? k.value = y : null),
2411
- onSubmitted: D[3] || (D[3] = () => (k.value = !1, v(r).fetchDrafts())),
2412
- onRefresh: D[4] || (D[4] = (y) => v(r).updateDraftRef(y))
2406
+ (D(), pe(Et, { to: "body" }, [
2407
+ k(Fn, zt(v(u), {
2408
+ show: v(_),
2409
+ "onUpdate:show": A[2] || (A[2] = (y) => kt(_) ? _.value = y : null),
2410
+ onSubmitted: A[3] || (A[3] = () => (_.value = !1, v(r).fetchDrafts())),
2411
+ onRefresh: A[4] || (A[4] = (y) => v(r).updateDraftRef(y))
2413
2412
  }), null, 16, ["show"])
2414
2413
  ]))
2415
2414
  ], 64);
@@ -2417,5 +2416,5 @@ const Sa = St(
2417
2416
  }
2418
2417
  });
2419
2418
  export {
2420
- no as default
2419
+ ao as default
2421
2420
  };