@feedmepos/mf-menu 0.32.7-dev → 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-DCkQc7e4.js → App-B5S9byVJ.js} +5456 -4621
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-uzmq3vwy.js → ApplyProduct.vue_vue_type_script_setup_true_lang-bSXFWpq_.js} +3 -3
- package/dist/{Catalog-CUPoRid3.js → Catalog-CTfF5FmI.js} +52 -52
- package/dist/{Category-BkvhZ57Y.js → Category-BntCVeoT.js} +57 -57
- package/dist/{Category-Cdw0ikhP.js → Category-Z3bphlCX.js} +26 -26
- package/dist/{CookingGuide-BZ-4oULM.js → CookingGuide-CoPo2Alx.js} +127 -127
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-CJvVFWdR.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-DJ3sb3XV.js} +1 -1
- package/dist/{Group-Cec83DWm.js → Group-B7rZfFlT.js} +3 -3
- package/dist/{Group-C1FaXdUb.js → Group-CblWJOl1.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-2_lLBdX2.js → Group.vue_vue_type_script_setup_true_lang-wX7yqw0Z.js} +33 -33
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BEDyKWhK.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DW1gBCBA.js} +27 -27
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-BteTvMnx.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CcQBD0I8.js} +7 -7
- package/dist/{Ingredient-DulL8h2B.js → Ingredient-Bn-jeNeI.js} +46 -46
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-DoBx7Dal.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DbGNFA3D.js} +2 -2
- package/dist/{LinkProductSideSheet-Br2eE8pC.js → LinkProductSideSheet-BjcQDT4U.js} +61 -61
- package/dist/{MenuSetting-DxW4LCW4.js → MenuSetting-BT5YSMgK.js} +14 -14
- package/dist/{PrintRoute-Da6Zkx-0.js → PrintRoute-B0j0eqNM.js} +34 -34
- package/dist/{Product-Cs76t18_.js → Product-BOMprFhc.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-C6SOu4Vv.js → Product.vue_vue_type_script_setup_true_lang-q9xFzQ0v.js} +142 -142
- package/dist/{ProductInternalTools-DPbeRvTM.js → ProductInternalTools-O5d2jMAH.js} +39 -39
- package/dist/{Products--7dGfuuT.js → Products-BnMrK40x.js} +15 -15
- package/dist/{Publish-COmZtiyX.js → Publish-dTP5mQS3.js} +26 -26
- package/dist/{Recipe-BaN_1zrP.js → Recipe-DnftcZPO.js} +26 -26
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-DputprQj.js → RuleView.vue_vue_type_script_setup_true_lang-DSfiVSBV.js} +2 -2
- package/dist/{Scheduler-BSUpIAaK.js → Scheduler-DRLaQK_V.js} +22 -22
- package/dist/{ServingSequence-dXBb7e5d.js → ServingSequence-CPIyJ7T8.js} +39 -39
- package/dist/{Setting-CalEQW0n.js → Setting-CLtISC4c.js} +22 -22
- package/dist/{Subcategory-zPHtX7Vc.js → Subcategory-b0bXCYYY.js} +32 -32
- package/dist/{Takeaway-CRDj2Bpe.js → Takeaway-CCIKDCoF.js} +12 -12
- package/dist/{Takeaway-CcnmeTmu.js → Takeaway-h9uUxFJd.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-Cj7vyOaP.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-B0552qsN.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-C7-Oj5S3.js → Unit-B0kiwrN6.js} +13 -13
- package/dist/{Variant-CYiMkE0q.js → Variant-CJSk0kTW.js} +18 -18
- package/dist/{_id_-D75ZcNlf.js → _id_-108G3lsv.js} +22 -22
- package/dist/{app-DzVMOviz.js → app-BTn28hDr.js} +1 -1
- package/dist/{app-BhLVpUSl.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/{linked-status-BoIPm5hC.js → linked-status-Bp5piT25.js} +2 -2
- package/dist/assets/{override-menu-DfTrwWpR.js → override-menu-D47qVZAi.js} +2 -2
- package/dist/assets/{validate-menu-BhWvQ3T9.js → validate-menu-YuXYm9iE.js} +2 -2
- package/dist/{catalog-CudNSsIP.js → catalog-CpFTifAS.js} +1 -1
- package/dist/{catalogSetting-BVHO9tK3.js → catalogSetting-DjGqI2Vf.js} +1 -1
- package/dist/{category-BQpgz1lk.js → category-DaRWiQd8.js} +5 -5
- package/dist/{currency-BfS7H2KE.js → currency-DbURufyM.js} +1 -1
- package/dist/{index-aaoziUNI.js → index-C6AkIinM.js} +1 -1
- package/dist/{index-DmGJvREM.js → index-D67GKEzf.js} +1 -1
- package/dist/{index-DuLXS699.js → index-kjRAsH_h.js} +38 -38
- package/dist/{index-BHdPJta4.js → index-pJtym1c6.js} +21 -21
- package/dist/{index.vue_vue_type_script_setup_true_lang-Dje9kp-F.js → index.vue_vue_type_script_setup_true_lang-BvohjQ00.js} +438 -428
- package/dist/item-2WoPAnNJ.js +6838 -0
- package/dist/{iteration-CaliNodx.js → iteration-BGItxpWj.js} +1 -1
- package/dist/{jszip.min-DXbkmgRD.js → jszip.min-D8NeBCPG.js} +2 -2
- package/dist/{menu-D-lUEuvX.js → menu-DVdMR0zo.js} +1 -1
- package/dist/{menuV2-D-6O36DO.js → menuV2-CcBdUc80.js} +41 -41
- package/dist/mf-menu.css +1 -1
- package/dist/{priceTier-DKnYaOA9.js → priceTier-CTfRyTuS.js} +1 -1
- package/dist/{scheduler-DEwfbYPL.js → scheduler-DOMDX4d7.js} +20 -20
- package/dist/{subcategory-CQKklgcd.js → subcategory-NsslZ1my.js} +6 -6
- package/dist/{toExcel-CRwL-QqF.js → toExcel-Bdne-Dw_.js} +2 -2
- package/dist/{unit-BzM1rmN7.js → unit-DKyvdauo.js} +29 -29
- package/package.json +1 -1
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BwnyIDNH.js +0 -6038
- package/dist/item-BtKW0wdj.js +0 -7685
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as L, ref as w, watch as W, resolveComponent as y, createElementBlock as V, openBlock as p, Fragment as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { useSnackbar as
|
|
1
|
+
import { defineComponent as L, ref as w, watch as W, resolveComponent as y, createElementBlock as V, openBlock as p, Fragment as I, renderSlot as X, createVNode as m, unref as t, withCtx as h, createElementVNode as s, toDisplayString as T, computed as F, h as U, withModifiers as P, getCurrentInstance as Z, renderList as ee, createBlock as S, createCommentVNode as te } from "vue";
|
|
2
|
+
import { useI18n as B } from "@feedmepos/mf-common";
|
|
3
|
+
import { useSnackbar as O, components as j, useDialog as K, FmButtonVariant as R, useBreakpoints as ae, FmButtonColorThemeVariant as oe } from "@feedmepos/ui-library";
|
|
4
4
|
import { _ as ne } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
5
|
-
import { D, u as N,
|
|
5
|
+
import { G as D, u as N, P as A, K as Y, A as G, a3 as le } from "./index.vue_vue_type_script_setup_true_lang-BvohjQ00.js";
|
|
6
6
|
import { _ as se } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
7
|
-
import { _ as re } from "./app-
|
|
7
|
+
import { _ as re } from "./app-CPJH5bgs.js";
|
|
8
8
|
import { c as ie } from "./createForm-BoUQeZTd.js";
|
|
9
9
|
import { u as ce } from "./discardConfirm-BHni0LNu.js";
|
|
10
|
-
import { c as
|
|
10
|
+
import { c as z } from "./object-DVUNCr7w.js";
|
|
11
11
|
import { r as ue } from "./rules-CIWTZQfh.js";
|
|
12
12
|
import { c as de } from "./check-C9mY6LiX.js";
|
|
13
|
-
import { u as
|
|
14
|
-
import { a as me } from "./menu-
|
|
13
|
+
import { u as q } from "./subcategory-NsslZ1my.js";
|
|
14
|
+
import { a as me } from "./menu-DVdMR0zo.js";
|
|
15
15
|
const pe = {
|
|
16
16
|
class: "fm-typo-en-title-md-600"
|
|
17
17
|
}, _e = {
|
|
@@ -26,11 +26,11 @@ const pe = {
|
|
|
26
26
|
setup($, {
|
|
27
27
|
expose: f
|
|
28
28
|
}) {
|
|
29
|
-
const _ = $, x =
|
|
29
|
+
const _ = $, x = O(), g = D(x), k = A(g), d = N(), {
|
|
30
30
|
t: a
|
|
31
|
-
} =
|
|
31
|
+
} = B(), v = w(!1), e = w(!1), b = (r) => {
|
|
32
32
|
de.isBoolean(r) ? e.value = r : e.value = !e.value;
|
|
33
|
-
}, n = w(
|
|
33
|
+
}, n = w(z(_.initialValue)), M = ce(() => n.value.name !== _.initialValue.name, () => {
|
|
34
34
|
e.value = !1;
|
|
35
35
|
});
|
|
36
36
|
async function E() {
|
|
@@ -38,8 +38,8 @@ const pe = {
|
|
|
38
38
|
updateMenu: c
|
|
39
39
|
} = k;
|
|
40
40
|
await c({
|
|
41
|
-
module:
|
|
42
|
-
operation:
|
|
41
|
+
module: G.F_MENU_MODULE_V4_KEY.enum.subCategory,
|
|
42
|
+
operation: Y.F_OPERATION_TYPE.update,
|
|
43
43
|
// @ts-ignore FIXME: The backend hasn't exported SubcategoryRequest yet. Fix this once it's available.
|
|
44
44
|
data: {
|
|
45
45
|
...r,
|
|
@@ -48,13 +48,13 @@ const pe = {
|
|
|
48
48
|
}, n.value.name), b(!1);
|
|
49
49
|
}
|
|
50
50
|
return W(() => e.value, () => {
|
|
51
|
-
e.value && (n.value =
|
|
51
|
+
e.value && (n.value = z(_.initialValue));
|
|
52
52
|
}), f({
|
|
53
53
|
trigger: b,
|
|
54
54
|
show: e
|
|
55
55
|
}), (r, c) => {
|
|
56
56
|
const C = y("FmTextField"), o = y("fm-button"), l = y("fm-side-sheet");
|
|
57
|
-
return p(), V(
|
|
57
|
+
return p(), V(I, null, [X(r.$slots, "default", {
|
|
58
58
|
trigger: b
|
|
59
59
|
}), m(l, {
|
|
60
60
|
id: "group-form",
|
|
@@ -68,7 +68,7 @@ const pe = {
|
|
|
68
68
|
"max-width": 560,
|
|
69
69
|
"onOn:clickedAway": t(M)
|
|
70
70
|
}, {
|
|
71
|
-
"side-sheet-header": h(() => [s("p", pe,
|
|
71
|
+
"side-sheet-header": h(() => [s("p", pe, T(t(a)("menu.subcategory.title")), 1)]),
|
|
72
72
|
"side-sheet-footer": h(() => [s("div", fe, [m(o, {
|
|
73
73
|
label: t(a)("menu.common.actions.update"),
|
|
74
74
|
loading: v.value,
|
|
@@ -113,12 +113,12 @@ const pe = {
|
|
|
113
113
|
}, Se = /* @__PURE__ */ L({
|
|
114
114
|
__name: "SubcategoryTable",
|
|
115
115
|
setup($) {
|
|
116
|
-
const f =
|
|
116
|
+
const f = K(), _ = O(), x = D(_), g = A(x), k = q({
|
|
117
117
|
dialog: f,
|
|
118
118
|
menuLoader: g
|
|
119
119
|
}), d = F(() => N().subcategories), a = w(""), v = F(() => d.value.filter((o) => o.name.toLowerCase().includes(a.value.toLowerCase()))), {
|
|
120
120
|
t: e
|
|
121
|
-
} =
|
|
121
|
+
} = B(), b = w([{
|
|
122
122
|
accessorKey: "name",
|
|
123
123
|
header: () => e("menu.subcategory.columns.title"),
|
|
124
124
|
enableSorting: !1,
|
|
@@ -135,14 +135,14 @@ const pe = {
|
|
|
135
135
|
header: "",
|
|
136
136
|
cell: (o) => {
|
|
137
137
|
const l = o.row.original;
|
|
138
|
-
return
|
|
138
|
+
return U("div", {
|
|
139
139
|
class: "flex justify-end"
|
|
140
|
-
}, [
|
|
140
|
+
}, [U(j.FmButton, {
|
|
141
141
|
icon: "delete",
|
|
142
142
|
disabled: !l._id,
|
|
143
143
|
variant: "tertiary",
|
|
144
144
|
textColor: "neutral-gray-400",
|
|
145
|
-
onClick:
|
|
145
|
+
onClick: P(async () => {
|
|
146
146
|
await n(l);
|
|
147
147
|
}, ["stop", "prevent"])
|
|
148
148
|
})]);
|
|
@@ -172,8 +172,8 @@ const pe = {
|
|
|
172
172
|
}
|
|
173
173
|
}).onPrimary(async () => {
|
|
174
174
|
await g.updateMenu({
|
|
175
|
-
module:
|
|
176
|
-
operation:
|
|
175
|
+
module: G.F_MENU_MODULE_V4_KEY.enum.subCategory,
|
|
176
|
+
operation: Y.F_OPERATION_TYPE.delete,
|
|
177
177
|
data: o._id
|
|
178
178
|
}, o.name, !0);
|
|
179
179
|
});
|
|
@@ -190,7 +190,7 @@ const pe = {
|
|
|
190
190
|
}
|
|
191
191
|
const c = ae(), C = F(() => c.breakpoints.value.xs);
|
|
192
192
|
return (o, l) => {
|
|
193
|
-
const u = y("FmSearch"),
|
|
193
|
+
const u = y("FmSearch"), H = y("FmTable"), J = y("FmButton");
|
|
194
194
|
return C.value ? (p(), V("div", xe, [s("div", ke, [m(u, {
|
|
195
195
|
autofocus: "",
|
|
196
196
|
modelValue: a.value,
|
|
@@ -199,16 +199,16 @@ const pe = {
|
|
|
199
199
|
placeholder: t(e)("menu.common.labels.search_placeholder", {
|
|
200
200
|
type: "categories"
|
|
201
201
|
})
|
|
202
|
-
}, null, 8, ["modelValue", "placeholder"])]), s("div", Ce, [(p(!0), V(
|
|
202
|
+
}, null, 8, ["modelValue", "placeholder"])]), s("div", Ce, [(p(!0), V(I, null, ee(v.value, (i) => (p(), V("div", {
|
|
203
203
|
key: i._id || "",
|
|
204
204
|
class: "flex flex-row py-12 px-16",
|
|
205
205
|
onClick: (Q) => r(i)
|
|
206
|
-
}, [s("div", we, [s("p", Fe,
|
|
206
|
+
}, [s("div", we, [s("p", Fe, T(i.name), 1)]), m(J, {
|
|
207
207
|
"text-color": t(oe).NeutralGray400,
|
|
208
208
|
variant: t(R).Tertiary,
|
|
209
209
|
"prepend-icon": "delete",
|
|
210
210
|
disabled: !i._id,
|
|
211
|
-
onClick:
|
|
211
|
+
onClick: P((Q) => n(i), ["stop"])
|
|
212
212
|
}, null, 8, ["text-color", "variant", "disabled", "onClick"])], 8, Ve))), 128))])])) : (p(), V("div", be, [s("div", ye, [s("div", he, [m(u, {
|
|
213
213
|
modelValue: a.value,
|
|
214
214
|
"onUpdate:modelValue": l[0] || (l[0] = (i) => a.value = i),
|
|
@@ -218,7 +218,7 @@ const pe = {
|
|
|
218
218
|
type: t(e)("menu.subcategory.title")
|
|
219
219
|
})
|
|
220
220
|
}, null, 8, ["modelValue", "placeholder"])])]), m(re, null, {
|
|
221
|
-
default: h(() => [m(
|
|
221
|
+
default: h(() => [m(H, {
|
|
222
222
|
"column-defs": b.value,
|
|
223
223
|
draggable: !0,
|
|
224
224
|
"page-size": d.value.length,
|
|
@@ -234,10 +234,10 @@ const pe = {
|
|
|
234
234
|
})]));
|
|
235
235
|
};
|
|
236
236
|
}
|
|
237
|
-
}), $e = { class: "flex-1 flex justify-between gap-8 pl-8" }, Me = { class: "flex items-center" }, Ee = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Le = { class: "fm-typo-en-body-md-600 font-semibold" },
|
|
237
|
+
}), $e = { class: "flex-1 flex justify-between gap-8 pl-8" }, Me = { class: "flex items-center" }, Ee = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Le = { class: "fm-typo-en-body-md-600 font-semibold" }, Ge = /* @__PURE__ */ L({
|
|
238
238
|
__name: "Subcategory",
|
|
239
239
|
setup($) {
|
|
240
|
-
const f =
|
|
240
|
+
const f = K(), _ = O(), x = D(_), g = A(x), k = q({ dialog: f, menuLoader: g }), d = F(() => N().subcategories), { t: a } = B();
|
|
241
241
|
function v() {
|
|
242
242
|
k.create();
|
|
243
243
|
}
|
|
@@ -260,7 +260,7 @@ const pe = {
|
|
|
260
260
|
s("div", $e, [
|
|
261
261
|
s("div", Me, [
|
|
262
262
|
s("div", Ee, [
|
|
263
|
-
s("p", Le,
|
|
263
|
+
s("p", Le, T(e.value), 1)
|
|
264
264
|
])
|
|
265
265
|
]),
|
|
266
266
|
d.value.length > 0 ? (p(), S(ne, {
|
|
@@ -276,5 +276,5 @@ const pe = {
|
|
|
276
276
|
}
|
|
277
277
|
});
|
|
278
278
|
export {
|
|
279
|
-
|
|
279
|
+
Ge as default
|
|
280
280
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { defineComponent as f, computed as y, ref as k, createBlock as i, openBlock as d, unref as a, withCtx as s, createElementVNode as t, toDisplayString as b, createCommentVNode as g, createVNode as m } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { G as x, u as v, P as w, K as E, A as M } from "./index.vue_vue_type_script_setup_true_lang-BvohjQ00.js";
|
|
3
3
|
import { useI18n as T } from "@feedmepos/mf-common";
|
|
4
4
|
import { useSnackbar as V } from "@feedmepos/ui-library";
|
|
5
5
|
import { _ as h } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
6
6
|
import { _ as C } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
7
|
-
import { _ as N } from "./Takeaway.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { T as
|
|
9
|
-
import { a as
|
|
10
|
-
const U = { class: "flex-1 flex justify-between gap-8 pl-8" }, B = { class: "flex items-center" },
|
|
7
|
+
import { _ as N } from "./Takeaway.vue_vue_type_script_setup_true_lang-BOG_W-2a.js";
|
|
8
|
+
import { T as S, l as L } from "./index-pJtym1c6.js";
|
|
9
|
+
import { a as O } from "./menu-DVdMR0zo.js";
|
|
10
|
+
const U = { class: "flex-1 flex justify-between gap-8 pl-8" }, B = { class: "flex items-center" }, F = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, P = { class: "fm-typo-en-body-md-600 font-semibold" }, H = /* @__PURE__ */ f({
|
|
11
11
|
__name: "Takeaway",
|
|
12
|
-
setup(
|
|
12
|
+
setup(A) {
|
|
13
13
|
const u = V(), l = x(u), p = v(), c = w(l), _ = y(() => p.rules.item.bindToVariant), n = k(0), { t: r } = T();
|
|
14
|
-
return
|
|
14
|
+
return O().resetOnMount(), (D, o) => (d(), i(C, {
|
|
15
15
|
heading: a(r)("menu.takeaway.title")
|
|
16
16
|
}, {
|
|
17
17
|
default: s(() => [
|
|
@@ -22,12 +22,12 @@ const U = { class: "flex-1 flex justify-between gap-8 pl-8" }, B = { class: "fle
|
|
|
22
22
|
"append-heading": s(() => [
|
|
23
23
|
t("div", U, [
|
|
24
24
|
t("div", B, [
|
|
25
|
-
t("div",
|
|
26
|
-
t("p",
|
|
25
|
+
t("div", F, [
|
|
26
|
+
t("p", P, b(n.value), 1)
|
|
27
27
|
])
|
|
28
28
|
]),
|
|
29
29
|
t("div", null, [
|
|
30
|
-
n.value > 0 ? (d(), i(a(
|
|
30
|
+
n.value > 0 ? (d(), i(a(S), {
|
|
31
31
|
key: 0,
|
|
32
32
|
"bind-to-variant": _.value,
|
|
33
33
|
action: "add",
|
|
@@ -37,7 +37,7 @@ const U = { class: "flex-1 flex justify-between gap-8 pl-8" }, B = { class: "fle
|
|
|
37
37
|
module: a(M.F_MENU_MODULE_V4_KEY).enum.takeaway,
|
|
38
38
|
operation: a(E.F_OPERATION_TYPE).create,
|
|
39
39
|
data: e,
|
|
40
|
-
link: a(
|
|
40
|
+
link: a(L)(e.usedBy || [])
|
|
41
41
|
},
|
|
42
42
|
e.name
|
|
43
43
|
))
|
|
@@ -60,5 +60,5 @@ const U = { class: "flex-1 flex justify-between gap-8 pl-8" }, B = { class: "fle
|
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
62
|
export {
|
|
63
|
-
|
|
63
|
+
H as default
|
|
64
64
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { getCurrentInstance as te, defineComponent as ne, computed as h, watch as oe, h as R, resolveComponent as S, createElementBlock as C, openBlock as _, Fragment as
|
|
2
|
-
import {
|
|
1
|
+
import { getCurrentInstance as te, defineComponent as ne, computed as h, watch as oe, h as R, resolveComponent as S, createElementBlock as C, openBlock as _, Fragment as P, normalizeClass as D, createElementVNode as k, createVNode as V, unref as t, isRef as j, withCtx as O, renderList as ie, createBlock as G, createCommentVNode as $, toDisplayString as I, withModifiers as q } from "vue";
|
|
2
|
+
import { G as J, u as Q, P as W, K as N, A as z, I as L, B as se, an as H, a3 as re } from "./index.vue_vue_type_script_setup_true_lang-BvohjQ00.js";
|
|
3
3
|
import { useI18n as X, useCoreStore as le } from "@feedmepos/mf-common";
|
|
4
4
|
import { useDialog as ce, useSnackbar as Z, FmButtonVariant as A, components as de, useBreakpoints as ue } from "@feedmepos/ui-library";
|
|
5
|
-
import { _ as me } from "./app-
|
|
6
|
-
import { a as ye, l as ee, T as pe } from "./index-
|
|
5
|
+
import { _ as me } from "./app-CPJH5bgs.js";
|
|
6
|
+
import { a as ye, l as ee, T as pe } from "./index-pJtym1c6.js";
|
|
7
7
|
import { u as fe } from "./search-BAPEUu1R.js";
|
|
8
|
-
import { f as F } from "./currency-
|
|
8
|
+
import { f as F } from "./currency-DbURufyM.js";
|
|
9
9
|
import { defineStore as _e } from "pinia";
|
|
10
|
-
import { C as ke } from "./catalog-
|
|
10
|
+
import { C as ke } from "./catalog-CpFTifAS.js";
|
|
11
11
|
import { c as ve } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
|
12
12
|
function we(T, U, l, m) {
|
|
13
13
|
var y, v, w, g;
|
|
@@ -45,7 +45,7 @@ function we(T, U, l, m) {
|
|
|
45
45
|
return i;
|
|
46
46
|
}
|
|
47
47
|
const ge = _e("takeaway-manager", () => {
|
|
48
|
-
const T = ce(), U = Z(), l =
|
|
48
|
+
const T = ce(), U = Z(), l = J(U), m = W(l), i = Q(), f = te(), { t: y } = X(), v = (a) => {
|
|
49
49
|
var e, u;
|
|
50
50
|
const { vNode: d } = ve(
|
|
51
51
|
ye,
|
|
@@ -78,8 +78,8 @@ const ge = _e("takeaway-manager", () => {
|
|
|
78
78
|
"onUpdate:takeaway": async (d) => {
|
|
79
79
|
await m.updateMenu(
|
|
80
80
|
{
|
|
81
|
-
module:
|
|
82
|
-
operation:
|
|
81
|
+
module: z.F_MENU_MODULE_V4_KEY.enum.takeaway,
|
|
82
|
+
operation: N.F_OPERATION_TYPE.update,
|
|
83
83
|
data: d,
|
|
84
84
|
link: ee(d.usedBy || [])
|
|
85
85
|
},
|
|
@@ -107,8 +107,8 @@ const ge = _e("takeaway-manager", () => {
|
|
|
107
107
|
}).onPrimary(async () => {
|
|
108
108
|
await m.updateMenu(
|
|
109
109
|
{
|
|
110
|
-
module:
|
|
111
|
-
operation:
|
|
110
|
+
module: z.F_MENU_MODULE_V4_KEY.enum.takeaway,
|
|
111
|
+
operation: N.F_OPERATION_TYPE.delete,
|
|
112
112
|
data: a._id
|
|
113
113
|
},
|
|
114
114
|
a.name,
|
|
@@ -148,7 +148,7 @@ const ge = _e("takeaway-manager", () => {
|
|
|
148
148
|
setup(T, {
|
|
149
149
|
emit: U
|
|
150
150
|
}) {
|
|
151
|
-
const l = Q(), m = ge(), i = h(() => l.rules.item.bindToVariant), f = h(() => l.rules.takeaway), y = W(
|
|
151
|
+
const l = Q(), m = ge(), i = h(() => l.rules.item.bindToVariant), f = h(() => l.rules.takeaway), y = W(J(Z())), v = le(), w = h(() => se.Country.getCountry(v.currentCountry.value).currency), g = h(() => l.takeaways.map((n) => ({
|
|
152
152
|
...n,
|
|
153
153
|
usedBy: l.items.reduce((s, p) => {
|
|
154
154
|
var o, E, Y;
|
|
@@ -202,7 +202,7 @@ const ge = _e("takeaway-manager", () => {
|
|
|
202
202
|
enableSorting: !1,
|
|
203
203
|
size: 200,
|
|
204
204
|
cell: (n) => {
|
|
205
|
-
const s = n.getValue(), p =
|
|
205
|
+
const s = n.getValue(), p = H(l.categorizedItems, s).flatMap((x) => x.items).length ?? 0;
|
|
206
206
|
return e("menu.takeaway.table.items_linked", {
|
|
207
207
|
count: p
|
|
208
208
|
});
|
|
@@ -227,9 +227,9 @@ const ge = _e("takeaway-manager", () => {
|
|
|
227
227
|
}]), M = ue(), b = h(() => M.breakpoints.value.xs);
|
|
228
228
|
return (n, s) => {
|
|
229
229
|
const p = S("fm-search"), x = S("fm-table"), B = S("fm-button");
|
|
230
|
-
return g.value.length ? (_(), C(
|
|
230
|
+
return g.value.length ? (_(), C(P, {
|
|
231
231
|
key: 0
|
|
232
|
-
}, [b.value ? (_(), C(
|
|
232
|
+
}, [b.value ? (_(), C(P, {
|
|
233
233
|
key: 1
|
|
234
234
|
}, [k("div", Ce, [V(p, {
|
|
235
235
|
class: "w-full",
|
|
@@ -237,25 +237,25 @@ const ge = _e("takeaway-manager", () => {
|
|
|
237
237
|
modelValue: t(c),
|
|
238
238
|
"onUpdate:modelValue": s[2] || (s[2] = (o) => j(c) ? c.value = o : null),
|
|
239
239
|
placeholder: t(e)("menu.takeaway.table.search.placeholder")
|
|
240
|
-
}, null, 8, ["modelValue", "placeholder"])]), k("div", Ve, [(_(!0), C(
|
|
240
|
+
}, null, 8, ["modelValue", "placeholder"])]), k("div", Ve, [(_(!0), C(P, null, ie(a.value, (o) => (_(), C("div", {
|
|
241
241
|
key: o._id,
|
|
242
242
|
class: D(["py-12 px-16", "flex space-x-8", "items-center"]),
|
|
243
243
|
onClick: () => {
|
|
244
244
|
f.value.edit && t(m).updateTakeaway(o);
|
|
245
245
|
}
|
|
246
|
-
}, [k("div", Ue, [k("p", Me, I(o.name), 1), k("p", Ee, I(`${t(
|
|
246
|
+
}, [k("div", Ue, [k("p", Me, I(o.name), 1), k("p", Ee, I(`${t(H)(t(l).categorizedItems, o.usedBy).flatMap((E) => E.items).length ?? 0} items linked`), 1), k("p", Ke, " Price: " + I(w.value.symbol) + I(t(F)(o.price, !1)), 1)]), f.value.delete ? (_(), G(B, {
|
|
247
247
|
key: 0,
|
|
248
248
|
variant: t(A).Tertiary,
|
|
249
249
|
"text-color": "neutral-gray-400",
|
|
250
250
|
"prepend-icon": "delete",
|
|
251
|
-
onClick:
|
|
252
|
-
}, null, 8, ["variant", "onClick"])) :
|
|
251
|
+
onClick: q(() => t(m).deleteTakeaway(o), ["stop"])
|
|
252
|
+
}, null, 8, ["variant", "onClick"])) : $("", !0)], 8, Te))), 128))])], 64)) : (_(), C("div", be, [k("div", he, [k("div", xe, [V(p, {
|
|
253
253
|
autofocus: "",
|
|
254
254
|
modelValue: t(c),
|
|
255
255
|
"onUpdate:modelValue": s[0] || (s[0] = (o) => j(c) ? c.value = o : null),
|
|
256
256
|
placeholder: t(e)("menu.takeaway.table.search.placeholder")
|
|
257
257
|
}, null, 8, ["modelValue", "placeholder"])])]), V(me, null, {
|
|
258
|
-
default:
|
|
258
|
+
default: O(() => [V(x, {
|
|
259
259
|
"column-defs": u.value,
|
|
260
260
|
loading: t(y).checkMenuIsLoading(),
|
|
261
261
|
"page-size": a.value.length,
|
|
@@ -274,27 +274,27 @@ const ge = _e("takeaway-manager", () => {
|
|
|
274
274
|
subtitle: t(e)("menu.takeaway.empty.subtitle"),
|
|
275
275
|
title: t(e)("menu.takeaway.empty.title")
|
|
276
276
|
}, {
|
|
277
|
-
action:
|
|
277
|
+
action: O(() => [f.value.create ? (_(), G(t(pe), {
|
|
278
278
|
key: 0,
|
|
279
279
|
"bind-to-variant": i.value,
|
|
280
280
|
action: "add",
|
|
281
281
|
"apply-product": "",
|
|
282
282
|
"onUpdate:takeaway": s[3] || (s[3] = (o) => t(y).updateMenu({
|
|
283
|
-
module: t(
|
|
284
|
-
operation: t(
|
|
283
|
+
module: t(z.F_MENU_MODULE_V4_KEY).enum.takeaway,
|
|
284
|
+
operation: t(N.F_OPERATION_TYPE).create,
|
|
285
285
|
data: o,
|
|
286
286
|
link: t(ee)(o.usedBy || [])
|
|
287
287
|
}, o.name))
|
|
288
288
|
}, {
|
|
289
|
-
default:
|
|
289
|
+
default: O(({
|
|
290
290
|
trigger: o
|
|
291
291
|
}) => [V(B, {
|
|
292
292
|
"prepend-icon": "add",
|
|
293
293
|
label: t(e)("menu.takeaway.empty.action"),
|
|
294
|
-
onClick:
|
|
294
|
+
onClick: q(o, ["stop"])
|
|
295
295
|
}, null, 8, ["label", "onClick"])]),
|
|
296
296
|
_: 1
|
|
297
|
-
}, 8, ["bind-to-variant"])) :
|
|
297
|
+
}, 8, ["bind-to-variant"])) : $("", !0)]),
|
|
298
298
|
_: 1
|
|
299
299
|
}, 8, ["subtitle", "title"])]));
|
|
300
300
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { computed as d, defineComponent as x, ref as F, resolveComponent as b, createElementBlock as L, openBlock as w, normalizeClass as
|
|
2
|
-
import {
|
|
3
|
-
import { u as S } from "./menuV2-
|
|
4
|
-
import { C as v, h as N } from "./catalog-
|
|
5
|
-
import { useSnackbar as
|
|
6
|
-
import { a as T } from "./LinkProductSideSheet-
|
|
1
|
+
import { computed as d, defineComponent as x, ref as F, resolveComponent as b, createElementBlock as L, openBlock as w, normalizeClass as R, createVNode as K, normalizeStyle as $, withCtx as B, createBlock as U, createCommentVNode as j } from "vue";
|
|
2
|
+
import { A as h, K as E, G as C, P as O, ak as Y, u as y, a as G } from "./index.vue_vue_type_script_setup_true_lang-BvohjQ00.js";
|
|
3
|
+
import { u as S } from "./menuV2-CcBdUc80.js";
|
|
4
|
+
import { C as v, h as N } from "./catalog-CpFTifAS.js";
|
|
5
|
+
import { useSnackbar as P, useDialog as z } from "@feedmepos/ui-library";
|
|
6
|
+
import { a as T } from "./LinkProductSideSheet-BjcQDT4U.js";
|
|
7
7
|
import { useI18n as q } from "@feedmepos/mf-common";
|
|
8
|
-
function
|
|
8
|
+
function H() {
|
|
9
9
|
const t = S(), o = d(() => t.categorizedRawMenuItems.filter((u) => u.items.length > 0)), i = d(() => {
|
|
10
10
|
const u = t.currentCatalog;
|
|
11
11
|
return u ? v.getItemAvailable(u).map((n) => ({ _id: n })) : [];
|
|
@@ -43,10 +43,10 @@ function G() {
|
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
async function g(u) {
|
|
46
|
-
await
|
|
46
|
+
await A(u, !0);
|
|
47
47
|
}
|
|
48
48
|
async function p(u) {
|
|
49
|
-
await
|
|
49
|
+
await A(u, !1);
|
|
50
50
|
}
|
|
51
51
|
async function _(u) {
|
|
52
52
|
const n = t.currentCatalog;
|
|
@@ -70,7 +70,7 @@ function G() {
|
|
|
70
70
|
saveLinkItemRules: _
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
|
-
async function
|
|
73
|
+
async function A(t, o) {
|
|
74
74
|
var u;
|
|
75
75
|
const i = S(), c = i.currentCatalog;
|
|
76
76
|
if (!c || t.length === 0) return;
|
|
@@ -96,8 +96,8 @@ async function z(t, o) {
|
|
|
96
96
|
data: _
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
|
-
function
|
|
100
|
-
const t = S(), o =
|
|
99
|
+
function J() {
|
|
100
|
+
const t = S(), o = P(), i = z(), c = C(o), g = O(c), p = d(() => {
|
|
101
101
|
const n = t.categorizedRawMenuItems, a = new Set(
|
|
102
102
|
t.currentCatalog ? v.getItemAvailable(t.currentCatalog) : t.state.menu.modules.item.map((e) => e._id)
|
|
103
103
|
);
|
|
@@ -135,7 +135,7 @@ function H() {
|
|
|
135
135
|
(l, m) => {
|
|
136
136
|
const f = a.items.filter((I) => I._id == m) ?? [];
|
|
137
137
|
return l = l.concat(
|
|
138
|
-
|
|
138
|
+
Y(m, f, (I) => ({
|
|
139
139
|
...I,
|
|
140
140
|
orderFrom: null
|
|
141
141
|
}))
|
|
@@ -160,7 +160,7 @@ function H() {
|
|
|
160
160
|
};
|
|
161
161
|
}
|
|
162
162
|
const Q = () => {
|
|
163
|
-
const t = y(), o =
|
|
163
|
+
const t = y(), o = P(), i = C(o), c = O(i), g = d(() => t.categorizedRawMenuItems.filter((n) => n.items.length > 0)), p = d(() => {
|
|
164
164
|
const n = t.currentCatalog;
|
|
165
165
|
return n ? v.getItemAvailable(n).map((a) => ({ _id: a })) : [];
|
|
166
166
|
});
|
|
@@ -174,7 +174,7 @@ const Q = () => {
|
|
|
174
174
|
f,
|
|
175
175
|
I,
|
|
176
176
|
e.has(f),
|
|
177
|
-
t.version ===
|
|
177
|
+
t.version === G.F_MENU_VERSION.v3
|
|
178
178
|
), m;
|
|
179
179
|
},
|
|
180
180
|
{}
|
|
@@ -219,7 +219,7 @@ const Q = () => {
|
|
|
219
219
|
saveLinkItemRules: u
|
|
220
220
|
};
|
|
221
221
|
}, W = () => {
|
|
222
|
-
const t = y(), o =
|
|
222
|
+
const t = y(), o = P(), i = z(), c = C(o), g = O(c), p = d(() => {
|
|
223
223
|
const n = t.categorizedRawMenuItems, a = new Set(
|
|
224
224
|
t.currentCatalog ? v.getItemAvailable(t.currentCatalog) : t.state.menu.modules.item.map((e) => e._id)
|
|
225
225
|
);
|
|
@@ -248,7 +248,7 @@ const Q = () => {
|
|
|
248
248
|
(l, m) => {
|
|
249
249
|
const f = a.items.filter((I) => I._id == m) ?? [];
|
|
250
250
|
return l = l.concat(
|
|
251
|
-
|
|
251
|
+
Y(m, f, (I) => ({
|
|
252
252
|
...I,
|
|
253
253
|
orderFrom: null
|
|
254
254
|
}))
|
|
@@ -291,13 +291,13 @@ function se(t) {
|
|
|
291
291
|
if (M.mode === T.Rules)
|
|
292
292
|
m.saveLinkItemRules(M.linkItemRules);
|
|
293
293
|
else {
|
|
294
|
-
const
|
|
295
|
-
f.value ? m.applyProduct(
|
|
294
|
+
const k = M.items.map((V) => V._id);
|
|
295
|
+
f.value ? m.applyProduct(k) : l.applyProduct(k);
|
|
296
296
|
}
|
|
297
|
-
},
|
|
297
|
+
}, D = d(() => [o, ...e.state.menu.modules.category ?? []]);
|
|
298
298
|
return {
|
|
299
299
|
menuItems: r,
|
|
300
|
-
categories:
|
|
300
|
+
categories: D,
|
|
301
301
|
linkItemRules: s,
|
|
302
302
|
catalogManager: m,
|
|
303
303
|
schedulerManager: l,
|
|
@@ -308,7 +308,7 @@ function se(t) {
|
|
|
308
308
|
const i = S(), c = d(() => i.state.menu.modules.item ?? []), g = d(() => {
|
|
309
309
|
var e;
|
|
310
310
|
return ((e = i.currentCatalog) == null ? void 0 : e.linkItemRules) ?? null;
|
|
311
|
-
}), p =
|
|
311
|
+
}), p = J(), _ = H(), u = d(() => !i.state.currentSchedulerId), n = (e) => {
|
|
312
312
|
if (e.mode === T.Rules)
|
|
313
313
|
_.saveLinkItemRules(e.linkItemRules);
|
|
314
314
|
else {
|
|
@@ -357,10 +357,10 @@ const X = ["alt", "src", "crossorigin"], ue = /* @__PURE__ */ x({
|
|
|
357
357
|
return (e, r) => {
|
|
358
358
|
const s = b("fm-icon"), l = b("fm-card");
|
|
359
359
|
return w(), L("div", {
|
|
360
|
-
class:
|
|
360
|
+
class: R([e.className, "flex items-center justify-center"])
|
|
361
361
|
}, [
|
|
362
362
|
K(l, {
|
|
363
|
-
class:
|
|
363
|
+
class: R(["flex items-center justify-center", "rounded-md"]),
|
|
364
364
|
style: $({ width: `${n.value.width}px`, height: `${n.value.height}px` }),
|
|
365
365
|
variant: "outlined"
|
|
366
366
|
}, {
|
|
@@ -368,7 +368,7 @@ const X = ["alt", "src", "crossorigin"], ue = /* @__PURE__ */ x({
|
|
|
368
368
|
a.value && !c.value ? (w(), L("img", {
|
|
369
369
|
key: 0,
|
|
370
370
|
alt: u.value,
|
|
371
|
-
class:
|
|
371
|
+
class: R(["w-full h-full", "object-cover", g.value ? "" : "hidden"]),
|
|
372
372
|
src: a.value,
|
|
373
373
|
crossorigin: o.crossorigin ? "anonymous" : void 0,
|
|
374
374
|
onError: _,
|
|
@@ -394,6 +394,6 @@ const X = ["alt", "src", "crossorigin"], ue = /* @__PURE__ */ x({
|
|
|
394
394
|
});
|
|
395
395
|
export {
|
|
396
396
|
ue as _,
|
|
397
|
-
|
|
397
|
+
H as a,
|
|
398
398
|
se as u
|
|
399
399
|
};
|