@feedmepos/mf-menu 0.23.10-prod.2 → 0.23.10-prod.3
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-C8YvLeTF.js → App-CUdOF1lD.js} +3 -3
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-CTFJvWM4.js → ApplyProduct.vue_vue_type_script_setup_true_lang-C0EsSY5o.js} +2 -2
- package/dist/{Catalog-ClzUdFxt.js → Catalog-DQ3qzamR.js} +20 -20
- package/dist/{Category-Cmfpovi8.js → Category-BEfmTsto.js} +5 -5
- package/dist/{CookingGuide-iOt0swkn.js → CookingGuide-BlGNp0gD.js} +4 -4
- package/dist/{Group-DAvakz4L.js → Group-B_TWCv5p.js} +3 -3
- package/dist/{Group-DYmn8IOl.js → Group-msc3rkCR.js} +1 -1
- package/dist/Group.vue_vue_type_script_setup_true_lang-BZongvdE.js +589 -0
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BUxXXG6k.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DZ7YvsYT.js} +2 -2
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-BZrQQSZJ.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-B4HjTI4n.js} +29495 -26316
- package/dist/{Ingredient-C1f4ZN7_.js → Ingredient-D6c6GtL9.js} +15 -15
- package/dist/InventoryBinding.vue_vue_type_script_setup_true_lang-D07Mn484.js +21909 -0
- package/dist/{LinkProductSideSheet-DtdP_0BL.js → LinkProductSideSheet-FGQN0RjX.js} +2 -2
- package/dist/{MenuSetting-DI38_4FS.js → MenuSetting-CROJoPLL.js} +2 -2
- package/dist/{PrintRoute-GTCRYqGb.js → PrintRoute-BQkAmutA.js} +4 -4
- package/dist/{Product-Dkasmjmt.js → Product-BCOosmBf.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-mGnQ2LUs.js → Product.vue_vue_type_script_setup_true_lang-wBpGPDSk.js} +10 -10
- package/dist/Products-DeT0VXY4.js +327 -0
- package/dist/{Publish-H42TQv2L.js → Publish-DqiH_qtX.js} +30 -30
- package/dist/{Recipe-DUoZ7TTF.js → Recipe-DoH-Zx-x.js} +14 -14
- package/dist/{Scheduler-CdO9E38B.js → Scheduler-BXnsSB0J.js} +3 -3
- package/dist/{SchedulerSelector.vue_vue_type_script_setup_true_lang-CJPgvvv7.js → SchedulerSelector.vue_vue_type_script_setup_true_lang-Dodk0Sro.js} +1 -1
- package/dist/{ServingSequence-9PQmhk2e.js → ServingSequence-CTl_2Eav.js} +3 -3
- package/dist/{Setting-nYK5jgil.js → Setting-Da-WTI2Q.js} +4 -4
- package/dist/{Takeaway-QpAn57vg.js → Takeaway-C0gEPnF9.js} +1 -1
- package/dist/{Takeaway-CFVXJXbf.js → Takeaway-DkB3Fedy.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BMJwiQr6.js → Takeaway.vue_vue_type_script_setup_true_lang-DA-1Dbck.js} +5 -5
- package/dist/{Unit-CYIhqZeX.js → Unit-DHYLncIX.js} +2 -2
- package/dist/{Variant-D4yWn2iM.js → Variant-CBO_rkOu.js} +3 -3
- package/dist/{_id_-DCKaeAgj.js → _id_-0m5rPhWo.js} +7 -7
- package/dist/{app-BUcYRyrl.js → app-B8Q4Y-Fy.js} +1 -1
- package/dist/{app-DQYJxThv.js → app-CzifZMeS.js} +515 -679
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +2 -0
- package/dist/apps/mf-menu/src/components/import/PreviewAddonContent.vue.d.ts +71 -0
- package/dist/apps/mf-menu/src/components/import/PreviewContent2.vue.d.ts +7 -3
- package/dist/apps/mf-menu/src/helper/import-export.d.ts +176 -116
- package/dist/apps/mf-menu/src/manager/menu/item.d.ts +2 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-BVq3G91g.js → linked-status-DYP1aR1Y.js} +3 -3
- package/dist/assets/{override-menu-BSF4at2W.js → override-menu-kB69jb7a.js} +3 -3
- package/dist/assets/{validate-menu-CecOIaf7.js → validate-menu-BfPd18qC.js} +3 -3
- package/dist/{catalog-D7Ldv7BK.js → catalog-BceRoIR7.js} +1 -1
- package/dist/{catalogSetting-BYgjjocH.js → catalogSetting-C4uMnH59.js} +1 -1
- package/dist/{currency-CN3EG_m3.js → currency-DE-aZP97.js} +1 -1
- package/dist/{discardConfirm-BQpwWpH7.js → discardConfirm-BBQeyzO_.js} +1 -1
- package/dist/{index-BZ4Y7cEu.js → index-DIUiBgC4.js} +3 -3
- package/dist/{index-BhU6NNaY.js → index-DkT8pmkQ.js} +4 -4
- package/dist/{item-C2drLoa9.js → item-BDe4ci28.js} +2445 -2389
- package/dist/{menu-BeISDKAr.js → menu-Cm-vmC2P.js} +1 -1
- package/dist/{menu-Cij6u5dZ.js → menu-q1fS_eLt.js} +19 -19
- package/dist/{remy-BGM4_GGa.js → remy-jsi7Gg_X.js} +2 -2
- package/dist/{scheduler-1DH1E_Uz.js → scheduler-CiZNsD7o.js} +4 -4
- package/dist/style.css +1 -1
- package/dist/{toExcel-C1OFwAWV.js → toExcel-CxZ1LIqR.js} +2 -2
- package/dist/{unit-TjPR0QL1.js → unit-BxL1Pe1l.js} +5 -5
- package/package.json +7 -6
- package/dist/Group.vue_vue_type_script_setup_true_lang-eHQf10NK.js +0 -576
- package/dist/InventoryBinding.vue_vue_type_script_setup_true_lang-5-qX5lbB.js +0 -7393
- package/dist/Products-WjNex4as.js +0 -244
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
import { defineComponent as T, computed as f, ref as C, resolveComponent as M, openBlock as u, createBlock as g, unref as e, withCtx as p, createElementVNode as i, toDisplayString as A, createVNode as n, createCommentVNode as z, createElementBlock as $, Fragment as E } from "vue";
|
|
2
|
-
import { u as L, B as O, z as I, D as N, G as j, A as J, H as P, I as K } from "./menu-Cij6u5dZ.js";
|
|
3
|
-
import { l as Q } from "./discardConfirm-BQpwWpH7.js";
|
|
4
|
-
import "vue-router";
|
|
5
|
-
import { u as W, a as X, M as Z, w as ee } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-BZrQQSZJ.js";
|
|
6
|
-
import { useCoreStore as te, useI18n as oe } from "@feedmepos/mf-common";
|
|
7
|
-
import { useDialog as q, useDialogChild as ne, useSnackbar as H, useBreakpoints as ae, FmButtonColorThemeVariant as h, FmButtonVariant as D } from "@feedmepos/ui-library";
|
|
8
|
-
import { _ as F } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-CdVvtXw-.js";
|
|
9
|
-
import { _ as re, a as B } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DPis3HVx.js";
|
|
10
|
-
import { _ as se } from "./PageLayout.vue_vue_type_script_setup_true_lang-BJCuL4EK.js";
|
|
11
|
-
import { u as le, a as ie } from "./menu-BeISDKAr.js";
|
|
12
|
-
import { u as ue } from "./item-C2drLoa9.js";
|
|
13
|
-
import { _ as ce, a as R } from "./Product.vue_vue_type_script_setup_true_lang-mGnQ2LUs.js";
|
|
14
|
-
import { L as U } from "./LinkProductSideSheet-DtdP_0BL.js";
|
|
15
|
-
import { m as me } from "./toExcel-C1OFwAWV.js";
|
|
16
|
-
const de = { class: "space-y-24 mb-24" }, pe = ["innerHTML"], fe = { class: "flex justify-end gap-8" }, _e = /* @__PURE__ */ T({
|
|
17
|
-
__name: "ConfirmActionDialog",
|
|
18
|
-
props: {
|
|
19
|
-
description: {},
|
|
20
|
-
value: {},
|
|
21
|
-
message: { default: "To confirm your action, type <b>[[value]]</b> in the text field." }
|
|
22
|
-
},
|
|
23
|
-
setup(w) {
|
|
24
|
-
const t = w, k = f(() => t.message.replace("[[value]]", t.value)), o = C(""), x = q(), { emitAction: y } = ne();
|
|
25
|
-
return (c, a) => {
|
|
26
|
-
const s = M("FmTextField"), m = M("FmButton"), _ = M("FmForm");
|
|
27
|
-
return u(), g(_, {
|
|
28
|
-
"on-validation-success": () => e(y)("primary"),
|
|
29
|
-
"blame-form-child-on-validation-failed": ""
|
|
30
|
-
}, {
|
|
31
|
-
default: p(() => [
|
|
32
|
-
i("div", de, [
|
|
33
|
-
i("div", null, A(c.description), 1),
|
|
34
|
-
i("div", { innerHTML: k.value }, null, 8, pe),
|
|
35
|
-
i("div", null, [
|
|
36
|
-
n(s, {
|
|
37
|
-
modelValue: o.value,
|
|
38
|
-
"onUpdate:modelValue": [
|
|
39
|
-
a[0] || (a[0] = (l) => o.value = l),
|
|
40
|
-
a[1] || (a[1] = () => {
|
|
41
|
-
})
|
|
42
|
-
],
|
|
43
|
-
placeholder: c.value,
|
|
44
|
-
rules: [(l) => l === c.value || "Value does not match"]
|
|
45
|
-
}, null, 8, ["modelValue", "placeholder", "rules"])
|
|
46
|
-
]),
|
|
47
|
-
i("div", fe, [
|
|
48
|
-
n(m, {
|
|
49
|
-
label: "Cancel",
|
|
50
|
-
variant: "secondary",
|
|
51
|
-
onClick: a[2] || (a[2] = (l) => e(x).close())
|
|
52
|
-
}),
|
|
53
|
-
n(m, {
|
|
54
|
-
label: "Confirm",
|
|
55
|
-
type: "submit"
|
|
56
|
-
})
|
|
57
|
-
])
|
|
58
|
-
])
|
|
59
|
-
]),
|
|
60
|
-
_: 1
|
|
61
|
-
}, 8, ["on-validation-success"]);
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
}), ve = /* @__PURE__ */ T({
|
|
65
|
-
__name: "Migrate",
|
|
66
|
-
setup(w) {
|
|
67
|
-
const t = L(), k = te(), o = H(), { minor: x } = O(o), y = C(!1), c = q();
|
|
68
|
-
async function a() {
|
|
69
|
-
s.value || y.value || c.open({
|
|
70
|
-
title: "Migrate to new version",
|
|
71
|
-
contentComponent: _e,
|
|
72
|
-
contentComponentProps: {
|
|
73
|
-
value: "MIGRATE",
|
|
74
|
-
description: "Do you want to migrate to new version? Once migrate it will unable to revert to the older version."
|
|
75
|
-
}
|
|
76
|
-
}).onPrimary(async () => {
|
|
77
|
-
c.close(), await x(
|
|
78
|
-
async () => {
|
|
79
|
-
await t.migrate(), setTimeout(() => {
|
|
80
|
-
window.location.reload();
|
|
81
|
-
}, 2e3);
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
isLoading: y,
|
|
85
|
-
customId: t.state.menu._id,
|
|
86
|
-
message: "Migrating menu",
|
|
87
|
-
successMessage: "Migration completed"
|
|
88
|
-
}
|
|
89
|
-
);
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
const s = f(() => {
|
|
93
|
-
const m = k.restaurants.value;
|
|
94
|
-
if (!m.length) return "Required at least one restaurant to migrate";
|
|
95
|
-
const _ = m.filter((v) => !v.posVersion || !I.Pos.canUse({ feature: N.F_FEATURE.enum.menuV4, posVersion: v.posVersion }));
|
|
96
|
-
return _.length ? `Upgrade POS to V${I.Pos.minVersionToUse(N.F_FEATURE.enum.menuV4)} to use new menu: ${_.map((v) => v.profile.name).join(", ")}` : null;
|
|
97
|
-
});
|
|
98
|
-
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, _) => {
|
|
99
|
-
const l = M("FmSnackbar");
|
|
100
|
-
return !s.value && e(t).version !== e(j.F_MENU_VERSION).enum.v4 ? (u(), g(l, {
|
|
101
|
-
key: 0,
|
|
102
|
-
class: "!max-w-full",
|
|
103
|
-
title: "New version of menu is out now!",
|
|
104
|
-
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.",
|
|
105
|
-
variant: "info",
|
|
106
|
-
action: "Migrate",
|
|
107
|
-
"z-index": 0,
|
|
108
|
-
onOnAction: a
|
|
109
|
-
})) : z("", !0);
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
}), ge = { class: "flex-1 flex justify-between gap-8 pl-8" }, ye = { class: "flex items-center" }, be = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, ke = { class: "fm-typo-en-body-md-600 font-semibold" }, xe = { class: "flex gap-8" }, Re = /* @__PURE__ */ T({
|
|
113
|
-
__name: "Products",
|
|
114
|
-
setup(w) {
|
|
115
|
-
const { t } = oe(), k = O(H()), o = L(), x = f(() => o.rules.item), y = ue(), c = f(() => !o.state.currentSchedulerId), a = W(), s = X(), { selectedCategories: m } = le(), _ = f(() => ({
|
|
116
|
-
...J.menuV4ToV3(P(o.state.menu)),
|
|
117
|
-
_id: o.state.menu._id,
|
|
118
|
-
_rev: o.state.menu._rev
|
|
119
|
-
})), l = f(() => Q.flatten(m.value.map((b) => b.items)).length);
|
|
120
|
-
async function v() {
|
|
121
|
-
await k.minor(
|
|
122
|
-
async () => {
|
|
123
|
-
await o.readMenu();
|
|
124
|
-
let b;
|
|
125
|
-
if (o.version === j.F_MENU_VERSION.enum.v4) {
|
|
126
|
-
const S = P(o.state.menu);
|
|
127
|
-
b = new Z(S).exportToExcel();
|
|
128
|
-
} else
|
|
129
|
-
b = me(_.value);
|
|
130
|
-
const d = `menu_${K().format("DD-MM-YYYY_HH-mm")}`;
|
|
131
|
-
await ee(b, `${d}.xlsx`, {
|
|
132
|
-
bookType: "xlsx",
|
|
133
|
-
bookSST: !1,
|
|
134
|
-
type: "array"
|
|
135
|
-
});
|
|
136
|
-
},
|
|
137
|
-
{ successMessage: "Menu exported", customId: o.state.menu._id }
|
|
138
|
-
);
|
|
139
|
-
}
|
|
140
|
-
C(!1), C(!1);
|
|
141
|
-
const Y = ae(), G = f(() => Y.breakpoints.value.xs);
|
|
142
|
-
return ie().resetOnMount(), (b, d) => {
|
|
143
|
-
const S = M("fm-button");
|
|
144
|
-
return u(), g(se, {
|
|
145
|
-
heading: e(t)("menu.products.title")
|
|
146
|
-
}, {
|
|
147
|
-
default: p(() => [
|
|
148
|
-
n(ve),
|
|
149
|
-
n(ce)
|
|
150
|
-
]),
|
|
151
|
-
"append-heading": p(() => [
|
|
152
|
-
i("div", ge, [
|
|
153
|
-
i("div", ye, [
|
|
154
|
-
i("div", be, [
|
|
155
|
-
i("p", ke, A(l.value), 1)
|
|
156
|
-
])
|
|
157
|
-
]),
|
|
158
|
-
i("div", xe, [
|
|
159
|
-
G.value ? (u(), g(R, { key: 1 }, {
|
|
160
|
-
default: p(({ trigger: r }) => [
|
|
161
|
-
n(re, null, {
|
|
162
|
-
default: p(() => [
|
|
163
|
-
n(B, {
|
|
164
|
-
label: e(t)("menu.products.actions.export"),
|
|
165
|
-
onClick: v
|
|
166
|
-
}, null, 8, ["label"]),
|
|
167
|
-
n(B, {
|
|
168
|
-
label: e(t)("menu.products.actions.import"),
|
|
169
|
-
onClick: r
|
|
170
|
-
}, null, 8, ["label", "onClick"])
|
|
171
|
-
]),
|
|
172
|
-
_: 2
|
|
173
|
-
}, 1024)
|
|
174
|
-
]),
|
|
175
|
-
_: 1
|
|
176
|
-
})) : (u(), $(E, { key: 0 }, [
|
|
177
|
-
n(S, {
|
|
178
|
-
"bg-color": e(h).NeutralGray100,
|
|
179
|
-
"text-color": e(h).TypoSecondary,
|
|
180
|
-
variant: e(D).Primary,
|
|
181
|
-
label: e(t)("menu.products.actions.export"),
|
|
182
|
-
onClick: v
|
|
183
|
-
}, null, 8, ["bg-color", "text-color", "variant", "label"]),
|
|
184
|
-
n(R, null, {
|
|
185
|
-
default: p(({ trigger: r }) => [
|
|
186
|
-
n(S, {
|
|
187
|
-
"bg-color": e(h).NeutralGray100,
|
|
188
|
-
"text-color": e(h).TypoSecondary,
|
|
189
|
-
variant: e(D).Primary,
|
|
190
|
-
label: e(t)("menu.products.actions.import"),
|
|
191
|
-
onClick: r
|
|
192
|
-
}, null, 8, ["bg-color", "text-color", "variant", "label", "onClick"])
|
|
193
|
-
]),
|
|
194
|
-
_: 1
|
|
195
|
-
})
|
|
196
|
-
], 64)),
|
|
197
|
-
l.value > 0 ? (u(), $(E, { key: 2 }, [
|
|
198
|
-
x.value.create ? (u(), g(F, {
|
|
199
|
-
key: 0,
|
|
200
|
-
label: e(t)("menu.products.actions.add"),
|
|
201
|
-
"prepend-icon": "add",
|
|
202
|
-
onClick: d[0] || (d[0] = (r) => e(y).create(null))
|
|
203
|
-
}, null, 8, ["label"])) : c.value ? (u(), g(U, {
|
|
204
|
-
key: 1,
|
|
205
|
-
"categorized-items": e(a).linkableItems.value,
|
|
206
|
-
"initial-value": e(a).currentItems.value,
|
|
207
|
-
"show-variant": !1,
|
|
208
|
-
onSubmit: d[1] || (d[1] = (r) => e(a).applyProduct(r.map((V) => V._id)))
|
|
209
|
-
}, {
|
|
210
|
-
default: p(({ trigger: r }) => [
|
|
211
|
-
n(F, {
|
|
212
|
-
label: e(t)("menu.products.actions.link"),
|
|
213
|
-
"prepend-icon": "link",
|
|
214
|
-
onClick: r
|
|
215
|
-
}, null, 8, ["label", "onClick"])
|
|
216
|
-
]),
|
|
217
|
-
_: 1
|
|
218
|
-
}, 8, ["categorized-items", "initial-value"])) : (u(), g(U, {
|
|
219
|
-
key: 2,
|
|
220
|
-
"categorized-items": e(s).linkableItems.value,
|
|
221
|
-
"initial-value": e(s).currentItems.value,
|
|
222
|
-
"show-variant": !1,
|
|
223
|
-
onSubmit: d[2] || (d[2] = (r) => e(s).applyProduct(r.map((V) => V._id)))
|
|
224
|
-
}, {
|
|
225
|
-
default: p(({ trigger: r }) => [
|
|
226
|
-
n(F, {
|
|
227
|
-
label: e(t)("menu.products.actions.apply_scheduler"),
|
|
228
|
-
onClick: r
|
|
229
|
-
}, null, 8, ["label", "onClick"])
|
|
230
|
-
]),
|
|
231
|
-
_: 1
|
|
232
|
-
}, 8, ["categorized-items", "initial-value"]))
|
|
233
|
-
], 64)) : z("", !0)
|
|
234
|
-
])
|
|
235
|
-
])
|
|
236
|
-
]),
|
|
237
|
-
_: 1
|
|
238
|
-
}, 8, ["heading"]);
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
});
|
|
242
|
-
export {
|
|
243
|
-
Re as default
|
|
244
|
-
};
|