@feedmepos/mf-menu 0.31.32-prod → 0.31.33-beta.1
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-NHdXEdrJ.js → App-B4rnpCXN.js} +20 -20
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-DoTx23iL.js → ApplyProduct.vue_vue_type_script_setup_true_lang-LtwWMoPW.js} +2 -2
- package/dist/{Catalog-B0fV6Yje.js → Catalog-Cd7J8de0.js} +5 -5
- package/dist/{Category-CJZs9I7F.js → Category-D3WDm9Fe.js} +5 -5
- package/dist/{Category-CUKZ10xq.js → Category-p8UUDEiv.js} +4 -4
- package/dist/{CookingGuide-kVclP--T.js → CookingGuide-hFtxmtGj.js} +3 -3
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-RI_d10bz.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-Cf17Iy5i.js} +1 -1
- package/dist/{Group-CAS6o4Fo.js → Group-BTrqZgFd.js} +3 -3
- package/dist/{Group-Bgkye2LL.js → Group-Bv0dyi8v.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-Bij0tGMP.js → Group.vue_vue_type_script_setup_true_lang-vk1J9IxK.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CUa_0qzX.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-B1wrLnf6.js} +3 -3
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-RsDAGQ3o.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CxPaVLVu.js} +8336 -8695
- package/dist/{Ingredient-DpAPMsPZ.js → Ingredient-BCostN4Y.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-MoApzjt6.js → InventoryBinding.vue_vue_type_script_setup_true_lang-MAqpI7ZD.js} +2 -2
- package/dist/{LinkProductSideSheet-CEClo07H.js → LinkProductSideSheet-abzVzmo3.js} +1 -1
- package/dist/{MenuSetting-CoqMT8Vh.js → MenuSetting-TfAo82-E.js} +4 -4
- package/dist/{PrintRoute-DyJil1Hl.js → PrintRoute-B43rP5A9.js} +3 -3
- package/dist/{Product-BPIUTn0_.js → Product-C7cYyDHH.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-fjFGg49e.js → Product.vue_vue_type_script_setup_true_lang-BOq8wMzq.js} +11 -11
- package/dist/{ProductInternalTools-DXgWE6JU.js → ProductInternalTools-CkswVuAF.js} +6 -6
- package/dist/Products-C7BtAjhB.js +659 -0
- package/dist/{Publish-DDzpmm72.js → Publish-DIKqaH2f.js} +3 -3
- package/dist/{Recipe-DHYzO0IS.js → Recipe-_ApT00c_.js} +4 -4
- package/dist/{Scheduler-DBad2mO3.js → Scheduler-DWY1kKHO.js} +3 -3
- package/dist/{ServingSequence-DC7raAtF.js → ServingSequence-Z1S9zOTO.js} +3 -3
- package/dist/{Setting-CPjvUYU9.js → Setting-Bfuf26Gc.js} +4 -4
- package/dist/{Subcategory-DHjc7WeF.js → Subcategory-Lqq6XHz2.js} +4 -4
- package/dist/{Takeaway-CAIAHpA-.js → Takeaway-DGvM9SBP.js} +1 -1
- package/dist/{Takeaway-CJRTaygj.js → Takeaway-DiGzrarg.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BNu9JjwH.js → Takeaway.vue_vue_type_script_setup_true_lang-BfWy217t.js} +5 -5
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-ZRv8Dg6x.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B2wC_Mf0.js} +13 -13
- package/dist/{Unit-DSMSKE6_.js → Unit-D11rRFAf.js} +2 -2
- package/dist/{Variant-DMXxUWnj.js → Variant-LaKYPxDe.js} +3 -3
- package/dist/{_id_-CTq4qK7z.js → _id_-Q_Tyhr4U.js} +9 -9
- package/dist/{app-BTgdGTYz.js → app-Br9mC24D.js} +1 -1
- package/dist/{app-D23N7tJ0.js → app-C5UXrJGj.js} +24 -24
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/helper/import-export-utils.d.ts +123 -0
- package/dist/apps/mf-menu/src/helper/menuExport.d.ts +32 -0
- package/dist/apps/mf-menu/src/helper/{import-export.d.ts → menuImport.d.ts} +3 -127
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-Cfc9wZst.js → linked-status-BhGrXd73.js} +7 -7
- package/dist/assets/{override-menu-BNZggtO_.js → override-menu-CUNDHOWA.js} +2 -2
- package/dist/assets/{validate-menu-CPwUvy9F.js → validate-menu-BqOizHsX.js} +2 -2
- package/dist/{catalog-DcciqmWK.js → catalog-BDyG_i9q.js} +1 -1
- package/dist/{catalogSetting-D4iwoJLb.js → catalogSetting-C33p_dck.js} +1 -1
- package/dist/{category-bhqVqDzJ.js → category-Bi6gpIYU.js} +1 -1
- package/dist/{currency-Clgvy00I.js → currency-DDseyYg1.js} +1 -1
- package/dist/{dayjs.min-DeSv8lfJ.js → dayjs.min-DoQgN0KD.js} +1 -1
- package/dist/{index-DZZJjEOs.js → index-C-zLHAG1.js} +1 -1
- package/dist/{index-CTUaJyIh.js → index-DTUmry92.js} +3 -3
- package/dist/{index-BHbYu_OM.js → index-DxrEwDTr.js} +2 -2
- package/dist/{item-DH1xf2Sa.js → item-DqXzPUy9.js} +373 -373
- package/dist/{jszip.min-CMM2HN8J.js → jszip.min-iAC5WNVU.js} +689 -689
- package/dist/{menu-DcGo3sn5.js → menu-Cir-22ei.js} +160 -160
- package/dist/{menu-Dx39P1vR.js → menu-D6df9rcz.js} +1 -1
- package/dist/{priceTier-3M5cxSYX.js → priceTier-C56BYecC.js} +1 -1
- package/dist/{scheduler-BT3EJBK6.js → scheduler-DCSpt65t.js} +3 -3
- package/dist/{subcategory-B5atmACN.js → subcategory-CydaPy_X.js} +39 -39
- package/dist/{toExcel-BLoj4Wqb.js → toExcel-Bil8CwJs.js} +15 -15
- package/dist/{unit-BsNOQHvZ.js → unit-8DyuBx-X.js} +1 -1
- package/package.json +1 -1
- package/dist/Products-dWmgQ_di.js +0 -270
|
@@ -1,270 +0,0 @@
|
|
|
1
|
-
import { defineComponent as Y, computed as g, ref as z, resolveComponent as h, createBlock as y, openBlock as d, unref as e, withCtx as m, createElementVNode as u, toDisplayString as U, createVNode as a, createCommentVNode as L, createElementBlock as D, Fragment as T } from "vue";
|
|
2
|
-
import { D as C } from "./dayjs.min-DeSv8lfJ.js";
|
|
3
|
-
import { u as W, a as X, M as ee, w as te } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-RsDAGQ3o.js";
|
|
4
|
-
import { J as oe, F as ne } from "./jszip.min-CMM2HN8J.js";
|
|
5
|
-
import { u as q, D as G, A as I, e as H, G as O, B as ae, H as N, I as B } from "./menu-DcGo3sn5.js";
|
|
6
|
-
import { useCoreStore as re, useI18n as se } from "@feedmepos/mf-common";
|
|
7
|
-
import { useDialog as j, useDialogChild as ie, useSnackbar as J, useBreakpoints as le, FmButtonVariant as $, FmButtonColorThemeVariant as M } from "@feedmepos/ui-library";
|
|
8
|
-
import { _ as V } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
9
|
-
import { _ as ue, a as P } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js";
|
|
10
|
-
import { _ as ce } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
11
|
-
import { u as me, a as de } from "./menu-Dx39P1vR.js";
|
|
12
|
-
import { u as pe } from "./item-DH1xf2Sa.js";
|
|
13
|
-
import { _ as A, a as fe } from "./Product.vue_vue_type_script_setup_true_lang-fjFGg49e.js";
|
|
14
|
-
import { L as R } from "./LinkProductSideSheet-CEClo07H.js";
|
|
15
|
-
import { _ as _e } from "./TreeEditorOpenner.vue_vue_type_script_setup_true_lang-ZRv8Dg6x.js";
|
|
16
|
-
import { m as ve } from "./toExcel-BLoj4Wqb.js";
|
|
17
|
-
const ge = { class: "space-y-24 mb-24" }, be = ["innerHTML"], ye = { class: "flex justify-end gap-8" }, xe = /* @__PURE__ */ Y({
|
|
18
|
-
__name: "ConfirmActionDialog",
|
|
19
|
-
props: {
|
|
20
|
-
description: {},
|
|
21
|
-
value: {},
|
|
22
|
-
message: { default: "To confirm your action, type <b>[[value]]</b> in the text field." }
|
|
23
|
-
},
|
|
24
|
-
setup(F) {
|
|
25
|
-
const t = F, S = g(() => t.message.replace("[[value]]", t.value)), r = z(""), w = j(), { emitAction: x } = ie();
|
|
26
|
-
return (p, s) => {
|
|
27
|
-
const i = h("FmTextField"), f = h("FmButton"), b = h("FmForm");
|
|
28
|
-
return d(), y(b, {
|
|
29
|
-
"on-validation-success": () => e(x)("primary"),
|
|
30
|
-
"blame-form-child-on-validation-failed": ""
|
|
31
|
-
}, {
|
|
32
|
-
default: m(() => [
|
|
33
|
-
u("div", ge, [
|
|
34
|
-
u("div", null, U(p.description), 1),
|
|
35
|
-
u("div", { innerHTML: S.value }, null, 8, be),
|
|
36
|
-
u("div", null, [
|
|
37
|
-
a(i, {
|
|
38
|
-
modelValue: r.value,
|
|
39
|
-
"onUpdate:modelValue": [
|
|
40
|
-
s[0] || (s[0] = (l) => r.value = l),
|
|
41
|
-
s[1] || (s[1] = () => {
|
|
42
|
-
})
|
|
43
|
-
],
|
|
44
|
-
placeholder: p.value,
|
|
45
|
-
rules: [(l) => l === p.value || "Value does not match"]
|
|
46
|
-
}, null, 8, ["modelValue", "placeholder", "rules"])
|
|
47
|
-
]),
|
|
48
|
-
u("div", ye, [
|
|
49
|
-
a(f, {
|
|
50
|
-
label: "Cancel",
|
|
51
|
-
variant: "secondary",
|
|
52
|
-
onClick: s[2] || (s[2] = (l) => e(w).close())
|
|
53
|
-
}),
|
|
54
|
-
a(f, {
|
|
55
|
-
label: "Confirm",
|
|
56
|
-
type: "submit"
|
|
57
|
-
})
|
|
58
|
-
])
|
|
59
|
-
])
|
|
60
|
-
]),
|
|
61
|
-
_: 1
|
|
62
|
-
}, 8, ["on-validation-success"]);
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
}), ke = /* @__PURE__ */ Y({
|
|
66
|
-
__name: "Migrate",
|
|
67
|
-
setup(F) {
|
|
68
|
-
const t = q(), S = re(), r = J(), { minor: w } = G(r), x = z(!1), p = j();
|
|
69
|
-
async function s() {
|
|
70
|
-
i.value || x.value || p.open({
|
|
71
|
-
title: "Migrate to new version",
|
|
72
|
-
contentComponent: xe,
|
|
73
|
-
contentComponentProps: {
|
|
74
|
-
value: "MIGRATE",
|
|
75
|
-
description: "Do you want to migrate to new version? Once migrate it will unable to revert to the older version."
|
|
76
|
-
}
|
|
77
|
-
}).onPrimary(async () => {
|
|
78
|
-
p.close(), await w(
|
|
79
|
-
async () => {
|
|
80
|
-
await t.migrate(), setTimeout(() => {
|
|
81
|
-
window.location.reload();
|
|
82
|
-
}, 2e3);
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
isLoading: x,
|
|
86
|
-
customId: t.state.menu._id,
|
|
87
|
-
message: "Migrating menu",
|
|
88
|
-
successMessage: "Migration completed"
|
|
89
|
-
}
|
|
90
|
-
);
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
const i = g(() => {
|
|
94
|
-
const f = S.restaurants.value;
|
|
95
|
-
if (!f.length) return "Required at least one restaurant to migrate";
|
|
96
|
-
const b = f.filter((k) => !k.posVersion || !I.Pos.canUse({ feature: H.F_FEATURE.enum.menuV4, posVersion: k.posVersion }));
|
|
97
|
-
return b.length ? `Upgrade POS to V${I.Pos.minVersionToUse(H.F_FEATURE.enum.menuV4)} to use new menu: ${b.map((k) => k.profile.name).join(", ")}` : null;
|
|
98
|
-
});
|
|
99
|
-
return g(() => i.value ? i.value : "Migrate your menu to new version to enjoy more features. Content of new menu will remain the same as current."), (f, b) => {
|
|
100
|
-
const l = h("FmSnackbar");
|
|
101
|
-
return !i.value && e(t).version !== e(O.F_MENU_VERSION).enum.v4 ? (d(), y(l, {
|
|
102
|
-
key: 0,
|
|
103
|
-
class: "!max-w-full",
|
|
104
|
-
title: "New version of menu is out now!",
|
|
105
|
-
description: "Migrate your current menu version to the latest to enjoy more features such as product sequential dispatch, serving sequence, scheduler and more! Your content and current setting will be preserved.",
|
|
106
|
-
variant: "info",
|
|
107
|
-
action: "Migrate",
|
|
108
|
-
"z-index": 0,
|
|
109
|
-
onOnAction: s
|
|
110
|
-
})) : L("", !0);
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
}), Me = { class: "flex-1 flex justify-between gap-8 pl-8" }, Se = { class: "flex items-center" }, we = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Ce = { class: "fm-typo-en-body-md-600 font-semibold" }, he = { class: "flex gap-8" }, Le = /* @__PURE__ */ Y({
|
|
114
|
-
__name: "Products",
|
|
115
|
-
setup(F) {
|
|
116
|
-
const { t } = se(), S = G(J()), r = q(), w = g(() => r.rules.item), x = pe(), p = g(() => !r.state.currentSchedulerId), s = W(), i = X(), { selectedCategories: f } = me(), b = g(() => ({
|
|
117
|
-
...ae.menuV4ToV3(N(r.state.menu)),
|
|
118
|
-
_id: r.state.menu._id,
|
|
119
|
-
_rev: r.state.menu._rev
|
|
120
|
-
})), l = g(() => {
|
|
121
|
-
const c = B.flatten(f.value.map((o) => o.items));
|
|
122
|
-
return B.uniqBy(c, (o) => o._id).length;
|
|
123
|
-
});
|
|
124
|
-
async function k(c, o) {
|
|
125
|
-
const _ = new oe();
|
|
126
|
-
for (let v = 0; v < c.length; v++) {
|
|
127
|
-
const Q = await c[v].xlsx.writeBuffer();
|
|
128
|
-
_.file(`${o[v]}.xlsx`, Q);
|
|
129
|
-
}
|
|
130
|
-
const n = await _.generateAsync({ type: "blob" });
|
|
131
|
-
ne.saveAs(n, `books_${C().format("DD-MM-YYYY_HH-mm")}.zip`);
|
|
132
|
-
}
|
|
133
|
-
async function E() {
|
|
134
|
-
await S.minor(
|
|
135
|
-
async () => {
|
|
136
|
-
if (await r.readMenu(), r.version === O.F_MENU_VERSION.enum.v4) {
|
|
137
|
-
const c = N(r.state.menu), o = new ee(c).exportToExcel(), _ = [
|
|
138
|
-
`menu_${C().format("DD-MM-YYYY_HH-mm")}`,
|
|
139
|
-
`addonGroup_${C().format("DD-MM-YYYY_HH-mm")}`,
|
|
140
|
-
`itemLinkedAddon${C().format("DD-MM-YYYY_HH-mm")}`
|
|
141
|
-
];
|
|
142
|
-
k(o, _);
|
|
143
|
-
} else {
|
|
144
|
-
const c = ve(b.value), o = `menu_${C().format("DD-MM-YYYY_HH-mm")}`;
|
|
145
|
-
await te(c, `${o}.xlsx`, {
|
|
146
|
-
bookType: "xlsx",
|
|
147
|
-
bookSST: !1,
|
|
148
|
-
type: "array"
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
},
|
|
152
|
-
{ successMessage: "Menu exported", customId: r.state.menu._id }
|
|
153
|
-
);
|
|
154
|
-
}
|
|
155
|
-
const Z = le(), K = g(() => Z.breakpoints.value.xs);
|
|
156
|
-
return de().resetOnMount(), (c, o) => {
|
|
157
|
-
const _ = h("fm-button");
|
|
158
|
-
return d(), y(ce, {
|
|
159
|
-
heading: e(t)("menu.products.title")
|
|
160
|
-
}, {
|
|
161
|
-
default: m(() => [
|
|
162
|
-
a(ke),
|
|
163
|
-
a(fe)
|
|
164
|
-
]),
|
|
165
|
-
"append-heading": m(() => [
|
|
166
|
-
u("div", Me, [
|
|
167
|
-
u("div", Se, [
|
|
168
|
-
u("div", we, [
|
|
169
|
-
u("p", Ce, U(l.value), 1)
|
|
170
|
-
])
|
|
171
|
-
]),
|
|
172
|
-
u("div", he, [
|
|
173
|
-
K.value ? (d(), y(A, { key: 1 }, {
|
|
174
|
-
default: m(({ trigger: n }) => [
|
|
175
|
-
a(ue, null, {
|
|
176
|
-
default: m(() => [
|
|
177
|
-
a(P, {
|
|
178
|
-
label: e(t)("menu.products.actions.export"),
|
|
179
|
-
onClick: E
|
|
180
|
-
}, null, 8, ["label"]),
|
|
181
|
-
a(P, {
|
|
182
|
-
label: e(t)("menu.products.actions.import"),
|
|
183
|
-
onClick: n
|
|
184
|
-
}, null, 8, ["label", "onClick"])
|
|
185
|
-
]),
|
|
186
|
-
_: 2
|
|
187
|
-
}, 1024)
|
|
188
|
-
]),
|
|
189
|
-
_: 1
|
|
190
|
-
})) : (d(), D(T, { key: 0 }, [
|
|
191
|
-
a(_e, null, {
|
|
192
|
-
default: m(({ trigger: n }) => [
|
|
193
|
-
a(_, {
|
|
194
|
-
label: e(t)("menu.tree_editor.title"),
|
|
195
|
-
"bg-color": e(M).NeutralGray100,
|
|
196
|
-
"text-color": e(M).TypoSecondary,
|
|
197
|
-
variant: e($).Primary,
|
|
198
|
-
onClick: n
|
|
199
|
-
}, null, 8, ["label", "bg-color", "text-color", "variant", "onClick"])
|
|
200
|
-
]),
|
|
201
|
-
_: 1
|
|
202
|
-
}),
|
|
203
|
-
a(_, {
|
|
204
|
-
"bg-color": e(M).NeutralGray100,
|
|
205
|
-
"text-color": e(M).TypoSecondary,
|
|
206
|
-
variant: e($).Primary,
|
|
207
|
-
label: e(t)("menu.products.actions.export"),
|
|
208
|
-
onClick: E
|
|
209
|
-
}, null, 8, ["bg-color", "text-color", "variant", "label"]),
|
|
210
|
-
a(A, null, {
|
|
211
|
-
default: m(({ trigger: n }) => [
|
|
212
|
-
a(_, {
|
|
213
|
-
"bg-color": e(M).NeutralGray100,
|
|
214
|
-
"text-color": e(M).TypoSecondary,
|
|
215
|
-
variant: e($).Primary,
|
|
216
|
-
label: e(t)("menu.products.actions.import"),
|
|
217
|
-
onClick: n
|
|
218
|
-
}, null, 8, ["bg-color", "text-color", "variant", "label", "onClick"])
|
|
219
|
-
]),
|
|
220
|
-
_: 1
|
|
221
|
-
})
|
|
222
|
-
], 64)),
|
|
223
|
-
l.value > 0 ? (d(), D(T, { key: 2 }, [
|
|
224
|
-
w.value.create ? (d(), y(V, {
|
|
225
|
-
key: 0,
|
|
226
|
-
label: e(t)("menu.products.actions.add"),
|
|
227
|
-
"prepend-icon": "add",
|
|
228
|
-
onClick: o[0] || (o[0] = (n) => e(x).create(null))
|
|
229
|
-
}, null, 8, ["label"])) : p.value ? (d(), y(R, {
|
|
230
|
-
key: 1,
|
|
231
|
-
"categorized-items": e(s).linkableItems.value,
|
|
232
|
-
"initial-value": e(s).currentItems.value,
|
|
233
|
-
"show-variant": !1,
|
|
234
|
-
onSubmit: o[1] || (o[1] = (n) => e(s).applyProduct(n.map((v) => v._id)))
|
|
235
|
-
}, {
|
|
236
|
-
default: m(({ trigger: n }) => [
|
|
237
|
-
a(V, {
|
|
238
|
-
label: e(t)("menu.products.actions.link"),
|
|
239
|
-
"prepend-icon": "link",
|
|
240
|
-
onClick: n
|
|
241
|
-
}, null, 8, ["label", "onClick"])
|
|
242
|
-
]),
|
|
243
|
-
_: 1
|
|
244
|
-
}, 8, ["categorized-items", "initial-value"])) : (d(), y(R, {
|
|
245
|
-
key: 2,
|
|
246
|
-
"categorized-items": e(i).linkableItems.value,
|
|
247
|
-
"initial-value": e(i).currentItems.value,
|
|
248
|
-
"show-variant": !1,
|
|
249
|
-
onSubmit: o[2] || (o[2] = (n) => e(i).applyProduct(n.map((v) => v._id)))
|
|
250
|
-
}, {
|
|
251
|
-
default: m(({ trigger: n }) => [
|
|
252
|
-
a(V, {
|
|
253
|
-
label: e(t)("menu.products.actions.apply_scheduler"),
|
|
254
|
-
onClick: n
|
|
255
|
-
}, null, 8, ["label", "onClick"])
|
|
256
|
-
]),
|
|
257
|
-
_: 1
|
|
258
|
-
}, 8, ["categorized-items", "initial-value"]))
|
|
259
|
-
], 64)) : L("", !0)
|
|
260
|
-
])
|
|
261
|
-
])
|
|
262
|
-
]),
|
|
263
|
-
_: 1
|
|
264
|
-
}, 8, ["heading"]);
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
});
|
|
268
|
-
export {
|
|
269
|
-
Le as default
|
|
270
|
-
};
|