@feedmepos/mf-inventory-portal 1.2.61 → 1.2.63-dev.1

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