@feedmepos/mf-menu 0.19.3 → 0.19.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 (50) hide show
  1. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-B94bwxZs.js → ApplyProduct.vue_vue_type_script_setup_true_lang-I3oSOmRl.js} +2 -2
  2. package/dist/{ApplyProducts.vue_vue_type_script_setup_true_lang-AhWYIaEX.js → ApplyProducts.vue_vue_type_script_setup_true_lang-37UBJL7H.js} +2 -2
  3. package/dist/{Catalog-CphmfHzo.js → Catalog-BEd25NRk.js} +3 -3
  4. package/dist/{Category-CS9IaLGe.js → Category-CEnEkxob.js} +6 -6
  5. package/dist/{CookingGuide-ChpX6wk2.js → CookingGuide-mzvzpnBM.js} +3 -3
  6. package/dist/{Group-DHQqemyj.js → Group-BJRVwXxX.js} +1 -1
  7. package/dist/{Group-DZrVyzSW.js → Group-ChhvuIwB.js} +4 -4
  8. package/dist/Group.vue_vue_type_script_setup_true_lang-C9HJrtpe.js +560 -0
  9. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D2P7w1R0.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D6CweZwO.js} +2 -2
  10. package/dist/{Ingredient-BrUxMr3l.js → Ingredient-BOCETrcw.js} +4 -4
  11. package/dist/{LinkProductSideSheet-qIA_dKq_.js → LinkProductSideSheet-CXnYisJ-.js} +2 -2
  12. package/dist/{PrintRoute-D1XFp0PD.js → PrintRoute-BwR5xiJA.js} +3 -3
  13. package/dist/{Product-DK2zUE5v.js → Product-Pir4B0Qv.js} +1 -1
  14. package/dist/{Product.vue_vue_type_script_setup_true_lang-DSQAY3Gz.js → Product.vue_vue_type_script_setup_true_lang-Dc0zqwBo.js} +11 -11
  15. package/dist/{Products-GlbJp4sM.js → Products-D3igXPuX.js} +8 -8
  16. package/dist/{Publish-B_6zhqFq.js → Publish-Bikkfq1M.js} +2 -2
  17. package/dist/{Recipe-Bkit5ypT.js → Recipe-BdzFl6zy.js} +4 -4
  18. package/dist/{Scheduler-Bv3nJ7hG.js → Scheduler-CSzxv51J.js} +2 -2
  19. package/dist/{SchedulerSelector.vue_vue_type_script_setup_true_lang-CmNysx4f.js → SchedulerSelector.vue_vue_type_script_setup_true_lang-NdDxuvul.js} +1 -1
  20. package/dist/ServingSequence-BipZMm9_.js +4 -0
  21. package/dist/{Setting-DLMeyjzN.js → Setting-BPGkjuJ6.js} +1 -1
  22. package/dist/{Setting.vue_vue_type_script_setup_true_lang-BEvqNM4t.js → Setting.vue_vue_type_script_setup_true_lang-CNm6RdZr.js} +5 -5
  23. package/dist/{Takeaway-CuN1UTLr.js → Takeaway-BprFqBfj.js} +1 -1
  24. package/dist/{Takeaway-DKRA1eiI.js → Takeaway-CI8A__sy.js} +4 -4
  25. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BvMTiHso.js → Takeaway.vue_vue_type_script_setup_true_lang-DU9bE6Ud.js} +4 -4
  26. package/dist/{TaxSetting-B3FGwL7j.js → TaxSetting-BY5M7OOe.js} +4 -4
  27. package/dist/{Unit-CEn5Ij_L.js → Unit-BRrv8dq9.js} +2 -2
  28. package/dist/{Variant-BkGiVA4h.js → Variant-C2y8iD7n.js} +2 -2
  29. package/dist/{_id_-DYkUn-_T.js → _id_-CSZVnq1r.js} +6 -6
  30. package/dist/{app-CZB0S6GF.js → app-rpRnJE5l.js} +28 -28
  31. package/dist/app.js +2 -2
  32. package/dist/assets/{linked-status-Bn4uaXGM.js → linked-status-DS-8BHNX.js} +3 -3
  33. package/dist/assets/{validate-menu-BTQuKNEA.js → validate-menu-D5zXstue.js} +3 -3
  34. package/dist/{catalog-USi_ttVm.js → catalog-BG3M0HmC.js} +432 -432
  35. package/dist/{catalog-D3tgKmMn.js → catalog-CsxctmMv.js} +1 -1
  36. package/dist/{category-LWr8T58z.js → category-CQh8fNoT.js} +1 -1
  37. package/dist/{currency-DKK9xC6n.js → currency-BmgVJIrK.js} +1 -1
  38. package/dist/{index-CKc0UptG.js → index-C5lP3jhQ.js} +3 -3
  39. package/dist/{index-Bvp0E23d.js → index-D4fBPZn6.js} +2 -2
  40. package/dist/{item-C7Q5zno7.js → item-Ch2-vWaA.js} +11 -11
  41. package/dist/{lodash-B3ZfQdZl.js → lodash-pFspxprb.js} +1 -1
  42. package/dist/{menu-DGMuUZSo.js → menu-DyF91RHA.js} +1 -1
  43. package/dist/{object-4zTGlAvf.js → object-BS0Wr3mf.js} +1 -1
  44. package/dist/{scheduler-DF7awhFR.js → scheduler-DugiAEev.js} +4 -4
  45. package/dist/{takeaway-COS4KOI3.js → takeaway-BAdnkhiM.js} +4 -4
  46. package/dist/{toExcel-BxO1Q4cj.js → toExcel-BcQjuh6l.js} +2 -2
  47. package/dist/{unit-BxSPj42Q.js → unit-DdQ4s7EW.js} +2 -2
  48. package/package.json +2 -2
  49. package/dist/Group.vue_vue_type_script_setup_true_lang-KtmJXRoE.js +0 -559
  50. package/dist/ServingSequence-v6nXMXUb.js +0 -4
@@ -1,559 +0,0 @@
1
- import { defineComponent as Q, ref as S, resolveComponent as D, openBlock as d, createElementBlock as G, Fragment as T, renderSlot as he, createVNode as m, unref as o, withCtx as k, createElementVNode as c, toDisplayString as P, computed as g, createBlock as V, renderList as te, normalizeClass as z, watch as ke, mergeProps as Oe, createCommentVNode as E, createSlots as we, withModifiers as De, isRef as ne, h as Ce, nextTick as Me } from "vue";
2
- import { u as ae, g as xe, i as Ae, a as Fe, n as Ge, c as Ne, b as v, m as Pe, k as Ve, j as Re, h as Ue } from "./app-CZB0S6GF.js";
3
- import { _ as oe } from "./SchedulerSelector.vue_vue_type_script_setup_true_lang-CmNysx4f.js";
4
- import { M as le, S as Ee, _ as Se, A as Te, e as Ie, a as $e } from "./item-C7Q5zno7.js";
5
- import { components as Ye, useBreakpoints as ue, useSnackbar as Le, useDialog as ze, FmButtonVariant as je } from "@feedmepos/ui-library";
6
- import { C as Ke } from "./catalog-D3tgKmMn.js";
7
- import { l as L, u as Be } from "./lodash-B3ZfQdZl.js";
8
- import { _ as qe } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-B94bwxZs.js";
9
- import { V as He } from "./vuedraggable-WU01qJgi.js";
10
- import { _ as Je, a as Qe } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DPis3HVx.js";
11
- import { c as We } from "./object-4zTGlAvf.js";
12
- import { useI18n as Xe } from "@feedmepos/mf-common";
13
- const Ze = { class: "fm-typo-en-title-md-600" }, et = { class: "flex gap-8 items-center justify-start" }, tt = /* @__PURE__ */ Q({
14
- __name: "ApplyProductDialog",
15
- props: {
16
- title: {},
17
- initialValue: {},
18
- group: {},
19
- editable: { type: Boolean }
20
- },
21
- emits: ["apply:product"],
22
- setup(j, { emit: I }) {
23
- const u = j, C = I, x = u.initialValue.map((p) => ({ _id: p })), b = S(L.clone(x)), N = Be(
24
- () => !L.isEqual(b.value, x),
25
- () => {
26
- M.value = !1;
27
- }
28
- ), M = S(!1), O = (p) => {
29
- xe.isBoolean(p) ? M.value = p : M.value = !M.value;
30
- }, A = ae();
31
- return (p, s) => {
32
- const _ = D("fm-button"), K = D("fm-side-sheet");
33
- return d(), G(T, null, [
34
- he(p.$slots, "default", { trigger: O }),
35
- m(K, {
36
- id: "group-form",
37
- modelValue: M.value,
38
- "onUpdate:modelValue": s[1] || (s[1] = (r) => M.value = r),
39
- "is-container": o(Ye).FmForm,
40
- "is-container-props": {
41
- onValidationSuccess: () => {
42
- C("apply:product", b.value), O(!1);
43
- },
44
- blameFormChildOnValidationFailed: !0
45
- },
46
- "max-width": 560,
47
- "z-index": 100,
48
- "onOn:clickedAway": o(N)
49
- }, {
50
- "side-sheet-header": k(() => [
51
- c("p", Ze, P(p.title), 1)
52
- ]),
53
- "side-sheet-footer": k(() => [
54
- c("div", et, [
55
- m(_, {
56
- label: "Save",
57
- size: "lg",
58
- type: "submit",
59
- variant: "primary"
60
- }),
61
- m(_, {
62
- label: "Cancel",
63
- size: "lg",
64
- variant: "tertiary",
65
- onClick: O
66
- })
67
- ])
68
- ]),
69
- default: k(() => [
70
- m(qe, {
71
- overrides: b.value,
72
- "onUpdate:overrides": s[0] || (s[0] = (r) => b.value = r),
73
- "categorized-items": o(A).categorizedItems,
74
- editable: p.editable,
75
- "select-variant": !1,
76
- "show-variant": !1,
77
- title: "Product"
78
- }, null, 8, ["overrides", "categorized-items", "editable"])
79
- ]),
80
- _: 1
81
- }, 8, ["modelValue", "is-container", "is-container-props", "onOn:clickedAway"])
82
- ], 64);
83
- };
84
- }
85
- }), nt = /* @__PURE__ */ Q({
86
- __name: "ResponsiveContextMenu",
87
- props: {
88
- items: {}
89
- },
90
- setup(j) {
91
- const I = ue(), u = g(() => I.breakpoints.value.xs);
92
- return (C, x) => {
93
- const b = D("FmButton"), N = D("FmMenuItem"), M = D("FmMenu");
94
- return u.value ? (d(), V(Je, { key: 0 }, {
95
- default: k(() => [
96
- (d(!0), G(T, null, te(C.items, ({ icon: O, label: A, disabled: p, itemClass: s, onClick: _ }) => (d(), V(Qe, {
97
- key: A,
98
- icon: O,
99
- label: A,
100
- disabled: p,
101
- itemClass: s,
102
- onClick: () => {
103
- !p && (_ == null || _());
104
- }
105
- }, null, 8, ["icon", "label", "disabled", "itemClass", "onClick"]))), 128))
106
- ]),
107
- _: 1
108
- })) : (d(), V(M, {
109
- key: 1,
110
- "stop-click-propagation": ""
111
- }, {
112
- "menu-button": k(() => [
113
- m(b, {
114
- type: "button",
115
- variant: "tertiary",
116
- icon: "more_vert",
117
- "text-color": "neutral-gray-400",
118
- size: "md"
119
- })
120
- ]),
121
- default: k(() => [
122
- (d(!0), G(T, null, te(C.items, ({ icon: O, label: A, disabled: p, itemClass: s, onClick: _ }) => (d(), V(N, {
123
- key: A,
124
- disabled: p,
125
- onClick: () => {
126
- !p && (_ == null || _());
127
- },
128
- label: A
129
- }, {
130
- label: k(() => [
131
- c("span", {
132
- class: z(p ? "text-fm-color-typo-disabled" : s)
133
- }, P(A), 3)
134
- ]),
135
- _: 2
136
- }, 1032, ["disabled", "onClick", "label"]))), 128))
137
- ]),
138
- _: 1
139
- }));
140
- };
141
- }
142
- }), ot = {
143
- key: 1,
144
- class: "xs:pt-24"
145
- }, lt = {
146
- key: 0,
147
- class: /* @__PURE__ */ z(["flex-1 overflow-hidden", "space-y-8", "flex flex-col", "overflow-hidden"])
148
- }, at = {
149
- class: "flex justify-between items-center space-x-8"
150
- }, ut = {
151
- class: "w-[320px]"
152
- }, rt = {
153
- class: "px-16 py-8"
154
- }, st = {
155
- class: "py-8 px-16"
156
- }, it = {
157
- class: "flex items-center flex-1"
158
- }, mt = {
159
- class: "flex-1 space-y-4"
160
- }, ct = {
161
- class: "fm-typo-en-body-lg-600"
162
- }, dt = {
163
- key: 0,
164
- class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
165
- }, pt = {
166
- class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
167
- }, Mt = /* @__PURE__ */ Q({
168
- __name: "Group",
169
- emits: ["update:count"],
170
- setup(j, {
171
- emit: I
172
- }) {
173
- const u = ae(), C = Ae(Fe(Le())), x = ze(), b = g(() => u.rules.group), N = g(() => new le(u, C.updateMenu, x)), M = g(() => N.value.mapGroups(u.groups, !1)), {
174
- searchKey: O,
175
- filter: A
176
- } = Ge(), p = S(!1), s = S(null), _ = g(() => M.value.filter((t) => A([t.name, Object.values(t.items).flatMap((e) => `${e.code} ${e.name} ${Ne.Dinero.fromFdoDinero(e.price).toFormat()}`), t.type])).filter((t) => !s.value || t.type === s.value)), K = I;
177
- ke(() => _.value.length, () => {
178
- K("update:count", _.value.length);
179
- }, {
180
- immediate: !0
181
- });
182
- const r = g(() => !!u.state.currentCatalogId || !!u.state.currentSchedulerId);
183
- function re(t) {
184
- const e = !u.state.currentSchedulerId, l = u.rules.item.bindToVariant, i = u.rules.group.type, f = u.version === v.F_MENU_VERSION.enum.v3, w = u.rules.item.orderFromActiveOnly;
185
- return {
186
- link: (h) => !r.value && (!h || l),
187
- name: (h) => !r.value && !h,
188
- type: i && !t._id && !r.value,
189
- price: t.type !== v.F_ADDON_GROUP_TYPE.enum.DYNAMIC,
190
- inventory: e ? f ? !r.value && t.type === v.F_ADDON_GROUP_TYPE.enum.NORMAL : !r.value : !1,
191
- orderFrom: (h) => e ? f ? t.type === v.F_ADDON_GROUP_TYPE.enum.DYNAMIC ? r.value : !!r.value == !h : r.value : !1,
192
- orderFromActiveOnly: w,
193
- showOrderFrom: e ? f ? r.value ? !0 : t.type === v.F_ADDON_GROUP_TYPE.enum.PRODUCT : r.value : !1,
194
- bindToVariant: l,
195
- isOverride: r.value,
196
- isItemGroup: !1,
197
- isV4: !f
198
- };
199
- }
200
- const se = g(() => {
201
- const t = !u.state.currentSchedulerId, e = u.rules.group.type, l = u.version === v.F_MENU_VERSION.enum.v3, i = u.rules.item.orderFromActiveOnly, f = u.rules.item.bindToVariant;
202
- return function(h) {
203
- return {
204
- link: (F) => !r.value && (!F || f),
205
- name: (F) => !r.value && !F,
206
- type: e && !h._id && !r.value,
207
- price: h.type !== v.F_ADDON_GROUP_TYPE.enum.DYNAMIC,
208
- inventory: t ? l ? !r.value && h.type === v.F_ADDON_GROUP_TYPE.enum.NORMAL : !r.value : !1,
209
- orderFrom: (F) => t ? l ? h.type === v.F_ADDON_GROUP_TYPE.enum.DYNAMIC ? r.value : !!r.value == !F : r.value : !1,
210
- orderFromActiveOnly: i,
211
- showOrderFrom: t ? l ? r.value ? !0 : h.type === v.F_ADDON_GROUP_TYPE.enum.PRODUCT : r.value : !1,
212
- bindToVariant: f,
213
- isOverride: r.value,
214
- isItemGroup: !1,
215
- isV4: !l
216
- };
217
- };
218
- }), ie = g(() => ({
219
- ...Pe.generator.initMenuV4Group(),
220
- type: u.version === v.F_MENU_VERSION.enum.v4 ? v.F_ADDON_GROUP_TYPE.enum.PRODUCT : v.F_ADDON_GROUP_TYPE.enum.NORMAL,
221
- items: {},
222
- position: u.groups.length - 1,
223
- itemsLinked: []
224
- })), B = g(() => se.value(ie.value).type);
225
- function W(t) {
226
- N.value.sortGroups(t);
227
- }
228
- function me(t) {
229
- x.open({
230
- title: n("menu.group.actions.duplicate.title"),
231
- message: n("menu.group.actions.duplicate.message", {
232
- name: t.name
233
- }),
234
- primaryActions: {
235
- text: n("menu.common.actions.yes"),
236
- close: !0
237
- },
238
- secondaryActions: {
239
- text: n("menu.common.actions.cancel"),
240
- close: !0
241
- }
242
- }).onPrimary(() => N.value.duplicateGroup(t));
243
- }
244
- const q = g(() => u.currentCatalog), $ = g(() => u.currentScheduler), Y = g(() => new Ke(q.value, u, C.updateMenu, x)), H = g(() => new Ee($.value, u, C.updateMenu, x)), ce = (t) => {
245
- let e = t;
246
- if (r.value) {
247
- let i = function(w) {
248
- const F = u.state.menu.modules.group.find((y) => y._id === w._id), J = (w.items ?? []).reduce((y, R) => (y[R._id] = [...y[R._id] || [], R.combinationKey || ""], y), {}), be = (F.items ?? []).filter((y) => {
249
- var R;
250
- return !((R = J[y._id]) != null && R.includes(y.combinationKey || ""));
251
- }).map((y) => ({
252
- _id: y._id,
253
- combinationKey: y.combinationKey,
254
- selection: y.selection
255
- })).filter((y) => !!u.mergedMenu.modules.item.find((R) => R._id === y._id));
256
- return {
257
- ...F,
258
- ...Object.fromEntries(Object.entries(w).filter(([, y]) => !!y)),
259
- items: [...w.items ?? [], ...be]
260
- };
261
- }, l;
262
- q.value ? $.value ? l = Y.value.getCatalogSchedulerGroup(t._id, $.value._id) : l = Y.value.getCatalogGroup(t._id) : l = H.value.getSchedulerGroup(t._id);
263
- const f = i(l);
264
- e = new le(u, C.updateMenu, x).mapGroups([f], !0)[0];
265
- }
266
- return {
267
- group: e,
268
- config: re,
269
- categorizedItems: u.categorizedItems
270
- };
271
- };
272
- function de(t) {
273
- x.open({
274
- title: n("menu.group.dialogs.delete.title"),
275
- message: n("menu.group.dialogs.delete.message", {
276
- name: t.name
277
- }),
278
- primaryActions: {
279
- text: n("menu.common.actions.delete"),
280
- close: !0,
281
- variant: je.Destructive
282
- },
283
- secondaryActions: {
284
- text: n("menu.common.actions.cancel"),
285
- close: !0
286
- }
287
- }).onPrimary(async () => N.value.deleteGroup(t));
288
- }
289
- const X = (t) => {
290
- const e = t.group;
291
- return Ce(tt, {
292
- key: e._id,
293
- initialValue: e.itemsLinked,
294
- group: Ie(e),
295
- editable: b.value.applyProduct,
296
- "onApply:product": async (l) => {
297
- await N.value.applyItems(e, l.map((i) => i._id));
298
- }
299
- }, {
300
- default: ({
301
- trigger: l
302
- }) => {
303
- const i = [{
304
- label: n("menu.common.actions.edit"),
305
- onClick: () => ee(e)
306
- }, {
307
- label: n("menu.group.actions.apply_product"),
308
- disable: !b.value.applyProduct,
309
- onClick: l
310
- }, {
311
- label: n("menu.group.actions.duplicate_action"),
312
- disabled: !b.value.create,
313
- onClick: () => me(e)
314
- }, {
315
- label: n("menu.common.actions.delete"),
316
- itemClass: "text-fm-color-typo-error",
317
- disabled: !b.value.delete,
318
- onClick: () => de(e)
319
- }];
320
- return m(nt, {
321
- class: t.className,
322
- items: i
323
- }, null);
324
- }
325
- });
326
- }, pe = g(() => [{
327
- accessorKey: "name",
328
- header: () => n("menu.group.list.columns.name"),
329
- enableSorting: !1
330
- }, {
331
- accessorKey: "items",
332
- header: () => n("menu.group.list.columns.products"),
333
- enableSorting: !1,
334
- cell: (t) => {
335
- const e = t.getValue(), l = Object.values(e).map((i) => {
336
- var w;
337
- const f = [(i == null ? void 0 : i.code) || "", i.name ?? i.fallbackName].join(" ").trim();
338
- return (i.items || []).length > 1 ? `${f} (${n("menu.group.list.variants", {
339
- count: (w = i.items) == null ? void 0 : w.length
340
- })})` : f;
341
- });
342
- return l.length > 5 ? `${l.slice(0, 5).join(", ")} ${n("menu.group.list.more_items", {
343
- count: l.length - 5
344
- })}` : l.join(", ");
345
- }
346
- }, {
347
- accessorKey: "type",
348
- header: () => n("menu.group.list.columns.type"),
349
- enableSorting: !1,
350
- cell: (t) => {
351
- const e = t.row.original;
352
- return {
353
- [v.F_ADDON_GROUP_TYPE.enum.NORMAL]: n("menu.group.list.types.normal"),
354
- [v.F_ADDON_GROUP_TYPE.enum.PRODUCT]: n("menu.group.list.types.product"),
355
- [v.F_ADDON_GROUP_TYPE.enum.DYNAMIC]: n("menu.group.list.types.dynamic")
356
- }[e.type] || "-";
357
- },
358
- meta: {
359
- width: "80px"
360
- }
361
- }, {
362
- accessorKey: "itemsLinked",
363
- header: () => n("menu.group.list.columns.applied_products"),
364
- enableSorting: !1,
365
- cell: (t) => {
366
- const e = t.getValue();
367
- return n("menu.group.list.items_linked", {
368
- count: e.length
369
- });
370
- }
371
- }, {
372
- id: "action",
373
- meta: {
374
- cellClass: "pl-16",
375
- headerContentClass: "-mx-16"
376
- },
377
- cell: (t) => {
378
- const e = t.row.original;
379
- return X({
380
- group: e,
381
- className: "flex justify-end w-full"
382
- });
383
- }
384
- }]), ve = g(() => ({
385
- itemsLinked: b.value.showAppliedProduct
386
- })), fe = async (t) => {
387
- const e = $e(t), l = e.group;
388
- if (r.value)
389
- q.value ? ($.value ? Y.value.overrideCatalogSchedulerGroups([l], $.value._id) : Y.value.overrideCatalogGroups([l]), await Y.value.update()) : (H.value.overrideSchedulerGroups([l]), await H.value.update());
390
- else {
391
- const i = {
392
- module: v.F_MENU_MODULE_V4_KEY.enum.group,
393
- operation: Ue.F_OPERATION_TYPE.update,
394
- data: l,
395
- link: [{
396
- module: v.F_MENU_MODULE_V4_KEY.enum.item,
397
- id: "",
398
- data: e.linkItems
399
- }]
400
- };
401
- await C.updateMenu(i, l.name);
402
- }
403
- }, U = S(null), Z = S(null), ee = async (t) => {
404
- var e;
405
- U.value = We(t), await Me(), (e = Z.value) == null || e.trigger(!0);
406
- };
407
- function _e(t) {
408
- ee(t.original);
409
- }
410
- const ye = ue(), ge = g(() => ye.breakpoints.value.xs), {
411
- t: n
412
- } = Xe();
413
- return (t, e) => {
414
- const l = D("fm-button"), i = D("fm-chip"), f = D("fm-menu-item"), w = D("fm-menu"), h = D("fm-search"), F = D("fm-table"), J = D("fm-bottom-sheet");
415
- return d(), G(T, null, [U.value ? (d(), V(Se, Oe({
416
- ref_key: "groupManagerFormRef",
417
- ref: Z,
418
- key: U.value._id
419
- }, ce(U.value), {
420
- action: "update",
421
- title: o(n)("menu.group.dialogs.update.title"),
422
- group: U.value,
423
- "onUpdate:group": e[0] || (e[0] = (a) => U.value = a),
424
- "onSubmit:group": e[1] || (e[1] = (a) => fe(a))
425
- }), null, 16, ["title", "group"])) : E("", !0), M.value.length === 0 ? (d(), G("div", ot, [m(Ve, {
426
- subtitle: o(n)("menu.group.empty.subtitle"),
427
- title: o(n)("menu.group.empty.title")
428
- }, we({
429
- _: 2
430
- }, [b.value.create ? {
431
- name: "action",
432
- fn: k(() => [m(o(Te), null, {
433
- default: k(({
434
- trigger: a
435
- }) => [m(l, {
436
- "prepend-icon": "add",
437
- label: o(n)("menu.group.actions.add"),
438
- onClick: De(a, ["stop"])
439
- }, null, 8, ["label", "onClick"])]),
440
- _: 1
441
- })]),
442
- key: "0"
443
- } : void 0]), 1032, ["subtitle", "title"])])) : (d(), G(T, {
444
- key: 2
445
- }, [ge.value ? (d(), G(T, {
446
- key: 1
447
- }, [c("div", rt, [m(h, {
448
- autofocus: "",
449
- modelValue: o(O),
450
- "onUpdate:modelValue": e[8] || (e[8] = (a) => ne(O) ? O.value = a : null),
451
- placeholder: o(n)("menu.group.search.placeholder")
452
- }, null, 8, ["modelValue", "placeholder"])]), e[15] || (e[15] = c("div", {
453
- class: "bg-fm-color-neutral-gray-100 w-full h-px rounded-md"
454
- }, null, -1)), c("div", st, [b.value.multiScheduler ? (d(), V(oe, {
455
- key: 0
456
- })) : E("", !0), B.value ? (d(), V(J, {
457
- key: 1,
458
- modelValue: p.value,
459
- "onUpdate:modelValue": e[13] || (e[13] = (a) => p.value = a)
460
- }, {
461
- "bottom-sheet-button": k(() => [m(i, {
462
- label: o(n)("menu.group.type.title", {
463
- type: s.value ? o(L.capitalize)(s.value) : o(n)("menu.common.labels.all")
464
- }),
465
- class: "text-fm-color-typo-secondary",
466
- "right-icon": "keyboard_arrow_down"
467
- }, null, 8, ["label"])]),
468
- default: k(() => [c("div", null, [c("div", {
469
- class: "px-16 py-8",
470
- onClick: e[9] || (e[9] = (a) => s.value = null)
471
- }, P(o(n)("menu.group.type.all")), 1), c("div", {
472
- class: "px-16 py-8",
473
- onClick: e[10] || (e[10] = (a) => s.value = "NORMAL")
474
- }, P(o(n)("menu.group.type.normal")), 1), c("div", {
475
- class: "px-16 py-8",
476
- onClick: e[11] || (e[11] = (a) => s.value = "PRODUCT")
477
- }, P(o(n)("menu.group.type.product")), 1), c("div", {
478
- class: "px-16 py-8",
479
- onClick: e[12] || (e[12] = (a) => s.value = "DYNAMIC")
480
- }, P(o(n)("menu.group.type.dynamic")), 1)])]),
481
- _: 1
482
- }, 8, ["modelValue"])) : E("", !0)]), m(o(He), {
483
- class: z(["flex-1", "overflow-scroll", "divide-y divide-fm-color-neutral-gray-100", "pb-64"]),
484
- "model-value": _.value,
485
- group: "categories",
486
- handle: ".handle",
487
- "item-key": "_id",
488
- "onUpdate:modelValue": e[14] || (e[14] = (a) => W(a))
489
- }, {
490
- item: k(({
491
- element: a
492
- }) => [(d(), G("div", {
493
- key: a._id,
494
- class: z(["py-12 px-16", "flex space-x-16", "items-center"])
495
- }, [c("div", it, [c("div", mt, [c("p", ct, P(a.name), 1), c("div", null, [B.value ? (d(), G("p", dt, P(o(L.capitalize)(a.type)) + " type ", 1)) : E("", !0), c("p", pt, P(o(n)("menu.group.list.products_linked", {
496
- count: a.itemsLinked.length
497
- })), 1)])]), m(X, {
498
- group: a
499
- }, null, 8, ["group"])])]))]),
500
- _: 1
501
- }, 8, ["model-value"])], 64)) : (d(), G("div", lt, [c("div", at, [b.value.multiScheduler ? (d(), V(oe, {
502
- key: 0
503
- })) : E("", !0), B.value ? (d(), V(w, {
504
- key: 1
505
- }, {
506
- "menu-button": k(() => [m(i, {
507
- label: o(n)("menu.group.type.title", {
508
- type: s.value ? o(L.capitalize)(s.value) : o(n)("menu.common.labels.all")
509
- }),
510
- class: "text-fm-color-typo-secondary",
511
- "right-icon": "keyboard_arrow_down"
512
- }, null, 8, ["label"])]),
513
- default: k(() => [c("div", null, [m(f, {
514
- class: "px-16 py-8",
515
- label: o(n)("menu.group.type.all"),
516
- onClick: e[2] || (e[2] = (a) => s.value = null)
517
- }, null, 8, ["label"]), m(f, {
518
- class: "px-16 py-8",
519
- label: o(n)("menu.group.type.normal"),
520
- onClick: e[3] || (e[3] = (a) => s.value = "NORMAL")
521
- }, null, 8, ["label"]), m(f, {
522
- class: "px-16 py-8",
523
- label: o(n)("menu.group.type.product"),
524
- onClick: e[4] || (e[4] = (a) => s.value = "PRODUCT")
525
- }, null, 8, ["label"]), m(f, {
526
- class: "px-16 py-8",
527
- label: o(n)("menu.group.type.dynamic"),
528
- onClick: e[5] || (e[5] = (a) => s.value = "DYNAMIC")
529
- }, null, 8, ["label"])])]),
530
- _: 1
531
- })) : E("", !0), c("div", ut, [m(h, {
532
- autofocus: "",
533
- modelValue: o(O),
534
- "onUpdate:modelValue": e[6] || (e[6] = (a) => ne(O) ? O.value = a : null),
535
- placeholder: o(n)("menu.group.search.placeholder")
536
- }, null, 8, ["modelValue", "placeholder"])])]), m(Re, null, {
537
- default: k(() => [m(F, {
538
- "column-defs": pe.value,
539
- "column-visibility": ve.value,
540
- loading: o(C).checkMenuIsLoading(),
541
- "page-size": _.value.length,
542
- "row-data": _.value,
543
- "search-value": o(O),
544
- "shrink-at": !1,
545
- class: "flex-1 overflow-hidden",
546
- draggable: "",
547
- "hide-footer": "",
548
- "pin-header-row": "",
549
- onRowClick: _e,
550
- onDndChanged: e[7] || (e[7] = (a) => W(a))
551
- }, null, 8, ["column-defs", "column-visibility", "loading", "page-size", "row-data", "search-value"])]),
552
- _: 1
553
- })]))], 64))], 64);
554
- };
555
- }
556
- });
557
- export {
558
- Mt as _
559
- };
@@ -1,4 +0,0 @@
1
- import { v as f } from "./app-CZB0S6GF.js";
2
- export {
3
- f as default
4
- };