@feedmepos/mf-menu 0.31.30-beta.1 → 0.31.31-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-CrQBq4gc.js → App-1TX8v7ZA.js} +10 -8
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-D00UOSsK.js → ApplyProduct.vue_vue_type_script_setup_true_lang-CR7QrFUG.js} +12 -12
- package/dist/{Catalog-D4m8x_f2.js → Catalog-DWClc58s.js} +75 -74
- package/dist/{Category-sQll5ITQ.js → Category-BqKFvFam.js} +60 -60
- package/dist/{Category-Ql1kDDH-.js → Category-IYMtMoT-.js} +28 -28
- package/dist/{CookingGuide-CSutufcu.js → CookingGuide-BayJ6zj4.js} +103 -101
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-BqhYFXNG.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-Ceq86b3d.js} +1 -1
- package/dist/{Group-CnBE6CiB.js → Group-LqSX7ue6.js} +1 -1
- package/dist/{Group-YqVh5hC0.js → Group-RujTPTns.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-D9TSH4sS.js → Group.vue_vue_type_script_setup_true_lang-Dj9ZmkYe.js} +138 -137
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CqriuXVC.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D5GWkh3G.js} +16 -16
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CaIU0RsG.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-C4IrA3es.js} +4616 -4610
- package/dist/{Ingredient-MhLxJzAU.js → Ingredient-_tc8llr1.js} +65 -64
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CIbExsMI.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DLFDf-VZ.js} +14 -12
- package/dist/{LinkProductSideSheet-D7vYZbFy.js → LinkProductSideSheet-C6rF-G1v.js} +14 -12
- package/dist/{MenuSetting-n0me5wY8.js → MenuSetting-xDHeeROY.js} +27 -26
- package/dist/{PrintRoute-CudZZYbe.js → PrintRoute-B_TFMn5e.js} +17 -15
- package/dist/{Product-DPZQgWET.js → Product-DdEEqrtc.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-CdaeZy_o.js → Product.vue_vue_type_script_setup_true_lang-zcistmwh.js} +257 -256
- package/dist/{ProductInternalTools-DgANHliV.js → ProductInternalTools-BcC7BF6W.js} +45 -45
- package/dist/{Products-Ez4R3jKW.js → Products-Cu0cJshV.js} +74 -72
- package/dist/{Publish-B4DEPe1I.js → Publish-Bm3Xiks1.js} +34 -32
- package/dist/{Recipe-Cripr-gY.js → Recipe-DWK-luIZ.js} +65 -63
- package/dist/{Scheduler-C-OV9d7d.js → Scheduler-Cb1TeBhW.js} +19 -19
- package/dist/{ServingSequence-DAumDXP1.js → ServingSequence-evSIET_8.js} +34 -34
- package/dist/{Setting-ByaHpIAN.js → Setting-Cn3kwC9F.js} +54 -53
- package/dist/{Subcategory-ro2aGt2H.js → Subcategory-q4m4qHsU.js} +34 -34
- package/dist/{Takeaway-CJb0ayDC.js → Takeaway-ClepHYGu.js} +14 -14
- package/dist/{Takeaway-AEg_0gKg.js → Takeaway-D-rdUZuh.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-Cjj4bxoL.js → Takeaway.vue_vue_type_script_setup_true_lang-y9Yxstu2.js} +41 -40
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Drf4n4rj.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BSeLfoOA.js} +1108 -1106
- package/dist/{Unit-1wzUBplb.js → Unit-IM8Naj82.js} +12 -12
- package/dist/{Variant-Dnz2v5u0.js → Variant-fzGvwaMo.js} +16 -16
- package/dist/{_id_-C3rBZ6zL.js → _id_-BsKNG9Qv.js} +22 -22
- package/dist/{app-sDPxNF11.js → app-BzQRUMTK.js} +3 -3
- package/dist/{app-CLY6CoaV.js → app-CoVUUCa_.js} +24 -24
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-BZ4FSJ_Z.js → linked-status-eQqjvOq_.js} +2 -2
- package/dist/assets/{override-menu-C-fWJdVd.js → override-menu-C8NTBJgN.js} +2 -2
- package/dist/assets/{validate-menu-BDEM_Odz.js → validate-menu-Dn-OO7Ed.js} +2 -2
- package/dist/{catalog-bkFntZNz.js → catalog-CaXceaA2.js} +1 -1
- package/dist/{catalogSetting-zrKwGJ_C.js → catalogSetting-BGvckFdh.js} +1 -1
- package/dist/{category-BuPYaEsy.js → category-u5eo_Vjd.js} +5 -3
- package/dist/currency-BPHwez-E.js +7 -0
- package/dist/{dayjs.min-CR2NIyKn.js → dayjs.min-Bsr3tJCn.js} +1 -1
- package/dist/{index-BNORpjos.js → index-Bbx4iZ6n.js} +27 -27
- package/dist/{index-Dp_vLFQp.js → index-DSAG0yWh.js} +22 -20
- package/dist/{index-D20u0bCl.js → index-tRQb7RN_.js} +1 -1
- package/dist/{item-D4DcBt7N.js → item-BAqzKh4O.js} +801 -799
- package/dist/{jszip.min-CRJ61J9H.js → jszip.min-BKJtvCjM.js} +353 -353
- package/dist/{menu-Dw-Hpy07.js → menu-CDrsBjmr.js} +11 -9
- package/dist/menu-CsIzrBEr.js +74044 -0
- package/dist/packages/shared/src/permission/posPermission.d.ts +6 -0
- package/dist/{priceTier-EDLTGEjz.js → priceTier-DfbHonGe.js} +4 -4
- package/dist/{scheduler-CpPn2BlK.js → scheduler-DTWaBudB.js} +13 -11
- package/dist/{subcategory-B_W6vbM8.js → subcategory-D-R5r1Tr.js} +86 -84
- package/dist/{toExcel-D02OlDJu.js → toExcel-84VTtSA7.js} +2 -2
- package/dist/{unit-fro9wz1K.js → unit-B4zscxzo.js} +24 -23
- package/package.json +1 -1
- package/dist/currency-BISImIgX.js +0 -7
- package/dist/menu-ibc-yXVt.js +0 -107745
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
import { defineComponent as ae, ref as w, computed as V, resolveComponent as x, createBlock as Y, openBlock as k, unref as i, withCtx as p, createElementVNode as a, createVNode as l, createElementBlock as
|
|
1
|
+
import { defineComponent as ae, ref as w, computed as V, resolveComponent as x, createBlock as Y, openBlock as k, unref as i, withCtx as p, createElementVNode as a, createVNode as l, createElementBlock as $, toDisplayString as S, Fragment as z, renderList as H, withModifiers as le, createCommentVNode as ce, createTextVNode as fe, h as A } from "vue";
|
|
2
2
|
import { useI18n as se } from "@feedmepos/mf-common";
|
|
3
3
|
import { components as ue, useSnackbar as be, useDialog as ye } from "@feedmepos/ui-library";
|
|
4
4
|
import { _ as ke } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
5
|
-
import { _ as he } from "./app-
|
|
6
|
-
import {
|
|
5
|
+
import { _ as he } from "./app-CoVUUCa_.js";
|
|
6
|
+
import { D as ee, G as me, H as re, B as oe, u as xe, M as Ce, A as we } from "./menu-CsIzrBEr.js";
|
|
7
7
|
import { d as Fe } from "./vuedraggable-CK8z7qA8.js";
|
|
8
8
|
import { _ as Z } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
|
|
9
9
|
import { u as pe } from "./discardConfirm-BHni0LNu.js";
|
|
10
|
-
import
|
|
10
|
+
import "@feedmepos/core";
|
|
11
|
+
import "@feedmepos/core/entity";
|
|
12
|
+
import { L as Ve } from "./LinkProductSideSheet-C6rF-G1v.js";
|
|
11
13
|
import { _ as Se } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
|
|
12
|
-
import { _ as
|
|
13
|
-
const
|
|
14
|
+
import { _ as $e } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
15
|
+
const Ie = { class: "flex items-center gap-8" }, Oe = { class: "grow" }, Ee = { class: "space-y-32" }, Ke = { class: "flex bg-fm-color-neutral-gray-100 border-b border-b-fm-color-neutral-gray-200" }, De = { class: "px-16 py-8 w-[40%]" }, Le = { class: "px-16 py-8 grow" }, Ne = { class: "px-16 py-8 w-[40%]" }, Ge = { class: "px-16 py-8 grow" }, Ue = { class: "space-y-16" }, Be = { class: "flex flex-wrap gap-8 overflow-hidden mb-8" }, Me = { class: "flex gap-8 items-center justify-start" }, Te = /* @__PURE__ */ ae({
|
|
14
16
|
__name: "CookingGuideStepDialog",
|
|
15
17
|
emits: ["onComplete"],
|
|
16
|
-
setup(L, { expose: g, emit:
|
|
18
|
+
setup(L, { expose: g, emit: X }) {
|
|
17
19
|
const { t: u } = se();
|
|
18
20
|
g({
|
|
19
21
|
show: d,
|
|
20
|
-
hide:
|
|
22
|
+
hide: I
|
|
21
23
|
});
|
|
22
|
-
const N =
|
|
24
|
+
const N = X;
|
|
23
25
|
function D() {
|
|
24
26
|
return {
|
|
25
27
|
id: "",
|
|
@@ -33,14 +35,14 @@ const $e = { class: "flex items-center gap-8" }, Oe = { class: "grow" }, Ee = {
|
|
|
33
35
|
([t, f]) => ({ key: t, value: f })
|
|
34
36
|
), C.value = !0;
|
|
35
37
|
}
|
|
36
|
-
function
|
|
38
|
+
function I() {
|
|
37
39
|
C.value = !1;
|
|
38
40
|
}
|
|
39
41
|
const m = w(D()), F = w([]);
|
|
40
|
-
function
|
|
42
|
+
function J() {
|
|
41
43
|
F.value.push({ key: "", value: "" });
|
|
42
44
|
}
|
|
43
|
-
function
|
|
45
|
+
function R(v) {
|
|
44
46
|
F.value.splice(v, 1);
|
|
45
47
|
}
|
|
46
48
|
function G(v) {
|
|
@@ -80,8 +82,8 @@ const $e = { class: "flex items-center gap-8" }, Oe = { class: "grow" }, Ee = {
|
|
|
80
82
|
C.value = !1;
|
|
81
83
|
}
|
|
82
84
|
);
|
|
83
|
-
function
|
|
84
|
-
|
|
85
|
+
function B() {
|
|
86
|
+
I(), N("onComplete", {
|
|
85
87
|
...m.value,
|
|
86
88
|
variables: F.value.reduce((v, { key: t, value: f }) => ({ ...v, [t]: f }), {})
|
|
87
89
|
});
|
|
@@ -90,31 +92,31 @@ const $e = { class: "flex items-center gap-8" }, Oe = { class: "grow" }, Ee = {
|
|
|
90
92
|
const f = x("FmButton"), _ = x("FmTextField"), P = x("FmChip"), W = x("FmTextarea"), q = x("FmSideSheet");
|
|
91
93
|
return k(), Y(q, {
|
|
92
94
|
modelValue: C.value,
|
|
93
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
95
|
+
"onUpdate:modelValue": t[1] || (t[1] = (M) => C.value = M),
|
|
94
96
|
closeButton: !1,
|
|
95
97
|
header: n.value,
|
|
96
98
|
"max-width": 560,
|
|
97
99
|
"is-container": i(ue).FmForm,
|
|
98
100
|
"is-container-props": {
|
|
99
|
-
onValidationSuccess:
|
|
101
|
+
onValidationSuccess: B,
|
|
100
102
|
blameFormChildOnValidationFailed: !0,
|
|
101
103
|
class: "flex flex-col h-full"
|
|
102
104
|
},
|
|
103
105
|
"onOn:clickedAway": i(K)
|
|
104
106
|
}, {
|
|
105
107
|
"side-sheet-header": p(() => [
|
|
106
|
-
a("div",
|
|
108
|
+
a("div", Ie, [
|
|
107
109
|
l(f, {
|
|
108
110
|
icon: "arrow_back",
|
|
109
111
|
variant: "tertiary",
|
|
110
112
|
label: i(u)("menu.cooking_guide.step_dialog.actions.back"),
|
|
111
|
-
onClick:
|
|
113
|
+
onClick: I
|
|
112
114
|
}, null, 8, ["label"]),
|
|
113
115
|
a("div", Oe, S(n.value), 1)
|
|
114
116
|
])
|
|
115
117
|
]),
|
|
116
118
|
"side-sheet-footer": p(() => [
|
|
117
|
-
a("div",
|
|
119
|
+
a("div", Me, [
|
|
118
120
|
l(f, {
|
|
119
121
|
label: s.value,
|
|
120
122
|
size: "lg",
|
|
@@ -125,7 +127,7 @@ const $e = { class: "flex items-center gap-8" }, Oe = { class: "grow" }, Ee = {
|
|
|
125
127
|
label: i(u)("menu.cooking_guide.step_dialog.actions.cancel"),
|
|
126
128
|
size: "lg",
|
|
127
129
|
variant: "tertiary",
|
|
128
|
-
onClick:
|
|
130
|
+
onClick: I
|
|
129
131
|
}, null, 8, ["label"])
|
|
130
132
|
])
|
|
131
133
|
]),
|
|
@@ -141,7 +143,7 @@ const $e = { class: "flex items-center gap-8" }, Oe = { class: "grow" }, Ee = {
|
|
|
141
143
|
variant: "secondary",
|
|
142
144
|
"text-color": "primary",
|
|
143
145
|
"border-color": "primary",
|
|
144
|
-
onClick:
|
|
146
|
+
onClick: J
|
|
145
147
|
}, null, 8, ["label"])
|
|
146
148
|
]),
|
|
147
149
|
default: p(() => [
|
|
@@ -150,26 +152,26 @@ const $e = { class: "flex items-center gap-8" }, Oe = { class: "grow" }, Ee = {
|
|
|
150
152
|
a("div", De, S(i(u)("menu.cooking_guide.step_dialog.sections.variables.columns.key")), 1),
|
|
151
153
|
a("div", Le, S(i(u)("menu.cooking_guide.step_dialog.sections.variables.columns.value")), 1)
|
|
152
154
|
]),
|
|
153
|
-
(k(!0),
|
|
154
|
-
key:
|
|
155
|
+
(k(!0), $(z, null, H(F.value, (M, T) => (k(), $("div", {
|
|
156
|
+
key: T,
|
|
155
157
|
class: "flex items-center border-b border-b-fm-color-neutral-gray-100"
|
|
156
158
|
}, [
|
|
157
159
|
a("div", Ne, [
|
|
158
160
|
l(_, {
|
|
159
|
-
modelValue: F.value[
|
|
160
|
-
"onUpdate:modelValue": (O) => F.value[
|
|
161
|
+
modelValue: F.value[T].key,
|
|
162
|
+
"onUpdate:modelValue": (O) => F.value[T].key = O,
|
|
161
163
|
rules: [
|
|
162
164
|
(O) => !!O || i(u)("menu.cooking_guide.step_dialog.sections.variables.validation.required"),
|
|
163
165
|
(O) => !O || /^[a-z]+$/.test(O) || i(u)("menu.cooking_guide.step_dialog.sections.variables.validation.lowercase"),
|
|
164
|
-
(O) => !O || F.value.findIndex((de) => de.key === O) ===
|
|
166
|
+
(O) => !O || F.value.findIndex((de) => de.key === O) === T || i(u)("menu.cooking_guide.step_dialog.sections.variables.validation.duplicate")
|
|
165
167
|
],
|
|
166
168
|
placeholder: i(u)("menu.cooking_guide.step_dialog.sections.variables.placeholders.key")
|
|
167
169
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "rules", "placeholder"])
|
|
168
170
|
]),
|
|
169
171
|
a("div", Ge, [
|
|
170
172
|
l(_, {
|
|
171
|
-
modelValue: F.value[
|
|
172
|
-
"onUpdate:modelValue": (O) => F.value[
|
|
173
|
+
modelValue: F.value[T].value,
|
|
174
|
+
"onUpdate:modelValue": (O) => F.value[T].value = O,
|
|
173
175
|
rules: [
|
|
174
176
|
(O) => !!O || i(u)("menu.cooking_guide.step_dialog.sections.variables.validation.required")
|
|
175
177
|
],
|
|
@@ -180,7 +182,7 @@ const $e = { class: "flex items-center gap-8" }, Oe = { class: "grow" }, Ee = {
|
|
|
180
182
|
icon: "delete",
|
|
181
183
|
variant: "tertiary",
|
|
182
184
|
"text-color": "neutral-gray-400",
|
|
183
|
-
onClick: () =>
|
|
185
|
+
onClick: () => R(T)
|
|
184
186
|
}, null, 8, ["onClick"])
|
|
185
187
|
]))), 128))
|
|
186
188
|
])
|
|
@@ -192,17 +194,17 @@ const $e = { class: "flex items-center gap-8" }, Oe = { class: "grow" }, Ee = {
|
|
|
192
194
|
}, {
|
|
193
195
|
default: p(() => [
|
|
194
196
|
a("div", Ue, [
|
|
195
|
-
a("div",
|
|
196
|
-
(k(!0),
|
|
197
|
-
key:
|
|
198
|
-
label:
|
|
197
|
+
a("div", Be, [
|
|
198
|
+
(k(!0), $(z, null, H(h.value, (M) => (k(), Y(P, {
|
|
199
|
+
key: M.label,
|
|
200
|
+
label: M.label,
|
|
199
201
|
class: "text-fm-color-primary bg-fm-color-system-warning-100",
|
|
200
|
-
onMousedown: le(() => G(
|
|
202
|
+
onMousedown: le(() => G(M.label), ["prevent"])
|
|
201
203
|
}, null, 8, ["label", "onMousedown"]))), 128))
|
|
202
204
|
]),
|
|
203
205
|
l(W, {
|
|
204
206
|
modelValue: m.value.instruction,
|
|
205
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
207
|
+
"onUpdate:modelValue": t[0] || (t[0] = (M) => m.value.instruction = M),
|
|
206
208
|
ref: "textareaRef"
|
|
207
209
|
}, null, 8, ["modelValue"])
|
|
208
210
|
])
|
|
@@ -215,16 +217,16 @@ const $e = { class: "flex items-center gap-8" }, Oe = { class: "grow" }, Ee = {
|
|
|
215
217
|
}, 8, ["modelValue", "header", "is-container", "is-container-props", "onOn:clickedAway"]);
|
|
216
218
|
};
|
|
217
219
|
}
|
|
218
|
-
}), ze = { class: "w-[700px]" },
|
|
220
|
+
}), ze = { class: "w-[700px]" }, Ae = { class: "flex bg-fm-color-neutral-gray-100" }, Re = { class: "px-16 py-8 grow" }, Pe = { class: "px-16 py-8 w-[200px]" }, qe = { class: "px-16 py-8 w-[200px]" }, je = { class: "px-16 py-8 grow" }, Ye = { class: "px-16 py-8 w-[200px] flex flex-col gap-8" }, He = { class: "px-16 py-8 w-[200px] flex flex-col gap-8" }, Xe = /* @__PURE__ */ ae({
|
|
219
221
|
__name: "CookingGuideStepOverrideDialog",
|
|
220
222
|
emits: ["onComplete"],
|
|
221
|
-
setup(L, { expose: g, emit:
|
|
223
|
+
setup(L, { expose: g, emit: X }) {
|
|
222
224
|
const { t: u } = se();
|
|
223
225
|
g({
|
|
224
226
|
show: d,
|
|
225
|
-
hide:
|
|
227
|
+
hide: I
|
|
226
228
|
});
|
|
227
|
-
const N =
|
|
229
|
+
const N = X;
|
|
228
230
|
function D() {
|
|
229
231
|
return {
|
|
230
232
|
productId: "",
|
|
@@ -235,26 +237,26 @@ const $e = { class: "flex items-center gap-8" }, Oe = { class: "grow" }, Ee = {
|
|
|
235
237
|
function d(h) {
|
|
236
238
|
U.value = h.itemName, E.value = h.steps, m.value = h.bindings ? ee(h.bindings) : D(), C.value = !0;
|
|
237
239
|
}
|
|
238
|
-
function
|
|
240
|
+
function I() {
|
|
239
241
|
C.value = !1;
|
|
240
242
|
}
|
|
241
243
|
const m = w(D()), F = V(() => m.value.overrides.reduce((h, n) => (h[n.id] = n, h), {}));
|
|
242
|
-
function
|
|
244
|
+
function J(h, n) {
|
|
243
245
|
var s;
|
|
244
246
|
return ((s = F.value[h]) == null ? void 0 : s.variables[n]) ?? "";
|
|
245
247
|
}
|
|
246
|
-
function
|
|
247
|
-
const K = m.value.overrides.findIndex((
|
|
248
|
+
function R(h, n, s) {
|
|
249
|
+
const K = m.value.overrides.findIndex((B) => B.id === h);
|
|
248
250
|
s ? K < 0 ? m.value.overrides.push({
|
|
249
251
|
id: h,
|
|
250
252
|
variables: { [n]: s }
|
|
251
253
|
}) : m.value.overrides[K].variables[n] = s : K >= 0 && (delete m.value.overrides[K].variables[n], Object.keys(m.value.overrides[K].variables).length || m.value.overrides.splice(K, 1));
|
|
252
254
|
}
|
|
253
255
|
function G() {
|
|
254
|
-
|
|
256
|
+
I(), N("onComplete", m.value);
|
|
255
257
|
}
|
|
256
258
|
return (h, n) => {
|
|
257
|
-
const s = x("FmTextField"), K = x("FmSpacer"),
|
|
259
|
+
const s = x("FmTextField"), K = x("FmSpacer"), B = x("FmButton"), v = x("FmDialog");
|
|
258
260
|
return k(), Y(v, {
|
|
259
261
|
modelValue: C.value,
|
|
260
262
|
"onUpdate:modelValue": n[0] || (n[0] = (t) => C.value = t),
|
|
@@ -267,14 +269,14 @@ const $e = { class: "flex items-center gap-8" }, Oe = { class: "grow" }, Ee = {
|
|
|
267
269
|
]),
|
|
268
270
|
"dialog-footer": p(() => [
|
|
269
271
|
l(K),
|
|
270
|
-
l(
|
|
272
|
+
l(B, {
|
|
271
273
|
class: "sm:w-full xs:w-full",
|
|
272
274
|
label: i(u)("menu.cooking_guide.step_override_dialog.actions.cancel"),
|
|
273
275
|
size: "md",
|
|
274
276
|
variant: "tertiary",
|
|
275
|
-
onClick:
|
|
277
|
+
onClick: I
|
|
276
278
|
}, null, 8, ["label"]),
|
|
277
|
-
l(
|
|
279
|
+
l(B, {
|
|
278
280
|
class: "sm:w-full xs:w-full",
|
|
279
281
|
label: i(u)("menu.cooking_guide.step_override_dialog.actions.save"),
|
|
280
282
|
size: "md",
|
|
@@ -284,28 +286,28 @@ const $e = { class: "flex items-center gap-8" }, Oe = { class: "grow" }, Ee = {
|
|
|
284
286
|
]),
|
|
285
287
|
default: p(() => [
|
|
286
288
|
a("div", ze, [
|
|
287
|
-
a("div",
|
|
288
|
-
a("div",
|
|
289
|
+
a("div", Ae, [
|
|
290
|
+
a("div", Re, S(i(u)("menu.cooking_guide.step_override_dialog.columns.instructions")), 1),
|
|
289
291
|
a("div", Pe, S(i(u)("menu.cooking_guide.step_override_dialog.columns.variables")), 1),
|
|
290
292
|
a("div", qe, S(i(u)("menu.cooking_guide.step_override_dialog.columns.value")), 1)
|
|
291
293
|
]),
|
|
292
|
-
(k(!0),
|
|
294
|
+
(k(!0), $(z, null, H(E.value, (t) => (k(), $("div", {
|
|
293
295
|
key: t.id,
|
|
294
296
|
class: "flex border-t-2"
|
|
295
297
|
}, [
|
|
296
298
|
a("div", je, S(t.instruction), 1),
|
|
297
299
|
a("div", Ye, [
|
|
298
|
-
(k(!0),
|
|
300
|
+
(k(!0), $(z, null, H(t.variables, (f, _) => (k(), $("div", {
|
|
299
301
|
key: _,
|
|
300
302
|
class: "py-8 w-full text-ellipsis overflow-hidden whitespace-nowrap"
|
|
301
303
|
}, S(_), 1))), 128))
|
|
302
304
|
]),
|
|
303
305
|
a("div", He, [
|
|
304
|
-
(k(!0),
|
|
306
|
+
(k(!0), $(z, null, H(t.variables, (f, _) => (k(), $("div", { key: _ }, [
|
|
305
307
|
l(s, {
|
|
306
|
-
"model-value":
|
|
308
|
+
"model-value": J(t.id, _.toString()),
|
|
307
309
|
placeholder: f,
|
|
308
|
-
"onUpdate:modelValue": (P) =>
|
|
310
|
+
"onUpdate:modelValue": (P) => R(t.id, _.toString(), P)
|
|
309
311
|
}, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])
|
|
310
312
|
]))), 128))
|
|
311
313
|
])
|
|
@@ -316,7 +318,7 @@ const $e = { class: "flex items-center gap-8" }, Oe = { class: "grow" }, Ee = {
|
|
|
316
318
|
}, 8, ["modelValue"]);
|
|
317
319
|
};
|
|
318
320
|
}
|
|
319
|
-
}),
|
|
321
|
+
}), Je = { class: "fm-typo-en-title-md-600" }, Qe = { class: "space-y-24" }, We = { class: "flex items-center" }, Ze = { class: "flex-1" }, eo = { class: "flex items-center gap-8" }, oo = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, to = { class: "flex-1" }, no = { class: "bg-fm-color-neutral-gray-100 px-16 py-8" }, io = { class: "px-16 py-8 flex-1 flex gap-4 overflow-auto min-w-0" }, lo = { class: "fm-typo-en-body-md-500" }, ao = { class: "px-16 py-8 flex gap-8" }, so = { class: "flex gap-8 items-center justify-start" }, uo = /* @__PURE__ */ ae({
|
|
320
322
|
__name: "CookingGuideDialog",
|
|
321
323
|
props: {
|
|
322
324
|
categorizedItems: {
|
|
@@ -329,7 +331,7 @@ const $e = { class: "flex items-center gap-8" }, Oe = { class: "grow" }, Ee = {
|
|
|
329
331
|
}
|
|
330
332
|
},
|
|
331
333
|
emits: ["onSave"],
|
|
332
|
-
setup(L, { expose: g, emit:
|
|
334
|
+
setup(L, { expose: g, emit: X }) {
|
|
333
335
|
const u = L;
|
|
334
336
|
g({
|
|
335
337
|
showModal: U,
|
|
@@ -350,19 +352,19 @@ const $e = { class: "flex items-center gap-8" }, Oe = { class: "grow" }, Ee = {
|
|
|
350
352
|
function E() {
|
|
351
353
|
D.value = !1;
|
|
352
354
|
}
|
|
353
|
-
const d = w(N()),
|
|
355
|
+
const d = w(N()), I = w();
|
|
354
356
|
function m() {
|
|
355
357
|
var e;
|
|
356
|
-
(e =
|
|
358
|
+
(e = I.value) == null || e.show();
|
|
357
359
|
}
|
|
358
360
|
function F(e) {
|
|
359
361
|
var o;
|
|
360
|
-
(o =
|
|
362
|
+
(o = I.value) == null || o.show(e);
|
|
361
363
|
}
|
|
362
|
-
function
|
|
364
|
+
function J(e) {
|
|
363
365
|
d.value.steps.splice(e, 1);
|
|
364
366
|
}
|
|
365
|
-
function
|
|
367
|
+
function R(e) {
|
|
366
368
|
if (!e.id)
|
|
367
369
|
d.value.steps.push({ ...e, id: (/* @__PURE__ */ new Date()).toISOString() });
|
|
368
370
|
else {
|
|
@@ -416,7 +418,7 @@ const $e = { class: "flex items-center gap-8" }, Oe = { class: "grow" }, Ee = {
|
|
|
416
418
|
bindings: h(e.itemId, e.combinationKey)
|
|
417
419
|
});
|
|
418
420
|
}
|
|
419
|
-
function
|
|
421
|
+
function B({ productId: e, combinationKey: o, overrides: b }) {
|
|
420
422
|
const r = d.value.bindings.map((c) => ({
|
|
421
423
|
...c,
|
|
422
424
|
overrides: c.productId === e && c.combinationKey == o ? b : c.overrides
|
|
@@ -434,7 +436,7 @@ const $e = { class: "flex items-center gap-8" }, Oe = { class: "grow" }, Ee = {
|
|
|
434
436
|
const b = e[o.productId] ?? [];
|
|
435
437
|
return o.combinationKey ? e[o.productId] = [...b, o.combinationKey] : e[o.productId] = [], e;
|
|
436
438
|
}, {})
|
|
437
|
-
), q = w(""),
|
|
439
|
+
), q = w(""), M = V(() => u.categorizedItems.reduce((e, o) => {
|
|
438
440
|
var b, r;
|
|
439
441
|
for (const c of o.items)
|
|
440
442
|
(b = c.variant) != null && b.variantGroupIds.length && ((r = c.variant) == null ? void 0 : r.variantGroupIds.length) > 0 ? e = [
|
|
@@ -455,17 +457,17 @@ const $e = { class: "flex items-center gap-8" }, Oe = { class: "grow" }, Ee = {
|
|
|
455
457
|
itemName: c.name
|
|
456
458
|
});
|
|
457
459
|
return e;
|
|
458
|
-
}, [])),
|
|
460
|
+
}, [])), T = V(() => M.value.filter((e) => {
|
|
459
461
|
const o = W.value[e.itemId];
|
|
460
462
|
return !!o && (!e.combinationKey || o.includes(e.combinationKey));
|
|
461
463
|
})), O = V(() => {
|
|
462
464
|
const e = q.value.toLowerCase();
|
|
463
|
-
return e ?
|
|
465
|
+
return e ? T.value.filter(
|
|
464
466
|
(o) => {
|
|
465
467
|
var b;
|
|
466
468
|
return ((b = o.itemCode) == null ? void 0 : b.toLowerCase().includes(e)) || o.itemName.toLowerCase().includes(e) || o.categoryName.toLowerCase().includes(e);
|
|
467
469
|
}
|
|
468
|
-
) :
|
|
470
|
+
) : T.value;
|
|
469
471
|
}), de = V(() => O.value.reduce(
|
|
470
472
|
(e, o) => {
|
|
471
473
|
const b = e.findIndex((r) => r.id === o.categoryId);
|
|
@@ -479,7 +481,7 @@ const $e = { class: "flex items-center gap-8" }, Oe = { class: "grow" }, Ee = {
|
|
|
479
481
|
}, e;
|
|
480
482
|
},
|
|
481
483
|
[]
|
|
482
|
-
)), ge =
|
|
484
|
+
)), ge = X;
|
|
483
485
|
w();
|
|
484
486
|
const _e = pe(
|
|
485
487
|
() => !me.isEqual(C.value, d.value),
|
|
@@ -492,7 +494,7 @@ const $e = { class: "flex items-center gap-8" }, Oe = { class: "grow" }, Ee = {
|
|
|
492
494
|
}
|
|
493
495
|
return (e, o) => {
|
|
494
496
|
const b = x("FmTextField"), r = x("FmButton"), c = x("FmCardSection"), Q = x("FmCard"), te = x("FmSpacer"), ne = x("FmSearch"), ie = x("FmSideSheet");
|
|
495
|
-
return k(),
|
|
497
|
+
return k(), $(z, null, [
|
|
496
498
|
l(ie, {
|
|
497
499
|
modelValue: D.value,
|
|
498
500
|
"onUpdate:modelValue": o[4] || (o[4] = (y) => D.value = y),
|
|
@@ -507,7 +509,7 @@ const $e = { class: "flex items-center gap-8" }, Oe = { class: "grow" }, Ee = {
|
|
|
507
509
|
"onOn:clickedAway": i(_e)
|
|
508
510
|
}, {
|
|
509
511
|
"side-sheet-header": p(() => [
|
|
510
|
-
a("span",
|
|
512
|
+
a("span", Je, S(f.value), 1)
|
|
511
513
|
]),
|
|
512
514
|
"side-sheet-footer": p(() => [
|
|
513
515
|
a("div", so, [
|
|
@@ -589,7 +591,7 @@ const $e = { class: "flex items-center gap-8" }, Oe = { class: "grow" }, Ee = {
|
|
|
589
591
|
l(r, {
|
|
590
592
|
icon: "delete",
|
|
591
593
|
variant: "tertiary",
|
|
592
|
-
onClick: le(() =>
|
|
594
|
+
onClick: le(() => J(j), ["stop"])
|
|
593
595
|
}, null, 8, ["onClick"])
|
|
594
596
|
]),
|
|
595
597
|
_: 2
|
|
@@ -643,11 +645,11 @@ const $e = { class: "flex items-center gap-8" }, Oe = { class: "grow" }, Ee = {
|
|
|
643
645
|
}, null, 8, ["modelValue", "placeholder"])
|
|
644
646
|
])
|
|
645
647
|
]),
|
|
646
|
-
(k(!0),
|
|
648
|
+
(k(!0), $(z, null, H(de.value, (y) => (k(), $("div", {
|
|
647
649
|
key: y.id || ""
|
|
648
650
|
}, [
|
|
649
651
|
a("div", no, S(y.name), 1),
|
|
650
|
-
(k(!0),
|
|
652
|
+
(k(!0), $(z, null, H(y.items, (j) => (k(), $("div", {
|
|
651
653
|
key: j.itemId,
|
|
652
654
|
class: "flex items-center"
|
|
653
655
|
}, [
|
|
@@ -675,15 +677,15 @@ const $e = { class: "flex items-center gap-8" }, Oe = { class: "grow" }, Ee = {
|
|
|
675
677
|
]),
|
|
676
678
|
_: 1
|
|
677
679
|
}, 8, ["modelValue", "header", "is-container", "is-container-props", "onOn:clickedAway"]),
|
|
678
|
-
l(
|
|
680
|
+
l(Te, {
|
|
679
681
|
ref_key: "cookingGuideStepDialogRef",
|
|
680
|
-
ref:
|
|
681
|
-
onOnComplete:
|
|
682
|
+
ref: I,
|
|
683
|
+
onOnComplete: R
|
|
682
684
|
}, null, 512),
|
|
683
|
-
l(
|
|
685
|
+
l(Xe, {
|
|
684
686
|
ref_key: "cookingGuideStepOverrideDialogRef",
|
|
685
687
|
ref: s,
|
|
686
|
-
onOnComplete:
|
|
688
|
+
onOnComplete: B
|
|
687
689
|
}, null, 512)
|
|
688
690
|
], 64);
|
|
689
691
|
};
|
|
@@ -722,12 +724,12 @@ const po = {
|
|
|
722
724
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
723
725
|
}, bo = {
|
|
724
726
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
725
|
-
},
|
|
727
|
+
}, Do = /* @__PURE__ */ ae({
|
|
726
728
|
__name: "CookingGuide",
|
|
727
729
|
setup(L) {
|
|
728
730
|
const {
|
|
729
731
|
t: g
|
|
730
|
-
} = se(),
|
|
732
|
+
} = se(), X = V(() => [{
|
|
731
733
|
accessorKey: "name",
|
|
732
734
|
header: () => g("menu.cooking_guide.table.columns.name"),
|
|
733
735
|
cell: (n) => n.getValue(),
|
|
@@ -761,18 +763,18 @@ const po = {
|
|
|
761
763
|
headerContentClass: "-mx-16"
|
|
762
764
|
},
|
|
763
765
|
enableSorting: !1,
|
|
764
|
-
cell: (n) =>
|
|
766
|
+
cell: (n) => A("div", {
|
|
765
767
|
class: "flex justify-end"
|
|
766
|
-
}, [
|
|
768
|
+
}, [A(ue.FmButton, {
|
|
767
769
|
icon: "delete",
|
|
768
770
|
textColor: "neutral-gray-400",
|
|
769
771
|
variant: "tertiary",
|
|
770
772
|
onClick: le(() => {
|
|
771
|
-
|
|
773
|
+
R(n.row.original);
|
|
772
774
|
}, ["stop", "prevent"])
|
|
773
775
|
})])
|
|
774
776
|
}]), u = xe(), N = V(() => E.checkMenuIsLoading()), D = V(() => u.categorizedItems), C = V(() => u.state.menu.modules.cookingGuide), U = V(() => C.value.length > 0), E = Ce(we(be())), d = w();
|
|
775
|
-
function
|
|
777
|
+
function I() {
|
|
776
778
|
var n;
|
|
777
779
|
N.value || (n = d.value) == null || n.showModal();
|
|
778
780
|
}
|
|
@@ -784,16 +786,16 @@ const po = {
|
|
|
784
786
|
const s = n._id ? co(n) : ro(n);
|
|
785
787
|
await E.updateMenu(s, n.name);
|
|
786
788
|
}
|
|
787
|
-
const
|
|
788
|
-
async function
|
|
789
|
-
let s = [
|
|
789
|
+
const J = ye();
|
|
790
|
+
async function R(n) {
|
|
791
|
+
let s = [A("span", g("menu.cooking_guide.dialogs.remove.message.prefix")), A("span", {
|
|
790
792
|
class: "fm-typo-en-body-lg-600"
|
|
791
|
-
}, n.name),
|
|
792
|
-
n.bindings.length && (s = [
|
|
793
|
+
}, n.name), A("span", "?")];
|
|
794
|
+
n.bindings.length && (s = [A("span", g("menu.cooking_guide.dialogs.remove.message.products_using")), A("span", {
|
|
793
795
|
class: "fm-typo-en-body-lg-600"
|
|
794
|
-
}, n.bindings.length),
|
|
796
|
+
}, n.bindings.length), A("span", g("menu.cooking_guide.dialogs.remove.message.products_count")), ...s]), J.open({
|
|
795
797
|
title: g("menu.cooking_guide.dialogs.remove.title"),
|
|
796
|
-
contentComponent:
|
|
798
|
+
contentComponent: A("div", s),
|
|
797
799
|
primaryActions: {
|
|
798
800
|
text: g("menu.cooking_guide.actions.remove"),
|
|
799
801
|
close: !0,
|
|
@@ -812,8 +814,8 @@ const po = {
|
|
|
812
814
|
return n ? C.value.filter((s) => s.name.toLowerCase().includes(n)) : C.value;
|
|
813
815
|
});
|
|
814
816
|
return (n, s) => {
|
|
815
|
-
const K = x("FmSearch"),
|
|
816
|
-
return k(), Y(
|
|
817
|
+
const K = x("FmSearch"), B = x("FmTable"), v = x("FmButton"), t = x("FmListItem"), f = x("FmList");
|
|
818
|
+
return k(), Y($e, {
|
|
817
819
|
heading: i(g)("menu.cooking_guide.title")
|
|
818
820
|
}, {
|
|
819
821
|
"append-heading": p(() => [a("div", po, [U.value ? (k(), Y(ke, {
|
|
@@ -822,9 +824,9 @@ const po = {
|
|
|
822
824
|
icon: "add",
|
|
823
825
|
label: i(g)("menu.cooking_guide.actions.add"),
|
|
824
826
|
variant: "primary",
|
|
825
|
-
onClick: s[0] || (s[0] = () =>
|
|
827
|
+
onClick: s[0] || (s[0] = () => I())
|
|
826
828
|
}, null, 8, ["disabled", "label"])) : ce("", !0)])]),
|
|
827
|
-
default: p(() => [U.value ? (k(),
|
|
829
|
+
default: p(() => [U.value ? (k(), $(z, {
|
|
828
830
|
key: 1
|
|
829
831
|
}, [a("div", go, [l(K, {
|
|
830
832
|
modelValue: G.value,
|
|
@@ -835,8 +837,8 @@ const po = {
|
|
|
835
837
|
}, null, 8, ["modelValue", "placeholder"])]), l(he, {
|
|
836
838
|
class: "xs:hidden block"
|
|
837
839
|
}, {
|
|
838
|
-
default: p(() => [l(
|
|
839
|
-
"column-defs":
|
|
840
|
+
default: p(() => [l(B, {
|
|
841
|
+
"column-defs": X.value,
|
|
840
842
|
loading: N.value,
|
|
841
843
|
"page-size": C.value.length,
|
|
842
844
|
"row-data": C.value,
|
|
@@ -851,7 +853,7 @@ const po = {
|
|
|
851
853
|
class: "w-full px-16 xs:block hidden flex-1 min-h-0 overflow-scroll pb-64",
|
|
852
854
|
separator: ""
|
|
853
855
|
}, {
|
|
854
|
-
default: p(() => [(k(!0),
|
|
856
|
+
default: p(() => [(k(!0), $(z, null, H(h.value, (_) => (k(), Y(t, {
|
|
855
857
|
key: _._id,
|
|
856
858
|
label: _.name,
|
|
857
859
|
style: {
|
|
@@ -868,7 +870,7 @@ const po = {
|
|
|
868
870
|
icon: "delete",
|
|
869
871
|
variant: "tertiary",
|
|
870
872
|
"text-color": "neutral-gray-400",
|
|
871
|
-
onClick: le(() =>
|
|
873
|
+
onClick: le(() => R(_), ["stop"])
|
|
872
874
|
}, null, 8, ["disabled", "onClick"])]),
|
|
873
875
|
_: 2
|
|
874
876
|
}, 1032, ["label", "onClick"]))), 128))]),
|
|
@@ -877,7 +879,7 @@ const po = {
|
|
|
877
879
|
key: 0,
|
|
878
880
|
action: {
|
|
879
881
|
text: i(g)("menu.cooking_guide.empty.action"),
|
|
880
|
-
callback: () =>
|
|
882
|
+
callback: () => I()
|
|
881
883
|
},
|
|
882
884
|
subtitle: i(g)("menu.cooking_guide.empty.subtitle"),
|
|
883
885
|
title: i(g)("menu.cooking_guide.empty.title")
|
|
@@ -893,5 +895,5 @@ const po = {
|
|
|
893
895
|
}
|
|
894
896
|
});
|
|
895
897
|
export {
|
|
896
|
-
|
|
898
|
+
Do as default
|
|
897
899
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as ft, computed as Le, createBlock as ue, openBlock as T, unref as Fe, withCtx as je, renderSlot as Ws, mergeModels as Ls, useModel as ry, ref as be, createElementBlock as ne, onMounted as ay, Fragment as we, createCommentVNode as xe, watch as Ar, resolveComponent as K, createElementVNode as te, createVNode as U, renderList as ct, toDisplayString as $t, mergeProps as iy, normalizeClass as uy, withModifiers as oy } from "vue";
|
|
2
2
|
import { useI18n as qs } from "@feedmepos/mf-common";
|
|
3
3
|
import { _ as sy } from "./MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js";
|
|
4
|
-
import { u as ly } from "./menu-
|
|
4
|
+
import { u as ly } from "./menu-CsIzrBEr.js";
|
|
5
5
|
import { useBreakpoints as Ks, useDialog as cy, useDialogChild as fy } from "@feedmepos/ui-library";
|
|
6
6
|
import { _ as Qi } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
|
|
7
7
|
const Eg = /* @__PURE__ */ ft({
|
|
@@ -2,9 +2,9 @@ import { defineComponent as m, ref as p, createBlock as i, openBlock as d, unref
|
|
|
2
2
|
import { useI18n as _ } from "@feedmepos/mf-common";
|
|
3
3
|
import { _ as f } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
4
4
|
import { _ as g } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
5
|
-
import { _ as y } from "./Group.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import { A as b } from "./item-
|
|
7
|
-
import { a as h } from "./menu-
|
|
5
|
+
import { _ as y } from "./Group.vue_vue_type_script_setup_true_lang-Dj9ZmkYe.js";
|
|
6
|
+
import { A as b } from "./item-BAqzKh4O.js";
|
|
7
|
+
import { a as h } from "./menu-CDrsBjmr.js";
|
|
8
8
|
const v = { class: "flex-1 flex justify-between gap-8 pl-8" }, x = { class: "flex items-center" }, k = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, C = { class: "fm-typo-en-body-md-600 font-semibold" }, j = /* @__PURE__ */ m({
|
|
9
9
|
__name: "Group",
|
|
10
10
|
setup(N) {
|