@feedmepos/mf-menu 0.31.35 → 0.31.36-beta
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-DaTz3gVq.js → App-Cui-XStB.js} +8 -8
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-B3EW0pwh.js → ApplyProduct.vue_vue_type_script_setup_true_lang-cUYW6sW5.js} +2 -2
- package/dist/{Catalog-Cy8TWxm1.js → Catalog-MktLa55D.js} +68 -68
- package/dist/{Category-BUumX7_C.js → Category-C-s_lW3M.js} +4 -4
- package/dist/{Category-CwOYQ-6u.js → Category-CEMqueNk.js} +5 -5
- package/dist/{CookingGuide-Cbh7SCu4.js → CookingGuide-eWdk6mho.js} +3 -3
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-DHoiQOG2.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CcKt1abw.js} +1 -1
- package/dist/{Group-BVZWj-Nw.js → Group-Bg2Ylu9p.js} +1 -1
- package/dist/{Group-DgjhvWSx.js → Group-VircdSF_.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-BgPBZyTW.js → Group.vue_vue_type_script_setup_true_lang-CyW8Gh6c.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BBo0vhrz.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-yQjS-X1R.js} +4 -4
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-D3W1WyZZ.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-26ogJPxR.js} +7 -7
- package/dist/{Ingredient-BHkSTwr-.js → Ingredient-CegrU_cQ.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-BQ4W0WDp.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CzhbZPKE.js} +2 -2
- package/dist/{LinkProductSideSheet-Sx-DeJjH.js → LinkProductSideSheet-BJlrPykg.js} +2 -2
- package/dist/{MenuSetting-BnS6kPNi.js → MenuSetting-D70NMQWp.js} +4 -4
- package/dist/{PrintRoute-C2duy7oi.js → PrintRoute-bAS3UL9d.js} +3 -3
- package/dist/{Product-ZOxkTHRu.js → Product-Cu2f-ZSs.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-CGZ88bcg.js → Product.vue_vue_type_script_setup_true_lang-CYfDGs7M.js} +12 -12
- package/dist/{ProductInternalTools-Cor8iDMg.js → ProductInternalTools-6X6XUdH6.js} +6 -6
- package/dist/{Products-C7cxX2rJ.js → Products-DYgr_65I.js} +11 -11
- package/dist/{Publish-DSu44YfY.js → Publish-DhdYNYH2.js} +3 -3
- package/dist/{Recipe-D6PGiqy_.js → Recipe-Bb5gqrsE.js} +4 -4
- package/dist/{Scheduler-BU_NlkbG.js → Scheduler-Tk0cPXz4.js} +3 -3
- package/dist/{ServingSequence-BWhKQKyG.js → ServingSequence-DUghx8CU.js} +3 -3
- package/dist/{Setting-BUrzoFWQ.js → Setting-DIl9WhmE.js} +5 -5
- package/dist/{Subcategory-BEe8nN8W.js → Subcategory-C8Igjkze.js} +4 -4
- package/dist/{Takeaway-DEPZnV9k.js → Takeaway-ZfBLSZMG.js} +1 -1
- package/dist/{Takeaway-6H0VNuwC.js → Takeaway-xHGsoah-.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-J6YI-e7E.js → Takeaway.vue_vue_type_script_setup_true_lang-DItRiL8J.js} +5 -5
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-TGErO0ja.js → Thumbnail.vue_vue_type_script_setup_true_lang-Dmk-5eGV.js} +4 -4
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DNWYFjeh.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-OJ0A70lo.js} +13 -13
- package/dist/{Unit-DysKNvcA.js → Unit-CfmYi7kG.js} +2 -2
- package/dist/{Variant-3bHTEqqf.js → Variant-D6hyic1A.js} +3 -3
- package/dist/{_id_-vIzDI0J7.js → _id_-DT2EQjcY.js} +28 -28
- package/dist/{app-Bo_0BeKy.js → app-Do8sOqMh.js} +24 -24
- package/dist/{app-DB4PWsXm.js → app-jvyTuOVi.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/assets/{linked-status-CHi_EGJ_.js → linked-status-DQ161R27.js} +8 -8
- package/dist/assets/{override-menu-Dc3cFSKt.js → override-menu-VGwIGccm.js} +8 -8
- package/dist/assets/{validate-menu-C3mUe2jb.js → validate-menu-Dx9kwuMh.js} +2 -2
- package/dist/{catalog-sIoOkP5_.js → catalog-BL6h_DDN.js} +1 -1
- package/dist/{catalogSetting-BOYlA0vr.js → catalogSetting-DEabwfXZ.js} +1 -1
- package/dist/{category-DEi6MtyP.js → category-CKujA-NM.js} +1 -1
- package/dist/{currency-CDBdzl0s.js → currency-BFai41BQ.js} +1 -1
- package/dist/{dayjs.min-X61wvf3g.js → dayjs.min-B5ost3s4.js} +1 -1
- package/dist/{index-DaIvNFHS.js → index-D70F0uL_.js} +3 -3
- package/dist/{index-DYcS_Xa2.js → index-D9PdlnOv.js} +3 -3
- package/dist/{index-CUbPpfk7.js → index-nSRvCNb9.js} +1 -1
- package/dist/{item-D-N71SB8.js → item-DqdhjOW8.js} +16 -16
- package/dist/{jszip.min-DTP3NKhg.js → jszip.min-_LmXapMc.js} +2 -2
- package/dist/{menu-CWFK369v.js → menu-Cj3d6im1.js} +7 -7
- package/dist/{menu-o3YrbMF5.js → menu-S1W5eNCT.js} +1 -1
- package/dist/{menuV2-Ck68z0aU.js → menuV2-K6oaeFE4.js} +38 -38
- package/dist/{priceTier-BLsVfD7Y.js → priceTier-Cnci8Hf5.js} +1 -1
- package/dist/{scheduler-Co5_zX1A.js → scheduler-D7qY3sLN.js} +3 -3
- package/dist/{subcategory-D3QqfBM5.js → subcategory-CHsH67ID.js} +2 -2
- package/dist/{toExcel-5ep5h27U.js → toExcel-DhVG55bK.js} +2 -2
- package/dist/{unit-D3lwQjNl.js → unit-C3zaQSoS.js} +2 -2
- package/package.json +1 -1
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { defineComponent as oe, computed as
|
|
1
|
+
import { defineComponent as oe, computed as V, resolveComponent as y, createBlock as D, openBlock as p, createVNode as o, ref as B, createElementBlock as M, Fragment as P, renderSlot as ye, unref as e, withCtx as g, createElementVNode as f, createCommentVNode as K, renderList as q, createTextVNode as be, toDisplayString as w, h as J, withModifiers as W, normalizeClass as xe } from "vue";
|
|
2
2
|
import { useRouter as Ce } from "vue-router";
|
|
3
|
-
import { u as de, G as F, O as pe, D as fe, B as ue, A as ke, H as ee, J as ge, a9 as re } from "./menu-
|
|
3
|
+
import { u as de, G as F, O as pe, D as fe, B as ue, A as ke, H as ee, J as ge, a9 as re } from "./menu-Cj3d6im1.js";
|
|
4
4
|
import { useI18n as ne, useCoreStore as ve } from "@feedmepos/mf-common";
|
|
5
5
|
import { useSnackbar as _e, components as te, FmButtonVariant as j, FmButtonColorThemeVariant as Q, useDialog as he, useBreakpoints as Oe } from "@feedmepos/ui-library";
|
|
6
|
-
import { _ as Fe, R as ie } from "./app-
|
|
6
|
+
import { _ as Fe, R as ie } from "./app-Do8sOqMh.js";
|
|
7
7
|
import { _ as Me } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
|
|
8
|
-
import { a as ae } from "./LinkProductSideSheet-
|
|
8
|
+
import { a as ae } from "./LinkProductSideSheet-BJlrPykg.js";
|
|
9
9
|
import { _ as Ve } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
|
|
10
|
-
import { _ as ce, a as De } from "./GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-
|
|
10
|
+
import { _ as ce, a as De } from "./GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-yQjS-X1R.js";
|
|
11
11
|
import { c as Se } from "./check-C9mY6LiX.js";
|
|
12
|
-
import { C as
|
|
12
|
+
import { C as $, a as I } from "./catalogSetting-DEabwfXZ.js";
|
|
13
13
|
import { _ as Te } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
|
|
14
14
|
import { _ as Ue } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
15
|
-
import { C as Ee } from "./catalog-
|
|
15
|
+
import { C as Ee } from "./catalog-BL6h_DDN.js";
|
|
16
16
|
const Ae = /* @__PURE__ */ oe({
|
|
17
17
|
__name: "CatalogUsageTable",
|
|
18
18
|
props: {
|
|
19
19
|
catalog: {}
|
|
20
20
|
},
|
|
21
21
|
setup(X) {
|
|
22
|
-
const
|
|
22
|
+
const S = X, {
|
|
23
23
|
t: d
|
|
24
|
-
} = ne(),
|
|
24
|
+
} = ne(), T = V(() => S.catalog.restaurants.length === 0 ? [{
|
|
25
25
|
name: "--",
|
|
26
26
|
usage: []
|
|
27
|
-
}] :
|
|
27
|
+
}] : S.catalog.restaurants), N = [{
|
|
28
28
|
accessorKey: "name",
|
|
29
29
|
header: () => o("div", {
|
|
30
30
|
class: "flex flex-col"
|
|
31
|
-
}, [o("p", null, [
|
|
31
|
+
}, [o("p", null, [S.catalog.name]), o("p", {
|
|
32
32
|
class: "text-fm-color-typo-secondary fm-typo-en-body-md-400"
|
|
33
|
-
}, [d("menu.catalog.usage.tax_calculation") + `: ${
|
|
33
|
+
}, [d("menu.catalog.usage.tax_calculation") + `: ${S.catalog.taxMode}`])]),
|
|
34
34
|
cell: ({
|
|
35
35
|
row: b
|
|
36
36
|
}) => o("div", {
|
|
@@ -47,7 +47,7 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
47
47
|
class: "w-full flex justify-between"
|
|
48
48
|
}, [o("p", null, [d("menu.catalog.usage.usage")]), o(Me, {
|
|
49
49
|
label: `${d("menu.catalog.usage.products", {
|
|
50
|
-
count:
|
|
50
|
+
count: S.catalog.totalProducts
|
|
51
51
|
})}`,
|
|
52
52
|
variant: "info",
|
|
53
53
|
class: "px-8 py-4"
|
|
@@ -68,10 +68,10 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
68
68
|
}];
|
|
69
69
|
return (b, C) => {
|
|
70
70
|
const E = y("FmTable");
|
|
71
|
-
return p(),
|
|
72
|
-
"column-defs":
|
|
73
|
-
"row-data":
|
|
74
|
-
"page-size":
|
|
71
|
+
return p(), D(E, {
|
|
72
|
+
"column-defs": N,
|
|
73
|
+
"row-data": T.value,
|
|
74
|
+
"page-size": T.value.length,
|
|
75
75
|
"hide-footer": !0,
|
|
76
76
|
"shrink-at": !1
|
|
77
77
|
}, null, 8, ["row-data", "page-size"]);
|
|
@@ -82,23 +82,23 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
82
82
|
class: "pl-32 space-x-8"
|
|
83
83
|
}, Le = { class: "pl-[60px] space-y-16" }, Re = { class: "space-x-16 flex items-center" }, $e = { class: "flex-1 space-y-4" }, Ie = { class: "fm-typo-en-body-lg-400" }, Be = { class: "fm-typo-en-body-md-400" }, Pe = { class: "flex gap-8 items-center justify-start" }, ze = /* @__PURE__ */ oe({
|
|
84
84
|
__name: "Form",
|
|
85
|
-
setup(X, { expose:
|
|
86
|
-
const d =
|
|
87
|
-
Se.isBoolean(i) ? d.value = i : d.value = !d.value, d.value && (u.value =
|
|
85
|
+
setup(X, { expose: S }) {
|
|
86
|
+
const d = B(!1), T = B(!1), N = (i, n) => {
|
|
87
|
+
Se.isBoolean(i) ? d.value = i : d.value = !d.value, d.value && (u.value = $.fromCatalog(
|
|
88
88
|
n ?? ue.generator.initMenuV4Catalog(),
|
|
89
89
|
b.value
|
|
90
90
|
));
|
|
91
|
-
}, b =
|
|
92
|
-
|
|
93
|
-
), Z =
|
|
91
|
+
}, b = V(() => C.version === F.F_MENU_VERSION.enum.v4), C = de(), E = ve(), m = pe(fe(_e())), u = B(
|
|
92
|
+
$.fromCatalog(ue.generator.initMenuV4Catalog(), b.value)
|
|
93
|
+
), Z = V(() => C.catalogs.map((i) => i.name)), A = V({
|
|
94
94
|
get: () => u.value.taxSetting,
|
|
95
95
|
set: (i) => {
|
|
96
96
|
u.value.taxSetting = i;
|
|
97
97
|
}
|
|
98
|
-
}), k =
|
|
98
|
+
}), k = V(() => {
|
|
99
99
|
var v, h;
|
|
100
100
|
if (!E.currentCountry.value) return [];
|
|
101
|
-
const i = ((v = u.value.taxSetting) == null ? void 0 : v.mode) ===
|
|
101
|
+
const i = ((v = u.value.taxSetting) == null ? void 0 : v.mode) === I.MANUAL ? ((h = u.value.taxSetting) == null ? void 0 : h.inclusive) ?? [] : [];
|
|
102
102
|
return ke.Country.getCountry(E.currentCountry.value).taxSystems.map((U) => {
|
|
103
103
|
const s = i.find((l) => l.systemCode === U.code);
|
|
104
104
|
return {
|
|
@@ -108,7 +108,7 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
108
108
|
});
|
|
109
109
|
});
|
|
110
110
|
function Y(i) {
|
|
111
|
-
const n = u.value.taxSetting, v = n.mode ===
|
|
111
|
+
const n = u.value.taxSetting, v = n.mode === I.AUTO ? $.manualTax(k.value) : ee(n);
|
|
112
112
|
v.inclusive ?? (v.inclusive = []);
|
|
113
113
|
const h = v.inclusive.findIndex((U) => U.systemCode === i.systemCode);
|
|
114
114
|
h < 0 ? v.inclusive.push(i) : v.inclusive.splice(h, 1, i), A.value = v;
|
|
@@ -122,10 +122,10 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
122
122
|
n.markupOptions && (n.markupOptions.splice(i, 1), u.value = n);
|
|
123
123
|
}
|
|
124
124
|
async function H() {
|
|
125
|
-
|
|
125
|
+
T.value = !0;
|
|
126
126
|
const i = {
|
|
127
127
|
...u.value,
|
|
128
|
-
|
|
128
|
+
...$.toCatalog(u.value)
|
|
129
129
|
};
|
|
130
130
|
try {
|
|
131
131
|
await m.updateMenu(
|
|
@@ -137,15 +137,15 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
137
137
|
i.name
|
|
138
138
|
), d.value = !1;
|
|
139
139
|
} finally {
|
|
140
|
-
|
|
140
|
+
T.value = !1;
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
const { t: r } = ne();
|
|
144
|
-
return
|
|
145
|
-
const v = y("fm-text-field"), h = y("fm-radio"), U = y("fm-radio-group"), s = y("fm-checkbox"), l = y("fm-switch"), t = y("fm-select"), x = y("fm-button"),
|
|
144
|
+
return S({ trigger: N }), (i, n) => {
|
|
145
|
+
const v = y("fm-text-field"), h = y("fm-radio"), U = y("fm-radio-group"), s = y("fm-checkbox"), l = y("fm-switch"), t = y("fm-select"), x = y("fm-button"), L = y("fm-chip"), O = y("fm-card"), R = y("fm-side-sheet");
|
|
146
146
|
return p(), M(P, null, [
|
|
147
|
-
ye(i.$slots, "default", { trigger:
|
|
148
|
-
o(
|
|
147
|
+
ye(i.$slots, "default", { trigger: N }),
|
|
148
|
+
o(R, {
|
|
149
149
|
modelValue: d.value,
|
|
150
150
|
"onUpdate:modelValue": n[8] || (n[8] = (a) => d.value = a),
|
|
151
151
|
"is-container": e(te).FmForm,
|
|
@@ -158,7 +158,7 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
158
158
|
"side-sheet-footer": g(() => [
|
|
159
159
|
f("div", Pe, [
|
|
160
160
|
o(x, {
|
|
161
|
-
loading:
|
|
161
|
+
loading: T.value,
|
|
162
162
|
label: e(r)("menu.common.actions.add"),
|
|
163
163
|
size: "lg",
|
|
164
164
|
type: "submit",
|
|
@@ -197,25 +197,25 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
197
197
|
o(U, {
|
|
198
198
|
"model-value": (a = u.value.taxSetting) == null ? void 0 : a.mode,
|
|
199
199
|
"onUpdate:modelValue": n[1] || (n[1] = (c) => {
|
|
200
|
-
c === e(
|
|
200
|
+
c === e(I).AUTO ? A.value = e($).autoTax() : A.value = e($).manualTax(k.value);
|
|
201
201
|
})
|
|
202
202
|
}, {
|
|
203
203
|
default: g(() => [
|
|
204
204
|
o(h, {
|
|
205
|
-
value: e(
|
|
205
|
+
value: e(I).AUTO,
|
|
206
206
|
label: e(r)("menu.catalog.form.tax.auto.label"),
|
|
207
207
|
sublabel: e(r)("menu.catalog.form.tax.auto.sublabel")
|
|
208
208
|
}, null, 8, ["value", "label", "sublabel"]),
|
|
209
209
|
o(h, {
|
|
210
|
-
value: e(
|
|
210
|
+
value: e(I).MANUAL,
|
|
211
211
|
label: e(r)("menu.catalog.form.tax.manual.label"),
|
|
212
212
|
sublabel: e(r)("menu.catalog.form.tax.manual.sublabel")
|
|
213
213
|
}, null, 8, ["value", "label", "sublabel"])
|
|
214
214
|
]),
|
|
215
215
|
_: 1
|
|
216
216
|
}, 8, ["model-value"]),
|
|
217
|
-
((_ = u.value.taxSetting) == null ? void 0 : _.mode) === e(
|
|
218
|
-
(p(!0), M(P, null, q(k.value, (c) => (p(),
|
|
217
|
+
((_ = u.value.taxSetting) == null ? void 0 : _.mode) === e(I).MANUAL ? (p(), M("div", Ne, [
|
|
218
|
+
(p(!0), M(P, null, q(k.value, (c) => (p(), D(s, {
|
|
219
219
|
key: c.systemCode,
|
|
220
220
|
"model-value": c.inclusive,
|
|
221
221
|
value: !0,
|
|
@@ -235,7 +235,7 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
235
235
|
]),
|
|
236
236
|
_: 1
|
|
237
237
|
}, 8, ["title"]),
|
|
238
|
-
b.value ? (p(),
|
|
238
|
+
b.value ? (p(), D(ae, {
|
|
239
239
|
key: 0,
|
|
240
240
|
label: e(r)("menu.catalog.form.link.title")
|
|
241
241
|
}, {
|
|
@@ -247,7 +247,7 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
247
247
|
sublabel: e(r)("menu.catalog.form.link.auto_link.sublabel"),
|
|
248
248
|
"onUpdate:modelValue": n[2] || (n[2] = (a) => u.value.orderFrom = a ? e(F.F_ORDER_FROM).enum.ALL : e(F.F_ORDER_FROM).enum.NONE)
|
|
249
249
|
}, null, 8, ["model-value", "label", "sublabel"]),
|
|
250
|
-
u.value.orderFrom !== e(F.F_ORDER_FROM).enum.NONE ? (p(),
|
|
250
|
+
u.value.orderFrom !== e(F.F_ORDER_FROM).enum.NONE ? (p(), D(t, {
|
|
251
251
|
key: 0,
|
|
252
252
|
class: "ml-[60px]",
|
|
253
253
|
items: [
|
|
@@ -266,7 +266,7 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
266
266
|
]),
|
|
267
267
|
_: 1
|
|
268
268
|
}, 8, ["label"])) : K("", !0),
|
|
269
|
-
b.value ? (p(),
|
|
269
|
+
b.value ? (p(), D(ae, {
|
|
270
270
|
key: 1,
|
|
271
271
|
label: e(r)("menu.catalog.form.markup.title")
|
|
272
272
|
}, {
|
|
@@ -297,7 +297,7 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
297
297
|
]),
|
|
298
298
|
_: 1
|
|
299
299
|
}, 8, ["categories", "items"]),
|
|
300
|
-
(p(!0), M(P, null, q(u.value.markupOptions, (a, _) => (p(),
|
|
300
|
+
(p(!0), M(P, null, q(u.value.markupOptions, (a, _) => (p(), D(ce, {
|
|
301
301
|
key: _,
|
|
302
302
|
categories: e(C).categories,
|
|
303
303
|
items: e(C).items,
|
|
@@ -315,14 +315,14 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
315
315
|
default: g(() => [
|
|
316
316
|
f("div", Re, [
|
|
317
317
|
f("div", $e, [
|
|
318
|
-
o(
|
|
318
|
+
o(L, { class: "text-fm-color-typo-info bg-fm-color-system-info-100 font-semibold" }, {
|
|
319
319
|
default: g(() => [
|
|
320
|
-
be(
|
|
320
|
+
be(w(e(r)("menu.catalog.form.markup.percentage", { value: a.percentage })), 1)
|
|
321
321
|
]),
|
|
322
322
|
_: 2
|
|
323
323
|
}, 1024),
|
|
324
|
-
f("p", Ie,
|
|
325
|
-
f("p", Be,
|
|
324
|
+
f("p", Ie, w(e(r)("menu.catalog.form.markup.config", { number: _ + 1 })), 1),
|
|
325
|
+
f("p", Be, w(a.includeItems ? e(r)("menu.catalog.form.markup.products", {
|
|
326
326
|
count: a.includeItems.length
|
|
327
327
|
}) : e(r)("menu.catalog.form.markup.all_items")), 1)
|
|
328
328
|
]),
|
|
@@ -385,12 +385,12 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
385
385
|
}, le = "main", ya = /* @__PURE__ */ oe({
|
|
386
386
|
__name: "Catalog",
|
|
387
387
|
setup(X) {
|
|
388
|
-
const
|
|
388
|
+
const S = ve(), d = de(), T = _e(), N = fe(T), b = he(), C = pe(N), E = Ce(), {
|
|
389
389
|
t: m
|
|
390
390
|
} = ne();
|
|
391
391
|
function u(s, l) {
|
|
392
|
-
var O,
|
|
393
|
-
const t =
|
|
392
|
+
var O, R, a, _;
|
|
393
|
+
const t = S.restaurants.value.find(({
|
|
394
394
|
_id: c
|
|
395
395
|
}) => c === l._id), x = [...l.linkedDeliveryCatalogs.map((c) => ({
|
|
396
396
|
label: `Delivery (${c.name})`,
|
|
@@ -400,7 +400,7 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
400
400
|
selector: (O = t == null ? void 0 : t.foodpandaDelivery) == null ? void 0 : O.catalogId
|
|
401
401
|
}, {
|
|
402
402
|
label: "Delivery (GrabFood integration)",
|
|
403
|
-
selector: (
|
|
403
|
+
selector: (R = t == null ? void 0 : t.grabfoodDelivery) == null ? void 0 : R.catalogId
|
|
404
404
|
}, {
|
|
405
405
|
label: "Delivery (ShopeeFood integration)",
|
|
406
406
|
selector: (a = t == null ? void 0 : t.shopeefoodDelivery) == null ? void 0 : a.catalogId
|
|
@@ -434,7 +434,7 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
434
434
|
usage: u(s, l)
|
|
435
435
|
})).filter((l) => l.usage.length > 0);
|
|
436
436
|
}
|
|
437
|
-
const A =
|
|
437
|
+
const A = B(!1), k = B(""), Y = V(() => {
|
|
438
438
|
var l;
|
|
439
439
|
return [{
|
|
440
440
|
id: le,
|
|
@@ -452,7 +452,7 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
452
452
|
defaultOrderFrom: t.defaultOrderFrom
|
|
453
453
|
}))].map((t) => {
|
|
454
454
|
var O;
|
|
455
|
-
const x = Z(((O = t.doc) == null ? void 0 : O._id) || null),
|
|
455
|
+
const x = Z(((O = t.doc) == null ? void 0 : O._id) || null), L = t.doc ? Ee.getSellingItem(t.doc, d.state.menu) : d.state.menu.modules.item;
|
|
456
456
|
return {
|
|
457
457
|
...t,
|
|
458
458
|
taxMode: t.taxes ? "Manual" : "Automatic",
|
|
@@ -460,18 +460,18 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
460
460
|
restaurants: re(x, {
|
|
461
461
|
selector: "name"
|
|
462
462
|
}),
|
|
463
|
-
totalProducts:
|
|
463
|
+
totalProducts: L.length,
|
|
464
464
|
disableDelete: t.disableDelete
|
|
465
465
|
};
|
|
466
466
|
});
|
|
467
|
-
}), z =
|
|
467
|
+
}), z = V(() => Y.value.filter((s) => s.id !== le)), G = V(() => z.value.filter((s) => s.name.toLowerCase().includes(k.value.toLowerCase()))), H = (s) => {
|
|
468
468
|
d.selectCatalog(s === le ? null : s), E.push({
|
|
469
469
|
name: ie.EDIT_CATALOG_PRODUCT,
|
|
470
470
|
params: {
|
|
471
471
|
id: s
|
|
472
472
|
}
|
|
473
473
|
});
|
|
474
|
-
}, r =
|
|
474
|
+
}, r = B(null);
|
|
475
475
|
function i(s) {
|
|
476
476
|
var l;
|
|
477
477
|
(l = r.value) == null || l.trigger(null, {
|
|
@@ -481,7 +481,7 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
481
481
|
}
|
|
482
482
|
async function n(s) {
|
|
483
483
|
const l = d.state.restaurants.filter((t) => [...t.additionalCatalogs, t.inHouseDelivery, ...t.linkedDeliveryCatalogs.map((x) => x.catalog), t.pickupCatalog, t.takeawayCatalog, t.catalogId].includes(s.id)).map((t) => t.name);
|
|
484
|
-
l.length > 0 ?
|
|
484
|
+
l.length > 0 ? T.open({
|
|
485
485
|
type: "error",
|
|
486
486
|
message: m("menu.catalog.dialogs.remove.error", {
|
|
487
487
|
restaurants: l
|
|
@@ -510,7 +510,7 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
510
510
|
});
|
|
511
511
|
});
|
|
512
512
|
}
|
|
513
|
-
const v =
|
|
513
|
+
const v = V(() => [{
|
|
514
514
|
accessorKey: "name",
|
|
515
515
|
header: () => m("menu.catalog.table.columns.title"),
|
|
516
516
|
enableSorting: !1
|
|
@@ -558,13 +558,13 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
558
558
|
}, ["stop", "prevent"])
|
|
559
559
|
})]);
|
|
560
560
|
}
|
|
561
|
-
}]), h = Oe(), U =
|
|
561
|
+
}]), h = Oe(), U = V(() => h.breakpoints.value.xs);
|
|
562
562
|
return (s, l) => {
|
|
563
|
-
const t = y("fm-button"), x = y("FmSearch"),
|
|
564
|
-
return p(),
|
|
563
|
+
const t = y("fm-button"), x = y("FmSearch"), L = y("FmTable"), O = y("FmButton"), R = y("fm-side-sheet");
|
|
564
|
+
return p(), D(Ue, {
|
|
565
565
|
heading: e(m)("menu.catalog.title")
|
|
566
566
|
}, {
|
|
567
|
-
"append-heading": g(() => [z.value.length > 0 ? (p(),
|
|
567
|
+
"append-heading": g(() => [z.value.length > 0 ? (p(), D(e(me), {
|
|
568
568
|
key: 0,
|
|
569
569
|
ref_key: "createCatalogManagerFormRef",
|
|
570
570
|
ref: r
|
|
@@ -584,7 +584,7 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
584
584
|
}, null, 8, ["label", "onClick"])])]),
|
|
585
585
|
_: 1
|
|
586
586
|
}, 512)) : K("", !0)]),
|
|
587
|
-
default: g(() => [z.value.length === 0 ? (p(),
|
|
587
|
+
default: g(() => [z.value.length === 0 ? (p(), D(e(Te), {
|
|
588
588
|
key: 0,
|
|
589
589
|
subtitle: e(m)("menu.catalog.empty.subtitle"),
|
|
590
590
|
title: e(m)("menu.catalog.empty.title")
|
|
@@ -614,7 +614,7 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
614
614
|
key: a.id,
|
|
615
615
|
class: "flex flex-row py-12 px-16 items-center",
|
|
616
616
|
onClick: (_) => H(a.id)
|
|
617
|
-
}, [f("div", qe, [f("p", Qe, " Tax calculation: " +
|
|
617
|
+
}, [f("div", qe, [f("p", Qe, " Tax calculation: " + w(a.taxMode), 1), f("p", Xe, " Auto link product: " + w(a.autoLink), 1), f("p", Ze, w(a.name), 1)]), f("div", ea, [o(O, {
|
|
618
618
|
"text-color": e(Q).NeutralGray400,
|
|
619
619
|
variant: e(j).Tertiary,
|
|
620
620
|
"prepend-icon": "file_copy",
|
|
@@ -633,7 +633,7 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
633
633
|
type: e(m)("menu.catalog.title")
|
|
634
634
|
})
|
|
635
635
|
}, null, 8, ["modelValue", "placeholder"])])]), o(Fe, null, {
|
|
636
|
-
default: g(() => [o(
|
|
636
|
+
default: g(() => [o(L, {
|
|
637
637
|
"column-defs": v.value,
|
|
638
638
|
"row-data": G.value,
|
|
639
639
|
"page-size": G.value.length,
|
|
@@ -643,14 +643,14 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
643
643
|
onRowClick: l[2] || (l[2] = (a) => H(a.original.id))
|
|
644
644
|
}, null, 8, ["column-defs", "row-data", "page-size", "search-value"])]),
|
|
645
645
|
_: 1
|
|
646
|
-
})])), o(
|
|
646
|
+
})])), o(R, {
|
|
647
647
|
modelValue: A.value,
|
|
648
648
|
"onUpdate:modelValue": l[4] || (l[4] = (a) => A.value = a),
|
|
649
649
|
"max-width": 1e3,
|
|
650
650
|
"dismiss-away": ""
|
|
651
651
|
}, {
|
|
652
|
-
"side-sheet-header": g(() => [f("p", aa,
|
|
653
|
-
default: g(() => [f("div", la, [(p(!0), M(P, null, q(Y.value, (a, _) => (p(),
|
|
652
|
+
"side-sheet-header": g(() => [f("p", aa, w(e(m)("menu.catalog.usage.title")), 1)]),
|
|
653
|
+
default: g(() => [f("div", la, [(p(!0), M(P, null, q(Y.value, (a, _) => (p(), D(Ae, {
|
|
654
654
|
key: _,
|
|
655
655
|
catalog: a
|
|
656
656
|
}, null, 8, ["catalog"]))), 128))])]),
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent as S, computed as k, ref as C, resolveComponent as w, createElementBlock as _, openBlock as u, createElementVNode as i, createVNode as g, unref as n, withCtx as K, Fragment as P, renderList as U, toDisplayString as E, createBlock as V } from "vue";
|
|
2
2
|
import { useI18n as L } from "@feedmepos/mf-common";
|
|
3
3
|
import { useSnackbar as M, useBreakpoints as $, useDialog as I } from "@feedmepos/ui-library";
|
|
4
|
-
import { D as F, u as Y, X as j, O as D, J as A, G } from "./menu-
|
|
5
|
-
import { _ as J } from "./app-
|
|
6
|
-
import { u as O } from "./menu-
|
|
4
|
+
import { D as F, u as Y, X as j, O as D, J as A, G } from "./menu-Cj3d6im1.js";
|
|
5
|
+
import { _ as J } from "./app-Do8sOqMh.js";
|
|
6
|
+
import { u as O } from "./menu-S1W5eNCT.js";
|
|
7
7
|
import { _ as R } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
|
|
8
|
-
import { u as X } from "./category-
|
|
8
|
+
import { u as X } from "./category-CKujA-NM.js";
|
|
9
9
|
const q = {
|
|
10
10
|
key: 0
|
|
11
11
|
}, H = {
|
|
@@ -2,18 +2,18 @@ import { defineComponent as A, ref as F, computed as B, watch as se, resolveComp
|
|
|
2
2
|
import { useI18n as j } from "@feedmepos/mf-common";
|
|
3
3
|
import { useSnackbar as Y, components as R, useDialog as ee, FmButtonVariant as X, useBreakpoints as de, FmButtonColorThemeVariant as me } from "@feedmepos/ui-library";
|
|
4
4
|
import { _ as pe } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
5
|
-
import { D as G, u as ge, Z as fe, X as _e, G as K, a3 as ye, O as q, J as te } from "./menu-
|
|
5
|
+
import { D as G, u as ge, Z as fe, X as _e, G as K, a3 as ye, O as q, J as te } from "./menu-Cj3d6im1.js";
|
|
6
6
|
import { _ as ve } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
7
|
-
import { _ as he } from "./app-
|
|
7
|
+
import { _ as he } from "./app-Do8sOqMh.js";
|
|
8
8
|
import { c as be } from "./createForm-BoUQeZTd.js";
|
|
9
9
|
import { _ as Z } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
|
|
10
10
|
import { u as xe } from "./discardConfirm-BHni0LNu.js";
|
|
11
11
|
import { c as H } from "./object-DVUNCr7w.js";
|
|
12
12
|
import { r as Ce } from "./rules-CIWTZQfh.js";
|
|
13
|
-
import { u as J, a as ke } from "./menu-
|
|
13
|
+
import { u as J, a as ke } from "./menu-S1W5eNCT.js";
|
|
14
14
|
import { c as we } from "./check-C9mY6LiX.js";
|
|
15
|
-
import { u as Fe } from "./item-
|
|
16
|
-
import { u as oe } from "./category-
|
|
15
|
+
import { u as Fe } from "./item-DqdhjOW8.js";
|
|
16
|
+
import { u as oe } from "./category-CKujA-NM.js";
|
|
17
17
|
import { _ as Ve } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
|
|
18
18
|
const $e = {
|
|
19
19
|
class: "fm-typo-en-title-md-600"
|
|
@@ -2,12 +2,12 @@ import { defineComponent as ae, ref as w, computed as V, resolveComponent as x,
|
|
|
2
2
|
import { useI18n as se } from "@feedmepos/mf-common";
|
|
3
3
|
import { components as ue, useSnackbar as be, useDialog as ye } from "@feedmepos/ui-library";
|
|
4
4
|
import { _ as ke } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
5
|
-
import { _ as he } from "./app-
|
|
6
|
-
import { H as ee, I as me, J as re, G as oe, u as xe, O as Ce, D as we } from "./menu-
|
|
5
|
+
import { _ as he } from "./app-Do8sOqMh.js";
|
|
6
|
+
import { H as ee, I as me, J as re, G as oe, u as xe, O as Ce, D as we } from "./menu-Cj3d6im1.js";
|
|
7
7
|
import { d as Fe } from "./vuedraggable-CK8z7qA8.js";
|
|
8
8
|
import { _ as Z } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
|
|
9
9
|
import { u as pe } from "./discardConfirm-BHni0LNu.js";
|
|
10
|
-
import { L as Ve } from "./LinkProductSideSheet-
|
|
10
|
+
import { L as Ve } from "./LinkProductSideSheet-BJlrPykg.js";
|
|
11
11
|
import { _ as Se } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
|
|
12
12
|
import { _ as Ie } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
13
13
|
const $e = { class: "flex items-center gap-8" }, Oe = { class: "grow" }, Ee = { class: "space-y-32" }, Ke = { class: "flex bg-fm-color-neutral-gray-100 border-b border-b-fm-color-neutral-gray-200" }, De = { class: "px-16 py-8 w-[40%]" }, Le = { class: "px-16 py-8 grow" }, Ne = { class: "px-16 py-8 w-[40%]" }, Ge = { class: "px-16 py-8 grow" }, Ue = { class: "space-y-16" }, Te = { class: "flex flex-wrap gap-8 overflow-hidden mb-8" }, Be = { class: "flex gap-8 items-center justify-start" }, Me = /* @__PURE__ */ ae({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as S, computed as o, createBlock as v, openBlock as t, unref as c, withCtx as g, renderSlot as B, ref as A, resolveComponent as I, createElementBlock as a, createElementVNode as m, createCommentVNode as b, Fragment as f, renderList as C, toDisplayString as d, withModifiers as F } from "vue";
|
|
2
2
|
import { useI18n as V } from "@feedmepos/mf-common";
|
|
3
3
|
import { _ as M } from "./MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js";
|
|
4
|
-
import { u as D } from "./menu-
|
|
4
|
+
import { u as D } from "./menu-Cj3d6im1.js";
|
|
5
5
|
import { useBreakpoints as E } from "@feedmepos/ui-library";
|
|
6
6
|
import { _ as y } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
|
|
7
7
|
const X = /* @__PURE__ */ S({
|
|
@@ -2,9 +2,9 @@ import { defineComponent as m, ref as p, createBlock as i, openBlock as d, unref
|
|
|
2
2
|
import { useI18n as _ } from "@feedmepos/mf-common";
|
|
3
3
|
import { _ as f } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
4
4
|
import { _ as g } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
5
|
-
import { _ as y } from "./Group.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import { A as b } from "./item-
|
|
7
|
-
import { a as h } from "./menu-
|
|
5
|
+
import { _ as y } from "./Group.vue_vue_type_script_setup_true_lang-CyW8Gh6c.js";
|
|
6
|
+
import { A as b } from "./item-DqdhjOW8.js";
|
|
7
|
+
import { a as h } from "./menu-S1W5eNCT.js";
|
|
8
8
|
const v = { class: "flex-1 flex justify-between gap-8 pl-8" }, x = { class: "flex items-center" }, k = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, C = { class: "fm-typo-en-body-md-600 font-semibold" }, j = /* @__PURE__ */ m({
|
|
9
9
|
__name: "Group",
|
|
10
10
|
setup(N) {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { defineComponent as X, computed as g, resolveComponent as M, createBlock as U, openBlock as m, withCtx as x, createElementBlock as C, Fragment as T, renderList as oe, createElementVNode as p, normalizeClass as W, toDisplayString as G, createVNode as s, ref as E, renderSlot as Ne, unref as r, createCommentVNode as I, watch as Re, h as de, mergeProps as Ee, createSlots as Se, withModifiers as Ie, isRef as Q, nextTick as fe } from "vue";
|
|
2
|
-
import { I as H, u as ne, O as Ue, D as Te, G as v, B as $e, A as Ye, J as Le } from "./menu-
|
|
2
|
+
import { I as H, u as ne, O as Ue, D as Te, G as v, B as $e, A as Ye, J as Le } from "./menu-Cj3d6im1.js";
|
|
3
3
|
import { d as ze } from "./vuedraggable-CK8z7qA8.js";
|
|
4
4
|
import { b as ve, H as je } from "./LinkProductSideSheet.vue_vue_type_style_index_0_scoped_97fa9d58_lang-DvG3mOom.js";
|
|
5
5
|
import { useI18n as le, useCoreStore as Be, useCustomAttributes as Ke } from "@feedmepos/mf-common";
|
|
6
6
|
import { useBreakpoints as ye, components as _e, useSnackbar as He, useDialog as qe, FmButtonVariant as Je } from "@feedmepos/ui-library";
|
|
7
|
-
import { _ as Qe, a as We } from "./CustomAttributeChip.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { _ as Xe } from "./app-
|
|
7
|
+
import { _ as Qe, a as We } from "./CustomAttributeChip.vue_vue_type_script_setup_true_lang-CcKt1abw.js";
|
|
8
|
+
import { _ as Xe } from "./app-Do8sOqMh.js";
|
|
9
9
|
import { _ as Ze, a as et } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js";
|
|
10
10
|
import { c as tt } from "./object-DVUNCr7w.js";
|
|
11
11
|
import { u as ot } from "./discardConfirm-BHni0LNu.js";
|
|
12
|
-
import { _ as nt } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-
|
|
12
|
+
import { _ as nt } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-cUYW6sW5.js";
|
|
13
13
|
import { c as lt } from "./check-C9mY6LiX.js";
|
|
14
14
|
import { _ as at } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
|
|
15
|
-
import { M as ge, x as rt, y as ut, A as st, e as it, j as ct, r as mt } from "./item-
|
|
15
|
+
import { M as ge, x as rt, y as ut, A as st, e as it, j as ct, r as mt } from "./item-DqdhjOW8.js";
|
|
16
16
|
import { u as pt } from "./search-BAPEUu1R.js";
|
|
17
|
-
import { C as dt } from "./catalog-
|
|
18
|
-
import { c as ft } from "./menuV2-
|
|
17
|
+
import { C as dt } from "./catalog-BL6h_DDN.js";
|
|
18
|
+
import { c as ft } from "./menuV2-K6oaeFE4.js";
|
|
19
19
|
const vt = /* @__PURE__ */ X({
|
|
20
20
|
__name: "ResponsiveContextMenu",
|
|
21
21
|
props: {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent as B, useModel as G, computed as A, resolveComponent as p, createBlock as S, openBlock as v, ref as I, watch as H, withCtx as _, createElementBlock as C, createElementVNode as M, Fragment as z, renderList as Y, createVNode as u, unref as e, createCommentVNode as U, withModifiers as q, onMounted as Z, renderSlot as ee, toDisplayString as D, createTextVNode as le } from "vue";
|
|
2
2
|
import { useI18n as L, EMPTY_RULE as x, isEmptyMongoQuery as te, isEmptyRule as h, useCustomAttributes as ae, useCoreStore as oe } from "@feedmepos/mf-common";
|
|
3
|
-
import { a as J, L as re } from "./LinkProductSideSheet-
|
|
4
|
-
import { u as w } from "./priceTier-
|
|
3
|
+
import { a as J, L as re } from "./LinkProductSideSheet-BJlrPykg.js";
|
|
4
|
+
import { u as w } from "./priceTier-Cnci8Hf5.js";
|
|
5
5
|
import { x as ue, N as ne, b as ie } from "./LinkProductSideSheet.vue_vue_type_style_index_0_scoped_97fa9d58_lang-DvG3mOom.js";
|
|
6
6
|
import { FmButtonVariant as K, useDialog as se, components as me, FmButtonColorThemeVariant as j } from "@feedmepos/ui-library";
|
|
7
7
|
import { _ as de } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
|
|
8
|
-
import { L as y } from "./catalogSetting-
|
|
8
|
+
import { L as y } from "./catalogSetting-DEabwfXZ.js";
|
|
9
9
|
import { c as O } from "./check-C9mY6LiX.js";
|
|
10
|
-
import { u as pe, H as Q, aj as ce } from "./menu-
|
|
10
|
+
import { u as pe, H as Q, aj as ce } from "./menu-Cj3d6im1.js";
|
|
11
11
|
import { c as ve } from "./string-DpfFixWH.js";
|
|
12
12
|
const fe = /* @__PURE__ */ B({
|
|
13
13
|
__name: "LinkPriceTier",
|