@feedmepos/mf-inventory-portal 0.0.25-dev.16 → 0.0.25-dev.17

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 (40) hide show
  1. package/dist/{App-Crqni2j1.js → App-7ReqlqA4.js} +2 -2
  2. package/dist/{ApprovalView-BRuPqlFf.js → ApprovalView-qAV_1bug.js} +2 -2
  3. package/dist/{BindingsDialog-CTnuKRLu.js → BindingsDialog-D8KPqrv8.js} +2 -2
  4. package/dist/{BindingsPicker-2Q_4Hswl.js → BindingsPicker-BnnpoQfF.js} +1 -1
  5. package/dist/{BindingsTable-Ckg2d48O.js → BindingsTable-Dnc5yg5v.js} +1 -1
  6. package/dist/{ClosingDraftView-uMe2IeCv.js → ClosingDraftView-DV-dP-0G.js} +330 -319
  7. package/dist/{ClosingTemplateView-byUMxqLf.js → ClosingTemplateView-Bo5uzKK2.js} +2 -2
  8. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-gU_anG_Q.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BPNKuOjZ.js} +3 -3
  9. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-xOyEnkhr.js → FmUnitInput.vue_vue_type_script_setup_true_lang-Bycca0S5.js} +1 -1
  10. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-6wK8UjSj.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-sVM6cQes.js} +1 -1
  11. package/dist/{IngredientGroupView-Dcg4XagR.js → IngredientGroupView-CmkSvOxJ.js} +1 -1
  12. package/dist/{IngredientsView--u4I1b25.js → IngredientsView-DIn-3Jee.js} +4 -4
  13. package/dist/{IntegrationView-C2A22fho.js → IntegrationView-CtawckJy.js} +1 -1
  14. package/dist/{InventoryBindingForm-1UGFYiaO.js → InventoryBindingForm-Dmd68jKK.js} +1 -1
  15. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-D66mpBo_.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DBAwheaI.js} +3 -3
  16. package/dist/{InventoryBindingSummary-BLx8Fn5W.js → InventoryBindingSummary-Dho1qrPY.js} +1 -1
  17. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BB_aU2oG.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Dja0BjOa.js} +1 -1
  18. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-B11hYBMZ.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CjvQTt0Y.js} +1 -1
  19. package/dist/{PublishView-sXQx9Pgx.js → PublishView-DG9ppOMN.js} +2 -2
  20. package/dist/{PurchaseOrderPrintPreview-BHL_I4iP.js → PurchaseOrderPrintPreview-BfogmnuA.js} +1 -1
  21. package/dist/{ReceiveRequestView-DyLwzNZo.js → ReceiveRequestView-DcshoUs1.js} +9 -9
  22. package/dist/{RecipeView-D3uBc5vl.js → RecipeView-B3t6mU2N.js} +3 -3
  23. package/dist/{StockView-BOeSTZHg.js → StockView-DfylYVkd.js} +7 -7
  24. package/dist/{SupplierView-BP2gogrQ.js → SupplierView-BQHWrUpw.js} +4 -4
  25. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-B2FB-o52.js → TransferDetails.vue_vue_type_script_setup_true_lang-aQkAoXb3.js} +4 -4
  26. package/dist/{TransferTemplateView-DvwHL1c1.js → TransferTemplateView-BxO2UFyf.js} +7 -7
  27. package/dist/{UnitView-RePSry1v.js → UnitView-Cl299OpQ.js} +3 -3
  28. package/dist/{WarehouseView-Q1xF1sMN.js → WarehouseView-C9oa2Jis.js} +1 -1
  29. package/dist/{app-Czi6WGIq.js → app-DZ9U0oko.js} +10 -10
  30. package/dist/app.js +1 -1
  31. package/dist/{decimal-BIOPhE0t.js → decimal-Q0qpn1nX.js} +1 -1
  32. package/dist/{feature-Dd_JZy3Y.js → feature-CwrW1toS.js} +1 -1
  33. package/dist/{format-unit-display-vj8ZBTdS.js → format-unit-display-Cijlq5k5.js} +2 -2
  34. package/dist/{index-Bi93q5cv.js → index-CG9f2hcH.js} +2 -2
  35. package/dist/{stock-ksGPw_1H.js → stock-B8OABZwR.js} +1 -1
  36. package/dist/{supplier-Cb1acd5I.js → supplier-OhriR4IQ.js} +1 -1
  37. package/dist/{use-ingredient-select-dialog-NNTeFo0N.js → use-ingredient-select-dialog-P6o_ZU_Z.js} +1 -1
  38. package/dist/{use-inventory-binding-dialog-D__Gm3Pv.js → use-inventory-binding-dialog-8a_D3hzG.js} +1 -1
  39. package/dist/{vue-i18n-BoWWKkCm.js → vue-i18n-BmOal3Ap.js} +2 -2
  40. package/package.json +1 -1
@@ -1,30 +1,30 @@
1
- import { defineComponent as ke, ref as V, resolveComponent as I, openBlock as A, createBlock as W, withCtx as O, createElementVNode as n, createTextVNode as _e, toDisplayString as z, unref as h, createVNode as k, h as C, reactive as Oe, computed as M, onMounted as Ye, watch as Ke, isRef as Te, createElementBlock as B, Fragment as K, createCommentVNode as X, normalizeClass as ue, renderList as fe, normalizeStyle as Re, Teleport as Ge, mergeProps as qe } from "vue";
2
- import { W as We, u as we, aj as G, l as Ze, J as Ce, i as T, t as Je, K as pe, p as Qe, q as Xe, r as et, ak as Pe, al as Ie, a6 as Me, am as Ue, an as oe, ac as tt, ai as ee, T as Ee, D as Be, h as he, f as at, e as nt, a as ot, y as st, _ as rt, z as lt, B as ct, E as xe } from "./app-Czi6WGIq.js";
1
+ import { defineComponent as ke, ref as V, resolveComponent as P, openBlock as _, createBlock as q, withCtx as O, createElementVNode as n, createTextVNode as Ae, toDisplayString as z, unref as x, createVNode as k, h as w, reactive as Oe, computed as I, onMounted as Ye, watch as Ke, isRef as Te, createElementBlock as B, Fragment as K, createCommentVNode as X, normalizeClass as ue, renderList as fe, normalizeStyle as Re, Teleport as Ge, mergeProps as We } from "vue";
2
+ import { W as qe, u as we, aj as G, l as Ze, J as Ce, i as $, t as Je, K as pe, p as Qe, q as Xe, r as et, ak as Pe, al as Ie, a6 as Me, am as Ue, an as oe, ac as tt, ai as ee, T as Ee, D as Be, h as xe, f as at, e as nt, a as ot, y as st, _ as rt, z as lt, B as ct, E as he } from "./app-DZ9U0oko.js";
3
3
  import { useCoreStore as it, useI18n as He } from "@feedmepos/mf-common";
4
4
  import { useSnackbar as je, useDialog as ut, useProxiedModel as dt, components as ie, useBreakpoints as mt } from "@feedmepos/ui-library";
5
5
  import { defineStore as ze, storeToRefs as ft } from "pinia";
6
- import { u as Le } from "./stock-ksGPw_1H.js";
6
+ import { u as Le } from "./stock-B8OABZwR.js";
7
7
  import { E as pt } from "./empty-placeholder-wf6-BWE8.js";
8
- const Se = We((o, p) => {
8
+ const Se = qe((o, p) => {
9
9
  function e() {
10
10
  return we().currentLocation.dbName;
11
11
  }
12
12
  return {
13
13
  async getDraft(v) {
14
- const u = e(), x = `${o.inventoryBackendUrl}/${u}/closing-draft/${v}`;
15
- return p.get(x);
14
+ const u = e(), h = `${o.inventoryBackendUrl}/${u}/closing-draft/${v}`;
15
+ return p.get(h);
16
16
  },
17
17
  async readDrafts() {
18
18
  const v = e(), u = `${o.inventoryBackendUrl}/${v}/closing-draft`;
19
19
  return p.get(u);
20
20
  },
21
21
  async runOperation(v) {
22
- const u = e(), x = `${o.inventoryBackendUrl}/${u}/closing-draft/run-operation`;
23
- return p.post(x, v);
22
+ const u = e(), h = `${o.inventoryBackendUrl}/${u}/closing-draft/run-operation`;
23
+ return p.post(h, v);
24
24
  },
25
25
  async sync(v) {
26
- const u = e(), x = `${o.inventoryBackendUrl}/${u}/closing-draft/sync`;
27
- return p.post(x, v);
26
+ const u = e(), h = `${o.inventoryBackendUrl}/${u}/closing-draft/sync`;
27
+ return p.post(h, v);
28
28
  }
29
29
  };
30
30
  }), vt = { class: "fm-typo-en-body-lg-400" }, yt = { class: "fm-typo-en-body-lg-600" }, gt = { class: "flex gap-12 py-8 justify-end w-full" }, $e = /* @__PURE__ */ ke({
@@ -36,9 +36,9 @@ const Se = We((o, p) => {
36
36
  onFinished: { type: Function }
37
37
  },
38
38
  setup(o) {
39
- const p = o, e = V(), v = Se(), u = je(), x = V(!1);
39
+ const p = o, e = V(), v = Se(), u = je(), h = V(!1);
40
40
  async function m() {
41
- x.value = !0;
41
+ h.value = !0;
42
42
  try {
43
43
  await v.runOperation({
44
44
  _id: p.draft._id,
@@ -59,40 +59,40 @@ const Se = We((o, p) => {
59
59
  type: "error"
60
60
  }), console.error("error on submit closing draft aciont", y);
61
61
  } finally {
62
- x.value = !1;
62
+ h.value = !1;
63
63
  }
64
64
  }
65
65
  return (y, D) => {
66
- const U = I("FmTextField"), E = I("FmButton"), R = I("FmForm");
67
- return A(), W(R, {
66
+ const M = P("FmTextField"), U = P("FmButton"), T = P("FmForm");
67
+ return _(), q(T, {
68
68
  onValidationSuccess: m,
69
69
  class: "flex flex-col gap-32",
70
- disabled: x.value
70
+ disabled: h.value
71
71
  }, {
72
72
  default: O(() => [
73
73
  n("div", vt, [
74
- D[2] || (D[2] = _e(" You are about to ")),
75
- n("span", yt, z(y.action == h(G).enum.approveDraft ? "approve" : "reject"), 1),
76
- D[3] || (D[3] = _e(" this draft. Please provider a remark to justify this action. "))
74
+ D[2] || (D[2] = Ae(" You are about to ")),
75
+ n("span", yt, z(y.action == x(G).enum.approveDraft ? "approve" : "reject"), 1),
76
+ D[3] || (D[3] = Ae(" this draft. Please provider a remark to justify this action. "))
77
77
  ]),
78
- k(U, {
78
+ k(M, {
79
79
  modelValue: e.value,
80
80
  "onUpdate:modelValue": D[0] || (D[0] = (s) => e.value = s),
81
81
  label: "Remark",
82
82
  "label-mark": "required",
83
- rules: [h(Ze)()]
83
+ rules: [x(Ze)()]
84
84
  }, null, 8, ["modelValue", "rules"]),
85
85
  n("div", gt, [
86
- k(E, {
86
+ k(U, {
87
87
  label: "Cancel",
88
88
  variant: "tertiary",
89
89
  onClick: D[1] || (D[1] = (s) => y.onCancel())
90
90
  }),
91
- k(E, {
92
- label: y.action == h(G).enum.approveDraft ? "Approve" : "Reject",
91
+ k(U, {
92
+ label: y.action == x(G).enum.approveDraft ? "Approve" : "Reject",
93
93
  type: "submit",
94
- variant: y.action == h(G).enum.approveDraft ? "primary" : "destructive",
95
- loading: x.value
94
+ variant: y.action == x(G).enum.approveDraft ? "primary" : "destructive",
95
+ loading: h.value
96
96
  }, null, 8, ["label", "variant", "loading"])
97
97
  ])
98
98
  ]),
@@ -104,36 +104,36 @@ const Se = We((o, p) => {
104
104
  function Ne(o) {
105
105
  const p = o.measurementsAmounts.groupBy((v) => v.measurement.id), e = o.sku.unit.measurements.reduce((v, u) => {
106
106
  var y, D;
107
- const x = ((D = (y = p.get(u.id)) == null ? void 0 : y[0]) == null ? void 0 : D.amount) ?? bt, m = Ce(u.conversion, x);
108
- return v + +T(m);
109
- }, +T(o.baseAmount));
107
+ const h = ((D = (y = p.get(u.id)) == null ? void 0 : y[0]) == null ? void 0 : D.amount) ?? bt, m = Ce(u.conversion, h);
108
+ return v + +$(m);
109
+ }, +$(o.baseAmount));
110
110
  return Je(e, o.baseAmount.precision);
111
111
  }
112
- const ht = pe(0), xt = pe(100);
112
+ const xt = pe(0), ht = pe(100);
113
113
  function Dt(o, p) {
114
114
  const e = Ne(o), v = Pe(e, p), u = p.amount === 0 ? null : Ie(v, {
115
115
  ...p,
116
116
  amount: Math.abs(p.amount)
117
- }), x = u ? Ce(u, xt) : null;
117
+ }), h = u ? Ce(u, ht) : null;
118
118
  return {
119
119
  code: o.sku.code,
120
120
  name: o.sku.name,
121
121
  baseUnit: o.sku.unit.abbrev,
122
- baseUnitAmount: +T(o.baseAmount),
123
- ...o.measurementsAmounts.filter((y) => At(y.measurement)).reduce(
124
- (y, D, U) => (y[`measurementAbbrev${U}`] = `(${D.measurement.abbrev}) × ${T(D.measurement.conversion)}`, y[`measurementAmount${U}`] = +T(D.amount), y),
122
+ baseUnitAmount: +$(o.baseAmount),
123
+ ...o.measurementsAmounts.filter((y) => _t(y.measurement)).reduce(
124
+ (y, D, M) => (y[`measurementAbbrev${M}`] = `(${D.measurement.abbrev}) × ${$(D.measurement.conversion)}`, y[`measurementAmount${M}`] = +$(D.amount), y),
125
125
  {}
126
126
  ),
127
- systemBalance: +T(p),
128
- physicalBalance: +T(e),
129
- adjustedAmount: +T(v),
130
- adjustedDiffPercentage: x ? +T(Me(x, 2)) : null
127
+ systemBalance: +$(p),
128
+ physicalBalance: +$(e),
129
+ adjustedAmount: +$(v),
130
+ adjustedDiffPercentage: h ? +$(Me(h, 2)) : null
131
131
  };
132
132
  }
133
- function At(o) {
133
+ function _t(o) {
134
134
  return !o.abbrev.toLocaleLowerCase().includes("inactive");
135
135
  }
136
- function _t() {
136
+ function At() {
137
137
  return [
138
138
  {
139
139
  id: "code",
@@ -166,15 +166,15 @@ function _t() {
166
166
  ];
167
167
  }
168
168
  function kt(o, p) {
169
- var s, d, S, g, f, j, L;
169
+ var s, d, C, g, f, j, L;
170
170
  const e = p.groupBy(
171
171
  (b) => b.id,
172
172
  (b) => b.balance
173
173
  ), u = [...o.items, ...o.negativeStockItems ?? []].map((b) => {
174
174
  var te;
175
- const P = ((te = e.get(b.sku._id)) == null ? void 0 : te[0]) ?? ht;
176
- return Dt(b, P);
177
- }), m = it().currentBusiness.value, y = _t(), D = [
175
+ const R = ((te = e.get(b.sku._id)) == null ? void 0 : te[0]) ?? xt;
176
+ return Dt(b, R);
177
+ }), m = it().currentBusiness.value, y = At(), D = [
178
178
  ["Business name:", m == null ? void 0 : m.name],
179
179
  ["Business ID:", m == null ? void 0 : m._id],
180
180
  ["Menu version", m == null ? void 0 : m.menuVersion],
@@ -185,7 +185,7 @@ function kt(o, p) {
185
185
  ["Recent action", o.approvedAt ? "Approve" : o.rejectionHistory ? "Reject" : ""],
186
186
  [
187
187
  "Action by",
188
- o.approvedAt ? (S = o.approvedBy) == null ? void 0 : S.name : o.rejectionHistory ? (f = (g = o.rejectionHistory[0]) == null ? void 0 : g.rejectedBy) == null ? void 0 : f.name : ""
188
+ o.approvedAt ? (C = o.approvedBy) == null ? void 0 : C.name : o.rejectionHistory ? (f = (g = o.rejectionHistory[0]) == null ? void 0 : g.rejectedBy) == null ? void 0 : f.name : ""
189
189
  ],
190
190
  [
191
191
  "Action at",
@@ -197,21 +197,21 @@ function kt(o, p) {
197
197
  ],
198
198
  [],
199
199
  y.map((b) => b.name),
200
- ...u.map((b) => y.map((P) => b[P.id]))
201
- ], U = y.map((b) => `system:${b.id}`), E = Qe(D, U), R = `[${m == null ? void 0 : m.name}] closing draft (${Xe(new Date(o.updatedAt))}).xlsx`;
202
- return et(E, R), R;
200
+ ...u.map((b) => y.map((R) => b[R.id]))
201
+ ], M = y.map((b) => `system:${b.id}`), U = Qe(D, M), T = `[${m == null ? void 0 : m.name}] closing draft (${Xe(new Date(o.updatedAt))}).xlsx`;
202
+ return et(U, T), T;
203
203
  }
204
- const Ae = ze(
204
+ const _e = ze(
205
205
  "closingDraftActions",
206
206
  function() {
207
- const p = ut(), e = je(), v = Ue(), u = Se(), x = Le(), m = V(!1), y = V();
207
+ const p = ut(), e = je(), v = Ue(), u = Se(), h = Le(), m = V(!1), y = V();
208
208
  function D(g) {
209
209
  const f = {
210
210
  draft: g
211
211
  };
212
212
  y.value = f, m.value = !0;
213
213
  }
214
- async function U(g) {
214
+ async function M(g) {
215
215
  var j;
216
216
  if (g.status === oe.enum.COMPLETED) {
217
217
  const L = g.closingId;
@@ -226,15 +226,15 @@ const Ae = ze(
226
226
  const b = await v.getClosingById(L);
227
227
  return (b == null ? void 0 : b.skus) ?? [];
228
228
  } else
229
- return await x.readStockBalance(), ((j = x.stockBalance) == null ? void 0 : j.skus) ?? [];
229
+ return await h.readStockBalance(), ((j = h.stockBalance) == null ? void 0 : j.skus) ?? [];
230
230
  }
231
- async function E(g, f) {
231
+ async function U(g, f) {
232
232
  f || (e.open({
233
233
  title: "Exporting",
234
234
  message: "Fetching data..."
235
- }), f = await U(g)), kt(g, f);
235
+ }), f = await M(g)), kt(g, f);
236
236
  }
237
- function R(g, f) {
237
+ function T(g, f) {
238
238
  p.open({
239
239
  title: "Approve draft",
240
240
  contentComponent: $e,
@@ -276,16 +276,16 @@ const Ae = ze(
276
276
  type: "success"
277
277
  }), f == null || f();
278
278
  }
279
- function S() {
279
+ function C() {
280
280
  m.value = !1;
281
281
  }
282
282
  return {
283
283
  viewDraft: D,
284
- closeDraftDialog: S,
285
- approveDraft: R,
284
+ closeDraftDialog: C,
285
+ approveDraft: T,
286
286
  rejectDraft: s,
287
287
  syncDraft: d,
288
- exportDraft: E,
288
+ exportDraft: U,
289
289
  viewClosingDraftShow: m,
290
290
  viewClosingDraftProps: y
291
291
  };
@@ -306,9 +306,9 @@ function De(o) {
306
306
  const wt = ze(
307
307
  "closingDraftTable",
308
308
  function() {
309
- const { t: p } = He(), e = Ae(), v = V(new Array()), u = V(!1), x = we(), m = Se();
309
+ const { t: p } = He(), e = _e(), v = V(new Array()), u = V(!1), h = we(), m = Se();
310
310
  async function y() {
311
- if (v.value = [], !!x._currentLocation) {
311
+ if (v.value = [], !!h._currentLocation) {
312
312
  u.value = !0;
313
313
  try {
314
314
  const [s] = await Promise.all([m.readDrafts()]).delayed(1e3);
@@ -321,12 +321,12 @@ const wt = ze(
321
321
  }
322
322
  }
323
323
  async function D(s) {
324
- if (!v.value.find((d) => d._id) && x._currentLocation) {
324
+ if (!v.value.find((d) => d._id) && h._currentLocation) {
325
325
  u.value = !0;
326
326
  try {
327
327
  const [d] = await Promise.all([
328
328
  m.getDraft(s),
329
- new Promise((S) => setTimeout(S, 1e3))
329
+ new Promise((C) => setTimeout(C, 1e3))
330
330
  ]);
331
331
  v.value = [d];
332
332
  } catch (d) {
@@ -336,19 +336,19 @@ const wt = ze(
336
336
  }
337
337
  }
338
338
  }
339
- function U() {
339
+ function M() {
340
340
  e.closeDraftDialog(), y();
341
341
  }
342
- function E(s, d) {
342
+ function U(s, d) {
343
343
  switch (d = nt(d), s) {
344
- case he.Details:
344
+ case xe.Details:
345
345
  return e.viewDraft(d);
346
- case he.Export:
346
+ case xe.Export:
347
347
  return e.exportDraft(d);
348
348
  case G.enum.approveDraft:
349
- return e.approveDraft(d, U);
349
+ return e.approveDraft(d, M);
350
350
  case G.enum.rejectDraft:
351
- return e.rejectDraft(d, U);
351
+ return e.rejectDraft(d, M);
352
352
  }
353
353
  }
354
354
  return {
@@ -393,7 +393,7 @@ const wt = ze(
393
393
  id: "recentRemark",
394
394
  accessorFn: (s) => {
395
395
  var d;
396
- return (s == null ? void 0 : s.approveRemark) ?? ((d = s == null ? void 0 : s.rejectionHistory) == null ? void 0 : d.computeFirst((S) => S.rejectRemark)) ?? s.remark;
396
+ return (s == null ? void 0 : s.approveRemark) ?? ((d = s == null ? void 0 : s.rejectionHistory) == null ? void 0 : d.computeFirst((C) => C.rejectRemark)) ?? s.remark;
397
397
  },
398
398
  header: () => "Recent remark"
399
399
  },
@@ -404,42 +404,42 @@ const wt = ze(
404
404
  enableSorting: !1,
405
405
  cell(s) {
406
406
  var L;
407
- const d = s.row.original, S = d.status, g = new Date(d.updatedAt), f = (L = d == null ? void 0 : d.rejectionHistory) == null ? void 0 : L.computeFirst((b) => b.rejectedAt), j = f ? new Date(f) : null;
408
- return S === "DRAFT" && j ? j.getTime() > g.getTime() ? C(
407
+ const d = s.row.original, C = d.status, g = new Date(d.updatedAt), f = (L = d == null ? void 0 : d.rejectionHistory) == null ? void 0 : L.computeFirst((b) => b.rejectedAt), j = f ? new Date(f) : null;
408
+ return C === "DRAFT" && j ? j.getTime() > g.getTime() ? w(
409
409
  "div",
410
410
  {
411
411
  class: "flex"
412
412
  },
413
- C(
413
+ w(
414
414
  "div",
415
415
  {
416
416
  class: ["fm-status-badge", De("FAILED")]
417
417
  },
418
418
  "Rejected"
419
419
  )
420
- ) : C(
420
+ ) : w(
421
421
  "div",
422
422
  {
423
423
  class: "flex"
424
424
  },
425
- C(
425
+ w(
426
426
  "div",
427
427
  {
428
428
  class: ["fm-status-badge", De("PROCESSING")]
429
429
  },
430
430
  "Updated"
431
431
  )
432
- ) : C(
432
+ ) : w(
433
433
  "div",
434
434
  {
435
435
  class: "flex"
436
436
  },
437
- C(
437
+ w(
438
438
  "div",
439
439
  {
440
- class: ["fm-status-badge", De(S)]
440
+ class: ["fm-status-badge", De(C)]
441
441
  },
442
- Ee(S)
442
+ Ee(C)
443
443
  )
444
444
  );
445
445
  }
@@ -447,9 +447,9 @@ const wt = ze(
447
447
  {
448
448
  id: "action",
449
449
  cell(s) {
450
- const d = s.row.original, S = [
451
- Be[he.Details],
452
- Be[he.Export]
450
+ const d = s.row.original, C = [
451
+ Be[xe.Details],
452
+ Be[xe.Export]
453
453
  ], g = [
454
454
  {
455
455
  translationKey: "inventory.closing.draft.approveDraft",
@@ -464,10 +464,10 @@ const wt = ze(
464
464
  ];
465
465
  return at(
466
466
  [
467
- ...S,
467
+ ...C,
468
468
  ...d.status === oe.enum.DRAFT ? g : []
469
469
  ],
470
- (f) => E(f, d)
470
+ (f) => U(f, d)
471
471
  );
472
472
  },
473
473
  enableSorting: !1,
@@ -484,34 +484,34 @@ const wt = ze(
484
484
  loadDraft: D
485
485
  };
486
486
  }
487
- ), Ct = { class: "w-full flex flex-col gap-32" }, jt = { class: "flex justify-between" }, St = { class: "flex" }, Ft = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Bt = { class: "flex gap-1" }, $t = { class: "fm-typo-en-body-lg-600" }, Tt = { class: "flex flex-col gap-16" }, Rt = { class: "flex items-center" }, Pt = { key: 0 }, It = {
487
+ ), Ct = { class: "w-full flex flex-col gap-32" }, jt = { class: "flex justify-between" }, St = { class: "flex" }, Ft = { class: "grid grid-cols-[repeat(4,1fr)] xs:flex xs:flex-col sm:flex sm:flex-col gap-8" }, Bt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, $t = { class: "flex gap-1" }, Tt = { class: "fm-typo-en-body-lg-600" }, Rt = { class: "flex flex-col gap-16" }, Pt = { class: "flex items-center" }, It = { key: 0 }, Mt = {
488
488
  key: 0,
489
489
  class: "w-full flex flex-col items-center"
490
- }, Mt = { class: "flex items-center gap-8" }, Ut = {
490
+ }, Ut = { class: "flex items-center gap-8" }, Et = {
491
491
  key: 0,
492
492
  class: "flex gap-8"
493
- }, Et = { class: "overflow-x-auto" }, Ht = {
493
+ }, Ht = { class: "overflow-x-auto" }, zt = {
494
494
  key: 1,
495
495
  class: "flex-1 xs:w-screen xs:max-w-full"
496
- }, zt = {
496
+ }, Lt = {
497
497
  key: 0,
498
498
  class: "flex flex-col items-center gap-8 h-full"
499
- }, Lt = ["src"], Nt = {
499
+ }, Nt = ["src"], Vt = {
500
500
  key: 1,
501
501
  class: "px-4 flex flex-col"
502
- }, Vt = { class: "flex gap-12 content-stretch" }, Ot = {
502
+ }, Ot = { class: "flex gap-12 content-stretch" }, Yt = {
503
503
  class: "flex flex-col w-24",
504
504
  name: "circles"
505
- }, Yt = { class: "flex-1 flex flex-col items-center" }, Kt = { class: "flex-1 flex flex-col items-center" }, Gt = {
505
+ }, Kt = { class: "flex-1 flex flex-col items-center" }, Gt = { class: "flex-1 flex flex-col items-center" }, Wt = {
506
506
  class: "py-12 flex flex-col gap-4",
507
507
  name: "received-at header"
508
- }, qt = { class: "fm-typo-en-body-lg-400" }, Wt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Zt = { class: "flex gap-12 content-stretch" }, Jt = {
508
+ }, qt = { class: "fm-typo-en-body-lg-400" }, Zt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Jt = { class: "flex gap-12 content-stretch" }, Qt = {
509
509
  class: "flex flex-col w-24",
510
510
  name: "circles"
511
- }, Qt = { class: "flex-1 flex flex-col items-center" }, Xt = {
511
+ }, Xt = { class: "flex-1 flex flex-col items-center" }, ea = {
512
512
  class: "py-12 flex flex-col gap-4 flex-1",
513
513
  name: "delivery details"
514
- }, ea = { class: "flex flex-col gap-8" }, ta = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, aa = { class: "flex flex-col gap-4" }, na = { class: "flex gap-8" }, oa = /* @__PURE__ */ ke({
514
+ }, ta = { class: "flex flex-col gap-8" }, aa = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, na = { class: "flex flex-col gap-4" }, oa = { class: "flex gap-8" }, sa = /* @__PURE__ */ ke({
515
515
  __name: "ClosingDraftDialog",
516
516
  props: {
517
517
  show: { type: Boolean },
@@ -519,38 +519,38 @@ const wt = ze(
519
519
  },
520
520
  emits: ["submitted"],
521
521
  setup(o, { emit: p }) {
522
- const e = o, v = Le(), u = Ae(), x = dt(e, "show"), m = V(!1), y = V(!1), D = V(new Array()), U = Ue(), E = je(), R = ot(), s = Oe({}), d = M(() => new Set(
523
- R.skus.filter((a) => {
522
+ const e = o, v = Le(), u = _e(), h = dt(e, "show"), m = V(!1), y = V(!1), D = V(new Array()), M = Ue(), U = je(), T = ot(), s = Oe({}), d = I(() => new Set(
523
+ T.skus.filter((a) => {
524
524
  var t;
525
525
  return s[(t = a.customAttributes) == null ? void 0 : t.tag];
526
526
  }).map((a) => a._id)
527
- )), S = p, g = M(() => {
527
+ )), C = p, g = I(() => {
528
528
  var t, r;
529
529
  const a = [...((t = e.draft) == null ? void 0 : t.items) ?? [], ...((r = e.draft) == null ? void 0 : r.negativeStockItems) ?? []];
530
- return d.value.size ? a.filter((l) => d.value.has(l.sku._id)) : a;
531
- }), f = M(() => {
530
+ return d.value.size ? a.filter((c) => d.value.has(c.sku._id)) : a;
531
+ }), f = I(() => {
532
532
  const a = g.value.map((t) => t.sku);
533
533
  return a.sort((t, r) => t.code.localeCompare(r.code)), a;
534
- }), j = M(() => g.value.groupBy(
534
+ }), j = I(() => g.value.groupBy(
535
535
  (t) => t.sku._id,
536
536
  (t) => t.measurementsAmounts.filter((r) => !r.measurement.abbrev.toLocaleLowerCase().includes("inactive")).map((r) => r.measurement.id)
537
537
  ));
538
- Ye(P), Ke(
538
+ Ye(R), Ke(
539
539
  () => e.show,
540
540
  (a) => {
541
- a && (J.value = Z[0], P());
541
+ a && (J.value = Z[0], R());
542
542
  }
543
543
  );
544
544
  const L = pe(0), b = pe(100);
545
- async function P() {
546
- var t, r, l;
545
+ async function R() {
546
+ var t, r, c;
547
547
  m.value = !0;
548
548
  const a = ((t = e.draft) == null ? void 0 : t.status) === oe.enum.COMPLETED;
549
549
  try {
550
- if (await R.init(), a) {
551
- const c = e.draft.closingId;
552
- if (!c) {
553
- E.open({
550
+ if (await T.init(), a) {
551
+ const l = e.draft.closingId;
552
+ if (!l) {
553
+ U.open({
554
554
  title: "Something went wrong",
555
555
  message: "Closing draft is completed but closing document cannot be found.",
556
556
  type: "error"
@@ -559,28 +559,28 @@ const wt = ze(
559
559
  });
560
560
  return;
561
561
  }
562
- const i = await U.getClosingById(c);
562
+ const i = await M.getClosingById(l);
563
563
  D.value = (i == null ? void 0 : i.skus) ?? [];
564
564
  } else
565
- await v.readStockBalance(), D.value = ((l = v.stockBalance) == null ? void 0 : l.skus) ?? [];
566
- } catch (c) {
567
- E.open({
565
+ await v.readStockBalance(), D.value = ((c = v.stockBalance) == null ? void 0 : c.skus) ?? [];
566
+ } catch (l) {
567
+ U.open({
568
568
  title: "Something went wrong",
569
569
  message: "Something went wrong when fetching info. Please try again.",
570
570
  type: "error"
571
- }), console.error("error on fetch stock balances", c);
571
+ }), console.error("error on fetch stock balances", l);
572
572
  } finally {
573
573
  m.value = !1;
574
574
  }
575
575
  }
576
- const te = M(
576
+ const te = I(
577
577
  () => D.value.groupBy(
578
578
  (a) => a.id,
579
579
  (a) => a.balance
580
580
  )
581
- ), ve = M(() => g.value.groupBy((a) => a.sku._id));
581
+ ), ve = I(() => g.value.groupBy((a) => a.sku._id));
582
582
  function se(a) {
583
- return C(
583
+ return w(
584
584
  ie.FmTooltip,
585
585
  { zIndex: 51, placement: "left", class: "w-full flex justify-end" },
586
586
  {
@@ -593,15 +593,10 @@ const wt = ze(
593
593
  }
594
594
  );
595
595
  }
596
- const ae = M(() => {
597
- const a = f.value.reduce((r, l) => {
598
- var c, i, w, $;
599
- return console.log(
600
- "Measurement counts",
601
- l.unit.name,
602
- l.unit.abbrev,
603
- (i = (c = j.value) == null ? void 0 : c.get(l._id)) == null ? void 0 : i[0].length
604
- ), Math.max(r, (($ = (w = j.value) == null ? void 0 : w.get(l._id)) == null ? void 0 : $[0].length) ?? 0);
596
+ const ae = I(() => {
597
+ const a = f.value.reduce((r, c) => {
598
+ var l, i;
599
+ return Math.max(r, ((i = (l = j.value) == null ? void 0 : l.get(c._id)) == null ? void 0 : i[0].length) ?? 0);
605
600
  }, 0);
606
601
  return [
607
602
  {
@@ -610,8 +605,8 @@ const wt = ze(
610
605
  header: () => "Name",
611
606
  size: 350,
612
607
  cell(r) {
613
- const l = r.row.original, c = l.adjustedDiffPercentage, i = typeof c == "number" && Math.abs(c) > 10, w = C("div", { class: "flex flex-col gap-4" }, [
614
- C(
608
+ const c = r.row.original, l = c.adjustedDiffPercentage, i = typeof l == "number" && Math.abs(l) > 10, S = w("div", { class: "flex flex-col gap-4" }, [
609
+ w(
615
610
  "div",
616
611
  {
617
612
  class: [
@@ -619,9 +614,9 @@ const wt = ze(
619
614
  i ? " text-fm-color-system-error-300" : "text-fm-color-typo-primary"
620
615
  ]
621
616
  },
622
- l.name
617
+ c.name
623
618
  ),
624
- C(
619
+ w(
625
620
  "div",
626
621
  {
627
622
  class: [
@@ -629,67 +624,81 @@ const wt = ze(
629
624
  i ? " text-fm-color-system-error-300" : "text-fm-color-typo-secondary"
630
625
  ]
631
626
  },
632
- l.code
627
+ c.code
633
628
  )
634
629
  ]);
635
- return C(
630
+ return w(
636
631
  ie.FmTooltip,
637
632
  {
638
633
  zIndex: 51
639
634
  },
640
635
  {
641
636
  content() {
642
- return i ? "Adjustment difference is more than 10%." : `${l.code} - ${l.name}`;
637
+ return i ? "Adjustment difference is more than 10%." : `${c.code} - ${c.name}`;
643
638
  },
644
639
  default() {
645
- return C("div", { class: "flex items-center gap-4 justify-start w-full" }, [
646
- w
640
+ return w("div", { class: "flex items-center gap-4 justify-start w-full" }, [
641
+ S
647
642
  ]);
648
643
  }
649
644
  }
650
645
  );
651
646
  }
652
647
  },
648
+ {
649
+ id: "baseUnit",
650
+ header: () => "Base unit",
651
+ accessorKey: "baseUnit"
652
+ },
653
653
  {
654
654
  id: "physicalBalances",
655
655
  header: () => "Amounts",
656
656
  enableSorting: !1,
657
657
  cell(r) {
658
- const l = r.row.original, c = (w, $) => C(
658
+ const c = r.row.original, l = (S, E) => w(
659
659
  ie.FmTooltip,
660
660
  { zIndex: 50 },
661
661
  {
662
662
  default() {
663
- return C(
663
+ return w(
664
664
  "div",
665
665
  {
666
666
  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"
667
667
  },
668
668
  [
669
- C("span", { class: "text-fm-color-typo-primary" }, `${w} `),
670
- C(
669
+ w("span", { class: "text-fm-color-typo-primary" }, `${S} `),
670
+ w(
671
671
  "span",
672
672
  {
673
673
  class: "text-fm-color-typo-secondary",
674
674
  style: { maxWidth: "80px" }
675
675
  },
676
- $
676
+ E
677
677
  )
678
678
  ]
679
679
  );
680
680
  },
681
681
  content() {
682
- return `${w} ${$}`;
682
+ return `${S} ${E}`;
683
683
  }
684
684
  }
685
685
  );
686
- let i = Array.from({ length: a }).map((w, $) => {
687
- if (!l[`measurementAmount${$}`])
686
+ let i = Array.from({ length: a }).map((S, E) => {
687
+ if (!c[`measurementAmount${E}`])
688
688
  return null;
689
- const F = l[`measurementAmount${$}`], le = l[`measurementAbbrev${$}`];
690
- return c(F, le);
691
- }).filter((w) => w);
692
- return (l.baseUnitAmount || !i.length) && (i = [c(l.baseUnitAmount, l.baseUnit), ...i]), C("div", { class: "flex gap-8 flex-nowrap" }, i);
689
+ const F = c[`measurementAmount${E}`], le = c[`measurementAbbrev${E}`];
690
+ return l(F, le);
691
+ }).filter((S) => S);
692
+ return (c.baseUnitAmount || !i.length) && (i = [l(c.baseUnitAmount, c.baseUnit), ...i]), w(
693
+ "div",
694
+ {
695
+ class: "flex gap-8 flex-nowrap",
696
+ style: {
697
+ minWidth: `${120 * i.length}px`
698
+ }
699
+ },
700
+ i
701
+ );
693
702
  }
694
703
  },
695
704
  {
@@ -722,14 +731,14 @@ const wt = ze(
722
731
  {
723
732
  id: "adjustedDiffPercentage",
724
733
  accessorKey: "adjustedDiffPercentage",
725
- header: () => C(
734
+ header: () => w(
726
735
  ie.FmTooltip,
727
736
  { zIndex: 51, placement: "left", class: "w-full flex justify-end" },
728
737
  {
729
738
  default() {
730
- return C("div", { class: "flex items-center gap-4" }, [
739
+ return w("div", { class: "flex items-center gap-4" }, [
731
740
  "Diff (%)",
732
- C(ie.FmIcon, { name: "info", color: "neutral-gray-400", size: "sm" })
741
+ w(ie.FmIcon, { name: "info", color: "neutral-gray-400", size: "sm" })
733
742
  ]);
734
743
  },
735
744
  content() {
@@ -739,19 +748,19 @@ const wt = ze(
739
748
  ),
740
749
  size: 200,
741
750
  cell(r) {
742
- const l = r.row.original.adjustedDiffPercentage;
743
- if (!l) return "N/A";
744
- const c = l.toFixed(2);
745
- if (c === "0.00")
746
- return C("div", { class: "flex items-center gap-4 justify-end" }, ["0.00"]);
747
- const i = l > 0;
748
- return C("div", { class: "flex items-center gap-4 justify-end" }, [
749
- C(ie.FmIcon, {
751
+ const c = r.row.original.adjustedDiffPercentage;
752
+ if (!c) return "N/A";
753
+ const l = c.toFixed(2);
754
+ if (l === "0.00")
755
+ return w("div", { class: "flex items-center gap-4 justify-end" }, ["0.00"]);
756
+ const i = c > 0;
757
+ return w("div", { class: "flex items-center gap-4 justify-end" }, [
758
+ w(ie.FmIcon, {
750
759
  name: i ? "arrow_drop_up" : "arrow_drop_down",
751
760
  color: i ? "system-success-300" : "system-error-300",
752
761
  size: "md"
753
762
  }),
754
- c
763
+ l
755
764
  ]);
756
765
  },
757
766
  meta: {
@@ -759,7 +768,7 @@ const wt = ze(
759
768
  }
760
769
  }
761
770
  ];
762
- }), ye = M(() => ae.value.map((a) => a.size ?? 0).reduce((a, t) => a + t)), re = V(""), de = M(() => f.value.map((a) => {
771
+ }), ye = I(() => ae.value.map((a) => a.size ?? 0).reduce((a, t) => a + t)), re = V(""), de = I(() => f.value.map((a) => {
763
772
  var F, le;
764
773
  const t = (F = ve.value.get(a._id)) == null ? void 0 : F[0], r = ((le = te.value.get(a._id)) == null ? void 0 : le[0]) ?? L;
765
774
  if (!t)
@@ -768,48 +777,44 @@ const wt = ze(
768
777
  name: a.name,
769
778
  baseUnit: a.unit.abbrev,
770
779
  baseUnitAmount: 0,
771
- systemBalance: +T(r),
780
+ systemBalance: +$(r),
772
781
  physicalBalance: 0,
773
- adjustedAmount: -+T(r),
782
+ adjustedAmount: -+$(r),
774
783
  adjustedDiffPercentage: -100
775
784
  };
776
- const l = Ne(t), c = Pe(l, r), i = r.amount === 0 ? null : Ie(c, {
785
+ const c = Ne(t), l = Pe(c, r), i = r.amount === 0 ? null : Ie(l, {
777
786
  ...r,
778
787
  amount: Math.abs(r.amount)
779
- }), w = i ? Ce(i, b) : null;
788
+ }), S = i ? Ce(i, b) : null;
780
789
  return {
781
790
  code: a.code,
782
791
  name: a.name,
783
792
  baseUnit: a.unit.abbrev,
784
- baseUnitAmount: +T(t.baseAmount),
793
+ baseUnitAmount: +$(t.baseAmount),
785
794
  ...t.measurementsAmounts.filter((Q) => {
786
795
  var Y, ne, be;
787
796
  return (be = (ne = (Y = j.value) == null ? void 0 : Y.get(a._id)) == null ? void 0 : ne[0]) == null ? void 0 : be.includes(Q.measurement.id);
788
- }).reduce((Q, Y, ne) => (Q[`measurementAbbrev${ne}`] = `(${Y.measurement.abbrev}) × ${T(Y.measurement.conversion)}`, Q[`measurementAmount${ne}`] = +T(Y.amount), Q), {}),
789
- systemBalance: +T(r),
790
- physicalBalance: +T(l),
791
- adjustedAmount: +T(c),
792
- adjustedDiffPercentage: w ? +T(Me(w, 2)) : null
797
+ }).reduce((Q, Y, ne) => (Q[`measurementAbbrev${ne}`] = `(${Y.measurement.abbrev}) × ${$(Y.measurement.conversion)}`, Q[`measurementAmount${ne}`] = +$(Y.amount), Q), {}),
798
+ systemBalance: +$(r),
799
+ physicalBalance: +$(c),
800
+ adjustedAmount: +$(l),
801
+ adjustedDiffPercentage: S ? +$(Me(S, 2)) : null
793
802
  };
794
- })), ge = M(() => {
795
- var t, r, l;
803
+ })), ge = I(() => {
804
+ var t, r, c;
796
805
  if (!e.draft) return [];
797
806
  const a = e.draft.approvedAt ? {
798
807
  action: `Approve at ${ee(e.draft.approvedAt)}`,
799
808
  // actionAt: props.draft.approvedAt,
800
809
  actionBy: e.draft.approvedBy,
801
810
  remark: e.draft.approveRemark
802
- } : (t = e.draft.rejectionHistory) == null ? void 0 : t.computeFirst((c) => ({
803
- action: `Reject at ${ee(c.rejectedAt)}`,
811
+ } : (t = e.draft.rejectionHistory) == null ? void 0 : t.computeFirst((l) => ({
812
+ action: `Reject at ${ee(l.rejectedAt)}`,
804
813
  // actionAt: e.rejectedAt,
805
- actionBy: c.rejectedBy,
806
- remark: c.rejectRemark
814
+ actionBy: l.rejectedBy,
815
+ remark: l.rejectRemark
807
816
  }));
808
817
  return [
809
- {
810
- label: "Using template",
811
- value: ((r = e.draft.usingTemplates.find((c) => c)) == null ? void 0 : r.name) ?? "None"
812
- },
813
818
  {
814
819
  label: "Created at",
815
820
  value: ee(e.draft.createdAt)
@@ -830,6 +835,10 @@ const wt = ze(
830
835
  label: "Effective at",
831
836
  value: ee(e.draft.effectiveAt ?? e.draft.updatedAt)
832
837
  },
838
+ {
839
+ label: "Using template",
840
+ value: ((r = e.draft.usingTemplates.find((l) => l)) == null ? void 0 : r.name) ?? "None"
841
+ },
833
842
  e.draft.remark ? {
834
843
  label: "Remark",
835
844
  value: e.draft.remark
@@ -840,13 +849,13 @@ const wt = ze(
840
849
  } : null,
841
850
  a && a.actionBy ? {
842
851
  label: "Last action by",
843
- value: (l = a.actionBy) == null ? void 0 : l.name
852
+ value: (c = a.actionBy) == null ? void 0 : c.name
844
853
  } : null,
845
854
  a && a.remark ? {
846
855
  label: "Action remark",
847
856
  value: a.remark
848
857
  } : null
849
- ].filter((c) => c).map((c) => c);
858
+ ].filter((l) => l).map((l) => l);
850
859
  }), Z = [
851
860
  {
852
861
  label: "Overview",
@@ -856,8 +865,8 @@ const wt = ze(
856
865
  label: "Action history",
857
866
  value: "history"
858
867
  }
859
- ], J = V(Z[0]), q = M(() => {
860
- var t, r, l, c;
868
+ ], J = V(Z[0]), W = I(() => {
869
+ var t, r, c, l;
861
870
  return [
862
871
  ...(((t = e.draft) == null ? void 0 : t.rejectionHistory) ?? []).map(
863
872
  (i) => ({
@@ -882,82 +891,82 @@ const wt = ze(
882
891
  info: [
883
892
  {
884
893
  label: "Approved by",
885
- values: [(l = e.draft) == null ? void 0 : l.approvedBy.name]
894
+ values: [(c = e.draft) == null ? void 0 : c.approvedBy.name]
886
895
  },
887
896
  {
888
897
  label: "Approval remark",
889
- values: [((c = e.draft) == null ? void 0 : c.approveRemark) ?? ""]
898
+ values: [((l = e.draft) == null ? void 0 : l.approveRemark) ?? ""]
890
899
  }
891
900
  ]
892
901
  }
893
902
  ] : []
894
903
  ];
895
- }), me = M(() => {
896
- var c, i, w, $;
897
- if ((c = e == null ? void 0 : e.draft) != null && c.approvedAt) return "Draft is already approved.";
904
+ }), me = I(() => {
905
+ var l, i, S, E;
906
+ if ((l = e == null ? void 0 : e.draft) != null && l.approvedAt) return "Draft is already approved.";
898
907
  if (((i = e.draft) == null ? void 0 : i.status) !== oe.enum.DRAFT) return "Status is not draft.";
899
- const a = de.value.some((F) => F.physicalBalance < 0), t = (($ = (w = v.stockBalance.skus) == null ? void 0 : w.filter((F) => F.balance.amount < 0)) == null ? void 0 : $.map((F) => F.id)) ?? [], r = new Set(f.value.map((F) => F._id)), l = t.filter((F) => !r.has(F)).length;
908
+ const a = de.value.some((F) => F.physicalBalance < 0), t = ((E = (S = v.stockBalance.skus) == null ? void 0 : S.filter((F) => F.balance.amount < 0)) == null ? void 0 : E.map((F) => F.id)) ?? [], r = new Set(f.value.map((F) => F._id)), c = t.filter((F) => !r.has(F)).length;
900
909
  return [
901
910
  a ? "Negative total exist." : null,
902
- l ? "Negative stock is not included in this draft. Reopen draft in POS and apply changes." : null
911
+ c ? "Negative stock is not included in this draft. Reopen draft in POS and apply changes." : null
903
912
  ].filter((F) => F).join(" ");
904
913
  });
905
914
  return (a, t) => {
906
- const r = I("FmButtonGroup"), l = I("FmMenuDivider"), c = I("FmCard"), i = I("FmButton"), w = I("FmCircularProgress"), $ = I("FmTextField"), F = I("FmIcon"), le = I("FmChip"), Q = I("FmTable"), Y = I("FmSpacer"), ne = I("FmTooltip"), be = I("FmSideSheet");
907
- return A(), W(be, {
915
+ const r = P("FmButtonGroup"), c = P("FmMenuDivider"), l = P("FmCard"), i = P("FmButton"), S = P("FmCircularProgress"), E = P("FmTextField"), F = P("FmIcon"), le = P("FmChip"), Q = P("FmTable"), Y = P("FmSpacer"), ne = P("FmTooltip"), be = P("FmSideSheet");
916
+ return _(), q(be, {
908
917
  "dismiss-away": "",
909
- "max-width": 900,
910
- "model-value": h(x),
911
- "onUpdate:modelValue": t[8] || (t[8] = (_) => Te(x) ? x.value = _ : null),
918
+ "max-width": 9999,
919
+ "model-value": x(h),
920
+ "onUpdate:modelValue": t[8] || (t[8] = (A) => Te(h) ? h.value = A : null),
912
921
  header: "Closing details"
913
922
  }, {
914
923
  "side-sheet-footer": O(() => {
915
- var _, H, N, ce;
924
+ var A, H, N, ce;
916
925
  return [
917
- n("div", na, [
918
- ((_ = e.draft) == null ? void 0 : _.status) === h(oe).enum.DRAFT ? (A(), B(K, { key: 0 }, [
919
- me.value ? (A(), W(ne, {
926
+ n("div", oa, [
927
+ ((A = e.draft) == null ? void 0 : A.status) === x(oe).enum.DRAFT ? (_(), B(K, { key: 0 }, [
928
+ me.value ? (_(), q(ne, {
920
929
  key: 0,
921
930
  "z-index": 51
922
931
  }, {
923
932
  content: O(() => [
924
- _e(z(me.value), 1)
933
+ Ae(z(me.value), 1)
925
934
  ]),
926
935
  default: O(() => [
927
936
  k(i, {
928
937
  disabled: "",
929
938
  key: "approve key",
930
939
  label: "Approve",
931
- onClick: t[3] || (t[3] = () => e.draft && h(u).approveDraft(e.draft, () => S("submitted")))
940
+ onClick: t[3] || (t[3] = () => e.draft && x(u).approveDraft(e.draft, () => C("submitted")))
932
941
  })
933
942
  ]),
934
943
  _: 1
935
- })) : (A(), W(i, {
944
+ })) : (_(), q(i, {
936
945
  key: "approve key",
937
946
  label: "Approve",
938
- onClick: t[4] || (t[4] = () => e.draft && h(u).approveDraft(e.draft, () => S("submitted")))
947
+ onClick: t[4] || (t[4] = () => e.draft && x(u).approveDraft(e.draft, () => C("submitted")))
939
948
  }))
940
949
  ], 64)) : X("", !0),
941
- ((H = e.draft) == null ? void 0 : H.status) === h(oe).enum.DRAFT ? (A(), W(i, {
950
+ ((H = e.draft) == null ? void 0 : H.status) === x(oe).enum.DRAFT ? (_(), q(i, {
942
951
  key: 1,
943
952
  label: "Reject",
944
953
  variant: "destructive",
945
- onClick: t[5] || (t[5] = () => e.draft && h(u).rejectDraft(e.draft, () => S("submitted")))
954
+ onClick: t[5] || (t[5] = () => e.draft && x(u).rejectDraft(e.draft, () => C("submitted")))
946
955
  })) : X("", !0),
947
- (N = e.draft) != null && N.approvedAt && ((ce = e.draft) == null ? void 0 : ce.status) !== h(oe).enum.COMPLETED ? (A(), W(i, {
956
+ (N = e.draft) != null && N.approvedAt && ((ce = e.draft) == null ? void 0 : ce.status) !== x(oe).enum.COMPLETED ? (_(), q(i, {
948
957
  key: 2,
949
958
  label: "Sync",
950
959
  loading: y.value,
951
960
  onClick: t[6] || (t[6] = () => {
952
- e.draft && (y.value = !0, h(u).syncDraft(e.draft, () => {
953
- y.value = !1, S("submitted");
961
+ e.draft && (y.value = !0, x(u).syncDraft(e.draft, () => {
962
+ y.value = !1, C("submitted");
954
963
  }));
955
964
  })
956
965
  }, null, 8, ["loading"])) : X("", !0),
957
966
  k(i, {
958
967
  label: "Close",
959
968
  variant: "tertiary",
960
- onClick: t[7] || (t[7] = (Fe) => x.value = !1)
969
+ onClick: t[7] || (t[7] = (Fe) => h.value = !1)
961
970
  })
962
971
  ])
963
972
  ];
@@ -968,43 +977,45 @@ const wt = ze(
968
977
  k(r, {
969
978
  items: Z,
970
979
  modelValue: J.value,
971
- "onUpdate:modelValue": t[0] || (t[0] = (_) => J.value = _)
980
+ "onUpdate:modelValue": t[0] || (t[0] = (A) => J.value = A)
972
981
  }, null, 8, ["modelValue"])
973
982
  ]),
974
- J.value.value === "overview" ? (A(), B(K, { key: 0 }, [
975
- k(c, {
983
+ J.value.value === "overview" ? (_(), B(K, { key: 0 }, [
984
+ k(l, {
976
985
  variant: "outlined",
977
986
  class: "flex flex-col gap-8 px-12 py-16"
978
987
  }, {
979
988
  default: O(() => {
980
- var _, H;
989
+ var A, H;
981
990
  return [
982
991
  n("div", jt, [
983
992
  t[9] || (t[9] = n("div", { class: "fm-typo-en-body-lg-600" }, "Closing summary", -1)),
984
993
  n("div", St, [
985
994
  n("div", {
986
- class: ue(["fm-status-badge", h(De)(((_ = a.draft) == null ? void 0 : _.status) ?? "DRAFT")])
987
- }, z(h(Ee)(((H = a.draft) == null ? void 0 : H.status) ?? "")), 3)
995
+ class: ue(["fm-status-badge", x(De)(((A = a.draft) == null ? void 0 : A.status) ?? "DRAFT")])
996
+ }, z(x(Ee)(((H = a.draft) == null ? void 0 : H.status) ?? "")), 3)
988
997
  ])
989
998
  ]),
990
- k(l),
991
- (A(!0), B(K, null, fe(ge.value, (N, ce) => (A(), B("div", {
992
- class: "flex flex-col gap-4",
993
- key: ce
994
- }, [
995
- n("div", Ft, [
996
- n("div", Bt, z(N.label), 1)
997
- ]),
998
- n("div", $t, z(N.value), 1)
999
- ]))), 128))
999
+ k(c),
1000
+ n("div", Ft, [
1001
+ (_(!0), B(K, null, fe(ge.value, (N, ce) => (_(), B("div", {
1002
+ class: "flex flex-col gap-4",
1003
+ key: ce
1004
+ }, [
1005
+ n("div", Bt, [
1006
+ n("div", $t, z(N.label), 1)
1007
+ ]),
1008
+ n("div", Tt, z(N.value), 1)
1009
+ ]))), 128))
1010
+ ])
1000
1011
  ];
1001
1012
  }),
1002
1013
  _: 1
1003
1014
  }),
1004
- n("div", Tt, [
1005
- n("div", Rt, [
1015
+ n("div", Rt, [
1016
+ n("div", Pt, [
1006
1017
  t[10] || (t[10] = n("div", { class: "flex-1 fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, " Closing items ", -1)),
1007
- m.value ? X("", !0) : (A(), B("div", Pt, [
1018
+ m.value ? X("", !0) : (_(), B("div", It, [
1008
1019
  k(i, {
1009
1020
  label: "Export data",
1010
1021
  "prepend-icon": "download",
@@ -1012,37 +1023,37 @@ const wt = ze(
1012
1023
  "text-color": "primary",
1013
1024
  "bg-color": "transparent",
1014
1025
  "border-color": "primary",
1015
- onClick: t[1] || (t[1] = (_) => a.draft ? h(u).exportDraft(a.draft, D.value) : null)
1026
+ onClick: t[1] || (t[1] = (A) => a.draft ? x(u).exportDraft(a.draft, D.value) : null)
1016
1027
  })
1017
1028
  ]))
1018
1029
  ]),
1019
- m.value ? (A(), B("div", It, [
1030
+ m.value ? (_(), B("div", Mt, [
1020
1031
  t[12] || (t[12] = n("div", { class: "h-80" }, null, -1)),
1021
- n("div", Mt, [
1032
+ n("div", Ut, [
1022
1033
  n("div", null, [
1023
- k(w, { size: "md" })
1034
+ k(S, { size: "md" })
1024
1035
  ]),
1025
1036
  t[11] || (t[11] = n("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Fetching info... ", -1))
1026
1037
  ]),
1027
1038
  t[13] || (t[13] = n("div", { class: "h-80" }, null, -1))
1028
- ])) : (A(), B(K, { key: 1 }, [
1039
+ ])) : (_(), B(K, { key: 1 }, [
1029
1040
  n("div", null, [
1030
- k($, {
1041
+ k(E, {
1031
1042
  modelValue: re.value,
1032
- "onUpdate:modelValue": t[2] || (t[2] = (_) => re.value = _),
1043
+ "onUpdate:modelValue": t[2] || (t[2] = (A) => re.value = A),
1033
1044
  placeholder: "Filter items"
1034
1045
  }, null, 8, ["modelValue"])
1035
1046
  ]),
1036
- h(R).skuTags.size ? (A(), B("div", Ut, [
1037
- (A(!0), B(K, null, fe(h(R).skuTags.keys(), (_) => (A(), W(le, {
1038
- key: `${_}`,
1039
- label: `${_}`,
1047
+ x(T).skuTags.size ? (_(), B("div", Et, [
1048
+ (_(!0), B(K, null, fe(x(T).skuTags.keys(), (A) => (_(), q(le, {
1049
+ key: `${A}`,
1050
+ label: `${A}`,
1040
1051
  selectable: "",
1041
- selected: s[`${_}`],
1042
- onClick: (H) => s[`${_}`] = !s[`${_}`]
1052
+ selected: s[`${A}`],
1053
+ onClick: (H) => s[`${A}`] = !s[`${A}`]
1043
1054
  }, {
1044
1055
  default: O(() => [
1045
- s[`${_}`] ? (A(), W(F, {
1056
+ s[`${A}`] ? (_(), q(F, {
1046
1057
  key: 0,
1047
1058
  name: "check",
1048
1059
  class: "text-white",
@@ -1052,18 +1063,18 @@ const wt = ze(
1052
1063
  class: ue([
1053
1064
  "",
1054
1065
  {
1055
- "text-white fm-typo-en-body-md-600": s[`${_}`],
1056
- "text-fm-color-typo-primary fm-typo-en-body-md-400": !s[`${_}`]
1066
+ "text-white fm-typo-en-body-md-600": s[`${A}`],
1067
+ "text-fm-color-typo-primary fm-typo-en-body-md-400": !s[`${A}`]
1057
1068
  }
1058
1069
  ])
1059
- }, z(_), 3)
1070
+ }, z(A), 3)
1060
1071
  ]),
1061
1072
  _: 2
1062
1073
  }, 1032, ["label", "selected", "onClick"]))), 128))
1063
1074
  ])) : X("", !0),
1064
- n("div", Et, [
1075
+ n("div", Ht, [
1065
1076
  n("div", {
1066
- style: Re({ width: `${ye.value}px` })
1077
+ style: Re({ minWidth: `${ye.value}px` })
1067
1078
  }, [
1068
1079
  k(Q, {
1069
1080
  "column-defs": ae.value,
@@ -1075,12 +1086,12 @@ const wt = ze(
1075
1086
  ], 64))
1076
1087
  ])
1077
1088
  ], 64)) : X("", !0),
1078
- J.value.value === "history" ? (A(), B("div", Ht, [
1079
- q.value.length ? (A(), B("div", Nt, [
1080
- (A(!0), B(K, null, fe(q.value, (_, H) => (A(), B(K, { key: H }, [
1081
- n("div", Vt, [
1082
- n("div", Ot, [
1083
- n("div", Yt, [
1089
+ J.value.value === "history" ? (_(), B("div", zt, [
1090
+ W.value.length ? (_(), B("div", Vt, [
1091
+ (_(!0), B(K, null, fe(W.value, (A, H) => (_(), B(K, { key: H }, [
1092
+ n("div", Ot, [
1093
+ n("div", Yt, [
1094
+ n("div", Kt, [
1084
1095
  n("div", {
1085
1096
  class: ue([
1086
1097
  {
@@ -1092,51 +1103,51 @@ const wt = ze(
1092
1103
  }, null, 2)
1093
1104
  ]),
1094
1105
  t[16] || (t[16] = n("div", { class: "h-24 w-24 bg-fm-color-primary rounded-full" }, null, -1)),
1095
- n("div", Kt, [
1106
+ n("div", Gt, [
1096
1107
  n("div", {
1097
1108
  class: ue([
1098
1109
  {
1099
- "bg-fm-color-primary": H < q.value.length - 1,
1100
- "bg-white": H >= q.value.length - 1
1110
+ "bg-fm-color-primary": H < W.value.length - 1,
1111
+ "bg-white": H >= W.value.length - 1
1101
1112
  },
1102
1113
  "w-[2px] h-full"
1103
1114
  ])
1104
1115
  }, null, 2)
1105
1116
  ])
1106
1117
  ]),
1107
- n("div", Gt, [
1108
- n("div", qt, z(_.header), 1),
1109
- n("div", Wt, z(_.date), 1)
1118
+ n("div", Wt, [
1119
+ n("div", qt, z(A.header), 1),
1120
+ n("div", Zt, z(A.date), 1)
1110
1121
  ])
1111
1122
  ]),
1112
- n("div", Zt, [
1113
- n("div", Jt, [
1114
- n("div", Qt, [
1123
+ n("div", Jt, [
1124
+ n("div", Qt, [
1125
+ n("div", Xt, [
1115
1126
  n("div", {
1116
1127
  class: ue([
1117
1128
  {
1118
- "bg-fm-color-primary": H < q.value.length - 1,
1119
- "bg-white": H >= q.value.length - 1
1129
+ "bg-fm-color-primary": H < W.value.length - 1,
1130
+ "bg-white": H >= W.value.length - 1
1120
1131
  },
1121
1132
  "w-[2px] h-full"
1122
1133
  ])
1123
1134
  }, null, 2)
1124
1135
  ])
1125
1136
  ]),
1126
- n("div", Xt, [
1127
- k(c, {
1137
+ n("div", ea, [
1138
+ k(l, {
1128
1139
  variant: "outlined",
1129
1140
  class: "py-12 px-16"
1130
1141
  }, {
1131
1142
  default: O(() => [
1132
- n("div", ea, [
1133
- (A(!0), B(K, null, fe(_.info, (N, ce) => (A(), B("div", {
1143
+ n("div", ta, [
1144
+ (_(!0), B(K, null, fe(A.info, (N, ce) => (_(), B("div", {
1134
1145
  key: ce,
1135
1146
  class: "flex flex-col gap-4"
1136
1147
  }, [
1137
- n("div", ta, z(N == null ? void 0 : N.label), 1),
1138
- n("div", aa, [
1139
- (A(!0), B(K, null, fe(N == null ? void 0 : N.values, (Fe, Ve) => (A(), B("div", {
1148
+ n("div", aa, z(N == null ? void 0 : N.label), 1),
1149
+ n("div", na, [
1150
+ (_(!0), B(K, null, fe(N == null ? void 0 : N.values, (Fe, Ve) => (_(), B("div", {
1140
1151
  key: Ve,
1141
1152
  class: "fm-typo-en-body-lg-600"
1142
1153
  }, z(Fe), 1))), 128))
@@ -1149,13 +1160,13 @@ const wt = ze(
1149
1160
  ])
1150
1161
  ])
1151
1162
  ], 64))), 128))
1152
- ])) : (A(), B("div", zt, [
1163
+ ])) : (_(), B("div", Lt, [
1153
1164
  k(Y),
1154
1165
  n("div", null, [
1155
1166
  n("img", {
1156
- src: h(pt),
1167
+ src: x(pt),
1157
1168
  alt: "List is empty"
1158
- }, null, 8, Lt)
1169
+ }, null, 8, Nt)
1159
1170
  ]),
1160
1171
  t[14] || (t[14] = n("div", { class: "fm-typo-en-body-lg-600" }, z("No records found"), -1)),
1161
1172
  t[15] || (t[15] = n("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary px-16" }, z("You can track approval and rejection history here"), -1)),
@@ -1169,22 +1180,22 @@ const wt = ze(
1169
1180
  }, 8, ["model-value"]);
1170
1181
  };
1171
1182
  }
1172
- }), sa = { class: "flex-1 flex flex-col gap-8" }, ra = { class: "flex flex-col" }, la = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ca = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, ia = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, ua = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, ba = /* @__PURE__ */ ke({
1183
+ }), ra = { class: "flex-1 flex flex-col gap-8" }, la = { class: "flex flex-col" }, ca = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ia = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, ua = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, da = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, xa = /* @__PURE__ */ ke({
1173
1184
  __name: "ClosingDraftView",
1174
1185
  setup(o) {
1175
- const { t: p } = He(), { viewDraft: e } = Ae(), { viewClosingDraftProps: v, viewClosingDraftShow: u } = ft(Ae()), x = we(), m = wt(), y = st(), { breakpoints: D } = mt();
1176
- x.watchLocation(m.fetchDrafts);
1177
- const U = M(() => m.loading), E = V(""), R = M(() => D.value.xs || D.value.sm), s = M(() => R.value ? 10 : 20);
1186
+ const { t: p } = He(), { viewDraft: e } = _e(), { viewClosingDraftProps: v, viewClosingDraftShow: u } = ft(_e()), h = we(), m = wt(), y = st(), { breakpoints: D } = mt();
1187
+ h.watchLocation(m.fetchDrafts);
1188
+ const M = I(() => m.loading), U = V(""), T = I(() => D.value.xs || D.value.sm), s = I(() => T.value ? 10 : 20);
1178
1189
  function d(f) {
1179
1190
  switch (f) {
1180
1191
  case "refresh":
1181
1192
  return m.fetchDrafts();
1182
1193
  }
1183
1194
  }
1184
- function S(f) {
1195
+ function C(f) {
1185
1196
  return f;
1186
1197
  }
1187
- const g = M(() => R.value ? [
1198
+ const g = I(() => T.value ? [
1188
1199
  {
1189
1200
  label: "Refresh",
1190
1201
  value: "refresh",
@@ -1198,10 +1209,10 @@ const wt = ze(
1198
1209
  }
1199
1210
  ]);
1200
1211
  return (f, j) => {
1201
- const L = I("FmTable");
1202
- return A(), B(K, null, [
1212
+ const L = P("FmTable");
1213
+ return _(), B(K, null, [
1203
1214
  k(rt, {
1204
- title: h(p)("inventory.closing.draft.title"),
1215
+ title: x(p)("inventory.closing.draft.title"),
1205
1216
  actions: g.value,
1206
1217
  "onClick:action": d
1207
1218
  }, {
@@ -1210,63 +1221,63 @@ const wt = ze(
1210
1221
  class: ue([
1211
1222
  "flex flex-col gap-8 max-h-full",
1212
1223
  {
1213
- "p-0": R.value,
1214
- "px-24 ": !R.value
1224
+ "p-0": T.value,
1225
+ "px-24 ": !T.value
1215
1226
  }
1216
1227
  ])
1217
1228
  }, [
1218
1229
  k(lt, {
1219
1230
  "change-location": "",
1220
1231
  searchable: "",
1221
- search: E.value,
1222
- "onUpdate:search": j[0] || (j[0] = (b) => E.value = b)
1232
+ search: U.value,
1233
+ "onUpdate:search": j[0] || (j[0] = (b) => U.value = b)
1223
1234
  }, null, 8, ["search"]),
1224
1235
  k(L, {
1225
- style: Re(h(y).tableHeight),
1226
- "column-defs": h(m).columnDefs,
1227
- "row-data": h(m).drafts,
1228
- "search-value": E.value,
1229
- loading: U.value,
1230
- onRowClick: j[1] || (j[1] = (b) => h(e)(b.original)),
1236
+ style: Re(x(y).tableHeight),
1237
+ "column-defs": x(m).columnDefs,
1238
+ "row-data": x(m).drafts,
1239
+ "search-value": U.value,
1240
+ loading: M.value,
1241
+ onRowClick: j[1] || (j[1] = (b) => x(e)(b.original)),
1231
1242
  "page-size": s.value
1232
1243
  }, {
1233
1244
  "list-row": O((b) => [
1234
1245
  k(ct, {
1235
1246
  row: b,
1236
- onRowClick: (P) => h(e)(P)
1247
+ onRowClick: (R) => x(e)(R)
1237
1248
  }, {
1238
- default: O((P) => {
1239
- var te, ve, se, ae, ye, re, de, ge, Z, J, q, me, a, t, r, l, c, i, w, $;
1249
+ default: O((R) => {
1250
+ var te, ve, se, ae, ye, re, de, ge, Z, J, W, me, a, t, r, c, l, i, S, E;
1240
1251
  return [
1241
- n("div", sa, [
1242
- n("div", ra, [
1243
- n("div", la, [
1244
- k(h(xe), {
1245
- render: (se = (ve = (te = P._id) == null ? void 0 : te.column) == null ? void 0 : ve.columnDef) == null ? void 0 : se.cell,
1246
- props: (ye = (ae = P._id) == null ? void 0 : ae.getContext) == null ? void 0 : ye.call(ae)
1252
+ n("div", ra, [
1253
+ n("div", la, [
1254
+ n("div", ca, [
1255
+ k(x(he), {
1256
+ render: (se = (ve = (te = R._id) == null ? void 0 : te.column) == null ? void 0 : ve.columnDef) == null ? void 0 : se.cell,
1257
+ props: (ye = (ae = R._id) == null ? void 0 : ae.getContext) == null ? void 0 : ye.call(ae)
1247
1258
  }, null, 8, ["render", "props"])
1248
1259
  ]),
1249
- n("div", ca, [
1250
- k(h(xe), {
1251
- render: (ge = (de = (re = P.name) == null ? void 0 : re.column) == null ? void 0 : de.columnDef) == null ? void 0 : ge.cell,
1252
- props: (J = (Z = P.name) == null ? void 0 : Z.getContext) == null ? void 0 : J.call(Z)
1260
+ n("div", ia, [
1261
+ k(x(he), {
1262
+ render: (ge = (de = (re = R.name) == null ? void 0 : re.column) == null ? void 0 : de.columnDef) == null ? void 0 : ge.cell,
1263
+ props: (J = (Z = R.name) == null ? void 0 : Z.getContext) == null ? void 0 : J.call(Z)
1253
1264
  }, null, 8, ["render", "props"])
1254
1265
  ]),
1255
- n("div", ia, z([
1266
+ n("div", ua, z([
1256
1267
  ...b.original.items.slice(0, 3).map((F) => F.sku.name),
1257
1268
  ...b.original.items.length >= 3 ? [`and ${b.original.items.length - 3} more items`] : []
1258
1269
  ].join(", ")), 1),
1259
- n("div", ua, [
1260
- k(h(xe), {
1261
- render: (a = (me = (q = P.ref) == null ? void 0 : q.column) == null ? void 0 : me.columnDef) == null ? void 0 : a.cell,
1262
- props: (r = (t = P.ref) == null ? void 0 : t.getContext) == null ? void 0 : r.call(t)
1270
+ n("div", da, [
1271
+ k(x(he), {
1272
+ render: (a = (me = (W = R.ref) == null ? void 0 : W.column) == null ? void 0 : me.columnDef) == null ? void 0 : a.cell,
1273
+ props: (r = (t = R.ref) == null ? void 0 : t.getContext) == null ? void 0 : r.call(t)
1263
1274
  }, null, 8, ["render", "props"])
1264
1275
  ])
1265
1276
  ]),
1266
1277
  n("div", null, [
1267
- k(h(xe), {
1268
- render: (i = (c = (l = P.status) == null ? void 0 : l.column) == null ? void 0 : c.columnDef) == null ? void 0 : i.cell,
1269
- props: ($ = (w = P.status) == null ? void 0 : w.getContext) == null ? void 0 : $.call(w)
1278
+ k(x(he), {
1279
+ render: (i = (l = (c = R.status) == null ? void 0 : c.column) == null ? void 0 : l.columnDef) == null ? void 0 : i.cell,
1280
+ props: (E = (S = R.status) == null ? void 0 : S.getContext) == null ? void 0 : E.call(S)
1270
1281
  }, null, 8, ["render", "props"])
1271
1282
  ])
1272
1283
  ])
@@ -1281,11 +1292,11 @@ const wt = ze(
1281
1292
  ]),
1282
1293
  _: 1
1283
1294
  }, 8, ["title", "actions"]),
1284
- (A(), W(Ge, { to: "body" }, [
1285
- k(oa, qe(h(v), {
1286
- show: h(u),
1295
+ (_(), q(Ge, { to: "body" }, [
1296
+ k(sa, We(x(v), {
1297
+ show: x(u),
1287
1298
  "onUpdate:show": j[2] || (j[2] = (b) => Te(u) ? u.value = b : null),
1288
- onSubmitted: j[3] || (j[3] = () => (u.value = !1, h(m).fetchDrafts()))
1299
+ onSubmitted: j[3] || (j[3] = () => (u.value = !1, x(m).fetchDrafts()))
1289
1300
  }), null, 16, ["show"])
1290
1301
  ]))
1291
1302
  ], 64);
@@ -1293,5 +1304,5 @@ const wt = ze(
1293
1304
  }
1294
1305
  });
1295
1306
  export {
1296
- ba as default
1307
+ xa as default
1297
1308
  };