@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,17 +1,17 @@
1
- import { defineComponent as Y, ref as E, onMounted as se, resolveComponent as k, openBlock as x, createElementBlock as A, Fragment as le, createElementVNode as _, toDisplayString as re, createVNode as y, createCommentVNode as H, computed as V, watch as ie, createBlock as T, withCtx as $, unref as v, isRef as X, normalizeStyle as ce, Teleport as ue, normalizeProps as de, guardReactiveProps as me } from "vue";
2
- import { u as I, c as G, S as pe, a as q, R as fe, U as ve, _ as ye, A as ge, e as Z, f as _e, j as be } from "./app-SBnQEeEV.js";
3
- import { useDialog as we, useSnackbar as oe, useProxiedModel as ee, useBreakpoints as Re } from "@feedmepos/ui-library";
4
- import { i as he, _ as xe } from "./is-linked-ingredient-error-fJ2TJb3z.js";
5
- import { F as h, D as te, R as N } from "./row-action.enum-PMKMRrZR.js";
6
- import { _ as ae, t as Ce, d as Ee } from "./xlsx.util-Dsf-EgrG.js";
7
- import { defineStore as Fe, storeToRefs as ke } from "pinia";
8
- import { c as Ve, _ as Se, F as ne } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
9
- import { useI18n as j } from "@feedmepos/mf-common";
10
- import { u as De, _ as Ae, a as $e } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DYBTXD_J.js";
11
- const Ie = {
1
+ import { defineComponent as N, ref as x, onMounted as le, resolveComponent as F, openBlock as h, createElementBlock as $, Fragment as re, createElementVNode as b, toDisplayString as ie, createVNode as y, createCommentVNode as H, computed as V, watch as ce, createBlock as M, withCtx as I, unref as v, isRef as Z, normalizeClass as ue, normalizeStyle as de, Teleport as me, normalizeProps as pe, guardReactiveProps as fe } from "vue";
2
+ import { u as P, c as G, S as ve, a as q, R as ye, U as ge, _ as be, A as _e, e as ee, f as we, j as Re } from "./app-S6iG6Hux.js";
3
+ import { useDialog as he, useSnackbar as ae, useProxiedModel as te, useBreakpoints as Ce } from "@feedmepos/ui-library";
4
+ import { i as xe, _ as Ee } from "./is-linked-ingredient-error-fJ2TJb3z.js";
5
+ import { F as R, D as ne, R as z } from "./row-action.enum-PMKMRrZR.js";
6
+ import { _ as se, t as Fe, d as ke } from "./xlsx.util-CODYzgF8.js";
7
+ import { defineStore as Ve, storeToRefs as Se } from "pinia";
8
+ import { c as De, _ as Ae, F as oe } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
9
+ import { useI18n as Y } from "@feedmepos/mf-common";
10
+ import { u as $e, _ as Ie, a as Pe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CpN5Kn8b.js";
11
+ const Te = {
12
12
  key: 0,
13
13
  class: "flex flex-col items-center w-full h-full gap-24"
14
- }, Pe = { key: 1 }, Te = { key: 0 }, Me = /* @__PURE__ */ Y({
14
+ }, Me = { key: 1 }, Ue = { key: 0 }, Be = /* @__PURE__ */ N({
15
15
  __name: "DeleteDialog",
16
16
  props: {
17
17
  type: {},
@@ -19,31 +19,31 @@ const Ie = {
19
19
  message: {},
20
20
  bindedItems: {}
21
21
  },
22
- setup(b) {
23
- const d = b, p = E(d.bindedItems || []), l = E(!1);
24
- se(() => {
22
+ setup(_) {
23
+ const d = _, p = x(d.bindedItems || []), l = x(!1);
24
+ le(() => {
25
25
  a();
26
26
  });
27
27
  async function a() {
28
- var r, o;
29
- !l.value && ((r = d.data) != null && r._id) && (l.value = !0, p.value = await I().getAffectedMenu((o = d.data) == null ? void 0 : o._id), l.value = !1);
28
+ var i, o;
29
+ !l.value && ((i = d.data) != null && i._id) && (l.value = !0, p.value = await P().getAffectedMenu((o = d.data) == null ? void 0 : o._id), l.value = !1);
30
30
  }
31
- return (r, o) => {
32
- const c = k("FmSpacer"), f = k("FmCircularProgress");
33
- return x(), A(le, null, [
34
- _("p", null, re(r.message), 1),
35
- l.value ? (x(), A("div", Ie, [
31
+ return (i, o) => {
32
+ const c = F("FmSpacer"), f = F("FmCircularProgress");
33
+ return h(), $(re, null, [
34
+ b("p", null, ie(i.message), 1),
35
+ l.value ? (h(), $("div", Te, [
36
36
  y(c),
37
- _("div", null, [
37
+ b("div", null, [
38
38
  y(f, { size: "xl" })
39
39
  ]),
40
- o[0] || (o[0] = _("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading...", -1)),
40
+ o[0] || (o[0] = b("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading...", -1)),
41
41
  y(c)
42
- ])) : (x(), A("div", Pe, [
43
- o[2] || (o[2] = _("br", null, null, -1)),
44
- p.value.length > 0 ? (x(), A("div", Te, [
45
- o[1] || (o[1] = _("p", { class: "fm-typo-en-body-lg-600" }, "Affected menu items:", -1)),
46
- y(ae, {
42
+ ])) : (h(), $("div", Me, [
43
+ o[2] || (o[2] = b("br", null, null, -1)),
44
+ p.value.length > 0 ? (h(), $("div", Ue, [
45
+ o[1] || (o[1] = b("p", { class: "fm-typo-en-body-lg-600" }, "Affected menu items:", -1)),
46
+ y(se, {
47
47
  name: "Menu",
48
48
  bindings: p.value
49
49
  }, null, 8, ["bindings"])
@@ -52,29 +52,29 @@ const Ie = {
52
52
  ], 64);
53
53
  };
54
54
  }
55
- }), K = Fe("recipeForm", function() {
56
- const d = we(), p = oe(), l = I(), a = E(!1), r = E();
55
+ }), K = Ve("recipeForm", function() {
56
+ const d = he(), p = ae(), l = P(), a = x(!1), i = x();
57
57
  function o() {
58
58
  const t = {
59
59
  recipe: {},
60
- mode: h.CREATE,
60
+ mode: R.CREATE,
61
61
  show: !0,
62
62
  "onUpdate:show"(u) {
63
- r.value.show = u;
63
+ i.value.show = u;
64
64
  }
65
65
  };
66
- r.value = t;
66
+ i.value = t;
67
67
  }
68
68
  async function c(t) {
69
69
  const u = {
70
70
  recipe: G(t),
71
- mode: h.UPDATE,
71
+ mode: R.UPDATE,
72
72
  show: !0,
73
73
  "onUpdate:show"(s) {
74
- r.value.show = s;
74
+ i.value.show = s;
75
75
  }
76
76
  };
77
- r.value = u;
77
+ i.value = u;
78
78
  }
79
79
  async function f(t) {
80
80
  a.value = !0;
@@ -85,9 +85,9 @@ const Ie = {
85
85
  type: "success"
86
86
  });
87
87
  } catch (u) {
88
- u instanceof pe && he(u) ? d.open({
88
+ u instanceof ve && xe(u) ? d.open({
89
89
  title: "Cannot delete recipe",
90
- contentComponent: xe,
90
+ contentComponent: Ee,
91
91
  contentComponentProps: {
92
92
  subject: (t == null ? void 0 : t.name) ?? "",
93
93
  items: u.errorResponse.message
@@ -118,7 +118,7 @@ const Ie = {
118
118
  text: "Cancel",
119
119
  close: !0
120
120
  },
121
- contentComponent: Me,
121
+ contentComponent: Be,
122
122
  contentComponentProps: {
123
123
  type: "menu",
124
124
  data: t,
@@ -130,19 +130,19 @@ const Ie = {
130
130
  createRecipe: o,
131
131
  updateRecipe: c,
132
132
  deleteRecipe: m,
133
- recipeDialogProps: r,
133
+ recipeDialogProps: i,
134
134
  recipeViewLoading: a
135
135
  };
136
136
  });
137
- function Ue() {
138
- const { updateRecipe: b, deleteRecipe: d } = K(), { t: p } = j();
137
+ function Le() {
138
+ const { updateRecipe: _, deleteRecipe: d } = K(), { t: p } = Y();
139
139
  async function l(o, c) {
140
140
  const f = G(c);
141
- if (o === N.Edit) {
142
- await b(f);
141
+ if (o === z.Edit) {
142
+ await _(f);
143
143
  return;
144
144
  }
145
- if (o === N.Delete) {
145
+ if (o === z.Delete) {
146
146
  await d(f);
147
147
  return;
148
148
  }
@@ -162,8 +162,8 @@ function Ue() {
162
162
  id: "action",
163
163
  header: "",
164
164
  cell(o) {
165
- return Ve(
166
- [te[N.Edit], te[N.Delete]],
165
+ return De(
166
+ [ne[z.Edit], ne[z.Delete]],
167
167
  (c) => {
168
168
  l(c, o.row.original.original);
169
169
  }
@@ -177,8 +177,8 @@ function Ue() {
177
177
  }
178
178
  }
179
179
  ];
180
- function r(o) {
181
- const c = I();
180
+ function i(o) {
181
+ const c = P();
182
182
  return o.map((f) => ({
183
183
  recipe: f.name,
184
184
  ingredients: f.contains.map((m) => {
@@ -189,15 +189,15 @@ function Ue() {
189
189
  original: f
190
190
  }));
191
191
  }
192
- return { columnDefs: a, formatRowData: r };
192
+ return { columnDefs: a, formatRowData: i };
193
193
  }
194
- const Be = { class: "flex flex-col gap-40" }, Le = {
194
+ const ze = { class: "flex flex-col gap-40" }, Ne = {
195
195
  key: 0,
196
196
  class: "col-span-2 mt-16 border-1 border-fm-color-neutral-gray-200 fm-corner-radius-lg flex flex-col p-16 gap-16"
197
- }, ze = {
197
+ }, Ye = {
198
198
  key: 0,
199
199
  class: "flex flex-col items-center w-full h-full gap-24"
200
- }, Ne = { key: 1 }, Ye = /* @__PURE__ */ Y({
200
+ }, je = { key: 1 }, He = /* @__PURE__ */ N({
201
201
  __name: "RecipeForm",
202
202
  props: {
203
203
  mode: {},
@@ -205,9 +205,9 @@ const Be = { class: "flex flex-col gap-40" }, Le = {
205
205
  disabled: { type: Boolean }
206
206
  },
207
207
  emits: ["update:modelValue", "click:submit"],
208
- setup(b, { expose: d, emit: p }) {
209
- var F;
210
- const l = b, a = p, { t: r } = j(), o = V({
208
+ setup(_, { expose: d, emit: p }) {
209
+ var k;
210
+ const l = _, a = p, { t: i } = Y(), o = V({
211
211
  get() {
212
212
  var e;
213
213
  return ((e = l.modelValue) == null ? void 0 : e.name) ?? "";
@@ -229,7 +229,7 @@ const Be = { class: "flex flex-col gap-40" }, Le = {
229
229
  function f() {
230
230
  a("click:submit");
231
231
  }
232
- const m = E();
232
+ const m = x();
233
233
  d({
234
234
  validateInputs: () => {
235
235
  var e, n;
@@ -244,75 +244,75 @@ const Be = { class: "flex flex-col gap-40" }, Le = {
244
244
  (n = (e = m.value) == null ? void 0 : e.resetInputs) == null || n.call(e);
245
245
  }
246
246
  });
247
- const t = I(), u = E([]), s = E(!1), w = E(!1);
248
- ie(s, async (e) => {
247
+ const t = P(), u = x([]), s = x(!1), w = x(!1);
248
+ ce(s, async (e) => {
249
249
  C(e);
250
250
  });
251
251
  async function C(e) {
252
- var n, P;
253
- e && !w.value && ((n = l.modelValue) != null && n._id) && (w.value = !0, u.value = await t.getAffectedMenu((P = l.modelValue) == null ? void 0 : P._id), w.value = !1);
252
+ var n, S;
253
+ e && !w.value && ((n = l.modelValue) != null && n._id) && (w.value = !0, u.value = await t.getAffectedMenu((S = l.modelValue) == null ? void 0 : S._id), w.value = !1);
254
254
  }
255
- const i = V(
255
+ const r = V(
256
256
  () => t.recipes.map((e) => ({ label: e.name, value: e.name }))
257
- ), g = E((F = l.modelValue) == null ? void 0 : F.name);
257
+ ), g = x((k = l.modelValue) == null ? void 0 : k.name);
258
258
  return (e, n) => {
259
- const P = k("FmTextField"), D = k("FmCard"), S = k("FmSwitch"), M = k("FmSpacer"), U = k("FmCircularProgress"), B = k("FmForm");
260
- return x(), T(B, {
259
+ const S = F("FmTextField"), j = F("FmCard"), A = F("FmSwitch"), D = F("FmSpacer"), U = F("FmCircularProgress"), B = F("FmForm");
260
+ return h(), M(B, {
261
261
  ref_key: "formRef",
262
262
  ref: m,
263
263
  onValidationSuccess: f
264
264
  }, {
265
- default: $(() => [
266
- _("div", Be, [
267
- y(P, {
265
+ default: I(() => [
266
+ b("div", ze, [
267
+ y(S, {
268
268
  disabled: e.disabled,
269
- label: v(r)("inventory.recipe.name"),
269
+ label: v(i)("inventory.recipe.name"),
270
270
  "model-value": o.value,
271
- "onUpdate:modelValue": n[0] || (n[0] = (R) => o.value = R),
271
+ "onUpdate:modelValue": n[0] || (n[0] = (E) => o.value = E),
272
272
  rules: [
273
- v(fe)(),
274
- v(ve)(i.value, g.value, (R) => `[${R.value}] already exists`)
273
+ v(ye)(),
274
+ v(ge)(r.value, g.value, (E) => `[${E.value}] already exists`)
275
275
  ],
276
276
  "label-mark": "required"
277
277
  }, null, 8, ["disabled", "label", "model-value", "rules"]),
278
- y(D, {
278
+ y(j, {
279
279
  variant: "outlined",
280
280
  class: "p-16"
281
281
  }, {
282
- default: $(() => {
283
- var R;
282
+ default: I(() => {
283
+ var E;
284
284
  return [
285
- y(ye, {
286
- id: (R = e.modelValue) == null ? void 0 : R._id,
285
+ y(be, {
286
+ id: (E = e.modelValue) == null ? void 0 : E._id,
287
287
  disabled: e.disabled,
288
288
  "model-value": c.value,
289
- "onUpdate:modelValue": n[1] || (n[1] = (L) => c.value = L),
290
- rules: [v(ge)(1)]
289
+ "onUpdate:modelValue": n[1] || (n[1] = (T) => c.value = T),
290
+ rules: [v(_e)(1)]
291
291
  }, null, 8, ["id", "disabled", "model-value", "rules"])
292
292
  ];
293
293
  }),
294
294
  _: 1
295
295
  })
296
296
  ]),
297
- e.mode !== v(h).CREATE ? (x(), A("div", Le, [
298
- _("div", null, [
299
- y(S, {
297
+ e.mode !== v(R).CREATE ? (h(), $("div", Ne, [
298
+ b("div", null, [
299
+ y(A, {
300
300
  label: "Show binded items",
301
301
  modelValue: s.value,
302
- "onUpdate:modelValue": n[2] || (n[2] = (R) => s.value = R),
302
+ "onUpdate:modelValue": n[2] || (n[2] = (E) => s.value = E),
303
303
  "label-placement": "right",
304
304
  disabled: w.value
305
305
  }, null, 8, ["modelValue", "disabled"])
306
306
  ]),
307
- w.value ? (x(), A("div", ze, [
308
- y(M),
309
- _("div", null, [
307
+ w.value ? (h(), $("div", Ye, [
308
+ y(D),
309
+ b("div", null, [
310
310
  y(U, { size: "xl" })
311
311
  ]),
312
- n[3] || (n[3] = _("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading...", -1)),
313
- y(M)
314
- ])) : (x(), A("div", Ne, [
315
- s.value && u.value.length ? (x(), T(ae, {
312
+ n[3] || (n[3] = b("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading...", -1)),
313
+ y(D)
314
+ ])) : (h(), $("div", je, [
315
+ s.value && u.value.length ? (h(), M(se, {
316
316
  key: 0,
317
317
  name: "Menu",
318
318
  bindings: u.value
@@ -324,47 +324,47 @@ const Be = { class: "flex flex-col gap-40" }, Le = {
324
324
  }, 512);
325
325
  };
326
326
  }
327
- }), je = { class: "flex gap-4" }, He = /* @__PURE__ */ Y({
327
+ }), qe = { class: "flex gap-4" }, Ke = /* @__PURE__ */ N({
328
328
  __name: "RecipeDialog",
329
329
  props: {
330
330
  show: { type: Boolean },
331
331
  recipe: {},
332
- mode: { default: h.READ }
332
+ mode: { default: R.READ }
333
333
  },
334
334
  emits: ["update:show"],
335
- setup(b) {
336
- const d = b, p = I(), l = oe(), { t: a } = j(), r = ee(d, "show"), o = ee(d, "recipe"), c = V(() => {
335
+ setup(_) {
336
+ const d = _, p = P(), l = ae(), { t: a } = Y(), i = te(d, "show"), o = te(d, "recipe"), c = V(() => {
337
337
  switch (d.mode) {
338
- case h.READ:
338
+ case R.READ:
339
339
  return "";
340
- case h.UPDATE:
340
+ case R.UPDATE:
341
341
  return a("inventory.recipe.update.title");
342
- case h.CREATE:
342
+ case R.CREATE:
343
343
  return a("inventory.recipe.create.title");
344
344
  }
345
345
  return "";
346
346
  }), f = V(() => {
347
347
  switch (d.mode) {
348
- case h.READ:
348
+ case R.READ:
349
349
  return "";
350
- case h.UPDATE:
350
+ case R.UPDATE:
351
351
  return a("common.save");
352
- case h.CREATE:
352
+ case R.CREATE:
353
353
  return a("common.add");
354
354
  }
355
355
  return "";
356
- }), m = E(), t = E(!1);
356
+ }), m = x(), t = x(!1);
357
357
  async function u() {
358
358
  t.value = !0;
359
359
  try {
360
- const i = G(o.value);
361
- i.precision ?? (i.precision = 0), i.measurements ?? (i.measurements = []), await p.createRecipe(i), r.value = !1, l.open({
360
+ const r = G(o.value);
361
+ r.precision ?? (r.precision = 0), r.measurements ?? (r.measurements = []), await p.createRecipe(r), i.value = !1, l.open({
362
362
  title: a("common.success"),
363
363
  message: a("inventory.recipe.create.success", { name: o.value.name }),
364
364
  type: "success"
365
365
  });
366
- } catch (i) {
367
- i instanceof Z || l.open({
366
+ } catch (r) {
367
+ r instanceof ee || l.open({
368
368
  title: a("inventory.recipe.create.error.title"),
369
369
  message: a("inventory.recipe.create.error.message"),
370
370
  type: "error"
@@ -376,13 +376,13 @@ const Be = { class: "flex flex-col gap-40" }, Le = {
376
376
  async function s() {
377
377
  t.value = !0;
378
378
  try {
379
- await p.updateRecipe(o.value), r.value = !1, l.open({
379
+ await p.updateRecipe(o.value), i.value = !1, l.open({
380
380
  title: a("common.success"),
381
381
  message: a("inventory.recipe.update.success", { name: o.value.name }),
382
382
  type: "success"
383
383
  });
384
- } catch (i) {
385
- i instanceof Z || l.open({
384
+ } catch (r) {
385
+ r instanceof ee || l.open({
386
386
  title: a("inventory.recipe.update.error.title"),
387
387
  message: a("inventory.recipe.update.error.message"),
388
388
  type: "error"
@@ -392,52 +392,52 @@ const Be = { class: "flex flex-col gap-40" }, Le = {
392
392
  }
393
393
  }
394
394
  function w() {
395
- var i, g;
396
- (g = (i = m.value) == null ? void 0 : i.validateInputs) == null || g.call(i);
395
+ var r, g;
396
+ (g = (r = m.value) == null ? void 0 : r.validateInputs) == null || g.call(r);
397
397
  }
398
398
  function C() {
399
399
  switch (d.mode) {
400
- case h.READ:
400
+ case R.READ:
401
401
  return;
402
- case h.UPDATE:
402
+ case R.UPDATE:
403
403
  return s();
404
- case h.CREATE:
404
+ case R.CREATE:
405
405
  return u();
406
406
  }
407
407
  }
408
- return (i, g) => {
409
- const F = k("FmButton"), e = k("FmSideSheet");
410
- return x(), T(e, {
411
- "model-value": v(r),
412
- "onUpdate:modelValue": g[3] || (g[3] = (n) => X(r) ? r.value = n : null),
408
+ return (r, g) => {
409
+ const k = F("FmButton"), e = F("FmSideSheet");
410
+ return h(), M(e, {
411
+ "model-value": v(i),
412
+ "onUpdate:modelValue": g[3] || (g[3] = (n) => Z(i) ? i.value = n : null),
413
413
  header: c.value,
414
414
  "close-button": "",
415
415
  "dismiss-away": "",
416
416
  "max-width": 500
417
417
  }, {
418
- "side-sheet-footer": $(() => [
419
- _("div", je, [
420
- y(F, {
418
+ "side-sheet-footer": I(() => [
419
+ b("div", qe, [
420
+ y(k, {
421
421
  loading: t.value,
422
422
  label: f.value,
423
423
  onClick: w
424
424
  }, null, 8, ["loading", "label"]),
425
- y(F, {
425
+ y(k, {
426
426
  disabled: t.value,
427
427
  label: v(a)("common.close"),
428
428
  variant: "tertiary",
429
- onClick: g[2] || (g[2] = (n) => r.value = !1)
429
+ onClick: g[2] || (g[2] = (n) => i.value = !1)
430
430
  }, null, 8, ["disabled", "label"])
431
431
  ])
432
432
  ]),
433
- default: $(() => [
434
- y(Ye, {
433
+ default: I(() => [
434
+ y(He, {
435
435
  class: "w-full",
436
436
  ref_key: "hasValidationExpose",
437
437
  ref: m,
438
438
  modelValue: v(o),
439
- "onUpdate:modelValue": g[0] || (g[0] = (n) => X(o) ? o.value = n : null),
440
- mode: i.mode,
439
+ "onUpdate:modelValue": g[0] || (g[0] = (n) => Z(o) ? o.value = n : null),
440
+ mode: r.mode,
441
441
  disabled: t.value,
442
442
  "onClick:submit": g[1] || (g[1] = (n) => C())
443
443
  }, null, 8, ["modelValue", "mode", "disabled"])
@@ -447,8 +447,8 @@ const Be = { class: "flex flex-col gap-40" }, Le = {
447
447
  };
448
448
  }
449
449
  });
450
- function qe() {
451
- const b = I(), d = b.recipes, p = b.recipeById, l = b.skuById, a = d.flatMap((c, f) => {
450
+ function Ge() {
451
+ const _ = P(), d = _.recipes, p = _.recipeById, l = _.skuById, a = d.flatMap((c, f) => {
452
452
  var m;
453
453
  if ((m = c.contains) != null && m.length) {
454
454
  const t = c.contains.filter((s) => s.type === "RECIPE"), u = c.contains.filter((s) => s.type === "SKU");
@@ -469,14 +469,14 @@ function qe() {
469
469
  ),
470
470
  ...u.map(
471
471
  (s, w) => {
472
- var C, i, g, F;
472
+ var C, r, g, k;
473
473
  return [
474
474
  !t.length && w === 0 ? c.name : "",
475
475
  "INGREDIENT",
476
476
  (C = l[s.id]) == null ? void 0 : C.code,
477
- (i = l[s.id]) == null ? void 0 : i.name,
477
+ (r = l[s.id]) == null ? void 0 : r.name,
478
478
  q(s.amount),
479
- s.measurement ? s.measurement.abbrev : (F = (g = l[s.id]) == null ? void 0 : g.unit) == null ? void 0 : F.abbrev
479
+ s.measurement ? s.measurement.abbrev : (k = (g = l[s.id]) == null ? void 0 : g.unit) == null ? void 0 : k.abbrev
480
480
  ];
481
481
  }
482
482
  )
@@ -486,24 +486,24 @@ function qe() {
486
486
  ...f === 0 ? [] : [["", "", "", "", "", ""]],
487
487
  [c.name, "No bindings", "", "", "", ""]
488
488
  ];
489
- }), o = Ce(a, ["Name", "Type", "Code", "Item", "Amount", "Unit"]);
490
- Ee(o, `RECIPE_${_e(/* @__PURE__ */ new Date(), "-", "-")}.xlsx`);
489
+ }), o = Fe(a, ["Name", "Type", "Code", "Item", "Amount", "Unit"]);
490
+ ke(o, `RECIPE_${we(/* @__PURE__ */ new Date(), "-", "-")}.xlsx`);
491
491
  }
492
- const Ke = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, Ge = { class: "flex flex-col py-8" }, Je = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Oe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lt = /* @__PURE__ */ Y({
492
+ const Je = { class: "flex flex-col py-8" }, Oe = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Qe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, rt = /* @__PURE__ */ N({
493
493
  __name: "RecipeView",
494
- setup(b) {
495
- const d = I(), p = V(() => d.recipes), l = be(), { createRecipe: a, updateRecipe: r } = K(), { recipeDialogProps: o, recipeViewLoading: c } = ke(K()), { columnDefs: f, formatRowData: m } = Ue(), t = V(() => m(p.value));
496
- function u(e) {
497
- e === "add" && a();
494
+ setup(_) {
495
+ const d = P(), p = V(() => d.recipes), l = Re(), { createRecipe: a, updateRecipe: i } = K(), { recipeDialogProps: o, recipeViewLoading: c } = Se(K()), { columnDefs: f, formatRowData: m } = Le(), t = V(() => m(p.value));
496
+ function u(n) {
497
+ n === "add" && a();
498
498
  }
499
- const s = E(""), w = V(() => c.value), { breakpoints: C } = Re(), i = V(() => C.value.xs || C.value.sm ? 10 : 20), g = De(), { t: F } = j();
500
- return (e, n) => {
501
- const P = k("FmTable");
502
- return x(), T(Ae, {
503
- title: v(F)("inventory.recipe.title"),
499
+ const s = x(""), w = V(() => c.value), { breakpoints: C } = Ce(), r = V(() => C.value.xs || C.value.sm), g = V(() => r.value ? 10 : 20), k = $e(), { t: e } = Y();
500
+ return (n, S) => {
501
+ const j = F("FmTable");
502
+ return h(), M(Ie, {
503
+ title: v(e)("inventory.recipe.title"),
504
504
  actions: [
505
505
  {
506
- label: v(F)("inventory.recipe.create.title"),
506
+ label: v(e)("inventory.recipe.create.title"),
507
507
  value: "add",
508
508
  isPrimary: !0,
509
509
  prependIcon: "add"
@@ -511,43 +511,51 @@ const Ke = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, Ge =
511
511
  ],
512
512
  "onClick:action": u
513
513
  }, {
514
- default: $(() => [
515
- _("div", Ke, [
516
- y($e, {
514
+ default: I(() => [
515
+ b("div", {
516
+ class: ue([
517
+ "flex flex-col gap-8 max-h-full",
518
+ {
519
+ "p-0": r.value,
520
+ "px-24 ": !r.value
521
+ }
522
+ ])
523
+ }, [
524
+ y(Pe, {
517
525
  searchable: "",
518
526
  search: s.value,
519
- "onUpdate:search": n[0] || (n[0] = (D) => s.value = D),
520
- actions: [{ icon: "ios_share", onClick: v(qe) }]
527
+ "onUpdate:search": S[0] || (S[0] = (A) => s.value = A),
528
+ actions: [{ icon: "ios_share", onClick: v(Ge) }]
521
529
  }, null, 8, ["search", "actions"]),
522
- (x(), T(P, {
523
- style: ce(v(g).tableHeight),
530
+ (h(), M(j, {
531
+ style: de(v(k).tableHeight),
524
532
  "column-defs": v(f),
525
533
  "row-data": t.value,
526
534
  "search-value": s.value,
527
535
  loading: !v(l)._currentLocation || w.value,
528
- onRowClick: n[1] || (n[1] = (D) => v(r)(D.original.original)),
536
+ onRowClick: S[1] || (S[1] = (A) => v(i)(A.original.original)),
529
537
  key: p.value.length,
530
- "page-size": i.value
538
+ "page-size": g.value
531
539
  }, {
532
- "list-row": $((D) => [
533
- y(Se, {
534
- row: D,
535
- onRowClick: (S) => v(r)(S.original)
540
+ "list-row": I((A) => [
541
+ y(Ae, {
542
+ row: A,
543
+ onRowClick: (D) => v(i)(D.original)
536
544
  }, {
537
- default: $((S) => {
538
- var M, U, B, R, L, J, O, Q, z, W;
545
+ default: I((D) => {
546
+ var U, B, E, T, J, O, Q, W, L, X;
539
547
  return [
540
- _("div", Ge, [
541
- _("div", Je, [
542
- y(v(ne), {
543
- render: (B = (U = (M = S.recipe) == null ? void 0 : M.column) == null ? void 0 : U.columnDef) == null ? void 0 : B.cell,
544
- props: (L = (R = S.recipe) == null ? void 0 : R.getContext) == null ? void 0 : L.call(R)
548
+ b("div", Je, [
549
+ b("div", Oe, [
550
+ y(v(oe), {
551
+ render: (E = (B = (U = D.recipe) == null ? void 0 : U.column) == null ? void 0 : B.columnDef) == null ? void 0 : E.cell,
552
+ props: (J = (T = D.recipe) == null ? void 0 : T.getContext) == null ? void 0 : J.call(T)
545
553
  }, null, 8, ["render", "props"])
546
554
  ]),
547
- _("div", Oe, [
548
- y(v(ne), {
549
- render: (Q = (O = (J = S.ingredients) == null ? void 0 : J.column) == null ? void 0 : O.columnDef) == null ? void 0 : Q.cell,
550
- props: (W = (z = S.ingredients) == null ? void 0 : z.getContext) == null ? void 0 : W.call(z)
555
+ b("div", Qe, [
556
+ y(v(oe), {
557
+ render: (W = (Q = (O = D.ingredients) == null ? void 0 : O.column) == null ? void 0 : Q.columnDef) == null ? void 0 : W.cell,
558
+ props: (X = (L = D.ingredients) == null ? void 0 : L.getContext) == null ? void 0 : X.call(L)
551
559
  }, null, 8, ["render", "props"])
552
560
  ])
553
561
  ])
@@ -558,9 +566,9 @@ const Ke = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, Ge =
558
566
  ]),
559
567
  _: 1
560
568
  }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
561
- ]),
562
- (x(), T(ue, { to: "body" }, [
563
- y(He, de(me(v(o))), null, 16)
569
+ ], 2),
570
+ (h(), M(me, { to: "body" }, [
571
+ y(Ke, pe(fe(v(o))), null, 16)
564
572
  ]))
565
573
  ]),
566
574
  _: 1
@@ -569,5 +577,5 @@ const Ke = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, Ge =
569
577
  }
570
578
  });
571
579
  export {
572
- lt as default
580
+ rt as default
573
581
  };