@feedmepos/mf-inventory-portal 1.2.27 → 1.2.29

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 (47) hide show
  1. package/dist/{App-CC7EGfq3.js → App-BcetoQcK.js} +1 -1
  2. package/dist/{ApprovalView-CUg1X3aW.js → ApprovalView-CyRCctkZ.js} +2 -2
  3. package/dist/{BindingsDialog-DU9Xpkve.js → BindingsDialog-DLN2RPYo.js} +2 -2
  4. package/dist/{BindingsPicker-CICpOJQB.js → BindingsPicker-CDtYeSVh.js} +1 -1
  5. package/dist/{BindingsTable-5j4XFSgC.js → BindingsTable-C19Bm8d6.js} +1 -1
  6. package/dist/{ClosingDraftView-tEiTYZ-G.js → ClosingDraftView-DBFIR6Xv.js} +171 -170
  7. package/dist/{ClosingHistoryView-DNodhyR1.js → ClosingHistoryView-BEZOwsPz.js} +115 -113
  8. package/dist/{ClosingTemplateView-0SkHiuJL.js → ClosingTemplateView-COifu0I6.js} +2 -2
  9. package/dist/{DeliveryOrderPrintPreview-CvX6ry9E.js → DeliveryOrderPrintPreview-lBFtH_Rm.js} +1 -1
  10. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DDl_BtWO.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BhhmWaOl.js} +3 -3
  11. package/dist/{FmMultiselectDialog-C-0KIt0z.js → FmMultiselectDialog-CBYvYJnE.js} +1 -1
  12. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-Cbbe9RIS.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CLuceimk.js} +1 -1
  13. package/dist/{ImportView-sK-HTJRQ.js → ImportView-DYNjmjys.js} +2 -2
  14. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DtPc5klg.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-BXefPowE.js} +1 -1
  15. package/dist/{IngredientGroupView-Upqw40GM.js → IngredientGroupView-CNzK_dDv.js} +2 -2
  16. package/dist/{IngredientsView-NhiZdZHS.js → IngredientsView-BnrA0ijB.js} +7 -7
  17. package/dist/{IntegrationView-7T__0Ev_.js → IntegrationView-DwcP5MgB.js} +3 -3
  18. package/dist/{InventoryBindingForm-xTT7wNhN.js → InventoryBindingForm-DeqdcXzm.js} +1 -1
  19. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-0K76QWtS.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-FuPTxo7z.js} +3 -3
  20. package/dist/{InventoryBindingSummary-DLrFHIXl.js → InventoryBindingSummary-Dp0bshzL.js} +1 -1
  21. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DpyuZj6H.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DLvWaFvA.js} +1 -1
  22. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DOezD2nd.js → PremiumBadge.vue_vue_type_script_setup_true_lang-tLW9bojI.js} +1 -1
  23. package/dist/{PublishView-uTpUuvdl.js → PublishView-CxIU1aI4.js} +1 -1
  24. package/dist/{PurchaseOrderPrintPreview-AbvNdYvS.js → PurchaseOrderPrintPreview-DWxp3cFM.js} +1 -1
  25. package/dist/{ReceiveRequestView-DjOOecjI.js → ReceiveRequestView-CF9ingct.js} +8 -8
  26. package/dist/{RecipeView-vrFJuZiC.js → RecipeView-B87vakmu.js} +3 -3
  27. package/dist/{StockView-CkkJ1xf5.js → StockView-XJY3690u.js} +8 -8
  28. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DBYSVdr6.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DY1iRl1F.js} +1 -1
  29. package/dist/{SupplierView-CI2TRzDN.js → SupplierView-Y2NqnJ6-.js} +4 -4
  30. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-D3jybzG0.js → TransferDetails.vue_vue_type_script_setup_true_lang-l0qRNa0W.js} +5 -5
  31. package/dist/{TransferTemplateView-CwyaQu5X.js → TransferTemplateView-DBlasHGY.js} +7 -7
  32. package/dist/{UnitView-C6z_17fA.js → UnitView-C8z90hHr.js} +3 -3
  33. package/dist/{WarehouseView-VYhM6Tpp.js → WarehouseView-egtnCnzo.js} +1 -1
  34. package/dist/{app-Jg8LS2E9.js → app-B5p73NM9.js} +198 -198
  35. package/dist/app.js +1 -1
  36. package/dist/{decimal-1b-kdzH1.js → decimal-CLM3HUsc.js} +1 -1
  37. package/dist/{format-unit-display-DQARsLT4.js → format-unit-display-BWoznxQp.js} +3 -3
  38. package/dist/{import-export.helper-Do4qkk3c.js → import-export.helper-DgKnsYRB.js} +1 -1
  39. package/dist/{index-usoaj_7j.js → index-CK61uHgW.js} +1 -1
  40. package/dist/{index-CKiHRjlB.js → index-tMZSFG5r.js} +1 -1
  41. package/dist/{purchase-order-template-DBi99Bo_.js → purchase-order-template-D7dkJMqf.js} +1 -1
  42. package/dist/{stock-Kd7XJmQi.js → stock-B3EEUmkF.js} +1 -1
  43. package/dist/{stock-BjxZjz5L.js → stock-DYBHa0KN.js} +2 -2
  44. package/dist/{supplier-haJ4RQlV.js → supplier-CY7Hj_a2.js} +1 -1
  45. package/dist/{use-ingredient-select-dialog-CGvfYQJq.js → use-ingredient-select-dialog-Dlv7Eowu.js} +1 -1
  46. package/dist/{use-inventory-binding-dialog-PpHMq_mx.js → use-inventory-binding-dialog-DOSfDQte.js} +1 -1
  47. package/package.json +3 -3
@@ -1,10 +1,10 @@
1
- import { defineComponent as Ee, ref as H, computed as V, onMounted as We, resolveComponent as z, openBlock as F, createElementBlock as E, Fragment as re, createTextVNode as ne, createBlock as ue, withCtx as W, createElementVNode as i, toDisplayString as ae, unref as $, createVNode as _, createCommentVNode as le, h as A, reactive as Bt, watch as Tt, isRef as ft, normalizeClass as Se, renderList as $e, normalizeStyle as pt, Teleport as jt, mergeProps as It } from "vue";
2
- import { aa as Ut, u as ze, ax as Y, am as Le, ay as vt, r as Pt, Z as qe, n as Qe, t as Mt, a0 as Be, W as Rt, Y as Vt, X as Lt, az as gt, aA as yt, $ as R, ah as bt, aB as ht, aC as he, an as Nt, ac as Ge, ab as ke, a6 as Re, D as dt, j as Pe, i as Et, f as zt, a as Ot, a9 as Ht, h as Yt, G as Kt, I as Qt, J as Gt, K as Wt, L as Me } from "./app-Jg8LS2E9.js";
1
+ import { defineComponent as Ee, ref as Y, computed as V, onMounted as We, resolveComponent as z, openBlock as w, createElementBlock as E, Fragment as le, createTextVNode as oe, createBlock as ie, withCtx as W, createElementVNode as i, toDisplayString as ae, unref as $, createVNode as _, createCommentVNode as ne, h as A, reactive as Bt, watch as Tt, isRef as ft, normalizeClass as Se, renderList as $e, normalizeStyle as pt, Teleport as jt, mergeProps as It } from "vue";
2
+ import { aa as Ut, u as ze, ax as H, am as Le, ay as vt, r as Pt, Z as qe, n as Qe, t as Mt, a0 as Be, W as Rt, Y as Vt, X as Lt, az as gt, aA as yt, $ as R, ah as bt, aB as ht, aC as he, an as Nt, ac as Ge, ab as ke, a6 as Re, D as dt, j as Pe, i as Et, f as zt, a as Ot, a9 as Ht, h as Yt, G as Kt, I as Qt, J as Gt, K as Wt, L as Me } from "./app-B5p73NM9.js";
3
3
  import { useCoreStore as qt, useI18n as kt } from "@feedmepos/mf-common";
4
4
  import { useSnackbar as Ze, useDialog as Zt, useProxiedModel as Jt, components as be, useBreakpoints as Xt } from "@feedmepos/ui-library";
5
5
  import { defineStore as xt, storeToRefs as ea } from "pinia";
6
- import { u as Dt } from "./stock-BjxZjz5L.js";
7
- import { u as Je } from "./stock-Kd7XJmQi.js";
6
+ import { u as Dt } from "./stock-DYBHa0KN.js";
7
+ import { u as Je } from "./stock-B3EEUmkF.js";
8
8
  import { E as ta } from "./empty-placeholder-wf6-BWE8.js";
9
9
  const Oe = Ut((s, o) => {
10
10
  function e() {
@@ -47,23 +47,23 @@ const Oe = Ut((s, o) => {
47
47
  onFinished: { type: Function }
48
48
  },
49
49
  setup(s) {
50
- const o = s, e = H(), m = Oe(), x = Ze(), h = H(!1), g = H(null), P = H(!1), L = V(() => {
50
+ const o = s, e = Y(), m = Oe(), x = Ze(), h = Y(!1), g = Y(null), P = Y(!1), L = V(() => {
51
51
  switch (o.action) {
52
- case Y.enum.approveDraft:
53
- return "Approve";
54
- case Y.enum.rejectDraft:
52
+ case H.enum.approveDraft:
53
+ return "Online Approve (Beta)";
54
+ case H.enum.rejectDraft:
55
55
  return "Reject";
56
- case Y.enum.markAsFailed:
56
+ case H.enum.markAsFailed:
57
57
  return "Mark as Failed";
58
58
  }
59
59
  throw new Error(`Unknown action: ${o.action}`);
60
60
  }), M = V(() => {
61
61
  switch (o.action) {
62
- case Y.enum.approveDraft:
62
+ case H.enum.approveDraft:
63
63
  return "primary";
64
- case Y.enum.rejectDraft:
64
+ case H.enum.rejectDraft:
65
65
  return "destructive";
66
- case Y.enum.markAsFailed:
66
+ case H.enum.markAsFailed:
67
67
  return "destructive";
68
68
  }
69
69
  throw new Error(`Unknown action: ${o.action}`);
@@ -103,7 +103,7 @@ const Oe = Ut((s, o) => {
103
103
  async function v(c) {
104
104
  h.value = !0;
105
105
  try {
106
- c ? await m.runOperation({
106
+ c ? await m.runOperationV1({
107
107
  _id: o.draft._id,
108
108
  _rev: o.draft._rev ?? "",
109
109
  action: o.action,
@@ -111,7 +111,7 @@ const Oe = Ut((s, o) => {
111
111
  effectiveAt: g.value ? g.value.toISOString() : null,
112
112
  remark: e.value
113
113
  }
114
- }).delayed(500) : await m.runOperationV1({
114
+ }).delayed(500) : await m.runOperation({
115
115
  _id: o.draft._id,
116
116
  _rev: o.draft._rev ?? "",
117
117
  action: o.action,
@@ -136,7 +136,7 @@ const Oe = Ut((s, o) => {
136
136
  }
137
137
  return (c, u) => {
138
138
  const I = z("FmLabel"), y = z("FmDatePicker"), b = z("FmTimePicker"), C = z("FmTextField"), T = z("FmButton"), O = z("FmForm");
139
- return P.value ? (F(), ue(O, {
139
+ return P.value ? (w(), ie(O, {
140
140
  key: 1,
141
141
  onValidationSuccess: v,
142
142
  class: "flex flex-col gap-32",
@@ -144,14 +144,14 @@ const Oe = Ut((s, o) => {
144
144
  }, {
145
145
  default: W(() => [
146
146
  i("div", aa, [
147
- u[5] || (u[5] = ne(" You are about to ")),
147
+ u[5] || (u[5] = oe(" You are about to ")),
148
148
  i("span", na, ae(L.value), 1),
149
- u[6] || (u[6] = ne(" this draft. Please provide a remark to justify this action. "))
149
+ u[6] || (u[6] = oe(" this draft. Please provide a remark to justify this action. "))
150
150
  ]),
151
- c.action === $(Y).enum.approveDraft ? (F(), E("div", oa, [
151
+ c.action === $(H).enum.approveDraft ? (w(), E("div", oa, [
152
152
  _(I, { class: "fm-typo-en-body-lg-600" }, {
153
153
  default: W(() => u[7] || (u[7] = [
154
- ne("Closing Date")
154
+ oe("Closing Date")
155
155
  ])),
156
156
  _: 1
157
157
  }),
@@ -162,7 +162,7 @@ const Oe = Ut((s, o) => {
162
162
  }, null, 8, ["modelValue", "max"]),
163
163
  _(I, { class: "fm-typo-en-body-lg-600" }, {
164
164
  default: W(() => u[8] || (u[8] = [
165
- ne("Closing Time")
165
+ oe("Closing Time")
166
166
  ])),
167
167
  _: 1
168
168
  }),
@@ -170,8 +170,8 @@ const Oe = Ut((s, o) => {
170
170
  modelValue: N.value,
171
171
  "onUpdate:modelValue": u[1] || (u[1] = (K) => N.value = K)
172
172
  }, null, 8, ["modelValue"]),
173
- B.value ? (F(), E("div", sa, " Cannot select future date ")) : le("", !0)
174
- ])) : le("", !0),
173
+ B.value ? (w(), E("div", sa, " Cannot select future date ")) : ne("", !0)
174
+ ])) : ne("", !0),
175
175
  _(C, {
176
176
  modelValue: e.value,
177
177
  "onUpdate:modelValue": u[2] || (u[2] = (K) => e.value = K),
@@ -185,26 +185,27 @@ const Oe = Ut((s, o) => {
185
185
  variant: "tertiary",
186
186
  onClick: u[3] || (u[3] = (K) => c.onCancel())
187
187
  }),
188
- _(T, {
189
- label: L.value,
190
- type: "submit",
188
+ c.action === $(H).enum.approveDraft ? (w(), ie(T, {
189
+ key: 0,
190
+ label: "Approve",
191
+ type: "button",
192
+ onClick: u[4] || (u[4] = (K) => v(!0)),
191
193
  variant: M.value,
192
194
  loading: h.value,
193
195
  disabled: B.value
194
- }, null, 8, ["label", "variant", "loading", "disabled"]),
196
+ }, null, 8, ["variant", "loading", "disabled"])) : ne("", !0),
195
197
  _(T, {
196
- label: "Online Approve (Beta)",
197
- type: "button",
198
- onClick: u[4] || (u[4] = (K) => v(!0)),
198
+ label: L.value,
199
+ type: "submit",
199
200
  variant: M.value,
200
201
  loading: h.value,
201
202
  disabled: B.value
202
- }, null, 8, ["variant", "loading", "disabled"])
203
+ }, null, 8, ["label", "variant", "loading", "disabled"])
203
204
  ])
204
205
  ]),
205
206
  _: 1
206
- }, 8, ["disabled"])) : (F(), E(re, { key: 0 }, [
207
- ne("Loading")
207
+ }, 8, ["disabled"])) : (w(), E(le, { key: 0 }, [
208
+ oe("Loading")
208
209
  ], 64));
209
210
  };
210
211
  }
@@ -219,11 +220,11 @@ function At(s) {
219
220
  }
220
221
  const ia = Be(0), ca = Be(100), _t = "N/A";
221
222
  function ua(s, o, e, m, x, h) {
222
- var Q, Z, w, X, me;
223
+ var Q, Z, S, X, me;
223
224
  const g = At(s), P = m ?? g, L = gt(P, o), M = o.amount === 0 ? null : yt(L, {
224
225
  ...o,
225
226
  amount: Math.abs(o.amount)
226
- }), k = M ? qe(M, ca) : null, N = ((Q = s.sku.defaultCost) == null ? void 0 : Q.costPerUnit) ?? { amount: 0, precision: 0 }, B = Number(R.toFormatString({ value: N })), v = ((w = (Z = s.sku.defaultCost) == null ? void 0 : Z.measurement) == null ? void 0 : w.conversion) ?? {
227
+ }), k = M ? qe(M, ca) : null, N = ((Q = s.sku.defaultCost) == null ? void 0 : Q.costPerUnit) ?? { amount: 0, precision: 0 }, B = Number(R.toFormatString({ value: N })), v = ((S = (Z = s.sku.defaultCost) == null ? void 0 : Z.measurement) == null ? void 0 : S.conversion) ?? {
227
228
  amount: 1,
228
229
  precision: 0
229
230
  }, c = Number(
@@ -238,7 +239,7 @@ function ua(s, o, e, m, x, h) {
238
239
  ...s.measurementsAmounts.filter(
239
240
  (ee) => ma(ee.measurement) && e.includes(ee.measurement.id)
240
241
  ).reduce(
241
- (ee, oe, de) => (ee[`measurementAbbrev${de}`] = `(${oe.measurement.abbrev}) × ${R.toFormatString({ value: oe.measurement.conversion })}`, ee[`measurementAmount${de}`] = Number(R.toFormatString({ value: oe.amount })), ee),
242
+ (ee, se, de) => (ee[`measurementAbbrev${de}`] = `(${se.measurement.abbrev}) × ${R.toFormatString({ value: se.measurement.conversion })}`, ee[`measurementAmount${de}`] = Number(R.toFormatString({ value: se.amount })), ee),
242
243
  {}
243
244
  ),
244
245
  systemBalance: I,
@@ -359,31 +360,31 @@ function fa(s) {
359
360
  function pa(s, o, e) {
360
361
  var b, C, T, O, K, Q, Z;
361
362
  const m = o.groupBy(
362
- (w) => w.id,
363
- (w) => w.balance
363
+ (S) => S.id,
364
+ (S) => S.balance
364
365
  ), x = e.groupBy(
365
- (w) => w.id,
366
- (w) => w.balance
366
+ (S) => S.id,
367
+ (S) => S.balance
367
368
  ), h = /* @__PURE__ */ new Map();
368
369
  if (s.opening)
369
- for (const w of s.opening)
370
- h.set(w.skuId, w.balance);
370
+ for (const S of s.opening)
371
+ h.set(S.skuId, S.balance);
371
372
  const g = /* @__PURE__ */ new Map();
372
373
  if (s.adjustmentSnapshot)
373
- for (const w of s.adjustmentSnapshot) {
374
- const X = Object.keys(w.adjustmentsByType).join(", ");
375
- g.set(w.skuId, X || _t);
374
+ for (const S of s.adjustmentSnapshot) {
375
+ const X = Object.keys(S.adjustmentsByType).join(", ");
376
+ g.set(S.skuId, X || _t);
376
377
  }
377
- const P = [...s.items, ...s.negativeStockItems ?? []], L = wt(P), M = P.map((w) => {
378
+ const P = [...s.items, ...s.negativeStockItems ?? []], L = wt(P), M = P.map((S) => {
378
379
  var de, xe, De;
379
- const X = ((de = m.get(w.sku._id)) == null ? void 0 : de[0]) ?? ia, me = ((xe = L == null ? void 0 : L.get(w.sku._id)) == null ? void 0 : xe[0]) ?? [], ee = h.get(w.sku._id), oe = g.get(w.sku._id);
380
+ const X = ((de = m.get(S.sku._id)) == null ? void 0 : de[0]) ?? ia, me = ((xe = L == null ? void 0 : L.get(S.sku._id)) == null ? void 0 : xe[0]) ?? [], ee = h.get(S.sku._id), se = g.get(S.sku._id);
380
381
  return ua(
381
- w,
382
+ S,
382
383
  X,
383
384
  me,
384
- (De = x.get(w.sku._id)) == null ? void 0 : De[0],
385
+ (De = x.get(S.sku._id)) == null ? void 0 : De[0],
385
386
  ee,
386
- oe
387
+ se
387
388
  );
388
389
  }), k = da(P), B = qt().currentBusiness.value, v = fa(k), c = [
389
390
  ["Business name:", B == null ? void 0 : B.name],
@@ -407,9 +408,9 @@ function pa(s, o, e) {
407
408
  s.approvedAt ? s.approveRemark : s.rejectionHistory ? new Date((Z = s.rejectionHistory[0]) == null ? void 0 : Z.rejectRemark) : ""
408
409
  ],
409
410
  [],
410
- v.map((w) => w.name),
411
- ...M.map((w) => v.map((X) => w[X.id]))
412
- ], u = v.map((w) => `system:${w.id}`), I = Rt(c, u), y = `[${B == null ? void 0 : B.name}] closing draft (${Vt(new Date(s.updatedAt))}).xlsx`;
411
+ v.map((S) => S.name),
412
+ ...M.map((S) => v.map((X) => S[X.id]))
413
+ ], u = v.map((S) => `system:${S.id}`), I = Rt(c, u), y = `[${B == null ? void 0 : B.name}] closing draft (${Vt(new Date(s.updatedAt))}).xlsx`;
413
414
  return Lt(I, y), y;
414
415
  }
415
416
  const va = { class: "flex flex-col" }, ga = {
@@ -425,7 +426,7 @@ const va = { class: "flex flex-col" }, ga = {
425
426
  setup(s) {
426
427
  const o = s;
427
428
  Je();
428
- const e = H(!1), m = H(null), x = H(!1);
429
+ const e = Y(!1), m = Y(null), x = Y(!1);
429
430
  We(() => {
430
431
  if (o.draft.effectiveAt)
431
432
  m.value = new Date(o.draft.effectiveAt);
@@ -463,7 +464,7 @@ const va = { class: "flex flex-col" }, ga = {
463
464
  }
464
465
  return (M, k) => {
465
466
  const N = z("FmLabel"), B = z("FmDatePicker"), v = z("FmTimePicker"), c = z("FmButton"), u = z("FmForm");
466
- return x.value ? (F(), ue(u, {
467
+ return x.value ? (w(), ie(u, {
467
468
  key: 1,
468
469
  onValidationSuccess: L,
469
470
  class: "flex flex-col gap-32",
@@ -472,20 +473,20 @@ const va = { class: "flex flex-col" }, ga = {
472
473
  default: W(() => [
473
474
  k[5] || (k[5] = i("div", { class: "fm-typo-en-body-lg-400" }, [
474
475
  i("p", null, [
475
- ne(" Performing "),
476
+ oe(" Performing "),
476
477
  i("span", { class: "fm-typo-en-body-lg-600" }, '"Refresh Balance"'),
477
- ne(" until closing effective date and time. ")
478
+ oe(" until closing effective date and time. ")
478
479
  ]),
479
480
  i("p", { class: "mt-2" }, [
480
- ne(" Please note that this action will "),
481
+ oe(" Please note that this action will "),
481
482
  i("b", null, "update"),
482
- ne(" the effective date and time. ")
483
+ oe(" the effective date and time. ")
483
484
  ])
484
485
  ], -1)),
485
486
  i("div", va, [
486
487
  _(N, { class: "fm-typo-en-body-lg-600" }, {
487
488
  default: W(() => k[3] || (k[3] = [
488
- ne("Closing Date")
489
+ oe("Closing Date")
489
490
  ])),
490
491
  _: 1
491
492
  }),
@@ -496,7 +497,7 @@ const va = { class: "flex flex-col" }, ga = {
496
497
  }, null, 8, ["modelValue", "max"]),
497
498
  _(N, { class: "fm-typo-en-body-lg-600" }, {
498
499
  default: W(() => k[4] || (k[4] = [
499
- ne("Closing Time")
500
+ oe("Closing Time")
500
501
  ])),
501
502
  _: 1
502
503
  }),
@@ -504,7 +505,7 @@ const va = { class: "flex flex-col" }, ga = {
504
505
  modelValue: g.value,
505
506
  "onUpdate:modelValue": k[1] || (k[1] = (I) => g.value = I)
506
507
  }, null, 8, ["modelValue"]),
507
- P.value ? (F(), E("div", ga, " Cannot select future date ")) : le("", !0)
508
+ P.value ? (w(), E("div", ga, " Cannot select future date ")) : ne("", !0)
508
509
  ]),
509
510
  i("div", ya, [
510
511
  _(c, {
@@ -522,15 +523,15 @@ const va = { class: "flex flex-col" }, ga = {
522
523
  ])
523
524
  ]),
524
525
  _: 1
525
- }, 8, ["disabled"])) : (F(), E(re, { key: 0 }, [
526
- ne("Loading")
526
+ }, 8, ["disabled"])) : (w(), E(le, { key: 0 }, [
527
+ oe("Loading")
527
528
  ], 64));
528
529
  };
529
530
  }
530
531
  }), Ne = xt(
531
532
  "closingDraftActions",
532
533
  function() {
533
- const o = Zt(), e = Ze(), m = Je(), x = Oe(), h = Dt(), g = H(!1), P = H();
534
+ const o = Zt(), e = Ze(), m = Je(), x = Oe(), h = Dt(), g = Y(!1), P = Y();
534
535
  function L(y) {
535
536
  const b = {
536
537
  draft: y
@@ -570,7 +571,7 @@ const va = { class: "flex flex-col" }, ga = {
570
571
  contentComponent: Ke,
571
572
  contentComponentProps: {
572
573
  draft: y,
573
- action: Y.enum.approveDraft,
574
+ action: H.enum.approveDraft,
574
575
  onFinished: () => {
575
576
  o.close(), b == null || b();
576
577
  },
@@ -584,7 +585,7 @@ const va = { class: "flex flex-col" }, ga = {
584
585
  contentComponent: Ke,
585
586
  contentComponentProps: {
586
587
  draft: y,
587
- action: Y.enum.rejectDraft,
588
+ action: H.enum.rejectDraft,
588
589
  onFinished: () => {
589
590
  o.close(), b == null || b();
590
591
  },
@@ -598,7 +599,7 @@ const va = { class: "flex flex-col" }, ga = {
598
599
  contentComponent: Ke,
599
600
  contentComponentProps: {
600
601
  draft: y,
601
- action: Y.enum.markAsFailed,
602
+ action: H.enum.markAsFailed,
602
603
  onFinished: () => {
603
604
  o.close(), b == null || b();
604
605
  },
@@ -610,7 +611,7 @@ const va = { class: "flex flex-col" }, ga = {
610
611
  await x.sync({
611
612
  _id: y._id,
612
613
  _rev: y._rev ?? "",
613
- action: Y.enum.approveDraft,
614
+ action: H.enum.approveDraft,
614
615
  data: {
615
616
  remark: y.remark ?? ""
616
617
  }
@@ -667,7 +668,7 @@ function Ve(s) {
667
668
  const ha = xt(
668
669
  "closingDraftTable",
669
670
  function() {
670
- const { t: o } = kt(), e = Ne(), m = H(new Array()), x = H(!1), h = ze(), g = Oe();
671
+ const { t: o } = kt(), e = Ne(), m = Y(new Array()), x = Y(!1), h = ze(), g = Oe();
671
672
  async function P() {
672
673
  if (m.value = [], !!h._currentLocation) {
673
674
  x.value = !0;
@@ -712,11 +713,11 @@ const ha = xt(
712
713
  return e.viewDraft(c);
713
714
  case Pe.Export:
714
715
  return e.exportDraft(c);
715
- case Y.enum.approveDraft:
716
+ case H.enum.approveDraft:
716
717
  return e.approveDraft(c, k);
717
- case Y.enum.rejectDraft:
718
+ case H.enum.rejectDraft:
718
719
  return e.rejectDraft(c, k);
719
- case Y.enum.markAsFailed:
720
+ case H.enum.markAsFailed:
720
721
  return e.markAsFailed(c, k);
721
722
  }
722
723
  }
@@ -834,17 +835,17 @@ const ha = xt(
834
835
  {
835
836
  translationKey: "inventory.closing.draft.approveDraft",
836
837
  color: "text-fm-color-typo-primary",
837
- value: Y.enum.approveDraft
838
+ value: H.enum.approveDraft
838
839
  },
839
840
  {
840
841
  translationKey: "inventory.closing.draft.rejectDraft",
841
842
  color: "text-fm-color-typo-error",
842
- value: Y.enum.rejectDraft
843
+ value: H.enum.rejectDraft
843
844
  },
844
845
  {
845
846
  translationKey: "inventory.closing.draft.markAsFailed",
846
847
  color: "text-fm-color-typo-error",
847
- value: Y.enum.markAsFailed
848
+ value: H.enum.markAsFailed
848
849
  }
849
850
  ];
850
851
  return Et(
@@ -911,12 +912,12 @@ const ha = xt(
911
912
  const e = s, m = V(() => {
912
913
  const r = ht();
913
914
  return r === "MYR" ? "RM" : r;
914
- }), x = Dt(), h = Ne(), g = Jt(e, "show"), P = H(!1), L = H(!1), M = H(!1), k = H(new Array()), N = H(new Array()), B = H([]), v = Je(), c = Oe(), u = Ze(), I = Ot(), y = ze(), b = Bt({}), C = V(() => new Set(
915
+ }), x = Dt(), h = Ne(), g = Jt(e, "show"), P = Y(!1), L = Y(!1), M = Y(!1), k = Y(new Array()), N = Y(new Array()), B = Y([]), v = Je(), c = Oe(), u = Ze(), I = Ot(), y = ze(), b = Bt({}), C = V(() => new Set(
915
916
  I.skus.filter((r) => {
916
917
  var t;
917
918
  return b[(t = r.customAttributes) == null ? void 0 : t.tag];
918
919
  }).map((r) => r._id)
919
- )), T = o, O = H({
920
+ )), T = o, O = Y({
920
921
  templateItem: !0,
921
922
  nonTemplateItem: !0
922
923
  }), K = V(() => {
@@ -939,7 +940,7 @@ const ha = xt(
939
940
  });
940
941
  }
941
942
  );
942
- const w = Be(0), X = Be(100);
943
+ const S = Be(0), X = Be(100);
943
944
  async function me() {
944
945
  var t, d, a, n;
945
946
  if (!y._currentLocation) return;
@@ -959,18 +960,18 @@ const ha = xt(
959
960
  });
960
961
  return;
961
962
  }
962
- const U = await v.readAdjustmentById(j), se = (U == null ? void 0 : U.skus) ?? [];
963
- for (const ie of se) {
963
+ const U = await v.readAdjustmentById(j), re = (U == null ? void 0 : U.skus) ?? [];
964
+ for (const ce of re) {
964
965
  const _e = {
965
- id: ie.sku._id,
966
- balance: ie.fromBalance,
967
- costs: ie.fromCostBalances
968
- }, S = {
969
- id: ie.sku._id,
970
- balance: ie.toBalance,
971
- costs: ie.toCostBalances
966
+ id: ce.sku._id,
967
+ balance: ce.fromBalance,
968
+ costs: ce.fromCostBalances
969
+ }, F = {
970
+ id: ce.sku._id,
971
+ balance: ce.toBalance,
972
+ costs: ce.toCostBalances
972
973
  };
973
- k.value.push(_e), N.value.push(S);
974
+ k.value.push(_e), N.value.push(F);
974
975
  }
975
976
  } else
976
977
  k.value = ((a = e.draft) == null ? void 0 : a.stockSnapshot) ?? [];
@@ -1042,7 +1043,7 @@ const ha = xt(
1042
1043
  }
1043
1044
  );
1044
1045
  }
1045
- const oe = V(
1046
+ const se = V(
1046
1047
  () => k.value.groupBy(
1047
1048
  (r) => r.id,
1048
1049
  (r) => r.balance
@@ -1297,13 +1298,13 @@ const ha = xt(
1297
1298
  var j;
1298
1299
  const a = d.row.original, n = a.stockTakeValue, l = Q.value.find((U) => U._id === a.id), f = (j = l == null ? void 0 : l.defaultCost) == null ? void 0 : j.measurement, D = a.physicalBalance, p = a.costPerUnit;
1299
1300
  if (f) {
1300
- const U = R.toFormatString({ value: f.conversion }), se = `${D.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })} ${a.baseUnit} ÷ ${U} × ${p} ${m.value}`;
1301
+ const U = R.toFormatString({ value: f.conversion }), re = `${D.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })} ${a.baseUnit} ÷ ${U} × ${p} ${m.value}`;
1301
1302
  return A(
1302
1303
  be.FmTooltip,
1303
1304
  { zIndex: 51 },
1304
1305
  {
1305
1306
  content() {
1306
- return se;
1307
+ return re;
1307
1308
  },
1308
1309
  default() {
1309
1310
  return A(
@@ -1353,13 +1354,13 @@ const ha = xt(
1353
1354
  var j;
1354
1355
  const a = d.row.original, n = a.systemValue, l = Q.value.find((U) => U._id === a.id), f = (j = l == null ? void 0 : l.defaultCost) == null ? void 0 : j.measurement, D = a.systemBalance, p = a.costPerUnit;
1355
1356
  if (f) {
1356
- const U = R.toFormatString({ value: f.conversion }), se = `${D.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 4 })} ${a.baseUnit} ÷ ${U} × ${p} ${m.value}`;
1357
+ const U = R.toFormatString({ value: f.conversion }), re = `${D.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 4 })} ${a.baseUnit} ÷ ${U} × ${p} ${m.value}`;
1357
1358
  return A(
1358
1359
  be.FmTooltip,
1359
1360
  { zIndex: 51 },
1360
1361
  {
1361
1362
  content() {
1362
- return se;
1363
+ return re;
1363
1364
  },
1364
1365
  default() {
1365
1366
  return A(
@@ -1452,7 +1453,7 @@ const ha = xt(
1452
1453
  }
1453
1454
  }
1454
1455
  ];
1455
- }), Te = V(() => Ae.value.map((r) => r.size ?? 0).reduce((r, t) => r + t)), we = H(""), Fe = V(() => {
1456
+ }), Te = V(() => Ae.value.map((r) => r.size ?? 0).reduce((r, t) => r + t)), we = Y(""), Fe = V(() => {
1456
1457
  var d, a;
1457
1458
  const r = ((a = (d = e.draft) == null ? void 0 : d.negativeStockItems) == null ? void 0 : a.reduce(
1458
1459
  (n, l) => (n[l.sku._id] = l, n),
@@ -1460,17 +1461,17 @@ const ha = xt(
1460
1461
  )) ?? {};
1461
1462
  return Q.value.map((n) => {
1462
1463
  var tt, at, nt, ot, st, rt, lt, it, ct, ut, mt;
1463
- const l = (tt = de.value.get(n._id)) == null ? void 0 : tt[0], f = ((at = oe.value.get(n._id)) == null ? void 0 : at[0]) ?? w, D = ((nt = n.defaultCost) == null ? void 0 : nt.costPerUnit) ?? w, p = Number(R.toFormatString({ value: D })), j = ((st = (ot = n.defaultCost) == null ? void 0 : ot.measurement) == null ? void 0 : st.conversion) ?? {
1464
+ const l = (tt = de.value.get(n._id)) == null ? void 0 : tt[0], f = ((at = se.value.get(n._id)) == null ? void 0 : at[0]) ?? S, D = ((nt = n.defaultCost) == null ? void 0 : nt.costPerUnit) ?? S, p = Number(R.toFormatString({ value: D })), j = ((st = (ot = n.defaultCost) == null ? void 0 : ot.measurement) == null ? void 0 : st.conversion) ?? {
1464
1465
  amount: 1,
1465
1466
  precision: 0
1466
1467
  }, U = Number(
1467
1468
  R.toFormatString({ value: j })
1468
- ), se = De.value.get(n._id), ie = se ? Number(R.toFormatString({ value: se })) : 0, _e = xe.value.get(n._id), S = {};
1469
+ ), re = De.value.get(n._id), ce = re ? Number(R.toFormatString({ value: re })) : 0, _e = xe.value.get(n._id), F = {};
1469
1470
  if (B.value.forEach((q) => {
1470
- const ce = S[q] ?? { amount: 0, precision: 0 }, fe = _e == null ? void 0 : _e[q];
1471
- fe && (S[q] = Ht(ce, fe));
1471
+ const ue = F[q] ?? { amount: 0, precision: 0 }, fe = _e == null ? void 0 : _e[q];
1472
+ fe && (F[q] = Ht(ue, fe));
1472
1473
  }), !l) {
1473
- const q = Number(R.toFormatString({ value: f })), ce = q - 0, fe = ce * p / U, Ue = 0, $t = q * p / U;
1474
+ const q = Number(R.toFormatString({ value: f })), ue = q - 0, fe = ue * p / U, Ue = 0, $t = q * p / U;
1474
1475
  return {
1475
1476
  id: n._id,
1476
1477
  code: n.code,
@@ -1484,12 +1485,12 @@ const ha = xt(
1484
1485
  adjustedDiffPercentage: -100,
1485
1486
  isTemplateItem: !r[n._id],
1486
1487
  costPerUnit: p,
1487
- opening: ie,
1488
- varianceQty: ce,
1488
+ opening: ce,
1489
+ varianceQty: ue,
1489
1490
  varianceInCost: fe,
1490
1491
  stockTakeValue: Ue,
1491
1492
  systemValue: $t,
1492
- adjustmentAmounts: S
1493
+ adjustmentAmounts: F
1493
1494
  };
1494
1495
  }
1495
1496
  const G = At(l), J = (ct = (it = N.value) == null ? void 0 : it.find(
@@ -1509,9 +1510,9 @@ const ha = xt(
1509
1510
  baseUnit: n.unit.abbrev,
1510
1511
  baseUnitAmount: Number(R.toFormatString({ value: l.baseAmount })),
1511
1512
  ...l.measurementsAmounts.filter((q) => {
1512
- var ce, fe, Ue;
1513
- return (Ue = (fe = (ce = Z.value) == null ? void 0 : ce.get(n._id)) == null ? void 0 : fe[0]) == null ? void 0 : Ue.includes(q.measurement.id);
1514
- }).reduce((q, ce, fe) => (q[`measurementAbbrev${fe}`] = `(${ce.measurement.abbrev}) × ${R.toFormatString({ value: ce.measurement.conversion })}`, q[`measurementAmount${fe}`] = Number(R.toFormatString({ value: ce.amount })), q), {}),
1513
+ var ue, fe, Ue;
1514
+ return (Ue = (fe = (ue = Z.value) == null ? void 0 : ue.get(n._id)) == null ? void 0 : fe[0]) == null ? void 0 : Ue.includes(q.measurement.id);
1515
+ }).reduce((q, ue, fe) => (q[`measurementAbbrev${fe}`] = `(${ue.measurement.abbrev}) × ${R.toFormatString({ value: ue.measurement.conversion })}`, q[`measurementAmount${fe}`] = Number(R.toFormatString({ value: ue.amount })), q), {}),
1515
1516
  systemBalance: He,
1516
1517
  physicalBalance: Ye,
1517
1518
  adjustedAmount: Number(R.toFormatString({ value: pe })),
@@ -1522,12 +1523,12 @@ const ha = xt(
1522
1523
  ) : null,
1523
1524
  isTemplateItem: !r[n._id],
1524
1525
  costPerUnit: p,
1525
- opening: ie,
1526
+ opening: ce,
1526
1527
  varianceQty: et,
1527
1528
  varianceInCost: St,
1528
1529
  stockTakeValue: Ft,
1529
1530
  systemValue: Ct,
1530
- adjustmentAmounts: S
1531
+ adjustmentAmounts: F
1531
1532
  };
1532
1533
  }).filter((n) => !!(n.isTemplateItem && O.value.templateItem || !n.isTemplateItem && O.value.nonTemplateItem));
1533
1534
  }), je = V(() => {
@@ -1599,14 +1600,14 @@ const ha = xt(
1599
1600
  label: "Action history",
1600
1601
  value: "history"
1601
1602
  }
1602
- ], ge = H(ve[0]), ye = V(() => {
1603
+ ], ge = Y(ve[0]), ye = V(() => {
1603
1604
  var a, n, l;
1604
1605
  const r = ((a = e.draft) == null ? void 0 : a.activityLogs) ?? [], t = ((n = e.draft) == null ? void 0 : n.rejectionHistory) ?? [];
1605
1606
  for (const f of t)
1606
1607
  r.find(
1607
- (p) => `${p.action}_${p.performedAt}` == `${Y.enum.rejectDraft}_${f.rejectedAt}`
1608
+ (p) => `${p.action}_${p.performedAt}` == `${H.enum.rejectDraft}_${f.rejectedAt}`
1608
1609
  ) || r.push({
1609
- action: Y.enum.rejectDraft,
1610
+ action: H.enum.rejectDraft,
1610
1611
  performedAt: f.rejectedAt,
1611
1612
  performedBy: f.rejectedBy,
1612
1613
  remark: f.rejectRemark
@@ -1614,10 +1615,10 @@ const ha = xt(
1614
1615
  return (l = e.draft) != null && l.approvedAt && (r.find(
1615
1616
  (D) => {
1616
1617
  var p;
1617
- return `${D.action}_${D.performedAt}` == `${Y.enum.approveDraft}_${(p = e.draft) == null ? void 0 : p.approvedAt}`;
1618
+ return `${D.action}_${D.performedAt}` == `${H.enum.approveDraft}_${(p = e.draft) == null ? void 0 : p.approvedAt}`;
1618
1619
  }
1619
1620
  ) || r.push({
1620
- action: Y.enum.approveDraft,
1621
+ action: H.enum.approveDraft,
1621
1622
  performedAt: e.draft.approvedAt,
1622
1623
  performedBy: e.draft.approvedBy ?? { name: "Unknown", id: "unknown" },
1623
1624
  remark: e.draft.approveRemark
@@ -1648,26 +1649,26 @@ const ha = xt(
1648
1649
  ].filter((p) => p).join(" ");
1649
1650
  });
1650
1651
  return (r, t) => {
1651
- const d = z("FmButtonGroup"), a = z("FmMenuDivider"), n = z("FmCard"), l = z("FmButton"), f = z("FmCircularProgress"), D = z("FmChip"), p = z("FmTextField"), j = z("FmIcon"), U = z("FmTable"), se = z("FmSpacer"), ie = z("FmTooltip"), _e = z("FmSideSheet");
1652
- return F(), ue(_e, {
1652
+ const d = z("FmButtonGroup"), a = z("FmMenuDivider"), n = z("FmCard"), l = z("FmButton"), f = z("FmCircularProgress"), D = z("FmChip"), p = z("FmTextField"), j = z("FmIcon"), U = z("FmTable"), re = z("FmSpacer"), ce = z("FmTooltip"), _e = z("FmSideSheet");
1653
+ return w(), ie(_e, {
1653
1654
  "dismiss-away": "",
1654
1655
  "max-width": 9999,
1655
1656
  "model-value": $(g),
1656
- "onUpdate:modelValue": t[10] || (t[10] = (S) => ft(g) ? g.value = S : null),
1657
+ "onUpdate:modelValue": t[10] || (t[10] = (F) => ft(g) ? g.value = F : null),
1657
1658
  header: "Closing details"
1658
1659
  }, {
1659
1660
  "side-sheet-footer": W(() => {
1660
- var S, G, J, pe;
1661
+ var F, G, J, pe;
1661
1662
  return [
1662
1663
  i("div", en, [
1663
- ((S = e.draft) == null ? void 0 : S.status) === $(he).enum.DRAFT ? (F(), E(re, { key: 0 }, [
1664
- Xe.value ? (F(), ue(ie, {
1664
+ ((F = e.draft) == null ? void 0 : F.status) === $(he).enum.DRAFT ? (w(), E(le, { key: 0 }, [
1665
+ Xe.value ? (w(), ie(ce, {
1665
1666
  key: 0,
1666
1667
  "z-index": 51,
1667
1668
  placement: "right"
1668
1669
  }, {
1669
1670
  content: W(() => [
1670
- ne(ae(Xe.value), 1)
1671
+ oe(ae(Xe.value), 1)
1671
1672
  ]),
1672
1673
  default: W(() => [
1673
1674
  _(l, {
@@ -1678,19 +1679,19 @@ const ha = xt(
1678
1679
  })
1679
1680
  ]),
1680
1681
  _: 1
1681
- })) : (F(), ue(l, {
1682
+ })) : (w(), ie(l, {
1682
1683
  key: "approve key",
1683
1684
  label: "Approve",
1684
1685
  onClick: t[6] || (t[6] = () => e.draft && $(h).approveDraft(e.draft, () => T("submitted")))
1685
1686
  }))
1686
- ], 64)) : le("", !0),
1687
- ((G = e.draft) == null ? void 0 : G.status) === $(he).enum.DRAFT ? (F(), ue(l, {
1687
+ ], 64)) : ne("", !0),
1688
+ ((G = e.draft) == null ? void 0 : G.status) === $(he).enum.DRAFT ? (w(), ie(l, {
1688
1689
  key: 1,
1689
1690
  label: "Reject",
1690
1691
  variant: "destructive",
1691
1692
  onClick: t[7] || (t[7] = () => e.draft && $(h).rejectDraft(e.draft, () => T("submitted")))
1692
- })) : le("", !0),
1693
- (J = e.draft) != null && J.approvedAt && ((pe = e.draft) == null ? void 0 : pe.status) !== $(he).enum.COMPLETED ? (F(), ue(Yt, { key: 2 }, {
1693
+ })) : ne("", !0),
1694
+ (J = e.draft) != null && J.approvedAt && ((pe = e.draft) == null ? void 0 : pe.status) !== $(he).enum.COMPLETED ? (w(), ie(Yt, { key: 2 }, {
1694
1695
  default: W(() => [
1695
1696
  _(l, {
1696
1697
  label: "Sync",
@@ -1703,7 +1704,7 @@ const ha = xt(
1703
1704
  }, null, 8, ["loading"])
1704
1705
  ]),
1705
1706
  _: 1
1706
- })) : le("", !0),
1707
+ })) : ne("", !0),
1707
1708
  _(l, {
1708
1709
  label: "Close",
1709
1710
  variant: "tertiary",
@@ -1718,28 +1719,28 @@ const ha = xt(
1718
1719
  _(d, {
1719
1720
  items: ve,
1720
1721
  modelValue: ge.value,
1721
- "onUpdate:modelValue": t[0] || (t[0] = (S) => ge.value = S)
1722
+ "onUpdate:modelValue": t[0] || (t[0] = (F) => ge.value = F)
1722
1723
  }, null, 8, ["modelValue"])
1723
1724
  ]),
1724
- ge.value.value === "overview" ? (F(), E(re, { key: 0 }, [
1725
+ ge.value.value === "overview" ? (w(), E(le, { key: 0 }, [
1725
1726
  _(n, {
1726
1727
  variant: "outlined",
1727
1728
  class: "flex flex-col gap-8 px-12 py-16"
1728
1729
  }, {
1729
1730
  default: W(() => {
1730
- var S, G;
1731
+ var F, G;
1731
1732
  return [
1732
1733
  i("div", xa, [
1733
1734
  t[11] || (t[11] = i("div", { class: "fm-typo-en-body-lg-600" }, "Closing summary", -1)),
1734
1735
  i("div", Da, [
1735
1736
  i("div", {
1736
- class: Se(["fm-status-badge", $(Ve)(((S = r.draft) == null ? void 0 : S.status) ?? "DRAFT")])
1737
+ class: Se(["fm-status-badge", $(Ve)(((F = r.draft) == null ? void 0 : F.status) ?? "DRAFT")])
1737
1738
  }, ae($(Re)(((G = r.draft) == null ? void 0 : G.status) ?? "")), 3)
1738
1739
  ])
1739
1740
  ]),
1740
1741
  _(a),
1741
1742
  i("div", Aa, [
1742
- (F(!0), E(re, null, $e(je.value, (J, pe) => (F(), E("div", {
1743
+ (w(!0), E(le, null, $e(je.value, (J, pe) => (w(), E("div", {
1743
1744
  class: "flex flex-col gap-4",
1744
1745
  key: pe
1745
1746
  }, [
@@ -1756,8 +1757,8 @@ const ha = xt(
1756
1757
  i("div", Fa, [
1757
1758
  i("div", Ca, [
1758
1759
  t[12] || (t[12] = i("div", { class: "flex-1 fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, " Closing items ", -1)),
1759
- P.value ? le("", !0) : (F(), E("div", $a, [
1760
- r.draft && r.draft.status !== $(he).enum.COMPLETED ? (F(), ue(l, {
1760
+ P.value ? ne("", !0) : (w(), E("div", $a, [
1761
+ r.draft && r.draft.status !== $(he).enum.COMPLETED ? (w(), ie(l, {
1761
1762
  key: 0,
1762
1763
  label: "Refresh balance",
1763
1764
  "prepend-icon": "refresh",
@@ -1767,7 +1768,7 @@ const ha = xt(
1767
1768
  "border-color": "primary",
1768
1769
  loading: L.value,
1769
1770
  onClick: ee
1770
- }, null, 8, ["loading"])) : le("", !0),
1771
+ }, null, 8, ["loading"])) : ne("", !0),
1771
1772
  _(l, {
1772
1773
  label: "Export data",
1773
1774
  "prepend-icon": "download",
@@ -1775,7 +1776,7 @@ const ha = xt(
1775
1776
  "text-color": "primary",
1776
1777
  "bg-color": "transparent",
1777
1778
  "border-color": "primary",
1778
- onClick: t[1] || (t[1] = (S) => r.draft ? $(h).exportDraft(
1779
+ onClick: t[1] || (t[1] = (F) => r.draft ? $(h).exportDraft(
1779
1780
  r.draft,
1780
1781
  k.value,
1781
1782
  N.value
@@ -1783,7 +1784,7 @@ const ha = xt(
1783
1784
  })
1784
1785
  ]))
1785
1786
  ]),
1786
- P.value ? (F(), E("div", Ba, [
1787
+ P.value ? (w(), E("div", Ba, [
1787
1788
  t[14] || (t[14] = i("div", { class: "h-80" }, null, -1)),
1788
1789
  i("div", Ta, [
1789
1790
  i("div", null, [
@@ -1792,54 +1793,54 @@ const ha = xt(
1792
1793
  t[13] || (t[13] = i("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Fetching info... ", -1))
1793
1794
  ]),
1794
1795
  t[15] || (t[15] = i("div", { class: "h-80" }, null, -1))
1795
- ])) : (F(), E(re, { key: 1 }, [
1796
+ ])) : (w(), E(le, { key: 1 }, [
1796
1797
  i("div", ja, [
1797
1798
  i("div", Ia, [
1798
1799
  _(D, {
1799
1800
  label: "Template Item(s)",
1800
1801
  selected: O.value.templateItem,
1801
- onClick: t[2] || (t[2] = (S) => O.value.templateItem = !O.value.templateItem)
1802
+ onClick: t[2] || (t[2] = (F) => O.value.templateItem = !O.value.templateItem)
1802
1803
  }, null, 8, ["selected"]),
1803
1804
  _(D, {
1804
1805
  label: "Non-template Item(s)",
1805
1806
  selected: O.value.nonTemplateItem,
1806
- onClick: t[3] || (t[3] = (S) => O.value.nonTemplateItem = !O.value.nonTemplateItem)
1807
+ onClick: t[3] || (t[3] = (F) => O.value.nonTemplateItem = !O.value.nonTemplateItem)
1807
1808
  }, null, 8, ["selected"])
1808
1809
  ]),
1809
1810
  _(p, {
1810
1811
  modelValue: we.value,
1811
- "onUpdate:modelValue": t[4] || (t[4] = (S) => we.value = S),
1812
+ "onUpdate:modelValue": t[4] || (t[4] = (F) => we.value = F),
1812
1813
  placeholder: "Filter items"
1813
1814
  }, null, 8, ["modelValue"])
1814
1815
  ]),
1815
- $(I).skuTags.size ? (F(), E("div", Ua, [
1816
- (F(!0), E(re, null, $e($(I).skuTags.keys(), (S) => (F(), ue(D, {
1817
- key: `${S}`,
1818
- label: `${S}`,
1816
+ $(I).skuTags.size ? (w(), E("div", Ua, [
1817
+ (w(!0), E(le, null, $e($(I).skuTags.keys(), (F) => (w(), ie(D, {
1818
+ key: `${F}`,
1819
+ label: `${F}`,
1819
1820
  selectable: "",
1820
- selected: b[`${S}`],
1821
- onClick: (G) => b[`${S}`] = !b[`${S}`]
1821
+ selected: b[`${F}`],
1822
+ onClick: (G) => b[`${F}`] = !b[`${F}`]
1822
1823
  }, {
1823
1824
  default: W(() => [
1824
- b[`${S}`] ? (F(), ue(j, {
1825
+ b[`${F}`] ? (w(), ie(j, {
1825
1826
  key: 0,
1826
1827
  name: "check",
1827
1828
  class: "text-white",
1828
1829
  size: "sm"
1829
- })) : le("", !0),
1830
+ })) : ne("", !0),
1830
1831
  i("span", {
1831
1832
  class: Se([
1832
1833
  "",
1833
1834
  {
1834
- "text-white fm-typo-en-body-md-600": b[`${S}`],
1835
- "text-fm-color-typo-primary fm-typo-en-body-md-400": !b[`${S}`]
1835
+ "text-white fm-typo-en-body-md-600": b[`${F}`],
1836
+ "text-fm-color-typo-primary fm-typo-en-body-md-400": !b[`${F}`]
1836
1837
  }
1837
1838
  ])
1838
- }, ae(S), 3)
1839
+ }, ae(F), 3)
1839
1840
  ]),
1840
1841
  _: 2
1841
1842
  }, 1032, ["label", "selected", "onClick"]))), 128))
1842
- ])) : le("", !0),
1843
+ ])) : ne("", !0),
1843
1844
  i("div", Pa, [
1844
1845
  i("div", {
1845
1846
  style: pt({ minWidth: `${Te.value}px` })
@@ -1853,10 +1854,10 @@ const ha = xt(
1853
1854
  ])
1854
1855
  ], 64))
1855
1856
  ])
1856
- ], 64)) : le("", !0),
1857
- ge.value.value === "history" ? (F(), E("div", Ma, [
1858
- ye.value.length ? (F(), E("div", La, [
1859
- (F(!0), E(re, null, $e(ye.value, (S, G) => (F(), E(re, { key: G }, [
1857
+ ], 64)) : ne("", !0),
1858
+ ge.value.value === "history" ? (w(), E("div", Ma, [
1859
+ ye.value.length ? (w(), E("div", La, [
1860
+ (w(!0), E(le, null, $e(ye.value, (F, G) => (w(), E(le, { key: G }, [
1860
1861
  i("div", Na, [
1861
1862
  i("div", Ea, [
1862
1863
  i("div", za, [
@@ -1884,8 +1885,8 @@ const ha = xt(
1884
1885
  ])
1885
1886
  ]),
1886
1887
  i("div", Ha, [
1887
- i("div", Ya, ae(S.header), 1),
1888
- i("div", Ka, ae(S.date), 1)
1888
+ i("div", Ya, ae(F.header), 1),
1889
+ i("div", Ka, ae(F.date), 1)
1889
1890
  ])
1890
1891
  ]),
1891
1892
  i("div", Qa, [
@@ -1909,13 +1910,13 @@ const ha = xt(
1909
1910
  }, {
1910
1911
  default: W(() => [
1911
1912
  i("div", Za, [
1912
- (F(!0), E(re, null, $e(S.info, (J, pe) => (F(), E("div", {
1913
+ (w(!0), E(le, null, $e(F.info, (J, pe) => (w(), E("div", {
1913
1914
  key: pe,
1914
1915
  class: "flex flex-col gap-4"
1915
1916
  }, [
1916
1917
  i("div", Ja, ae(J == null ? void 0 : J.label), 1),
1917
1918
  i("div", Xa, [
1918
- (F(!0), E(re, null, $e(J == null ? void 0 : J.values, (Ce, Ie) => (F(), E("div", {
1919
+ (w(!0), E(le, null, $e(J == null ? void 0 : J.values, (Ce, Ie) => (w(), E("div", {
1919
1920
  key: Ie,
1920
1921
  class: "fm-typo-en-body-lg-600"
1921
1922
  }, ae(Ce), 1))), 128))
@@ -1928,8 +1929,8 @@ const ha = xt(
1928
1929
  ])
1929
1930
  ])
1930
1931
  ], 64))), 128))
1931
- ])) : (F(), E("div", Ra, [
1932
- _(se),
1932
+ ])) : (w(), E("div", Ra, [
1933
+ _(re),
1933
1934
  i("div", null, [
1934
1935
  i("img", {
1935
1936
  src: $(ta),
@@ -1938,10 +1939,10 @@ const ha = xt(
1938
1939
  ]),
1939
1940
  t[16] || (t[16] = i("div", { class: "fm-typo-en-body-lg-600" }, ae("No records found"), -1)),
1940
1941
  t[17] || (t[17] = i("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary px-16" }, ae("You can track approval and rejection history here"), -1)),
1941
- _(se),
1942
- _(se)
1942
+ _(re),
1943
+ _(re)
1943
1944
  ]))
1944
- ])) : le("", !0)
1945
+ ])) : ne("", !0)
1945
1946
  ])
1946
1947
  ]),
1947
1948
  _: 1
@@ -1953,7 +1954,7 @@ const ha = xt(
1953
1954
  setup(s) {
1954
1955
  const { t: o } = kt(), { viewDraft: e } = Ne(), { viewClosingDraftProps: m, viewClosingDraftShow: x } = ea(Ne()), h = ze(), g = ha(), P = Kt(), { breakpoints: L } = Xt();
1955
1956
  h.watchLocation(g.fetchDrafts);
1956
- const M = V(() => g.loading), k = H(""), N = V(() => L.value.xs || L.value.sm), B = V(() => N.value ? 10 : 20);
1957
+ const M = V(() => g.loading), k = Y(""), N = V(() => L.value.xs || L.value.sm), B = V(() => N.value ? 10 : 20);
1957
1958
  function v(I) {
1958
1959
  switch (I) {
1959
1960
  case "refresh":
@@ -1978,7 +1979,7 @@ const ha = xt(
1978
1979
  ]);
1979
1980
  return (I, y) => {
1980
1981
  const b = z("FmTable");
1981
- return F(), E(re, null, [
1982
+ return w(), E(le, null, [
1982
1983
  _(Qt, {
1983
1984
  title: $(o)("inventory.closing.draft.title"),
1984
1985
  actions: u.value,
@@ -2015,20 +2016,20 @@ const ha = xt(
2015
2016
  onRowClick: (T) => $(e)(T)
2016
2017
  }, {
2017
2018
  default: W((T) => {
2018
- var O, K, Q, Z, w, X, me, ee, oe, de, xe, De, te, Ae, Te, we, Fe, je, ve, ge;
2019
+ var O, K, Q, Z, S, X, me, ee, se, de, xe, De, te, Ae, Te, we, Fe, je, ve, ge;
2019
2020
  return [
2020
2021
  i("div", nn, [
2021
2022
  i("div", on, [
2022
2023
  i("div", sn, [
2023
2024
  _($(Me), {
2024
2025
  render: (Q = (K = (O = T._id) == null ? void 0 : O.column) == null ? void 0 : K.columnDef) == null ? void 0 : Q.cell,
2025
- props: (w = (Z = T._id) == null ? void 0 : Z.getContext) == null ? void 0 : w.call(Z)
2026
+ props: (S = (Z = T._id) == null ? void 0 : Z.getContext) == null ? void 0 : S.call(Z)
2026
2027
  }, null, 8, ["render", "props"])
2027
2028
  ]),
2028
2029
  i("div", rn, [
2029
2030
  _($(Me), {
2030
2031
  render: (ee = (me = (X = T.name) == null ? void 0 : X.column) == null ? void 0 : me.columnDef) == null ? void 0 : ee.cell,
2031
- props: (de = (oe = T.name) == null ? void 0 : oe.getContext) == null ? void 0 : de.call(oe)
2032
+ props: (de = (se = T.name) == null ? void 0 : se.getContext) == null ? void 0 : de.call(se)
2032
2033
  }, null, 8, ["render", "props"])
2033
2034
  ]),
2034
2035
  i("div", ln, ae([
@@ -2060,7 +2061,7 @@ const ha = xt(
2060
2061
  ]),
2061
2062
  _: 1
2062
2063
  }, 8, ["title", "actions"]),
2063
- (F(), ue(jt, { to: "body" }, [
2064
+ (w(), ie(jt, { to: "body" }, [
2064
2065
  _(an, It($(m), {
2065
2066
  show: $(x),
2066
2067
  "onUpdate:show": y[2] || (y[2] = (C) => ft(x) ? x.value = C : null),