@feedmepos/mf-inventory-portal 0.0.21-dev.4 → 0.0.21-dev.5

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 (32) hide show
  1. package/dist/ApprovalView-BHoJzHuo.js +129 -0
  2. package/dist/{BindingsDialog-BFLeun5L.js → BindingsDialog-sUZjZtSl.js} +1 -1
  3. package/dist/{BindingsPicker-CnjJZH9t.js → BindingsPicker-CqzSUVc_.js} +1 -1
  4. package/dist/{BindingsTable-C3VTa0YL.js → BindingsTable-C1o5EgLy.js} +1 -1
  5. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DYBTXD_J.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CpN5Kn8b.js} +1 -1
  6. package/dist/{IngredientsView-CQYJfAze.js → IngredientsView-CrXPIQme.js} +99 -91
  7. package/dist/IntegrationView-BJT-KMVp.js +1141 -0
  8. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Wv8RvXJL.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DH0CcGmX.js} +1 -1
  9. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DsOGlAb7.js → PremiumBadge.vue_vue_type_script_setup_true_lang-kJKVCH40.js} +1 -1
  10. package/dist/{PurchaseOrderPrintPreview-B0hDduXB.js → PurchaseOrderPrintPreview-k26o__vy.js} +1 -1
  11. package/dist/ReceiveRequestView-ysOzzBTW.js +216 -0
  12. package/dist/{RecipeView-DYKhSgtw.js → RecipeView-DAH8YIzY.js} +182 -174
  13. package/dist/{StockView-BIGGG87A.js → StockView-BlCpuSLe.js} +547 -539
  14. package/dist/{SupplierView-DQzopnzt.js → SupplierView-Bwknjcke.js} +263 -255
  15. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-D8-sMRGm.js → TransferDetails.vue_vue_type_script_setup_true_lang-LCNiBfi7.js} +3 -3
  16. package/dist/{TransferDialog.vue_vue_type_script_setup_true_lang-CSUnXAyq.js → TransferDialog.vue_vue_type_script_setup_true_lang-BDvtif2q.js} +4 -4
  17. package/dist/{TransferTemplateView-DWF54okN.js → TransferTemplateView-DcMdNiH6.js} +372 -364
  18. package/dist/{UnitView-Cdw8xxzV.js → UnitView-BVMr4KlR.js} +186 -178
  19. package/dist/{WarehouseView-DOelxuIh.js → WarehouseView-Dd-e-IlG.js} +388 -380
  20. package/dist/{app-SBnQEeEV.js → app-S6iG6Hux.js} +4 -4
  21. package/dist/app.js +1 -1
  22. package/dist/{decimal-BlEB2PrM.js → decimal-nOOdFIFP.js} +1 -1
  23. package/dist/{id-to-date-Y6berpHs.js → id-to-date-CKQ0n3Qi.js} +1 -1
  24. package/dist/{purchase-order-transaction-type-Dp0wsGal.js → purchase-order-transaction-type-CQ-RpJ0h.js} +2 -2
  25. package/dist/{supplier-I_rYvljH.js → supplier-DQsAfn3q.js} +1 -1
  26. package/dist/tsconfig.app.tsbuildinfo +1 -1
  27. package/dist/{xlsx-DGwG2ekM.js → xlsx-Dgjf-KvE.js} +1 -1
  28. package/dist/{xlsx.util-Dsf-EgrG.js → xlsx.util-CODYzgF8.js} +2 -2
  29. package/package.json +3 -3
  30. package/dist/ApprovalView-BS4jzhAR.js +0 -121
  31. package/dist/IntegrationView-9V2OcyP_.js +0 -1172
  32. package/dist/ReceiveRequestView-3boFHkOO.js +0 -208
@@ -1,14 +1,14 @@
1
- import { ref as z, defineComponent as le, computed as C, resolveComponent as R, openBlock as y, createBlock as B, withCtx as $, createVNode as f, unref as d, createElementBlock as U, Fragment as Q, createElementVNode as c, createCommentVNode as O, onMounted as nt, watch as je, normalizeClass as X, createTextVNode as He, toDisplayString as L, renderList as oe, isRef as Ee, renderSlot as ge, createSlots as Oe, normalizeStyle as ot, Teleport as De, normalizeProps as lt, guardReactiveProps as at } from "vue";
2
- import { u as ae, c as Ye, S as rt, _ as st, A as _e, a as Ge, g as xe, t as qe, F as ve, R as be, U as it, M as ut, d as Ae, b as We, C as Ce, e as Te, f as dt, h as ct, I as mt, i as pt, j as vt } from "./app-SBnQEeEV.js";
1
+ import { ref as z, defineComponent as le, computed as C, resolveComponent as R, openBlock as y, createBlock as B, withCtx as $, createVNode as f, unref as d, createElementBlock as U, Fragment as X, createElementVNode as c, createCommentVNode as O, onMounted as nt, watch as je, normalizeClass as Q, createTextVNode as He, toDisplayString as L, renderList as oe, isRef as Ee, renderSlot as ge, createSlots as Oe, normalizeStyle as ot, Teleport as De, normalizeProps as lt, guardReactiveProps as at } from "vue";
2
+ import { u as ae, c as Ye, S as rt, _ as st, A as _e, a as Ge, g as xe, t as qe, F as ve, R as be, U as it, M as ut, d as Ae, b as We, C as Ce, e as Te, f as dt, h as ct, I as mt, i as pt, j as vt } from "./app-S6iG6Hux.js";
3
3
  import { useDialog as Ke, useSnackbar as Ve, useProxiedModel as Pe, useDialogChild as ft, useBreakpoints as yt } from "@feedmepos/ui-library";
4
4
  import { i as gt, _ as bt } from "./is-linked-ingredient-error-fJ2TJb3z.js";
5
5
  import { F as K, D as Be, R as he } from "./row-action.enum-PMKMRrZR.js";
6
6
  import { useI18n as re, useCoreStore as fe } from "@feedmepos/mf-common";
7
7
  import { defineStore as ht, storeToRefs as _t } from "pinia";
8
8
  import { c as xt, _ as Vt, F as ze } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
9
- import { u as kt, _ as Ct, a as Ft } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DYBTXD_J.js";
9
+ import { u as kt, _ as Ct, a as Ft } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CpN5Kn8b.js";
10
10
  import { g as St, _ as Fe, S as Se } from "./StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js";
11
- import { _ as we, t as Je, d as Qe, s as wt, r as Mt } from "./xlsx.util-Dsf-EgrG.js";
11
+ import { _ as we, t as Je, d as Qe, s as wt, r as Mt } from "./xlsx.util-CODYzgF8.js";
12
12
  import { _ as Me } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
13
13
  import "./array-ClJzD_Lt.js";
14
14
  const $e = ht("ingredientForm", function() {
@@ -192,13 +192,13 @@ const It = /* @__PURE__ */ le({
192
192
  return u.measurement ? b.value.find((x) => x.value === u.measurement) ?? null : b.value.find((x) => x.value === null) ?? null;
193
193
  });
194
194
  return (u, x) => {
195
- const D = R("FmSwitch"), S = R("FmSelect"), w = R("FmCard");
196
- return y(), B(w, {
195
+ const D = R("FmSwitch"), w = R("FmSelect"), M = R("FmCard");
196
+ return y(), B(M, {
197
197
  variant: "outlined",
198
198
  class: "p-16 flex flex-col gap-16"
199
199
  }, {
200
200
  default: $(() => {
201
- var M, V;
201
+ var S, V;
202
202
  return [
203
203
  f(D, {
204
204
  value: "",
@@ -208,11 +208,11 @@ const It = /* @__PURE__ */ le({
208
208
  sublabel: d(o)("inventory.ingredient.convertible.subtitle"),
209
209
  labelPlacement: "right"
210
210
  }, null, 8, ["model-value", "label", "sublabel"]),
211
- p.value ? (y(), U(Q, { key: 0 }, [
211
+ p.value ? (y(), U(X, { key: 0 }, [
212
212
  c("div", null, [
213
- f(S, {
213
+ f(w, {
214
214
  label: d(o)("inventory.ingredient.convertible.convertTo"),
215
- modelValue: (M = h.value) == null ? void 0 : M.value,
215
+ modelValue: (S = h.value) == null ? void 0 : S.value,
216
216
  "onUpdate:modelValue": _,
217
217
  items: b.value
218
218
  }, null, 8, ["label", "modelValue", "items"])
@@ -336,7 +336,7 @@ const on = /* @__PURE__ */ le({
336
336
  return T.id === ((I = n.modelValue) == null ? void 0 : I.trackingMeasurement);
337
337
  })) == null ? void 0 : k.name) ?? t.name
338
338
  } : null;
339
- }), S = C(
339
+ }), w = C(
340
340
  () => o.units.flatMap(({ name: t, _id: e, abbrev: v, measurements: k }) => [
341
341
  {
342
342
  label: `${t}`,
@@ -355,11 +355,11 @@ const on = /* @__PURE__ */ le({
355
355
  }))
356
356
  ])
357
357
  );
358
- function w(t) {
358
+ function M(t) {
359
359
  var e, v, k, T, I;
360
360
  return ((v = (e = n.modelValue) == null ? void 0 : e.unit) == null ? void 0 : v._id) === ((k = t.value) == null ? void 0 : k._id) && ((T = n.modelValue) == null ? void 0 : T.trackingMeasurement) === ((I = t.value) == null ? void 0 : I.measurement);
361
361
  }
362
- function M(t) {
362
+ function S(t) {
363
363
  var Y, G;
364
364
  if (!t) return;
365
365
  const { _id: e, measurement: v } = t, k = v || void 0, T = o.units.find((ie) => ie._id === e);
@@ -565,7 +565,7 @@ const on = /* @__PURE__ */ le({
565
565
  f(ie, null, {
566
566
  "menu-button": $(() => [
567
567
  f(T, {
568
- class: X([
568
+ class: Q([
569
569
  "fm-typo-en-body-lg-400",
570
570
  {
571
571
  "text-fm-color-typo-primary": !t.disabled,
@@ -589,10 +589,10 @@ const on = /* @__PURE__ */ le({
589
589
  class: "overflow-x-hidden overflow-y-auto max-h-[300px]",
590
590
  onVnodeMounted: ce
591
591
  }, [
592
- (y(!0), U(Q, null, oe(S.value, (q) => (y(), U(Q, {
592
+ (y(!0), U(X, null, oe(w.value, (q) => (y(), U(X, {
593
593
  key: q.label
594
594
  }, [
595
- q.displayAsSection ? (y(), U(Q, { key: 0 }, [
595
+ q.displayAsSection ? (y(), U(X, { key: 0 }, [
596
596
  f(I, {
597
597
  label: q.label
598
598
  }, null, 8, ["label"]),
@@ -600,9 +600,9 @@ const on = /* @__PURE__ */ le({
600
600
  ], 64)) : (y(), B(G, {
601
601
  key: 1,
602
602
  label: q.label,
603
- "model-value": w(q),
604
- onClick: (Nn) => M(q.value),
605
- "x-should-scroll-into": `${w(q)}`
603
+ "model-value": M(q),
604
+ onClick: (Ln) => S(q.value),
605
+ "x-should-scroll-into": `${M(q)}`
606
606
  }, null, 8, ["label", "model-value", "onClick", "x-should-scroll-into"]))
607
607
  ], 64))), 128))
608
608
  ], 512)
@@ -696,7 +696,7 @@ const on = /* @__PURE__ */ le({
696
696
  f(I, {
697
697
  label: d(r)("inventory.ingredient.operational.preset")
698
698
  }, null, 8, ["label"]),
699
- (y(!0), U(Q, null, oe(Object.values(Ie), (F) => (y(), B(G, {
699
+ (y(!0), U(X, null, oe(Object.values(Ie), (F) => (y(), B(G, {
700
700
  key: F,
701
701
  label: F,
702
702
  "model-value": V.value === F,
@@ -706,7 +706,7 @@ const on = /* @__PURE__ */ le({
706
706
  key: 0,
707
707
  label: d(r)("inventory.ingredient.operational.custom")
708
708
  }, null, 8, ["label"])) : O("", !0),
709
- (y(!0), U(Q, null, oe(H.value, (F) => (y(), B(G, {
709
+ (y(!0), U(X, null, oe(H.value, (F) => (y(), B(G, {
710
710
  key: F,
711
711
  label: F,
712
712
  "model-value": V.value === F,
@@ -885,8 +885,8 @@ const on = /* @__PURE__ */ le({
885
885
  message: n("inventory.ingredient.create.success", { name: o.value.name }),
886
886
  type: "success"
887
887
  });
888
- } catch (S) {
889
- S instanceof Te || r.open({
888
+ } catch (w) {
889
+ w instanceof Te || r.open({
890
890
  title: n("inventory.ingredient.create.error.title"),
891
891
  message: n("inventory.ingredient.create.error.message"),
892
892
  type: "error"
@@ -903,8 +903,8 @@ const on = /* @__PURE__ */ le({
903
903
  message: n("inventory.ingredient.update.success", { name: o.value.name }),
904
904
  type: "success"
905
905
  });
906
- } catch (S) {
907
- S instanceof Te || r.open({
906
+ } catch (w) {
907
+ w instanceof Te || r.open({
908
908
  title: n("inventory.ingredient.update.error.title"),
909
909
  message: n("inventory.ingredient.update.error.message"),
910
910
  type: "error"
@@ -914,8 +914,8 @@ const on = /* @__PURE__ */ le({
914
914
  }
915
915
  }
916
916
  function x() {
917
- var S, w;
918
- (w = (S = _.value) == null ? void 0 : S.validateInputs) == null || w.call(S);
917
+ var w, M;
918
+ (M = (w = _.value) == null ? void 0 : w.validateInputs) == null || M.call(w);
919
919
  }
920
920
  function D() {
921
921
  switch (i.mode) {
@@ -927,11 +927,11 @@ const on = /* @__PURE__ */ le({
927
927
  return h();
928
928
  }
929
929
  }
930
- return (S, w) => {
931
- const M = R("FmButton"), V = R("FmSideSheet");
930
+ return (w, M) => {
931
+ const S = R("FmButton"), V = R("FmSideSheet");
932
932
  return y(), B(V, {
933
933
  "model-value": d(l),
934
- "onUpdate:modelValue": w[3] || (w[3] = (H) => Ee(l) ? l.value = H : null),
934
+ "onUpdate:modelValue": M[3] || (M[3] = (H) => Ee(l) ? l.value = H : null),
935
935
  header: p.value,
936
936
  "close-button": "",
937
937
  "dismiss-away": "",
@@ -939,16 +939,16 @@ const on = /* @__PURE__ */ le({
939
939
  }, {
940
940
  "side-sheet-footer": $(() => [
941
941
  c("div", ln, [
942
- f(M, {
942
+ f(S, {
943
943
  loading: g.value,
944
944
  label: b.value,
945
945
  onClick: x
946
946
  }, null, 8, ["loading", "label"]),
947
- f(M, {
947
+ f(S, {
948
948
  disabled: g.value,
949
949
  label: d(n)("common.close"),
950
950
  variant: "tertiary",
951
- onClick: w[2] || (w[2] = (H) => l.value = !1)
951
+ onClick: M[2] || (M[2] = (H) => l.value = !1)
952
952
  }, null, 8, ["disabled", "label"])
953
953
  ])
954
954
  ]),
@@ -958,10 +958,10 @@ const on = /* @__PURE__ */ le({
958
958
  ref_key: "hasValidationExpose",
959
959
  ref: _,
960
960
  modelValue: d(o),
961
- "onUpdate:modelValue": w[0] || (w[0] = (H) => Ee(o) ? o.value = H : null),
962
- mode: S.mode,
961
+ "onUpdate:modelValue": M[0] || (M[0] = (H) => Ee(o) ? o.value = H : null),
962
+ mode: w.mode,
963
963
  disabled: g.value,
964
- "onClick:submit": w[1] || (w[1] = (H) => D())
964
+ "onClick:submit": M[1] || (M[1] = (H) => D())
965
965
  }, null, 8, ["modelValue", "mode", "disabled"])
966
966
  ]),
967
967
  _: 1
@@ -1079,9 +1079,9 @@ function vn(s) {
1079
1079
  );
1080
1080
  return p.map((u, x) => {
1081
1081
  const D = {};
1082
- for (const S in b) {
1083
- const w = b[S];
1084
- Object.assign(D, { [w]: u[S] });
1082
+ for (const w in b) {
1083
+ const M = b[w];
1084
+ Object.assign(D, { [M]: u[w] });
1085
1085
  }
1086
1086
  return {
1087
1087
  index: x,
@@ -1090,7 +1090,7 @@ function vn(s) {
1090
1090
  });
1091
1091
  }
1092
1092
  function Le(s, i, m) {
1093
- var M;
1093
+ var S;
1094
1094
  const n = ae().units, l = new Array(), o = m.filter((V) => V.data.code === s.code);
1095
1095
  o.length > 1 && l.push(
1096
1096
  `Code ${s.code} is already used in row ${o.map((V) => V.index + 6).join()}.`
@@ -1111,7 +1111,7 @@ function Le(s, i, m) {
1111
1111
  const h = fe().currentCountry.value, u = (V) => `${V}`.length && mt()(V) === !0, x = u(`${s.pricePerUnit}`) === !0 ? {
1112
1112
  costPerUnit: {
1113
1113
  ...qe(Number(s.pricePerUnit) || 0),
1114
- currency: ((M = xe(h)) == null ? void 0 : M.currency) ?? "MYR"
1114
+ currency: ((S = xe(h)) == null ? void 0 : S.currency) ?? "MYR"
1115
1115
  },
1116
1116
  measurement: b
1117
1117
  } : void 0, D = u(`${s.thresholdLow}`) && u(`${s.thresholdMid}`) ? {
@@ -1198,7 +1198,7 @@ const yn = {
1198
1198
  };
1199
1199
  function u(a) {
1200
1200
  if (a)
1201
- if (p.value = a, l.value = D(a[0]), o.value = S(a[0]), l.value && o.value)
1201
+ if (p.value = a, l.value = D(a[0]), o.value = w(a[0]), l.value && o.value)
1202
1202
  r("file-upload", a[0]);
1203
1203
  else {
1204
1204
  const N = x();
@@ -1217,11 +1217,11 @@ const yn = {
1217
1217
  if (!m.accept) return !0;
1218
1218
  const N = m.accept.split(",").map((W) => W.trim());
1219
1219
  for (const W of N)
1220
- if (w(W)) {
1220
+ if (M(W)) {
1221
1221
  if (V(W) === V(a.type)) return !0;
1222
- } else if (M(a) === W || a.type === W) return !0;
1222
+ } else if (S(a) === W || a.type === W) return !0;
1223
1223
  return !1;
1224
- }, S = (a) => a.size <= m.maxFileSize, w = (a) => a.indexOf("*") !== -1, M = (a) => "." + a.name.split(".").pop(), V = (a) => a.substring(0, a.indexOf("/")), H = C(() => {
1224
+ }, w = (a) => a.size <= m.maxFileSize, M = (a) => a.indexOf("*") !== -1, S = (a) => "." + a.name.split(".").pop(), V = (a) => a.substring(0, a.indexOf("/")), H = C(() => {
1225
1225
  if (n.value) return "Drop file to upload";
1226
1226
  if (l.value) {
1227
1227
  if (!o.value) return `File size exceeds ${m.maxFileSize * 1e-6}mb`;
@@ -1267,7 +1267,7 @@ const yn = {
1267
1267
  }, null, 8, ["label"]))
1268
1268
  ]),
1269
1269
  c("div", {
1270
- class: X([[
1270
+ class: Q([[
1271
1271
  a.contentClass ? a.contentClass : "w-full h-full",
1272
1272
  {
1273
1273
  "fm-droppable-field__container--dragging": n.value,
@@ -1282,7 +1282,7 @@ const yn = {
1282
1282
  }, [
1283
1283
  (n.value || J.value) && !a.disabled ? (y(), U("div", {
1284
1284
  key: 0,
1285
- class: X({
1285
+ class: Q({
1286
1286
  "fm-typo-en-body-lg-600": !0,
1287
1287
  "text-fm-color-primary": n.value,
1288
1288
  "text-fm-color-typo-error": J.value
@@ -1297,7 +1297,7 @@ const yn = {
1297
1297
  ge(a.$slots, "accept-text", {}, () => [
1298
1298
  m.accept ? (y(), U("div", {
1299
1299
  key: 0,
1300
- class: X([[a.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"], "fm-typo-en-body-md-400"])
1300
+ class: Q([[a.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"], "fm-typo-en-body-md-400"])
1301
1301
  }, L(`Accepts ${m.accept}`), 3)) : O("", !0)
1302
1302
  ], !0),
1303
1303
  c("input", {
@@ -1310,7 +1310,7 @@ const yn = {
1310
1310
  ], 34),
1311
1311
  ge(a.$slots, "helper-text", {}, () => [
1312
1312
  c("div", {
1313
- class: X([[a.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"], "fm-typo-en-body-sm-400"])
1313
+ class: Q([[a.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"], "fm-typo-en-body-sm-400"])
1314
1314
  }, L(`Max size ${m.maxFileSize * 1e-6}mb`), 3)
1315
1315
  ], !0)
1316
1316
  ], !0)
@@ -1336,7 +1336,7 @@ const yn = {
1336
1336
  c("div", kn, [
1337
1337
  c("div", Cn, [
1338
1338
  c("div", {
1339
- class: X({
1339
+ class: Q({
1340
1340
  "text-fm-color-system-error-300": i.errors.length
1341
1341
  })
1342
1342
  }, [
@@ -1347,7 +1347,7 @@ const yn = {
1347
1347
  f(n, { "z-index": 50 }, {
1348
1348
  content: $(() => [
1349
1349
  c("ol", null, [
1350
- (y(!0), U(Q, null, oe(i.errors, (l, o) => (y(), U("li", { key: o }, L(l), 1))), 128))
1350
+ (y(!0), U(X, null, oe(i.errors, (l, o) => (y(), U("li", { key: o }, L(l), 1))), 128))
1351
1351
  ])
1352
1352
  ]),
1353
1353
  default: $(() => [
@@ -1362,7 +1362,7 @@ const yn = {
1362
1362
  ])) : O("", !0)
1363
1363
  ]),
1364
1364
  c("div", {
1365
- class: X([
1365
+ class: Q([
1366
1366
  "fm-typo-en-body-sm-400",
1367
1367
  {
1368
1368
  "text-fm-color-system-error-200": i.errors.length,
@@ -1398,22 +1398,22 @@ const yn = {
1398
1398
  const [x] = await Promise.all([
1399
1399
  Mt(u),
1400
1400
  // fake buffer
1401
- new Promise((w) => setTimeout(w, 1e3))
1402
- ]), D = x.SheetNames.find((w) => w);
1401
+ new Promise((M) => setTimeout(M, 1e3))
1402
+ ]), D = x.SheetNames.find((M) => M);
1403
1403
  if (!D) {
1404
1404
  l.value.push(g("inventory.ingredient.import.fileError.noSheet"));
1405
1405
  return;
1406
1406
  }
1407
- const S = fn(x.Sheets[D]);
1408
- if (S.invalidExcel) {
1409
- l.value.push(S.invalidExcelMessage ?? g("inventory.ingredient.import.fileError.invalidExcel"));
1407
+ const w = fn(x.Sheets[D]);
1408
+ if (w.invalidExcel) {
1409
+ l.value.push(w.invalidExcelMessage ?? g("inventory.ingredient.import.fileError.invalidExcel"));
1410
1410
  return;
1411
1411
  }
1412
- if (o.value = S.importCreateResult, p.value = S.importUpdateResult, !o.value.length && !p.value.length) {
1412
+ if (o.value = w.importCreateResult, p.value = w.importUpdateResult, !o.value.length && !p.value.length) {
1413
1413
  l.value.push(g("inventory.ingredient.import.fileError.noData"));
1414
1414
  return;
1415
1415
  }
1416
- m.emitData(S);
1416
+ m.emitData(w);
1417
1417
  } catch (x) {
1418
1418
  r.open({
1419
1419
  title: g("inventory.ingredient.import.fileError.unableToRead"),
@@ -1430,25 +1430,25 @@ const yn = {
1430
1430
  return je(i, (u) => {
1431
1431
  u && h(u);
1432
1432
  }), (u, x) => {
1433
- const D = R("FmCircularProgress"), S = R("FmIcon"), w = R("FmButton");
1433
+ const D = R("FmCircularProgress"), w = R("FmIcon"), M = R("FmButton");
1434
1434
  return y(), U("div", wn, [
1435
1435
  c("div", Mn, L(d(g)("inventory.ingredient.import.uploadDescription")), 1),
1436
1436
  f(xn, {
1437
- class: X({
1437
+ class: Q({
1438
1438
  "w-full": !0,
1439
1439
  "h-[200px]": !i.value
1440
1440
  }),
1441
1441
  accept: ".xlsx",
1442
- onFileUpload: x[0] || (x[0] = (M) => i.value = M),
1442
+ onFileUpload: x[0] || (x[0] = (S) => i.value = S),
1443
1443
  label: d(g)("inventory.ingredient.import.uploadTemplate"),
1444
1444
  "button-label": d(g)("inventory.ingredient.import.selectFile")
1445
1445
  }, Oe({ _: 2 }, [
1446
1446
  i.value ? {
1447
1447
  name: "default",
1448
- fn: $(({ openFileDialog: M }) => [
1448
+ fn: $(({ openFileDialog: S }) => [
1449
1449
  c("div", $n, [
1450
1450
  c("div", {
1451
- class: X([
1451
+ class: Q([
1452
1452
  "fm-corner-radius-md p-16 flex items-center gap-16",
1453
1453
  {
1454
1454
  "border border-fm-color-neutral-gray-100": n.value,
@@ -1461,14 +1461,14 @@ const yn = {
1461
1461
  key: 0,
1462
1462
  size: "md",
1463
1463
  color: "neutral-gray-200"
1464
- })) : (y(), B(S, {
1464
+ })) : (y(), B(w, {
1465
1465
  key: 1,
1466
1466
  name: b.value ? "error" : "attach_file",
1467
1467
  outline: "",
1468
1468
  color: b.value ? "system-error-300" : void 0
1469
1469
  }, null, 8, ["name", "color"])),
1470
1470
  c("div", {
1471
- class: X([
1471
+ class: Q([
1472
1472
  "fm-typo-en-body-md-400 flex-1 h-[36px] flex items-center",
1473
1473
  {
1474
1474
  "text-fm-color-typo-disabled": n.value,
@@ -1479,20 +1479,20 @@ const yn = {
1479
1479
  c("div", In, L(i.value.name), 1)
1480
1480
  ], 2),
1481
1481
  n.value ? O("", !0) : (y(), U("div", Rn, [
1482
- f(w, {
1482
+ f(M, {
1483
1483
  label: d(g)("inventory.ingredient.import.replaceFile"),
1484
1484
  variant: b.value ? "destructive" : "secondary",
1485
1485
  "prepend-icon": b.value ? void 0 : "autorenew",
1486
- onClick: M
1486
+ onClick: S
1487
1487
  }, null, 8, ["label", "variant", "prepend-icon", "onClick"])
1488
1488
  ]))
1489
1489
  ], 2),
1490
1490
  l.value.length ? (y(), U("div", Un, [
1491
- (y(!0), U(Q, null, oe(l.value, (V, H) => (y(), U("div", {
1491
+ (y(!0), U(X, null, oe(l.value, (V, H) => (y(), U("div", {
1492
1492
  key: H,
1493
1493
  class: "flex gap-8 items-center"
1494
1494
  }, [
1495
- f(S, {
1495
+ f(w, {
1496
1496
  name: "error",
1497
1497
  size: "sm",
1498
1498
  color: "system-error-300"
@@ -1507,25 +1507,25 @@ const yn = {
1507
1507
  ]), 1032, ["class", "label", "button-label"]),
1508
1508
  _.value ? (y(), U("div", Dn, [
1509
1509
  c("div", An, L(d(g)("inventory.ingredient.import.summary")), 1),
1510
- (y(!0), U(Q, null, oe(o.value, (M) => (y(), B(Ne, {
1511
- key: M.sku._id,
1512
- code: M.sku.code,
1513
- name: M.sku.name,
1514
- errors: M.errors,
1510
+ (y(!0), U(X, null, oe(o.value, (S) => (y(), B(Ne, {
1511
+ key: S.sku._id,
1512
+ code: S.sku.code,
1513
+ name: S.sku.name,
1514
+ errors: S.errors,
1515
1515
  type: "create"
1516
1516
  }, null, 8, ["code", "name", "errors"]))), 128)),
1517
- (y(!0), U(Q, null, oe(p.value, (M) => (y(), B(Ne, {
1518
- key: M.sku._id,
1519
- code: M.sku.code,
1520
- name: M.sku.name,
1521
- errors: M.errors,
1517
+ (y(!0), U(X, null, oe(p.value, (S) => (y(), B(Ne, {
1518
+ key: S.sku._id,
1519
+ code: S.sku.code,
1520
+ name: S.sku.name,
1521
+ errors: S.errors,
1522
1522
  type: "update"
1523
1523
  }, null, 8, ["code", "name", "errors"]))), 128))
1524
1524
  ])) : O("", !0)
1525
1525
  ]);
1526
1526
  };
1527
1527
  }
1528
- }), Pn = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, Bn = { class: "flex flex-col py-8" }, zn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ln = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, to = /* @__PURE__ */ le({
1528
+ }), Pn = { class: "flex flex-col py-8" }, Bn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, zn = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, eo = /* @__PURE__ */ le({
1529
1529
  __name: "IngredientsView",
1530
1530
  setup(s) {
1531
1531
  const i = ae(), m = C(() => i.skus), r = vt(), n = Ke(), l = Ve(), { t: o } = re(), { createIngredient: p, updateIngredient: b } = $e(), { ingredientDialogProps: _, ingredientViewLoading: g } = _t($e()), { columnDefs: h } = $t();
@@ -1537,7 +1537,7 @@ const yn = {
1537
1537
  return W();
1538
1538
  }
1539
1539
  }
1540
- const x = z(""), D = z(!1), S = C(() => D.value || g.value), { breakpoints: w } = yt(), M = C(() => w.value.xs || w.value.sm), V = C(() => M.value ? 10 : 20), H = kt(), J = z(!1), ee = [
1540
+ const x = z(""), D = z(!1), w = C(() => D.value || g.value), { breakpoints: M } = yt(), S = C(() => M.value.xs || M.value.sm), V = C(() => S.value ? 10 : 20), H = kt(), J = z(!1), ee = [
1541
1541
  {
1542
1542
  value: "import",
1543
1543
  label: o("common.import")
@@ -1555,7 +1555,7 @@ const yn = {
1555
1555
  return N();
1556
1556
  }
1557
1557
  }
1558
- const Z = C(() => M.value ? [{ icon: "more_vert", onClick: te }] : [{ icon: "ios_share", onClick: N }]), a = C(() => {
1558
+ const Z = C(() => S.value ? [{ icon: "more_vert", onClick: te }] : [{ icon: "ios_share", onClick: N }]), a = C(() => {
1559
1559
  const A = [
1560
1560
  {
1561
1561
  label: o("inventory.ingredient.create.title"),
@@ -1564,7 +1564,7 @@ const yn = {
1564
1564
  prependIcon: "add"
1565
1565
  }
1566
1566
  ];
1567
- return M.value ? A : [...A, { label: o("inventory.ingredient.import.title"), value: "import" }];
1567
+ return S.value ? A : [...A, { label: o("inventory.ingredient.import.title"), value: "import" }];
1568
1568
  });
1569
1569
  function N() {
1570
1570
  const A = mn();
@@ -1666,7 +1666,15 @@ const yn = {
1666
1666
  "onClick:action": u
1667
1667
  }, {
1668
1668
  default: $(() => [
1669
- c("div", Pn, [
1669
+ c("div", {
1670
+ class: Q([
1671
+ "flex flex-col gap-8 max-h-full",
1672
+ {
1673
+ "p-0": S.value,
1674
+ "px-24 ": !S.value
1675
+ }
1676
+ ])
1677
+ }, [
1670
1678
  f(Ft, {
1671
1679
  searchable: "",
1672
1680
  search: x.value,
@@ -1678,7 +1686,7 @@ const yn = {
1678
1686
  "column-defs": d(h),
1679
1687
  "row-data": m.value,
1680
1688
  "search-value": x.value,
1681
- loading: !d(r)._currentLocation || S.value,
1689
+ loading: !d(r)._currentLocation || w.value,
1682
1690
  "loading-text": "Loading",
1683
1691
  onRowClick: E[1] || (E[1] = (P) => d(b)(P.original)),
1684
1692
  "page-size": V.value
@@ -1691,14 +1699,14 @@ const yn = {
1691
1699
  default: $((j) => {
1692
1700
  var ye, pe, t, e, v, k, T, I, Y, G;
1693
1701
  return [
1694
- c("div", Bn, [
1695
- c("div", zn, [
1702
+ c("div", Pn, [
1703
+ c("div", Bn, [
1696
1704
  f(d(ze), {
1697
1705
  render: (t = (pe = (ye = j.code) == null ? void 0 : ye.column) == null ? void 0 : pe.columnDef) == null ? void 0 : t.cell,
1698
1706
  props: (v = (e = j.code) == null ? void 0 : e.getContext) == null ? void 0 : v.call(e)
1699
1707
  }, null, 8, ["render", "props"])
1700
1708
  ]),
1701
- c("div", Ln, [
1709
+ c("div", zn, [
1702
1710
  f(d(ze), {
1703
1711
  render: (I = (T = (k = j.name) == null ? void 0 : k.column) == null ? void 0 : T.columnDef) == null ? void 0 : I.cell,
1704
1712
  props: (G = (Y = j.name) == null ? void 0 : Y.getContext) == null ? void 0 : G.call(Y)
@@ -1720,7 +1728,7 @@ const yn = {
1720
1728
  ]),
1721
1729
  _: 1
1722
1730
  }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
1723
- ]),
1731
+ ], 2),
1724
1732
  (y(), B(De, { to: "body" }, [
1725
1733
  f(an, lt(at(d(_))), null, 16)
1726
1734
  ])),
@@ -1747,5 +1755,5 @@ const yn = {
1747
1755
  }
1748
1756
  });
1749
1757
  export {
1750
- to as default
1758
+ eo as default
1751
1759
  };