@feedmepos/mf-menu 0.31.30-beta.1 → 0.31.31-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-CrQBq4gc.js → App-1TX8v7ZA.js} +10 -8
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-D00UOSsK.js → ApplyProduct.vue_vue_type_script_setup_true_lang-CR7QrFUG.js} +12 -12
- package/dist/{Catalog-D4m8x_f2.js → Catalog-DWClc58s.js} +75 -74
- package/dist/{Category-sQll5ITQ.js → Category-BqKFvFam.js} +60 -60
- package/dist/{Category-Ql1kDDH-.js → Category-IYMtMoT-.js} +28 -28
- package/dist/{CookingGuide-CSutufcu.js → CookingGuide-BayJ6zj4.js} +103 -101
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-BqhYFXNG.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-Ceq86b3d.js} +1 -1
- package/dist/{Group-CnBE6CiB.js → Group-LqSX7ue6.js} +1 -1
- package/dist/{Group-YqVh5hC0.js → Group-RujTPTns.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-D9TSH4sS.js → Group.vue_vue_type_script_setup_true_lang-Dj9ZmkYe.js} +138 -137
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CqriuXVC.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D5GWkh3G.js} +16 -16
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CaIU0RsG.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-C4IrA3es.js} +4616 -4610
- package/dist/{Ingredient-MhLxJzAU.js → Ingredient-_tc8llr1.js} +65 -64
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CIbExsMI.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DLFDf-VZ.js} +14 -12
- package/dist/{LinkProductSideSheet-D7vYZbFy.js → LinkProductSideSheet-C6rF-G1v.js} +14 -12
- package/dist/{MenuSetting-n0me5wY8.js → MenuSetting-xDHeeROY.js} +27 -26
- package/dist/{PrintRoute-CudZZYbe.js → PrintRoute-B_TFMn5e.js} +17 -15
- package/dist/{Product-DPZQgWET.js → Product-DdEEqrtc.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-CdaeZy_o.js → Product.vue_vue_type_script_setup_true_lang-zcistmwh.js} +257 -256
- package/dist/{ProductInternalTools-DgANHliV.js → ProductInternalTools-BcC7BF6W.js} +45 -45
- package/dist/{Products-Ez4R3jKW.js → Products-Cu0cJshV.js} +74 -72
- package/dist/{Publish-B4DEPe1I.js → Publish-Bm3Xiks1.js} +34 -32
- package/dist/{Recipe-Cripr-gY.js → Recipe-DWK-luIZ.js} +65 -63
- package/dist/{Scheduler-C-OV9d7d.js → Scheduler-Cb1TeBhW.js} +19 -19
- package/dist/{ServingSequence-DAumDXP1.js → ServingSequence-evSIET_8.js} +34 -34
- package/dist/{Setting-ByaHpIAN.js → Setting-Cn3kwC9F.js} +54 -53
- package/dist/{Subcategory-ro2aGt2H.js → Subcategory-q4m4qHsU.js} +34 -34
- package/dist/{Takeaway-CJb0ayDC.js → Takeaway-ClepHYGu.js} +14 -14
- package/dist/{Takeaway-AEg_0gKg.js → Takeaway-D-rdUZuh.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-Cjj4bxoL.js → Takeaway.vue_vue_type_script_setup_true_lang-y9Yxstu2.js} +41 -40
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Drf4n4rj.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BSeLfoOA.js} +1108 -1106
- package/dist/{Unit-1wzUBplb.js → Unit-IM8Naj82.js} +12 -12
- package/dist/{Variant-Dnz2v5u0.js → Variant-fzGvwaMo.js} +16 -16
- package/dist/{_id_-C3rBZ6zL.js → _id_-BsKNG9Qv.js} +22 -22
- package/dist/{app-sDPxNF11.js → app-BzQRUMTK.js} +3 -3
- package/dist/{app-CLY6CoaV.js → app-CoVUUCa_.js} +24 -24
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-BZ4FSJ_Z.js → linked-status-eQqjvOq_.js} +2 -2
- package/dist/assets/{override-menu-C-fWJdVd.js → override-menu-C8NTBJgN.js} +2 -2
- package/dist/assets/{validate-menu-BDEM_Odz.js → validate-menu-Dn-OO7Ed.js} +2 -2
- package/dist/{catalog-bkFntZNz.js → catalog-CaXceaA2.js} +1 -1
- package/dist/{catalogSetting-zrKwGJ_C.js → catalogSetting-BGvckFdh.js} +1 -1
- package/dist/{category-BuPYaEsy.js → category-u5eo_Vjd.js} +5 -3
- package/dist/currency-BPHwez-E.js +7 -0
- package/dist/{dayjs.min-CR2NIyKn.js → dayjs.min-Bsr3tJCn.js} +1 -1
- package/dist/{index-BNORpjos.js → index-Bbx4iZ6n.js} +27 -27
- package/dist/{index-Dp_vLFQp.js → index-DSAG0yWh.js} +22 -20
- package/dist/{index-D20u0bCl.js → index-tRQb7RN_.js} +1 -1
- package/dist/{item-D4DcBt7N.js → item-BAqzKh4O.js} +801 -799
- package/dist/{jszip.min-CRJ61J9H.js → jszip.min-BKJtvCjM.js} +353 -353
- package/dist/{menu-Dw-Hpy07.js → menu-CDrsBjmr.js} +11 -9
- package/dist/menu-CsIzrBEr.js +74044 -0
- package/dist/packages/shared/src/permission/posPermission.d.ts +6 -0
- package/dist/{priceTier-EDLTGEjz.js → priceTier-DfbHonGe.js} +4 -4
- package/dist/{scheduler-CpPn2BlK.js → scheduler-DTWaBudB.js} +13 -11
- package/dist/{subcategory-B_W6vbM8.js → subcategory-D-R5r1Tr.js} +86 -84
- package/dist/{toExcel-D02OlDJu.js → toExcel-84VTtSA7.js} +2 -2
- package/dist/{unit-fro9wz1K.js → unit-B4zscxzo.js} +24 -23
- package/package.json +1 -1
- package/dist/currency-BISImIgX.js +0 -7
- package/dist/menu-ibc-yXVt.js +0 -107745
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as J, ref as L, computed as
|
|
1
|
+
import { defineComponent as J, ref as L, computed as I, 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 Q, renderList as ue } from "vue";
|
|
2
2
|
import { useRouter as ce } from "vue-router";
|
|
3
|
-
import { H, u as W,
|
|
3
|
+
import { D as H, u as W, A as X, M as Z, H as O, B as S } from "./menu-CsIzrBEr.js";
|
|
4
4
|
import { useI18n as ee, ItemSelector as de, useCoreStore as me } from "@feedmepos/mf-common";
|
|
5
|
-
import { useSnackbar as ne, components as Y, useDialog as pe, FmButtonVariant as
|
|
5
|
+
import { useSnackbar as ne, components as Y, useDialog as pe, FmButtonVariant as A, useBreakpoints as _e } from "@feedmepos/ui-library";
|
|
6
6
|
import { _ as fe } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
7
|
-
import { _ as ge, R as ve } from "./app-
|
|
7
|
+
import { _ as ge, R as ve } from "./app-CoVUUCa_.js";
|
|
8
8
|
import { _ as he } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
|
|
9
9
|
import { c as ye } from "./check-C9mY6LiX.js";
|
|
10
10
|
import { _ as be } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
11
11
|
import { u as ke } from "./search-BAPEUu1R.js";
|
|
12
|
-
import { u as xe } from "./app-
|
|
12
|
+
import { u as xe } from "./app-BzQRUMTK.js";
|
|
13
13
|
import { c as Se } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
|
14
14
|
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__ */ J({
|
|
15
15
|
__name: "Form",
|
|
@@ -28,14 +28,14 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
28
28
|
}
|
|
29
29
|
), C = W(), i = ne(), R = X(i), q = Z(R), c = L(!1), u = L(!1), _ = (f) => {
|
|
30
30
|
ye.isBoolean(f) ? u.value = f : u.value = !u.value;
|
|
31
|
-
}, E =
|
|
32
|
-
async function
|
|
31
|
+
}, E = I(() => p.action === "add" ? r("menu.serving_sequence.add") : r("menu.serving_sequence.update"));
|
|
32
|
+
async function B() {
|
|
33
33
|
try {
|
|
34
34
|
if (p.action === "add")
|
|
35
35
|
await q.updateMenu(
|
|
36
36
|
{
|
|
37
37
|
module: S.F_MENU_MODULE_V4_KEY.enum.serveSequence,
|
|
38
|
-
operation:
|
|
38
|
+
operation: O.F_OPERATION_TYPE.create,
|
|
39
39
|
data: {
|
|
40
40
|
...s.value,
|
|
41
41
|
position: C.serveSequence.length
|
|
@@ -47,7 +47,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
47
47
|
await q.updateMenu(
|
|
48
48
|
{
|
|
49
49
|
module: S.F_MENU_MODULE_V4_KEY.enum.serveSequence,
|
|
50
|
-
operation:
|
|
50
|
+
operation: O.F_OPERATION_TYPE.update,
|
|
51
51
|
data: s.value
|
|
52
52
|
},
|
|
53
53
|
s.value.name
|
|
@@ -62,10 +62,10 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
62
62
|
trigger: _,
|
|
63
63
|
show: u
|
|
64
64
|
});
|
|
65
|
-
function
|
|
65
|
+
function P(f) {
|
|
66
66
|
return f.reduce((a, v) => (a[v._id] = [...a[v._id] ?? [], v], a), {});
|
|
67
67
|
}
|
|
68
|
-
const
|
|
68
|
+
const U = I(() => P(H(s.value.items)));
|
|
69
69
|
return (f, a) => {
|
|
70
70
|
const v = h("fm-text-field"), V = h("fm-button"), e = h("fm-side-sheet");
|
|
71
71
|
return d(), g(x, null, [
|
|
@@ -76,13 +76,13 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
76
76
|
"onUpdate:modelValue": a[3] || (a[3] = (n) => u.value = n),
|
|
77
77
|
"is-container": t(Y).FmForm,
|
|
78
78
|
"is-container-props": {
|
|
79
|
-
onValidationSuccess:
|
|
79
|
+
onValidationSuccess: B,
|
|
80
80
|
blameFormChildOnValidationFailed: !0
|
|
81
81
|
},
|
|
82
82
|
"max-width": 560
|
|
83
83
|
}, {
|
|
84
84
|
"side-sheet-header": m(() => [
|
|
85
|
-
y("p", Ce,
|
|
85
|
+
y("p", Ce, z(E.value), 1)
|
|
86
86
|
]),
|
|
87
87
|
"side-sheet-footer": m(() => [
|
|
88
88
|
y("div", Ee, [
|
|
@@ -117,7 +117,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
117
117
|
}, null, 8, ["modelValue", "rules", "label", "placeholder"]),
|
|
118
118
|
l(t(de), {
|
|
119
119
|
"categorized-items": t(C).categorizedItems,
|
|
120
|
-
data:
|
|
120
|
+
data: U.value,
|
|
121
121
|
class: "flex-1",
|
|
122
122
|
"select-variant": "",
|
|
123
123
|
"show-variant": "",
|
|
@@ -130,7 +130,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
130
130
|
], 64);
|
|
131
131
|
};
|
|
132
132
|
}
|
|
133
|
-
}),
|
|
133
|
+
}), T = Ve, we = {
|
|
134
134
|
key: 0,
|
|
135
135
|
class: "xs:pt-24"
|
|
136
136
|
}, Me = {
|
|
@@ -138,9 +138,9 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
138
138
|
}, Fe = {
|
|
139
139
|
key: 1,
|
|
140
140
|
class: /* @__PURE__ */ Q(["flex-1", "overflow-scroll", "divide-y divide-fm-color-neutral-gray-100", "pb-64"])
|
|
141
|
-
}, Le = ["onClick"],
|
|
141
|
+
}, Le = ["onClick"], Ie = {
|
|
142
142
|
class: "flex-1 space-y-4"
|
|
143
|
-
},
|
|
143
|
+
}, Oe = {
|
|
144
144
|
class: "fm-typo-en-body-lg-600"
|
|
145
145
|
}, De = {
|
|
146
146
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
@@ -174,7 +174,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
174
174
|
}), se(() => {
|
|
175
175
|
i.restaurants.value.length && (i.currentRestaurant.value || i.changeRestaurant(i.restaurants.value[0]));
|
|
176
176
|
});
|
|
177
|
-
const _ =
|
|
177
|
+
const _ = I(() => r.serveSequence.filter(({
|
|
178
178
|
name: e
|
|
179
179
|
}) => D([e])) ?? []);
|
|
180
180
|
function E(e) {
|
|
@@ -184,7 +184,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
184
184
|
primaryActions: {
|
|
185
185
|
text: "Delete",
|
|
186
186
|
close: !0,
|
|
187
|
-
variant:
|
|
187
|
+
variant: A.Destructive
|
|
188
188
|
},
|
|
189
189
|
secondaryActions: {
|
|
190
190
|
text: "Cancel",
|
|
@@ -193,29 +193,29 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
193
193
|
}).onPrimary(async () => {
|
|
194
194
|
await s.updateMenu({
|
|
195
195
|
module: S.F_MENU_MODULE_V4_KEY.enum.serveSequence,
|
|
196
|
-
operation:
|
|
196
|
+
operation: O.F_OPERATION_TYPE.delete,
|
|
197
197
|
data: e._id
|
|
198
198
|
}, e.name, !0);
|
|
199
199
|
});
|
|
200
200
|
}
|
|
201
|
-
const
|
|
201
|
+
const B = ({
|
|
202
202
|
servingSequence: e
|
|
203
203
|
}) => $(Y.FmButton, {
|
|
204
204
|
prependIcon: "delete",
|
|
205
|
-
variant:
|
|
205
|
+
variant: A.Tertiary,
|
|
206
206
|
textColor: "neutral-gray-400",
|
|
207
207
|
onClick: (n) => {
|
|
208
208
|
n.stopPropagation(), E(e);
|
|
209
209
|
}
|
|
210
210
|
});
|
|
211
|
-
async function
|
|
211
|
+
async function P(e) {
|
|
212
212
|
await s.updateMenu({
|
|
213
213
|
module: S.F_MENU_MODULE_V4_KEY.enum.serveSequence,
|
|
214
|
-
operation:
|
|
214
|
+
operation: O.F_OPERATION_TYPE.rearrange,
|
|
215
215
|
data: e.map((n) => n._id)
|
|
216
216
|
}, "sequences");
|
|
217
217
|
}
|
|
218
|
-
const
|
|
218
|
+
const U = L([{
|
|
219
219
|
accessorKey: "name",
|
|
220
220
|
header: () => c("menu.serving_sequence.columns.name"),
|
|
221
221
|
enableSorting: !1,
|
|
@@ -237,7 +237,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
237
237
|
class: "w-full flex justify-end items-center"
|
|
238
238
|
}, [$(Y.FmButton, {
|
|
239
239
|
prependIcon: "delete",
|
|
240
|
-
variant:
|
|
240
|
+
variant: A.Tertiary,
|
|
241
241
|
textColor: "neutral-gray-400",
|
|
242
242
|
onClick: (n) => {
|
|
243
243
|
n.stopPropagation(), E(e.row.original);
|
|
@@ -249,7 +249,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
249
249
|
const {
|
|
250
250
|
container: n,
|
|
251
251
|
vNode: k
|
|
252
|
-
} = Se(
|
|
252
|
+
} = Se(T, f, {
|
|
253
253
|
initialValue: e,
|
|
254
254
|
action: "update",
|
|
255
255
|
onSubmitted: () => {
|
|
@@ -259,7 +259,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
259
259
|
(M = (w = k.component) == null ? void 0 : w.exposed) == null || M.trigger();
|
|
260
260
|
}
|
|
261
261
|
re(() => r.selectCatalog(null));
|
|
262
|
-
const v = _e(), V =
|
|
262
|
+
const v = _e(), V = I(() => v.breakpoints.value.xs);
|
|
263
263
|
return (e, n) => {
|
|
264
264
|
const k = h("FmSpacer"), w = h("fm-button"), M = h("fm-search"), te = h("fm-table");
|
|
265
265
|
return d(), j(be, {
|
|
@@ -268,7 +268,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
268
268
|
}, {
|
|
269
269
|
"append-heading": m(() => [!t(s).checkMenuIsLoading() && _.value.length ? (d(), g(x, {
|
|
270
270
|
key: 0
|
|
271
|
-
}, [l(k), l(t(
|
|
271
|
+
}, [l(k), l(t(T), {
|
|
272
272
|
action: "add"
|
|
273
273
|
}, {
|
|
274
274
|
default: m(({
|
|
@@ -297,15 +297,15 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
297
297
|
key: o._id,
|
|
298
298
|
class: Q(["py-12 px-16", "flex items-center space-x-8"]),
|
|
299
299
|
onClick: (Ne) => a(o)
|
|
300
|
-
}, [y("div",
|
|
300
|
+
}, [y("div", Ie, [y("p", Oe, z(o.name), 1), y("p", De, z(t(c)("menu.common.labels.products_linked", {
|
|
301
301
|
count: o.items.length
|
|
302
|
-
})), 1)]), l(
|
|
302
|
+
})), 1)]), l(B, {
|
|
303
303
|
servingSequence: o
|
|
304
304
|
}, null, 8, ["servingSequence"])], 8, Le))), 128))])) : (d(), j(ge, {
|
|
305
305
|
key: 0
|
|
306
306
|
}, {
|
|
307
307
|
default: m(() => [l(te, {
|
|
308
|
-
"column-defs":
|
|
308
|
+
"column-defs": U.value,
|
|
309
309
|
loading: t(s).checkMenuIsLoading(),
|
|
310
310
|
"page-size": _.value.length,
|
|
311
311
|
"row-data": _.value,
|
|
@@ -315,7 +315,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
315
315
|
draggable: "",
|
|
316
316
|
"hide-footer": "",
|
|
317
317
|
"pin-header-row": "",
|
|
318
|
-
onDndChanged: n[1] || (n[1] = (o) =>
|
|
318
|
+
onDndChanged: n[1] || (n[1] = (o) => P(o)),
|
|
319
319
|
onRowClick: n[2] || (n[2] = (o) => a(o.original))
|
|
320
320
|
}, null, 8, ["column-defs", "loading", "page-size", "row-data", "search-value"])]),
|
|
321
321
|
_: 1
|
|
@@ -323,7 +323,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
323
323
|
subtitle: t(c)("menu.serving_sequence.empty.subtitle"),
|
|
324
324
|
title: t(c)("menu.serving_sequence.empty.title")
|
|
325
325
|
}, {
|
|
326
|
-
action: m(() => [l(t(
|
|
326
|
+
action: m(() => [l(t(T), {
|
|
327
327
|
action: "add"
|
|
328
328
|
}, {
|
|
329
329
|
default: m(({
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { defineComponent as ue, computed as p, ref as P, watch as ie, watchEffect as re, resolveComponent as m, createElementBlock as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { defineComponent as ue, computed as p, ref as P, watch as ie, watchEffect as re, resolveComponent as m, createElementBlock as S, openBlock as r, normalizeClass as W, createVNode as s, withCtx as c, createElementVNode as f, createBlock as v, createCommentVNode as g, unref as e, Fragment as $, renderList as z, createTextVNode as me, toDisplayString as N } from "vue";
|
|
2
|
+
import { Country as ce } from "@feedmepos/core";
|
|
3
|
+
import { u as de, A as pe, M as ve, B as _, D as w } from "./menu-CsIzrBEr.js";
|
|
4
|
+
import { useCoreStore as fe, useI18n as ge } from "@feedmepos/mf-common";
|
|
5
|
+
import { useSnackbar as _e, useDialog as be, FmButtonVariant as H, FmButtonColorThemeVariant as j, components as ye } from "@feedmepos/ui-library";
|
|
6
|
+
import { _ as T } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
|
|
6
7
|
import { _ as ke } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
|
|
7
|
-
import { _ as q, a as
|
|
8
|
-
import { C as b, a as
|
|
9
|
-
import { C as
|
|
10
|
-
const
|
|
11
|
-
class: /* @__PURE__ */
|
|
8
|
+
import { _ as q, a as Ce } from "./GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D5GWkh3G.js";
|
|
9
|
+
import { C as b, a as C } from "./catalogSetting-BGvckFdh.js";
|
|
10
|
+
import { C as J } from "./catalog-CaXceaA2.js";
|
|
11
|
+
const xe = {
|
|
12
|
+
class: /* @__PURE__ */ W(["overflow-scroll", "flex-1", "xs:px-16 xs:py-16"])
|
|
12
13
|
}, Oe = {
|
|
13
14
|
class: "space-y-32"
|
|
14
|
-
},
|
|
15
|
+
}, Me = {
|
|
15
16
|
key: 0,
|
|
16
17
|
class: "pl-32 space-x-8"
|
|
17
|
-
},
|
|
18
|
+
}, Se = {
|
|
18
19
|
class: "pl-[60px] space-y-16"
|
|
19
20
|
}, Fe = {
|
|
20
21
|
class: "space-x-16 flex items-center"
|
|
@@ -26,20 +27,20 @@ const Ce = {
|
|
|
26
27
|
class: "fm-typo-en-body-md-400"
|
|
27
28
|
}, Ue = {
|
|
28
29
|
class: "flex justify-end"
|
|
29
|
-
},
|
|
30
|
+
}, qe = /* @__PURE__ */ ue({
|
|
30
31
|
__name: "Setting",
|
|
31
32
|
setup(Ne) {
|
|
32
|
-
const F =
|
|
33
|
+
const F = fe(), u = de(), Y = _e(), E = pe(Y), {
|
|
33
34
|
custom: we,
|
|
34
|
-
minor:
|
|
35
|
-
} =
|
|
35
|
+
minor: G
|
|
36
|
+
} = E, A = be(), {
|
|
36
37
|
t: o
|
|
37
|
-
} =
|
|
38
|
-
p(() => new
|
|
39
|
-
const y = p(() => !
|
|
40
|
-
checkMenuIsLoading:
|
|
38
|
+
} = ge(), x = p(() => u.currentCatalog);
|
|
39
|
+
p(() => new J(x.value, u, I, A));
|
|
40
|
+
const y = p(() => !x.value), M = p(() => u.version === _.F_MENU_VERSION.enum.v4), {
|
|
41
|
+
checkMenuIsLoading: Te,
|
|
41
42
|
updateMenu: I
|
|
42
|
-
} =
|
|
43
|
+
} = ve(E), l = P(b.initCatalogSetting()), K = p(() => u.catalogs.filter((t) => t._id !== u.state.currentCatalogId).map((t) => t.name)), Q = p(() => u.state.restaurants.filter((t) => [...t.additionalCatalogs, t.inHouseDelivery, ...t.linkedDeliveryCatalogs.map((n) => n.catalog), t.pickupCatalog, t.takeawayCatalog, t.catalogId].includes(u.state.currentCatalogId)).map((t) => t.name));
|
|
43
44
|
function L() {
|
|
44
45
|
return Q.value.length > 0 ? s("div", {
|
|
45
46
|
class: ["flex items-center", "bg-fm-color-system-warning-100", "rounded-lg", "py-16 px-24 space-x-8"]
|
|
@@ -51,14 +52,14 @@ const Ce = {
|
|
|
51
52
|
}, [o("menu.setting.catalog.warnings.delivery")])]) : null;
|
|
52
53
|
}
|
|
53
54
|
function D() {
|
|
54
|
-
const t =
|
|
55
|
-
l.value = t ? b.fromCatalog(t,
|
|
55
|
+
const t = x.value;
|
|
56
|
+
l.value = t ? b.fromCatalog(t, M.value) : b.fromMainCatalog(u.state.menu.masterCatalogSetting);
|
|
56
57
|
}
|
|
57
58
|
ie(() => u.state.currentCatalogId, D), P(!1);
|
|
58
59
|
const V = p(() => {
|
|
59
60
|
if (!F.currentCountry.value) return [];
|
|
60
|
-
const t = l.value.taxSetting.mode ===
|
|
61
|
-
return
|
|
61
|
+
const t = l.value.taxSetting.mode === C.MANUAL ? l.value.taxSetting.inclusive ?? [] : [];
|
|
62
|
+
return ce.getCountry(F.currentCountry.value).taxSystems.map((i) => {
|
|
62
63
|
const d = t.find((O) => O.systemCode === i.code);
|
|
63
64
|
return {
|
|
64
65
|
inclusive: (d == null ? void 0 : d.inclusive) || !1,
|
|
@@ -67,7 +68,7 @@ const Ce = {
|
|
|
67
68
|
});
|
|
68
69
|
});
|
|
69
70
|
function X(t) {
|
|
70
|
-
const n = l.value.taxSetting, i = n.mode ===
|
|
71
|
+
const n = l.value.taxSetting, i = n.mode === C.AUTO ? b.manualTax(V.value) : w(n);
|
|
71
72
|
i.inclusive ?? (i.inclusive = []);
|
|
72
73
|
const d = i.inclusive.findIndex((O) => O.systemCode === t.systemCode);
|
|
73
74
|
d < 0 ? i.inclusive.push(t) : i.inclusive.splice(d, 1, t), h.value = i;
|
|
@@ -82,10 +83,10 @@ const Ce = {
|
|
|
82
83
|
}
|
|
83
84
|
}), Z = async () => {
|
|
84
85
|
const t = b.toCatalog(l.value);
|
|
85
|
-
|
|
86
|
-
...
|
|
86
|
+
x.value ? await new J({
|
|
87
|
+
...x.value,
|
|
87
88
|
...t
|
|
88
|
-
}, u, I, A).update() : await
|
|
89
|
+
}, u, I, A).update() : await G(async () => {
|
|
89
90
|
await u.updateMainCatalogSetting({
|
|
90
91
|
inclusiveTaxes: t.inclusiveTaxes
|
|
91
92
|
});
|
|
@@ -104,12 +105,12 @@ const Ce = {
|
|
|
104
105
|
}
|
|
105
106
|
return (t, n) => {
|
|
106
107
|
const i = m("fm-text-field"), d = m("fm-radio"), O = m("fm-radio-group"), ae = m("fm-checkbox"), B = m("fm-switch"), le = m("fm-select"), R = m("fm-button"), ne = m("fm-chip"), oe = m("fm-card"), se = m("fm-form");
|
|
107
|
-
return r(),
|
|
108
|
-
class:
|
|
108
|
+
return r(), S("div", xe, [s(se, {
|
|
109
|
+
class: W(["space-y-40 max-w-[751px]", "h-fit"]),
|
|
109
110
|
"blame-form-child-on-validation-failed": "",
|
|
110
111
|
onValidationSuccess: Z
|
|
111
112
|
}, {
|
|
112
|
-
default: c(() => [
|
|
113
|
+
default: c(() => [f("div", Oe, [y.value ? g("", !0) : (r(), v(ke, {
|
|
113
114
|
key: 0,
|
|
114
115
|
title: e(o)("menu.setting.catalog.title")
|
|
115
116
|
}, {
|
|
@@ -120,26 +121,26 @@ const Ce = {
|
|
|
120
121
|
label: e(o)("menu.setting.catalog.fields.name.label")
|
|
121
122
|
}, null, 8, ["modelValue", "rules", "label"]), s(L)]),
|
|
122
123
|
_: 1
|
|
123
|
-
}, 8, ["title"])), s(
|
|
124
|
+
}, 8, ["title"])), s(T, {
|
|
124
125
|
label: e(o)("menu.setting.tax.title")
|
|
125
126
|
}, {
|
|
126
127
|
default: c(() => [s(O, {
|
|
127
128
|
"model-value": l.value.taxSetting.mode,
|
|
128
129
|
"onUpdate:modelValue": n[1] || (n[1] = (a) => {
|
|
129
|
-
a === e(
|
|
130
|
+
a === e(C).AUTO ? h.value = e(b).autoTax() : h.value = e(b).manualTax(V.value);
|
|
130
131
|
})
|
|
131
132
|
}, {
|
|
132
133
|
default: c(() => [s(d, {
|
|
133
|
-
value: e(
|
|
134
|
+
value: e(C).AUTO,
|
|
134
135
|
label: e(o)("menu.setting.tax.modes.auto.label"),
|
|
135
136
|
sublabel: e(o)("menu.setting.tax.modes.auto.sublabel")
|
|
136
137
|
}, null, 8, ["value", "label", "sublabel"]), s(d, {
|
|
137
|
-
value: e(
|
|
138
|
+
value: e(C).MANUAL,
|
|
138
139
|
label: e(o)("menu.setting.tax.modes.manual.label"),
|
|
139
140
|
sublabel: e(o)("menu.setting.tax.modes.manual.sublabel")
|
|
140
141
|
}, null, 8, ["value", "label", "sublabel"])]),
|
|
141
142
|
_: 1
|
|
142
|
-
}, 8, ["model-value"]), l.value.taxSetting.mode === e(
|
|
143
|
+
}, 8, ["model-value"]), l.value.taxSetting.mode === e(C).MANUAL ? (r(), S("div", Me, [(r(!0), S($, null, z(V.value, (a) => (r(), v(ae, {
|
|
143
144
|
key: a.systemCode,
|
|
144
145
|
"model-value": a.inclusive,
|
|
145
146
|
value: !0,
|
|
@@ -150,9 +151,9 @@ const Ce = {
|
|
|
150
151
|
inclusive: k
|
|
151
152
|
});
|
|
152
153
|
}
|
|
153
|
-
}, null, 8, ["model-value", "label", "onUpdate:modelValue"]))), 128))])) :
|
|
154
|
+
}, null, 8, ["model-value", "label", "onUpdate:modelValue"]))), 128))])) : g("", !0)]),
|
|
154
155
|
_: 1
|
|
155
|
-
}, 8, ["label"]), !y.value &&
|
|
156
|
+
}, 8, ["label"]), !y.value && M.value ? (r(), v(T, {
|
|
156
157
|
key: 1,
|
|
157
158
|
label: e(o)("menu.setting.link.title")
|
|
158
159
|
}, {
|
|
@@ -174,9 +175,9 @@ const Ce = {
|
|
|
174
175
|
}],
|
|
175
176
|
"model-value": l.value.orderFrom,
|
|
176
177
|
"onUpdate:modelValue": n[3] || (n[3] = (a) => l.value.orderFrom = a)
|
|
177
|
-
}, null, 8, ["items", "model-value"])) :
|
|
178
|
+
}, null, 8, ["items", "model-value"])) : g("", !0)]),
|
|
178
179
|
_: 1
|
|
179
|
-
}, 8, ["label"])) :
|
|
180
|
+
}, 8, ["label"])) : g("", !0), !y.value && M.value ? (r(), v(T, {
|
|
180
181
|
key: 2,
|
|
181
182
|
label: e(o)("menu.setting.markup.title")
|
|
182
183
|
}, {
|
|
@@ -186,7 +187,7 @@ const Ce = {
|
|
|
186
187
|
"label-placement": "right",
|
|
187
188
|
sublabel: e(o)("menu.setting.markup.auto_markup.sublabel"),
|
|
188
189
|
"onUpdate:modelValue": n[4] || (n[4] = (a) => l.value.markupOptions = a ? [] : null)
|
|
189
|
-
}, null, 8, ["model-value", "label", "sublabel"]),
|
|
190
|
+
}, null, 8, ["model-value", "label", "sublabel"]), f("div", Se, [s(q, {
|
|
190
191
|
categories: e(u).categories,
|
|
191
192
|
items: e(u).items,
|
|
192
193
|
action: "add",
|
|
@@ -197,13 +198,13 @@ const Ce = {
|
|
|
197
198
|
}) => [s(R, {
|
|
198
199
|
"text-color": e(j).ColorPrimary,
|
|
199
200
|
"border-color": e(j).ColorPrimary,
|
|
200
|
-
variant: e(
|
|
201
|
+
variant: e(H).Secondary,
|
|
201
202
|
label: "Add markup configuration",
|
|
202
203
|
"prepend-icon": "add",
|
|
203
204
|
onClick: a
|
|
204
205
|
}, null, 8, ["text-color", "border-color", "variant", "onClick"])]),
|
|
205
206
|
_: 1
|
|
206
|
-
}, 8, ["categories", "items"]), (r(!0),
|
|
207
|
+
}, 8, ["categories", "items"]), (r(!0), S($, null, z(l.value.markupOptions, (a, k) => (r(), v(q, {
|
|
207
208
|
key: k,
|
|
208
209
|
categories: e(u).categories,
|
|
209
210
|
items: e(u).items,
|
|
@@ -219,32 +220,32 @@ const Ce = {
|
|
|
219
220
|
variant: "outlined",
|
|
220
221
|
onClick: U
|
|
221
222
|
}, {
|
|
222
|
-
default: c(() => [
|
|
223
|
+
default: c(() => [f("div", Fe, [f("div", Ve, [s(ne, {
|
|
223
224
|
class: "text-fm-color-typo-info bg-fm-color-system-info-100 font-semibold"
|
|
224
225
|
}, {
|
|
225
226
|
default: c(() => [me(" Markup percentage: " + N(a.percentage) + "% ", 1)]),
|
|
226
227
|
_: 2
|
|
227
|
-
}, 1024),
|
|
228
|
+
}, 1024), f("p", he, N(e(o)("menu.setting.markup.config", {
|
|
228
229
|
number: k + 1
|
|
229
|
-
})), 1),
|
|
230
|
+
})), 1), f("p", Re, N(a.includeItems ? e(o)("menu.setting.markup.products.linked", {
|
|
230
231
|
count: a.includeItems.length
|
|
231
232
|
}) : e(o)("menu.setting.markup.products.all")), 1)]), s(R, {
|
|
232
|
-
variant: e(
|
|
233
|
+
variant: e(H).Tertiary,
|
|
233
234
|
"prepend-icon": "delete",
|
|
234
|
-
onClick: (
|
|
235
|
+
onClick: (Ee) => te(k)
|
|
235
236
|
}, null, 8, ["variant", "onClick"])])]),
|
|
236
237
|
_: 2
|
|
237
238
|
}, 1032, ["id", "onClick"])]),
|
|
238
239
|
_: 2
|
|
239
240
|
}, 1032, ["categories", "items", "model-value", "onUpdate:modelValue"]))), 128))])]),
|
|
240
241
|
_: 1
|
|
241
|
-
}, 8, ["label"])) :
|
|
242
|
+
}, 8, ["label"])) : g("", !0), !y.value && M.value ? (r(), v(Ce, {
|
|
242
243
|
key: 3,
|
|
243
244
|
"model-value": l.value.usePriceTiers,
|
|
244
245
|
"onUpdate:modelValue": n[6] || (n[6] = (a) => l.value.usePriceTiers = a)
|
|
245
|
-
}, null, 8, ["model-value"])) :
|
|
246
|
+
}, null, 8, ["model-value"])) : g("", !0), y.value ? (r(), v(L, {
|
|
246
247
|
key: 4
|
|
247
|
-
})) :
|
|
248
|
+
})) : g("", !0)]), f("div", Ue, [s(R, {
|
|
248
249
|
label: e(o)("common.save"),
|
|
249
250
|
type: "submit"
|
|
250
251
|
}, null, 8, ["label"])])]),
|
|
@@ -254,5 +255,5 @@ const Ce = {
|
|
|
254
255
|
}
|
|
255
256
|
});
|
|
256
257
|
export {
|
|
257
|
-
|
|
258
|
+
qe as default
|
|
258
259
|
};
|