@feedmepos/mf-menu 0.32.3-beta.1 → 0.32.4-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-DJBZBaaC.js → App-5YVGeojR.js} +5 -5
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-c9SlmPp2.js → ApplyProduct.vue_vue_type_script_setup_true_lang-DhoHYIHW.js} +20 -20
- package/dist/{Catalog-Ct9jk3A_.js → Catalog-BTNv5n_D.js} +18 -18
- package/dist/{Category-Cf5KfKdv.js → Category-BE-kkKcL.js} +22 -23
- package/dist/{Category-CTTAtG31.js → Category-DuLhbRxE.js} +21 -22
- package/dist/{CookingGuide-BaNzajgf.js → CookingGuide-JtE8QMC6.js} +92 -93
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-CRodr6tr.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-DdJ-o_PW.js} +1 -1
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-B3Ixruh-.js +26 -0
- package/dist/{Group-BfRPCCbK.js → Group-BP-j3K6J.js} +1 -1
- package/dist/{Group-BJep-xq-.js → Group-DhS9e2E3.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-CoCq0edM.js → Group.vue_vue_type_script_setup_true_lang-DXUQrXXI.js} +33 -34
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DviXfima.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CXzz4ClS.js} +24 -23
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-DSrxcKIK.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-Bpt-8tbe.js} +11525 -11504
- package/dist/{Ingredient-BnzW69zW.js → Ingredient-NSl0x-0T.js} +5 -6
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-D8m1pyLp.js → InventoryBinding.vue_vue_type_script_setup_true_lang-ByrNVvzs.js} +2 -2
- package/dist/LinkProductSideSheet-B_R_2iH6.js +692 -0
- package/dist/MenuSetting-C7cpv4S3.js +580 -0
- package/dist/{PrintRoute-CLsiDIkn.js → PrintRoute-DmP7KH58.js} +10 -11
- package/dist/{Product-DHE0XtX1.js → Product-B6gwN4g0.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-CVR8j-XT.js → Product.vue_vue_type_script_setup_true_lang-BKhn8Txf.js} +15 -16
- package/dist/{ProductInternalTools-BQOXHzYp.js → ProductInternalTools-D5xIh2j2.js} +5 -5
- package/dist/Products-Cxx8pJGK.js +692 -0
- package/dist/{Publish-BlEcoJaI.js → Publish-ZCzRBB5V.js} +21 -22
- package/dist/{Recipe-CkcNxf7p.js → Recipe-DcHdr_5J.js} +9 -10
- package/dist/RuleView.vue_vue_type_script_setup_true_lang-edNbsZTq.js +3282 -0
- package/dist/{Scheduler-DV0s_qkV.js → Scheduler-ZhDXk5gQ.js} +18 -19
- package/dist/{ServingSequence-CFd8Nwws.js → ServingSequence-DcfMbHjn.js} +15 -16
- package/dist/{Setting-B55IsZCX.js → Setting-fqf_sOIc.js} +45 -44
- package/dist/{Subcategory-BXCcVdR3.js → Subcategory-BidmfEOK.js} +18 -19
- package/dist/{Takeaway-BDvcwBHP.js → Takeaway-C83SKEvl.js} +1 -1
- package/dist/{Takeaway--U_lsgYi.js → Takeaway-p6thRg74.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-DaYk2xdF.js → Takeaway.vue_vue_type_script_setup_true_lang-Dq6CjXCv.js} +48 -49
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-VBpTghy9.js → Thumbnail.vue_vue_type_script_setup_true_lang-CjLOy2k9.js} +10 -10
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-IBM6rC5M.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CWdsp9eo.js} +17 -16
- package/dist/{Unit-DkvTsQWA.js → Unit-CKIaBxVE.js} +7 -8
- package/dist/{Variant-tte76SbR.js → Variant-CE21vKC4.js} +38 -39
- package/dist/{_id_-AVMi3j91.js → _id_-BhWpg9Kj.js} +10 -10
- package/dist/{app-0s3jY-aE.js → app-BkcVM9nE.js} +1 -1
- package/dist/app-CEIhTuYG.js +363 -0
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +250 -0
- package/dist/apps/mf-menu/src/components/rule_group/CatalogLinkItemRuleForm.vue.d.ts +146 -0
- package/dist/apps/mf-menu/src/components/rule_group/CatalogLinkItemRuleView.vue.d.ts +158 -0
- package/dist/apps/mf-menu/src/components/rule_group/RuleCondition.vue.d.ts +103 -0
- package/dist/apps/mf-menu/src/components/rule_group/RuleConditionListView.vue.d.ts +54 -0
- package/dist/apps/mf-menu/src/components/rule_group/RuleConditionSelector.vue.d.ts +50 -0
- package/dist/apps/mf-menu/src/components/rule_group/RuleForm.vue.d.ts +117 -0
- package/dist/apps/mf-menu/src/components/rule_group/RuleView.vue.d.ts +141 -0
- package/dist/apps/mf-menu/src/composable/attributes.d.ts +10 -0
- package/dist/apps/mf-menu/src/helper/import-export-utils.d.ts +2 -3
- package/dist/apps/mf-menu/src/helper/menuExport.d.ts +3 -1
- package/dist/apps/mf-menu/src/helper/menuImport.d.ts +3 -2
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-DEGoFflv.js → linked-status-CStQ46Ze.js} +2 -2
- package/dist/assets/{override-menu-CZe07SCm.js → override-menu-DHTQAnIJ.js} +2 -2
- package/dist/assets/{validate-menu-BnHfAUEN.js → validate-menu-C_kUDOhd.js} +2 -2
- package/dist/{catalog-YE_knev1.js → catalog-WBrPmQwl.js} +1 -1
- package/dist/{catalogSetting-CeVHRHOo.js → catalogSetting-BAry7I_V.js} +1 -1
- package/dist/{category-Dph1iWr8.js → category-bW36h16p.js} +1 -1
- package/dist/{currency-Byslycrk.js → currency-vVxHIVBs.js} +1 -1
- package/dist/{index-C0T32LLy.js → index-Ba5-dCQA.js} +1 -1
- package/dist/{index-CUTY6cCm.js → index-C0EV3eSc.js} +20 -20
- package/dist/{index-DycbrG1l.js → index-XZlEgR2k.js} +8 -7
- package/dist/{index-Ddt_Nw9F.js → index-pxnQHVnU.js} +4 -4
- package/dist/{menu-tHhzkxDL.js → index.vue_vue_type_script_setup_true_lang-CFPMPQFg.js} +18612 -18558
- package/dist/item-mFv0bFSn.js +7648 -0
- package/dist/{iteration-CcobmcUk.js → iteration-CaFp1Rtz.js} +3 -3
- package/dist/{jszip.min-DQrtMdm5.js → jszip.min-BkSmQKmf.js} +353 -353
- package/dist/{menu-DkRrqTVY.js → menu-ud-tWfIM.js} +1 -1
- package/dist/{menuV2-DJevKCqE.js → menuV2-xUMdUls0.js} +65 -65
- package/dist/mf-menu.css +1 -1
- package/dist/{priceTier-Bkogs1qc.js → priceTier-BVTab4k1.js} +1 -1
- package/dist/{scheduler-BGQ_lxUL.js → scheduler-CAt7sELO.js} +13 -12
- package/dist/{subcategory-DvxvLe8X.js → subcategory-DMZuedoM.js} +2 -2
- package/dist/{toExcel-DQ4jlZPI.js → toExcel-CczXOnKy.js} +2 -2
- package/dist/{unit-DoxpI5dG.js → unit-CbD3sYqC.js} +2 -2
- package/package.json +4 -3
- package/dist/LinkProductSideSheet-C4yBnJSM.js +0 -361
- package/dist/MenuSetting-Fxl8F6N5.js +0 -618
- package/dist/Products-BLvwrz9P.js +0 -689
- package/dist/app-CjfWVFOg.js +0 -363
- package/dist/customAttributes-DvbvCfOd.js +0 -180
- package/dist/index.vue_vue_type_script_setup_true_lang-B1_JqsYF.js +0 -57
- package/dist/item-x1WWjISR.js +0 -9175
|
@@ -1,11 +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 z, createElementVNode as l, renderList as T, toDisplayString as S, createCommentVNode as H } from "vue";
|
|
2
|
-
import { z as i, O as W, u as Q, D as G } from "./
|
|
3
|
-
import { useI18n as
|
|
4
|
-
import { components as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { _ as
|
|
7
|
-
import { d as
|
|
8
|
-
import { _ as re } from "./index.vue_vue_type_script_setup_true_lang-B1_JqsYF.js";
|
|
2
|
+
import { z as i, O as W, u as Q, D as G, a3 as J } from "./index.vue_vue_type_script_setup_true_lang-CFPMPQFg.js";
|
|
3
|
+
import { useI18n as X } from "@feedmepos/mf-common";
|
|
4
|
+
import { components as Z, useDialog as ee, useSnackbar as te } from "@feedmepos/ui-library";
|
|
5
|
+
import { _ as ne } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
6
|
+
import { _ as ae } from "./app-CEIhTuYG.js";
|
|
7
|
+
import { d as oe, _ as se, u as le, c as re } from "./scheduler-CAt7sELO.js";
|
|
9
8
|
import { _ as ue } from "./PageLayout.vue_vue_type_script_setup_true_lang-vFqWGM6P.js";
|
|
10
9
|
const ce = {
|
|
11
10
|
class: "flex flex-1 justify-end"
|
|
@@ -23,12 +22,12 @@ const ce = {
|
|
|
23
22
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
24
23
|
}, _e = {
|
|
25
24
|
key: 0
|
|
26
|
-
},
|
|
25
|
+
}, De = /* @__PURE__ */ N({
|
|
27
26
|
__name: "Scheduler",
|
|
28
27
|
setup(he) {
|
|
29
28
|
const {
|
|
30
29
|
t: a
|
|
31
|
-
} =
|
|
30
|
+
} = X(), I = y(() => [{
|
|
32
31
|
accessorKey: "name",
|
|
33
32
|
header: () => a("menu.scheduler.table.columns.name"),
|
|
34
33
|
cell: (e) => e.getValue(),
|
|
@@ -71,7 +70,7 @@ const ce = {
|
|
|
71
70
|
enableSorting: !1,
|
|
72
71
|
cell: (e) => c("div", {
|
|
73
72
|
class: "flex justify-end"
|
|
74
|
-
}, [c(
|
|
73
|
+
}, [c(Z.FmIcon, {
|
|
75
74
|
name: "delete",
|
|
76
75
|
outline: !0,
|
|
77
76
|
color: "neutral-gray-400",
|
|
@@ -116,7 +115,7 @@ const ce = {
|
|
|
116
115
|
var t;
|
|
117
116
|
C.value || (t = x.value) == null || t.show(e);
|
|
118
117
|
}
|
|
119
|
-
const O =
|
|
118
|
+
const O = ee();
|
|
120
119
|
function j(e) {
|
|
121
120
|
let t = [c("span", a("menu.scheduler.dialogs.remove.message", {
|
|
122
121
|
name: e.name
|
|
@@ -136,14 +135,14 @@ const ce = {
|
|
|
136
135
|
close: !0
|
|
137
136
|
}
|
|
138
137
|
}).onPrimary(async () => {
|
|
139
|
-
await w.updateMenu(
|
|
138
|
+
await w.updateMenu(oe(e), e.name, !0);
|
|
140
139
|
});
|
|
141
140
|
}
|
|
142
141
|
async function q(e) {
|
|
143
|
-
const t = e._id ?
|
|
142
|
+
const t = e._id ? le(e) : re(e);
|
|
144
143
|
await w.updateMenu(t, e.name);
|
|
145
144
|
}
|
|
146
|
-
const A = Q(), B = y(() => A.categorizedRawMenuItems), p = y(() => A.state.menu.modules.scheduler), w = W(G(
|
|
145
|
+
const A = Q(), B = y(() => A.categorizedRawMenuItems), p = y(() => A.state.menu.modules.scheduler), w = W(G(te())), C = y(() => w.checkMenuIsLoading()), g = V(""), K = y(() => {
|
|
147
146
|
const e = g.value.toLowerCase();
|
|
148
147
|
return e ? p.value.filter((t) => t.name.toLowerCase().includes(e)) : p.value;
|
|
149
148
|
});
|
|
@@ -152,7 +151,7 @@ const ce = {
|
|
|
152
151
|
return d(), k(ue, {
|
|
153
152
|
heading: m(a)("menu.scheduler.title")
|
|
154
153
|
}, {
|
|
155
|
-
"append-heading": h(() => [l("div", ce, [p.value.length > 0 ? (d(), k(
|
|
154
|
+
"append-heading": h(() => [l("div", ce, [p.value.length > 0 ? (d(), k(ne, {
|
|
156
155
|
key: 0,
|
|
157
156
|
disabled: C.value,
|
|
158
157
|
icon: "add",
|
|
@@ -160,7 +159,7 @@ const ce = {
|
|
|
160
159
|
variant: "primary",
|
|
161
160
|
onClick: L
|
|
162
161
|
}, null, 8, ["disabled", "label"])) : H("", !0)])]),
|
|
163
|
-
default: h(() => [p.value.length === 0 ? (d(), k(m(
|
|
162
|
+
default: h(() => [p.value.length === 0 ? (d(), k(m(J), {
|
|
164
163
|
key: 0,
|
|
165
164
|
action: {
|
|
166
165
|
text: m(a)("menu.scheduler.empty.action"),
|
|
@@ -176,7 +175,7 @@ const ce = {
|
|
|
176
175
|
autofocus: "",
|
|
177
176
|
class: "mb-8 xs:px-16 xs:mt-8",
|
|
178
177
|
placeholder: m(a)("menu.scheduler.table.search.placeholder")
|
|
179
|
-
}, null, 8, ["modelValue", "placeholder"])])]), f(
|
|
178
|
+
}, null, 8, ["modelValue", "placeholder"])])]), f(ae, {
|
|
180
179
|
class: "xs:hidden block"
|
|
181
180
|
}, {
|
|
182
181
|
default: h(() => [f(o, {
|
|
@@ -211,7 +210,7 @@ const ce = {
|
|
|
211
210
|
_: 2
|
|
212
211
|
}, 1032, ["label", "onClick"]))), 128))]),
|
|
213
212
|
_: 1
|
|
214
|
-
})], 64)), f(
|
|
213
|
+
})], 64)), f(se, {
|
|
215
214
|
ref_key: "schedulerDialogRef",
|
|
216
215
|
ref: x,
|
|
217
216
|
"categorized-items": B.value,
|
|
@@ -223,5 +222,5 @@ const ce = {
|
|
|
223
222
|
}
|
|
224
223
|
});
|
|
225
224
|
export {
|
|
226
|
-
|
|
225
|
+
De as default
|
|
227
226
|
};
|
|
@@ -1,15 +1,14 @@
|
|
|
1
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 { H, u as W, D as X, O as Z, J as I, z as S } from "./
|
|
4
|
-
import { useI18n as ee, ItemSelector as
|
|
5
|
-
import { useSnackbar as ne, components as Y, useDialog as
|
|
6
|
-
import { _ as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { _ as he } from "./index.vue_vue_type_script_setup_true_lang-B1_JqsYF.js";
|
|
3
|
+
import { H, u as W, D as X, O as Z, J as I, z as S, a3 as de } from "./index.vue_vue_type_script_setup_true_lang-CFPMPQFg.js";
|
|
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 z, useBreakpoints as fe } from "@feedmepos/ui-library";
|
|
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-CEIhTuYG.js";
|
|
9
8
|
import { c as ye } from "./check-C9mY6LiX.js";
|
|
10
9
|
import { _ as be } from "./PageLayout.vue_vue_type_script_setup_true_lang-vFqWGM6P.js";
|
|
11
10
|
import { u as ke } from "./search-BAPEUu1R.js";
|
|
12
|
-
import { u as xe } from "./app-
|
|
11
|
+
import { u as xe } from "./app-BkcVM9nE.js";
|
|
13
12
|
import { c as Se } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
|
14
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__ */ J({
|
|
15
14
|
__name: "Form",
|
|
@@ -115,7 +114,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
115
114
|
label: t(r)("menu.serving_sequence.columns.name"),
|
|
116
115
|
placeholder: t(r)("menu.common.labels.enter_name")
|
|
117
116
|
}, null, 8, ["modelValue", "rules", "label", "placeholder"]),
|
|
118
|
-
l(t(
|
|
117
|
+
l(t(me), {
|
|
119
118
|
"categorized-items": t(C).categorizedItems,
|
|
120
119
|
data: B.value,
|
|
121
120
|
class: "flex-1",
|
|
@@ -144,17 +143,17 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
144
143
|
class: "fm-typo-en-body-lg-600"
|
|
145
144
|
}, De = {
|
|
146
145
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
147
|
-
},
|
|
146
|
+
}, He = /* @__PURE__ */ J({
|
|
148
147
|
__name: "ServingSequence",
|
|
149
148
|
setup(K) {
|
|
150
149
|
const {
|
|
151
150
|
searchKey: b,
|
|
152
151
|
filter: D
|
|
153
|
-
} = ke(), r = W(), p = ne(), N = X(p), s = Z(N), C =
|
|
152
|
+
} = ke(), r = W(), p = ne(), N = X(p), s = Z(N), C = _e(), i = pe(), R = xe(), q = ce(), {
|
|
154
153
|
t: c
|
|
155
154
|
} = ee(), u = (e) => {
|
|
156
155
|
e && e !== S.F_MENU_VERSION.enum.v4 && q.push({
|
|
157
|
-
name:
|
|
156
|
+
name: he.CATALOG
|
|
158
157
|
});
|
|
159
158
|
};
|
|
160
159
|
oe(() => {
|
|
@@ -259,7 +258,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
259
258
|
(M = (w = k.component) == null ? void 0 : w.exposed) == null || M.trigger();
|
|
260
259
|
}
|
|
261
260
|
re(() => r.selectCatalog(null));
|
|
262
|
-
const v =
|
|
261
|
+
const v = fe(), V = O(() => v.breakpoints.value.xs);
|
|
263
262
|
return (e, n) => {
|
|
264
263
|
const k = h("FmSpacer"), w = h("fm-button"), M = h("fm-search"), te = h("fm-table");
|
|
265
264
|
return d(), j(be, {
|
|
@@ -273,7 +272,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
273
272
|
}, {
|
|
274
273
|
default: m(({
|
|
275
274
|
trigger: o
|
|
276
|
-
}) => [l(
|
|
275
|
+
}) => [l(ge, {
|
|
277
276
|
class: "ml-auto",
|
|
278
277
|
label: t(c)("menu.serving_sequence.add"),
|
|
279
278
|
"prepend-icon": "add",
|
|
@@ -301,7 +300,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
301
300
|
count: o.items.length
|
|
302
301
|
})), 1)]), l(P, {
|
|
303
302
|
servingSequence: o
|
|
304
|
-
}, null, 8, ["servingSequence"])], 8, Le))), 128))])) : (d(), j(
|
|
303
|
+
}, null, 8, ["servingSequence"])], 8, Le))), 128))])) : (d(), j(ve, {
|
|
305
304
|
key: 0
|
|
306
305
|
}, {
|
|
307
306
|
default: m(() => [l(te, {
|
|
@@ -319,7 +318,7 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
319
318
|
onRowClick: n[2] || (n[2] = (o) => a(o.original))
|
|
320
319
|
}, null, 8, ["column-defs", "loading", "page-size", "row-data", "search-value"])]),
|
|
321
320
|
_: 1
|
|
322
|
-
}))], 64)) : (d(), g("div", we, [l(t(
|
|
321
|
+
}))], 64)) : (d(), g("div", we, [l(t(de), {
|
|
323
322
|
subtitle: t(c)("menu.serving_sequence.empty.subtitle"),
|
|
324
323
|
title: t(c)("menu.serving_sequence.empty.title")
|
|
325
324
|
}, {
|
|
@@ -343,5 +342,5 @@ const Ce = { class: "fm-typo-en-title-md-600" }, qe = { class: "space-y-32 flex
|
|
|
343
342
|
}
|
|
344
343
|
});
|
|
345
344
|
export {
|
|
346
|
-
|
|
345
|
+
He as default
|
|
347
346
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { u as me, D as ce, z as f, O as de, A as pe, H as w } from "./
|
|
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 L, renderList as B, createTextVNode as re, toDisplayString as N } from "vue";
|
|
2
|
+
import { u as me, D as ce, z as f, O as de, A as pe, H as w } from "./index.vue_vue_type_script_setup_true_lang-CFPMPQFg.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
|
-
import { _ as
|
|
6
|
-
import { _ as
|
|
7
|
-
import {
|
|
8
|
-
import { C as
|
|
5
|
+
import { _ as E } from "./FormItem.vue_vue_type_script_setup_true_lang-B3Ixruh-.js";
|
|
6
|
+
import { _ as ye } from "./RuleView.vue_vue_type_script_setup_true_lang-edNbsZTq.js";
|
|
7
|
+
import { _ as z, a as ke } from "./GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CXzz4ClS.js";
|
|
8
|
+
import { C as _, a as x } from "./catalogSetting-BAry7I_V.js";
|
|
9
|
+
import { C as xe } from "./catalog-WBrPmQwl.js";
|
|
9
10
|
const Ce = {
|
|
10
11
|
class: /* @__PURE__ */ H(["overflow-scroll", "flex-1", "xs:px-16 xs:py-16", "pt-16"])
|
|
11
12
|
}, Oe = {
|
|
@@ -25,16 +26,16 @@ const Ce = {
|
|
|
25
26
|
class: "fm-typo-en-body-md-400"
|
|
26
27
|
}, he = {
|
|
27
28
|
class: "flex justify-end"
|
|
28
|
-
},
|
|
29
|
+
}, ze = /* @__PURE__ */ ne({
|
|
29
30
|
__name: "Setting",
|
|
30
31
|
setup(Ne) {
|
|
31
32
|
const F = ve(), u = me(), j = fe(), A = ce(j), {
|
|
32
33
|
minor: q
|
|
33
34
|
} = A, J = _e(), {
|
|
34
|
-
t:
|
|
35
|
+
t: n
|
|
35
36
|
} = ge(), O = p(() => u.currentCatalog), b = p(() => !O.value), S = p(() => u.version === f.F_MENU_VERSION.enum.v4), {
|
|
36
37
|
updateMenu: W
|
|
37
|
-
} = de(A), l = se(_.initCatalogSetting()), Y = p(() => u.catalogs.filter((t) => t._id !== u.state.currentCatalogId).map((t) => t.name)), G = p(() => u.state.restaurants.filter((t) => [...t.additionalCatalogs, t.inHouseDelivery, ...t.linkedDeliveryCatalogs.map((
|
|
38
|
+
} = de(A), l = se(_.initCatalogSetting()), Y = p(() => u.catalogs.filter((t) => t._id !== u.state.currentCatalogId).map((t) => t.name)), G = 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));
|
|
38
39
|
function T() {
|
|
39
40
|
return G.value.length > 0 ? s("div", {
|
|
40
41
|
class: ["flex items-center", "bg-fm-color-system-warning-100", "rounded-lg", "py-16 px-24 space-x-8"]
|
|
@@ -43,7 +44,7 @@ const Ce = {
|
|
|
43
44
|
name: "warning"
|
|
44
45
|
}, null), s("p", {
|
|
45
46
|
class: "fm-typo-en-body-lg-400"
|
|
46
|
-
}, [
|
|
47
|
+
}, [n("menu.setting.catalog.warnings.delivery")])]) : null;
|
|
47
48
|
}
|
|
48
49
|
function I() {
|
|
49
50
|
const t = O.value;
|
|
@@ -62,7 +63,7 @@ const Ce = {
|
|
|
62
63
|
});
|
|
63
64
|
});
|
|
64
65
|
function K(t) {
|
|
65
|
-
const
|
|
66
|
+
const o = l.value.taxSetting, i = o.mode === x.AUTO ? _.manualTax(R.value) : w(o);
|
|
66
67
|
i.inclusive ?? (i.inclusive = []);
|
|
67
68
|
const d = i.inclusive.findIndex((C) => C.systemCode === t.systemCode);
|
|
68
69
|
d < 0 ? i.inclusive.push(t) : i.inclusive.splice(d, 1, t), U.value = i;
|
|
@@ -89,49 +90,49 @@ const Ce = {
|
|
|
89
90
|
customId: u.state.menu._id
|
|
90
91
|
});
|
|
91
92
|
};
|
|
92
|
-
function X(t,
|
|
93
|
+
function X(t, o) {
|
|
93
94
|
const i = w(l.value);
|
|
94
|
-
i.markupOptions && (i.markupOptions[t] =
|
|
95
|
+
i.markupOptions && (i.markupOptions[t] = o, l.value = i);
|
|
95
96
|
}
|
|
96
97
|
function Z(t) {
|
|
97
|
-
const
|
|
98
|
-
|
|
98
|
+
const o = w(l.value);
|
|
99
|
+
o.markupOptions && (o.markupOptions.splice(t, 1), l.value = o);
|
|
99
100
|
}
|
|
100
|
-
return (t,
|
|
101
|
-
const i = m("fm-text-field"), d = m("fm-radio"), C = m("fm-radio-group"), ee = m("fm-checkbox"), D = m("fm-switch"), te = m("fm-select"), h = m("fm-button"), ae = m("fm-chip"), le = m("fm-card"),
|
|
102
|
-
return r(), V("div", Ce, [s(
|
|
101
|
+
return (t, o) => {
|
|
102
|
+
const i = m("fm-text-field"), d = m("fm-radio"), C = m("fm-radio-group"), ee = m("fm-checkbox"), D = m("fm-switch"), te = m("fm-select"), h = m("fm-button"), ae = m("fm-chip"), le = m("fm-card"), oe = m("fm-form");
|
|
103
|
+
return r(), V("div", Ce, [s(oe, {
|
|
103
104
|
class: H(["space-y-40 max-w-[751px]", "h-fit"]),
|
|
104
105
|
"blame-form-child-on-validation-failed": "",
|
|
105
106
|
onValidationSuccess: Q
|
|
106
107
|
}, {
|
|
107
108
|
default: c(() => [v("div", Oe, [b.value ? k("", !0) : (r(), g(ye, {
|
|
108
109
|
key: 0,
|
|
109
|
-
title: e(
|
|
110
|
+
title: e(n)("menu.setting.catalog.title")
|
|
110
111
|
}, {
|
|
111
112
|
default: c(() => [s(i, {
|
|
112
113
|
modelValue: l.value.name,
|
|
113
|
-
"onUpdate:modelValue":
|
|
114
|
-
rules: [(a) => !Y.value.includes(a.trim()) || e(
|
|
115
|
-
label: e(
|
|
114
|
+
"onUpdate:modelValue": o[0] || (o[0] = (a) => l.value.name = a),
|
|
115
|
+
rules: [(a) => !Y.value.includes(a.trim()) || e(n)("menu.setting.catalog.fields.name.used"), (a) => !!a.trim() || e(n)("menu.setting.catalog.fields.name.required")],
|
|
116
|
+
label: e(n)("menu.setting.catalog.fields.name.label")
|
|
116
117
|
}, null, 8, ["modelValue", "rules", "label"]), s(T)]),
|
|
117
118
|
_: 1
|
|
118
119
|
}, 8, ["title"])), s(E, {
|
|
119
|
-
label: e(
|
|
120
|
+
label: e(n)("menu.setting.tax.title")
|
|
120
121
|
}, {
|
|
121
122
|
default: c(() => [s(C, {
|
|
122
123
|
"model-value": l.value.taxSetting.mode,
|
|
123
|
-
"onUpdate:modelValue":
|
|
124
|
+
"onUpdate:modelValue": o[1] || (o[1] = (a) => {
|
|
124
125
|
a === e(x).AUTO ? U.value = e(_).autoTax() : U.value = e(_).manualTax(R.value);
|
|
125
126
|
})
|
|
126
127
|
}, {
|
|
127
128
|
default: c(() => [s(d, {
|
|
128
129
|
value: e(x).AUTO,
|
|
129
|
-
label: e(
|
|
130
|
-
sublabel: e(
|
|
130
|
+
label: e(n)("menu.setting.tax.modes.auto.label"),
|
|
131
|
+
sublabel: e(n)("menu.setting.tax.modes.auto.sublabel")
|
|
131
132
|
}, null, 8, ["value", "label", "sublabel"]), s(d, {
|
|
132
133
|
value: e(x).MANUAL,
|
|
133
|
-
label: e(
|
|
134
|
-
sublabel: e(
|
|
134
|
+
label: e(n)("menu.setting.tax.modes.manual.label"),
|
|
135
|
+
sublabel: e(n)("menu.setting.tax.modes.manual.sublabel")
|
|
135
136
|
}, null, 8, ["value", "label", "sublabel"])]),
|
|
136
137
|
_: 1
|
|
137
138
|
}, 8, ["model-value"]), l.value.taxSetting.mode === e(x).MANUAL ? (r(), V("div", Se, [(r(!0), V(L, null, B(R.value, (a) => (r(), g(ee, {
|
|
@@ -149,14 +150,14 @@ const Ce = {
|
|
|
149
150
|
_: 1
|
|
150
151
|
}, 8, ["label"]), !b.value && S.value ? (r(), g(E, {
|
|
151
152
|
key: 1,
|
|
152
|
-
label: e(
|
|
153
|
+
label: e(n)("menu.setting.link.title")
|
|
153
154
|
}, {
|
|
154
155
|
default: c(() => [s(D, {
|
|
155
156
|
"model-value": l.value.orderFrom && l.value.orderFrom !== e(f.F_ORDER_FROM).enum.NONE,
|
|
156
|
-
label: e(
|
|
157
|
+
label: e(n)("menu.setting.link.auto_link.label"),
|
|
157
158
|
"label-placement": "right",
|
|
158
|
-
sublabel: e(
|
|
159
|
-
"onUpdate:modelValue":
|
|
159
|
+
sublabel: e(n)("menu.setting.link.auto_link.sublabel"),
|
|
160
|
+
"onUpdate:modelValue": o[2] || (o[2] = (a) => l.value.orderFrom = a ? e(f.F_ORDER_FROM).enum.ALL : e(f.F_ORDER_FROM).enum.NONE)
|
|
160
161
|
}, null, 8, ["model-value", "label", "sublabel"]), l.value.orderFrom !== e(f.F_ORDER_FROM).enum.NONE ? (r(), g(te, {
|
|
161
162
|
key: 0,
|
|
162
163
|
class: "ml-[60px]",
|
|
@@ -168,24 +169,24 @@ const Ce = {
|
|
|
168
169
|
value: e(f.F_ORDER_FROM).enum.POS_ONLY
|
|
169
170
|
}],
|
|
170
171
|
"model-value": l.value.orderFrom,
|
|
171
|
-
"onUpdate:modelValue":
|
|
172
|
+
"onUpdate:modelValue": o[3] || (o[3] = (a) => l.value.orderFrom = a)
|
|
172
173
|
}, null, 8, ["items", "model-value"])) : k("", !0)]),
|
|
173
174
|
_: 1
|
|
174
175
|
}, 8, ["label"])) : k("", !0), !b.value && S.value ? (r(), g(E, {
|
|
175
176
|
key: 2,
|
|
176
|
-
label: e(
|
|
177
|
+
label: e(n)("menu.setting.markup.title")
|
|
177
178
|
}, {
|
|
178
179
|
default: c(() => [s(D, {
|
|
179
180
|
"model-value": !!l.value.markupOptions,
|
|
180
|
-
label: e(
|
|
181
|
+
label: e(n)("menu.setting.markup.auto_markup.label"),
|
|
181
182
|
"label-placement": "right",
|
|
182
|
-
sublabel: e(
|
|
183
|
-
"onUpdate:modelValue":
|
|
183
|
+
sublabel: e(n)("menu.setting.markup.auto_markup.sublabel"),
|
|
184
|
+
"onUpdate:modelValue": o[4] || (o[4] = (a) => l.value.markupOptions = a ? [] : null)
|
|
184
185
|
}, null, 8, ["model-value", "label", "sublabel"]), v("div", Me, [s(z, {
|
|
185
186
|
categories: e(u).categories,
|
|
186
187
|
items: e(u).items,
|
|
187
188
|
action: "add",
|
|
188
|
-
"onUpdate:modelValue":
|
|
189
|
+
"onUpdate:modelValue": o[5] || (o[5] = (a) => {
|
|
189
190
|
a && (l.value.markupOptions = [...l.value.markupOptions ?? [], a]);
|
|
190
191
|
})
|
|
191
192
|
}, {
|
|
@@ -223,11 +224,11 @@ const Ce = {
|
|
|
223
224
|
}, {
|
|
224
225
|
default: c(() => [re(" Markup percentage: " + N(a.percentage) + "% ", 1)]),
|
|
225
226
|
_: 2
|
|
226
|
-
}, 1024), v("p", Re, N(e(
|
|
227
|
+
}, 1024), v("p", Re, N(e(n)("menu.setting.markup.config", {
|
|
227
228
|
number: y + 1
|
|
228
|
-
})), 1), v("p", Ue, N(a.includeItems ? e(
|
|
229
|
+
})), 1), v("p", Ue, N(a.includeItems ? e(n)("menu.setting.markup.products.linked", {
|
|
229
230
|
count: a.includeItems.length
|
|
230
|
-
}) : e(
|
|
231
|
+
}) : e(n)("menu.setting.markup.products.all")), 1)]), s(h, {
|
|
231
232
|
variant: e($).Tertiary,
|
|
232
233
|
"prepend-icon": "delete",
|
|
233
234
|
onClick: (we) => Z(y)
|
|
@@ -239,13 +240,13 @@ const Ce = {
|
|
|
239
240
|
_: 1
|
|
240
241
|
}, 8, ["label"])) : k("", !0), s(ke, {
|
|
241
242
|
modelValue: l.value,
|
|
242
|
-
"onUpdate:modelValue":
|
|
243
|
+
"onUpdate:modelValue": o[6] || (o[6] = (a) => l.value = a),
|
|
243
244
|
"is-main-catalog": b.value,
|
|
244
245
|
"is-v4": S.value
|
|
245
246
|
}, null, 8, ["modelValue", "is-main-catalog", "is-v4"]), b.value ? (r(), g(T, {
|
|
246
247
|
key: 3
|
|
247
248
|
})) : k("", !0)]), v("div", he, [s(h, {
|
|
248
|
-
label: e(
|
|
249
|
+
label: e(n)("common.save"),
|
|
249
250
|
type: "submit"
|
|
250
251
|
}, null, 8, ["label"])])]),
|
|
251
252
|
_: 1
|
|
@@ -254,5 +255,5 @@ const Ce = {
|
|
|
254
255
|
}
|
|
255
256
|
});
|
|
256
257
|
export {
|
|
257
|
-
|
|
258
|
+
ze as default
|
|
258
259
|
};
|
|
@@ -2,17 +2,16 @@ import { defineComponent as L, ref as w, watch as W, resolveComponent as y, crea
|
|
|
2
2
|
import { useI18n as T } from "@feedmepos/mf-common";
|
|
3
3
|
import { useSnackbar as B, components as j, useDialog as Y, FmButtonVariant as R, useBreakpoints as ae, FmButtonColorThemeVariant as oe } from "@feedmepos/ui-library";
|
|
4
4
|
import { _ as ne } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
5
|
-
import { D, u as N, O as U, J as K, z as q } from "./
|
|
6
|
-
import { _ as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { c as
|
|
9
|
-
import { u as
|
|
5
|
+
import { D, u as N, O as U, J as K, z as q, a3 as le } from "./index.vue_vue_type_script_setup_true_lang-CFPMPQFg.js";
|
|
6
|
+
import { _ as se } from "./PageLayout.vue_vue_type_script_setup_true_lang-vFqWGM6P.js";
|
|
7
|
+
import { _ as re } from "./app-CEIhTuYG.js";
|
|
8
|
+
import { c as ie } from "./createForm-BoUQeZTd.js";
|
|
9
|
+
import { u as ce } from "./discardConfirm-BHni0LNu.js";
|
|
10
10
|
import { c as I } from "./object-DVUNCr7w.js";
|
|
11
|
-
import { r as
|
|
12
|
-
import { c as
|
|
13
|
-
import { u as G } from "./subcategory-
|
|
14
|
-
import {
|
|
15
|
-
import { a as me } from "./menu-DkRrqTVY.js";
|
|
11
|
+
import { r as ue } from "./rules-CIWTZQfh.js";
|
|
12
|
+
import { c as de } from "./check-C9mY6LiX.js";
|
|
13
|
+
import { u as G } from "./subcategory-DMZuedoM.js";
|
|
14
|
+
import { a as me } from "./menu-ud-tWfIM.js";
|
|
16
15
|
const pe = {
|
|
17
16
|
class: "fm-typo-en-title-md-600"
|
|
18
17
|
}, _e = {
|
|
@@ -30,8 +29,8 @@ const pe = {
|
|
|
30
29
|
const _ = $, x = B(), g = D(x), k = U(g), d = N(), {
|
|
31
30
|
t: a
|
|
32
31
|
} = T(), v = w(!1), e = w(!1), b = (r) => {
|
|
33
|
-
|
|
34
|
-
}, n = w(I(_.initialValue)), M =
|
|
32
|
+
de.isBoolean(r) ? e.value = r : e.value = !e.value;
|
|
33
|
+
}, n = w(I(_.initialValue)), M = ce(() => n.value.name !== _.initialValue.name, () => {
|
|
35
34
|
e.value = !1;
|
|
36
35
|
});
|
|
37
36
|
async function E() {
|
|
@@ -88,7 +87,7 @@ const pe = {
|
|
|
88
87
|
modelValue: n.value.name,
|
|
89
88
|
"onUpdate:modelValue": c[0] || (c[0] = (u) => n.value.name = u),
|
|
90
89
|
disabled: !n.value._id,
|
|
91
|
-
rules: [t(
|
|
90
|
+
rules: [t(ue)]
|
|
92
91
|
}, null, 8, ["label", "modelValue", "disabled", "rules"])])]),
|
|
93
92
|
_: 1
|
|
94
93
|
}, 8, ["modelValue", "is-container", "is-container-props", "onOn:clickedAway"])], 64);
|
|
@@ -185,7 +184,7 @@ const pe = {
|
|
|
185
184
|
}
|
|
186
185
|
const E = Z();
|
|
187
186
|
async function r(o) {
|
|
188
|
-
|
|
187
|
+
ie(E, ve, {
|
|
189
188
|
initialValue: o
|
|
190
189
|
});
|
|
191
190
|
}
|
|
@@ -218,7 +217,7 @@ const pe = {
|
|
|
218
217
|
placeholder: t(e)("menu.common.labels.search_placeholder", {
|
|
219
218
|
type: t(e)("menu.subcategory.title")
|
|
220
219
|
})
|
|
221
|
-
}, null, 8, ["modelValue", "placeholder"])])]), m(
|
|
220
|
+
}, null, 8, ["modelValue", "placeholder"])])]), m(re, null, {
|
|
222
221
|
default: h(() => [m(J, {
|
|
223
222
|
"column-defs": b.value,
|
|
224
223
|
draggable: !0,
|
|
@@ -235,7 +234,7 @@ const pe = {
|
|
|
235
234
|
})]));
|
|
236
235
|
};
|
|
237
236
|
}
|
|
238
|
-
}), $e = { class: "flex-1 flex justify-between gap-8 pl-8" }, Me = { class: "flex items-center" }, Ee = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Le = { class: "fm-typo-en-body-md-600 font-semibold" },
|
|
237
|
+
}), $e = { class: "flex-1 flex justify-between gap-8 pl-8" }, Me = { class: "flex items-center" }, Ee = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Le = { class: "fm-typo-en-body-md-600 font-semibold" }, qe = /* @__PURE__ */ L({
|
|
239
238
|
__name: "Subcategory",
|
|
240
239
|
setup($) {
|
|
241
240
|
const f = Y(), _ = B(), x = D(_), g = U(x), k = G({ dialog: f, menuLoader: g }), d = F(() => N().subcategories), { t: a } = T();
|
|
@@ -243,11 +242,11 @@ const pe = {
|
|
|
243
242
|
k.create();
|
|
244
243
|
}
|
|
245
244
|
const e = F(() => d.value.length);
|
|
246
|
-
return me().resetOnMount(), (b, n) => (p(), S(
|
|
245
|
+
return me().resetOnMount(), (b, n) => (p(), S(se, {
|
|
247
246
|
heading: t(a)("menu.subcategory.title")
|
|
248
247
|
}, {
|
|
249
248
|
default: h(() => [
|
|
250
|
-
d.value.length > 0 ? (p(), S(Se, { key: 0 })) : (p(), S(t(
|
|
249
|
+
d.value.length > 0 ? (p(), S(Se, { key: 0 })) : (p(), S(t(le), {
|
|
251
250
|
key: 1,
|
|
252
251
|
action: {
|
|
253
252
|
text: t(a)("menu.subcategory.add"),
|
|
@@ -277,5 +276,5 @@ const pe = {
|
|
|
277
276
|
}
|
|
278
277
|
});
|
|
279
278
|
export {
|
|
280
|
-
|
|
279
|
+
qe as default
|
|
281
280
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
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 { D as x, u as v, O as w, J as E, z as M } from "./
|
|
2
|
+
import { D as x, u as v, O as w, J as E, z as M } from "./index.vue_vue_type_script_setup_true_lang-CFPMPQFg.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-vFqWGM6P.js";
|
|
7
|
-
import { _ as N } from "./Takeaway.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { T as O, l as S } from "./index-
|
|
9
|
-
import { a as L } from "./menu-
|
|
7
|
+
import { _ as N } from "./Takeaway.vue_vue_type_script_setup_true_lang-Dq6CjXCv.js";
|
|
8
|
+
import { T as O, l as S } from "./index-pxnQHVnU.js";
|
|
9
|
+
import { a as L } from "./menu-ud-tWfIM.js";
|
|
10
10
|
const U = { class: "flex-1 flex justify-between gap-8 pl-8" }, B = { class: "flex items-center" }, D = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, F = { class: "fm-typo-en-body-md-600 font-semibold" }, G = /* @__PURE__ */ f({
|
|
11
11
|
__name: "Takeaway",
|
|
12
12
|
setup(I) {
|