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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/{App-DY01VbHo.js → App-N2myASr3.js} +44 -41
  2. package/dist/{ApprovalView-DtwXb5T7.js → ApprovalView-B87DpnNq.js} +20 -23
  3. package/dist/{BindingsDialog-ClnnwUTV.js → BindingsDialog-DehCgt1T.js} +7 -7
  4. package/dist/{BindingsPicker-DbdkXiHx.js → BindingsPicker-BBtJ3rBB.js} +7 -8
  5. package/dist/{BindingsTable-Cqh3Ku0d.js → BindingsTable-CfHuy-K1.js} +16 -20
  6. package/dist/{ClosingDraftView-CzuMTeC1.js → ClosingDraftView-BYZ1mZrG.js} +190 -196
  7. package/dist/{ClosingTemplateView-CVQlOya4.js → ClosingTemplateView-CAL9jYaf.js} +49 -60
  8. package/dist/{FmDroppableField-8RzKjEdL.js → FmDroppableField-CC7RiBoR.js} +1 -1
  9. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BO1wCa9i.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C4G9LaXv.js} +24 -25
  10. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-sgvBxxkn.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BBf7jmJz.js} +56 -57
  11. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-D7uvrzFU.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DjTvrLPs.js} +7 -7
  12. package/dist/{IngredientGroupView-DgDZnggI.js → IngredientGroupView-X0ST4tW9.js} +30 -37
  13. package/dist/{IngredientsView-SuCckJrj.js → IngredientsView-BUJXzpVr.js} +106 -112
  14. package/dist/{IntegrationView-CZQoHCkX.js → IntegrationView-QbuIwjec.js} +63 -65
  15. package/dist/{InventoryBindingForm-C-E3EINv.js → InventoryBindingForm-C1BR_h_3.js} +1 -1
  16. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-B3nsmCuj.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CRwcFskQ.js} +18 -20
  17. package/dist/{InventoryBindingSummary-DNiOKfO8.js → InventoryBindingSummary-gn3Gq1ok.js} +1 -1
  18. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CdYa8Pv2.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-GY3FFm5_.js} +1 -1
  19. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BwxgZ-vM.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DVwtuUg9.js} +8 -8
  20. package/dist/{PurchaseOrderPrintPreview-C6i2S9L-.js → PurchaseOrderPrintPreview-FuOYaO56.js} +13 -14
  21. package/dist/{ReceiveRequestView-BABjGvIn.js → ReceiveRequestView-BNz1brve.js} +66 -75
  22. package/dist/{RecipeView-CoMcIuHu.js → RecipeView-DRKTODfC.js} +58 -64
  23. package/dist/{StockView-DhJshtaj.js → StockView-DnMcfkGG.js} +80 -87
  24. package/dist/{SupplierView-hQtDIQzE.js → SupplierView-DAnnWZUN.js} +45 -52
  25. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-DsJUSZsm.js → TransferDetails.vue_vue_type_script_setup_true_lang-BBARPa0S.js} +103 -110
  26. package/dist/{TransferTemplateView-GzwT4hp-.js → TransferTemplateView-2qlKwwKg.js} +217 -227
  27. package/dist/{UnitView-CRMF6RWu.js → UnitView-u5wZGetF.js} +103 -108
  28. package/dist/{WarehouseView-AVEDff0v.js → WarehouseView-Z80N7FJV.js} +77 -84
  29. package/dist/api/adjustment-template.d.ts +23 -0
  30. package/dist/app-Fc2FPGhO.js +58871 -0
  31. package/dist/app.d.ts +51 -0
  32. package/dist/app.js +2 -2
  33. package/dist/components/FmMultiselectDialogProps.d.ts +1 -0
  34. package/dist/composable/defineDeepModel.d.ts +1 -1
  35. package/dist/{decimal-N5ymnwhP.js → decimal-BDD-e5Lb.js} +1 -1
  36. package/dist/{feature-Bfq8yWgS.js → feature-BMEyYowI.js} +1 -1
  37. package/dist/{format-unit-display-CXawcmvj.js → format-unit-display-DvlR_z--.js} +205 -212
  38. package/dist/{index-CcCqc9jx.js → index-CR22QBdu.js} +1 -1
  39. package/dist/{netsuite-DX6L1oLu.js → netsuite-CqMWgzKo.js} +9 -9
  40. package/dist/router/name.d.ts +1 -0
  41. package/dist/{stock-Btlxmf8R.js → stock-sIy40ix1.js} +7 -8
  42. package/dist/style.css +1 -1
  43. package/dist/supplier-Cf24JqTH.js +77 -0
  44. package/dist/tsconfig.app.tsbuildinfo +1 -1
  45. package/dist/{use-inventory-binding-dialog-BFqxWNzX.js → use-inventory-binding-dialog-Br9Uv9o8.js} +10 -11
  46. package/dist/views/adjustment-template/wastage-template/WastageTemplateDetails.vue.d.ts +2 -0
  47. package/dist/views/adjustment-template/wastage-template/WastageTemplateDialog.vue.d.ts +22 -0
  48. package/dist/views/adjustment-template/wastage-template/WastageTemplatePublish.vue.d.ts +6 -0
  49. package/dist/views/adjustment-template/wastage-template/WastageTemplateView.vue.d.ts +2 -0
  50. package/dist/views/adjustment-template/wastage-template/actions.d.ts +1295 -0
  51. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateForm.vue.d.ts +16 -0
  52. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +35 -0
  53. package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +20 -0
  54. package/dist/views/adjustment-template/wastage-template/props.d.ts +29 -0
  55. package/dist/views/adjustment-template/wastage-template/table.d.ts +1273 -0
  56. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -2
  57. package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
  58. package/dist/{xlsx-C3L2eW52.js → xlsx-sL0sD2HQ.js} +1 -1
  59. package/dist/{xlsx.util-CJKLCuWK.js → xlsx.util-D2Tdwf8J.js} +1 -1
  60. package/package.json +3 -3
  61. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-m92y5x0G.js +0 -436
  62. package/dist/FmMultiselectDialog-Jr9uL_z_.js +0 -415
  63. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +0 -135
  64. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  65. package/dist/app-ww5ibHkL.js +0 -33540
  66. package/dist/date2-D5MTVjlP.js +0 -117
  67. package/dist/dayjs.min-7pwGJ2aW.js +0 -282
  68. package/dist/defineDeepModel-DJODEpcR.js +0 -13
  69. package/dist/form-mode.enum-BKiNVH6A.js +0 -4
  70. package/dist/format-time-from-id-0UkRUr39.js +0 -15
  71. package/dist/fuzzy-DdOiOd-q.js +0 -41
  72. package/dist/index-Cin_fxtb.js +0 -45
  73. package/dist/index-gvJJ-xRY.js +0 -22283
  74. package/dist/row-action.enum-7rGLGZ5v.js +0 -55
  75. package/dist/rules-C83wiSGb.js +0 -203
  76. package/dist/supplier-CSzla-9I.js +0 -77
  77. package/dist/use-template-enabled-locations-2-CUkqC-cd.js +0 -86
@@ -1,16 +1,11 @@
1
1
  import { defineComponent as K, computed as _, openBlock as v, createElementBlock as w, createElementVNode as l, Fragment as q, renderList as H, toDisplayString as V, createCommentVNode as Y, ref as M, resolveComponent as I, createBlock as T, withCtx as R, createVNode as y, unref as a, isRef as Z, normalizeClass as ae, normalizeStyle as re, Teleport as ie, normalizeProps as ue, guardReactiveProps as de } from "vue";
2
- import { a as G, S as me, c as ne, h as ee, u as ce } from "./app-ww5ibHkL.js";
3
- import { useDialog as pe, useSnackbar as le, useProxiedModel as te, useBreakpoints as fe } from "@feedmepos/ui-library";
4
- import { i as ve, _ as ye } from "./is-linked-ingredient-error-fJ2TJb3z.js";
5
- import { F as U } from "./form-mode.enum-BKiNVH6A.js";
6
- import { defineStore as be, storeToRefs as ge } from "pinia";
7
- import { D as oe, R as N } from "./row-action.enum-7rGLGZ5v.js";
8
- import { c as xe, _ as _e, F as he } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
2
+ import { a as G, c as U, S as me, e as ce, D as ee, f as N, d as oe, k as j, A as pe, h as J, z as fe, B as ve, m as te, u as ye, p as be, q as ge, r as xe, s as _e, v as he } from "./app-Fc2FPGhO.js";
3
+ import { useDialog as Ve, useSnackbar as le, useProxiedModel as ne, useBreakpoints as Ue } from "@feedmepos/ui-library";
4
+ import { i as we, _ as Ce } from "./is-linked-ingredient-error-fJ2TJb3z.js";
5
+ import { defineStore as ke, storeToRefs as Se } from "pinia";
9
6
  import { useI18n as O } from "@feedmepos/mf-common";
10
- import { u as Ve, _ as Ue, a as we } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-m92y5x0G.js";
11
- import { R as j, A as Ce, a as J, c as ke, d as Fe } from "./rules-C83wiSGb.js";
12
- import { F as Se } from "./decimal-N5ymnwhP.js";
13
- import { _ as $e } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CdYa8Pv2.js";
7
+ import { F as Fe } from "./decimal-BDD-e5Lb.js";
8
+ import { _ as $e } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-GY3FFm5_.js";
14
9
  const Ee = { class: "flex flex-col gap-8" }, Ie = {
15
10
  key: 0,
16
11
  class: "flex flex-col"
@@ -35,7 +30,7 @@ const Ee = { class: "flex flex-col gap-8" }, Ie = {
35
30
  unit: {}
36
31
  },
37
32
  setup(k) {
38
- const f = k, b = G(), i = _(() => b.validateUnitUsage(f.unit)), r = _(() => i.value.filter((c) => c.from === "INGREDIENT")), n = _(() => i.value.filter((c) => c.from === "RECIPE")), m = _(() => i.value.filter((c) => c.from === "MENU"));
33
+ const f = k, b = G(), i = _(() => b.validateUnitUsage(f.unit)), r = _(() => i.value.filter((c) => c.from === "INGREDIENT")), o = _(() => i.value.filter((c) => c.from === "RECIPE")), m = _(() => i.value.filter((c) => c.from === "MENU"));
39
34
  return (c, p) => (v(), w("div", Ee, [
40
35
  p[3] || (p[3] = l("div", { class: "fm-typo-en-body-md-400" }, "Sorry, this unit is used in the following modules:", -1)),
41
36
  r.value.length ? (v(), w("div", Ie, [
@@ -47,17 +42,17 @@ const Ee = { class: "flex flex-col gap-8" }, Ie = {
47
42
  }, "Used in")
48
43
  ], -1)),
49
44
  (v(!0), w(q, null, H(r.value, (s) => {
50
- var o;
45
+ var n;
51
46
  return v(), w("div", {
52
47
  key: s.code,
53
48
  class: "flex flex-row fm-typo-en-body-md-400 h-48 items-center border-b border-b-fm-color-neutral-gray-100"
54
49
  }, [
55
50
  l("div", De, V(s.code) + " " + V(s.name), 1),
56
- l("div", Ae, V((o = s.bindedIngredient) != null && o.length ? "Convert binding" : "Item unit"), 1)
51
+ l("div", Ae, V((n = s.bindedIngredient) != null && n.length ? "Convert binding" : "Item unit"), 1)
57
52
  ]);
58
53
  }), 128))
59
54
  ])) : Y("", !0),
60
- n.value.length ? (v(), w("div", Re, [
55
+ o.value.length ? (v(), w("div", Re, [
61
56
  p[1] || (p[1] = l("div", { 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" }, [
62
57
  l("div", { class: "flex-1 py-8 px-16" }, "Recipe"),
63
58
  l("div", {
@@ -65,14 +60,14 @@ const Ee = { class: "flex flex-col gap-8" }, Ie = {
65
60
  style: { "flex-basis": "240px" }
66
61
  }, "Used in")
67
62
  ], -1)),
68
- (v(!0), w(q, null, H(n.value, (s) => {
69
- var o, u, g;
63
+ (v(!0), w(q, null, H(o.value, (s) => {
64
+ var n, u, g;
70
65
  return v(), w("div", {
71
66
  key: s.code,
72
67
  class: "flex flex-row fm-typo-en-body-md-400 h-48 items-center border-b border-b-fm-color-neutral-gray-100"
73
68
  }, [
74
69
  l("div", Me, V(s.code) + " " + V(s.name), 1),
75
- l("div", Pe, V((o = s.bindedIngredient) == null ? void 0 : o.slice(0, 3).map((x) => x.code).join(", ")) + " " + V(s.bindedIngredient && ((u = s.bindedIngredient) == null ? void 0 : u.length) > 3 ? `and ${((g = s.bindedIngredient) == null ? void 0 : g.length) - 3} more` : ""), 1)
70
+ l("div", Pe, V((n = s.bindedIngredient) == null ? void 0 : n.slice(0, 3).map((x) => x.code).join(", ")) + " " + V(s.bindedIngredient && ((u = s.bindedIngredient) == null ? void 0 : u.length) > 3 ? `and ${((g = s.bindedIngredient) == null ? void 0 : g.length) - 3} more` : ""), 1)
76
71
  ]);
77
72
  }), 128))
78
73
  ])) : Y("", !0),
@@ -85,56 +80,56 @@ const Ee = { class: "flex flex-col gap-8" }, Ie = {
85
80
  }, "Used in")
86
81
  ], -1)),
87
82
  (v(!0), w(q, null, H(m.value, (s) => {
88
- var o, u, g;
83
+ var n, u, g;
89
84
  return v(), w("div", {
90
85
  key: s.code,
91
86
  class: "flex flex-row fm-typo-en-body-md-400 h-48 items-center border-b border-b-fm-color-neutral-gray-100"
92
87
  }, [
93
88
  l("div", Be, V(s.code) + " " + V(s.name), 1),
94
- l("div", ze, V((o = s.bindedIngredient) == null ? void 0 : o.slice(0, 3).map((x) => x.code).join(", ")) + " " + V(s.bindedIngredient && ((u = s.bindedIngredient) == null ? void 0 : u.length) > 3 ? `and ${((g = s.bindedIngredient) == null ? void 0 : g.length) - 3} more` : ""), 1)
89
+ l("div", ze, V((n = s.bindedIngredient) == null ? void 0 : n.slice(0, 3).map((x) => x.code).join(", ")) + " " + V(s.bindedIngredient && ((u = s.bindedIngredient) == null ? void 0 : u.length) > 3 ? `and ${((g = s.bindedIngredient) == null ? void 0 : g.length) - 3} more` : ""), 1)
95
90
  ]);
96
91
  }), 128))
97
92
  ])) : Y("", !0)
98
93
  ]));
99
94
  }
100
- }), Q = be("unitForm", function() {
101
- const f = pe(), b = le(), i = G(), r = M(!1), n = M();
95
+ }), Q = ke("unitForm", function() {
96
+ const f = Ve(), b = le(), i = G(), r = M(!1), o = M();
102
97
  function m() {
103
- const o = {
98
+ const n = {
104
99
  unit: {},
105
100
  mode: U.CREATE,
106
101
  show: !0,
107
102
  "onUpdate:show"(u) {
108
- n.value.show = u;
103
+ o.value.show = u;
109
104
  }
110
105
  };
111
- n.value = o;
106
+ o.value = n;
112
107
  }
113
- async function c(o) {
108
+ async function c(n) {
114
109
  const u = {
115
- unit: o,
110
+ unit: n,
116
111
  mode: U.UPDATE,
117
112
  show: !0,
118
113
  "onUpdate:show"(g) {
119
- n.value.show = g;
114
+ o.value.show = g;
120
115
  }
121
116
  };
122
- n.value = u;
117
+ o.value = u;
123
118
  }
124
- async function p(o) {
119
+ async function p(n) {
125
120
  r.value = !0;
126
121
  try {
127
- await i.deleteUnit(o), b.open({
122
+ await i.deleteUnit(n), b.open({
128
123
  title: "Success",
129
- message: `Deleted ${o.name}`,
124
+ message: `Deleted ${n.name}`,
130
125
  type: "success"
131
126
  });
132
127
  } catch (u) {
133
- u instanceof me && ve(u) ? f.open({
128
+ u instanceof me && we(u) ? f.open({
134
129
  title: "Cannot delete unit",
135
- contentComponent: ye,
130
+ contentComponent: Ce,
136
131
  contentComponentProps: {
137
- subject: (o == null ? void 0 : o.name) ?? "",
132
+ subject: (n == null ? void 0 : n.name) ?? "",
138
133
  items: u.errorResponse.message
139
134
  },
140
135
  secondaryActions: {
@@ -142,7 +137,7 @@ const Ee = { class: "flex flex-col gap-8" }, Ie = {
142
137
  close: !0
143
138
  }
144
139
  }) : console.log("unable to delete unit", u), b.open({
145
- title: `Cannot delete ${o.name}`,
140
+ title: `Cannot delete ${n.name}`,
146
141
  message: "Please try again.",
147
142
  type: "error"
148
143
  }), console.error("failed to delete unit", u);
@@ -150,16 +145,16 @@ const Ee = { class: "flex flex-col gap-8" }, Ie = {
150
145
  r.value = !1;
151
146
  }
152
147
  }
153
- function s(o) {
154
- if (i.validateUnitUsage(o).length) {
148
+ function s(n) {
149
+ if (i.validateUnitUsage(n).length) {
155
150
  f.open({
156
- title: `Cannot delete ${(o == null ? void 0 : o.name) ?? "unit"}`,
151
+ title: `Cannot delete ${(n == null ? void 0 : n.name) ?? "unit"}`,
157
152
  overlay: !0,
158
153
  dismissAway: !0,
159
154
  closeButton: !0,
160
155
  contentComponent: Le,
161
156
  contentComponentProps: {
162
- unit: o
157
+ unit: n
163
158
  },
164
159
  primaryActions: {
165
160
  text: "Confirm",
@@ -169,7 +164,7 @@ const Ee = { class: "flex flex-col gap-8" }, Ie = {
169
164
  return;
170
165
  }
171
166
  f.open({
172
- title: `Delete ${(o == null ? void 0 : o.name) ?? "unit"}?`,
167
+ title: `Delete ${(n == null ? void 0 : n.name) ?? "unit"}?`,
173
168
  closeButton: !1,
174
169
  message: "You may not be able to delete this unit if it is linked in any of the inventory modules.",
175
170
  primaryActions: {
@@ -181,25 +176,25 @@ const Ee = { class: "flex flex-col gap-8" }, Ie = {
181
176
  text: "Cancel",
182
177
  close: !0
183
178
  }
184
- }).onPrimary(() => p(o));
179
+ }).onPrimary(() => p(n));
185
180
  }
186
181
  return {
187
182
  createUnit: m,
188
183
  updateUnit: c,
189
184
  deleteUnit: s,
190
- unitDialogProps: n,
185
+ unitDialogProps: o,
191
186
  unitViewLoading: r
192
187
  };
193
188
  });
194
189
  function Ne() {
195
190
  const { updateUnit: k, deleteUnit: f } = Q(), { t: b } = O();
196
- async function i(n, m) {
197
- const c = ne(m);
198
- if (n === N.Edit) {
191
+ async function i(o, m) {
192
+ const c = oe(m);
193
+ if (o === N.Edit) {
199
194
  await k(c);
200
195
  return;
201
196
  }
202
- if (n === N.Delete) {
197
+ if (o === N.Delete) {
203
198
  await f(c);
204
199
  return;
205
200
  }
@@ -220,11 +215,11 @@ function Ne() {
220
215
  {
221
216
  id: "action",
222
217
  header: "",
223
- cell(n) {
224
- return xe(
225
- [oe[N.Edit], oe[N.Delete]],
218
+ cell(o) {
219
+ return ce(
220
+ [ee[N.Edit], ee[N.Delete]],
226
221
  (m) => {
227
- i(m, n.row.original);
222
+ i(m, o.row.original);
228
223
  }
229
224
  );
230
225
  },
@@ -246,7 +241,7 @@ const je = { class: "flex flex-col gap-24" }, qe = { class: "flex gap-24" }, He
246
241
  },
247
242
  emits: ["update:modelValue", "click:submit"],
248
243
  setup(k, { expose: f, emit: b }) {
249
- const i = k, r = b, { t: n } = O();
244
+ const i = k, r = b, { t: o } = O();
250
245
  function m() {
251
246
  r("click:submit");
252
247
  }
@@ -277,7 +272,7 @@ const je = { class: "flex flex-col gap-24" }, qe = { class: "flex gap-24" }, He
277
272
  const t = i.modelValue ?? {};
278
273
  t.precision = e, r("update:modelValue", t);
279
274
  }
280
- }), o = _({
275
+ }), n = _({
281
276
  get() {
282
277
  var e;
283
278
  return ((e = i.modelValue) == null ? void 0 : e.measurements) ?? [];
@@ -321,7 +316,7 @@ const je = { class: "flex flex-col gap-24" }, qe = { class: "flex gap-24" }, He
321
316
  (t = (e = x.value) == null ? void 0 : e.resetInputs) == null || t.call(e);
322
317
  }
323
318
  }), (e, t) => {
324
- const d = I("FmTextField"), D = I("FmStepperField"), F = I("FmButton"), S = I("FmCard"), E = I("FmForm");
319
+ const d = I("FmTextField"), D = I("FmStepperField"), S = I("FmButton"), F = I("FmCard"), E = I("FmForm");
325
320
  return v(), T(E, {
326
321
  ref_key: "formRef",
327
322
  ref: x,
@@ -336,7 +331,7 @@ const je = { class: "flex flex-col gap-24" }, qe = { class: "flex gap-24" }, He
336
331
  l("div", He, [
337
332
  y(d, {
338
333
  disabled: e.disabled,
339
- label: a(n)("inventory.unit.name"),
334
+ label: a(o)("inventory.unit.name"),
340
335
  modelValue: c.value,
341
336
  "onUpdate:modelValue": t[0] || (t[0] = (C) => c.value = C),
342
337
  rules: [a(j)()],
@@ -346,7 +341,7 @@ const je = { class: "flex flex-col gap-24" }, qe = { class: "flex gap-24" }, He
346
341
  l("div", Ke, [
347
342
  y(d, {
348
343
  disabled: e.disabled,
349
- label: a(n)("inventory.unit.symbol"),
344
+ label: a(o)("inventory.unit.symbol"),
350
345
  modelValue: p.value,
351
346
  "onUpdate:modelValue": t[1] || (t[1] = (C) => p.value = C),
352
347
  rules: [a(j)()],
@@ -358,32 +353,32 @@ const je = { class: "flex flex-col gap-24" }, qe = { class: "flex gap-24" }, He
358
353
  y(D, {
359
354
  disabled: e.disabled,
360
355
  class: "col-span-3",
361
- label: a(n)("inventory.unit.precision"),
356
+ label: a(o)("inventory.unit.precision"),
362
357
  modelValue: s.value,
363
358
  "onUpdate:modelValue": t[2] || (t[2] = (C) => s.value = C),
364
- rules: [a(Ce)(0)]
359
+ rules: [a(pe)(0)]
365
360
  }, null, 8, ["disabled", "label", "modelValue", "rules"])
366
361
  ])
367
362
  ]),
368
363
  l("div", Ge, [
369
- y(F, {
364
+ y(S, {
370
365
  disabled: e.disabled,
371
366
  type: "button",
372
367
  "prepend-icon": "add",
373
- label: a(n)("inventory.unit.measurement.addMeasurement"),
368
+ label: a(o)("inventory.unit.measurement.addMeasurement"),
374
369
  variant: "plain",
375
370
  onClick: u
376
371
  }, null, 8, ["disabled", "label"])
377
372
  ]),
378
- (v(!0), w(q, null, H((P = e.modelValue) == null ? void 0 : P.measurements, (C, h) => (v(), T(S, {
373
+ (v(!0), w(q, null, H((P = e.modelValue) == null ? void 0 : P.measurements, (C, h) => (v(), T(F, {
379
374
  class: "flex flex-col gap-16 p-16",
380
375
  variant: "outlined",
381
376
  key: C.id
382
377
  }, {
383
378
  default: R(() => [
384
379
  l("div", Oe, [
385
- l("div", Ye, V(a(n)("inventory.unit.measurement.measurementDefault", [h + 1])), 1),
386
- y(F, {
380
+ l("div", Ye, V(a(o)("inventory.unit.measurement.measurementDefault", [h + 1])), 1),
381
+ y(S, {
387
382
  disabled: e.disabled,
388
383
  variant: "tertiary",
389
384
  "prepend-icon": "delete",
@@ -396,7 +391,7 @@ const je = { class: "flex flex-col gap-24" }, qe = { class: "flex gap-24" }, He
396
391
  y(d, {
397
392
  disabled: e.disabled,
398
393
  class: "col-span-2",
399
- label: a(n)("inventory.unit.measurement.name"),
394
+ label: a(o)("inventory.unit.measurement.name"),
400
395
  modelValue: e.modelValue.measurements[h].name,
401
396
  "onUpdate:modelValue": ($) => e.modelValue.measurements[h].name = $,
402
397
  rules: [a(j)()],
@@ -406,7 +401,7 @@ const je = { class: "flex flex-col gap-24" }, qe = { class: "flex gap-24" }, He
406
401
  l("div", Xe, [
407
402
  y(d, {
408
403
  disabled: e.disabled,
409
- label: a(n)("inventory.unit.measurement.symbol"),
404
+ label: a(o)("inventory.unit.measurement.symbol"),
410
405
  modelValue: e.modelValue.measurements[h].abbrev,
411
406
  "onUpdate:modelValue": ($) => e.modelValue.measurements[h].abbrev = $,
412
407
  rules: [a(j)()],
@@ -417,20 +412,20 @@ const je = { class: "flex flex-col gap-24" }, qe = { class: "flex gap-24" }, He
417
412
  y($e, {
418
413
  disabled: e.disabled,
419
414
  class: "col-span-3",
420
- label: a(n)("inventory.unit.measurement.conversion"),
415
+ label: a(o)("inventory.unit.measurement.conversion"),
421
416
  "model-value": +a(J)(e.modelValue.measurements[h].conversion),
422
- "onUpdate:modelValue": ($) => o.value = o.value.map(
417
+ "onUpdate:modelValue": ($) => n.value = n.value.map(
423
418
  (A, B) => B === h ? {
424
419
  ...A,
425
- conversion: a(Se).toPrecision(
426
- a(ke)($),
420
+ conversion: a(Fe).toPrecision(
421
+ a(fe)($),
427
422
  s.value
428
423
  )
429
424
  } : A
430
425
  ),
431
- rules: [a(Fe)(0)],
426
+ rules: [a(ve)(0)],
432
427
  step: +a(J)({ amount: 1, precision: s.value }),
433
- "helper-text": a(n)("inventory.unit.measurement.conversionHelper", {
428
+ "helper-text": a(o)("inventory.unit.measurement.conversionHelper", {
434
429
  measurementSymbol: e.modelValue.measurements[h].name || " measurement unit",
435
430
  conversion: +a(J)(e.modelValue.measurements[h].conversion),
436
431
  unitSymbol: p.value || "base unit"
@@ -455,7 +450,7 @@ const je = { class: "flex flex-col gap-24" }, qe = { class: "flex gap-24" }, He
455
450
  },
456
451
  emits: ["update:show"],
457
452
  setup(k) {
458
- const f = k, b = G(), i = le(), { t: r } = O(), n = te(f, "show"), m = te(f, "unit"), c = _(() => {
453
+ const f = k, b = G(), i = le(), { t: r } = O(), o = ne(f, "show"), m = ne(f, "unit"), c = _(() => {
459
454
  switch (f.mode) {
460
455
  case U.READ:
461
456
  return "";
@@ -475,42 +470,42 @@ const je = { class: "flex flex-col gap-24" }, qe = { class: "flex gap-24" }, He
475
470
  return r("common.add");
476
471
  }
477
472
  return "";
478
- }), s = M(), o = M(!1);
473
+ }), s = M(), n = M(!1);
479
474
  async function u() {
480
- o.value = !0;
475
+ n.value = !0;
481
476
  try {
482
- const t = ne(m.value);
483
- t.precision ?? (t.precision = 0), t.measurements ?? (t.measurements = []), await b.createUnit(t), n.value = !1, i.open({
477
+ const t = oe(m.value);
478
+ t.precision ?? (t.precision = 0), t.measurements ?? (t.measurements = []), await b.createUnit(t), o.value = !1, i.open({
484
479
  title: r("inventory.common.success"),
485
480
  message: r("inventory.unit.create.success", { name: m.value.name }),
486
481
  type: "success"
487
482
  });
488
483
  } catch (t) {
489
- t instanceof ee || i.open({
484
+ t instanceof te || i.open({
490
485
  title: r("inventory.unit.create.error.title"),
491
486
  message: r("inventory.unit.create.error.message"),
492
487
  type: "error"
493
488
  });
494
489
  } finally {
495
- o.value = !1;
490
+ n.value = !1;
496
491
  }
497
492
  }
498
493
  async function g() {
499
- o.value = !0;
494
+ n.value = !0;
500
495
  try {
501
- await b.updateUnit(m.value), n.value = !1, i.open({
496
+ await b.updateUnit(m.value), o.value = !1, i.open({
502
497
  title: r("inventory.common.success"),
503
498
  message: r("inventory.unit.update.success", { name: m.value.name }),
504
499
  type: "success"
505
500
  });
506
501
  } catch (t) {
507
- t instanceof ee || i.open({
502
+ t instanceof te || i.open({
508
503
  title: r("inventory.unit.update.error.title"),
509
504
  message: r("inventory.unit.update.error.message"),
510
505
  type: "error"
511
506
  });
512
507
  } finally {
513
- o.value = !1;
508
+ n.value = !1;
514
509
  }
515
510
  }
516
511
  function x() {
@@ -528,10 +523,10 @@ const je = { class: "flex flex-col gap-24" }, qe = { class: "flex gap-24" }, He
528
523
  }
529
524
  }
530
525
  return (t, d) => {
531
- const D = I("FmButton"), F = I("FmSideSheet");
532
- return v(), T(F, {
533
- "model-value": a(n),
534
- "onUpdate:modelValue": d[3] || (d[3] = (S) => Z(n) ? n.value = S : null),
526
+ const D = I("FmButton"), S = I("FmSideSheet");
527
+ return v(), T(S, {
528
+ "model-value": a(o),
529
+ "onUpdate:modelValue": d[3] || (d[3] = (F) => Z(o) ? o.value = F : null),
535
530
  header: c.value,
536
531
  "close-button": "",
537
532
  "dismiss-away": "",
@@ -540,15 +535,15 @@ const je = { class: "flex flex-col gap-24" }, qe = { class: "flex gap-24" }, He
540
535
  "side-sheet-footer": R(() => [
541
536
  l("div", et, [
542
537
  y(D, {
543
- loading: o.value,
538
+ loading: n.value,
544
539
  label: p.value,
545
540
  onClick: x
546
541
  }, null, 8, ["loading", "label"]),
547
542
  y(D, {
548
- disabled: o.value,
543
+ disabled: n.value,
549
544
  label: a(r)("common.close"),
550
545
  variant: "tertiary",
551
- onClick: d[2] || (d[2] = (S) => n.value = !1)
546
+ onClick: d[2] || (d[2] = (F) => o.value = !1)
552
547
  }, null, 8, ["disabled", "label"])
553
548
  ])
554
549
  ]),
@@ -558,27 +553,27 @@ const je = { class: "flex flex-col gap-24" }, qe = { class: "flex gap-24" }, He
558
553
  ref_key: "hasValidationExpose",
559
554
  ref: s,
560
555
  modelValue: a(m),
561
- "onUpdate:modelValue": d[0] || (d[0] = (S) => Z(m) ? m.value = S : null),
556
+ "onUpdate:modelValue": d[0] || (d[0] = (F) => Z(m) ? m.value = F : null),
562
557
  mode: t.mode,
563
- disabled: o.value,
564
- "onClick:submit": d[1] || (d[1] = (S) => e())
558
+ disabled: n.value,
559
+ "onClick:submit": d[1] || (d[1] = (F) => e())
565
560
  }, null, 8, ["modelValue", "mode", "disabled"])
566
561
  ]),
567
562
  _: 1
568
563
  }, 8, ["model-value", "header"]);
569
564
  };
570
565
  }
571
- }), ot = { class: "flex flex-col py-8" }, nt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, gt = /* @__PURE__ */ K({
566
+ }), nt = { class: "flex flex-col py-8" }, ot = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pt = /* @__PURE__ */ K({
572
567
  __name: "UnitView",
573
568
  setup(k) {
574
- const f = G(), b = ce(), i = _(() => f.units), { createUnit: r, updateUnit: n } = Q(), { unitDialogProps: m, unitViewLoading: c } = ge(Q()), { columnDefs: p } = Ne();
569
+ const f = G(), b = ye(), i = _(() => f.units), { createUnit: r, updateUnit: o } = Q(), { unitDialogProps: m, unitViewLoading: c } = Se(Q()), { columnDefs: p } = Ne();
575
570
  function s(D) {
576
571
  D === "add" && r();
577
572
  }
578
- const o = M(""), u = _(() => c.value), { breakpoints: g } = fe(), x = _(() => g.value.xs || g.value.sm), e = _(() => x.value ? 10 : 20), t = Ve(), { t: d } = O();
579
- return (D, F) => {
580
- const S = I("FmTable");
581
- return v(), T(Ue, {
573
+ const n = M(""), u = _(() => c.value), { breakpoints: g } = Ue(), x = _(() => g.value.xs || g.value.sm), e = _(() => x.value ? 10 : 20), t = be(), { t: d } = O();
574
+ return (D, S) => {
575
+ const F = I("FmTable");
576
+ return v(), T(ge, {
582
577
  title: a(d)("inventory.unit.title"),
583
578
  actions: [
584
579
  { label: a(d)("inventory.unit.create.title"), value: "add", isPrimary: !0, prependIcon: "add" }
@@ -595,30 +590,30 @@ const je = { class: "flex flex-col gap-24" }, qe = { class: "flex gap-24" }, He
595
590
  }
596
591
  ])
597
592
  }, [
598
- y(we, {
593
+ y(xe, {
599
594
  searchable: "",
600
- search: o.value,
601
- "onUpdate:search": F[0] || (F[0] = (E) => o.value = E)
595
+ search: n.value,
596
+ "onUpdate:search": S[0] || (S[0] = (E) => n.value = E)
602
597
  }, null, 8, ["search"]),
603
- y(S, {
598
+ y(F, {
604
599
  style: re(a(t).tableHeight),
605
600
  "column-defs": a(p),
606
601
  "row-data": i.value,
607
- "search-value": o.value,
602
+ "search-value": n.value,
608
603
  loading: !a(b)._currentLocation || u.value,
609
- onRowClick: F[1] || (F[1] = (E) => a(n)(E.original)),
604
+ onRowClick: S[1] || (S[1] = (E) => a(o)(E.original)),
610
605
  "page-size": e.value
611
606
  }, {
612
607
  "list-row": R((E) => [
613
608
  y(_e, {
614
609
  row: E,
615
- onRowClick: a(n)
610
+ onRowClick: a(o)
616
611
  }, {
617
612
  default: R((P) => {
618
613
  var C, h, $, A, B, z, W, L, X;
619
614
  return [
620
- l("div", ot, [
621
- l("div", nt, [
615
+ l("div", nt, [
616
+ l("div", ot, [
622
617
  y(a(he), {
623
618
  render: ($ = (h = (C = P.name) == null ? void 0 : C.column) == null ? void 0 : h.columnDef) == null ? void 0 : $.cell,
624
619
  props: (B = (A = P.name) == null ? void 0 : A.getContext) == null ? void 0 : B.call(A)
@@ -644,5 +639,5 @@ const je = { class: "flex flex-col gap-24" }, qe = { class: "flex gap-24" }, He
644
639
  }
645
640
  });
646
641
  export {
647
- gt as default
642
+ pt as default
648
643
  };