@feedmepos/mf-menu 0.32.43-dev.1 → 0.32.44
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-CiqMdAvF.js → App-BXkiQoTM.js} +7 -7
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-CVs7MfmX.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BoSL4dm7.js} +3 -3
- package/dist/{Catalog-KzftKfOt.js → Catalog-CLFVLyor.js} +44 -44
- package/dist/{Category-pNQdkIvn.js → Category-BdyouDU8.js} +24 -24
- package/dist/{Category-em6K5yk3.js → Category-CNuVHuI3.js} +25 -25
- package/dist/{CookingGuide-Bp9CvTAi.js → CookingGuide-Bed7bUt1.js} +105 -105
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-BbsxEs6O.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CZDL2xJC.js} +1 -1
- package/dist/{Group-mIwdwq58.js → Group-D4UTsIxI.js} +3 -3
- package/dist/{Group-eE_snSRq.js → Group-TUqCPmO3.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-C5l4ycJB.js → Group.vue_vue_type_script_setup_true_lang-BJPT8flL.js} +19 -19
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-B4PznWDZ.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D83liryu.js} +30 -30
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-eS8pMvVG.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CRIRinHB.js} +1651 -1652
- package/dist/{Ingredient-BNvYYdb5.js → Ingredient-CcxoeuDd.js} +20 -20
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CzQIddna.js → InventoryBinding.vue_vue_type_script_setup_true_lang-58tyxdVh.js} +2 -2
- package/dist/{LinkProductSideSheet-BQQtUuCr.js → LinkProductSideSheet-DazOkwkd.js} +45 -45
- package/dist/{MenuSetting-s9syqMsT.js → MenuSetting-B3oLll4C.js} +47 -47
- package/dist/{PrintRoute-BqMxtnus.js → PrintRoute-D878qPu8.js} +39 -39
- package/dist/{Product-CHhpb-2E.js → Product-DOC8y_mW.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-DHny0uGc.js → Product.vue_vue_type_script_setup_true_lang-tZyBhWYT.js} +140 -140
- package/dist/{ProductInternalTools-DEB8Xhnv.js → ProductInternalTools-9TgIc2bR.js} +66 -66
- package/dist/Products-DfUGnHmD.js +1568 -0
- package/dist/{Publish-tnJY6n8r.js → Publish-BktK_PKq.js} +29 -29
- package/dist/{Recipe-DDPXv3AU.js → Recipe-eA0xrGYk.js} +24 -24
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-roEHTZnU.js → RuleView.vue_vue_type_script_setup_true_lang-t8M7z09s.js} +366 -366
- package/dist/{Scheduler-CMKwUkNN.js → Scheduler-CKSqPZLQ.js} +11 -11
- package/dist/{ServingSequence-NA0yeDMF.js → ServingSequence-Ea20baNj.js} +44 -44
- package/dist/{Setting-BRfi_hxY.js → Setting-u6lX_Dzg.js} +17 -17
- package/dist/{Subcategory-W9faZY7n.js → Subcategory-C6s7OMOb.js} +51 -51
- package/dist/{Takeaway-fijUedLA.js → Takeaway-B9kr-Nf4.js} +13 -13
- package/dist/{Takeaway-5DKxdpZ3.js → Takeaway-lWxS9oWe.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BhiFnON_.js → Takeaway.vue_vue_type_script_setup_true_lang-oA0e9oI5.js} +54 -54
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-BUNPf1OD.js → Thumbnail.vue_vue_type_script_setup_true_lang-T40ChY7j.js} +27 -27
- package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-CcIGCUwk.js +194 -0
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B1e3d-uX.js +6130 -0
- package/dist/{Unit-582FVjPq.js → Unit-DkQlUg2l.js} +8 -8
- package/dist/{Variant-Cb02SmoL.js → Variant-BF5r2WLL.js} +25 -25
- package/dist/{_id_-BYU1xwzB.js → _id_-_oqk-OhC.js} +28 -28
- package/dist/app-CfCYl2pO.js +363 -0
- package/dist/{app-CcPyLfvj.js → app-DIYHNWEw.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-C1DHqpkR.js → linked-status-AoXjo9FF.js} +5 -5
- package/dist/assets/{menu-export-Ci-MXpn1.js → menu-export-BHcaWhM3.js} +2 -2
- package/dist/assets/{override-menu-CajXgOdO.js → override-menu-B9xQcjuJ.js} +5 -5
- package/dist/assets/{validate-menu-DDPswAia.js → validate-menu-D-ezd4W8.js} +2 -2
- package/dist/{catalog-Bs3SNL7n.js → catalog-CvN9Wu8V.js} +1 -1
- package/dist/{catalogSetting-BN4d_FvT.js → catalogSetting-qS5Np22q.js} +1 -1
- package/dist/{currency-Cma3AX0v.js → currency-Nxod6uwl.js} +1 -1
- package/dist/dayjs.min-B1AjAGva.js +6 -0
- package/dist/index-C0Zw1cSS.js +545 -0
- package/dist/{index-3wsuY29D.js → index-Cq-czJjU.js} +31 -31
- package/dist/index-nKlYiotY.js +246 -0
- package/dist/{index.vue_vue_type_script_setup_true_lang-DotsunNI.js → index.vue_vue_type_script_setup_true_lang-YXKayPEp.js} +269 -244
- package/dist/{item-DOcT7NVT.js → item-CUZSonzT.js} +2587 -2587
- package/dist/{jszip.min-h2cXUF_-.js → jszip.min-BnkZQ6lD.js} +6 -7
- package/dist/{menu-CAmS3pcT.js → menu-BP_ArXCI.js} +1 -1
- package/dist/{menuV2-COwLB3e1.js → menuV2-BGEYgQ8-.js} +128 -128
- package/dist/{priceTier-DrrQcFCh.js → priceTier-B-Qa0xaO.js} +1 -1
- package/dist/{rules-DGRdKiV6.js → rules-Dchd_ilF.js} +12 -12
- package/dist/{scheduler-BpEV0N8K.js → scheduler-DN7ZGLk8.js} +29 -29
- package/dist/{toExcel-eN1zgiqN.js → toExcel-jHmkDqcm.js} +2 -2
- package/dist/{translation-BCZ1Ruvv.js → translation-Cdap0IVg.js} +21 -35
- package/dist/{unit-BAcozp9s.js → unit-DgL56pkI.js} +35 -35
- package/package.json +2 -2
- package/dist/Products-C7UtJMGZ.js +0 -307
- package/dist/RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-PFRwBb1c.js +0 -144
- package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-DZp38dX4.js +0 -196
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DC4naR16.js +0 -5767
- package/dist/app-0m01R0SM.js +0 -2286
- package/dist/dayjs.min-D-HR3H5W.js +0 -7
- package/dist/index-DXY5zcNA.js +0 -545
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent as N, computed as y, h as p, withModifiers as U, ref as V, resolveComponent as _, createBlock as k, openBlock as i, unref as d, withCtx as h, createElementBlock as D, createVNode as f, Fragment as H, createElementVNode as s, renderList as T, toDisplayString as S, createCommentVNode as I } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { A as c, Q as W, u as Q, G, a4 as J } from "./index.vue_vue_type_script_setup_true_lang-YXKayPEp.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 le, u as se, c as re } from "./scheduler-
|
|
6
|
+
import { _ as ae } from "./app-CfCYl2pO.js";
|
|
7
|
+
import { d as oe, _ as le, u as se, c as re } from "./scheduler-DN7ZGLk8.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"
|
|
@@ -75,7 +75,7 @@ const ce = {
|
|
|
75
75
|
outline: !0,
|
|
76
76
|
color: "neutral-gray-400",
|
|
77
77
|
onClick: U(() => {
|
|
78
|
-
|
|
78
|
+
A(e.row.original);
|
|
79
79
|
}, ["stop", "prevent"])
|
|
80
80
|
})])
|
|
81
81
|
}]), r = {
|
|
@@ -115,12 +115,12 @@ const ce = {
|
|
|
115
115
|
var t;
|
|
116
116
|
C.value || (t = x.value) == null || t.show(e);
|
|
117
117
|
}
|
|
118
|
-
const
|
|
119
|
-
function
|
|
118
|
+
const q = ee();
|
|
119
|
+
function A(e) {
|
|
120
120
|
let t = [p("span", a("menu.scheduler.dialogs.remove.message", {
|
|
121
121
|
name: e.name
|
|
122
122
|
}))];
|
|
123
|
-
|
|
123
|
+
q.open({
|
|
124
124
|
title: a("menu.scheduler.dialogs.remove.title"),
|
|
125
125
|
contentComponent: p("div", t),
|
|
126
126
|
primaryActions: {
|
|
@@ -136,11 +136,11 @@ const ce = {
|
|
|
136
136
|
await w.updateMenu(oe(e), e.name, !0);
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
|
-
async function
|
|
139
|
+
async function O(e) {
|
|
140
140
|
const t = e._id ? se(e) : re(e);
|
|
141
141
|
await w.updateMenu(t, e.name);
|
|
142
142
|
}
|
|
143
|
-
const
|
|
143
|
+
const j = Q(), B = y(() => j.categorizedRawMenuItems), m = y(() => j.state.menu.modules.scheduler), w = W(G(te())), C = y(() => w.checkMenuIsLoading()), g = V(""), K = y(() => {
|
|
144
144
|
const e = g.value.toLowerCase();
|
|
145
145
|
return e ? m.value.filter((t) => t.name.toLowerCase().includes(e)) : m.value;
|
|
146
146
|
});
|
|
@@ -203,7 +203,7 @@ const ce = {
|
|
|
203
203
|
icon: "delete",
|
|
204
204
|
variant: "tertiary",
|
|
205
205
|
"text-color": "neutral-gray-400",
|
|
206
|
-
onClick: U(() =>
|
|
206
|
+
onClick: U(() => A(n), ["stop"])
|
|
207
207
|
}, null, 8, ["onClick"])]),
|
|
208
208
|
_: 2
|
|
209
209
|
}, 1032, ["label", "onClick"]))), 128))]),
|
|
@@ -212,7 +212,7 @@ const ce = {
|
|
|
212
212
|
ref_key: "schedulerDialogRef",
|
|
213
213
|
ref: x,
|
|
214
214
|
"categorized-items": B.value,
|
|
215
|
-
onOnComplete:
|
|
215
|
+
onOnComplete: O
|
|
216
216
|
}, null, 8, ["categorized-items"])]),
|
|
217
217
|
_: 1
|
|
218
218
|
}, 8, ["heading"]);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as H, ref 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 {
|
|
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-YXKayPEp.js";
|
|
4
4
|
import { useI18n as ee, ItemSelector as me, useCoreStore as pe } from "@feedmepos/mf-common";
|
|
5
|
-
import { useSnackbar as ne, components as Y, useDialog as _e, FmButtonVariant 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-CfCYl2pO.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-DIYHNWEw.js";
|
|
12
12
|
import { c as Se } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
|
13
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",
|
|
@@ -18,23 +18,23 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
18
18
|
},
|
|
19
19
|
emits: ["submitted"],
|
|
20
20
|
setup(K, { expose: b, emit: N }) {
|
|
21
|
-
const { t: r } = ee(), p = K, R = N, s =
|
|
22
|
-
p.initialValue ?
|
|
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
|
-
}, E =
|
|
31
|
-
async function
|
|
30
|
+
}, E = L(() => p.action === "add" ? r("menu.serving_sequence.add") : r("menu.serving_sequence.update"));
|
|
31
|
+
async function P() {
|
|
32
32
|
try {
|
|
33
33
|
if (p.action === "add")
|
|
34
34
|
await q.updateMenu(
|
|
35
35
|
{
|
|
36
36
|
module: S.F_MENU_MODULE_V4_KEY.enum.serveSequence,
|
|
37
|
-
operation:
|
|
37
|
+
operation: O.F_OPERATION_TYPE.create,
|
|
38
38
|
data: {
|
|
39
39
|
...s.value,
|
|
40
40
|
position: C.serveSequence.length
|
|
@@ -46,7 +46,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
46
46
|
await q.updateMenu(
|
|
47
47
|
{
|
|
48
48
|
module: S.F_MENU_MODULE_V4_KEY.enum.serveSequence,
|
|
49
|
-
operation:
|
|
49
|
+
operation: O.F_OPERATION_TYPE.update,
|
|
50
50
|
data: s.value
|
|
51
51
|
},
|
|
52
52
|
s.value.name
|
|
@@ -61,10 +61,10 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
61
61
|
trigger: _,
|
|
62
62
|
show: u
|
|
63
63
|
});
|
|
64
|
-
function
|
|
64
|
+
function U(f) {
|
|
65
65
|
return f.reduce((a, v) => (a[v._id] = [...a[v._id] ?? [], v], a), {});
|
|
66
66
|
}
|
|
67
|
-
const
|
|
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, [
|
|
@@ -75,13 +75,13 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
75
75
|
"onUpdate:modelValue": a[3] || (a[3] = (n) => u.value = n),
|
|
76
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
|
|
82
82
|
}, {
|
|
83
83
|
"side-sheet-header": m(() => [
|
|
84
|
-
y("p", Ce,
|
|
84
|
+
y("p", Ce, z(E.value), 1)
|
|
85
85
|
]),
|
|
86
86
|
"side-sheet-footer": m(() => [
|
|
87
87
|
y("div", Ee, [
|
|
@@ -116,7 +116,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
116
116
|
}, null, 8, ["modelValue", "rules", "label", "placeholder"]),
|
|
117
117
|
l(t(me), {
|
|
118
118
|
"categorized-items": t(C).categorizedItems,
|
|
119
|
-
data:
|
|
119
|
+
data: B.value,
|
|
120
120
|
class: "flex-1",
|
|
121
121
|
"select-variant": "",
|
|
122
122
|
"show-variant": "",
|
|
@@ -129,27 +129,27 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
129
129
|
], 64);
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
|
-
}),
|
|
132
|
+
}), T = Ve, we = {
|
|
133
133
|
key: 0,
|
|
134
134
|
class: "xs:pt-24"
|
|
135
135
|
}, Me = {
|
|
136
136
|
class: "flex justify-end mb-8 xs:mt-8"
|
|
137
137
|
}, Fe = {
|
|
138
138
|
key: 1,
|
|
139
|
-
class: /* @__PURE__ */
|
|
140
|
-
},
|
|
139
|
+
class: /* @__PURE__ */ J(["flex-1", "overflow-scroll", "divide-y divide-fm-color-neutral-gray-100", "pb-64"])
|
|
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
148
|
setup(K) {
|
|
149
149
|
const {
|
|
150
150
|
searchKey: b,
|
|
151
151
|
filter: N
|
|
152
|
-
} = ke(), r = W(), p = ne(), R = X(p), s = Z(R), C = _e(), i = pe(),
|
|
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) => {
|
|
@@ -173,7 +173,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
173
173
|
}), se(() => {
|
|
174
174
|
i.restaurants.value.length && (i.currentRestaurant.value || i.changeRestaurant(i.restaurants.value[0]));
|
|
175
175
|
});
|
|
176
|
-
const _ =
|
|
176
|
+
const _ = L(() => r.serveSequence.filter(({
|
|
177
177
|
name: e
|
|
178
178
|
}) => N([e])) ?? []);
|
|
179
179
|
function E(e) {
|
|
@@ -183,7 +183,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
183
183
|
primaryActions: {
|
|
184
184
|
text: "Delete",
|
|
185
185
|
close: !0,
|
|
186
|
-
variant:
|
|
186
|
+
variant: A.Destructive
|
|
187
187
|
},
|
|
188
188
|
secondaryActions: {
|
|
189
189
|
text: "Cancel",
|
|
@@ -192,29 +192,29 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
192
192
|
}).onPrimary(async () => {
|
|
193
193
|
await s.updateMenu({
|
|
194
194
|
module: S.F_MENU_MODULE_V4_KEY.enum.serveSequence,
|
|
195
|
-
operation:
|
|
195
|
+
operation: O.F_OPERATION_TYPE.delete,
|
|
196
196
|
data: e._id
|
|
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
|
-
variant:
|
|
204
|
+
variant: A.Tertiary,
|
|
205
205
|
textColor: "neutral-gray-400",
|
|
206
206
|
onClick: (n) => {
|
|
207
207
|
n.stopPropagation(), E(e);
|
|
208
208
|
}
|
|
209
209
|
});
|
|
210
|
-
async function
|
|
210
|
+
async function U(e) {
|
|
211
211
|
await s.updateMenu({
|
|
212
212
|
module: S.F_MENU_MODULE_V4_KEY.enum.serveSequence,
|
|
213
|
-
operation:
|
|
213
|
+
operation: O.F_OPERATION_TYPE.rearrange,
|
|
214
214
|
data: e.map((n) => n._id)
|
|
215
215
|
}, "sequences");
|
|
216
216
|
}
|
|
217
|
-
const
|
|
217
|
+
const B = I([{
|
|
218
218
|
accessorKey: "name",
|
|
219
219
|
header: () => c("menu.serving_sequence.columns.name"),
|
|
220
220
|
enableSorting: !1,
|
|
@@ -236,7 +236,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
236
236
|
class: "w-full flex justify-end items-center"
|
|
237
237
|
}, [$(Y.FmButton, {
|
|
238
238
|
prependIcon: "delete",
|
|
239
|
-
variant:
|
|
239
|
+
variant: A.Tertiary,
|
|
240
240
|
textColor: "neutral-gray-400",
|
|
241
241
|
onClick: (n) => {
|
|
242
242
|
n.stopPropagation(), E(e.row.original);
|
|
@@ -248,7 +248,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
248
248
|
const {
|
|
249
249
|
container: n,
|
|
250
250
|
vNode: k
|
|
251
|
-
} = Se(
|
|
251
|
+
} = Se(T, f, {
|
|
252
252
|
initialValue: e,
|
|
253
253
|
action: "update",
|
|
254
254
|
onSubmitted: () => {
|
|
@@ -258,7 +258,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
258
258
|
(M = (w = k.component) == null ? void 0 : w.exposed) == null || M.trigger();
|
|
259
259
|
}
|
|
260
260
|
re(() => r.selectCatalog(null));
|
|
261
|
-
const v = fe(), V =
|
|
261
|
+
const v = fe(), V = L(() => v.breakpoints.value.xs);
|
|
262
262
|
return (e, n) => {
|
|
263
263
|
const k = h("FmSpacer"), w = h("fm-button"), M = h("fm-search"), te = h("fm-table");
|
|
264
264
|
return d(), j(be, {
|
|
@@ -267,7 +267,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
267
267
|
}, {
|
|
268
268
|
"append-heading": m(() => [!t(s).checkMenuIsLoading() && _.value.length ? (d(), g(x, {
|
|
269
269
|
key: 0
|
|
270
|
-
}, [l(k), l(t(
|
|
270
|
+
}, [l(k), l(t(T), {
|
|
271
271
|
action: "add"
|
|
272
272
|
}, {
|
|
273
273
|
default: m(({
|
|
@@ -294,17 +294,17 @@ 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:
|
|
297
|
+
class: J(["py-12 px-16", "flex items-center space-x-8"]),
|
|
298
298
|
onClick: (Re) => a(o)
|
|
299
|
-
}, [y("div",
|
|
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
|
-
}, null, 8, ["servingSequence"])], 8,
|
|
303
|
+
}, null, 8, ["servingSequence"])], 8, Ie))), 128))])) : (d(), j(ve, {
|
|
304
304
|
key: 0
|
|
305
305
|
}, {
|
|
306
306
|
default: m(() => [l(te, {
|
|
307
|
-
"column-defs":
|
|
307
|
+
"column-defs": B.value,
|
|
308
308
|
loading: t(s).checkMenuIsLoading(),
|
|
309
309
|
"page-size": _.value.length,
|
|
310
310
|
"row-data": _.value,
|
|
@@ -314,7 +314,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
314
314
|
draggable: "",
|
|
315
315
|
"hide-footer": "",
|
|
316
316
|
"pin-header-row": "",
|
|
317
|
-
onDndChanged: n[1] || (n[1] = (o) =>
|
|
317
|
+
onDndChanged: n[1] || (n[1] = (o) => U(o)),
|
|
318
318
|
onRowClick: n[2] || (n[2] = (o) => a(o.original))
|
|
319
319
|
}, null, 8, ["column-defs", "loading", "page-size", "row-data", "search-value"])]),
|
|
320
320
|
_: 1
|
|
@@ -322,7 +322,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
322
322
|
subtitle: t(c)("menu.serving_sequence.empty.subtitle"),
|
|
323
323
|
title: t(c)("menu.serving_sequence.empty.title")
|
|
324
324
|
}, {
|
|
325
|
-
action: m(() => [l(t(
|
|
325
|
+
action: m(() => [l(t(T), {
|
|
326
326
|
action: "add"
|
|
327
327
|
}, {
|
|
328
328
|
default: m(({
|
|
@@ -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,
|
|
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-YXKayPEp.js";
|
|
3
3
|
import { useCoreStore as ve, useI18n as ge } from "@feedmepos/mf-common";
|
|
4
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-t8M7z09s.js";
|
|
7
|
+
import { _ as z, a as ke } from "./GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D83liryu.js";
|
|
8
|
+
import { C as _, a as x } from "./catalogSetting-qS5Np22q.js";
|
|
9
|
+
import { C as xe } from "./catalog-CvN9Wu8V.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 = {
|
|
@@ -29,15 +29,15 @@ const Ce = {
|
|
|
29
29
|
}, ze = /* @__PURE__ */ ne({
|
|
30
30
|
__name: "Setting",
|
|
31
31
|
setup(Ne) {
|
|
32
|
-
const F = ve(), u = me(), j = fe(),
|
|
32
|
+
const F = ve(), u = me(), j = fe(), A = ce(j), {
|
|
33
33
|
minor: q
|
|
34
|
-
} =
|
|
34
|
+
} = A, G = _e(), {
|
|
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(
|
|
39
|
-
function
|
|
40
|
-
return
|
|
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
|
+
function T() {
|
|
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,9 +112,9 @@ 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
|
-
}, null, 8, ["modelValue", "rules", "label"]), s(
|
|
117
|
+
}, null, 8, ["modelValue", "rules", "label"]), s(T)]),
|
|
118
118
|
_: 1
|
|
119
119
|
}, 8, ["title"])), s(E, {
|
|
120
120
|
label: e(n)("menu.setting.tax.title")
|
|
@@ -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
|
});
|
|
@@ -243,7 +243,7 @@ const Ce = {
|
|
|
243
243
|
"onUpdate:modelValue": o[6] || (o[6] = (a) => l.value = a),
|
|
244
244
|
"is-main-catalog": b.value,
|
|
245
245
|
"is-v4": S.value
|
|
246
|
-
}, null, 8, ["modelValue", "is-main-catalog", "is-v4"]), b.value ? (r(), g(
|
|
246
|
+
}, null, 8, ["modelValue", "is-main-catalog", "is-v4"]), b.value ? (r(), g(T, {
|
|
247
247
|
key: 3
|
|
248
248
|
})) : k("", !0)]), v("div", he, [s(h, {
|
|
249
249
|
label: e(n)("common.save"),
|