@feedmepos/mf-inventory-portal 1.1.7 → 1.1.8-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/{App-Q1owgYie.js → App-veHf70us.js} +1 -1
  2. package/dist/{ApprovalView-BC6549i5.js → ApprovalView-BHmFwrSI.js} +2 -2
  3. package/dist/{BindingsDialog-0QfXxRu_.js → BindingsDialog-BtsPrnkN.js} +2 -2
  4. package/dist/{BindingsPicker-BgwXjm2p.js → BindingsPicker-BZLdo3j7.js} +1 -1
  5. package/dist/{BindingsTable-DpFr3UiN.js → BindingsTable-Cl_202xc.js} +1 -1
  6. package/dist/{ClosingDraftView-BAXB-oYb.js → ClosingDraftView-BmYBBxXF.js} +443 -432
  7. package/dist/{ClosingTemplateView-D4JIKbHj.js → ClosingTemplateView-D_q5Cqh0.js} +2 -2
  8. package/dist/{DeliveryOrderPrintPreview-DhhQcRX8.js → DeliveryOrderPrintPreview-OpO2cRqM.js} +5 -5
  9. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C1r4dUi1.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DnD-9Xlp.js} +13 -13
  10. package/dist/{FmMultiselectDialog-CMapyW92.js → FmMultiselectDialog-BAXYhHXd.js} +1 -1
  11. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CGKgWump.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BhNXYuvq.js} +1 -1
  12. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BLXeAd6v.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-C7SW2nNO.js} +1 -1
  13. package/dist/{IngredientGroupView-CYsjNj8v.js → IngredientGroupView-D0h1YsbP.js} +2 -2
  14. package/dist/{IngredientsView-dnmBJKzG.js → IngredientsView-C_3wyh5v.js} +4 -4
  15. package/dist/{IntegrationView-DEX-OtIi.js → IntegrationView-QqGcH-dN.js} +3 -3
  16. package/dist/{InventoryBindingForm-DzvL-l4u.js → InventoryBindingForm-z8_qpiTO.js} +1 -1
  17. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Cv5t5HYo.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-Lx9VL2I6.js} +3 -3
  18. package/dist/{InventoryBindingSummary-nwF3dcR4.js → InventoryBindingSummary-Bsl4Gv9C.js} +1 -1
  19. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CUZi-c3G.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BxHFH1_k.js} +1 -1
  20. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CQzdlmJ0.js → PremiumBadge.vue_vue_type_script_setup_true_lang-D5oYHtLv.js} +1 -1
  21. package/dist/{PublishView-BuWPjyoB.js → PublishView-D4MSi6ZU.js} +1 -1
  22. package/dist/{PurchaseOrderPrintPreview-2uET9tFI.js → PurchaseOrderPrintPreview-BfIw_wm3.js} +7 -7
  23. package/dist/{ReceiveRequestView-BZtuKeJT.js → ReceiveRequestView-BLN4uh1f.js} +8 -8
  24. package/dist/{RecipeView-BbXj7r6o.js → RecipeView-BYrXdWYU.js} +3 -3
  25. package/dist/{StockView-DKcR_Kmp.js → StockView-BkOpMBkI.js} +609 -594
  26. package/dist/{SupplierView-CdpHCgy7.js → SupplierView-DCes9XEn.js} +3 -3
  27. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-SFt9tDex.js → TransferDetails.vue_vue_type_script_setup_true_lang-DdmVEYUZ.js} +5 -5
  28. package/dist/{TransferTemplateView-DuutgPoJ.js → TransferTemplateView-CSQWhzL3.js} +6 -6
  29. package/dist/{UnitView-ghRUvZ4b.js → UnitView-BR8h1-Fg.js} +3 -3
  30. package/dist/{WarehouseView-CdL4qG7c.js → WarehouseView-C0owHwI6.js} +1 -1
  31. package/dist/{app-Ve0uP1Mz.js → app-CsCsQ8Wq.js} +198 -198
  32. package/dist/app.js +1 -1
  33. package/dist/{decimal-BMp-Vzzy.js → decimal-CCcb_ZM5.js} +1 -1
  34. package/dist/{format-unit-display-eeJk710H.js → format-unit-display-LULBvgMu.js} +2 -2
  35. package/dist/{index-B9iRubzb.js → index-CcJb5oyS.js} +1 -1
  36. package/dist/{index-BEkSWejP.js → index-GxCc62xJ.js} +1 -1
  37. package/dist/{stock-CaNAztA8.js → stock-DYOew5RJ.js} +1 -1
  38. package/dist/{supplier-BgFEcnyT.js → supplier-CeQJLRf5.js} +1 -1
  39. package/dist/tsconfig.app.tsbuildinfo +1 -1
  40. package/dist/{use-ingredient-select-dialog-kdyHK268.js → use-ingredient-select-dialog-DjZg2Cco.js} +1 -1
  41. package/dist/{use-inventory-binding-dialog-BCWV0llB.js → use-inventory-binding-dialog-CBXOv0gD.js} +1 -1
  42. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +1 -1
  43. package/package.json +2 -2
@@ -1,36 +1,36 @@
1
- import { defineComponent as je, ref as E, computed as P, onMounted as Re, resolveComponent as T, openBlock as x, createElementBlock as R, Fragment as q, createTextVNode as G, createBlock as Z, withCtx as Y, createElementVNode as n, toDisplayString as K, unref as S, createVNode as D, createCommentVNode as Q, h as I, reactive as Xe, watch as et, isRef as He, normalizeClass as me, renderList as ve, normalizeStyle as Ve, Teleport as tt, mergeProps as at } from "vue";
2
- import { a3 as nt, u as $e, an as L, ae as Ne, ao as ze, m as ot, P as Pe, j as z, t as st, T as ye, r as rt, s as lt, v as ct, ap as Oe, aq as Ye, a9 as Ke, ar as se, af as it, am as ce, a0 as Ie, D as Ee, i as we, h as ut, f as dt, a as mt, B as ft, _ as pt, C as vt, E as yt, G as Ce } from "./app-Ve0uP1Mz.js";
3
- import { useCoreStore as gt, useI18n as Ge } from "@feedmepos/mf-common";
4
- import { useSnackbar as Me, useDialog as bt, useProxiedModel as At, components as de, useBreakpoints as Dt } from "@feedmepos/ui-library";
5
- import { defineStore as qe, storeToRefs as kt } from "pinia";
6
- import { a as Ue, u as We } from "./stock-CaNAztA8.js";
7
- import { E as _t } from "./empty-placeholder-wf6-BWE8.js";
8
- const Be = nt((l, o) => {
1
+ import { defineComponent as je, ref as E, computed as P, onMounted as Pe, resolveComponent as T, openBlock as w, createElementBlock as R, Fragment as q, createTextVNode as G, createBlock as Z, withCtx as Y, createElementVNode as n, toDisplayString as K, unref as S, createVNode as D, createCommentVNode as Q, h as I, reactive as et, watch as tt, isRef as Ve, normalizeClass as me, renderList as ve, normalizeStyle as ze, Teleport as at, mergeProps as nt } from "vue";
2
+ import { a3 as ot, u as $e, an as L, ae as Ne, ao as Oe, m as st, P as Me, j as N, t as rt, T as ye, r as lt, s as ct, v as it, ap as Ye, aq as Ke, a9 as Ge, ar as se, af as ut, as as Ie, am as re, a0 as Re, D as He, i as we, h as dt, f as mt, a as ft, B as pt, _ as vt, C as yt, E as gt, G as Ce } from "./app-CsCsQ8Wq.js";
3
+ import { useCoreStore as bt, useI18n as qe } from "@feedmepos/mf-common";
4
+ import { useSnackbar as Ue, useDialog as At, useProxiedModel as Dt, components as de, useBreakpoints as kt } from "@feedmepos/ui-library";
5
+ import { defineStore as We, storeToRefs as _t } from "pinia";
6
+ import { a as Le, u as Ze } from "./stock-DYOew5RJ.js";
7
+ import { E as ht } from "./empty-placeholder-wf6-BWE8.js";
8
+ const Be = ot((l, o) => {
9
9
  function e() {
10
10
  return $e().currentLocation.dbName;
11
11
  }
12
12
  return {
13
- async getDraft(i) {
14
- const m = e(), _ = `${l.inventoryBackendUrl}/${m}/closing-draft/${i}`;
15
- return o.get(_);
13
+ async getDraft(c) {
14
+ const f = e(), h = `${l.inventoryBackendUrl}/${f}/closing-draft/${c}`;
15
+ return o.get(h);
16
16
  },
17
17
  async readDrafts() {
18
- const i = e(), m = `${l.inventoryBackendUrl}/${i}/closing-draft`;
19
- return o.get(m);
18
+ const c = e(), f = `${l.inventoryBackendUrl}/${c}/closing-draft`;
19
+ return o.get(f);
20
20
  },
21
- async runOperation(i) {
22
- const m = e(), _ = `${l.inventoryBackendUrl}/${m}/closing-draft/run-operation`;
23
- return o.post(_, i);
21
+ async runOperation(c) {
22
+ const f = e(), h = `${l.inventoryBackendUrl}/${f}/closing-draft/run-operation`;
23
+ return o.post(h, c);
24
24
  },
25
- async sync(i) {
26
- const m = e(), _ = `${l.inventoryBackendUrl}/${m}/closing-draft/sync`;
27
- return o.post(_, i);
25
+ async sync(c) {
26
+ const f = e(), h = `${l.inventoryBackendUrl}/${f}/closing-draft/sync`;
27
+ return o.post(h, c);
28
28
  }
29
29
  };
30
- }), ht = { class: "fm-typo-en-body-lg-400" }, xt = { class: "fm-typo-en-body-lg-600" }, wt = {
30
+ }), xt = { class: "fm-typo-en-body-lg-400" }, wt = { class: "fm-typo-en-body-lg-600" }, Ct = {
31
31
  key: 0,
32
32
  class: "flex flex-col"
33
- }, Ct = { class: "flex gap-12 py-8 justify-end w-full" }, Te = /* @__PURE__ */ je({
33
+ }, St = { class: "flex gap-12 py-8 justify-end w-full" }, Te = /* @__PURE__ */ je({
34
34
  __name: "ClosingDraftAction",
35
35
  props: {
36
36
  draft: {},
@@ -39,7 +39,7 @@ const Be = nt((l, o) => {
39
39
  onFinished: { type: Function }
40
40
  },
41
41
  setup(l) {
42
- const o = l, e = E(), i = Be(), m = Me(), _ = E(!1), p = E(null), M = E(!1), u = P(() => {
42
+ const o = l, e = E(), c = Be(), f = Ue(), h = E(!1), v = E(null), M = E(!1), d = P(() => {
43
43
  switch (o.action) {
44
44
  case L.enum.approveDraft:
45
45
  return "Approve";
@@ -60,80 +60,80 @@ const Be = nt((l, o) => {
60
60
  }
61
61
  throw new Error(`Unknown action: ${o.action}`);
62
62
  });
63
- Re(() => {
63
+ Pe(() => {
64
64
  if (o.draft.effectiveAt)
65
- p.value = new Date(o.draft.effectiveAt);
65
+ v.value = new Date(o.draft.effectiveAt);
66
66
  else {
67
67
  const s = new Date(o.draft.createdAt);
68
- s.setHours(23, 59, 59, 999), p.value = s;
68
+ s.setHours(23, 59, 59, 999), v.value = s;
69
69
  }
70
70
  M.value = !0;
71
71
  });
72
72
  const B = P({
73
73
  get() {
74
- return p.value === null ? "" : Ne(p.value);
74
+ return v.value === null ? "" : Ne(v.value);
75
75
  },
76
76
  set(s) {
77
77
  if (s) {
78
78
  const a = /* @__PURE__ */ new Date(`${s} ${H.value}`);
79
- a.setSeconds(59, 999), p.value = a;
79
+ a.setSeconds(59, 999), v.value = a;
80
80
  } else
81
- p.value = null;
81
+ v.value = null;
82
82
  }
83
83
  }), H = P({
84
84
  get() {
85
- return p.value === null ? "" : ze(p.value);
85
+ return v.value === null ? "" : Oe(v.value);
86
86
  },
87
87
  set(s) {
88
88
  if (s) {
89
89
  const a = /* @__PURE__ */ new Date(`${B.value} ${s}`);
90
- a.setSeconds(59, 999), p.value = a;
90
+ a.setSeconds(59, 999), v.value = a;
91
91
  } else
92
- p.value = null;
92
+ v.value = null;
93
93
  }
94
94
  });
95
95
  async function O() {
96
- _.value = !0;
96
+ h.value = !0;
97
97
  try {
98
- await i.runOperation({
98
+ await c.runOperation({
99
99
  _id: o.draft._id,
100
100
  _rev: o.draft._rev ?? "",
101
101
  action: o.action,
102
102
  data: {
103
- effectiveAt: p.value ? p.value.toISOString() : null,
103
+ effectiveAt: v.value ? v.value.toISOString() : null,
104
104
  remark: e.value
105
105
  }
106
- }).delayed(500), m.open({
106
+ }).delayed(500), f.open({
107
107
  title: "Success",
108
108
  message: "Action submitted",
109
109
  type: "success"
110
110
  }), o.onFinished();
111
111
  } catch (s) {
112
- m.open({
112
+ f.open({
113
113
  title: "Something went wrong",
114
114
  message: "Unable to submit action. Please try again",
115
115
  type: "error"
116
116
  }), console.error("error on submit closing draft action", s);
117
117
  } finally {
118
- _.value = !1;
118
+ h.value = !1;
119
119
  }
120
120
  }
121
121
  return (s, a) => {
122
- const w = T("FmLabel"), V = T("FmDatePicker"), d = T("FmTimePicker"), f = T("FmTextField"), C = T("FmButton"), $ = T("FmForm");
123
- return M.value ? (x(), Z($, {
122
+ const k = T("FmLabel"), V = T("FmDatePicker"), m = T("FmTimePicker"), p = T("FmTextField"), C = T("FmButton"), $ = T("FmForm");
123
+ return M.value ? (w(), Z($, {
124
124
  key: 1,
125
125
  onValidationSuccess: O,
126
126
  class: "flex flex-col gap-32",
127
- disabled: _.value
127
+ disabled: h.value
128
128
  }, {
129
129
  default: Y(() => [
130
- n("div", ht, [
130
+ n("div", xt, [
131
131
  a[4] || (a[4] = G(" You are about to ")),
132
- n("span", xt, K(u.value), 1),
132
+ n("span", wt, K(d.value), 1),
133
133
  a[5] || (a[5] = G(" this draft. Please provide a remark to justify this action. "))
134
134
  ]),
135
- s.action === S(L).enum.approveDraft ? (x(), R("div", wt, [
136
- D(w, { class: "fm-typo-en-body-lg-600" }, {
135
+ s.action === S(L).enum.approveDraft ? (w(), R("div", Ct, [
136
+ D(k, { class: "fm-typo-en-body-lg-600" }, {
137
137
  default: Y(() => a[6] || (a[6] = [
138
138
  G("Closing Date")
139
139
  ])),
@@ -143,96 +143,96 @@ const Be = nt((l, o) => {
143
143
  modelValue: B.value,
144
144
  "onUpdate:modelValue": a[0] || (a[0] = (F) => B.value = F)
145
145
  }, null, 8, ["modelValue"]),
146
- D(w, { class: "fm-typo-en-body-lg-600" }, {
146
+ D(k, { class: "fm-typo-en-body-lg-600" }, {
147
147
  default: Y(() => a[7] || (a[7] = [
148
148
  G("Closing Time")
149
149
  ])),
150
150
  _: 1
151
151
  }),
152
- D(d, {
152
+ D(m, {
153
153
  modelValue: H.value,
154
154
  "onUpdate:modelValue": a[1] || (a[1] = (F) => H.value = F)
155
155
  }, null, 8, ["modelValue"])
156
156
  ])) : Q("", !0),
157
- D(f, {
157
+ D(p, {
158
158
  modelValue: e.value,
159
159
  "onUpdate:modelValue": a[2] || (a[2] = (F) => e.value = F),
160
160
  label: "Remark",
161
161
  "label-mark": "required",
162
- rules: [S(ot)()]
162
+ rules: [S(st)()]
163
163
  }, null, 8, ["modelValue", "rules"]),
164
- n("div", Ct, [
164
+ n("div", St, [
165
165
  D(C, {
166
166
  label: "Cancel",
167
167
  variant: "tertiary",
168
168
  onClick: a[3] || (a[3] = (F) => s.onCancel())
169
169
  }),
170
170
  D(C, {
171
- label: u.value,
171
+ label: d.value,
172
172
  type: "submit",
173
173
  variant: y.value,
174
- loading: _.value
174
+ loading: h.value
175
175
  }, null, 8, ["label", "variant", "loading"])
176
176
  ])
177
177
  ]),
178
178
  _: 1
179
- }, 8, ["disabled"])) : (x(), R(q, { key: 0 }, [
179
+ }, 8, ["disabled"])) : (w(), R(q, { key: 0 }, [
180
180
  G("Loading")
181
181
  ], 64));
182
182
  };
183
183
  }
184
- }), St = ye(0);
185
- function Ze(l) {
186
- const o = l.measurementsAmounts.groupBy((i) => i.measurement.id), e = l.sku.unit.measurements.reduce((i, m) => {
187
- var M, u;
188
- const _ = ((u = (M = o.get(m.id)) == null ? void 0 : M[0]) == null ? void 0 : u.amount) ?? St, p = Pe(m.conversion, _);
189
- return i + +z(p);
190
- }, +z(l.baseAmount));
191
- return st(e, l.baseAmount.precision);
184
+ }), Ft = ye(0);
185
+ function Je(l) {
186
+ const o = l.measurementsAmounts.groupBy((c) => c.measurement.id), e = l.sku.unit.measurements.reduce((c, f) => {
187
+ var M, d;
188
+ const h = ((d = (M = o.get(f.id)) == null ? void 0 : M[0]) == null ? void 0 : d.amount) ?? Ft, v = Me(f.conversion, h);
189
+ return c + +N(v);
190
+ }, +N(l.baseAmount));
191
+ return rt(e, l.baseAmount.precision);
192
192
  }
193
- const Ft = ye(0), jt = ye(100);
194
- function $t(l, o, e) {
195
- const i = Ze(l), m = Oe(i, o), _ = o.amount === 0 ? null : Ye(m, {
193
+ const jt = ye(0), $t = ye(100);
194
+ function Bt(l, o, e) {
195
+ const c = Je(l), f = Ye(c, o), h = o.amount === 0 ? null : Ke(f, {
196
196
  ...o,
197
197
  amount: Math.abs(o.amount)
198
- }), p = _ ? Pe(_, jt) : null;
198
+ }), v = h ? Me(h, $t) : null;
199
199
  return {
200
200
  code: l.sku.code,
201
201
  name: l.sku.name,
202
202
  baseUnit: l.sku.unit.abbrev,
203
- baseUnitAmount: +z(l.baseAmount),
203
+ baseUnitAmount: +N(l.baseAmount),
204
204
  ...l.measurementsAmounts.filter(
205
- (u) => Bt(u.measurement) && e.includes(u.measurement.id)
205
+ (d) => Tt(d.measurement) && e.includes(d.measurement.id)
206
206
  ).reduce(
207
- (u, y, B) => (u[`measurementAbbrev${B}`] = `(${y.measurement.abbrev}) × ${z(y.measurement.conversion)}`, u[`measurementAmount${B}`] = +z(y.amount), u),
207
+ (d, y, B) => (d[`measurementAbbrev${B}`] = `(${y.measurement.abbrev}) × ${N(y.measurement.conversion)}`, d[`measurementAmount${B}`] = +N(y.amount), d),
208
208
  {}
209
209
  ),
210
- systemBalance: +z(o),
211
- physicalBalance: +z(i),
212
- adjustedAmount: +z(m),
213
- adjustedDiffPercentage: p ? +z(Ke(p, 2)) : null
210
+ systemBalance: +N(o),
211
+ physicalBalance: +N(c),
212
+ adjustedAmount: +N(f),
213
+ adjustedDiffPercentage: v ? +N(Ge(v, 2)) : null
214
214
  };
215
215
  }
216
- function Bt(l) {
216
+ function Tt(l) {
217
217
  return !l.abbrev.toLocaleLowerCase().includes("inactive");
218
218
  }
219
- function Tt(l) {
220
- const o = Je(l);
219
+ function It(l) {
220
+ const o = Qe(l);
221
221
  return l.reduce(
222
- (e, i) => {
223
- var m;
224
- return Math.max(e, ((m = o == null ? void 0 : o.get(i.sku._id)) == null ? void 0 : m[0].length) ?? 0);
222
+ (e, c) => {
223
+ var f;
224
+ return Math.max(e, ((f = o == null ? void 0 : o.get(c.sku._id)) == null ? void 0 : f[0].length) ?? 0);
225
225
  },
226
226
  0
227
227
  );
228
228
  }
229
- function Je(l) {
229
+ function Qe(l) {
230
230
  return l.groupBy(
231
231
  (o) => o.sku._id,
232
232
  (o) => o.measurementsAmounts.filter((e) => !e.measurement.abbrev.toLocaleLowerCase().includes("inactive")).map((e) => e.measurement.id)
233
233
  );
234
234
  }
235
- function It(l) {
235
+ function Rt(l) {
236
236
  return [
237
237
  {
238
238
  id: "code",
@@ -266,39 +266,39 @@ function It(l) {
266
266
  id: "baseUnit",
267
267
  name: "Base unit"
268
268
  },
269
- ...Array.from({ length: l }).flatMap((e, i) => [
269
+ ...Array.from({ length: l }).flatMap((e, c) => [
270
270
  {
271
- id: `measurementAmount${i}`,
272
- name: `UOM amount ${i + 1}`
271
+ id: `measurementAmount${c}`,
272
+ name: `UOM amount ${c + 1}`
273
273
  },
274
274
  {
275
- id: `measurementAbbrev${i}`,
276
- name: `UOM ${i + 1}`
275
+ id: `measurementAbbrev${c}`,
276
+ name: `UOM ${c + 1}`
277
277
  }
278
278
  ])
279
279
  ];
280
280
  }
281
- function Rt(l, o) {
282
- var a, w, V, d, f, C, $;
281
+ function Pt(l, o) {
282
+ var a, k, V, m, p, C, $;
283
283
  const e = o.groupBy(
284
284
  (F) => F.id,
285
285
  (F) => F.balance
286
- ), i = [...l.items, ...l.negativeStockItems ?? []], m = Je(i), _ = i.map((F) => {
287
- var W, re;
288
- const X = ((W = e.get(F.sku._id)) == null ? void 0 : W[0]) ?? Ft, J = ((re = m == null ? void 0 : m.get(F.sku._id)) == null ? void 0 : re[0]) ?? [];
289
- return $t(F, X, J);
290
- }), p = Tt(i), u = gt().currentBusiness.value, y = It(p), B = [
291
- ["Business name:", u == null ? void 0 : u.name],
292
- ["Business ID:", u == null ? void 0 : u._id],
293
- ["Menu version", u == null ? void 0 : u.menuVersion],
286
+ ), c = [...l.items, ...l.negativeStockItems ?? []], f = Qe(c), h = c.map((F) => {
287
+ var W, le;
288
+ const X = ((W = e.get(F.sku._id)) == null ? void 0 : W[0]) ?? jt, J = ((le = f == null ? void 0 : f.get(F.sku._id)) == null ? void 0 : le[0]) ?? [];
289
+ return Bt(F, X, J);
290
+ }), v = It(c), d = bt().currentBusiness.value, y = Rt(v), B = [
291
+ ["Business name:", d == null ? void 0 : d.name],
292
+ ["Business ID:", d == null ? void 0 : d._id],
293
+ ["Menu version", d == null ? void 0 : d.menuVersion],
294
294
  ["Created at", new Date(l.createdAt)],
295
295
  ["Created by", (a = l.createdBy) == null ? void 0 : a.name],
296
296
  ["Updated at", new Date(l.updatedAt)],
297
- ["Updated by", (w = l.updatedBy) == null ? void 0 : w.name],
297
+ ["Updated by", (k = l.updatedBy) == null ? void 0 : k.name],
298
298
  ["Recent action", l.approvedAt ? "Approve" : l.rejectionHistory ? "Reject" : ""],
299
299
  [
300
300
  "Action by",
301
- l.approvedAt ? (V = l.approvedBy) == null ? void 0 : V.name : l.rejectionHistory ? (f = (d = l.rejectionHistory[0]) == null ? void 0 : d.rejectedBy) == null ? void 0 : f.name : ""
301
+ l.approvedAt ? (V = l.approvedBy) == null ? void 0 : V.name : l.rejectionHistory ? (p = (m = l.rejectionHistory[0]) == null ? void 0 : m.rejectedBy) == null ? void 0 : p.name : ""
302
302
  ],
303
303
  [
304
304
  "Action at",
@@ -310,11 +310,11 @@ function Rt(l, o) {
310
310
  ],
311
311
  [],
312
312
  y.map((F) => F.name),
313
- ..._.map((F) => y.map((X) => F[X.id]))
314
- ], H = y.map((F) => `system:${F.id}`), O = rt(B, H), s = `[${u == null ? void 0 : u.name}] closing draft (${lt(new Date(l.updatedAt))}).xlsx`;
315
- return ct(O, s), s;
313
+ ...h.map((F) => y.map((X) => F[X.id]))
314
+ ], H = y.map((F) => `system:${F.id}`), O = lt(B, H), s = `[${d == null ? void 0 : d.name}] closing draft (${ct(new Date(l.updatedAt))}).xlsx`;
315
+ return it(O, s), s;
316
316
  }
317
- const Pt = { class: "flex flex-col" }, Mt = { class: "flex gap-12 py-8 justify-end w-full" }, Ut = /* @__PURE__ */ je({
317
+ const Mt = { class: "flex flex-col" }, Ut = { class: "flex gap-12 py-8 justify-end w-full" }, Lt = /* @__PURE__ */ je({
318
318
  __name: "RefreshBalanceAction",
319
319
  props: {
320
320
  draft: {},
@@ -323,46 +323,46 @@ const Pt = { class: "flex flex-col" }, Mt = { class: "flex gap-12 py-8 justify-e
323
323
  },
324
324
  setup(l) {
325
325
  const o = l;
326
- Ue();
327
- const e = E(!1), i = E(null), m = E(!1);
328
- Re(() => {
326
+ Le();
327
+ const e = E(!1), c = E(null), f = E(!1);
328
+ Pe(() => {
329
329
  if (o.draft.effectiveAt)
330
- i.value = new Date(o.draft.effectiveAt);
330
+ c.value = new Date(o.draft.effectiveAt);
331
331
  else {
332
- const u = new Date(o.draft.createdAt);
333
- u.setHours(23, 59, 59, 999), i.value = u;
332
+ const d = new Date(o.draft.createdAt);
333
+ d.setHours(23, 59, 59, 999), c.value = d;
334
334
  }
335
- m.value = !0;
335
+ f.value = !0;
336
336
  });
337
- const _ = P({
337
+ const h = P({
338
338
  get() {
339
- return i.value === null ? "" : Ne(i.value);
339
+ return c.value === null ? "" : Ne(c.value);
340
340
  },
341
- set(u) {
342
- if (u) {
343
- const y = /* @__PURE__ */ new Date(`${u} ${p.value}`);
344
- y.setSeconds(59, 999), i.value = y;
341
+ set(d) {
342
+ if (d) {
343
+ const y = /* @__PURE__ */ new Date(`${d} ${v.value}`);
344
+ y.setSeconds(59, 999), c.value = y;
345
345
  } else
346
- i.value = null;
346
+ c.value = null;
347
347
  }
348
- }), p = P({
348
+ }), v = P({
349
349
  get() {
350
- return i.value === null ? "" : ze(i.value);
350
+ return c.value === null ? "" : Oe(c.value);
351
351
  },
352
- set(u) {
353
- if (u) {
354
- const y = /* @__PURE__ */ new Date(`${_.value} ${u}`);
355
- y.setSeconds(59, 999), i.value = y;
352
+ set(d) {
353
+ if (d) {
354
+ const y = /* @__PURE__ */ new Date(`${h.value} ${d}`);
355
+ y.setSeconds(59, 999), c.value = y;
356
356
  } else
357
- i.value = null;
357
+ c.value = null;
358
358
  }
359
359
  });
360
360
  async function M() {
361
- e.value = !0, o.onFinished(i.value.toISOString());
361
+ e.value = !0, o.onFinished(c.value.toISOString());
362
362
  }
363
- return (u, y) => {
363
+ return (d, y) => {
364
364
  const B = T("FmLabel"), H = T("FmDatePicker"), O = T("FmTimePicker"), s = T("FmButton"), a = T("FmForm");
365
- return m.value ? (x(), Z(a, {
365
+ return f.value ? (w(), Z(a, {
366
366
  key: 1,
367
367
  onValidationSuccess: M,
368
368
  class: "flex flex-col gap-32",
@@ -381,7 +381,7 @@ const Pt = { class: "flex flex-col" }, Mt = { class: "flex gap-12 py-8 justify-e
381
381
  G(" the effective date and time. ")
382
382
  ])
383
383
  ], -1)),
384
- n("div", Pt, [
384
+ n("div", Mt, [
385
385
  D(B, { class: "fm-typo-en-body-lg-600" }, {
386
386
  default: Y(() => y[3] || (y[3] = [
387
387
  G("Closing Date")
@@ -389,8 +389,8 @@ const Pt = { class: "flex flex-col" }, Mt = { class: "flex gap-12 py-8 justify-e
389
389
  _: 1
390
390
  }),
391
391
  D(H, {
392
- modelValue: _.value,
393
- "onUpdate:modelValue": y[0] || (y[0] = (w) => _.value = w)
392
+ modelValue: h.value,
393
+ "onUpdate:modelValue": y[0] || (y[0] = (k) => h.value = k)
394
394
  }, null, 8, ["modelValue"]),
395
395
  D(B, { class: "fm-typo-en-body-lg-600" }, {
396
396
  default: Y(() => y[4] || (y[4] = [
@@ -399,15 +399,15 @@ const Pt = { class: "flex flex-col" }, Mt = { class: "flex gap-12 py-8 justify-e
399
399
  _: 1
400
400
  }),
401
401
  D(O, {
402
- modelValue: p.value,
403
- "onUpdate:modelValue": y[1] || (y[1] = (w) => p.value = w)
402
+ modelValue: v.value,
403
+ "onUpdate:modelValue": y[1] || (y[1] = (k) => v.value = k)
404
404
  }, null, 8, ["modelValue"])
405
405
  ]),
406
- n("div", Mt, [
406
+ n("div", Ut, [
407
407
  D(s, {
408
408
  label: "Cancel",
409
409
  variant: "tertiary",
410
- onClick: y[2] || (y[2] = (w) => u.onCancel())
410
+ onClick: y[2] || (y[2] = (k) => d.onCancel())
411
411
  }),
412
412
  D(s, {
413
413
  label: "Refresh balance",
@@ -418,132 +418,132 @@ const Pt = { class: "flex flex-col" }, Mt = { class: "flex gap-12 py-8 justify-e
418
418
  ])
419
419
  ]),
420
420
  _: 1
421
- }, 8, ["disabled"])) : (x(), R(q, { key: 0 }, [
421
+ }, 8, ["disabled"])) : (w(), R(q, { key: 0 }, [
422
422
  G("Loading")
423
423
  ], 64));
424
424
  };
425
425
  }
426
- }), Fe = qe(
426
+ }), Fe = We(
427
427
  "closingDraftActions",
428
428
  function() {
429
- const o = bt(), e = Me(), i = Ue(), m = Be(), _ = We(), p = E(!1), M = E();
430
- function u(d) {
431
- const f = {
432
- draft: d
429
+ const o = At(), e = Ue(), c = Le(), f = Be(), h = Ze(), v = E(!1), M = E();
430
+ function d(m) {
431
+ const p = {
432
+ draft: m
433
433
  };
434
- M.value = f, p.value = !0;
434
+ M.value = p, v.value = !0;
435
435
  }
436
- async function y(d) {
436
+ async function y(m) {
437
437
  var C;
438
- if (d.status === se.enum.COMPLETED) {
439
- const $ = d.closingAdjustmentId;
438
+ if (m.status === se.enum.COMPLETED) {
439
+ const $ = m.closingAdjustmentId;
440
440
  if (!$)
441
441
  return e.open({
442
442
  title: "Something went wrong",
443
443
  message: "Closing draft is completed but closing document cannot be found.",
444
444
  type: "error"
445
445
  }), console.error("Closing draft is completed but closing document cannot be found.", {
446
- draftId: d._id
446
+ draftId: m._id
447
447
  }), [];
448
- const F = await i.readAdjustmentById($);
448
+ const F = await c.readAdjustmentById($);
449
449
  return ((F == null ? void 0 : F.skus) ?? []).map((J) => ({
450
450
  id: J.sku._id,
451
451
  balance: J.fromBalance,
452
452
  costs: J.fromCostBalances
453
453
  }));
454
454
  } else
455
- return await _.readStockBalance(), ((C = _.stockBalance) == null ? void 0 : C.skus) ?? [];
455
+ return await h.readStockBalance(), ((C = h.stockBalance) == null ? void 0 : C.skus) ?? [];
456
456
  }
457
- async function B(d, f) {
458
- f || (e.open({
457
+ async function B(m, p) {
458
+ p || (e.open({
459
459
  title: "Exporting",
460
460
  message: "Fetching data..."
461
- }), f = await y(d)), Rt(d, f);
461
+ }), p = await y(m)), Pt(m, p);
462
462
  }
463
- function H(d, f) {
463
+ function H(m, p) {
464
464
  o.open({
465
465
  title: "Approve draft",
466
466
  contentComponent: Te,
467
467
  contentComponentProps: {
468
- draft: d,
468
+ draft: m,
469
469
  action: L.enum.approveDraft,
470
470
  onFinished: () => {
471
- o.close(), f == null || f();
471
+ o.close(), p == null || p();
472
472
  },
473
473
  onCancel: () => o.close()
474
474
  }
475
475
  });
476
476
  }
477
- function O(d, f) {
477
+ function O(m, p) {
478
478
  o.open({
479
479
  title: "Reject draft",
480
480
  contentComponent: Te,
481
481
  contentComponentProps: {
482
- draft: d,
482
+ draft: m,
483
483
  action: L.enum.rejectDraft,
484
484
  onFinished: () => {
485
- o.close(), f == null || f();
485
+ o.close(), p == null || p();
486
486
  },
487
487
  onCancel: () => o.close()
488
488
  }
489
489
  });
490
490
  }
491
- function s(d, f) {
491
+ function s(m, p) {
492
492
  o.open({
493
493
  title: "Mark draft as failed",
494
494
  contentComponent: Te,
495
495
  contentComponentProps: {
496
- draft: d,
496
+ draft: m,
497
497
  action: L.enum.markAsFailed,
498
498
  onFinished: () => {
499
- o.close(), f == null || f();
499
+ o.close(), p == null || p();
500
500
  },
501
501
  onCancel: () => o.close()
502
502
  }
503
503
  });
504
504
  }
505
- async function a(d, f) {
506
- await m.sync({
507
- _id: d._id,
508
- _rev: d._rev ?? "",
505
+ async function a(m, p) {
506
+ await f.sync({
507
+ _id: m._id,
508
+ _rev: m._rev ?? "",
509
509
  action: L.enum.approveDraft,
510
510
  data: {
511
- remark: d.remark ?? ""
511
+ remark: m.remark ?? ""
512
512
  }
513
513
  }).delayed(500), e.open({
514
514
  title: "Success",
515
515
  message: "Sync requested",
516
516
  type: "success"
517
- }), f == null || f();
517
+ }), p == null || p();
518
518
  }
519
- function w() {
520
- p.value = !1;
519
+ function k() {
520
+ v.value = !1;
521
521
  }
522
- async function V(d, f, C) {
522
+ async function V(m, p, C) {
523
523
  await o.open({
524
524
  title: "Refresh balance",
525
- contentComponent: Ut,
525
+ contentComponent: Lt,
526
526
  contentComponentProps: {
527
- draft: d,
527
+ draft: m,
528
528
  onFinished: ($) => {
529
529
  o.close(), C == null || C($);
530
530
  },
531
531
  onCancel: async () => {
532
- o.close(), f == null || f();
532
+ o.close(), p == null || p();
533
533
  }
534
534
  }
535
535
  });
536
536
  }
537
537
  return {
538
- viewDraft: u,
539
- closeDraftDialog: w,
538
+ viewDraft: d,
539
+ closeDraftDialog: k,
540
540
  approveDraft: H,
541
541
  rejectDraft: O,
542
542
  markAsFailed: s,
543
543
  syncDraft: a,
544
544
  exportDraft: B,
545
545
  refreshBalance: V,
546
- viewClosingDraftShow: p,
546
+ viewClosingDraftShow: v,
547
547
  viewClosingDraftProps: M
548
548
  };
549
549
  }
@@ -560,41 +560,41 @@ function Se(l) {
560
560
  return "fm-status-badge-complete";
561
561
  }
562
562
  }
563
- const Lt = qe(
563
+ const Et = We(
564
564
  "closingDraftTable",
565
565
  function() {
566
- const { t: o } = Ge(), e = Fe(), i = E(new Array()), m = E(!1), _ = $e(), p = Be();
566
+ const { t: o } = qe(), e = Fe(), c = E(new Array()), f = E(!1), h = $e(), v = Be();
567
567
  async function M() {
568
- if (i.value = [], !!_._currentLocation) {
569
- m.value = !0;
568
+ if (c.value = [], !!h._currentLocation) {
569
+ f.value = !0;
570
570
  try {
571
- const [s] = await Promise.all([p.readDrafts()]).delayed(1e3);
572
- i.value = s.reverse();
571
+ const [s] = await Promise.all([v.readDrafts()]).delayed(1e3);
572
+ c.value = s.reverse();
573
573
  } catch (s) {
574
574
  console.log("Something went wrong when fetching drafts:", s);
575
575
  } finally {
576
- m.value = !1;
576
+ f.value = !1;
577
577
  }
578
578
  }
579
579
  }
580
- async function u(s) {
581
- if (!i.value.find((a) => a._id) && _._currentLocation) {
582
- m.value = !0;
580
+ async function d(s) {
581
+ if (!c.value.find((a) => a._id) && h._currentLocation) {
582
+ f.value = !0;
583
583
  try {
584
584
  const [a] = await Promise.all([
585
- p.getDraft(s),
586
- new Promise((w) => setTimeout(w, 1e3))
585
+ v.getDraft(s),
586
+ new Promise((k) => setTimeout(k, 1e3))
587
587
  ]);
588
- i.value = [a];
588
+ c.value = [a];
589
589
  } catch (a) {
590
590
  console.log("Something went wrong when fetching drafts:", a);
591
591
  } finally {
592
- m.value = !1;
592
+ f.value = !1;
593
593
  }
594
594
  }
595
595
  }
596
596
  function y(s) {
597
- i.value = i.value.map((a) => a._id === s._id ? {
597
+ c.value = c.value.map((a) => a._id === s._id ? {
598
598
  ...s,
599
599
  _rev: a._rev
600
600
  } : a);
@@ -603,7 +603,7 @@ const Lt = qe(
603
603
  e.closeDraftDialog(), M();
604
604
  }
605
605
  function H(s, a) {
606
- switch (a = dt(a), s) {
606
+ switch (a = mt(a), s) {
607
607
  case we.Details:
608
608
  return e.viewDraft(a);
609
609
  case we.Export:
@@ -623,13 +623,24 @@ const Lt = qe(
623
623
  accessorKey: "_id",
624
624
  header: () => o("inventory.closing.table.createdAt"),
625
625
  cell(s) {
626
- return it(`${s.getValue()}`);
626
+ return ut(`${s.getValue()}`);
627
627
  },
628
628
  enableSorting: !0
629
629
  },
630
+ {
631
+ accessorKey: "effectiveAt",
632
+ header: () => "Effective at",
633
+ cell(s) {
634
+ const a = s.row.original;
635
+ let k = s.getValue();
636
+ return k || (k = Ie(a._id)), re(k);
637
+ },
638
+ enableSorting: !0,
639
+ size: 200
640
+ },
630
641
  {
631
642
  id: "updatedAt",
632
- accessorFn: (s) => ce(s.updatedAt),
643
+ accessorFn: (s) => re(s.updatedAt),
633
644
  header: () => "Updated at",
634
645
  enableSorting: !0,
635
646
  size: 200
@@ -658,7 +669,7 @@ const Lt = qe(
658
669
  id: "recentRemark",
659
670
  accessorFn: (s) => {
660
671
  var a;
661
- return (s == null ? void 0 : s.approveRemark) ?? ((a = s == null ? void 0 : s.rejectionHistory) == null ? void 0 : a.computeFirst((w) => w.rejectRemark)) ?? s.remark;
672
+ return (s == null ? void 0 : s.approveRemark) ?? ((a = s == null ? void 0 : s.rejectionHistory) == null ? void 0 : a.computeFirst((k) => k.rejectRemark)) ?? s.remark;
662
673
  },
663
674
  header: () => "Recent remark"
664
675
  },
@@ -669,8 +680,8 @@ const Lt = qe(
669
680
  enableSorting: !1,
670
681
  cell(s) {
671
682
  var C;
672
- const a = s.row.original, w = a.status, V = new Date(a.updatedAt), d = (C = a == null ? void 0 : a.rejectionHistory) == null ? void 0 : C.computeFirst(($) => $.rejectedAt), f = d ? new Date(d) : null;
673
- return w === "DRAFT" && f ? f.getTime() > V.getTime() ? I(
683
+ const a = s.row.original, k = a.status, V = new Date(a.updatedAt), m = (C = a == null ? void 0 : a.rejectionHistory) == null ? void 0 : C.computeFirst(($) => $.rejectedAt), p = m ? new Date(m) : null;
684
+ return k === "DRAFT" && p ? p.getTime() > V.getTime() ? I(
674
685
  "div",
675
686
  {
676
687
  class: "flex"
@@ -702,9 +713,9 @@ const Lt = qe(
702
713
  I(
703
714
  "div",
704
715
  {
705
- class: ["fm-status-badge", Se(w)]
716
+ class: ["fm-status-badge", Se(k)]
706
717
  },
707
- Ie(w)
718
+ Re(k)
708
719
  )
709
720
  );
710
721
  }
@@ -712,9 +723,9 @@ const Lt = qe(
712
723
  {
713
724
  id: "action",
714
725
  cell(s) {
715
- const a = s.row.original, w = [
716
- Ee[we.Details],
717
- Ee[we.Export]
726
+ const a = s.row.original, k = [
727
+ He[we.Details],
728
+ He[we.Export]
718
729
  ], V = [
719
730
  {
720
731
  translationKey: "inventory.closing.draft.approveDraft",
@@ -732,12 +743,12 @@ const Lt = qe(
732
743
  value: L.enum.markAsFailed
733
744
  }
734
745
  ];
735
- return ut(
746
+ return dt(
736
747
  [
737
- ...w,
748
+ ...k,
738
749
  ...a.status === se.enum.DRAFT ? V : []
739
750
  ],
740
- (d) => H(d, a)
751
+ (m) => H(m, a)
741
752
  );
742
753
  },
743
754
  enableSorting: !1,
@@ -748,44 +759,44 @@ const Lt = qe(
748
759
  }
749
760
  }
750
761
  ],
751
- drafts: i,
752
- loading: m,
762
+ drafts: c,
763
+ loading: f,
753
764
  fetchDrafts: M,
754
- loadDraft: u,
765
+ loadDraft: d,
755
766
  updateDraftRef: y
756
767
  };
757
768
  }
758
- ), Et = { class: "w-full flex flex-col gap-32" }, Ht = { class: "flex justify-between" }, Vt = { class: "flex" }, Nt = { class: "grid grid-cols-[repeat(4,1fr)] xs:flex xs:flex-col sm:flex sm:flex-col gap-8" }, zt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ot = { class: "flex gap-1" }, Yt = { class: "fm-typo-en-body-lg-600" }, Kt = { class: "flex flex-col gap-16" }, Gt = { class: "flex items-center" }, qt = {
769
+ ), Ht = { class: "w-full flex flex-col gap-32" }, Vt = { class: "flex justify-between" }, zt = { class: "flex" }, Nt = { class: "grid grid-cols-[repeat(4,1fr)] xs:flex xs:flex-col sm:flex sm:flex-col gap-8" }, Ot = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Yt = { class: "flex gap-1" }, Kt = { class: "fm-typo-en-body-lg-600" }, Gt = { class: "flex flex-col gap-16" }, qt = { class: "flex items-center" }, Wt = {
759
770
  key: 0,
760
771
  class: "flex gap-8"
761
- }, Wt = {
772
+ }, Zt = {
762
773
  key: 0,
763
774
  class: "w-full flex flex-col items-center"
764
- }, Zt = { class: "flex items-center gap-8" }, Jt = { class: "flex flex-col gap-8" }, Qt = { class: "flex gap-8" }, Xt = {
775
+ }, Jt = { class: "flex items-center gap-8" }, Qt = { class: "flex flex-col gap-8" }, Xt = { class: "flex gap-8" }, ea = {
765
776
  key: 0,
766
777
  class: "flex gap-8"
767
- }, ea = { class: "overflow-x-auto" }, ta = {
778
+ }, ta = { class: "overflow-x-auto" }, aa = {
768
779
  key: 1,
769
780
  class: "flex-1 xs:w-screen xs:max-w-full"
770
- }, aa = {
781
+ }, na = {
771
782
  key: 0,
772
783
  class: "flex flex-col items-center gap-8 h-full"
773
- }, na = ["src"], oa = {
784
+ }, oa = ["src"], sa = {
774
785
  key: 1,
775
786
  class: "px-4 flex flex-col"
776
- }, sa = { class: "flex gap-12 content-stretch" }, ra = {
787
+ }, ra = { class: "flex gap-12 content-stretch" }, la = {
777
788
  class: "flex flex-col w-24",
778
789
  name: "circles"
779
- }, la = { class: "flex-1 flex flex-col items-center" }, ca = { class: "flex-1 flex flex-col items-center" }, ia = {
790
+ }, ca = { class: "flex-1 flex flex-col items-center" }, ia = { class: "flex-1 flex flex-col items-center" }, ua = {
780
791
  class: "py-12 flex flex-col gap-4",
781
792
  name: "received-at header"
782
- }, ua = { class: "fm-typo-en-body-lg-400" }, da = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ma = { class: "flex gap-12 content-stretch" }, fa = {
793
+ }, da = { class: "fm-typo-en-body-lg-400" }, ma = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, fa = { class: "flex gap-12 content-stretch" }, pa = {
783
794
  class: "flex flex-col w-24",
784
795
  name: "circles"
785
- }, pa = { class: "flex-1 flex flex-col items-center" }, va = {
796
+ }, va = { class: "flex-1 flex flex-col items-center" }, ya = {
786
797
  class: "py-12 flex flex-col gap-4 flex-1",
787
798
  name: "delivery details"
788
- }, ya = { class: "flex flex-col gap-8" }, ga = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ba = { class: "flex flex-col gap-4" }, Aa = { class: "flex gap-8" }, Da = /* @__PURE__ */ je({
799
+ }, ga = { class: "flex flex-col gap-8" }, ba = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Aa = { class: "flex flex-col gap-4" }, Da = { class: "flex gap-8" }, ka = /* @__PURE__ */ je({
789
800
  __name: "ClosingDraftDialog",
790
801
  props: {
791
802
  show: { type: Boolean },
@@ -793,12 +804,12 @@ const Lt = qe(
793
804
  },
794
805
  emits: ["submitted", "refresh"],
795
806
  setup(l, { emit: o }) {
796
- const e = l, i = We(), m = Fe(), _ = At(e, "show"), p = E(!1), M = E(!1), u = E(!1), y = E(new Array()), B = Ue(), H = Be(), O = Me(), s = mt(), a = $e(), w = Xe({}), V = P(() => new Set(
807
+ const e = l, c = Ze(), f = Fe(), h = Dt(e, "show"), v = E(!1), M = E(!1), d = E(!1), y = E(new Array()), B = Le(), H = Be(), O = Ue(), s = ft(), a = $e(), k = et({}), V = P(() => new Set(
797
808
  s.skus.filter((r) => {
798
809
  var t;
799
- return w[(t = r.customAttributes) == null ? void 0 : t.tag];
810
+ return k[(t = r.customAttributes) == null ? void 0 : t.tag];
800
811
  }).map((r) => r._id)
801
- )), d = o, f = E({
812
+ )), m = o, p = E({
802
813
  templateItem: !0,
803
814
  nonTemplateItem: !0
804
815
  }), C = P(() => {
@@ -812,10 +823,10 @@ const Lt = qe(
812
823
  (t) => t.sku._id,
813
824
  (t) => t.measurementsAmounts.filter((b) => !b.measurement.abbrev.toLocaleLowerCase().includes("inactive")).map((b) => b.measurement.id)
814
825
  ));
815
- Re(W), et(
826
+ Pe(W), tt(
816
827
  () => e.show,
817
828
  (r) => {
818
- r && (oe.value = ne[0], W(), f.value = {
829
+ r && (oe.value = ne[0], W(), p.value = {
819
830
  templateItem: !0,
820
831
  nonTemplateItem: !0
821
832
  });
@@ -825,12 +836,12 @@ const Lt = qe(
825
836
  async function W() {
826
837
  var t, b, g;
827
838
  if (!a._currentLocation) return;
828
- p.value = !0;
839
+ v.value = !0;
829
840
  const r = ((t = e.draft) == null ? void 0 : t.status) === se.enum.COMPLETED;
830
841
  try {
831
842
  if (await s.init(), r) {
832
- const c = e.draft.closingAdjustmentId;
833
- if (!c) {
843
+ const u = e.draft.closingAdjustmentId;
844
+ if (!u) {
834
845
  O.open({
835
846
  title: "Something went wrong",
836
847
  message: "Closing draft is completed but closing document cannot be found.",
@@ -840,7 +851,7 @@ const Lt = qe(
840
851
  });
841
852
  return;
842
853
  }
843
- const v = await B.readAdjustmentById(c), A = (v == null ? void 0 : v.skus) ?? [];
854
+ const i = await B.readAdjustmentById(u), A = (i == null ? void 0 : i.skus) ?? [];
844
855
  y.value = A.map((j) => ({
845
856
  id: j.sku._id,
846
857
  balance: j.fromBalance,
@@ -848,19 +859,19 @@ const Lt = qe(
848
859
  }));
849
860
  } else
850
861
  y.value = ((g = e.draft) == null ? void 0 : g.stockSnapshot) ?? [];
851
- } catch (c) {
862
+ } catch (u) {
852
863
  O.open({
853
864
  title: "Something went wrong",
854
865
  message: "Something went wrong when fetching info. Please try again.",
855
866
  type: "error"
856
- }), console.error("error on fetch stock balances", c);
867
+ }), console.error("error on fetch stock balances", u);
857
868
  } finally {
858
- p.value = !1;
869
+ v.value = !1;
859
870
  }
860
871
  }
861
- async function re() {
872
+ async function le() {
862
873
  var t, b;
863
- if (!(((t = e.draft) == null ? void 0 : t.effectiveAt) ?? ((b = e.draft) == null ? void 0 : b.updatedAt))) {
874
+ if (!(((t = e.draft) == null ? void 0 : t.effectiveAt) ?? (e.draft ? Ie((b = e.draft) == null ? void 0 : b._id) : null))) {
864
875
  O.open({
865
876
  title: "Cannot refresh",
866
877
  message: "Effective date is not available for this draft.",
@@ -868,20 +879,20 @@ const Lt = qe(
868
879
  });
869
880
  return;
870
881
  }
871
- await m.refreshBalance(
882
+ await f.refreshBalance(
872
883
  e.draft,
873
884
  () => {
874
885
  },
875
886
  async (g) => {
876
887
  var j;
877
888
  M.value = !0;
878
- const c = (j = e.draft) == null ? void 0 : j._rev, v = 30, A = 2e3;
889
+ const u = (j = e.draft) == null ? void 0 : j._rev, i = 30, A = 2e3;
879
890
  try {
880
891
  await B.recalculation.scheduleCalculateStockSnapshotAtDate(g, e.draft._id);
881
- let h = null;
882
- for (let te = 0; te < v && (h = await H.getDraft(e.draft._id).delayed(A), h._rev === c); te++)
892
+ let x = null;
893
+ for (let te = 0; te < i && (x = await H.getDraft(e.draft._id).delayed(A), x._rev === u); te++)
883
894
  ;
884
- if (!h || h._rev === c) {
895
+ if (!x || x._rev === u) {
885
896
  O.open({
886
897
  title: "Refresh failed",
887
898
  message: "Failed to refresh stock balance. Please try again.",
@@ -889,17 +900,17 @@ const Lt = qe(
889
900
  }), console.error("error refreshing stock balances: there is no change in _rev");
890
901
  return;
891
902
  }
892
- d("refresh", h), y.value = h.stockSnapshot ?? [], O.open({
903
+ m("refresh", x), y.value = x.stockSnapshot ?? [], O.open({
893
904
  title: "Balance refreshed",
894
905
  message: "Stock balance has been recalculated.",
895
906
  type: "success"
896
907
  });
897
- } catch (h) {
908
+ } catch (x) {
898
909
  O.open({
899
910
  title: "Refresh failed",
900
911
  message: "Failed to refresh stock balance. Please try again.",
901
912
  type: "error"
902
- }), console.error("error refreshing stock balances", h);
913
+ }), console.error("error refreshing stock balances", x);
903
914
  } finally {
904
915
  M.value = !1;
905
916
  }
@@ -926,10 +937,10 @@ const Lt = qe(
926
937
  }
927
938
  );
928
939
  }
929
- const le = P(() => {
940
+ const ce = P(() => {
930
941
  const r = $.value.reduce((b, g) => {
931
- var c, v;
932
- return Math.max(b, ((v = (c = F.value) == null ? void 0 : c.get(g._id)) == null ? void 0 : v[0].length) ?? 0);
942
+ var u, i;
943
+ return Math.max(b, ((i = (u = F.value) == null ? void 0 : u.get(g._id)) == null ? void 0 : i[0].length) ?? 0);
933
944
  }, 0);
934
945
  return [
935
946
  {
@@ -938,13 +949,13 @@ const Lt = qe(
938
949
  header: () => "Name",
939
950
  size: 350,
940
951
  cell(b) {
941
- const g = b.row.original, c = g.adjustedDiffPercentage, v = typeof c == "number" && Math.abs(c) > 10, A = I("div", { class: "flex flex-col gap-4" }, [
952
+ const g = b.row.original, u = g.adjustedDiffPercentage, i = typeof u == "number" && Math.abs(u) > 10, A = I("div", { class: "flex flex-col gap-4" }, [
942
953
  I(
943
954
  "div",
944
955
  {
945
956
  class: [
946
957
  "line-clamp-1 fm-typo-en-body-lg-400",
947
- v ? " text-fm-color-system-error-300" : "text-fm-color-typo-primary"
958
+ i ? " text-fm-color-system-error-300" : "text-fm-color-typo-primary"
948
959
  ]
949
960
  },
950
961
  g.name
@@ -954,7 +965,7 @@ const Lt = qe(
954
965
  {
955
966
  class: [
956
967
  "line-clamp-1 fm-typo-en-body-md-400",
957
- v ? " text-fm-color-system-error-300" : "text-fm-color-typo-secondary"
968
+ i ? " text-fm-color-system-error-300" : "text-fm-color-typo-secondary"
958
969
  ]
959
970
  },
960
971
  g.code
@@ -967,7 +978,7 @@ const Lt = qe(
967
978
  },
968
979
  {
969
980
  content() {
970
- return v ? "Adjustment difference is more than 10%." : `${g.code} - ${g.name}`;
981
+ return i ? "Adjustment difference is more than 10%." : `${g.code} - ${g.name}`;
971
982
  },
972
983
  default() {
973
984
  return I("div", { class: "flex items-center gap-4 justify-start w-full" }, [
@@ -1032,17 +1043,17 @@ const Lt = qe(
1032
1043
  cell(b) {
1033
1044
  const g = b.row.original.adjustedDiffPercentage;
1034
1045
  if (!g) return "N/A";
1035
- const c = g.toFixed(2);
1036
- if (c === "0.00")
1046
+ const u = g.toFixed(2);
1047
+ if (u === "0.00")
1037
1048
  return I("div", { class: "flex items-center gap-4 justify-end" }, ["0.00"]);
1038
- const v = g > 0;
1049
+ const i = g > 0;
1039
1050
  return I("div", { class: "flex items-center gap-4 justify-end" }, [
1040
1051
  I(de.FmIcon, {
1041
- name: v ? "arrow_drop_up" : "arrow_drop_down",
1042
- color: v ? "system-success-300" : "system-error-300",
1052
+ name: i ? "arrow_drop_up" : "arrow_drop_down",
1053
+ color: i ? "system-success-300" : "system-error-300",
1043
1054
  size: "md"
1044
1055
  }),
1045
- c
1056
+ u
1046
1057
  ]);
1047
1058
  },
1048
1059
  meta: {
@@ -1054,7 +1065,7 @@ const Lt = qe(
1054
1065
  header: () => "Amounts",
1055
1066
  enableSorting: !1,
1056
1067
  cell(b) {
1057
- const g = b.row.original, c = (A, j) => I(
1068
+ const g = b.row.original, u = (A, j) => I(
1058
1069
  de.FmTooltip,
1059
1070
  { zIndex: 50 },
1060
1071
  {
@@ -1082,84 +1093,84 @@ const Lt = qe(
1082
1093
  }
1083
1094
  }
1084
1095
  );
1085
- let v = Array.from({ length: r }).map((A, j) => {
1096
+ let i = Array.from({ length: r }).map((A, j) => {
1086
1097
  if (!g[`measurementAmount${j}`])
1087
1098
  return null;
1088
- const h = g[`measurementAmount${j}`], te = g[`measurementAbbrev${j}`];
1089
- return c(h, te);
1099
+ const x = g[`measurementAmount${j}`], te = g[`measurementAbbrev${j}`];
1100
+ return u(x, te);
1090
1101
  }).filter((A) => A);
1091
- return (g.baseUnitAmount || !v.length) && (v = [c(g.baseUnitAmount, g.baseUnit), ...v]), I(
1102
+ return (g.baseUnitAmount || !i.length) && (i = [u(g.baseUnitAmount, g.baseUnit), ...i]), I(
1092
1103
  "div",
1093
1104
  {
1094
1105
  class: "flex gap-8 flex-nowrap",
1095
1106
  style: {
1096
- minWidth: `${120 * v.length}px`
1107
+ minWidth: `${120 * i.length}px`
1097
1108
  }
1098
1109
  },
1099
- v
1110
+ i
1100
1111
  );
1101
1112
  }
1102
1113
  }
1103
1114
  ];
1104
- }), Ae = P(() => le.value.map((r) => r.size ?? 0).reduce((r, t) => r + t)), ue = E(""), fe = P(() => {
1115
+ }), Ae = P(() => ce.value.map((r) => r.size ?? 0).reduce((r, t) => r + t)), ue = E(""), fe = P(() => {
1105
1116
  var b, g;
1106
1117
  const r = ((g = (b = e.draft) == null ? void 0 : b.negativeStockItems) == null ? void 0 : g.reduce(
1107
- (c, v) => (c[v.sku._id] = v, c),
1118
+ (u, i) => (u[i.sku._id] = i, u),
1108
1119
  {}
1109
1120
  )) ?? {};
1110
- return $.value.map((c) => {
1121
+ return $.value.map((u) => {
1111
1122
  var he, xe;
1112
- const v = (he = be.value.get(c._id)) == null ? void 0 : he[0], A = ((xe = ge.value.get(c._id)) == null ? void 0 : xe[0]) ?? X;
1113
- if (!v)
1123
+ const i = (he = be.value.get(u._id)) == null ? void 0 : he[0], A = ((xe = ge.value.get(u._id)) == null ? void 0 : xe[0]) ?? X;
1124
+ if (!i)
1114
1125
  return {
1115
- code: c.code,
1116
- name: c.name,
1117
- baseUnit: c.unit.abbrev,
1126
+ code: u.code,
1127
+ name: u.name,
1128
+ baseUnit: u.unit.abbrev,
1118
1129
  baseUnitAmount: 0,
1119
- systemBalance: +z(A),
1130
+ systemBalance: +N(A),
1120
1131
  physicalBalance: 0,
1121
- adjustedAmount: -+z(A),
1132
+ adjustedAmount: -+N(A),
1122
1133
  adjustedDiffPercentage: -100,
1123
- isTemplateItem: !r[c._id]
1134
+ isTemplateItem: !r[u._id]
1124
1135
  };
1125
- const j = Ze(v), h = Oe(j, A), te = A.amount === 0 ? null : Ye(h, {
1136
+ const j = Je(i), x = Ye(j, A), te = A.amount === 0 ? null : Ke(x, {
1126
1137
  ...A,
1127
1138
  amount: Math.abs(A.amount)
1128
- }), ke = te ? Pe(te, J) : null;
1139
+ }), ke = te ? Me(te, J) : null;
1129
1140
  return {
1130
- code: c.code,
1131
- name: c.name,
1132
- baseUnit: c.unit.abbrev,
1133
- baseUnitAmount: +z(v.baseAmount),
1134
- ...v.measurementsAmounts.filter((k) => {
1135
- var U, N, ae;
1136
- return (ae = (N = (U = F.value) == null ? void 0 : U.get(c._id)) == null ? void 0 : N[0]) == null ? void 0 : ae.includes(k.measurement.id);
1137
- }).reduce((k, U, N) => (k[`measurementAbbrev${N}`] = `(${U.measurement.abbrev}) × ${z(U.measurement.conversion)}`, k[`measurementAmount${N}`] = +z(U.amount), k), {}),
1138
- systemBalance: +z(A),
1139
- physicalBalance: +z(j),
1140
- adjustedAmount: +z(h),
1141
- adjustedDiffPercentage: ke ? +z(Ke(ke, 2)) : null,
1142
- isTemplateItem: !r[c._id]
1141
+ code: u.code,
1142
+ name: u.name,
1143
+ baseUnit: u.unit.abbrev,
1144
+ baseUnitAmount: +N(i.baseAmount),
1145
+ ...i.measurementsAmounts.filter((_) => {
1146
+ var U, z, ae;
1147
+ return (ae = (z = (U = F.value) == null ? void 0 : U.get(u._id)) == null ? void 0 : z[0]) == null ? void 0 : ae.includes(_.measurement.id);
1148
+ }).reduce((_, U, z) => (_[`measurementAbbrev${z}`] = `(${U.measurement.abbrev}) × ${N(U.measurement.conversion)}`, _[`measurementAmount${z}`] = +N(U.amount), _), {}),
1149
+ systemBalance: +N(A),
1150
+ physicalBalance: +N(j),
1151
+ adjustedAmount: +N(x),
1152
+ adjustedDiffPercentage: ke ? +N(Ge(ke, 2)) : null,
1153
+ isTemplateItem: !r[u._id]
1143
1154
  };
1144
- }).filter((c) => !!(c.isTemplateItem && f.value.templateItem || !c.isTemplateItem && f.value.nonTemplateItem));
1155
+ }).filter((u) => !!(u.isTemplateItem && p.value.templateItem || !u.isTemplateItem && p.value.nonTemplateItem));
1145
1156
  }), De = P(() => {
1146
- var t, b, g;
1157
+ var t, b, g, u;
1147
1158
  if (!e.draft) return [];
1148
1159
  const r = e.draft.approvedAt ? {
1149
- action: `Approve at ${ce(e.draft.approvedAt)}`,
1160
+ action: `Approve at ${re(e.draft.approvedAt)}`,
1150
1161
  // actionAt: props.draft.approvedAt,
1151
1162
  actionBy: e.draft.approvedBy,
1152
1163
  remark: e.draft.approveRemark
1153
- } : (t = e.draft.rejectionHistory) == null ? void 0 : t.computeFirst((c) => ({
1154
- action: `Reject at ${ce(c.rejectedAt)}`,
1164
+ } : (t = e.draft.rejectionHistory) == null ? void 0 : t.computeFirst((i) => ({
1165
+ action: `Reject at ${re(i.rejectedAt)}`,
1155
1166
  // actionAt: e.rejectedAt,
1156
- actionBy: c.rejectedBy,
1157
- remark: c.rejectRemark
1167
+ actionBy: i.rejectedBy,
1168
+ remark: i.rejectRemark
1158
1169
  }));
1159
1170
  return [
1160
1171
  {
1161
1172
  label: "Created at",
1162
- value: ce(e.draft.createdAt)
1173
+ value: re(e.draft.createdAt)
1163
1174
  },
1164
1175
  {
1165
1176
  label: "Created by",
@@ -1167,7 +1178,7 @@ const Lt = qe(
1167
1178
  },
1168
1179
  {
1169
1180
  label: "Updated at",
1170
- value: ce(e.draft.updatedAt)
1181
+ value: re(e.draft.updatedAt)
1171
1182
  },
1172
1183
  {
1173
1184
  label: "Updated by",
@@ -1175,11 +1186,11 @@ const Lt = qe(
1175
1186
  },
1176
1187
  {
1177
1188
  label: "Effective at",
1178
- value: ce(e.draft.effectiveAt ?? e.draft.updatedAt)
1189
+ value: re(e.draft.effectiveAt ?? Ie((b = e.draft) == null ? void 0 : b._id))
1179
1190
  },
1180
1191
  {
1181
1192
  label: "Using template",
1182
- value: ((b = e.draft.usingTemplates.find((c) => c)) == null ? void 0 : b.name) ?? "None"
1193
+ value: ((g = e.draft.usingTemplates.find((i) => i)) == null ? void 0 : g.name) ?? "None"
1183
1194
  },
1184
1195
  e.draft.remark ? {
1185
1196
  label: "Remark",
@@ -1191,13 +1202,13 @@ const Lt = qe(
1191
1202
  } : null,
1192
1203
  r && r.actionBy ? {
1193
1204
  label: "Last action by",
1194
- value: (g = r.actionBy) == null ? void 0 : g.name
1205
+ value: (u = r.actionBy) == null ? void 0 : u.name
1195
1206
  } : null,
1196
1207
  r && r.remark ? {
1197
1208
  label: "Action remark",
1198
1209
  value: r.remark
1199
1210
  } : null
1200
- ].filter((c) => c).map((c) => c);
1211
+ ].filter((i) => i).map((i) => i);
1201
1212
  }), ne = [
1202
1213
  {
1203
1214
  label: "Overview",
@@ -1208,21 +1219,21 @@ const Lt = qe(
1208
1219
  value: "history"
1209
1220
  }
1210
1221
  ], oe = E(ne[0]), ee = P(() => {
1211
- var g, c, v;
1212
- const r = ((g = e.draft) == null ? void 0 : g.activityLogs) ?? [], t = ((c = e.draft) == null ? void 0 : c.rejectionHistory) ?? [];
1222
+ var g, u, i;
1223
+ const r = ((g = e.draft) == null ? void 0 : g.activityLogs) ?? [], t = ((u = e.draft) == null ? void 0 : u.rejectionHistory) ?? [];
1213
1224
  for (const A of t)
1214
1225
  r.find(
1215
- (h) => `${h.action}_${h.performedAt}` == `${L.enum.rejectDraft}_${A.rejectedAt}`
1226
+ (x) => `${x.action}_${x.performedAt}` == `${L.enum.rejectDraft}_${A.rejectedAt}`
1216
1227
  ) || r.push({
1217
1228
  action: L.enum.rejectDraft,
1218
1229
  performedAt: A.rejectedAt,
1219
1230
  performedBy: A.rejectedBy,
1220
1231
  remark: A.rejectRemark
1221
1232
  });
1222
- return (v = e.draft) != null && v.approvedAt && (r.find(
1233
+ return (i = e.draft) != null && i.approvedAt && (r.find(
1223
1234
  (j) => {
1224
- var h;
1225
- return `${j.action}_${j.performedAt}` == `${L.enum.approveDraft}_${(h = e.draft) == null ? void 0 : h.approvedAt}`;
1235
+ var x;
1236
+ return `${j.action}_${j.performedAt}` == `${L.enum.approveDraft}_${(x = e.draft) == null ? void 0 : x.approvedAt}`;
1226
1237
  }
1227
1238
  ) || r.push({
1228
1239
  action: L.enum.approveDraft,
@@ -1231,8 +1242,8 @@ const Lt = qe(
1231
1242
  remark: e.draft.approveRemark
1232
1243
  })), r.sort((A, j) => new Date(j.performedAt).getTime() - new Date(A.performedAt).getTime()).map(
1233
1244
  (A) => ({
1234
- header: Ie(A.action),
1235
- date: ce(A.performedAt),
1245
+ header: Re(A.action),
1246
+ date: re(A.performedAt),
1236
1247
  info: [
1237
1248
  {
1238
1249
  label: "Performed by",
@@ -1246,30 +1257,30 @@ const Lt = qe(
1246
1257
  })
1247
1258
  );
1248
1259
  }), pe = P(() => {
1249
- var c, v, A, j;
1250
- if ((c = e == null ? void 0 : e.draft) != null && c.approvedAt) return "Draft is already approved.";
1251
- if (((v = e.draft) == null ? void 0 : v.status) !== se.enum.DRAFT) return "Status is not draft.";
1252
- const r = fe.value.some((h) => h.physicalBalance < 0), t = ((j = (A = i.stockBalance.skus) == null ? void 0 : A.filter((h) => h.balance.amount < 0)) == null ? void 0 : j.map((h) => h.id)) ?? [], b = new Set($.value.map((h) => h._id)), g = t.filter((h) => !b.has(h)).length;
1260
+ var u, i, A, j;
1261
+ if ((u = e == null ? void 0 : e.draft) != null && u.approvedAt) return "Draft is already approved.";
1262
+ if (((i = e.draft) == null ? void 0 : i.status) !== se.enum.DRAFT) return "Status is not draft.";
1263
+ const r = fe.value.some((x) => x.physicalBalance < 0), t = ((j = (A = c.stockBalance.skus) == null ? void 0 : A.filter((x) => x.balance.amount < 0)) == null ? void 0 : j.map((x) => x.id)) ?? [], b = new Set($.value.map((x) => x._id)), g = t.filter((x) => !b.has(x)).length;
1253
1264
  return [
1254
1265
  r ? "Negative total exist." : null,
1255
1266
  g ? "Negative stock is not included in this draft. Reopen draft in POS and apply changes." : null
1256
- ].filter((h) => h).join(" ");
1267
+ ].filter((x) => x).join(" ");
1257
1268
  });
1258
1269
  return (r, t) => {
1259
- const b = T("FmButtonGroup"), g = T("FmMenuDivider"), c = T("FmCard"), v = T("FmButton"), A = T("FmCircularProgress"), j = T("FmChip"), h = T("FmTextField"), te = T("FmIcon"), ke = T("FmTable"), _e = T("FmSpacer"), he = T("FmTooltip"), xe = T("FmSideSheet");
1260
- return x(), Z(xe, {
1270
+ const b = T("FmButtonGroup"), g = T("FmMenuDivider"), u = T("FmCard"), i = T("FmButton"), A = T("FmCircularProgress"), j = T("FmChip"), x = T("FmTextField"), te = T("FmIcon"), ke = T("FmTable"), _e = T("FmSpacer"), he = T("FmTooltip"), xe = T("FmSideSheet");
1271
+ return w(), Z(xe, {
1261
1272
  "dismiss-away": "",
1262
1273
  "max-width": 9999,
1263
- "model-value": S(_),
1264
- "onUpdate:modelValue": t[10] || (t[10] = (k) => He(_) ? _.value = k : null),
1274
+ "model-value": S(h),
1275
+ "onUpdate:modelValue": t[10] || (t[10] = (_) => Ve(h) ? h.value = _ : null),
1265
1276
  header: "Closing details"
1266
1277
  }, {
1267
1278
  "side-sheet-footer": Y(() => {
1268
- var k, U, N, ae;
1279
+ var _, U, z, ae;
1269
1280
  return [
1270
- n("div", Aa, [
1271
- ((k = e.draft) == null ? void 0 : k.status) === S(se).enum.DRAFT ? (x(), R(q, { key: 0 }, [
1272
- pe.value ? (x(), Z(he, {
1281
+ n("div", Da, [
1282
+ ((_ = e.draft) == null ? void 0 : _.status) === S(se).enum.DRAFT ? (w(), R(q, { key: 0 }, [
1283
+ pe.value ? (w(), Z(he, {
1273
1284
  key: 0,
1274
1285
  "z-index": 51
1275
1286
  }, {
@@ -1277,90 +1288,90 @@ const Lt = qe(
1277
1288
  G(K(pe.value), 1)
1278
1289
  ]),
1279
1290
  default: Y(() => [
1280
- D(v, {
1291
+ D(i, {
1281
1292
  disabled: "",
1282
1293
  key: "approve key",
1283
1294
  label: "Approve",
1284
- onClick: t[5] || (t[5] = () => e.draft && S(m).approveDraft(e.draft, () => d("submitted")))
1295
+ onClick: t[5] || (t[5] = () => e.draft && S(f).approveDraft(e.draft, () => m("submitted")))
1285
1296
  })
1286
1297
  ]),
1287
1298
  _: 1
1288
- })) : (x(), Z(v, {
1299
+ })) : (w(), Z(i, {
1289
1300
  key: "approve key",
1290
1301
  label: "Approve",
1291
- onClick: t[6] || (t[6] = () => e.draft && S(m).approveDraft(e.draft, () => d("submitted")))
1302
+ onClick: t[6] || (t[6] = () => e.draft && S(f).approveDraft(e.draft, () => m("submitted")))
1292
1303
  }))
1293
1304
  ], 64)) : Q("", !0),
1294
- ((U = e.draft) == null ? void 0 : U.status) === S(se).enum.DRAFT ? (x(), Z(v, {
1305
+ ((U = e.draft) == null ? void 0 : U.status) === S(se).enum.DRAFT ? (w(), Z(i, {
1295
1306
  key: 1,
1296
1307
  label: "Reject",
1297
1308
  variant: "destructive",
1298
- onClick: t[7] || (t[7] = () => e.draft && S(m).rejectDraft(e.draft, () => d("submitted")))
1309
+ onClick: t[7] || (t[7] = () => e.draft && S(f).rejectDraft(e.draft, () => m("submitted")))
1299
1310
  })) : Q("", !0),
1300
- (N = e.draft) != null && N.approvedAt && ((ae = e.draft) == null ? void 0 : ae.status) !== S(se).enum.COMPLETED ? (x(), Z(v, {
1311
+ (z = e.draft) != null && z.approvedAt && ((ae = e.draft) == null ? void 0 : ae.status) !== S(se).enum.COMPLETED ? (w(), Z(i, {
1301
1312
  key: 2,
1302
1313
  label: "Sync",
1303
- loading: u.value,
1314
+ loading: d.value,
1304
1315
  onClick: t[8] || (t[8] = () => {
1305
- e.draft && (u.value = !0, S(m).syncDraft(e.draft, () => {
1306
- u.value = !1, d("submitted");
1316
+ e.draft && (d.value = !0, S(f).syncDraft(e.draft, () => {
1317
+ d.value = !1, m("submitted");
1307
1318
  }));
1308
1319
  })
1309
1320
  }, null, 8, ["loading"])) : Q("", !0),
1310
- D(v, {
1321
+ D(i, {
1311
1322
  label: "Close",
1312
1323
  variant: "tertiary",
1313
- onClick: t[9] || (t[9] = (Le) => _.value = !1)
1324
+ onClick: t[9] || (t[9] = (Ee) => h.value = !1)
1314
1325
  })
1315
1326
  ])
1316
1327
  ];
1317
1328
  }),
1318
1329
  default: Y(() => [
1319
- n("div", Et, [
1330
+ n("div", Ht, [
1320
1331
  n("div", null, [
1321
1332
  D(b, {
1322
1333
  items: ne,
1323
1334
  modelValue: oe.value,
1324
- "onUpdate:modelValue": t[0] || (t[0] = (k) => oe.value = k)
1335
+ "onUpdate:modelValue": t[0] || (t[0] = (_) => oe.value = _)
1325
1336
  }, null, 8, ["modelValue"])
1326
1337
  ]),
1327
- oe.value.value === "overview" ? (x(), R(q, { key: 0 }, [
1328
- D(c, {
1338
+ oe.value.value === "overview" ? (w(), R(q, { key: 0 }, [
1339
+ D(u, {
1329
1340
  variant: "outlined",
1330
1341
  class: "flex flex-col gap-8 px-12 py-16"
1331
1342
  }, {
1332
1343
  default: Y(() => {
1333
- var k, U;
1344
+ var _, U;
1334
1345
  return [
1335
- n("div", Ht, [
1346
+ n("div", Vt, [
1336
1347
  t[11] || (t[11] = n("div", { class: "fm-typo-en-body-lg-600" }, "Closing summary", -1)),
1337
- n("div", Vt, [
1348
+ n("div", zt, [
1338
1349
  n("div", {
1339
- class: me(["fm-status-badge", S(Se)(((k = r.draft) == null ? void 0 : k.status) ?? "DRAFT")])
1340
- }, K(S(Ie)(((U = r.draft) == null ? void 0 : U.status) ?? "")), 3)
1350
+ class: me(["fm-status-badge", S(Se)(((_ = r.draft) == null ? void 0 : _.status) ?? "DRAFT")])
1351
+ }, K(S(Re)(((U = r.draft) == null ? void 0 : U.status) ?? "")), 3)
1341
1352
  ])
1342
1353
  ]),
1343
1354
  D(g),
1344
1355
  n("div", Nt, [
1345
- (x(!0), R(q, null, ve(De.value, (N, ae) => (x(), R("div", {
1356
+ (w(!0), R(q, null, ve(De.value, (z, ae) => (w(), R("div", {
1346
1357
  class: "flex flex-col gap-4",
1347
1358
  key: ae
1348
1359
  }, [
1349
- n("div", zt, [
1350
- n("div", Ot, K(N.label), 1)
1360
+ n("div", Ot, [
1361
+ n("div", Yt, K(z.label), 1)
1351
1362
  ]),
1352
- n("div", Yt, K(N.value), 1)
1363
+ n("div", Kt, K(z.value), 1)
1353
1364
  ]))), 128))
1354
1365
  ])
1355
1366
  ];
1356
1367
  }),
1357
1368
  _: 1
1358
1369
  }),
1359
- n("div", Kt, [
1360
- n("div", Gt, [
1370
+ n("div", Gt, [
1371
+ n("div", qt, [
1361
1372
  t[12] || (t[12] = n("div", { class: "flex-1 fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, " Closing items ", -1)),
1362
- p.value ? Q("", !0) : (x(), R("div", qt, [
1363
- r.draft && r.draft.status !== S(se).enum.COMPLETED ? (x(), Z(v, {
1373
+ v.value ? Q("", !0) : (w(), R("div", Wt, [
1374
+ r.draft && r.draft.status !== S(se).enum.COMPLETED ? (w(), Z(i, {
1364
1375
  key: 0,
1365
1376
  label: "Refresh balance",
1366
1377
  "prepend-icon": "refresh",
@@ -1369,58 +1380,58 @@ const Lt = qe(
1369
1380
  "bg-color": "transparent",
1370
1381
  "border-color": "primary",
1371
1382
  loading: M.value,
1372
- onClick: re
1383
+ onClick: le
1373
1384
  }, null, 8, ["loading"])) : Q("", !0),
1374
- D(v, {
1385
+ D(i, {
1375
1386
  label: "Export data",
1376
1387
  "prepend-icon": "download",
1377
1388
  variant: "secondary",
1378
1389
  "text-color": "primary",
1379
1390
  "bg-color": "transparent",
1380
1391
  "border-color": "primary",
1381
- onClick: t[1] || (t[1] = (k) => r.draft ? S(m).exportDraft(r.draft, y.value) : null)
1392
+ onClick: t[1] || (t[1] = (_) => r.draft ? S(f).exportDraft(r.draft, y.value) : null)
1382
1393
  })
1383
1394
  ]))
1384
1395
  ]),
1385
- p.value ? (x(), R("div", Wt, [
1396
+ v.value ? (w(), R("div", Zt, [
1386
1397
  t[14] || (t[14] = n("div", { class: "h-80" }, null, -1)),
1387
- n("div", Zt, [
1398
+ n("div", Jt, [
1388
1399
  n("div", null, [
1389
1400
  D(A, { size: "md" })
1390
1401
  ]),
1391
1402
  t[13] || (t[13] = n("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Fetching info... ", -1))
1392
1403
  ]),
1393
1404
  t[15] || (t[15] = n("div", { class: "h-80" }, null, -1))
1394
- ])) : (x(), R(q, { key: 1 }, [
1395
- n("div", Jt, [
1396
- n("div", Qt, [
1405
+ ])) : (w(), R(q, { key: 1 }, [
1406
+ n("div", Qt, [
1407
+ n("div", Xt, [
1397
1408
  D(j, {
1398
1409
  label: "Template Item(s)",
1399
- selected: f.value.templateItem,
1400
- onClick: t[2] || (t[2] = (k) => f.value.templateItem = !f.value.templateItem)
1410
+ selected: p.value.templateItem,
1411
+ onClick: t[2] || (t[2] = (_) => p.value.templateItem = !p.value.templateItem)
1401
1412
  }, null, 8, ["selected"]),
1402
1413
  D(j, {
1403
1414
  label: "Non-template Item(s)",
1404
- selected: f.value.nonTemplateItem,
1405
- onClick: t[3] || (t[3] = (k) => f.value.nonTemplateItem = !f.value.nonTemplateItem)
1415
+ selected: p.value.nonTemplateItem,
1416
+ onClick: t[3] || (t[3] = (_) => p.value.nonTemplateItem = !p.value.nonTemplateItem)
1406
1417
  }, null, 8, ["selected"])
1407
1418
  ]),
1408
- D(h, {
1419
+ D(x, {
1409
1420
  modelValue: ue.value,
1410
- "onUpdate:modelValue": t[4] || (t[4] = (k) => ue.value = k),
1421
+ "onUpdate:modelValue": t[4] || (t[4] = (_) => ue.value = _),
1411
1422
  placeholder: "Filter items"
1412
1423
  }, null, 8, ["modelValue"])
1413
1424
  ]),
1414
- S(s).skuTags.size ? (x(), R("div", Xt, [
1415
- (x(!0), R(q, null, ve(S(s).skuTags.keys(), (k) => (x(), Z(j, {
1416
- key: `${k}`,
1417
- label: `${k}`,
1425
+ S(s).skuTags.size ? (w(), R("div", ea, [
1426
+ (w(!0), R(q, null, ve(S(s).skuTags.keys(), (_) => (w(), Z(j, {
1427
+ key: `${_}`,
1428
+ label: `${_}`,
1418
1429
  selectable: "",
1419
- selected: w[`${k}`],
1420
- onClick: (U) => w[`${k}`] = !w[`${k}`]
1430
+ selected: k[`${_}`],
1431
+ onClick: (U) => k[`${_}`] = !k[`${_}`]
1421
1432
  }, {
1422
1433
  default: Y(() => [
1423
- w[`${k}`] ? (x(), Z(te, {
1434
+ k[`${_}`] ? (w(), Z(te, {
1424
1435
  key: 0,
1425
1436
  name: "check",
1426
1437
  class: "text-white",
@@ -1430,21 +1441,21 @@ const Lt = qe(
1430
1441
  class: me([
1431
1442
  "",
1432
1443
  {
1433
- "text-white fm-typo-en-body-md-600": w[`${k}`],
1434
- "text-fm-color-typo-primary fm-typo-en-body-md-400": !w[`${k}`]
1444
+ "text-white fm-typo-en-body-md-600": k[`${_}`],
1445
+ "text-fm-color-typo-primary fm-typo-en-body-md-400": !k[`${_}`]
1435
1446
  }
1436
1447
  ])
1437
- }, K(k), 3)
1448
+ }, K(_), 3)
1438
1449
  ]),
1439
1450
  _: 2
1440
1451
  }, 1032, ["label", "selected", "onClick"]))), 128))
1441
1452
  ])) : Q("", !0),
1442
- n("div", ea, [
1453
+ n("div", ta, [
1443
1454
  n("div", {
1444
- style: Ve({ minWidth: `${Ae.value}px` })
1455
+ style: ze({ minWidth: `${Ae.value}px` })
1445
1456
  }, [
1446
1457
  D(ke, {
1447
- "column-defs": le.value,
1458
+ "column-defs": ce.value,
1448
1459
  "row-data": fe.value,
1449
1460
  "search-value": ue.value
1450
1461
  }, null, 8, ["column-defs", "row-data", "search-value"])
@@ -1453,12 +1464,12 @@ const Lt = qe(
1453
1464
  ], 64))
1454
1465
  ])
1455
1466
  ], 64)) : Q("", !0),
1456
- oe.value.value === "history" ? (x(), R("div", ta, [
1457
- ee.value.length ? (x(), R("div", oa, [
1458
- (x(!0), R(q, null, ve(ee.value, (k, U) => (x(), R(q, { key: U }, [
1459
- n("div", sa, [
1460
- n("div", ra, [
1461
- n("div", la, [
1467
+ oe.value.value === "history" ? (w(), R("div", aa, [
1468
+ ee.value.length ? (w(), R("div", sa, [
1469
+ (w(!0), R(q, null, ve(ee.value, (_, U) => (w(), R(q, { key: U }, [
1470
+ n("div", ra, [
1471
+ n("div", la, [
1472
+ n("div", ca, [
1462
1473
  n("div", {
1463
1474
  class: me([
1464
1475
  {
@@ -1470,7 +1481,7 @@ const Lt = qe(
1470
1481
  }, null, 2)
1471
1482
  ]),
1472
1483
  t[18] || (t[18] = n("div", { class: "h-24 w-24 bg-fm-color-primary rounded-full" }, null, -1)),
1473
- n("div", ca, [
1484
+ n("div", ia, [
1474
1485
  n("div", {
1475
1486
  class: me([
1476
1487
  {
@@ -1482,14 +1493,14 @@ const Lt = qe(
1482
1493
  }, null, 2)
1483
1494
  ])
1484
1495
  ]),
1485
- n("div", ia, [
1486
- n("div", ua, K(k.header), 1),
1487
- n("div", da, K(k.date), 1)
1496
+ n("div", ua, [
1497
+ n("div", da, K(_.header), 1),
1498
+ n("div", ma, K(_.date), 1)
1488
1499
  ])
1489
1500
  ]),
1490
- n("div", ma, [
1491
- n("div", fa, [
1492
- n("div", pa, [
1501
+ n("div", fa, [
1502
+ n("div", pa, [
1503
+ n("div", va, [
1493
1504
  n("div", {
1494
1505
  class: me([
1495
1506
  {
@@ -1501,23 +1512,23 @@ const Lt = qe(
1501
1512
  }, null, 2)
1502
1513
  ])
1503
1514
  ]),
1504
- n("div", va, [
1505
- D(c, {
1515
+ n("div", ya, [
1516
+ D(u, {
1506
1517
  variant: "outlined",
1507
1518
  class: "py-12 px-16"
1508
1519
  }, {
1509
1520
  default: Y(() => [
1510
- n("div", ya, [
1511
- (x(!0), R(q, null, ve(k.info, (N, ae) => (x(), R("div", {
1521
+ n("div", ga, [
1522
+ (w(!0), R(q, null, ve(_.info, (z, ae) => (w(), R("div", {
1512
1523
  key: ae,
1513
1524
  class: "flex flex-col gap-4"
1514
1525
  }, [
1515
- n("div", ga, K(N == null ? void 0 : N.label), 1),
1516
- n("div", ba, [
1517
- (x(!0), R(q, null, ve(N == null ? void 0 : N.values, (Le, Qe) => (x(), R("div", {
1518
- key: Qe,
1526
+ n("div", ba, K(z == null ? void 0 : z.label), 1),
1527
+ n("div", Aa, [
1528
+ (w(!0), R(q, null, ve(z == null ? void 0 : z.values, (Ee, Xe) => (w(), R("div", {
1529
+ key: Xe,
1519
1530
  class: "fm-typo-en-body-lg-600"
1520
- }, K(Le), 1))), 128))
1531
+ }, K(Ee), 1))), 128))
1521
1532
  ])
1522
1533
  ]))), 128))
1523
1534
  ])
@@ -1527,13 +1538,13 @@ const Lt = qe(
1527
1538
  ])
1528
1539
  ])
1529
1540
  ], 64))), 128))
1530
- ])) : (x(), R("div", aa, [
1541
+ ])) : (w(), R("div", na, [
1531
1542
  D(_e),
1532
1543
  n("div", null, [
1533
1544
  n("img", {
1534
- src: S(_t),
1545
+ src: S(ht),
1535
1546
  alt: "List is empty"
1536
- }, null, 8, na)
1547
+ }, null, 8, oa)
1537
1548
  ]),
1538
1549
  t[16] || (t[16] = n("div", { class: "fm-typo-en-body-lg-600" }, K("No records found"), -1)),
1539
1550
  t[17] || (t[17] = n("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary px-16" }, K("You can track approval and rejection history here"), -1)),
@@ -1547,22 +1558,22 @@ const Lt = qe(
1547
1558
  }, 8, ["model-value"]);
1548
1559
  };
1549
1560
  }
1550
- }), ka = { class: "flex-1 flex flex-col gap-8" }, _a = { class: "flex flex-col" }, ha = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, xa = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, wa = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, Ca = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, Ra = /* @__PURE__ */ je({
1561
+ }), _a = { class: "flex-1 flex flex-col gap-8" }, ha = { class: "flex flex-col" }, xa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, wa = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Ca = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, Sa = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, Pa = /* @__PURE__ */ je({
1551
1562
  __name: "ClosingDraftView",
1552
1563
  setup(l) {
1553
- const { t: o } = Ge(), { viewDraft: e } = Fe(), { viewClosingDraftProps: i, viewClosingDraftShow: m } = kt(Fe()), _ = $e(), p = Lt(), M = ft(), { breakpoints: u } = Dt();
1554
- _.watchLocation(p.fetchDrafts);
1555
- const y = P(() => p.loading), B = E(""), H = P(() => u.value.xs || u.value.sm), O = P(() => H.value ? 10 : 20);
1564
+ const { t: o } = qe(), { viewDraft: e } = Fe(), { viewClosingDraftProps: c, viewClosingDraftShow: f } = _t(Fe()), h = $e(), v = Et(), M = pt(), { breakpoints: d } = kt();
1565
+ h.watchLocation(v.fetchDrafts);
1566
+ const y = P(() => v.loading), B = E(""), H = P(() => d.value.xs || d.value.sm), O = P(() => H.value ? 10 : 20);
1556
1567
  function s(V) {
1557
1568
  switch (V) {
1558
1569
  case "refresh":
1559
- return p.fetchDrafts();
1570
+ return v.fetchDrafts();
1560
1571
  }
1561
1572
  }
1562
1573
  function a(V) {
1563
1574
  return V;
1564
1575
  }
1565
- const w = P(() => H.value ? [
1576
+ const k = P(() => H.value ? [
1566
1577
  {
1567
1578
  label: o("inventory.common.refresh"),
1568
1579
  value: "refresh",
@@ -1575,12 +1586,12 @@ const Lt = qe(
1575
1586
  isPrimary: !1
1576
1587
  }
1577
1588
  ]);
1578
- return (V, d) => {
1579
- const f = T("FmTable");
1580
- return x(), R(q, null, [
1581
- D(pt, {
1589
+ return (V, m) => {
1590
+ const p = T("FmTable");
1591
+ return w(), R(q, null, [
1592
+ D(vt, {
1582
1593
  title: S(o)("inventory.closing.draft.title"),
1583
- actions: w.value,
1594
+ actions: k.value,
1584
1595
  "onClick:action": s
1585
1596
  }, {
1586
1597
  default: Y(() => [
@@ -1593,48 +1604,48 @@ const Lt = qe(
1593
1604
  }
1594
1605
  ])
1595
1606
  }, [
1596
- D(vt, {
1607
+ D(yt, {
1597
1608
  "change-location": "",
1598
1609
  searchable: "",
1599
1610
  search: B.value,
1600
- "onUpdate:search": d[0] || (d[0] = (C) => B.value = C)
1611
+ "onUpdate:search": m[0] || (m[0] = (C) => B.value = C)
1601
1612
  }, null, 8, ["search"]),
1602
- D(f, {
1603
- style: Ve(S(M).tableHeight),
1604
- "column-defs": S(p).columnDefs,
1605
- "row-data": S(p).drafts,
1613
+ D(p, {
1614
+ style: ze(S(M).tableHeight),
1615
+ "column-defs": S(v).columnDefs,
1616
+ "row-data": S(v).drafts,
1606
1617
  "search-value": B.value,
1607
1618
  loading: y.value,
1608
- onRowClick: d[1] || (d[1] = (C) => S(e)(C.original)),
1619
+ onRowClick: m[1] || (m[1] = (C) => S(e)(C.original)),
1609
1620
  "page-size": O.value
1610
1621
  }, {
1611
1622
  "list-row": Y((C) => [
1612
- D(yt, {
1623
+ D(gt, {
1613
1624
  row: C,
1614
1625
  onRowClick: ($) => S(e)($)
1615
1626
  }, {
1616
1627
  default: Y(($) => {
1617
- var F, X, J, W, re, ge, be, ie, le, Ae, ue, fe, De, ne, oe, ee, pe, r, t, b;
1628
+ var F, X, J, W, le, ge, be, ie, ce, Ae, ue, fe, De, ne, oe, ee, pe, r, t, b;
1618
1629
  return [
1619
- n("div", ka, [
1620
- n("div", _a, [
1621
- n("div", ha, [
1630
+ n("div", _a, [
1631
+ n("div", ha, [
1632
+ n("div", xa, [
1622
1633
  D(S(Ce), {
1623
1634
  render: (J = (X = (F = $._id) == null ? void 0 : F.column) == null ? void 0 : X.columnDef) == null ? void 0 : J.cell,
1624
- props: (re = (W = $._id) == null ? void 0 : W.getContext) == null ? void 0 : re.call(W)
1635
+ props: (le = (W = $._id) == null ? void 0 : W.getContext) == null ? void 0 : le.call(W)
1625
1636
  }, null, 8, ["render", "props"])
1626
1637
  ]),
1627
- n("div", xa, [
1638
+ n("div", wa, [
1628
1639
  D(S(Ce), {
1629
1640
  render: (ie = (be = (ge = $.name) == null ? void 0 : ge.column) == null ? void 0 : be.columnDef) == null ? void 0 : ie.cell,
1630
- props: (Ae = (le = $.name) == null ? void 0 : le.getContext) == null ? void 0 : Ae.call(le)
1641
+ props: (Ae = (ce = $.name) == null ? void 0 : ce.getContext) == null ? void 0 : Ae.call(ce)
1631
1642
  }, null, 8, ["render", "props"])
1632
1643
  ]),
1633
- n("div", wa, K([
1644
+ n("div", Ca, K([
1634
1645
  ...C.original.items.slice(0, 3).map((g) => g.sku.name),
1635
1646
  ...C.original.items.length >= 3 ? [`and ${C.original.items.length - 3} more items`] : []
1636
1647
  ].join(", ")), 1),
1637
- n("div", Ca, [
1648
+ n("div", Sa, [
1638
1649
  D(S(Ce), {
1639
1650
  render: (De = (fe = (ue = $.ref) == null ? void 0 : ue.column) == null ? void 0 : fe.columnDef) == null ? void 0 : De.cell,
1640
1651
  props: (oe = (ne = $.ref) == null ? void 0 : ne.getContext) == null ? void 0 : oe.call(ne)
@@ -1659,12 +1670,12 @@ const Lt = qe(
1659
1670
  ]),
1660
1671
  _: 1
1661
1672
  }, 8, ["title", "actions"]),
1662
- (x(), Z(tt, { to: "body" }, [
1663
- D(Da, at(S(i), {
1664
- show: S(m),
1665
- "onUpdate:show": d[2] || (d[2] = (C) => He(m) ? m.value = C : null),
1666
- onSubmitted: d[3] || (d[3] = () => (m.value = !1, S(p).fetchDrafts())),
1667
- onRefresh: d[4] || (d[4] = (C) => S(p).updateDraftRef(C))
1673
+ (w(), Z(at, { to: "body" }, [
1674
+ D(ka, nt(S(c), {
1675
+ show: S(f),
1676
+ "onUpdate:show": m[2] || (m[2] = (C) => Ve(f) ? f.value = C : null),
1677
+ onSubmitted: m[3] || (m[3] = () => (f.value = !1, S(v).fetchDrafts())),
1678
+ onRefresh: m[4] || (m[4] = (C) => S(v).updateDraftRef(C))
1668
1679
  }), null, 16, ["show"])
1669
1680
  ]))
1670
1681
  ], 64);
@@ -1672,5 +1683,5 @@ const Lt = qe(
1672
1683
  }
1673
1684
  });
1674
1685
  export {
1675
- Ra as default
1686
+ Pa as default
1676
1687
  };