@feedmepos/mf-inventory-portal 0.0.22-dev.43 → 0.0.22-dev.44

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 (38) hide show
  1. package/dist/ApprovalView-DJhk8ORX.js +140 -0
  2. package/dist/{BindingsDialog-CKjAs5mJ.js → BindingsDialog-CNY83IzG.js} +1 -1
  3. package/dist/{BindingsPicker-BAVZ-3dF.js → BindingsPicker-BCeGBlTl.js} +1 -1
  4. package/dist/{BindingsTable-qq8M9fzG.js → BindingsTable-DwN0rUr_.js} +1 -1
  5. package/dist/{ClosingTemplateView-DOLuHmy8.js → ClosingTemplateView-BE1JMBGd.js} +342 -349
  6. package/dist/{FmDroppableField-BBpVEZs4.js → FmDroppableField-DeZRIGOb.js} +13 -13
  7. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-ChRPq-Ok.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CptHxbFO.js} +3 -3
  8. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BGYVXLcj.js +435 -0
  9. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DrL5a2Pn.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-C0liaZ9Y.js} +1 -1
  10. package/dist/{IngredientsView-m5K8MlM2.js → IngredientsView-B6BPG_MN.js} +414 -417
  11. package/dist/{IntegrationView-BE5P68EJ.js → IntegrationView-CXurxj5t.js} +2 -2
  12. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-B8cCv--C.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-C4np_znK.js} +1 -1
  13. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CcM04Veu.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CvSRvT_i.js} +2 -2
  14. package/dist/{PurchaseOrderPrintPreview-D40E9qZt.js → PurchaseOrderPrintPreview-BYSkl_zL.js} +3 -3
  15. package/dist/{ReceiveRequestView-Ci7FgSjU.js → ReceiveRequestView-DWKEL17S.js} +31 -27
  16. package/dist/{RecipeView-Bp7iBiy7.js → RecipeView-DEZblbQT.js} +91 -88
  17. package/dist/{StockView-BzowFcFA.js → StockView-hijQ7wQL.js} +533 -525
  18. package/dist/{SupplierView-CbRnAb8G.js → SupplierView-B2xKGKCF.js} +776 -802
  19. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BMikyrhA.js → TransferDetails.vue_vue_type_script_setup_true_lang-CBwT8yGC.js} +5 -5
  20. package/dist/TransferTemplateView--2vvQWBW.js +1258 -0
  21. package/dist/{UnitView-B-058oRk.js → UnitView-B30FwZGg.js} +4 -4
  22. package/dist/{WarehouseView-RtU3sWKx.js → WarehouseView-BwbqpKwn.js} +14 -14
  23. package/dist/{app-By3PLx0q.js → app-DXZpbt33.js} +7334 -7251
  24. package/dist/app.js +1 -1
  25. package/dist/{decimal-CtriZ1S6.js → decimal-BVO6jH4l.js} +1 -1
  26. package/dist/{defineDeepModel-ClK3S9xx.js → defineDeepModel-DlkycC_t.js} +1 -1
  27. package/dist/{format-time-from-id-CGLKzJJO.js → format-time-from-id-Dhgv47T9.js} +1 -1
  28. package/dist/{format-unit-display-COeZSqdS.js → format-unit-display-D4D1b9F7.js} +15 -15
  29. package/dist/{supplier-BxBMThPQ.js → supplier-Beauc4QC.js} +1 -1
  30. package/dist/tsconfig.app.tsbuildinfo +1 -1
  31. package/dist/{use-template-enabled-locations-2-BIgPnzRW.js → use-template-enabled-locations-2-DbnvkOM9.js} +1 -1
  32. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +30 -0
  33. package/dist/{xlsx-X_0qJPDg.js → xlsx-DXqCVrb5.js} +1 -1
  34. package/dist/{xlsx.util-BOPzVbUa.js → xlsx.util-7VhQushh.js} +1 -1
  35. package/package.json +1 -1
  36. package/dist/ApprovalView-1ZKaZJ2Z.js +0 -128
  37. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BSxhRfE4.js +0 -359
  38. package/dist/TransferTemplateView-BwamiSyk.js +0 -1302
@@ -1,21 +1,21 @@
1
- import { ref as S, h as F, defineComponent as O, resolveComponent as M, openBlock as w, createElementBlock as C, createElementVNode as h, normalizeClass as G, createTextVNode as Pe, toDisplayString as $, unref as p, createCommentVNode as W, createVNode as k, withCtx as I, Fragment as j, renderList as q, computed as A, watch as Ee, createSlots as We, createBlock as N, isRef as qe, normalizeStyle as Xe, Teleport as Qe, normalizeProps as Ze, guardReactiveProps as et, mergeProps as tt } from "vue";
2
- import { u as nt, _ as ot, a as st } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BSxhRfE4.js";
3
- import { useCoreStore as ie, useI18n as B } from "@feedmepos/mf-common";
4
- import { useDialogChild as lt, useSnackbar as te, useDialog as ce, FmButtonVariant as Ie, components as L, useProxiedModel as at, useBreakpoints as rt } from "@feedmepos/ui-library";
5
- import { defineStore as Ue, storeToRefs as Ve } from "pinia";
6
- import { D as Re, R as z, F as H } from "./row-action.enum-PMKMRrZR.js";
7
- import { n as it, i as me, c as Ne, f as ct, u as ue, h as mt, R as ut, A as dt, y as pt, X as ft, Y as le } from "./app-By3PLx0q.js";
8
- import { a as ae, b as Be, d as Le, s as ze, r as gt } from "./xlsx.util-BOPzVbUa.js";
9
- import { F as vt } from "./FmDroppableField-BBpVEZs4.js";
10
- import { c as yt, F as K, _ as He } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
11
- import { f as ht } from "./format-time-from-id-CGLKzJJO.js";
1
+ import { ref as M, h as S, defineComponent as H, resolveComponent as R, openBlock as w, createElementBlock as C, createElementVNode as h, normalizeClass as O, createTextVNode as Re, toDisplayString as $, unref as p, createCommentVNode as K, createVNode as k, withCtx as F, Fragment as z, renderList as G, computed as A, watch as Fe, createSlots as je, createBlock as U, isRef as Oe, normalizeStyle as Ye, Teleport as Ke, normalizeProps as Ge, guardReactiveProps as Je, mergeProps as We } from "vue";
2
+ import { u as qe, _ as Xe, a as Qe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BGYVXLcj.js";
3
+ import { useCoreStore as le, useI18n as N } from "@feedmepos/mf-common";
4
+ import { useDialogChild as Ze, useSnackbar as Q, useDialog as ae, FmButtonVariant as Me, components as B, useProxiedModel as et, useBreakpoints as tt } from "@feedmepos/ui-library";
5
+ import { defineStore as Pe, storeToRefs as Ae } from "pinia";
6
+ import { D as Se, R as V, F as L } from "./row-action.enum-PMKMRrZR.js";
7
+ import { n as nt, i as re, c as Ee, f as ot, u as ie, h as st, R as lt, A as at, y as rt, W as it, X as ne } from "./app-DXZpbt33.js";
8
+ import { a as oe, b as Ue, d as Ve, s as Ne, r as ct } from "./xlsx.util-7VhQushh.js";
9
+ import { F as mt } from "./FmDroppableField-DeZRIGOb.js";
10
+ import { c as ut, F as j, _ as Be } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
11
+ import { f as dt } from "./format-time-from-id-Dhgv47T9.js";
12
12
  import "vue-router";
13
- import { d as bt } from "./defineDeepModel-ClK3S9xx.js";
14
- import { u as _t } from "./use-template-enabled-locations-2-BIgPnzRW.js";
15
- const ne = it((r, s) => {
13
+ import { d as pt } from "./defineDeepModel-DlkycC_t.js";
14
+ import { u as ft } from "./use-template-enabled-locations-2-DbnvkOM9.js";
15
+ const Z = nt((r, s) => {
16
16
  function o() {
17
17
  var e;
18
- return `business_${((e = ie().currentBusiness.value) == null ? void 0 : e._id) ?? ""}`;
18
+ return `business_${((e = le().currentBusiness.value) == null ? void 0 : e._id) ?? ""}`;
19
19
  }
20
20
  return {
21
21
  async getRecentPublishingJob() {
@@ -51,10 +51,10 @@ const ne = it((r, s) => {
51
51
  return s.post(e, n);
52
52
  }
53
53
  };
54
- }), oe = Ue(
54
+ }), ee = Pe(
55
55
  "closingTable",
56
56
  function() {
57
- const { t: s } = B(), o = re(), n = S({}), t = S(new Array()), e = S(!1), f = me(), i = ne();
57
+ const { t: s } = N(), o = se(), n = M({}), t = M(new Array()), e = M(!1), f = re(), i = Z();
58
58
  async function m() {
59
59
  if (t.value = [], !!f._currentLocation) {
60
60
  e.value = !0;
@@ -88,12 +88,12 @@ const ne = it((r, s) => {
88
88
  }
89
89
  }
90
90
  function u(_, y) {
91
- switch (y = Ne(y), _) {
92
- case z.Details:
91
+ switch (y = Ee(y), _) {
92
+ case V.Details:
93
93
  return o.viewTemplate(y);
94
- case z.Edit:
94
+ case V.Edit:
95
95
  return o.updateTemplate(y);
96
- case z.Delete:
96
+ case V.Delete:
97
97
  return o.deleteTemplate(y, e, m);
98
98
  }
99
99
  }
@@ -104,7 +104,7 @@ const ne = it((r, s) => {
104
104
  accessorKey: "_id",
105
105
  header: () => s("inventory.closing.table.createdAt"),
106
106
  cell(_) {
107
- return ht(`${_.getValue()}`);
107
+ return dt(`${_.getValue()}`);
108
108
  },
109
109
  enableSorting: !0
110
110
  },
@@ -154,12 +154,12 @@ const ne = it((r, s) => {
154
154
  cell(_) {
155
155
  var T;
156
156
  const y = _.row.original, a = y._rev, l = (T = n.value.publishedRevs) == null ? void 0 : T[y._id], v = a === l;
157
- return F(
157
+ return S(
158
158
  "div",
159
159
  {
160
160
  class: "flex"
161
161
  },
162
- F(
162
+ S(
163
163
  "div",
164
164
  {
165
165
  class: [
@@ -176,10 +176,10 @@ const ne = it((r, s) => {
176
176
  id: "action",
177
177
  cell(_) {
178
178
  const y = _.row.original, a = [
179
- Re[z.Edit],
180
- Re[z.Delete]
179
+ Se[V.Edit],
180
+ Se[V.Delete]
181
181
  ];
182
- return yt(a, (l) => u(l, y));
182
+ return ut(a, (l) => u(l, y));
183
183
  },
184
184
  enableSorting: !1,
185
185
  size: 40,
@@ -197,8 +197,8 @@ const ne = it((r, s) => {
197
197
  };
198
198
  }
199
199
  );
200
- var de = /* @__PURE__ */ ((r) => (r.Ingredients = "Ingredients", r))(de || {});
201
- function je(r) {
200
+ var ce = /* @__PURE__ */ ((r) => (r.Ingredients = "Ingredients", r))(ce || {});
201
+ function Le(r) {
202
202
  const s = r.sku, o = new Set(r.disabledMeasurements);
203
203
  return [
204
204
  {
@@ -213,7 +213,7 @@ function je(r) {
213
213
  }))
214
214
  ];
215
215
  }
216
- function Oe() {
216
+ function ze() {
217
217
  return [
218
218
  {
219
219
  id: "code",
@@ -233,11 +233,11 @@ function Oe() {
233
233
  }
234
234
  ];
235
235
  }
236
- function xt(r) {
236
+ function gt(r) {
237
237
  var i;
238
- const o = ie().currentBusiness.value, t = (i = r.map((m) => {
238
+ const o = le().currentBusiness.value, t = (i = r.map((m) => {
239
239
  var a;
240
- const c = m.items.flatMap(je), u = Oe(), g = [
240
+ const c = m.items.flatMap(Le), u = ze(), g = [
241
241
  ["Template ID", m._id],
242
242
  ["Template name", m.name],
243
243
  ["Business name", o == null ? void 0 : o.name],
@@ -251,7 +251,7 @@ function xt(r) {
251
251
  [],
252
252
  u.map((l) => l.name),
253
253
  ...c.map((l) => u.map((v) => l[v.id]))
254
- ], _ = u.map((l) => `system:${l.id}`), y = ae(g, _);
254
+ ], _ = u.map((l) => `system:${l.id}`), y = oe(g, _);
255
255
  return { name: m.name, sheet: y };
256
256
  }).reduce(
257
257
  (m, c) => {
@@ -263,11 +263,11 @@ function xt(r) {
263
263
  sheets: {},
264
264
  sheetOccurence: {}
265
265
  }
266
- )) == null ? void 0 : i.sheets, e = `${o == null ? void 0 : o.name} closing templates (${ct(/* @__PURE__ */ new Date())}).xlsx`, f = Be(t);
267
- return Le(f, e), e;
266
+ )) == null ? void 0 : i.sheets, e = `${o == null ? void 0 : o.name} closing templates (${ot(/* @__PURE__ */ new Date())}).xlsx`, f = Ue(t);
267
+ return Ve(f, e), e;
268
268
  }
269
- function wt() {
270
- const r = ie(), s = ue(), o = je({
269
+ function vt() {
270
+ const r = le(), s = ie(), o = Le({
271
271
  sku: {
272
272
  unit: {
273
273
  _id: "",
@@ -280,7 +280,7 @@ function wt() {
280
280
  _id: "",
281
281
  name: "Sugar"
282
282
  }
283
- })[0], n = r.currentBusiness.value, t = Oe(), e = [
283
+ })[0], n = r.currentBusiness.value, t = ze(), e = [
284
284
  ["Template ID (leave empty to create new)", ""],
285
285
  ["Template Name", "New template"],
286
286
  ["Business name", n == null ? void 0 : n.name],
@@ -295,19 +295,19 @@ function wt() {
295
295
  [],
296
296
  t.map((g) => g.name),
297
297
  t.map((g) => o[g.id])
298
- ], f = t.map((g) => `system:${g.id}`), i = ae(e, f), m = ae(
298
+ ], f = t.map((g) => `system:${g.id}`), i = oe(e, f), m = oe(
299
299
  s.skus.flatMap((g) => [[g.code, g.name, g.unit.abbrev], ...g.unit.measurements.map((y) => ["", "", y.abbrev])]),
300
300
  ["Code", "Name", "Units", "Enabled (true/false)"]
301
- ), c = Be({
301
+ ), c = Ue({
302
302
  Template: i,
303
303
  Ingredients: m
304
304
  }), u = `${n == null ? void 0 : n.name} transfer templates import.xlsx`;
305
- return Le(c, u), u;
305
+ return Ve(c, u), u;
306
306
  }
307
- function kt(r) {
307
+ function yt(r) {
308
308
  if (!r.length || `${r[0]}`.toLocaleLowerCase() === "all")
309
309
  return [];
310
- const s = /(.*) \(((warehouse_|restaurant_).{24,})\)/, n = me().locationByDbName;
310
+ const s = /(.*) \(((warehouse_|restaurant_).{24,})\)/, n = re().locationByDbName;
311
311
  return r.map((t) => {
312
312
  const e = new Array(), f = t.trim(), i = s.exec(f);
313
313
  if (!i)
@@ -325,7 +325,7 @@ function kt(r) {
325
325
  });
326
326
  });
327
327
  }
328
- function Tt(r) {
328
+ function ht(r) {
329
329
  const [
330
330
  s,
331
331
  o,
@@ -335,7 +335,7 @@ function Tt(r) {
335
335
  f,
336
336
  i,
337
337
  m
338
- ] = ze(r);
338
+ ] = Ne(r);
339
339
  return {
340
340
  id: `${o[1] ?? ""}`.trim(),
341
341
  name: `${n[1] ?? ""}`.trim(),
@@ -343,7 +343,7 @@ function Tt(r) {
343
343
  reference: `${m[1] ?? ""}`.trim()
344
344
  };
345
345
  }
346
- function $t(r) {
346
+ function bt(r) {
347
347
  const [
348
348
  s,
349
349
  o,
@@ -356,7 +356,7 @@ function $t(r) {
356
356
  c,
357
357
  u,
358
358
  ...g
359
- ] = ze(r);
359
+ ] = Ne(r);
360
360
  if (!s || !s.length || s.some((v) => v.length && !v.startsWith("system:")))
361
361
  throw new Error("Missing meta header. Excel file does not come from the template.");
362
362
  const _ = s.map((v) => v.split(":")[1]), a = ["code", "name", "unit", "enabled"].filter((v) => !_.includes(v));
@@ -376,7 +376,7 @@ function $t(r) {
376
376
  };
377
377
  });
378
378
  }
379
- function Ct(r) {
379
+ function _t(r) {
380
380
  return r.reduce(
381
381
  (s, o) => {
382
382
  var e;
@@ -386,8 +386,8 @@ function Ct(r) {
386
386
  { result: new Array(), errors: new Array() }
387
387
  );
388
388
  }
389
- function Dt(r) {
390
- const s = r.parent.data, o = new Array(), t = ue().skuByCode[s.code ?? ""];
389
+ function xt(r) {
390
+ const s = r.parent.data, o = new Array(), t = ie().skuByCode[s.code ?? ""];
391
391
  if (!t)
392
392
  return o.push(`Cannot find ingredient of code ${s.code} ${s.name}`), { errors: o };
393
393
  const e = {
@@ -409,21 +409,21 @@ function Dt(r) {
409
409
  const f = new Set(e.disabledMeasurements);
410
410
  return f.has(t.unit._id) && e.sku.unit.measurements.every((i) => f.has(i.id)) && o.push(`Ingredient ${t.code} - ${t.name} must have at least one unit enabled.`), { errors: o, templateItem: e };
411
411
  }
412
- function St(r) {
412
+ function wt(r) {
413
413
  const s = r.SheetNames.filter(
414
- (e) => !Object.values(de).map(String).includes(e)
415
- ), n = oe().templates, t = mt(n, "_id");
414
+ (e) => !Object.values(ce).map(String).includes(e)
415
+ ), n = ee().templates, t = st(n, "_id");
416
416
  try {
417
417
  return s.reduce(
418
418
  (e, f) => {
419
- const i = new Array(), m = r.Sheets[f], c = Tt(m), u = kt(c.locations), g = u.filter((d) => d.location).map((d) => d.location);
419
+ const i = new Array(), m = r.Sheets[f], c = ht(m), u = yt(c.locations), g = u.filter((d) => d.location).map((d) => d.location);
420
420
  i.push(...u.flatMap((d) => d.errors));
421
- const _ = $t(m).filter(
421
+ const _ = bt(m).filter(
422
422
  (d) => d.data.code || d.data.unit
423
- ), y = Ct(_);
423
+ ), y = _t(_);
424
424
  i.push(...y.errors);
425
425
  const a = y.result.map(
426
- (d) => Dt(d)
426
+ (d) => xt(d)
427
427
  );
428
428
  i.push(...a.flatMap((d) => d.errors));
429
429
  const l = a.filter((d) => d.templateItem).map((d) => d.templateItem);
@@ -487,10 +487,10 @@ function St(r) {
487
487
  };
488
488
  }
489
489
  }
490
- const Mt = { class: "flex items-center gap-12 pl-8" }, Ft = { class: "flex flex-col" }, It = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary flex items-center gap-4" }, Rt = {
490
+ const kt = { class: "flex items-center gap-12 pl-8" }, Tt = { class: "flex flex-col" }, $t = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary flex items-center gap-4" }, Ct = {
491
491
  key: 0,
492
492
  class: "text-fm-color-typo-secondary fm-typo-en-body-sm-400"
493
- }, At = { key: 0 }, Ae = /* @__PURE__ */ O({
493
+ }, Dt = { key: 0 }, Ie = /* @__PURE__ */ H({
494
494
  __name: "ClosingTemplateImportItem",
495
495
  props: {
496
496
  type: {},
@@ -500,30 +500,30 @@ const Mt = { class: "flex items-center gap-12 pl-8" }, Ft = { class: "flex flex-
500
500
  errors: {}
501
501
  },
502
502
  setup(r) {
503
- const { t: s } = B();
503
+ const { t: s } = N();
504
504
  return (o, n) => {
505
505
  var f, i, m;
506
- const t = M("FmIcon"), e = M("FmTooltip");
507
- return w(), C("div", Mt, [
506
+ const t = R("FmIcon"), e = R("FmTooltip");
507
+ return w(), C("div", kt, [
508
508
  n[0] || (n[0] = h("div", null, "•", -1)),
509
- h("div", Ft, [
510
- h("div", It, [
509
+ h("div", Tt, [
510
+ h("div", $t, [
511
511
  h("div", {
512
- class: G({
512
+ class: O({
513
513
  "text-fm-color-system-error-300": o.errors.length
514
514
  })
515
515
  }, [
516
- Pe($(o.name) + " ", 1),
517
- o.type === "create" ? (w(), C("span", Rt, "(" + $(p(s)("inventory.closing.template.import.new")) + ")", 1)) : W("", !0)
516
+ Re($(o.name) + " ", 1),
517
+ o.type === "create" ? (w(), C("span", Ct, "(" + $(p(s)("inventory.closing.template.import.new")) + ")", 1)) : K("", !0)
518
518
  ], 2),
519
- o.errors.length ? (w(), C("div", At, [
519
+ o.errors.length ? (w(), C("div", Dt, [
520
520
  k(e, { "z-index": 50 }, {
521
- content: I(() => [
521
+ content: F(() => [
522
522
  h("ol", null, [
523
- (w(!0), C(j, null, q(o.errors, (c, u) => (w(), C("li", { key: u }, $(c), 1))), 128))
523
+ (w(!0), C(z, null, G(o.errors, (c, u) => (w(), C("li", { key: u }, $(c), 1))), 128))
524
524
  ])
525
525
  ]),
526
- default: I(() => [
526
+ default: F(() => [
527
527
  k(t, {
528
528
  name: "error",
529
529
  size: "sm",
@@ -532,10 +532,10 @@ const Mt = { class: "flex items-center gap-12 pl-8" }, Ft = { class: "flex flex-
532
532
  ]),
533
533
  _: 1
534
534
  })
535
- ])) : W("", !0)
535
+ ])) : K("", !0)
536
536
  ]),
537
537
  h("div", {
538
- class: G([
538
+ class: O([
539
539
  "fm-typo-en-body-sm-400",
540
540
  {
541
541
  "text-fm-color-system-error-200": o.errors.length,
@@ -547,42 +547,42 @@ const Mt = { class: "flex items-center gap-12 pl-8" }, Ft = { class: "flex flex-
547
547
  ]);
548
548
  };
549
549
  }
550
- }), Pt = { class: "flex flex-col gap-24" }, Et = { class: "fm-typo-en-body-md-400" }, Ut = {
550
+ }), Mt = { class: "flex flex-col gap-24" }, St = { class: "fm-typo-en-body-md-400" }, It = {
551
551
  key: 0,
552
552
  class: "flex items-center gap-8"
553
- }, Vt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Nt = { class: "flex flex-col gap-8" }, Bt = { class: "line-clamp-2 text-ellipsis break-all" }, Lt = {
553
+ }, Rt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ft = { class: "flex flex-col gap-8" }, Pt = { class: "line-clamp-2 text-ellipsis break-all" }, At = {
554
554
  key: 2,
555
555
  class: "shrink-0"
556
- }, zt = {
556
+ }, Et = {
557
557
  key: 0,
558
558
  class: "flex flex-col"
559
- }, Ht = { class: "text-fm-color-system-error-300 fm-typo-en-body-sm-400" }, jt = {
559
+ }, Ut = { class: "text-fm-color-system-error-300 fm-typo-en-body-sm-400" }, Vt = {
560
560
  key: 0,
561
561
  class: "max-h-[200px] overflow-y-auto flex flex-col gap-8"
562
- }, Ot = { class: "fm-typo-en-body-lg-600" }, Yt = /* @__PURE__ */ O({
562
+ }, Nt = { class: "fm-typo-en-body-lg-600" }, Bt = /* @__PURE__ */ H({
563
563
  __name: "ClosingTemplateImport",
564
564
  setup(r) {
565
- const s = S(null), o = lt(), n = te(), t = S(!1), e = S(!1), f = S(new Array()), i = S([]), m = S([]), c = A(
565
+ const s = M(null), o = Ze(), n = Q(), t = M(!1), e = M(!1), f = M(new Array()), i = M([]), m = M([]), c = A(
566
566
  () => !!f.value.length || i.value.some((y) => y.errors.length) || m.value.some((y) => y.errors.length)
567
567
  ), u = A(
568
568
  () => !!i.value.length || !!m.value.length
569
- ), { t: g } = B();
569
+ ), { t: g } = N();
570
570
  async function _(y) {
571
571
  f.value = [], i.value = [], m.value = [];
572
572
  try {
573
573
  t.value = !0;
574
574
  const [a] = await Promise.all([
575
- gt(y),
575
+ ct(y),
576
576
  // fake buffer
577
577
  new Promise((d) => setTimeout(d, 1e3))
578
578
  ]);
579
579
  if (!a.SheetNames.filter(
580
- (d) => !Object.values(de).map(String).includes(d)
580
+ (d) => !Object.values(ce).map(String).includes(d)
581
581
  ).find((d) => d)) {
582
582
  f.value.push(g("inventory.ingredient.import.fileError.noSheet"));
583
583
  return;
584
584
  }
585
- const T = St(a);
585
+ const T = wt(a);
586
586
  if (T.invalidExcel) {
587
587
  f.value.push(
588
588
  T.invalidExcelMessage ?? g("inventory.ingredient.import.fileError.invalidExcel")
@@ -607,23 +607,23 @@ const Mt = { class: "flex items-center gap-12 pl-8" }, Ft = { class: "flex flex-
607
607
  }), t.value = !1;
608
608
  }
609
609
  }
610
- return Ee(s, (y) => {
610
+ return Fe(s, (y) => {
611
611
  y && _(y);
612
612
  }), (y, a) => {
613
- const l = M("FmCircularProgress"), v = M("FmIcon"), T = M("FmButton");
614
- return w(), C("div", Pt, [
615
- h("div", Et, $(p(g)("inventory.closing.template.import.message")), 1),
616
- e.value ? (w(), C("div", Ut, [
613
+ const l = R("FmCircularProgress"), v = R("FmIcon"), T = R("FmButton");
614
+ return w(), C("div", Mt, [
615
+ h("div", St, $(p(g)("inventory.closing.template.import.message")), 1),
616
+ e.value ? (w(), C("div", It, [
617
617
  h("div", null, [
618
618
  k(l, {
619
619
  size: "md",
620
620
  color: "neutral-gray-200"
621
621
  })
622
622
  ]),
623
- h("div", Vt, $(p(g)("inventory.formField.loading")), 1)
624
- ])) : (w(), C(j, { key: 1 }, [
625
- k(vt, {
626
- class: G({
623
+ h("div", Rt, $(p(g)("inventory.formField.loading")), 1)
624
+ ])) : (w(), C(z, { key: 1 }, [
625
+ k(mt, {
626
+ class: O({
627
627
  "w-full": !0,
628
628
  "h-[200px]": !s.value
629
629
  }),
@@ -631,13 +631,13 @@ const Mt = { class: "flex items-center gap-12 pl-8" }, Ft = { class: "flex flex-
631
631
  onFileUpload: a[0] || (a[0] = (d) => s.value = d),
632
632
  label: p(g)("inventory.ingredient.import.uploadTemplate"),
633
633
  "button-label": p(g)("inventory.ingredient.import.selectFile")
634
- }, We({ _: 2 }, [
634
+ }, je({ _: 2 }, [
635
635
  s.value ? {
636
636
  name: "default",
637
- fn: I(({ openFileDialog: d }) => [
638
- h("div", Nt, [
637
+ fn: F(({ openFileDialog: d }) => [
638
+ h("div", Ft, [
639
639
  h("div", {
640
- class: G([
640
+ class: O([
641
641
  "fm-corner-radius-md p-16 flex items-center gap-16",
642
642
  {
643
643
  "border border-fm-color-neutral-gray-100": t.value,
@@ -646,18 +646,18 @@ const Mt = { class: "flex items-center gap-12 pl-8" }, Ft = { class: "flex flex-
646
646
  }
647
647
  ])
648
648
  }, [
649
- t.value ? (w(), N(l, {
649
+ t.value ? (w(), U(l, {
650
650
  key: 0,
651
651
  size: "md",
652
652
  color: "neutral-gray-200"
653
- })) : (w(), N(v, {
653
+ })) : (w(), U(v, {
654
654
  key: 1,
655
655
  name: c.value ? "error" : "attach_file",
656
656
  outline: "",
657
657
  color: c.value ? "system-error-300" : void 0
658
658
  }, null, 8, ["name", "color"])),
659
659
  h("div", {
660
- class: G([
660
+ class: O([
661
661
  "fm-typo-en-body-md-400 flex-1 h-[36px] flex items-center",
662
662
  {
663
663
  "text-fm-color-typo-disabled": t.value,
@@ -665,9 +665,9 @@ const Mt = { class: "flex items-center gap-12 pl-8" }, Ft = { class: "flex flex-
665
665
  }
666
666
  ])
667
667
  }, [
668
- h("div", Bt, $(s.value.name), 1)
668
+ h("div", Pt, $(s.value.name), 1)
669
669
  ], 2),
670
- t.value ? W("", !0) : (w(), C("div", Lt, [
670
+ t.value ? K("", !0) : (w(), C("div", At, [
671
671
  k(T, {
672
672
  label: p(g)("inventory.ingredient.import.replaceFile"),
673
673
  variant: c.value ? "destructive" : "secondary",
@@ -676,8 +676,8 @@ const Mt = { class: "flex items-center gap-12 pl-8" }, Ft = { class: "flex flex-
676
676
  }, null, 8, ["label", "variant", "prepend-icon", "onClick"])
677
677
  ]))
678
678
  ], 2),
679
- f.value.length ? (w(), C("div", zt, [
680
- (w(!0), C(j, null, q(f.value, (D, b) => (w(), C("div", {
679
+ f.value.length ? (w(), C("div", Et, [
680
+ (w(!0), C(z, null, G(f.value, (D, b) => (w(), C("div", {
681
681
  key: b,
682
682
  class: "flex gap-8 items-center"
683
683
  }, [
@@ -686,17 +686,17 @@ const Mt = { class: "flex items-center gap-12 pl-8" }, Ft = { class: "flex flex-
686
686
  size: "sm",
687
687
  color: "system-error-300"
688
688
  }),
689
- h("div", Ht, $(D), 1)
689
+ h("div", Ut, $(D), 1)
690
690
  ]))), 128))
691
- ])) : W("", !0)
691
+ ])) : K("", !0)
692
692
  ])
693
693
  ]),
694
694
  key: "0"
695
695
  } : void 0
696
696
  ]), 1032, ["class", "label", "button-label"]),
697
- u.value ? (w(), C("div", jt, [
698
- h("div", Ot, $(p(g)("inventory.ingredient.import.summary")), 1),
699
- (w(!0), C(j, null, q(i.value, (d, D) => (w(), N(Ae, {
697
+ u.value ? (w(), C("div", Vt, [
698
+ h("div", Nt, $(p(g)("inventory.ingredient.import.summary")), 1),
699
+ (w(!0), C(z, null, G(i.value, (d, D) => (w(), U(Ie, {
700
700
  key: D,
701
701
  name: d.template.name,
702
702
  locations: d.template.locations,
@@ -704,7 +704,7 @@ const Mt = { class: "flex items-center gap-12 pl-8" }, Ft = { class: "flex flex-
704
704
  errors: d.errors,
705
705
  type: "create"
706
706
  }, null, 8, ["name", "locations", "items", "errors"]))), 128)),
707
- (w(!0), C(j, null, q(m.value, (d) => (w(), N(Ae, {
707
+ (w(!0), C(z, null, G(m.value, (d) => (w(), U(Ie, {
708
708
  key: d.template._id,
709
709
  name: d.template.name,
710
710
  locations: d.template.locations,
@@ -712,16 +712,16 @@ const Mt = { class: "flex items-center gap-12 pl-8" }, Ft = { class: "flex flex-
712
712
  errors: d.errors,
713
713
  type: "update"
714
714
  }, null, 8, ["name", "locations", "items", "errors"]))), 128))
715
- ])) : W("", !0)
715
+ ])) : K("", !0)
716
716
  ], 64))
717
717
  ]);
718
718
  };
719
719
  }
720
- }), re = Ue("closingTemplateActions", () => {
721
- const { t: r } = B(), s = ce(), o = te(), n = ne(), t = oe(), { loading: e } = Ve(t), f = S({});
720
+ }), se = Pe("closingTemplateActions", () => {
721
+ const { t: r } = N(), s = ae(), o = Q(), n = Z(), t = ee(), { loading: e } = Ae(t), f = M({});
722
722
  function i() {
723
723
  f.value = {
724
- mode: H.CREATE,
724
+ mode: L.CREATE,
725
725
  show: !0,
726
726
  "onUpdate:show"(l) {
727
727
  f.value.show = l;
@@ -730,7 +730,7 @@ const Mt = { class: "flex items-center gap-12 pl-8" }, Ft = { class: "flex flex-
730
730
  }
731
731
  function m(l) {
732
732
  f.value = {
733
- mode: H.UPDATE,
733
+ mode: L.UPDATE,
734
734
  modelValue: l,
735
735
  show: !0,
736
736
  "onUpdate:show"(v) {
@@ -744,12 +744,12 @@ const Mt = { class: "flex items-center gap-12 pl-8" }, Ft = { class: "flex flex-
744
744
  message: "Deleted template can no longer be retrieved",
745
745
  primaryActions: {
746
746
  text: "Delete",
747
- variant: Ie.Destructive,
747
+ variant: Me.Destructive,
748
748
  close: !0
749
749
  },
750
750
  secondaryActions: {
751
751
  text: "Cancel",
752
- variant: Ie.Plain,
752
+ variant: Me.Plain,
753
753
  close: !0
754
754
  }
755
755
  }).onPrimary(async () => {
@@ -779,7 +779,7 @@ const Mt = { class: "flex items-center gap-12 pl-8" }, Ft = { class: "flex flex-
779
779
  }
780
780
  });
781
781
  }
782
- const u = S({});
782
+ const u = M({});
783
783
  function g(l) {
784
784
  u.value = {
785
785
  template: l,
@@ -788,12 +788,19 @@ const Mt = { class: "flex items-center gap-12 pl-8" }, Ft = { class: "flex flex-
788
788
  u.value.show = v;
789
789
  },
790
790
  "onAction:edit"() {
791
- u.value.show = !1, m(Ne(l));
791
+ u.value.show = !1, m(Ee(l));
792
792
  }
793
793
  };
794
794
  }
795
795
  function _() {
796
- const l = xt(t.templates);
796
+ if (!t.templates.length) {
797
+ o.open({
798
+ title: "No data to export",
799
+ type: "error"
800
+ });
801
+ return;
802
+ }
803
+ const l = gt(t.templates);
797
804
  o.open({
798
805
  title: r("inventory.ingredient.export.success"),
799
806
  message: r("inventory.ingredient.export.filename", [l]),
@@ -803,7 +810,7 @@ const Mt = { class: "flex items-center gap-12 pl-8" }, Ft = { class: "flex flex-
803
810
  function y() {
804
811
  t.loading || s.open({
805
812
  title: r("inventory.ingredient.import.title"),
806
- contentComponent: Yt,
813
+ contentComponent: Bt,
807
814
  overlay: !0,
808
815
  closeButton: !0,
809
816
  primaryActions: {
@@ -844,7 +851,7 @@ const Mt = { class: "flex items-center gap-12 pl-8" }, Ft = { class: "flex flex-
844
851
  return;
845
852
  }
846
853
  s.close(), a(l);
847
- }).onTertiary(wt);
854
+ }).onTertiary(vt);
848
855
  }
849
856
  async function a(l) {
850
857
  e.value = !0;
@@ -893,8 +900,8 @@ const Mt = { class: "flex items-center gap-12 pl-8" }, Ft = { class: "flex flex-
893
900
  templateDetailsProps: u
894
901
  };
895
902
  });
896
- var J = /* @__PURE__ */ ((r) => (r.Name = "Name", r.Unit = "Unit", r.Delete = "Delete", r))(J || {});
897
- function Kt(r) {
903
+ var Y = /* @__PURE__ */ ((r) => (r.Name = "Name", r.Unit = "Unit", r.Delete = "Delete", r))(Y || {});
904
+ function Lt(r) {
898
905
  return {
899
906
  columnDefs: A(() => {
900
907
  const o = r.items.map((t) => t.sku.unit.measurements.length).reduce((t, e) => Math.max(t, e), 0);
@@ -906,18 +913,18 @@ function Kt(r) {
906
913
  size: 400,
907
914
  cell(t) {
908
915
  const e = t.row.original;
909
- return F(
916
+ return S(
910
917
  "div",
911
918
  {
912
919
  class: "flex flex-col"
913
920
  },
914
921
  [
915
- F(
922
+ S(
916
923
  "span",
917
924
  { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary line-clamp-1" },
918
925
  e.sku.name
919
926
  ),
920
- F(
927
+ S(
921
928
  "span",
922
929
  { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary line-clamp-1" },
923
930
  e.sku.code
@@ -934,19 +941,19 @@ function Kt(r) {
934
941
  cell(t) {
935
942
  var f, i, m;
936
943
  const e = t.row.original;
937
- return F(
938
- L.FmFormGroup,
944
+ return S(
945
+ B.FmFormGroup,
939
946
  {
940
947
  value: e.sku.unit._id,
941
948
  modelValue: !((f = e.disabledMeasurements) != null && f.includes(e.sku.unit._id))
942
949
  },
943
- F(
950
+ S(
944
951
  "div",
945
952
  {
946
953
  class: "flex items-center gap-4"
947
954
  },
948
955
  [
949
- F(L.FmCheckbox, {
956
+ S(B.FmCheckbox, {
950
957
  value: e.sku.unit._id,
951
958
  modelValue: !((i = e.disabledMeasurements) != null && i.includes(e.sku.unit._id)),
952
959
  disabled: r.disabled || !((m = e.disabledMeasurements) != null && m.includes(e.sku.unit._id)) && e.sku.unit.measurements.every(
@@ -973,15 +980,15 @@ function Kt(r) {
973
980
  }
974
981
  }
975
982
  }),
976
- F(
977
- L.FmTooltip,
983
+ S(
984
+ B.FmTooltip,
978
985
  { zIndex: 51 },
979
986
  {
980
987
  content() {
981
988
  return e.sku.unit.abbrev;
982
989
  },
983
990
  default() {
984
- return F(
991
+ return S(
985
992
  "div",
986
993
  { class: "line-clamp-2 fm-typo-en-body-lg-400" },
987
994
  e.sku.unit.abbrev
@@ -1003,19 +1010,19 @@ function Kt(r) {
1003
1010
  cell(f) {
1004
1011
  var c, u, g, _;
1005
1012
  const i = f.row.original, m = i.sku.unit.measurements[e];
1006
- return m ? F(
1007
- L.FmFormGroup,
1013
+ return m ? S(
1014
+ B.FmFormGroup,
1008
1015
  {
1009
1016
  modelValue: !((c = i.disabledMeasurements) != null && c.includes(m.id)),
1010
1017
  value: m.id
1011
1018
  },
1012
- F(
1019
+ S(
1013
1020
  "div",
1014
1021
  {
1015
1022
  class: "flex items-center gap-4"
1016
1023
  },
1017
1024
  [
1018
- F(L.FmCheckbox, {
1025
+ S(B.FmCheckbox, {
1019
1026
  value: m.id,
1020
1027
  modelValue: !((u = i.disabledMeasurements) != null && u.includes(m.id)),
1021
1028
  disabled: r.disabled || !((g = i.disabledMeasurements) != null && g.includes(m.id)) && ((_ = i.disabledMeasurements) == null ? void 0 : _.includes(i.sku.unit._id)) && i.sku.unit.measurements.filter((y) => y.id != m.id).every((y) => {
@@ -1040,15 +1047,15 @@ function Kt(r) {
1040
1047
  }
1041
1048
  }
1042
1049
  }),
1043
- F(
1044
- L.FmTooltip,
1050
+ S(
1051
+ B.FmTooltip,
1045
1052
  { zIndex: 51 },
1046
1053
  {
1047
1054
  content() {
1048
1055
  return m.abbrev;
1049
1056
  },
1050
1057
  default() {
1051
- return F(
1058
+ return S(
1052
1059
  "div",
1053
1060
  { class: "line-clamp-2 fm-typo-en-body-lg-400" },
1054
1061
  m.abbrev
@@ -1067,10 +1074,10 @@ function Kt(r) {
1067
1074
  header: "",
1068
1075
  cell(t) {
1069
1076
  const e = t.row.original;
1070
- return F(
1077
+ return S(
1071
1078
  "div",
1072
1079
  { class: "w-full flex justify-end" },
1073
- F(L.FmButton, {
1080
+ S(B.FmButton, {
1074
1081
  class: "delete-button",
1075
1082
  key: e.sku._id,
1076
1083
  type: "button",
@@ -1095,7 +1102,7 @@ function Kt(r) {
1095
1102
  })
1096
1103
  };
1097
1104
  }
1098
- const Gt = { class: "flex flex-col gap-16 py-12" }, Jt = { class: "flex" }, Wt = { class: "flex-1 flex flex-col" }, qt = { class: "fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, Xt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Qt = { class: "flex flex-col gap-4" }, Zt = /* @__PURE__ */ O({
1105
+ const zt = { class: "flex flex-col gap-16 py-12" }, Ht = { class: "flex" }, jt = { class: "flex-1 flex flex-col" }, Ot = { class: "fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, Yt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Kt = { class: "flex flex-col gap-4" }, Gt = /* @__PURE__ */ H({
1099
1106
  __name: "ClosingTemplateItem",
1100
1107
  props: {
1101
1108
  cellByColId: {},
@@ -1103,31 +1110,31 @@ const Gt = { class: "flex flex-col gap-16 py-12" }, Jt = { class: "flex" }, Wt =
1103
1110
  },
1104
1111
  setup(r) {
1105
1112
  const s = r, o = A(() => s.row), n = A(
1106
- () => o.value.getVisibleCells().filter((t) => t.column.id !== J.Name && t.column.id !== J.Delete)
1113
+ () => o.value.getVisibleCells().filter((t) => t.column.id !== Y.Name && t.column.id !== Y.Delete)
1107
1114
  );
1108
1115
  return (t, e) => {
1109
1116
  var f, i, m, c, u;
1110
- return w(), C("div", Gt, [
1111
- h("div", Jt, [
1112
- h("div", Wt, [
1113
- h("div", qt, $(o.value.original.sku.name), 1),
1114
- h("div", Xt, $(o.value.original.sku.code), 1)
1117
+ return w(), C("div", zt, [
1118
+ h("div", Ht, [
1119
+ h("div", jt, [
1120
+ h("div", Ot, $(o.value.original.sku.name), 1),
1121
+ h("div", Yt, $(o.value.original.sku.code), 1)
1115
1122
  ]),
1116
1123
  h("div", null, [
1117
- k(p(K), {
1118
- render: (m = (i = (f = t.cellByColId[p(J).Delete]) == null ? void 0 : f.column) == null ? void 0 : i.columnDef) == null ? void 0 : m.cell,
1119
- props: (u = (c = t.cellByColId[p(J).Delete]) == null ? void 0 : c.getContext) == null ? void 0 : u.call(c)
1124
+ k(p(j), {
1125
+ render: (m = (i = (f = t.cellByColId[p(Y).Delete]) == null ? void 0 : f.column) == null ? void 0 : i.columnDef) == null ? void 0 : m.cell,
1126
+ props: (u = (c = t.cellByColId[p(Y).Delete]) == null ? void 0 : c.getContext) == null ? void 0 : u.call(c)
1120
1127
  }, null, 8, ["render", "props"])
1121
1128
  ])
1122
1129
  ]),
1123
- h("div", Qt, [
1130
+ h("div", Kt, [
1124
1131
  e[0] || (e[0] = h("div", { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, null, -1)),
1125
- (w(!0), C(j, null, q(n.value, (g) => {
1132
+ (w(!0), C(z, null, G(n.value, (g) => {
1126
1133
  var _, y, a;
1127
1134
  return w(), C("div", {
1128
1135
  key: g.id
1129
1136
  }, [
1130
- k(p(K), {
1137
+ k(p(j), {
1131
1138
  render: (y = (_ = g.column) == null ? void 0 : _.columnDef) == null ? void 0 : y.cell,
1132
1139
  props: (a = g.getContext) == null ? void 0 : a.call(g)
1133
1140
  }, null, 8, ["render", "props"])
@@ -1137,25 +1144,25 @@ const Gt = { class: "flex flex-col gap-16 py-12" }, Jt = { class: "flex" }, Wt =
1137
1144
  ]);
1138
1145
  };
1139
1146
  }
1140
- }), en = { class: "flex flex-col gap-16" }, tn = { class: "flex flex-col gap-24" }, nn = { class: "flex flex-col gap-16" }, on = { class: "flex items-center" }, sn = { class: "flex-1 fm-typo-en-title-sm-600" }, ln = { class: "flex flex-col gap-16" }, an = { class: "flex items-center" }, rn = { class: "flex-1 gap-8 fm-typo-en-title-sm-600" }, cn = /* @__PURE__ */ O({
1147
+ }), Jt = { class: "flex flex-col gap-16" }, Wt = { class: "flex flex-col gap-24" }, qt = { class: "flex flex-col gap-16" }, Xt = { class: "flex items-center" }, Qt = { class: "flex-1 fm-typo-en-title-sm-600" }, Zt = { class: "flex flex-col gap-16" }, en = { class: "flex items-center" }, tn = { class: "flex-1 gap-8 fm-typo-en-title-sm-600" }, nn = /* @__PURE__ */ H({
1141
1148
  __name: "ClosingTemplateForm",
1142
1149
  props: {
1143
1150
  modelValue: {},
1144
1151
  disabled: { type: Boolean }
1145
1152
  },
1146
1153
  setup(r, { expose: s }) {
1147
- const o = r, n = bt(), { t } = B(), e = ue(), f = ce(), {
1154
+ const o = r, n = pt(), { t } = N(), e = ie(), f = ae(), {
1148
1155
  promptSelectLocations: i,
1149
1156
  columnDefs: m,
1150
1157
  rowData: c
1151
- } = _t({
1158
+ } = ft({
1152
1159
  getLocations() {
1153
1160
  return n.locations;
1154
1161
  },
1155
1162
  setLocations(a) {
1156
1163
  n.locations = a;
1157
1164
  }
1158
- }), u = S();
1165
+ }), u = M();
1159
1166
  s({
1160
1167
  validateInputs: () => {
1161
1168
  var a, l;
@@ -1170,7 +1177,7 @@ const Gt = { class: "flex flex-col gap-16 py-12" }, Jt = { class: "flex" }, Wt =
1170
1177
  (l = (a = u.value) == null ? void 0 : a.resetInputs) == null || l.call(a);
1171
1178
  }
1172
1179
  });
1173
- const g = Kt({
1180
+ const g = Lt({
1174
1181
  updateItem: (a) => {
1175
1182
  n.items = n.items.map((l) => l.sku._id !== a.sku._id ? l : a);
1176
1183
  },
@@ -1196,7 +1203,7 @@ const Gt = { class: "flex flex-col gap-16 py-12" }, Jt = { class: "flex" }, Wt =
1196
1203
  f.open({
1197
1204
  title: t("inventory.closing.form.items.selectItem"),
1198
1205
  closeButton: !0,
1199
- contentComponent: pt,
1206
+ contentComponent: rt,
1200
1207
  contentComponentProps: {
1201
1208
  modelValue: l,
1202
1209
  items: a,
@@ -1222,22 +1229,22 @@ const Gt = { class: "flex flex-col gap-16 py-12" }, Jt = { class: "flex" }, Wt =
1222
1229
  });
1223
1230
  }
1224
1231
  return (a, l) => {
1225
- const v = M("FmTextField"), T = M("FmButton"), d = M("FmTable"), D = M("FmFormGroup"), b = M("FmForm");
1226
- return w(), N(b, {
1232
+ const v = R("FmTextField"), T = R("FmButton"), d = R("FmTable"), D = R("FmFormGroup"), b = R("FmForm");
1233
+ return w(), U(b, {
1227
1234
  ref_key: "formRef",
1228
1235
  ref: u,
1229
1236
  class: "flex flex-col gap-32",
1230
1237
  disabled: a.disabled
1231
1238
  }, {
1232
- default: I(() => [
1233
- h("div", en, [
1234
- h("div", tn, [
1239
+ default: F(() => [
1240
+ h("div", Jt, [
1241
+ h("div", Wt, [
1235
1242
  k(v, {
1236
1243
  label: p(t)("inventory.closing.form.name"),
1237
1244
  "label-mark": "required",
1238
1245
  modelValue: p(n).name,
1239
1246
  "onUpdate:modelValue": l[0] || (l[0] = (x) => p(n).name = x),
1240
- rules: [p(ut)()]
1247
+ rules: [p(lt)()]
1241
1248
  }, null, 8, ["label", "modelValue", "rules"]),
1242
1249
  k(v, {
1243
1250
  label: p(t)("inventory.closing.form.reference"),
@@ -1247,9 +1254,9 @@ const Gt = { class: "flex flex-col gap-16 py-12" }, Jt = { class: "flex" }, Wt =
1247
1254
  }, null, 8, ["label", "modelValue"])
1248
1255
  ])
1249
1256
  ]),
1250
- h("div", nn, [
1251
- h("div", on, [
1252
- h("div", sn, $(p(t)("inventory.closing.form.locations")), 1),
1257
+ h("div", qt, [
1258
+ h("div", Xt, [
1259
+ h("div", Qt, $(p(t)("inventory.closing.form.locations")), 1),
1253
1260
  k(T, {
1254
1261
  disabled: a.disabled,
1255
1262
  label: p(t)("inventory.closing.form.selectLocation"),
@@ -1267,9 +1274,9 @@ const Gt = { class: "flex flex-col gap-16 py-12" }, Jt = { class: "flex" }, Wt =
1267
1274
  "hide-footer": ""
1268
1275
  }, null, 8, ["column-defs", "row-data", "onRowClick"])
1269
1276
  ]),
1270
- h("div", ln, [
1271
- h("div", an, [
1272
- h("div", rn, $(p(t)("inventory.closing.form.items.title")), 1),
1277
+ h("div", Zt, [
1278
+ h("div", en, [
1279
+ h("div", tn, $(p(t)("inventory.closing.form.items.title")), 1),
1273
1280
  k(T, {
1274
1281
  disabled: a.disabled,
1275
1282
  label: p(t)("inventory.closing.form.items.addItem"),
@@ -1280,20 +1287,20 @@ const Gt = { class: "flex flex-col gap-16 py-12" }, Jt = { class: "flex" }, Wt =
1280
1287
  size: "md"
1281
1288
  }, null, 8, ["disabled", "label"])
1282
1289
  ]),
1283
- (w(), N(d, {
1290
+ (w(), U(d, {
1284
1291
  "column-defs": _.value,
1285
1292
  "row-data": p(n).items,
1286
1293
  key: p(n).items.map((x) => x.sku._id).join("."),
1287
1294
  "hide-footer": "",
1288
1295
  "page-size": p(n).items.length
1289
1296
  }, {
1290
- "list-row": I((x) => [
1291
- (w(), N(He, {
1297
+ "list-row": F((x) => [
1298
+ (w(), U(Be, {
1292
1299
  row: x,
1293
1300
  key: p(n).items.map((P) => P.sku._id).join(".")
1294
1301
  }, {
1295
- default: I((P) => [
1296
- k(Zt, {
1302
+ default: F((P) => [
1303
+ k(Gt, {
1297
1304
  row: x,
1298
1305
  "cell-by-col-id": P
1299
1306
  }, null, 8, ["row", "cell-by-col-id"])
@@ -1305,7 +1312,7 @@ const Gt = { class: "flex flex-col gap-16 py-12" }, Jt = { class: "flex" }, Wt =
1305
1312
  }, 8, ["column-defs", "row-data", "page-size"])),
1306
1313
  k(D, {
1307
1314
  "model-value": p(n).items.length,
1308
- rules: [p(dt)(1)]
1315
+ rules: [p(at)(1)]
1309
1316
  }, null, 8, ["model-value", "rules"])
1310
1317
  ])
1311
1318
  ]),
@@ -1313,7 +1320,7 @@ const Gt = { class: "flex flex-col gap-16 py-12" }, Jt = { class: "flex" }, Wt =
1313
1320
  }, 8, ["disabled"]);
1314
1321
  };
1315
1322
  }
1316
- }), mn = { class: "flex items-center" }, un = { class: "fm-typo-en-title-md-600" }, dn = { class: "flex gap-4" }, pn = /* @__PURE__ */ O({
1323
+ }), on = { class: "flex items-center" }, sn = { class: "fm-typo-en-title-md-600" }, ln = { class: "flex gap-4" }, an = /* @__PURE__ */ H({
1317
1324
  __name: "ClosingTemplateDialog",
1318
1325
  props: {
1319
1326
  mode: {},
@@ -1323,7 +1330,7 @@ const Gt = { class: "flex flex-col gap-16 py-12" }, Jt = { class: "flex" }, Wt =
1323
1330
  emits: ["update:show", "submitted"],
1324
1331
  setup(r, { expose: s, emit: o }) {
1325
1332
  var D;
1326
- const n = r, t = o, e = ne(), f = te(), { t: i } = B(), m = at(n, "show");
1333
+ const n = r, t = o, e = Z(), f = Q(), { t: i } = N(), m = et(n, "show");
1327
1334
  function c() {
1328
1335
  return {
1329
1336
  _id: "",
@@ -1331,25 +1338,25 @@ const Gt = { class: "flex flex-col gap-16 py-12" }, Jt = { class: "flex" }, Wt =
1331
1338
  items: []
1332
1339
  };
1333
1340
  }
1334
- const u = S(n.modelValue ?? c()), g = S(((D = n.modelValue) == null ? void 0 : D._id) ?? `${Math.random()}`);
1335
- Ee(
1341
+ const u = M(n.modelValue ?? c()), g = M(((D = n.modelValue) == null ? void 0 : D._id) ?? `${Math.random()}`);
1342
+ Fe(
1336
1343
  () => n.show,
1337
1344
  (b) => {
1338
1345
  var x;
1339
1346
  b && (u.value = n.modelValue ?? c(), g.value = ((x = n.modelValue) == null ? void 0 : x._id) ?? `${Math.random()}`);
1340
1347
  }
1341
1348
  );
1342
- const _ = S(!1), y = A(() => {
1349
+ const _ = M(!1), y = A(() => {
1343
1350
  switch (n.mode) {
1344
- case H.READ:
1351
+ case L.READ:
1345
1352
  return "";
1346
- case H.CREATE:
1353
+ case L.CREATE:
1347
1354
  return i("inventory.closing.template.create.title");
1348
- case H.UPDATE:
1355
+ case L.UPDATE:
1349
1356
  return i("inventory.closing.template.update.title");
1350
1357
  }
1351
1358
  return "";
1352
- }), a = S();
1359
+ }), a = M();
1353
1360
  s({
1354
1361
  validateInputs: () => {
1355
1362
  var b, x;
@@ -1411,9 +1418,9 @@ const Gt = { class: "flex flex-col gap-16 py-12" }, Jt = { class: "flex" }, Wt =
1411
1418
  }
1412
1419
  function T() {
1413
1420
  switch (n.mode) {
1414
- case H.CREATE:
1421
+ case L.CREATE:
1415
1422
  return l();
1416
- case H.UPDATE:
1423
+ case L.UPDATE:
1417
1424
  return v();
1418
1425
  }
1419
1426
  }
@@ -1422,33 +1429,33 @@ const Gt = { class: "flex flex-col gap-16 py-12" }, Jt = { class: "flex" }, Wt =
1422
1429
  (x = (b = a.value) == null ? void 0 : b.validateInputs) == null || x.call(b);
1423
1430
  }
1424
1431
  return (b, x) => {
1425
- const P = M("FmButton"), se = M("FmSideSheet");
1426
- return w(), N(se, {
1432
+ const P = R("FmButton"), te = R("FmSideSheet");
1433
+ return w(), U(te, {
1427
1434
  modelValue: p(m),
1428
- "onUpdate:modelValue": x[2] || (x[2] = (Y) => qe(m) ? m.value = Y : null),
1435
+ "onUpdate:modelValue": x[2] || (x[2] = (I) => Oe(m) ? m.value = I : null),
1429
1436
  "dismiss-away": "",
1430
1437
  "close-button": "",
1431
1438
  "max-width": 800
1432
1439
  }, {
1433
- "side-sheet-header": I(() => [
1434
- h("div", mn, [
1435
- h("div", un, $(y.value), 1)
1440
+ "side-sheet-header": F(() => [
1441
+ h("div", on, [
1442
+ h("div", sn, $(y.value), 1)
1436
1443
  ])
1437
1444
  ]),
1438
- default: I(() => [
1439
- (w(), N(cn, {
1445
+ default: F(() => [
1446
+ (w(), U(nn, {
1440
1447
  class: "w-full",
1441
1448
  ref_key: "formRef",
1442
1449
  ref: a,
1443
1450
  onValidationSuccess: T,
1444
1451
  "model-value": u.value,
1445
- "onUpdate:modelValue": x[0] || (x[0] = (Y) => u.value = Y),
1452
+ "onUpdate:modelValue": x[0] || (x[0] = (I) => u.value = I),
1446
1453
  disabled: _.value,
1447
1454
  key: g.value
1448
1455
  }, null, 8, ["model-value", "disabled"]))
1449
1456
  ]),
1450
- "side-sheet-footer": I(() => [
1451
- h("div", dn, [
1457
+ "side-sheet-footer": F(() => [
1458
+ h("div", ln, [
1452
1459
  k(P, {
1453
1460
  loading: _.value,
1454
1461
  label: p(i)("common.save"),
@@ -1458,7 +1465,7 @@ const Gt = { class: "flex flex-col gap-16 py-12" }, Jt = { class: "flex" }, Wt =
1458
1465
  disabled: _.value,
1459
1466
  variant: "tertiary",
1460
1467
  label: p(i)("common.close"),
1461
- onClick: x[1] || (x[1] = (Y) => t("update:show", !1))
1468
+ onClick: x[1] || (x[1] = (I) => t("update:show", !1))
1462
1469
  }, null, 8, ["disabled", "label"])
1463
1470
  ])
1464
1471
  ]),
@@ -1466,24 +1473,24 @@ const Gt = { class: "flex flex-col gap-16 py-12" }, Jt = { class: "flex" }, Wt =
1466
1473
  }, 8, ["modelValue"]);
1467
1474
  };
1468
1475
  }
1469
- }), fn = {};
1470
- function gn(r, s) {
1476
+ }), rn = {};
1477
+ function cn(r, s) {
1471
1478
  return w(), C("div");
1472
1479
  }
1473
- const vn = /* @__PURE__ */ ft(fn, [["render", gn]]), yn = { class: "flex flex-col gap-40" }, hn = { key: 0 }, bn = {
1480
+ const mn = /* @__PURE__ */ it(rn, [["render", cn]]), un = { class: "flex flex-col gap-40" }, dn = { key: 0 }, pn = {
1474
1481
  key: 1,
1475
1482
  class: "flex gap-8 items-center"
1476
- }, _n = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary" }, xn = {
1483
+ }, fn = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary" }, gn = {
1477
1484
  key: 2,
1478
1485
  class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary"
1479
- }, wn = {
1486
+ }, vn = {
1480
1487
  key: 3,
1481
1488
  class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary flex flex-col gap-12"
1482
- }, kn = { class: "fm-typo-en-body-md-600" }, Tn = { class: "fm-typo-en-body-md-600" }, $n = { key: 4 }, Cn = { class: "fm-typo-en-body-md-600" }, Dn = { class: "fm-typo-en-body-md-600" }, Sn = { class: "flex sm:flex-col xs:flex-col justify-end gap-8 w-full mb-16" }, Mn = /* @__PURE__ */ O({
1489
+ }, yn = { class: "fm-typo-en-body-md-600" }, hn = { class: "fm-typo-en-body-md-600" }, bn = { key: 4 }, _n = { class: "fm-typo-en-body-md-600" }, xn = { class: "fm-typo-en-body-md-600" }, wn = { class: "flex sm:flex-col xs:flex-col justify-end gap-8 w-full mb-16" }, kn = /* @__PURE__ */ H({
1483
1490
  __name: "ClosingTemplatePublish",
1484
1491
  emits: ["close"],
1485
1492
  setup(r, { emit: s }) {
1486
- const o = S(!1), n = te(), t = ne(), e = oe(), { t: f } = B(), i = s;
1493
+ const o = M(!1), n = Q(), t = Z(), e = ee(), { t: f } = N(), i = s;
1487
1494
  async function m() {
1488
1495
  o.value = !0;
1489
1496
  try {
@@ -1509,53 +1516,53 @@ const vn = /* @__PURE__ */ ft(fn, [["render", gn]]), yn = { class: "flex flex-co
1509
1516
  i("close");
1510
1517
  }
1511
1518
  return (_, y) => {
1512
- const a = M("FmCircularProgress"), l = M("i18n-t"), v = M("FmButton");
1513
- return w(), C("div", yn, [
1514
- p(e).templates.length ? o.value ? (w(), C("div", bn, [
1519
+ const a = R("FmCircularProgress"), l = R("i18n-t"), v = R("FmButton");
1520
+ return w(), C("div", un, [
1521
+ p(e).templates.length ? o.value ? (w(), C("div", pn, [
1515
1522
  h("div", null, [
1516
1523
  k(a, {
1517
1524
  size: "md",
1518
1525
  color: "neutral-gray-300"
1519
1526
  })
1520
1527
  ]),
1521
- h("div", _n, [
1528
+ h("div", fn, [
1522
1529
  h("span", null, $(p(f)("inventory.closing.template.publish.publishing")), 1)
1523
1530
  ])
1524
- ])) : c.value ? c.value.outlets.length === c.value.completed.length ? (w(), C("div", wn, [
1531
+ ])) : c.value ? c.value.outlets.length === c.value.completed.length ? (w(), C("div", vn, [
1525
1532
  k(l, {
1526
1533
  keypath: "inventory.closing.template.publish.recentlyPublishedAt",
1527
1534
  tag: "p"
1528
1535
  }, {
1529
- started: I(() => [
1530
- h("span", kn, $(p(le)(new Date(c.value.createdAt))), 1)
1536
+ started: F(() => [
1537
+ h("span", yn, $(p(ne)(new Date(c.value.createdAt))), 1)
1531
1538
  ]),
1532
- finished: I(() => [
1533
- h("span", Tn, $(p(le)(new Date(c.value.updatedAt))), 1)
1539
+ finished: F(() => [
1540
+ h("span", hn, $(p(ne)(new Date(c.value.updatedAt))), 1)
1534
1541
  ]),
1535
1542
  _: 1
1536
1543
  }),
1537
1544
  h("p", null, $(p(f)("inventory.closing.template.publish.message")), 1)
1538
- ])) : (w(), C("div", $n, [
1545
+ ])) : (w(), C("div", bn, [
1539
1546
  k(l, {
1540
1547
  keypath: "inventory.closing.template.publish.stillPublishing",
1541
1548
  tag: "p"
1542
1549
  }, {
1543
- started: I(() => [
1544
- h("span", Cn, $(p(le)(new Date(c.value.createdAt))), 1)
1550
+ started: F(() => [
1551
+ h("span", _n, $(p(ne)(new Date(c.value.createdAt))), 1)
1545
1552
  ]),
1546
- progress: I(() => [
1547
- h("span", Dn, " (" + $(c.value.completed.length) + "/" + $(c.value.outlets.length) + " completed) ", 1)
1553
+ progress: F(() => [
1554
+ h("span", xn, " (" + $(c.value.completed.length) + "/" + $(c.value.outlets.length) + " completed) ", 1)
1548
1555
  ]),
1549
1556
  _: 1
1550
1557
  }),
1551
- Pe(" Your recent publishing task is still pending (" + $(c.value.completed.length) + " / " + $(c.value.outlets.length) + "). Please wait until all publishing task has completed. ", 1)
1552
- ])) : (w(), C("div", xn, [
1558
+ Re(" Your recent publishing task is still pending (" + $(c.value.completed.length) + " / " + $(c.value.outlets.length) + "). Please wait until all publishing task has completed. ", 1)
1559
+ ])) : (w(), C("div", gn, [
1553
1560
  h("p", null, $(p(f)("inventory.closing.template.publish.noRecentActivity")), 1),
1554
1561
  h("p", null, $(p(f)("inventory.closing.template.publish.message")), 1)
1555
- ])) : (w(), C("div", hn, [
1562
+ ])) : (w(), C("div", dn, [
1556
1563
  h("p", null, $(p(f)("inventory.closing.template.publish.nothingToPublish")), 1)
1557
1564
  ])),
1558
- h("div", Sn, [
1565
+ h("div", wn, [
1559
1566
  k(v, {
1560
1567
  disabled: !u.value,
1561
1568
  loading: o.value,
@@ -1571,24 +1578,30 @@ const vn = /* @__PURE__ */ ft(fn, [["render", gn]]), yn = { class: "flex flex-co
1571
1578
  ]);
1572
1579
  };
1573
1580
  }
1574
- }), Fn = { class: "flex-1 flex flex-col gap-8" }, In = { class: "flex flex-col" }, Rn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, An = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Pn = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, En = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, qn = /* @__PURE__ */ O({
1581
+ }), Tn = { class: "flex-1 flex flex-col gap-8" }, $n = { class: "flex flex-col" }, Cn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Dn = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Mn = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, Sn = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, On = /* @__PURE__ */ H({
1575
1582
  __name: "ClosingTemplateView",
1576
1583
  setup(r) {
1577
- const { t: s } = B(), { createTemplate: o, updateTemplate: n, exportTemplates: t, importTemplates: e } = re(), { templateDialogProps: f, templateDetailsProps: i } = Ve(re()), m = me(), c = ce(), u = oe(), g = nt(), { breakpoints: _ } = rt();
1584
+ const { t: s } = N(), { createTemplate: o, updateTemplate: n, exportTemplates: t, importTemplates: e } = se(), { templateDialogProps: f, templateDetailsProps: i } = Ae(se()), m = re(), c = ae(), u = ee(), g = qe(), { breakpoints: _ } = tt();
1578
1585
  m.watchLocation(u.fetchTemplates);
1579
- const y = A(() => u.loading), a = S(""), l = A(() => _.value.xs || _.value.sm), v = A(() => l.value ? 10 : 20);
1580
- function T(E) {
1581
- switch (E) {
1582
- case z.Add:
1586
+ const y = A(() => u.loading), a = M(""), l = A(() => _.value.xs || _.value.sm), v = A(() => l.value ? 10 : 20);
1587
+ function T(x) {
1588
+ switch (x) {
1589
+ case V.Add:
1583
1590
  return o();
1584
1591
  case "publish":
1585
1592
  return d();
1593
+ case "import":
1594
+ return e();
1595
+ case "export":
1596
+ return t();
1597
+ case "refresh":
1598
+ return u.fetchTemplates();
1586
1599
  }
1587
1600
  }
1588
1601
  function d() {
1589
1602
  c.open({
1590
1603
  title: "Publish closing templates",
1591
- contentComponent: Mn,
1604
+ contentComponent: kn,
1592
1605
  contentComponentProps: {
1593
1606
  onClose() {
1594
1607
  c.close();
@@ -1596,79 +1609,75 @@ const vn = /* @__PURE__ */ ft(fn, [["render", gn]]), yn = { class: "flex flex-co
1596
1609
  }
1597
1610
  });
1598
1611
  }
1599
- function D(E) {
1600
- return E;
1612
+ function D(x) {
1613
+ return x;
1601
1614
  }
1602
- const b = A(() => {
1603
- const E = [
1604
- {
1605
- label: s("inventory.closing.template.create.title"),
1606
- value: z.Add,
1607
- isPrimary: !0,
1608
- prependIcon: "add"
1609
- }
1610
- ];
1611
- return l.value ? E : [
1612
- ...E,
1613
- {
1614
- label: "Publish",
1615
- value: "publish",
1616
- isPrimary: !1
1617
- }
1618
- ];
1619
- }), x = A(() => {
1620
- const E = [
1621
- {
1622
- icon: "refresh",
1623
- onClick: u.fetchTemplates
1624
- }
1625
- ];
1626
- return l.value ? [...E, { icon: "more_vert", onClick: () => P.value = !0 }] : [
1627
- ...E,
1628
- {
1629
- icon: "upload_file",
1630
- onClick: e
1631
- },
1632
- {
1633
- icon: "ios_share",
1634
- onClick: t
1635
- }
1636
- ];
1637
- }), P = S(!1), se = [
1615
+ const b = A(() => l.value ? [
1638
1616
  {
1617
+ label: s("inventory.closing.template.create.title"),
1618
+ value: V.Add,
1619
+ isPrimary: !0,
1620
+ prependIcon: "add"
1621
+ },
1622
+ {
1623
+ label: "Refresh",
1624
+ value: "refresh",
1625
+ isPrimary: !1
1626
+ },
1627
+ {
1628
+ label: "Publish",
1629
+ value: "publish",
1630
+ isPrimary: !1
1631
+ },
1632
+ {
1633
+ label: "Import",
1639
1634
  value: "import",
1640
- label: s("common.import")
1635
+ isPrimary: !1
1641
1636
  },
1642
1637
  {
1638
+ label: "Export",
1643
1639
  value: "export",
1644
- label: s("common.export")
1640
+ isPrimary: !1
1641
+ }
1642
+ ] : [
1643
+ {
1644
+ label: s("inventory.closing.template.create.title"),
1645
+ value: V.Add,
1646
+ isPrimary: !0,
1647
+ prependIcon: "add"
1645
1648
  },
1646
1649
  {
1650
+ label: "Publish",
1647
1651
  value: "publish",
1648
- label: s("inventory.closing.template.publish.title")
1649
- }
1650
- ];
1651
- function Y(E) {
1652
- switch (P.value = !1, E) {
1653
- case "import":
1654
- return e();
1655
- case "export":
1656
- return t();
1657
- case "publish":
1658
- return d();
1652
+ isPrimary: !1
1653
+ },
1654
+ {
1655
+ label: "Import",
1656
+ value: "import",
1657
+ isPrimary: !1
1658
+ },
1659
+ {
1660
+ label: "Refresh",
1661
+ value: "refresh",
1662
+ isPrimary: !1
1663
+ },
1664
+ {
1665
+ label: "Export",
1666
+ value: "export",
1667
+ isPrimary: !1
1659
1668
  }
1660
- }
1661
- return (E, U) => {
1662
- const Ye = M("FmTable"), Ke = M("FmCollapsibleTabs"), Ge = M("FmBottomSheet");
1663
- return w(), C(j, null, [
1664
- k(ot, {
1669
+ ]);
1670
+ return (x, P) => {
1671
+ const te = R("FmTable");
1672
+ return w(), C(z, null, [
1673
+ k(Xe, {
1665
1674
  title: p(s)("inventory.closing.template.title"),
1666
1675
  actions: b.value,
1667
1676
  "onClick:action": T
1668
1677
  }, {
1669
- default: I(() => [
1678
+ default: F(() => [
1670
1679
  h("div", {
1671
- class: G([
1680
+ class: O([
1672
1681
  "flex flex-col gap-8 max-h-full",
1673
1682
  {
1674
1683
  "p-0": l.value,
@@ -1676,61 +1685,60 @@ const vn = /* @__PURE__ */ ft(fn, [["render", gn]]), yn = { class: "flex flex-co
1676
1685
  }
1677
1686
  ])
1678
1687
  }, [
1679
- k(st, {
1688
+ k(Qe, {
1680
1689
  searchable: "",
1681
1690
  search: a.value,
1682
- "onUpdate:search": U[0] || (U[0] = (R) => a.value = R),
1683
- actions: x.value
1684
- }, null, 8, ["search", "actions"]),
1685
- k(Ye, {
1686
- style: Xe(p(g).tableHeight),
1691
+ "onUpdate:search": P[0] || (P[0] = (I) => a.value = I)
1692
+ }, null, 8, ["search"]),
1693
+ k(te, {
1694
+ style: Ye(p(g).tableHeight),
1687
1695
  "column-defs": p(u).columnDefs,
1688
1696
  "row-data": p(u).templates,
1689
1697
  "search-value": a.value,
1690
1698
  loading: y.value,
1691
- onRowClick: U[1] || (U[1] = (R) => p(n)(R.original)),
1699
+ onRowClick: P[1] || (P[1] = (I) => p(n)(I.original)),
1692
1700
  "page-size": v.value
1693
1701
  }, {
1694
- "list-row": I((R) => [
1695
- k(He, {
1696
- row: R,
1697
- onRowClick: (V) => p(n)(V)
1702
+ "list-row": F((I) => [
1703
+ k(Be, {
1704
+ row: I,
1705
+ onRowClick: (E) => p(n)(E)
1698
1706
  }, {
1699
- default: I((V) => {
1700
- var pe, fe, ge, X, ve, ye, he, be, Q, _e, xe, we, ke, Te, $e, Z, Ce, De, Se, Me, ee, Fe;
1707
+ default: F((E) => {
1708
+ var me, ue, de, J, pe, fe, ge, ve, W, ye, he, be, _e, xe, we, q, ke, Te, $e, Ce, X, De;
1701
1709
  return [
1702
- h("div", Fn, [
1703
- h("div", In, [
1704
- h("div", Rn, [
1705
- k(p(K), {
1706
- render: (ge = (fe = (pe = V._id) == null ? void 0 : pe.column) == null ? void 0 : fe.columnDef) == null ? void 0 : ge.cell,
1707
- props: (ve = (X = V._id) == null ? void 0 : X.getContext) == null ? void 0 : ve.call(X)
1710
+ h("div", Tn, [
1711
+ h("div", $n, [
1712
+ h("div", Cn, [
1713
+ k(p(j), {
1714
+ render: (de = (ue = (me = E._id) == null ? void 0 : me.column) == null ? void 0 : ue.columnDef) == null ? void 0 : de.cell,
1715
+ props: (pe = (J = E._id) == null ? void 0 : J.getContext) == null ? void 0 : pe.call(J)
1708
1716
  }, null, 8, ["render", "props"])
1709
1717
  ]),
1710
- h("div", An, [
1711
- k(p(K), {
1712
- render: (be = (he = (ye = V.name) == null ? void 0 : ye.column) == null ? void 0 : he.columnDef) == null ? void 0 : be.cell,
1713
- props: (_e = (Q = V.name) == null ? void 0 : Q.getContext) == null ? void 0 : _e.call(Q)
1718
+ h("div", Dn, [
1719
+ k(p(j), {
1720
+ render: (ve = (ge = (fe = E.name) == null ? void 0 : fe.column) == null ? void 0 : ge.columnDef) == null ? void 0 : ve.cell,
1721
+ props: (ye = (W = E.name) == null ? void 0 : W.getContext) == null ? void 0 : ye.call(W)
1714
1722
  }, null, 8, ["render", "props"])
1715
1723
  ]),
1716
- h("div", null, $((xe = R.original.locations) != null && xe.length ? p(s)("inventory.closing.table.enabledForN", {
1717
- count: ((we = R.original.locations) == null ? void 0 : we.length) ?? 0
1724
+ h("div", null, $((he = I.original.locations) != null && he.length ? p(s)("inventory.closing.table.enabledForN", {
1725
+ count: ((be = I.original.locations) == null ? void 0 : be.length) ?? 0
1718
1726
  }) : p(s)("inventory.closing.table.enabledForAll")), 1),
1719
- h("div", Pn, $([
1720
- ...R.original.items.slice(0, 3).map((Je) => Je.sku.name),
1721
- ...R.original.items.length >= 3 ? [`and ${R.original.items.length - 3} more items`] : []
1727
+ h("div", Mn, $([
1728
+ ...I.original.items.slice(0, 3).map((He) => He.sku.name),
1729
+ ...I.original.items.length >= 3 ? [`and ${I.original.items.length - 3} more items`] : []
1722
1730
  ].join(", ")), 1),
1723
- h("div", En, [
1724
- k(p(K), {
1725
- render: ($e = (Te = (ke = V.ref) == null ? void 0 : ke.column) == null ? void 0 : Te.columnDef) == null ? void 0 : $e.cell,
1726
- props: (Ce = (Z = V.ref) == null ? void 0 : Z.getContext) == null ? void 0 : Ce.call(Z)
1731
+ h("div", Sn, [
1732
+ k(p(j), {
1733
+ render: (we = (xe = (_e = E.ref) == null ? void 0 : _e.column) == null ? void 0 : xe.columnDef) == null ? void 0 : we.cell,
1734
+ props: (ke = (q = E.ref) == null ? void 0 : q.getContext) == null ? void 0 : ke.call(q)
1727
1735
  }, null, 8, ["render", "props"])
1728
1736
  ])
1729
1737
  ]),
1730
1738
  h("div", null, [
1731
- k(p(K), {
1732
- render: (Me = (Se = (De = V.status) == null ? void 0 : De.column) == null ? void 0 : Se.columnDef) == null ? void 0 : Me.cell,
1733
- props: (Fe = (ee = V.status) == null ? void 0 : ee.getContext) == null ? void 0 : Fe.call(ee)
1739
+ k(p(j), {
1740
+ render: (Ce = ($e = (Te = E.status) == null ? void 0 : Te.column) == null ? void 0 : $e.columnDef) == null ? void 0 : Ce.cell,
1741
+ props: (De = (X = E.status) == null ? void 0 : X.getContext) == null ? void 0 : De.call(X)
1734
1742
  }, null, 8, ["render", "props"])
1735
1743
  ])
1736
1744
  ])
@@ -1745,31 +1753,16 @@ const vn = /* @__PURE__ */ ft(fn, [["render", gn]]), yn = { class: "flex flex-co
1745
1753
  ]),
1746
1754
  _: 1
1747
1755
  }, 8, ["title", "actions"]),
1748
- (w(), N(Qe, { to: "body" }, [
1749
- k(vn, Ze(et(p(i))), null, 16),
1750
- k(pn, tt(p(f), {
1751
- onSubmitted: U[2] || (U[2] = (R) => p(u).fetchTemplates())
1752
- }), null, 16),
1753
- k(Ge, {
1754
- "dismiss-away": "",
1755
- "no-header": "",
1756
- modelValue: P.value,
1757
- "onUpdate:modelValue": U[4] || (U[4] = (R) => P.value = R)
1758
- }, {
1759
- default: I(() => [
1760
- k(Ke, {
1761
- class: "pb-8",
1762
- items: se,
1763
- "onUpdate:modelValue": U[3] || (U[3] = (R) => Y(R))
1764
- })
1765
- ]),
1766
- _: 1
1767
- }, 8, ["modelValue"])
1756
+ (w(), U(Ke, { to: "body" }, [
1757
+ k(mn, Ge(Je(p(i))), null, 16),
1758
+ k(an, We(p(f), {
1759
+ onSubmitted: P[2] || (P[2] = (I) => p(u).fetchTemplates())
1760
+ }), null, 16)
1768
1761
  ]))
1769
1762
  ], 64);
1770
1763
  };
1771
1764
  }
1772
1765
  });
1773
1766
  export {
1774
- qn as default
1767
+ On as default
1775
1768
  };