@feedmepos/mf-menu 0.20.2 → 0.21.0
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-Ds2qfY_X.js → ApplyProduct.vue_vue_type_script_setup_true_lang-DxlJ6xrN.js} +10 -10
- package/dist/{ApplyProducts.vue_vue_type_script_setup_true_lang-BRepaPR3.js → ApplyProducts.vue_vue_type_script_setup_true_lang-CF-fCyCs.js} +5 -4
- package/dist/{Catalog-S5KDEWzG.js → Catalog-CVmJyr3D.js} +74 -73
- package/dist/{Category-DLaNEtA5.js → Category-CjzACwyb.js} +6 -6
- package/dist/{CookingGuide-DSGZapxz.js → CookingGuide-COZFvS4P.js} +7 -6
- package/dist/{Group-CBMSkmwQ.js → Group-Bun-FrIN.js} +1 -1
- package/dist/{Group-B0VQ-64x.js → Group-xCFTbuXd.js} +7 -7
- package/dist/{Group.vue_vue_type_script_setup_true_lang-DKzrhXtM.js → Group.vue_vue_type_script_setup_true_lang-DSfas9NO.js} +57 -56
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BV-FC8tM.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-kl0WpFCW.js} +24 -24
- package/dist/{Ingredient-CnPQ0kiR.js → Ingredient-w4kVvEml.js} +69 -68
- package/dist/{LinkProductSideSheet-A26Otbdm.js → LinkProductSideSheet-CBHtwxCb.js} +30 -29
- package/dist/{PrintRoute-BlJMdPP0.js → PrintRoute-DXsa638J.js} +30 -29
- package/dist/{Product-BvD813LL.js → Product-BAtB4ebt.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-D_oKtXbh.js → Product.vue_vue_type_script_setup_true_lang-DeJy-daz.js} +276 -279
- package/dist/{Products-B8Ok-bkN.js → Products-BQHiOdhZ.js} +24 -23
- package/dist/{Publish-qBiJUQ4X.js → Publish-DbxeuyRV.js} +68 -67
- package/dist/{Recipe-CJxJJAUV.js → Recipe-T2PlHYY_.js} +84 -83
- package/dist/{Scheduler-DfAMwXCu.js → Scheduler-C-W85pjK.js} +2 -2
- package/dist/{SchedulerSelector.vue_vue_type_script_setup_true_lang-CArE_Hua.js → SchedulerSelector.vue_vue_type_script_setup_true_lang-DQNfBh14.js} +1 -1
- package/dist/ServingSequence-lNzb6f-1.js +4 -0
- package/dist/{Setting-BbgJcWsN.js → Setting-C8gm77EA.js} +1 -1
- package/dist/{Setting.vue_vue_type_script_setup_true_lang-BbVEzNve.js → Setting.vue_vue_type_script_setup_true_lang-BR3_ywqR.js} +13 -12
- package/dist/{Takeaway-wAXsZQN2.js → Takeaway-CCw_DHze.js} +12 -12
- package/dist/{Takeaway-CMDFYeUw.js → Takeaway-DbHgvpIH.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-DSphRs_i.js → Takeaway.vue_vue_type_script_setup_true_lang-DsUQ3Dlh.js} +22 -21
- package/dist/{TaxSetting-C1XOTv-9.js → TaxSetting-BQdKVfBi.js} +4 -4
- package/dist/{Unit-BW3iqgp8.js → Unit-M217TP4K.js} +22 -21
- package/dist/{Variant-BJIxp9PJ.js → Variant-Boy7TugQ.js} +10 -10
- package/dist/{_id_-B25OxuPV.js → _id_-DA8Gpcqf.js} +6 -6
- package/dist/{app-BFJlAowN.js → app-rWkFl8Vq.js} +43468 -73420
- package/dist/app.js +4 -4
- package/dist/assets/linked-status-C8QAoUQr.js +24 -0
- package/dist/assets/validate-menu-DuCKFpOM.js +24 -0
- package/dist/{catalog-Do7RfIKm.js → catalog-Bas11mgo.js} +21595 -21593
- package/dist/{catalog-B-Z6lEFK.js → catalog-CfrgLaRX.js} +1 -1
- package/dist/{category-DEWEor3m.js → category-D-4M9HY7.js} +5 -4
- package/dist/currency-BPHwez-E.js +7 -0
- package/dist/index-Cwb_hpVz.js +7393 -0
- package/dist/{index-BEdHzZvu.js → index-v25k4isU.js} +47 -47
- package/dist/{item-BooojPpg.js → item-DTVh14mw.js} +1195 -1194
- package/dist/{lodash-247YxYiQ.js → lodash-BsZHKgKE.js} +439 -439
- package/dist/{menu-DCnWrgH7.js → menu-CUz01P4H.js} +6 -5
- package/dist/{object-B2cP_UeG.js → object-CbSdUbPF.js} +25 -25
- package/dist/{scheduler-0cChIv2I.js → scheduler-BuIczYeS.js} +13 -12
- package/dist/{takeaway-mwqVQ1ij.js → takeaway-DC-YsV2Q.js} +28 -27
- package/dist/{toExcel-Dha8Vf3u.js → toExcel-CaiFM8FE.js} +237 -237
- package/dist/{unit-BgfdgXAu.js → unit-D_VflvJf.js} +6 -5
- package/dist/{vuedraggable-BEszc36M.js → vuedraggable-WU01qJgi.js} +110 -110
- package/package.json +3 -3
- package/dist/ServingSequence-DxDMeto7.js +0 -4
- package/dist/assets/linked-status-4i88AmvK.js +0 -24
- package/dist/assets/validate-menu-CTKwgXfw.js +0 -24
- package/dist/currency-33gUke3q.js +0 -7
- package/dist/index-BXl09ebx.js +0 -21908
|
@@ -1,15 +1,16 @@
|
|
|
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 i, toDisplayString as
|
|
2
|
-
import { u as
|
|
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 i, toDisplayString as L, createVNode as o, createCommentVNode as U, createElementBlock as T, Fragment as I } from "vue";
|
|
2
|
+
import { u as j, a as q, e as H, m as G, c as J, _ as K, b as V, D as Q } from "./app-rWkFl8Vq.js";
|
|
3
3
|
import { useCoreStore as W, useI18n as X } from "@feedmepos/mf-common";
|
|
4
|
-
import { useDialog as
|
|
4
|
+
import { useDialog as z, useDialogChild as Z, useSnackbar as A, useBreakpoints as ee, FmButtonColorThemeVariant as M, FmButtonVariant as D } from "@feedmepos/ui-library";
|
|
5
|
+
import { Pos as P, F_FEATURE as E } from "@feedmepos/core";
|
|
5
6
|
import "vue-router";
|
|
6
|
-
import { L as N } from "./LinkProductSideSheet-
|
|
7
|
-
import { _ as te, a as B } from "./Product.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { u as oe, a as ne } from "./menu-
|
|
9
|
-
import { u as ae } from "./item-
|
|
10
|
-
import { u as re, a as se, w as le } from "./catalog-
|
|
11
|
-
import { m as ie } from "./toExcel-
|
|
12
|
-
import { l as ue } from "./lodash-
|
|
7
|
+
import { L as N } from "./LinkProductSideSheet-CBHtwxCb.js";
|
|
8
|
+
import { _ as te, a as B } from "./Product.vue_vue_type_script_setup_true_lang-DeJy-daz.js";
|
|
9
|
+
import { u as oe, a as ne } from "./menu-CUz01P4H.js";
|
|
10
|
+
import { u as ae } from "./item-DTVh14mw.js";
|
|
11
|
+
import { u as re, a as se, w as le } from "./catalog-Bas11mgo.js";
|
|
12
|
+
import { m as ie } from "./toExcel-CaiFM8FE.js";
|
|
13
|
+
import { l as ue } from "./lodash-BsZHKgKE.js";
|
|
13
14
|
import { _ as ce, a as R } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DPis3HVx.js";
|
|
14
15
|
const me = { class: "space-y-24 mb-24" }, de = ["innerHTML"], pe = { class: "flex justify-end gap-8" }, fe = /* @__PURE__ */ F({
|
|
15
16
|
__name: "ConfirmActionDialog",
|
|
@@ -19,7 +20,7 @@ const me = { class: "space-y-24 mb-24" }, de = ["innerHTML"], pe = { class: "fle
|
|
|
19
20
|
message: { default: "To confirm your action, type <b>[[value]]</b> in the text field." }
|
|
20
21
|
},
|
|
21
22
|
setup(C) {
|
|
22
|
-
const t = C, y = f(() => t.message.replace("[[value]]", t.value)), n = h(""), k =
|
|
23
|
+
const t = C, y = f(() => t.message.replace("[[value]]", t.value)), n = h(""), k = z(), { emitAction: b } = Z();
|
|
23
24
|
return (c, a) => {
|
|
24
25
|
const s = S("FmTextField"), m = S("FmButton"), _ = S("FmForm");
|
|
25
26
|
return u(), g(_, {
|
|
@@ -28,7 +29,7 @@ const me = { class: "space-y-24 mb-24" }, de = ["innerHTML"], pe = { class: "fle
|
|
|
28
29
|
}, {
|
|
29
30
|
default: p(() => [
|
|
30
31
|
i("div", me, [
|
|
31
|
-
i("div", null,
|
|
32
|
+
i("div", null, L(c.description), 1),
|
|
32
33
|
i("div", { innerHTML: y.value }, null, 8, de),
|
|
33
34
|
i("div", null, [
|
|
34
35
|
o(s, {
|
|
@@ -62,7 +63,7 @@ const me = { class: "space-y-24 mb-24" }, de = ["innerHTML"], pe = { class: "fle
|
|
|
62
63
|
}), _e = /* @__PURE__ */ F({
|
|
63
64
|
__name: "Migrate",
|
|
64
65
|
setup(C) {
|
|
65
|
-
const t =
|
|
66
|
+
const t = j(), y = W(), n = A(), { minor: k } = q(n), b = h(!1), c = z();
|
|
66
67
|
async function a() {
|
|
67
68
|
s.value || b.value || c.open({
|
|
68
69
|
title: "Migrate to new version",
|
|
@@ -90,8 +91,8 @@ const me = { class: "space-y-24 mb-24" }, de = ["innerHTML"], pe = { class: "fle
|
|
|
90
91
|
const s = f(() => {
|
|
91
92
|
const m = y.restaurants.value;
|
|
92
93
|
if (!m.length) return "Required at least one restaurant to migrate";
|
|
93
|
-
const _ = m.filter((v) => !v.posVersion || !
|
|
94
|
-
return _.length ? `Upgrade POS to V${
|
|
94
|
+
const _ = m.filter((v) => !v.posVersion || !P.canUse({ feature: E.enum.menuV4, posVersion: v.posVersion }));
|
|
95
|
+
return _.length ? `Upgrade POS to V${P.minVersionToUse(E.enum.menuV4)} to use new menu: ${_.map((v) => v.profile.name).join(", ")}` : null;
|
|
95
96
|
});
|
|
96
97
|
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
98
|
const l = S("FmSnackbar");
|
|
@@ -104,13 +105,13 @@ const me = { class: "space-y-24 mb-24" }, de = ["innerHTML"], pe = { class: "fle
|
|
|
104
105
|
action: "Migrate",
|
|
105
106
|
"z-index": 0,
|
|
106
107
|
onOnAction: a
|
|
107
|
-
})) :
|
|
108
|
+
})) : U("", !0);
|
|
108
109
|
};
|
|
109
110
|
}
|
|
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" },
|
|
111
|
+
}), 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" }, Ne = /* @__PURE__ */ F({
|
|
111
112
|
__name: "Products",
|
|
112
113
|
setup(C) {
|
|
113
|
-
const { t } = X(), y =
|
|
114
|
+
const { t } = X(), y = q(A()), n = j(), k = f(() => n.rules.item), b = ae(), c = f(() => !n.state.currentSchedulerId), a = re(), s = se(), { selectedCategories: m } = oe(), _ = f(() => ({
|
|
114
115
|
...G.menuV4ToV3(J(n.state.menu)),
|
|
115
116
|
_id: n.state.menu._id,
|
|
116
117
|
_rev: n.state.menu._rev
|
|
@@ -144,7 +145,7 @@ const me = { class: "space-y-24 mb-24" }, de = ["innerHTML"], pe = { class: "fle
|
|
|
144
145
|
i("div", ve, [
|
|
145
146
|
i("div", ge, [
|
|
146
147
|
i("div", be, [
|
|
147
|
-
i("p", ye,
|
|
148
|
+
i("p", ye, L(l.value), 1)
|
|
148
149
|
])
|
|
149
150
|
]),
|
|
150
151
|
i("div", ke, [
|
|
@@ -165,7 +166,7 @@ const me = { class: "space-y-24 mb-24" }, de = ["innerHTML"], pe = { class: "fle
|
|
|
165
166
|
}, 1024)
|
|
166
167
|
]),
|
|
167
168
|
_: 1
|
|
168
|
-
})) : (u(), T(
|
|
169
|
+
})) : (u(), T(I, { key: 0 }, [
|
|
169
170
|
o($, {
|
|
170
171
|
"bg-color": e(M).NeutralGray100,
|
|
171
172
|
"text-color": e(M).TypoSecondary,
|
|
@@ -186,7 +187,7 @@ const me = { class: "space-y-24 mb-24" }, de = ["innerHTML"], pe = { class: "fle
|
|
|
186
187
|
_: 1
|
|
187
188
|
})
|
|
188
189
|
], 64)),
|
|
189
|
-
l.value > 0 ? (u(), T(
|
|
190
|
+
l.value > 0 ? (u(), T(I, { key: 2 }, [
|
|
190
191
|
k.value.create ? (u(), g(V, {
|
|
191
192
|
key: 0,
|
|
192
193
|
label: e(t)("menu.products.actions.add"),
|
|
@@ -222,7 +223,7 @@ const me = { class: "space-y-24 mb-24" }, de = ["innerHTML"], pe = { class: "fle
|
|
|
222
223
|
]),
|
|
223
224
|
_: 1
|
|
224
225
|
}, 8, ["categorized-items", "initial-value"]))
|
|
225
|
-
], 64)) :
|
|
226
|
+
], 64)) : U("", !0)
|
|
226
227
|
])
|
|
227
228
|
])
|
|
228
229
|
]),
|
|
@@ -232,5 +233,5 @@ const me = { class: "space-y-24 mb-24" }, de = ["innerHTML"], pe = { class: "fle
|
|
|
232
233
|
}
|
|
233
234
|
});
|
|
234
235
|
export {
|
|
235
|
-
|
|
236
|
+
Ne as default
|
|
236
237
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import { useSnackbar as X, useDialogChild as
|
|
4
|
-
import { u as ve, l as
|
|
5
|
-
import { useI18n as q, useCoreStore as
|
|
6
|
-
import { _ as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { useRouter as
|
|
9
|
-
|
|
1
|
+
import { defineComponent as j, computed as V, ref as A, resolveComponent as C, openBlock as h, createBlock as P, unref as i, withCtx as U, createElementVNode as o, toDisplayString as F, createVNode as n, createElementBlock as M, Fragment as B, renderList as Y, onMounted as ne, withModifiers as z, createCommentVNode as se, h as T } from "vue";
|
|
2
|
+
import { c as W, D as J, a as Q, s as ue, u as ie, e as re, h as ce, i as de } from "./app-rWkFl8Vq.js";
|
|
3
|
+
import { useSnackbar as X, useDialogChild as me, useDialog as pe, components as G } from "@feedmepos/ui-library";
|
|
4
|
+
import { u as ve, l as ge } from "./lodash-BsZHKgKE.js";
|
|
5
|
+
import { useI18n as q, useCoreStore as fe, RestaurantSelector as be } from "@feedmepos/mf-common";
|
|
6
|
+
import { _ as _e } from "./TextChip.vue_vue_type_script_setup_true_lang-CNp85hoQ.js";
|
|
7
|
+
import { _ as he, w as ye } from "./InfoBasic.vue_vue_type_script_setup_true_lang-DxQBDu16.js";
|
|
8
|
+
import { useRouter as Ce } from "vue-router";
|
|
9
|
+
import { Pos as ke, F_FEATURE as we } from "@feedmepos/core";
|
|
10
|
+
const xe = { class: "fm-typo-en-title-md-600" }, Ve = { class: "mt-40" }, Fe = { class: "fm-typo-en-title-sm-600" }, Se = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mt-4 mb-8" }, Ie = { class: "flex gap-8 items-center justify-start" }, Ae = /* @__PURE__ */ j({
|
|
10
11
|
__name: "UpdateCatalogDialog",
|
|
11
12
|
props: {
|
|
12
13
|
catalogs: {
|
|
@@ -36,28 +37,28 @@ const xe = { class: "fm-typo-en-title-md-600" }, Ve = { class: "mt-40" }, Fe = {
|
|
|
36
37
|
label: r("menu.publish.update_catalog_dialog.sections.default.use_default"),
|
|
37
38
|
value: null
|
|
38
39
|
},
|
|
39
|
-
...s.catalogs.map((
|
|
40
|
-
label:
|
|
41
|
-
value:
|
|
40
|
+
...s.catalogs.map((v) => ({
|
|
41
|
+
label: v.name,
|
|
42
|
+
value: v._id
|
|
42
43
|
}))
|
|
43
44
|
]), p = V(() => [
|
|
44
45
|
{
|
|
45
46
|
label: r("menu.publish.update_catalog_dialog.sections.default.use_default"),
|
|
46
47
|
value: null
|
|
47
48
|
},
|
|
48
|
-
...s.catalogs.map((
|
|
49
|
-
label:
|
|
50
|
-
value:
|
|
49
|
+
...s.catalogs.map((v) => ({
|
|
50
|
+
label: v.name,
|
|
51
|
+
value: v._id
|
|
51
52
|
}))
|
|
52
53
|
]), t = A(y()), c = A(!1), b = A(void 0);
|
|
53
|
-
function S(
|
|
54
|
-
b.value =
|
|
54
|
+
function S(v) {
|
|
55
|
+
b.value = v ? W(v) : y(), t.value = W(b.value), c.value = !0;
|
|
55
56
|
}
|
|
56
57
|
function x() {
|
|
57
58
|
c.value = !1;
|
|
58
59
|
}
|
|
59
60
|
const L = ve(
|
|
60
|
-
() => !
|
|
61
|
+
() => !ge.isEqual(b.value, t.value),
|
|
61
62
|
() => {
|
|
62
63
|
x();
|
|
63
64
|
}
|
|
@@ -65,11 +66,11 @@ const xe = { class: "fm-typo-en-title-md-600" }, Ve = { class: "mt-40" }, Fe = {
|
|
|
65
66
|
function E() {
|
|
66
67
|
x(), m("onComplete", t.value);
|
|
67
68
|
}
|
|
68
|
-
return (
|
|
69
|
+
return (v, g) => {
|
|
69
70
|
const $ = C("FmSelect"), N = C("FmCheckbox"), R = C("FmButton"), D = C("FmSideSheet");
|
|
70
71
|
return h(), P(D, {
|
|
71
72
|
modelValue: c.value,
|
|
72
|
-
"onUpdate:modelValue": g[5] || (g[5] = (
|
|
73
|
+
"onUpdate:modelValue": g[5] || (g[5] = (f) => c.value = f),
|
|
73
74
|
"max-width": 560,
|
|
74
75
|
"onOn:clickedAway": i(L)
|
|
75
76
|
}, {
|
|
@@ -95,35 +96,35 @@ const xe = { class: "fm-typo-en-title-md-600" }, Ve = { class: "mt-40" }, Fe = {
|
|
|
95
96
|
default: U(() => [
|
|
96
97
|
n($, {
|
|
97
98
|
modelValue: t.value.catalogId,
|
|
98
|
-
"onUpdate:modelValue": g[0] || (g[0] = (
|
|
99
|
+
"onUpdate:modelValue": g[0] || (g[0] = (f) => t.value.catalogId = f),
|
|
99
100
|
items: _.value,
|
|
100
101
|
class: "mb-24",
|
|
101
102
|
label: i(r)("menu.publish.update_catalog_dialog.sections.default.label")
|
|
102
103
|
}, null, 8, ["modelValue", "items", "label"]),
|
|
103
104
|
n($, {
|
|
104
105
|
modelValue: t.value.takeawayCatalog,
|
|
105
|
-
"onUpdate:modelValue": g[1] || (g[1] = (
|
|
106
|
+
"onUpdate:modelValue": g[1] || (g[1] = (f) => t.value.takeawayCatalog = f),
|
|
106
107
|
items: p.value,
|
|
107
108
|
class: "mb-24",
|
|
108
109
|
label: i(r)("menu.publish.update_catalog_dialog.sections.pos_takeaway.label")
|
|
109
110
|
}, null, 8, ["modelValue", "items", "label"]),
|
|
110
111
|
n($, {
|
|
111
112
|
modelValue: t.value.pickupCatalog,
|
|
112
|
-
"onUpdate:modelValue": g[2] || (g[2] = (
|
|
113
|
+
"onUpdate:modelValue": g[2] || (g[2] = (f) => t.value.pickupCatalog = f),
|
|
113
114
|
items: p.value,
|
|
114
115
|
label: i(r)("menu.publish.update_catalog_dialog.sections.pickup.label")
|
|
115
116
|
}, null, 8, ["modelValue", "items", "label"]),
|
|
116
117
|
o("div", Ve, [
|
|
117
118
|
o("div", Fe, F(i(r)("menu.publish.update_catalog_dialog.sections.additional.title")), 1),
|
|
118
119
|
o("div", Se, F(i(r)("menu.publish.update_catalog_dialog.sections.additional.subtitle")), 1),
|
|
119
|
-
(h(!0), M(B, null, Y(k.catalogs, (
|
|
120
|
-
key:
|
|
120
|
+
(h(!0), M(B, null, Y(k.catalogs, (f) => (h(), M("div", {
|
|
121
|
+
key: f._id
|
|
121
122
|
}, [
|
|
122
123
|
n(N, {
|
|
123
124
|
modelValue: t.value.additionalCatalogs,
|
|
124
125
|
"onUpdate:modelValue": g[3] || (g[3] = (I) => t.value.additionalCatalogs = I),
|
|
125
|
-
label:
|
|
126
|
-
value:
|
|
126
|
+
label: f.name,
|
|
127
|
+
value: f._id
|
|
127
128
|
}, null, 8, ["modelValue", "label", "value"])
|
|
128
129
|
]))), 128))
|
|
129
130
|
])
|
|
@@ -143,7 +144,7 @@ function $e(k, w, l) {
|
|
|
143
144
|
};
|
|
144
145
|
return k.map((s) => {
|
|
145
146
|
var p;
|
|
146
|
-
const m = (p = w.find(({ _id: t }) => t === s._id)) == null ? void 0 : p.posVersion, y = !!m && !!
|
|
147
|
+
const m = (p = w.find(({ _id: t }) => t === s._id)) == null ? void 0 : p.posVersion, y = !!m && !!ke.canUse({ feature: we.enum.taxAndServiceChargeV4, posVersion: m }), _ = r(s.catalogId);
|
|
147
148
|
return {
|
|
148
149
|
...s,
|
|
149
150
|
_default: _,
|
|
@@ -162,7 +163,7 @@ const Me = {
|
|
|
162
163
|
}, Re = {
|
|
163
164
|
key: 1,
|
|
164
165
|
class: "space-y-16"
|
|
165
|
-
}, De = { class: "text-fm-color-typo-secondary" }, Ue = { class: "space-y-4" }, Le = /* @__PURE__ */
|
|
166
|
+
}, De = { class: "text-fm-color-typo-secondary" }, Ue = { class: "space-y-4" }, Le = /* @__PURE__ */ j({
|
|
166
167
|
__name: "RevertDialog",
|
|
167
168
|
props: {
|
|
168
169
|
restaurant: {}
|
|
@@ -173,7 +174,7 @@ const Me = {
|
|
|
173
174
|
await r(
|
|
174
175
|
async () => {
|
|
175
176
|
var c;
|
|
176
|
-
m.value = await
|
|
177
|
+
m.value = await ue.readMenuById(((c = w.restaurant.revertConfig) == null ? void 0 : c._id) || "");
|
|
177
178
|
},
|
|
178
179
|
{ isLoading: s }
|
|
179
180
|
);
|
|
@@ -198,7 +199,7 @@ const Me = {
|
|
|
198
199
|
catalogId: c.catalogId || null
|
|
199
200
|
}
|
|
200
201
|
],
|
|
201
|
-
|
|
202
|
+
fe().restaurants.value,
|
|
202
203
|
_.value
|
|
203
204
|
)[0];
|
|
204
205
|
return [
|
|
@@ -216,14 +217,14 @@ const Me = {
|
|
|
216
217
|
}
|
|
217
218
|
];
|
|
218
219
|
});
|
|
219
|
-
return ne(async () => y()),
|
|
220
|
+
return ne(async () => y()), me(), (c, b) => {
|
|
220
221
|
const S = C("FmCircularProgress");
|
|
221
222
|
return s.value ? (h(), M("div", Me, [
|
|
222
223
|
n(S, { size: "lg" })
|
|
223
224
|
])) : (h(), M("div", Re, [
|
|
224
225
|
o("div", De, F(i(p)("menu.revert.description", { name: w.restaurant.name })), 1),
|
|
225
226
|
o("div", Ue, [
|
|
226
|
-
(h(!0), M(B, null, Y(t.value, (x) => (h(), P(
|
|
227
|
+
(h(!0), M(B, null, Y(t.value, (x) => (h(), P(he, {
|
|
227
228
|
key: x.label,
|
|
228
229
|
name: x.label,
|
|
229
230
|
value: x.value || "--"
|
|
@@ -242,13 +243,13 @@ const Me = {
|
|
|
242
243
|
class: "fm-typo-en-title-md-600"
|
|
243
244
|
}, Oe = {
|
|
244
245
|
class: "xs:hidden"
|
|
245
|
-
}, je = {
|
|
246
|
-
class: "flex justify-between xs:flex-col gap-8"
|
|
247
246
|
}, ze = {
|
|
248
|
-
class: "
|
|
247
|
+
class: "flex justify-between xs:flex-col gap-8"
|
|
249
248
|
}, Ke = {
|
|
250
|
-
class: "flex
|
|
249
|
+
class: "grow flex flex-col gap-4"
|
|
251
250
|
}, Te = {
|
|
251
|
+
class: "flex gap-8 items-center"
|
|
252
|
+
}, je = {
|
|
252
253
|
class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary"
|
|
253
254
|
}, Ye = {
|
|
254
255
|
class: "space-y-4"
|
|
@@ -260,16 +261,16 @@ const Me = {
|
|
|
260
261
|
class: "flex gap-8"
|
|
261
262
|
}, Ge = {
|
|
262
263
|
class: "xs:block hidden fixed bottom-72 right-16"
|
|
263
|
-
},
|
|
264
|
+
}, na = /* @__PURE__ */ j({
|
|
264
265
|
__name: "Publish",
|
|
265
266
|
setup(k) {
|
|
266
|
-
const w =
|
|
267
|
+
const w = Ce(), {
|
|
267
268
|
t: l
|
|
268
269
|
} = q(), r = (e) => t.state.menu.updatedAt === e.updatedAt, s = ({
|
|
269
270
|
row: e
|
|
270
271
|
}) => {
|
|
271
272
|
const a = r(e);
|
|
272
|
-
return n(
|
|
273
|
+
return n(_e, {
|
|
273
274
|
label: l(a ? "menu.publish.table.status.latest" : "menu.publish.table.status.outdated"),
|
|
274
275
|
variant: a ? "success" : "warning"
|
|
275
276
|
}, null);
|
|
@@ -316,19 +317,19 @@ const Me = {
|
|
|
316
317
|
enableSorting: !1,
|
|
317
318
|
cell: (e) => {
|
|
318
319
|
const a = e.row.original;
|
|
319
|
-
return t.state.menu.updatedAt, a.updatedAt,
|
|
320
|
+
return t.state.menu.updatedAt, a.updatedAt, T("div", {
|
|
320
321
|
class: "flex justify-end gap-8"
|
|
321
|
-
}, [b && a.revertConfig ?
|
|
322
|
+
}, [b && a.revertConfig ? ye(T(G.FmButton, {
|
|
322
323
|
prependIcon: "undo",
|
|
323
324
|
variant: "secondary",
|
|
324
|
-
onClick:
|
|
325
|
+
onClick: z(async () => {
|
|
325
326
|
await S(e.row.original);
|
|
326
327
|
}, ["stop", "prevent"])
|
|
327
|
-
}), l("menu.publish.actions.revert")) : null,
|
|
328
|
+
}), l("menu.publish.actions.revert")) : null, T(G.FmButton, {
|
|
328
329
|
label: l("menu.publish.actions.publish"),
|
|
329
330
|
icon: "ios_share",
|
|
330
331
|
variant: "secondary",
|
|
331
|
-
onClick:
|
|
332
|
+
onClick: z(async () => {
|
|
332
333
|
const d = $(e.row.original);
|
|
333
334
|
await D(d);
|
|
334
335
|
}, ["stop", "prevent"])
|
|
@@ -337,7 +338,7 @@ const Me = {
|
|
|
337
338
|
meta: {
|
|
338
339
|
width: "150px"
|
|
339
340
|
}
|
|
340
|
-
}], _ = A(""), p = A(), t =
|
|
341
|
+
}], _ = A(""), p = A(), t = ie(), c = pe(), b = V(() => t.version !== re.F_MENU_VERSION.enum.v3);
|
|
341
342
|
async function S(e) {
|
|
342
343
|
e.revertConfig && c.open({
|
|
343
344
|
title: "Revert menu",
|
|
@@ -368,7 +369,7 @@ const Me = {
|
|
|
368
369
|
function L(e) {
|
|
369
370
|
return e ? J(e).format("DD/MM/YYYY hh:mmA") : "";
|
|
370
371
|
}
|
|
371
|
-
const E = V(() => t.state.menu.modules.catalog),
|
|
372
|
+
const E = V(() => t.state.menu.modules.catalog), v = V(() => R.queue.value.some((e) => e.id === t.state.menu._id));
|
|
372
373
|
function g(e) {
|
|
373
374
|
var a;
|
|
374
375
|
return e ? ((a = E.value.find((d) => d._id === e)) == null ? void 0 : a.name) ?? l("menu.publish.labels.catalog.invalid") : l("menu.publish.labels.catalog.main");
|
|
@@ -390,16 +391,16 @@ const Me = {
|
|
|
390
391
|
const R = Q(X());
|
|
391
392
|
async function D(e) {
|
|
392
393
|
var d;
|
|
393
|
-
const a = (d = I.value.find((
|
|
394
|
+
const a = (d = I.value.find((K) => K._id === e.restaurantId)) == null ? void 0 : d.name;
|
|
394
395
|
await R.minor(async () => await t.publishMenu(e), {
|
|
395
396
|
customId: t.state.menu._id,
|
|
396
397
|
message: `Publishing menu for ${a}`,
|
|
397
398
|
successMessage: `Published to ${a}`
|
|
398
399
|
});
|
|
399
400
|
}
|
|
400
|
-
const
|
|
401
|
+
const f = A(null), I = V(() => t.state.restaurants.filter((e) => {
|
|
401
402
|
var a;
|
|
402
|
-
return !
|
|
403
|
+
return !f.value || ((a = f.value) == null ? void 0 : a.includes(e._id));
|
|
403
404
|
}).map((e) => ({
|
|
404
405
|
...e,
|
|
405
406
|
catalog: {
|
|
@@ -415,7 +416,7 @@ const Me = {
|
|
|
415
416
|
}) => a.toLowerCase().includes(e) || d.default.toLowerCase().includes(e) || d.takeaway.toLowerCase().includes(e) || d.pickup.toLowerCase().includes(e));
|
|
416
417
|
});
|
|
417
418
|
async function H() {
|
|
418
|
-
if (
|
|
419
|
+
if (v.value) return;
|
|
419
420
|
const e = Object.keys(m.value).map(Number).filter((a) => m.value[a]);
|
|
420
421
|
if (e.length === 0 || e.length === I.value.length)
|
|
421
422
|
await R.minor(async () => await t.publishAllMenu(), {
|
|
@@ -428,22 +429,22 @@ const Me = {
|
|
|
428
429
|
}
|
|
429
430
|
}
|
|
430
431
|
return (e, a) => {
|
|
431
|
-
const d = C("FmChip"),
|
|
432
|
+
const d = C("FmChip"), K = C("FmSpacer"), O = C("FmButton"), ae = C("FmSearch"), te = C("FmTable"), le = C("FmListItem"), oe = C("FmList");
|
|
432
433
|
return h(), M(B, null, [o("div", Pe, [o("div", Be, [o("div", Ee, [o("div", Ne, F(i(l)("menu.publish.title")), 1), a[6] || (a[6] = o("div", {
|
|
433
434
|
class: "hidden xs:block fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
|
|
434
435
|
}, null, -1))]), n(d, {
|
|
435
436
|
label: x.value,
|
|
436
437
|
class: "xs:hidden text-fm-color-primary bg-fm-color-system-warning-100"
|
|
437
|
-
}, null, 8, ["label"]), n(
|
|
438
|
-
disabled:
|
|
438
|
+
}, null, 8, ["label"]), n(K), o("div", Oe, [n(O, {
|
|
439
|
+
disabled: v.value,
|
|
439
440
|
icon: "ios_share",
|
|
440
441
|
label: i(l)("menu.publish.actions.publish_all"),
|
|
441
442
|
variant: "primary",
|
|
442
443
|
onClick: a[0] || (a[0] = () => H())
|
|
443
|
-
}, null, 8, ["disabled", "label"])])]), o("div",
|
|
444
|
+
}, null, 8, ["disabled", "label"])])]), o("div", ze, [n(i(be), {
|
|
444
445
|
multiple: "",
|
|
445
|
-
modelValue:
|
|
446
|
-
"onUpdate:modelValue": a[1] || (a[1] = (u) =>
|
|
446
|
+
modelValue: f.value,
|
|
447
|
+
"onUpdate:modelValue": a[1] || (a[1] = (u) => f.value = u)
|
|
447
448
|
}, null, 8, ["modelValue"]), n(ae, {
|
|
448
449
|
modelValue: _.value,
|
|
449
450
|
"onUpdate:modelValue": a[2] || (a[2] = (u) => _.value = u),
|
|
@@ -452,14 +453,14 @@ const Me = {
|
|
|
452
453
|
placeholder: i(l)("menu.publish.table.search.placeholder")
|
|
453
454
|
}, null, 8, ["modelValue", "placeholder"])]), I.value.length > 0 ? (h(), M(B, {
|
|
454
455
|
key: 0
|
|
455
|
-
}, [n(
|
|
456
|
+
}, [n(ce, {
|
|
456
457
|
class: "xs:hidden block"
|
|
457
458
|
}, {
|
|
458
459
|
default: U(() => [n(te, {
|
|
459
460
|
modelValue: m.value,
|
|
460
461
|
"onUpdate:modelValue": a[3] || (a[3] = (u) => m.value = u),
|
|
461
462
|
"column-defs": y,
|
|
462
|
-
loading:
|
|
463
|
+
loading: v.value,
|
|
463
464
|
"page-size": I.value.length,
|
|
464
465
|
"row-data": I.value,
|
|
465
466
|
"search-value": _.value,
|
|
@@ -482,24 +483,24 @@ const Me = {
|
|
|
482
483
|
},
|
|
483
484
|
onClick: () => N(u)
|
|
484
485
|
}, {
|
|
485
|
-
default: U(() => [o("div",
|
|
486
|
+
default: U(() => [o("div", Ke, [o("div", Te, [o("div", je, F(L(u.updatedAt)), 1), n(s, {
|
|
486
487
|
row: u
|
|
487
488
|
}, null, 8, ["row"])]), o("div", Ye, [o("div", qe, F(u.name), 1), o("div", He, [o("div", null, "Default: " + F(u.catalog.default), 1), o("div", null, "POS takeaway: " + F(u.catalog.takeaway), 1), o("div", null, "Pickup: " + F(u.catalog.pickup), 1)])])]), o("div", We, [b.value && u.revertConfig ? (h(), P(O, {
|
|
488
489
|
key: 0,
|
|
489
|
-
disabled:
|
|
490
|
+
disabled: v.value,
|
|
490
491
|
icon: "undo",
|
|
491
492
|
variant: "tertiary",
|
|
492
|
-
onClick:
|
|
493
|
+
onClick: z(() => S(u), ["stop"])
|
|
493
494
|
}, null, 8, ["disabled", "onClick"])) : se("", !0), n(O, {
|
|
494
|
-
disabled:
|
|
495
|
+
disabled: v.value,
|
|
495
496
|
icon: "ios_share",
|
|
496
497
|
variant: "tertiary",
|
|
497
|
-
onClick:
|
|
498
|
+
onClick: z(() => D($(u)), ["stop"])
|
|
498
499
|
}, null, 8, ["disabled", "onClick"])])]),
|
|
499
500
|
_: 2
|
|
500
501
|
}, 1032, ["label", "onClick"]))), 128))]),
|
|
501
502
|
_: 1
|
|
502
|
-
})], 64)) : (h(), P(i(
|
|
503
|
+
})], 64)) : (h(), P(i(de), {
|
|
503
504
|
key: 1,
|
|
504
505
|
title: i(l)("menu.publish.empty.title"),
|
|
505
506
|
subtitle: i(l)("menu.publish.empty.subtitle"),
|
|
@@ -513,7 +514,7 @@ const Me = {
|
|
|
513
514
|
}
|
|
514
515
|
}
|
|
515
516
|
}, null, 8, ["title", "subtitle", "action"]))]), o("div", Ge, [n(O, {
|
|
516
|
-
disabled:
|
|
517
|
+
disabled: v.value,
|
|
517
518
|
icon: "ios_share",
|
|
518
519
|
label: i(l)("menu.publish.actions.publish_all"),
|
|
519
520
|
variant: "fab",
|
|
@@ -528,5 +529,5 @@ const Me = {
|
|
|
528
529
|
}
|
|
529
530
|
});
|
|
530
531
|
export {
|
|
531
|
-
|
|
532
|
+
na as default
|
|
532
533
|
};
|