@feedmepos/mf-menu 0.32.7 → 0.32.8-dev
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-6Q1nmlfA.js → App-B5S9byVJ.js} +5457 -4622
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-xLPJOt02.js → ApplyProduct.vue_vue_type_script_setup_true_lang-bSXFWpq_.js} +3 -3
- package/dist/{Catalog-Bf5JieUH.js → Catalog-CTfF5FmI.js} +52 -52
- package/dist/{Category-BBATgN1o.js → Category-BntCVeoT.js} +57 -57
- package/dist/{Category-BSBZlBHF.js → Category-Z3bphlCX.js} +26 -26
- package/dist/{CookingGuide-BnjSTAL4.js → CookingGuide-CoPo2Alx.js} +127 -127
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-BXdLDaBB.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-DJ3sb3XV.js} +1 -1
- package/dist/{Group-Dpbz5j1x.js → Group-B7rZfFlT.js} +3 -3
- package/dist/{Group-BqXtHWr2.js → Group-CblWJOl1.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-Bz5hEPov.js → Group.vue_vue_type_script_setup_true_lang-wX7yqw0Z.js} +33 -33
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-3a6eV6cB.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DW1gBCBA.js} +27 -27
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-C6Z7OJz7.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CcQBD0I8.js} +3127 -3127
- package/dist/{Ingredient-BZfbbI--.js → Ingredient-Bn-jeNeI.js} +46 -46
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-DfyUAd9n.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DbGNFA3D.js} +2 -2
- package/dist/{LinkProductSideSheet-C-CcvD1Y.js → LinkProductSideSheet-BjcQDT4U.js} +61 -61
- package/dist/{MenuSetting-CRCXtk6n.js → MenuSetting-BT5YSMgK.js} +14 -14
- package/dist/{PrintRoute-BqRkve5U.js → PrintRoute-B0j0eqNM.js} +34 -34
- package/dist/{Product-cj-wKww4.js → Product-BOMprFhc.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-DtCzSk94.js → Product.vue_vue_type_script_setup_true_lang-q9xFzQ0v.js} +142 -142
- package/dist/{ProductInternalTools-B5V7Hs15.js → ProductInternalTools-O5d2jMAH.js} +39 -39
- package/dist/{Products-a0N50IJw.js → Products-BnMrK40x.js} +15 -15
- package/dist/{Publish-CyiUajCw.js → Publish-dTP5mQS3.js} +26 -26
- package/dist/{Recipe-CKIoGrBI.js → Recipe-DnftcZPO.js} +26 -26
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-fp_IdVVZ.js → RuleView.vue_vue_type_script_setup_true_lang-DSfiVSBV.js} +2 -2
- package/dist/{Scheduler-CwTdAm-V.js → Scheduler-DRLaQK_V.js} +22 -22
- package/dist/{ServingSequence-BAxm0bx1.js → ServingSequence-CPIyJ7T8.js} +39 -39
- package/dist/{Setting-J9s4VpKm.js → Setting-CLtISC4c.js} +22 -22
- package/dist/{Subcategory-BXJ2H9cr.js → Subcategory-b0bXCYYY.js} +32 -32
- package/dist/{Takeaway-CPPrIbb0.js → Takeaway-CCIKDCoF.js} +12 -12
- package/dist/{Takeaway-Cm9DdUdf.js → Takeaway-h9uUxFJd.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-PRAGlbyK.js → Takeaway.vue_vue_type_script_setup_true_lang-BOG_W-2a.js} +26 -26
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-BQcHroCG.js → Thumbnail.vue_vue_type_script_setup_true_lang-D4KcX3XQ.js} +26 -26
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B3EByLES.js +6016 -0
- package/dist/{Unit-9pTm3F5W.js → Unit-B0kiwrN6.js} +13 -13
- package/dist/{Variant-qGJvwVW3.js → Variant-CJSk0kTW.js} +18 -18
- package/dist/{_id_-BPgTKleB.js → _id_-108G3lsv.js} +22 -22
- package/dist/{app-BYd7KCR0.js → app-BTn28hDr.js} +1 -1
- package/dist/{app-BoVVV8kG.js → app-CPJH5bgs.js} +26 -26
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/stores/menu.d.ts +4 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{validate-menu-C55soZke.js → linked-status-Bp5piT25.js} +7 -7
- package/dist/assets/{override-menu-D2ffZ3LE.js → override-menu-D47qVZAi.js} +2 -2
- package/dist/assets/{linked-status-YBCdx1_k.js → validate-menu-YuXYm9iE.js} +7 -7
- package/dist/{catalog-DjMrJdom.js → catalog-CpFTifAS.js} +1 -1
- package/dist/{catalogSetting-DMUZ11RQ.js → catalogSetting-DjGqI2Vf.js} +1 -1
- package/dist/{category-DRr-IdFP.js → category-DaRWiQd8.js} +5 -5
- package/dist/{currency-CAUInXnj.js → currency-DbURufyM.js} +1 -1
- package/dist/{index-CG5i_sE7.js → index-C6AkIinM.js} +1 -1
- package/dist/{index-DOwV5hqi.js → index-D67GKEzf.js} +1 -1
- package/dist/{index-hDyuidIm.js → index-kjRAsH_h.js} +38 -38
- package/dist/{index-By_yIps1.js → index-pJtym1c6.js} +21 -21
- package/dist/{index.vue_vue_type_script_setup_true_lang-Dcq1bwDq.js → index.vue_vue_type_script_setup_true_lang-BvohjQ00.js} +440 -430
- package/dist/item-2WoPAnNJ.js +6838 -0
- package/dist/{iteration-V9L5Rk-0.js → iteration-BGItxpWj.js} +1 -1
- package/dist/{jszip.min-Danu3otn.js → jszip.min-D8NeBCPG.js} +353 -353
- package/dist/{menu-D1PHF11v.js → menu-DVdMR0zo.js} +1 -1
- package/dist/{menuV2-BfvbnMWo.js → menuV2-CcBdUc80.js} +73 -73
- package/dist/mf-menu.css +1 -1
- package/dist/{priceTier-DszOAydN.js → priceTier-CTfRyTuS.js} +1 -1
- package/dist/{scheduler-BbQrleYX.js → scheduler-DOMDX4d7.js} +20 -20
- package/dist/{subcategory-BnW2z6Vy.js → subcategory-NsslZ1my.js} +6 -6
- package/dist/{toExcel-De8V6KyO.js → toExcel-Bdne-Dw_.js} +2 -2
- package/dist/{unit-BjQ-Hi7b.js → unit-DKyvdauo.js} +29 -29
- package/package.json +1 -1
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BRmrp3_3.js +0 -6038
- package/dist/item-Cq7YkZBk.js +0 -7685
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { createElementBlock as b, openBlock as i, createElementVNode as F, defineComponent as ae, ref as
|
|
2
|
-
import { u as le,
|
|
1
|
+
import { createElementBlock as b, openBlock as i, createElementVNode as F, defineComponent as ae, ref as A, computed as j, resolveComponent as x, createBlock as U, unref as u, withCtx as B, createVNode as y, toDisplayString as T, Fragment as z, renderList as X, createCommentVNode as J, withModifiers as oe, watch as re, renderSlot as pe } from "vue";
|
|
2
|
+
import { u as le, A as ue, I as ee, a3 as ve, J as ie } from "./index.vue_vue_type_script_setup_true_lang-BvohjQ00.js";
|
|
3
3
|
import { useI18n as se, ItemSelector as fe } from "@feedmepos/mf-common";
|
|
4
4
|
import { components as de, FmButtonVariant as Z } from "@feedmepos/ui-library";
|
|
5
5
|
import { u as _e } from "./discardConfirm-BHni0LNu.js";
|
|
6
|
-
import { u as ye } from "./menuV2-
|
|
7
|
-
import { m as O, g as Re, h as be, b as ge, u as he, f as te } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { u as ye } from "./menuV2-CcBdUc80.js";
|
|
7
|
+
import { m as O, g as Re, h as be, b as ge, u as he, f as te } from "./RuleView.vue_vue_type_script_setup_true_lang-DSfiVSBV.js";
|
|
8
8
|
import { c as Ce } from "./check-C9mY6LiX.js";
|
|
9
9
|
/* empty css */
|
|
10
10
|
const ce = (R, L) => {
|
|
@@ -12,13 +12,13 @@ const ce = (R, L) => {
|
|
|
12
12
|
for (const [D, d] of L)
|
|
13
13
|
o[D] = d;
|
|
14
14
|
return o;
|
|
15
|
-
},
|
|
16
|
-
function
|
|
15
|
+
}, Ae = {};
|
|
16
|
+
function ke(R, L) {
|
|
17
17
|
return i(), b("div", null, L[0] || (L[0] = [
|
|
18
18
|
F("div", { class: "h-px w-full bg-fm-color-neutral-gray-100" }, null, -1)
|
|
19
19
|
]));
|
|
20
20
|
}
|
|
21
|
-
const Fe = /* @__PURE__ */ ce(
|
|
21
|
+
const Fe = /* @__PURE__ */ ce(Ae, [["render", ke]]), Ie = { class: "flex items-center gap-24" }, we = { key: 0 }, Ve = { key: 1 }, xe = { class: "flex flex-col gap-24 h-full" }, $e = { class: "flex flex-col gap-24 overflow-y-auto flex-1" }, Se = { class: "flex flex-col gap-16" }, Ne = { class: "text-fm-color-typo-primary fm-typo-en-body-lg-600" }, Ge = { class: "flex justify-between" }, Oe = { class: "text-fm-color-neutral-gray-400 fm-typo-en-body-lg-600" }, De = { key: 0 }, Me = {
|
|
22
22
|
key: 0,
|
|
23
23
|
class: "text-fm-color-neutral-gray-300 p-16 ml-16"
|
|
24
24
|
}, Be = { class: "flex justify-end gap-16" }, Le = /* @__PURE__ */ ae({
|
|
@@ -47,12 +47,12 @@ const Fe = /* @__PURE__ */ ce(ke, [["render", Ae]]), Ie = { class: "flex items-c
|
|
|
47
47
|
},
|
|
48
48
|
emits: ["update:modelValue", "close-form"],
|
|
49
49
|
setup(R, { emit: L }) {
|
|
50
|
-
const { t: o } = se(), D = R, d =
|
|
50
|
+
const { t: o } = se(), D = R, d = A(!0), $ = L, q = A(D.orderFrom), g = A(""), C = A(
|
|
51
51
|
D.existingRuleGroups.reduce(
|
|
52
52
|
(r, s) => (r[s.id] = !0, r),
|
|
53
53
|
{}
|
|
54
54
|
)
|
|
55
|
-
), w =
|
|
55
|
+
), w = A({}), P = j(
|
|
56
56
|
() => {
|
|
57
57
|
var r;
|
|
58
58
|
return (((r = le().state.menu.ruleGroupSettings) == null ? void 0 : r.groups) || []).map((s) => ({
|
|
@@ -60,7 +60,7 @@ const Fe = /* @__PURE__ */ ce(ke, [["render", Ae]]), Ie = { class: "flex items-c
|
|
|
60
60
|
value: s._id
|
|
61
61
|
}));
|
|
62
62
|
}
|
|
63
|
-
), V =
|
|
63
|
+
), V = j(() => {
|
|
64
64
|
const r = P.value;
|
|
65
65
|
if (g.value) {
|
|
66
66
|
const s = g.value.toLowerCase(), n = r.filter((a) => C.value[a.value]), v = r.filter(
|
|
@@ -72,7 +72,7 @@ const Fe = /* @__PURE__ */ ce(ke, [["render", Ae]]), Ie = { class: "flex items-c
|
|
|
72
72
|
const v = C.value[s.value] || !1, a = C.value[n.value] || !1;
|
|
73
73
|
return v && !a ? -1 : !v && a ? 1 : 0;
|
|
74
74
|
});
|
|
75
|
-
}),
|
|
75
|
+
}), Y = j(() => {
|
|
76
76
|
var n;
|
|
77
77
|
const r = Object.entries(C.value).filter(([v, a]) => a).map(([v]) => v), s = ((n = le().state.menu.ruleGroupSettings) == null ? void 0 : n.groups) || [];
|
|
78
78
|
return r.map((v) => {
|
|
@@ -80,13 +80,13 @@ const Fe = /* @__PURE__ */ ce(ke, [["render", Ae]]), Ie = { class: "flex items-c
|
|
|
80
80
|
return {
|
|
81
81
|
...a,
|
|
82
82
|
rules: (a == null ? void 0 : a.rules.map((p) => {
|
|
83
|
-
var
|
|
83
|
+
var k, S, N, _;
|
|
84
84
|
return {
|
|
85
85
|
...p,
|
|
86
86
|
_id: p._id,
|
|
87
87
|
restaurantRule: {
|
|
88
88
|
restaurantAttributes: O(
|
|
89
|
-
(
|
|
89
|
+
(k = p.restaurantRule) == null ? void 0 : k.restaurantAttributes
|
|
90
90
|
),
|
|
91
91
|
restaurantCustomAttributes: O(
|
|
92
92
|
(S = p.restaurantRule) == null ? void 0 : S.restaurantCustomAttributes
|
|
@@ -102,10 +102,10 @@ const Fe = /* @__PURE__ */ ce(ke, [["render", Ae]]), Ie = { class: "flex items-c
|
|
|
102
102
|
})) || []
|
|
103
103
|
};
|
|
104
104
|
}).filter((v) => v !== null);
|
|
105
|
-
}), c =
|
|
105
|
+
}), c = A([]);
|
|
106
106
|
function h(r) {
|
|
107
|
-
var p,
|
|
108
|
-
const s = ((p = r.restaurantRule) == null ? void 0 : p.restaurantAttributes.rules) ?? [], n = ((
|
|
107
|
+
var p, k, S, N;
|
|
108
|
+
const s = ((p = r.restaurantRule) == null ? void 0 : p.restaurantAttributes.rules) ?? [], n = ((k = r.restaurantRule) == null ? void 0 : k.restaurantCustomAttributes.rules) ?? [], v = ((S = r.itemRule) == null ? void 0 : S.itemAttributes.rules) ?? [], a = ((N = r.itemRule) == null ? void 0 : N.itemCustomAttributes.rules) ?? [];
|
|
109
109
|
return [
|
|
110
110
|
...s.map((_) => ({
|
|
111
111
|
..._,
|
|
@@ -126,7 +126,7 @@ const Fe = /* @__PURE__ */ ce(ke, [["render", Ae]]), Ie = { class: "flex items-c
|
|
|
126
126
|
];
|
|
127
127
|
}
|
|
128
128
|
function I() {
|
|
129
|
-
var
|
|
129
|
+
var k, S, N, _, W, m, t, l;
|
|
130
130
|
const r = D.groupCustomRule, s = Object.entries(C.value).filter(([e, G]) => G).map(([e]) => e), n = [], v = [], a = [], p = [];
|
|
131
131
|
c.value.length > 0 && (c.value.forEach((e) => {
|
|
132
132
|
e.property.startsWith("restaurant_attr") ? n.push({
|
|
@@ -152,7 +152,7 @@ const Fe = /* @__PURE__ */ ce(ke, [["render", Ae]]), Ie = { class: "flex items-c
|
|
|
152
152
|
});
|
|
153
153
|
}), r.restaurantRule = {
|
|
154
154
|
restaurantAttributes: {
|
|
155
|
-
logic: ((S = (
|
|
155
|
+
logic: ((S = (k = r.restaurantRule) == null ? void 0 : k.restaurantAttributes) == null ? void 0 : S.logic) ?? "AND",
|
|
156
156
|
rules: n
|
|
157
157
|
},
|
|
158
158
|
restaurantCustomAttributes: {
|
|
@@ -179,7 +179,7 @@ const Fe = /* @__PURE__ */ ce(ke, [["render", Ae]]), Ie = { class: "flex items-c
|
|
|
179
179
|
d.value = !1, $("close-form");
|
|
180
180
|
}
|
|
181
181
|
return (r, s) => {
|
|
182
|
-
const n = x("FmButton"), v = x("FmRadio"), a = x("FmRadioGroup"), p = x("FmIcon"),
|
|
182
|
+
const n = x("FmButton"), v = x("FmRadio"), a = x("FmRadioGroup"), p = x("FmIcon"), k = x("FmCard"), S = x("FmSearch"), N = x("FmMenuItem"), _ = x("FmMenu"), W = x("FmSideSheet");
|
|
183
183
|
return i(), U(W, {
|
|
184
184
|
modelValue: d.value,
|
|
185
185
|
"onUpdate:modelValue": s[3] || (s[3] = (m) => d.value = m),
|
|
@@ -242,10 +242,10 @@ const Fe = /* @__PURE__ */ ce(ke, [["render", Ae]]), Ie = { class: "flex items-c
|
|
|
242
242
|
F("div", $e, [
|
|
243
243
|
F("div", Se, [
|
|
244
244
|
F("p", Ne, T(u(o)("menu.link_product.rules.use_rule_group")), 1),
|
|
245
|
-
(i(!0), b(
|
|
245
|
+
(i(!0), b(z, null, X(Y.value, (m) => (i(), b("div", {
|
|
246
246
|
key: m._id
|
|
247
247
|
}, [
|
|
248
|
-
y(
|
|
248
|
+
y(k, {
|
|
249
249
|
variant: "outlined",
|
|
250
250
|
class: "p-24 gap-24 space-y-16"
|
|
251
251
|
}, {
|
|
@@ -258,19 +258,19 @@ const Fe = /* @__PURE__ */ ce(ke, [["render", Ae]]), Ie = { class: "flex items-c
|
|
|
258
258
|
}, null, 8, ["name", "onClick"])
|
|
259
259
|
]),
|
|
260
260
|
w.value[m._id] ? (i(), b("div", De, [
|
|
261
|
-
(i(!0), b(
|
|
261
|
+
(i(!0), b(z, null, X(m.rules, (t, l) => (i(), b("div", {
|
|
262
262
|
key: t._id
|
|
263
263
|
}, [
|
|
264
|
-
(i(!0), b(
|
|
264
|
+
(i(!0), b(z, null, X(h(t), (e, G) => (i(), U(Re, {
|
|
265
265
|
key: G,
|
|
266
266
|
number: G + 1,
|
|
267
267
|
property: e.property,
|
|
268
268
|
operator: e.operator,
|
|
269
269
|
value: e.value
|
|
270
270
|
}, null, 8, ["number", "property", "operator", "value"]))), 128)),
|
|
271
|
-
l < m.rules.length - 1 ? (i(), b("p", Me, T(u(o)("menu.link_product.rules.or")), 1)) :
|
|
271
|
+
l < m.rules.length - 1 ? (i(), b("p", Me, T(u(o)("menu.link_product.rules.or")), 1)) : J("", !0)
|
|
272
272
|
]))), 128))
|
|
273
|
-
])) :
|
|
273
|
+
])) : J("", !0)
|
|
274
274
|
]),
|
|
275
275
|
_: 2
|
|
276
276
|
}, 1024)
|
|
@@ -290,7 +290,7 @@ const Fe = /* @__PURE__ */ ce(ke, [["render", Ae]]), Ie = { class: "flex items-c
|
|
|
290
290
|
class: "w-[200px]",
|
|
291
291
|
placeholder: u(o)("menu.link_product.rules.filter_result")
|
|
292
292
|
}, null, 8, ["model-value", "placeholder"]),
|
|
293
|
-
(i(!0), b(
|
|
293
|
+
(i(!0), b(z, null, X(V.value, (m) => (i(), U(N, {
|
|
294
294
|
key: m.value,
|
|
295
295
|
label: m.label,
|
|
296
296
|
"has-checkbox": "",
|
|
@@ -347,7 +347,7 @@ const Fe = /* @__PURE__ */ ce(ke, [["render", Ae]]), Ie = { class: "flex items-c
|
|
|
347
347
|
}) {
|
|
348
348
|
const {
|
|
349
349
|
t: D
|
|
350
|
-
} = se(), d = R, $ = o, q =
|
|
350
|
+
} = se(), d = R, $ = o, q = j(() => {
|
|
351
351
|
var c;
|
|
352
352
|
return ((c = le().state.menu.ruleGroupSettings) == null ? void 0 : c.groups) || [];
|
|
353
353
|
});
|
|
@@ -359,7 +359,7 @@ const Fe = /* @__PURE__ */ ce(ke, [["render", Ae]]), Ie = { class: "flex items-c
|
|
|
359
359
|
id: h,
|
|
360
360
|
name: f,
|
|
361
361
|
rules: I.map((n) => {
|
|
362
|
-
var v, a, p,
|
|
362
|
+
var v, a, p, k;
|
|
363
363
|
return {
|
|
364
364
|
...n,
|
|
365
365
|
restaurantRule: {
|
|
@@ -368,18 +368,18 @@ const Fe = /* @__PURE__ */ ce(ke, [["render", Ae]]), Ie = { class: "flex items-c
|
|
|
368
368
|
},
|
|
369
369
|
itemRule: {
|
|
370
370
|
itemAttributes: d.convertCategoryIdToName(O((p = n.itemRule) == null ? void 0 : p.itemAttributes)),
|
|
371
|
-
itemCustomAttributes: O((
|
|
371
|
+
itemCustomAttributes: O((k = n.itemRule) == null ? void 0 : k.itemCustomAttributes)
|
|
372
372
|
}
|
|
373
373
|
};
|
|
374
374
|
})
|
|
375
375
|
};
|
|
376
376
|
});
|
|
377
377
|
}
|
|
378
|
-
const C =
|
|
378
|
+
const C = A(g(d.modelValue.ruleGroupIds ?? [])), w = A({
|
|
379
379
|
_id: "customRule",
|
|
380
380
|
restaurantRule: d.modelValue.restaurantRule,
|
|
381
381
|
itemRule: d.modelValue.itemRule
|
|
382
|
-
}), P =
|
|
382
|
+
}), P = A(d.modelValue.orderFrom);
|
|
383
383
|
re(() => d.modelValue, (c) => {
|
|
384
384
|
C.value = g(c.ruleGroupIds ?? []), w.value = {
|
|
385
385
|
_id: "customRule",
|
|
@@ -389,13 +389,13 @@ const Fe = /* @__PURE__ */ ce(ke, [["render", Ae]]), Ie = { class: "flex items-c
|
|
|
389
389
|
}, {
|
|
390
390
|
deep: !0
|
|
391
391
|
});
|
|
392
|
-
const V =
|
|
392
|
+
const V = A(d.showForm);
|
|
393
393
|
L({
|
|
394
394
|
showForm: V
|
|
395
395
|
}), re(() => V.value, (c, h) => {
|
|
396
396
|
d.isDraft && h === !0 && c === !1 && $("delete-rule");
|
|
397
397
|
});
|
|
398
|
-
function
|
|
398
|
+
function Y(c) {
|
|
399
399
|
P.value = c.orderFrom, w.value.restaurantRule = c.restaurantRule, w.value.itemRule = c.itemRule, C.value = g(c.ruleGroupIds ?? []), $("update:model-value", c);
|
|
400
400
|
}
|
|
401
401
|
return (c, h) => V.value ? (i(), U(Le, {
|
|
@@ -406,7 +406,7 @@ const Fe = /* @__PURE__ */ ce(ke, [["render", Ae]]), Ie = { class: "flex items-c
|
|
|
406
406
|
"group-custom-rule": w.value,
|
|
407
407
|
"convert-category-id-to-name": R.convertCategoryIdToName,
|
|
408
408
|
onCloseForm: h[2] || (h[2] = (I) => V.value = !1),
|
|
409
|
-
"onUpdate:modelValue": h[3] || (h[3] = (I) =>
|
|
409
|
+
"onUpdate:modelValue": h[3] || (h[3] = (I) => Y(I))
|
|
410
410
|
}, null, 8, ["is-edit-mode", "order-from", "existing-rule-groups", "group-custom-rule", "convert-category-id-to-name"])) : (i(), U(ge, {
|
|
411
411
|
key: 0,
|
|
412
412
|
"model-value": w.value,
|
|
@@ -423,13 +423,13 @@ var M = /* @__PURE__ */ ((R) => (R[R.Normal = 0] = "Normal", R[R.Rules = 1] = "R
|
|
|
423
423
|
const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
424
424
|
key: 1,
|
|
425
425
|
class: "flex items-center gap-12"
|
|
426
|
-
}, Ue = { class: "flex items-center gap-8" }, qe = { class: "text-neutral-600 fm-typo-body-sm" },
|
|
426
|
+
}, Ue = { class: "flex items-center gap-8" }, qe = { class: "text-neutral-600 fm-typo-body-sm" }, je = {
|
|
427
427
|
key: 1,
|
|
428
428
|
class: "space-y-16"
|
|
429
|
-
},
|
|
429
|
+
}, ze = { class: "flex-1 relative border border-fm-color-neutral-gray-200 rounded-md p-16" }, Pe = { class: "absolute -top-[10px] left-[50px] bg-white px-2 fm-typo-en-body-lg-400 text-fm-color-typo-secondary select-none z-10" }, We = {
|
|
430
430
|
key: 0,
|
|
431
431
|
class: "flex items-center select-none"
|
|
432
|
-
}, He = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Qe = { class: "flex gap-8 items-center justify-start" },
|
|
432
|
+
}, He = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Qe = { class: "flex gap-8 items-center justify-start" }, Je = /* @__PURE__ */ ae({
|
|
433
433
|
__name: "LinkProductSideSheet",
|
|
434
434
|
props: {
|
|
435
435
|
initialValue: { default: () => [] },
|
|
@@ -447,22 +447,22 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
447
447
|
},
|
|
448
448
|
emits: ["submit"],
|
|
449
449
|
setup(R, { emit: L }) {
|
|
450
|
-
const o = R, D = L, { t: d } = se(), $ =
|
|
450
|
+
const o = R, D = L, { t: d } = se(), $ = A(M.Normal);
|
|
451
451
|
function q(t) {
|
|
452
452
|
$.value = t;
|
|
453
453
|
}
|
|
454
|
-
const g =
|
|
454
|
+
const g = A(!1), C = (t) => {
|
|
455
455
|
Ce.isBoolean(t) ? g.value = t : g.value = !g.value;
|
|
456
456
|
};
|
|
457
457
|
function w(t) {
|
|
458
458
|
return t.reduce((l, e) => (l[e._id] = [...l[e._id] ?? [], e], l), {});
|
|
459
459
|
}
|
|
460
|
-
const P = o.initialValue, V =
|
|
461
|
-
menuItems:
|
|
462
|
-
categories:
|
|
463
|
-
}), I =
|
|
460
|
+
const P = o.initialValue, V = A(w(ee(P))), Y = j(() => Object.values(V.value).flatMap((t) => t)), { convertCategoryIdToName: c, convertCategoryNameToId: h } = he({
|
|
461
|
+
menuItems: j(() => o.menuItems || []),
|
|
462
|
+
categories: j(() => o.categories || [])
|
|
463
|
+
}), I = A(
|
|
464
464
|
ee(o.linkItemRules)
|
|
465
|
-
), f =
|
|
465
|
+
), f = A();
|
|
466
466
|
function r() {
|
|
467
467
|
var t;
|
|
468
468
|
return (t = I.value) == null ? void 0 : t.map((l) => {
|
|
@@ -513,7 +513,7 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
513
513
|
linkItemRules: s() ?? []
|
|
514
514
|
}) : D("submit", {
|
|
515
515
|
mode: M.Normal,
|
|
516
|
-
items:
|
|
516
|
+
items: Y.value
|
|
517
517
|
}), g.value = !1;
|
|
518
518
|
}
|
|
519
519
|
re(
|
|
@@ -522,7 +522,7 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
522
522
|
V.value = w(ee(o.initialValue)), I.value = ee(o.linkItemRules), f.value = r(), a.value = null, p.value = !1, $.value = o.noScheduler && o.linkItemRules && o.linkItemRules.length > 0 ? M.Rules : M.Normal;
|
|
523
523
|
}
|
|
524
524
|
);
|
|
525
|
-
const a =
|
|
525
|
+
const a = A(null), p = A(!1), k = () => {
|
|
526
526
|
a.value = {
|
|
527
527
|
orderFrom: ue.F_ORDER_FROM.enum.ALL,
|
|
528
528
|
restaurantRule: {
|
|
@@ -546,7 +546,7 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
546
546
|
const l = [...f.value];
|
|
547
547
|
l.splice(t, 1), f.value = l.length ? l : [];
|
|
548
548
|
}
|
|
549
|
-
const W =
|
|
549
|
+
const W = j(() => {
|
|
550
550
|
const t = o.isLocalOnly ? ye() : le();
|
|
551
551
|
return o.noScheduler && t.currentCatalog;
|
|
552
552
|
});
|
|
@@ -557,7 +557,7 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
557
557
|
}
|
|
558
558
|
return (t, l) => {
|
|
559
559
|
const e = x("fm-button"), G = x("fm-switch"), H = x("FmCard"), Q = x("fm-side-sheet");
|
|
560
|
-
return i(), b(
|
|
560
|
+
return i(), b(z, null, [
|
|
561
561
|
pe(t.$slots, "default", { trigger: C }, void 0, !0),
|
|
562
562
|
y(Q, {
|
|
563
563
|
id: "group-form",
|
|
@@ -573,7 +573,7 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
573
573
|
"onOn:clickedAway": u(n)
|
|
574
574
|
}, {
|
|
575
575
|
"side-sheet-header": B(() => [
|
|
576
|
-
t.useCloseBtn ?
|
|
576
|
+
t.useCloseBtn ? J("", !0) : (i(), U(e, {
|
|
577
577
|
key: 0,
|
|
578
578
|
variant: u(Z).Tertiary,
|
|
579
579
|
class: "cursor-pointer mr-4",
|
|
@@ -589,7 +589,7 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
589
589
|
"onUpdate:modelValue": l[0] || (l[0] = (E) => q(E ? u(M).Rules : u(M).Normal))
|
|
590
590
|
}, null, 8, ["label", "model-value"])
|
|
591
591
|
])
|
|
592
|
-
])) :
|
|
592
|
+
])) : J("", !0)
|
|
593
593
|
]),
|
|
594
594
|
"side-sheet-footer": B(() => [
|
|
595
595
|
F("div", Qe, [
|
|
@@ -618,11 +618,11 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
618
618
|
"categorized-items": t.categorizedItems,
|
|
619
619
|
data: V.value,
|
|
620
620
|
"select-variant": t.selectVariant,
|
|
621
|
-
"selected-items":
|
|
621
|
+
"selected-items": Y.value,
|
|
622
622
|
"show-variant": t.showVariant,
|
|
623
623
|
"show-addon": t.showAddon,
|
|
624
624
|
"onUpdate:data": l[1] || (l[1] = (E) => V.value = E)
|
|
625
|
-
}, null, 8, ["categorized-items", "data", "select-variant", "selected-items", "show-variant", "show-addon"])) : W.value ? (i(), b(
|
|
625
|
+
}, null, 8, ["categorized-items", "data", "select-variant", "selected-items", "show-variant", "show-addon"])) : W.value ? (i(), b(z, { key: 1 }, [
|
|
626
626
|
F("p", qe, T(u(d)("menu.link_product.rules.hint")), 1),
|
|
627
627
|
(!f.value || f.value.length <= 0) && !p.value ? (i(), U(u(ve), {
|
|
628
628
|
key: 0,
|
|
@@ -631,9 +631,9 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
631
631
|
action: {
|
|
632
632
|
text: u(d)("menu.link_product.rules.add_rule"),
|
|
633
633
|
icon: "add",
|
|
634
|
-
callback:
|
|
634
|
+
callback: k
|
|
635
635
|
}
|
|
636
|
-
}, null, 8, ["title", "subtitle", "action"])) : (i(), b("div",
|
|
636
|
+
}, null, 8, ["title", "subtitle", "action"])) : (i(), b("div", je, [
|
|
637
637
|
p.value && a.value ? (i(), U(H, {
|
|
638
638
|
key: 0,
|
|
639
639
|
class: "p-16 space-y-16",
|
|
@@ -654,9 +654,9 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
654
654
|
];
|
|
655
655
|
}),
|
|
656
656
|
_: 1
|
|
657
|
-
})) :
|
|
658
|
-
(i(!0), b(
|
|
659
|
-
F("div",
|
|
657
|
+
})) : J("", !0),
|
|
658
|
+
(i(!0), b(z, null, X(f.value, (E, K) => (i(), b(z, { key: K }, [
|
|
659
|
+
F("div", ze, [
|
|
660
660
|
F("span", Pe, T(u(d)("menu.rule_groups.condition_view.and")), 1),
|
|
661
661
|
y(me, {
|
|
662
662
|
"model-value": E,
|
|
@@ -668,14 +668,14 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
668
668
|
]),
|
|
669
669
|
f.value && f.value.length > 1 && K < f.value.length - 1 ? (i(), b("div", We, [
|
|
670
670
|
F("span", He, T(u(d)("menu.rule_groups.condition_view.or")), 1)
|
|
671
|
-
])) :
|
|
671
|
+
])) : J("", !0)
|
|
672
672
|
], 64))), 128)),
|
|
673
673
|
y(e, {
|
|
674
674
|
label: u(d)("menu.link_product.rules.add_rule"),
|
|
675
|
-
onClick:
|
|
675
|
+
onClick: k
|
|
676
676
|
}, null, 8, ["label"])
|
|
677
677
|
]))
|
|
678
|
-
], 64)) :
|
|
678
|
+
], 64)) : J("", !0)
|
|
679
679
|
]))
|
|
680
680
|
]),
|
|
681
681
|
_: 1
|
|
@@ -683,7 +683,7 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
683
683
|
], 64);
|
|
684
684
|
};
|
|
685
685
|
}
|
|
686
|
-
}), rt = /* @__PURE__ */ ce(
|
|
686
|
+
}), rt = /* @__PURE__ */ ce(Je, [["__scopeId", "data-v-60163177"]]);
|
|
687
687
|
export {
|
|
688
688
|
Fe as H,
|
|
689
689
|
rt as L,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent as X, ref as C, computed as $, watch as j, resolveComponent as g, createBlock as L, openBlock as d, unref as t, withCtx as y, createElementVNode as r, createVNode as u, createElementBlock as h, Fragment as q, renderList as Y, createCommentVNode as B, toDisplayString as A, withModifiers as oe } from "vue";
|
|
2
|
-
import { u as Z,
|
|
2
|
+
import { u as Z, J as K, a3 as ae, G as ne, B as re, I as le } from "./index.vue_vue_type_script_setup_true_lang-BvohjQ00.js";
|
|
3
3
|
import { useI18n as ee, useCoreStore as ie } from "@feedmepos/mf-common";
|
|
4
4
|
import { components as te, FmButtonVariant as N, useDialog as ce, useSnackbar as ue, useBreakpoints as me, FmButtonColorThemeVariant as W } from "@feedmepos/ui-library";
|
|
5
|
-
import { u as de, m as E, _ as Q, b as pe, c as _e, f as P } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import { _ as se } from "./app-
|
|
5
|
+
import { u as de, m as E, _ as Q, b as pe, c as _e, f as P } from "./RuleView.vue_vue_type_script_setup_true_lang-DSfiVSBV.js";
|
|
6
|
+
import { _ as se } from "./app-CPJH5bgs.js";
|
|
7
7
|
import { u as ve } from "./discardConfirm-BHni0LNu.js";
|
|
8
8
|
import { _ as fe } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
9
|
-
import { C as z, a as M } from "./catalogSetting-
|
|
10
|
-
import { u as ge } from "./priceTier-
|
|
9
|
+
import { C as z, a as M } from "./catalogSetting-DjGqI2Vf.js";
|
|
10
|
+
import { u as ge } from "./priceTier-CTfRyTuS.js";
|
|
11
11
|
const be = {
|
|
12
12
|
class: "fm-typo-en-title-md-600 mr-auto"
|
|
13
13
|
}, ye = {
|
|
@@ -34,10 +34,10 @@ const be = {
|
|
|
34
34
|
editingGroup: {}
|
|
35
35
|
},
|
|
36
36
|
emits: ["update:modelValue", "submit"],
|
|
37
|
-
setup(
|
|
37
|
+
setup(J, {
|
|
38
38
|
emit: n
|
|
39
39
|
}) {
|
|
40
|
-
const x =
|
|
40
|
+
const x = J, G = n, {
|
|
41
41
|
t: i
|
|
42
42
|
} = ee(), T = Z(), l = C({
|
|
43
43
|
name: "",
|
|
@@ -198,8 +198,8 @@ const be = {
|
|
|
198
198
|
}, [r("div", xe, [r("div", ke, [u(pe, {
|
|
199
199
|
"model-value": o,
|
|
200
200
|
title: `${t(i)("menu.rule_groups.condition_view.rule")} ${O + 1}`,
|
|
201
|
-
"onUpdate:modelValue": e[3] || (e[3] = (
|
|
202
|
-
onDeleteRule: e[4] || (e[4] = (
|
|
201
|
+
"onUpdate:modelValue": e[3] || (e[3] = (H) => c(H)),
|
|
202
|
+
onDeleteRule: e[4] || (e[4] = (H) => D(H))
|
|
203
203
|
}, null, 8, ["model-value", "title"])])]), l.value.rules.length > 1 && O < l.value.rules.length - 1 ? (d(), h("div", Se, [r("span", we, A(t(i)("menu.rule_groups.condition_view.or")), 1)])) : B("", !0)], 64))), 128)) : (d(), L(ae, {
|
|
204
204
|
key: 1,
|
|
205
205
|
title: "",
|
|
@@ -268,7 +268,7 @@ const be = {
|
|
|
268
268
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
269
269
|
}, Le = /* @__PURE__ */ X({
|
|
270
270
|
__name: "LinkProductRuleGroups",
|
|
271
|
-
setup(
|
|
271
|
+
setup(J) {
|
|
272
272
|
const {
|
|
273
273
|
t: n
|
|
274
274
|
} = ee(), x = ce(), G = ue(), i = ne(G), T = Z(), l = C(T.state.menu.ruleGroupSettings || {
|
|
@@ -411,15 +411,15 @@ const be = {
|
|
|
411
411
|
class: "space-y-8"
|
|
412
412
|
}, Qe = {
|
|
413
413
|
class: "flex items-center justify-between"
|
|
414
|
-
}, He = {
|
|
415
|
-
class: "fm-typo-en-title-md-600"
|
|
416
414
|
}, Je = {
|
|
415
|
+
class: "fm-typo-en-title-md-600"
|
|
416
|
+
}, He = {
|
|
417
417
|
class: "text-fm-color-typo-secondary"
|
|
418
418
|
}, We = {
|
|
419
419
|
key: 2
|
|
420
420
|
}, at = /* @__PURE__ */ X({
|
|
421
421
|
__name: "MenuSetting",
|
|
422
|
-
setup(
|
|
422
|
+
setup(J) {
|
|
423
423
|
var I;
|
|
424
424
|
const {
|
|
425
425
|
t: n
|
|
@@ -557,7 +557,7 @@ const be = {
|
|
|
557
557
|
}, 8, ["title", "sub-title"]), u(F, {
|
|
558
558
|
onClick: U,
|
|
559
559
|
label: t(n)("common.save")
|
|
560
|
-
}, null, 8, ["label"])])) : B("", !0), b.value === "price-group" ? (d(), h("div", qe, [r("div", Ke, [r("div", Qe, [r("div", null, [r("h1",
|
|
560
|
+
}, null, 8, ["label"])])) : B("", !0), b.value === "price-group" ? (d(), h("div", qe, [r("div", Ke, [r("div", Qe, [r("div", null, [r("h1", Je, A(t(n)("menu.price_tier.price_group")), 1), r("p", He, A(t(n)("menu.price_tier.description")), 1)]), u(F, {
|
|
561
561
|
label: t(n)("menu.price_tier.add_price_group"),
|
|
562
562
|
icon: "add",
|
|
563
563
|
onClick: t(w).create
|