@feedmepos/mf-inventory-portal 1.2.44-dev.1 → 1.2.44-dev.2

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 (67) hide show
  1. package/dist/{App-D6h4PbkJ.js → App-BO6IVlu7.js} +3 -3
  2. package/dist/{ApprovalView-Bll-QWib.js → ApprovalView-CVX6nsha.js} +5 -5
  3. package/dist/{BindingsDialog-cm-tG1Du.js → BindingsDialog-CvoCVSNi.js} +2 -2
  4. package/dist/{BindingsPicker-Ca0BxJKj.js → BindingsPicker-BgJRr_DM.js} +2 -2
  5. package/dist/{BindingsTable-BBNWeq4W.js → BindingsTable-CoXmqfkS.js} +3 -3
  6. package/dist/{ClosingDraftView-r2C27qph.js → ClosingDraftView-DJOHSc45.js} +331 -332
  7. package/dist/{ClosingHistoryView-CGV72nOD.js → ClosingHistoryView-D_-BFRz0.js} +3 -3
  8. package/dist/{ClosingTemplateView-Xij995aZ.js → ClosingTemplateView-Bk3D5Snj.js} +14 -14
  9. package/dist/{DeliveryOrderPrintPreview-BoBBu5lC.js → DeliveryOrderPrintPreview-Cb64kpGv.js} +1 -1
  10. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-SnXudMX4.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DFANhaaJ.js} +4 -4
  11. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-ClY0PFyA.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DF_WpezC.js} +2 -2
  12. package/dist/{FmMultiselectDialog-BcZpbDMT.js → FmMultiselectDialog-Cfc5qRdH.js} +2 -2
  13. package/dist/{FmMultiselectDialog-C9g5u6Kk.js → FmMultiselectDialog-DeHxbT6C.js} +1 -1
  14. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-B-PD6CbF.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BrCLK3_O.js} +3 -3
  15. package/dist/{ImportView-CzMwJY2A.js → ImportView-CwTD-Oy5.js} +6 -6
  16. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DgOrurbQ.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DLq0PwYt.js} +1 -1
  17. package/dist/{IngredientGroupView-DBbwP3E6.js → IngredientGroupView-C9IrJkA2.js} +5 -5
  18. package/dist/{IngredientsView-jRqkzOTc.js → IngredientsView-cx05yMa1.js} +14 -14
  19. package/dist/{IntegrationView-B-_39POT.js → IntegrationView-DyhKmpP1.js} +12 -12
  20. package/dist/{InventoryBindingForm-D14aWQqg.js → InventoryBindingForm-BiPyN399.js} +1 -1
  21. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DtHtGqKw.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-B4hiEtLq.js} +4 -4
  22. package/dist/{InventoryBindingSummary-B7Q-G4Fx.js → InventoryBindingSummary-CLipXxCy.js} +1 -1
  23. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CqB7pkKN.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-dpwW1B9T.js} +1 -1
  24. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BfHSMN6k.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CFi82_2z.js} +2 -2
  25. package/dist/{PublishView-C_icogKG.js → PublishView-xqkAIXWI.js} +3 -3
  26. package/dist/{PurchaseOrderPrintPreview-BeXqhfRn.js → PurchaseOrderPrintPreview-DQgycOZX.js} +1 -1
  27. package/dist/{ReceiveRequestView-COdOrOyg.js → ReceiveRequestView-Bteeg8L4.js} +18 -18
  28. package/dist/{RecipeView-Desvtm1a.js → RecipeView-Wr4d3B_9.js} +8 -8
  29. package/dist/{StockView-B1NDBHQh.js → StockView-CkKpgWUl.js} +15 -15
  30. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CbCD3pOQ.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DSGGTbPw.js} +1 -1
  31. package/dist/{SupplierView-CB6Gz5HH.js → SupplierView-BK-t2Qtu.js} +11 -11
  32. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-3bruORgT.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-D7L13xxB.js} +2 -2
  33. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-C0Vd0X-5.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-DWMif1dO.js} +1 -1
  34. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-Bnt6-X4t.js → TransferDetails.vue_vue_type_script_setup_true_lang-0tyNbKG0.js} +14 -14
  35. package/dist/{TransferTemplateView-CLeLzBvW.js → TransferTemplateView-qIlYcciH.js} +15 -15
  36. package/dist/{UnitView-YM302P8g.js → UnitView-B5boUZuR.js} +6 -6
  37. package/dist/{WarehouseView-D69BsVsb.js → WarehouseView-C3PXZgeW.js} +5 -5
  38. package/dist/{WastageTemplateView-DfP43M8-.js → WastageTemplateView-BfJZ5Heq.js} +14 -14
  39. package/dist/{app-BuvV4n4w.js → app-IXE7AiJd.js} +7 -7
  40. package/dist/app.js +1 -1
  41. package/dist/{closing-template-D1NlAV-G.js → closing-template-Bdb3yRUm.js} +1 -1
  42. package/dist/{date2-CkkGwYSP.js → date2-FhBpgAsI.js} +1 -1
  43. package/dist/{dayjs.min-DFvOuCCo.js → dayjs.min-DzvYG-ky.js} +1 -1
  44. package/dist/{decimal-D1O4-kbG.js → decimal-Io-Hwy_Y.js} +2 -2
  45. package/dist/{defineDeepModel-s0no34Rq.js → defineDeepModel-D8sQDXuo.js} +1 -1
  46. package/dist/{duplicate-template-DJceVj9n.js → duplicate-template-DnygqbZo.js} +1 -1
  47. package/dist/{feature-AINxwcz_.js → feature-C4FdNiJm.js} +2 -2
  48. package/dist/{format-time-from-id-CRiwabgV.js → format-time-from-id-oJMEPmai.js} +1 -1
  49. package/dist/{format-unit-display-kd8gPWFg.js → format-unit-display-CyyP1TnC.js} +10 -10
  50. package/dist/{import-export.helper-CtI9oUN_.js → import-export.helper-C33N1h7C.js} +5 -5
  51. package/dist/{index-BVBQnKv6.js → index-DYfJ9nqH.js} +3 -3
  52. package/dist/{index-Af5Cs7r5.js → index-DdtrR7II.js} +1 -1
  53. package/dist/{index-DKTL7IN3.js → index-qDt3kqgv.js} +1 -1
  54. package/dist/{lodash-TAQPcjEK.js → lodash-DRz5U0Za.js} +1 -1
  55. package/dist/{netsuite-CcC4Y1c-.js → netsuite-CIv-Yh60.js} +3 -3
  56. package/dist/{purchase-order-template-B-Xuh5oQ.js → purchase-order-template-CX62LUzz.js} +1 -1
  57. package/dist/{rules-DwOMpBOV.js → rules-DmJTahUJ.js} +3 -3
  58. package/dist/{stock-DolMZJgQ.js → stock-BAtpqZgN.js} +3 -3
  59. package/dist/{stock-X1ADgvOm.js → stock-dMNUMGOC.js} +1 -1
  60. package/dist/{supplier-DTzECjWy.js → supplier-B2g3AW72.js} +2 -2
  61. package/dist/{use-ingredient-select-dialog-D7UCiLcS.js → use-ingredient-select-dialog-ZyFtPCb9.js} +2 -2
  62. package/dist/{use-inventory-binding-dialog-uYYsTsLi.js → use-inventory-binding-dialog-CRgPd2qi.js} +2 -2
  63. package/dist/{use-template-enabled-locations-2-l2e5ocrp.js → use-template-enabled-locations-2-S598U0zh.js} +2 -2
  64. package/dist/{vue-i18n-anAmA_v_.js → vue-i18n-CoLcy8bm.js} +316 -316
  65. package/dist/{xlsx-CtBehOaB.js → xlsx-CtFn9Ikt.js} +1 -1
  66. package/dist/{xlsx.util-jpTCFIaP.js → xlsx.util-C5Ug4P4c.js} +1 -1
  67. package/package.json +1 -1
@@ -1,46 +1,46 @@
1
- import { defineComponent as He, ref as Y, computed as L, onMounted as Ze, resolveComponent as z, openBlock as S, createElementBlock as E, Fragment as ie, createTextVNode as se, createBlock as oe, withCtx as Q, createElementVNode as c, toDisplayString as ne, unref as $, createVNode as A, createCommentVNode as te, h as x, reactive as It, watch as Ut, isRef as vt, normalizeClass as Fe, renderList as Te, normalizeStyle as gt, Teleport as Pt, mergeProps as Rt } from "vue";
1
+ import { defineComponent as He, ref as Y, computed as L, onMounted as Ze, resolveComponent as z, openBlock as F, createElementBlock as E, Fragment as le, createTextVNode as oe, createBlock as ie, withCtx as Q, createElementVNode as c, toDisplayString as ae, unref as $, createVNode as D, createCommentVNode as ne, h as A, reactive as It, watch as Ut, isRef as vt, normalizeClass as Fe, renderList as Te, normalizeStyle as gt, Teleport as Pt, mergeProps as Rt } from "vue";
2
2
  import { F as Ge, u as Mt, _ as Vt } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js";
3
3
  import { useCoreStore as yt, useI18n as bt } from "@feedmepos/mf-common";
4
4
  import { useSnackbar as Je, useDialog as Lt, useProxiedModel as Nt, components as ge, useBreakpoints as Et } from "@feedmepos/ui-library";
5
- import { o as zt, u as Oe, H as O, s as V, I as ht, J as pe, A as Ve, v as Le, c as Ht, a as Ot } from "./app-BuvV4n4w.js";
5
+ import { o as zt, u as Oe, H as O, s as V, I as ht, J as ve, A as Ve, v as Le, c as Ht, a as Ot } from "./app-IXE7AiJd.js";
6
6
  import { defineStore as kt, storeToRefs as Yt } from "pinia";
7
- import { d as Ee, e as Dt, f as Kt, a as ye } from "./date2-CkkGwYSP.js";
8
- import { R as Qt, f as Xe, a as We, t as qt, d as je, o as xt, p as At, m as _t, l as Gt } from "./rules-DwOMpBOV.js";
9
- import { b as Wt, d as Zt } from "./xlsx.util-jpTCFIaP.js";
10
- import { u as wt } from "./stock-DolMZJgQ.js";
11
- import { u as et } from "./stock-X1ADgvOm.js";
7
+ import { d as Ee, e as Dt, f as Kt, a as ye } from "./date2-FhBpgAsI.js";
8
+ import { R as Qt, f as Xe, a as We, t as qt, d as je, o as xt, p as At, m as _t, l as Gt } from "./rules-DmJTahUJ.js";
9
+ import { b as Wt, d as Zt } from "./xlsx.util-C5Ug4P4c.js";
10
+ import { u as wt } from "./stock-BAtpqZgN.js";
11
+ import { u as et } from "./stock-dMNUMGOC.js";
12
12
  import { D as pt, R as Se } from "./row-action.enum-BcW_L_nE.js";
13
13
  import { c as Jt, _ as Xt, F as Me } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-cfFHDIwQ.js";
14
- import { f as ea } from "./format-time-from-id-CRiwabgV.js";
15
- import { _ as ta } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-ClY0PFyA.js";
14
+ import { f as ea } from "./format-time-from-id-oJMEPmai.js";
15
+ import { _ as ta } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DF_WpezC.js";
16
16
  import { E as aa } from "./empty-placeholder-wf6-BWE8.js";
17
- const Ye = zt((l, s) => {
17
+ const Ye = zt((r, s) => {
18
18
  function e() {
19
19
  return Oe().currentLocation.dbName;
20
20
  }
21
21
  return {
22
22
  async getDraft(d) {
23
- const h = e(), y = `${l.inventoryBackendUrl}/${h}/closing-draft/${d}`;
23
+ const h = e(), y = `${r.inventoryBackendUrl}/${h}/closing-draft/${d}`;
24
24
  return s.get(y);
25
25
  },
26
26
  async readDrafts() {
27
- const d = e(), h = `${l.inventoryBackendUrl}/${d}/closing-draft`;
27
+ const d = e(), h = `${r.inventoryBackendUrl}/${d}/closing-draft`;
28
28
  return s.get(h);
29
29
  },
30
30
  async runOperation(d) {
31
- const h = e(), y = `${l.inventoryBackendUrl}/${h}/closing-draft/run-operation`;
31
+ const h = e(), y = `${r.inventoryBackendUrl}/${h}/closing-draft/run-operation`;
32
32
  return s.post(y, d);
33
33
  },
34
34
  async runOperationV1(d) {
35
- const h = e(), y = `${l.inventoryBackendUrl}/${h}/closing-draft/v1/run-operation`;
35
+ const h = e(), y = `${r.inventoryBackendUrl}/${h}/closing-draft/v1/run-operation`;
36
36
  return s.post(y, d);
37
37
  },
38
38
  async sync(d) {
39
- const h = e(), y = `${l.inventoryBackendUrl}/${h}/closing-draft/sync`;
39
+ const h = e(), y = `${r.inventoryBackendUrl}/${h}/closing-draft/sync`;
40
40
  return s.post(y, d);
41
41
  },
42
42
  async cloneDraft(d) {
43
- const h = e(), y = `${l.inventoryBackendUrl}/${h}/closing-draft/${d}/clone`;
43
+ const h = e(), y = `${r.inventoryBackendUrl}/${h}/closing-draft/${d}/clone`;
44
44
  return s.post(y, {});
45
45
  }
46
46
  };
@@ -58,8 +58,8 @@ const Ye = zt((l, s) => {
58
58
  onCancel: { type: Function },
59
59
  onFinished: { type: Function }
60
60
  },
61
- setup(l) {
62
- const s = l, e = Y(), d = Ye(), h = Je(), y = Y(!1), b = Y(null), I = Y(!1), M = L(() => {
61
+ setup(r) {
62
+ const s = r, e = Y(), d = Ye(), h = Je(), y = Y(!1), b = Y(null), I = Y(!1), M = L(() => {
63
63
  switch (s.action) {
64
64
  case O.enum.approveDraft:
65
65
  return "Approve";
@@ -147,8 +147,8 @@ const Ye = zt((l, s) => {
147
147
  }
148
148
  }
149
149
  return (u, t) => {
150
- const _ = z("FmLabel"), R = z("FmDatePicker"), N = z("FmTimePicker"), g = z("FmTextField"), m = z("FmButton"), F = z("FmForm");
151
- return I.value ? (S(), oe(F, {
150
+ const _ = z("FmLabel"), R = z("FmDatePicker"), N = z("FmTimePicker"), g = z("FmTextField"), m = z("FmButton"), S = z("FmForm");
151
+ return I.value ? (F(), ie(S, {
152
152
  key: 1,
153
153
  onValidationSuccess: q,
154
154
  class: "flex flex-col gap-32",
@@ -156,35 +156,35 @@ const Ye = zt((l, s) => {
156
156
  }, {
157
157
  default: Q(() => [
158
158
  c("div", na, [
159
- t[5] || (t[5] = se(" You are about to ")),
160
- c("span", oa, ne(M.value), 1),
161
- t[6] || (t[6] = se(" this draft. Please provide a remark to justify this action. "))
159
+ t[5] || (t[5] = oe(" You are about to ")),
160
+ c("span", oa, ae(M.value), 1),
161
+ t[6] || (t[6] = oe(" this draft. Please provide a remark to justify this action. "))
162
162
  ]),
163
- u.action === $(O).enum.approveDraft ? (S(), E("div", sa, [
164
- A(_, { class: "fm-typo-en-body-lg-600" }, {
163
+ u.action === $(O).enum.approveDraft ? (F(), E("div", sa, [
164
+ D(_, { class: "fm-typo-en-body-lg-600" }, {
165
165
  default: Q(() => t[7] || (t[7] = [
166
- se("Closing Date")
166
+ oe("Closing Date")
167
167
  ])),
168
168
  _: 1
169
169
  }),
170
- A(R, {
170
+ D(R, {
171
171
  modelValue: k.value,
172
172
  "onUpdate:modelValue": t[0] || (t[0] = (H) => k.value = H),
173
173
  max: $(Ee)(/* @__PURE__ */ new Date())
174
174
  }, null, 8, ["modelValue", "max"]),
175
- A(_, { class: "fm-typo-en-body-lg-600" }, {
175
+ D(_, { class: "fm-typo-en-body-lg-600" }, {
176
176
  default: Q(() => t[8] || (t[8] = [
177
- se("Closing Time")
177
+ oe("Closing Time")
178
178
  ])),
179
179
  _: 1
180
180
  }),
181
- A(N, {
181
+ D(N, {
182
182
  modelValue: P.value,
183
183
  "onUpdate:modelValue": t[1] || (t[1] = (H) => P.value = H)
184
184
  }, null, 8, ["modelValue"]),
185
- B.value ? (S(), E("div", ra, " Cannot select future date ")) : te("", !0)
186
- ])) : te("", !0),
187
- A(g, {
185
+ B.value ? (F(), E("div", ra, " Cannot select future date ")) : ne("", !0)
186
+ ])) : ne("", !0),
187
+ D(g, {
188
188
  modelValue: e.value,
189
189
  "onUpdate:modelValue": t[2] || (t[2] = (H) => e.value = H),
190
190
  label: "Remark",
@@ -192,14 +192,14 @@ const Ye = zt((l, s) => {
192
192
  rules: [$(Qt)()]
193
193
  }, null, 8, ["modelValue", "rules"]),
194
194
  c("div", la, [
195
- A(m, {
195
+ D(m, {
196
196
  label: "Cancel",
197
197
  variant: "tertiary",
198
198
  onClick: t[3] || (t[3] = (H) => u.onCancel())
199
199
  }),
200
- u.action === $(O).enum.approveDraft ? (S(), oe(Ge, { key: 0 }, {
200
+ u.action === $(O).enum.approveDraft ? (F(), ie(Ge, { key: 0 }, {
201
201
  default: Q(() => [
202
- A(m, {
202
+ D(m, {
203
203
  label: "Approve (Legacy)",
204
204
  type: "button",
205
205
  onClick: t[4] || (t[4] = (H) => q(!0)),
@@ -209,8 +209,8 @@ const Ye = zt((l, s) => {
209
209
  }, null, 8, ["variant", "loading", "disabled"])
210
210
  ]),
211
211
  _: 1
212
- })) : te("", !0),
213
- A(m, {
212
+ })) : ne("", !0),
213
+ D(m, {
214
214
  label: M.value,
215
215
  type: "submit",
216
216
  variant: U.value,
@@ -219,42 +219,42 @@ const Ye = zt((l, s) => {
219
219
  ])
220
220
  ]),
221
221
  _: 1
222
- }, 8, ["disabled"])) : (S(), E(ie, { key: 0 }, [
223
- se("Loading")
222
+ }, 8, ["disabled"])) : (F(), E(le, { key: 0 }, [
223
+ oe("Loading")
224
224
  ], 64));
225
225
  };
226
226
  }
227
227
  }), ia = je(0);
228
- function St(l) {
229
- const s = l.measurementsAmounts.groupBy((d) => d.measurement.id), e = l.sku.unit.measurements.reduce((d, h) => {
228
+ function St(r) {
229
+ const s = r.measurementsAmounts.groupBy((d) => d.measurement.id), e = r.sku.unit.measurements.reduce((d, h) => {
230
230
  var I, M;
231
231
  const y = ((M = (I = s.get(h.id)) == null ? void 0 : I[0]) == null ? void 0 : M.amount) ?? ia, b = Xe(h.conversion, y);
232
232
  return d + +We(b);
233
- }, +We(l.baseAmount));
234
- return qt(e, l.baseAmount.precision);
233
+ }, +We(r.baseAmount));
234
+ return qt(e, r.baseAmount.precision);
235
235
  }
236
236
  const ca = je(0), ua = je(100), Ft = "N/A";
237
- function ma(l, s, e, d, h, y) {
237
+ function ma(r, s, e, d, h, y) {
238
238
  var K, J, w, X, me;
239
- const b = St(l), I = d ?? b, M = xt(I, s), U = s.amount === 0 ? null : At(M, {
239
+ const b = St(r), I = d ?? b, M = xt(I, s), U = s.amount === 0 ? null : At(M, {
240
240
  ...s,
241
241
  amount: Math.abs(s.amount)
242
- }), k = U ? Xe(U, ua) : null, P = ((K = l.sku.defaultCost) == null ? void 0 : K.costPerUnit) ?? { amount: 0, precision: 0 }, B = Number(V.toFormatString({ value: P })), q = ((w = (J = l.sku.defaultCost) == null ? void 0 : J.measurement) == null ? void 0 : w.conversion) ?? {
242
+ }), k = U ? Xe(U, ua) : null, P = ((K = r.sku.defaultCost) == null ? void 0 : K.costPerUnit) ?? { amount: 0, precision: 0 }, B = Number(V.toFormatString({ value: P })), q = ((w = (J = r.sku.defaultCost) == null ? void 0 : J.measurement) == null ? void 0 : w.conversion) ?? {
243
243
  amount: 1,
244
244
  precision: 0
245
245
  }, u = Number(
246
246
  V.toFormatString({ value: q })
247
- ), t = h ? Number(V.toFormatString({ value: h })) : 0, _ = Number(V.toFormatString({ value: s })), R = Number(V.toFormatString({ value: I })), N = _ - R, g = N * B / u, m = R * B / u, F = _ * B / u;
247
+ ), t = h ? Number(V.toFormatString({ value: h })) : 0, _ = Number(V.toFormatString({ value: s })), R = Number(V.toFormatString({ value: I })), N = _ - R, g = N * B / u, m = R * B / u, S = _ * B / u;
248
248
  return {
249
- code: l.sku.code,
250
- name: l.sku.name,
251
- baseUnit: l.sku.unit.abbrev,
252
- costUnit: ((me = (X = l.sku.defaultCost) == null ? void 0 : X.measurement) == null ? void 0 : me.abbrev) ?? null,
253
- baseUnitAmount: Number(V.toFormatString({ value: l.baseAmount })),
254
- ...l.measurementsAmounts.filter(
255
- (ae) => da(ae.measurement) && e.includes(ae.measurement.id)
249
+ code: r.sku.code,
250
+ name: r.sku.name,
251
+ baseUnit: r.sku.unit.abbrev,
252
+ costUnit: ((me = (X = r.sku.defaultCost) == null ? void 0 : X.measurement) == null ? void 0 : me.abbrev) ?? null,
253
+ baseUnitAmount: Number(V.toFormatString({ value: r.baseAmount })),
254
+ ...r.measurementsAmounts.filter(
255
+ (te) => da(te.measurement) && e.includes(te.measurement.id)
256
256
  ).reduce(
257
- (ae, re, de) => (ae[`measurementAbbrev${de}`] = `(${re.measurement.abbrev}) × ${V.toFormatString({ value: re.measurement.conversion })}`, ae[`measurementAmount${de}`] = Number(V.toFormatString({ value: re.amount })), ae),
257
+ (te, se, de) => (te[`measurementAbbrev${de}`] = `(${se.measurement.abbrev}) × ${V.toFormatString({ value: se.measurement.conversion })}`, te[`measurementAmount${de}`] = Number(V.toFormatString({ value: se.amount })), te),
258
258
  {}
259
259
  ),
260
260
  systemBalance: _,
@@ -271,15 +271,15 @@ function ma(l, s, e, d, h, y) {
271
271
  varianceQty: N,
272
272
  varianceInCost: g,
273
273
  stockTakeValue: m,
274
- systemValue: F
274
+ systemValue: S
275
275
  };
276
276
  }
277
- function da(l) {
278
- return !l.abbrev.toLocaleLowerCase().includes("inactive");
277
+ function da(r) {
278
+ return !r.abbrev.toLocaleLowerCase().includes("inactive");
279
279
  }
280
- function fa(l) {
281
- const s = Ct(l);
282
- return l.reduce(
280
+ function fa(r) {
281
+ const s = Ct(r);
282
+ return r.reduce(
283
283
  (e, d) => {
284
284
  var h;
285
285
  return Math.max(e, ((h = s == null ? void 0 : s.get(d.sku._id)) == null ? void 0 : h[0].length) ?? 0);
@@ -287,13 +287,13 @@ function fa(l) {
287
287
  0
288
288
  );
289
289
  }
290
- function Ct(l) {
291
- return l.groupBy(
290
+ function Ct(r) {
291
+ return r.groupBy(
292
292
  (s) => s.sku._id,
293
293
  (s) => s.measurementsAmounts.filter((e) => !e.measurement.abbrev.toLocaleLowerCase().includes("inactive")).map((e) => e.measurement.id)
294
294
  );
295
295
  }
296
- function pa(l) {
296
+ function pa(r) {
297
297
  const s = ht(), e = s === "MYR" ? "RM" : s;
298
298
  return [
299
299
  {
@@ -360,7 +360,7 @@ function pa(l) {
360
360
  id: "baseUnitAmount",
361
361
  name: "Base unit amount"
362
362
  },
363
- ...Array.from({ length: l }).flatMap((h, y) => [
363
+ ...Array.from({ length: r }).flatMap((h, y) => [
364
364
  {
365
365
  id: `measurementAmount${y}`,
366
366
  name: `UOM amount ${y + 1}`
@@ -372,8 +372,8 @@ function pa(l) {
372
372
  ])
373
373
  ];
374
374
  }
375
- function va(l, s, e) {
376
- var N, g, m, F, H, K, J;
375
+ function va(r, s, e) {
376
+ var N, g, m, S, H, K, J;
377
377
  const d = s.groupBy(
378
378
  (w) => w.id,
379
379
  (w) => w.balance
@@ -381,51 +381,51 @@ function va(l, s, e) {
381
381
  (w) => w.id,
382
382
  (w) => w.balance
383
383
  ), y = /* @__PURE__ */ new Map();
384
- if (l.opening)
385
- for (const w of l.opening)
384
+ if (r.opening)
385
+ for (const w of r.opening)
386
386
  y.set(w.skuId, w.balance);
387
387
  const b = /* @__PURE__ */ new Map();
388
- if (l.adjustmentSnapshot)
389
- for (const w of l.adjustmentSnapshot) {
388
+ if (r.adjustmentSnapshot)
389
+ for (const w of r.adjustmentSnapshot) {
390
390
  const X = Object.keys(w.adjustmentsByType).join(", ");
391
391
  b.set(w.skuId, X || Ft);
392
392
  }
393
- const I = [...l.items, ...l.negativeStockItems ?? []], M = Ct(I), U = I.map((w) => {
393
+ const I = [...r.items, ...r.negativeStockItems ?? []], M = Ct(I), U = I.map((w) => {
394
394
  var de, be, he;
395
- const X = ((de = d.get(w.sku._id)) == null ? void 0 : de[0]) ?? ca, me = ((be = M == null ? void 0 : M.get(w.sku._id)) == null ? void 0 : be[0]) ?? [], ae = y.get(w.sku._id), re = b.get(w.sku._id);
395
+ const X = ((de = d.get(w.sku._id)) == null ? void 0 : de[0]) ?? ca, me = ((be = M == null ? void 0 : M.get(w.sku._id)) == null ? void 0 : be[0]) ?? [], te = y.get(w.sku._id), se = b.get(w.sku._id);
396
396
  return ma(
397
397
  w,
398
398
  X,
399
399
  me,
400
400
  (he = h.get(w.sku._id)) == null ? void 0 : he[0],
401
- ae,
402
- re
401
+ te,
402
+ se
403
403
  );
404
404
  }), k = fa(I), B = yt().currentBusiness.value, q = pa(k), u = [
405
405
  ["Business name:", B == null ? void 0 : B.name],
406
406
  ["Business ID:", B == null ? void 0 : B._id],
407
407
  ["Menu version", B == null ? void 0 : B.menuVersion],
408
- ["Created at", new Date(l.createdAt)],
409
- ["Created by", (N = l.createdBy) == null ? void 0 : N.name],
410
- ["Updated at", new Date(l.updatedAt)],
411
- ["Updated by", (g = l.updatedBy) == null ? void 0 : g.name],
412
- ["Recent action", l.approvedAt ? "Approve" : l.rejectionHistory ? "Reject" : ""],
408
+ ["Created at", new Date(r.createdAt)],
409
+ ["Created by", (N = r.createdBy) == null ? void 0 : N.name],
410
+ ["Updated at", new Date(r.updatedAt)],
411
+ ["Updated by", (g = r.updatedBy) == null ? void 0 : g.name],
412
+ ["Recent action", r.approvedAt ? "Approve" : r.rejectionHistory ? "Reject" : ""],
413
413
  [
414
414
  "Action by",
415
- l.approvedAt ? (m = l.approvedBy) == null ? void 0 : m.name : l.rejectionHistory ? (H = (F = l.rejectionHistory[0]) == null ? void 0 : F.rejectedBy) == null ? void 0 : H.name : ""
415
+ r.approvedAt ? (m = r.approvedBy) == null ? void 0 : m.name : r.rejectionHistory ? (H = (S = r.rejectionHistory[0]) == null ? void 0 : S.rejectedBy) == null ? void 0 : H.name : ""
416
416
  ],
417
417
  [
418
418
  "Action at",
419
- l.approvedAt ? new Date(l.approvedAt) : l.rejectionHistory ? new Date((K = l.rejectionHistory[0]) == null ? void 0 : K.rejectedAt) : ""
419
+ r.approvedAt ? new Date(r.approvedAt) : r.rejectionHistory ? new Date((K = r.rejectionHistory[0]) == null ? void 0 : K.rejectedAt) : ""
420
420
  ],
421
421
  [
422
422
  "Action remark",
423
- l.approvedAt ? l.approveRemark : l.rejectionHistory ? new Date((J = l.rejectionHistory[0]) == null ? void 0 : J.rejectRemark) : ""
423
+ r.approvedAt ? r.approveRemark : r.rejectionHistory ? new Date((J = r.rejectionHistory[0]) == null ? void 0 : J.rejectRemark) : ""
424
424
  ],
425
425
  [],
426
426
  q.map((w) => w.name),
427
427
  ...U.map((w) => q.map((X) => w[X.id]))
428
- ], t = q.map((w) => `system:${w.id}`), _ = Wt(u, t), R = `[${B == null ? void 0 : B.name}] closing draft (${Kt(new Date(l.updatedAt))}).xlsx`;
428
+ ], t = q.map((w) => `system:${w.id}`), _ = Wt(u, t), R = `[${B == null ? void 0 : B.name}] closing draft (${Kt(new Date(r.updatedAt))}).xlsx`;
429
429
  return Zt(_, R), R;
430
430
  }
431
431
  const ga = { class: "flex flex-col" }, ya = {
@@ -438,8 +438,8 @@ const ga = { class: "flex flex-col" }, ya = {
438
438
  onCancel: { type: Function },
439
439
  onFinished: { type: Function }
440
440
  },
441
- setup(l) {
442
- const s = l;
441
+ setup(r) {
442
+ const s = r;
443
443
  et();
444
444
  const e = Y(!1), d = Y(null), h = Y(!1);
445
445
  Ze(() => {
@@ -479,7 +479,7 @@ const ga = { class: "flex flex-col" }, ya = {
479
479
  }
480
480
  return (U, k) => {
481
481
  const P = z("FmLabel"), B = z("FmDatePicker"), q = z("FmTimePicker"), u = z("FmButton"), t = z("FmForm");
482
- return h.value ? (S(), oe(t, {
482
+ return h.value ? (F(), ie(t, {
483
483
  key: 1,
484
484
  onValidationSuccess: M,
485
485
  class: "flex flex-col gap-32",
@@ -488,47 +488,47 @@ const ga = { class: "flex flex-col" }, ya = {
488
488
  default: Q(() => [
489
489
  k[5] || (k[5] = c("div", { class: "fm-typo-en-body-lg-400" }, [
490
490
  c("p", null, [
491
- se(" Performing "),
491
+ oe(" Performing "),
492
492
  c("span", { class: "fm-typo-en-body-lg-600" }, '"Refresh Balance"'),
493
- se(" until closing effective date and time. ")
493
+ oe(" until closing effective date and time. ")
494
494
  ]),
495
495
  c("p", { class: "mt-2" }, [
496
- se(" Please note that this action will "),
496
+ oe(" Please note that this action will "),
497
497
  c("b", null, "update"),
498
- se(" the effective date and time. ")
498
+ oe(" the effective date and time. ")
499
499
  ])
500
500
  ], -1)),
501
501
  c("div", ga, [
502
- A(P, { class: "fm-typo-en-body-lg-600" }, {
502
+ D(P, { class: "fm-typo-en-body-lg-600" }, {
503
503
  default: Q(() => k[3] || (k[3] = [
504
- se("Closing Date")
504
+ oe("Closing Date")
505
505
  ])),
506
506
  _: 1
507
507
  }),
508
- A(B, {
508
+ D(B, {
509
509
  modelValue: y.value,
510
510
  "onUpdate:modelValue": k[0] || (k[0] = (_) => y.value = _),
511
511
  max: $(Ee)(/* @__PURE__ */ new Date())
512
512
  }, null, 8, ["modelValue", "max"]),
513
- A(P, { class: "fm-typo-en-body-lg-600" }, {
513
+ D(P, { class: "fm-typo-en-body-lg-600" }, {
514
514
  default: Q(() => k[4] || (k[4] = [
515
- se("Closing Time")
515
+ oe("Closing Time")
516
516
  ])),
517
517
  _: 1
518
518
  }),
519
- A(q, {
519
+ D(q, {
520
520
  modelValue: b.value,
521
521
  "onUpdate:modelValue": k[1] || (k[1] = (_) => b.value = _)
522
522
  }, null, 8, ["modelValue"]),
523
- I.value ? (S(), E("div", ya, " Cannot select future date ")) : te("", !0)
523
+ I.value ? (F(), E("div", ya, " Cannot select future date ")) : ne("", !0)
524
524
  ]),
525
525
  c("div", ba, [
526
- A(u, {
526
+ D(u, {
527
527
  label: "Cancel",
528
528
  variant: "tertiary",
529
529
  onClick: k[2] || (k[2] = (_) => U.onCancel())
530
530
  }),
531
- A(u, {
531
+ D(u, {
532
532
  label: "Refresh balance",
533
533
  type: "submit",
534
534
  variant: "primary",
@@ -538,8 +538,8 @@ const ga = { class: "flex flex-col" }, ya = {
538
538
  ])
539
539
  ]),
540
540
  _: 1
541
- }, 8, ["disabled"])) : (S(), E(ie, { key: 0 }, [
542
- se("Loading")
541
+ }, 8, ["disabled"])) : (F(), E(le, { key: 0 }, [
542
+ oe("Loading")
543
543
  ], 64));
544
544
  };
545
545
  }
@@ -554,8 +554,8 @@ const ga = { class: "flex flex-col" }, ya = {
554
554
  I.value = m, b.value = !0;
555
555
  }
556
556
  async function U(g) {
557
- var F;
558
- if (g.status === pe.enum.COMPLETED) {
557
+ var S;
558
+ if (g.status === ve.enum.COMPLETED) {
559
559
  const H = g.closingAdjustmentId;
560
560
  if (!H)
561
561
  return e.open({
@@ -572,13 +572,13 @@ const ga = { class: "flex flex-col" }, ya = {
572
572
  costs: w.fromCostBalances
573
573
  }));
574
574
  } else
575
- return await y.readStockBalance(), ((F = y.stockBalance) == null ? void 0 : F.skus) ?? [];
575
+ return await y.readStockBalance(), ((S = y.stockBalance) == null ? void 0 : S.skus) ?? [];
576
576
  }
577
- async function k(g, m, F) {
577
+ async function k(g, m, S) {
578
578
  m || (e.open({
579
579
  title: "Exporting",
580
580
  message: "Fetching data..."
581
- }), m = await U(g)), va(g, m, F ?? []);
581
+ }), m = await U(g)), va(g, m, S ?? []);
582
582
  }
583
583
  function P(g, m) {
584
584
  s.open({
@@ -639,14 +639,14 @@ const ga = { class: "flex flex-col" }, ya = {
639
639
  function t() {
640
640
  b.value = !1;
641
641
  }
642
- async function _(g, m, F) {
642
+ async function _(g, m, S) {
643
643
  await s.open({
644
644
  title: "Refresh balance",
645
645
  contentComponent: ha,
646
646
  contentComponentProps: {
647
647
  draft: g,
648
648
  onFinished: (H) => {
649
- s.close(), F == null || F(H);
649
+ s.close(), S == null || S(H);
650
650
  },
651
651
  onCancel: async () => {
652
652
  s.close(), m == null || m();
@@ -678,10 +678,10 @@ const ga = { class: "flex flex-col" }, ya = {
678
678
  message: "Draft cloned successfully",
679
679
  type: "success"
680
680
  }), m == null || m();
681
- } catch (F) {
681
+ } catch (S) {
682
682
  e.open({
683
683
  title: "Error",
684
- message: (F == null ? void 0 : F.message) || "Failed to clone draft",
684
+ message: (S == null ? void 0 : S.message) || "Failed to clone draft",
685
685
  type: "error"
686
686
  });
687
687
  }
@@ -702,8 +702,8 @@ const ga = { class: "flex flex-col" }, ya = {
702
702
  };
703
703
  }
704
704
  );
705
- function Ne(l) {
706
- switch (l) {
705
+ function Ne(r) {
706
+ switch (r) {
707
707
  case "DRAFT":
708
708
  return "fm-status-badge-draft";
709
709
  case "PROCESSING":
@@ -836,37 +836,37 @@ const ka = kt(
836
836
  enableSorting: !1,
837
837
  cell(u) {
838
838
  var m;
839
- const t = u.row.original, _ = t.status, R = new Date(t.updatedAt), N = (m = t == null ? void 0 : t.rejectionHistory) == null ? void 0 : m.computeFirst((F) => F.rejectedAt), g = N ? new Date(N) : null;
840
- return _ === "DRAFT" && g ? g.getTime() > R.getTime() ? x(
839
+ const t = u.row.original, _ = t.status, R = new Date(t.updatedAt), N = (m = t == null ? void 0 : t.rejectionHistory) == null ? void 0 : m.computeFirst((S) => S.rejectedAt), g = N ? new Date(N) : null;
840
+ return _ === "DRAFT" && g ? g.getTime() > R.getTime() ? A(
841
841
  "div",
842
842
  {
843
843
  class: "flex"
844
844
  },
845
- x(
845
+ A(
846
846
  "div",
847
847
  {
848
848
  class: ["fm-status-badge", Ne("FAILED")]
849
849
  },
850
850
  "Rejected"
851
851
  )
852
- ) : x(
852
+ ) : A(
853
853
  "div",
854
854
  {
855
855
  class: "flex"
856
856
  },
857
- x(
857
+ A(
858
858
  "div",
859
859
  {
860
860
  class: ["fm-status-badge", Ne("PROCESSING")]
861
861
  },
862
862
  "Updated"
863
863
  )
864
- ) : x(
864
+ ) : A(
865
865
  "div",
866
866
  {
867
867
  class: "flex"
868
868
  },
869
- x(
869
+ A(
870
870
  "div",
871
871
  {
872
872
  class: ["fm-status-badge", Ne(_)]
@@ -899,7 +899,7 @@ const ka = kt(
899
899
  color: "text-fm-color-typo-error",
900
900
  value: O.enum.markAsFailed
901
901
  }
902
- ], g = _ && t.status !== pe.enum.DRAFT ? [
902
+ ], g = _ && t.status !== ve.enum.DRAFT ? [
903
903
  {
904
904
  translationKey: "inventory.closing.draft.cloneDraft",
905
905
  color: "text-fm-color-typo-primary",
@@ -909,9 +909,9 @@ const ka = kt(
909
909
  return Jt(
910
910
  [
911
911
  ...R,
912
- ...t.status === pe.enum.DRAFT ? N : []
912
+ ...t.status === ve.enum.DRAFT ? N : []
913
913
  ],
914
- (F) => B(F, t),
914
+ (S) => B(S, t),
915
915
  g
916
916
  );
917
917
  },
@@ -967,33 +967,33 @@ const ka = kt(
967
967
  draft: {}
968
968
  },
969
969
  emits: ["submitted", "refresh"],
970
- setup(l, { emit: s }) {
971
- const e = l, d = L(() => {
972
- const r = ht();
973
- return r === "MYR" ? "RM" : r;
970
+ setup(r, { emit: s }) {
971
+ const e = r, d = L(() => {
972
+ const l = ht();
973
+ return l === "MYR" ? "RM" : l;
974
974
  }), h = wt(), y = ze(), b = Nt(e, "show"), I = Y(!1), M = Y(!1), U = Y(!1), k = Y(new Array()), P = Y(new Array()), B = Y([]), q = et(), u = Ye(), t = Je(), _ = Ot(), R = Oe(), N = It({}), g = L(() => new Set(
975
- _.skus.filter((r) => {
975
+ _.skus.filter((l) => {
976
976
  var a;
977
- return N[(a = r.customAttributes) == null ? void 0 : a.tag];
978
- }).map((r) => r._id)
979
- )), m = s, F = Y({
977
+ return N[(a = l.customAttributes) == null ? void 0 : a.tag];
978
+ }).map((l) => l._id)
979
+ )), m = s, S = Y({
980
980
  templateItem: !0,
981
981
  nonTemplateItem: !0
982
982
  }), H = L(() => {
983
983
  var a, f;
984
- const r = [...((a = e.draft) == null ? void 0 : a.items) ?? [], ...((f = e.draft) == null ? void 0 : f.negativeStockItems) ?? []];
985
- return g.value.size ? r.filter((n) => g.value.has(n.sku._id)) : r;
984
+ const l = [...((a = e.draft) == null ? void 0 : a.items) ?? [], ...((f = e.draft) == null ? void 0 : f.negativeStockItems) ?? []];
985
+ return g.value.size ? l.filter((n) => g.value.has(n.sku._id)) : l;
986
986
  }), K = L(() => {
987
- const r = H.value.map((a) => a.sku);
988
- return r.sort((a, f) => a.code.localeCompare(f.code)), r;
987
+ const l = H.value.map((a) => a.sku);
988
+ return l.sort((a, f) => a.code.localeCompare(f.code)), l;
989
989
  }), J = L(() => H.value.groupBy(
990
990
  (a) => a.sku._id,
991
991
  (a) => a.measurementsAmounts.filter((f) => !f.measurement.abbrev.toLocaleLowerCase().includes("inactive")).map((f) => f.measurement.id)
992
992
  ));
993
993
  Ze(me), Ut(
994
994
  () => e.show,
995
- (r) => {
996
- r && (ke.value = _e[0], me(), F.value = {
995
+ (l) => {
996
+ l && (ke.value = _e[0], me(), S.value = {
997
997
  templateItem: !0,
998
998
  nonTemplateItem: !0
999
999
  });
@@ -1004,10 +1004,10 @@ const ka = kt(
1004
1004
  var a, f, n, o;
1005
1005
  if (!R._currentLocation) return;
1006
1006
  I.value = !0;
1007
- const r = ((a = e.draft) == null ? void 0 : a.status) === pe.enum.COMPLETED;
1007
+ const l = ((a = e.draft) == null ? void 0 : a.status) === ve.enum.COMPLETED;
1008
1008
  P.value = [];
1009
1009
  try {
1010
- if (await _.init(), r) {
1010
+ if (await _.init(), l) {
1011
1011
  const T = e.draft.closingAdjustmentId;
1012
1012
  if (!T) {
1013
1013
  t.open({
@@ -1019,8 +1019,8 @@ const ka = kt(
1019
1019
  });
1020
1020
  return;
1021
1021
  }
1022
- const j = await q.readAdjustmentById(T), le = (j == null ? void 0 : j.skus) ?? [];
1023
- for (const ce of le) {
1022
+ const j = await q.readAdjustmentById(T), re = (j == null ? void 0 : j.skus) ?? [];
1023
+ for (const ce of re) {
1024
1024
  const De = {
1025
1025
  id: ce.sku._id,
1026
1026
  balance: ce.fromBalance,
@@ -1038,12 +1038,12 @@ const ka = kt(
1038
1038
  if ((o = e.draft) != null && o.adjustmentSnapshot)
1039
1039
  for (const T of e.draft.adjustmentSnapshot)
1040
1040
  T.adjustmentsByType && Object.keys(T.adjustmentsByType).forEach((j) => i.add(j));
1041
- const p = ["receive", "sales", "wastage"], D = [];
1041
+ const p = ["receive", "sales", "wastage"], x = [];
1042
1042
  p.forEach((T) => {
1043
- i.has(T) && (D.push(T), i.delete(T));
1043
+ i.has(T) && (x.push(T), i.delete(T));
1044
1044
  });
1045
1045
  const v = Array.from(i).sort();
1046
- B.value = [...D, ...v];
1046
+ B.value = [...x, ...v];
1047
1047
  } catch (i) {
1048
1048
  t.open({
1049
1049
  title: "Something went wrong",
@@ -1054,7 +1054,7 @@ const ka = kt(
1054
1054
  I.value = !1;
1055
1055
  }
1056
1056
  }
1057
- async function ae() {
1057
+ async function te() {
1058
1058
  var a, f;
1059
1059
  if (!(((a = e.draft) == null ? void 0 : a.effectiveAt) ?? (e.draft ? Ve((f = e.draft) == null ? void 0 : f._id) : null))) {
1060
1060
  t.open({
@@ -1069,9 +1069,9 @@ const ka = kt(
1069
1069
  () => {
1070
1070
  },
1071
1071
  async (n) => {
1072
- var D;
1072
+ var x;
1073
1073
  M.value = !0;
1074
- const o = (D = e.draft) == null ? void 0 : D._rev, i = 30, p = 2e3;
1074
+ const o = (x = e.draft) == null ? void 0 : x._rev, i = 30, p = 2e3;
1075
1075
  try {
1076
1076
  await q.recalculation.scheduleCalculateStockSnapshotAtDate(n, e.draft._id);
1077
1077
  let v = null;
@@ -1102,7 +1102,7 @@ const ka = kt(
1102
1102
  }
1103
1103
  );
1104
1104
  }
1105
- async function re() {
1105
+ async function se() {
1106
1106
  var a, f;
1107
1107
  if (!(((a = e.draft) == null ? void 0 : a.effectiveAt) ?? (e.draft ? Ve((f = e.draft) == null ? void 0 : f._id) : null))) {
1108
1108
  t.open({
@@ -1116,32 +1116,32 @@ const ka = kt(
1116
1116
  }
1117
1117
  const de = L(
1118
1118
  () => k.value.groupBy(
1119
- (r) => r.id,
1120
- (r) => r.balance
1119
+ (l) => l.id,
1120
+ (l) => l.balance
1121
1121
  )
1122
- ), be = L(() => H.value.groupBy((r) => r.sku._id)), he = L(() => {
1123
- var r;
1124
- return (r = e.draft) != null && r.adjustmentSnapshot ? new Map(e.draft.adjustmentSnapshot.map((a) => [a.skuId, a.adjustmentsByType])) : /* @__PURE__ */ new Map();
1122
+ ), be = L(() => H.value.groupBy((l) => l.sku._id)), he = L(() => {
1123
+ var l;
1124
+ return (l = e.draft) != null && l.adjustmentSnapshot ? new Map(e.draft.adjustmentSnapshot.map((a) => [a.skuId, a.adjustmentsByType])) : /* @__PURE__ */ new Map();
1125
1125
  }), Ie = L(() => {
1126
- var r;
1127
- return (r = e.draft) != null && r.opening ? new Map(e.draft.opening.map((a) => [a.skuId, a.balance])) : /* @__PURE__ */ new Map();
1126
+ var l;
1127
+ return (l = e.draft) != null && l.opening ? new Map(e.draft.opening.map((a) => [a.skuId, a.balance])) : /* @__PURE__ */ new Map();
1128
1128
  });
1129
- function Z(r, a) {
1130
- return x(
1129
+ function Z(l, a) {
1130
+ return A(
1131
1131
  ge.FmTooltip,
1132
1132
  { zIndex: 51, placement: "left", class: "w-full flex justify-end" },
1133
1133
  {
1134
1134
  default() {
1135
- return r;
1135
+ return l;
1136
1136
  },
1137
1137
  content() {
1138
- return a || r;
1138
+ return a || l;
1139
1139
  }
1140
1140
  }
1141
1141
  );
1142
1142
  }
1143
1143
  const Ce = L(() => {
1144
- const r = K.value.reduce((f, n) => {
1144
+ const l = K.value.reduce((f, n) => {
1145
1145
  var o, i;
1146
1146
  return Math.max(f, ((i = (o = J.value) == null ? void 0 : o.get(n._id)) == null ? void 0 : i[0].length) ?? 0);
1147
1147
  }, 0);
@@ -1152,8 +1152,8 @@ const ka = kt(
1152
1152
  header: () => "Name",
1153
1153
  size: 350,
1154
1154
  cell(f) {
1155
- const n = f.row.original, o = n.adjustedDiffPercentage, i = typeof o == "number" && Math.abs(o) > 10, p = x("div", { class: "flex flex-col gap-4" }, [
1156
- x(
1155
+ const n = f.row.original, o = n.adjustedDiffPercentage, i = typeof o == "number" && Math.abs(o) > 10, p = A("div", { class: "flex flex-col gap-4" }, [
1156
+ A(
1157
1157
  "div",
1158
1158
  {
1159
1159
  class: [
@@ -1163,7 +1163,7 @@ const ka = kt(
1163
1163
  },
1164
1164
  n.name
1165
1165
  ),
1166
- x(
1166
+ A(
1167
1167
  "div",
1168
1168
  {
1169
1169
  class: [
@@ -1174,7 +1174,7 @@ const ka = kt(
1174
1174
  n.code
1175
1175
  )
1176
1176
  ]);
1177
- return x(
1177
+ return A(
1178
1178
  ge.FmTooltip,
1179
1179
  {
1180
1180
  zIndex: 51
@@ -1184,7 +1184,7 @@ const ka = kt(
1184
1184
  return i ? "Adjustment difference is more than 10%." : `${n.code} - ${n.name}`;
1185
1185
  },
1186
1186
  default() {
1187
- return x("div", { class: "flex items-center gap-4 justify-start w-full" }, [
1187
+ return A("div", { class: "flex items-center gap-4 justify-start w-full" }, [
1188
1188
  p
1189
1189
  ]);
1190
1190
  }
@@ -1199,7 +1199,7 @@ const ka = kt(
1199
1199
  size: 160,
1200
1200
  cell(f) {
1201
1201
  const n = f.row.original.costPerUnit;
1202
- return x("div", { class: "text-right" }, n.toFixed(2));
1202
+ return A("div", { class: "text-right" }, n.toFixed(2));
1203
1203
  },
1204
1204
  meta: {
1205
1205
  textAlign: "right"
@@ -1210,23 +1210,23 @@ const ka = kt(
1210
1210
  header: () => "UOM",
1211
1211
  size: 120,
1212
1212
  cell(f) {
1213
- var D;
1213
+ var x;
1214
1214
  const n = f.row.original, o = n.costUnit, i = n.baseUnit, p = o ?? i;
1215
1215
  if (o && o !== i) {
1216
- const v = K.value.find((j) => j._id === n.id), T = (D = v == null ? void 0 : v.defaultCost) == null ? void 0 : D.measurement;
1216
+ const v = K.value.find((j) => j._id === n.id), T = (x = v == null ? void 0 : v.defaultCost) == null ? void 0 : x.measurement;
1217
1217
  if (T) {
1218
1218
  const j = T.conversion.amount / Math.pow(10, T.conversion.precision);
1219
- return x("div", { class: "flex flex-col" }, [
1220
- x(
1219
+ return A("div", { class: "flex flex-col" }, [
1220
+ A(
1221
1221
  "span",
1222
1222
  { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary" },
1223
1223
  p
1224
1224
  ),
1225
- x("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, [
1225
+ A("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, [
1226
1226
  "1 ",
1227
- x("span", { class: "fm-typo-en-body-sm-600" }, o),
1227
+ A("span", { class: "fm-typo-en-body-sm-600" }, o),
1228
1228
  ` = ${j} `,
1229
- x("span", { class: "fm-typo-en-body-sm-600" }, i)
1229
+ A("span", { class: "fm-typo-en-body-sm-600" }, i)
1230
1230
  ])
1231
1231
  ]);
1232
1232
  }
@@ -1241,7 +1241,7 @@ const ka = kt(
1241
1241
  size: 150,
1242
1242
  cell(f) {
1243
1243
  const n = f.row.original.opening;
1244
- return x("div", { class: "text-right" }, n.toFixed(2));
1244
+ return A("div", { class: "text-right" }, n.toFixed(2));
1245
1245
  },
1246
1246
  meta: {
1247
1247
  textAlign: "right"
@@ -1256,7 +1256,7 @@ const ka = kt(
1256
1256
  size: 150,
1257
1257
  cell(n) {
1258
1258
  const o = n.row.original.adjustmentAmounts[f] ?? { amount: 0, precision: 0 };
1259
- return x("div", { class: "text-right" }, We(o));
1259
+ return A("div", { class: "text-right" }, We(o));
1260
1260
  },
1261
1261
  meta: {
1262
1262
  textAlign: "right"
@@ -1284,17 +1284,17 @@ const ka = kt(
1284
1284
  var v;
1285
1285
  const n = f.row.original, o = V.fromNumber(n.physicalBalance);
1286
1286
  let i = !0, p = n.physicalBalance;
1287
- const D = (v = P.value.find((T) => T.id === n.id)) == null ? void 0 : v.balance;
1288
- return D && (V.equals({
1287
+ const x = (v = P.value.find((T) => T.id === n.id)) == null ? void 0 : v.balance;
1288
+ return x && (V.equals({
1289
1289
  a: o,
1290
- b: D
1291
- }) || (i = !1, p = Number(V.toFormatString({ value: D })))), x("div", { class: "flex flex-col" }, [
1292
- x(
1290
+ b: x
1291
+ }) || (i = !1, p = Number(V.toFormatString({ value: x })))), A("div", { class: "flex flex-col" }, [
1292
+ A(
1293
1293
  "span",
1294
1294
  { class: "line-clamp-1 fm-typo-en-body-lg-400 text-fm-color-typo-primary" },
1295
1295
  p
1296
1296
  ),
1297
- i ? null : x(
1297
+ i ? null : A(
1298
1298
  "span",
1299
1299
  { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
1300
1300
  `Draft: ${n.physicalBalance.toString()}`
@@ -1322,7 +1322,7 @@ const ka = kt(
1322
1322
  size: 150,
1323
1323
  cell(f) {
1324
1324
  const n = f.row.original.varianceInCost;
1325
- return x(
1325
+ return A(
1326
1326
  "div",
1327
1327
  { class: "text-right" },
1328
1328
  n.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 4 })
@@ -1345,10 +1345,10 @@ const ka = kt(
1345
1345
  if (!n) return an;
1346
1346
  const o = n.toFixed(2);
1347
1347
  if (o === "0.00")
1348
- return x("div", { class: "flex items-center gap-4 justify-end" }, ["0.00"]);
1348
+ return A("div", { class: "flex items-center gap-4 justify-end" }, ["0.00"]);
1349
1349
  const i = n > 0;
1350
- return x("div", { class: "flex items-center gap-4 justify-end" }, [
1351
- x(ge.FmIcon, {
1350
+ return A("div", { class: "flex items-center gap-4 justify-end" }, [
1351
+ A(ge.FmIcon, {
1352
1352
  name: i ? "arrow_drop_up" : "arrow_drop_down",
1353
1353
  color: i ? "system-success-300" : "system-error-300",
1354
1354
  size: "md"
@@ -1367,18 +1367,18 @@ const ka = kt(
1367
1367
  size: 180,
1368
1368
  cell(f) {
1369
1369
  var T;
1370
- const n = f.row.original, o = n.stockTakeValue, i = K.value.find((j) => j._id === n.id), p = (T = i == null ? void 0 : i.defaultCost) == null ? void 0 : T.measurement, D = n.physicalBalance, v = n.costPerUnit;
1370
+ const n = f.row.original, o = n.stockTakeValue, i = K.value.find((j) => j._id === n.id), p = (T = i == null ? void 0 : i.defaultCost) == null ? void 0 : T.measurement, x = n.physicalBalance, v = n.costPerUnit;
1371
1371
  if (p) {
1372
- const j = V.toFormatString({ value: p.conversion }), le = `${D.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })} ${n.baseUnit} ÷ ${j} × ${v} ${d.value}`;
1373
- return x(
1372
+ const j = V.toFormatString({ value: p.conversion }), re = `${x.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })} ${n.baseUnit} ÷ ${j} × ${v} ${d.value}`;
1373
+ return A(
1374
1374
  ge.FmTooltip,
1375
1375
  { zIndex: 51 },
1376
1376
  {
1377
1377
  content() {
1378
- return le;
1378
+ return re;
1379
1379
  },
1380
1380
  default() {
1381
- return x(
1381
+ return A(
1382
1382
  "div",
1383
1383
  { class: "text-right" },
1384
1384
  o.toLocaleString("en-US", {
@@ -1390,8 +1390,8 @@ const ka = kt(
1390
1390
  }
1391
1391
  );
1392
1392
  } else {
1393
- const j = `${D.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })} ${n.baseUnit} × ${v} ${d.value}`;
1394
- return x(
1393
+ const j = `${x.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })} ${n.baseUnit} × ${v} ${d.value}`;
1394
+ return A(
1395
1395
  ge.FmTooltip,
1396
1396
  { zIndex: 51 },
1397
1397
  {
@@ -1399,7 +1399,7 @@ const ka = kt(
1399
1399
  return j;
1400
1400
  },
1401
1401
  default() {
1402
- return x(
1402
+ return A(
1403
1403
  "div",
1404
1404
  { class: "text-right" },
1405
1405
  o.toLocaleString("en-US", {
@@ -1423,18 +1423,18 @@ const ka = kt(
1423
1423
  size: 180,
1424
1424
  cell(f) {
1425
1425
  var T;
1426
- const n = f.row.original, o = n.systemValue, i = K.value.find((j) => j._id === n.id), p = (T = i == null ? void 0 : i.defaultCost) == null ? void 0 : T.measurement, D = n.systemBalance, v = n.costPerUnit;
1426
+ const n = f.row.original, o = n.systemValue, i = K.value.find((j) => j._id === n.id), p = (T = i == null ? void 0 : i.defaultCost) == null ? void 0 : T.measurement, x = n.systemBalance, v = n.costPerUnit;
1427
1427
  if (p) {
1428
- const j = V.toFormatString({ value: p.conversion }), le = `${D.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 4 })} ${n.baseUnit} ÷ ${j} × ${v} ${d.value}`;
1429
- return x(
1428
+ const j = V.toFormatString({ value: p.conversion }), re = `${x.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 4 })} ${n.baseUnit} ÷ ${j} × ${v} ${d.value}`;
1429
+ return A(
1430
1430
  ge.FmTooltip,
1431
1431
  { zIndex: 51 },
1432
1432
  {
1433
1433
  content() {
1434
- return le;
1434
+ return re;
1435
1435
  },
1436
1436
  default() {
1437
- return x(
1437
+ return A(
1438
1438
  "div",
1439
1439
  { class: "text-right" },
1440
1440
  o.toLocaleString("en-US", {
@@ -1446,8 +1446,8 @@ const ka = kt(
1446
1446
  }
1447
1447
  );
1448
1448
  } else {
1449
- const j = `${D.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 4 })} ${n.baseUnit} × ${v} ${d.value}`;
1450
- return x(
1449
+ const j = `${x.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 4 })} ${n.baseUnit} × ${v} ${d.value}`;
1450
+ return A(
1451
1451
  ge.FmTooltip,
1452
1452
  { zIndex: 51 },
1453
1453
  {
@@ -1455,7 +1455,7 @@ const ka = kt(
1455
1455
  return j;
1456
1456
  },
1457
1457
  default() {
1458
- return x(
1458
+ return A(
1459
1459
  "div",
1460
1460
  { class: "text-right" },
1461
1461
  o.toLocaleString("en-US", {
@@ -1477,41 +1477,41 @@ const ka = kt(
1477
1477
  header: () => "Amounts",
1478
1478
  enableSorting: !1,
1479
1479
  cell(f) {
1480
- const n = f.row.original, o = (p, D) => x(
1480
+ const n = f.row.original, o = (p, x) => A(
1481
1481
  ge.FmTooltip,
1482
1482
  { zIndex: 50 },
1483
1483
  {
1484
1484
  default() {
1485
- return x(
1485
+ return A(
1486
1486
  "div",
1487
1487
  {
1488
1488
  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"
1489
1489
  },
1490
1490
  [
1491
- x("span", { class: "text-fm-color-typo-primary" }, `${p} `),
1492
- x(
1491
+ A("span", { class: "text-fm-color-typo-primary" }, `${p} `),
1492
+ A(
1493
1493
  "span",
1494
1494
  {
1495
1495
  class: "text-fm-color-typo-secondary",
1496
1496
  style: { maxWidth: "80px" }
1497
1497
  },
1498
- D
1498
+ x
1499
1499
  )
1500
1500
  ]
1501
1501
  );
1502
1502
  },
1503
1503
  content() {
1504
- return `${p} ${D}`;
1504
+ return `${p} ${x}`;
1505
1505
  }
1506
1506
  }
1507
1507
  );
1508
- let i = Array.from({ length: r }).map((p, D) => {
1509
- if (!n[`measurementAmount${D}`])
1508
+ let i = Array.from({ length: l }).map((p, x) => {
1509
+ if (!n[`measurementAmount${x}`])
1510
1510
  return null;
1511
- const v = n[`measurementAmount${D}`], T = n[`measurementAbbrev${D}`];
1511
+ const v = n[`measurementAmount${x}`], T = n[`measurementAbbrev${x}`];
1512
1512
  return o(v, T);
1513
1513
  }).filter((p) => p);
1514
- return (n.baseUnitAmount || !i.length) && (i = [o(n.baseUnitAmount, n.baseUnit), ...i]), x(
1514
+ return (n.baseUnitAmount || !i.length) && (i = [o(n.baseUnitAmount, n.baseUnit), ...i]), A(
1515
1515
  "div",
1516
1516
  {
1517
1517
  class: "flex gap-8 flex-nowrap",
@@ -1524,20 +1524,20 @@ const ka = kt(
1524
1524
  }
1525
1525
  }
1526
1526
  ];
1527
- }), Ue = L(() => Ce.value.map((r) => r.size ?? 0).reduce((r, a) => r + a)), xe = Y(""), $e = L(() => {
1527
+ }), Ue = L(() => Ce.value.map((l) => l.size ?? 0).reduce((l, a) => l + a)), xe = Y(""), $e = L(() => {
1528
1528
  var f, n;
1529
- const r = ((n = (f = e.draft) == null ? void 0 : f.negativeStockItems) == null ? void 0 : n.reduce(
1529
+ const l = ((n = (f = e.draft) == null ? void 0 : f.negativeStockItems) == null ? void 0 : n.reduce(
1530
1530
  (o, i) => (o[i.sku._id] = i, o),
1531
1531
  {}
1532
1532
  )) ?? {};
1533
1533
  return K.value.map((o) => {
1534
1534
  var nt, ot, st, rt, lt, it, ct, ut, mt, dt, ft;
1535
- const i = (nt = be.value.get(o._id)) == null ? void 0 : nt[0], p = ((ot = de.value.get(o._id)) == null ? void 0 : ot[0]) ?? w, D = ((st = o.defaultCost) == null ? void 0 : st.costPerUnit) ?? w, v = Number(V.toFormatString({ value: D })), T = ((lt = (rt = o.defaultCost) == null ? void 0 : rt.measurement) == null ? void 0 : lt.conversion) ?? {
1535
+ const i = (nt = be.value.get(o._id)) == null ? void 0 : nt[0], p = ((ot = de.value.get(o._id)) == null ? void 0 : ot[0]) ?? w, x = ((st = o.defaultCost) == null ? void 0 : st.costPerUnit) ?? w, v = Number(V.toFormatString({ value: x })), T = ((lt = (rt = o.defaultCost) == null ? void 0 : rt.measurement) == null ? void 0 : lt.conversion) ?? {
1536
1536
  amount: 1,
1537
1537
  precision: 0
1538
1538
  }, j = Number(
1539
1539
  V.toFormatString({ value: T })
1540
- ), le = Ie.value.get(o._id), ce = le ? Number(V.toFormatString({ value: le })) : 0, De = he.value.get(o._id), C = {};
1540
+ ), re = Ie.value.get(o._id), ce = re ? Number(V.toFormatString({ value: re })) : 0, De = he.value.get(o._id), C = {};
1541
1541
  if (B.value.forEach((W) => {
1542
1542
  const ue = C[W] ?? { amount: 0, precision: 0 }, fe = De == null ? void 0 : De[W];
1543
1543
  fe && (C[W] = Gt(ue, fe));
@@ -1554,7 +1554,7 @@ const ka = kt(
1554
1554
  physicalBalance: 0,
1555
1555
  adjustedAmount: -W,
1556
1556
  adjustedDiffPercentage: -100,
1557
- isTemplateItem: !r[o._id],
1557
+ isTemplateItem: !l[o._id],
1558
1558
  costPerUnit: v,
1559
1559
  opening: ce,
1560
1560
  varianceQty: ue,
@@ -1566,10 +1566,10 @@ const ka = kt(
1566
1566
  }
1567
1567
  const G = St(i), ee = (mt = (ut = P.value) == null ? void 0 : ut.find(
1568
1568
  (W) => W.id === o._id
1569
- )) == null ? void 0 : mt.balance, ve = xt(
1569
+ )) == null ? void 0 : mt.balance, pe = xt(
1570
1570
  ee ?? G,
1571
1571
  p
1572
- ), Be = p.amount === 0 ? null : At(ve, {
1572
+ ), Be = p.amount === 0 ? null : At(pe, {
1573
1573
  ...p,
1574
1574
  amount: Math.abs(p.amount)
1575
1575
  }), Pe = Be ? Xe(Be, X) : null, Ke = Number(V.toFormatString({ value: p })), Qe = Number(V.toFormatString({ value: G })), at = Ke - Qe, $t = at * v / j, Bt = Qe * v / j, Tt = Ke * v / j;
@@ -1586,13 +1586,13 @@ const ka = kt(
1586
1586
  }).reduce((W, ue, fe) => (W[`measurementAbbrev${fe}`] = `(${ue.measurement.abbrev}) × ${V.toFormatString({ value: ue.measurement.conversion })}`, W[`measurementAmount${fe}`] = Number(V.toFormatString({ value: ue.amount })), W), {}),
1587
1587
  systemBalance: Ke,
1588
1588
  physicalBalance: Qe,
1589
- adjustedAmount: Number(V.toFormatString({ value: ve })),
1589
+ adjustedAmount: Number(V.toFormatString({ value: pe })),
1590
1590
  adjustedDiffPercentage: Pe ? Number(
1591
1591
  V.toFormatString({
1592
1592
  value: _t(Pe, 2)
1593
1593
  })
1594
1594
  ) : null,
1595
- isTemplateItem: !r[o._id],
1595
+ isTemplateItem: !l[o._id],
1596
1596
  costPerUnit: v,
1597
1597
  opening: ce,
1598
1598
  varianceQty: at,
@@ -1601,11 +1601,11 @@ const ka = kt(
1601
1601
  systemValue: Tt,
1602
1602
  adjustmentAmounts: C
1603
1603
  };
1604
- }).filter((o) => !!(o.isTemplateItem && F.value.templateItem || !o.isTemplateItem && F.value.nonTemplateItem));
1604
+ }).filter((o) => !!(o.isTemplateItem && S.value.templateItem || !o.isTemplateItem && S.value.nonTemplateItem));
1605
1605
  }), Ae = L(() => {
1606
1606
  var a, f, n, o, i;
1607
1607
  if (!e.draft) return [];
1608
- const r = e.draft.approvedAt ? {
1608
+ const l = e.draft.approvedAt ? {
1609
1609
  action: `Approve at ${ye(e.draft.approvedAt)}`,
1610
1610
  // actionAt: props.draft.approvedAt,
1611
1611
  actionBy: e.draft.approvedBy,
@@ -1649,17 +1649,17 @@ const ka = kt(
1649
1649
  label: "Remark",
1650
1650
  value: e.draft.remark
1651
1651
  } : null,
1652
- r ? {
1652
+ l ? {
1653
1653
  label: "Last action",
1654
- value: r.action
1654
+ value: l.action
1655
1655
  } : null,
1656
- r && r.actionBy ? {
1656
+ l && l.actionBy ? {
1657
1657
  label: "Last action by",
1658
- value: (i = r.actionBy) == null ? void 0 : i.name
1658
+ value: (i = l.actionBy) == null ? void 0 : i.name
1659
1659
  } : null,
1660
- r && r.remark ? {
1660
+ l && l.remark ? {
1661
1661
  label: "Action remark",
1662
- value: r.remark
1662
+ value: l.remark
1663
1663
  } : null
1664
1664
  ].filter((p) => p).map((p) => p);
1665
1665
  }), _e = [
@@ -1673,27 +1673,27 @@ const ka = kt(
1673
1673
  }
1674
1674
  ], ke = Y(_e[0]), we = L(() => {
1675
1675
  var n, o, i;
1676
- const r = ((n = e.draft) == null ? void 0 : n.activityLogs) ?? [], a = ((o = e.draft) == null ? void 0 : o.rejectionHistory) ?? [];
1676
+ const l = ((n = e.draft) == null ? void 0 : n.activityLogs) ?? [], a = ((o = e.draft) == null ? void 0 : o.rejectionHistory) ?? [];
1677
1677
  for (const p of a)
1678
- r.find(
1678
+ l.find(
1679
1679
  (v) => `${v.action}_${v.performedAt}` == `${O.enum.rejectDraft}_${p.rejectedAt}`
1680
- ) || r.push({
1680
+ ) || l.push({
1681
1681
  action: O.enum.rejectDraft,
1682
1682
  performedAt: p.rejectedAt,
1683
1683
  performedBy: p.rejectedBy,
1684
1684
  remark: p.rejectRemark
1685
1685
  });
1686
- return (i = e.draft) != null && i.approvedAt && (r.find(
1687
- (D) => {
1686
+ return (i = e.draft) != null && i.approvedAt && (l.find(
1687
+ (x) => {
1688
1688
  var v;
1689
- return `${D.action}_${D.performedAt}` == `${O.enum.approveDraft}_${(v = e.draft) == null ? void 0 : v.approvedAt}`;
1689
+ return `${x.action}_${x.performedAt}` == `${O.enum.approveDraft}_${(v = e.draft) == null ? void 0 : v.approvedAt}`;
1690
1690
  }
1691
- ) || r.push({
1691
+ ) || l.push({
1692
1692
  action: O.enum.approveDraft,
1693
1693
  performedAt: e.draft.approvedAt,
1694
1694
  performedBy: e.draft.approvedBy ?? { name: "Unknown", id: "unknown" },
1695
1695
  remark: e.draft.approveRemark
1696
- })), r.sort((p, D) => new Date(D.performedAt).getTime() - new Date(p.performedAt).getTime()).map(
1696
+ })), l.sort((p, x) => new Date(x.performedAt).getTime() - new Date(p.performedAt).getTime()).map(
1697
1697
  (p) => ({
1698
1698
  header: Le(p.action),
1699
1699
  date: ye(p.performedAt),
@@ -1710,18 +1710,18 @@ const ka = kt(
1710
1710
  })
1711
1711
  );
1712
1712
  }), tt = L(() => {
1713
- var o, i, p, D;
1713
+ var o, i, p, x;
1714
1714
  if (!((o = e.draft) != null && o.stockSnapshot)) return "Stock snapshot is not available.";
1715
- if (((i = e.draft) == null ? void 0 : i.status) !== pe.enum.DRAFT) return "Status is not draft.";
1716
- const r = $e.value.some((v) => v.physicalBalance < 0), a = ((D = (p = h.stockBalance.skus) == null ? void 0 : p.filter((v) => v.balance.amount < 0)) == null ? void 0 : D.map((v) => v.id)) ?? [], f = new Set(K.value.map((v) => v._id)), n = a.filter((v) => !f.has(v)).length;
1715
+ if (((i = e.draft) == null ? void 0 : i.status) !== ve.enum.DRAFT) return "Status is not draft.";
1716
+ const l = $e.value.some((v) => v.physicalBalance < 0), a = ((x = (p = h.stockBalance.skus) == null ? void 0 : p.filter((v) => v.balance.amount < 0)) == null ? void 0 : x.map((v) => v.id)) ?? [], f = new Set(K.value.map((v) => v._id)), n = a.filter((v) => !f.has(v)).length;
1717
1717
  return [
1718
- r ? "Negative total exist." : null,
1718
+ l ? "Negative total exist." : null,
1719
1719
  n ? "Negative stock is not included in this draft. Please commit the draft to include these stocks." : null
1720
1720
  ].filter((v) => v).join(" ");
1721
1721
  });
1722
- return (r, a) => {
1723
- const f = z("FmButtonGroup"), n = z("FmMenuDivider"), o = z("FmCard"), i = z("FmButton"), p = z("FmCircularProgress"), D = z("FmChip"), v = z("FmTextField"), T = z("FmIcon"), j = z("FmTable"), le = z("FmSpacer"), ce = z("FmTooltip"), De = z("FmSideSheet");
1724
- return S(), oe(De, {
1722
+ return (l, a) => {
1723
+ const f = z("FmButtonGroup"), n = z("FmMenuDivider"), o = z("FmCard"), i = z("FmButton"), p = z("FmCircularProgress"), x = z("FmChip"), v = z("FmTextField"), T = z("FmIcon"), j = z("FmTable"), re = z("FmSpacer"), ce = z("FmTooltip"), De = z("FmSideSheet");
1724
+ return F(), ie(De, {
1725
1725
  "dismiss-away": "",
1726
1726
  "max-width": 9999,
1727
1727
  "model-value": $(b),
@@ -1729,20 +1729,20 @@ const ka = kt(
1729
1729
  header: "Closing details"
1730
1730
  }, {
1731
1731
  "side-sheet-footer": Q(() => {
1732
- var C, G, ee, ve;
1732
+ var C, G, ee, pe;
1733
1733
  return [
1734
1734
  c("div", tn, [
1735
- ((C = e.draft) == null ? void 0 : C.status) === $(pe).enum.DRAFT ? (S(), E(ie, { key: 0 }, [
1736
- tt.value ? (S(), oe(ce, {
1735
+ ((C = e.draft) == null ? void 0 : C.status) === $(ve).enum.DRAFT ? (F(), E(le, { key: 0 }, [
1736
+ tt.value ? (F(), ie(ce, {
1737
1737
  key: 0,
1738
1738
  "z-index": 51,
1739
1739
  placement: "right"
1740
1740
  }, {
1741
1741
  content: Q(() => [
1742
- se(ne(tt.value), 1)
1742
+ oe(ae(tt.value), 1)
1743
1743
  ]),
1744
1744
  default: Q(() => [
1745
- A(i, {
1745
+ D(i, {
1746
1746
  disabled: "",
1747
1747
  key: "approve key",
1748
1748
  label: "Approve",
@@ -1750,21 +1750,21 @@ const ka = kt(
1750
1750
  })
1751
1751
  ]),
1752
1752
  _: 1
1753
- })) : (S(), oe(i, {
1753
+ })) : (F(), ie(i, {
1754
1754
  key: "approve key",
1755
1755
  label: "Approve",
1756
1756
  onClick: a[6] || (a[6] = () => e.draft && $(y).approveDraft(e.draft, () => m("submitted")))
1757
1757
  }))
1758
- ], 64)) : te("", !0),
1759
- ((G = e.draft) == null ? void 0 : G.status) === $(pe).enum.DRAFT ? (S(), oe(i, {
1758
+ ], 64)) : ne("", !0),
1759
+ ((G = e.draft) == null ? void 0 : G.status) === $(ve).enum.DRAFT ? (F(), ie(i, {
1760
1760
  key: 1,
1761
1761
  label: "Reject",
1762
1762
  variant: "destructive",
1763
1763
  onClick: a[7] || (a[7] = () => e.draft && $(y).rejectDraft(e.draft, () => m("submitted")))
1764
- })) : te("", !0),
1765
- (ee = e.draft) != null && ee.approvedAt && ((ve = e.draft) == null ? void 0 : ve.status) !== $(pe).enum.COMPLETED ? (S(), oe(Ge, { key: 2 }, {
1764
+ })) : ne("", !0),
1765
+ (ee = e.draft) != null && ee.approvedAt && ((pe = e.draft) == null ? void 0 : pe.status) !== $(ve).enum.COMPLETED ? (F(), ie(Ge, { key: 2 }, {
1766
1766
  default: Q(() => [
1767
- A(i, {
1767
+ D(i, {
1768
1768
  label: "Sync",
1769
1769
  loading: U.value,
1770
1770
  onClick: a[8] || (a[8] = () => {
@@ -1775,8 +1775,8 @@ const ka = kt(
1775
1775
  }, null, 8, ["loading"])
1776
1776
  ]),
1777
1777
  _: 1
1778
- })) : te("", !0),
1779
- A(i, {
1778
+ })) : ne("", !0),
1779
+ D(i, {
1780
1780
  label: "Close",
1781
1781
  variant: "tertiary",
1782
1782
  onClick: a[9] || (a[9] = (Be) => b.value = !1)
@@ -1787,14 +1787,14 @@ const ka = kt(
1787
1787
  default: Q(() => [
1788
1788
  c("div", Da, [
1789
1789
  c("div", null, [
1790
- A(f, {
1790
+ D(f, {
1791
1791
  items: _e,
1792
1792
  modelValue: ke.value,
1793
1793
  "onUpdate:modelValue": a[0] || (a[0] = (C) => ke.value = C)
1794
1794
  }, null, 8, ["modelValue"])
1795
1795
  ]),
1796
- ke.value.value === "overview" ? (S(), E(ie, { key: 0 }, [
1797
- A(o, {
1796
+ ke.value.value === "overview" ? (F(), E(le, { key: 0 }, [
1797
+ D(o, {
1798
1798
  variant: "outlined",
1799
1799
  class: "flex flex-col gap-8 px-12 py-16"
1800
1800
  }, {
@@ -1805,20 +1805,20 @@ const ka = kt(
1805
1805
  a[11] || (a[11] = c("div", { class: "fm-typo-en-body-lg-600" }, "Closing summary", -1)),
1806
1806
  c("div", Aa, [
1807
1807
  c("div", {
1808
- class: Fe(["fm-status-badge", $(Ne)(((C = r.draft) == null ? void 0 : C.status) ?? "DRAFT")])
1809
- }, ne($(Le)(((G = r.draft) == null ? void 0 : G.status) ?? "")), 3)
1808
+ class: Fe(["fm-status-badge", $(Ne)(((C = l.draft) == null ? void 0 : C.status) ?? "DRAFT")])
1809
+ }, ae($(Le)(((G = l.draft) == null ? void 0 : G.status) ?? "")), 3)
1810
1810
  ])
1811
1811
  ]),
1812
- A(n),
1812
+ D(n),
1813
1813
  c("div", _a, [
1814
- (S(!0), E(ie, null, Te(Ae.value, (ee, ve) => (S(), E("div", {
1814
+ (F(!0), E(le, null, Te(Ae.value, (ee, pe) => (F(), E("div", {
1815
1815
  class: "flex flex-col gap-4",
1816
- key: ve
1816
+ key: pe
1817
1817
  }, [
1818
1818
  c("div", wa, [
1819
- c("div", Sa, ne(ee.label), 1)
1819
+ c("div", Sa, ae(ee.label), 1)
1820
1820
  ]),
1821
- c("div", Fa, ne(ee.value), 1)
1821
+ c("div", Fa, ae(ee.value), 1)
1822
1822
  ]))), 128))
1823
1823
  ])
1824
1824
  ];
@@ -1828,8 +1828,8 @@ const ka = kt(
1828
1828
  c("div", Ca, [
1829
1829
  c("div", $a, [
1830
1830
  a[12] || (a[12] = c("div", { class: "flex-1 fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, " Closing items ", -1)),
1831
- I.value ? te("", !0) : (S(), E("div", Ba, [
1832
- r.draft && r.draft.status !== $(pe).enum.COMPLETED ? (S(), oe(i, {
1831
+ I.value ? ne("", !0) : (F(), E("div", Ba, [
1832
+ l.draft && l.draft.status !== $(ve).enum.COMPLETED ? (F(), ie(i, {
1833
1833
  key: 0,
1834
1834
  label: "Refresh balance",
1835
1835
  "prepend-icon": "refresh",
@@ -1838,12 +1838,11 @@ const ka = kt(
1838
1838
  "bg-color": "transparent",
1839
1839
  "border-color": "primary",
1840
1840
  loading: M.value,
1841
- onClick: ae
1842
- }, null, 8, ["loading"])) : te("", !0),
1843
- A(Ge, null, {
1841
+ onClick: te
1842
+ }, null, 8, ["loading"])) : ne("", !0),
1843
+ D(Ge, null, {
1844
1844
  default: Q(() => [
1845
- r.draft && r.draft.status !== $(pe).enum.COMPLETED ? (S(), oe(i, {
1846
- key: 0,
1845
+ D(i, {
1847
1846
  label: "Invalidate Draft Cache",
1848
1847
  "prepend-icon": "refresh",
1849
1848
  variant: "secondary",
@@ -1851,57 +1850,57 @@ const ka = kt(
1851
1850
  "bg-color": "transparent",
1852
1851
  "border-color": "primary",
1853
1852
  loading: M.value,
1854
- onClick: re
1855
- }, null, 8, ["loading"])) : te("", !0)
1853
+ onClick: se
1854
+ }, null, 8, ["loading"])
1856
1855
  ]),
1857
1856
  _: 1
1858
1857
  }),
1859
- A(i, {
1858
+ D(i, {
1860
1859
  label: "Export data",
1861
1860
  "prepend-icon": "download",
1862
1861
  variant: "secondary",
1863
1862
  "text-color": "primary",
1864
1863
  "bg-color": "transparent",
1865
1864
  "border-color": "primary",
1866
- onClick: a[1] || (a[1] = (C) => r.draft ? $(y).exportDraft(
1867
- r.draft,
1865
+ onClick: a[1] || (a[1] = (C) => l.draft ? $(y).exportDraft(
1866
+ l.draft,
1868
1867
  k.value,
1869
1868
  P.value
1870
1869
  ) : null)
1871
1870
  })
1872
1871
  ]))
1873
1872
  ]),
1874
- I.value ? (S(), E("div", Ta, [
1873
+ I.value ? (F(), E("div", Ta, [
1875
1874
  a[14] || (a[14] = c("div", { class: "h-80" }, null, -1)),
1876
1875
  c("div", ja, [
1877
1876
  c("div", null, [
1878
- A(p, { size: "md" })
1877
+ D(p, { size: "md" })
1879
1878
  ]),
1880
1879
  a[13] || (a[13] = c("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Fetching info... ", -1))
1881
1880
  ]),
1882
1881
  a[15] || (a[15] = c("div", { class: "h-80" }, null, -1))
1883
- ])) : (S(), E(ie, { key: 1 }, [
1882
+ ])) : (F(), E(le, { key: 1 }, [
1884
1883
  c("div", Ia, [
1885
1884
  c("div", Ua, [
1886
- A(D, {
1885
+ D(x, {
1887
1886
  label: "Template Item(s)",
1888
- selected: F.value.templateItem,
1889
- onClick: a[2] || (a[2] = (C) => F.value.templateItem = !F.value.templateItem)
1887
+ selected: S.value.templateItem,
1888
+ onClick: a[2] || (a[2] = (C) => S.value.templateItem = !S.value.templateItem)
1890
1889
  }, null, 8, ["selected"]),
1891
- A(D, {
1890
+ D(x, {
1892
1891
  label: "Non-template Item(s)",
1893
- selected: F.value.nonTemplateItem,
1894
- onClick: a[3] || (a[3] = (C) => F.value.nonTemplateItem = !F.value.nonTemplateItem)
1892
+ selected: S.value.nonTemplateItem,
1893
+ onClick: a[3] || (a[3] = (C) => S.value.nonTemplateItem = !S.value.nonTemplateItem)
1895
1894
  }, null, 8, ["selected"])
1896
1895
  ]),
1897
- A(v, {
1896
+ D(v, {
1898
1897
  modelValue: xe.value,
1899
1898
  "onUpdate:modelValue": a[4] || (a[4] = (C) => xe.value = C),
1900
1899
  placeholder: "Filter items"
1901
1900
  }, null, 8, ["modelValue"])
1902
1901
  ]),
1903
- $(_).skuTags.size ? (S(), E("div", Pa, [
1904
- (S(!0), E(ie, null, Te($(_).skuTags.keys(), (C) => (S(), oe(D, {
1902
+ $(_).skuTags.size ? (F(), E("div", Pa, [
1903
+ (F(!0), E(le, null, Te($(_).skuTags.keys(), (C) => (F(), ie(x, {
1905
1904
  key: `${C}`,
1906
1905
  label: `${C}`,
1907
1906
  selectable: "",
@@ -1909,12 +1908,12 @@ const ka = kt(
1909
1908
  onClick: (G) => N[`${C}`] = !N[`${C}`]
1910
1909
  }, {
1911
1910
  default: Q(() => [
1912
- N[`${C}`] ? (S(), oe(T, {
1911
+ N[`${C}`] ? (F(), ie(T, {
1913
1912
  key: 0,
1914
1913
  name: "check",
1915
1914
  class: "text-white",
1916
1915
  size: "sm"
1917
- })) : te("", !0),
1916
+ })) : ne("", !0),
1918
1917
  c("span", {
1919
1918
  class: Fe([
1920
1919
  "",
@@ -1923,16 +1922,16 @@ const ka = kt(
1923
1922
  "text-fm-color-typo-primary fm-typo-en-body-md-400": !N[`${C}`]
1924
1923
  }
1925
1924
  ])
1926
- }, ne(C), 3)
1925
+ }, ae(C), 3)
1927
1926
  ]),
1928
1927
  _: 2
1929
1928
  }, 1032, ["label", "selected", "onClick"]))), 128))
1930
- ])) : te("", !0),
1929
+ ])) : ne("", !0),
1931
1930
  c("div", Ra, [
1932
1931
  c("div", {
1933
1932
  style: gt({ height: "600px", minWidth: `${Ue.value}px` })
1934
1933
  }, [
1935
- A(j, {
1934
+ D(j, {
1936
1935
  "column-defs": Ce.value,
1937
1936
  "row-data": $e.value,
1938
1937
  "search-value": xe.value
@@ -1941,10 +1940,10 @@ const ka = kt(
1941
1940
  ])
1942
1941
  ], 64))
1943
1942
  ])
1944
- ], 64)) : te("", !0),
1945
- ke.value.value === "history" ? (S(), E("div", Ma, [
1946
- we.value.length ? (S(), E("div", Na, [
1947
- (S(!0), E(ie, null, Te(we.value, (C, G) => (S(), E(ie, { key: G }, [
1943
+ ], 64)) : ne("", !0),
1944
+ ke.value.value === "history" ? (F(), E("div", Ma, [
1945
+ we.value.length ? (F(), E("div", Na, [
1946
+ (F(!0), E(le, null, Te(we.value, (C, G) => (F(), E(le, { key: G }, [
1948
1947
  c("div", Ea, [
1949
1948
  c("div", za, [
1950
1949
  c("div", Ha, [
@@ -1972,8 +1971,8 @@ const ka = kt(
1972
1971
  ])
1973
1972
  ]),
1974
1973
  c("div", Ya, [
1975
- c("div", Ka, ne(C.header), 1),
1976
- c("div", Qa, ne(C.date), 1)
1974
+ c("div", Ka, ae(C.header), 1),
1975
+ c("div", Qa, ae(C.date), 1)
1977
1976
  ])
1978
1977
  ]),
1979
1978
  c("div", qa, [
@@ -1991,22 +1990,22 @@ const ka = kt(
1991
1990
  ])
1992
1991
  ]),
1993
1992
  c("div", Za, [
1994
- A(o, {
1993
+ D(o, {
1995
1994
  variant: "outlined",
1996
1995
  class: "py-12 px-16"
1997
1996
  }, {
1998
1997
  default: Q(() => [
1999
1998
  c("div", Ja, [
2000
- (S(!0), E(ie, null, Te(C.info, (ee, ve) => (S(), E("div", {
2001
- key: ve,
1999
+ (F(!0), E(le, null, Te(C.info, (ee, pe) => (F(), E("div", {
2000
+ key: pe,
2002
2001
  class: "flex flex-col gap-4"
2003
2002
  }, [
2004
- c("div", Xa, ne(ee == null ? void 0 : ee.label), 1),
2003
+ c("div", Xa, ae(ee == null ? void 0 : ee.label), 1),
2005
2004
  c("div", en, [
2006
- (S(!0), E(ie, null, Te(ee == null ? void 0 : ee.values, (Be, Pe) => (S(), E("div", {
2005
+ (F(!0), E(le, null, Te(ee == null ? void 0 : ee.values, (Be, Pe) => (F(), E("div", {
2007
2006
  key: Pe,
2008
2007
  class: "fm-typo-en-body-lg-600"
2009
- }, ne(Be), 1))), 128))
2008
+ }, ae(Be), 1))), 128))
2010
2009
  ])
2011
2010
  ]))), 128))
2012
2011
  ])
@@ -2016,20 +2015,20 @@ const ka = kt(
2016
2015
  ])
2017
2016
  ])
2018
2017
  ], 64))), 128))
2019
- ])) : (S(), E("div", Va, [
2020
- A(le),
2018
+ ])) : (F(), E("div", Va, [
2019
+ D(re),
2021
2020
  c("div", null, [
2022
2021
  c("img", {
2023
2022
  src: $(aa),
2024
2023
  alt: "List is empty"
2025
2024
  }, null, 8, La)
2026
2025
  ]),
2027
- a[16] || (a[16] = c("div", { class: "fm-typo-en-body-lg-600" }, ne("No records found"), -1)),
2028
- a[17] || (a[17] = c("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary px-16" }, ne("You can track approval and rejection history here"), -1)),
2029
- A(le),
2030
- A(le)
2026
+ a[16] || (a[16] = c("div", { class: "fm-typo-en-body-lg-600" }, ae("No records found"), -1)),
2027
+ a[17] || (a[17] = c("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)),
2028
+ D(re),
2029
+ D(re)
2031
2030
  ]))
2032
- ])) : te("", !0)
2031
+ ])) : ne("", !0)
2033
2032
  ])
2034
2033
  ]),
2035
2034
  _: 1
@@ -2038,7 +2037,7 @@ const ka = kt(
2038
2037
  }
2039
2038
  }), on = { class: "flex-1 flex flex-col gap-8" }, sn = { class: "flex flex-col" }, rn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ln = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, cn = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, un = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, $n = /* @__PURE__ */ He({
2040
2039
  __name: "ClosingDraftView",
2041
- setup(l) {
2040
+ setup(r) {
2042
2041
  const { t: s } = bt(), { viewDraft: e } = ze(), { viewClosingDraftProps: d, viewClosingDraftShow: h } = Yt(ze()), y = Oe(), b = ka(), I = Mt(), { breakpoints: M } = Et();
2043
2042
  y.watchLocation(b.fetchDrafts);
2044
2043
  const U = L(() => b.loading), k = Y(""), P = L(() => M.value.xs || M.value.sm), B = L(() => P.value ? 10 : 20);
@@ -2066,8 +2065,8 @@ const ka = kt(
2066
2065
  ]);
2067
2066
  return (_, R) => {
2068
2067
  const N = z("FmTable");
2069
- return S(), E(ie, null, [
2070
- A(Vt, {
2068
+ return F(), E(le, null, [
2069
+ D(Vt, {
2071
2070
  title: $(s)("inventory.closing.draft.title"),
2072
2071
  actions: t.value,
2073
2072
  "onClick:action": q
@@ -2082,13 +2081,13 @@ const ka = kt(
2082
2081
  }
2083
2082
  ])
2084
2083
  }, [
2085
- A(ta, {
2084
+ D(ta, {
2086
2085
  "change-location": "",
2087
2086
  searchable: "",
2088
2087
  search: k.value,
2089
2088
  "onUpdate:search": R[0] || (R[0] = (g) => k.value = g)
2090
2089
  }, null, 8, ["search"]),
2091
- A(N, {
2090
+ D(N, {
2092
2091
  style: gt($(I).tableHeight),
2093
2092
  "column-defs": $(b).columnDefs,
2094
2093
  "row-data": $(b).drafts,
@@ -2098,40 +2097,40 @@ const ka = kt(
2098
2097
  "page-size": B.value
2099
2098
  }, {
2100
2099
  "list-row": Q((g) => [
2101
- A(Xt, {
2100
+ D(Xt, {
2102
2101
  row: g,
2103
2102
  onRowClick: (m) => $(e)(m)
2104
2103
  }, {
2105
2104
  default: Q((m) => {
2106
- var F, H, K, J, w, X, me, ae, re, de, be, he, Ie, Z, Ce, Ue, xe, $e, Ae, _e;
2105
+ var S, H, K, J, w, X, me, te, se, de, be, he, Ie, Z, Ce, Ue, xe, $e, Ae, _e;
2107
2106
  return [
2108
2107
  c("div", on, [
2109
2108
  c("div", sn, [
2110
2109
  c("div", rn, [
2111
- A($(Me), {
2112
- render: (K = (H = (F = m._id) == null ? void 0 : F.column) == null ? void 0 : H.columnDef) == null ? void 0 : K.cell,
2110
+ D($(Me), {
2111
+ render: (K = (H = (S = m._id) == null ? void 0 : S.column) == null ? void 0 : H.columnDef) == null ? void 0 : K.cell,
2113
2112
  props: (w = (J = m._id) == null ? void 0 : J.getContext) == null ? void 0 : w.call(J)
2114
2113
  }, null, 8, ["render", "props"])
2115
2114
  ]),
2116
2115
  c("div", ln, [
2117
- A($(Me), {
2118
- render: (ae = (me = (X = m.name) == null ? void 0 : X.column) == null ? void 0 : me.columnDef) == null ? void 0 : ae.cell,
2119
- props: (de = (re = m.name) == null ? void 0 : re.getContext) == null ? void 0 : de.call(re)
2116
+ D($(Me), {
2117
+ render: (te = (me = (X = m.name) == null ? void 0 : X.column) == null ? void 0 : me.columnDef) == null ? void 0 : te.cell,
2118
+ props: (de = (se = m.name) == null ? void 0 : se.getContext) == null ? void 0 : de.call(se)
2120
2119
  }, null, 8, ["render", "props"])
2121
2120
  ]),
2122
- c("div", cn, ne([
2121
+ c("div", cn, ae([
2123
2122
  ...g.original.items.slice(0, 3).map((ke) => ke.sku.name),
2124
2123
  ...g.original.items.length >= 3 ? [`and ${g.original.items.length - 3} more items`] : []
2125
2124
  ].join(", ")), 1),
2126
2125
  c("div", un, [
2127
- A($(Me), {
2126
+ D($(Me), {
2128
2127
  render: (Ie = (he = (be = m.ref) == null ? void 0 : be.column) == null ? void 0 : he.columnDef) == null ? void 0 : Ie.cell,
2129
2128
  props: (Ce = (Z = m.ref) == null ? void 0 : Z.getContext) == null ? void 0 : Ce.call(Z)
2130
2129
  }, null, 8, ["render", "props"])
2131
2130
  ])
2132
2131
  ]),
2133
2132
  c("div", null, [
2134
- A($(Me), {
2133
+ D($(Me), {
2135
2134
  render: ($e = (xe = (Ue = m.status) == null ? void 0 : Ue.column) == null ? void 0 : xe.columnDef) == null ? void 0 : $e.cell,
2136
2135
  props: (_e = (Ae = m.status) == null ? void 0 : Ae.getContext) == null ? void 0 : _e.call(Ae)
2137
2136
  }, null, 8, ["render", "props"])
@@ -2148,8 +2147,8 @@ const ka = kt(
2148
2147
  ]),
2149
2148
  _: 1
2150
2149
  }, 8, ["title", "actions"]),
2151
- (S(), oe(Pt, { to: "body" }, [
2152
- A(nn, Rt($(d), {
2150
+ (F(), ie(Pt, { to: "body" }, [
2151
+ D(nn, Rt($(d), {
2153
2152
  show: $(h),
2154
2153
  "onUpdate:show": R[2] || (R[2] = (g) => vt(h) ? h.value = g : null),
2155
2154
  onSubmitted: R[3] || (R[3] = () => (h.value = !1, $(b).fetchDrafts())),