@feedmepos/mf-menu 0.31.33 → 0.31.34-alpha
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-DNDOc3bV.js → App-CaKDbV0S.js} +6 -6
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-BvrfcWHU.js → ApplyProduct.vue_vue_type_script_setup_true_lang-gY18sRMg.js} +20 -20
- package/dist/{Catalog-Zhi-3W6T.js → Catalog-B0zMoi7e.js} +80 -80
- package/dist/{Category-BU0bkAGd.js → Category-Dyou6Q17.js} +31 -27
- package/dist/{Category-CE9ixFkD.js → Category-rMN8037Q.js} +19 -19
- package/dist/{CookingGuide-eghVaeEY.js → CookingGuide-DT2XxaWa.js} +4 -4
- package/dist/CustomAttributeChip.vue_vue_type_script_setup_true_lang-Cv9LNAfi.js +113 -0
- package/dist/{Group-DWrtP9Au.js → Group-CYSIOe3D.js} +1 -1
- package/dist/{Group-DDZPf6LY.js → Group-M4WPAAYz.js} +3 -3
- package/dist/Group.vue_vue_type_script_setup_true_lang-B-BH-2WN.js +686 -0
- package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-TQWka93A.js +367 -0
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Cus0YKUt.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-DgSO7SQW.js} +4982 -5081
- package/dist/{Ingredient-BJgvOyV9.js → Ingredient-DNvr30pW.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CF99abLi.js → InventoryBinding.vue_vue_type_script_setup_true_lang-G44luws0.js} +1052 -1052
- package/dist/LinkProductSideSheet-Cp0HFoP2.js +297 -0
- package/dist/LinkProductSideSheet.vue_vue_type_style_index_0_scoped_97fa9d58_lang-DvG3mOom.js +8024 -0
- package/dist/{MenuSetting-gkwORUX0.js → MenuSetting-UeQ2NyVm.js} +4 -4
- package/dist/{PrintRoute-Cda6sFlL.js → PrintRoute-5uX9ymJY.js} +89 -88
- package/dist/{Product-61AAh5L-.js → Product-Dxqf8_iq.js} +1 -1
- package/dist/Product.vue_vue_type_script_setup_true_lang-DUtGVRCH.js +1578 -0
- package/dist/{ProductInternalTools-o8cVZXCT.js → ProductInternalTools-BCF9q0i_.js} +5 -5
- package/dist/Products--adhOQ8n.js +283 -0
- package/dist/{Publish-BRgJUzoA.js → Publish-CRaoaFxc.js} +3 -3
- package/dist/{Recipe-CV8lvryp.js → Recipe-DPkzZMJi.js} +4 -4
- package/dist/{Scheduler-B_ptvb82.js → Scheduler-BuwjNHHj.js} +3 -3
- package/dist/{ServingSequence-DABGnLbT.js → ServingSequence-Cdf_Zmat.js} +3 -3
- package/dist/Setting-Vr3Thttm.js +259 -0
- package/dist/{Subcategory-BiqlAvMs.js → Subcategory-DoXmjcg1.js} +4 -4
- package/dist/{Takeaway-BBdkzEiP.js → Takeaway-BRTQu8VT.js} +1 -1
- package/dist/{Takeaway-nIjrDu5C.js → Takeaway-t3il54Bd.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-D_M2PFO-.js → Takeaway.vue_vue_type_script_setup_true_lang-DtHABSgp.js} +6 -6
- package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-D_ACNj_Z.js +431 -0
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DAoGiRV-.js +5990 -0
- package/dist/{Unit-Di5sUbhV.js → Unit-C_QY3IX_.js} +2 -2
- package/dist/{Variant-CiZCtZk9.js → Variant-CR4IEm-Q.js} +3 -3
- package/dist/_id_-DOU7ieGB.js +202 -0
- package/dist/{app-B63V5b4I.js → app--fRC3N4C.js} +1 -1
- package/dist/{app-DuD_IPou.js → app-CrXLAKdw.js} +95 -97
- package/dist/app.js +6 -7
- package/dist/apps/mf-menu/src/app.d.ts +62 -3
- package/dist/apps/mf-menu/src/components/feature/PriceTier/LinkPriceTierSection.vue.d.ts +24 -0
- package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierRuleEditor.vue.d.ts +30 -0
- package/dist/apps/mf-menu/src/components/feature/RestaurantAttributesSelector.vue.d.ts +33 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/catalog.d.ts +2 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +80 -1
- package/dist/apps/mf-menu/src/composable/linkProducts.d.ts +1276 -0
- package/dist/apps/mf-menu/src/helper/import-export.d.ts +77 -0
- package/dist/apps/mf-menu/src/helper/menu.d.ts +77 -0
- package/dist/apps/mf-menu/src/helper/setting/catalogSetting.d.ts +11 -2
- package/dist/apps/mf-menu/src/manager/menu/item.d.ts +77 -0
- package/dist/apps/mf-menu/src/router/shared.d.ts +0 -1
- package/dist/apps/mf-menu/src/stores/manager/catalog.d.ts +2 -0
- package/dist/apps/mf-menu/src/stores/menu.d.ts +79 -0
- package/dist/apps/mf-menu/src/types/linkProducts.d.ts +21 -0
- package/dist/apps/mf-menu/src/views/PrintRoute/PrintDepartmentDialog.vue.d.ts +5 -3
- package/dist/apps/mf-menu/src/views/Publish/UpdateCatalogDialog.vue.d.ts +82 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/linked-status-BTF_dm9R.js +24 -0
- package/dist/assets/override-menu-BPu7TVCy.js +24 -0
- package/dist/assets/validate-menu-BQpDfHbr.js +24 -0
- package/dist/{catalog-DfYSMjLc.js → catalog-BGiDWODL.js} +1 -1
- package/dist/catalogSetting-C34kIcYn.js +71 -0
- package/dist/{category-mmjX_QdF.js → category-CayMSpUc.js} +1 -1
- package/dist/{currency-3ugQtBPt.js → currency-BggoZpJv.js} +1 -1
- package/dist/{dayjs.min-CkV4mNm8.js → dayjs.min-BKDTLohL.js} +1 -1
- package/dist/{index-Cztb2LVZ.js → index-BPcRbiW0.js} +3 -3
- package/dist/{index-BboaHtmY.js → index-CLFhXi0y.js} +3 -3
- package/dist/index-D7yR1j9C.js +215 -0
- package/dist/{index-BZaKuDcN.js → index-f9kzXNPD.js} +28 -28
- package/dist/{item-CVnDeXhJ.js → item-C51o9ejv.js} +547 -545
- package/dist/{jszip.min-GxfcHBC5.js → jszip.min-m57vowh9.js} +353 -353
- package/dist/{menu-sGVv4bhQ.js → menu-DHfLxvzU.js} +4 -4
- package/dist/menu-DK7wG3S5.js +133287 -0
- package/dist/menuV2-B-0V65cx.js +707 -0
- package/dist/mf-menu.css +1 -1
- package/dist/{priceTier-CHTA0ZEb.js → priceTier-DD-24pkj.js} +1 -1
- package/dist/{scheduler-CaMxCHZ0.js → scheduler-NjDv_P4c.js} +16 -17
- package/dist/subcategory-DLdBwjHV.js +148 -0
- package/dist/{toExcel-WorodvP1.js → toExcel-coJ5igRV.js} +15 -15
- package/dist/{unit-DtKZZYL6.js → unit-C7XUV0EW.js} +5 -4
- package/package.json +5 -5
- package/dist/CustomAttributeChip.vue_vue_type_script_setup_true_lang-BiF8rW4M.js +0 -7949
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js +0 -26
- package/dist/Group.vue_vue_type_script_setup_true_lang-DyqGsRAW.js +0 -698
- package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BmRUg94d.js +0 -206
- package/dist/LinkProductSideSheet-CTT4oGUY.js +0 -112
- package/dist/Product.vue_vue_type_script_setup_true_lang-Cy4uok1E.js +0 -1560
- package/dist/Products-D0rrANT6.js +0 -270
- package/dist/Setting-3ISlMXOA.js +0 -258
- package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-DzQ8_6Bi.js +0 -71
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-y0n5hTLk.js +0 -6149
- package/dist/_id_-DY8himeL.js +0 -200
- package/dist/apps/mf-menu/src/components/feature/LinkProduct/LinkProductSideSheet.vue.d.ts +0 -70
- package/dist/assets/linked-status-CkBKnMXs.js +0 -24
- package/dist/assets/override-menu-XZ7XfcfS.js +0 -24
- package/dist/assets/validate-menu-Bomogq01.js +0 -24
- package/dist/catalogSetting-_4Z0s3_Q.js +0 -65
- package/dist/index-Ce4v8o7D.js +0 -106
- package/dist/menu-IGORh0Ik.js +0 -108039
- package/dist/subcategory-CmVttqlG.js +0 -817
- /package/dist/{apps/mf-menu/src/components → packages/shared/src/components/info}/CustomAttributeChip.vue.d.ts +0 -0
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as oe, computed as T, resolveComponent as y, createBlock as
|
|
1
|
+
import { defineComponent as oe, computed as T, resolveComponent as y, createBlock as V, openBlock as p, createVNode as o, ref as w, 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 N, 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
|
|
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-DK7wG3S5.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-CrXLAKdw.js";
|
|
7
7
|
import { _ as Me } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
|
|
8
|
-
import {
|
|
8
|
+
import { a as ae } from "./LinkProductSideSheet-Cp0HFoP2.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-TQWka93A.js";
|
|
11
11
|
import { c as Se } from "./check-C9mY6LiX.js";
|
|
12
|
-
import { C as I, a as
|
|
12
|
+
import { C as I, a as B } from "./catalogSetting-C34kIcYn.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-BGiDWODL.js";
|
|
16
16
|
const Ae = /* @__PURE__ */ oe({
|
|
17
17
|
__name: "CatalogUsageTable",
|
|
18
18
|
props: {
|
|
@@ -68,7 +68,7 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
68
68
|
}];
|
|
69
69
|
return (b, C) => {
|
|
70
70
|
const E = y("FmTable");
|
|
71
|
-
return p(),
|
|
71
|
+
return p(), V(E, {
|
|
72
72
|
"column-defs": L,
|
|
73
73
|
"row-data": S.value,
|
|
74
74
|
"page-size": S.value.length,
|
|
@@ -80,7 +80,7 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
80
80
|
}), we = { class: "space-y-32" }, Ne = {
|
|
81
81
|
key: 0,
|
|
82
82
|
class: "pl-32 space-x-8"
|
|
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" },
|
|
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
85
|
setup(X, { expose: D }) {
|
|
86
86
|
const d = w(!1), S = w(!1), L = (i, n) => {
|
|
@@ -88,17 +88,17 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
88
88
|
n ?? ue.generator.initMenuV4Catalog(),
|
|
89
89
|
b.value
|
|
90
90
|
));
|
|
91
|
-
}, b = T(() => C.version ===
|
|
91
|
+
}, b = T(() => C.version === F.F_MENU_VERSION.enum.v4), C = de(), E = ve(), m = pe(fe(_e())), u = w(
|
|
92
92
|
I.fromCatalog(ue.generator.initMenuV4Catalog(), b.value)
|
|
93
93
|
), Z = T(() => C.catalogs.map((i) => i.name)), A = T({
|
|
94
94
|
get: () => u.value.taxSetting,
|
|
95
95
|
set: (i) => {
|
|
96
96
|
u.value.taxSetting = i;
|
|
97
97
|
}
|
|
98
|
-
}),
|
|
99
|
-
var v,
|
|
98
|
+
}), k = T(() => {
|
|
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) === B.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,16 +108,16 @@ 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 === B.AUTO ? I.manualTax(k.value) : ee(n);
|
|
112
112
|
v.inclusive ?? (v.inclusive = []);
|
|
113
|
-
const
|
|
114
|
-
|
|
113
|
+
const h = v.inclusive.findIndex((U) => U.systemCode === i.systemCode);
|
|
114
|
+
h < 0 ? v.inclusive.push(i) : v.inclusive.splice(h, 1, i), A.value = v;
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function z(i, n) {
|
|
117
117
|
const v = ee(u.value);
|
|
118
118
|
v.markupOptions && (v.markupOptions[i] = n, u.value = v);
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function G(i) {
|
|
121
121
|
const n = ee(u.value);
|
|
122
122
|
n.markupOptions && (n.markupOptions.splice(i, 1), u.value = n);
|
|
123
123
|
}
|
|
@@ -130,7 +130,7 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
130
130
|
try {
|
|
131
131
|
await m.updateMenu(
|
|
132
132
|
{
|
|
133
|
-
module:
|
|
133
|
+
module: F.F_MENU_MODULE_V4_KEY.enum.catalog,
|
|
134
134
|
operation: ge.F_OPERATION_TYPE.create,
|
|
135
135
|
data: i
|
|
136
136
|
},
|
|
@@ -142,8 +142,8 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
142
142
|
}
|
|
143
143
|
const { t: r } = ne();
|
|
144
144
|
return D({ trigger: L }), (i, n) => {
|
|
145
|
-
const v = y("fm-text-field"),
|
|
146
|
-
return p(),
|
|
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"), R = y("fm-chip"), O = y("fm-card"), $ = y("fm-side-sheet");
|
|
146
|
+
return p(), M(P, null, [
|
|
147
147
|
ye(i.$slots, "default", { trigger: L }),
|
|
148
148
|
o($, {
|
|
149
149
|
modelValue: d.value,
|
|
@@ -156,7 +156,7 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
156
156
|
"max-width": 560
|
|
157
157
|
}, {
|
|
158
158
|
"side-sheet-footer": g(() => [
|
|
159
|
-
f("div",
|
|
159
|
+
f("div", Pe, [
|
|
160
160
|
o(x, {
|
|
161
161
|
loading: S.value,
|
|
162
162
|
label: e(r)("menu.common.actions.add"),
|
|
@@ -197,26 +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(B).AUTO ? A.value = e(I).autoTax() : A.value = e(I).manualTax(k.value);
|
|
201
201
|
})
|
|
202
202
|
}, {
|
|
203
203
|
default: g(() => [
|
|
204
|
-
o(
|
|
205
|
-
value: e(
|
|
204
|
+
o(h, {
|
|
205
|
+
value: e(B).AUTO,
|
|
206
206
|
label: e(r)("menu.catalog.form.tax.auto.label"),
|
|
207
|
-
sublabel: e(r)("menu.catalog.form.tax.auto.sublabel")
|
|
208
|
-
class: "pl-4"
|
|
207
|
+
sublabel: e(r)("menu.catalog.form.tax.auto.sublabel")
|
|
209
208
|
}, null, 8, ["value", "label", "sublabel"]),
|
|
210
|
-
o(
|
|
211
|
-
value: e(
|
|
209
|
+
o(h, {
|
|
210
|
+
value: e(B).MANUAL,
|
|
212
211
|
label: e(r)("menu.catalog.form.tax.manual.label"),
|
|
213
212
|
sublabel: e(r)("menu.catalog.form.tax.manual.sublabel")
|
|
214
213
|
}, null, 8, ["value", "label", "sublabel"])
|
|
215
214
|
]),
|
|
216
215
|
_: 1
|
|
217
216
|
}, 8, ["model-value"]),
|
|
218
|
-
((_ = u.value.taxSetting) == null ? void 0 : _.mode) === e(
|
|
219
|
-
(p(!0),
|
|
217
|
+
((_ = u.value.taxSetting) == null ? void 0 : _.mode) === e(B).MANUAL ? (p(), M("div", Ne, [
|
|
218
|
+
(p(!0), M(P, null, q(k.value, (c) => (p(), V(s, {
|
|
220
219
|
key: c.systemCode,
|
|
221
220
|
"model-value": c.inclusive,
|
|
222
221
|
value: !0,
|
|
@@ -228,7 +227,7 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
228
227
|
});
|
|
229
228
|
}
|
|
230
229
|
}, null, 8, ["model-value", "label", "onUpdate:modelValue"]))), 128))
|
|
231
|
-
])) :
|
|
230
|
+
])) : K("", !0)
|
|
232
231
|
];
|
|
233
232
|
}),
|
|
234
233
|
_: 1
|
|
@@ -236,38 +235,38 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
236
235
|
]),
|
|
237
236
|
_: 1
|
|
238
237
|
}, 8, ["title"]),
|
|
239
|
-
b.value ? (p(),
|
|
238
|
+
b.value ? (p(), V(ae, {
|
|
240
239
|
key: 0,
|
|
241
240
|
label: e(r)("menu.catalog.form.link.title")
|
|
242
241
|
}, {
|
|
243
242
|
default: g(() => [
|
|
244
243
|
o(l, {
|
|
245
|
-
"model-value": u.value.orderFrom && u.value.orderFrom !== e(
|
|
244
|
+
"model-value": u.value.orderFrom && u.value.orderFrom !== e(F.F_ORDER_FROM).enum.NONE,
|
|
246
245
|
label: e(r)("menu.catalog.form.link.auto_link.label"),
|
|
247
246
|
"label-placement": "right",
|
|
248
247
|
sublabel: e(r)("menu.catalog.form.link.auto_link.sublabel"),
|
|
249
|
-
"onUpdate:modelValue": n[2] || (n[2] = (a) => u.value.orderFrom = a ? e(
|
|
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)
|
|
250
249
|
}, null, 8, ["model-value", "label", "sublabel"]),
|
|
251
|
-
u.value.orderFrom !== e(
|
|
250
|
+
u.value.orderFrom !== e(F.F_ORDER_FROM).enum.NONE ? (p(), V(t, {
|
|
252
251
|
key: 0,
|
|
253
252
|
class: "ml-[60px]",
|
|
254
253
|
items: [
|
|
255
254
|
{
|
|
256
255
|
label: e(r)("menu.catalog.form.link.options.all"),
|
|
257
|
-
value: e(
|
|
256
|
+
value: e(F.F_ORDER_FROM).enum.ALL
|
|
258
257
|
},
|
|
259
258
|
{
|
|
260
259
|
label: e(r)("menu.catalog.form.link.options.pos_only"),
|
|
261
|
-
value: e(
|
|
260
|
+
value: e(F.F_ORDER_FROM).enum.POS_ONLY
|
|
262
261
|
}
|
|
263
262
|
],
|
|
264
263
|
"model-value": u.value.orderFrom,
|
|
265
264
|
"onUpdate:modelValue": n[3] || (n[3] = (a) => u.value.orderFrom = a)
|
|
266
|
-
}, null, 8, ["items", "model-value"])) :
|
|
265
|
+
}, null, 8, ["items", "model-value"])) : K("", !0)
|
|
267
266
|
]),
|
|
268
267
|
_: 1
|
|
269
|
-
}, 8, ["label"])) :
|
|
270
|
-
b.value ? (p(),
|
|
268
|
+
}, 8, ["label"])) : K("", !0),
|
|
269
|
+
b.value ? (p(), V(ae, {
|
|
271
270
|
key: 1,
|
|
272
271
|
label: e(r)("menu.catalog.form.markup.title")
|
|
273
272
|
}, {
|
|
@@ -298,16 +297,16 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
298
297
|
]),
|
|
299
298
|
_: 1
|
|
300
299
|
}, 8, ["categories", "items"]),
|
|
301
|
-
(p(!0),
|
|
300
|
+
(p(!0), M(P, null, q(u.value.markupOptions, (a, _) => (p(), V(ce, {
|
|
302
301
|
key: _,
|
|
303
302
|
categories: e(C).categories,
|
|
304
303
|
items: e(C).items,
|
|
305
304
|
"model-value": a,
|
|
306
305
|
action: "update",
|
|
307
|
-
"onUpdate:modelValue": (c) => c &&
|
|
306
|
+
"onUpdate:modelValue": (c) => c && z(_, c)
|
|
308
307
|
}, {
|
|
309
308
|
default: g(({ trigger: c }) => [
|
|
310
|
-
o(
|
|
309
|
+
o(O, {
|
|
311
310
|
id: JSON.stringify(a),
|
|
312
311
|
class: "py-12 px-16 cursor-pointer",
|
|
313
312
|
variant: "outlined",
|
|
@@ -323,14 +322,14 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
323
322
|
_: 2
|
|
324
323
|
}, 1024),
|
|
325
324
|
f("p", Ie, N(e(r)("menu.catalog.form.markup.config", { number: _ + 1 })), 1),
|
|
326
|
-
f("p",
|
|
325
|
+
f("p", Be, N(a.includeItems ? e(r)("menu.catalog.form.markup.products", {
|
|
327
326
|
count: a.includeItems.length
|
|
328
327
|
}) : e(r)("menu.catalog.form.markup.all_items")), 1)
|
|
329
328
|
]),
|
|
330
329
|
o(x, {
|
|
331
330
|
variant: e(j).Tertiary,
|
|
332
331
|
"prepend-icon": "delete",
|
|
333
|
-
onClick: (se) =>
|
|
332
|
+
onClick: (se) => G(_)
|
|
334
333
|
}, null, 8, ["variant", "onClick"])
|
|
335
334
|
])
|
|
336
335
|
]),
|
|
@@ -342,12 +341,13 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
342
341
|
])
|
|
343
342
|
]),
|
|
344
343
|
_: 1
|
|
345
|
-
}, 8, ["label"])) :
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
"
|
|
349
|
-
"
|
|
350
|
-
|
|
344
|
+
}, 8, ["label"])) : K("", !0),
|
|
345
|
+
o(De, {
|
|
346
|
+
modelValue: u.value,
|
|
347
|
+
"onUpdate:modelValue": n[6] || (n[6] = (a) => u.value = a),
|
|
348
|
+
"is-main-catalog": !1,
|
|
349
|
+
"is-v4": b.value
|
|
350
|
+
}, null, 8, ["modelValue", "is-v4"])
|
|
351
351
|
])
|
|
352
352
|
]),
|
|
353
353
|
_: 1
|
|
@@ -389,7 +389,7 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
389
389
|
t: m
|
|
390
390
|
} = ne();
|
|
391
391
|
function u(s, l) {
|
|
392
|
-
var
|
|
392
|
+
var O, $, a, _;
|
|
393
393
|
const t = D.restaurants.value.find(({
|
|
394
394
|
_id: c
|
|
395
395
|
}) => c === l._id), x = [...l.linkedDeliveryCatalogs.map((c) => ({
|
|
@@ -397,7 +397,7 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
397
397
|
selector: c.catalog
|
|
398
398
|
})), {
|
|
399
399
|
label: "Delivery (FoodPanda integration)",
|
|
400
|
-
selector: (
|
|
400
|
+
selector: (O = t == null ? void 0 : t.foodpandaDelivery) == null ? void 0 : O.catalogId
|
|
401
401
|
}, {
|
|
402
402
|
label: "Delivery (GrabFood integration)",
|
|
403
403
|
selector: ($ = t == null ? void 0 : t.grabfoodDelivery) == null ? void 0 : $.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 = w(!1),
|
|
437
|
+
const A = w(!1), k = w(""), Y = T(() => {
|
|
438
438
|
var l;
|
|
439
439
|
return [{
|
|
440
440
|
id: le,
|
|
@@ -451,12 +451,12 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
451
451
|
disableDelete: !1,
|
|
452
452
|
defaultOrderFrom: t.defaultOrderFrom
|
|
453
453
|
}))].map((t) => {
|
|
454
|
-
var
|
|
455
|
-
const x = Z(((
|
|
454
|
+
var O;
|
|
455
|
+
const x = Z(((O = t.doc) == null ? void 0 : O._id) || null), R = 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",
|
|
459
|
-
autoLink: t.defaultOrderFrom !==
|
|
459
|
+
autoLink: t.defaultOrderFrom !== F.F_ORDER_FROM.enum.NONE ? "Activated" : "Deactivated",
|
|
460
460
|
restaurants: re(x, {
|
|
461
461
|
selector: "name"
|
|
462
462
|
}),
|
|
@@ -464,7 +464,7 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
464
464
|
disableDelete: t.disableDelete
|
|
465
465
|
};
|
|
466
466
|
});
|
|
467
|
-
}),
|
|
467
|
+
}), z = T(() => Y.value.filter((s) => s.id !== le)), G = T(() => 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: {
|
|
@@ -502,7 +502,7 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
502
502
|
}
|
|
503
503
|
}).onPrimary(async () => {
|
|
504
504
|
await C.updateMenu({
|
|
505
|
-
module:
|
|
505
|
+
module: F.F_MENU_MODULE_V4_KEY.enum.catalog,
|
|
506
506
|
operation: ge.F_OPERATION_TYPE.delete,
|
|
507
507
|
data: s.id
|
|
508
508
|
}, s.name, !0), d.selectCatalog(null), await E.push({
|
|
@@ -558,13 +558,13 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
558
558
|
}, ["stop", "prevent"])
|
|
559
559
|
})]);
|
|
560
560
|
}
|
|
561
|
-
}]),
|
|
561
|
+
}]), h = Oe(), U = T(() => h.breakpoints.value.xs);
|
|
562
562
|
return (s, l) => {
|
|
563
|
-
const t = y("fm-button"), x = y("FmSearch"), R = y("FmTable"),
|
|
564
|
-
return p(),
|
|
563
|
+
const t = y("fm-button"), x = y("FmSearch"), R = y("FmTable"), O = y("FmButton"), $ = y("fm-side-sheet");
|
|
564
|
+
return p(), V(Ue, {
|
|
565
565
|
heading: e(m)("menu.catalog.title")
|
|
566
566
|
}, {
|
|
567
|
-
"append-heading": g(() => [
|
|
567
|
+
"append-heading": g(() => [z.value.length > 0 ? (p(), V(e(me), {
|
|
568
568
|
key: 0,
|
|
569
569
|
ref_key: "createCatalogManagerFormRef",
|
|
570
570
|
ref: r
|
|
@@ -583,8 +583,8 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
583
583
|
onClick: a
|
|
584
584
|
}, null, 8, ["label", "onClick"])])]),
|
|
585
585
|
_: 1
|
|
586
|
-
}, 512)) :
|
|
587
|
-
default: g(() => [
|
|
586
|
+
}, 512)) : K("", !0)]),
|
|
587
|
+
default: g(() => [z.value.length === 0 ? (p(), V(e(Te), {
|
|
588
588
|
key: 0,
|
|
589
589
|
subtitle: e(m)("menu.catalog.empty.subtitle"),
|
|
590
590
|
title: e(m)("menu.catalog.empty.title")
|
|
@@ -600,33 +600,33 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
600
600
|
_: 1
|
|
601
601
|
})]),
|
|
602
602
|
_: 1
|
|
603
|
-
}, 8, ["subtitle", "title"])) : (p(),
|
|
603
|
+
}, 8, ["subtitle", "title"])) : (p(), M(P, {
|
|
604
604
|
key: 1
|
|
605
|
-
}, [U.value ? (p(),
|
|
605
|
+
}, [U.value ? (p(), M("div", Ye, [f("div", He, [o(x, {
|
|
606
606
|
autofocus: "",
|
|
607
|
-
modelValue:
|
|
608
|
-
"onUpdate:modelValue": l[3] || (l[3] = (a) =>
|
|
607
|
+
modelValue: k.value,
|
|
608
|
+
"onUpdate:modelValue": l[3] || (l[3] = (a) => k.value = a),
|
|
609
609
|
class: "w-full",
|
|
610
610
|
placeholder: e(m)("menu.common.labels.search_placeholder", {
|
|
611
611
|
type: e(m)("menu.catalog.title")
|
|
612
612
|
})
|
|
613
|
-
}, null, 8, ["modelValue", "placeholder"])]), f("div", Je, [(p(!0),
|
|
613
|
+
}, null, 8, ["modelValue", "placeholder"])]), f("div", Je, [(p(!0), M(P, null, q(G.value, (a) => (p(), M("div", {
|
|
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: " + N(a.taxMode), 1), f("p", Xe, " Auto link product: " + N(a.autoLink), 1), f("p", Ze, N(a.name), 1)]), f("div", ea, [o(
|
|
617
|
+
}, [f("div", qe, [f("p", Qe, " Tax calculation: " + N(a.taxMode), 1), f("p", Xe, " Auto link product: " + N(a.autoLink), 1), f("p", Ze, N(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",
|
|
621
621
|
onClick: W((_) => i(a), ["stop"])
|
|
622
|
-
}, null, 8, ["text-color", "variant", "onClick"]), o(
|
|
622
|
+
}, null, 8, ["text-color", "variant", "onClick"]), o(O, {
|
|
623
623
|
"text-color": e(Q).NeutralGray400,
|
|
624
624
|
variant: e(j).Tertiary,
|
|
625
625
|
"prepend-icon": "delete",
|
|
626
626
|
onClick: W((_) => n(a), ["stop"])
|
|
627
|
-
}, null, 8, ["text-color", "variant", "onClick"])])], 8, We))), 128))])])) : (p(),
|
|
628
|
-
modelValue:
|
|
629
|
-
"onUpdate:modelValue": l[1] || (l[1] = (a) =>
|
|
627
|
+
}, null, 8, ["text-color", "variant", "onClick"])])], 8, We))), 128))])])) : (p(), M("div", Ge, [f("div", Ke, [f("div", je, [o(x, {
|
|
628
|
+
modelValue: k.value,
|
|
629
|
+
"onUpdate:modelValue": l[1] || (l[1] = (a) => k.value = a),
|
|
630
630
|
autofocus: "",
|
|
631
631
|
class: "mb-8",
|
|
632
632
|
placeholder: e(m)("menu.common.labels.search_placeholder", {
|
|
@@ -635,11 +635,11 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
635
635
|
}, null, 8, ["modelValue", "placeholder"])])]), o(Fe, null, {
|
|
636
636
|
default: g(() => [o(R, {
|
|
637
637
|
"column-defs": v.value,
|
|
638
|
-
"row-data":
|
|
639
|
-
"page-size":
|
|
638
|
+
"row-data": G.value,
|
|
639
|
+
"page-size": G.value.length,
|
|
640
640
|
"hide-footer": !0,
|
|
641
641
|
"shrink-at": !1,
|
|
642
|
-
"search-value":
|
|
642
|
+
"search-value": k.value,
|
|
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
|
|
@@ -650,7 +650,7 @@ const Ae = /* @__PURE__ */ oe({
|
|
|
650
650
|
"dismiss-away": ""
|
|
651
651
|
}, {
|
|
652
652
|
"side-sheet-header": g(() => [f("p", aa, N(e(m)("menu.catalog.usage.title")), 1)]),
|
|
653
|
-
default: g(() => [f("div", la, [(p(!0),
|
|
653
|
+
default: g(() => [f("div", la, [(p(!0), M(P, null, q(Y.value, (a, _) => (p(), V(Ae, {
|
|
654
654
|
key: _,
|
|
655
655
|
catalog: a
|
|
656
656
|
}, null, 8, ["catalog"]))), 128))])]),
|
|
@@ -1,18 +1,18 @@
|
|
|
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
|
-
import { useSnackbar as M, useBreakpoints as
|
|
4
|
-
import { D as F, u as
|
|
5
|
-
import { _ as J } from "./app-
|
|
6
|
-
import { u as O } from "./menu-
|
|
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-DK7wG3S5.js";
|
|
5
|
+
import { _ as J } from "./app-CrXLAKdw.js";
|
|
6
|
+
import { u as O } from "./menu-DHfLxvzU.js";
|
|
7
7
|
import { _ as R } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
|
|
8
|
-
import { u as
|
|
9
|
-
const
|
|
8
|
+
import { u as X } from "./category-CayMSpUc.js";
|
|
9
|
+
const q = {
|
|
10
10
|
key: 0
|
|
11
|
-
},
|
|
11
|
+
}, H = {
|
|
12
12
|
class: "flex justify-end items-center"
|
|
13
|
-
},
|
|
13
|
+
}, Q = {
|
|
14
14
|
class: "w-[320px]"
|
|
15
|
-
},
|
|
15
|
+
}, W = {
|
|
16
16
|
key: 1,
|
|
17
17
|
class: "flex-1 flex flex-col min-h-0"
|
|
18
18
|
}, Z = {
|
|
@@ -28,20 +28,20 @@ const H = {
|
|
|
28
28
|
}, ne = /* @__PURE__ */ S({
|
|
29
29
|
__name: "CategoryTable",
|
|
30
30
|
setup(T) {
|
|
31
|
-
const f = M(), y = F(f), h = D(y), p =
|
|
31
|
+
const f = M(), y = F(f), h = D(y), p = Y(), {
|
|
32
32
|
categories: v
|
|
33
33
|
} = O(), b = k(() => {
|
|
34
|
-
var
|
|
35
|
-
const
|
|
34
|
+
var r, t;
|
|
35
|
+
const l = ((t = (r = p.currentCatalog) == null ? void 0 : r.override) == null ? void 0 : t.category) ?? {}, o = v.value.map((e, c) => {
|
|
36
36
|
var m;
|
|
37
37
|
return {
|
|
38
38
|
...e,
|
|
39
39
|
// Addon should be at the end of the list
|
|
40
|
-
position: e.id ? ((m =
|
|
40
|
+
position: e.id ? ((m = l[e.id]) == null ? void 0 : m.position) ?? c + 1 : null
|
|
41
41
|
};
|
|
42
42
|
});
|
|
43
43
|
return j(o, (e) => e.name);
|
|
44
|
-
}), a = C(""), d = k(() => b.value.filter((
|
|
44
|
+
}), a = C(""), d = k(() => b.value.filter((l) => l.name.toLowerCase().includes(a.value.toLowerCase()))), {
|
|
45
45
|
t: s
|
|
46
46
|
} = L(), x = C([{
|
|
47
47
|
accessorKey: "name",
|
|
@@ -55,27 +55,27 @@ const H = {
|
|
|
55
55
|
header: () => s("menu.category.columns.products"),
|
|
56
56
|
enableSorting: !1,
|
|
57
57
|
size: 200,
|
|
58
|
-
cell: (
|
|
59
|
-
const o =
|
|
58
|
+
cell: (l) => {
|
|
59
|
+
const o = l.row.original;
|
|
60
60
|
return s(o.items.length > 1 ? "menu.common.labels.product_linked_plural" : "menu.common.labels.product_linked_singular", {
|
|
61
61
|
count: o.items.length
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
}]);
|
|
65
|
-
async function B(
|
|
65
|
+
async function B(l) {
|
|
66
66
|
var e;
|
|
67
67
|
const o = p.currentCatalog;
|
|
68
68
|
if (!o)
|
|
69
69
|
return;
|
|
70
70
|
const {
|
|
71
|
-
updateMenu:
|
|
71
|
+
updateMenu: r
|
|
72
72
|
} = h, t = ((e = o.override) == null ? void 0 : e.category) ?? {};
|
|
73
|
-
|
|
73
|
+
l.forEach((c, m) => {
|
|
74
74
|
c.id && (t != null && t[c.id] ? t[c.id].position = m + 1 : t[c.id] = {
|
|
75
75
|
position: m + 1,
|
|
76
76
|
_id: c.id
|
|
77
77
|
});
|
|
78
|
-
}), await
|
|
78
|
+
}), await r({
|
|
79
79
|
module: G.F_MENU_MODULE_V4_KEY.enum.catalog,
|
|
80
80
|
operation: A.F_OPERATION_TYPE.update,
|
|
81
81
|
data: {
|
|
@@ -87,10 +87,10 @@ const H = {
|
|
|
87
87
|
}
|
|
88
88
|
}, "Category");
|
|
89
89
|
}
|
|
90
|
-
const N =
|
|
91
|
-
return (
|
|
92
|
-
const
|
|
93
|
-
return z.value ? (u(), _("div",
|
|
90
|
+
const N = $(), z = k(() => N.breakpoints.value.xs);
|
|
91
|
+
return (l, o) => {
|
|
92
|
+
const r = w("FmSearch"), t = w("FmTable");
|
|
93
|
+
return z.value ? (u(), _("div", W, [i("div", Z, [g(r, {
|
|
94
94
|
autofocus: "",
|
|
95
95
|
modelValue: a.value,
|
|
96
96
|
"onUpdate:modelValue": o[1] || (o[1] = (e) => a.value = e),
|
|
@@ -103,7 +103,7 @@ const H = {
|
|
|
103
103
|
class: "flex flex-row py-12 px-16"
|
|
104
104
|
}, [i("div", oe, [i("p", te, E(e.name), 1), i("p", ae, E(n(s)(e.items.length > 1 ? "menu.common.labels.product_linked_plural" : "menu.common.labels.product_linked_singular", {
|
|
105
105
|
count: e.items.length
|
|
106
|
-
})), 1)])]))), 128))])])) : (u(), _("div",
|
|
106
|
+
})), 1)])]))), 128))])])) : (u(), _("div", q, [i("div", H, [i("div", Q, [g(r, {
|
|
107
107
|
modelValue: a.value,
|
|
108
108
|
"onUpdate:modelValue": o[0] || (o[0] = (e) => a.value = e),
|
|
109
109
|
autofocus: "",
|
|
@@ -130,12 +130,16 @@ const H = {
|
|
|
130
130
|
}), pe = /* @__PURE__ */ S({
|
|
131
131
|
__name: "Category",
|
|
132
132
|
setup(T) {
|
|
133
|
-
const f =
|
|
133
|
+
const f = I(), y = M(), h = F(y), p = D(h), v = X({ dialog: f, menuLoader: p }), { categories: b } = O(), { t: a } = L();
|
|
134
134
|
function d() {
|
|
135
135
|
v.create();
|
|
136
136
|
}
|
|
137
|
-
return (s, x) => n(b).length > 0 ? (u(), V(ne, {
|
|
137
|
+
return (s, x) => n(b).length > 0 ? (u(), V(ne, {
|
|
138
|
+
key: 0,
|
|
139
|
+
class: "pt-16"
|
|
140
|
+
})) : (u(), V(n(R), {
|
|
138
141
|
key: 1,
|
|
142
|
+
class: "pt-16",
|
|
139
143
|
action: {
|
|
140
144
|
text: n(a)("menu.category.add"),
|
|
141
145
|
callback: d
|