@feedmepos/mf-menu 0.31.33-beta.1 → 0.31.33-beta.6
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-B4rnpCXN.js → App-Dt6RQiUh.js} +6 -6
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-LtwWMoPW.js → ApplyProduct.vue_vue_type_script_setup_true_lang-B_SQpWg7.js} +2 -2
- package/dist/{Catalog-Cd7J8de0.js → Catalog-CFx7t_Nu.js} +79 -79
- package/dist/{Category-p8UUDEiv.js → Category-CPMx86rY.js} +23 -19
- package/dist/{Category-D3WDm9Fe.js → Category-OjK-v--G.js} +5 -5
- package/dist/{CookingGuide-hFtxmtGj.js → CookingGuide-ANnXKBjc.js} +3 -3
- package/dist/CustomAttributeChip.vue_vue_type_script_setup_true_lang-D-1OzZ-i.js +113 -0
- package/dist/{Group-Bv0dyi8v.js → Group--DJjkGab.js} +1 -1
- package/dist/{Group-BTrqZgFd.js → Group-K4925_bP.js} +3 -3
- package/dist/Group.vue_vue_type_script_setup_true_lang-36O78xv0.js +684 -0
- package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BIX-gPUO.js +372 -0
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CxPaVLVu.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-C-z1m3jh.js} +13987 -13378
- package/dist/{Ingredient-BCostN4Y.js → Ingredient-G4Txx6_0.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-MAqpI7ZD.js → InventoryBinding.vue_vue_type_script_setup_true_lang-HgHBlflo.js} +2 -2
- package/dist/{LinkProductSideSheet-abzVzmo3.js → LinkProductSideSheet-CWNarCEs.js} +1 -1
- package/dist/{MenuSetting-TfAo82-E.js → MenuSetting-Cx-EHG-6.js} +4 -4
- package/dist/{PrintRoute-B43rP5A9.js → PrintRoute-IxHGvGzF.js} +3 -3
- package/dist/{Product-C7cYyDHH.js → Product-D1gqn5J6.js} +1 -1
- package/dist/Product.vue_vue_type_script_setup_true_lang-BCQd-ks4.js +1641 -0
- package/dist/{ProductInternalTools-CkswVuAF.js → ProductInternalTools-GJ2OE5gU.js} +5 -5
- package/dist/Products-DJqgSe-Y.js +270 -0
- package/dist/{Publish-DIKqaH2f.js → Publish-C86rd413.js} +3 -3
- package/dist/{Recipe-_ApT00c_.js → Recipe-BbQKou9p.js} +4 -4
- package/dist/{Scheduler-DWY1kKHO.js → Scheduler-DUeTkyGQ.js} +3 -3
- package/dist/{ServingSequence-Z1S9zOTO.js → ServingSequence-BROo5rC_.js} +3 -3
- package/dist/Setting-D-ueTlwO.js +259 -0
- package/dist/{Subcategory-Lqq6XHz2.js → Subcategory-DVewA8HX.js} +4 -4
- package/dist/{Takeaway-DiGzrarg.js → Takeaway-B4lDGQDh.js} +4 -4
- package/dist/{Takeaway-DGvM9SBP.js → Takeaway-DyPjHuCl.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BfWy217t.js → Takeaway.vue_vue_type_script_setup_true_lang-BTDlzYuX.js} +6 -6
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B2wC_Mf0.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B5BAKDRP.js} +642 -642
- package/dist/{Unit-D11rRFAf.js → Unit-CVF0dom4.js} +2 -2
- package/dist/{Variant-LaKYPxDe.js → Variant-DmccAgFU.js} +3 -3
- package/dist/_id_-CWtK62Fy.js +178 -0
- package/dist/{app-C5UXrJGj.js → app-CV_q8OdE.js} +75 -75
- package/dist/{app-Br9mC24D.js → app-ClinzawZ.js} +1 -1
- package/dist/app-DvG3mOom.js +8024 -0
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +60 -1
- package/dist/apps/mf-menu/src/components/feature/AttributesSelector.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/components/feature/LinkProduct/LinkProductUnifiedSideSheet.vue.d.ts +12 -0
- 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/TreeEditor/store/menuV2.d.ts +77 -0
- package/dist/apps/mf-menu/src/composable/customAttributes.d.ts +88 -0
- package/dist/apps/mf-menu/src/helper/{menuImport.d.ts → import-export.d.ts} +204 -3
- 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/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/views/Publish/UpdateCatalogDialog.vue.d.ts +82 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/linked-status-fZD691Js.js +24 -0
- package/dist/assets/override-menu-Cjy1BJuz.js +24 -0
- package/dist/assets/validate-menu-uwysUwDP.js +24 -0
- package/dist/{catalog-BDyG_i9q.js → catalog-Wx88K6iI.js} +1 -1
- package/dist/catalogSetting-DTEHDSAd.js +71 -0
- package/dist/{category-Bi6gpIYU.js → category-BRTw76Vf.js} +1 -1
- package/dist/{currency-DDseyYg1.js → currency-562bPc2l.js} +1 -1
- package/dist/customAttributes-CXzd5ud1.js +33 -0
- package/dist/{dayjs.min-DoQgN0KD.js → dayjs.min-Cnfm8bQm.js} +1 -1
- package/dist/{index-DxrEwDTr.js → index-4hf9vONw.js} +2 -2
- package/dist/{index-C-zLHAG1.js → index-Crs_eZ0i.js} +28 -28
- package/dist/{index-DTUmry92.js → index-DJXrJdeQ.js} +3 -3
- package/dist/{item-DqXzPUy9.js → item-CuIxc9FT.js} +377 -377
- package/dist/{jszip.min-iAC5WNVU.js → jszip.min-C9xLIvo4.js} +245 -245
- package/dist/menu-ILWxqJQe.js +133263 -0
- package/dist/{menu-D6df9rcz.js → menu-Mkzv9c8C.js} +4 -4
- package/dist/{priceTier-C56BYecC.js → priceTier-D4joq_kN.js} +1 -1
- package/dist/{scheduler-DCSpt65t.js → scheduler-DuxWoNVb.js} +3 -3
- package/dist/{subcategory-CydaPy_X.js → subcategory-CLLMagXY.js} +43 -43
- package/dist/{toExcel-Bil8CwJs.js → toExcel-hGfpS_Uo.js} +2 -2
- package/dist/{unit-8DyuBx-X.js → unit-9fycj1fu.js} +1 -1
- package/package.json +4 -4
- package/dist/CustomAttributeChip.vue_vue_type_script_setup_true_lang-Cf17Iy5i.js +0 -7949
- package/dist/Group.vue_vue_type_script_setup_true_lang-vk1J9IxK.js +0 -698
- package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-B1wrLnf6.js +0 -206
- package/dist/Product.vue_vue_type_script_setup_true_lang-BOq8wMzq.js +0 -1560
- package/dist/Products-C7BtAjhB.js +0 -659
- package/dist/Setting-Bfuf26Gc.js +0 -258
- package/dist/_id_-Q_Tyhr4U.js +0 -200
- package/dist/apps/mf-menu/src/helper/import-export-utils.d.ts +0 -123
- package/dist/apps/mf-menu/src/helper/menuExport.d.ts +0 -32
- package/dist/assets/linked-status-BhGrXd73.js +0 -24
- package/dist/assets/override-menu-CUNDHOWA.js +0 -24
- package/dist/assets/validate-menu-BqOizHsX.js +0 -24
- package/dist/catalogSetting-C33p_dck.js +0 -65
- package/dist/menu-Cir-22ei.js +0 -108039
package/dist/Setting-Bfuf26Gc.js
DELETED
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
import { defineComponent as ue, computed as p, ref as P, watch as ie, watchEffect as re, resolveComponent as m, createElementBlock as M, openBlock as r, normalizeClass as J, createVNode as s, withCtx as c, createElementVNode as g, createBlock as v, createCommentVNode as f, unref as e, Fragment as $, renderList as H, createTextVNode as me, toDisplayString as N } from "vue";
|
|
2
|
-
import { u as ce, D as de, O as pe, G as _, A as ve, H as w } from "./menu-Cir-22ei.js";
|
|
3
|
-
import { useCoreStore as ge, useI18n as fe } from "@feedmepos/mf-common";
|
|
4
|
-
import { useSnackbar as _e, useDialog as be, FmButtonVariant as z, FmButtonColorThemeVariant as j, components as ye } from "@feedmepos/ui-library";
|
|
5
|
-
import { _ as E } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
|
|
6
|
-
import { _ as ke } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
|
|
7
|
-
import { _ as q, a as xe } from "./GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-B1wrLnf6.js";
|
|
8
|
-
import { C as b, a as x } from "./catalogSetting-C33p_dck.js";
|
|
9
|
-
import { C as G } from "./catalog-BDyG_i9q.js";
|
|
10
|
-
const Ce = {
|
|
11
|
-
class: /* @__PURE__ */ J(["overflow-scroll", "flex-1", "xs:px-16 xs:py-16"])
|
|
12
|
-
}, Oe = {
|
|
13
|
-
class: "space-y-32"
|
|
14
|
-
}, Se = {
|
|
15
|
-
key: 0,
|
|
16
|
-
class: "pl-32 space-x-8"
|
|
17
|
-
}, Me = {
|
|
18
|
-
class: "pl-[60px] space-y-16"
|
|
19
|
-
}, Fe = {
|
|
20
|
-
class: "space-x-16 flex items-center"
|
|
21
|
-
}, Ve = {
|
|
22
|
-
class: "flex-1 space-y-4"
|
|
23
|
-
}, he = {
|
|
24
|
-
class: "fm-typo-en-body-lg-400"
|
|
25
|
-
}, Re = {
|
|
26
|
-
class: "fm-typo-en-body-md-400"
|
|
27
|
-
}, Ue = {
|
|
28
|
-
class: "flex justify-end"
|
|
29
|
-
}, je = /* @__PURE__ */ ue({
|
|
30
|
-
__name: "Setting",
|
|
31
|
-
setup(Ne) {
|
|
32
|
-
const F = ge(), u = ce(), W = _e(), T = de(W), {
|
|
33
|
-
custom: we,
|
|
34
|
-
minor: Y
|
|
35
|
-
} = T, A = be(), {
|
|
36
|
-
t: o
|
|
37
|
-
} = fe(), C = p(() => u.currentCatalog);
|
|
38
|
-
p(() => new G(C.value, u, I, A));
|
|
39
|
-
const y = p(() => !C.value), S = p(() => u.version === _.F_MENU_VERSION.enum.v4), {
|
|
40
|
-
checkMenuIsLoading: Ee,
|
|
41
|
-
updateMenu: I
|
|
42
|
-
} = pe(T), l = P(b.initCatalogSetting()), K = p(() => u.catalogs.filter((t) => t._id !== u.state.currentCatalogId).map((t) => t.name)), Q = p(() => u.state.restaurants.filter((t) => [...t.additionalCatalogs, t.inHouseDelivery, ...t.linkedDeliveryCatalogs.map((n) => n.catalog), t.pickupCatalog, t.takeawayCatalog, t.catalogId].includes(u.state.currentCatalogId)).map((t) => t.name));
|
|
43
|
-
function L() {
|
|
44
|
-
return Q.value.length > 0 ? s("div", {
|
|
45
|
-
class: ["flex items-center", "bg-fm-color-system-warning-100", "rounded-lg", "py-16 px-24 space-x-8"]
|
|
46
|
-
}, [s(ye.FmIcon, {
|
|
47
|
-
color: "system-warning-300",
|
|
48
|
-
name: "warning"
|
|
49
|
-
}, null), s("p", {
|
|
50
|
-
class: "fm-typo-en-body-lg-400"
|
|
51
|
-
}, [o("menu.setting.catalog.warnings.delivery")])]) : null;
|
|
52
|
-
}
|
|
53
|
-
function D() {
|
|
54
|
-
const t = C.value;
|
|
55
|
-
l.value = t ? b.fromCatalog(t, S.value) : b.fromMainCatalog(u.state.menu.masterCatalogSetting);
|
|
56
|
-
}
|
|
57
|
-
ie(() => u.state.currentCatalogId, D), P(!1);
|
|
58
|
-
const V = p(() => {
|
|
59
|
-
if (!F.currentCountry.value) return [];
|
|
60
|
-
const t = l.value.taxSetting.mode === x.MANUAL ? l.value.taxSetting.inclusive ?? [] : [];
|
|
61
|
-
return ve.Country.getCountry(F.currentCountry.value).taxSystems.map((i) => {
|
|
62
|
-
const d = t.find((O) => O.systemCode === i.code);
|
|
63
|
-
return {
|
|
64
|
-
inclusive: (d == null ? void 0 : d.inclusive) || !1,
|
|
65
|
-
systemCode: i.code
|
|
66
|
-
};
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
function X(t) {
|
|
70
|
-
const n = l.value.taxSetting, i = n.mode === x.AUTO ? b.manualTax(V.value) : w(n);
|
|
71
|
-
i.inclusive ?? (i.inclusive = []);
|
|
72
|
-
const d = i.inclusive.findIndex((O) => O.systemCode === t.systemCode);
|
|
73
|
-
d < 0 ? i.inclusive.push(t) : i.inclusive.splice(d, 1, t), h.value = i;
|
|
74
|
-
}
|
|
75
|
-
re(async () => {
|
|
76
|
-
F.currentBusiness.value && (y.value && !u.state.menu._id || D());
|
|
77
|
-
});
|
|
78
|
-
const h = p({
|
|
79
|
-
get: () => l.value.taxSetting,
|
|
80
|
-
set: (t) => {
|
|
81
|
-
l.value.taxSetting = t;
|
|
82
|
-
}
|
|
83
|
-
}), Z = async () => {
|
|
84
|
-
const t = b.toCatalog(l.value);
|
|
85
|
-
C.value ? await new G({
|
|
86
|
-
...C.value,
|
|
87
|
-
...t
|
|
88
|
-
}, u, I, A).update() : await Y(async () => {
|
|
89
|
-
await u.updateMainCatalogSetting({
|
|
90
|
-
inclusiveTaxes: t.inclusiveTaxes
|
|
91
|
-
});
|
|
92
|
-
}, {
|
|
93
|
-
successMessage: "Main catalog updated",
|
|
94
|
-
customId: u.state.menu._id
|
|
95
|
-
});
|
|
96
|
-
};
|
|
97
|
-
function ee(t, n) {
|
|
98
|
-
const i = w(l.value);
|
|
99
|
-
i.markupOptions && (i.markupOptions[t] = n, l.value = i);
|
|
100
|
-
}
|
|
101
|
-
function te(t) {
|
|
102
|
-
const n = w(l.value);
|
|
103
|
-
n.markupOptions && (n.markupOptions.splice(t, 1), l.value = n);
|
|
104
|
-
}
|
|
105
|
-
return (t, n) => {
|
|
106
|
-
const i = m("fm-text-field"), d = m("fm-radio"), O = m("fm-radio-group"), ae = m("fm-checkbox"), B = m("fm-switch"), le = m("fm-select"), R = m("fm-button"), ne = m("fm-chip"), oe = m("fm-card"), se = m("fm-form");
|
|
107
|
-
return r(), M("div", Ce, [s(se, {
|
|
108
|
-
class: J(["space-y-40 max-w-[751px]", "h-fit"]),
|
|
109
|
-
"blame-form-child-on-validation-failed": "",
|
|
110
|
-
onValidationSuccess: Z
|
|
111
|
-
}, {
|
|
112
|
-
default: c(() => [g("div", Oe, [y.value ? f("", !0) : (r(), v(ke, {
|
|
113
|
-
key: 0,
|
|
114
|
-
title: e(o)("menu.setting.catalog.title")
|
|
115
|
-
}, {
|
|
116
|
-
default: c(() => [s(i, {
|
|
117
|
-
modelValue: l.value.name,
|
|
118
|
-
"onUpdate:modelValue": n[0] || (n[0] = (a) => l.value.name = a),
|
|
119
|
-
rules: [(a) => !K.value.includes(a.trim()) || e(o)("menu.setting.catalog.fields.name.used"), (a) => !!a.trim() || e(o)("menu.setting.catalog.fields.name.required")],
|
|
120
|
-
label: e(o)("menu.setting.catalog.fields.name.label")
|
|
121
|
-
}, null, 8, ["modelValue", "rules", "label"]), s(L)]),
|
|
122
|
-
_: 1
|
|
123
|
-
}, 8, ["title"])), s(E, {
|
|
124
|
-
label: e(o)("menu.setting.tax.title")
|
|
125
|
-
}, {
|
|
126
|
-
default: c(() => [s(O, {
|
|
127
|
-
"model-value": l.value.taxSetting.mode,
|
|
128
|
-
"onUpdate:modelValue": n[1] || (n[1] = (a) => {
|
|
129
|
-
a === e(x).AUTO ? h.value = e(b).autoTax() : h.value = e(b).manualTax(V.value);
|
|
130
|
-
})
|
|
131
|
-
}, {
|
|
132
|
-
default: c(() => [s(d, {
|
|
133
|
-
value: e(x).AUTO,
|
|
134
|
-
label: e(o)("menu.setting.tax.modes.auto.label"),
|
|
135
|
-
sublabel: e(o)("menu.setting.tax.modes.auto.sublabel")
|
|
136
|
-
}, null, 8, ["value", "label", "sublabel"]), s(d, {
|
|
137
|
-
value: e(x).MANUAL,
|
|
138
|
-
label: e(o)("menu.setting.tax.modes.manual.label"),
|
|
139
|
-
sublabel: e(o)("menu.setting.tax.modes.manual.sublabel")
|
|
140
|
-
}, null, 8, ["value", "label", "sublabel"])]),
|
|
141
|
-
_: 1
|
|
142
|
-
}, 8, ["model-value"]), l.value.taxSetting.mode === e(x).MANUAL ? (r(), M("div", Se, [(r(!0), M($, null, H(V.value, (a) => (r(), v(ae, {
|
|
143
|
-
key: a.systemCode,
|
|
144
|
-
"model-value": a.inclusive,
|
|
145
|
-
value: !0,
|
|
146
|
-
label: a.systemCode + " inclusive",
|
|
147
|
-
"onUpdate:modelValue": (k) => {
|
|
148
|
-
X({
|
|
149
|
-
...a,
|
|
150
|
-
inclusive: k
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
}, null, 8, ["model-value", "label", "onUpdate:modelValue"]))), 128))])) : f("", !0)]),
|
|
154
|
-
_: 1
|
|
155
|
-
}, 8, ["label"]), !y.value && S.value ? (r(), v(E, {
|
|
156
|
-
key: 1,
|
|
157
|
-
label: e(o)("menu.setting.link.title")
|
|
158
|
-
}, {
|
|
159
|
-
default: c(() => [s(B, {
|
|
160
|
-
"model-value": l.value.orderFrom && l.value.orderFrom !== e(_.F_ORDER_FROM).enum.NONE,
|
|
161
|
-
label: e(o)("menu.setting.link.auto_link.label"),
|
|
162
|
-
"label-placement": "right",
|
|
163
|
-
sublabel: e(o)("menu.setting.link.auto_link.sublabel"),
|
|
164
|
-
"onUpdate:modelValue": n[2] || (n[2] = (a) => l.value.orderFrom = a ? e(_.F_ORDER_FROM).enum.ALL : e(_.F_ORDER_FROM).enum.NONE)
|
|
165
|
-
}, null, 8, ["model-value", "label", "sublabel"]), l.value.orderFrom !== e(_.F_ORDER_FROM).enum.NONE ? (r(), v(le, {
|
|
166
|
-
key: 0,
|
|
167
|
-
class: "ml-[60px]",
|
|
168
|
-
items: [{
|
|
169
|
-
label: "Available for all",
|
|
170
|
-
value: e(_.F_ORDER_FROM).enum.ALL
|
|
171
|
-
}, {
|
|
172
|
-
label: "Order on POS only",
|
|
173
|
-
value: e(_.F_ORDER_FROM).enum.POS_ONLY
|
|
174
|
-
}],
|
|
175
|
-
"model-value": l.value.orderFrom,
|
|
176
|
-
"onUpdate:modelValue": n[3] || (n[3] = (a) => l.value.orderFrom = a)
|
|
177
|
-
}, null, 8, ["items", "model-value"])) : f("", !0)]),
|
|
178
|
-
_: 1
|
|
179
|
-
}, 8, ["label"])) : f("", !0), !y.value && S.value ? (r(), v(E, {
|
|
180
|
-
key: 2,
|
|
181
|
-
label: e(o)("menu.setting.markup.title")
|
|
182
|
-
}, {
|
|
183
|
-
default: c(() => [s(B, {
|
|
184
|
-
"model-value": !!l.value.markupOptions,
|
|
185
|
-
label: e(o)("menu.setting.markup.auto_markup.label"),
|
|
186
|
-
"label-placement": "right",
|
|
187
|
-
sublabel: e(o)("menu.setting.markup.auto_markup.sublabel"),
|
|
188
|
-
"onUpdate:modelValue": n[4] || (n[4] = (a) => l.value.markupOptions = a ? [] : null)
|
|
189
|
-
}, null, 8, ["model-value", "label", "sublabel"]), g("div", Me, [s(q, {
|
|
190
|
-
categories: e(u).categories,
|
|
191
|
-
items: e(u).items,
|
|
192
|
-
action: "add",
|
|
193
|
-
"onUpdate:modelValue": n[5] || (n[5] = (a) => l.value.markupOptions = [...l.value.markupOptions ?? [], a])
|
|
194
|
-
}, {
|
|
195
|
-
default: c(({
|
|
196
|
-
trigger: a
|
|
197
|
-
}) => [s(R, {
|
|
198
|
-
"text-color": e(j).ColorPrimary,
|
|
199
|
-
"border-color": e(j).ColorPrimary,
|
|
200
|
-
variant: e(z).Secondary,
|
|
201
|
-
label: "Add markup configuration",
|
|
202
|
-
"prepend-icon": "add",
|
|
203
|
-
onClick: a
|
|
204
|
-
}, null, 8, ["text-color", "border-color", "variant", "onClick"])]),
|
|
205
|
-
_: 1
|
|
206
|
-
}, 8, ["categories", "items"]), (r(!0), M($, null, H(l.value.markupOptions, (a, k) => (r(), v(q, {
|
|
207
|
-
key: k,
|
|
208
|
-
categories: e(u).categories,
|
|
209
|
-
items: e(u).items,
|
|
210
|
-
"model-value": a,
|
|
211
|
-
action: "update",
|
|
212
|
-
"onUpdate:modelValue": (U) => ee(k, U)
|
|
213
|
-
}, {
|
|
214
|
-
default: c(({
|
|
215
|
-
trigger: U
|
|
216
|
-
}) => [s(oe, {
|
|
217
|
-
id: JSON.stringify(a),
|
|
218
|
-
class: "py-12 px-16 cursor-pointer",
|
|
219
|
-
variant: "outlined",
|
|
220
|
-
onClick: U
|
|
221
|
-
}, {
|
|
222
|
-
default: c(() => [g("div", Fe, [g("div", Ve, [s(ne, {
|
|
223
|
-
class: "text-fm-color-typo-info bg-fm-color-system-info-100 font-semibold"
|
|
224
|
-
}, {
|
|
225
|
-
default: c(() => [me(" Markup percentage: " + N(a.percentage) + "% ", 1)]),
|
|
226
|
-
_: 2
|
|
227
|
-
}, 1024), g("p", he, N(e(o)("menu.setting.markup.config", {
|
|
228
|
-
number: k + 1
|
|
229
|
-
})), 1), g("p", Re, N(a.includeItems ? e(o)("menu.setting.markup.products.linked", {
|
|
230
|
-
count: a.includeItems.length
|
|
231
|
-
}) : e(o)("menu.setting.markup.products.all")), 1)]), s(R, {
|
|
232
|
-
variant: e(z).Tertiary,
|
|
233
|
-
"prepend-icon": "delete",
|
|
234
|
-
onClick: (Te) => te(k)
|
|
235
|
-
}, null, 8, ["variant", "onClick"])])]),
|
|
236
|
-
_: 2
|
|
237
|
-
}, 1032, ["id", "onClick"])]),
|
|
238
|
-
_: 2
|
|
239
|
-
}, 1032, ["categories", "items", "model-value", "onUpdate:modelValue"]))), 128))])]),
|
|
240
|
-
_: 1
|
|
241
|
-
}, 8, ["label"])) : f("", !0), !y.value && S.value ? (r(), v(xe, {
|
|
242
|
-
key: 3,
|
|
243
|
-
"model-value": l.value.usePriceTiers,
|
|
244
|
-
"onUpdate:modelValue": n[6] || (n[6] = (a) => l.value.usePriceTiers = a)
|
|
245
|
-
}, null, 8, ["model-value"])) : f("", !0), y.value ? (r(), v(L, {
|
|
246
|
-
key: 4
|
|
247
|
-
})) : f("", !0)]), g("div", Ue, [s(R, {
|
|
248
|
-
label: e(o)("common.save"),
|
|
249
|
-
type: "submit"
|
|
250
|
-
}, null, 8, ["label"])])]),
|
|
251
|
-
_: 1
|
|
252
|
-
})]);
|
|
253
|
-
};
|
|
254
|
-
}
|
|
255
|
-
});
|
|
256
|
-
export {
|
|
257
|
-
je as default
|
|
258
|
-
};
|
package/dist/_id_-Q_Tyhr4U.js
DELETED
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { defineComponent as P, computed as r, ref as p, watch as C, onMounted as q, resolveComponent as c, createElementBlock as H, openBlock as x, Fragment as F, createVNode as l, withCtx as u, createElementVNode as m, toDisplayString as w, unref as o, createBlock as I } from "vue";
|
|
2
|
-
import { D as K } from "./dayjs.min-DoQgN0KD.js";
|
|
3
|
-
import { useRoute as W, useRouter as j } from "vue-router";
|
|
4
|
-
import { u as J, c as Q, _ as X, w as Z } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-CxPaVLVu.js";
|
|
5
|
-
import { D as ee, u as te, O as ae, B as oe, H as ne } from "./menu-Cir-22ei.js";
|
|
6
|
-
import { useI18n as le } from "@feedmepos/mf-common";
|
|
7
|
-
import { useDialog as se, useSnackbar as re, useBreakpoints as ue } from "@feedmepos/ui-library";
|
|
8
|
-
import { _ as A } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
9
|
-
import { L as D } from "./LinkProductSideSheet-abzVzmo3.js";
|
|
10
|
-
import { _ as ie } from "./index-C-zLHAG1.js";
|
|
11
|
-
import { _ as me } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
12
|
-
import { a as ce } from "./menu-D6df9rcz.js";
|
|
13
|
-
import { m as de } from "./toExcel-Bil8CwJs.js";
|
|
14
|
-
import { _ as pe, u as _e, c as fe } from "./scheduler-DCSpt65t.js";
|
|
15
|
-
import { R as i } from "./app-C5UXrJGj.js";
|
|
16
|
-
const ve = { class: "px-12 py-8" }, ge = { class: "px-12 py-8" }, be = { class: "flex ml-auto space-x-8" }, ke = { class: "flex-1 flex flex-col overflow-hidden" }, Ge = /* @__PURE__ */ P({
|
|
17
|
-
__name: "[id]",
|
|
18
|
-
setup(xe) {
|
|
19
|
-
const M = W(), _ = j();
|
|
20
|
-
se();
|
|
21
|
-
const y = ee(re()), S = ae(y), a = te(), f = J(), v = Q(), { t: s } = le(), R = r(() => a.categorizedRawMenuItems), V = r(() => !a.state.currentSchedulerId);
|
|
22
|
-
r(() => a.rules.item.multiScheduler), r(() => S.checkMenuIsLoading()), r(() => [
|
|
23
|
-
{ label: "All Day", value: "" },
|
|
24
|
-
...a.schedulers.map((t) => ({
|
|
25
|
-
label: t.name.length > 15 ? `${t.name.substring(0, 15)}...` : t.name,
|
|
26
|
-
value: t._id
|
|
27
|
-
}))
|
|
28
|
-
]);
|
|
29
|
-
const E = p();
|
|
30
|
-
r(() => a.state.currentSchedulerId);
|
|
31
|
-
async function L(t) {
|
|
32
|
-
const e = t._id ? _e(t) : fe(t);
|
|
33
|
-
await S.updateMenu(e, t.name);
|
|
34
|
-
}
|
|
35
|
-
const h = [
|
|
36
|
-
{
|
|
37
|
-
label: s("menu.catalog.edit.tabs.product"),
|
|
38
|
-
value: i.EDIT_CATALOG_PRODUCT
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
label: s("menu.catalog.edit.tabs.category"),
|
|
42
|
-
value: i.EDIT_CATALOG_CATEGORY
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
label: s("menu.catalog.edit.tabs.group"),
|
|
46
|
-
value: i.EDIT_CATALOG_GROUP
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
label: s("menu.catalog.edit.tabs.takeaway"),
|
|
50
|
-
value: i.EDIT_CATALOG_TAKEAWAY
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
label: s("menu.catalog.edit.tabs.setting"),
|
|
54
|
-
value: i.EDIT_CATALOG_SETTING
|
|
55
|
-
}
|
|
56
|
-
], d = p(h[0].value);
|
|
57
|
-
C(d, (t) => {
|
|
58
|
-
_.replace({
|
|
59
|
-
name: t
|
|
60
|
-
});
|
|
61
|
-
}), q(() => {
|
|
62
|
-
_.currentRoute.value.name !== i.EDIT_CATALOG && (d.value = _.currentRoute.value.name);
|
|
63
|
-
}), C(
|
|
64
|
-
() => a.state.menu._id,
|
|
65
|
-
(t) => {
|
|
66
|
-
const e = M.params.id;
|
|
67
|
-
t && e !== "main" && a.selectCatalog(e);
|
|
68
|
-
}
|
|
69
|
-
);
|
|
70
|
-
const O = r(() => ({
|
|
71
|
-
...oe.menuV4ToV3(ne(a.state.menu)),
|
|
72
|
-
_id: a.state.menu._id,
|
|
73
|
-
_rev: a.state.menu._rev
|
|
74
|
-
}));
|
|
75
|
-
async function G() {
|
|
76
|
-
await y.minor(
|
|
77
|
-
async () => {
|
|
78
|
-
await a.readMenu();
|
|
79
|
-
const t = await de(O.value), e = `menu_${K().format("DD-MM-YYYY_HH-mm")}`;
|
|
80
|
-
await Z(t, `${e}.xlsx`, {
|
|
81
|
-
bookType: "xlsx",
|
|
82
|
-
bookSST: !1,
|
|
83
|
-
type: "array"
|
|
84
|
-
});
|
|
85
|
-
},
|
|
86
|
-
{ successMessage: "Menu exported", customId: a.state.menu._id }
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
const g = p(!1), b = p(!1), z = ue();
|
|
90
|
-
return r(() => z.breakpoints.value.xs), ce().resetOnUnmount(), (t, e) => {
|
|
91
|
-
var T;
|
|
92
|
-
const $ = c("fm-bottom-sheet"), U = c("fm-button"), Y = c("router-link"), B = c("fm-tabs"), N = c("router-view");
|
|
93
|
-
return x(), H(F, null, [
|
|
94
|
-
l(pe, {
|
|
95
|
-
ref_key: "schedulerDialogRef",
|
|
96
|
-
ref: E,
|
|
97
|
-
"categorized-items": R.value,
|
|
98
|
-
onOnComplete: L
|
|
99
|
-
}, null, 8, ["categorized-items"]),
|
|
100
|
-
l(X, {
|
|
101
|
-
modelValue: g.value,
|
|
102
|
-
"onUpdate:modelValue": e[0] || (e[0] = (n) => g.value = n)
|
|
103
|
-
}, null, 8, ["modelValue"]),
|
|
104
|
-
l($, {
|
|
105
|
-
modelValue: b.value,
|
|
106
|
-
"onUpdate:modelValue": e[2] || (e[2] = (n) => b.value = n),
|
|
107
|
-
"no-header": ""
|
|
108
|
-
}, {
|
|
109
|
-
default: u(() => [
|
|
110
|
-
m("div", ve, [
|
|
111
|
-
m("p", {
|
|
112
|
-
class: "fm-typo-en-body-md-400",
|
|
113
|
-
onClick: G
|
|
114
|
-
}, w(o(s)("menu.catalog.edit.export")), 1)
|
|
115
|
-
]),
|
|
116
|
-
m("div", ge, [
|
|
117
|
-
m("p", {
|
|
118
|
-
class: "fm-typo-en-body-md-400",
|
|
119
|
-
onClick: e[1] || (e[1] = () => {
|
|
120
|
-
g.value = !0, b.value = !1;
|
|
121
|
-
})
|
|
122
|
-
}, w(o(s)("menu.catalog.edit.import")), 1)
|
|
123
|
-
])
|
|
124
|
-
]),
|
|
125
|
-
_: 1
|
|
126
|
-
}, 8, ["modelValue"]),
|
|
127
|
-
l(me, {
|
|
128
|
-
heading: ((T = o(a).currentCatalog) == null ? void 0 : T.name) ?? "Main",
|
|
129
|
-
class: "flex flex-col max-h-[calc(100vh-56px)] overflow-hidden"
|
|
130
|
-
}, {
|
|
131
|
-
"prepend-heading": u(() => [
|
|
132
|
-
l(Y, {
|
|
133
|
-
to: { name: o(i).CATALOG },
|
|
134
|
-
class: "mr-8",
|
|
135
|
-
title: o(s)("menu.catalog.edit.back")
|
|
136
|
-
}, {
|
|
137
|
-
default: u(() => [
|
|
138
|
-
l(U, {
|
|
139
|
-
"prepend-icon": "arrow_back",
|
|
140
|
-
variant: "tertiary"
|
|
141
|
-
})
|
|
142
|
-
]),
|
|
143
|
-
_: 1
|
|
144
|
-
}, 8, ["to", "title"])
|
|
145
|
-
]),
|
|
146
|
-
"append-heading": u(() => [
|
|
147
|
-
m("div", be, [
|
|
148
|
-
V.value ? (x(), I(D, {
|
|
149
|
-
key: 0,
|
|
150
|
-
"categorized-items": o(f).linkableItems.value,
|
|
151
|
-
"initial-value": o(f).currentItems.value,
|
|
152
|
-
"show-variant": !1,
|
|
153
|
-
onSubmit: e[3] || (e[3] = (n) => o(f).applyProduct(n.map((k) => k._id)))
|
|
154
|
-
}, {
|
|
155
|
-
default: u(({ trigger: n }) => [
|
|
156
|
-
l(A, {
|
|
157
|
-
label: o(s)("menu.catalog.edit.link_product"),
|
|
158
|
-
"prepend-icon": "link",
|
|
159
|
-
onClick: n
|
|
160
|
-
}, null, 8, ["label", "onClick"])
|
|
161
|
-
]),
|
|
162
|
-
_: 1
|
|
163
|
-
}, 8, ["categorized-items", "initial-value"])) : (x(), I(D, {
|
|
164
|
-
key: 1,
|
|
165
|
-
"categorized-items": o(v).linkableItems.value,
|
|
166
|
-
"initial-value": o(v).currentItems.value,
|
|
167
|
-
"show-variant": !1,
|
|
168
|
-
onSubmit: e[4] || (e[4] = (n) => o(v).applyProduct(n.map((k) => k._id)))
|
|
169
|
-
}, {
|
|
170
|
-
default: u(({ trigger: n }) => [
|
|
171
|
-
l(A, {
|
|
172
|
-
label: o(s)("menu.catalog.edit.apply_scheduler"),
|
|
173
|
-
onClick: n
|
|
174
|
-
}, null, 8, ["label", "onClick"])
|
|
175
|
-
]),
|
|
176
|
-
_: 1
|
|
177
|
-
}, 8, ["categorized-items", "initial-value"]))
|
|
178
|
-
])
|
|
179
|
-
]),
|
|
180
|
-
default: u(() => [
|
|
181
|
-
l(B, {
|
|
182
|
-
modelValue: d.value,
|
|
183
|
-
"onUpdate:modelValue": e[5] || (e[5] = (n) => d.value = n),
|
|
184
|
-
items: h,
|
|
185
|
-
class: "mb-7 xs:mb-0 xs:px-32"
|
|
186
|
-
}, null, 8, ["modelValue"]),
|
|
187
|
-
m("div", ke, [
|
|
188
|
-
l(ie, { "menu-store": o(a) }, null, 8, ["menu-store"]),
|
|
189
|
-
l(N)
|
|
190
|
-
])
|
|
191
|
-
]),
|
|
192
|
-
_: 1
|
|
193
|
-
}, 8, ["heading"])
|
|
194
|
-
], 64);
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
});
|
|
198
|
-
export {
|
|
199
|
-
Ge as default
|
|
200
|
-
};
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import * as ExcelJS from "exceljs";
|
|
2
|
-
import { type WorkBook } from "xlsx";
|
|
3
|
-
import { FdoDinero } from "@feedmepos/core/entity";
|
|
4
|
-
import { FdoMenuV4, FdoMenuV4Catalog, F_ORDER_FROM } from "@feedmepos/menu/entity";
|
|
5
|
-
import type { GroupItem } from "@/manager/menu/group";
|
|
6
|
-
export interface ExportMenuDataRow {
|
|
7
|
-
_id: string;
|
|
8
|
-
code: string;
|
|
9
|
-
name: string;
|
|
10
|
-
variantKey: string;
|
|
11
|
-
variantName: string;
|
|
12
|
-
category: string;
|
|
13
|
-
orderFrom: string;
|
|
14
|
-
perXUnit: number | string;
|
|
15
|
-
unit: string;
|
|
16
|
-
openPrice: boolean | string;
|
|
17
|
-
price: number | string;
|
|
18
|
-
priceTier: Record<string, FdoDinero>;
|
|
19
|
-
trackingCost: number | string;
|
|
20
|
-
minPrice: number | string;
|
|
21
|
-
groupByParent: boolean | string;
|
|
22
|
-
takeawayName: string;
|
|
23
|
-
takeawayPrice: number | string;
|
|
24
|
-
tag: Record<string, any>;
|
|
25
|
-
}
|
|
26
|
-
export interface ExportAddonGroupRow {
|
|
27
|
-
id: string;
|
|
28
|
-
name: string;
|
|
29
|
-
min: number;
|
|
30
|
-
max: number;
|
|
31
|
-
stackable: string;
|
|
32
|
-
itemId: string;
|
|
33
|
-
itemCode: string;
|
|
34
|
-
itemName: string;
|
|
35
|
-
itemNameOverrider: string;
|
|
36
|
-
combinationKey: string;
|
|
37
|
-
combinationName: string;
|
|
38
|
-
price: number;
|
|
39
|
-
priceTier: Record<string, FdoDinero>;
|
|
40
|
-
orderFrom: string;
|
|
41
|
-
isDefault: string;
|
|
42
|
-
index: number;
|
|
43
|
-
}
|
|
44
|
-
export interface TransformDataResult {
|
|
45
|
-
rows: ExportMenuDataRow[];
|
|
46
|
-
metaData: {
|
|
47
|
-
tags: string[];
|
|
48
|
-
priceTiers: string[];
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
export interface GroupedItemVariant {
|
|
52
|
-
combinationKey: string;
|
|
53
|
-
name: string;
|
|
54
|
-
code: string | null | undefined;
|
|
55
|
-
takeawayUsed: string | null | undefined;
|
|
56
|
-
orderFrom: F_ORDER_FROM | null | undefined;
|
|
57
|
-
price: FdoDinero | null | undefined;
|
|
58
|
-
}
|
|
59
|
-
export interface GroupedItem {
|
|
60
|
-
_id: string;
|
|
61
|
-
code: string;
|
|
62
|
-
name: string;
|
|
63
|
-
variants: GroupedItemVariant[];
|
|
64
|
-
category: string | null | undefined;
|
|
65
|
-
orderFrom: F_ORDER_FROM;
|
|
66
|
-
perXUnit: number | null | undefined;
|
|
67
|
-
unit: string | null | undefined;
|
|
68
|
-
openPrice: boolean;
|
|
69
|
-
price: FdoDinero;
|
|
70
|
-
trackingCost: FdoDinero | null | undefined;
|
|
71
|
-
minPrice: FdoDinero | null | undefined;
|
|
72
|
-
groupByParent: boolean | null | undefined;
|
|
73
|
-
takeawayId: string | null | undefined;
|
|
74
|
-
customAttributes: Record<string, any> | null;
|
|
75
|
-
priceTiers: Record<string, FdoDinero> | null;
|
|
76
|
-
}
|
|
77
|
-
export interface GroupedAddon {
|
|
78
|
-
_id: string;
|
|
79
|
-
name: string;
|
|
80
|
-
min: number;
|
|
81
|
-
max: number;
|
|
82
|
-
stackable: boolean;
|
|
83
|
-
itemId: string;
|
|
84
|
-
itemName: string;
|
|
85
|
-
itemCode: string;
|
|
86
|
-
combinationKey: string;
|
|
87
|
-
combinationName: string;
|
|
88
|
-
price: number;
|
|
89
|
-
orderFrom: F_ORDER_FROM;
|
|
90
|
-
isDefault: boolean;
|
|
91
|
-
priceTiers: Record<string, FdoDinero> | null;
|
|
92
|
-
index: number;
|
|
93
|
-
}
|
|
94
|
-
export interface itemsLinkWithGroup {
|
|
95
|
-
itemId: string;
|
|
96
|
-
itemName: string;
|
|
97
|
-
defaultCatalog: string;
|
|
98
|
-
}
|
|
99
|
-
export declare const ADDON = "ADDON";
|
|
100
|
-
export declare function mapVariant(menu: FdoMenuV4, variantGroupIds: string[]): {
|
|
101
|
-
[key: string]: string;
|
|
102
|
-
};
|
|
103
|
-
export declare function addDescriptionsAndHeadersExcelJS(worksheet: ExcelJS.Worksheet, tagKeys: string[], priceTierKeys: string[], catelog?: FdoMenuV4Catalog): ExcelJS.Worksheet;
|
|
104
|
-
export declare function addAddonHeaderExcelJS(worksheet: ExcelJS.Worksheet, priceTierKeys?: string[]): ExcelJS.Worksheet;
|
|
105
|
-
export declare function toDinero(price: number): {
|
|
106
|
-
currency: "ALL" | "AED" | "AFN" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOV" | "BRL" | "BSD" | "BTN" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLF" | "CLP" | "CNY" | "COP" | "COU" | "CRC" | "CUC" | "CUP" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ERN" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LYD" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRU" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "SSP" | "STN" | "SVC" | "SYP" | "SZL" | "THB" | "TJS" | "TMT" | "TND" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "USN" | "UYI" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XBC" | "XBD" | "XCD" | "XDR" | "XOF" | "XPD" | "XPF" | "XPT" | "XSU" | "XTS" | "XUA" | "XXX" | "YER" | "ZAR" | "ZMW" | "ZWL";
|
|
107
|
-
amount: number;
|
|
108
|
-
precision: number;
|
|
109
|
-
};
|
|
110
|
-
export declare function formatDinero(dinero?: FdoDinero | null): string;
|
|
111
|
-
export declare function compareDinero(dinero1: FdoDinero, dinero2: FdoDinero | null | undefined): boolean;
|
|
112
|
-
export declare function getUpdatedPrice(elementPrice: any, itemPrice: any, variantCombinationPrice?: any): any;
|
|
113
|
-
export declare function getUpdatedMinPrice(elementMinPrice: string, catalogItem: any): any;
|
|
114
|
-
export declare function extractExcelDataGeneric<T>(workbook: WorkBook): T[][];
|
|
115
|
-
export declare function extractExcelData(workbook: WorkBook): ExportMenuDataRow[][];
|
|
116
|
-
export declare function extractAddonExcelData(workbook: WorkBook): ExportAddonGroupRow[][];
|
|
117
|
-
export declare function extractItemsGroupExcelData(workbook: WorkBook): itemsLinkWithGroup[][];
|
|
118
|
-
export declare function transformValue<T>(v: T): NonNullable<T> | null;
|
|
119
|
-
export declare function generateId(key: string, length: number): string;
|
|
120
|
-
export declare function processGroupItem(newItem: GroupedAddon, index: number, originalItem?: GroupedAddon[] | null, combinationKey?: string | null, baseSelection?: string | null): GroupItem;
|
|
121
|
-
export declare function normalizeSheetName(name: string): string;
|
|
122
|
-
export declare function validateInputData(row: Record<string, any>, fileMap: Record<string, string>, isCatalog?: boolean, catalogName?: string): void;
|
|
123
|
-
export declare function validateAddonInputData(row: Record<string, any>, addonFile: Record<string, string>, catalogName?: string): void;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { FdoMenuV4, FdoMenuV4Category, FdoMenuV4Item, FdoMenuV4Takeaway, FdoItemOverriderV4 } from "@feedmepos/menu/entity";
|
|
2
|
-
import * as ExcelJS from "exceljs";
|
|
3
|
-
import type { FdoGroupOverriderV4 } from "@feedmepos/menu/entity";
|
|
4
|
-
import { type ExportAddonGroupRow, type ExportMenuDataRow, type TransformDataResult } from "@/helper/import-export-utils";
|
|
5
|
-
export declare class MenuExport {
|
|
6
|
-
menu: FdoMenuV4;
|
|
7
|
-
categoryMap: {
|
|
8
|
-
[id: string]: FdoMenuV4Category;
|
|
9
|
-
};
|
|
10
|
-
takeawayMap: {
|
|
11
|
-
[id: string]: FdoMenuV4Takeaway;
|
|
12
|
-
};
|
|
13
|
-
constructor(menu: FdoMenuV4);
|
|
14
|
-
transformData(): TransformDataResult;
|
|
15
|
-
transformOverrideData(data: FdoItemOverriderV4[]): TransformDataResult;
|
|
16
|
-
transformProductToDataRow(item: FdoMenuV4Item, combinationNameMapping: {
|
|
17
|
-
[key: string]: string;
|
|
18
|
-
}, combinationKey?: string | null | undefined): ExportMenuDataRow;
|
|
19
|
-
transformOverrideDataToRow(d: FdoItemOverriderV4, combinationNameMapping: {
|
|
20
|
-
[key: string]: string;
|
|
21
|
-
}, combinationKey?: string | null | undefined): ExportMenuDataRow;
|
|
22
|
-
transformAddonGroup(): ExportAddonGroupRow[];
|
|
23
|
-
transformOverrideAddonGroup(data: FdoGroupOverriderV4[]): ExportAddonGroupRow[];
|
|
24
|
-
private mapCatalogAddonGroup;
|
|
25
|
-
private mapAddonGroup;
|
|
26
|
-
transformItemsLinkWithGroup(): {};
|
|
27
|
-
exportToExcel(): any[];
|
|
28
|
-
private createWorkbookExcelJS;
|
|
29
|
-
private formatWorkbookCell;
|
|
30
|
-
exportCatalogToExcelExcelJS(): ExcelJS.Workbook;
|
|
31
|
-
exportCatalogAddonToExcelExcelJS(): ExcelJS.Workbook;
|
|
32
|
-
}
|