@feedmepos/mf-menu 0.31.11-prod → 0.31.12-prod
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.
- package/dist/{App-Dfi0zOsF.js → App-DXbBCn_X.js} +5 -5
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-dWRraNPC.js → ApplyProduct.vue_vue_type_script_setup_true_lang-aF5R6xBm.js} +2 -2
- package/dist/{Catalog-dJ_2wE-J.js → Catalog-CuwJd3_O.js} +5 -5
- package/dist/{Category-DvzBTtSt.js → Category-DOfvA0Ft.js} +5 -5
- package/dist/{Category-BcBmkyFo.js → Category-GUsCXKcH.js} +4 -4
- package/dist/{CookingGuide-BnxJTlou.js → CookingGuide-yK-qJmEv.js} +3 -3
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-CLAYCioZ.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-B4-2X13b.js} +1 -1
- package/dist/{Group-BFbPDjW1.js → Group-BcIz41so.js} +3 -3
- package/dist/{Group-YAUoZc4h.js → Group-X-b_M8VD.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-CQl3CWqY.js → Group.vue_vue_type_script_setup_true_lang-DZvBL_ZC.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Doek0-j6.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CBiw2fOV.js} +3 -3
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-BfQlsQ7c.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-C0CclPfJ.js} +211 -211
- package/dist/{Ingredient-D4EXC9Bf.js → Ingredient-DrJi2L7-.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-C66-kUAs.js → InventoryBinding.vue_vue_type_script_setup_true_lang-0Tfla7Q2.js} +2 -2
- package/dist/{LinkProductSideSheet-CDhJgOvy.js → LinkProductSideSheet-D95C1b2A.js} +1 -1
- package/dist/{MenuSetting-CeQAtyFu.js → MenuSetting-DUOgzCoP.js} +4 -4
- package/dist/{PrintRoute-C7AhzUYZ.js → PrintRoute-DTRZd6rA.js} +3 -3
- package/dist/{Product-CWqg0N2A.js → Product-Bmg_UwgC.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-BN2-Tp1i.js → Product.vue_vue_type_script_setup_true_lang-DhGnLOKx.js} +11 -11
- package/dist/{Products-Ds4vfE7z.js → Products-dDvx6AOu.js} +511 -511
- package/dist/{Publish-DaY3YcVq.js → Publish-AdcB_KT4.js} +3 -3
- package/dist/{Recipe-BXPZcplq.js → Recipe-SOST15qr.js} +4 -4
- package/dist/{Scheduler-DaqJcXDr.js → Scheduler-C4TNAKAJ.js} +3 -3
- package/dist/{ServingSequence-eNtOX2KS.js → ServingSequence-Tjf-s2aj.js} +3 -3
- package/dist/{Setting-b6cKOlzO.js → Setting-CmjFLVOK.js} +4 -4
- package/dist/{Subcategory-9crl-RxJ.js → Subcategory-Ddovcrxp.js} +4 -4
- package/dist/{Takeaway-BVLXs79x.js → Takeaway-D5PBkJh_.js} +4 -4
- package/dist/{Takeaway-Dn83ULVR.js → Takeaway-DeeklwTu.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-CFCvnaPR.js → Takeaway.vue_vue_type_script_setup_true_lang-D4gswYtk.js} +5 -5
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BlZZVcjm.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-kWSE_40n.js} +12 -12
- package/dist/{Unit-DLoy6lAQ.js → Unit-DMxvA7H5.js} +2 -2
- package/dist/{Variant-IfKi-Sc8.js → Variant-B2pilaJJ.js} +3 -3
- package/dist/{_id_-BxFQNyZX.js → _id_-GV1UMXEc.js} +9 -9
- package/dist/{app-DAVxohO7.js → app-BdrTuNRd.js} +1 -1
- package/dist/{app-Buz7Hr7K.js → app-DUVhcqWX.js} +56 -56
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-DJdzo5PV.js → linked-status-BapXE5Fs.js} +2 -2
- package/dist/assets/{override-menu-D3_blPtq.js → override-menu-BC7rOlN4.js} +2 -2
- package/dist/assets/{validate-menu-D_K9_jhy.js → validate-menu-RgPh4oSb.js} +2 -2
- package/dist/{catalog-DywMNhqu.js → catalog-B3HPF1Zm.js} +1 -1
- package/dist/{catalogSetting-DAzjpMy_.js → catalogSetting-D3srmeIL.js} +1 -1
- package/dist/{category-scszBlCD.js → category-DCQJ57O4.js} +1 -1
- package/dist/{currency-D5HsYV_o.js → currency-D4GdI_X_.js} +1 -1
- package/dist/{dayjs.min-CuZlmzqU.js → dayjs.min-Bz6-FIIy.js} +1 -1
- package/dist/{index-DwaW__Il.js → index-BrR7d0DI.js} +1 -1
- package/dist/{index-CSnuNvkE.js → index-CmQpmVdJ.js} +3 -3
- package/dist/{index-Dd4zgUww.js → index-CzKG_QVm.js} +2 -2
- package/dist/{item-BJwsv9wH.js → item-CbmzFTRV.js} +14 -14
- package/dist/{menu-Cy7Z9Uon.js → menu-BjeZ0rce.js} +1 -1
- package/dist/{menu-TxdbkYDV.js → menu-DiYltG70.js} +5 -5
- package/dist/{priceTier-BWQr4Tp_.js → priceTier-BGGyCMAz.js} +1 -1
- package/dist/{scheduler-Cz7gGSkk.js → scheduler-BWoIKahu.js} +3 -3
- package/dist/{subcategory-anzAD_yZ.js → subcategory-CwMwuKB7.js} +66 -66
- package/dist/{toExcel-CLb9bvrO.js → toExcel-Ci42q4v8.js} +2 -2
- package/dist/{unit-Dkqxq0ey.js → unit-RfUfENpu.js} +1 -1
- package/package.json +2 -2
- package/dist/packages/shared/src/components/form/RestaurantSelector.vue.d.ts +0 -37
- package/dist/packages/shared/src/components/form/RestaurantSelectorMultiple.vue.d.ts +0 -22
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { shallowRef as
|
|
2
|
-
import { J as k, A as x, aj as Z, I, ak as
|
|
1
|
+
import { shallowRef as Q, ref as R, computed as h, shallowReactive as Fe, watch as H, defineComponent as Te, resolveComponent as j, createBlock as Re, openBlock as Ne, unref as P, withCtx as Oe, createVNode as Ve } from "vue";
|
|
2
|
+
import { J as k, A as x, aj as Z, I, ak as z, M as E, K as ee, a9 as C, c as $, $ as w, ai as G, al as Pe, am as xe, z as Ae, ab as Ke, an as Ue, a8 as L, u as $e } from "./menu-DiYltG70.js";
|
|
3
3
|
import { useCoreStore as J, useI18n as te } from "@feedmepos/mf-common";
|
|
4
|
-
import { useSnackbar as
|
|
4
|
+
import { useSnackbar as De, useDialogChild as qe } from "@feedmepos/ui-library";
|
|
5
5
|
import { defineStore as He } from "pinia";
|
|
6
|
-
const Ye = "/assets/linked-status-
|
|
7
|
-
function
|
|
6
|
+
const Ye = "/assets/linked-status-BapXE5Fs.js", We = "/assets/override-menu-BC7rOlN4.js";
|
|
7
|
+
function Be(e) {
|
|
8
8
|
var o;
|
|
9
9
|
const n = k(e), a = (o = n.variant) == null ? void 0 : o.variantCombinations;
|
|
10
10
|
return delete n.variant, delete n.thumbnail, [n, ...a || []];
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
const r = k(n), f = a ? r.modules.catalog.find((_) => _._id === a) : null, d = o ? r.modules.scheduler.find((_) => _._id === o) : null, i = f ? k(f) : void 0, m = a ? r.modules.catalog.filter((_) => _._id !== a) : [], u = d ? k(d) : void 0, s = e.reduce((_, y) => (_[y._id] =
|
|
12
|
+
function je(e, n, a, o) {
|
|
13
|
+
const r = k(n), f = a ? r.modules.catalog.find((_) => _._id === a) : null, d = o ? r.modules.scheduler.find((_) => _._id === o) : null, i = f ? k(f) : void 0, m = a ? r.modules.catalog.filter((_) => _._id !== a) : [], u = d ? k(d) : void 0, s = e.reduce((_, y) => (_[y._id] = Be(y), _), {});
|
|
14
14
|
function p(_ = []) {
|
|
15
15
|
const y = e.map((b) => b._id);
|
|
16
16
|
return [
|
|
@@ -35,9 +35,9 @@ function ze(e, n, a, o) {
|
|
|
35
35
|
...r.modules.scheduler.filter((_) => _._id !== o),
|
|
36
36
|
u
|
|
37
37
|
], r) : {
|
|
38
|
-
...
|
|
38
|
+
...z(),
|
|
39
39
|
modules: {
|
|
40
|
-
...
|
|
40
|
+
...z().modules,
|
|
41
41
|
catalog: r.modules.catalog,
|
|
42
42
|
item: r.modules.item,
|
|
43
43
|
group: r.modules.group,
|
|
@@ -75,7 +75,7 @@ function T(e, n, a) {
|
|
|
75
75
|
groups: r
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function ze(e, n) {
|
|
79
79
|
const a = e.groups.map((f) => {
|
|
80
80
|
const d = n.modules.group.find((m) => m._id === f._id), i = ((d == null ? void 0 : d.items) || []).map((m) => {
|
|
81
81
|
var p;
|
|
@@ -150,9 +150,9 @@ function Ge(e, n) {
|
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
152
|
async function it(e, n, a, o, r, f = !0) {
|
|
153
|
-
const d = k(a), i = f ?
|
|
153
|
+
const d = k(a), i = f ? je(n, d, o, r) : d, m = n.reduce((p, _) => (p[_._id] = i.modules.item.find((y) => y._id === _._id), p), {}), u = n.reduce((p, _) => {
|
|
154
154
|
const y = _._id;
|
|
155
|
-
return p[y] =
|
|
155
|
+
return p[y] = ze(m[y], e), p;
|
|
156
156
|
}, {}), s = x.getFallbackPrices({
|
|
157
157
|
rawMenu: i,
|
|
158
158
|
items: u,
|
|
@@ -180,11 +180,11 @@ function ct(e, n) {
|
|
|
180
180
|
return r;
|
|
181
181
|
}, [])) || []).join(" / ");
|
|
182
182
|
}
|
|
183
|
-
const
|
|
183
|
+
const D = /* @__PURE__ */ new Map();
|
|
184
184
|
async function lt(e, n) {
|
|
185
185
|
const a = `${e._id}-${e.updatedAt}-${n}`;
|
|
186
|
-
if (
|
|
187
|
-
return
|
|
186
|
+
if (D.has(a))
|
|
187
|
+
return D.get(a);
|
|
188
188
|
const o = await Z(
|
|
189
189
|
Ye,
|
|
190
190
|
JSON.stringify({
|
|
@@ -192,7 +192,7 @@ async function lt(e, n) {
|
|
|
192
192
|
itemId: n
|
|
193
193
|
})
|
|
194
194
|
);
|
|
195
|
-
return
|
|
195
|
+
return D.set(a, o), o;
|
|
196
196
|
}
|
|
197
197
|
async function ne(e, n, a) {
|
|
198
198
|
return await Z(We, {
|
|
@@ -251,9 +251,9 @@ async function ft(e, n, a) {
|
|
|
251
251
|
const u = (d = m.items) == null ? void 0 : d.find((p) => p._id === a && !p.combinationKey), s = e.modules.item.find((p) => p._id === a);
|
|
252
252
|
if (u) {
|
|
253
253
|
const p = (i = m.items) == null ? void 0 : i.filter((y) => y._id === a && y.combinationKey), _ = [u, ...p].map((y) => {
|
|
254
|
-
var
|
|
255
|
-
const b = y.combinationKey ? (
|
|
256
|
-
(
|
|
254
|
+
var N, O;
|
|
255
|
+
const b = y.combinationKey ? (O = (N = s == null ? void 0 : s.variant) == null ? void 0 : N.variantCombinations) == null ? void 0 : O.find(
|
|
256
|
+
(V) => V.combinationKey === y.combinationKey
|
|
257
257
|
) : s, F = b && s ? f(s, b) : y;
|
|
258
258
|
return f(F, y);
|
|
259
259
|
});
|
|
@@ -268,7 +268,7 @@ async function ft(e, n, a) {
|
|
|
268
268
|
function Je({
|
|
269
269
|
maxHistorySize: e = 50
|
|
270
270
|
}) {
|
|
271
|
-
const n =
|
|
271
|
+
const n = Q([]), a = R(-1), o = h(() => a.value > 0), r = h(() => a.value < n.value.length - 1);
|
|
272
272
|
function f(u) {
|
|
273
273
|
n.value.push(u), a.value++, n.value.length > e && (n.value.shift(), a.value--);
|
|
274
274
|
}
|
|
@@ -292,9 +292,9 @@ function Je({
|
|
|
292
292
|
clear: m
|
|
293
293
|
};
|
|
294
294
|
}
|
|
295
|
-
const
|
|
295
|
+
const Xe = {
|
|
296
296
|
async updateMenuModule(e, n) {
|
|
297
|
-
const a =
|
|
297
|
+
const a = E.RequestRunner.operation(n, e.modules);
|
|
298
298
|
if (a.validateError.length > 0)
|
|
299
299
|
throw new Error(a.validateError.join(`
|
|
300
300
|
`));
|
|
@@ -329,7 +329,7 @@ function oe() {
|
|
|
329
329
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
330
330
|
};
|
|
331
331
|
}
|
|
332
|
-
function
|
|
332
|
+
function Qe() {
|
|
333
333
|
return {
|
|
334
334
|
restaurants: [],
|
|
335
335
|
menu: { ...oe(), _rev: "" },
|
|
@@ -341,21 +341,21 @@ function Xe() {
|
|
|
341
341
|
const Ze = He(
|
|
342
342
|
"mf-menu-store-v2",
|
|
343
343
|
() => {
|
|
344
|
-
const e = Fe(
|
|
344
|
+
const e = Fe(Qe()), n = J(), a = De(), o = h(() => e.menu.modules.serveSequence ? C(e.menu.modules.serveSequence, {
|
|
345
345
|
selector: "position"
|
|
346
346
|
}) : []), r = h(() => {
|
|
347
347
|
var t;
|
|
348
|
-
return ((t = n.currentBusiness.value) == null ? void 0 : t.menuVersion) ||
|
|
349
|
-
}), f = h(() => r.value ===
|
|
348
|
+
return ((t = n.currentBusiness.value) == null ? void 0 : t.menuVersion) || $.F_MENU_VERSION.v3;
|
|
349
|
+
}), f = h(() => r.value === $.F_MENU_VERSION.v4), d = h(() => {
|
|
350
350
|
const t = e.menu.modules.catalog;
|
|
351
351
|
return C(t, { selector: "name" });
|
|
352
352
|
}), i = h(() => e.menu.modules.catalog.find((t) => t._id === e.currentCatalogId)), m = h(() => C(p.value.modules.scheduler, { selector: "name" })), u = h(() => e.menu.modules.scheduler.find(
|
|
353
353
|
(t) => t._id === e.currentSchedulerId
|
|
354
354
|
));
|
|
355
355
|
function s(t, l = !0) {
|
|
356
|
-
e.menu = { ...t, _rev: e.menu._rev }, l &&
|
|
356
|
+
e.menu = { ...t, _rev: e.menu._rev }, l && S.push(e.menu);
|
|
357
357
|
}
|
|
358
|
-
const p =
|
|
358
|
+
const p = Q(oe()), _ = R(!1), y = R(1);
|
|
359
359
|
async function b() {
|
|
360
360
|
_.value = !0;
|
|
361
361
|
const t = await ne(
|
|
@@ -373,14 +373,14 @@ const Ze = He(
|
|
|
373
373
|
}
|
|
374
374
|
return p.value = t, _.value = !1, y.value = y.value + 1, t;
|
|
375
375
|
}
|
|
376
|
-
const
|
|
376
|
+
const N = ee.debounce(b, 200);
|
|
377
377
|
H(
|
|
378
378
|
() => [e.menu, e.currentCatalogId, e.currentSchedulerId],
|
|
379
379
|
() => {
|
|
380
|
-
_.value ||
|
|
380
|
+
_.value || N();
|
|
381
381
|
}
|
|
382
382
|
);
|
|
383
|
-
const
|
|
383
|
+
const O = h(() => [
|
|
384
384
|
{
|
|
385
385
|
label: "Main",
|
|
386
386
|
value: null
|
|
@@ -389,7 +389,7 @@ const Ze = He(
|
|
|
389
389
|
label: t.name,
|
|
390
390
|
value: t._id
|
|
391
391
|
}))
|
|
392
|
-
]),
|
|
392
|
+
]), V = h(() => {
|
|
393
393
|
const t = p.value.modules.category;
|
|
394
394
|
return [
|
|
395
395
|
...K.value.item.addon ? [
|
|
@@ -427,7 +427,7 @@ const Ze = He(
|
|
|
427
427
|
c,
|
|
428
428
|
(g) => g.code || g.name
|
|
429
429
|
).reduce((g, v, M) => (g[v._id] = M + l[v.category || ""], g), {});
|
|
430
|
-
}), se = h(() => G(A.value,
|
|
430
|
+
}), se = h(() => G(A.value, V.value, W.value)), ue = h(() => {
|
|
431
431
|
const t = K.value.item.addon ? [
|
|
432
432
|
{
|
|
433
433
|
_id: e.currentCatalogId ? "" : null,
|
|
@@ -451,13 +451,13 @@ const Ze = He(
|
|
|
451
451
|
}
|
|
452
452
|
const ce = h(() => w(p.value.modules.group, (t) => t.name)), le = h(() => C(p.value.modules.takeaway, { selector: "name" })), de = h(() => C(e.menu.modules.printDepartment || [], {
|
|
453
453
|
selector: "name"
|
|
454
|
-
})), me = h(() => C(e.menu.modules.unit, { selector: "name" })), fe = h(() => C(
|
|
454
|
+
})), me = h(() => C(e.menu.modules.unit, { selector: "name" })), fe = h(() => C(Pe(e.menu.modules.recipe, e.menu.modules.sku), {
|
|
455
455
|
selector: "name"
|
|
456
456
|
})), pe = h(() => e.menu.modules.cookingGuide), _e = h(() => {
|
|
457
457
|
const t = xe(e.menu.modules.sku);
|
|
458
458
|
return C(t, { selector: "code" });
|
|
459
459
|
}), K = h(() => {
|
|
460
|
-
const t = !e.currentCatalogId, l = r.value ===
|
|
460
|
+
const t = !e.currentCatalogId, l = r.value === $.F_MENU_VERSION.v4, c = !e.currentSchedulerId, g = {
|
|
461
461
|
create: t && c,
|
|
462
462
|
edit: t && c,
|
|
463
463
|
delete: t && c
|
|
@@ -552,17 +552,17 @@ const Ze = He(
|
|
|
552
552
|
};
|
|
553
553
|
}), he = async () => {
|
|
554
554
|
const t = await L.readMenu();
|
|
555
|
-
e.menu = t ?? e.menu,
|
|
555
|
+
e.menu = t ?? e.menu, B(null);
|
|
556
556
|
}, be = async () => {
|
|
557
557
|
const t = await L.readRestaurantsWithMenu();
|
|
558
558
|
e.restaurants = C(t, { selector: "name" });
|
|
559
|
-
},
|
|
559
|
+
}, B = (t) => {
|
|
560
560
|
e.currentCatalogId = t;
|
|
561
561
|
}, Me = (t) => {
|
|
562
562
|
e.currentSchedulerId = t;
|
|
563
563
|
}, Ce = (t) => {
|
|
564
564
|
e.currentCategoryIds = t;
|
|
565
|
-
},
|
|
565
|
+
}, Ee = async (t, l) => {
|
|
566
566
|
const c = Array.isArray(t) ? t : [t];
|
|
567
567
|
if (!c.length) return;
|
|
568
568
|
const g = c.map((v) => ({
|
|
@@ -572,12 +572,12 @@ const Ze = He(
|
|
|
572
572
|
}));
|
|
573
573
|
try {
|
|
574
574
|
if (l || g.some(
|
|
575
|
-
(M) => [
|
|
575
|
+
(M) => [E.F_OPERATION_TYPE.delete, E.F_OPERATION_TYPE.deleteMany].includes(M.operation)
|
|
576
576
|
)) {
|
|
577
577
|
const M = await Ue(g, e.menu.modules);
|
|
578
578
|
if (M !== !0) throw new Error(M);
|
|
579
579
|
}
|
|
580
|
-
const v = await
|
|
580
|
+
const v = await Xe.updateMenuModule(e.menu, g);
|
|
581
581
|
return s(v.menu), v;
|
|
582
582
|
} catch (v) {
|
|
583
583
|
a.open({
|
|
@@ -586,7 +586,7 @@ const Ze = He(
|
|
|
586
586
|
message: v
|
|
587
587
|
});
|
|
588
588
|
}
|
|
589
|
-
},
|
|
589
|
+
}, Se = async (t) => {
|
|
590
590
|
const l = {
|
|
591
591
|
...e.menu,
|
|
592
592
|
masterCatalogSetting: t.masterCatalogSetting,
|
|
@@ -594,7 +594,7 @@ const Ze = He(
|
|
|
594
594
|
priceTierSettings: t.priceTierSettings
|
|
595
595
|
};
|
|
596
596
|
return s(l), l;
|
|
597
|
-
},
|
|
597
|
+
}, S = Je({ maxHistorySize: 50 }), we = h(() => S.canUndo.value), Ie = h(() => S.canRedo.value);
|
|
598
598
|
return {
|
|
599
599
|
state: e,
|
|
600
600
|
// loading state
|
|
@@ -610,8 +610,8 @@ const Ze = He(
|
|
|
610
610
|
currentCatalog: i,
|
|
611
611
|
schedulers: m,
|
|
612
612
|
currentScheduler: u,
|
|
613
|
-
catalogOptions:
|
|
614
|
-
categories:
|
|
613
|
+
catalogOptions: O,
|
|
614
|
+
categories: V,
|
|
615
615
|
subcategories: re,
|
|
616
616
|
items: W,
|
|
617
617
|
sortedItems: ae,
|
|
@@ -631,11 +631,11 @@ const Ze = He(
|
|
|
631
631
|
setMenu: s,
|
|
632
632
|
readMenu: he,
|
|
633
633
|
readRestaurants: be,
|
|
634
|
-
selectCatalog:
|
|
634
|
+
selectCatalog: B,
|
|
635
635
|
selectScheduler: Me,
|
|
636
636
|
selectCategory: Ce,
|
|
637
|
-
updateMenu:
|
|
638
|
-
updateMenuSetting:
|
|
637
|
+
updateMenu: Ee,
|
|
638
|
+
updateMenuSetting: Se,
|
|
639
639
|
computeMergedMenu: b,
|
|
640
640
|
// helper
|
|
641
641
|
encodeTax: U,
|
|
@@ -646,19 +646,19 @@ const Ze = He(
|
|
|
646
646
|
canUndoHistory: we,
|
|
647
647
|
canRedoHistory: Ie,
|
|
648
648
|
undoHistory: () => {
|
|
649
|
-
const t =
|
|
649
|
+
const t = S.undo();
|
|
650
650
|
t && s(t, !1);
|
|
651
651
|
},
|
|
652
652
|
redoHistory: () => {
|
|
653
|
-
const t =
|
|
653
|
+
const t = S.redo();
|
|
654
654
|
t && s(t, !1);
|
|
655
655
|
},
|
|
656
656
|
clearHistory: () => {
|
|
657
|
-
|
|
657
|
+
S.clear();
|
|
658
658
|
}
|
|
659
659
|
};
|
|
660
660
|
}
|
|
661
|
-
),
|
|
661
|
+
), X = /* @__PURE__ */ Te({
|
|
662
662
|
__name: "AddSubcategoryDialogContentComponent",
|
|
663
663
|
props: {
|
|
664
664
|
initialValue: {}
|
|
@@ -681,18 +681,18 @@ const Ze = He(
|
|
|
681
681
|
immediate: !0
|
|
682
682
|
}
|
|
683
683
|
), (d, i) => {
|
|
684
|
-
const m =
|
|
685
|
-
return
|
|
686
|
-
onValidationSuccess: i[1] || (i[1] = (s) =>
|
|
684
|
+
const m = j("fm-text-field"), u = j("FmForm");
|
|
685
|
+
return Ne(), Re(u, {
|
|
686
|
+
onValidationSuccess: i[1] || (i[1] = (s) => P(f)("primary"))
|
|
687
687
|
}, {
|
|
688
|
-
default:
|
|
689
|
-
|
|
688
|
+
default: Oe(() => [
|
|
689
|
+
Ve(m, {
|
|
690
690
|
modelValue: o.value,
|
|
691
691
|
"onUpdate:modelValue": i[0] || (i[0] = (s) => o.value = s),
|
|
692
|
-
rules: [(s) => !!s ||
|
|
692
|
+
rules: [(s) => !!s || P(a)("menu.subcategory.dialog.add.name.required")],
|
|
693
693
|
autofocus: "",
|
|
694
|
-
label:
|
|
695
|
-
placeholder:
|
|
694
|
+
label: P(a)("menu.subcategory.dialog.add.name.label"),
|
|
695
|
+
placeholder: P(a)("menu.subcategory.dialog.add.name.placeholder")
|
|
696
696
|
}, null, 8, ["modelValue", "rules", "label", "placeholder"])
|
|
697
697
|
]),
|
|
698
698
|
_: 1
|
|
@@ -709,7 +709,7 @@ const Ze = He(
|
|
|
709
709
|
const u = R(!1);
|
|
710
710
|
e.open({
|
|
711
711
|
title: o("menu.subcategory.manager.dialog.add.title"),
|
|
712
|
-
contentComponent:
|
|
712
|
+
contentComponent: X,
|
|
713
713
|
primaryActions: {
|
|
714
714
|
text: o("menu.subcategory.manager.dialog.add.action"),
|
|
715
715
|
close: !1,
|
|
@@ -725,10 +725,10 @@ const Ze = He(
|
|
|
725
725
|
u.value = !0;
|
|
726
726
|
const p = {
|
|
727
727
|
module: I.F_MENU_MODULE_V4_KEY.enum.subCategory,
|
|
728
|
-
operation:
|
|
728
|
+
operation: E.F_OPERATION_TYPE.create,
|
|
729
729
|
data: {
|
|
730
730
|
name: s,
|
|
731
|
-
position:
|
|
731
|
+
position: $e().subcategories.length
|
|
732
732
|
}
|
|
733
733
|
};
|
|
734
734
|
a ? await r(p) : await n.updateMenu(p, s), e.close();
|
|
@@ -740,7 +740,7 @@ const Ze = He(
|
|
|
740
740
|
function d(u) {
|
|
741
741
|
e.open({
|
|
742
742
|
title: o("menu.subcategory.manager.dialog.update.title"),
|
|
743
|
-
contentComponent:
|
|
743
|
+
contentComponent: X,
|
|
744
744
|
contentComponentProps: {
|
|
745
745
|
initialValue: u.name
|
|
746
746
|
},
|
|
@@ -756,7 +756,7 @@ const Ze = He(
|
|
|
756
756
|
if (!s) return;
|
|
757
757
|
const p = {
|
|
758
758
|
module: I.F_MENU_MODULE_V4_KEY.enum.subCategory,
|
|
759
|
-
operation:
|
|
759
|
+
operation: E.F_OPERATION_TYPE.update,
|
|
760
760
|
data: { ...u, name: s ?? u.name }
|
|
761
761
|
};
|
|
762
762
|
a ? await r(p) : await n.updateMenu(p, s), e.close();
|
|
@@ -777,7 +777,7 @@ const Ze = He(
|
|
|
777
777
|
}).onPrimary(async () => {
|
|
778
778
|
const s = {
|
|
779
779
|
module: I.F_MENU_MODULE_V4_KEY.enum.subCategory,
|
|
780
|
-
operation:
|
|
780
|
+
operation: E.F_OPERATION_TYPE.delete,
|
|
781
781
|
data: u._id
|
|
782
782
|
};
|
|
783
783
|
a ? await r(s) : await n.updateMenu(s, u.name, !0), e.close();
|
|
@@ -786,7 +786,7 @@ const Ze = He(
|
|
|
786
786
|
async function m(u) {
|
|
787
787
|
const s = {
|
|
788
788
|
module: I.F_MENU_MODULE_V4_KEY.enum.subCategory,
|
|
789
|
-
operation:
|
|
789
|
+
operation: E.F_OPERATION_TYPE.rearrange,
|
|
790
790
|
data: u
|
|
791
791
|
};
|
|
792
792
|
a ? await r(s) : await n.updateMenu(s, "Subcategories");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import "./menu-
|
|
1
|
+
import { c as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-C0CclPfJ.js";
|
|
2
|
+
import "./menu-DiYltG70.js";
|
|
3
3
|
var Z = {
|
|
4
4
|
defaultAmount: 0,
|
|
5
5
|
defaultCurrency: "USD",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineStore as Q } from "pinia";
|
|
2
2
|
import { defineComponent as T, computed as U, ref as h, watch as L, resolveComponent as V, createBlock as W, openBlock as F, withCtx as w, createVNode as m, createElementVNode as f, normalizeClass as H, createElementBlock as A, toDisplayString as M, unref as l, Fragment as q, renderSlot as X, renderList as Z, getCurrentInstance as ee } from "vue";
|
|
3
|
-
import { a6 as P, a7 as te, a4 as B, J as k, Q as $, G as I, A as E, K as ne, a5 as ae, M as C, I as D, u as oe } from "./menu-
|
|
3
|
+
import { a6 as P, a7 as te, a4 as B, J as k, Q as $, G as I, A as E, K as ne, a5 as ae, M as C, I as D, u as oe } from "./menu-DiYltG70.js";
|
|
4
4
|
import { useI18n as N } from "@feedmepos/mf-common";
|
|
5
5
|
import { useSnackbar as j, components as le, useDialog as ue, FmButtonVariant as ie } from "@feedmepos/ui-library";
|
|
6
6
|
import { u as se } from "./discardConfirm-BHni0LNu.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feedmepos/mf-menu",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.12-prod",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"vue3-lottie": "^3.3.0",
|
|
52
52
|
"vuedraggable": "^4.1.0",
|
|
53
53
|
"xlsx": "^0.18.5",
|
|
54
|
-
"@feedmepos/mf-common": "^1.26.
|
|
54
|
+
"@feedmepos/mf-common": "^1.26.10"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@rollup/plugin-commonjs": "^28.0.2",
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
-
modelValue: import("vue").PropType<string>;
|
|
3
|
-
label: {
|
|
4
|
-
type: import("vue").PropType<string>;
|
|
5
|
-
};
|
|
6
|
-
excludeRestaurants: {
|
|
7
|
-
type: import("vue").PropType<string[]>;
|
|
8
|
-
};
|
|
9
|
-
managableOnly: {
|
|
10
|
-
type: import("vue").PropType<boolean>;
|
|
11
|
-
default: boolean;
|
|
12
|
-
};
|
|
13
|
-
autoSelectFirst: {
|
|
14
|
-
type: import("vue").PropType<boolean>;
|
|
15
|
-
default: boolean;
|
|
16
|
-
};
|
|
17
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
|
-
modelValue: import("vue").PropType<string>;
|
|
19
|
-
label: {
|
|
20
|
-
type: import("vue").PropType<string>;
|
|
21
|
-
};
|
|
22
|
-
excludeRestaurants: {
|
|
23
|
-
type: import("vue").PropType<string[]>;
|
|
24
|
-
};
|
|
25
|
-
managableOnly: {
|
|
26
|
-
type: import("vue").PropType<boolean>;
|
|
27
|
-
default: boolean;
|
|
28
|
-
};
|
|
29
|
-
autoSelectFirst: {
|
|
30
|
-
type: import("vue").PropType<boolean>;
|
|
31
|
-
default: boolean;
|
|
32
|
-
};
|
|
33
|
-
}>> & Readonly<{}>, {
|
|
34
|
-
managableOnly: boolean;
|
|
35
|
-
autoSelectFirst: boolean;
|
|
36
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
37
|
-
export default _default;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
-
modelValue: import("vue").PropType<string[]>;
|
|
3
|
-
excludeRestaurants: {
|
|
4
|
-
type: import("vue").PropType<string[]>;
|
|
5
|
-
};
|
|
6
|
-
managableOnly: {
|
|
7
|
-
type: import("vue").PropType<boolean>;
|
|
8
|
-
default: boolean;
|
|
9
|
-
};
|
|
10
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
11
|
-
modelValue: import("vue").PropType<string[]>;
|
|
12
|
-
excludeRestaurants: {
|
|
13
|
-
type: import("vue").PropType<string[]>;
|
|
14
|
-
};
|
|
15
|
-
managableOnly: {
|
|
16
|
-
type: import("vue").PropType<boolean>;
|
|
17
|
-
default: boolean;
|
|
18
|
-
};
|
|
19
|
-
}>> & Readonly<{}>, {
|
|
20
|
-
managableOnly: boolean;
|
|
21
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
22
|
-
export default _default;
|