@feedmepos/mf-inventory-portal 1.2.30-dev.1 → 1.2.31-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/dist/{App-kX4bqoEe.js → App-DfKh34ES.js} +43 -41
  2. package/dist/{ApprovalView-DCNKqVE2.js → ApprovalView-DyoKsEqh.js} +34 -28
  3. package/dist/{BindingsDialog-d7f1f8gf.js → BindingsDialog-7rGLzkyA.js} +8 -8
  4. package/dist/{BindingsPicker-2HJOx0QW.js → BindingsPicker-Cj1DvhQN.js} +6 -5
  5. package/dist/{BindingsTable-CPAjxOZG.js → BindingsTable-CAreptqr.js} +28 -24
  6. package/dist/{ClosingDraftView-CUng41eo.js → ClosingDraftView-DoDGz9Y8.js} +183 -175
  7. package/dist/{ClosingHistoryView-CcGc2NwU.js → ClosingHistoryView-BJSE7ZSv.js} +43 -41
  8. package/dist/{ClosingTemplateView-D8IAdhDb.js → ClosingTemplateView-Dr2eJk4h.js} +94 -76
  9. package/dist/{DeliveryOrderPrintPreview-BsM-CCc5.js → DeliveryOrderPrintPreview-BzYLm6J6.js} +15 -14
  10. package/dist/FmDroppableField-J0xUsOTV.js +154 -0
  11. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-cuggJ5Xd.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-16r_hkBE.js} +74 -72
  12. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Csesow4V.js +279 -0
  13. package/dist/FmMultiselectDialog-BGhSjgbj.js +597 -0
  14. package/dist/{FmMultiselectDialog-BGbrqXUF.js → FmMultiselectDialog-DUrpqAkF.js} +1 -1
  15. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-isogcN1O.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CSv7osJW.js} +51 -49
  16. package/dist/{ImportView-wAVrMEwL.js → ImportView-BAkyTU_3.js} +81 -74
  17. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DVUF4I2Q.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-z0IAsrH_.js} +5 -5
  18. package/dist/{IngredientGroupView-BZczeXdL.js → IngredientGroupView-D7gurA7T.js} +73 -65
  19. package/dist/{IngredientsView-D5N5Y1ZY.js → IngredientsView-hwfpMtTX.js} +358 -345
  20. package/dist/{IntegrationView-Hrslmuc1.js → IntegrationView-DwqzQ6E3.js} +1618 -1593
  21. package/dist/{InventoryBindingForm-DH6wgxOG.js → InventoryBindingForm-CwjM6Rqk.js} +1 -1
  22. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Drr5vD6f.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-BPr8PDwu.js} +41 -40
  23. package/dist/{InventoryBindingSummary-BU1ehpQZ.js → InventoryBindingSummary-B7UFFMkm.js} +1 -1
  24. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-1ueC4GfZ.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Djo2b2Ix.js} +5 -5
  25. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-FHcU1zZt.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BSgGGiN6.js} +22 -21
  26. package/dist/{PublishView-CQtj0f31.js → PublishView-CA9gFV_r.js} +26 -23
  27. package/dist/{PurchaseOrderPrintPreview-BQyXtHST.js → PurchaseOrderPrintPreview-BeHd82Y0.js} +10 -9
  28. package/dist/{ReceiveRequestView-Dm-h_SrY.js → ReceiveRequestView-DEthRdM1.js} +472 -456
  29. package/dist/{RecipeView-DNNRvr1w.js → RecipeView-D45gkYHY.js} +73 -64
  30. package/dist/SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js +251 -0
  31. package/dist/{StockView-CaOm5BCx.js → StockView-COx7A4Ac.js} +292 -282
  32. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Z91XRszD.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DX35xDkm.js} +1 -1
  33. package/dist/{SupplierView-JSII9qwL.js → SupplierView-DHM3dJMZ.js} +92 -80
  34. package/dist/SystemTrailDialog.vue_vue_type_script_setup_true_lang-Bg2K2ULw.js +177 -0
  35. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +135 -0
  36. package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CyMEGFh5.js +123 -0
  37. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-Mehd4lGs.js → TransferDetails.vue_vue_type_script_setup_true_lang-CVm2bXic.js} +318 -305
  38. package/dist/{TransferTemplateView-DyCpNKJd.js → TransferTemplateView-BtYozLuk.js} +228 -216
  39. package/dist/{UnitView-CqN7mlJ2.js → UnitView-B4mqodQa.js} +70 -63
  40. package/dist/{WarehouseView-gFWD-m8e.js → WarehouseView-CjDM8L_V.js} +123 -114
  41. package/dist/WastageTemplateView-Be4Y_zV8.js +2288 -0
  42. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  43. package/dist/api/netsuite.d.ts +9 -3
  44. package/dist/app-DYsP0gKj.js +64121 -0
  45. package/dist/app-rgirz_52.js +8024 -0
  46. package/dist/app.js +6 -6
  47. package/dist/closing-template-BVy1ga2g.js +117 -0
  48. package/dist/date2-BO7HiZTk.js +116 -0
  49. package/dist/dayjs.min-HNt4C1ja.js +282 -0
  50. package/dist/{decimal-DfF_g5rc.js → decimal-BJ8rKm1R.js} +4 -3
  51. package/dist/defineDeepModel-CidpVmK7.js +19 -0
  52. package/dist/duplicate-template-C25Z0lvq.js +34 -0
  53. package/dist/feature-DCia3aqG.js +20162 -0
  54. package/dist/form-mode.enum-BKiNVH6A.js +4 -0
  55. package/dist/format-time-from-id-BPws326b.js +15 -0
  56. package/dist/{format-unit-display-ivAljvlo.js → format-unit-display-C2P3mS8l.js} +308 -297
  57. package/dist/{import-export.helper-B2MWv9v7.js → import-export.helper-Dt6ZMAPT.js} +56 -52
  58. package/dist/{index-DZaT0ZaL.js → index-6zxXdF-V.js} +1 -1
  59. package/dist/index-BjUDHtA2.js +45 -0
  60. package/dist/{index-BbhuWHyh.js → index-tZj47B-j.js} +16 -14
  61. package/dist/lodash-DLMgBu6M.js +3678 -0
  62. package/dist/netsuite-BSMLXIQa.js +4979 -0
  63. package/dist/{purchase-order-template-DdybMC_P.js → purchase-order-template-D5NGCbI2.js} +1 -1
  64. package/dist/router/shared.spec.d.ts +1 -0
  65. package/dist/row-action.enum-BcW_L_nE.js +67 -0
  66. package/dist/rules-BiaGzhvQ.js +201 -0
  67. package/dist/{stock-BYagIdsj.js → stock-DOCQ91Jh.js} +1 -1
  68. package/dist/{stock-V4ciPiBe.js → stock-Ty-89Ap8.js} +11 -10
  69. package/dist/stores/integration/netsuite.d.ts +5 -1
  70. package/dist/style.css +1 -1
  71. package/dist/{supplier-CgtB1I9I.js → supplier-Dxb5ULjF.js} +27 -26
  72. package/dist/tsconfig.app.tsbuildinfo +1 -1
  73. package/dist/{use-ingredient-select-dialog-BIQovyZX.js → use-ingredient-select-dialog-BI0yIG6A.js} +4 -3
  74. package/dist/{use-inventory-binding-dialog-DyjicXgc.js → use-inventory-binding-dialog-CbZC-VuL.js} +4 -3
  75. package/dist/use-template-enabled-locations-2-Dhttpl0B.js +111 -0
  76. package/dist/views/adjustment-template/wastage-template/table.d.ts +1 -1
  77. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +1 -1
  78. package/dist/views/integration/components/netsuite/business/BusinessNetSuiteSideSheet.vue.d.ts +6 -2
  79. package/dist/vue-i18n-Cqx7gNJF.js +2365 -0
  80. package/dist/xlsx-ex8Bmftq.js +24004 -0
  81. package/dist/xlsx.util-C8YXEqEl.js +78 -0
  82. package/package.json +2 -2
  83. package/dist/app-CnQ49Lyb.js +0 -131483
@@ -1,11 +1,18 @@
1
- import { defineComponent as De, ref as F, computed as J, watch as ze, resolveComponent as Y, openBlock as N, createElementBlock as D, createVNode as A, normalizeClass as ce, unref as i, createSlots as Ke, withCtx as Q, createElementVNode as n, createBlock as se, toDisplayString as a, createCommentVNode as Z, Fragment as Be, renderList as Pe, shallowRef as $e, h as Ie, createTextVNode as k } from "vue";
2
- import { a as ie, as as je, a0 as Fe, aq as Ve, X as We, n as pe, ap as Re, C as Le, E as Je, G as Xe, I as ke, c as qe } from "./app-CnQ49Lyb.js";
3
- import { useCoreStore as Ce, useI18n as Oe } from "@feedmepos/mf-common";
4
- import { useDialogChild as Qe, useSnackbar as He, useDialog as Ye, useBreakpoints as Ze } from "@feedmepos/ui-library";
5
- import { s as et, g as tt, b as nt, d as Ae } from "./import-export.helper-B2MWv9v7.js";
6
- import { r as ot } from "./random-CSbEbElR.js";
1
+ import { defineComponent as De, ref as F, computed as J, watch as ze, resolveComponent as Y, openBlock as G, createElementBlock as D, createVNode as A, normalizeClass as ce, unref as i, createSlots as Ke, withCtx as Q, createElementVNode as n, createBlock as se, toDisplayString as a, createCommentVNode as Z, Fragment as Be, renderList as Pe, shallowRef as $e, h as Ie, createTextVNode as k } from "vue";
2
+ import { u as Ve, _ as ke } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js";
3
+ import { useCoreStore as Re, useI18n as je } from "@feedmepos/mf-common";
4
+ import { useDialogChild as We, useSnackbar as Oe, useDialog as Le, useBreakpoints as Je } from "@feedmepos/ui-library";
5
+ import { u as Xe } from "./feature-DCia3aqG.js";
6
+ import { a as ie } from "./app-DYsP0gKj.js";
7
+ import "./dayjs.min-HNt4C1ja.js";
8
+ import "./app-rgirz_52.js";
9
+ import { s as He, a as qe, d as Qe, t as Ce, r as Ye } from "./xlsx.util-C8YXEqEl.js";
10
+ import { s as Ze, g as et, b as tt, d as Fe } from "./import-export.helper-Dt6ZMAPT.js";
11
+ import { r as nt } from "./random-CSbEbElR.js";
12
+ import { d as Ae, a as pe } from "./rules-BiaGzhvQ.js";
13
+ import { F as ot } from "./FmDroppableField-J0xUsOTV.js";
7
14
  function Ee() {
8
- return `measurement_${(/* @__PURE__ */ new Date()).toISOString()}_${ot()}`;
15
+ return `measurement_${(/* @__PURE__ */ new Date()).toISOString()}_${nt()}`;
9
16
  }
10
17
  function rt(U) {
11
18
  const [
@@ -16,7 +23,7 @@ function rt(U) {
16
23
  E,
17
24
  x,
18
25
  ...r
19
- ] = je(U);
26
+ ] = He(U);
20
27
  if (!e || !e.length || e.some((p) => p.length && !p.startsWith("system:")))
21
28
  throw new Error("Missing meta header. Excel file does not come from the template.");
22
29
  const l = e.map((p) => p.split(":")[1]), u = ["name", "symbol", "precision"].filter((p) => !l.includes(p));
@@ -136,20 +143,20 @@ function it(U, { ignoreErrors: e = !1 } = {}) {
136
143
  } else
137
144
  y.push(`Invalid type '${o.data.type}'. Must be 'INGREDIENT', 'RECIPE', or 'SKU_GROUP'`);
138
145
  o.data.amount || y.push(`Invalid amount '${o.data.amount}'. Must be a valid number`);
139
- let G;
140
- if ((o.data.unit || o.data.baseUnit) && o.data.type !== "RECIPE" && o.data.type !== "SKU_GROUP" && (G = l.find((w) => {
146
+ let N;
147
+ if ((o.data.unit || o.data.baseUnit) && o.data.type !== "RECIPE" && o.data.type !== "SKU_GROUP" && (N = l.find((w) => {
141
148
  var I, ee;
142
149
  return w.abbrev === o.data.baseUnit && ((I = w.name) == null ? void 0 : I.trim()) === ((ee = o.data.unit) == null ? void 0 : ee.trim());
143
- }), G || (o.data.baseUnit && o.data.unit ? y.push(`Cannot find unit with symbol '${o.data.baseUnit}' and name '${o.data.unit}'`) : o.data.baseUnit ? y.push(`Cannot find unit with symbol '${o.data.baseUnit}'`) : o.data.unit && y.push(`Cannot find unit with name '${o.data.unit}'`))), y.length > 0 && s.push(`Row ${o.index + 6}: ${y.join(", ")}`), e || y.length === 0) {
150
+ }), N || (o.data.baseUnit && o.data.unit ? y.push(`Cannot find unit with symbol '${o.data.baseUnit}' and name '${o.data.unit}'`) : o.data.baseUnit ? y.push(`Cannot find unit with symbol '${o.data.baseUnit}'`) : o.data.unit && y.push(`Cannot find unit with name '${o.data.unit}'`))), y.length > 0 && s.push(`Row ${o.index + 6}: ${y.join(", ")}`), e || y.length === 0) {
144
151
  let w;
145
- if (o.data.type === "RECIPE" || o.data.type === "SKU_GROUP" ? w = void 0 : w = (R = G == null ? void 0 : G.measurements) == null ? void 0 : R.find((I) => I.abbrev === o.data.measurementName), o.data.recipeName)
152
+ if (o.data.type === "RECIPE" || o.data.type === "SKU_GROUP" ? w = void 0 : w = (R = N == null ? void 0 : N.measurements) == null ? void 0 : R.find((I) => I.abbrev === o.data.measurementName), o.data.recipeName)
146
153
  u[o.data.recipeName] = {
147
154
  name: o.data.recipeName,
148
- customAttributes: o.data.customAttributes ? et(o.data.customAttributes) : {},
155
+ customAttributes: o.data.customAttributes ? Ze(o.data.customAttributes) : {},
149
156
  contains: [{
150
157
  type: o.data.type === "INGREDIENT" ? "SKU" : o.data.type,
151
158
  id: _,
152
- amount: Fe(+o.data.amount),
159
+ amount: Ae(+o.data.amount),
153
160
  measurement: w || void 0
154
161
  }]
155
162
  }, s[o.data.recipeName] = y.length > 0 ? `Row ${o.index + 6}: ${y.join(", ")}` : [];
@@ -162,7 +169,7 @@ function it(U, { ignoreErrors: e = !1 } = {}) {
162
169
  {
163
170
  type: o.data.type === "INGREDIENT" ? "SKU" : o.data.type,
164
171
  id: _,
165
- amount: Fe(+o.data.amount),
172
+ amount: Ae(+o.data.amount),
166
173
  measurement: w || void 0
167
174
  }
168
175
  ]
@@ -216,7 +223,7 @@ function at(U) {
216
223
  E,
217
224
  x,
218
225
  ...r
219
- ] = je(U);
226
+ ] = He(U);
220
227
  if (!e || !e.length || e.some((p) => p.length && !p.startsWith("system:")))
221
228
  throw new Error("Missing meta header. Excel file does not come from the template.");
222
229
  const l = e.map((p) => p.split(":")[1]), u = ["code", "recipeName", "unit", "baseUnit", "type", "amount"].filter((p) => !l.includes(p));
@@ -235,12 +242,12 @@ function at(U) {
235
242
  data: f
236
243
  };
237
244
  }).filter((p) => {
238
- const { recipeName: b, type: f, code: d, name: o, amount: y, unit: _, baseUnit: G, measurementName: w, customAttributes: I } = p.data;
239
- return b || f || d || o || y || _ || G || w || I;
245
+ const { recipeName: b, type: f, code: d, name: o, amount: y, unit: _, baseUnit: N, measurementName: w, customAttributes: I } = p.data;
246
+ return b || f || d || o || y || _ || N || w || I;
240
247
  });
241
248
  }
242
249
  function lt() {
243
- const e = Ce().currentBusiness.value, R = ie(), g = [
250
+ const e = Re().currentBusiness.value, R = ie(), g = [
244
251
  { id: "name", name: "Unit Name" },
245
252
  { id: "symbol", name: "Symbol" },
246
253
  { id: "precision", name: "Precision" },
@@ -294,10 +301,10 @@ function lt() {
294
301
  g.map((r) => r.name),
295
302
  ...h
296
303
  ], x = g.map((r) => `system:${r.id}`);
297
- return Re(E, x);
304
+ return Ce(E, x);
298
305
  }
299
306
  function mt() {
300
- const e = Ce().currentBusiness.value, R = ie(), g = nt();
307
+ const e = Re().currentBusiness.value, R = ie(), g = tt();
301
308
  let h = [];
302
309
  R.skus.length > 0 ? h = R.skus.map((r) => {
303
310
  var l, s, u, v, p, b, f, d;
@@ -309,8 +316,8 @@ function mt() {
309
316
  ((v = (u = r.unit) == null ? void 0 : u.measurements.find((o) => o.id === r.trackingMeasurement)) == null ? void 0 : v.abbrev) ?? r.unit.abbrev,
310
317
  r.valuation || "WAVG",
311
318
  (p = r.defaultCost) != null && p.costPerUnit ? +pe((b = r.defaultCost) == null ? void 0 : b.costPerUnit) : 0,
312
- ((f = r.thresholds) == null ? void 0 : f.low) ?? Ae().low,
313
- ((d = r.thresholds) == null ? void 0 : d.mid) ?? Ae().mid,
319
+ ((f = r.thresholds) == null ? void 0 : f.low) ?? Fe().low,
320
+ ((d = r.thresholds) == null ? void 0 : d.mid) ?? Fe().mid,
314
321
  r.customAttributes ? Object.entries(r.customAttributes).map(([o, y]) => `${o}:${y}`).join("|") : ""
315
322
  ];
316
323
  }) : h = [
@@ -324,10 +331,10 @@ function mt() {
324
331
  g.map((r) => r.name),
325
332
  ...h
326
333
  ], x = g.map((r) => `system:${r.id}`);
327
- return Re(E, x);
334
+ return Ce(E, x);
328
335
  }
329
336
  function ut() {
330
- const e = Ce().currentBusiness.value, R = ie(), g = [
337
+ const e = Re().currentBusiness.value, R = ie(), g = [
331
338
  { id: "recipeName", name: "Recipe Name" },
332
339
  { id: "type", name: "Type" },
333
340
  { id: "code", name: "Code" },
@@ -362,12 +369,12 @@ function ut() {
362
369
  ];
363
370
  }),
364
371
  ...f.map((o, y) => {
365
- var _, G, w, I, ee, ve, ye, ge, fe, ae, be, le, he, xe, _e, we;
372
+ var _, N, w, I, ee, ve, ye, ge, fe, ae, be, le, he, xe, _e, we;
366
373
  return [
367
374
  !b.length && y === 0 ? u.name : "",
368
375
  "INGREDIENT",
369
376
  ((_ = l[o.id]) == null ? void 0 : _.code) || "",
370
- ((G = l[o.id]) == null ? void 0 : G.name) || "",
377
+ ((N = l[o.id]) == null ? void 0 : N.name) || "",
371
378
  +pe(o.amount),
372
379
  o.measurement ? ((I = (w = l[o.id]) == null ? void 0 : w.unit) == null ? void 0 : I.name) || "" : ((ve = (ee = l[o.id]) == null ? void 0 : ee.unit) == null ? void 0 : ve.name) || "",
373
380
  o.measurement ? ((ge = (ye = l[o.id]) == null ? void 0 : ye.unit) == null ? void 0 : ge.abbrev) || "" : ((ae = (fe = l[o.id]) == null ? void 0 : fe.unit) == null ? void 0 : ae.abbrev) || "",
@@ -379,12 +386,12 @@ function ut() {
379
386
  ];
380
387
  }),
381
388
  ...d.map((o, y) => {
382
- var _, G;
389
+ var _, N;
383
390
  return [
384
391
  b.length === 0 && f.length === 0 && y === 0 ? u.name : "",
385
392
  "SKU_GROUP",
386
393
  ((_ = s[o.id]) == null ? void 0 : _.ref) || "",
387
- ((G = s[o.id]) == null ? void 0 : G.name) || "",
394
+ ((N = s[o.id]) == null ? void 0 : N.name) || "",
388
395
  +pe(o.amount),
389
396
  "",
390
397
  "unit",
@@ -410,15 +417,15 @@ function ut() {
410
417
  g.map((r) => r.name),
411
418
  ...h
412
419
  ], x = g.map((r) => `system:${r.id}`);
413
- return Re(E, x);
420
+ return Ce(E, x);
414
421
  }
415
422
  function dt() {
416
- const U = Ve({
423
+ const U = qe({
417
424
  unit: lt(),
418
425
  ingredient: mt(),
419
426
  recipe: ut()
420
427
  }), e = "FeedMe comprehensive template.xlsx";
421
- return We(U, e), e;
428
+ return Qe(U, e), e;
422
429
  }
423
430
  async function ct(U) {
424
431
  if (!U) return null;
@@ -431,7 +438,7 @@ async function ct(U) {
431
438
  async function pt(U) {
432
439
  if (!U) return null;
433
440
  try {
434
- return tt(U);
441
+ return et(U);
435
442
  } catch (e) {
436
443
  throw console.error("Error in processIngredientsSheet:", e), e;
437
444
  }
@@ -457,15 +464,15 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
457
464
  }, It = { class: "fm-typo-en-body-lg-600" }, Et = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, St = /* @__PURE__ */ De({
458
465
  __name: "ImportDialog",
459
466
  setup(U) {
460
- const e = F(null), R = Qe();
461
- He();
462
- const g = F(!1), h = F(new Array()), E = F(null), x = F([]), r = F([]), l = J(() => !!h.value.length), s = J(() => !!E.value && x.value.length > 0), { t: u } = Oe();
467
+ const e = F(null), R = We();
468
+ Oe();
469
+ const g = F(!1), h = F(new Array()), E = F(null), x = F([]), r = F([]), l = J(() => !!h.value.length), s = J(() => !!E.value && x.value.length > 0), { t: u } = je();
463
470
  async function v(f) {
464
471
  h.value = [], E.value = null, x.value = [], r.value = [];
465
472
  try {
466
473
  g.value = !0;
467
474
  const [d] = await Promise.all([
468
- Je(f),
475
+ Ye(f),
469
476
  // fake buffer for UX
470
477
  new Promise((o) => setTimeout(o, 1e3))
471
478
  ]);
@@ -507,20 +514,20 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
507
514
  }
508
515
  return (f, d) => {
509
516
  const o = Y("FmCircularProgress"), y = Y("FmIcon"), _ = Y("FmButton");
510
- return N(), D("div", yt, [
511
- A(Le, {
517
+ return G(), D("div", yt, [
518
+ A(ot, {
512
519
  class: ce({
513
520
  "w-full": !0,
514
521
  "h-[200px]": !e.value
515
522
  }),
516
523
  accept: ".xlsx,.xls",
517
- onFileUpload: d[0] || (d[0] = (G) => e.value = G),
524
+ onFileUpload: d[0] || (d[0] = (N) => e.value = N),
518
525
  label: i(u)("inventory.ingredient.import.uploadTemplate"),
519
526
  "button-label": i(u)("inventory.ingredient.import.selectFile")
520
527
  }, Ke({ _: 2 }, [
521
528
  e.value ? {
522
529
  name: "default",
523
- fn: Q(({ openFileDialog: G }) => [
530
+ fn: Q(({ openFileDialog: N }) => [
524
531
  n("div", gt, [
525
532
  n("div", {
526
533
  class: ce([
@@ -532,11 +539,11 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
532
539
  }
533
540
  ])
534
541
  }, [
535
- g.value ? (N(), se(o, {
542
+ g.value ? (G(), se(o, {
536
543
  key: 0,
537
544
  size: "md",
538
545
  color: "neutral-gray-200"
539
- })) : (N(), se(y, {
546
+ })) : (G(), se(y, {
540
547
  key: 1,
541
548
  name: l.value ? "error" : "check_circle",
542
549
  color: l.value ? "system-error-300" : "system-success-400",
@@ -554,17 +561,17 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
554
561
  ])
555
562
  }, a(l.value ? i(u)("inventory.ingredient.import.error.invalidContent") : "File valid"), 3)
556
563
  ]),
557
- g.value ? Z("", !0) : (N(), D("div", ht, [
564
+ g.value ? Z("", !0) : (G(), D("div", ht, [
558
565
  A(_, {
559
566
  label: i(u)("inventory.ingredient.import.replaceFile"),
560
567
  variant: l.value ? "destructive" : "secondary",
561
568
  "prepend-icon": l.value ? void 0 : "autorenew",
562
- onClick: G
569
+ onClick: N
563
570
  }, null, 8, ["label", "variant", "prepend-icon", "onClick"])
564
571
  ]))
565
572
  ], 2),
566
- h.value.length ? (N(), D("div", xt, [
567
- (N(!0), D(Be, null, Pe(h.value, (w, I) => (N(), D("div", {
573
+ h.value.length ? (G(), D("div", xt, [
574
+ (G(!0), D(Be, null, Pe(h.value, (w, I) => (G(), D("div", {
568
575
  key: I,
569
576
  class: "flex gap-8 items-center"
570
577
  }, [
@@ -581,7 +588,7 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
581
588
  key: "0"
582
589
  } : void 0
583
590
  ]), 1032, ["class", "label", "button-label"]),
584
- s.value ? (N(), D("div", wt, [
591
+ s.value ? (G(), D("div", wt, [
585
592
  n("div", It, a(i(u)("inventory.ingredient.import.summary")), 1),
586
593
  n("div", Et, a(b()), 1)
587
594
  ])) : Z("", !0)
@@ -591,7 +598,7 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
591
598
  }), kt = {
592
599
  key: 0,
593
600
  class: "bg-blue-50 border border-blue-200 rounded-lg p-16"
594
- }, Rt = { class: "flex items-start gap-12" }, Ct = { class: "flex flex-col gap-8" }, Ut = { class: "fm-typo-en-body-md-400 text-blue-800" }, Gt = { class: "fm-typo-en-body-sm-400 text-blue-700" }, Nt = { class: "mb-8" }, Tt = ["innerHTML"], Mt = ["innerHTML"], $t = { class: "mb-8" }, Ft = { class: "mb-12" }, At = { class: "mb-12" }, Dt = { class: "mb-8" }, Bt = { class: "text-orange-600" }, Pt = {
601
+ }, Rt = { class: "flex items-start gap-12" }, Ct = { class: "flex flex-col gap-8" }, Ut = { class: "fm-typo-en-body-md-400 text-blue-800" }, Nt = { class: "fm-typo-en-body-sm-400 text-blue-700" }, Gt = { class: "mb-8" }, Tt = ["innerHTML"], Mt = ["innerHTML"], $t = { class: "mb-8" }, Ft = { class: "mb-12" }, At = { class: "mb-12" }, Dt = { class: "mb-8" }, Bt = { class: "text-orange-600" }, Pt = {
595
602
  key: 1,
596
603
  class: "bg-white rounded-lg shadow"
597
604
  }, jt = { class: "flex items-center justify-between p-16 border-b" }, Ot = { class: "fm-typo-en-title-md-600" }, Ht = { class: "fm-typo-en-body-sm-400 text-gray-600 mt-4" }, zt = {
@@ -609,14 +616,14 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
609
616
  }, Xt = { class: "flex items-center justify-between p-16 border-b" }, qt = { class: "fm-typo-en-title-md-600 text-red-800" }, Qt = { class: "fm-typo-en-body-sm-400 text-gray-600 mt-4" }, Yt = { class: "flex gap-8" }, Zt = { class: "p-16" }, en = {
610
617
  key: 0,
611
618
  class: "flex flex-col gap-16 p-16"
612
- }, tn = { class: "fm-typo-en-title-sm-600 mb-12" }, nn = { class: "grid grid-cols-2 gap-12" }, on = { class: "fm-typo-en-body-sm-400 text-gray-600" }, rn = { class: "fm-typo-en-body-md-600" }, sn = { key: 0 }, an = { class: "fm-typo-en-body-sm-400 text-gray-600" }, ln = { class: "fm-typo-en-body-md-600" }, mn = { class: "fm-typo-en-body-sm-400 text-gray-600" }, un = { class: "fm-typo-en-body-md-600" }, dn = { class: "fm-typo-en-body-sm-400 text-gray-600" }, cn = { class: "fm-typo-en-body-md-600" }, pn = { class: "fm-typo-en-body-sm-400 text-gray-600" }, vn = { class: "fm-typo-en-title-sm-600 mb-12 text-red-800" }, yn = { class: "space-y-8" }, gn = { class: "fm-typo-en-body-md-400 text-red-800" }, fn = { class: "fm-typo-en-title-sm-600 mb-12" }, bn = { class: "bg-gray-50 p-12 rounded border overflow-auto" }, hn = { class: "text-sm" }, xn = { class: "flex gap-8" }, _n = { class: "flex flex-col items-center justify-center h-64 gap-16" }, wn = { class: "text-center" }, In = { class: "fm-typo-en-title-md-600 text-gray-600 mb-8" }, En = { class: "flex flex-col items-center justify-center h-64 gap-16" }, Sn = { class: "text-center" }, kn = { class: "fm-typo-en-title-md-600 text-gray-600 mb-8" }, Rn = { class: "fm-typo-en-body-md-400 text-gray-500" }, $n = /* @__PURE__ */ De({
619
+ }, tn = { class: "fm-typo-en-title-sm-600 mb-12" }, nn = { class: "grid grid-cols-2 gap-12" }, on = { class: "fm-typo-en-body-sm-400 text-gray-600" }, rn = { class: "fm-typo-en-body-md-600" }, sn = { key: 0 }, an = { class: "fm-typo-en-body-sm-400 text-gray-600" }, ln = { class: "fm-typo-en-body-md-600" }, mn = { class: "fm-typo-en-body-sm-400 text-gray-600" }, un = { class: "fm-typo-en-body-md-600" }, dn = { class: "fm-typo-en-body-sm-400 text-gray-600" }, cn = { class: "fm-typo-en-body-md-600" }, pn = { class: "fm-typo-en-body-sm-400 text-gray-600" }, vn = { class: "fm-typo-en-title-sm-600 mb-12 text-red-800" }, yn = { class: "space-y-8" }, gn = { class: "fm-typo-en-body-md-400 text-red-800" }, fn = { class: "fm-typo-en-title-sm-600 mb-12" }, bn = { class: "bg-gray-50 p-12 rounded border overflow-auto" }, hn = { class: "text-sm" }, xn = { class: "flex gap-8" }, _n = { class: "flex flex-col items-center justify-center h-64 gap-16" }, wn = { class: "text-center" }, In = { class: "fm-typo-en-title-md-600 text-gray-600 mb-8" }, En = { class: "flex flex-col items-center justify-center h-64 gap-16" }, Sn = { class: "text-center" }, kn = { class: "fm-typo-en-title-md-600 text-gray-600 mb-8" }, Rn = { class: "fm-typo-en-body-md-400 text-gray-500" }, On = /* @__PURE__ */ De({
613
620
  __name: "ImportView",
614
621
  setup(U) {
615
- const { t: e } = Oe(), R = Ye(), g = He();
616
- Xe();
617
- const h = qe(), { breakpoints: E } = Ze(), x = ie(), r = F("");
622
+ const { t: e } = je(), R = Le(), g = Oe();
623
+ Ve();
624
+ const h = Xe(), { breakpoints: E } = Je(), x = ie(), r = F("");
618
625
  F(!1);
619
- const l = F(!1), s = F(null), u = F(!1), v = F(null), p = F(!1), b = F([]), f = F(null), d = F([]), o = F(!1), y = J(() => E.value.xs || E.value.sm), _ = J(() => y.value ? 10 : 20), G = J(() => {
626
+ const l = F(!1), s = F(null), u = F(!1), v = F(null), p = F(!1), b = F([]), f = F(null), d = F([]), o = F(!1), y = J(() => E.value.xs || E.value.sm), _ = J(() => y.value ? 10 : 20), N = J(() => {
620
627
  const m = s.value;
621
628
  if (!m) return [];
622
629
  const t = [], { units: C, skus: B, recipes: W, _invalidExcel: z, _invalidExcelMessage: X } = m, q = (M) => {
@@ -639,12 +646,12 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
639
646
  }
640
647
  };
641
648
  return H(C, e("inventory.common.unit")), H(B, e("inventory.common.ingredient")), H(W, e("inventory.common.recipe")), t;
642
- }), w = J(() => G.value.some(
649
+ }), w = J(() => N.value.some(
643
650
  (m) => m.errors && m.errors.length > 0
644
- )), I = J(() => G.value.some(
651
+ )), I = J(() => N.value.some(
645
652
  (m) => m.status && m.status.includes("Invalid Excel")
646
653
  )), ee = J(() => {
647
- const m = G.value.find(
654
+ const m = N.value.find(
648
655
  (t) => t.status && t.status.includes("Invalid Excel")
649
656
  );
650
657
  return (m == null ? void 0 : m.status) || e("inventory.common.invalidExcelFormatDetected");
@@ -781,7 +788,7 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
781
788
  }
782
789
  }
783
790
  async function be() {
784
- var m, t, C, B, W, z, X, q, H, M, O, j, K, P, me, ue, L, S, $, Ue, Ge, Ne, Te, Me;
791
+ var m, t, C, B, W, z, X, q, H, M, O, j, K, P, me, ue, L, S, $, Ue, Ne, Ge, Te, Me;
785
792
  if (s.value) {
786
793
  if (I.value) {
787
794
  g.open({
@@ -868,7 +875,7 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
868
875
  }
869
876
  if (b.value.length > 0)
870
877
  await ae();
871
- else if (!(s.value.units && ((($ = s.value.units.create) == null ? void 0 : $.length) || ((Ue = s.value.units.update) == null ? void 0 : Ue.length)) || s.value.skus && (((Ge = s.value.skus.create) == null ? void 0 : Ge.length) || ((Ne = s.value.skus.update) == null ? void 0 : Ne.length)) || s.value.recipes && (((Te = s.value.recipes.create) == null ? void 0 : Te.length) || ((Me = s.value.recipes.update) == null ? void 0 : Me.length))))
878
+ else if (!(s.value.units && ((($ = s.value.units.create) == null ? void 0 : $.length) || ((Ue = s.value.units.update) == null ? void 0 : Ue.length)) || s.value.skus && (((Ne = s.value.skus.create) == null ? void 0 : Ne.length) || ((Ge = s.value.skus.update) == null ? void 0 : Ge.length)) || s.value.recipes && (((Te = s.value.recipes.create) == null ? void 0 : Te.length) || ((Me = s.value.recipes.update) == null ? void 0 : Me.length))))
872
879
  if (le(), d.value.length > 0) {
873
880
  const c = d.value.filter((de) => de.type === "units").length, te = d.value.filter((de) => de.type === "ingredients").length, ne = d.value.filter((de) => de.type === "recipes").length, re = c + te + ne;
874
881
  o.value = !0, g.open({
@@ -968,7 +975,7 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
968
975
  ]);
969
976
  return (m, t) => {
970
977
  const C = Y("FmIcon"), B = Y("FmButton"), W = Y("FmTable"), z = Y("FmCard"), X = Y("FmSideSheet"), q = Y("FmSpinner");
971
- return i(h).isLoaded && i(h).enableBulkImport ? (N(), se(ke, {
978
+ return i(h).isLoaded && i(h).enableBulkImport ? (G(), se(ke, {
972
979
  key: 0,
973
980
  title: i(e)("inventory.common.import"),
974
981
  actions: _e.value,
@@ -986,7 +993,7 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
986
993
  }
987
994
  ])
988
995
  }, [
989
- u.value ? Z("", !0) : (N(), D("div", kt, [
996
+ u.value ? Z("", !0) : (G(), D("div", kt, [
990
997
  n("div", Rt, [
991
998
  A(C, {
992
999
  name: "info",
@@ -994,8 +1001,8 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
994
1001
  }),
995
1002
  n("div", Ct, [
996
1003
  n("div", Ut, a(i(e)("inventory.ingredient.import.multiUploadTemplateInstruction")), 1),
997
- n("div", Gt, [
998
- n("div", Nt, [
1004
+ n("div", Nt, [
1005
+ n("div", Gt, [
999
1006
  n("strong", null, a(i(e)("inventory.ingredient.import.importInstructions.detailedGuide.title")), 1)
1000
1007
  ]),
1001
1008
  t[39] || (t[39] = k(" 1. ")),
@@ -1092,12 +1099,12 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
1092
1099
  ])
1093
1100
  ])
1094
1101
  ])),
1095
- u.value ? (N(), D("div", Pt, [
1102
+ u.value ? (G(), D("div", Pt, [
1096
1103
  n("div", jt, [
1097
1104
  n("div", null, [
1098
1105
  n("div", Ot, a(i(e)("inventory.common.importPreview")), 1),
1099
1106
  n("div", Ht, [
1100
- I.value ? (N(), D("span", zt, a(i(e)("inventory.common.errorExist")) + ": " + a(ee.value), 1)) : w.value ? (N(), D("span", Kt, a(i(e)("inventory.common.someItemsValidationErrors")), 1)) : (N(), D("span", Vt, a(i(e)("inventory.common.allItemsValidReadyImport")), 1))
1107
+ I.value ? (G(), D("span", zt, a(i(e)("inventory.common.errorExist")) + ": " + a(ee.value), 1)) : w.value ? (G(), D("span", Kt, a(i(e)("inventory.common.someItemsValidationErrors")), 1)) : (G(), D("span", Vt, a(i(e)("inventory.common.allItemsValidReadyImport")), 1))
1101
1108
  ])
1102
1109
  ]),
1103
1110
  n("div", Wt, [
@@ -1118,7 +1125,7 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
1118
1125
  n("div", Lt, [
1119
1126
  A(W, {
1120
1127
  "column-defs": we.value,
1121
- "row-data": G.value,
1128
+ "row-data": N.value,
1122
1129
  "page-size": _.value,
1123
1130
  "search-value": r.value,
1124
1131
  loading: !1,
@@ -1126,7 +1133,7 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
1126
1133
  }, null, 8, ["column-defs", "row-data", "page-size", "search-value"])
1127
1134
  ])
1128
1135
  ])) : Z("", !0),
1129
- o.value && d.value.length > 0 ? (N(), D("div", Jt, [
1136
+ o.value && d.value.length > 0 ? (G(), D("div", Jt, [
1130
1137
  n("div", Xt, [
1131
1138
  n("div", null, [
1132
1139
  n("div", qt, a(i(e)("inventory.common.importErrors")), 1),
@@ -1169,7 +1176,7 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
1169
1176
  ])
1170
1177
  ]),
1171
1178
  default: Q(() => [
1172
- v.value != null ? (N(), D("div", en, [
1179
+ v.value != null ? (G(), D("div", en, [
1173
1180
  A(z, {
1174
1181
  variant: "outlined",
1175
1182
  class: "p-16"
@@ -1183,7 +1190,7 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
1183
1190
  n("div", on, a(i(e)("inventory.common.name")), 1),
1184
1191
  n("div", rn, a(((O = (M = v.value) == null ? void 0 : M.details) == null ? void 0 : O.name) || ((j = v.value) == null ? void 0 : j.name)), 1)
1185
1192
  ]),
1186
- (P = (K = v.value) == null ? void 0 : K.details) != null && P.code ? (N(), D("div", sn, [
1193
+ (P = (K = v.value) == null ? void 0 : K.details) != null && P.code ? (G(), D("div", sn, [
1187
1194
  n("div", an, a(i(e)("inventory.common.code")), 1),
1188
1195
  n("div", ln, a(v.value.details.code), 1)
1189
1196
  ])) : Z("", !0),
@@ -1209,7 +1216,7 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
1209
1216
  }),
1210
1217
  _: 1
1211
1218
  }),
1212
- v.value.errors && v.value.errors.length > 0 ? (N(), se(z, {
1219
+ v.value.errors && v.value.errors.length > 0 ? (G(), se(z, {
1213
1220
  key: 0,
1214
1221
  variant: "outlined",
1215
1222
  class: "p-16"
@@ -1217,7 +1224,7 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
1217
1224
  default: Q(() => [
1218
1225
  n("div", vn, a(i(e)("inventory.common.validationErrors")), 1),
1219
1226
  n("div", yn, [
1220
- (N(!0), D(Be, null, Pe(v.value.errors, (M, O) => (N(), D("div", {
1227
+ (G(!0), D(Be, null, Pe(v.value.errors, (M, O) => (G(), D("div", {
1221
1228
  key: O,
1222
1229
  class: "flex items-start gap-8 p-12 bg-red-50 border border-red-200 rounded"
1223
1230
  }, [
@@ -1251,7 +1258,7 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
1251
1258
  ];
1252
1259
  }),
1253
1260
  _: 1
1254
- }, 8, ["title", "actions"])) : i(h).isLoaded ? (N(), se(ke, {
1261
+ }, 8, ["title", "actions"])) : i(h).isLoaded ? (G(), se(ke, {
1255
1262
  key: 2,
1256
1263
  title: i(e)("inventory.common.import")
1257
1264
  }, {
@@ -1269,7 +1276,7 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
1269
1276
  ])
1270
1277
  ]),
1271
1278
  _: 1
1272
- }, 8, ["title"])) : (N(), se(ke, {
1279
+ }, 8, ["title"])) : (G(), se(ke, {
1273
1280
  key: 1,
1274
1281
  title: i(e)("inventory.common.import")
1275
1282
  }, {
@@ -1287,5 +1294,5 @@ const yt = { class: "flex flex-col gap-24" }, gt = { class: "flex flex-col gap-8
1287
1294
  }
1288
1295
  });
1289
1296
  export {
1290
- $n as default
1297
+ On as default
1291
1298
  };
@@ -1,5 +1,5 @@
1
- import { defineComponent as p, openBlock as n, createElementBlock as s, createElementVNode as r, toDisplayString as o, unref as l, Fragment as d, renderList as x } from "vue";
2
- import { n as a, Z as y } from "./app-CnQ49Lyb.js";
1
+ import { defineComponent as p, openBlock as s, createElementBlock as n, createElementVNode as r, toDisplayString as o, unref as l, Fragment as d, renderList as x } from "vue";
2
+ import { a, f as y } from "./rules-BiaGzhvQ.js";
3
3
  import { useI18n as _ } from "@feedmepos/mf-common";
4
4
  const v = { class: "flex flex-col" }, g = { class: "flex flex-row fm-typo-en-body-md-600 bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary h-48 items-center" }, h = { class: "flex-1 py-8 px-16" }, b = {
5
5
  class: "flex-0 py-8 px-16",
@@ -31,17 +31,17 @@ const v = { class: "flex flex-col" }, g = { class: "flex flex-row fm-typo-en-bod
31
31
  function f(e) {
32
32
  return e.unit !== void 0;
33
33
  }
34
- return (e, i) => (n(), s("div", v, [
34
+ return (e, i) => (s(), n("div", v, [
35
35
  r("div", g, [
36
36
  r("div", h, o(e.name), 1),
37
37
  r("div", b, o(l(m)("inventory.ingredient.bindedItems.amount")), 1)
38
38
  ]),
39
- (n(!0), s(d, null, x(e.bindings, (t) => (n(), s("div", {
39
+ (s(!0), n(d, null, x(e.bindings, (t) => (s(), n("div", {
40
40
  key: t.id,
41
41
  class: "flex flex-row fm-typo-en-body-md-400 h-48 items-center border-b border-b-fm-color-neutral-gray-100"
42
42
  }, [
43
43
  r("div", k, o(t.name), 1),
44
- f(t) ? (n(), s("div", B, o(c(t, t.unit)), 1)) : (n(), s("div", I, o(l(a)(t.amount, !1)), 1))
44
+ f(t) ? (s(), n("div", B, o(c(t, t.unit)), 1)) : (s(), n("div", I, o(l(a)(t.amount, !1)), 1))
45
45
  ]))), 128))
46
46
  ]));
47
47
  }