@feedmepos/mf-inventory-portal 1.2.46-dev.3 → 1.2.46-dev.4

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 (68) hide show
  1. package/dist/{App-ySxcDomm.js → App-EK7lJDXt.js} +3 -3
  2. package/dist/{ApprovalView-_EJKApES.js → ApprovalView-5wa67Pp2.js} +5 -5
  3. package/dist/{BindingsDialog-9GOaeI8n.js → BindingsDialog-DNvqgfca.js} +2 -2
  4. package/dist/{BindingsPicker-BeGibuLu.js → BindingsPicker-B0In-fby.js} +2 -2
  5. package/dist/{BindingsTable-BRIxUXYh.js → BindingsTable-Dnj3lmqy.js} +3 -3
  6. package/dist/{ClosingDraftView-BatMvmqU.js → ClosingDraftView-DMeJEGFR.js} +219 -209
  7. package/dist/{ClosingHistoryView-Dn4Cjswm.js → ClosingHistoryView-CIzyFAlH.js} +3 -3
  8. package/dist/{ClosingTemplateView-Co_DSUTb.js → ClosingTemplateView-6HX9oUcC.js} +14 -14
  9. package/dist/{DeliveryOrderPrintPreview-DkJwksMs.js → DeliveryOrderPrintPreview-MWn3Ar1T.js} +1 -1
  10. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DyWHsoW6.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C7YYLOYE.js} +4 -4
  11. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-No_HFW6L.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CQiU_sGW.js} +2 -2
  12. package/dist/{FmMultiselectDialog-BQgNlFR9.js → FmMultiselectDialog-BkjI4JGz.js} +1 -1
  13. package/dist/{FmMultiselectDialog-Cf8uKaTm.js → FmMultiselectDialog-CtiU1Dtg.js} +2 -2
  14. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CNLY-Hzz.js → FmUnitInput.vue_vue_type_script_setup_true_lang-LyzPCbxS.js} +3 -3
  15. package/dist/{ImportView-D1v8E1VD.js → ImportView-7iS_eKvv.js} +6 -6
  16. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-CQzXwQYK.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-BgY8Q64y.js} +1 -1
  17. package/dist/{IngredientGroupView-BrZ_OwZv.js → IngredientGroupView-_U4bC7ki.js} +5 -5
  18. package/dist/{IngredientsView-C6RNpxxb.js → IngredientsView-vNdlqPpT.js} +14 -14
  19. package/dist/{IntegrationView-Ca7ejuaF.js → IntegrationView-cWl5050X.js} +12 -12
  20. package/dist/{InventoryBindingForm-D0pD3HsN.js → InventoryBindingForm-Bze5ZhbJ.js} +1 -1
  21. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CTdLmzkv.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CouXpFs-.js} +4 -4
  22. package/dist/{InventoryBindingSummary-DeaupJPl.js → InventoryBindingSummary-4bU5QfqT.js} +1 -1
  23. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Dyeizcb9.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BpELQhv-.js} +1 -1
  24. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-SpBOB8Jf.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CG5hkfB7.js} +2 -2
  25. package/dist/{PublishView-C6mc-X3S.js → PublishView-Dl2oTfzU.js} +3 -3
  26. package/dist/{PurchaseOrderPrintPreview-D2iF1QHy.js → PurchaseOrderPrintPreview-GQjxju0E.js} +1 -1
  27. package/dist/{ReceiveRequestView-CdtV-Shg.js → ReceiveRequestView-B9aW_X5r.js} +18 -18
  28. package/dist/{RecipeView-DWZfk8K4.js → RecipeView-BRtYb-YG.js} +8 -8
  29. package/dist/{StockView-8wAAtKfj.js → StockView-BA2ZFlTp.js} +15 -15
  30. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DVpjp5eW.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-g4FkX2mO.js} +1 -1
  31. package/dist/{SupplierView-CH_KBKSr.js → SupplierView-CmvDHCn1.js} +11 -11
  32. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-Ddn8qCWG.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-COP5SYtT.js} +2 -2
  33. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CjaWOrc7.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-Cs93Vtov.js} +1 -1
  34. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-B1SE0VPO.js → TransferDetails.vue_vue_type_script_setup_true_lang-De-0zviY.js} +14 -14
  35. package/dist/{TransferTemplateView-CJ74oEFd.js → TransferTemplateView-CJnlocMY.js} +15 -15
  36. package/dist/{UnitView-CHZpS66w.js → UnitView-BL9YToD9.js} +6 -6
  37. package/dist/{WarehouseView-BdlEzxyN.js → WarehouseView-C83stFZt.js} +5 -5
  38. package/dist/{WastageTemplateView-DPYFFFPg.js → WastageTemplateView-BBZH-mKL.js} +14 -14
  39. package/dist/{app-L6j_SX6Z.js → app-C41vbTKc.js} +7 -7
  40. package/dist/app.js +1 -1
  41. package/dist/{closing-template-DL2xo4-p.js → closing-template-Cgnip54N.js} +1 -1
  42. package/dist/{date2-C60QiPZL.js → date2-CMZo42ry.js} +1 -1
  43. package/dist/{dayjs.min-1i9VF7ko.js → dayjs.min-VxvOpK4l.js} +1 -1
  44. package/dist/{decimal-DfXZArxr.js → decimal-Bny34Eba.js} +2 -2
  45. package/dist/{defineDeepModel-DYMBS2Up.js → defineDeepModel-BAFlxgb7.js} +1 -1
  46. package/dist/{duplicate-template-DbCPaO6i.js → duplicate-template-BtuFXv7t.js} +1 -1
  47. package/dist/{feature-BrCYCAw3.js → feature-DLwvVno7.js} +2 -2
  48. package/dist/{format-time-from-id-Cr_k7Wi5.js → format-time-from-id-CZXW775p.js} +1 -1
  49. package/dist/{format-unit-display-DSOafWus.js → format-unit-display-DuO3ios0.js} +10 -10
  50. package/dist/{import-export.helper-BLHYLWps.js → import-export.helper-C_pu3Vto.js} +5 -5
  51. package/dist/{index-D-ZXljMu.js → index-B0PBI5Di.js} +1 -1
  52. package/dist/{index-DGIytAs7.js → index-BprWbUJy.js} +1 -1
  53. package/dist/{index-CL_V6m9F.js → index-GSUBHLP8.js} +3 -3
  54. package/dist/{lodash-iJopJ73U.js → lodash-hzb22w2h.js} +1 -1
  55. package/dist/{netsuite-C7gUg5Ne.js → netsuite-yK572svg.js} +3 -3
  56. package/dist/{purchase-order-template-Qy0dXMvI.js → purchase-order-template-CAmTt86P.js} +1 -1
  57. package/dist/{rules-DNwy6oOH.js → rules-D2ifX1qj.js} +3 -3
  58. package/dist/{stock-DQX_I8wd.js → stock-BS7XBKNg.js} +1 -1
  59. package/dist/{stock-DTK8SpFp.js → stock-S6w8LDdV.js} +3 -3
  60. package/dist/{supplier-Dl0JI_BN.js → supplier-CAFKaGyu.js} +2 -2
  61. package/dist/{use-ingredient-select-dialog-B6akNhzG.js → use-ingredient-select-dialog-DuNV0Qev.js} +2 -2
  62. package/dist/{use-inventory-binding-dialog-C72_9SY7.js → use-inventory-binding-dialog-CXnHmvy1.js} +2 -2
  63. package/dist/{use-template-enabled-locations-2-Ba-OnSOi.js → use-template-enabled-locations-2-gzV64awF.js} +2 -2
  64. package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +3 -3
  65. package/dist/{vue-i18n-Drpwc5_v.js → vue-i18n-ChDJFBbd.js} +321 -321
  66. package/dist/{xlsx-DLXI5MPN.js → xlsx-RW9YZaa8.js} +1 -1
  67. package/dist/{xlsx.util-Coy8SybJ.js → xlsx.util-D-mF9Cdj.js} +1 -1
  68. package/package.json +2 -2
@@ -1,23 +1,23 @@
1
- import { defineComponent as Re, ref as Y, computed as M, onMounted as et, resolveComponent as K, openBlock as w, createElementBlock as P, Fragment as oe, createTextVNode as re, createBlock as ce, withCtx as O, createElementVNode as s, toDisplayString as Z, unref as g, createVNode as k, createCommentVNode as J, h as $, watch as Ee, renderList as $e, reactive as Mt, isRef as bt, normalizeClass as Be, normalizeStyle as ht, Teleport as Lt, mergeProps as Nt } from "vue";
1
+ import { defineComponent as Re, ref as Y, computed as M, onMounted as et, resolveComponent as K, openBlock as F, createElementBlock as P, Fragment as oe, createTextVNode as re, createBlock as ce, withCtx as O, createElementVNode as s, toDisplayString as Z, unref as g, createVNode as k, createCommentVNode as J, h as B, watch as ze, renderList as $e, reactive as Mt, isRef as bt, normalizeClass as Be, normalizeStyle as ht, Teleport as Lt, mergeProps as Nt } from "vue";
2
2
  import { F as Je, u as Et, _ as zt } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js";
3
3
  import { useCoreStore as kt, useI18n as _t } from "@feedmepos/mf-common";
4
4
  import { useSnackbar as tt, useDialog as Ht, components as ge, useProxiedModel as Ot, useBreakpoints as Kt } from "@feedmepos/ui-library";
5
- import { o as Yt, u as Qe, I as Q, s as E, J as Dt, K as be, A as ze, v as He, c as Qt, a as qt } from "./app-L6j_SX6Z.js";
5
+ import { o as Yt, u as qe, I as Q, s as E, J as Dt, K as be, A as He, v as Oe, c as Qt, a as qt } from "./app-C41vbTKc.js";
6
6
  import { defineStore as xt, storeToRefs as Gt } from "pinia";
7
- import { d as Ke, e as At, f as Wt, a as ye } from "./date2-C60QiPZL.js";
8
- import { R as Zt, f as at, a as Xe, t as Jt, d as Ue, o as St, p as wt, m as Ct, l as Xt } from "./rules-DNwy6oOH.js";
9
- import { b as ea, d as ta } from "./xlsx.util-Coy8SybJ.js";
10
- import { u as Ft } from "./stock-DTK8SpFp.js";
11
- import { u as nt } from "./stock-DQX_I8wd.js";
12
- import { D as yt, R as Fe } from "./row-action.enum-BcW_L_nE.js";
13
- import { c as aa, _ as na, F as Ne } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-cfFHDIwQ.js";
14
- import { f as oa } from "./format-time-from-id-Cr_k7Wi5.js";
15
- import { _ as sa } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-No_HFW6L.js";
7
+ import { d as Ye, e as At, f as Wt, a as ye } from "./date2-CMZo42ry.js";
8
+ import { R as Zt, f as at, a as Xe, t as Jt, d as Ue, o as St, p as wt, m as Ft, l as Xt } from "./rules-D2ifX1qj.js";
9
+ import { b as ea, d as ta } from "./xlsx.util-D-mF9Cdj.js";
10
+ import { u as Ct } from "./stock-S6w8LDdV.js";
11
+ import { u as nt } from "./stock-BS7XBKNg.js";
12
+ import { D as yt, R as Ce } from "./row-action.enum-BcW_L_nE.js";
13
+ import { c as aa, _ as na, F as Ee } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-cfFHDIwQ.js";
14
+ import { f as oa } from "./format-time-from-id-CZXW775p.js";
15
+ import { _ as sa } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CQiU_sGW.js";
16
16
  import { E as ra } from "./empty-placeholder-wf6-BWE8.js";
17
- import { u as la } from "./vue-i18n-Drpwc5_v.js";
18
- const qe = Yt((i, r) => {
17
+ import { u as la } from "./vue-i18n-ChDJFBbd.js";
18
+ const Ge = Yt((i, r) => {
19
19
  function e() {
20
- return Qe().currentLocation.dbName;
20
+ return qe().currentLocation.dbName;
21
21
  }
22
22
  return {
23
23
  async getDraft(d) {
@@ -60,7 +60,7 @@ const qe = Yt((i, r) => {
60
60
  onFinished: { type: Function }
61
61
  },
62
62
  setup(i) {
63
- const r = i, e = Y(), d = qe(), _ = tt(), y = Y(!1), f = Y(null), j = Y(!1), V = M(() => {
63
+ const r = i, e = Y(), d = Ge(), _ = tt(), y = Y(!1), f = Y(null), j = Y(!1), V = M(() => {
64
64
  switch (r.action) {
65
65
  case Q.enum.approveDraft:
66
66
  return "Approve";
@@ -92,7 +92,7 @@ const qe = Yt((i, r) => {
92
92
  });
93
93
  const x = M({
94
94
  get() {
95
- return f.value === null ? "" : Ke(f.value);
95
+ return f.value === null ? "" : Ye(f.value);
96
96
  },
97
97
  set(m) {
98
98
  if (m) {
@@ -148,8 +148,8 @@ const qe = Yt((i, r) => {
148
148
  }
149
149
  }
150
150
  return (m, t) => {
151
- const S = K("FmLabel"), R = K("FmDatePicker"), z = K("FmTimePicker"), h = K("FmTextField"), p = K("FmButton"), B = K("FmForm");
152
- return j.value ? (w(), ce(B, {
151
+ const S = K("FmLabel"), R = K("FmDatePicker"), z = K("FmTimePicker"), h = K("FmTextField"), p = K("FmButton"), w = K("FmForm");
152
+ return j.value ? (F(), ce(w, {
153
153
  key: 1,
154
154
  onValidationSuccess: W,
155
155
  class: "flex flex-col gap-32",
@@ -161,7 +161,7 @@ const qe = Yt((i, r) => {
161
161
  s("span", ca, Z(V.value), 1),
162
162
  t[6] || (t[6] = re(" this draft. Please provide a remark to justify this action. "))
163
163
  ]),
164
- m.action === g(Q).enum.approveDraft ? (w(), P("div", ua, [
164
+ m.action === g(Q).enum.approveDraft ? (F(), P("div", ua, [
165
165
  k(S, { class: "fm-typo-en-body-lg-600" }, {
166
166
  default: O(() => t[7] || (t[7] = [
167
167
  re("Closing Date")
@@ -171,7 +171,7 @@ const qe = Yt((i, r) => {
171
171
  k(R, {
172
172
  modelValue: x.value,
173
173
  "onUpdate:modelValue": t[0] || (t[0] = (H) => x.value = H),
174
- max: g(Ke)(/* @__PURE__ */ new Date())
174
+ max: g(Ye)(/* @__PURE__ */ new Date())
175
175
  }, null, 8, ["modelValue", "max"]),
176
176
  k(S, { class: "fm-typo-en-body-lg-600" }, {
177
177
  default: O(() => t[8] || (t[8] = [
@@ -183,7 +183,7 @@ const qe = Yt((i, r) => {
183
183
  modelValue: D.value,
184
184
  "onUpdate:modelValue": t[1] || (t[1] = (H) => D.value = H)
185
185
  }, null, 8, ["modelValue"]),
186
- I.value ? (w(), P("div", da, " Cannot select future date ")) : J("", !0)
186
+ I.value ? (F(), P("div", da, " Cannot select future date ")) : J("", !0)
187
187
  ])) : J("", !0),
188
188
  k(h, {
189
189
  modelValue: e.value,
@@ -198,7 +198,7 @@ const qe = Yt((i, r) => {
198
198
  variant: "tertiary",
199
199
  onClick: t[3] || (t[3] = (H) => m.onCancel())
200
200
  }),
201
- m.action === g(Q).enum.approveDraft ? (w(), ce(Je, { key: 0 }, {
201
+ m.action === g(Q).enum.approveDraft ? (F(), ce(Je, { key: 0 }, {
202
202
  default: O(() => [
203
203
  k(p, {
204
204
  label: "Approve (Legacy)",
@@ -220,7 +220,7 @@ const qe = Yt((i, r) => {
220
220
  ])
221
221
  ]),
222
222
  _: 1
223
- }, 8, ["disabled"])) : (w(), P(oe, { key: 0 }, [
223
+ }, 8, ["disabled"])) : (F(), P(oe, { key: 0 }, [
224
224
  re("Loading")
225
225
  ], 64));
226
226
  };
@@ -245,7 +245,7 @@ function ga(i, r, e, d, _, y) {
245
245
  precision: 0
246
246
  }, m = Number(
247
247
  E.toFormatString({ value: W })
248
- ), t = _ ? Number(E.toFormatString({ value: _ })) : 0, S = Number(E.toFormatString({ value: r })), R = Number(E.toFormatString({ value: j })), z = S - R, h = z * I / m, p = R * I / m, B = S * I / m;
248
+ ), t = _ ? Number(E.toFormatString({ value: _ })) : 0, S = Number(E.toFormatString({ value: r })), R = Number(E.toFormatString({ value: j })), z = S - R, h = z * I / m, p = R * I / m, w = S * I / m;
249
249
  return {
250
250
  code: i.sku.code,
251
251
  name: i.sku.name,
@@ -263,7 +263,7 @@ function ga(i, r, e, d, _, y) {
263
263
  adjustedAmount: Number(E.toFormatString({ value: V })),
264
264
  adjustedDiffPercentage: x ? Number(
265
265
  E.toFormatString({
266
- value: Ct(x, 2)
266
+ value: Ft(x, 2)
267
267
  })
268
268
  ) : null,
269
269
  costPerUnit: I,
@@ -272,7 +272,7 @@ function ga(i, r, e, d, _, y) {
272
272
  varianceQty: z,
273
273
  varianceInCost: h,
274
274
  stockTakeValue: p,
275
- systemValue: B
275
+ systemValue: w
276
276
  };
277
277
  }
278
278
  function ya(i) {
@@ -374,7 +374,7 @@ function ha(i) {
374
374
  ];
375
375
  }
376
376
  function ka(i, r, e) {
377
- var z, h, p, B, H, q, C;
377
+ var z, h, p, w, H, q, C;
378
378
  const d = r.groupBy(
379
379
  (b) => b.id,
380
380
  (b) => b.balance
@@ -413,7 +413,7 @@ function ka(i, r, e) {
413
413
  ["Recent action", i.approvedAt ? "Approve" : i.rejectionHistory ? "Reject" : ""],
414
414
  [
415
415
  "Action by",
416
- i.approvedAt ? (p = i.approvedBy) == null ? void 0 : p.name : i.rejectionHistory ? (H = (B = i.rejectionHistory[0]) == null ? void 0 : B.rejectedBy) == null ? void 0 : H.name : ""
416
+ i.approvedAt ? (p = i.approvedBy) == null ? void 0 : p.name : i.rejectionHistory ? (H = (w = i.rejectionHistory[0]) == null ? void 0 : w.rejectedBy) == null ? void 0 : H.name : ""
417
417
  ],
418
418
  [
419
419
  "Action at",
@@ -454,7 +454,7 @@ const _a = { class: "flex flex-col" }, Da = {
454
454
  });
455
455
  const y = M({
456
456
  get() {
457
- return d.value === null ? "" : Ke(d.value);
457
+ return d.value === null ? "" : Ye(d.value);
458
458
  },
459
459
  set(T) {
460
460
  if (T) {
@@ -480,7 +480,7 @@ const _a = { class: "flex flex-col" }, Da = {
480
480
  }
481
481
  return (T, x) => {
482
482
  const D = K("FmLabel"), I = K("FmDatePicker"), W = K("FmTimePicker"), m = K("FmButton"), t = K("FmForm");
483
- return _.value ? (w(), ce(t, {
483
+ return _.value ? (F(), ce(t, {
484
484
  key: 1,
485
485
  onValidationSuccess: V,
486
486
  class: "flex flex-col gap-32",
@@ -509,7 +509,7 @@ const _a = { class: "flex flex-col" }, Da = {
509
509
  k(I, {
510
510
  modelValue: y.value,
511
511
  "onUpdate:modelValue": x[0] || (x[0] = (S) => y.value = S),
512
- max: g(Ke)(/* @__PURE__ */ new Date())
512
+ max: g(Ye)(/* @__PURE__ */ new Date())
513
513
  }, null, 8, ["modelValue", "max"]),
514
514
  k(D, { class: "fm-typo-en-body-lg-600" }, {
515
515
  default: O(() => x[4] || (x[4] = [
@@ -521,7 +521,7 @@ const _a = { class: "flex flex-col" }, Da = {
521
521
  modelValue: f.value,
522
522
  "onUpdate:modelValue": x[1] || (x[1] = (S) => f.value = S)
523
523
  }, null, 8, ["modelValue"]),
524
- j.value ? (w(), P("div", Da, " Cannot select future date ")) : J("", !0)
524
+ j.value ? (F(), P("div", Da, " Cannot select future date ")) : J("", !0)
525
525
  ]),
526
526
  s("div", xa, [
527
527
  k(m, {
@@ -539,15 +539,15 @@ const _a = { class: "flex flex-col" }, Da = {
539
539
  ])
540
540
  ]),
541
541
  _: 1
542
- }, 8, ["disabled"])) : (w(), P(oe, { key: 0 }, [
542
+ }, 8, ["disabled"])) : (F(), P(oe, { key: 0 }, [
543
543
  re("Loading")
544
544
  ], 64));
545
545
  };
546
546
  }
547
- }), Ye = xt(
547
+ }), Qe = xt(
548
548
  "closingDraftActions",
549
549
  function() {
550
- const r = Ht(), e = tt(), d = nt(), _ = qe(), y = Ft(), f = Y(!1), j = Y();
550
+ const r = Ht(), e = tt(), d = nt(), _ = Ge(), y = Ct(), f = Y(!1), j = Y();
551
551
  function V(h) {
552
552
  const p = {
553
553
  draft: h
@@ -555,7 +555,7 @@ const _a = { class: "flex flex-col" }, Da = {
555
555
  j.value = p, f.value = !0;
556
556
  }
557
557
  async function T(h) {
558
- var B;
558
+ var w;
559
559
  if (h.status === be.enum.COMPLETED) {
560
560
  const H = h.closingAdjustmentId;
561
561
  if (!H)
@@ -573,15 +573,15 @@ const _a = { class: "flex flex-col" }, Da = {
573
573
  costs: b.fromCostBalances
574
574
  }));
575
575
  } else
576
- return await y.readStockBalance(), ((B = y.stockBalance) == null ? void 0 : B.skus) ?? [];
576
+ return await y.readStockBalance(), ((w = y.stockBalance) == null ? void 0 : w.skus) ?? [];
577
577
  }
578
- async function x(h, p, B) {
578
+ async function x(h, p, w) {
579
579
  p || (e.open({
580
580
  title: "Exporting",
581
581
  message: "Fetching data..."
582
- }), p = await T(h)), ka(h, p, B ?? []);
582
+ }), p = await T(h)), ka(h, p, w ?? []);
583
583
  }
584
- function D(h, p) {
584
+ function D(h, p, w) {
585
585
  r.open({
586
586
  title: "Approve draft",
587
587
  contentComponent: Ze,
@@ -591,8 +591,12 @@ const _a = { class: "flex flex-col" }, Da = {
591
591
  onFinished: () => {
592
592
  r.close(), p == null || p();
593
593
  },
594
- onCancel: () => r.close()
594
+ onCancel: () => {
595
+ r.close();
596
+ }
595
597
  }
598
+ }).onClose(() => {
599
+ w == null || w();
596
600
  });
597
601
  }
598
602
  function I(h, p) {
@@ -640,14 +644,14 @@ const _a = { class: "flex flex-col" }, Da = {
640
644
  function t() {
641
645
  f.value = !1;
642
646
  }
643
- async function S(h, p, B) {
647
+ async function S(h, p, w) {
644
648
  await r.open({
645
649
  title: "Refresh balance",
646
650
  contentComponent: Aa,
647
651
  contentComponentProps: {
648
652
  draft: h,
649
653
  onFinished: (H) => {
650
- r.close(), B == null || B(H);
654
+ r.close(), w == null || w(H);
651
655
  },
652
656
  onCancel: async () => {
653
657
  r.close(), p == null || p();
@@ -679,10 +683,10 @@ const _a = { class: "flex flex-col" }, Da = {
679
683
  message: "Draft cloned successfully",
680
684
  type: "success"
681
685
  }), p == null || p();
682
- } catch (B) {
686
+ } catch (w) {
683
687
  e.open({
684
688
  title: "Error",
685
- message: (B == null ? void 0 : B.message) || "Failed to clone draft",
689
+ message: (w == null ? void 0 : w.message) || "Failed to clone draft",
686
690
  type: "error"
687
691
  });
688
692
  }
@@ -703,7 +707,7 @@ const _a = { class: "flex flex-col" }, Da = {
703
707
  };
704
708
  }
705
709
  );
706
- function Oe(i) {
710
+ function Ke(i) {
707
711
  switch (i) {
708
712
  case "DRAFT":
709
713
  return "fm-status-badge-draft";
@@ -718,7 +722,7 @@ function Oe(i) {
718
722
  const Sa = xt(
719
723
  "closingDraftTable",
720
724
  function() {
721
- const { t: r } = _t(), e = kt(), d = Ye(), _ = Y(new Array()), y = Y(!1), f = Qe(), j = qe();
725
+ const { t: r } = _t(), e = kt(), d = Qe(), _ = Y(new Array()), y = Y(!1), f = qe(), j = Ge();
722
726
  async function V() {
723
727
  if (_.value = [], !!f._currentLocation) {
724
728
  y.value = !0;
@@ -759,9 +763,9 @@ const Sa = xt(
759
763
  }
760
764
  function I(m, t) {
761
765
  switch (t = Qt(t), m) {
762
- case Fe.Details:
766
+ case Ce.Details:
763
767
  return d.viewDraft(t);
764
- case Fe.Export:
768
+ case Ce.Export:
765
769
  return d.exportDraft(t);
766
770
  case Q.enum.approveDraft:
767
771
  return d.approveDraft(t, D);
@@ -769,7 +773,7 @@ const Sa = xt(
769
773
  return d.rejectDraft(t, D);
770
774
  case Q.enum.markAsFailed:
771
775
  return d.markAsFailed(t, D);
772
- case Fe.Duplicate:
776
+ case Ce.Duplicate:
773
777
  return d.cloneDraft(t, D);
774
778
  }
775
779
  }
@@ -790,7 +794,7 @@ const Sa = xt(
790
794
  cell(m) {
791
795
  const t = m.row.original;
792
796
  let S = m.getValue();
793
- return S || (S = ze(t._id)), ye(S);
797
+ return S || (S = He(t._id)), ye(S);
794
798
  },
795
799
  enableSorting: !0,
796
800
  size: 200
@@ -837,42 +841,42 @@ const Sa = xt(
837
841
  enableSorting: !1,
838
842
  cell(m) {
839
843
  var p;
840
- const t = m.row.original, S = t.status, R = new Date(t.updatedAt), z = (p = t == null ? void 0 : t.rejectionHistory) == null ? void 0 : p.computeFirst((B) => B.rejectedAt), h = z ? new Date(z) : null;
841
- return S === "DRAFT" && h ? h.getTime() > R.getTime() ? $(
844
+ const t = m.row.original, S = t.status, R = new Date(t.updatedAt), z = (p = t == null ? void 0 : t.rejectionHistory) == null ? void 0 : p.computeFirst((w) => w.rejectedAt), h = z ? new Date(z) : null;
845
+ return S === "DRAFT" && h ? h.getTime() > R.getTime() ? B(
842
846
  "div",
843
847
  {
844
848
  class: "flex"
845
849
  },
846
- $(
850
+ B(
847
851
  "div",
848
852
  {
849
- class: ["fm-status-badge", Oe("FAILED")]
853
+ class: ["fm-status-badge", Ke("FAILED")]
850
854
  },
851
855
  "Rejected"
852
856
  )
853
- ) : $(
857
+ ) : B(
854
858
  "div",
855
859
  {
856
860
  class: "flex"
857
861
  },
858
- $(
862
+ B(
859
863
  "div",
860
864
  {
861
- class: ["fm-status-badge", Oe("PROCESSING")]
865
+ class: ["fm-status-badge", Ke("PROCESSING")]
862
866
  },
863
867
  "Updated"
864
868
  )
865
- ) : $(
869
+ ) : B(
866
870
  "div",
867
871
  {
868
872
  class: "flex"
869
873
  },
870
- $(
874
+ B(
871
875
  "div",
872
876
  {
873
- class: ["fm-status-badge", Oe(S)]
877
+ class: ["fm-status-badge", Ke(S)]
874
878
  },
875
- He(S)
879
+ Oe(S)
876
880
  )
877
881
  );
878
882
  }
@@ -882,8 +886,8 @@ const Sa = xt(
882
886
  cell(m) {
883
887
  var p;
884
888
  const t = m.row.original, S = ((p = e.sessionUser.value) == null ? void 0 : p.role.isAdmin) ?? !1, R = [
885
- yt[Fe.Details],
886
- yt[Fe.Export]
889
+ yt[Ce.Details],
890
+ yt[Ce.Export]
887
891
  ], z = [
888
892
  {
889
893
  translationKey: "inventory.closing.draft.approveDraft",
@@ -904,7 +908,7 @@ const Sa = xt(
904
908
  {
905
909
  translationKey: "inventory.closing.draft.cloneDraft",
906
910
  color: "text-fm-color-typo-primary",
907
- value: Fe.Duplicate
911
+ value: Ce.Duplicate
908
912
  }
909
913
  ] : [];
910
914
  return aa(
@@ -912,7 +916,7 @@ const Sa = xt(
912
916
  ...R,
913
917
  ...t.status === be.enum.DRAFT ? z : []
914
918
  ],
915
- (B) => I(B, t),
919
+ (w) => I(w, t),
916
920
  h
917
921
  );
918
922
  },
@@ -931,7 +935,7 @@ const Sa = xt(
931
935
  updateDraftRef: x
932
936
  };
933
937
  }
934
- ), wa = { class: "fm-typo-en-heading-lg-600" }, Ca = { class: "py-4" }, Fa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-4" }, $a = { key: 0 }, Ba = { class: "mt-4 flex gap-4" }, Ta = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-4" }, ja = { key: 0 }, Ia = {
938
+ ), wa = { class: "fm-typo-en-heading-lg-600" }, Fa = { class: "py-4" }, Ca = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-4" }, $a = { key: 0 }, Ba = { class: "mt-4 flex gap-4" }, Ta = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-4" }, ja = { key: 0 }, Ia = {
935
939
  key: 0,
936
940
  class: "mb-4"
937
941
  }, Ua = { class: "flex flex-col gap-1 max-h-200 overflow-auto pr-4" }, Ra = { class: "fm-typo-en-body-md-400" }, Va = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pa = { class: "mt-4 flex gap-4" }, Ma = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-4" }, La = {
@@ -972,17 +976,17 @@ const Sa = xt(
972
976
  function h() {
973
977
  return j.hasStockSnapshot ? T.value ? 2 : 3 : 1;
974
978
  }
975
- Ee(
979
+ ze(
976
980
  () => j.show,
977
981
  (C) => {
978
982
  C && (D.value = h());
979
983
  }
980
- ), Ee(
984
+ ), ze(
981
985
  () => j.hasStockSnapshot,
982
986
  (C) => {
983
987
  C && D.value === 1 && (D.value = R(1));
984
988
  }
985
- ), Ee(
989
+ ), ze(
986
990
  () => T.value,
987
991
  (C) => {
988
992
  !C && D.value === 2 && (D.value = R(2));
@@ -991,7 +995,7 @@ const Sa = xt(
991
995
  function p() {
992
996
  V("refresh");
993
997
  }
994
- function B() {
998
+ function w() {
995
999
  D.value < 3 && (D.value = R(D.value));
996
1000
  }
997
1001
  function H() {
@@ -1000,7 +1004,7 @@ const Sa = xt(
1000
1004
  function q() {
1001
1005
  V("approve");
1002
1006
  }
1003
- return (C, b) => (w(), ce(g(_), {
1007
+ return (C, b) => (F(), ce(g(_), {
1004
1008
  modelValue: x.value,
1005
1009
  "onUpdate:modelValue": b[1] || (b[1] = (G) => x.value = G),
1006
1010
  "max-width": 600
@@ -1009,7 +1013,7 @@ const Sa = xt(
1009
1013
  s("div", wa, Z(g(f)("inventory.closing.approval.title")), 1)
1010
1014
  ]),
1011
1015
  default: O(() => [
1012
- s("div", Ca, [
1016
+ s("div", Fa, [
1013
1017
  k(g(e), {
1014
1018
  modelValue: D.value,
1015
1019
  "onUpdate:modelValue": b[0] || (b[0] = (G) => D.value = G),
@@ -1022,8 +1026,8 @@ const Sa = xt(
1022
1026
  complete: I
1023
1027
  }, {
1024
1028
  default: O(() => [
1025
- s("div", Fa, Z(g(f)("inventory.closing.approval.step.generateReport.description")), 1),
1026
- D.value === 1 ? (w(), P("div", $a, [
1029
+ s("div", Ca, Z(g(f)("inventory.closing.approval.step.generateReport.description")), 1),
1030
+ D.value === 1 ? (F(), P("div", $a, [
1027
1031
  k(g(y), {
1028
1032
  label: g(f)("inventory.stock.stock_balance.refreshBalance"),
1029
1033
  "prepend-icon": "refresh",
@@ -1035,7 +1039,7 @@ const Sa = xt(
1035
1039
  k(g(y), {
1036
1040
  label: g(f)("inventory.common.continue"),
1037
1041
  disabled: !C.hasStockSnapshot,
1038
- onClick: B
1042
+ onClick: w
1039
1043
  }, null, 8, ["label", "disabled"])
1040
1044
  ])
1041
1045
  ])) : J("", !0)
@@ -1052,10 +1056,10 @@ const Sa = xt(
1052
1056
  var G;
1053
1057
  return [
1054
1058
  s("div", Ta, Z(T.value ? g(f)("inventory.closing.approval.step.negativeItems.resolveMessage") : g(f)("inventory.closing.approval.step.negativeItems.noItemsMessage")), 1),
1055
- D.value === 2 ? (w(), P("div", ja, [
1056
- T.value && (((G = C.negativeItems) == null ? void 0 : G.length) ?? 0) > 0 ? (w(), P("div", Ia, [
1059
+ D.value === 2 ? (F(), P("div", ja, [
1060
+ T.value && (((G = C.negativeItems) == null ? void 0 : G.length) ?? 0) > 0 ? (F(), P("div", Ia, [
1057
1061
  s("div", Ua, [
1058
- (w(!0), P(oe, null, $e(C.negativeItems, (ne) => (w(), P("div", {
1062
+ (F(!0), P(oe, null, $e(C.negativeItems, (ne) => (F(), P("div", {
1059
1063
  key: ne.code,
1060
1064
  class: "flex justify-between gap-8"
1061
1065
  }, [
@@ -1073,7 +1077,7 @@ const Sa = xt(
1073
1077
  k(g(y), {
1074
1078
  label: g(f)("inventory.common.continue"),
1075
1079
  disabled: T.value,
1076
- onClick: B
1080
+ onClick: w
1077
1081
  }, null, 8, ["label", "disabled"])
1078
1082
  ])
1079
1083
  ])) : J("", !0)
@@ -1089,7 +1093,7 @@ const Sa = xt(
1089
1093
  }, {
1090
1094
  default: O(() => [
1091
1095
  s("div", Ma, Z(g(f)("inventory.closing.approval.step.approval.warning")), 1),
1092
- D.value === 3 ? (w(), P("div", La, [
1096
+ D.value === 3 ? (F(), P("div", La, [
1093
1097
  k(g(y), {
1094
1098
  label: g(f)("inventory.common.back"),
1095
1099
  variant: "secondary",
@@ -1155,12 +1159,12 @@ const Sa = xt(
1155
1159
  const e = i, d = M(() => {
1156
1160
  const c = Dt();
1157
1161
  return c === "MYR" ? "RM" : c;
1158
- }), _ = Ft(), y = Ye(), f = Ot(e, "show"), j = Y(!1), V = Y(!1), T = Y(!1), x = Y(new Array()), D = Y(new Array()), I = Y([]), W = nt(), m = qe(), t = tt(), S = qt(), R = Qe(), z = Mt({}), h = M(() => new Set(
1162
+ }), _ = Ct(), y = Qe(), f = Ot(e, "show"), j = Y(!1), V = Y(!1), T = Y(!1), x = Y(new Array()), D = Y(new Array()), I = Y([]), W = nt(), m = Ge(), t = tt(), S = qt(), R = qe(), z = Mt({}), h = M(() => new Set(
1159
1163
  S.skus.filter((c) => {
1160
1164
  var a;
1161
1165
  return z[(a = c.customAttributes) == null ? void 0 : a.tag];
1162
1166
  }).map((c) => c._id)
1163
- )), p = r, B = Y({
1167
+ )), p = r, w = Y({
1164
1168
  templateItem: !0,
1165
1169
  nonTemplateItem: !0
1166
1170
  }), H = M(() => {
@@ -1174,10 +1178,10 @@ const Sa = xt(
1174
1178
  (a) => a.sku._id,
1175
1179
  (a) => a.measurementsAmounts.filter((v) => !v.measurement.abbrev.toLocaleLowerCase().includes("inactive")).map((v) => v.measurement.id)
1176
1180
  ));
1177
- et(ne), Ee(
1181
+ et(ne), ze(
1178
1182
  () => e.show,
1179
1183
  (c) => {
1180
- c && (_e.value = Se[0], ne(), B.value = {
1184
+ c && (_e.value = Se[0], ne(), w.value = {
1181
1185
  templateItem: !0,
1182
1186
  nonTemplateItem: !0
1183
1187
  });
@@ -1222,12 +1226,12 @@ const Sa = xt(
1222
1226
  if ((o = e.draft) != null && o.adjustmentSnapshot)
1223
1227
  for (const L of e.draft.adjustmentSnapshot)
1224
1228
  L.adjustmentsByType && Object.keys(L.adjustmentsByType).forEach((N) => u.add(N));
1225
- const l = ["receive", "sales", "wastage"], F = [];
1229
+ const l = ["receive", "sales", "wastage"], $ = [];
1226
1230
  l.forEach((L) => {
1227
- u.has(L) && (F.push(L), u.delete(L));
1231
+ u.has(L) && ($.push(L), u.delete(L));
1228
1232
  });
1229
1233
  const A = Array.from(u).sort();
1230
- I.value = [...F, ...A];
1234
+ I.value = [...$, ...A];
1231
1235
  } catch (u) {
1232
1236
  t.open({
1233
1237
  title: "Something went wrong",
@@ -1240,7 +1244,7 @@ const Sa = xt(
1240
1244
  }
1241
1245
  async function se() {
1242
1246
  var a, v;
1243
- if (!(((a = e.draft) == null ? void 0 : a.effectiveAt) ?? (e.draft ? ze((v = e.draft) == null ? void 0 : v._id) : null))) {
1247
+ if (!(((a = e.draft) == null ? void 0 : a.effectiveAt) ?? (e.draft ? He((v = e.draft) == null ? void 0 : v._id) : null))) {
1244
1248
  t.open({
1245
1249
  title: "Cannot refresh",
1246
1250
  message: "Effective date is not available for this draft.",
@@ -1253,9 +1257,9 @@ const Sa = xt(
1253
1257
  () => {
1254
1258
  },
1255
1259
  async (n) => {
1256
- var F;
1260
+ var $;
1257
1261
  V.value = !0;
1258
- const o = (F = e.draft) == null ? void 0 : F._rev, u = 30, l = 2e3;
1262
+ const o = ($ = e.draft) == null ? void 0 : $._rev, u = 30, l = 2e3;
1259
1263
  try {
1260
1264
  await W.recalculation.scheduleCalculateStockSnapshotAtDate(n, e.draft._id);
1261
1265
  let A = null;
@@ -1288,7 +1292,7 @@ const Sa = xt(
1288
1292
  }
1289
1293
  async function le() {
1290
1294
  var a, v;
1291
- if (!(((a = e.draft) == null ? void 0 : a.effectiveAt) ?? (e.draft ? ze((v = e.draft) == null ? void 0 : v._id) : null))) {
1295
+ if (!(((a = e.draft) == null ? void 0 : a.effectiveAt) ?? (e.draft ? He((v = e.draft) == null ? void 0 : v._id) : null))) {
1292
1296
  t.open({
1293
1297
  title: "Cannot refresh",
1294
1298
  message: "Effective date is not available for this draft.",
@@ -1311,7 +1315,7 @@ const Sa = xt(
1311
1315
  return (c = e.draft) != null && c.opening ? new Map(e.draft.opening.map((a) => [a.skuId, a.balance])) : /* @__PURE__ */ new Map();
1312
1316
  });
1313
1317
  function te(c, a) {
1314
- return $(
1318
+ return B(
1315
1319
  ge.FmTooltip,
1316
1320
  { zIndex: 51, placement: "left", class: "w-full flex justify-end" },
1317
1321
  {
@@ -1336,8 +1340,8 @@ const Sa = xt(
1336
1340
  header: () => "Name",
1337
1341
  size: 350,
1338
1342
  cell(v) {
1339
- const n = v.row.original, o = n.adjustedDiffPercentage, u = typeof o == "number" && Math.abs(o) > 10, l = $("div", { class: "flex flex-col gap-4" }, [
1340
- $(
1343
+ const n = v.row.original, o = n.adjustedDiffPercentage, u = typeof o == "number" && Math.abs(o) > 10, l = B("div", { class: "flex flex-col gap-4" }, [
1344
+ B(
1341
1345
  "div",
1342
1346
  {
1343
1347
  class: [
@@ -1347,7 +1351,7 @@ const Sa = xt(
1347
1351
  },
1348
1352
  n.name
1349
1353
  ),
1350
- $(
1354
+ B(
1351
1355
  "div",
1352
1356
  {
1353
1357
  class: [
@@ -1358,7 +1362,7 @@ const Sa = xt(
1358
1362
  n.code
1359
1363
  )
1360
1364
  ]);
1361
- return $(
1365
+ return B(
1362
1366
  ge.FmTooltip,
1363
1367
  {
1364
1368
  zIndex: 51
@@ -1368,7 +1372,7 @@ const Sa = xt(
1368
1372
  return u ? "Adjustment difference is more than 10%." : `${n.code} - ${n.name}`;
1369
1373
  },
1370
1374
  default() {
1371
- return $("div", { class: "flex items-center gap-4 justify-start w-full" }, [
1375
+ return B("div", { class: "flex items-center gap-4 justify-start w-full" }, [
1372
1376
  l
1373
1377
  ]);
1374
1378
  }
@@ -1383,7 +1387,7 @@ const Sa = xt(
1383
1387
  size: 160,
1384
1388
  cell(v) {
1385
1389
  const n = v.row.original.costPerUnit;
1386
- return $("div", { class: "text-right" }, n.toFixed(2));
1390
+ return B("div", { class: "text-right" }, n.toFixed(2));
1387
1391
  },
1388
1392
  meta: {
1389
1393
  textAlign: "right"
@@ -1394,23 +1398,23 @@ const Sa = xt(
1394
1398
  header: () => "UOM",
1395
1399
  size: 120,
1396
1400
  cell(v) {
1397
- var F;
1401
+ var $;
1398
1402
  const n = v.row.original, o = n.costUnit, u = n.baseUnit, l = o ?? u;
1399
1403
  if (o && o !== u) {
1400
- const A = q.value.find((N) => N._id === n.id), L = (F = A == null ? void 0 : A.defaultCost) == null ? void 0 : F.measurement;
1404
+ const A = q.value.find((N) => N._id === n.id), L = ($ = A == null ? void 0 : A.defaultCost) == null ? void 0 : $.measurement;
1401
1405
  if (L) {
1402
1406
  const N = L.conversion.amount / Math.pow(10, L.conversion.precision);
1403
- return $("div", { class: "flex flex-col" }, [
1404
- $(
1407
+ return B("div", { class: "flex flex-col" }, [
1408
+ B(
1405
1409
  "span",
1406
1410
  { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary" },
1407
1411
  l
1408
1412
  ),
1409
- $("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, [
1413
+ B("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, [
1410
1414
  "1 ",
1411
- $("span", { class: "fm-typo-en-body-sm-600" }, o),
1415
+ B("span", { class: "fm-typo-en-body-sm-600" }, o),
1412
1416
  ` = ${N} `,
1413
- $("span", { class: "fm-typo-en-body-sm-600" }, u)
1417
+ B("span", { class: "fm-typo-en-body-sm-600" }, u)
1414
1418
  ])
1415
1419
  ]);
1416
1420
  }
@@ -1425,7 +1429,7 @@ const Sa = xt(
1425
1429
  size: 150,
1426
1430
  cell(v) {
1427
1431
  const n = v.row.original.opening;
1428
- return $("div", { class: "text-right" }, n.toFixed(2));
1432
+ return B("div", { class: "text-right" }, n.toFixed(2));
1429
1433
  },
1430
1434
  meta: {
1431
1435
  textAlign: "right"
@@ -1436,11 +1440,11 @@ const Sa = xt(
1436
1440
  (v) => ({
1437
1441
  id: `adjustment_${v}`,
1438
1442
  accessorFn: (n) => n.adjustmentAmounts[v] ?? { amount: 0, precision: 0 },
1439
- header: () => te(He(v)),
1443
+ header: () => te(Oe(v)),
1440
1444
  size: 150,
1441
1445
  cell(n) {
1442
1446
  const o = n.row.original.adjustmentAmounts[v] ?? { amount: 0, precision: 0 };
1443
- return $("div", { class: "text-right" }, Xe(o));
1447
+ return B("div", { class: "text-right" }, Xe(o));
1444
1448
  },
1445
1449
  meta: {
1446
1450
  textAlign: "right"
@@ -1468,17 +1472,17 @@ const Sa = xt(
1468
1472
  var A;
1469
1473
  const n = v.row.original, o = E.fromNumber(n.physicalBalance);
1470
1474
  let u = !0, l = n.physicalBalance;
1471
- const F = (A = D.value.find((L) => L.id === n.id)) == null ? void 0 : A.balance;
1472
- return F && (E.equals({
1475
+ const $ = (A = D.value.find((L) => L.id === n.id)) == null ? void 0 : A.balance;
1476
+ return $ && (E.equals({
1473
1477
  a: o,
1474
- b: F
1475
- }) || (u = !1, l = Number(E.toFormatString({ value: F })))), $("div", { class: "flex flex-col" }, [
1476
- $(
1478
+ b: $
1479
+ }) || (u = !1, l = Number(E.toFormatString({ value: $ })))), B("div", { class: "flex flex-col" }, [
1480
+ B(
1477
1481
  "span",
1478
1482
  { class: "line-clamp-1 fm-typo-en-body-lg-400 text-fm-color-typo-primary" },
1479
1483
  l
1480
1484
  ),
1481
- u ? null : $(
1485
+ u ? null : B(
1482
1486
  "span",
1483
1487
  { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
1484
1488
  `Draft: ${n.physicalBalance.toString()}`
@@ -1506,7 +1510,7 @@ const Sa = xt(
1506
1510
  size: 150,
1507
1511
  cell(v) {
1508
1512
  const n = v.row.original.varianceInCost;
1509
- return $(
1513
+ return B(
1510
1514
  "div",
1511
1515
  { class: "text-right" },
1512
1516
  n.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 4 })
@@ -1529,10 +1533,10 @@ const Sa = xt(
1529
1533
  if (!n) return xn;
1530
1534
  const o = n.toFixed(2);
1531
1535
  if (o === "0.00")
1532
- return $("div", { class: "flex items-center gap-4 justify-end" }, ["0.00"]);
1536
+ return B("div", { class: "flex items-center gap-4 justify-end" }, ["0.00"]);
1533
1537
  const u = n > 0;
1534
- return $("div", { class: "flex items-center gap-4 justify-end" }, [
1535
- $(ge.FmIcon, {
1538
+ return B("div", { class: "flex items-center gap-4 justify-end" }, [
1539
+ B(ge.FmIcon, {
1536
1540
  name: u ? "arrow_drop_up" : "arrow_drop_down",
1537
1541
  color: u ? "system-success-300" : "system-error-300",
1538
1542
  size: "md"
@@ -1551,10 +1555,10 @@ const Sa = xt(
1551
1555
  size: 180,
1552
1556
  cell(v) {
1553
1557
  var L;
1554
- const n = v.row.original, o = n.stockTakeValue, u = q.value.find((N) => N._id === n.id), l = (L = u == null ? void 0 : u.defaultCost) == null ? void 0 : L.measurement, F = n.physicalBalance, A = n.costPerUnit;
1558
+ const n = v.row.original, o = n.stockTakeValue, u = q.value.find((N) => N._id === n.id), l = (L = u == null ? void 0 : u.defaultCost) == null ? void 0 : L.measurement, $ = n.physicalBalance, A = n.costPerUnit;
1555
1559
  if (l) {
1556
- const N = E.toFormatString({ value: l.conversion }), ie = `${F.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })} ${n.baseUnit} ÷ ${N} × ${A} ${d.value}`;
1557
- return $(
1560
+ const N = E.toFormatString({ value: l.conversion }), ie = `${$.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })} ${n.baseUnit} ÷ ${N} × ${A} ${d.value}`;
1561
+ return B(
1558
1562
  ge.FmTooltip,
1559
1563
  { zIndex: 51 },
1560
1564
  {
@@ -1562,7 +1566,7 @@ const Sa = xt(
1562
1566
  return ie;
1563
1567
  },
1564
1568
  default() {
1565
- return $(
1569
+ return B(
1566
1570
  "div",
1567
1571
  { class: "text-right" },
1568
1572
  o.toLocaleString("en-US", {
@@ -1574,8 +1578,8 @@ const Sa = xt(
1574
1578
  }
1575
1579
  );
1576
1580
  } else {
1577
- const N = `${F.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })} ${n.baseUnit} × ${A} ${d.value}`;
1578
- return $(
1581
+ const N = `${$.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })} ${n.baseUnit} × ${A} ${d.value}`;
1582
+ return B(
1579
1583
  ge.FmTooltip,
1580
1584
  { zIndex: 51 },
1581
1585
  {
@@ -1583,7 +1587,7 @@ const Sa = xt(
1583
1587
  return N;
1584
1588
  },
1585
1589
  default() {
1586
- return $(
1590
+ return B(
1587
1591
  "div",
1588
1592
  { class: "text-right" },
1589
1593
  o.toLocaleString("en-US", {
@@ -1607,10 +1611,10 @@ const Sa = xt(
1607
1611
  size: 180,
1608
1612
  cell(v) {
1609
1613
  var L;
1610
- const n = v.row.original, o = n.systemValue, u = q.value.find((N) => N._id === n.id), l = (L = u == null ? void 0 : u.defaultCost) == null ? void 0 : L.measurement, F = n.systemBalance, A = n.costPerUnit;
1614
+ const n = v.row.original, o = n.systemValue, u = q.value.find((N) => N._id === n.id), l = (L = u == null ? void 0 : u.defaultCost) == null ? void 0 : L.measurement, $ = n.systemBalance, A = n.costPerUnit;
1611
1615
  if (l) {
1612
- const N = E.toFormatString({ value: l.conversion }), ie = `${F.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 4 })} ${n.baseUnit} ÷ ${N} × ${A} ${d.value}`;
1613
- return $(
1616
+ const N = E.toFormatString({ value: l.conversion }), ie = `${$.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 4 })} ${n.baseUnit} ÷ ${N} × ${A} ${d.value}`;
1617
+ return B(
1614
1618
  ge.FmTooltip,
1615
1619
  { zIndex: 51 },
1616
1620
  {
@@ -1618,7 +1622,7 @@ const Sa = xt(
1618
1622
  return ie;
1619
1623
  },
1620
1624
  default() {
1621
- return $(
1625
+ return B(
1622
1626
  "div",
1623
1627
  { class: "text-right" },
1624
1628
  o.toLocaleString("en-US", {
@@ -1630,8 +1634,8 @@ const Sa = xt(
1630
1634
  }
1631
1635
  );
1632
1636
  } else {
1633
- const N = `${F.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 4 })} ${n.baseUnit} × ${A} ${d.value}`;
1634
- return $(
1637
+ const N = `${$.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 4 })} ${n.baseUnit} × ${A} ${d.value}`;
1638
+ return B(
1635
1639
  ge.FmTooltip,
1636
1640
  { zIndex: 51 },
1637
1641
  {
@@ -1639,7 +1643,7 @@ const Sa = xt(
1639
1643
  return N;
1640
1644
  },
1641
1645
  default() {
1642
- return $(
1646
+ return B(
1643
1647
  "div",
1644
1648
  { class: "text-right" },
1645
1649
  o.toLocaleString("en-US", {
@@ -1661,41 +1665,41 @@ const Sa = xt(
1661
1665
  header: () => "Amounts",
1662
1666
  enableSorting: !1,
1663
1667
  cell(v) {
1664
- const n = v.row.original, o = (l, F) => $(
1668
+ const n = v.row.original, o = (l, $) => B(
1665
1669
  ge.FmTooltip,
1666
1670
  { zIndex: 50 },
1667
1671
  {
1668
1672
  default() {
1669
- return $(
1673
+ return B(
1670
1674
  "div",
1671
1675
  {
1672
1676
  class: "fm-typo-en-body-md-400 py-4 px-8 border-1 border-fm-color-typo-secondary fm-corner-radius-md line-clamp-1"
1673
1677
  },
1674
1678
  [
1675
- $("span", { class: "text-fm-color-typo-primary" }, `${l} `),
1676
- $(
1679
+ B("span", { class: "text-fm-color-typo-primary" }, `${l} `),
1680
+ B(
1677
1681
  "span",
1678
1682
  {
1679
1683
  class: "text-fm-color-typo-secondary",
1680
1684
  style: { maxWidth: "80px" }
1681
1685
  },
1682
- F
1686
+ $
1683
1687
  )
1684
1688
  ]
1685
1689
  );
1686
1690
  },
1687
1691
  content() {
1688
- return `${l} ${F}`;
1692
+ return `${l} ${$}`;
1689
1693
  }
1690
1694
  }
1691
1695
  );
1692
- let u = Array.from({ length: c }).map((l, F) => {
1693
- if (!n[`measurementAmount${F}`])
1696
+ let u = Array.from({ length: c }).map((l, $) => {
1697
+ if (!n[`measurementAmount${$}`])
1694
1698
  return null;
1695
- const A = n[`measurementAmount${F}`], L = n[`measurementAbbrev${F}`];
1699
+ const A = n[`measurementAmount${$}`], L = n[`measurementAbbrev${$}`];
1696
1700
  return o(A, L);
1697
1701
  }).filter((l) => l);
1698
- return (n.baseUnitAmount || !u.length) && (u = [o(n.baseUnitAmount, n.baseUnit), ...u]), $(
1702
+ return (n.baseUnitAmount || !u.length) && (u = [o(n.baseUnitAmount, n.baseUnit), ...u]), B(
1699
1703
  "div",
1700
1704
  {
1701
1705
  class: "flex gap-8 flex-nowrap",
@@ -1716,7 +1720,7 @@ const Sa = xt(
1716
1720
  )) ?? {};
1717
1721
  return q.value.map((o) => {
1718
1722
  var rt, lt, it, ct, ut, dt, mt, ft, pt, vt, gt;
1719
- const u = (rt = he.value.get(o._id)) == null ? void 0 : rt[0], l = ((lt = me.value.get(o._id)) == null ? void 0 : lt[0]) ?? b, F = ((it = o.defaultCost) == null ? void 0 : it.costPerUnit) ?? b, A = Number(E.toFormatString({ value: F })), L = ((ut = (ct = o.defaultCost) == null ? void 0 : ct.measurement) == null ? void 0 : ut.conversion) ?? {
1723
+ const u = (rt = he.value.get(o._id)) == null ? void 0 : rt[0], l = ((lt = me.value.get(o._id)) == null ? void 0 : lt[0]) ?? b, $ = ((it = o.defaultCost) == null ? void 0 : it.costPerUnit) ?? b, A = Number(E.toFormatString({ value: $ })), L = ((ut = (ct = o.defaultCost) == null ? void 0 : ct.measurement) == null ? void 0 : ut.conversion) ?? {
1720
1724
  amount: 1,
1721
1725
  precision: 0
1722
1726
  }, N = Number(
@@ -1726,7 +1730,7 @@ const Sa = xt(
1726
1730
  const de = pe[ee] ?? { amount: 0, precision: 0 }, fe = De == null ? void 0 : De[ee];
1727
1731
  fe && (pe[ee] = Xt(de, fe));
1728
1732
  }), !u) {
1729
- const ee = Number(E.toFormatString({ value: l })), de = ee - 0, fe = de * A / N, Le = 0, Pt = ee * A / N;
1733
+ const ee = Number(E.toFormatString({ value: l })), de = ee - 0, fe = de * A / N, Ne = 0, Pt = ee * A / N;
1730
1734
  return {
1731
1735
  id: o._id,
1732
1736
  code: o.code,
@@ -1743,7 +1747,7 @@ const Sa = xt(
1743
1747
  opening: ue,
1744
1748
  varianceQty: de,
1745
1749
  varianceInCost: fe,
1746
- stockTakeValue: Le,
1750
+ stockTakeValue: Ne,
1747
1751
  systemValue: Pt,
1748
1752
  adjustmentAmounts: pe
1749
1753
  };
@@ -1756,7 +1760,7 @@ const Sa = xt(
1756
1760
  ), ve = l.amount === 0 ? null : wt(ae, {
1757
1761
  ...l,
1758
1762
  amount: Math.abs(l.amount)
1759
- }), Ce = ve ? at(ve, G) : null, Ie = Number(E.toFormatString({ value: l })), We = Number(E.toFormatString({ value: U })), st = Ie - We, Ut = st * A / N, Rt = We * A / N, Vt = Ie * A / N;
1763
+ }), Fe = ve ? at(ve, G) : null, Ie = Number(E.toFormatString({ value: l })), We = Number(E.toFormatString({ value: U })), st = Ie - We, Ut = st * A / N, Rt = We * A / N, Vt = Ie * A / N;
1760
1764
  return {
1761
1765
  id: o._id,
1762
1766
  code: o.code,
@@ -1765,15 +1769,15 @@ const Sa = xt(
1765
1769
  baseUnit: o.unit.abbrev,
1766
1770
  baseUnitAmount: Number(E.toFormatString({ value: u.baseAmount })),
1767
1771
  ...u.measurementsAmounts.filter((ee) => {
1768
- var de, fe, Le;
1769
- return (Le = (fe = (de = C.value) == null ? void 0 : de.get(o._id)) == null ? void 0 : fe[0]) == null ? void 0 : Le.includes(ee.measurement.id);
1772
+ var de, fe, Ne;
1773
+ return (Ne = (fe = (de = C.value) == null ? void 0 : de.get(o._id)) == null ? void 0 : fe[0]) == null ? void 0 : Ne.includes(ee.measurement.id);
1770
1774
  }).reduce((ee, de, fe) => (ee[`measurementAbbrev${fe}`] = `(${de.measurement.abbrev}) × ${E.toFormatString({ value: de.measurement.conversion })}`, ee[`measurementAmount${fe}`] = Number(E.toFormatString({ value: de.amount })), ee), {}),
1771
1775
  systemBalance: Ie,
1772
1776
  physicalBalance: We,
1773
1777
  adjustedAmount: Number(E.toFormatString({ value: ae })),
1774
- adjustedDiffPercentage: Ce ? Number(
1778
+ adjustedDiffPercentage: Fe ? Number(
1775
1779
  E.toFormatString({
1776
- value: Ct(Ce, 2)
1780
+ value: Ft(Fe, 2)
1777
1781
  })
1778
1782
  ) : null,
1779
1783
  isTemplateItem: !c[o._id],
@@ -1785,7 +1789,7 @@ const Sa = xt(
1785
1789
  systemValue: Vt,
1786
1790
  adjustmentAmounts: pe
1787
1791
  };
1788
- }).filter((o) => !!(o.isTemplateItem && B.value.templateItem || !o.isTemplateItem && B.value.nonTemplateItem));
1792
+ }).filter((o) => !!(o.isTemplateItem && w.value.templateItem || !o.isTemplateItem && w.value.nonTemplateItem));
1789
1793
  }), Ae = M(() => {
1790
1794
  var a, v, n, o, u;
1791
1795
  if (!e.draft) return [];
@@ -1823,7 +1827,7 @@ const Sa = xt(
1823
1827
  },
1824
1828
  {
1825
1829
  label: "Effective at",
1826
- value: ye(e.draft.effectiveAt ?? ze((n = e.draft) == null ? void 0 : n._id))
1830
+ value: ye(e.draft.effectiveAt ?? He((n = e.draft) == null ? void 0 : n._id))
1827
1831
  },
1828
1832
  {
1829
1833
  label: "Using template",
@@ -1868,18 +1872,18 @@ const Sa = xt(
1868
1872
  remark: l.rejectRemark
1869
1873
  });
1870
1874
  return (u = e.draft) != null && u.approvedAt && (c.find(
1871
- (F) => {
1875
+ ($) => {
1872
1876
  var A;
1873
- return `${F.action}_${F.performedAt}` == `${Q.enum.approveDraft}_${(A = e.draft) == null ? void 0 : A.approvedAt}`;
1877
+ return `${$.action}_${$.performedAt}` == `${Q.enum.approveDraft}_${(A = e.draft) == null ? void 0 : A.approvedAt}`;
1874
1878
  }
1875
1879
  ) || c.push({
1876
1880
  action: Q.enum.approveDraft,
1877
1881
  performedAt: e.draft.approvedAt,
1878
1882
  performedBy: e.draft.approvedBy ?? { name: "Unknown", id: "unknown" },
1879
1883
  remark: e.draft.approveRemark
1880
- })), c.sort((l, F) => new Date(F.performedAt).getTime() - new Date(l.performedAt).getTime()).map(
1884
+ })), c.sort((l, $) => new Date($.performedAt).getTime() - new Date(l.performedAt).getTime()).map(
1881
1885
  (l) => ({
1882
- header: He(l.action),
1886
+ header: Oe(l.action),
1883
1887
  date: ye(l.performedAt),
1884
1888
  info: [
1885
1889
  {
@@ -1893,15 +1897,15 @@ const Sa = xt(
1893
1897
  ]
1894
1898
  })
1895
1899
  );
1896
- }), Me = Y(!1), Ge = Y(!1), jt = M(() => {
1900
+ }), Me = Y(!1), Le = Y(!1), jt = M(() => {
1897
1901
  var o, u;
1898
1902
  const c = je.value.filter((l) => l.physicalBalance < 0).map((l) => ({
1899
1903
  code: l.code,
1900
1904
  name: l.name
1901
1905
  })), a = ((u = (o = _.stockBalance.skus) == null ? void 0 : o.filter((l) => l.balance.amount < 0)) == null ? void 0 : u.map((l) => l.id)) ?? [], v = new Set(q.value.map((l) => l._id)), n = a.filter((l) => !v.has(l)).map((l) => {
1902
- var F, A;
1906
+ var $, A;
1903
1907
  return {
1904
- code: ((F = S.skuById[l]) == null ? void 0 : F.code) ?? "N/A",
1908
+ code: (($ = S.skuById[l]) == null ? void 0 : $.code) ?? "N/A",
1905
1909
  name: ((A = S.skuById[l]) == null ? void 0 : A.name) ?? "N/A"
1906
1910
  };
1907
1911
  });
@@ -1911,14 +1915,20 @@ const Sa = xt(
1911
1915
  return ((c = e.draft) == null ? void 0 : c.status) !== be.enum.DRAFT ? "Status is not draft." : null;
1912
1916
  });
1913
1917
  function It() {
1914
- e.draft && (Ge.value = !0, y.approveDraft(e.draft, () => {
1915
- Ge.value = !1, Me.value = !1, p("submitted");
1916
- }));
1918
+ e.draft && (Le.value = !0, y.approveDraft(
1919
+ e.draft,
1920
+ () => {
1921
+ Le.value = !1, Me.value = !1, p("submitted");
1922
+ },
1923
+ () => {
1924
+ Le.value = !1;
1925
+ }
1926
+ ));
1917
1927
  }
1918
1928
  return (c, a) => {
1919
1929
  var pe;
1920
- const v = K("FmButtonGroup"), n = K("FmMenuDivider"), o = K("FmCard"), u = K("FmButton"), l = K("FmCircularProgress"), F = K("FmChip"), A = K("FmTextField"), L = K("FmIcon"), N = K("FmTable"), ie = K("FmSpacer"), ue = K("FmTooltip"), De = K("FmSideSheet");
1921
- return w(), P(oe, null, [
1930
+ const v = K("FmButtonGroup"), n = K("FmMenuDivider"), o = K("FmCard"), u = K("FmButton"), l = K("FmCircularProgress"), $ = K("FmChip"), A = K("FmTextField"), L = K("FmIcon"), N = K("FmTable"), ie = K("FmSpacer"), ue = K("FmTooltip"), De = K("FmSideSheet");
1931
+ return F(), P(oe, null, [
1922
1932
  k(De, {
1923
1933
  "dismiss-away": "",
1924
1934
  "max-width": 9999,
@@ -1930,8 +1940,8 @@ const Sa = xt(
1930
1940
  var U, X, ae, ve;
1931
1941
  return [
1932
1942
  s("div", Dn, [
1933
- ((U = e.draft) == null ? void 0 : U.status) === g(be).enum.DRAFT ? (w(), P(oe, { key: 0 }, [
1934
- ot.value ? (w(), ce(ue, {
1943
+ ((U = e.draft) == null ? void 0 : U.status) === g(be).enum.DRAFT ? (F(), P(oe, { key: 0 }, [
1944
+ ot.value ? (F(), ce(ue, {
1935
1945
  key: 0,
1936
1946
  "z-index": 51,
1937
1947
  placement: "right"
@@ -1947,19 +1957,19 @@ const Sa = xt(
1947
1957
  })
1948
1958
  ]),
1949
1959
  _: 1
1950
- })) : (w(), ce(u, {
1960
+ })) : (F(), ce(u, {
1951
1961
  key: "approve key",
1952
1962
  label: "Approve",
1953
- onClick: a[5] || (a[5] = (Ce) => Me.value = !0)
1963
+ onClick: a[5] || (a[5] = (Fe) => Me.value = !0)
1954
1964
  }))
1955
1965
  ], 64)) : J("", !0),
1956
- ((X = e.draft) == null ? void 0 : X.status) === g(be).enum.DRAFT ? (w(), ce(u, {
1966
+ ((X = e.draft) == null ? void 0 : X.status) === g(be).enum.DRAFT ? (F(), ce(u, {
1957
1967
  key: 1,
1958
1968
  label: "Reject",
1959
1969
  variant: "destructive",
1960
1970
  onClick: a[6] || (a[6] = () => e.draft && g(y).rejectDraft(e.draft, () => p("submitted")))
1961
1971
  })) : J("", !0),
1962
- (ae = e.draft) != null && ae.approvedAt && ((ve = e.draft) == null ? void 0 : ve.status) !== g(be).enum.COMPLETED ? (w(), ce(Je, { key: 2 }, {
1972
+ (ae = e.draft) != null && ae.approvedAt && ((ve = e.draft) == null ? void 0 : ve.status) !== g(be).enum.COMPLETED ? (F(), ce(Je, { key: 2 }, {
1963
1973
  default: O(() => [
1964
1974
  k(u, {
1965
1975
  label: "Sync",
@@ -1976,7 +1986,7 @@ const Sa = xt(
1976
1986
  k(u, {
1977
1987
  label: "Close",
1978
1988
  variant: "tertiary",
1979
- onClick: a[8] || (a[8] = (Ce) => f.value = !1)
1989
+ onClick: a[8] || (a[8] = (Fe) => f.value = !1)
1980
1990
  })
1981
1991
  ])
1982
1992
  ];
@@ -1990,7 +2000,7 @@ const Sa = xt(
1990
2000
  "onUpdate:modelValue": a[0] || (a[0] = (U) => _e.value = U)
1991
2001
  }, null, 8, ["modelValue"])
1992
2002
  ]),
1993
- _e.value.value === "overview" ? (w(), P(oe, { key: 0 }, [
2003
+ _e.value.value === "overview" ? (F(), P(oe, { key: 0 }, [
1994
2004
  k(o, {
1995
2005
  variant: "outlined",
1996
2006
  class: "flex flex-col gap-8 px-12 py-16"
@@ -2002,13 +2012,13 @@ const Sa = xt(
2002
2012
  a[11] || (a[11] = s("div", { class: "fm-typo-en-body-lg-600" }, "Closing summary", -1)),
2003
2013
  s("div", Ha, [
2004
2014
  s("div", {
2005
- class: Be(["fm-status-badge", g(Oe)(((U = c.draft) == null ? void 0 : U.status) ?? "DRAFT")])
2006
- }, Z(g(He)(((X = c.draft) == null ? void 0 : X.status) ?? "")), 3)
2015
+ class: Be(["fm-status-badge", g(Ke)(((U = c.draft) == null ? void 0 : U.status) ?? "DRAFT")])
2016
+ }, Z(g(Oe)(((X = c.draft) == null ? void 0 : X.status) ?? "")), 3)
2007
2017
  ])
2008
2018
  ]),
2009
2019
  k(n),
2010
2020
  s("div", Oa, [
2011
- (w(!0), P(oe, null, $e(Ae.value, (ae, ve) => (w(), P("div", {
2021
+ (F(!0), P(oe, null, $e(Ae.value, (ae, ve) => (F(), P("div", {
2012
2022
  class: "flex flex-col gap-4",
2013
2023
  key: ve
2014
2024
  }, [
@@ -2025,7 +2035,7 @@ const Sa = xt(
2025
2035
  s("div", qa, [
2026
2036
  s("div", Ga, [
2027
2037
  a[12] || (a[12] = s("div", { class: "flex-1 fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, " Closing items ", -1)),
2028
- j.value ? J("", !0) : (w(), P("div", Wa, [
2038
+ j.value ? J("", !0) : (F(), P("div", Wa, [
2029
2039
  k(Je, null, {
2030
2040
  default: O(() => [
2031
2041
  k(u, {
@@ -2056,7 +2066,7 @@ const Sa = xt(
2056
2066
  })
2057
2067
  ]))
2058
2068
  ]),
2059
- j.value ? (w(), P("div", Za, [
2069
+ j.value ? (F(), P("div", Za, [
2060
2070
  a[14] || (a[14] = s("div", { class: "h-80" }, null, -1)),
2061
2071
  s("div", Ja, [
2062
2072
  s("div", null, [
@@ -2065,18 +2075,18 @@ const Sa = xt(
2065
2075
  a[13] || (a[13] = s("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Fetching info... ", -1))
2066
2076
  ]),
2067
2077
  a[15] || (a[15] = s("div", { class: "h-80" }, null, -1))
2068
- ])) : (w(), P(oe, { key: 1 }, [
2078
+ ])) : (F(), P(oe, { key: 1 }, [
2069
2079
  s("div", Xa, [
2070
2080
  s("div", en, [
2071
- k(F, {
2081
+ k($, {
2072
2082
  label: "Template Item(s)",
2073
- selected: B.value.templateItem,
2074
- onClick: a[2] || (a[2] = (U) => B.value.templateItem = !B.value.templateItem)
2083
+ selected: w.value.templateItem,
2084
+ onClick: a[2] || (a[2] = (U) => w.value.templateItem = !w.value.templateItem)
2075
2085
  }, null, 8, ["selected"]),
2076
- k(F, {
2086
+ k($, {
2077
2087
  label: "Non-template Item(s)",
2078
- selected: B.value.nonTemplateItem,
2079
- onClick: a[3] || (a[3] = (U) => B.value.nonTemplateItem = !B.value.nonTemplateItem)
2088
+ selected: w.value.nonTemplateItem,
2089
+ onClick: a[3] || (a[3] = (U) => w.value.nonTemplateItem = !w.value.nonTemplateItem)
2080
2090
  }, null, 8, ["selected"])
2081
2091
  ]),
2082
2092
  k(A, {
@@ -2085,8 +2095,8 @@ const Sa = xt(
2085
2095
  placeholder: "Filter items"
2086
2096
  }, null, 8, ["modelValue"])
2087
2097
  ]),
2088
- g(S).skuTags.size ? (w(), P("div", tn, [
2089
- (w(!0), P(oe, null, $e(g(S).skuTags.keys(), (U) => (w(), ce(F, {
2098
+ g(S).skuTags.size ? (F(), P("div", tn, [
2099
+ (F(!0), P(oe, null, $e(g(S).skuTags.keys(), (U) => (F(), ce($, {
2090
2100
  key: `${U}`,
2091
2101
  label: `${U}`,
2092
2102
  selectable: "",
@@ -2094,7 +2104,7 @@ const Sa = xt(
2094
2104
  onClick: (X) => z[`${U}`] = !z[`${U}`]
2095
2105
  }, {
2096
2106
  default: O(() => [
2097
- z[`${U}`] ? (w(), ce(L, {
2107
+ z[`${U}`] ? (F(), ce(L, {
2098
2108
  key: 0,
2099
2109
  name: "check",
2100
2110
  class: "text-white",
@@ -2127,9 +2137,9 @@ const Sa = xt(
2127
2137
  ], 64))
2128
2138
  ])
2129
2139
  ], 64)) : J("", !0),
2130
- _e.value.value === "history" ? (w(), P("div", nn, [
2131
- we.value.length ? (w(), P("div", rn, [
2132
- (w(!0), P(oe, null, $e(we.value, (U, X) => (w(), P(oe, { key: X }, [
2140
+ _e.value.value === "history" ? (F(), P("div", nn, [
2141
+ we.value.length ? (F(), P("div", rn, [
2142
+ (F(!0), P(oe, null, $e(we.value, (U, X) => (F(), P(oe, { key: X }, [
2133
2143
  s("div", ln, [
2134
2144
  s("div", cn, [
2135
2145
  s("div", un, [
@@ -2182,16 +2192,16 @@ const Sa = xt(
2182
2192
  }, {
2183
2193
  default: O(() => [
2184
2194
  s("div", hn, [
2185
- (w(!0), P(oe, null, $e(U.info, (ae, ve) => (w(), P("div", {
2195
+ (F(!0), P(oe, null, $e(U.info, (ae, ve) => (F(), P("div", {
2186
2196
  key: ve,
2187
2197
  class: "flex flex-col gap-4"
2188
2198
  }, [
2189
2199
  s("div", kn, Z(ae == null ? void 0 : ae.label), 1),
2190
2200
  s("div", _n, [
2191
- (w(!0), P(oe, null, $e(ae == null ? void 0 : ae.values, (Ce, Ie) => (w(), P("div", {
2201
+ (F(!0), P(oe, null, $e(ae == null ? void 0 : ae.values, (Fe, Ie) => (F(), P("div", {
2192
2202
  key: Ie,
2193
2203
  class: "fm-typo-en-body-lg-600"
2194
- }, Z(Ce), 1))), 128))
2204
+ }, Z(Fe), 1))), 128))
2195
2205
  ])
2196
2206
  ]))), 128))
2197
2207
  ])
@@ -2201,7 +2211,7 @@ const Sa = xt(
2201
2211
  ])
2202
2212
  ])
2203
2213
  ], 64))), 128))
2204
- ])) : (w(), P("div", on, [
2214
+ ])) : (F(), P("div", on, [
2205
2215
  k(ie),
2206
2216
  s("div", null, [
2207
2217
  s("img", {
@@ -2219,13 +2229,13 @@ const Sa = xt(
2219
2229
  ]),
2220
2230
  _: 1
2221
2231
  }, 8, ["model-value"]),
2222
- g(f) ? (w(), ce(Na, {
2232
+ g(f) ? (F(), ce(Na, {
2223
2233
  key: 0,
2224
2234
  show: Me.value,
2225
2235
  "onUpdate:show": a[10] || (a[10] = (U) => Me.value = U),
2226
2236
  "negative-items": jt.value,
2227
2237
  refreshing: V.value,
2228
- approving: Ge.value,
2238
+ approving: Le.value,
2229
2239
  "has-stock-snapshot": !!((pe = e.draft) != null && pe.stockSnapshot),
2230
2240
  onRefresh: se,
2231
2241
  onApprove: It
@@ -2233,10 +2243,10 @@ const Sa = xt(
2233
2243
  ], 64);
2234
2244
  };
2235
2245
  }
2236
- }), Sn = { class: "flex-1 flex flex-col gap-8" }, wn = { class: "flex flex-col" }, Cn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Fn = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, $n = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, Bn = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, Wn = /* @__PURE__ */ Re({
2246
+ }), Sn = { class: "flex-1 flex flex-col gap-8" }, wn = { class: "flex flex-col" }, Fn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Cn = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, $n = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, Bn = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, Wn = /* @__PURE__ */ Re({
2237
2247
  __name: "ClosingDraftView",
2238
2248
  setup(i) {
2239
- const { t: r } = _t(), { viewDraft: e } = Ye(), { viewClosingDraftProps: d, viewClosingDraftShow: _ } = Gt(Ye()), y = Qe(), f = Sa(), j = Et(), { breakpoints: V } = Kt();
2249
+ const { t: r } = _t(), { viewDraft: e } = Qe(), { viewClosingDraftProps: d, viewClosingDraftShow: _ } = Gt(Qe()), y = qe(), f = Sa(), j = Et(), { breakpoints: V } = Kt();
2240
2250
  y.watchLocation(f.fetchDrafts);
2241
2251
  const T = M(() => f.loading), x = Y(""), D = M(() => V.value.xs || V.value.sm), I = M(() => D.value ? 10 : 20);
2242
2252
  function W(S) {
@@ -2263,7 +2273,7 @@ const Sa = xt(
2263
2273
  ]);
2264
2274
  return (S, R) => {
2265
2275
  const z = K("FmTable");
2266
- return w(), P(oe, null, [
2276
+ return F(), P(oe, null, [
2267
2277
  k(zt, {
2268
2278
  title: g(r)("inventory.closing.draft.title"),
2269
2279
  actions: t.value,
@@ -2300,18 +2310,18 @@ const Sa = xt(
2300
2310
  onRowClick: (p) => g(e)(p)
2301
2311
  }, {
2302
2312
  default: O((p) => {
2303
- var B, H, q, C, b, G, ne, se, le, me, he, ke, Ve, te, Te, Pe, xe, je, Ae, Se;
2313
+ var w, H, q, C, b, G, ne, se, le, me, he, ke, Ve, te, Te, Pe, xe, je, Ae, Se;
2304
2314
  return [
2305
2315
  s("div", Sn, [
2306
2316
  s("div", wn, [
2307
- s("div", Cn, [
2308
- k(g(Ne), {
2309
- render: (q = (H = (B = p._id) == null ? void 0 : B.column) == null ? void 0 : H.columnDef) == null ? void 0 : q.cell,
2317
+ s("div", Fn, [
2318
+ k(g(Ee), {
2319
+ render: (q = (H = (w = p._id) == null ? void 0 : w.column) == null ? void 0 : H.columnDef) == null ? void 0 : q.cell,
2310
2320
  props: (b = (C = p._id) == null ? void 0 : C.getContext) == null ? void 0 : b.call(C)
2311
2321
  }, null, 8, ["render", "props"])
2312
2322
  ]),
2313
- s("div", Fn, [
2314
- k(g(Ne), {
2323
+ s("div", Cn, [
2324
+ k(g(Ee), {
2315
2325
  render: (se = (ne = (G = p.name) == null ? void 0 : G.column) == null ? void 0 : ne.columnDef) == null ? void 0 : se.cell,
2316
2326
  props: (me = (le = p.name) == null ? void 0 : le.getContext) == null ? void 0 : me.call(le)
2317
2327
  }, null, 8, ["render", "props"])
@@ -2321,14 +2331,14 @@ const Sa = xt(
2321
2331
  ...h.original.items.length >= 3 ? [`and ${h.original.items.length - 3} more items`] : []
2322
2332
  ].join(", ")), 1),
2323
2333
  s("div", Bn, [
2324
- k(g(Ne), {
2334
+ k(g(Ee), {
2325
2335
  render: (Ve = (ke = (he = p.ref) == null ? void 0 : he.column) == null ? void 0 : ke.columnDef) == null ? void 0 : Ve.cell,
2326
2336
  props: (Te = (te = p.ref) == null ? void 0 : te.getContext) == null ? void 0 : Te.call(te)
2327
2337
  }, null, 8, ["render", "props"])
2328
2338
  ])
2329
2339
  ]),
2330
2340
  s("div", null, [
2331
- k(g(Ne), {
2341
+ k(g(Ee), {
2332
2342
  render: (je = (xe = (Pe = p.status) == null ? void 0 : Pe.column) == null ? void 0 : xe.columnDef) == null ? void 0 : je.cell,
2333
2343
  props: (Se = (Ae = p.status) == null ? void 0 : Ae.getContext) == null ? void 0 : Se.call(Ae)
2334
2344
  }, null, 8, ["render", "props"])
@@ -2345,7 +2355,7 @@ const Sa = xt(
2345
2355
  ]),
2346
2356
  _: 1
2347
2357
  }, 8, ["title", "actions"]),
2348
- (w(), ce(Lt, { to: "body" }, [
2358
+ (F(), ce(Lt, { to: "body" }, [
2349
2359
  k(An, Nt(g(d), {
2350
2360
  show: g(_),
2351
2361
  "onUpdate:show": R[2] || (R[2] = (h) => bt(_) ? _.value = h : null),