@feedmepos/mf-menu 0.32.13 → 0.32.15
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-D70-FH5L.js → App-BFUyUrdi.js} +16 -9
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-BJdja2N0.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BbjRIN7Z.js} +20 -20
- package/dist/{Catalog-WMpN3a0p.js → Catalog-B6VFmr6e.js} +20 -20
- package/dist/{Category-C_VsQIHU.js → Category-B-bTjNFI.js} +24 -24
- package/dist/{Category-BwHhFTZ-.js → Category-C8uGxpST.js} +84 -84
- package/dist/{CookingGuide-D9RNkYDL.js → CookingGuide-BL3uetlO.js} +65 -65
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-DtmrxDZm.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-8yIVwc8E.js} +1 -1
- package/dist/{Group-DexONgr2.js → Group-BvO-gQZe.js} +1 -1
- package/dist/{Group-qRZlg5ST.js → Group-DT9UkkOx.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-DtPY9uUt.js → Group.vue_vue_type_script_setup_true_lang-DZhM1Tpb.js} +56 -56
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-B5Qpmj2f.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D48u_DHq.js} +5 -5
- package/dist/ImportProductDialog.vue_vue_type_script_setup_true_lang-C_X-lTnN.js +72979 -0
- package/dist/{Ingredient-BuOS_Wvm.js → Ingredient-7qWDD9e6.js} +26 -26
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-DFvXklj9.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CwjW0wfz.js} +2 -2
- package/dist/{LinkProductSideSheet-DJj8Nn4X.js → LinkProductSideSheet-BXW6eNgZ.js} +3 -3
- package/dist/{MenuSetting-D6B0gCGV.js → MenuSetting-BSF7O2NL.js} +5 -5
- package/dist/{PrintRoute-B7G8f1iC.js → PrintRoute-b1ii5Uz9.js} +20 -20
- package/dist/{Product-DpS5EepJ.js → Product-Ce0GJb3c.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-CdIukLqA.js → Product.vue_vue_type_script_setup_true_lang-BZVvTAOX.js} +49 -49
- package/dist/{ProductInternalTools-CBCyWHOS.js → ProductInternalTools-igbOLRap.js} +20 -20
- package/dist/Products-GAyUdhnN.js +292 -0
- package/dist/Publish-g60odzhM.js +1300 -0
- package/dist/{Recipe-D14rkATU.js → Recipe-B6aye_iC.js} +9 -9
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-CdH2ius3.js → RuleView.vue_vue_type_script_setup_true_lang-By8kwuMB.js} +134 -134
- package/dist/{Scheduler-DWZqa-jf.js → Scheduler-CyaG6Y5v.js} +7 -7
- package/dist/{ServingSequence-Mx7ovvJ1.js → ServingSequence-BXeypgrN.js} +27 -27
- package/dist/{Setting-DmHuVXVn.js → Setting-D7GcaNTk.js} +17 -17
- package/dist/{Subcategory-DixZPdnT.js → Subcategory-DNUp9ojI.js} +37 -37
- package/dist/{Takeaway-BVIymFV_.js → Takeaway-Baqvq5nP.js} +9 -9
- package/dist/{Takeaway-DDKeDEbV.js → Takeaway-BjXPeYRv.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-CTaCQgRv.js → Takeaway.vue_vue_type_script_setup_true_lang-CgXT2UVL.js} +54 -54
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-DveI9xvU.js → Thumbnail.vue_vue_type_script_setup_true_lang-CX8cSbDe.js} +12 -12
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-2nBbq_Yk.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DcjGVQEO.js} +756 -763
- package/dist/{Unit-utuaNZBw.js → Unit-mI7lLzCf.js} +2 -2
- package/dist/{Variant-CzuJNwen.js → Variant-CVwnODRz.js} +14 -14
- package/dist/{_id_-DMDhPQCr.js → _id_-fpn0nBru.js} +14 -14
- package/dist/{app-BQUkvrAS.js → app-CCKI85Te.js} +26 -26
- package/dist/{app-Bqj3cAPJ.js → app-U5MEN4U1.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/Entry.vue.d.ts +1 -0
- package/dist/apps/mf-menu/src/components/feature/Fields/ImageDropField.vue.d.ts +0 -2
- package/dist/apps/mf-menu/src/composable/useClientEvent.d.ts +14 -0
- package/dist/apps/mf-menu/src/helper/import-export-utils.d.ts +22 -22
- package/dist/apps/mf-menu/src/helper/menuExport.d.ts +59 -33
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-ILQVL8r9.js → linked-status-6Jt70XBp.js} +2 -2
- package/dist/assets/menu-export-CR0a98CA.js +107 -0
- package/dist/assets/{override-menu-DVkGhbA9.js → override-menu-Chsc0CSI.js} +2 -2
- package/dist/assets/{validate-menu-y_NQUL02.js → validate-menu-pb0aN4gj.js} +2 -2
- package/dist/{catalog-BYzITAmC.js → catalog-BgQmytEA.js} +1 -1
- package/dist/{catalogSetting-DAo5tN3P.js → catalogSetting-BS5IaQKq.js} +1 -1
- package/dist/{category-D4x8r_lY.js → category-DJMVbmzx.js} +1 -1
- package/dist/{currency-CvoBdMM2.js → currency-FHrLDvzy.js} +1 -1
- package/dist/dayjs.min-DJGdQr-B.js +6 -0
- package/dist/{index-LuH6PJzW.js → index-BywPDIFW.js} +4 -4
- package/dist/{index-BLUIaanj.js → index-DYxLHjeC.js} +1 -1
- package/dist/{index-6lju0f3r.js → index-XVWDnyu-.js} +17 -17
- package/dist/{index.vue_vue_type_script_setup_true_lang-DxF14kn9.js → index.vue_vue_type_script_setup_true_lang-kj6HkxwD.js} +2306 -2306
- package/dist/{item-lXMLaKOb.js → item-cmnP2N-a.js} +1089 -1091
- package/dist/{jszip.min-CdZ-wY5m.js → jszip.min-psVCZNVl.js} +545 -545
- package/dist/{menu-PJc2dQHQ.js → menu-CgQPOu3W.js} +1 -1
- package/dist/{menuV2-DinFmdTL.js → menuV2-DHO9OmzU.js} +159 -159
- package/dist/mf-menu.css +1 -1
- package/dist/{priceTier-CzKIo11g.js → priceTier-CLm9vzaK.js} +1 -1
- package/dist/{scheduler-DQjxnoCk.js → scheduler-BMdZdtpj.js} +4 -4
- package/dist/{subcategory-CLkDImEU.js → subcategory-Dj_DOvFt.js} +2 -2
- package/dist/{toExcel-DPh8DaM0.js → toExcel-XwFFiTiA.js} +2 -2
- package/dist/{unit-QYkVoC6_.js → unit-CsuAQsy7.js} +12 -12
- package/package.json +3 -3
- package/dist/ImportProductDialog.vue_vue_type_script_setup_true_lang-BqhNkaw_.js +0 -96043
- package/dist/Products-CcyGNlUl.js +0 -794
- package/dist/Publish-rZLHFaJ5.js +0 -1264
- package/dist/dayjs.min-C6xioui7.js +0 -6
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent as N, computed as y, h as c, withModifiers as U, ref as V, resolveComponent as _, createBlock as k, openBlock as d, unref as m, withCtx as h, createElementBlock as D, createVNode as f, Fragment as H, createElementVNode as l, renderList as T, toDisplayString as S, createCommentVNode as I } from "vue";
|
|
2
|
-
import { A as i,
|
|
2
|
+
import { A as i, Q as W, u as Q, G, a4 as J } from "./index.vue_vue_type_script_setup_true_lang-kj6HkxwD.js";
|
|
3
3
|
import { useI18n as X } from "@feedmepos/mf-common";
|
|
4
4
|
import { components as Z, useDialog as ee, useSnackbar as te } from "@feedmepos/ui-library";
|
|
5
5
|
import { _ as ne } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
6
|
-
import { _ as ae } from "./app-
|
|
7
|
-
import { d as oe, _ as se, u as le, c as re } from "./scheduler-
|
|
6
|
+
import { _ as ae } from "./app-CCKI85Te.js";
|
|
7
|
+
import { d as oe, _ as se, u as le, c as re } from "./scheduler-BMdZdtpj.js";
|
|
8
8
|
import { _ as ue } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
9
9
|
const ce = {
|
|
10
10
|
class: "flex flex-1 justify-end"
|
|
@@ -99,7 +99,7 @@ const ce = {
|
|
|
99
99
|
});
|
|
100
100
|
return v.length === 1 ? `Daily except ${r[v[0]]}` : E(o, Y) ? "Weekdays" : E(o, z) ? "Weekends" : o.every((u, n) => {
|
|
101
101
|
if (n === 0) return !0;
|
|
102
|
-
const b = s.findIndex((
|
|
102
|
+
const b = s.findIndex((P) => P === u);
|
|
103
103
|
return o[n - 1] === s[b - 1];
|
|
104
104
|
}) ? o.length === 1 ? r[o[0]] : `${r[o[0]]} to ${r[o[o.length - 1]]}` : o.map((u) => r[u]).join(", ");
|
|
105
105
|
}
|
|
@@ -142,7 +142,7 @@ const ce = {
|
|
|
142
142
|
const t = e._id ? le(e) : re(e);
|
|
143
143
|
await w.updateMenu(t, e.name);
|
|
144
144
|
}
|
|
145
|
-
const j =
|
|
145
|
+
const j = Q(), B = y(() => j.categorizedRawMenuItems), p = y(() => j.state.menu.modules.scheduler), w = W(G(te())), C = y(() => w.checkMenuIsLoading()), g = V(""), K = y(() => {
|
|
146
146
|
const e = g.value.toLowerCase();
|
|
147
147
|
return e ? p.value.filter((t) => t.name.toLowerCase().includes(e)) : p.value;
|
|
148
148
|
});
|
|
@@ -193,7 +193,7 @@ const ce = {
|
|
|
193
193
|
class: "flex-col flex-1 min-h-0 overflow-auto xs:flex hidden w-full px-16 pb-64",
|
|
194
194
|
separator: ""
|
|
195
195
|
}, {
|
|
196
|
-
default: h(() => [(d(!0), D(H, null, T(
|
|
196
|
+
default: h(() => [(d(!0), D(H, null, T(K.value, (n) => (d(), k(R, {
|
|
197
197
|
key: n._id,
|
|
198
198
|
label: n.name,
|
|
199
199
|
style: {
|
|
@@ -213,7 +213,7 @@ const ce = {
|
|
|
213
213
|
})], 64)), f(se, {
|
|
214
214
|
ref_key: "schedulerDialogRef",
|
|
215
215
|
ref: x,
|
|
216
|
-
"categorized-items":
|
|
216
|
+
"categorized-items": B.value,
|
|
217
217
|
onOnComplete: O
|
|
218
218
|
}, null, 8, ["categorized-items"])]),
|
|
219
219
|
_: 1
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as H, ref as I, computed as L, resolveComponent as h, createElementBlock as g, openBlock as d, Fragment as x, renderSlot as ae, createVNode as l, unref as t, withCtx as m, createElementVNode as y, toDisplayString as z, onBeforeMount as oe, watch as F, watchEffect as se, h as $, getCurrentInstance as le, onMounted as re, createBlock as j, createCommentVNode as G, isRef as ie, normalizeClass as J, renderList as ue } from "vue";
|
|
2
2
|
import { useRouter as ce } from "vue-router";
|
|
3
|
-
import { I as
|
|
3
|
+
import { I as Q, u as W, G as X, Q as Z, M as O, A as S, a4 as de } from "./index.vue_vue_type_script_setup_true_lang-kj6HkxwD.js";
|
|
4
4
|
import { useI18n as ee, ItemSelector as me, useCoreStore as pe } from "@feedmepos/mf-common";
|
|
5
|
-
import { useSnackbar as ne, components as
|
|
5
|
+
import { useSnackbar as ne, components as Y, useDialog as _e, FmButtonVariant as A, useBreakpoints as fe } from "@feedmepos/ui-library";
|
|
6
6
|
import { _ as ge } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
7
|
-
import { _ as ve, R as he } from "./app-
|
|
7
|
+
import { _ as ve, R as he } from "./app-CCKI85Te.js";
|
|
8
8
|
import { c as ye } from "./check-C9mY6LiX.js";
|
|
9
9
|
import { _ as be } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
10
10
|
import { u as ke } from "./search-BAPEUu1R.js";
|
|
11
|
-
import { u as xe } from "./app-
|
|
11
|
+
import { u as xe } from "./app-U5MEN4U1.js";
|
|
12
12
|
import { c as Se } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
|
13
|
-
const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex flex-col h-full" }, Ee = { class: "flex gap-8 items-center justify-start" }, Ve = /* @__PURE__ */
|
|
13
|
+
const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex flex-col h-full" }, Ee = { class: "flex gap-8 items-center justify-start" }, Ve = /* @__PURE__ */ H({
|
|
14
14
|
__name: "Form",
|
|
15
15
|
props: {
|
|
16
16
|
action: {},
|
|
17
17
|
initialValue: {}
|
|
18
18
|
},
|
|
19
19
|
emits: ["submitted"],
|
|
20
|
-
setup(
|
|
21
|
-
const { t: r } = ee(), p =
|
|
22
|
-
p.initialValue ?
|
|
20
|
+
setup(K, { expose: b, emit: N }) {
|
|
21
|
+
const { t: r } = ee(), p = K, R = N, s = I(
|
|
22
|
+
p.initialValue ? Q(p.initialValue) : {
|
|
23
23
|
_id: "",
|
|
24
24
|
name: "",
|
|
25
25
|
position: 0,
|
|
26
26
|
items: []
|
|
27
27
|
}
|
|
28
|
-
), C = W(), i = ne(),
|
|
28
|
+
), C = W(), i = ne(), D = X(i), q = Z(D), c = I(!1), u = I(!1), _ = (f) => {
|
|
29
29
|
ye.isBoolean(f) ? u.value = f : u.value = !u.value;
|
|
30
30
|
}, E = L(() => p.action === "add" ? r("menu.serving_sequence.add") : r("menu.serving_sequence.update"));
|
|
31
|
-
async function
|
|
31
|
+
async function P() {
|
|
32
32
|
try {
|
|
33
33
|
if (p.action === "add")
|
|
34
34
|
await q.updateMenu(
|
|
@@ -54,7 +54,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
54
54
|
else
|
|
55
55
|
throw new Error("Invalid action");
|
|
56
56
|
} finally {
|
|
57
|
-
u.value = !1,
|
|
57
|
+
u.value = !1, R("submitted");
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
b({
|
|
@@ -64,7 +64,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
64
64
|
function U(f) {
|
|
65
65
|
return f.reduce((a, v) => (a[v._id] = [...a[v._id] ?? [], v], a), {});
|
|
66
66
|
}
|
|
67
|
-
const B = L(() => U(
|
|
67
|
+
const B = L(() => U(Q(s.value.items)));
|
|
68
68
|
return (f, a) => {
|
|
69
69
|
const v = h("fm-text-field"), V = h("fm-button"), e = h("fm-side-sheet");
|
|
70
70
|
return d(), g(x, null, [
|
|
@@ -73,9 +73,9 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
73
73
|
id: "group-form",
|
|
74
74
|
modelValue: u.value,
|
|
75
75
|
"onUpdate:modelValue": a[3] || (a[3] = (n) => u.value = n),
|
|
76
|
-
"is-container": t(
|
|
76
|
+
"is-container": t(Y).FmForm,
|
|
77
77
|
"is-container-props": {
|
|
78
|
-
onValidationSuccess:
|
|
78
|
+
onValidationSuccess: P,
|
|
79
79
|
blameFormChildOnValidationFailed: !0
|
|
80
80
|
},
|
|
81
81
|
"max-width": 560
|
|
@@ -136,20 +136,20 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
136
136
|
class: "flex justify-end mb-8 xs:mt-8"
|
|
137
137
|
}, Fe = {
|
|
138
138
|
key: 1,
|
|
139
|
-
class: /* @__PURE__ */
|
|
139
|
+
class: /* @__PURE__ */ J(["flex-1", "overflow-scroll", "divide-y divide-fm-color-neutral-gray-100", "pb-64"])
|
|
140
140
|
}, Ie = ["onClick"], Le = {
|
|
141
141
|
class: "flex-1 space-y-4"
|
|
142
142
|
}, Oe = {
|
|
143
143
|
class: "fm-typo-en-body-lg-600"
|
|
144
144
|
}, Ne = {
|
|
145
145
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
146
|
-
},
|
|
146
|
+
}, Qe = /* @__PURE__ */ H({
|
|
147
147
|
__name: "ServingSequence",
|
|
148
|
-
setup(
|
|
148
|
+
setup(K) {
|
|
149
149
|
const {
|
|
150
150
|
searchKey: b,
|
|
151
151
|
filter: N
|
|
152
|
-
} = ke(), r = W(), p = ne(),
|
|
152
|
+
} = ke(), r = W(), p = ne(), R = X(p), s = Z(R), C = _e(), i = pe(), D = xe(), q = ce(), {
|
|
153
153
|
t: c
|
|
154
154
|
} = ee(), u = (e) => {
|
|
155
155
|
e && e !== S.F_MENU_VERSION.enum.v4 && q.push({
|
|
@@ -165,7 +165,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
165
165
|
}, (e) => {
|
|
166
166
|
u(e);
|
|
167
167
|
}), F(() => i.sessionUser.value, (e) => {
|
|
168
|
-
e &&
|
|
168
|
+
e && D.getPublicSetting();
|
|
169
169
|
}), F(() => i.currentBusiness.value, async (e, n) => {
|
|
170
170
|
e && e._id !== (n == null ? void 0 : n._id) && await r.readRestaurants();
|
|
171
171
|
}), F(() => i.currentRestaurant.value, async (e, n) => {
|
|
@@ -197,9 +197,9 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
197
197
|
}, e.name, !0);
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
|
-
const
|
|
200
|
+
const P = ({
|
|
201
201
|
servingSequence: e
|
|
202
|
-
}) => $(
|
|
202
|
+
}) => $(Y.FmButton, {
|
|
203
203
|
prependIcon: "delete",
|
|
204
204
|
variant: A.Tertiary,
|
|
205
205
|
textColor: "neutral-gray-400",
|
|
@@ -234,7 +234,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
234
234
|
header: "",
|
|
235
235
|
cell: (e) => $("div", {
|
|
236
236
|
class: "w-full flex justify-end items-center"
|
|
237
|
-
}, [$(
|
|
237
|
+
}, [$(Y.FmButton, {
|
|
238
238
|
prependIcon: "delete",
|
|
239
239
|
variant: A.Tertiary,
|
|
240
240
|
textColor: "neutral-gray-400",
|
|
@@ -294,11 +294,11 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
294
294
|
class: "w-[320px] xs:w-full xs:px-16"
|
|
295
295
|
}, null, 8, ["modelValue", "placeholder"])]), V.value ? (d(), g("div", Fe, [(d(!0), g(x, null, ue(_.value, (o) => (d(), g("div", {
|
|
296
296
|
key: o._id,
|
|
297
|
-
class:
|
|
298
|
-
onClick: (
|
|
297
|
+
class: J(["py-12 px-16", "flex items-center space-x-8"]),
|
|
298
|
+
onClick: (Re) => a(o)
|
|
299
299
|
}, [y("div", Le, [y("p", Oe, z(o.name), 1), y("p", Ne, z(t(c)("menu.common.labels.products_linked", {
|
|
300
300
|
count: o.items.length
|
|
301
|
-
})), 1)]), l(
|
|
301
|
+
})), 1)]), l(P, {
|
|
302
302
|
servingSequence: o
|
|
303
303
|
}, null, 8, ["servingSequence"])], 8, Ie))), 128))])) : (d(), j(ve, {
|
|
304
304
|
key: 0
|
|
@@ -342,5 +342,5 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
342
342
|
}
|
|
343
343
|
});
|
|
344
344
|
export {
|
|
345
|
-
|
|
345
|
+
Qe as default
|
|
346
346
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as ne, computed as p, ref as se, watch as ue, watchEffect as ie, resolveComponent as m, createElementBlock as V, openBlock as r, normalizeClass as H, createVNode as s, withCtx as c, createElementVNode as v, createBlock as g, createCommentVNode as k, unref as e, Fragment as D, renderList as B, createTextVNode as re, toDisplayString as N } from "vue";
|
|
2
|
-
import { u as me, G as ce, A as f,
|
|
2
|
+
import { u as me, G as ce, A as f, Q as de, B as pe, I as w } from "./index.vue_vue_type_script_setup_true_lang-kj6HkxwD.js";
|
|
3
3
|
import { useCoreStore as ve, useI18n as ge } from "@feedmepos/mf-common";
|
|
4
|
-
import { useSnackbar as fe, useDialog as _e, FmButtonVariant as
|
|
4
|
+
import { useSnackbar as fe, useDialog as _e, FmButtonVariant as $, FmButtonColorThemeVariant as P, components as be } from "@feedmepos/ui-library";
|
|
5
5
|
import { _ as E } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
|
|
6
|
-
import { _ as ye } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import { _ as z, a as ke } from "./GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { C as _, a as x } from "./catalogSetting-
|
|
9
|
-
import { C as xe } from "./catalog-
|
|
6
|
+
import { _ as ye } from "./RuleView.vue_vue_type_script_setup_true_lang-By8kwuMB.js";
|
|
7
|
+
import { _ as z, a as ke } from "./GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D48u_DHq.js";
|
|
8
|
+
import { C as _, a as x } from "./catalogSetting-BS5IaQKq.js";
|
|
9
|
+
import { C as xe } from "./catalog-BgQmytEA.js";
|
|
10
10
|
const Ce = {
|
|
11
11
|
class: /* @__PURE__ */ H(["overflow-scroll", "flex-1", "xs:px-16 xs:py-16", "pt-16"])
|
|
12
12
|
}, Oe = {
|
|
@@ -35,9 +35,9 @@ const Ce = {
|
|
|
35
35
|
t: n
|
|
36
36
|
} = ge(), O = p(() => u.currentCatalog), b = p(() => !O.value), S = p(() => u.version === f.F_MENU_VERSION.enum.v4), {
|
|
37
37
|
updateMenu: J
|
|
38
|
-
} = de(A), l = se(_.initCatalogSetting()),
|
|
38
|
+
} = de(A), l = se(_.initCatalogSetting()), Q = p(() => u.catalogs.filter((t) => t._id !== u.state.currentCatalogId).map((t) => t.name)), W = p(() => u.state.restaurants.filter((t) => [...t.additionalCatalogs, t.inHouseDelivery, ...t.linkedDeliveryCatalogs.map((o) => o.catalog), t.pickupCatalog, t.takeawayCatalog, t.catalogId].includes(u.state.currentCatalogId)).map((t) => t.name));
|
|
39
39
|
function T() {
|
|
40
|
-
return
|
|
40
|
+
return W.value.length > 0 ? s("div", {
|
|
41
41
|
class: ["flex items-center", "bg-fm-color-system-warning-100", "rounded-lg", "py-16 px-24 space-x-8"]
|
|
42
42
|
}, [s(be.FmIcon, {
|
|
43
43
|
color: "system-warning-300",
|
|
@@ -62,7 +62,7 @@ const Ce = {
|
|
|
62
62
|
};
|
|
63
63
|
});
|
|
64
64
|
});
|
|
65
|
-
function
|
|
65
|
+
function Y(t) {
|
|
66
66
|
const o = l.value.taxSetting, i = o.mode === x.AUTO ? _.manualTax(R.value) : w(o);
|
|
67
67
|
i.inclusive ?? (i.inclusive = []);
|
|
68
68
|
const d = i.inclusive.findIndex((C) => C.systemCode === t.systemCode);
|
|
@@ -76,7 +76,7 @@ const Ce = {
|
|
|
76
76
|
set: (t) => {
|
|
77
77
|
l.value.taxSetting = t;
|
|
78
78
|
}
|
|
79
|
-
}),
|
|
79
|
+
}), K = async () => {
|
|
80
80
|
const t = _.toCatalog(l.value);
|
|
81
81
|
O.value ? await new xe({
|
|
82
82
|
...O.value,
|
|
@@ -103,7 +103,7 @@ const Ce = {
|
|
|
103
103
|
return r(), V("div", Ce, [s(oe, {
|
|
104
104
|
class: H(["space-y-40 max-w-[751px]", "h-fit"]),
|
|
105
105
|
"blame-form-child-on-validation-failed": "",
|
|
106
|
-
onValidationSuccess:
|
|
106
|
+
onValidationSuccess: K
|
|
107
107
|
}, {
|
|
108
108
|
default: c(() => [v("div", Oe, [b.value ? k("", !0) : (r(), g(ye, {
|
|
109
109
|
key: 0,
|
|
@@ -112,7 +112,7 @@ const Ce = {
|
|
|
112
112
|
default: c(() => [s(i, {
|
|
113
113
|
modelValue: l.value.name,
|
|
114
114
|
"onUpdate:modelValue": o[0] || (o[0] = (a) => l.value.name = a),
|
|
115
|
-
rules: [(a) => !
|
|
115
|
+
rules: [(a) => !Q.value.includes(a.trim()) || e(n)("menu.setting.catalog.fields.name.used"), (a) => !!a.trim() || e(n)("menu.setting.catalog.fields.name.required")],
|
|
116
116
|
label: e(n)("menu.setting.catalog.fields.name.label")
|
|
117
117
|
}, null, 8, ["modelValue", "rules", "label"]), s(T)]),
|
|
118
118
|
_: 1
|
|
@@ -141,7 +141,7 @@ const Ce = {
|
|
|
141
141
|
value: !0,
|
|
142
142
|
label: a.systemCode + " inclusive",
|
|
143
143
|
"onUpdate:modelValue": (y) => {
|
|
144
|
-
|
|
144
|
+
Y({
|
|
145
145
|
...a,
|
|
146
146
|
inclusive: y
|
|
147
147
|
});
|
|
@@ -193,9 +193,9 @@ const Ce = {
|
|
|
193
193
|
default: c(({
|
|
194
194
|
trigger: a
|
|
195
195
|
}) => [s(h, {
|
|
196
|
-
"text-color": e(
|
|
197
|
-
"border-color": e(
|
|
198
|
-
variant: e(
|
|
196
|
+
"text-color": e(P).ColorPrimary,
|
|
197
|
+
"border-color": e(P).ColorPrimary,
|
|
198
|
+
variant: e($).Secondary,
|
|
199
199
|
label: "Add markup configuration",
|
|
200
200
|
"prepend-icon": "add",
|
|
201
201
|
onClick: a
|
|
@@ -229,7 +229,7 @@ const Ce = {
|
|
|
229
229
|
})), 1), v("p", Ue, N(a.includeItems ? e(n)("menu.setting.markup.products.linked", {
|
|
230
230
|
count: a.includeItems.length
|
|
231
231
|
}) : e(n)("menu.setting.markup.products.all")), 1)]), s(h, {
|
|
232
|
-
variant: e(
|
|
232
|
+
variant: e($).Tertiary,
|
|
233
233
|
"prepend-icon": "delete",
|
|
234
234
|
onClick: (we) => Z(y)
|
|
235
235
|
}, null, 8, ["variant", "onClick"])])]),
|
|
@@ -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
|
|
1
|
+
import { defineComponent as L, ref as w, watch as W, resolveComponent as y, createElementBlock as V, openBlock as p, Fragment as P, 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 R, getCurrentInstance as Z, renderList as ee, createBlock as M, createCommentVNode as te } from "vue";
|
|
2
2
|
import { useI18n as B } from "@feedmepos/mf-common";
|
|
3
|
-
import { useSnackbar as O, components as j, useDialog as
|
|
3
|
+
import { useSnackbar as O, components as j, useDialog as Y, FmButtonVariant as z, 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 { G as D, u as N,
|
|
5
|
+
import { G as D, u as N, Q as A, M as K, A as G, a4 as le } from "./index.vue_vue_type_script_setup_true_lang-kj6HkxwD.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-CCKI85Te.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 I } 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 q } from "./subcategory-
|
|
14
|
-
import { a as me } from "./menu-
|
|
13
|
+
import { u as q } from "./subcategory-Dj_DOvFt.js";
|
|
14
|
+
import { a as me } from "./menu-CgQPOu3W.js";
|
|
15
15
|
const pe = {
|
|
16
16
|
class: "fm-typo-en-title-md-600"
|
|
17
17
|
}, _e = {
|
|
@@ -23,14 +23,14 @@ const pe = {
|
|
|
23
23
|
props: {
|
|
24
24
|
initialValue: {}
|
|
25
25
|
},
|
|
26
|
-
setup(
|
|
26
|
+
setup(S, {
|
|
27
27
|
expose: f
|
|
28
28
|
}) {
|
|
29
|
-
const _ =
|
|
29
|
+
const _ = S, 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(I(_.initialValue)), $ = ce(() => n.value.name !== _.initialValue.name, () => {
|
|
34
34
|
e.value = !1;
|
|
35
35
|
});
|
|
36
36
|
async function E() {
|
|
@@ -39,7 +39,7 @@ const pe = {
|
|
|
39
39
|
} = k;
|
|
40
40
|
await c({
|
|
41
41
|
module: G.F_MENU_MODULE_V4_KEY.enum.subCategory,
|
|
42
|
-
operation:
|
|
42
|
+
operation: K.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 = I(_.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(P, null, [X(r.$slots, "default", {
|
|
58
58
|
trigger: b
|
|
59
59
|
}), m(l, {
|
|
60
60
|
id: "group-form",
|
|
@@ -66,7 +66,7 @@ const pe = {
|
|
|
66
66
|
blameFormChildOnValidationFailed: !0
|
|
67
67
|
},
|
|
68
68
|
"max-width": 560,
|
|
69
|
-
"onOn:clickedAway": t(
|
|
69
|
+
"onOn:clickedAway": t($)
|
|
70
70
|
}, {
|
|
71
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, {
|
|
@@ -110,10 +110,10 @@ const pe = {
|
|
|
110
110
|
class: "flex-1 space-y-4"
|
|
111
111
|
}, Fe = {
|
|
112
112
|
class: "fm-typo-en-body-lg-600"
|
|
113
|
-
},
|
|
113
|
+
}, Me = /* @__PURE__ */ L({
|
|
114
114
|
__name: "SubcategoryTable",
|
|
115
|
-
setup(
|
|
116
|
-
const f =
|
|
115
|
+
setup(S) {
|
|
116
|
+
const f = Y(), _ = 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()))), {
|
|
@@ -142,7 +142,7 @@ const pe = {
|
|
|
142
142
|
disabled: !l._id,
|
|
143
143
|
variant: "tertiary",
|
|
144
144
|
textColor: "neutral-gray-400",
|
|
145
|
-
onClick:
|
|
145
|
+
onClick: R(async () => {
|
|
146
146
|
await n(l);
|
|
147
147
|
}, ["stop", "prevent"])
|
|
148
148
|
})]);
|
|
@@ -164,7 +164,7 @@ const pe = {
|
|
|
164
164
|
primaryActions: {
|
|
165
165
|
text: "Remove",
|
|
166
166
|
close: !0,
|
|
167
|
-
variant:
|
|
167
|
+
variant: z.Destructive
|
|
168
168
|
},
|
|
169
169
|
secondaryActions: {
|
|
170
170
|
text: "Cancel",
|
|
@@ -173,12 +173,12 @@ const pe = {
|
|
|
173
173
|
}).onPrimary(async () => {
|
|
174
174
|
await g.updateMenu({
|
|
175
175
|
module: G.F_MENU_MODULE_V4_KEY.enum.subCategory,
|
|
176
|
-
operation:
|
|
176
|
+
operation: K.F_OPERATION_TYPE.delete,
|
|
177
177
|
data: o._id
|
|
178
178
|
}, o.name, !0);
|
|
179
179
|
});
|
|
180
180
|
}
|
|
181
|
-
async function
|
|
181
|
+
async function $(o) {
|
|
182
182
|
const l = o.map((u) => u._id).filter((u) => !!u);
|
|
183
183
|
await k.rearrange(l);
|
|
184
184
|
}
|
|
@@ -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"), Q = y("FmTable"), H = 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(P, null, ee(v.value, (i) => (p(), V("div", {
|
|
203
203
|
key: i._id || "",
|
|
204
204
|
class: "flex flex-row py-12 px-16",
|
|
205
|
-
onClick: (
|
|
206
|
-
}, [s("div", we, [s("p", Fe, T(i.name), 1)]), m(
|
|
205
|
+
onClick: (J) => r(i)
|
|
206
|
+
}, [s("div", we, [s("p", Fe, T(i.name), 1)]), m(H, {
|
|
207
207
|
"text-color": t(oe).NeutralGray400,
|
|
208
|
-
variant: t(
|
|
208
|
+
variant: t(z).Tertiary,
|
|
209
209
|
"prepend-icon": "delete",
|
|
210
210
|
disabled: !i._id,
|
|
211
|
-
onClick:
|
|
211
|
+
onClick: R((J) => 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(Q, {
|
|
222
222
|
"column-defs": b.value,
|
|
223
223
|
draggable: !0,
|
|
224
224
|
"page-size": d.value.length,
|
|
@@ -227,26 +227,26 @@ const pe = {
|
|
|
227
227
|
"shrink-at": !1,
|
|
228
228
|
"hide-footer": "",
|
|
229
229
|
"pin-header-row": "",
|
|
230
|
-
onDndChanged:
|
|
230
|
+
onDndChanged: $,
|
|
231
231
|
onRowClick: l[1] || (l[1] = (i) => r(i.original))
|
|
232
232
|
}, null, 8, ["column-defs", "page-size", "row-data", "search-value"])]),
|
|
233
233
|
_: 1
|
|
234
234
|
})]));
|
|
235
235
|
};
|
|
236
236
|
}
|
|
237
|
-
}),
|
|
237
|
+
}), Se = { class: "flex-1 flex justify-between gap-8 pl-8" }, $e = { 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
|
-
setup(
|
|
240
|
-
const f =
|
|
239
|
+
setup(S) {
|
|
240
|
+
const f = Y(), _ = 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
|
}
|
|
244
244
|
const e = F(() => d.value.length);
|
|
245
|
-
return me().resetOnMount(), (b, n) => (p(),
|
|
245
|
+
return me().resetOnMount(), (b, n) => (p(), M(se, {
|
|
246
246
|
heading: t(a)("menu.subcategory.title")
|
|
247
247
|
}, {
|
|
248
248
|
default: h(() => [
|
|
249
|
-
d.value.length > 0 ? (p(),
|
|
249
|
+
d.value.length > 0 ? (p(), M(Me, { key: 0 })) : (p(), M(t(le), {
|
|
250
250
|
key: 1,
|
|
251
251
|
action: {
|
|
252
252
|
text: t(a)("menu.subcategory.add"),
|
|
@@ -257,13 +257,13 @@ const pe = {
|
|
|
257
257
|
}, null, 8, ["action", "subtitle", "title"]))
|
|
258
258
|
]),
|
|
259
259
|
"append-heading": h(() => [
|
|
260
|
-
s("div",
|
|
261
|
-
s("div",
|
|
260
|
+
s("div", Se, [
|
|
261
|
+
s("div", $e, [
|
|
262
262
|
s("div", Ee, [
|
|
263
263
|
s("p", Le, T(e.value), 1)
|
|
264
264
|
])
|
|
265
265
|
]),
|
|
266
|
-
d.value.length > 0 ? (p(),
|
|
266
|
+
d.value.length > 0 ? (p(), M(ne, {
|
|
267
267
|
key: 0,
|
|
268
268
|
label: t(a)("menu.subcategory.add"),
|
|
269
269
|
"prepend-icon": "add",
|
|
@@ -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 { G as x, u as v,
|
|
2
|
+
import { G as x, u as v, Q as w, M as E, A as M } from "./index.vue_vue_type_script_setup_true_lang-kj6HkxwD.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 S, l as L } from "./index-
|
|
9
|
-
import { a as O } from "./menu-
|
|
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" },
|
|
7
|
+
import { _ as N } from "./Takeaway.vue_vue_type_script_setup_true_lang-CgXT2UVL.js";
|
|
8
|
+
import { T as S, l as L } from "./index-BywPDIFW.js";
|
|
9
|
+
import { a as O } from "./menu-CgQPOu3W.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" }, A = { class: "fm-typo-en-body-md-600 font-semibold" }, z = /* @__PURE__ */ f({
|
|
11
11
|
__name: "Takeaway",
|
|
12
|
-
setup(
|
|
12
|
+
setup(D) {
|
|
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 O().resetOnMount(), (
|
|
14
|
+
return O().resetOnMount(), (I, o) => (d(), i(C, {
|
|
15
15
|
heading: a(r)("menu.takeaway.title")
|
|
16
16
|
}, {
|
|
17
17
|
default: s(() => [
|
|
@@ -23,7 +23,7 @@ const U = { class: "flex-1 flex justify-between gap-8 pl-8" }, B = { class: "fle
|
|
|
23
23
|
t("div", U, [
|
|
24
24
|
t("div", B, [
|
|
25
25
|
t("div", F, [
|
|
26
|
-
t("p",
|
|
26
|
+
t("p", A, b(n.value), 1)
|
|
27
27
|
])
|
|
28
28
|
]),
|
|
29
29
|
t("div", null, [
|
|
@@ -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
|
+
z as default
|
|
64
64
|
};
|