@feedmepos/mf-menu 0.32.11 → 0.32.12-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-DBzzNtOz.js → App-D0JZMDPU.js} +15 -11
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-B-G2CkNd.js → ApplyProduct.vue_vue_type_script_setup_true_lang-C5fI7pDt.js} +3 -3
- package/dist/{Catalog-Bk0-WOLO.js → Catalog-BIVVmu4F.js} +6 -6
- package/dist/{Category-DMeZzvSE.js → Category-Cmf6dD5G.js} +6 -6
- package/dist/{Category-CjzEbGsb.js → Category-DoEzIDPA.js} +4 -4
- package/dist/{CookingGuide-DbYc3Cfl.js → CookingGuide-DxQ5vDF5.js} +4 -4
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-BJGcVX-F.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-BQscJC6_.js} +1 -1
- package/dist/{Group-r4q289nx.js → Group-EAACXFDr.js} +1 -1
- package/dist/{Group-CT2Z4xqH.js → Group-l59a7MQy.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-B0SCStQ-.js → Group.vue_vue_type_script_setup_true_lang-CdIKM2jO.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BJhFBgJW.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CendqbFI.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-DYTv5BM4.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-B3I3jPxC.js} +838 -818
- package/dist/{Ingredient-DpzOxjyz.js → Ingredient-B7kPk3oV.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CDwwDvFJ.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CzpY9mWg.js} +2 -2
- package/dist/{LinkProductSideSheet-DP8Tt85O.js → LinkProductSideSheet-CeXhbGnn.js} +208 -213
- package/dist/{MenuSetting-Bo_acBpM.js → MenuSetting-CCtL2qui.js} +5 -5
- package/dist/{PrintRoute-BzQWNZOk.js → PrintRoute-DMLRAZJg.js} +4 -4
- package/dist/{Product-D3rlPErz.js → Product-BAcGhIEf.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-CpXUwuyv.js → Product.vue_vue_type_script_setup_true_lang-V8-_F7WQ.js} +14 -14
- package/dist/{ProductInternalTools-B8WKqf4C.js → ProductInternalTools-BrQwrwyG.js} +29 -30
- package/dist/{Products-BlOWSZHq.js → Products-O5YVYdlT.js} +11 -11
- package/dist/Publish-CtKo19_y.js +1262 -0
- package/dist/{Recipe-DvKvK1JQ.js → Recipe-ORx3rnvx.js} +4 -4
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-D6wJ6bmM.js → RuleView.vue_vue_type_script_setup_true_lang-biTDrokQ.js} +134 -134
- package/dist/{Scheduler-CCXzv_Jg.js → Scheduler-B7v3W8eG.js} +3 -3
- package/dist/{ServingSequence-DEI7xEig.js → ServingSequence-DczYH8BU.js} +3 -3
- package/dist/{Setting-BtrIoWRp.js → Setting-fNLED9R0.js} +5 -5
- package/dist/{Subcategory-C-jkWiXi.js → Subcategory-DjK1PTao.js} +4 -4
- package/dist/{Takeaway-BVCnRM7k.js → Takeaway-ChMYycO_.js} +1 -1
- package/dist/{Takeaway-C8gS9iQt.js → Takeaway-LjEJbd4e.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-C7dqTnCG.js → Takeaway.vue_vue_type_script_setup_true_lang-CMdZM60P.js} +5 -5
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-4H8EAGOJ.js → Thumbnail.vue_vue_type_script_setup_true_lang-Yh_aUxqS.js} +4 -4
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DduxF1Ag.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CEmOkHc5.js} +22 -21
- package/dist/{Unit-BxbmFQD_.js → Unit-DGZ9xVpM.js} +2 -2
- package/dist/{Variant-B68Xaj-J.js → Variant-CUasE1B5.js} +3 -3
- package/dist/{_id_-0kcwduix.js → _id_-CXV1a1UW.js} +10 -10
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/{app-85EPEeSX.js → app--9ZjQ_dH.js} +35 -35
- package/dist/{app-DrMIP4qZ.js → app-E7mszfIB.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/api/menu.d.ts +9 -3
- package/dist/apps/mf-menu/src/app.d.ts +47 -0
- package/dist/apps/mf-menu/src/components/ProgressBar.vue.d.ts +17 -0
- package/dist/apps/mf-menu/src/components/calender/DateTimePicker.vue.d.ts +73 -0
- package/dist/apps/mf-menu/src/components/calender/FmCalendar.vue.d.ts +80 -0
- package/dist/apps/mf-menu/src/components/calender/FmDateRangeYearMonthPicker.vue.d.ts +22 -0
- package/dist/apps/mf-menu/src/components/calender/FmTimeInput.vue.d.ts +26 -0
- package/dist/apps/mf-menu/src/components/calender/TimeInput.vue.d.ts +32 -0
- package/dist/apps/mf-menu/src/components/feature/Fields/ImageDropField.vue.d.ts +3 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/fmtree/FmTreeNode.vue.d.ts +1 -1
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/item/ItemForm.vue.d.ts +5 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/item/ProductDetail.vue.d.ts +5 -1
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/item/ProductPrice.vue.d.ts +5 -1
- package/dist/apps/mf-menu/src/stores/menu.d.ts +9 -2
- package/dist/apps/mf-menu/src/views/Catalog/Edit/AddProductPopup/ProductDetail.vue.d.ts +9 -1
- package/dist/apps/mf-menu/src/views/Catalog/Edit/AddProductPopup/ProductPrice.vue.d.ts +5 -1
- package/dist/apps/mf-menu/src/views/Publish/PublishProgressView.vue.d.ts +198 -0
- package/dist/apps/mf-menu/src/views/Publish/PublishRestaurantSelector.vue.d.ts +17 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-De5v2PDx.js → linked-status-Doclb1U6.js} +2 -2
- package/dist/assets/{override-menu-Da8T8Fc4.js → override-menu-BWkFILg4.js} +2 -2
- package/dist/assets/{validate-menu-NKr-0wgF.js → validate-menu-BS4T4zZm.js} +2 -2
- package/dist/{catalog-C8TlBQWJ.js → catalog-PkvD9BV_.js} +1 -1
- package/dist/{catalogSetting-Cse2nm1z.js → catalogSetting-Cd9aIJs2.js} +1 -1
- package/dist/{category-DMZ1qN2e.js → category-1NLh1OVo.js} +1 -1
- package/dist/{currency-D7kZQc5v.js → currency-J1RZcMOx.js} +1 -1
- package/dist/dayjs.min-CXjOYO85.js +6 -0
- package/dist/{index-CJAd1BfJ.js → index-BPpNi-Hh.js} +3 -3
- package/dist/{index-DiY_ybpd.js → index-BiCSP8Fy.js} +1 -1
- package/dist/{index-c0PFBGRc.js → index-CisutoS9.js} +1 -1
- package/dist/{index-CzRNw_5R.js → index-D9h3wl03.js} +4 -4
- package/dist/{index.vue_vue_type_script_setup_true_lang-BwiSDg0v.js → index.vue_vue_type_script_setup_true_lang-B3Eku0Ig.js} +4353 -4306
- package/dist/{item-DQ-PLLd3.js → item-Ctnd-m_D.js} +956 -925
- package/dist/{jszip.min-CdE2QmYk.js → jszip.min-Bwz_vC7R.js} +2 -2
- package/dist/{menu-BrTkChA4.js → menu-DpTANxng.js} +1 -1
- package/dist/{menuV2-KQK_QYUl.js → menuV2-BBMwj4p0.js} +24 -24
- package/dist/mf-menu.css +1 -1
- package/dist/{priceTier-eFksbE1O.js → priceTier-DAG2W_y3.js} +1 -1
- package/dist/{scheduler-ITBmHZcY.js → scheduler-DYuLkKsc.js} +4 -4
- package/dist/{subcategory-avnXHTTF.js → subcategory-BJ0oG92x.js} +2 -2
- package/dist/{toExcel-DnHxrsH-.js → toExcel-C5_3G21q.js} +2 -2
- package/dist/tooltip-B5BiPMx9.js +32 -0
- package/dist/{unit-Bik9h43k.js → unit-CNwmGzjU.js} +2 -2
- package/package.json +2 -3
- package/dist/Publish-y3naWYrP.js +0 -586
- package/dist/iteration-DFngntEJ.js +0 -27
- package/dist/tooltip-CQW9YRO5.js +0 -60
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
import { createElementBlock as
|
|
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-
|
|
1
|
+
import { createElementBlock as R, openBlock as i, createElementVNode as F, defineComponent as ae, ref as A, computed as j, resolveComponent as x, createBlock as T, unref as u, withCtx as M, createVNode as y, toDisplayString as E, 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-B3Eku0Ig.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 {
|
|
6
|
+
import { u as ye } from "./menuV2-BBMwj4p0.js";
|
|
7
|
+
import { _ as ce } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
+
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-biTDrokQ.js";
|
|
8
9
|
import { c as Ce } from "./check-C9mY6LiX.js";
|
|
9
10
|
/* empty css */
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
o[D] = d;
|
|
14
|
-
return o;
|
|
15
|
-
}, Ae = {};
|
|
16
|
-
function ke(R, L) {
|
|
17
|
-
return i(), b("div", null, L[0] || (L[0] = [
|
|
11
|
+
const Ae = {};
|
|
12
|
+
function ke(h, U) {
|
|
13
|
+
return i(), R("div", null, U[0] || (U[0] = [
|
|
18
14
|
F("div", { class: "h-px w-full bg-fm-color-neutral-gray-100" }, null, -1)
|
|
19
15
|
]));
|
|
20
16
|
}
|
|
@@ -46,143 +42,143 @@ const Fe = /* @__PURE__ */ ce(Ae, [["render", ke]]), Ie = { class: "flex items-c
|
|
|
46
42
|
}
|
|
47
43
|
},
|
|
48
44
|
emits: ["update:modelValue", "close-form"],
|
|
49
|
-
setup(
|
|
50
|
-
const { t:
|
|
51
|
-
|
|
52
|
-
(
|
|
45
|
+
setup(h, { emit: U }) {
|
|
46
|
+
const { t: a } = se(), L = h, v = A(!0), $ = U, q = A(L.orderFrom), b = A(""), C = A(
|
|
47
|
+
L.existingRuleGroups.reduce(
|
|
48
|
+
(o, s) => (o[s.id] = !0, o),
|
|
53
49
|
{}
|
|
54
50
|
)
|
|
55
51
|
), w = A({}), P = j(
|
|
56
52
|
() => {
|
|
57
|
-
var
|
|
58
|
-
return (((
|
|
53
|
+
var o;
|
|
54
|
+
return (((o = le().state.menu.ruleGroupSettings) == null ? void 0 : o.groups) || []).map((s) => ({
|
|
59
55
|
label: s.name,
|
|
60
56
|
value: s._id
|
|
61
57
|
}));
|
|
62
58
|
}
|
|
63
59
|
), V = j(() => {
|
|
64
|
-
const
|
|
65
|
-
if (
|
|
66
|
-
const s =
|
|
67
|
-
(
|
|
60
|
+
const o = P.value;
|
|
61
|
+
if (b.value) {
|
|
62
|
+
const s = b.value.toLowerCase(), n = o.filter((r) => C.value[r.value]), p = o.filter(
|
|
63
|
+
(r) => !C.value[r.value] && r.label.toLowerCase().includes(s)
|
|
68
64
|
);
|
|
69
|
-
return [...n, ...
|
|
65
|
+
return [...n, ...p];
|
|
70
66
|
}
|
|
71
|
-
return
|
|
72
|
-
const
|
|
73
|
-
return
|
|
67
|
+
return o.sort((s, n) => {
|
|
68
|
+
const p = C.value[s.value] || !1, r = C.value[n.value] || !1;
|
|
69
|
+
return p && !r ? -1 : !p && r ? 1 : 0;
|
|
74
70
|
});
|
|
75
71
|
}), Y = j(() => {
|
|
76
72
|
var n;
|
|
77
|
-
const
|
|
78
|
-
return
|
|
79
|
-
const
|
|
73
|
+
const o = Object.entries(C.value).filter(([p, r]) => r).map(([p]) => p), s = ((n = le().state.menu.ruleGroupSettings) == null ? void 0 : n.groups) || [];
|
|
74
|
+
return o.map((p) => {
|
|
75
|
+
const r = s.find((c) => c._id === p);
|
|
80
76
|
return {
|
|
81
|
-
...
|
|
82
|
-
rules: (
|
|
77
|
+
...r,
|
|
78
|
+
rules: (r == null ? void 0 : r.rules.map((c) => {
|
|
83
79
|
var k, S, N, _;
|
|
84
80
|
return {
|
|
85
|
-
...
|
|
86
|
-
_id:
|
|
81
|
+
...c,
|
|
82
|
+
_id: c._id,
|
|
87
83
|
restaurantRule: {
|
|
88
84
|
restaurantAttributes: O(
|
|
89
|
-
(k =
|
|
85
|
+
(k = c.restaurantRule) == null ? void 0 : k.restaurantAttributes
|
|
90
86
|
),
|
|
91
87
|
restaurantCustomAttributes: O(
|
|
92
|
-
(S =
|
|
88
|
+
(S = c.restaurantRule) == null ? void 0 : S.restaurantCustomAttributes
|
|
93
89
|
)
|
|
94
90
|
},
|
|
95
91
|
itemRule: {
|
|
96
|
-
itemAttributes:
|
|
97
|
-
O((N =
|
|
92
|
+
itemAttributes: L.convertCategoryIdToName(
|
|
93
|
+
O((N = c.itemRule) == null ? void 0 : N.itemAttributes)
|
|
98
94
|
),
|
|
99
|
-
itemCustomAttributes: O((_ =
|
|
95
|
+
itemCustomAttributes: O((_ = c.itemRule) == null ? void 0 : _.itemCustomAttributes)
|
|
100
96
|
}
|
|
101
97
|
};
|
|
102
98
|
})) || []
|
|
103
99
|
};
|
|
104
|
-
}).filter((
|
|
105
|
-
}),
|
|
106
|
-
function
|
|
107
|
-
var
|
|
108
|
-
const s = ((
|
|
100
|
+
}).filter((p) => p !== null);
|
|
101
|
+
}), d = A([]);
|
|
102
|
+
function g(o) {
|
|
103
|
+
var c, k, S, N;
|
|
104
|
+
const s = ((c = o.restaurantRule) == null ? void 0 : c.restaurantAttributes.rules) ?? [], n = ((k = o.restaurantRule) == null ? void 0 : k.restaurantCustomAttributes.rules) ?? [], p = ((S = o.itemRule) == null ? void 0 : S.itemAttributes.rules) ?? [], r = ((N = o.itemRule) == null ? void 0 : N.itemCustomAttributes.rules) ?? [];
|
|
109
105
|
return [
|
|
110
106
|
...s.map((_) => ({
|
|
111
107
|
..._,
|
|
112
|
-
property: `${
|
|
108
|
+
property: `${a("menu.catalog.usage.restaurant")} ${_.property}`
|
|
113
109
|
})),
|
|
114
110
|
...n.map((_) => ({
|
|
115
111
|
..._,
|
|
116
|
-
property: `${
|
|
112
|
+
property: `${a("menu.catalog.usage.restaurant")} ${_.property}`
|
|
117
113
|
})),
|
|
118
|
-
...
|
|
114
|
+
...p.map((_) => ({
|
|
119
115
|
..._,
|
|
120
|
-
property: `${
|
|
116
|
+
property: `${a("menu.product.title")} ${_.property}`
|
|
121
117
|
})),
|
|
122
|
-
...
|
|
118
|
+
...r.map((_) => ({
|
|
123
119
|
..._,
|
|
124
|
-
property: `${
|
|
120
|
+
property: `${a("menu.product.title")} ${_.property}`
|
|
125
121
|
}))
|
|
126
122
|
];
|
|
127
123
|
}
|
|
128
124
|
function I() {
|
|
129
125
|
var k, S, N, _, W, m, t, l;
|
|
130
|
-
const
|
|
131
|
-
|
|
126
|
+
const o = L.groupCustomRule, s = Object.entries(C.value).filter(([e, G]) => G).map(([e]) => e), n = [], p = [], r = [], c = [];
|
|
127
|
+
d.value.length > 0 && (d.value.forEach((e) => {
|
|
132
128
|
e.property.startsWith("restaurant_attr") ? n.push({
|
|
133
129
|
property: e.property.replace("restaurant_attr_", ""),
|
|
134
130
|
operator: e.operator,
|
|
135
131
|
value: e.value,
|
|
136
132
|
type: e.type
|
|
137
|
-
}) : e.property.startsWith("restaurant_custom") ?
|
|
133
|
+
}) : e.property.startsWith("restaurant_custom") ? p.push({
|
|
138
134
|
property: e.property.replace("restaurant_custom_", ""),
|
|
139
135
|
operator: e.operator,
|
|
140
136
|
value: e.value,
|
|
141
137
|
type: e.type
|
|
142
|
-
}) : e.property.startsWith("item_attr") ?
|
|
138
|
+
}) : e.property.startsWith("item_attr") ? r.push({
|
|
143
139
|
property: e.property.replace("item_attr_", ""),
|
|
144
140
|
operator: e.operator,
|
|
145
141
|
value: e.value,
|
|
146
142
|
type: e.type
|
|
147
|
-
}) : e.property.startsWith("item_custom") &&
|
|
143
|
+
}) : e.property.startsWith("item_custom") && c.push({
|
|
148
144
|
property: e.property.replace("item_custom_", ""),
|
|
149
145
|
operator: e.operator,
|
|
150
146
|
value: e.value,
|
|
151
147
|
type: e.type
|
|
152
148
|
});
|
|
153
|
-
}),
|
|
149
|
+
}), o.restaurantRule = {
|
|
154
150
|
restaurantAttributes: {
|
|
155
|
-
logic: ((S = (k =
|
|
151
|
+
logic: ((S = (k = o.restaurantRule) == null ? void 0 : k.restaurantAttributes) == null ? void 0 : S.logic) ?? "AND",
|
|
156
152
|
rules: n
|
|
157
153
|
},
|
|
158
154
|
restaurantCustomAttributes: {
|
|
159
|
-
logic: ((_ = (N =
|
|
160
|
-
rules:
|
|
155
|
+
logic: ((_ = (N = o.restaurantRule) == null ? void 0 : N.restaurantCustomAttributes) == null ? void 0 : _.logic) ?? "AND",
|
|
156
|
+
rules: p
|
|
161
157
|
}
|
|
162
|
-
},
|
|
158
|
+
}, o.itemRule = {
|
|
163
159
|
itemAttributes: {
|
|
164
|
-
logic: ((m = (W =
|
|
165
|
-
rules:
|
|
160
|
+
logic: ((m = (W = o.itemRule) == null ? void 0 : W.itemAttributes) == null ? void 0 : m.logic) ?? "AND",
|
|
161
|
+
rules: r
|
|
166
162
|
},
|
|
167
163
|
itemCustomAttributes: {
|
|
168
|
-
logic: ((l = (t =
|
|
169
|
-
rules:
|
|
164
|
+
logic: ((l = (t = o.itemRule) == null ? void 0 : t.itemCustomAttributes) == null ? void 0 : l.logic) ?? "AND",
|
|
165
|
+
rules: c
|
|
170
166
|
}
|
|
171
167
|
}), $("update:modelValue", {
|
|
172
168
|
orderFrom: q.value,
|
|
173
169
|
ruleGroupIds: s,
|
|
174
|
-
restaurantRule:
|
|
175
|
-
itemRule:
|
|
170
|
+
restaurantRule: o.restaurantRule,
|
|
171
|
+
itemRule: o.itemRule
|
|
176
172
|
}), f();
|
|
177
173
|
}
|
|
178
174
|
function f() {
|
|
179
|
-
|
|
175
|
+
v.value = !1, $("close-form");
|
|
180
176
|
}
|
|
181
|
-
return (
|
|
182
|
-
const n = x("FmButton"),
|
|
183
|
-
return i(),
|
|
184
|
-
modelValue:
|
|
185
|
-
"onUpdate:modelValue": s[3] || (s[3] = (m) =>
|
|
177
|
+
return (o, s) => {
|
|
178
|
+
const n = x("FmButton"), p = x("FmRadio"), r = x("FmRadioGroup"), c = x("FmIcon"), k = x("FmCard"), S = x("FmSearch"), N = x("FmMenuItem"), _ = x("FmMenu"), W = x("FmSideSheet");
|
|
179
|
+
return i(), T(W, {
|
|
180
|
+
modelValue: v.value,
|
|
181
|
+
"onUpdate:modelValue": s[3] || (s[3] = (m) => v.value = m),
|
|
186
182
|
"max-width": 760,
|
|
187
183
|
"close-button": !1,
|
|
188
184
|
"is-container": u(de).FmForm,
|
|
@@ -191,47 +187,47 @@ const Fe = /* @__PURE__ */ ce(Ae, [["render", ke]]), Ie = { class: "flex items-c
|
|
|
191
187
|
blameFormChildOnValidationFailed: !0
|
|
192
188
|
}
|
|
193
189
|
}, {
|
|
194
|
-
"side-sheet-header":
|
|
190
|
+
"side-sheet-header": M(() => [
|
|
195
191
|
F("div", Ie, [
|
|
196
192
|
y(n, {
|
|
197
193
|
variant: u(Z).Tertiary,
|
|
198
194
|
"prepend-icon": "arrow_back",
|
|
199
195
|
onClick: oe(f, ["stop"])
|
|
200
196
|
}, null, 8, ["variant"]),
|
|
201
|
-
|
|
197
|
+
h.isEditMode ? (i(), R("p", we, E(u(a)("menu.link_product.rules.edit_rule")), 1)) : (i(), R("p", Ve, E(u(a)("menu.link_product.rules.add_rule")), 1))
|
|
202
198
|
])
|
|
203
199
|
]),
|
|
204
|
-
"side-sheet-footer":
|
|
200
|
+
"side-sheet-footer": M(() => [
|
|
205
201
|
F("div", Be, [
|
|
206
202
|
y(n, {
|
|
207
203
|
variant: u(Z).Secondary,
|
|
208
|
-
label: u(
|
|
204
|
+
label: u(a)("common.cancel"),
|
|
209
205
|
onClick: oe(f, ["stop"])
|
|
210
206
|
}, null, 8, ["variant", "label"]),
|
|
211
207
|
y(n, {
|
|
212
208
|
variant: u(Z).Primary,
|
|
213
|
-
label: u(
|
|
209
|
+
label: u(a)("common.save"),
|
|
214
210
|
type: "submit"
|
|
215
211
|
}, null, 8, ["variant", "label"])
|
|
216
212
|
])
|
|
217
213
|
]),
|
|
218
|
-
default:
|
|
214
|
+
default: M(() => [
|
|
219
215
|
F("div", xe, [
|
|
220
|
-
y(
|
|
216
|
+
y(r, {
|
|
221
217
|
modelValue: q.value,
|
|
222
218
|
"onUpdate:modelValue": s[0] || (s[0] = (m) => q.value = m),
|
|
223
|
-
label: u(
|
|
219
|
+
label: u(a)("menu.link_product.rules.availability")
|
|
224
220
|
}, {
|
|
225
|
-
default:
|
|
226
|
-
y(
|
|
221
|
+
default: M(() => [
|
|
222
|
+
y(p, {
|
|
227
223
|
label: "All",
|
|
228
224
|
value: u(ue.F_ORDER_FROM).Enum.ALL
|
|
229
225
|
}, null, 8, ["value"]),
|
|
230
|
-
y(
|
|
226
|
+
y(p, {
|
|
231
227
|
label: "POS Only",
|
|
232
228
|
value: u(ue.F_ORDER_FROM).Enum.POS_ONLY
|
|
233
229
|
}, null, 8, ["value"]),
|
|
234
|
-
y(
|
|
230
|
+
y(p, {
|
|
235
231
|
label: "None",
|
|
236
232
|
value: u(ue.F_ORDER_FROM).Enum.NONE
|
|
237
233
|
}, null, 8, ["value"])
|
|
@@ -241,34 +237,34 @@ const Fe = /* @__PURE__ */ ce(Ae, [["render", ke]]), Ie = { class: "flex items-c
|
|
|
241
237
|
y(Fe),
|
|
242
238
|
F("div", $e, [
|
|
243
239
|
F("div", Se, [
|
|
244
|
-
F("p", Ne,
|
|
245
|
-
(i(!0),
|
|
240
|
+
F("p", Ne, E(u(a)("menu.link_product.rules.use_rule_group")), 1),
|
|
241
|
+
(i(!0), R(z, null, X(Y.value, (m) => (i(), R("div", {
|
|
246
242
|
key: m._id
|
|
247
243
|
}, [
|
|
248
244
|
y(k, {
|
|
249
245
|
variant: "outlined",
|
|
250
246
|
class: "p-24 gap-24 space-y-16"
|
|
251
247
|
}, {
|
|
252
|
-
default:
|
|
248
|
+
default: M(() => [
|
|
253
249
|
F("div", Ge, [
|
|
254
|
-
F("p", Oe,
|
|
255
|
-
y(
|
|
250
|
+
F("p", Oe, E(m.name), 1),
|
|
251
|
+
y(c, {
|
|
256
252
|
name: w.value[m._id] ? "expand_less" : "expand_more",
|
|
257
253
|
onClick: oe((t) => w.value[m._id] = !w.value[m._id], ["stop", "prevent"])
|
|
258
254
|
}, null, 8, ["name", "onClick"])
|
|
259
255
|
]),
|
|
260
|
-
w.value[m._id] ? (i(),
|
|
261
|
-
(i(!0),
|
|
256
|
+
w.value[m._id] ? (i(), R("div", De, [
|
|
257
|
+
(i(!0), R(z, null, X(m.rules, (t, l) => (i(), R("div", {
|
|
262
258
|
key: t._id
|
|
263
259
|
}, [
|
|
264
|
-
(i(!0),
|
|
260
|
+
(i(!0), R(z, null, X(g(t), (e, G) => (i(), T(Re, {
|
|
265
261
|
key: G,
|
|
266
262
|
number: G + 1,
|
|
267
263
|
property: e.property,
|
|
268
264
|
operator: e.operator,
|
|
269
265
|
value: e.value
|
|
270
266
|
}, null, 8, ["number", "property", "operator", "value"]))), 128)),
|
|
271
|
-
l < m.rules.length - 1 ? (i(),
|
|
267
|
+
l < m.rules.length - 1 ? (i(), R("p", Me, E(u(a)("menu.link_product.rules.or")), 1)) : J("", !0)
|
|
272
268
|
]))), 128))
|
|
273
269
|
])) : J("", !0)
|
|
274
270
|
]),
|
|
@@ -276,21 +272,21 @@ const Fe = /* @__PURE__ */ ce(Ae, [["render", ke]]), Ie = { class: "flex items-c
|
|
|
276
272
|
}, 1024)
|
|
277
273
|
]))), 128)),
|
|
278
274
|
y(_, { "close-on-click": !1 }, {
|
|
279
|
-
"menu-button":
|
|
275
|
+
"menu-button": M(() => [
|
|
280
276
|
y(n, {
|
|
281
277
|
variant: u(Z).Plain,
|
|
282
278
|
"prepend-icon": "add",
|
|
283
|
-
label: u(
|
|
279
|
+
label: u(a)("menu.link_product.rules.add_rule_group")
|
|
284
280
|
}, null, 8, ["variant", "label"])
|
|
285
281
|
]),
|
|
286
|
-
default:
|
|
282
|
+
default: M(() => [
|
|
287
283
|
y(S, {
|
|
288
|
-
"model-value":
|
|
289
|
-
"onUpdate:modelValue": s[1] || (s[1] = (m) =>
|
|
284
|
+
"model-value": b.value,
|
|
285
|
+
"onUpdate:modelValue": s[1] || (s[1] = (m) => b.value = m),
|
|
290
286
|
class: "w-[200px]",
|
|
291
|
-
placeholder: u(
|
|
287
|
+
placeholder: u(a)("menu.link_product.rules.filter_result")
|
|
292
288
|
}, null, 8, ["model-value", "placeholder"]),
|
|
293
|
-
(i(!0),
|
|
289
|
+
(i(!0), R(z, null, X(V.value, (m) => (i(), T(N, {
|
|
294
290
|
key: m.value,
|
|
295
291
|
label: m.label,
|
|
296
292
|
"has-checkbox": "",
|
|
@@ -304,9 +300,9 @@ const Fe = /* @__PURE__ */ ce(Ae, [["render", ke]]), Ie = { class: "flex items-c
|
|
|
304
300
|
})
|
|
305
301
|
]),
|
|
306
302
|
y(be, {
|
|
307
|
-
"model-value":
|
|
303
|
+
"model-value": h.groupCustomRule,
|
|
308
304
|
"onUpdate:modelValue": s[2] || (s[2] = (m) => {
|
|
309
|
-
|
|
305
|
+
d.value = m;
|
|
310
306
|
})
|
|
311
307
|
}, null, 8, ["model-value"])
|
|
312
308
|
])
|
|
@@ -341,33 +337,33 @@ const Fe = /* @__PURE__ */ ce(Ae, [["render", ke]]), Ie = { class: "flex items-c
|
|
|
341
337
|
}
|
|
342
338
|
},
|
|
343
339
|
emits: ["update:model-value", "delete-rule"],
|
|
344
|
-
setup(
|
|
345
|
-
expose:
|
|
346
|
-
emit:
|
|
340
|
+
setup(h, {
|
|
341
|
+
expose: U,
|
|
342
|
+
emit: a
|
|
347
343
|
}) {
|
|
348
344
|
const {
|
|
349
|
-
t:
|
|
350
|
-
} = se(),
|
|
351
|
-
var
|
|
352
|
-
return ((
|
|
345
|
+
t: L
|
|
346
|
+
} = se(), v = h, $ = a, q = j(() => {
|
|
347
|
+
var d;
|
|
348
|
+
return ((d = le().state.menu.ruleGroupSettings) == null ? void 0 : d.groups) || [];
|
|
353
349
|
});
|
|
354
|
-
function
|
|
355
|
-
return
|
|
356
|
-
var
|
|
357
|
-
const I = ((
|
|
350
|
+
function b(d) {
|
|
351
|
+
return d.flatMap((g) => {
|
|
352
|
+
var o, s;
|
|
353
|
+
const I = ((o = q.value.find((n) => n._id === g)) == null ? void 0 : o.rules) || [], f = ((s = q.value.find((n) => n._id === g)) == null ? void 0 : s.name) || "";
|
|
358
354
|
return {
|
|
359
|
-
id:
|
|
355
|
+
id: g,
|
|
360
356
|
name: f,
|
|
361
357
|
rules: I.map((n) => {
|
|
362
|
-
var
|
|
358
|
+
var p, r, c, k;
|
|
363
359
|
return {
|
|
364
360
|
...n,
|
|
365
361
|
restaurantRule: {
|
|
366
|
-
restaurantAttributes: O((
|
|
367
|
-
restaurantCustomAttributes: O((
|
|
362
|
+
restaurantAttributes: O((p = n.restaurantRule) == null ? void 0 : p.restaurantAttributes),
|
|
363
|
+
restaurantCustomAttributes: O((r = n.restaurantRule) == null ? void 0 : r.restaurantCustomAttributes)
|
|
368
364
|
},
|
|
369
365
|
itemRule: {
|
|
370
|
-
itemAttributes:
|
|
366
|
+
itemAttributes: v.convertCategoryIdToName(O((c = n.itemRule) == null ? void 0 : c.itemAttributes)),
|
|
371
367
|
itemCustomAttributes: O((k = n.itemRule) == null ? void 0 : k.itemCustomAttributes)
|
|
372
368
|
}
|
|
373
369
|
};
|
|
@@ -375,51 +371,51 @@ const Fe = /* @__PURE__ */ ce(Ae, [["render", ke]]), Ie = { class: "flex items-c
|
|
|
375
371
|
};
|
|
376
372
|
});
|
|
377
373
|
}
|
|
378
|
-
const C = A(
|
|
374
|
+
const C = A(b(v.modelValue.ruleGroupIds ?? [])), w = A({
|
|
379
375
|
_id: "customRule",
|
|
380
|
-
restaurantRule:
|
|
381
|
-
itemRule:
|
|
382
|
-
}), P = A(
|
|
383
|
-
re(() =>
|
|
384
|
-
C.value =
|
|
376
|
+
restaurantRule: v.modelValue.restaurantRule,
|
|
377
|
+
itemRule: v.modelValue.itemRule
|
|
378
|
+
}), P = A(v.modelValue.orderFrom);
|
|
379
|
+
re(() => v.modelValue, (d) => {
|
|
380
|
+
C.value = b(d.ruleGroupIds ?? []), w.value = {
|
|
385
381
|
_id: "customRule",
|
|
386
|
-
restaurantRule:
|
|
387
|
-
itemRule:
|
|
382
|
+
restaurantRule: d.restaurantRule,
|
|
383
|
+
itemRule: d.itemRule
|
|
388
384
|
};
|
|
389
385
|
}, {
|
|
390
386
|
deep: !0
|
|
391
387
|
});
|
|
392
|
-
const V = A(
|
|
393
|
-
|
|
388
|
+
const V = A(v.showForm);
|
|
389
|
+
U({
|
|
394
390
|
showForm: V
|
|
395
|
-
}), re(() => V.value, (
|
|
396
|
-
|
|
391
|
+
}), re(() => V.value, (d, g) => {
|
|
392
|
+
v.isDraft && g === !0 && d === !1 && $("delete-rule");
|
|
397
393
|
});
|
|
398
|
-
function Y(
|
|
399
|
-
P.value =
|
|
394
|
+
function Y(d) {
|
|
395
|
+
P.value = d.orderFrom, w.value.restaurantRule = d.restaurantRule, w.value.itemRule = d.itemRule, C.value = b(d.ruleGroupIds ?? []), $("update:model-value", d);
|
|
400
396
|
}
|
|
401
|
-
return (
|
|
397
|
+
return (d, g) => V.value ? (i(), T(Le, {
|
|
402
398
|
key: 1,
|
|
403
|
-
"is-edit-mode": !
|
|
399
|
+
"is-edit-mode": !h.isDraft,
|
|
404
400
|
"order-from": P.value,
|
|
405
401
|
"existing-rule-groups": C.value,
|
|
406
402
|
"group-custom-rule": w.value,
|
|
407
|
-
"convert-category-id-to-name":
|
|
408
|
-
onCloseForm:
|
|
409
|
-
"onUpdate:modelValue":
|
|
410
|
-
}, null, 8, ["is-edit-mode", "order-from", "existing-rule-groups", "group-custom-rule", "convert-category-id-to-name"])) : (i(),
|
|
403
|
+
"convert-category-id-to-name": h.convertCategoryIdToName,
|
|
404
|
+
onCloseForm: g[2] || (g[2] = (I) => V.value = !1),
|
|
405
|
+
"onUpdate:modelValue": g[3] || (g[3] = (I) => Y(I))
|
|
406
|
+
}, null, 8, ["is-edit-mode", "order-from", "existing-rule-groups", "group-custom-rule", "convert-category-id-to-name"])) : (i(), T(ge, {
|
|
411
407
|
key: 0,
|
|
412
408
|
"model-value": w.value,
|
|
413
|
-
title: `${u(
|
|
409
|
+
title: `${u(L)("menu.rule_groups.condition_view.rule")} ${h.index + 1}`,
|
|
414
410
|
"is-catalog-link-item-rule-view": !0,
|
|
415
411
|
"rule-group-names": C.value.map((I) => I.name).filter((I) => I !== ""),
|
|
416
412
|
"order-from": P.value,
|
|
417
|
-
onOpenCatalogLinkItemRuleForm:
|
|
418
|
-
onDeleteRule:
|
|
413
|
+
onOpenCatalogLinkItemRuleForm: g[0] || (g[0] = (I) => V.value = !0),
|
|
414
|
+
onDeleteRule: g[1] || (g[1] = (I) => d.$emit("delete-rule"))
|
|
419
415
|
}, null, 8, ["model-value", "title", "rule-group-names", "order-from"]));
|
|
420
416
|
}
|
|
421
417
|
});
|
|
422
|
-
var
|
|
418
|
+
var D = /* @__PURE__ */ ((h) => (h[h.Normal = 0] = "Normal", h[h.Rules = 1] = "Rules", h))(D || {});
|
|
423
419
|
const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
424
420
|
key: 1,
|
|
425
421
|
class: "flex items-center gap-12"
|
|
@@ -446,24 +442,24 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
446
442
|
useCloseBtn: { type: Boolean }
|
|
447
443
|
},
|
|
448
444
|
emits: ["submit"],
|
|
449
|
-
setup(
|
|
450
|
-
const
|
|
445
|
+
setup(h, { emit: U }) {
|
|
446
|
+
const a = h, L = U, { t: v } = se(), $ = A(D.Normal);
|
|
451
447
|
function q(t) {
|
|
452
448
|
$.value = t;
|
|
453
449
|
}
|
|
454
|
-
const
|
|
455
|
-
Ce.isBoolean(t) ?
|
|
450
|
+
const b = A(!1), C = (t) => {
|
|
451
|
+
Ce.isBoolean(t) ? b.value = t : b.value = !b.value;
|
|
456
452
|
};
|
|
457
453
|
function w(t) {
|
|
458
454
|
return t.reduce((l, e) => (l[e._id] = [...l[e._id] ?? [], e], l), {});
|
|
459
455
|
}
|
|
460
|
-
const P =
|
|
461
|
-
menuItems: j(() =>
|
|
462
|
-
categories: j(() =>
|
|
456
|
+
const P = a.initialValue, V = A(w(ee(P))), Y = j(() => Object.values(V.value).flatMap((t) => t)), { convertCategoryIdToName: d, convertCategoryNameToId: g } = he({
|
|
457
|
+
menuItems: j(() => a.menuItems || []),
|
|
458
|
+
categories: j(() => a.categories || [])
|
|
463
459
|
}), I = A(
|
|
464
|
-
ee(
|
|
460
|
+
ee(a.linkItemRules)
|
|
465
461
|
), f = A();
|
|
466
|
-
function
|
|
462
|
+
function o() {
|
|
467
463
|
var t;
|
|
468
464
|
return (t = I.value) == null ? void 0 : t.map((l) => {
|
|
469
465
|
var e, G, H, Q;
|
|
@@ -474,13 +470,13 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
474
470
|
restaurantCustomAttributes: O((G = l.restaurantRule) == null ? void 0 : G.restaurantCustomAttributes)
|
|
475
471
|
},
|
|
476
472
|
itemRule: {
|
|
477
|
-
itemAttributes:
|
|
473
|
+
itemAttributes: d(O((H = l.itemRule) == null ? void 0 : H.itemAttributes)),
|
|
478
474
|
itemCustomAttributes: O((Q = l.itemRule) == null ? void 0 : Q.itemCustomAttributes)
|
|
479
475
|
}
|
|
480
476
|
};
|
|
481
477
|
});
|
|
482
478
|
}
|
|
483
|
-
f.value =
|
|
479
|
+
f.value = o();
|
|
484
480
|
function s() {
|
|
485
481
|
var t;
|
|
486
482
|
return (t = f.value) == null ? void 0 : t.map((l) => {
|
|
@@ -492,7 +488,7 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
492
488
|
restaurantCustomAttributes: te((G = l.restaurantRule) == null ? void 0 : G.restaurantCustomAttributes)
|
|
493
489
|
},
|
|
494
490
|
itemRule: {
|
|
495
|
-
itemAttributes: te(
|
|
491
|
+
itemAttributes: te(g((H = l.itemRule) == null ? void 0 : H.itemAttributes)),
|
|
496
492
|
itemCustomAttributes: te((Q = l.itemRule) == null ? void 0 : Q.itemCustomAttributes)
|
|
497
493
|
}
|
|
498
494
|
};
|
|
@@ -501,29 +497,29 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
501
497
|
const n = _e(
|
|
502
498
|
() => {
|
|
503
499
|
const t = s() ?? null;
|
|
504
|
-
return !ie.isEqual(w(
|
|
500
|
+
return !ie.isEqual(w(a.initialValue), V.value) || !ie.isEqual(a.linkItemRules, t);
|
|
505
501
|
},
|
|
506
502
|
() => {
|
|
507
|
-
|
|
503
|
+
b.value = !1;
|
|
508
504
|
}
|
|
509
505
|
);
|
|
510
|
-
function
|
|
511
|
-
$.value ===
|
|
512
|
-
mode:
|
|
506
|
+
function p() {
|
|
507
|
+
$.value === D.Rules ? L("submit", {
|
|
508
|
+
mode: D.Rules,
|
|
513
509
|
linkItemRules: s() ?? []
|
|
514
|
-
}) :
|
|
515
|
-
mode:
|
|
510
|
+
}) : L("submit", {
|
|
511
|
+
mode: D.Normal,
|
|
516
512
|
items: Y.value
|
|
517
|
-
}),
|
|
513
|
+
}), b.value = !1;
|
|
518
514
|
}
|
|
519
515
|
re(
|
|
520
|
-
() =>
|
|
516
|
+
() => b.value,
|
|
521
517
|
() => {
|
|
522
|
-
V.value = w(ee(
|
|
518
|
+
V.value = w(ee(a.initialValue)), I.value = ee(a.linkItemRules), f.value = o(), r.value = null, c.value = !1, $.value = a.noScheduler && a.linkItemRules && a.linkItemRules.length > 0 ? D.Rules : D.Normal;
|
|
523
519
|
}
|
|
524
520
|
);
|
|
525
|
-
const
|
|
526
|
-
|
|
521
|
+
const r = A(null), c = A(!1), k = () => {
|
|
522
|
+
r.value = {
|
|
527
523
|
orderFrom: ue.F_ORDER_FROM.enum.ALL,
|
|
528
524
|
restaurantRule: {
|
|
529
525
|
restaurantAttributes: null,
|
|
@@ -533,13 +529,13 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
533
529
|
itemAttributes: null,
|
|
534
530
|
itemCustomAttributes: null
|
|
535
531
|
}
|
|
536
|
-
},
|
|
532
|
+
}, c.value = !0;
|
|
537
533
|
};
|
|
538
534
|
function S(t) {
|
|
539
|
-
f.value = [...f.value || [], t],
|
|
535
|
+
f.value = [...f.value || [], t], r.value = null, c.value = !1;
|
|
540
536
|
}
|
|
541
537
|
function N() {
|
|
542
|
-
|
|
538
|
+
r.value = null, c.value = !1;
|
|
543
539
|
}
|
|
544
540
|
function _(t) {
|
|
545
541
|
if (!f.value) return;
|
|
@@ -547,8 +543,8 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
547
543
|
l.splice(t, 1), f.value = l.length ? l : [];
|
|
548
544
|
}
|
|
549
545
|
const W = j(() => {
|
|
550
|
-
const t =
|
|
551
|
-
return
|
|
546
|
+
const t = a.isLocalOnly ? ye() : le();
|
|
547
|
+
return a.noScheduler && t.currentCatalog;
|
|
552
548
|
});
|
|
553
549
|
function m(t, l) {
|
|
554
550
|
if (!f.value) return;
|
|
@@ -557,62 +553,62 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
557
553
|
}
|
|
558
554
|
return (t, l) => {
|
|
559
555
|
const e = x("fm-button"), G = x("fm-switch"), H = x("FmCard"), Q = x("fm-side-sheet");
|
|
560
|
-
return i(),
|
|
556
|
+
return i(), R(z, null, [
|
|
561
557
|
pe(t.$slots, "default", { trigger: C }, void 0, !0),
|
|
562
558
|
y(Q, {
|
|
563
559
|
id: "group-form",
|
|
564
|
-
modelValue:
|
|
565
|
-
"onUpdate:modelValue": l[3] || (l[3] = (
|
|
560
|
+
modelValue: b.value,
|
|
561
|
+
"onUpdate:modelValue": l[3] || (l[3] = (B) => b.value = B),
|
|
566
562
|
"close-button": t.useCloseBtn,
|
|
567
563
|
"is-container": u(de).FmForm,
|
|
568
564
|
"is-container-props": {
|
|
569
|
-
onValidationSuccess:
|
|
565
|
+
onValidationSuccess: p,
|
|
570
566
|
blameFormChildOnValidationFailed: !0
|
|
571
567
|
},
|
|
572
568
|
"max-width": 760,
|
|
573
569
|
"onOn:clickedAway": u(n)
|
|
574
570
|
}, {
|
|
575
|
-
"side-sheet-header":
|
|
576
|
-
t.useCloseBtn ? J("", !0) : (i(),
|
|
571
|
+
"side-sheet-header": M(() => [
|
|
572
|
+
t.useCloseBtn ? J("", !0) : (i(), T(e, {
|
|
577
573
|
key: 0,
|
|
578
574
|
variant: u(Z).Tertiary,
|
|
579
575
|
class: "cursor-pointer mr-4",
|
|
580
576
|
"prepend-icon": "arrow_back",
|
|
581
577
|
onClick: C
|
|
582
578
|
}, null, 8, ["variant"])),
|
|
583
|
-
F("p", Ee,
|
|
584
|
-
W.value ? (i(),
|
|
579
|
+
F("p", Ee, E(t.title || u(v)("menu.link_product.title")), 1),
|
|
580
|
+
W.value ? (i(), R("div", Te, [
|
|
585
581
|
F("div", Ue, [
|
|
586
582
|
y(G, {
|
|
587
|
-
label: u(
|
|
588
|
-
"model-value": $.value === u(
|
|
589
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
583
|
+
label: u(v)("menu.link_product.rules.section_title"),
|
|
584
|
+
"model-value": $.value === u(D).Rules,
|
|
585
|
+
"onUpdate:modelValue": l[0] || (l[0] = (B) => q(B ? u(D).Rules : u(D).Normal))
|
|
590
586
|
}, null, 8, ["label", "model-value"])
|
|
591
587
|
])
|
|
592
588
|
])) : J("", !0)
|
|
593
589
|
]),
|
|
594
|
-
"side-sheet-footer":
|
|
590
|
+
"side-sheet-footer": M(() => [
|
|
595
591
|
F("div", Qe, [
|
|
596
592
|
y(e, {
|
|
597
|
-
label: u(
|
|
593
|
+
label: u(v)("menu.common.actions.confirm"),
|
|
598
594
|
size: "lg",
|
|
599
595
|
type: "submit",
|
|
600
596
|
variant: "primary"
|
|
601
597
|
}, null, 8, ["label"]),
|
|
602
598
|
y(e, {
|
|
603
|
-
label: u(
|
|
599
|
+
label: u(v)("menu.common.actions.cancel"),
|
|
604
600
|
size: "lg",
|
|
605
601
|
variant: "tertiary",
|
|
606
|
-
onClick: l[2] || (l[2] = () =>
|
|
602
|
+
onClick: l[2] || (l[2] = () => b.value = !1)
|
|
607
603
|
}, null, 8, ["label"])
|
|
608
604
|
])
|
|
609
605
|
]),
|
|
610
|
-
default:
|
|
611
|
-
(i(),
|
|
606
|
+
default: M(() => [
|
|
607
|
+
(i(), R("div", {
|
|
612
608
|
class: "py-8 px-8 overflow-y-auto space-y-24",
|
|
613
609
|
key: $.value
|
|
614
610
|
}, [
|
|
615
|
-
$.value === u(
|
|
611
|
+
$.value === u(D).Normal ? (i(), T(u(fe), {
|
|
616
612
|
key: 0,
|
|
617
613
|
"auto-focus-search": !0,
|
|
618
614
|
"categorized-items": t.categorizedItems,
|
|
@@ -621,31 +617,31 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
621
617
|
"selected-items": Y.value,
|
|
622
618
|
"show-variant": t.showVariant,
|
|
623
619
|
"show-addon": t.showAddon,
|
|
624
|
-
"onUpdate:data": l[1] || (l[1] = (
|
|
625
|
-
}, null, 8, ["categorized-items", "data", "select-variant", "selected-items", "show-variant", "show-addon"])) : W.value ? (i(),
|
|
626
|
-
F("p", qe,
|
|
627
|
-
(!f.value || f.value.length <= 0) && !
|
|
620
|
+
"onUpdate:data": l[1] || (l[1] = (B) => V.value = B)
|
|
621
|
+
}, null, 8, ["categorized-items", "data", "select-variant", "selected-items", "show-variant", "show-addon"])) : W.value ? (i(), R(z, { key: 1 }, [
|
|
622
|
+
F("p", qe, E(u(v)("menu.link_product.rules.hint")), 1),
|
|
623
|
+
(!f.value || f.value.length <= 0) && !c.value ? (i(), T(u(ve), {
|
|
628
624
|
key: 0,
|
|
629
|
-
title: u(
|
|
630
|
-
subtitle: u(
|
|
625
|
+
title: u(v)("menu.rule_groups.condition_view.empty_data.no_rules_added"),
|
|
626
|
+
subtitle: u(v)("menu.rule_groups.condition_view.empty_data.subtitle"),
|
|
631
627
|
action: {
|
|
632
|
-
text: u(
|
|
628
|
+
text: u(v)("menu.link_product.rules.add_rule"),
|
|
633
629
|
icon: "add",
|
|
634
630
|
callback: k
|
|
635
631
|
}
|
|
636
|
-
}, null, 8, ["title", "subtitle", "action"])) : (i(),
|
|
637
|
-
|
|
632
|
+
}, null, 8, ["title", "subtitle", "action"])) : (i(), R("div", je, [
|
|
633
|
+
c.value && r.value ? (i(), T(H, {
|
|
638
634
|
key: 0,
|
|
639
635
|
class: "p-16 space-y-16",
|
|
640
636
|
variant: "outlined"
|
|
641
637
|
}, {
|
|
642
|
-
default:
|
|
643
|
-
var
|
|
638
|
+
default: M(() => {
|
|
639
|
+
var B;
|
|
644
640
|
return [
|
|
645
641
|
y(me, {
|
|
646
|
-
"model-value":
|
|
647
|
-
index: ((
|
|
648
|
-
convertCategoryIdToName: u(
|
|
642
|
+
"model-value": r.value,
|
|
643
|
+
index: ((B = f.value) == null ? void 0 : B.length) ?? 0,
|
|
644
|
+
convertCategoryIdToName: u(d),
|
|
649
645
|
"show-form": !0,
|
|
650
646
|
"is-draft": !0,
|
|
651
647
|
onDeleteRule: N,
|
|
@@ -655,23 +651,23 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
655
651
|
}),
|
|
656
652
|
_: 1
|
|
657
653
|
})) : J("", !0),
|
|
658
|
-
(i(!0),
|
|
654
|
+
(i(!0), R(z, null, X(f.value, (B, K) => (i(), R(z, { key: K }, [
|
|
659
655
|
F("div", ze, [
|
|
660
|
-
F("span", Pe,
|
|
656
|
+
F("span", Pe, E(u(v)("menu.rule_groups.condition_view.and")), 1),
|
|
661
657
|
y(me, {
|
|
662
|
-
"model-value":
|
|
658
|
+
"model-value": B,
|
|
663
659
|
index: K,
|
|
664
|
-
convertCategoryIdToName: u(
|
|
660
|
+
convertCategoryIdToName: u(d),
|
|
665
661
|
onDeleteRule: (ne) => _(K),
|
|
666
662
|
"onUpdate:modelValue": (ne) => m(K, ne)
|
|
667
663
|
}, null, 8, ["model-value", "index", "convertCategoryIdToName", "onDeleteRule", "onUpdate:modelValue"])
|
|
668
664
|
]),
|
|
669
|
-
f.value && f.value.length > 1 && K < f.value.length - 1 ? (i(),
|
|
670
|
-
F("span", He,
|
|
665
|
+
f.value && f.value.length > 1 && K < f.value.length - 1 ? (i(), R("div", We, [
|
|
666
|
+
F("span", He, E(u(v)("menu.rule_groups.condition_view.or")), 1)
|
|
671
667
|
])) : J("", !0)
|
|
672
668
|
], 64))), 128)),
|
|
673
669
|
y(e, {
|
|
674
|
-
label: u(
|
|
670
|
+
label: u(v)("menu.link_product.rules.add_rule"),
|
|
675
671
|
onClick: k
|
|
676
672
|
}, null, 8, ["label"])
|
|
677
673
|
]))
|
|
@@ -683,10 +679,9 @@ const Ee = { class: "fm-typo-en-title-md-600 mr-auto" }, Te = {
|
|
|
683
679
|
], 64);
|
|
684
680
|
};
|
|
685
681
|
}
|
|
686
|
-
}),
|
|
682
|
+
}), at = /* @__PURE__ */ ce(Je, [["__scopeId", "data-v-60163177"]]);
|
|
687
683
|
export {
|
|
688
684
|
Fe as H,
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
M as a
|
|
685
|
+
at as L,
|
|
686
|
+
D as a
|
|
692
687
|
};
|