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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/dist/{App-kX4bqoEe.js → App-DfKh34ES.js} +43 -41
  2. package/dist/{ApprovalView-DCNKqVE2.js → ApprovalView-DyoKsEqh.js} +34 -28
  3. package/dist/{BindingsDialog-d7f1f8gf.js → BindingsDialog-7rGLzkyA.js} +8 -8
  4. package/dist/{BindingsPicker-2HJOx0QW.js → BindingsPicker-Cj1DvhQN.js} +6 -5
  5. package/dist/{BindingsTable-CPAjxOZG.js → BindingsTable-CAreptqr.js} +28 -24
  6. package/dist/{ClosingDraftView-CUng41eo.js → ClosingDraftView-DoDGz9Y8.js} +183 -175
  7. package/dist/{ClosingHistoryView-CcGc2NwU.js → ClosingHistoryView-BJSE7ZSv.js} +43 -41
  8. package/dist/{ClosingTemplateView-D8IAdhDb.js → ClosingTemplateView-Dr2eJk4h.js} +94 -76
  9. package/dist/{DeliveryOrderPrintPreview-BsM-CCc5.js → DeliveryOrderPrintPreview-BzYLm6J6.js} +15 -14
  10. package/dist/FmDroppableField-J0xUsOTV.js +154 -0
  11. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-cuggJ5Xd.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-16r_hkBE.js} +74 -72
  12. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Csesow4V.js +279 -0
  13. package/dist/FmMultiselectDialog-BGhSjgbj.js +597 -0
  14. package/dist/{FmMultiselectDialog-BGbrqXUF.js → FmMultiselectDialog-DUrpqAkF.js} +1 -1
  15. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-isogcN1O.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CSv7osJW.js} +51 -49
  16. package/dist/{ImportView-wAVrMEwL.js → ImportView-BAkyTU_3.js} +81 -74
  17. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DVUF4I2Q.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-z0IAsrH_.js} +5 -5
  18. package/dist/{IngredientGroupView-BZczeXdL.js → IngredientGroupView-D7gurA7T.js} +73 -65
  19. package/dist/{IngredientsView-D5N5Y1ZY.js → IngredientsView-hwfpMtTX.js} +358 -345
  20. package/dist/{IntegrationView-Hrslmuc1.js → IntegrationView-DwqzQ6E3.js} +1618 -1593
  21. package/dist/{InventoryBindingForm-DH6wgxOG.js → InventoryBindingForm-CwjM6Rqk.js} +1 -1
  22. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Drr5vD6f.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-BPr8PDwu.js} +41 -40
  23. package/dist/{InventoryBindingSummary-BU1ehpQZ.js → InventoryBindingSummary-B7UFFMkm.js} +1 -1
  24. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-1ueC4GfZ.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Djo2b2Ix.js} +5 -5
  25. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-FHcU1zZt.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BSgGGiN6.js} +22 -21
  26. package/dist/{PublishView-CQtj0f31.js → PublishView-CA9gFV_r.js} +26 -23
  27. package/dist/{PurchaseOrderPrintPreview-BQyXtHST.js → PurchaseOrderPrintPreview-BeHd82Y0.js} +10 -9
  28. package/dist/{ReceiveRequestView-Dm-h_SrY.js → ReceiveRequestView-DEthRdM1.js} +472 -456
  29. package/dist/{RecipeView-DNNRvr1w.js → RecipeView-D45gkYHY.js} +73 -64
  30. package/dist/SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js +251 -0
  31. package/dist/{StockView-CaOm5BCx.js → StockView-COx7A4Ac.js} +292 -282
  32. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Z91XRszD.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DX35xDkm.js} +1 -1
  33. package/dist/{SupplierView-JSII9qwL.js → SupplierView-DHM3dJMZ.js} +92 -80
  34. package/dist/SystemTrailDialog.vue_vue_type_script_setup_true_lang-Bg2K2ULw.js +177 -0
  35. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +135 -0
  36. package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CyMEGFh5.js +123 -0
  37. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-Mehd4lGs.js → TransferDetails.vue_vue_type_script_setup_true_lang-CVm2bXic.js} +318 -305
  38. package/dist/{TransferTemplateView-DyCpNKJd.js → TransferTemplateView-BtYozLuk.js} +228 -216
  39. package/dist/{UnitView-CqN7mlJ2.js → UnitView-B4mqodQa.js} +70 -63
  40. package/dist/{WarehouseView-gFWD-m8e.js → WarehouseView-CjDM8L_V.js} +123 -114
  41. package/dist/WastageTemplateView-Be4Y_zV8.js +2288 -0
  42. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  43. package/dist/api/netsuite.d.ts +9 -3
  44. package/dist/app-DYsP0gKj.js +64121 -0
  45. package/dist/app-rgirz_52.js +8024 -0
  46. package/dist/app.js +6 -6
  47. package/dist/closing-template-BVy1ga2g.js +117 -0
  48. package/dist/date2-BO7HiZTk.js +116 -0
  49. package/dist/dayjs.min-HNt4C1ja.js +282 -0
  50. package/dist/{decimal-DfF_g5rc.js → decimal-BJ8rKm1R.js} +4 -3
  51. package/dist/defineDeepModel-CidpVmK7.js +19 -0
  52. package/dist/duplicate-template-C25Z0lvq.js +34 -0
  53. package/dist/feature-DCia3aqG.js +20162 -0
  54. package/dist/form-mode.enum-BKiNVH6A.js +4 -0
  55. package/dist/format-time-from-id-BPws326b.js +15 -0
  56. package/dist/{format-unit-display-ivAljvlo.js → format-unit-display-C2P3mS8l.js} +308 -297
  57. package/dist/{import-export.helper-B2MWv9v7.js → import-export.helper-Dt6ZMAPT.js} +56 -52
  58. package/dist/{index-DZaT0ZaL.js → index-6zxXdF-V.js} +1 -1
  59. package/dist/index-BjUDHtA2.js +45 -0
  60. package/dist/{index-BbhuWHyh.js → index-tZj47B-j.js} +16 -14
  61. package/dist/lodash-DLMgBu6M.js +3678 -0
  62. package/dist/netsuite-BSMLXIQa.js +4979 -0
  63. package/dist/{purchase-order-template-DdybMC_P.js → purchase-order-template-D5NGCbI2.js} +1 -1
  64. package/dist/router/shared.spec.d.ts +1 -0
  65. package/dist/row-action.enum-BcW_L_nE.js +67 -0
  66. package/dist/rules-BiaGzhvQ.js +201 -0
  67. package/dist/{stock-BYagIdsj.js → stock-DOCQ91Jh.js} +1 -1
  68. package/dist/{stock-V4ciPiBe.js → stock-Ty-89Ap8.js} +11 -10
  69. package/dist/stores/integration/netsuite.d.ts +5 -1
  70. package/dist/style.css +1 -1
  71. package/dist/{supplier-CgtB1I9I.js → supplier-Dxb5ULjF.js} +27 -26
  72. package/dist/tsconfig.app.tsbuildinfo +1 -1
  73. package/dist/{use-ingredient-select-dialog-BIQovyZX.js → use-ingredient-select-dialog-BI0yIG6A.js} +4 -3
  74. package/dist/{use-inventory-binding-dialog-DyjicXgc.js → use-inventory-binding-dialog-CbZC-VuL.js} +4 -3
  75. package/dist/use-template-enabled-locations-2-Dhttpl0B.js +111 -0
  76. package/dist/views/adjustment-template/wastage-template/table.d.ts +1 -1
  77. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +1 -1
  78. package/dist/views/integration/components/netsuite/business/BusinessNetSuiteSideSheet.vue.d.ts +6 -2
  79. package/dist/vue-i18n-Cqx7gNJF.js +2365 -0
  80. package/dist/xlsx-ex8Bmftq.js +24004 -0
  81. package/dist/xlsx.util-C8YXEqEl.js +78 -0
  82. package/package.json +2 -2
  83. package/dist/app-CnQ49Lyb.js +0 -131483
@@ -1,16 +1,25 @@
1
- import { defineComponent as j, ref as E, onMounted as ie, resolveComponent as I, openBlock as k, createElementBlock as B, Fragment as ue, createElementVNode as x, toDisplayString as ce, createVNode as y, createCommentVNode as q, computed as F, watch as de, createBlock as G, withCtx as U, unref as g, isRef as te, normalizeClass as me, normalizeStyle as pe, Teleport as fe, normalizeProps as ve, guardReactiveProps as ye } from "vue";
2
- import { a as A, e as C, f as W, S as ge, i as be, D as ne, j as Y, n as P, F as H, r as _e, U as Re, A as he, c as we, y as oe, W as Se, X as xe, Y as Ve, u as Ce, G as Ee, I as ke, J as Ie, K as Fe, L as ae } from "./app-CnQ49Lyb.js";
3
- import { useDialog as le, useSnackbar as X, useProxiedModel as se, useBreakpoints as $e } from "@feedmepos/ui-library";
4
- import { i as De, _ as Ae } from "./is-linked-ingredient-error-fJ2TJb3z.js";
5
- import { _ as re } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-DVUF4I2Q.js";
6
- import { defineStore as Be, storeToRefs as Pe } from "pinia";
1
+ import { defineComponent as Y, ref as E, onMounted as ie, resolveComponent as F, openBlock as k, createElementBlock as B, Fragment as ue, createElementVNode as x, toDisplayString as ce, createVNode as y, createCommentVNode as q, computed as I, watch as de, createBlock as G, withCtx as U, unref as g, isRef as te, normalizeClass as me, normalizeStyle as pe, Teleport as fe, normalizeProps as ve, guardReactiveProps as ye } from "vue";
2
+ import { a as A, c as Q, S as ge, F as H, j as ne, u as be } from "./app-DYsP0gKj.js";
3
+ import { useDialog as le, useSnackbar as W, useProxiedModel as oe, useBreakpoints as _e } from "@feedmepos/ui-library";
4
+ import { i as Re, _ as he } from "./is-linked-ingredient-error-fJ2TJb3z.js";
5
+ import { F as C } from "./form-mode.enum-BKiNVH6A.js";
6
+ import { _ as re } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-z0IAsrH_.js";
7
+ import { defineStore as we, storeToRefs as Se } from "pinia";
8
+ import { D as ae, R as K } from "./row-action.enum-BcW_L_nE.js";
9
+ import { c as xe, _ as Ve, F as se } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
10
+ import { a as P, R as Ce, U as Ee, A as ke } from "./rules-BiaGzhvQ.js";
7
11
  import { useI18n as O } from "@feedmepos/mf-common";
8
- import { _ as Ue } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-Drr5vD6f.js";
9
- import { _ as Te } from "./FmCustomAttribute.vue_vue_type_script_setup_true_lang-D-IWRjRD.js";
12
+ import { u as Fe, _ as Ie } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js";
13
+ import { _ as $e } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-BPr8PDwu.js";
14
+ import { _ as De } from "./FmCustomAttribute.vue_vue_type_script_setup_true_lang-D-IWRjRD.js";
15
+ import { u as Ae } from "./feature-DCia3aqG.js";
16
+ import { b as Be, d as Pe } from "./xlsx.util-C8YXEqEl.js";
17
+ import { f as Ue } from "./date2-BO7HiZTk.js";
18
+ import { _ as Te } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Csesow4V.js";
10
19
  const Me = {
11
20
  key: 0,
12
21
  class: "flex flex-col items-center w-full h-full gap-24"
13
- }, Ge = { key: 1 }, Ne = { key: 0 }, Le = /* @__PURE__ */ j({
22
+ }, Ge = { key: 1 }, Ne = { key: 0 }, Le = /* @__PURE__ */ Y({
14
23
  __name: "DeleteDialog",
15
24
  props: {
16
25
  type: {},
@@ -28,7 +37,7 @@ const Me = {
28
37
  !s.value && ((c = f.data) != null && c._id) && (s.value = !0, v.value = await A().getAffectedMenu((m = f.data) == null ? void 0 : m._id), s.value = !1);
29
38
  }
30
39
  return (c, m) => {
31
- const w = I("FmSpacer"), r = I("FmCircularProgress");
40
+ const w = F("FmSpacer"), r = F("FmCircularProgress");
32
41
  return k(), B(ue, null, [
33
42
  x("p", null, ce(c.message), 1),
34
43
  s.value ? (k(), B("div", Me, [
@@ -51,8 +60,8 @@ const Me = {
51
60
  ], 64);
52
61
  };
53
62
  }
54
- }), J = Be("recipeForm", function() {
55
- const f = le(), v = X(), s = A(), l = E(!1), c = E();
63
+ }), J = we("recipeForm", function() {
64
+ const f = le(), v = W(), s = A(), l = E(!1), c = E();
56
65
  function m() {
57
66
  const n = {
58
67
  recipe: {},
@@ -66,7 +75,7 @@ const Me = {
66
75
  }
67
76
  async function w(n) {
68
77
  const o = {
69
- recipe: W(n),
78
+ recipe: Q(n),
70
79
  mode: C.UPDATE,
71
80
  show: !0,
72
81
  "onUpdate:show"(u) {
@@ -84,9 +93,9 @@ const Me = {
84
93
  type: "success"
85
94
  });
86
95
  } catch (o) {
87
- o instanceof ge && De(o) ? f.open({
96
+ o instanceof ge && Re(o) ? f.open({
88
97
  title: "Cannot delete recipe",
89
- contentComponent: Ae,
98
+ contentComponent: he,
90
99
  contentComponentProps: {
91
100
  subject: (n == null ? void 0 : n.name) ?? "",
92
101
  items: o.errorResponse.message
@@ -136,12 +145,12 @@ const Me = {
136
145
  function ze() {
137
146
  const { updateRecipe: b, deleteRecipe: f } = J(), v = A(), { t: s } = O();
138
147
  async function l(r, p) {
139
- const n = W(p);
140
- if (r === Y.Edit) {
148
+ const n = Q(p);
149
+ if (r === K.Edit) {
141
150
  await b(n);
142
151
  return;
143
152
  }
144
- if (r === Y.Delete) {
153
+ if (r === K.Delete) {
145
154
  await f(n);
146
155
  return;
147
156
  }
@@ -173,8 +182,8 @@ function ze() {
173
182
  id: "action",
174
183
  header: "",
175
184
  cell(r) {
176
- return be(
177
- [ne[Y.Edit], ne[Y.Delete]],
185
+ return xe(
186
+ [ae[K.Edit], ae[K.Delete]],
178
187
  (p) => {
179
188
  l(p, r.row.original.original);
180
189
  }
@@ -206,13 +215,13 @@ function ze() {
206
215
  }
207
216
  return { columnDefs: m, formatRowData: w };
208
217
  }
209
- const Ke = { class: "flex flex-col gap-40" }, Ye = {
218
+ const je = { class: "flex flex-col gap-40" }, Ke = {
210
219
  key: 0,
211
220
  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"
212
- }, je = {
221
+ }, Ye = {
213
222
  key: 0,
214
223
  class: "flex flex-col items-center w-full h-full gap-24"
215
- }, Oe = { key: 1 }, He = { class: "mt-32" }, qe = /* @__PURE__ */ j({
224
+ }, Oe = { key: 1 }, He = { class: "mt-32" }, qe = /* @__PURE__ */ Y({
216
225
  __name: "RecipeForm",
217
226
  props: {
218
227
  mode: {},
@@ -222,7 +231,7 @@ const Ke = { class: "flex flex-col gap-40" }, Ye = {
222
231
  emits: ["update:modelValue", "click:submit"],
223
232
  setup(b, { expose: f, emit: v }) {
224
233
  var R;
225
- const s = b, l = v, c = we(), { t: m } = O(), w = F({
234
+ const s = b, l = v, c = Ae(), { t: m } = O(), w = I({
226
235
  get() {
227
236
  var t;
228
237
  return ((t = s.modelValue) == null ? void 0 : t.name) ?? "";
@@ -231,7 +240,7 @@ const Ke = { class: "flex flex-col gap-40" }, Ye = {
231
240
  const a = s.modelValue ?? {};
232
241
  a.name = t, l("update:modelValue", a);
233
242
  }
234
- }), r = F({
243
+ }), r = I({
235
244
  get() {
236
245
  var t;
237
246
  return ((t = s.modelValue) == null ? void 0 : t.contains) ?? [];
@@ -240,7 +249,7 @@ const Ke = { class: "flex flex-col gap-40" }, Ye = {
240
249
  const a = s.modelValue ?? {};
241
250
  a.contains = t, l("update:modelValue", a);
242
251
  }
243
- }), p = F({
252
+ }), p = I({
244
253
  get() {
245
254
  var t;
246
255
  return ((t = s.modelValue) == null ? void 0 : t.customAttributes) ?? {};
@@ -278,26 +287,26 @@ const Ke = { class: "flex flex-col gap-40" }, Ye = {
278
287
  var a, $;
279
288
  t && !e.value && ((a = s.modelValue) != null && a._id) && (e.value = !0, i.value = await u.getAffectedMenu(($ = s.modelValue) == null ? void 0 : $._id).delayed(500), e.value = !1);
280
289
  }
281
- const _ = F(
290
+ const _ = I(
282
291
  () => u.recipes.map((t) => ({ label: t.name, value: t.name }))
283
292
  ), h = E((R = s.modelValue) == null ? void 0 : R.name);
284
293
  return (t, a) => {
285
- const $ = I("FmTextField"), D = I("FmCard"), N = I("FmSwitch"), M = I("FmSpacer"), L = I("FmCircularProgress"), T = I("FmForm");
294
+ const $ = F("FmTextField"), D = F("FmCard"), N = F("FmSwitch"), M = F("FmSpacer"), L = F("FmCircularProgress"), T = F("FmForm");
286
295
  return k(), G(T, {
287
296
  ref_key: "formRef",
288
297
  ref: o,
289
298
  onValidationSuccess: n
290
299
  }, {
291
300
  default: U(() => [
292
- x("div", Ke, [
301
+ x("div", je, [
293
302
  y($, {
294
303
  disabled: t.disabled,
295
304
  label: g(m)("inventory.recipe.name"),
296
305
  "model-value": w.value,
297
306
  "onUpdate:modelValue": a[0] || (a[0] = (V) => w.value = V),
298
307
  rules: [
299
- g(_e)(),
300
- g(Re)(_.value, h.value, (V) => `[${V.value}] already exists`)
308
+ g(Ce)(),
309
+ g(Ee)(_.value, h.value, (V) => `[${V.value}] already exists`)
301
310
  ],
302
311
  "label-mark": "required"
303
312
  }, null, 8, ["disabled", "label", "model-value", "rules"]),
@@ -308,12 +317,12 @@ const Ke = { class: "flex flex-col gap-40" }, Ye = {
308
317
  default: U(() => {
309
318
  var V;
310
319
  return [
311
- y(Ue, {
320
+ y($e, {
312
321
  id: (V = t.modelValue) == null ? void 0 : V._id,
313
322
  disabled: t.disabled,
314
323
  "model-value": r.value,
315
324
  "onUpdate:modelValue": a[1] || (a[1] = (z) => r.value = z),
316
- rules: [g(he)(1)],
325
+ rules: [g(ke)(1)],
317
326
  "enable-ingredient-group": g(c).enableIngredientGroup
318
327
  }, null, 8, ["id", "disabled", "model-value", "rules", "enable-ingredient-group"])
319
328
  ];
@@ -321,7 +330,7 @@ const Ke = { class: "flex flex-col gap-40" }, Ye = {
321
330
  _: 1
322
331
  })
323
332
  ]),
324
- t.mode !== g(C).CREATE ? (k(), B("div", Ye, [
333
+ t.mode !== g(C).CREATE ? (k(), B("div", Ke, [
325
334
  y(N, {
326
335
  label: "Show binded items",
327
336
  modelValue: S.value,
@@ -329,7 +338,7 @@ const Ke = { class: "flex flex-col gap-40" }, Ye = {
329
338
  "label-placement": "right",
330
339
  disabled: e.value
331
340
  }, null, 8, ["modelValue", "disabled"]),
332
- e.value ? (k(), B("div", je, [
341
+ e.value ? (k(), B("div", Ye, [
333
342
  y(M),
334
343
  x("div", null, [
335
344
  y(L, { size: "xl" })
@@ -344,7 +353,7 @@ const Ke = { class: "flex flex-col gap-40" }, Ye = {
344
353
  ])) : q("", !0)
345
354
  ])) : q("", !0),
346
355
  x("div", He, [
347
- y(Te, {
356
+ y(De, {
348
357
  entity: "inventoryRecipe",
349
358
  modelValue: p.value,
350
359
  "onUpdate:modelValue": a[3] || (a[3] = (V) => p.value = V)
@@ -355,7 +364,7 @@ const Ke = { class: "flex flex-col gap-40" }, Ye = {
355
364
  }, 512);
356
365
  };
357
366
  }
358
- }), Je = { class: "flex gap-4" }, We = /* @__PURE__ */ j({
367
+ }), Je = { class: "flex gap-4" }, Qe = /* @__PURE__ */ Y({
359
368
  __name: "RecipeDialog",
360
369
  props: {
361
370
  show: { type: Boolean },
@@ -364,7 +373,7 @@ const Ke = { class: "flex flex-col gap-40" }, Ye = {
364
373
  },
365
374
  emits: ["update:show"],
366
375
  setup(b) {
367
- const f = b, v = A(), s = X(), { t: l } = O(), c = se(f, "show"), m = se(f, "recipe"), w = F(() => {
376
+ const f = b, v = A(), s = W(), { t: l } = O(), c = oe(f, "show"), m = oe(f, "recipe"), w = I(() => {
368
377
  switch (f.mode) {
369
378
  case C.READ:
370
379
  return "";
@@ -374,7 +383,7 @@ const Ke = { class: "flex flex-col gap-40" }, Ye = {
374
383
  return l("inventory.recipe.create.title");
375
384
  }
376
385
  return "";
377
- }), r = F(() => {
386
+ }), r = I(() => {
378
387
  switch (f.mode) {
379
388
  case C.READ:
380
389
  return "";
@@ -388,14 +397,14 @@ const Ke = { class: "flex flex-col gap-40" }, Ye = {
388
397
  async function o() {
389
398
  n.value = !0;
390
399
  try {
391
- const e = W(m.value);
400
+ const e = Q(m.value);
392
401
  e.precision ?? (e.precision = 0), e.measurements ?? (e.measurements = []), await v.createRecipe(e), c.value = !1, s.open({
393
402
  title: l("inventory.common.success"),
394
403
  message: l("inventory.recipe.create.success", { name: m.value.name }),
395
404
  type: "success"
396
405
  });
397
406
  } catch (e) {
398
- e instanceof oe || s.open({
407
+ e instanceof ne || s.open({
399
408
  title: l("inventory.recipe.create.error.title"),
400
409
  message: l("inventory.recipe.create.error.message"),
401
410
  type: "error"
@@ -413,7 +422,7 @@ const Ke = { class: "flex flex-col gap-40" }, Ye = {
413
422
  type: "success"
414
423
  });
415
424
  } catch (e) {
416
- e instanceof oe || s.open({
425
+ e instanceof ne || s.open({
417
426
  title: l("inventory.recipe.update.error.title"),
418
427
  message: l("inventory.recipe.update.error.message"),
419
428
  type: "error"
@@ -437,7 +446,7 @@ const Ke = { class: "flex flex-col gap-40" }, Ye = {
437
446
  }
438
447
  }
439
448
  return (e, d) => {
440
- const _ = I("FmButton"), h = I("FmSideSheet");
449
+ const _ = F("FmButton"), h = F("FmSideSheet");
441
450
  return k(), G(h, {
442
451
  "model-value": g(c),
443
452
  "onUpdate:modelValue": d[3] || (d[3] = (R) => te(c) ? c.value = R : null),
@@ -478,13 +487,13 @@ const Ke = { class: "flex flex-col gap-40" }, Ye = {
478
487
  };
479
488
  }
480
489
  });
481
- function Xe(b) {
490
+ function We(b) {
482
491
  return !b || Object.keys(b).length === 0 ? "" : Object.entries(b).map(([f, v]) => `${f}: ${v}`).join(", ");
483
492
  }
484
- function Qe() {
493
+ function Xe() {
485
494
  const b = A(), f = b.recipes, v = b.recipeById, s = b.skuById, l = b.skuGroupById, c = f.flatMap((r, p) => {
486
495
  var o;
487
- const n = Xe(r.customAttributes);
496
+ const n = We(r.customAttributes);
488
497
  if ((o = r.contains) != null && o.length) {
489
498
  const u = r.contains.filter((e) => e.type === "RECIPE"), i = r.contains.filter((e) => e.type === "SKU"), S = r.contains.filter((e) => e.type === "SKU_GROUP");
490
499
  return [
@@ -537,24 +546,24 @@ function Qe() {
537
546
  ...p === 0 ? [] : [["", "", "", "", "", "", ""]],
538
547
  [r.name, "No bindings", "", "", "", "", n]
539
548
  ];
540
- }), w = Se(c, ["Name", "Type", "Code", "Item", "Amount", "Unit", "Custom Attributes"]);
541
- xe(w, `RECIPE_${Ve(/* @__PURE__ */ new Date(), "-", "-")}.xlsx`);
549
+ }), w = Be(c, ["Name", "Type", "Code", "Item", "Amount", "Unit", "Custom Attributes"]);
550
+ Pe(w, `RECIPE_${Ue(/* @__PURE__ */ new Date(), "-", "-")}.xlsx`);
542
551
  }
543
- const Ze = { class: "flex flex-col py-8" }, et = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, tt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, dt = /* @__PURE__ */ j({
552
+ const Ze = { class: "flex flex-col py-8" }, et = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, tt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Rt = /* @__PURE__ */ Y({
544
553
  __name: "RecipeView",
545
554
  setup(b) {
546
- const f = A(), v = F(() => f.recipes), s = Ce(), { createRecipe: l, updateRecipe: c } = J(), { recipeDialogProps: m, recipeViewLoading: w } = Pe(J()), { columnDefs: r, formatRowData: p } = ze(), n = F(() => p(v.value));
547
- le(), X(), E(!1);
555
+ const f = A(), v = I(() => f.recipes), s = be(), { createRecipe: l, updateRecipe: c } = J(), { recipeDialogProps: m, recipeViewLoading: w } = Se(J()), { columnDefs: r, formatRowData: p } = ze(), n = I(() => p(v.value));
556
+ le(), W(), E(!1);
548
557
  function o(R) {
549
558
  if (R === "add")
550
559
  return l();
551
560
  if (R === "export")
552
- return Qe();
561
+ return Xe();
553
562
  }
554
- const u = E(""), i = F(() => w.value), { breakpoints: S } = $e(), e = F(() => S.value.xs || S.value.sm), d = F(() => e.value ? 10 : 20), _ = Ee(), { t: h } = O();
563
+ const u = E(""), i = I(() => w.value), { breakpoints: S } = _e(), e = I(() => S.value.xs || S.value.sm), d = I(() => e.value ? 10 : 20), _ = Fe(), { t: h } = O();
555
564
  return (R, t) => {
556
- const a = I("FmTable");
557
- return k(), G(ke, {
565
+ const a = F("FmTable");
566
+ return k(), G(Ie, {
558
567
  title: g(h)("inventory.recipe.title"),
559
568
  actions: [
560
569
  {
@@ -577,7 +586,7 @@ const Ze = { class: "flex flex-col py-8" }, et = { class: "fm-typo-en-body-lg-60
577
586
  }
578
587
  ])
579
588
  }, [
580
- y(Ie, {
589
+ y(Te, {
581
590
  searchable: "",
582
591
  search: u.value,
583
592
  "onUpdate:search": t[0] || (t[0] = ($) => u.value = $)
@@ -593,24 +602,24 @@ const Ze = { class: "flex flex-col py-8" }, et = { class: "fm-typo-en-body-lg-60
593
602
  "page-size": d.value
594
603
  }, {
595
604
  "list-row": U(($) => [
596
- y(Fe, {
605
+ y(Ve, {
597
606
  row: $,
598
607
  onRowClick: (D) => g(c)(D.original)
599
608
  }, {
600
609
  default: U((D) => {
601
- var N, M, L, T, V, z, Q, Z, K, ee;
610
+ var N, M, L, T, V, z, X, Z, j, ee;
602
611
  return [
603
612
  x("div", Ze, [
604
613
  x("div", et, [
605
- y(g(ae), {
614
+ y(g(se), {
606
615
  render: (L = (M = (N = D.recipe) == null ? void 0 : N.column) == null ? void 0 : M.columnDef) == null ? void 0 : L.cell,
607
616
  props: (V = (T = D.recipe) == null ? void 0 : T.getContext) == null ? void 0 : V.call(T)
608
617
  }, null, 8, ["render", "props"])
609
618
  ]),
610
619
  x("div", tt, [
611
- y(g(ae), {
612
- render: (Z = (Q = (z = D.ingredients) == null ? void 0 : z.column) == null ? void 0 : Q.columnDef) == null ? void 0 : Z.cell,
613
- props: (ee = (K = D.ingredients) == null ? void 0 : K.getContext) == null ? void 0 : ee.call(K)
620
+ y(g(se), {
621
+ render: (Z = (X = (z = D.ingredients) == null ? void 0 : z.column) == null ? void 0 : X.columnDef) == null ? void 0 : Z.cell,
622
+ props: (ee = (j = D.ingredients) == null ? void 0 : j.getContext) == null ? void 0 : ee.call(j)
614
623
  }, null, 8, ["render", "props"])
615
624
  ])
616
625
  ])
@@ -623,7 +632,7 @@ const Ze = { class: "flex flex-col py-8" }, et = { class: "fm-typo-en-body-lg-60
623
632
  }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
624
633
  ], 2),
625
634
  (k(), G(fe, { to: "body" }, [
626
- y(We, ve(ye(g(m))), null, 16)
635
+ y(Qe, ve(ye(g(m))), null, 16)
627
636
  ]))
628
637
  ]),
629
638
  _: 1
@@ -632,5 +641,5 @@ const Ze = { class: "flex flex-col py-8" }, et = { class: "fm-typo-en-body-lg-60
632
641
  }
633
642
  });
634
643
  export {
635
- dt as default
644
+ Rt as default
636
645
  };
@@ -0,0 +1,251 @@
1
+ import { defineComponent as U, resolveComponent as x, unref as I, openBlock as l, createElementBlock as c, renderSlot as $, createElementVNode as p, normalizeClass as h, createVNode as v, reactive as j, onUnmounted as D, ref as R, computed as C, Fragment as g, createTextVNode as X, toDisplayString as V, createCommentVNode as k, createBlock as i, renderList as T, withCtx as _, Teleport as N } from "vue";
2
+ import { useBreakpoints as Y } from "@feedmepos/ui-library";
3
+ import { useCoreStore as q, useI18n as G } from "@feedmepos/mf-common";
4
+ import { _ as J } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
+ const K = {
6
+ key: 0,
7
+ class: "group gap-8 inline-flex items-center relative select-none border-1 border-dashed rounded-md border-red-500 hover:border-opacity-30 transition-opacity"
8
+ }, Q = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-full" }, W = /* @__PURE__ */ U({
9
+ __name: "FmAdminBadge",
10
+ props: {
11
+ class: { default: void 0 }
12
+ },
13
+ setup(b) {
14
+ const m = b, f = q();
15
+ return (a, u) => {
16
+ var t;
17
+ const n = x("FmIcon");
18
+ return (t = I(f).sessionUser.value) != null && t.role.isAdmin ? (l(), c("div", K, [
19
+ $(a.$slots, "default", {}, void 0, !0),
20
+ p("div", {
21
+ class: h([
22
+ "fm-admin-badge",
23
+ "group-hover:opacity-20",
24
+ m.class,
25
+ {
26
+ absolute: !0,
27
+ "bottom-[-5px] right-[-8px] px-4 h-[25px] w-[25px] border-2 border-red-800": !0
28
+ }
29
+ ])
30
+ }, [
31
+ p("span", Q, [
32
+ v(n, {
33
+ name: "support_agent",
34
+ size: "sm",
35
+ outline: ""
36
+ })
37
+ ])
38
+ ], 2)
39
+ ])) : $(a.$slots, "non-admin", { key: 1 }, void 0, !0);
40
+ };
41
+ }
42
+ }), F = /* @__PURE__ */ J(W, [["__scopeId", "data-v-643bdbae"]]), M = j({});
43
+ function Z() {
44
+ const b = `${Math.random()}`, m = new ResizeObserver((u) => {
45
+ const n = u.map((t) => t.target.scrollHeight).reduce((t, s) => t + s);
46
+ M[b] = n;
47
+ }), f = (u) => {
48
+ const n = u.el;
49
+ n && m.observe(n);
50
+ }, a = (u) => {
51
+ const n = u.el;
52
+ n && m.unobserve(n);
53
+ };
54
+ return D(() => {
55
+ m.disconnect(), delete M[b];
56
+ }), {
57
+ get tableHeight() {
58
+ return {
59
+ height: `calc(100dvh - ${Object.values(M).reduce((t, s) => t + s, 0) + 80}px)`
60
+ };
61
+ },
62
+ onMounted: f,
63
+ onUnmounted: a
64
+ };
65
+ }
66
+ const ee = {
67
+ key: 0,
68
+ class: /* @__PURE__ */ h(["text-fm-color-typo-secondary fm-typo-en-body-sm-400"])
69
+ }, te = { class: "bg-white flex-1" }, le = { class: "fixed bottom-96 right-16" }, w = 3, se = /* @__PURE__ */ U({
70
+ __name: "SingleColumnLayout",
71
+ props: {
72
+ actions: { default: () => [] },
73
+ title: { default: "Title" },
74
+ description: {},
75
+ showBackButton: { type: Boolean },
76
+ defaultPadding: { type: Boolean },
77
+ breadcrumbs: { default: () => [] },
78
+ helperText: {}
79
+ },
80
+ emits: ["click:action"],
81
+ setup(b, { emit: m }) {
82
+ const f = b, a = m, { t: u } = G(), n = R(!1), t = C(() => f.actions.find((r) => r.isPrimary)), s = C(() => f.actions.filter((r) => !r.isPrimary)), H = C(
83
+ () => s.value.map(
84
+ (r) => ({
85
+ label: r.label,
86
+ value: r.value
87
+ })
88
+ )
89
+ ), { breakpoints: S } = Y(), y = C(() => S.value.xs || S.value.sm), A = Z();
90
+ return (r, o) => {
91
+ var O;
92
+ const d = x("FmButton"), z = x("FmMenuItem"), E = x("FmMenu"), L = x("FmCollapsibleTabs"), P = x("FmBottomSheet");
93
+ return l(), c(g, null, [
94
+ p("div", {
95
+ class: h([
96
+ "flex flex-col w-full bg-white h-full",
97
+ {
98
+ "gap-12": y.value
99
+ }
100
+ ])
101
+ }, [
102
+ p("div", {
103
+ onVnodeMounted: o[3] || (o[3] = //@ts-ignore
104
+ (...e) => I(A).onMounted && I(A).onMounted(...e)),
105
+ class: h([
106
+ "flex gap-8 items-center",
107
+ {
108
+ "p-12 border-b-[1px] border-b-fm-color-neutral-gray-100": y.value,
109
+ "px-24 py-16": !y.value
110
+ }
111
+ ])
112
+ }, [
113
+ p("div", {
114
+ class: h([
115
+ "flex-1 flex flex-col gap-4 fm-typo-en-title-md-600 bg-white",
116
+ {
117
+ "py-12": y.value
118
+ }
119
+ ])
120
+ }, [
121
+ p("div", null, [
122
+ X(V(r.title) + " ", 1),
123
+ $(r.$slots, "headerInfo")
124
+ ]),
125
+ r.helperText ? (l(), c("div", ee, V(r.helperText), 1)) : k("", !0)
126
+ ], 2),
127
+ y.value ? (l(), c(g, { key: 0 }, [
128
+ s.value.length ? (l(), i(d, {
129
+ key: 0,
130
+ variant: "tertiary",
131
+ "prepend-icon": "more_vert",
132
+ onClick: o[0] || (o[0] = (e) => n.value = !0)
133
+ })) : k("", !0)
134
+ ], 64)) : (l(), c(g, { key: 1 }, [
135
+ (l(!0), c(g, null, T(s.value.slice(0, w), (e) => (l(), c(g, {
136
+ key: e.value
137
+ }, [
138
+ e.isAdminOnly ? (l(), i(F, { key: 0 }, {
139
+ default: _(() => [
140
+ v(d, {
141
+ label: e.label,
142
+ "prepend-icon": e.prependIcon,
143
+ variant: e.variant,
144
+ "bg-color": e.variant ? void 0 : "neutral-gray-100",
145
+ "text-color": e.variant ? void 0 : "neutral-gray-400",
146
+ onClick: (B) => a("click:action", e.value)
147
+ }, null, 8, ["label", "prepend-icon", "variant", "bg-color", "text-color", "onClick"])
148
+ ]),
149
+ _: 2
150
+ }, 1024)) : (l(), i(d, {
151
+ key: 1,
152
+ label: e.label,
153
+ "prepend-icon": e.prependIcon,
154
+ variant: e.variant,
155
+ "bg-color": e.variant ? void 0 : "neutral-gray-100",
156
+ "text-color": e.variant ? void 0 : "neutral-gray-400",
157
+ onClick: (B) => a("click:action", e.value)
158
+ }, null, 8, ["label", "prepend-icon", "variant", "bg-color", "text-color", "onClick"]))
159
+ ], 64))), 128)),
160
+ s.value.length > w ? (l(), i(E, { key: 0 }, {
161
+ "menu-button": _(() => [
162
+ v(d, {
163
+ label: I(u)("inventory.common.more"),
164
+ "append-icon": "expand_more",
165
+ "bg-color": "neutral-gray-100",
166
+ "text-color": "neutral-gray-400"
167
+ }, null, 8, ["label"])
168
+ ]),
169
+ default: _(() => [
170
+ (l(!0), c(g, null, T(s.value.slice(w), (e, B) => (l(), i(z, {
171
+ key: B,
172
+ label: e.label,
173
+ onClick: (oe) => a("click:action", e.value)
174
+ }, null, 8, ["label", "onClick"]))), 128))
175
+ ]),
176
+ _: 1
177
+ })) : k("", !0),
178
+ (O = t.value) != null && O.isAdminOnly ? (l(), i(F, { key: 1 }, {
179
+ default: _(() => [
180
+ v(d, {
181
+ label: t.value.label,
182
+ "prepend-icon": t.value.prependIcon,
183
+ onClick: o[1] || (o[1] = (e) => a("click:action", t.value.value))
184
+ }, null, 8, ["label", "prepend-icon"])
185
+ ]),
186
+ _: 1
187
+ })) : t.value ? (l(), i(d, {
188
+ key: 2,
189
+ label: t.value.label,
190
+ "prepend-icon": t.value.prependIcon,
191
+ onClick: o[2] || (o[2] = (e) => a("click:action", t.value.value))
192
+ }, null, 8, ["label", "prepend-icon"])) : k("", !0)
193
+ ], 64))
194
+ ], 2),
195
+ p("div", te, [
196
+ $(r.$slots, "default")
197
+ ])
198
+ ], 2),
199
+ t.value && y.value ? (l(), i(N, {
200
+ key: 0,
201
+ to: "body"
202
+ }, [
203
+ p("div", le, [
204
+ t.value.isAdminOnly ? (l(), i(F, { key: 0 }, {
205
+ default: _(() => [
206
+ v(d, {
207
+ label: t.value.label,
208
+ "prepend-icon": t.value.prependIcon,
209
+ onClick: o[4] || (o[4] = (e) => a("click:action", t.value.value)),
210
+ variant: "fab"
211
+ }, null, 8, ["label", "prepend-icon"])
212
+ ]),
213
+ _: 1
214
+ })) : (l(), i(d, {
215
+ key: 1,
216
+ label: t.value.label,
217
+ "prepend-icon": t.value.prependIcon,
218
+ onClick: o[5] || (o[5] = (e) => a("click:action", t.value.value)),
219
+ variant: "fab"
220
+ }, null, 8, ["label", "prepend-icon"]))
221
+ ])
222
+ ])) : k("", !0),
223
+ s.value.length ? (l(), i(N, {
224
+ key: 1,
225
+ to: "body"
226
+ }, [
227
+ v(P, {
228
+ "dismiss-away": "",
229
+ "no-header": "",
230
+ modelValue: n.value,
231
+ "onUpdate:modelValue": o[7] || (o[7] = (e) => n.value = e)
232
+ }, {
233
+ default: _(() => [
234
+ v(L, {
235
+ class: "pb-8",
236
+ items: H.value,
237
+ "onUpdate:modelValue": o[6] || (o[6] = (e) => (a("click:action", e), n.value = !1))
238
+ }, null, 8, ["items"])
239
+ ]),
240
+ _: 1
241
+ }, 8, ["modelValue"])
242
+ ])) : k("", !0)
243
+ ], 64);
244
+ };
245
+ }
246
+ });
247
+ export {
248
+ F,
249
+ se as _,
250
+ Z as u
251
+ };