@feedmepos/mf-menu 0.31.31-beta.1 → 0.31.31-prod
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-1TX8v7ZA.js → App-Cvgz2kQV.js} +22 -24
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-CR7QrFUG.js → ApplyProduct.vue_vue_type_script_setup_true_lang-Bq84uuiq.js} +22 -22
- package/dist/{Catalog-DWClc58s.js → Catalog-Ye-KpQ31.js} +74 -75
- package/dist/{Category-BqKFvFam.js → Category-BPChBqVR.js} +60 -60
- package/dist/{Category-IYMtMoT-.js → Category-CHcxix2b.js} +28 -28
- package/dist/{CookingGuide-BayJ6zj4.js → CookingGuide-DgygBSoB.js} +101 -103
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-Ceq86b3d.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-ClV6LD2-.js} +1 -1
- package/dist/{Group-LqSX7ue6.js → Group-223G1Edd.js} +1 -1
- package/dist/{Group-RujTPTns.js → Group-B7EU1xmY.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-Dj9ZmkYe.js → Group.vue_vue_type_script_setup_true_lang-CAZuyOPy.js} +137 -138
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D5GWkh3G.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CdjRWC9z.js} +13 -13
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-C4IrA3es.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-BRQm-UTk.js} +5067 -5049
- package/dist/{Ingredient-_tc8llr1.js → Ingredient-Dl1Z5Qt2.js} +64 -65
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-DLFDf-VZ.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CxuQTH0k.js} +1061 -1063
- package/dist/{LinkProductSideSheet-C6rF-G1v.js → LinkProductSideSheet-Y-Z9_9Kp.js} +12 -14
- package/dist/{MenuSetting-xDHeeROY.js → MenuSetting-Be44fmVj.js} +26 -27
- package/dist/{PrintRoute-B_TFMn5e.js → PrintRoute-BURAEZ6X.js} +15 -17
- package/dist/{Product-DdEEqrtc.js → Product-DSlVHbgr.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-zcistmwh.js → Product.vue_vue_type_script_setup_true_lang-DtYarO0L.js} +256 -257
- package/dist/{ProductInternalTools-BcC7BF6W.js → ProductInternalTools-gW57aUAO.js} +45 -45
- package/dist/{Products-Cu0cJshV.js → Products-Czr-70M8.js} +72 -74
- package/dist/{Publish-Bm3Xiks1.js → Publish-XCowNW_z.js} +32 -34
- package/dist/{Recipe-DWK-luIZ.js → Recipe-6oNz21AB.js} +63 -65
- package/dist/{Scheduler-Cb1TeBhW.js → Scheduler-UYFuFk5E.js} +19 -19
- package/dist/{ServingSequence-evSIET_8.js → ServingSequence-w66ujU4D.js} +34 -34
- package/dist/{Setting-Cn3kwC9F.js → Setting-Dgn3lOx7.js} +53 -54
- package/dist/{Subcategory-q4m4qHsU.js → Subcategory-lnzuxCCH.js} +34 -34
- package/dist/{Takeaway-ClepHYGu.js → Takeaway-C5Up5Odr.js} +14 -14
- package/dist/{Takeaway-D-rdUZuh.js → Takeaway-DP1GJUPF.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-y9Yxstu2.js → Takeaway.vue_vue_type_script_setup_true_lang-B45keXn7.js} +40 -41
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BSeLfoOA.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-yEIxG4F2.js} +1108 -1109
- package/dist/{Unit-IM8Naj82.js → Unit-Bt8aRidX.js} +12 -12
- package/dist/{Variant-fzGvwaMo.js → Variant-DXoOAa9M.js} +16 -16
- package/dist/{_id_-BsKNG9Qv.js → _id_-D9tvinax.js} +22 -22
- package/dist/{app-BzQRUMTK.js → app-Cnlv4rmj.js} +3 -3
- package/dist/{app-CoVUUCa_.js → app-DiizQWjo.js} +24 -24
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/components/feature/ApplyProduct/ApplyProduct.vue.d.ts +88 -16
- package/dist/apps/mf-menu/src/components/feature/ApplyProduct/ApplyProductDialog.vue.d.ts +44 -8
- package/dist/apps/mf-menu/src/components/feature/ApplyProduct/index.d.ts +360 -184
- package/dist/apps/mf-menu/src/components/feature/GroupManager/OptionTable.vue.d.ts +80 -28
- package/dist/apps/mf-menu/src/components/feature/GroupManager/UpdateForm.vue.d.ts +44 -8
- package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierButton.vue.d.ts +216 -148
- package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierForm.vue.d.ts +216 -148
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/category.d.ts +4 -4
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/item.d.ts +218 -150
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/scheduler.d.ts +142 -82
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/useItemFormManagement.d.ts +108 -74
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/OptionTable.vue.d.ts +80 -28
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/UpdateForm.vue.d.ts +44 -8
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/index.d.ts +176 -32
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/item/ItemForm.vue.d.ts +324 -222
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/menuUtils.d.ts +108 -74
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +1374 -1040
- package/dist/apps/mf-menu/src/components/import/PreviewAddonContent.vue.d.ts +216 -148
- package/dist/apps/mf-menu/src/helper/import-export.d.ts +1374 -1040
- package/dist/apps/mf-menu/src/helper/itemCategories.d.ts +108 -74
- package/dist/apps/mf-menu/src/helper/menu.d.ts +1523 -1155
- package/dist/apps/mf-menu/src/manager/menu/category.d.ts +4 -4
- package/dist/apps/mf-menu/src/manager/menu/item.d.ts +1374 -1040
- package/dist/apps/mf-menu/src/manager/menu/subcategory.d.ts +4 -4
- package/dist/apps/mf-menu/src/stores/manager/item.d.ts +324 -222
- package/dist/apps/mf-menu/src/stores/manager/recipe.d.ts +12 -12
- package/dist/apps/mf-menu/src/stores/manager/scheduler.d.ts +142 -82
- package/dist/apps/mf-menu/src/stores/manager/sku.d.ts +60 -60
- package/dist/apps/mf-menu/src/stores/manager/takeaway.d.ts +6 -6
- package/dist/apps/mf-menu/src/stores/manager/unit.d.ts +12 -12
- package/dist/apps/mf-menu/src/stores/menu.d.ts +1375 -1041
- package/dist/apps/mf-menu/src/views/Catalog/Edit/AddProductPopup/Form.vue.d.ts +216 -148
- package/dist/apps/mf-menu/src/views/CookingGuide/CookingGuideDialog.vue.d.ts +4 -4
- package/dist/apps/mf-menu/src/views/Publish/UpdateCatalogDialog.vue.d.ts +352 -132
- package/dist/apps/mf-menu/src/views/Scheduler/FilterForm.vue.d.ts +84 -32
- package/dist/apps/mf-menu/src/views/Scheduler/SchedulerDialog.vue.d.ts +84 -32
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/linked-status-D7AwcSC5.js +24 -0
- package/dist/assets/override-menu-Y9T4wxEn.js +24 -0
- package/dist/assets/validate-menu-DiAW2jY1.js +24 -0
- package/dist/{catalog-CaXceaA2.js → catalog-DUSCax4J.js} +1 -1
- package/dist/{catalogSetting-BGvckFdh.js → catalogSetting-18FJ5pkA.js} +1 -1
- package/dist/{category-u5eo_Vjd.js → category-B9XvlPFy.js} +3 -5
- package/dist/currency-Sno8fZYc.js +7 -0
- package/dist/{dayjs.min-Bsr3tJCn.js → dayjs.min-BsfKOrNo.js} +1 -1
- package/dist/{index-tRQb7RN_.js → index-BDpkSKDX.js} +1 -1
- package/dist/{index-Bbx4iZ6n.js → index-Eomwf2OO.js} +27 -27
- package/dist/{index-DSAG0yWh.js → index-ltyOwsRO.js} +20 -22
- package/dist/{item-BAqzKh4O.js → item-5Kkzf_eF.js} +1069 -1071
- package/dist/{jszip.min-BKJtvCjM.js → jszip.min-CRfpGjN8.js} +545 -545
- package/dist/menu-Btcr0nsk.js +108040 -0
- package/dist/{menu-CDrsBjmr.js → menu-DYs_VNfB.js} +9 -11
- package/dist/mf-menu.css +1 -1
- package/dist/{priceTier-DfbHonGe.js → priceTier-DvUjWwCM.js} +4 -4
- package/dist/{scheduler-DTWaBudB.js → scheduler-C76blUlS.js} +11 -13
- package/dist/{subcategory-D-R5r1Tr.js → subcategory-C44qN5Vk.js} +133 -135
- package/dist/{toExcel-84VTtSA7.js → toExcel--vNjpF-b.js} +2 -2
- package/dist/{unit-B4zscxzo.js → unit-C4ghZU8x.js} +23 -24
- package/package.json +5 -5
- package/dist/assets/linked-status-eQqjvOq_.js +0 -24
- package/dist/assets/override-menu-C8NTBJgN.js +0 -24
- package/dist/assets/validate-menu-Dn-OO7Ed.js +0 -24
- package/dist/currency-BPHwez-E.js +0 -7
- package/dist/menu-CsIzrBEr.js +0 -74044
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as J, ref as L, computed as
|
|
1
|
+
import { defineComponent as J, ref as L, computed as O, 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 A, 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 {
|
|
3
|
+
import { H, u as W, D as X, O as Z, J as I, G as S } from "./menu-Btcr0nsk.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 T, 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-DiizQWjo.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-Cnlv4rmj.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 = O(() => p.action === "add" ? r("menu.serving_sequence.add") : r("menu.serving_sequence.update"));
|
|
32
|
+
async function P() {
|
|
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: I.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: I.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 U(f) {
|
|
66
66
|
return f.reduce((a, v) => (a[v._id] = [...a[v._id] ?? [], v], a), {});
|
|
67
67
|
}
|
|
68
|
-
const
|
|
68
|
+
const B = O(() => U(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: P,
|
|
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, A(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: B.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
|
+
}), z = 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"], Oe = {
|
|
142
142
|
class: "flex-1 space-y-4"
|
|
143
|
-
},
|
|
143
|
+
}, Ie = {
|
|
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 _ = O(() => 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: T.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: I.F_OPERATION_TYPE.delete,
|
|
197
197
|
data: e._id
|
|
198
198
|
}, e.name, !0);
|
|
199
199
|
});
|
|
200
200
|
}
|
|
201
|
-
const
|
|
201
|
+
const P = ({
|
|
202
202
|
servingSequence: e
|
|
203
203
|
}) => $(Y.FmButton, {
|
|
204
204
|
prependIcon: "delete",
|
|
205
|
-
variant:
|
|
205
|
+
variant: T.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 U(e) {
|
|
212
212
|
await s.updateMenu({
|
|
213
213
|
module: S.F_MENU_MODULE_V4_KEY.enum.serveSequence,
|
|
214
|
-
operation:
|
|
214
|
+
operation: I.F_OPERATION_TYPE.rearrange,
|
|
215
215
|
data: e.map((n) => n._id)
|
|
216
216
|
}, "sequences");
|
|
217
217
|
}
|
|
218
|
-
const
|
|
218
|
+
const B = 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: T.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(z, 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 = O(() => 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(z), {
|
|
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", Oe, [y("p", Ie, A(o.name), 1), y("p", De, A(t(c)("menu.common.labels.products_linked", {
|
|
301
301
|
count: o.items.length
|
|
302
|
-
})), 1)]), l(
|
|
302
|
+
})), 1)]), l(P, {
|
|
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": B.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) => U(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(z), {
|
|
327
327
|
action: "add"
|
|
328
328
|
}, {
|
|
329
329
|
default: m(({
|
|
@@ -1,21 +1,20 @@
|
|
|
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 {
|
|
6
|
-
import { _ as T } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
|
|
1
|
+
import { defineComponent as ue, computed as p, ref as P, watch as ie, watchEffect as re, resolveComponent as m, createElementBlock as M, openBlock as r, normalizeClass as J, createVNode as s, withCtx as c, createElementVNode as g, createBlock as v, createCommentVNode as f, unref as e, Fragment as $, renderList as H, createTextVNode as me, toDisplayString as N } from "vue";
|
|
2
|
+
import { u as ce, D as de, O as pe, G as _, A as ve, H as w } from "./menu-Btcr0nsk.js";
|
|
3
|
+
import { useCoreStore as ge, useI18n as fe } from "@feedmepos/mf-common";
|
|
4
|
+
import { useSnackbar as _e, useDialog as be, FmButtonVariant as z, FmButtonColorThemeVariant as j, components as ye } from "@feedmepos/ui-library";
|
|
5
|
+
import { _ as E } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
|
|
7
6
|
import { _ as ke } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
|
|
8
|
-
import { _ as q, a as
|
|
9
|
-
import { C as b, a as
|
|
10
|
-
import { C as
|
|
11
|
-
const
|
|
12
|
-
class: /* @__PURE__ */
|
|
7
|
+
import { _ as q, a as xe } from "./GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CdjRWC9z.js";
|
|
8
|
+
import { C as b, a as x } from "./catalogSetting-18FJ5pkA.js";
|
|
9
|
+
import { C as G } from "./catalog-DUSCax4J.js";
|
|
10
|
+
const Ce = {
|
|
11
|
+
class: /* @__PURE__ */ J(["overflow-scroll", "flex-1", "xs:px-16 xs:py-16"])
|
|
13
12
|
}, Oe = {
|
|
14
13
|
class: "space-y-32"
|
|
15
|
-
},
|
|
14
|
+
}, Se = {
|
|
16
15
|
key: 0,
|
|
17
16
|
class: "pl-32 space-x-8"
|
|
18
|
-
},
|
|
17
|
+
}, Me = {
|
|
19
18
|
class: "pl-[60px] space-y-16"
|
|
20
19
|
}, Fe = {
|
|
21
20
|
class: "space-x-16 flex items-center"
|
|
@@ -27,20 +26,20 @@ const xe = {
|
|
|
27
26
|
class: "fm-typo-en-body-md-400"
|
|
28
27
|
}, Ue = {
|
|
29
28
|
class: "flex justify-end"
|
|
30
|
-
},
|
|
29
|
+
}, je = /* @__PURE__ */ ue({
|
|
31
30
|
__name: "Setting",
|
|
32
31
|
setup(Ne) {
|
|
33
|
-
const F =
|
|
32
|
+
const F = ge(), u = ce(), W = _e(), T = de(W), {
|
|
34
33
|
custom: we,
|
|
35
|
-
minor:
|
|
36
|
-
} =
|
|
34
|
+
minor: Y
|
|
35
|
+
} = T, A = be(), {
|
|
37
36
|
t: o
|
|
38
|
-
} =
|
|
39
|
-
p(() => new
|
|
40
|
-
const y = p(() => !
|
|
41
|
-
checkMenuIsLoading:
|
|
37
|
+
} = fe(), C = p(() => u.currentCatalog);
|
|
38
|
+
p(() => new G(C.value, u, I, A));
|
|
39
|
+
const y = p(() => !C.value), S = p(() => u.version === _.F_MENU_VERSION.enum.v4), {
|
|
40
|
+
checkMenuIsLoading: Ee,
|
|
42
41
|
updateMenu: I
|
|
43
|
-
} =
|
|
42
|
+
} = pe(T), 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));
|
|
44
43
|
function L() {
|
|
45
44
|
return Q.value.length > 0 ? s("div", {
|
|
46
45
|
class: ["flex items-center", "bg-fm-color-system-warning-100", "rounded-lg", "py-16 px-24 space-x-8"]
|
|
@@ -52,14 +51,14 @@ const xe = {
|
|
|
52
51
|
}, [o("menu.setting.catalog.warnings.delivery")])]) : null;
|
|
53
52
|
}
|
|
54
53
|
function D() {
|
|
55
|
-
const t =
|
|
56
|
-
l.value = t ? b.fromCatalog(t,
|
|
54
|
+
const t = C.value;
|
|
55
|
+
l.value = t ? b.fromCatalog(t, S.value) : b.fromMainCatalog(u.state.menu.masterCatalogSetting);
|
|
57
56
|
}
|
|
58
57
|
ie(() => u.state.currentCatalogId, D), P(!1);
|
|
59
58
|
const V = p(() => {
|
|
60
59
|
if (!F.currentCountry.value) return [];
|
|
61
|
-
const t = l.value.taxSetting.mode ===
|
|
62
|
-
return
|
|
60
|
+
const t = l.value.taxSetting.mode === x.MANUAL ? l.value.taxSetting.inclusive ?? [] : [];
|
|
61
|
+
return ve.Country.getCountry(F.currentCountry.value).taxSystems.map((i) => {
|
|
63
62
|
const d = t.find((O) => O.systemCode === i.code);
|
|
64
63
|
return {
|
|
65
64
|
inclusive: (d == null ? void 0 : d.inclusive) || !1,
|
|
@@ -68,7 +67,7 @@ const xe = {
|
|
|
68
67
|
});
|
|
69
68
|
});
|
|
70
69
|
function X(t) {
|
|
71
|
-
const n = l.value.taxSetting, i = n.mode ===
|
|
70
|
+
const n = l.value.taxSetting, i = n.mode === x.AUTO ? b.manualTax(V.value) : w(n);
|
|
72
71
|
i.inclusive ?? (i.inclusive = []);
|
|
73
72
|
const d = i.inclusive.findIndex((O) => O.systemCode === t.systemCode);
|
|
74
73
|
d < 0 ? i.inclusive.push(t) : i.inclusive.splice(d, 1, t), h.value = i;
|
|
@@ -83,10 +82,10 @@ const xe = {
|
|
|
83
82
|
}
|
|
84
83
|
}), Z = async () => {
|
|
85
84
|
const t = b.toCatalog(l.value);
|
|
86
|
-
|
|
87
|
-
...
|
|
85
|
+
C.value ? await new G({
|
|
86
|
+
...C.value,
|
|
88
87
|
...t
|
|
89
|
-
}, u, I, A).update() : await
|
|
88
|
+
}, u, I, A).update() : await Y(async () => {
|
|
90
89
|
await u.updateMainCatalogSetting({
|
|
91
90
|
inclusiveTaxes: t.inclusiveTaxes
|
|
92
91
|
});
|
|
@@ -105,12 +104,12 @@ const xe = {
|
|
|
105
104
|
}
|
|
106
105
|
return (t, n) => {
|
|
107
106
|
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");
|
|
108
|
-
return r(),
|
|
109
|
-
class:
|
|
107
|
+
return r(), M("div", Ce, [s(se, {
|
|
108
|
+
class: J(["space-y-40 max-w-[751px]", "h-fit"]),
|
|
110
109
|
"blame-form-child-on-validation-failed": "",
|
|
111
110
|
onValidationSuccess: Z
|
|
112
111
|
}, {
|
|
113
|
-
default: c(() => [
|
|
112
|
+
default: c(() => [g("div", Oe, [y.value ? f("", !0) : (r(), v(ke, {
|
|
114
113
|
key: 0,
|
|
115
114
|
title: e(o)("menu.setting.catalog.title")
|
|
116
115
|
}, {
|
|
@@ -121,26 +120,26 @@ const xe = {
|
|
|
121
120
|
label: e(o)("menu.setting.catalog.fields.name.label")
|
|
122
121
|
}, null, 8, ["modelValue", "rules", "label"]), s(L)]),
|
|
123
122
|
_: 1
|
|
124
|
-
}, 8, ["title"])), s(
|
|
123
|
+
}, 8, ["title"])), s(E, {
|
|
125
124
|
label: e(o)("menu.setting.tax.title")
|
|
126
125
|
}, {
|
|
127
126
|
default: c(() => [s(O, {
|
|
128
127
|
"model-value": l.value.taxSetting.mode,
|
|
129
128
|
"onUpdate:modelValue": n[1] || (n[1] = (a) => {
|
|
130
|
-
a === e(
|
|
129
|
+
a === e(x).AUTO ? h.value = e(b).autoTax() : h.value = e(b).manualTax(V.value);
|
|
131
130
|
})
|
|
132
131
|
}, {
|
|
133
132
|
default: c(() => [s(d, {
|
|
134
|
-
value: e(
|
|
133
|
+
value: e(x).AUTO,
|
|
135
134
|
label: e(o)("menu.setting.tax.modes.auto.label"),
|
|
136
135
|
sublabel: e(o)("menu.setting.tax.modes.auto.sublabel")
|
|
137
136
|
}, null, 8, ["value", "label", "sublabel"]), s(d, {
|
|
138
|
-
value: e(
|
|
137
|
+
value: e(x).MANUAL,
|
|
139
138
|
label: e(o)("menu.setting.tax.modes.manual.label"),
|
|
140
139
|
sublabel: e(o)("menu.setting.tax.modes.manual.sublabel")
|
|
141
140
|
}, null, 8, ["value", "label", "sublabel"])]),
|
|
142
141
|
_: 1
|
|
143
|
-
}, 8, ["model-value"]), l.value.taxSetting.mode === e(
|
|
142
|
+
}, 8, ["model-value"]), l.value.taxSetting.mode === e(x).MANUAL ? (r(), M("div", Se, [(r(!0), M($, null, H(V.value, (a) => (r(), v(ae, {
|
|
144
143
|
key: a.systemCode,
|
|
145
144
|
"model-value": a.inclusive,
|
|
146
145
|
value: !0,
|
|
@@ -151,9 +150,9 @@ const xe = {
|
|
|
151
150
|
inclusive: k
|
|
152
151
|
});
|
|
153
152
|
}
|
|
154
|
-
}, null, 8, ["model-value", "label", "onUpdate:modelValue"]))), 128))])) :
|
|
153
|
+
}, null, 8, ["model-value", "label", "onUpdate:modelValue"]))), 128))])) : f("", !0)]),
|
|
155
154
|
_: 1
|
|
156
|
-
}, 8, ["label"]), !y.value &&
|
|
155
|
+
}, 8, ["label"]), !y.value && S.value ? (r(), v(E, {
|
|
157
156
|
key: 1,
|
|
158
157
|
label: e(o)("menu.setting.link.title")
|
|
159
158
|
}, {
|
|
@@ -175,9 +174,9 @@ const xe = {
|
|
|
175
174
|
}],
|
|
176
175
|
"model-value": l.value.orderFrom,
|
|
177
176
|
"onUpdate:modelValue": n[3] || (n[3] = (a) => l.value.orderFrom = a)
|
|
178
|
-
}, null, 8, ["items", "model-value"])) :
|
|
177
|
+
}, null, 8, ["items", "model-value"])) : f("", !0)]),
|
|
179
178
|
_: 1
|
|
180
|
-
}, 8, ["label"])) :
|
|
179
|
+
}, 8, ["label"])) : f("", !0), !y.value && S.value ? (r(), v(E, {
|
|
181
180
|
key: 2,
|
|
182
181
|
label: e(o)("menu.setting.markup.title")
|
|
183
182
|
}, {
|
|
@@ -187,7 +186,7 @@ const xe = {
|
|
|
187
186
|
"label-placement": "right",
|
|
188
187
|
sublabel: e(o)("menu.setting.markup.auto_markup.sublabel"),
|
|
189
188
|
"onUpdate:modelValue": n[4] || (n[4] = (a) => l.value.markupOptions = a ? [] : null)
|
|
190
|
-
}, null, 8, ["model-value", "label", "sublabel"]),
|
|
189
|
+
}, null, 8, ["model-value", "label", "sublabel"]), g("div", Me, [s(q, {
|
|
191
190
|
categories: e(u).categories,
|
|
192
191
|
items: e(u).items,
|
|
193
192
|
action: "add",
|
|
@@ -198,13 +197,13 @@ const xe = {
|
|
|
198
197
|
}) => [s(R, {
|
|
199
198
|
"text-color": e(j).ColorPrimary,
|
|
200
199
|
"border-color": e(j).ColorPrimary,
|
|
201
|
-
variant: e(
|
|
200
|
+
variant: e(z).Secondary,
|
|
202
201
|
label: "Add markup configuration",
|
|
203
202
|
"prepend-icon": "add",
|
|
204
203
|
onClick: a
|
|
205
204
|
}, null, 8, ["text-color", "border-color", "variant", "onClick"])]),
|
|
206
205
|
_: 1
|
|
207
|
-
}, 8, ["categories", "items"]), (r(!0),
|
|
206
|
+
}, 8, ["categories", "items"]), (r(!0), M($, null, H(l.value.markupOptions, (a, k) => (r(), v(q, {
|
|
208
207
|
key: k,
|
|
209
208
|
categories: e(u).categories,
|
|
210
209
|
items: e(u).items,
|
|
@@ -220,32 +219,32 @@ const xe = {
|
|
|
220
219
|
variant: "outlined",
|
|
221
220
|
onClick: U
|
|
222
221
|
}, {
|
|
223
|
-
default: c(() => [
|
|
222
|
+
default: c(() => [g("div", Fe, [g("div", Ve, [s(ne, {
|
|
224
223
|
class: "text-fm-color-typo-info bg-fm-color-system-info-100 font-semibold"
|
|
225
224
|
}, {
|
|
226
225
|
default: c(() => [me(" Markup percentage: " + N(a.percentage) + "% ", 1)]),
|
|
227
226
|
_: 2
|
|
228
|
-
}, 1024),
|
|
227
|
+
}, 1024), g("p", he, N(e(o)("menu.setting.markup.config", {
|
|
229
228
|
number: k + 1
|
|
230
|
-
})), 1),
|
|
229
|
+
})), 1), g("p", Re, N(a.includeItems ? e(o)("menu.setting.markup.products.linked", {
|
|
231
230
|
count: a.includeItems.length
|
|
232
231
|
}) : e(o)("menu.setting.markup.products.all")), 1)]), s(R, {
|
|
233
|
-
variant: e(
|
|
232
|
+
variant: e(z).Tertiary,
|
|
234
233
|
"prepend-icon": "delete",
|
|
235
|
-
onClick: (
|
|
234
|
+
onClick: (Te) => te(k)
|
|
236
235
|
}, null, 8, ["variant", "onClick"])])]),
|
|
237
236
|
_: 2
|
|
238
237
|
}, 1032, ["id", "onClick"])]),
|
|
239
238
|
_: 2
|
|
240
239
|
}, 1032, ["categories", "items", "model-value", "onUpdate:modelValue"]))), 128))])]),
|
|
241
240
|
_: 1
|
|
242
|
-
}, 8, ["label"])) :
|
|
241
|
+
}, 8, ["label"])) : f("", !0), !y.value && S.value ? (r(), v(xe, {
|
|
243
242
|
key: 3,
|
|
244
243
|
"model-value": l.value.usePriceTiers,
|
|
245
244
|
"onUpdate:modelValue": n[6] || (n[6] = (a) => l.value.usePriceTiers = a)
|
|
246
|
-
}, null, 8, ["model-value"])) :
|
|
245
|
+
}, null, 8, ["model-value"])) : f("", !0), y.value ? (r(), v(L, {
|
|
247
246
|
key: 4
|
|
248
|
-
})) :
|
|
247
|
+
})) : f("", !0)]), g("div", Ue, [s(R, {
|
|
249
248
|
label: e(o)("common.save"),
|
|
250
249
|
type: "submit"
|
|
251
250
|
}, null, 8, ["label"])])]),
|
|
@@ -255,5 +254,5 @@ const xe = {
|
|
|
255
254
|
}
|
|
256
255
|
});
|
|
257
256
|
export {
|
|
258
|
-
|
|
257
|
+
je as default
|
|
259
258
|
};
|