@feedmepos/mf-menu 0.18.17 → 0.19.0-beta.2
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/ApplyProduct.vue_vue_type_script_setup_true_lang-DFJJHptK.js +158 -0
- package/dist/{ApplyProducts.vue_vue_type_script_setup_true_lang-BJ0b_uKf.js → ApplyProducts.vue_vue_type_script_setup_true_lang-CXoRwrTi.js} +2 -2
- package/dist/Catalog-CXzqtCF8.js +551 -0
- package/dist/Category-DKbtLbq8.js +387 -0
- package/dist/CookingGuide-BKon8TdH.js +862 -0
- package/dist/Group-D1UDksBG.js +46 -0
- package/dist/{Group-jEtbECLb.js → Group-izOWb_Bh.js} +1 -1
- package/dist/Group.vue_vue_type_script_setup_true_lang-DAlQcgYp.js +558 -0
- package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Q7es2wmt.js +237 -0
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Bw4uxqAp.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-Db0uYw5O.js} +11723 -11723
- package/dist/Ingredient-BIJu9P_9.js +484 -0
- package/dist/LinkProductSideSheet-BNdFZThd.js +104 -0
- package/dist/PrintRoute--fYPFcy7.js +417 -0
- package/dist/{Product-Bnr9oFr2.js → Product-vLtISbkD.js} +1 -1
- package/dist/Product.vue_vue_type_script_setup_true_lang-BHCihe6o.js +826 -0
- package/dist/Products-JaCNtcHS.js +236 -0
- package/dist/Publish-jpmiyB-b.js +525 -0
- package/dist/Recipe-B6y-oLPG.js +320 -0
- package/dist/Scheduler-Dj1rlr-U.js +222 -0
- package/dist/SchedulerSelector.vue_vue_type_script_setup_true_lang-BVAkohGJ.js +48 -0
- package/dist/ServingSequence-BhIfCyXl.js +4 -0
- package/dist/{Setting-DN8TQdIR.js → Setting-B5R1JfaL.js} +1 -1
- package/dist/Setting.vue_vue_type_script_setup_true_lang-xXtg0JOn.js +253 -0
- package/dist/Takeaway-BSFSz_JL.js +63 -0
- package/dist/{Takeaway-y0Nk0JAb.js → Takeaway-DjFTtbw6.js} +1 -1
- package/dist/Takeaway.vue_vue_type_script_setup_true_lang-BUGL0wfZ.js +302 -0
- package/dist/TaxSetting-D9Q8XNgJ.js +25 -0
- package/dist/Unit-Cr_8O3zB.js +142 -0
- package/dist/Variant-loUMfNRB.js +222 -0
- package/dist/_id_-0w7KjYyQ.js +189 -0
- package/dist/{app-D7e31gIv.js → app-t9ONnc0s.js} +31701 -26207
- package/dist/app.js +7 -6
- package/dist/apps/mf-menu/src/app.d.ts +2784 -0
- package/dist/apps/mf-menu/src/components/feature/Fields/OrderFrom.vue.d.ts +2 -2
- package/dist/apps/mf-menu/src/components/feature/LinkProduct/LinkProductSideSheet.vue.d.ts +2 -2
- package/dist/apps/mf-menu/src/manager/menu/catalog.d.ts +1 -0
- package/dist/apps/mf-menu/src/stores/manager/item.d.ts +1 -1
- package/dist/apps/mf-menu/src/stores/menu.d.ts +16 -16
- package/dist/apps/mf-menu/src/views/Publish/UpdateCatalogDialog.vue.d.ts +12 -12
- package/dist/apps/mf-menu/src/views/Scheduler/FilterForm.vue.d.ts +4 -4
- package/dist/apps/mf-menu/src/views/Scheduler/SchedulerDialog.vue.d.ts +4 -4
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-D5tq3eE2.js → linked-status-DLL4aRiX.js} +8 -8
- package/dist/assets/{validate-menu-AcCpPyQZ.js → validate-menu-CoXc16jh.js} +8 -8
- package/dist/{catalog-Ck7lLTN2.js → catalog-4OmC0JA3.js} +66 -62
- package/dist/category-BE33DRqp.js +155 -0
- package/dist/{currency-CclA5a-2.js → currency-JHgYNbTQ.js} +1 -1
- package/dist/{index-DDd9B_ur.js → index-CE3zjhyh.js} +732 -740
- package/dist/index-pSg9p-28.js +238 -0
- package/dist/item-CEPx51U1.js +6371 -0
- package/dist/{lodash-BIQx_fko.js → lodash-VivR_BQ2.js} +1 -1
- package/dist/{menu-CYzbNubv.js → menu-ETQrtbbU.js} +1 -1
- package/dist/{object-DUtbNpoS.js → object-DEM5FMTB.js} +4 -4
- package/dist/scheduler-SRT_5Nio.js +491 -0
- package/dist/string-DpfFixWH.js +4 -0
- package/dist/style.css +1 -1
- package/dist/takeaway-RcvqKigG.js +267 -0
- package/dist/{toExcel-BXPcj8Gp.js → toExcel-BcgskY3F.js} +2 -2
- package/dist/unit-DLL7xIF1.js +350 -0
- package/package.json +4 -2
- package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-D9QsJ4vO.js +0 -155
- package/dist/Catalog-CZW54QJU.js +0 -570
- package/dist/Category-DvsP_L7d.js +0 -405
- package/dist/CookingGuide-DC3uXetk.js +0 -848
- package/dist/Group-DK5xqeYX.js +0 -44
- package/dist/Group.vue_vue_type_script_setup_true_lang-DGZ9hnPg.js +0 -538
- package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BQXqlXw4.js +0 -234
- package/dist/Ingredient-354LLwdX.js +0 -498
- package/dist/LinkProductSideSheet-anxSsu0z.js +0 -102
- package/dist/PrintRoute-DrSvtNLX.js +0 -425
- package/dist/Product.vue_vue_type_script_setup_true_lang-bBY54Q_1.js +0 -815
- package/dist/Products-CZyueqSO.js +0 -234
- package/dist/Publish-kRM1UuPk.js +0 -518
- package/dist/Recipe-nKpLIJs8.js +0 -345
- package/dist/Scheduler-DmZ8atXG.js +0 -233
- package/dist/SchedulerSelector.vue_vue_type_script_setup_true_lang-CdsxA-p0.js +0 -48
- package/dist/ServingSequence-j00_ko5R.js +0 -4
- package/dist/Setting.vue_vue_type_script_setup_true_lang-Cx06MCJs.js +0 -247
- package/dist/Takeaway-BXZXCAaM.js +0 -61
- package/dist/Takeaway.vue_vue_type_script_setup_true_lang-9WVkdLZF.js +0 -316
- package/dist/TaxSetting-DdHx7ACN.js +0 -21
- package/dist/Unit-biPvleyL.js +0 -161
- package/dist/Variant-BP1IRNQx.js +0 -231
- package/dist/_id_-BiaNDI2N.js +0 -188
- package/dist/category-KiA5-36F.js +0 -154
- package/dist/index-BFeZlU8X.js +0 -232
- package/dist/item-Bcg7SiYv.js +0 -6325
- package/dist/scheduler-D1tgE0_9.js +0 -480
- package/dist/takeaway-BKsoD4EL.js +0 -264
- package/dist/unit-CswFvAyc.js +0 -346
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import { defineComponent as F, computed as f, ref as h, resolveComponent as S, openBlock as u, createBlock as g, unref as e, withCtx as p, createElementVNode as l, toDisplayString as U, createVNode as n, createCommentVNode as A, createElementBlock as T, Fragment as E } from "vue";
|
|
2
|
+
import { u as L, a as j, c as P, e as D, b as H, n as G, m as J, d as K, _ as Q, f as V, D as W } from "./app-t9ONnc0s.js";
|
|
3
|
+
import { useCoreStore as X } from "@feedmepos/mf-common";
|
|
4
|
+
import { useDialog as q, useDialogChild as Z, useSnackbar as z, useBreakpoints as ee, FmButtonColorThemeVariant as M, FmButtonVariant as I } from "@feedmepos/ui-library";
|
|
5
|
+
import "vue-router";
|
|
6
|
+
import { L as N } from "./LinkProductSideSheet-BNdFZThd.js";
|
|
7
|
+
import { _ as te, a as B } from "./Product.vue_vue_type_script_setup_true_lang-BHCihe6o.js";
|
|
8
|
+
import { u as ne, a as oe } from "./menu-ETQrtbbU.js";
|
|
9
|
+
import { u as ae } from "./item-CEPx51U1.js";
|
|
10
|
+
import { u as re, a as se, w as ie } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-Db0uYw5O.js";
|
|
11
|
+
import { m as le } from "./toExcel-BcgskY3F.js";
|
|
12
|
+
import { l as ue } from "./lodash-VivR_BQ2.js";
|
|
13
|
+
import { _ as ce, a as R } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DPis3HVx.js";
|
|
14
|
+
const me = { class: "space-y-24 mb-24" }, de = ["innerHTML"], pe = { class: "flex justify-end gap-8" }, fe = /* @__PURE__ */ F({
|
|
15
|
+
__name: "ConfirmActionDialog",
|
|
16
|
+
props: {
|
|
17
|
+
description: {},
|
|
18
|
+
value: {},
|
|
19
|
+
message: { default: "To confirm your action, type <b>[[value]]</b> in the text field." }
|
|
20
|
+
},
|
|
21
|
+
setup(C) {
|
|
22
|
+
const t = C, y = f(() => t.message.replace("[[value]]", t.value)), o = h(""), k = q(), { emitAction: b } = Z();
|
|
23
|
+
return (c, a) => {
|
|
24
|
+
const s = S("FmTextField"), m = S("FmButton"), _ = S("FmForm");
|
|
25
|
+
return u(), g(_, {
|
|
26
|
+
"on-validation-success": () => e(b)("primary"),
|
|
27
|
+
"blame-form-child-on-validation-failed": ""
|
|
28
|
+
}, {
|
|
29
|
+
default: p(() => [
|
|
30
|
+
l("div", me, [
|
|
31
|
+
l("div", null, U(c.description), 1),
|
|
32
|
+
l("div", { innerHTML: y.value }, null, 8, de),
|
|
33
|
+
l("div", null, [
|
|
34
|
+
n(s, {
|
|
35
|
+
modelValue: o.value,
|
|
36
|
+
"onUpdate:modelValue": [
|
|
37
|
+
a[0] || (a[0] = (i) => o.value = i),
|
|
38
|
+
a[1] || (a[1] = () => {
|
|
39
|
+
})
|
|
40
|
+
],
|
|
41
|
+
placeholder: c.value,
|
|
42
|
+
rules: [(i) => i === c.value || "Value does not match"]
|
|
43
|
+
}, null, 8, ["modelValue", "placeholder", "rules"])
|
|
44
|
+
]),
|
|
45
|
+
l("div", pe, [
|
|
46
|
+
n(m, {
|
|
47
|
+
label: "Cancel",
|
|
48
|
+
variant: "secondary",
|
|
49
|
+
onClick: a[2] || (a[2] = (i) => e(k).close())
|
|
50
|
+
}),
|
|
51
|
+
n(m, {
|
|
52
|
+
label: "Confirm",
|
|
53
|
+
type: "submit"
|
|
54
|
+
})
|
|
55
|
+
])
|
|
56
|
+
])
|
|
57
|
+
]),
|
|
58
|
+
_: 1
|
|
59
|
+
}, 8, ["on-validation-success"]);
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
}), _e = /* @__PURE__ */ F({
|
|
63
|
+
__name: "Migrate",
|
|
64
|
+
setup(C) {
|
|
65
|
+
const t = L(), y = X(), o = z(), { minor: k } = j(o), b = h(!1), c = q();
|
|
66
|
+
async function a() {
|
|
67
|
+
s.value || b.value || c.open({
|
|
68
|
+
title: "Migrate to new version",
|
|
69
|
+
contentComponent: fe,
|
|
70
|
+
contentComponentProps: {
|
|
71
|
+
value: "MIGRATE",
|
|
72
|
+
description: "Do you want to migrate to new version? Once migrate it will unable to revert to the older version."
|
|
73
|
+
}
|
|
74
|
+
}).onPrimary(async () => {
|
|
75
|
+
c.close(), await k(
|
|
76
|
+
async () => {
|
|
77
|
+
await t.migrate(), setTimeout(() => {
|
|
78
|
+
window.location.reload();
|
|
79
|
+
}, 2e3);
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
isLoading: b,
|
|
83
|
+
customId: t.state.menu._id,
|
|
84
|
+
message: "Migrating menu",
|
|
85
|
+
successMessage: "Migration completed"
|
|
86
|
+
}
|
|
87
|
+
);
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
const s = f(() => {
|
|
91
|
+
const m = y.restaurants.value;
|
|
92
|
+
if (!m.length) return "Required at least one restaurant to migrate";
|
|
93
|
+
const _ = m.filter((v) => !v.posVersion || !P.Pos.canUse({ feature: D.F_FEATURE.enum.menuV4, posVersion: v.posVersion }));
|
|
94
|
+
return _.length ? `Upgrade POS to V${P.Pos.minVersionToUse(D.F_FEATURE.enum.menuV4)} to use new menu: ${_.map((v) => v.profile.name).join(", ")}` : null;
|
|
95
|
+
});
|
|
96
|
+
return f(() => s.value ? s.value : "Migrate your menu to new version to enjoy more features. Content of new menu will remain the same as current."), (m, _) => {
|
|
97
|
+
const i = S("FmSnackbar");
|
|
98
|
+
return !s.value && e(t).version !== e(H.F_MENU_VERSION).enum.v4 ? (u(), g(i, {
|
|
99
|
+
key: 0,
|
|
100
|
+
class: "!max-w-full",
|
|
101
|
+
title: "New version of menu is out now!",
|
|
102
|
+
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.",
|
|
103
|
+
variant: "info",
|
|
104
|
+
action: "Migrate",
|
|
105
|
+
"z-index": 0,
|
|
106
|
+
onOnAction: a
|
|
107
|
+
})) : A("", !0);
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
}), ve = { class: "flex-1 flex justify-between gap-8 pl-8" }, ge = { class: "flex items-center" }, be = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, ye = { class: "fm-typo-en-body-md-600 font-semibold" }, ke = { class: "flex gap-8" }, Ie = /* @__PURE__ */ F({
|
|
111
|
+
__name: "Products",
|
|
112
|
+
setup(C) {
|
|
113
|
+
const { t } = G(), y = j(z()), o = L(), k = f(() => o.rules.item), b = ae(), c = f(() => !o.state.currentSchedulerId), a = re(), s = se(), { selectedCategories: m } = ne(), _ = f(() => ({
|
|
114
|
+
...J.menuV4ToV3(K(o.state.menu)),
|
|
115
|
+
_id: o.state.menu._id,
|
|
116
|
+
_rev: o.state.menu._rev
|
|
117
|
+
})), i = f(() => ue.flatten(m.value.map((x) => x.items)).length);
|
|
118
|
+
async function v() {
|
|
119
|
+
await y.minor(
|
|
120
|
+
async () => {
|
|
121
|
+
await o.readMenu();
|
|
122
|
+
const x = await le(_.value), d = `menu_${W().format("DD-MM-YYYY_HH-mm")}`;
|
|
123
|
+
await ie(x, `${d}.xlsx`, {
|
|
124
|
+
bookType: "xlsx",
|
|
125
|
+
bookSST: !1,
|
|
126
|
+
type: "array"
|
|
127
|
+
});
|
|
128
|
+
},
|
|
129
|
+
{ successMessage: "Menu exported", customId: o.state.menu._id }
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
h(!1), h(!1);
|
|
133
|
+
const O = ee(), Y = f(() => O.breakpoints.value.xs);
|
|
134
|
+
return oe().resetOnMount(), (x, d) => {
|
|
135
|
+
const $ = S("fm-button");
|
|
136
|
+
return u(), g(Q, {
|
|
137
|
+
heading: e(t)("menu.products.title")
|
|
138
|
+
}, {
|
|
139
|
+
default: p(() => [
|
|
140
|
+
n(_e),
|
|
141
|
+
n(te)
|
|
142
|
+
]),
|
|
143
|
+
"append-heading": p(() => [
|
|
144
|
+
l("div", ve, [
|
|
145
|
+
l("div", ge, [
|
|
146
|
+
l("div", be, [
|
|
147
|
+
l("p", ye, U(i.value), 1)
|
|
148
|
+
])
|
|
149
|
+
]),
|
|
150
|
+
l("div", ke, [
|
|
151
|
+
Y.value ? (u(), g(B, { key: 1 }, {
|
|
152
|
+
default: p(({ trigger: r }) => [
|
|
153
|
+
n(ce, null, {
|
|
154
|
+
default: p(() => [
|
|
155
|
+
n(R, {
|
|
156
|
+
label: e(t)("menu.products.actions.export"),
|
|
157
|
+
onClick: v
|
|
158
|
+
}, null, 8, ["label"]),
|
|
159
|
+
n(R, {
|
|
160
|
+
label: e(t)("menu.products.actions.import"),
|
|
161
|
+
onClick: r
|
|
162
|
+
}, null, 8, ["label", "onClick"])
|
|
163
|
+
]),
|
|
164
|
+
_: 2
|
|
165
|
+
}, 1024)
|
|
166
|
+
]),
|
|
167
|
+
_: 1
|
|
168
|
+
})) : (u(), T(E, { key: 0 }, [
|
|
169
|
+
n($, {
|
|
170
|
+
"bg-color": e(M).NeutralGray100,
|
|
171
|
+
"text-color": e(M).TypoSecondary,
|
|
172
|
+
variant: e(I).Primary,
|
|
173
|
+
label: e(t)("menu.products.actions.export"),
|
|
174
|
+
onClick: v
|
|
175
|
+
}, null, 8, ["bg-color", "text-color", "variant", "label"]),
|
|
176
|
+
n(B, null, {
|
|
177
|
+
default: p(({ trigger: r }) => [
|
|
178
|
+
n($, {
|
|
179
|
+
"bg-color": e(M).NeutralGray100,
|
|
180
|
+
"text-color": e(M).TypoSecondary,
|
|
181
|
+
variant: e(I).Primary,
|
|
182
|
+
label: e(t)("menu.products.actions.import"),
|
|
183
|
+
onClick: r
|
|
184
|
+
}, null, 8, ["bg-color", "text-color", "variant", "label", "onClick"])
|
|
185
|
+
]),
|
|
186
|
+
_: 1
|
|
187
|
+
})
|
|
188
|
+
], 64)),
|
|
189
|
+
i.value > 0 ? (u(), T(E, { key: 2 }, [
|
|
190
|
+
k.value.create ? (u(), g(V, {
|
|
191
|
+
key: 0,
|
|
192
|
+
label: e(t)("menu.products.actions.add"),
|
|
193
|
+
"prepend-icon": "add",
|
|
194
|
+
onClick: d[0] || (d[0] = (r) => e(b).create(null))
|
|
195
|
+
}, null, 8, ["label"])) : c.value ? (u(), g(N, {
|
|
196
|
+
key: 1,
|
|
197
|
+
"categorized-items": e(a).linkableItems,
|
|
198
|
+
"initial-value": e(a).currentItems,
|
|
199
|
+
"show-variant": !1,
|
|
200
|
+
onSubmit: d[1] || (d[1] = (r) => e(a).applyProduct(r.map((w) => w._id)))
|
|
201
|
+
}, {
|
|
202
|
+
default: p(({ trigger: r }) => [
|
|
203
|
+
n(V, {
|
|
204
|
+
label: e(t)("menu.products.actions.link"),
|
|
205
|
+
"prepend-icon": "link",
|
|
206
|
+
onClick: r
|
|
207
|
+
}, null, 8, ["label", "onClick"])
|
|
208
|
+
]),
|
|
209
|
+
_: 1
|
|
210
|
+
}, 8, ["categorized-items", "initial-value"])) : (u(), g(N, {
|
|
211
|
+
key: 2,
|
|
212
|
+
"categorized-items": e(s).linkableItems,
|
|
213
|
+
"initial-value": e(s).currentItems,
|
|
214
|
+
"show-variant": !1,
|
|
215
|
+
onSubmit: d[2] || (d[2] = (r) => e(s).applyProduct(r.map((w) => w._id)))
|
|
216
|
+
}, {
|
|
217
|
+
default: p(({ trigger: r }) => [
|
|
218
|
+
n(V, {
|
|
219
|
+
label: e(t)("menu.products.actions.apply_scheduler"),
|
|
220
|
+
onClick: r
|
|
221
|
+
}, null, 8, ["label", "onClick"])
|
|
222
|
+
]),
|
|
223
|
+
_: 1
|
|
224
|
+
}, 8, ["categorized-items", "initial-value"]))
|
|
225
|
+
], 64)) : A("", !0)
|
|
226
|
+
])
|
|
227
|
+
])
|
|
228
|
+
]),
|
|
229
|
+
_: 1
|
|
230
|
+
}, 8, ["heading"]);
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
export {
|
|
235
|
+
Ie as default
|
|
236
|
+
};
|