@feedmepos/mf-inventory-portal 0.0.25-dev.37 → 0.0.25-dev.39

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 (46) hide show
  1. package/dist/{App-C0_9-oDP.js → App-B7L9LuKI.js} +2 -2
  2. package/dist/{ApprovalView-BDUbQAH0.js → ApprovalView-P7uUdpuJ.js} +2 -2
  3. package/dist/{BindingsDialog-BvKDyWAP.js → BindingsDialog-E4j9FuOl.js} +2 -2
  4. package/dist/{BindingsPicker-zAexcP3H.js → BindingsPicker-3mrWImf-.js} +1 -1
  5. package/dist/{BindingsTable-6dPndhbk.js → BindingsTable-DMoC7BEJ.js} +1 -1
  6. package/dist/{ClosingDraftView-NwwxcHA-.js → ClosingDraftView-hUFOQ9pI.js} +241 -237
  7. package/dist/{ClosingTemplateView-Cfh0BZXH.js → ClosingTemplateView-DGG2zD13.js} +2 -2
  8. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DKxW0e2c.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BjYwi7Vb.js} +3 -3
  9. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CD0p0eOE.js → FmUnitInput.vue_vue_type_script_setup_true_lang-B7CfRiCR.js} +1 -1
  10. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-eGofs51J.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DH5ud0qJ.js} +1 -1
  11. package/dist/{IngredientGroupView-Cz4zcWgF.js → IngredientGroupView-D63u-gSo.js} +1 -1
  12. package/dist/{IngredientsView-Ctmor1Ds.js → IngredientsView-DzzIoie9.js} +115 -106
  13. package/dist/{IntegrationView-DYV2ISmc.js → IntegrationView-SO7nVoSn.js} +1 -1
  14. package/dist/{InventoryBindingForm-Be75Cpzd.js → InventoryBindingForm-CNBLyKuy.js} +1 -1
  15. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-D8dK7h0Z.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-gcdA5y3h.js} +3 -3
  16. package/dist/{InventoryBindingSummary-Cw1Woc3L.js → InventoryBindingSummary-Cx5doszw.js} +1 -1
  17. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BhKk5nMz.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-uBLwHGx6.js} +1 -1
  18. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DECtXs-3.js → PremiumBadge.vue_vue_type_script_setup_true_lang-U-MNov1N.js} +1 -1
  19. package/dist/{PublishView-D9mnP1d8.js → PublishView-C7-F5H_l.js} +2 -2
  20. package/dist/{PurchaseOrderPrintPreview-2DOgQczG.js → PurchaseOrderPrintPreview-Cn1MGNQG.js} +1 -1
  21. package/dist/ReceiveRequestView-1ltlDUjA.js +2577 -0
  22. package/dist/{RecipeView-DTwkk7M_.js → RecipeView-CFEr9txv.js} +3 -3
  23. package/dist/{StockView-cd047f5L.js → StockView-BCuZoG8u.js} +7 -7
  24. package/dist/{SupplierView-CkYiC3sV.js → SupplierView-BFZYyzZE.js} +4 -4
  25. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-CE3vSlpG.js → TransferDetails.vue_vue_type_script_setup_true_lang-XKOcF4q9.js} +19 -20
  26. package/dist/TransferTemplateView-DAcRo6jQ.js +1526 -0
  27. package/dist/{UnitView-C-1I-kVv.js → UnitView-IzqKR_Ue.js} +3 -3
  28. package/dist/{WarehouseView-CJTtNzco.js → WarehouseView-D_lYd_zi.js} +1 -1
  29. package/dist/api/stock.d.ts +1 -0
  30. package/dist/{app-C720GM9g.js → app-D8JtDgcD.js} +1660 -1659
  31. package/dist/app.js +1 -1
  32. package/dist/{decimal-BCdHyq3s.js → decimal-BzA7nhoj.js} +1 -1
  33. package/dist/{feature-Df0TfAlQ.js → feature-DZpzqRzb.js} +1 -1
  34. package/dist/{format-unit-display-DhVGfJ3A.js → format-unit-display-gJA_tWyb.js} +2 -2
  35. package/dist/{index-BcO0U3XD.js → index-4_4oJqYY.js} +2 -2
  36. package/dist/{stock-AgQ9Kd12.js → stock-Cw4_XPhT.js} +29 -25
  37. package/dist/{supplier-y6wN-U1P.js → supplier-FQRxjLKh.js} +1 -1
  38. package/dist/tsconfig.app.tsbuildinfo +1 -1
  39. package/dist/{use-ingredient-select-dialog-DedAlRiZ.js → use-ingredient-select-dialog-CxxnIrMR.js} +1 -1
  40. package/dist/{use-inventory-binding-dialog-D6ESCCxB.js → use-inventory-binding-dialog-C9t7UpkK.js} +1 -1
  41. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +2 -2
  42. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +3 -2
  43. package/dist/{vue-i18n-C4yPgaCz.js → vue-i18n-UenefCe4.js} +321 -321
  44. package/package.json +3 -3
  45. package/dist/ReceiveRequestView-Ss803mII.js +0 -2547
  46. package/dist/TransferTemplateView-C6-6Db2r.js +0 -1524
@@ -1,18 +1,18 @@
1
1
  import { ref as Y, defineComponent as ne, computed as S, resolveComponent as C, openBlock as f, createBlock as P, withCtx as V, createVNode as c, unref as d, createElementBlock as T, Fragment as X, createElementVNode as m, createCommentVNode as O, renderSlot as pe, createTextVNode as $e, toDisplayString as A, normalizeClass as ee, onMounted as rt, watch as Ge, renderList as ie, isRef as Be, createSlots as We, normalizeStyle as st, Teleport as Ne, normalizeProps as it, guardReactiveProps as dt } from "vue";
2
- import { a as oe, d as W, e as Ke, S as ut, f as mt, D as ze, h as he, A as _e, b as Ee, i as Ze, j as xe, t as Je, k as fe, l as Ve, U as ct, m as pt, M as vt, n as Le, C as Se, o as He, p as Qe, q as ft, r as Xe, s as yt, v as gt, I as bt, w as ht, x as _t, u as xt, y as kt, _ as Vt, z as St, B as Ct, E as Oe } from "./app-C720GM9g.js";
3
- import { useDialog as et, useSnackbar as ke, useProxiedModel as Ye, useDialogChild as wt, useBreakpoints as Ft } from "@feedmepos/ui-library";
2
+ import { a as oe, d as W, e as Ke, S as ut, f as mt, D as ze, h as he, A as xe, b as Ee, i as Ze, j as ke, t as Je, k as fe, l as Se, U as ct, m as pt, M as vt, n as Le, C as Ce, o as He, p as Qe, q as ft, r as Xe, s as yt, v as gt, I as bt, w as ht, x as _t, u as xt, y as kt, _ as Vt, z as St, B as Ct, E as Oe } from "./app-D8JtDgcD.js";
3
+ import { useDialog as et, useSnackbar as Ve, useProxiedModel as Ye, useDialogChild as wt, useBreakpoints as Ft } from "@feedmepos/ui-library";
4
4
  import { i as Mt, _ as It } from "./is-linked-ingredient-error-fJ2TJb3z.js";
5
5
  import { useI18n as le, useCoreStore as ye } from "@feedmepos/mf-common";
6
6
  import { defineStore as $t, storeToRefs as Et } from "pinia";
7
- import { g as Ut, _ as Ce, S as we } from "./StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js";
8
- import { _ as Rt } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-D8dK7h0Z.js";
9
- import { _ as Fe } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-eGofs51J.js";
10
- import { u as tt } from "./feature-Df0TfAlQ.js";
11
- import { _ as Me } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
7
+ import { g as Ut, _ as we, S as Fe } from "./StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js";
8
+ import { _ as Rt } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-gcdA5y3h.js";
9
+ import { _ as Me } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-DH5ud0qJ.js";
10
+ import { u as tt } from "./feature-DZpzqRzb.js";
11
+ import { _ as _e } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
12
12
  import { _ as Tt } from "./FmCustomAttribute.vue_vue_type_script_setup_true_lang-D-IWRjRD.js";
13
13
  import "./array-hChJVZLE.js";
14
14
  const Ie = $t("ingredientForm", function() {
15
- const o = et(), y = ke(), r = oe(), n = Y(!1), { t: l } = le(), i = Y();
15
+ const o = et(), y = Ve(), r = oe(), n = Y(!1), { t: l } = le(), i = Y();
16
16
  function a() {
17
17
  const b = {
18
18
  unit: {},
@@ -29,8 +29,8 @@ const Ie = $t("ingredientForm", function() {
29
29
  unit: Ke(b),
30
30
  mode: W.UPDATE,
31
31
  show: !0,
32
- "onUpdate:show"(_) {
33
- i.value.show = _;
32
+ "onUpdate:show"(x) {
33
+ i.value.show = x;
34
34
  }
35
35
  };
36
36
  i.value = s;
@@ -180,19 +180,19 @@ const Dt = /* @__PURE__ */ ne({
180
180
  }
181
181
  }), h = S(() => Ut(r.value));
182
182
  function k(s) {
183
- const _ = y.modelValue ?? {};
184
- _.measurement = s ? `${s}` : null, l("update:modelValue", _);
183
+ const x = y.modelValue ?? {};
184
+ x.measurement = s ? `${s}` : null, l("update:modelValue", x);
185
185
  }
186
186
  function g(s) {
187
- const _ = y.modelValue ?? {};
188
- _.inventoryBindings = s, l("update:modelValue", _);
187
+ const x = y.modelValue ?? {};
188
+ x.inventoryBindings = s, l("update:modelValue", x);
189
189
  }
190
190
  const b = S(() => {
191
191
  if (!y.modelValue) return null;
192
192
  const s = y.modelValue;
193
- return s.measurement ? h.value.find((_) => _.value === s.measurement) ?? null : h.value.find((_) => _.value === null) ?? null;
193
+ return s.measurement ? h.value.find((x) => x.value === s.measurement) ?? null : h.value.find((x) => x.value === null) ?? null;
194
194
  });
195
- return (s, _) => {
195
+ return (s, x) => {
196
196
  const U = C("FmSwitch"), I = C("FmSelect"), B = C("FmCard");
197
197
  return f(), P(B, {
198
198
  variant: "outlined",
@@ -204,7 +204,7 @@ const Dt = /* @__PURE__ */ ne({
204
204
  c(U, {
205
205
  value: "",
206
206
  "model-value": a.value,
207
- "onUpdate:modelValue": _[0] || (_[0] = (R) => a.value = R),
207
+ "onUpdate:modelValue": x[0] || (x[0] = (R) => a.value = R),
208
208
  label: d(i)("inventory.ingredient.convertible.title"),
209
209
  sublabel: d(i)("inventory.ingredient.convertible.subtitle"),
210
210
  labelPlacement: "right",
@@ -225,7 +225,7 @@ const Dt = /* @__PURE__ */ ne({
225
225
  "model-value": ((v = s.modelValue) == null ? void 0 : v.inventoryBindings) ?? [],
226
226
  "onUpdate:modelValue": g,
227
227
  "exclude-binding-id": n.value,
228
- rules: [d(_e)(1)],
228
+ rules: [d(xe)(1)],
229
229
  readonly: s.readonly
230
230
  }, null, 8, ["id", "model-value", "exclude-binding-id", "rules", "readonly"])
231
231
  ], 64)) : O("", !0)
@@ -316,7 +316,7 @@ const Pt = {
316
316
  };
317
317
  }
318
318
  }), Bt = { class: "flex gap-8" }, Nt = { class: "flex-1" }, zt = { class: "flex-1" }, Lt = { class: "text-fm-color-typo-secondary" }, Ht = { class: "text-fm-color-typo-secondary whitespace-nowrap" }, Ot = {
319
- key: 2,
319
+ key: 3,
320
320
  class: "border-1 border-fm-color-neutral-gray-200 fm-corner-radius-lg flex flex-col p-16 gap-16"
321
321
  }, Yt = { class: "flex flex-col gap-12" }, jt = { class: "flex flex-col gap-4" }, qt = { class: "fm-typo-en-title-sm-600" }, Gt = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Wt = { class: "flex flex-col gap-4" }, Kt = { class: "flex fm-corner-radius-md border-1 border-fm-color-neutral-gray-200" }, Zt = { class: "flex-1 p-12 flex flex-col gap-8" }, Jt = { class: "mx-auto" }, Qt = { class: "flex flex-col" }, Xt = { class: "fm-typo-en-body-sm-600 translate-y-4" }, en = { class: "flex-1 p-12 flex flex-col gap-8" }, tn = { class: "mx-auto" }, nn = { class: "flex flex-col" }, on = { class: "fm-typo-en-body-sm-600 translate-y-4" }, ln = { class: "flex-1 p-12 flex flex-col gap-8" }, an = { class: "mx-auto" }, rn = { class: "flex flex-col" }, sn = { class: "fm-typo-en-body-sm-600 translate-y-4" }, dn = /* @__PURE__ */ ne({
322
322
  __name: "IngredientForm",
@@ -332,7 +332,7 @@ const Pt = {
332
332
  function b(e) {
333
333
  if (e.length === 0) return;
334
334
  const t = e[0], p = n.modelValue ?? {
335
- unit: i.units.find((x) => x)
335
+ unit: i.units.find((_) => _)
336
336
  };
337
337
  p.unit || (p.unit = t, l("update:modelValue", p));
338
338
  }
@@ -344,7 +344,7 @@ const Pt = {
344
344
  function s() {
345
345
  l("click:submit");
346
346
  }
347
- const _ = S({
347
+ const x = S({
348
348
  get() {
349
349
  var e;
350
350
  return ((e = n.modelValue) == null ? void 0 : e.code) ?? "";
@@ -373,7 +373,7 @@ const Pt = {
373
373
  return e ? +Ze(e) : 0;
374
374
  },
375
375
  set(e) {
376
- var p, x, E, w;
376
+ var p, _, E, w;
377
377
  const t = n.modelValue ? {
378
378
  ...n.modelValue
379
379
  } : {};
@@ -381,9 +381,9 @@ const Pt = {
381
381
  costPerUnit: {
382
382
  amount: 0,
383
383
  precision: 2,
384
- currency: ((p = xe(a.currentCountry.value)) == null ? void 0 : p.currency) ?? "MYR"
384
+ currency: ((p = ke(a.currentCountry.value)) == null ? void 0 : p.currency) ?? "MYR"
385
385
  },
386
- measurement: (w = (E = (x = n.modelValue) == null ? void 0 : x.unit) == null ? void 0 : E.measurements) == null ? void 0 : w.find(
386
+ measurement: (w = (E = (_ = n.modelValue) == null ? void 0 : _.unit) == null ? void 0 : E.measurements) == null ? void 0 : w.find(
387
387
  (q) => {
388
388
  var Q;
389
389
  return q.id === ((Q = n.modelValue) == null ? void 0 : Q.trackingMeasurement);
@@ -395,18 +395,18 @@ const Pt = {
395
395
  }, l("update:modelValue", t);
396
396
  }
397
397
  }), B = S(() => {
398
- var t, p, x;
398
+ var t, p, _;
399
399
  const e = ((t = n.modelValue) == null ? void 0 : t.unit) ?? i.units.find((E) => E);
400
400
  return e ? {
401
401
  _id: e._id,
402
402
  measurement: (p = n.modelValue) == null ? void 0 : p.trackingMeasurement,
403
- name: ((x = e.measurements.find((E) => {
403
+ name: ((_ = e.measurements.find((E) => {
404
404
  var w;
405
405
  return E.id === ((w = n.modelValue) == null ? void 0 : w.trackingMeasurement);
406
- })) == null ? void 0 : x.name) ?? e.name
406
+ })) == null ? void 0 : _.name) ?? e.name
407
407
  } : null;
408
408
  }), F = S(
409
- () => i.units.flatMap(({ name: e, _id: t, abbrev: p, measurements: x }) => [
409
+ () => i.units.flatMap(({ name: e, _id: t, abbrev: p, measurements: _ }) => [
410
410
  {
411
411
  label: `${e}`,
412
412
  value: null,
@@ -417,7 +417,7 @@ const Pt = {
417
417
  value: { _id: t },
418
418
  displayAsSection: !1
419
419
  },
420
- ...x.map(({ id: E, name: w, abbrev: q }) => ({
420
+ ..._.map(({ id: E, name: w, abbrev: q }) => ({
421
421
  label: `${w} (${q})`,
422
422
  value: { _id: t, measurement: E },
423
423
  displayAsSection: !1
@@ -425,23 +425,23 @@ const Pt = {
425
425
  ])
426
426
  );
427
427
  function v(e) {
428
- var t, p, x, E, w;
429
- return ((p = (t = n.modelValue) == null ? void 0 : t.unit) == null ? void 0 : p._id) === ((x = e.value) == null ? void 0 : x._id) && ((E = n.modelValue) == null ? void 0 : E.trackingMeasurement) === ((w = e.value) == null ? void 0 : w.measurement);
428
+ var t, p, _, E, w;
429
+ return ((p = (t = n.modelValue) == null ? void 0 : t.unit) == null ? void 0 : p._id) === ((_ = e.value) == null ? void 0 : _._id) && ((E = n.modelValue) == null ? void 0 : E.trackingMeasurement) === ((w = e.value) == null ? void 0 : w.measurement);
430
430
  }
431
431
  function R(e) {
432
432
  var q, Q;
433
433
  if (!e) return;
434
- const { _id: t, measurement: p } = e, x = p || void 0, E = i.units.find((ce) => ce._id === t);
434
+ const { _id: t, measurement: p } = e, _ = p || void 0, E = i.units.find((ce) => ce._id === t);
435
435
  if (!E)
436
436
  return;
437
437
  const w = n.modelValue ?? {};
438
- w.unit = E, w.trackingMeasurement = x, w.convert && (w.convert.measurement = x || null), h.enableTotalCost && (w.defaultCost = {
439
- measurement: E.measurements.find((ce) => ce.id === x),
438
+ w.unit = E, w.trackingMeasurement = _, w.convert && (w.convert.measurement = _ || null), h.enableTotalCost && (w.defaultCost = {
439
+ measurement: E.measurements.find((ce) => ce.id === _),
440
440
  costPerUnit: {
441
441
  ...((q = w.defaultCost) == null ? void 0 : q.costPerUnit) ?? {
442
442
  amount: 0,
443
443
  precision: 2,
444
- currency: ((Q = xe(a.currentCountry.value)) == null ? void 0 : Q.currency) ?? "MYR"
444
+ currency: ((Q = ke(a.currentCountry.value)) == null ? void 0 : Q.currency) ?? "MYR"
445
445
  }
446
446
  }
447
447
  }), l("update:modelValue", w);
@@ -503,20 +503,20 @@ const Pt = {
503
503
  () => {
504
504
  var e, t, p;
505
505
  return (e = n.modelValue) != null && e._id ? ((p = i.menu.bindedBySkuId[(t = n.modelValue) == null ? void 0 : t._id]) == null ? void 0 : p.filter(
506
- (x) => x.from === "INGREDIENT"
506
+ (_) => _.from === "INGREDIENT"
507
507
  )) ?? [] : [];
508
508
  }
509
509
  ), ge = S(
510
510
  () => {
511
511
  var e, t, p;
512
512
  return (e = n.modelValue) != null && e._id ? ((p = i.menu.bindedBySkuId[(t = n.modelValue) == null ? void 0 : t._id]) == null ? void 0 : p.filter(
513
- (x) => x.from === "RECIPE"
513
+ (_) => _.from === "RECIPE"
514
514
  )) ?? [] : [];
515
515
  }
516
516
  ), D = S(
517
517
  () => {
518
518
  var e, t, p;
519
- return (e = n.modelValue) != null && e._id ? ((p = i.menu.bindedBySkuId[(t = n.modelValue) == null ? void 0 : t._id]) == null ? void 0 : p.filter((x) => x.from === "MENU")) ?? [] : [];
519
+ return (e = n.modelValue) != null && e._id ? ((p = i.menu.bindedBySkuId[(t = n.modelValue) == null ? void 0 : t._id]) == null ? void 0 : p.filter((_) => _.from === "MENU")) ?? [] : [];
520
520
  }
521
521
  ), $ = S(
522
522
  () => i.skus.map((e) => ({ label: e.name, value: e.code }))
@@ -528,11 +528,11 @@ const Pt = {
528
528
  }
529
529
  function re(e) {
530
530
  switch (e) {
531
- case Se.MY:
531
+ case Ce.MY:
532
532
  return "MYR";
533
- case Se.SG:
533
+ case Ce.SG:
534
534
  return "SGD";
535
- case Se.ID:
535
+ case Ce.ID:
536
536
  return "IDR";
537
537
  default:
538
538
  return "MYR";
@@ -540,13 +540,13 @@ const Pt = {
540
540
  }
541
541
  const N = S(
542
542
  () => {
543
- var e, t, p, x, E, w;
544
- return ((x = (p = (t = (e = n.modelValue) == null ? void 0 : e.unit) == null ? void 0 : t.measurements) == null ? void 0 : p.find(
543
+ var e, t, p, _, E, w;
544
+ return ((_ = (p = (t = (e = n.modelValue) == null ? void 0 : e.unit) == null ? void 0 : t.measurements) == null ? void 0 : p.find(
545
545
  (q) => {
546
546
  var Q;
547
547
  return q.id === ((Q = n.modelValue) == null ? void 0 : Q.trackingMeasurement);
548
548
  }
549
- )) == null ? void 0 : x.abbrev) ?? ((w = (E = n.modelValue) == null ? void 0 : E.unit) == null ? void 0 : w.abbrev);
549
+ )) == null ? void 0 : _.abbrev) ?? ((w = (E = n.modelValue) == null ? void 0 : E.unit) == null ? void 0 : w.abbrev);
550
550
  }
551
551
  ), z = S({
552
552
  get() {
@@ -554,8 +554,8 @@ const Pt = {
554
554
  return ((t = (e = n.modelValue) == null ? void 0 : e.thresholds) == null ? void 0 : t.low) ?? se().low;
555
555
  },
556
556
  set(e) {
557
- var x;
558
- const t = ((x = n.modelValue) == null ? void 0 : x.thresholds) ?? se();
557
+ var _;
558
+ const t = ((_ = n.modelValue) == null ? void 0 : _.thresholds) ?? se();
559
559
  t.low = e;
560
560
  const p = n.modelValue ? {
561
561
  ...n.modelValue
@@ -568,8 +568,8 @@ const Pt = {
568
568
  return ((t = (e = n.modelValue) == null ? void 0 : e.thresholds) == null ? void 0 : t.mid) ?? se().mid;
569
569
  },
570
570
  set(e) {
571
- var x;
572
- const t = ((x = n.modelValue) == null ? void 0 : x.thresholds) ?? se();
571
+ var _;
572
+ const t = ((_ = n.modelValue) == null ? void 0 : _.thresholds) ?? se();
573
573
  t.mid = e;
574
574
  const p = n.modelValue ? {
575
575
  ...n.modelValue
@@ -583,7 +583,7 @@ const Pt = {
583
583
  };
584
584
  }
585
585
  return (e, t) => {
586
- const p = C("FmTextField"), x = C("FmLabel"), E = C("FmField"), w = C("FmMenuHeader"), q = C("FmMenuDivider"), Q = C("FmMenuItem"), ce = C("FmMenu"), Ue = C("FmFormGroup"), ot = C("FmSelect"), lt = C("FmSwitch"), Re = C("FmStepperField"), at = C("FmForm");
586
+ const p = C("FmTextField"), _ = C("FmLabel"), E = C("FmField"), w = C("FmMenuHeader"), q = C("FmMenuDivider"), Q = C("FmMenuItem"), ce = C("FmMenu"), Ue = C("FmFormGroup"), ot = C("FmSelect"), lt = C("FmSwitch"), Re = C("FmStepperField"), at = C("FmForm");
587
587
  return f(), P(at, {
588
588
  disabled: e.disabled,
589
589
  ref_key: "formRef",
@@ -600,17 +600,17 @@ const Pt = {
600
600
  "tooltip-message": "This field is managed by NetSuite",
601
601
  "tooltip-z-index": 50,
602
602
  label: d(r)("inventory.ingredient.code"),
603
- "model-value": _.value,
604
- "onUpdate:modelValue": t[1] || (t[1] = (M) => _.value = M),
603
+ "model-value": x.value,
604
+ "onUpdate:modelValue": t[1] || (t[1] = (M) => x.value = M),
605
605
  locked: g.value,
606
606
  disabled: e.disabled
607
607
  }, {
608
608
  default: V(() => [
609
609
  c(p, {
610
610
  label: d(r)("inventory.ingredient.code"),
611
- "model-value": _.value,
612
- "onUpdate:modelValue": t[0] || (t[0] = (M) => _.value = M),
613
- rules: [d(Ve)(), d(ct)($.value, ue.value)],
611
+ "model-value": x.value,
612
+ "onUpdate:modelValue": t[0] || (t[0] = (M) => x.value = M),
613
+ rules: [d(Se)(), d(ct)($.value, ue.value)],
614
614
  "label-mark": "required"
615
615
  }, null, 8, ["label", "model-value", "rules"])
616
616
  ]),
@@ -632,7 +632,7 @@ const Pt = {
632
632
  label: d(r)("inventory.ingredient.name"),
633
633
  "model-value": U.value,
634
634
  "onUpdate:modelValue": t[2] || (t[2] = (M) => U.value = M),
635
- rules: [d(Ve)()],
635
+ rules: [d(Se)()],
636
636
  "label-mark": "required"
637
637
  }, null, 8, ["label", "model-value", "rules"])
638
638
  ]),
@@ -652,11 +652,11 @@ const Pt = {
652
652
  default: V(() => [
653
653
  c(Ue, {
654
654
  "model-value": B.value,
655
- rules: [d(Ve)()],
655
+ rules: [d(Se)()],
656
656
  "label-mark": "required"
657
657
  }, {
658
658
  label: V(() => [
659
- c(x, {
659
+ c(_, {
660
660
  label: d(r)("inventory.ingredient.unit")
661
661
  }, null, 8, ["label"])
662
662
  ]),
@@ -714,7 +714,8 @@ const Pt = {
714
714
  ]),
715
715
  _: 1
716
716
  }, 8, ["label", "helper-text", "model-value", "locked", "disabled"]),
717
- c(ve, {
717
+ d(h).enableTotalCost ? (f(), P(ve, {
718
+ key: 0,
718
719
  "tooltip-message": "This field is managed by NetSuite",
719
720
  "tooltip-z-index": 50,
720
721
  label: d(r)("inventory.ingredient.valuationMethod.title"),
@@ -722,19 +723,28 @@ const Pt = {
722
723
  locked: g.value,
723
724
  disabled: e.disabled
724
725
  }, {
726
+ label: V(() => [
727
+ c(_e, { "z-index": 50 }, {
728
+ default: V(() => [
729
+ c(_, {
730
+ label: d(r)("inventory.ingredient.valuationMethod.title")
731
+ }, null, 8, ["label"])
732
+ ]),
733
+ _: 1
734
+ })
735
+ ]),
725
736
  default: V(() => [
726
737
  c(ot, {
727
738
  class: "col-span-2",
728
739
  "model-value": L.value,
729
740
  "onUpdate:modelValue": t[4] || (t[4] = (M) => L.value = M),
730
- label: d(r)("inventory.ingredient.valuationMethod.title"),
731
741
  items: K.value
732
- }, null, 8, ["model-value", "label", "items"])
742
+ }, null, 8, ["model-value", "items"])
733
743
  ]),
734
744
  _: 1
735
- }, 8, ["label", "model-value", "locked", "disabled"]),
745
+ }, 8, ["label", "model-value", "locked", "disabled"])) : O("", !0),
736
746
  d(h).enableTotalCost ? (f(), P(ve, {
737
- key: 0,
747
+ key: 1,
738
748
  "tooltip-message": "This field is managed by NetSuite",
739
749
  "tooltip-z-index": 50,
740
750
  "model-value": `${d(pt)()} ${I.value}`,
@@ -742,9 +752,9 @@ const Pt = {
742
752
  disabled: e.disabled
743
753
  }, {
744
754
  label: V(() => [
745
- c(Me, { "z-index": 50 }, {
755
+ c(_e, { "z-index": 50 }, {
746
756
  default: V(() => [
747
- c(x, {
757
+ c(_, {
748
758
  label: d(r)("inventory.ingredient.pricePerUnit")
749
759
  }, null, 8, ["label"])
750
760
  ]),
@@ -752,16 +762,15 @@ const Pt = {
752
762
  })
753
763
  ]),
754
764
  default: V(() => [
755
- d(h).enableTotalCost ? (f(), P(p, {
756
- key: 0,
765
+ c(p, {
757
766
  "model-value": I.value,
758
767
  "onUpdate:modelValue": t[5] || (t[5] = (M) => I.value = M),
759
- rules: [d(_e)(0), d(vt)(4)]
768
+ rules: [d(xe)(0), d(vt)(4)]
760
769
  }, {
761
770
  label: V(() => [
762
- c(Me, { "z-index": 50 }, {
771
+ c(_e, { "z-index": 50 }, {
763
772
  default: V(() => [
764
- c(x, {
773
+ c(_, {
765
774
  label: d(r)("inventory.ingredient.pricePerUnit")
766
775
  }, null, 8, ["label"])
767
776
  ]),
@@ -778,12 +787,12 @@ const Pt = {
778
787
  m("div", Ht, " / " + A(N.value), 1)
779
788
  ]),
780
789
  _: 1
781
- }, 8, ["model-value", "rules"])) : O("", !0)
790
+ }, 8, ["model-value", "rules"])
782
791
  ]),
783
792
  _: 1
784
793
  }, 8, ["model-value", "locked", "disabled"])) : O("", !0),
785
794
  !g.value || Z.value ? (f(), P(Dt, {
786
- key: 1,
795
+ key: 2,
787
796
  "model-value": Z.value,
788
797
  "onUpdate:modelValue": t[6] || (t[6] = (M) => Z.value = M),
789
798
  "root-value": e.modelValue,
@@ -798,17 +807,17 @@ const Pt = {
798
807
  "label-placement": "right"
799
808
  }, null, 8, ["label", "modelValue"])
800
809
  ]),
801
- J.value && de.value.length ? (f(), P(Fe, {
810
+ J.value && de.value.length ? (f(), P(Me, {
802
811
  key: 0,
803
812
  name: d(r)("inventory.ingredient.bindedItems.ingredient"),
804
813
  bindings: de.value
805
814
  }, null, 8, ["name", "bindings"])) : O("", !0),
806
- J.value && ge.value.length ? (f(), P(Fe, {
815
+ J.value && ge.value.length ? (f(), P(Me, {
807
816
  key: 1,
808
817
  name: d(r)("inventory.ingredient.bindedItems.recipe"),
809
818
  bindings: ge.value
810
819
  }, null, 8, ["name", "bindings"])) : O("", !0),
811
- J.value && D.value.length ? (f(), P(Fe, {
820
+ J.value && D.value.length ? (f(), P(Me, {
812
821
  key: 2,
813
822
  name: d(r)("inventory.ingredient.bindedItems.menu"),
814
823
  bindings: D.value
@@ -816,7 +825,7 @@ const Pt = {
816
825
  ])) : O("", !0),
817
826
  m("div", Yt, [
818
827
  m("div", jt, [
819
- c(Me, null, {
828
+ c(_e, null, {
820
829
  default: V(() => [
821
830
  m("div", qt, A(d(r)("inventory.ingredient.threshold.title")), 1)
822
831
  ]),
@@ -832,9 +841,9 @@ const Pt = {
832
841
  m("div", Kt, [
833
842
  m("div", Zt, [
834
843
  m("div", Jt, [
835
- c(Ce, {
844
+ c(we, {
836
845
  days: z.value,
837
- level: d(we).low
846
+ level: d(Fe).low
838
847
  }, null, 8, ["days", "level"])
839
848
  ]),
840
849
  m("div", Qt, [
@@ -842,7 +851,7 @@ const Pt = {
842
851
  c(Re, {
843
852
  modelValue: z.value,
844
853
  "onUpdate:modelValue": t[8] || (t[8] = (M) => z.value = M),
845
- rules: [d(_e)(0)]
854
+ rules: [d(xe)(0)]
846
855
  }, {
847
856
  append: V(() => t[11] || (t[11] = [
848
857
  m("div", {
@@ -865,9 +874,9 @@ const Pt = {
865
874
  ], -1)),
866
875
  m("div", en, [
867
876
  m("div", tn, [
868
- c(Ce, {
877
+ c(we, {
869
878
  days: te.value,
870
- level: d(we).mid
879
+ level: d(Fe).mid
871
880
  }, null, 8, ["days", "level"])
872
881
  ]),
873
882
  m("div", nn, [
@@ -875,7 +884,7 @@ const Pt = {
875
884
  c(Re, {
876
885
  modelValue: te.value,
877
886
  "onUpdate:modelValue": t[9] || (t[9] = (M) => te.value = M),
878
- rules: [d(_e)(0)]
887
+ rules: [d(xe)(0)]
879
888
  }, {
880
889
  append: V(() => t[12] || (t[12] = [
881
890
  m("div", {
@@ -898,9 +907,9 @@ const Pt = {
898
907
  ], -1)),
899
908
  m("div", ln, [
900
909
  m("div", an, [
901
- c(Ce, {
910
+ c(we, {
902
911
  days: te.value + 1,
903
- level: d(we).high
912
+ level: d(Fe).high
904
913
  }, null, 8, ["days", "level"])
905
914
  ]),
906
915
  m("div", rn, [
@@ -935,7 +944,7 @@ const Pt = {
935
944
  },
936
945
  emits: ["update:show"],
937
946
  setup(u) {
938
- const o = u, y = oe(), r = Ee(), n = ke(), { t: l } = le(), i = Ye(o, "show"), a = Ye(o, "unit"), h = S(
947
+ const o = u, y = oe(), r = Ee(), n = Ve(), { t: l } = le(), i = Ye(o, "show"), a = Ye(o, "unit"), h = S(
939
948
  () => {
940
949
  var v;
941
950
  return r.isEnabled && r.netSuiteItemBySkuId.has((v = o.unit) == null ? void 0 : v._id);
@@ -961,7 +970,7 @@ const Pt = {
961
970
  }
962
971
  return "";
963
972
  }), b = Y(), s = Y(!1);
964
- async function _() {
973
+ async function x() {
965
974
  s.value = !0;
966
975
  try {
967
976
  await y.createSku(a.value), i.value = !1, n.open({
@@ -1008,7 +1017,7 @@ const Pt = {
1008
1017
  case W.UPDATE:
1009
1018
  return U();
1010
1019
  case W.CREATE:
1011
- return _();
1020
+ return x();
1012
1021
  }
1013
1022
  }
1014
1023
  const F = S(() => {
@@ -1141,7 +1150,7 @@ function nt() {
1141
1150
  id: "baseUnit",
1142
1151
  name: "Base unit"
1143
1152
  }
1144
- ], o = tt(), y = ye(), r = xe(y.currentCountry.value);
1153
+ ], o = tt(), y = ye(), r = ke(y.currentCountry.value);
1145
1154
  return o.enableTotalCost && u.push(
1146
1155
  {
1147
1156
  id: "valuationMethod",
@@ -1200,14 +1209,14 @@ function Sn(u) {
1200
1209
  throw new Error(
1201
1210
  `Missing meta headers (${g.join()}). Excel file does not come from the template.`
1202
1211
  );
1203
- return a.map((s, _) => {
1212
+ return a.map((s, x) => {
1204
1213
  const U = {};
1205
1214
  for (const I in h) {
1206
1215
  const B = h[I];
1207
1216
  Object.assign(U, { [B]: s[I] });
1208
1217
  }
1209
1218
  return {
1210
- index: _,
1219
+ index: x,
1211
1220
  data: U
1212
1221
  };
1213
1222
  });
@@ -1231,10 +1240,10 @@ function je(u, o, y) {
1231
1240
  u.valuationMethod && !k && l.push(
1232
1241
  `Expected valuation method to be one of ${fe.options.join()} but got ${u.valuationMethod} instead.`
1233
1242
  );
1234
- const b = ye().currentCountry.value, s = (v) => `${v}`.length && bt()(v) === !0, _ = s(`${u.pricePerUnit}`) === !0 ? {
1243
+ const b = ye().currentCountry.value, s = (v) => `${v}`.length && bt()(v) === !0, x = s(`${u.pricePerUnit}`) === !0 ? {
1235
1244
  costPerUnit: {
1236
1245
  ...Je(Number(u.pricePerUnit) || 0),
1237
- currency: ((F = xe(b)) == null ? void 0 : F.currency) ?? "MYR"
1246
+ currency: ((F = ke(b)) == null ? void 0 : F.currency) ?? "MYR"
1238
1247
  },
1239
1248
  measurement: h
1240
1249
  } : void 0, U = s(`${u.thresholdLow}`) && s(`${u.thresholdMid}`) ? {
@@ -1250,7 +1259,7 @@ function je(u, o, y) {
1250
1259
  unit: a ?? n.find((v) => v) ?? _n,
1251
1260
  trackingMeasurement: h == null ? void 0 : h.id,
1252
1261
  valuation: k,
1253
- defaultCost: _,
1262
+ defaultCost: x,
1254
1263
  thresholds: U
1255
1264
  },
1256
1265
  errors: l,
@@ -1363,7 +1372,7 @@ const wn = { class: "flex items-center gap-12 pl-8" }, Fn = { class: "flex flex-
1363
1372
  }, Nn = { class: "fm-typo-en-body-lg-600" }, zn = /* @__PURE__ */ ne({
1364
1373
  __name: "ImportIngredients",
1365
1374
  setup(u) {
1366
- const o = Y(null), y = wt(), r = ke(), n = Y(!1), l = Y(new Array()), i = Y([]), a = Y([]), h = S(
1375
+ const o = Y(null), y = wt(), r = Ve(), n = Y(!1), l = Y(new Array()), i = Y([]), a = Y([]), h = S(
1367
1376
  () => !!l.value.length || i.value.some((s) => s.errors.length) || a.value.some((s) => s.errors.length)
1368
1377
  ), k = S(
1369
1378
  () => !!i.value.length || !!a.value.length
@@ -1372,16 +1381,16 @@ const wn = { class: "flex items-center gap-12 pl-8" }, Fn = { class: "flex flex-
1372
1381
  l.value = [], i.value = [], a.value = [];
1373
1382
  try {
1374
1383
  n.value = !0;
1375
- const [_] = await Promise.all([
1384
+ const [x] = await Promise.all([
1376
1385
  _t(s),
1377
1386
  // fake buffer
1378
1387
  new Promise((B) => setTimeout(B, 1e3))
1379
- ]), U = _.SheetNames.find((B) => B);
1388
+ ]), U = x.SheetNames.find((B) => B);
1380
1389
  if (!U) {
1381
1390
  l.value.push(g("inventory.ingredient.import.fileError.noSheet"));
1382
1391
  return;
1383
1392
  }
1384
- const I = Cn(_.Sheets[U]);
1393
+ const I = Cn(x.Sheets[U]);
1385
1394
  if (I.invalidExcel) {
1386
1395
  l.value.push(I.invalidExcelMessage ?? g("inventory.ingredient.import.fileError.invalidExcel"));
1387
1396
  return;
@@ -1391,12 +1400,12 @@ const wn = { class: "flex items-center gap-12 pl-8" }, Fn = { class: "flex flex-
1391
1400
  return;
1392
1401
  }
1393
1402
  y.emitData(I);
1394
- } catch (_) {
1403
+ } catch (x) {
1395
1404
  r.open({
1396
1405
  title: g("inventory.ingredient.import.fileError.unableToRead"),
1397
- message: _ == null ? void 0 : _.message,
1406
+ message: x == null ? void 0 : x.message,
1398
1407
  type: "error"
1399
- }), console.error("Error in reading file", _);
1408
+ }), console.error("Error in reading file", x);
1400
1409
  } finally {
1401
1410
  l.value.length && r.open({
1402
1411
  title: g("inventory.ingredient.import.fileError.invalidExcel"),
@@ -1406,7 +1415,7 @@ const wn = { class: "flex items-center gap-12 pl-8" }, Fn = { class: "flex flex-
1406
1415
  }
1407
1416
  return Ge(o, (s) => {
1408
1417
  s && b(s);
1409
- }), (s, _) => {
1418
+ }), (s, x) => {
1410
1419
  const U = C("FmCircularProgress"), I = C("FmIcon"), B = C("FmButton");
1411
1420
  return f(), T("div", En, [
1412
1421
  m("div", Un, A(d(g)("inventory.ingredient.import.uploadDescription")), 1),
@@ -1416,7 +1425,7 @@ const wn = { class: "flex items-center gap-12 pl-8" }, Fn = { class: "flex flex-
1416
1425
  "h-[200px]": !o.value
1417
1426
  }),
1418
1427
  accept: ".xlsx",
1419
- onFileUpload: _[0] || (_[0] = (F) => o.value = F),
1428
+ onFileUpload: x[0] || (x[0] = (F) => o.value = F),
1420
1429
  label: d(g)("inventory.ingredient.import.uploadTemplate"),
1421
1430
  "button-label": d(g)("inventory.ingredient.import.selectFile")
1422
1431
  }, We({ _: 2 }, [
@@ -1505,8 +1514,8 @@ const wn = { class: "flex items-center gap-12 pl-8" }, Fn = { class: "flex flex-
1505
1514
  }), Ln = { class: "flex flex-col py-8" }, Hn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, On = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, lo = /* @__PURE__ */ ne({
1506
1515
  __name: "IngredientsView",
1507
1516
  setup(u) {
1508
- const o = oe(), y = S(() => o.skus), r = xt(), n = et(), l = ke(), i = Ee(), { t: a } = le(), { createIngredient: h, updateIngredient: k } = Ie(), { ingredientDialogProps: g, ingredientViewLoading: b } = Et(Ie()), { columnDefs: s } = At();
1509
- function _(D) {
1517
+ const o = oe(), y = S(() => o.skus), r = xt(), n = et(), l = Ve(), i = Ee(), { t: a } = le(), { createIngredient: h, updateIngredient: k } = Ie(), { ingredientDialogProps: g, ingredientViewLoading: b } = Et(Ie()), { columnDefs: s } = At();
1518
+ function x(D) {
1510
1519
  switch (D) {
1511
1520
  case "add":
1512
1521
  return i.isEnabled ? void 0 : h();
@@ -1640,7 +1649,7 @@ const wn = { class: "flex items-center gap-12 pl-8" }, Fn = { class: "flex flex-
1640
1649
  return f(), P(Vt, {
1641
1650
  title: d(a)("inventory.ingredient.title"),
1642
1651
  actions: H.value,
1643
- "onClick:action": _
1652
+ "onClick:action": x
1644
1653
  }, {
1645
1654
  default: V(() => [
1646
1655
  m("div", {
@@ -1673,7 +1682,7 @@ const wn = { class: "flex items-center gap-12 pl-8" }, Fn = { class: "flex flex-
1673
1682
  onRowClick: d(k)
1674
1683
  }, We({
1675
1684
  default: V((z) => {
1676
- var te, be, me, e, t, p, x, E, w, q;
1685
+ var te, be, me, e, t, p, _, E, w, q;
1677
1686
  return [
1678
1687
  m("div", Ln, [
1679
1688
  m("div", Hn, [
@@ -1684,7 +1693,7 @@ const wn = { class: "flex items-center gap-12 pl-8" }, Fn = { class: "flex flex-
1684
1693
  ]),
1685
1694
  m("div", On, [
1686
1695
  c(d(Oe), {
1687
- render: (E = (x = (p = z.name) == null ? void 0 : p.column) == null ? void 0 : x.columnDef) == null ? void 0 : E.cell,
1696
+ render: (E = (_ = (p = z.name) == null ? void 0 : p.column) == null ? void 0 : _.columnDef) == null ? void 0 : E.cell,
1688
1697
  props: (q = (w = z.name) == null ? void 0 : w.getContext) == null ? void 0 : q.call(w)
1689
1698
  }, null, 8, ["render", "props"])
1690
1699
  ])