@feedmepos/mf-inventory-portal 0.0.23-dev.19 → 0.0.23-dev.20

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 (77) hide show
  1. package/dist/{App-DY01VbHo.js → App-N2myASr3.js} +44 -41
  2. package/dist/{ApprovalView-DtwXb5T7.js → ApprovalView-B87DpnNq.js} +20 -23
  3. package/dist/{BindingsDialog-ClnnwUTV.js → BindingsDialog-DehCgt1T.js} +7 -7
  4. package/dist/{BindingsPicker-DbdkXiHx.js → BindingsPicker-BBtJ3rBB.js} +7 -8
  5. package/dist/{BindingsTable-Cqh3Ku0d.js → BindingsTable-CfHuy-K1.js} +16 -20
  6. package/dist/{ClosingDraftView-CzuMTeC1.js → ClosingDraftView-BYZ1mZrG.js} +190 -196
  7. package/dist/{ClosingTemplateView-CVQlOya4.js → ClosingTemplateView-CAL9jYaf.js} +49 -60
  8. package/dist/{FmDroppableField-8RzKjEdL.js → FmDroppableField-CC7RiBoR.js} +1 -1
  9. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BO1wCa9i.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C4G9LaXv.js} +24 -25
  10. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-sgvBxxkn.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BBf7jmJz.js} +56 -57
  11. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-D7uvrzFU.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DjTvrLPs.js} +7 -7
  12. package/dist/{IngredientGroupView-DgDZnggI.js → IngredientGroupView-X0ST4tW9.js} +30 -37
  13. package/dist/{IngredientsView-SuCckJrj.js → IngredientsView-BUJXzpVr.js} +106 -112
  14. package/dist/{IntegrationView-CZQoHCkX.js → IntegrationView-QbuIwjec.js} +63 -65
  15. package/dist/{InventoryBindingForm-C-E3EINv.js → InventoryBindingForm-C1BR_h_3.js} +1 -1
  16. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-B3nsmCuj.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CRwcFskQ.js} +18 -20
  17. package/dist/{InventoryBindingSummary-DNiOKfO8.js → InventoryBindingSummary-gn3Gq1ok.js} +1 -1
  18. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CdYa8Pv2.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-GY3FFm5_.js} +1 -1
  19. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BwxgZ-vM.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DVwtuUg9.js} +8 -8
  20. package/dist/{PurchaseOrderPrintPreview-C6i2S9L-.js → PurchaseOrderPrintPreview-FuOYaO56.js} +13 -14
  21. package/dist/{ReceiveRequestView-BABjGvIn.js → ReceiveRequestView-BNz1brve.js} +66 -75
  22. package/dist/{RecipeView-CoMcIuHu.js → RecipeView-DRKTODfC.js} +58 -64
  23. package/dist/{StockView-DhJshtaj.js → StockView-DnMcfkGG.js} +80 -87
  24. package/dist/{SupplierView-hQtDIQzE.js → SupplierView-DAnnWZUN.js} +45 -52
  25. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-DsJUSZsm.js → TransferDetails.vue_vue_type_script_setup_true_lang-BBARPa0S.js} +103 -110
  26. package/dist/{TransferTemplateView-GzwT4hp-.js → TransferTemplateView-2qlKwwKg.js} +217 -227
  27. package/dist/{UnitView-CRMF6RWu.js → UnitView-u5wZGetF.js} +103 -108
  28. package/dist/{WarehouseView-AVEDff0v.js → WarehouseView-Z80N7FJV.js} +77 -84
  29. package/dist/api/adjustment-template.d.ts +23 -0
  30. package/dist/app-Fc2FPGhO.js +58871 -0
  31. package/dist/app.d.ts +51 -0
  32. package/dist/app.js +2 -2
  33. package/dist/components/FmMultiselectDialogProps.d.ts +1 -0
  34. package/dist/composable/defineDeepModel.d.ts +1 -1
  35. package/dist/{decimal-N5ymnwhP.js → decimal-BDD-e5Lb.js} +1 -1
  36. package/dist/{feature-Bfq8yWgS.js → feature-BMEyYowI.js} +1 -1
  37. package/dist/{format-unit-display-CXawcmvj.js → format-unit-display-DvlR_z--.js} +205 -212
  38. package/dist/{index-CcCqc9jx.js → index-CR22QBdu.js} +1 -1
  39. package/dist/{netsuite-DX6L1oLu.js → netsuite-CqMWgzKo.js} +9 -9
  40. package/dist/router/name.d.ts +1 -0
  41. package/dist/{stock-Btlxmf8R.js → stock-sIy40ix1.js} +7 -8
  42. package/dist/style.css +1 -1
  43. package/dist/supplier-Cf24JqTH.js +77 -0
  44. package/dist/tsconfig.app.tsbuildinfo +1 -1
  45. package/dist/{use-inventory-binding-dialog-BFqxWNzX.js → use-inventory-binding-dialog-Br9Uv9o8.js} +10 -11
  46. package/dist/views/adjustment-template/wastage-template/WastageTemplateDetails.vue.d.ts +2 -0
  47. package/dist/views/adjustment-template/wastage-template/WastageTemplateDialog.vue.d.ts +22 -0
  48. package/dist/views/adjustment-template/wastage-template/WastageTemplatePublish.vue.d.ts +6 -0
  49. package/dist/views/adjustment-template/wastage-template/WastageTemplateView.vue.d.ts +2 -0
  50. package/dist/views/adjustment-template/wastage-template/actions.d.ts +1295 -0
  51. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateForm.vue.d.ts +16 -0
  52. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +35 -0
  53. package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +20 -0
  54. package/dist/views/adjustment-template/wastage-template/props.d.ts +29 -0
  55. package/dist/views/adjustment-template/wastage-template/table.d.ts +1273 -0
  56. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -2
  57. package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
  58. package/dist/{xlsx-C3L2eW52.js → xlsx-sL0sD2HQ.js} +1 -1
  59. package/dist/{xlsx.util-CJKLCuWK.js → xlsx.util-D2Tdwf8J.js} +1 -1
  60. package/package.json +3 -3
  61. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-m92y5x0G.js +0 -436
  62. package/dist/FmMultiselectDialog-Jr9uL_z_.js +0 -415
  63. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +0 -135
  64. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  65. package/dist/app-ww5ibHkL.js +0 -33540
  66. package/dist/date2-D5MTVjlP.js +0 -117
  67. package/dist/dayjs.min-7pwGJ2aW.js +0 -282
  68. package/dist/defineDeepModel-DJODEpcR.js +0 -13
  69. package/dist/form-mode.enum-BKiNVH6A.js +0 -4
  70. package/dist/format-time-from-id-0UkRUr39.js +0 -15
  71. package/dist/fuzzy-DdOiOd-q.js +0 -41
  72. package/dist/index-Cin_fxtb.js +0 -45
  73. package/dist/index-gvJJ-xRY.js +0 -22283
  74. package/dist/row-action.enum-7rGLGZ5v.js +0 -55
  75. package/dist/rules-C83wiSGb.js +0 -203
  76. package/dist/supplier-CSzla-9I.js +0 -77
  77. package/dist/use-template-enabled-locations-2-CUkqC-cd.js +0 -86
@@ -1,20 +1,14 @@
1
- import { defineComponent as fe, ref as E, resolveComponent as P, openBlock as _, createBlock as ae, withCtx as q, createElementVNode as o, createTextVNode as ye, toDisplayString as I, unref as b, createVNode as A, h as O, computed as U, onMounted as Me, watch as Pe, isRef as xe, createCommentVNode as ee, createElementBlock as F, Fragment as J, normalizeClass as te, renderList as le, normalizeStyle as De, Teleport as Ue, mergeProps as He } from "vue";
2
- import { u as Ie, _ as Le, a as ze } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-m92y5x0G.js";
3
- import { useCoreStore as Ee, useI18n as Ae } from "@feedmepos/mf-common";
4
- import { useSnackbar as pe, useDialog as Ne, useProxiedModel as Oe, components as ce, useBreakpoints as Ke } from "@feedmepos/ui-library";
5
- import { k as Ve, u as ve, p as K, q as _e, r as oe, s as we, c as Ye, a as Ge } from "./app-ww5ibHkL.js";
6
- import { defineStore as ke, storeToRefs as qe } from "pinia";
7
- import { R as Ze, b as ge, a as k, t as We, c as ne, l as Ce, m as je, k as Se } from "./rules-C83wiSGb.js";
8
- import { t as Je, d as Qe } from "./xlsx.util-CJKLCuWK.js";
9
- import { f as Xe, d as G } from "./date2-D5MTVjlP.js";
10
- import { u as Be } from "./stock-Btlxmf8R.js";
11
- import { D as be, R as ie } from "./row-action.enum-7rGLGZ5v.js";
12
- import { c as et, _ as tt, F as ue } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
13
- import { f as at } from "./format-time-from-id-0UkRUr39.js";
14
- import { E as ot } from "./empty-placeholder-wf6-BWE8.js";
15
- const Fe = Ve((a, c) => {
1
+ import { defineComponent as fe, ref as E, resolveComponent as P, openBlock as _, createBlock as ae, withCtx as q, createElementVNode as n, createTextVNode as ge, toDisplayString as z, unref as b, createVNode as A, h as O, computed as U, onMounted as Me, watch as Pe, isRef as xe, createCommentVNode as ee, createElementBlock as F, Fragment as J, normalizeClass as te, renderList as le, normalizeStyle as De, Teleport as Ue, mergeProps as He } from "vue";
2
+ import { N as ze, u as pe, a9 as K, k as Ie, y as ve, h as k, t as Le, z as oe, n as Ee, aa as Ae, ab as _e, a0 as we, ac as ke, ad as ne, a6 as Ne, a8 as G, K as Ce, D as be, f as ce, e as Oe, d as Ke, a as Ve, p as Ye, q as Ge, r as qe, s as Ze, v as ie } from "./app-Fc2FPGhO.js";
3
+ import { useCoreStore as We, useI18n as je } from "@feedmepos/mf-common";
4
+ import { useSnackbar as ye, useDialog as Je, useProxiedModel as Qe, components as ue, useBreakpoints as Xe } from "@feedmepos/ui-library";
5
+ import { defineStore as Se, storeToRefs as et } from "pinia";
6
+ import { t as tt, d as at } from "./xlsx.util-D2Tdwf8J.js";
7
+ import { u as Be } from "./stock-sIy40ix1.js";
8
+ import { E as nt } from "./empty-placeholder-wf6-BWE8.js";
9
+ const Fe = ze((a, c) => {
16
10
  function e() {
17
- return ve().currentLocation.dbName;
11
+ return pe().currentLocation.dbName;
18
12
  }
19
13
  return {
20
14
  async getDraft(i) {
@@ -30,7 +24,7 @@ const Fe = Ve((a, c) => {
30
24
  return c.post(v, i);
31
25
  }
32
26
  };
33
- }), nt = { class: "fm-typo-en-body-lg-400" }, st = { class: "fm-typo-en-body-lg-600" }, rt = { class: "flex gap-12 py-8 justify-end w-full" }, he = /* @__PURE__ */ fe({
27
+ }), ot = { class: "fm-typo-en-body-lg-400" }, st = { class: "fm-typo-en-body-lg-600" }, rt = { class: "flex gap-12 py-8 justify-end w-full" }, he = /* @__PURE__ */ fe({
34
28
  __name: "ClosingDraftAction",
35
29
  props: {
36
30
  draft: {},
@@ -39,7 +33,7 @@ const Fe = Ve((a, c) => {
39
33
  onFinished: { type: Function }
40
34
  },
41
35
  setup(a) {
42
- const c = a, e = E(), i = Fe(), d = pe(), v = E(!1);
36
+ const c = a, e = E(), i = Fe(), d = ye(), v = E(!1);
43
37
  async function u() {
44
38
  v.value = !0;
45
39
  try {
@@ -65,7 +59,7 @@ const Fe = Ve((a, c) => {
65
59
  v.value = !1;
66
60
  }
67
61
  }
68
- return (m, g) => {
62
+ return (m, y) => {
69
63
  const j = P("FmTextField"), R = P("FmButton"), $ = P("FmForm");
70
64
  return _(), ae($, {
71
65
  onValidationSuccess: u,
@@ -73,23 +67,23 @@ const Fe = Ve((a, c) => {
73
67
  disabled: v.value
74
68
  }, {
75
69
  default: q(() => [
76
- o("div", nt, [
77
- g[2] || (g[2] = ye(" You are about to ")),
78
- o("span", st, I(m.action == b(K).enum.approveDraft ? "approve" : "reject"), 1),
79
- g[3] || (g[3] = ye(" this draft. Please provider a remark to justify this action. "))
70
+ n("div", ot, [
71
+ y[2] || (y[2] = ge(" You are about to ")),
72
+ n("span", st, z(m.action == b(K).enum.approveDraft ? "approve" : "reject"), 1),
73
+ y[3] || (y[3] = ge(" this draft. Please provider a remark to justify this action. "))
80
74
  ]),
81
75
  A(j, {
82
76
  modelValue: e.value,
83
- "onUpdate:modelValue": g[0] || (g[0] = (r) => e.value = r),
77
+ "onUpdate:modelValue": y[0] || (y[0] = (r) => e.value = r),
84
78
  label: "Remark",
85
79
  "label-mark": "required",
86
- rules: [b(Ze)()]
80
+ rules: [b(Ie)()]
87
81
  }, null, 8, ["modelValue", "rules"]),
88
- o("div", rt, [
82
+ n("div", rt, [
89
83
  A(R, {
90
84
  label: "Cancel",
91
85
  variant: "tertiary",
92
- onClick: g[1] || (g[1] = (r) => m.onCancel())
86
+ onClick: y[1] || (y[1] = (r) => m.onCancel())
93
87
  }),
94
88
  A(R, {
95
89
  label: m.action == b(K).enum.approveDraft ? "Approve" : "Reject",
@@ -103,31 +97,31 @@ const Fe = Ve((a, c) => {
103
97
  }, 8, ["disabled"]);
104
98
  };
105
99
  }
106
- }), lt = ne(0);
100
+ }), lt = oe(0);
107
101
  function $e(a) {
108
102
  const c = a.measurementsAmounts.groupBy((i) => i.measurement.id), e = a.sku.unit.measurements.reduce((i, d) => {
109
- var m, g;
110
- const v = ((g = (m = c.get(d.id)) == null ? void 0 : m[0]) == null ? void 0 : g.amount) ?? lt, u = ge(d.conversion, v);
103
+ var m, y;
104
+ const v = ((y = (m = c.get(d.id)) == null ? void 0 : m[0]) == null ? void 0 : y.amount) ?? lt, u = ve(d.conversion, v);
111
105
  return i + +k(u);
112
106
  }, +k(a.baseAmount));
113
- return We(e, a.baseAmount.precision);
107
+ return Le(e, a.baseAmount.precision);
114
108
  }
115
- const ct = ne(0), it = ne(100);
109
+ const ct = oe(0), it = oe(100);
116
110
  function ut(a, c) {
117
- const e = $e(a), i = Ce(e, c), d = c.amount === 0 ? null : je(i, c), v = d ? ge(d, it) : null;
111
+ const e = $e(a), i = Ae(e, c), d = c.amount === 0 ? null : _e(i, c), v = d ? ve(d, it) : null;
118
112
  return {
119
113
  code: a.sku.code,
120
114
  name: a.sku.name,
121
115
  baseUnit: a.sku.unit.abbrev,
122
116
  baseUnitAmount: +k(a.baseAmount),
123
117
  ...a.measurementsAmounts.filter((m) => Re(m.measurement)).reduce(
124
- (m, g, j) => (m[`measurementAbbrev${j}`] = `(${g.measurement.abbrev}) × ${k(g.measurement.conversion)}`, m[`measurementAmount${j}`] = +k(g.amount), m),
118
+ (m, y, j) => (m[`measurementAbbrev${j}`] = `(${y.measurement.abbrev}) × ${k(y.measurement.conversion)}`, m[`measurementAmount${j}`] = +k(y.amount), m),
125
119
  {}
126
120
  ),
127
121
  systemBalance: +k(c),
128
122
  physicalBalance: +k(e),
129
123
  adjustedAmount: +k(i),
130
- adjustedDiffPercentage: v ? +k(Se(v, 2)) : null
124
+ adjustedDiffPercentage: v ? +k(we(v, 2)) : null
131
125
  };
132
126
  }
133
127
  function Re(a) {
@@ -183,15 +177,15 @@ function mt(a) {
183
177
  ];
184
178
  }
185
179
  function ft(a, c) {
186
- var r, s, p, M, T, C, L;
180
+ var r, s, p, M, T, C, I;
187
181
  const e = c.groupBy(
188
- (y) => y.id,
189
- (y) => y.balance
190
- ), i = a.items.map((y) => {
182
+ (g) => g.id,
183
+ (g) => g.balance
184
+ ), i = a.items.map((g) => {
191
185
  var Z;
192
- const S = ((Z = e.get(y.sku._id)) == null ? void 0 : Z[0]) ?? ct;
193
- return ut(y, S);
194
- }), d = dt(a.items), u = Ee().currentBusiness.value, m = mt(d), g = [
186
+ const S = ((Z = e.get(g.sku._id)) == null ? void 0 : Z[0]) ?? ct;
187
+ return ut(g, S);
188
+ }), d = dt(a.items), u = We().currentBusiness.value, m = mt(d), y = [
195
189
  ["Business name:", u == null ? void 0 : u.name],
196
190
  ["Business ID:", u == null ? void 0 : u._id],
197
191
  ["Menu version", u == null ? void 0 : u.menuVersion],
@@ -210,27 +204,27 @@ function ft(a, c) {
210
204
  ],
211
205
  [
212
206
  "Action remark",
213
- a.approvedAt ? a.approveRemark : a.rejectionHistory ? new Date((L = a.rejectionHistory[0]) == null ? void 0 : L.rejectRemark) : ""
207
+ a.approvedAt ? a.approveRemark : a.rejectionHistory ? new Date((I = a.rejectionHistory[0]) == null ? void 0 : I.rejectRemark) : ""
214
208
  ],
215
209
  [],
216
- m.map((y) => y.name),
217
- ...i.map((y) => m.map((S) => y[S.id]))
218
- ], j = m.map((y) => `system:${y.id}`), R = Je(g, j), $ = `[${u == null ? void 0 : u.name}] closing draft (${Xe(new Date(a.updatedAt))}).xlsx`;
219
- return Qe(R, $), $;
210
+ m.map((g) => g.name),
211
+ ...i.map((g) => m.map((S) => g[S.id]))
212
+ ], j = m.map((g) => `system:${g.id}`), R = tt(y, j), $ = `[${u == null ? void 0 : u.name}] closing draft (${Ee(new Date(a.updatedAt))}).xlsx`;
213
+ return at(R, $), $;
220
214
  }
221
- const de = ke(
215
+ const de = Se(
222
216
  "closingDraftActions",
223
217
  function() {
224
- const c = Ne(), e = pe(), i = _e(), d = Be(), v = E(!1), u = E();
218
+ const c = Je(), e = ye(), i = ke(), d = Be(), v = E(!1), u = E();
225
219
  function m(s) {
226
220
  const p = {
227
221
  draft: s
228
222
  };
229
223
  u.value = p, v.value = !0;
230
224
  }
231
- async function g(s) {
225
+ async function y(s) {
232
226
  var M;
233
- if (s.status === oe.enum.COMPLETED) {
227
+ if (s.status === ne.enum.COMPLETED) {
234
228
  const T = s.closingId;
235
229
  if (!T)
236
230
  return e.open({
@@ -249,7 +243,7 @@ const de = ke(
249
243
  p || (e.open({
250
244
  title: "Exporting",
251
245
  message: "Fetching data..."
252
- }), p = await g(s)), ft(s, p);
246
+ }), p = await y(s)), ft(s, p);
253
247
  }
254
248
  function R(s, p) {
255
249
  c.open({
@@ -305,8 +299,8 @@ function Te(a) {
305
299
  return "fm-status-badge-complete";
306
300
  }
307
301
  }
308
- const pt = ke("closingTable", function() {
309
- const { t: c } = Ae(), e = de(), i = E(new Array()), d = E(!1), v = ve(), u = Fe();
302
+ const pt = Se("closingTable", function() {
303
+ const { t: c } = je(), e = de(), i = E(new Array()), d = E(!1), v = pe(), u = Fe();
310
304
  async function m() {
311
305
  if (i.value = [], !!v._currentLocation) {
312
306
  d.value = !0;
@@ -320,7 +314,7 @@ const pt = ke("closingTable", function() {
320
314
  }
321
315
  }
322
316
  }
323
- async function g(r) {
317
+ async function y(r) {
324
318
  if (!i.value.find((s) => s._id) && v._currentLocation) {
325
319
  d.value = !0;
326
320
  try {
@@ -340,10 +334,10 @@ const pt = ke("closingTable", function() {
340
334
  e.closeDraftDialog(), m();
341
335
  }
342
336
  function R(r, s) {
343
- switch (s = Ye(s), r) {
344
- case ie.Details:
337
+ switch (s = Ke(s), r) {
338
+ case ce.Details:
345
339
  return e.viewDraft(s);
346
- case ie.Export:
340
+ case ce.Export:
347
341
  return e.exportDraft(s);
348
342
  case K.enum.approveDraft:
349
343
  return e.approveDraft(s, j);
@@ -358,7 +352,7 @@ const pt = ke("closingTable", function() {
358
352
  accessorKey: "_id",
359
353
  header: () => c("inventory.closing.table.createdAt"),
360
354
  cell(r) {
361
- return at(`${r.getValue()}`);
355
+ return Ne(`${r.getValue()}`);
362
356
  },
363
357
  enableSorting: !0
364
358
  },
@@ -411,7 +405,7 @@ const pt = ke("closingTable", function() {
411
405
  {
412
406
  class: ["fm-status-badge", Te(p)]
413
407
  },
414
- we(p)
408
+ Ce(p)
415
409
  )
416
410
  );
417
411
  }
@@ -420,8 +414,8 @@ const pt = ke("closingTable", function() {
420
414
  id: "action",
421
415
  cell(r) {
422
416
  const s = r.row.original, p = [
423
- be[ie.Details],
424
- be[ie.Export]
417
+ be[ce.Details],
418
+ be[ce.Export]
425
419
  ], M = [
426
420
  {
427
421
  translationKey: "inventory.closing.draft.approveDraft",
@@ -434,8 +428,8 @@ const pt = ke("closingTable", function() {
434
428
  value: K.enum.rejectDraft
435
429
  }
436
430
  ];
437
- return et(
438
- [...p, ...s.status === oe.enum.DRAFT ? M : []],
431
+ return Oe(
432
+ [...p, ...s.status === ne.enum.DRAFT ? M : []],
439
433
  (T) => R(T, s)
440
434
  );
441
435
  },
@@ -450,9 +444,9 @@ const pt = ke("closingTable", function() {
450
444
  drafts: i,
451
445
  loading: d,
452
446
  fetchDrafts: m,
453
- loadDraft: g
447
+ loadDraft: y
454
448
  };
455
- }), vt = { class: "w-full flex flex-col gap-32" }, gt = { class: "flex justify-between" }, yt = { class: "flex" }, bt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ht = { class: "flex gap-1" }, xt = { class: "fm-typo-en-body-lg-600" }, Dt = { class: "flex flex-col gap-16" }, At = { class: "flex" }, _t = { key: 0 }, wt = {
449
+ }), vt = { class: "w-full flex flex-col gap-32" }, yt = { class: "flex justify-between" }, gt = { class: "flex" }, bt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ht = { class: "flex gap-1" }, xt = { class: "fm-typo-en-body-lg-600" }, Dt = { class: "flex flex-col gap-16" }, At = { class: "flex" }, _t = { key: 0 }, wt = {
456
450
  key: 0,
457
451
  class: "w-full flex flex-col items-center"
458
452
  }, kt = { class: "flex items-center gap-8" }, Ct = {
@@ -473,10 +467,10 @@ const pt = ke("closingTable", function() {
473
467
  }, Tt = { class: "flex-1 flex flex-col items-center" }, Mt = { class: "flex-1 flex flex-col items-center" }, Pt = {
474
468
  class: "py-12 flex flex-col gap-4",
475
469
  name: "received-at header"
476
- }, Ut = { class: "fm-typo-en-body-lg-400" }, Ht = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, It = { class: "flex gap-12 content-stretch" }, Lt = {
470
+ }, Ut = { class: "fm-typo-en-body-lg-400" }, Ht = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, zt = { class: "flex gap-12 content-stretch" }, It = {
477
471
  class: "flex flex-col w-24",
478
472
  name: "circles"
479
- }, zt = { class: "flex-1 flex flex-col items-center" }, Et = {
473
+ }, Lt = { class: "flex-1 flex flex-col items-center" }, Et = {
480
474
  class: "py-12 flex flex-col gap-4 flex-1",
481
475
  name: "delivery details"
482
476
  }, Nt = { class: "flex flex-col gap-8" }, Ot = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Kt = { class: "flex flex-col gap-4" }, Vt = { class: "flex gap-8" }, Yt = /* @__PURE__ */ fe({
@@ -487,24 +481,24 @@ const pt = ke("closingTable", function() {
487
481
  },
488
482
  emits: ["submitted"],
489
483
  setup(a, { emit: c }) {
490
- const e = a, i = Be(), d = de(), v = Oe(e, "show"), u = E(!1), m = E(new Array()), g = _e(), j = pe(), R = Ge(), $ = c, r = U(() => {
484
+ const e = a, i = Be(), d = de(), v = Qe(e, "show"), u = E(!1), m = E(new Array()), y = ke(), j = ye(), R = Ve(), $ = c, r = U(() => {
491
485
  var t;
492
- const n = ((t = e.draft) == null ? void 0 : t.items.map((f) => f.sku)) ?? [];
493
- return n.sort((f, l) => f.code.localeCompare(l.code)), n;
486
+ const o = ((t = e.draft) == null ? void 0 : t.items.map((f) => f.sku)) ?? [];
487
+ return o.sort((f, l) => f.code.localeCompare(l.code)), o;
494
488
  });
495
489
  Me(M), Pe(
496
490
  () => e.show,
497
- (n) => {
498
- n && (z.value = Q[0], M());
491
+ (o) => {
492
+ o && (L.value = Q[0], M());
499
493
  }
500
494
  );
501
- const s = ne(0), p = ne(100);
495
+ const s = oe(0), p = oe(100);
502
496
  async function M() {
503
497
  var t, f, l;
504
498
  u.value = !0;
505
- const n = ((t = e.draft) == null ? void 0 : t.status) === oe.enum.COMPLETED;
499
+ const o = ((t = e.draft) == null ? void 0 : t.status) === ne.enum.COMPLETED;
506
500
  try {
507
- if (await R.init(), n) {
501
+ if (await R.init(), o) {
508
502
  const h = e.draft.closingId;
509
503
  if (!h) {
510
504
  j.open({
@@ -516,7 +510,7 @@ const pt = ke("closingTable", function() {
516
510
  });
517
511
  return;
518
512
  }
519
- const x = await g.getClosingById(h);
513
+ const x = await y.getClosingById(h);
520
514
  m.value = (x == null ? void 0 : x.skus) ?? [];
521
515
  } else
522
516
  await i.readStockBalance(), m.value = ((l = i.stockBalance) == null ? void 0 : l.skus) ?? [];
@@ -532,20 +526,20 @@ const pt = ke("closingTable", function() {
532
526
  }
533
527
  const T = U(
534
528
  () => m.value.groupBy(
535
- (n) => n.id,
536
- (n) => n.balance
529
+ (o) => o.id,
530
+ (o) => o.balance
537
531
  )
538
532
  ), C = U(() => {
539
533
  var t;
540
534
  return (((t = e.draft) == null ? void 0 : t.items) ?? []).groupBy((f) => f.sku._id);
541
535
  });
542
- function L(n) {
536
+ function I(o) {
543
537
  return O(
544
- ce.FmTooltip,
538
+ ue.FmTooltip,
545
539
  { zIndex: 51, placement: "left", class: "w-full flex justify-end" },
546
540
  {
547
541
  default() {
548
- return n;
542
+ return o;
549
543
  },
550
544
  content() {
551
545
  return "Differences are calculated using this formula: (Adjusted / System) × 100%";
@@ -553,8 +547,8 @@ const pt = ke("closingTable", function() {
553
547
  }
554
548
  );
555
549
  }
556
- const y = U(() => {
557
- const n = r.value.reduce((f, l) => Math.max(
550
+ const g = U(() => {
551
+ const o = r.value.reduce((f, l) => Math.max(
558
552
  f,
559
553
  l.unit.measurements.filter((h) => !h.name.toLocaleLowerCase().includes("inactive")).length
560
554
  ), 0);
@@ -574,7 +568,7 @@ const pt = ke("closingTable", function() {
574
568
  {
575
569
  id: "baseUnitAmount",
576
570
  accessorKey: "baseUnitAmount",
577
- header: () => L("Base unit amount"),
571
+ header: () => I("Base unit amount"),
578
572
  size: 200,
579
573
  meta: {
580
574
  textAlign: "right"
@@ -586,13 +580,13 @@ const pt = ke("closingTable", function() {
586
580
  header: () => "Base unit",
587
581
  size: 200
588
582
  },
589
- ...Array.from({ length: n }).flatMap((f, l) => {
583
+ ...Array.from({ length: o }).flatMap((f, l) => {
590
584
  const h = `measurementAbbrev${l}`, x = `measurementAmount${l}`;
591
585
  return [
592
586
  {
593
587
  id: x,
594
588
  accessorKey: x,
595
- header: () => L(`UOM amount ${l + 1}`),
589
+ header: () => I(`UOM amount ${l + 1}`),
596
590
  size: 200,
597
591
  meta: {
598
592
  textAlign: "right"
@@ -609,7 +603,7 @@ const pt = ke("closingTable", function() {
609
603
  {
610
604
  id: "physicalBalance",
611
605
  accessorKey: "physicalBalance",
612
- header: () => L("Total balance"),
606
+ header: () => I("Total balance"),
613
607
  size: 200,
614
608
  meta: {
615
609
  textAlign: "right"
@@ -618,7 +612,7 @@ const pt = ke("closingTable", function() {
618
612
  {
619
613
  id: "systemBalance",
620
614
  accessorKey: "systemBalance",
621
- header: () => L("System balance"),
615
+ header: () => I("System balance"),
622
616
  size: 200,
623
617
  meta: {
624
618
  textAlign: "right"
@@ -627,7 +621,7 @@ const pt = ke("closingTable", function() {
627
621
  {
628
622
  id: "adjustedAmount",
629
623
  accessorKey: "adjustedAmount",
630
- header: () => L("Adjusted amount"),
624
+ header: () => I("Adjusted amount"),
631
625
  size: 200,
632
626
  meta: {
633
627
  textAlign: "right"
@@ -637,13 +631,13 @@ const pt = ke("closingTable", function() {
637
631
  id: "adjustedDiffPercentage",
638
632
  accessorKey: "adjustedDiffPercentage",
639
633
  header: () => O(
640
- ce.FmTooltip,
634
+ ue.FmTooltip,
641
635
  { zIndex: 51, placement: "left", class: "w-full flex justify-end" },
642
636
  {
643
637
  default() {
644
638
  return O("div", { class: "flex items-center gap-4" }, [
645
639
  "Diff (%)",
646
- O(ce.FmIcon, { name: "info", color: "neutral-gray-400", size: "sm" })
640
+ O(ue.FmIcon, { name: "info", color: "neutral-gray-400", size: "sm" })
647
641
  ]);
648
642
  },
649
643
  content() {
@@ -660,7 +654,7 @@ const pt = ke("closingTable", function() {
660
654
  return O("div", { class: "flex items-center gap-4 justify-end" }, ["0.00"]);
661
655
  const x = l > 0;
662
656
  return O("div", { class: "flex items-center gap-4 justify-end" }, [
663
- O(ce.FmIcon, {
657
+ O(ue.FmIcon, {
664
658
  name: x ? "arrow_drop_up" : "arrow_drop_down",
665
659
  color: x ? "system-success-300" : "system-error-300",
666
660
  size: "md"
@@ -673,36 +667,36 @@ const pt = ke("closingTable", function() {
673
667
  }
674
668
  }
675
669
  ];
676
- }), S = U(() => y.value.map((n) => n.size ?? 0).reduce((n, t) => n + t)), Z = U(() => r.value.map((n) => {
670
+ }), S = U(() => g.value.map((o) => o.size ?? 0).reduce((o, t) => o + t)), Z = U(() => r.value.map((o) => {
677
671
  var H, W;
678
- const t = (H = C.value.get(n._id)) == null ? void 0 : H[0], f = ((W = T.value.get(n._id)) == null ? void 0 : W[0]) ?? s;
672
+ const t = (H = C.value.get(o._id)) == null ? void 0 : H[0], f = ((W = T.value.get(o._id)) == null ? void 0 : W[0]) ?? s;
679
673
  if (!t)
680
674
  return {
681
- code: n.code,
682
- name: n.name,
683
- baseUnit: n.unit.abbrev,
675
+ code: o.code,
676
+ name: o.name,
677
+ baseUnit: o.unit.abbrev,
684
678
  baseUnitAmount: 0,
685
679
  systemBalance: +k(f),
686
680
  physicalBalance: 0,
687
681
  adjustedAmount: -+k(f),
688
682
  adjustedDiffPercentage: -100
689
683
  };
690
- const l = $e(t), h = Ce(l, f), x = f.amount === 0 ? null : je(h, f), V = x ? ge(x, p) : null;
684
+ const l = $e(t), h = Ae(l, f), x = f.amount === 0 ? null : _e(h, f), V = x ? ve(x, p) : null;
691
685
  return {
692
- code: n.code,
693
- name: n.name,
694
- baseUnit: n.unit.abbrev,
686
+ code: o.code,
687
+ name: o.name,
688
+ baseUnit: o.unit.abbrev,
695
689
  baseUnitAmount: +k(t.baseAmount),
696
690
  ...t.measurementsAmounts.filter((D) => !D.measurement.name.toLocaleLowerCase().includes("inactive")).reduce((D, w, B) => (D[`measurementAbbrev${B}`] = `(${w.measurement.abbrev}) × ${k(w.measurement.conversion)}`, D[`measurementAmount${B}`] = +k(w.amount), D), {}),
697
691
  systemBalance: +k(f),
698
692
  physicalBalance: +k(l),
699
693
  adjustedAmount: +k(h),
700
- adjustedDiffPercentage: V ? +k(Se(V, 2)) : null
694
+ adjustedDiffPercentage: V ? +k(we(V, 2)) : null
701
695
  };
702
696
  })), se = U(() => {
703
697
  var t, f;
704
698
  if (!e.draft) return [];
705
- const n = e.draft.approvedAt ? {
699
+ const o = e.draft.approvedAt ? {
706
700
  action: `Approve at ${G(e.draft.approvedAt)}`,
707
701
  // actionAt: props.draft.approvedAt,
708
702
  actionBy: e.draft.approvedBy,
@@ -734,17 +728,17 @@ const pt = ke("closingTable", function() {
734
728
  label: "Effective at",
735
729
  value: G(e.draft.effectiveAt ?? e.draft.updatedAt)
736
730
  },
737
- n ? {
731
+ o ? {
738
732
  label: "Last action",
739
- value: n.action
733
+ value: o.action
740
734
  } : null,
741
- n && n.actionBy ? {
735
+ o && o.actionBy ? {
742
736
  label: "Last action by",
743
- value: (f = n.actionBy) == null ? void 0 : f.name
737
+ value: (f = o.actionBy) == null ? void 0 : f.name
744
738
  } : null,
745
- n && n.remark ? {
739
+ o && o.remark ? {
746
740
  label: "Action remark",
747
- value: n.remark
741
+ value: o.remark
748
742
  } : null
749
743
  ].filter((l) => l).map((l) => l);
750
744
  }), Q = [
@@ -756,7 +750,7 @@ const pt = ke("closingTable", function() {
756
750
  label: "Action history",
757
751
  value: "history"
758
752
  }
759
- ], z = E(Q[0]), N = U(() => {
753
+ ], L = E(Q[0]), N = U(() => {
760
754
  var t, f, l, h;
761
755
  return [
762
756
  ...(((t = e.draft) == null ? void 0 : t.rejectionHistory) ?? []).map(
@@ -793,7 +787,7 @@ const pt = ke("closingTable", function() {
793
787
  ] : []
794
788
  ];
795
789
  });
796
- return (n, t) => {
790
+ return (o, t) => {
797
791
  const f = P("FmButtonGroup"), l = P("FmMenuDivider"), h = P("FmCard"), x = P("FmButton"), V = P("FmCircularProgress"), X = P("FmTable"), H = P("FmSpacer"), W = P("FmSideSheet");
798
792
  return _(), ae(W, {
799
793
  "dismiss-away": "",
@@ -805,13 +799,13 @@ const pt = ke("closingTable", function() {
805
799
  "side-sheet-footer": q(() => {
806
800
  var D, w;
807
801
  return [
808
- o("div", Vt, [
809
- ((D = e.draft) == null ? void 0 : D.status) === b(oe).enum.DRAFT ? (_(), ae(x, {
802
+ n("div", Vt, [
803
+ ((D = e.draft) == null ? void 0 : D.status) === b(ne).enum.DRAFT ? (_(), ae(x, {
810
804
  key: 0,
811
805
  label: "Approve",
812
806
  onClick: t[2] || (t[2] = () => e.draft && b(d).approveDraft(e.draft, () => $("submitted")))
813
807
  })) : ee("", !0),
814
- ((w = e.draft) == null ? void 0 : w.status) === b(oe).enum.DRAFT ? (_(), ae(x, {
808
+ ((w = e.draft) == null ? void 0 : w.status) === b(ne).enum.DRAFT ? (_(), ae(x, {
815
809
  key: 1,
816
810
  label: "Reject",
817
811
  variant: "destructive",
@@ -826,15 +820,15 @@ const pt = ke("closingTable", function() {
826
820
  ];
827
821
  }),
828
822
  default: q(() => [
829
- o("div", vt, [
830
- o("div", null, [
823
+ n("div", vt, [
824
+ n("div", null, [
831
825
  A(f, {
832
826
  items: Q,
833
- modelValue: z.value,
834
- "onUpdate:modelValue": t[0] || (t[0] = (D) => z.value = D)
827
+ modelValue: L.value,
828
+ "onUpdate:modelValue": t[0] || (t[0] = (D) => L.value = D)
835
829
  }, null, 8, ["modelValue"])
836
830
  ]),
837
- z.value.value === "overview" ? (_(), F(J, { key: 0 }, [
831
+ L.value.value === "overview" ? (_(), F(J, { key: 0 }, [
838
832
  A(h, {
839
833
  variant: "outlined",
840
834
  class: "flex flex-col gap-8 px-12 py-16"
@@ -842,12 +836,12 @@ const pt = ke("closingTable", function() {
842
836
  default: q(() => {
843
837
  var D, w;
844
838
  return [
845
- o("div", gt, [
846
- t[6] || (t[6] = o("div", { class: "fm-typo-en-body-lg-600" }, "Closing summary", -1)),
847
- o("div", yt, [
848
- o("div", {
849
- class: te(["fm-status-badge", b(Te)(((D = n.draft) == null ? void 0 : D.status) ?? "DRAFT")])
850
- }, I(b(we)(((w = n.draft) == null ? void 0 : w.status) ?? "")), 3)
839
+ n("div", yt, [
840
+ t[6] || (t[6] = n("div", { class: "fm-typo-en-body-lg-600" }, "Closing summary", -1)),
841
+ n("div", gt, [
842
+ n("div", {
843
+ class: te(["fm-status-badge", b(Te)(((D = o.draft) == null ? void 0 : D.status) ?? "DRAFT")])
844
+ }, z(b(Ce)(((w = o.draft) == null ? void 0 : w.status) ?? "")), 3)
851
845
  ])
852
846
  ]),
853
847
  A(l),
@@ -855,18 +849,18 @@ const pt = ke("closingTable", function() {
855
849
  class: "flex flex-col gap-4",
856
850
  key: Y
857
851
  }, [
858
- o("div", bt, [
859
- o("div", ht, I(B.label), 1)
852
+ n("div", bt, [
853
+ n("div", ht, z(B.label), 1)
860
854
  ]),
861
- o("div", xt, I(B.value), 1)
855
+ n("div", xt, z(B.value), 1)
862
856
  ]))), 128))
863
857
  ];
864
858
  }),
865
859
  _: 1
866
860
  }),
867
- o("div", Dt, [
868
- o("div", At, [
869
- t[7] || (t[7] = o("div", { class: "flex-1 fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, " Closing items ", -1)),
861
+ n("div", Dt, [
862
+ n("div", At, [
863
+ t[7] || (t[7] = n("div", { class: "flex-1 fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, " Closing items ", -1)),
870
864
  u.value ? ee("", !0) : (_(), F("div", _t, [
871
865
  A(x, {
872
866
  label: "Export data",
@@ -875,38 +869,38 @@ const pt = ke("closingTable", function() {
875
869
  "text-color": "primary",
876
870
  "bg-color": "transparent",
877
871
  "border-color": "primary",
878
- onClick: t[1] || (t[1] = (D) => n.draft ? b(d).exportDraft(n.draft, m.value) : null)
872
+ onClick: t[1] || (t[1] = (D) => o.draft ? b(d).exportDraft(o.draft, m.value) : null)
879
873
  })
880
874
  ]))
881
875
  ]),
882
876
  u.value ? (_(), F("div", wt, [
883
- t[9] || (t[9] = o("div", { class: "h-80" }, null, -1)),
884
- o("div", kt, [
885
- o("div", null, [
877
+ t[9] || (t[9] = n("div", { class: "h-80" }, null, -1)),
878
+ n("div", kt, [
879
+ n("div", null, [
886
880
  A(V, { size: "md" })
887
881
  ]),
888
- t[8] || (t[8] = o("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Fetching info... ", -1))
882
+ t[8] || (t[8] = n("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Fetching info... ", -1))
889
883
  ]),
890
- t[10] || (t[10] = o("div", { class: "h-80" }, null, -1))
884
+ t[10] || (t[10] = n("div", { class: "h-80" }, null, -1))
891
885
  ])) : (_(), F("div", Ct, [
892
- o("div", {
886
+ n("div", {
893
887
  style: De({ width: `${S.value}px` })
894
888
  }, [
895
889
  A(X, {
896
- "column-defs": y.value,
890
+ "column-defs": g.value,
897
891
  "row-data": Z.value
898
892
  }, null, 8, ["column-defs", "row-data"])
899
893
  ], 4)
900
894
  ]))
901
895
  ])
902
896
  ], 64)) : ee("", !0),
903
- z.value.value === "history" ? (_(), F("div", jt, [
897
+ L.value.value === "history" ? (_(), F("div", jt, [
904
898
  N.value.length ? (_(), F("div", Ft, [
905
899
  (_(!0), F(J, null, le(N.value, (D, w) => (_(), F(J, { key: w }, [
906
- o("div", $t, [
907
- o("div", Rt, [
908
- o("div", Tt, [
909
- o("div", {
900
+ n("div", $t, [
901
+ n("div", Rt, [
902
+ n("div", Tt, [
903
+ n("div", {
910
904
  class: te([
911
905
  {
912
906
  "bg-fm-color-primary": w !== 0,
@@ -916,9 +910,9 @@ const pt = ke("closingTable", function() {
916
910
  ])
917
911
  }, null, 2)
918
912
  ]),
919
- t[13] || (t[13] = o("div", { class: "h-24 w-24 bg-fm-color-primary rounded-full" }, null, -1)),
920
- o("div", Mt, [
921
- o("div", {
913
+ t[13] || (t[13] = n("div", { class: "h-24 w-24 bg-fm-color-primary rounded-full" }, null, -1)),
914
+ n("div", Mt, [
915
+ n("div", {
922
916
  class: te([
923
917
  {
924
918
  "bg-fm-color-primary": w < N.value.length - 1,
@@ -929,15 +923,15 @@ const pt = ke("closingTable", function() {
929
923
  }, null, 2)
930
924
  ])
931
925
  ]),
932
- o("div", Pt, [
933
- o("div", Ut, I(D.header), 1),
934
- o("div", Ht, I(D.date), 1)
926
+ n("div", Pt, [
927
+ n("div", Ut, z(D.header), 1),
928
+ n("div", Ht, z(D.date), 1)
935
929
  ])
936
930
  ]),
937
- o("div", It, [
938
- o("div", Lt, [
939
- o("div", zt, [
940
- o("div", {
931
+ n("div", zt, [
932
+ n("div", It, [
933
+ n("div", Lt, [
934
+ n("div", {
941
935
  class: te([
942
936
  {
943
937
  "bg-fm-color-primary": w < N.value.length - 1,
@@ -948,23 +942,23 @@ const pt = ke("closingTable", function() {
948
942
  }, null, 2)
949
943
  ])
950
944
  ]),
951
- o("div", Et, [
945
+ n("div", Et, [
952
946
  A(h, {
953
947
  variant: "outlined",
954
948
  class: "py-12 px-16"
955
949
  }, {
956
950
  default: q(() => [
957
- o("div", Nt, [
951
+ n("div", Nt, [
958
952
  (_(!0), F(J, null, le(D.info, (B, Y) => (_(), F("div", {
959
953
  key: Y,
960
954
  class: "flex flex-col gap-4"
961
955
  }, [
962
- o("div", Ot, I(B == null ? void 0 : B.label), 1),
963
- o("div", Kt, [
956
+ n("div", Ot, z(B == null ? void 0 : B.label), 1),
957
+ n("div", Kt, [
964
958
  (_(!0), F(J, null, le(B == null ? void 0 : B.values, (re, me) => (_(), F("div", {
965
959
  key: me,
966
960
  class: "fm-typo-en-body-lg-600"
967
- }, I(re), 1))), 128))
961
+ }, z(re), 1))), 128))
968
962
  ])
969
963
  ]))), 128))
970
964
  ])
@@ -976,14 +970,14 @@ const pt = ke("closingTable", function() {
976
970
  ], 64))), 128))
977
971
  ])) : (_(), F("div", St, [
978
972
  A(H),
979
- o("div", null, [
980
- o("img", {
981
- src: b(ot),
973
+ n("div", null, [
974
+ n("img", {
975
+ src: b(nt),
982
976
  alt: "List is empty"
983
977
  }, null, 8, Bt)
984
978
  ]),
985
- t[11] || (t[11] = o("div", { class: "fm-typo-en-body-lg-600" }, I("No records found"), -1)),
986
- t[12] || (t[12] = o("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary px-16" }, I("You can track approval and rejection history here"), -1)),
979
+ t[11] || (t[11] = n("div", { class: "fm-typo-en-body-lg-600" }, z("No records found"), -1)),
980
+ t[12] || (t[12] = 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)),
987
981
  A(H),
988
982
  A(H)
989
983
  ]))
@@ -994,12 +988,12 @@ const pt = ke("closingTable", function() {
994
988
  }, 8, ["model-value"]);
995
989
  };
996
990
  }
997
- }), Gt = { class: "flex-1 flex flex-col gap-8" }, qt = { class: "flex flex-col" }, Zt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Wt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Jt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, Qt = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, fa = /* @__PURE__ */ fe({
991
+ }), Gt = { class: "flex-1 flex flex-col gap-8" }, qt = { class: "flex flex-col" }, Zt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Wt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Jt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, Qt = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, la = /* @__PURE__ */ fe({
998
992
  __name: "ClosingDraftView",
999
993
  setup(a) {
1000
- const { t: c } = Ae(), { viewDraft: e } = de(), { viewClosingDraftProps: i, viewClosingDraftShow: d } = qe(de()), v = ve(), u = pt(), m = Ie(), { breakpoints: g } = Ke();
994
+ const { t: c } = je(), { viewDraft: e } = de(), { viewClosingDraftProps: i, viewClosingDraftShow: d } = et(de()), v = pe(), u = pt(), m = Ye(), { breakpoints: y } = Xe();
1001
995
  v.watchLocation(u.fetchDrafts);
1002
- const j = U(() => u.loading), R = E(""), $ = U(() => g.value.xs || g.value.sm), r = U(() => $.value ? 10 : 20);
996
+ const j = U(() => u.loading), R = E(""), $ = U(() => y.value.xs || y.value.sm), r = U(() => $.value ? 10 : 20);
1003
997
  function s(T) {
1004
998
  switch (T) {
1005
999
  case "refresh":
@@ -1023,15 +1017,15 @@ const pt = ke("closingTable", function() {
1023
1017
  }
1024
1018
  ]);
1025
1019
  return (T, C) => {
1026
- const L = P("FmTable");
1020
+ const I = P("FmTable");
1027
1021
  return _(), F(J, null, [
1028
- A(Le, {
1022
+ A(Ge, {
1029
1023
  title: b(c)("inventory.closing.draft.title"),
1030
1024
  actions: M.value,
1031
1025
  "onClick:action": s
1032
1026
  }, {
1033
1027
  default: q(() => [
1034
- o("div", {
1028
+ n("div", {
1035
1029
  class: te([
1036
1030
  "flex flex-col gap-8 max-h-full",
1037
1031
  {
@@ -1040,56 +1034,56 @@ const pt = ke("closingTable", function() {
1040
1034
  }
1041
1035
  ])
1042
1036
  }, [
1043
- A(ze, {
1037
+ A(qe, {
1044
1038
  "change-location": "",
1045
1039
  searchable: "",
1046
1040
  search: R.value,
1047
- "onUpdate:search": C[0] || (C[0] = (y) => R.value = y)
1041
+ "onUpdate:search": C[0] || (C[0] = (g) => R.value = g)
1048
1042
  }, null, 8, ["search"]),
1049
- A(L, {
1043
+ A(I, {
1050
1044
  style: De(b(m).tableHeight),
1051
1045
  "column-defs": b(u).columnDefs,
1052
1046
  "row-data": b(u).drafts,
1053
1047
  "search-value": R.value,
1054
1048
  loading: j.value,
1055
- onRowClick: C[1] || (C[1] = (y) => b(e)(y.original)),
1049
+ onRowClick: C[1] || (C[1] = (g) => b(e)(g.original)),
1056
1050
  "page-size": r.value
1057
1051
  }, {
1058
- "list-row": q((y) => [
1059
- A(tt, {
1060
- row: y,
1052
+ "list-row": q((g) => [
1053
+ A(Ze, {
1054
+ row: g,
1061
1055
  onRowClick: (S) => b(e)(S)
1062
1056
  }, {
1063
1057
  default: q((S) => {
1064
- var Z, se, Q, z, N, n, t, f, l, h, x, V, X, H, W, D, w, B, Y, re;
1058
+ var Z, se, Q, L, N, o, t, f, l, h, x, V, X, H, W, D, w, B, Y, re;
1065
1059
  return [
1066
- o("div", Gt, [
1067
- o("div", qt, [
1068
- o("div", Zt, [
1069
- A(b(ue), {
1060
+ n("div", Gt, [
1061
+ n("div", qt, [
1062
+ n("div", Zt, [
1063
+ A(b(ie), {
1070
1064
  render: (Q = (se = (Z = S._id) == null ? void 0 : Z.column) == null ? void 0 : se.columnDef) == null ? void 0 : Q.cell,
1071
- props: (N = (z = S._id) == null ? void 0 : z.getContext) == null ? void 0 : N.call(z)
1065
+ props: (N = (L = S._id) == null ? void 0 : L.getContext) == null ? void 0 : N.call(L)
1072
1066
  }, null, 8, ["render", "props"])
1073
1067
  ]),
1074
- o("div", Wt, [
1075
- A(b(ue), {
1076
- render: (f = (t = (n = S.name) == null ? void 0 : n.column) == null ? void 0 : t.columnDef) == null ? void 0 : f.cell,
1068
+ n("div", Wt, [
1069
+ A(b(ie), {
1070
+ render: (f = (t = (o = S.name) == null ? void 0 : o.column) == null ? void 0 : t.columnDef) == null ? void 0 : f.cell,
1077
1071
  props: (h = (l = S.name) == null ? void 0 : l.getContext) == null ? void 0 : h.call(l)
1078
1072
  }, null, 8, ["render", "props"])
1079
1073
  ]),
1080
- o("div", Jt, I([
1081
- ...y.original.items.slice(0, 3).map((me) => me.sku.name),
1082
- ...y.original.items.length >= 3 ? [`and ${y.original.items.length - 3} more items`] : []
1074
+ n("div", Jt, z([
1075
+ ...g.original.items.slice(0, 3).map((me) => me.sku.name),
1076
+ ...g.original.items.length >= 3 ? [`and ${g.original.items.length - 3} more items`] : []
1083
1077
  ].join(", ")), 1),
1084
- o("div", Qt, [
1085
- A(b(ue), {
1078
+ n("div", Qt, [
1079
+ A(b(ie), {
1086
1080
  render: (X = (V = (x = S.ref) == null ? void 0 : x.column) == null ? void 0 : V.columnDef) == null ? void 0 : X.cell,
1087
1081
  props: (W = (H = S.ref) == null ? void 0 : H.getContext) == null ? void 0 : W.call(H)
1088
1082
  }, null, 8, ["render", "props"])
1089
1083
  ])
1090
1084
  ]),
1091
- o("div", null, [
1092
- A(b(ue), {
1085
+ n("div", null, [
1086
+ A(b(ie), {
1093
1087
  render: (B = (w = (D = S.status) == null ? void 0 : D.column) == null ? void 0 : w.columnDef) == null ? void 0 : B.cell,
1094
1088
  props: (re = (Y = S.status) == null ? void 0 : Y.getContext) == null ? void 0 : re.call(Y)
1095
1089
  }, null, 8, ["render", "props"])
@@ -1109,7 +1103,7 @@ const pt = ke("closingTable", function() {
1109
1103
  (_(), ae(Ue, { to: "body" }, [
1110
1104
  A(Yt, He(b(i), {
1111
1105
  show: b(d),
1112
- "onUpdate:show": C[2] || (C[2] = (y) => xe(d) ? d.value = y : null),
1106
+ "onUpdate:show": C[2] || (C[2] = (g) => xe(d) ? d.value = g : null),
1113
1107
  onSubmitted: C[3] || (C[3] = () => (d.value = !1, b(u).fetchDrafts()))
1114
1108
  }), null, 16, ["show"])
1115
1109
  ]))
@@ -1118,5 +1112,5 @@ const pt = ke("closingTable", function() {
1118
1112
  }
1119
1113
  });
1120
1114
  export {
1121
- fa as default
1115
+ la as default
1122
1116
  };