@feedmepos/mf-menu 0.23.5-beta.1 → 0.23.5-beta.10
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-CxLJ21BX.js → App-F2sOkxIi.js} +45 -46
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-kXAF1w4i.js → ApplyProduct.vue_vue_type_script_setup_true_lang-DyQDE7ro.js} +26 -25
- package/dist/{Catalog-B5VH5ysn.js → Catalog-CG5dHN8Y.js} +100 -100
- package/dist/{Category-uJL3pD95.js → Category-3kA8I-af.js} +43 -43
- package/dist/{CookingGuide-AYApY6OM.js → CookingGuide-hAt4unoh.js} +23 -23
- package/dist/{Group-CuHLBeJj.js → Group-7ahgaNJM.js} +1 -1
- package/dist/{Group-CvwCxt-y.js → Group-D6eHABYX.js} +10 -10
- package/dist/Group.vue_vue_type_script_setup_true_lang-BLmRMUno.js +576 -0
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CZxLeyDA.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D6T2cqCE.js} +24 -24
- package/dist/{catalog-BTHFh8ZU.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-Y-dzOnYR.js} +51170 -50196
- package/dist/{Ingredient-BQgca3u1.js → Ingredient-Dwcuu8gH.js} +25 -25
- package/dist/{index-CkYZ53qe.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CDDtON19.js} +572 -572
- package/dist/{FormSection.vue_vue_type_script_setup_true_lang-xwahEuYA.js → LinkProductSideSheet-1heKMvbd.js} +65 -65
- package/dist/{PrintRoute-CXV-vLWP.js → PrintRoute-C1eveOh1.js} +22 -22
- package/dist/{Product-CrexlCGt.js → Product-CnEyFdCT.js} +1 -1
- package/dist/Product.vue_vue_type_script_setup_true_lang-DI2HjPyU.js +9445 -0
- package/dist/{Products-CtCVsr70.js → Products-DusTv9jb.js} +96 -90
- package/dist/{Publish-CAreFMux.js → Publish-Buy3VtgU.js} +132 -133
- package/dist/{Recipe-BlD-TVjA.js → Recipe-DncdZYQ_.js} +27 -27
- package/dist/{Scheduler-CusCltoM.js → Scheduler-0EWOX8Ai.js} +16 -16
- package/dist/{SchedulerSelector.vue_vue_type_script_setup_true_lang-ZoZuZYhF.js → SchedulerSelector.vue_vue_type_script_setup_true_lang-GYiKZBTe.js} +3 -3
- package/dist/{ServingSequence-BBEUWKH0.js → ServingSequence-89RxFeBY.js} +34 -34
- package/dist/{Setting-BBlC98Nc.js → Setting-1gf2aq6h.js} +1 -1
- package/dist/{Setting.vue_vue_type_script_setup_true_lang-BhFVhLN7.js → Setting.vue_vue_type_script_setup_true_lang-DMJ-rkuc.js} +18 -18
- package/dist/{Takeaway-Bd-6mwCG.js → Takeaway-BL0A-yDk.js} +1 -1
- package/dist/{Takeaway-BpBDZ_WI.js → Takeaway-ByhOzNOQ.js} +16 -16
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-Cqw8J12j.js → Takeaway.vue_vue_type_script_setup_true_lang-xO_wTm3Z.js} +25 -25
- package/dist/TaxSetting-C0u7cDkv.js +27 -0
- package/dist/{Unit-B0qailKu.js → Unit-BzfgZu-9.js} +13 -13
- package/dist/{Variant-ZyAXbglq.js → Variant-BnAHM6Op.js} +30 -30
- package/dist/{_id_-C1FKJEf6.js → _id_-DIii9wfi.js} +39 -39
- package/dist/{app--1aINx8X.js → app-CsqDBOZ3.js} +606 -604
- package/dist/{app-DsB3CLTV.js → app-GGbCfwxW.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/assets/{linked-status-BfX2BgqB.js → linked-status-BMtVca3I.js} +3 -3
- package/dist/assets/override-menu-Dmxa7QDK.js +24 -0
- package/dist/assets/{validate-menu-CvqyTnoR.js → validate-menu-BM36ZmsL.js} +3 -3
- package/dist/{catalog-Drg0ej6l.js → catalog-Cco_cuoI.js} +1 -1
- package/dist/{category-4mucWpSc.js → category-BEjlkivb.js} +23 -23
- package/dist/{currency-0A8wEJYW.js → currency-BBgmd-0e.js} +1 -1
- package/dist/{lodash-Dm0yrfUn.js → discardConfirm-BKDvllfa.js} +29 -29
- package/dist/{index-0myigLVX.js → index-BsRdaSdr.js} +16 -16
- package/dist/{takeaway-D5w6XOlm.js → index-tQQoQUED.js} +36 -35
- package/dist/{item-BZ4qtYi2.js → item-BYqg2OTm.js} +2746 -2694
- package/dist/{menu-BRGrCAcZ.js → menu-BjWnizaA.js} +1 -1
- package/dist/{menu-DhNX0Jw0.js → menu-esF2r2b9.js} +93222 -93225
- package/dist/{object-BN9wCbKv.js → object-DNBFWMt7.js} +66 -67
- package/dist/{remy-DFTc_cQD.js → remy-D9lqrUO3.js} +4 -4
- package/dist/{scheduler-u8wSsnIX.js → scheduler-BsZaZ4SV.js} +17 -17
- package/dist/{createComponentProgrammatically-Npr1U60e.js → search-7ZYHUW7s.js} +13 -13
- package/dist/style.css +1 -1
- package/dist/{toExcel-C8QJYVvb.js → toExcel-C1dLRghy.js} +4 -5
- package/dist/{InfoBasic.vue_vue_type_script_setup_true_lang-DxQBDu16.js → tooltip-DpokWKto.js} +13 -13
- package/dist/{unit-Du8q3slp.js → unit-BVu8j2TM.js} +44 -44
- package/package.json +7 -6
- package/dist/Group.vue_vue_type_script_setup_true_lang-wfWOzKga.js +0 -565
- package/dist/Product.vue_vue_type_script_setup_true_lang-DoCUt6Tf.js +0 -8897
- package/dist/TaxSetting-B4UlSxop.js +0 -27
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent, ref, watchEffect, computed, watch, openBlock, createElementBlock, normalizeStyle, onBeforeUnmount, createBlock, unref, onMounted, resolveComponent, withDirectives, createElementVNode, createVNode, vShow, Fragment, createCommentVNode, normalizeClass } from "vue";
|
|
2
|
+
import { c as commonjsGlobal, g as getDefaultExportFromCjs, u as useMenuStore, a as coreDart, r as registerVersion, L as Logger, b as getExperimentalSetting, i as isMobileCordova, d as isReactNative, _ as _isFirebaseServerApp, e as _registerComponent, C as Component, f as _getProvider, h as getDefaultEmulatorHost, j as getApp, k as isBrowserExtension, S as SDK_VERSION, l as getModularInstance, E as ErrorFactory, m as createSubscribe, n as deepEqual, o as LogLevel, p as getUA, F as FirebaseError, q as base64Decode, s as isIE, t as querystring, v as isEmpty, w as getApps, x as initializeApp, y as getStorage, z as menu } from "./menu-esF2r2b9.js";
|
|
2
3
|
import { FeedMeAuth, useCoreStore } from "@feedmepos/mf-common";
|
|
3
|
-
import { c as commonjsGlobal, g as getDefaultExportFromCjs, r as registerVersion, L as Logger, a as getExperimentalSetting, i as isMobileCordova, b as isReactNative, _ as _isFirebaseServerApp, d as _registerComponent, C as Component, e as _getProvider, f as getDefaultEmulatorHost, h as getApp, j as isBrowserExtension, S as SDK_VERSION, k as getModularInstance, E as ErrorFactory, l as createSubscribe, m as deepEqual, n as LogLevel, o as getUA, F as FirebaseError, p as base64Decode, q as isIE, s as querystring, t as isEmpty, u as getApps, v as initializeApp, w as getStorage, x as useMenuStore, y as coreDart, z as menu } from "./menu-DhNX0Jw0.js";
|
|
4
|
-
import { R as Remy, i as init } from "./remy-DFTc_cQD.js";
|
|
5
4
|
import { FmButtonColorThemeVariant, FmButtonVariant } from "@feedmepos/ui-library";
|
|
5
|
+
import { R as Remy, i as init } from "./remy-D9lqrUO3.js";
|
|
6
6
|
import { _ as _export_sfc$1 } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
-
import { u as useAppStore } from "./app-
|
|
7
|
+
import { u as useAppStore } from "./app-GGbCfwxW.js";
|
|
8
8
|
const v = "4.8.0", meta = {
|
|
9
9
|
g: "LottieFiles AE ",
|
|
10
10
|
a: "",
|
|
@@ -18792,7 +18792,48 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
18792
18792
|
]);
|
|
18793
18793
|
};
|
|
18794
18794
|
}
|
|
18795
|
-
}), RemyDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$1, [["__scopeId", "data-v-
|
|
18795
|
+
}), RemyDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$1, [["__scopeId", "data-v-9adba964"]]), PUBLISH_NOTIFIER = "publish-notifier", MENU_VERSION_NOTIFIER = "menu-version-notifier";
|
|
18796
|
+
function useMenuNotifier() {
|
|
18797
|
+
const e = useMenuStore(), t = computed(() => {
|
|
18798
|
+
var r, i;
|
|
18799
|
+
return (i = (r = e == null ? void 0 : e.state) == null ? void 0 : r.restaurants) != null && i.length ? e.state.restaurants.filter((s) => s.updatedAt !== e.state.menu.updatedAt).length : 0;
|
|
18800
|
+
}), A = computed(() => ({
|
|
18801
|
+
"$menu-publish": {
|
|
18802
|
+
badge: t.value > 0 ? t.value : void 0
|
|
18803
|
+
}
|
|
18804
|
+
}));
|
|
18805
|
+
watch(
|
|
18806
|
+
A,
|
|
18807
|
+
(r) => {
|
|
18808
|
+
window.postMessage(
|
|
18809
|
+
{
|
|
18810
|
+
type: PUBLISH_NOTIFIER,
|
|
18811
|
+
data: r
|
|
18812
|
+
},
|
|
18813
|
+
"*"
|
|
18814
|
+
);
|
|
18815
|
+
},
|
|
18816
|
+
{
|
|
18817
|
+
immediate: !0
|
|
18818
|
+
}
|
|
18819
|
+
), watch(
|
|
18820
|
+
() => e.version,
|
|
18821
|
+
(r) => {
|
|
18822
|
+
window.postMessage(
|
|
18823
|
+
{
|
|
18824
|
+
type: MENU_VERSION_NOTIFIER,
|
|
18825
|
+
data: {
|
|
18826
|
+
isV4: r === coreDart.F_MENU_VERSION.v4
|
|
18827
|
+
}
|
|
18828
|
+
},
|
|
18829
|
+
"*"
|
|
18830
|
+
);
|
|
18831
|
+
},
|
|
18832
|
+
{
|
|
18833
|
+
immediate: !0
|
|
18834
|
+
}
|
|
18835
|
+
);
|
|
18836
|
+
}
|
|
18796
18837
|
var name$1 = "firebase", version$1 = "10.13.1";
|
|
18797
18838
|
/**
|
|
18798
18839
|
* @license
|
|
@@ -23217,48 +23258,6 @@ async function initFirebase() {
|
|
|
23217
23258
|
const e = initializeApp(define_appEndpoint_default.firebase), t = await FeedMeAuth.getCustomToken(), A = getAuth();
|
|
23218
23259
|
await signInWithCustomToken(A, t), getStorage(e);
|
|
23219
23260
|
}
|
|
23220
|
-
const PUBLISH_NOTIFIER = "publish-notifier", MENU_VERSION_NOTIFIER = "menu-version-notifier";
|
|
23221
|
-
function useMenuNotifier() {
|
|
23222
|
-
const e = useMenuStore(), t = computed(() => {
|
|
23223
|
-
var r, i;
|
|
23224
|
-
return (i = (r = e == null ? void 0 : e.state) == null ? void 0 : r.restaurants) != null && i.length ? e.state.restaurants.filter((s) => s.updatedAt !== e.state.menu.updatedAt).length : 0;
|
|
23225
|
-
}), A = computed(() => ({
|
|
23226
|
-
"$menu-publish": {
|
|
23227
|
-
badge: t.value > 0 ? t.value : void 0
|
|
23228
|
-
}
|
|
23229
|
-
}));
|
|
23230
|
-
watch(
|
|
23231
|
-
A,
|
|
23232
|
-
(r) => {
|
|
23233
|
-
window.postMessage(
|
|
23234
|
-
{
|
|
23235
|
-
type: PUBLISH_NOTIFIER,
|
|
23236
|
-
data: r
|
|
23237
|
-
},
|
|
23238
|
-
"*"
|
|
23239
|
-
);
|
|
23240
|
-
},
|
|
23241
|
-
{
|
|
23242
|
-
immediate: !0
|
|
23243
|
-
}
|
|
23244
|
-
), watch(
|
|
23245
|
-
() => e.version,
|
|
23246
|
-
(r) => {
|
|
23247
|
-
window.postMessage(
|
|
23248
|
-
{
|
|
23249
|
-
type: MENU_VERSION_NOTIFIER,
|
|
23250
|
-
data: {
|
|
23251
|
-
isV4: r === coreDart.F_MENU_VERSION.v4
|
|
23252
|
-
}
|
|
23253
|
-
},
|
|
23254
|
-
"*"
|
|
23255
|
-
);
|
|
23256
|
-
},
|
|
23257
|
-
{
|
|
23258
|
-
immediate: !0
|
|
23259
|
-
}
|
|
23260
|
-
);
|
|
23261
|
-
}
|
|
23262
23261
|
const _hoisted_1 = {
|
|
23263
23262
|
key: 0,
|
|
23264
23263
|
class: /* @__PURE__ */ normalizeClass(["w-screen h-dvh fixed top-0 left-0 flex items-center justify-center bg-white"]),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as K, computed as i, h as u, ref as U, resolveComponent as b, openBlock as d, createElementBlock as p, createVNode as v, withCtx as g, createElementVNode as V, createBlock as j, unref as n, createCommentVNode as C, toDisplayString as A, isRef as D, Fragment as G, renderList as H } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { useI18n as M } from "@feedmepos/mf-common";
|
|
3
|
+
import { components as B, FmButtonVariant as I, FmButtonColorThemeVariant as h } from "@feedmepos/ui-library";
|
|
4
|
+
import { _ as O, L as $ } from "./LinkProductSideSheet-1heKMvbd.js";
|
|
5
|
+
import { u as q } from "./search-7ZYHUW7s.js";
|
|
6
|
+
import { u as J, ab as Q } from "./menu-esF2r2b9.js";
|
|
7
7
|
const W = { class: "space-y-16" }, X = { class: "flex items-center space-x-24" }, Y = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
@@ -11,6 +11,7 @@ const W = { class: "space-y-16" }, X = { class: "flex items-center space-x-24" }
|
|
|
11
11
|
__name: "ApplyProduct",
|
|
12
12
|
props: {
|
|
13
13
|
title: {},
|
|
14
|
+
linkButtonLabel: {},
|
|
14
15
|
overrides: {},
|
|
15
16
|
selectVariant: { type: Boolean },
|
|
16
17
|
showVariant: { type: Boolean },
|
|
@@ -21,18 +22,18 @@ const W = { class: "space-y-16" }, X = { class: "flex items-center space-x-24" }
|
|
|
21
22
|
},
|
|
22
23
|
emits: ["update:overrides", "row-click"],
|
|
23
24
|
setup(z, { emit: F }) {
|
|
24
|
-
const s = z, _ = F,
|
|
25
|
+
const s = z, _ = F, L = J(), { searchKey: m, filter: w } = q(), y = i(() => s.categorizedItems || L.categorizedItems), k = i(() => Q(y.value, s.overrides)), P = i(() => k.value.reduce((t, e) => {
|
|
25
26
|
if (w([e.name]))
|
|
26
27
|
return t.push(e), t;
|
|
27
28
|
const r = e.items.filter((a) => w([a.label]));
|
|
28
29
|
return r.length && t.push({ ...e, items: r }), t;
|
|
29
|
-
}, [])),
|
|
30
|
-
function
|
|
30
|
+
}, [])), R = i(() => s.showVariant || s.selectVariant);
|
|
31
|
+
function S(t, e) {
|
|
31
32
|
var a, l;
|
|
32
33
|
const r = e ? (a = s.overrides) == null ? void 0 : a.filter((o) => !(o._id === t && o.combinationKey === e)) : (l = s.overrides) == null ? void 0 : l.filter((o) => o._id !== t);
|
|
33
34
|
_("update:overrides", r ?? []);
|
|
34
35
|
}
|
|
35
|
-
const { t: c } =
|
|
36
|
+
const { t: c } = M(), E = i(
|
|
36
37
|
() => (t) => [
|
|
37
38
|
{
|
|
38
39
|
accessorKey: "label",
|
|
@@ -51,7 +52,7 @@ const W = { class: "space-y-16" }, X = { class: "flex items-center space-x-24" }
|
|
|
51
52
|
},
|
|
52
53
|
[
|
|
53
54
|
u("p", {}, [r]),
|
|
54
|
-
u(
|
|
55
|
+
u(B.FmIcon, {
|
|
55
56
|
name: "keyboard_arrow_up",
|
|
56
57
|
onClick: e.row.getToggleExpandedHandler(),
|
|
57
58
|
class: [
|
|
@@ -74,36 +75,36 @@ const W = { class: "space-y-16" }, X = { class: "flex items-center space-x-24" }
|
|
|
74
75
|
{
|
|
75
76
|
class: "flex items-center justify-end"
|
|
76
77
|
},
|
|
77
|
-
u(
|
|
78
|
+
u(B.FmButton, {
|
|
78
79
|
prependIcon: "delete",
|
|
79
|
-
variant:
|
|
80
|
+
variant: I.Tertiary,
|
|
80
81
|
textColor: h.NeutralGray400,
|
|
81
82
|
onClick: () => {
|
|
82
83
|
var o;
|
|
83
84
|
if (a > 0) {
|
|
84
85
|
const f = (o = e.row.getParentRow()) == null ? void 0 : o.original;
|
|
85
|
-
|
|
86
|
+
S(f.value, r.value);
|
|
86
87
|
} else
|
|
87
|
-
|
|
88
|
+
S(r.value);
|
|
88
89
|
}
|
|
89
90
|
})
|
|
90
91
|
) : null;
|
|
91
92
|
}
|
|
92
93
|
}
|
|
93
94
|
]
|
|
94
|
-
),
|
|
95
|
+
), x = U({}), N = (t) => t.variant, T = i(() => k.value.reduce((t, e) => t + e.items.length, 0));
|
|
95
96
|
return (t, e) => {
|
|
96
97
|
const r = b("fm-button"), a = b("fm-search"), l = b("fm-table");
|
|
97
98
|
return d(), p("div", W, [
|
|
98
|
-
v(
|
|
99
|
+
v(O, { title: t.title }, {
|
|
99
100
|
"append-title": g(() => [
|
|
100
101
|
V("div", null, [
|
|
101
|
-
t.editable ? (d(), j(
|
|
102
|
+
t.editable ? (d(), j($, {
|
|
102
103
|
key: 0,
|
|
103
104
|
"categorized-items": y.value,
|
|
104
105
|
"initial-value": t.overrides,
|
|
105
106
|
"select-variant": t.selectVariant,
|
|
106
|
-
"show-variant":
|
|
107
|
+
"show-variant": R.value,
|
|
107
108
|
title: n(c)("menu.apply_product.link.title"),
|
|
108
109
|
onSubmit: e[0] || (e[0] = (o) => _("update:overrides", o))
|
|
109
110
|
}, {
|
|
@@ -111,8 +112,8 @@ const W = { class: "space-y-16" }, X = { class: "flex items-center space-x-24" }
|
|
|
111
112
|
v(r, {
|
|
112
113
|
"text-color": n(h).ColorPrimary,
|
|
113
114
|
"border-color": n(h).ColorPrimary,
|
|
114
|
-
variant: n(
|
|
115
|
-
label: n(c)("menu.common.actions.link_product"),
|
|
115
|
+
variant: n(I).Secondary,
|
|
116
|
+
label: t.linkButtonLabel || n(c)("menu.common.actions.link_product"),
|
|
116
117
|
"prepend-icon": "link",
|
|
117
118
|
onClick: o
|
|
118
119
|
}, null, 8, ["text-color", "border-color", "variant", "label", "onClick"])
|
|
@@ -134,20 +135,20 @@ const W = { class: "space-y-16" }, X = { class: "flex items-center space-x-24" }
|
|
|
134
135
|
]),
|
|
135
136
|
_: 1
|
|
136
137
|
}, 8, ["title"]),
|
|
137
|
-
(d(!0), p(G, null, H(
|
|
138
|
+
(d(!0), p(G, null, H(P.value, (o) => (d(), p("div", {
|
|
138
139
|
key: o.id || "",
|
|
139
140
|
class: "xs:overflow-x-scroll"
|
|
140
141
|
}, [
|
|
141
142
|
v(l, {
|
|
142
|
-
"column-defs":
|
|
143
|
-
"expanded-state":
|
|
144
|
-
"get-sub-row":
|
|
143
|
+
"column-defs": E.value(o),
|
|
144
|
+
"expanded-state": x.value,
|
|
145
|
+
"get-sub-row": N,
|
|
145
146
|
"page-size": 9999,
|
|
146
147
|
"row-data": o.items,
|
|
147
148
|
"search-value": n(m),
|
|
148
149
|
"shrink-at": !1,
|
|
149
150
|
"hide-footer": "",
|
|
150
|
-
"onUpdate:expandedState": e[2] || (e[2] = (f) =>
|
|
151
|
+
"onUpdate:expandedState": e[2] || (e[2] = (f) => x.value = f)
|
|
151
152
|
}, null, 8, ["column-defs", "expanded-state", "row-data", "search-value"])
|
|
152
153
|
]))), 128))
|
|
153
154
|
]);
|
|
@@ -1,21 +1,85 @@
|
|
|
1
|
-
import { defineComponent as oe,
|
|
2
|
-
import {
|
|
3
|
-
import { G as F,
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { _ as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { useSnackbar as _e, components as te, FmButtonColorThemeVariant as Q, FmButtonVariant as K, useDialog as Me, useBreakpoints as De } from "@feedmepos/ui-library";
|
|
9
|
-
import { c as Se } from "./check-C9mY6LiX.js";
|
|
10
|
-
import { C as L, a as I, _ as ce } from "./GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CZxLeyDA.js";
|
|
11
|
-
import { _ as Te } from "./FormSection.vue_vue_type_script_setup_true_lang-xwahEuYA.js";
|
|
1
|
+
import { defineComponent as oe, computed as T, resolveComponent as v, openBlock as d, createBlock as h, createVNode as n, ref as B, createElementBlock as S, Fragment as P, renderSlot as ye, unref as e, withCtx as p, createElementVNode as _, renderList as W, createCommentVNode as z, createTextVNode as be, toDisplayString as R, h as J, withModifiers as q, normalizeClass as xe } from "vue";
|
|
2
|
+
import { useRouter as ke } from "vue-router";
|
|
3
|
+
import { G as F, u as de, K as pe, A as ge, z as re, B as Ce, H as ee, J as fe, T as ue } from "./menu-esF2r2b9.js";
|
|
4
|
+
import { useI18n as ne, useCoreStore as ve } from "@feedmepos/mf-common";
|
|
5
|
+
import { useSnackbar as _e, components as te, FmButtonColorThemeVariant as Q, FmButtonVariant as K, useDialog as he, useBreakpoints as Oe } from "@feedmepos/ui-library";
|
|
6
|
+
import { _ as Fe, R as ie } from "./app-CsqDBOZ3.js";
|
|
7
|
+
import { _ as Me } from "./TextChip.vue_vue_type_script_setup_true_lang-DoCbhCON.js";
|
|
12
8
|
import { _ as ae } from "./FormItem.vue_vue_type_script_setup_true_lang-DKsxEK-8.js";
|
|
13
|
-
import { _ as
|
|
14
|
-
import {
|
|
15
|
-
|
|
9
|
+
import { _ as De } from "./LinkProductSideSheet-1heKMvbd.js";
|
|
10
|
+
import { c as Se } from "./check-C9mY6LiX.js";
|
|
11
|
+
import { C as L, a as I, _ as ce } from "./GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D6T2cqCE.js";
|
|
12
|
+
import { _ as Te } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
|
|
13
|
+
import { _ as Ve } from "./PageLayout.vue_vue_type_script_setup_true_lang-BJCuL4EK.js";
|
|
14
|
+
import { C as Ae } from "./catalog-Cco_cuoI.js";
|
|
15
|
+
const Ue = /* @__PURE__ */ oe({
|
|
16
|
+
__name: "CatalogUsageTable",
|
|
17
|
+
props: {
|
|
18
|
+
catalog: {}
|
|
19
|
+
},
|
|
20
|
+
setup(X) {
|
|
21
|
+
const M = X, {
|
|
22
|
+
t: m
|
|
23
|
+
} = ne(), D = T(() => M.catalog.restaurants.length === 0 ? [{
|
|
24
|
+
name: "--",
|
|
25
|
+
usage: []
|
|
26
|
+
}] : M.catalog.restaurants), $ = [{
|
|
27
|
+
accessorKey: "name",
|
|
28
|
+
header: () => n("div", {
|
|
29
|
+
class: "flex flex-col"
|
|
30
|
+
}, [n("p", null, [M.catalog.name]), n("p", {
|
|
31
|
+
class: "text-fm-color-typo-secondary fm-typo-en-body-md-400"
|
|
32
|
+
}, [m("menu.catalog.usage.tax_calculation") + `: ${M.catalog.taxMode}`])]),
|
|
33
|
+
cell: ({
|
|
34
|
+
row: y
|
|
35
|
+
}) => n("div", {
|
|
36
|
+
class: "space-y-4"
|
|
37
|
+
}, [n("p", null, [y.original.name]), n("p", {
|
|
38
|
+
class: "text-fm-color-typo-secondary"
|
|
39
|
+
}, [y.original.id])]),
|
|
40
|
+
enableSorting: !1,
|
|
41
|
+
meta: {
|
|
42
|
+
headerClass: "px-16 py-4"
|
|
43
|
+
}
|
|
44
|
+
}, {
|
|
45
|
+
header: () => n("div", {
|
|
46
|
+
class: "w-full flex justify-between"
|
|
47
|
+
}, [n("p", null, [m("menu.catalog.usage.usage")]), n(Me, {
|
|
48
|
+
label: `${m("menu.catalog.usage.products", {
|
|
49
|
+
count: M.catalog.totalProducts
|
|
50
|
+
})}`,
|
|
51
|
+
variant: "info",
|
|
52
|
+
class: "px-8 py-4"
|
|
53
|
+
}, null)]),
|
|
54
|
+
accessorKey: "usage",
|
|
55
|
+
cell: ({
|
|
56
|
+
row: y
|
|
57
|
+
}) => {
|
|
58
|
+
const k = y.original.usage.join(", ") || "--";
|
|
59
|
+
return n("p", {
|
|
60
|
+
class: "flex py-8"
|
|
61
|
+
}, [k]);
|
|
62
|
+
},
|
|
63
|
+
enableSorting: !1,
|
|
64
|
+
meta: {
|
|
65
|
+
headerClass: "px-16 py-4"
|
|
66
|
+
}
|
|
67
|
+
}];
|
|
68
|
+
return (y, k) => {
|
|
69
|
+
const V = v("FmTable");
|
|
70
|
+
return d(), h(V, {
|
|
71
|
+
"column-defs": $,
|
|
72
|
+
"row-data": D.value,
|
|
73
|
+
"page-size": D.value.length,
|
|
74
|
+
"hide-footer": !0,
|
|
75
|
+
"shrink-at": !1
|
|
76
|
+
}, null, 8, ["row-data", "page-size"]);
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
}), Ne = { class: "space-y-32" }, Ee = {
|
|
16
80
|
key: 0,
|
|
17
81
|
class: "pl-32 space-x-8"
|
|
18
|
-
},
|
|
82
|
+
}, Re = { class: "pl-[60px] space-y-16" }, $e = { class: "space-x-16 flex items-center" }, we = { class: "flex-1 space-y-4" }, Le = { class: "fm-typo-en-body-lg-400" }, Ie = { class: "fm-typo-en-body-md-400" }, Be = { class: "flex gap-8 items-center justify-start" }, Pe = /* @__PURE__ */ oe({
|
|
19
83
|
__name: "Form",
|
|
20
84
|
setup(X, { expose: M }) {
|
|
21
85
|
const m = B(!1), D = B(!1), $ = (i, s) => {
|
|
@@ -23,7 +87,7 @@ const Ue = { class: "space-y-32" }, Ne = {
|
|
|
23
87
|
s ?? re.generator.initMenuV4Catalog(),
|
|
24
88
|
y.value
|
|
25
89
|
));
|
|
26
|
-
}, y = T(() => k.version === F.F_MENU_VERSION.enum.v4), k =
|
|
90
|
+
}, y = T(() => k.version === F.F_MENU_VERSION.enum.v4), k = de(), V = ve(), g = pe(ge(_e())), r = B(
|
|
27
91
|
L.fromCatalog(re.generator.initMenuV4Catalog(), y.value)
|
|
28
92
|
), Z = T(() => k.catalogs.map((i) => i.name)), A = T({
|
|
29
93
|
get: () => r.value.taxSetting,
|
|
@@ -34,7 +98,7 @@ const Ue = { class: "space-y-32" }, Ne = {
|
|
|
34
98
|
var f, o;
|
|
35
99
|
if (!V.currentCountry.value) return [];
|
|
36
100
|
const i = ((f = r.value.taxSetting) == null ? void 0 : f.mode) === I.MANUAL ? ((o = r.value.taxSetting) == null ? void 0 : o.inclusive) ?? [] : [];
|
|
37
|
-
return
|
|
101
|
+
return Ce.Country.getCountry(V.currentCountry.value).taxSystems.map((l) => {
|
|
38
102
|
const a = i.find((b) => b.systemCode === l.code);
|
|
39
103
|
return {
|
|
40
104
|
inclusive: (a == null ? void 0 : a.inclusive) || !1,
|
|
@@ -66,7 +130,7 @@ const Ue = { class: "space-y-32" }, Ne = {
|
|
|
66
130
|
await g.updateMenu(
|
|
67
131
|
{
|
|
68
132
|
module: F.F_MENU_MODULE_V4_KEY.enum.catalog,
|
|
69
|
-
operation:
|
|
133
|
+
operation: fe.F_OPERATION_TYPE.create,
|
|
70
134
|
data: i
|
|
71
135
|
},
|
|
72
136
|
i.name
|
|
@@ -91,7 +155,7 @@ const Ue = { class: "space-y-32" }, Ne = {
|
|
|
91
155
|
"max-width": 560
|
|
92
156
|
}, {
|
|
93
157
|
"side-sheet-footer": p(() => [
|
|
94
|
-
_("div",
|
|
158
|
+
_("div", Be, [
|
|
95
159
|
n(x, {
|
|
96
160
|
loading: D.value,
|
|
97
161
|
label: e(u)("menu.common.actions.add"),
|
|
@@ -108,8 +172,8 @@ const Ue = { class: "space-y-32" }, Ne = {
|
|
|
108
172
|
])
|
|
109
173
|
]),
|
|
110
174
|
default: p(() => [
|
|
111
|
-
_("div",
|
|
112
|
-
n(
|
|
175
|
+
_("div", Ne, [
|
|
176
|
+
n(De, {
|
|
113
177
|
title: e(u)("menu.catalog.detail")
|
|
114
178
|
}, {
|
|
115
179
|
default: p(() => [
|
|
@@ -150,7 +214,7 @@ const Ue = { class: "space-y-32" }, Ne = {
|
|
|
150
214
|
]),
|
|
151
215
|
_: 1
|
|
152
216
|
}, 8, ["model-value"]),
|
|
153
|
-
((E = r.value.taxSetting) == null ? void 0 : E.mode) === e(I).MANUAL ? (d(), S("div",
|
|
217
|
+
((E = r.value.taxSetting) == null ? void 0 : E.mode) === e(I).MANUAL ? (d(), S("div", Ee, [
|
|
154
218
|
(d(!0), S(P, null, W(w.value, (C) => (d(), h(a, {
|
|
155
219
|
key: C.systemCode,
|
|
156
220
|
"model-value": C.inclusive,
|
|
@@ -214,7 +278,7 @@ const Ue = { class: "space-y-32" }, Ne = {
|
|
|
214
278
|
sublabel: e(u)("menu.catalog.form.markup.auto.sublabel"),
|
|
215
279
|
"onUpdate:modelValue": s[4] || (s[4] = (t) => r.value.markupOptions = t ? [] : null)
|
|
216
280
|
}, null, 8, ["model-value", "label", "sublabel"]),
|
|
217
|
-
_("div",
|
|
281
|
+
_("div", Re, [
|
|
218
282
|
n(ce, {
|
|
219
283
|
categories: e(k).categories,
|
|
220
284
|
items: e(k).items,
|
|
@@ -249,16 +313,16 @@ const Ue = { class: "space-y-32" }, Ne = {
|
|
|
249
313
|
onClick: C
|
|
250
314
|
}, {
|
|
251
315
|
default: p(() => [
|
|
252
|
-
_("div",
|
|
253
|
-
_("div",
|
|
316
|
+
_("div", $e, [
|
|
317
|
+
_("div", we, [
|
|
254
318
|
n(c, { class: "text-fm-color-typo-info bg-fm-color-system-info-100 font-semibold" }, {
|
|
255
319
|
default: p(() => [
|
|
256
320
|
be(R(e(u)("menu.catalog.form.markup.percentage", { value: t.percentage })), 1)
|
|
257
321
|
]),
|
|
258
322
|
_: 2
|
|
259
323
|
}, 1024),
|
|
260
|
-
_("p",
|
|
261
|
-
_("p",
|
|
324
|
+
_("p", Le, R(e(u)("menu.catalog.form.markup.config", { number: E + 1 })), 1),
|
|
325
|
+
_("p", Ie, R(t.includeItems ? e(u)("menu.catalog.form.markup.products", {
|
|
262
326
|
count: t.includeItems.length
|
|
263
327
|
}) : e(u)("menu.catalog.form.markup.all_items")), 1)
|
|
264
328
|
]),
|
|
@@ -285,71 +349,7 @@ const Ue = { class: "space-y-32" }, Ne = {
|
|
|
285
349
|
], 64);
|
|
286
350
|
};
|
|
287
351
|
}
|
|
288
|
-
}), me =
|
|
289
|
-
__name: "CatalogUsageTable",
|
|
290
|
-
props: {
|
|
291
|
-
catalog: {}
|
|
292
|
-
},
|
|
293
|
-
setup(X) {
|
|
294
|
-
const M = X, {
|
|
295
|
-
t: m
|
|
296
|
-
} = ne(), D = T(() => M.catalog.restaurants.length === 0 ? [{
|
|
297
|
-
name: "--",
|
|
298
|
-
usage: []
|
|
299
|
-
}] : M.catalog.restaurants), $ = [{
|
|
300
|
-
accessorKey: "name",
|
|
301
|
-
header: () => n("div", {
|
|
302
|
-
class: "flex flex-col"
|
|
303
|
-
}, [n("p", null, [M.catalog.name]), n("p", {
|
|
304
|
-
class: "text-fm-color-typo-secondary fm-typo-en-body-md-400"
|
|
305
|
-
}, [m("menu.catalog.usage.tax_calculation") + `: ${M.catalog.taxMode}`])]),
|
|
306
|
-
cell: ({
|
|
307
|
-
row: y
|
|
308
|
-
}) => n("div", {
|
|
309
|
-
class: "space-y-4"
|
|
310
|
-
}, [n("p", null, [y.original.name]), n("p", {
|
|
311
|
-
class: "text-fm-color-typo-secondary"
|
|
312
|
-
}, [y.original.id])]),
|
|
313
|
-
enableSorting: !1,
|
|
314
|
-
meta: {
|
|
315
|
-
headerClass: "px-16 py-4"
|
|
316
|
-
}
|
|
317
|
-
}, {
|
|
318
|
-
header: () => n("div", {
|
|
319
|
-
class: "w-full flex justify-between"
|
|
320
|
-
}, [n("p", null, [m("menu.catalog.usage.usage")]), n(Ae, {
|
|
321
|
-
label: `${m("menu.catalog.usage.products", {
|
|
322
|
-
count: M.catalog.totalProducts
|
|
323
|
-
})}`,
|
|
324
|
-
variant: "info",
|
|
325
|
-
class: "px-8 py-4"
|
|
326
|
-
}, null)]),
|
|
327
|
-
accessorKey: "usage",
|
|
328
|
-
cell: ({
|
|
329
|
-
row: y
|
|
330
|
-
}) => {
|
|
331
|
-
const k = y.original.usage.join(", ") || "--";
|
|
332
|
-
return n("p", {
|
|
333
|
-
class: "flex py-8"
|
|
334
|
-
}, [k]);
|
|
335
|
-
},
|
|
336
|
-
enableSorting: !1,
|
|
337
|
-
meta: {
|
|
338
|
-
headerClass: "px-16 py-4"
|
|
339
|
-
}
|
|
340
|
-
}];
|
|
341
|
-
return (y, k) => {
|
|
342
|
-
const V = v("FmTable");
|
|
343
|
-
return d(), h(V, {
|
|
344
|
-
"column-defs": $,
|
|
345
|
-
"row-data": D.value,
|
|
346
|
-
"page-size": D.value.length,
|
|
347
|
-
"hide-footer": !0,
|
|
348
|
-
"shrink-at": !1
|
|
349
|
-
}, null, 8, ["row-data", "page-size"]);
|
|
350
|
-
};
|
|
351
|
-
}
|
|
352
|
-
}), ze = {
|
|
352
|
+
}), me = Pe, ze = {
|
|
353
353
|
key: 1,
|
|
354
354
|
class: "flex flex-col overflow-scroll divide-y divide-fm-color-neutral-gray-100"
|
|
355
355
|
}, Ke = ["onClick"], Ge = {
|
|
@@ -369,7 +369,7 @@ const Ue = { class: "space-y-32" }, Ne = {
|
|
|
369
369
|
}, le = "main", ma = /* @__PURE__ */ oe({
|
|
370
370
|
__name: "Catalog",
|
|
371
371
|
setup(X) {
|
|
372
|
-
const M =
|
|
372
|
+
const M = ve(), m = de(), D = _e(), $ = ge(D), y = he(), k = pe($), V = ke(), {
|
|
373
373
|
t: g
|
|
374
374
|
} = ne();
|
|
375
375
|
function r(o, l) {
|
|
@@ -436,7 +436,7 @@ const Ue = { class: "space-y-32" }, Ne = {
|
|
|
436
436
|
defaultOrderFrom: a.defaultOrderFrom
|
|
437
437
|
}))].map((a) => {
|
|
438
438
|
var x;
|
|
439
|
-
const b = Z(((x = a.doc) == null ? void 0 : x._id) || null), N = a.doc ?
|
|
439
|
+
const b = Z(((x = a.doc) == null ? void 0 : x._id) || null), N = a.doc ? Ae.getSellingItem(a.doc, m.state.menu) : m.state.menu.modules.item;
|
|
440
440
|
return {
|
|
441
441
|
...a,
|
|
442
442
|
taxMode: a.taxes ? "Manual" : "Automatic",
|
|
@@ -487,7 +487,7 @@ const Ue = { class: "space-y-32" }, Ne = {
|
|
|
487
487
|
}).onPrimary(async () => {
|
|
488
488
|
await k.updateMenu({
|
|
489
489
|
module: F.F_MENU_MODULE_V4_KEY.enum.catalog,
|
|
490
|
-
operation:
|
|
490
|
+
operation: fe.F_OPERATION_TYPE.delete,
|
|
491
491
|
data: o.id
|
|
492
492
|
}, o.name, !0), m.selectCatalog(null), await V.push({
|
|
493
493
|
name: ie.CATALOG
|
|
@@ -542,10 +542,10 @@ const Ue = { class: "space-y-32" }, Ne = {
|
|
|
542
542
|
}, ["stop", "prevent"])
|
|
543
543
|
})]);
|
|
544
544
|
}
|
|
545
|
-
}]), s =
|
|
545
|
+
}]), s = Oe(), f = T(() => s.breakpoints.value.xs);
|
|
546
546
|
return (o, l) => {
|
|
547
547
|
const a = v("fm-button"), b = v("FmTable"), N = v("FmButton"), x = v("fm-side-sheet");
|
|
548
|
-
return d(), h(
|
|
548
|
+
return d(), h(Ve, {
|
|
549
549
|
heading: e(g)("menu.catalog.title")
|
|
550
550
|
}, {
|
|
551
551
|
"append-heading": p(() => [U.value.length > 0 ? (d(), h(e(me), {
|
|
@@ -568,7 +568,7 @@ const Ue = { class: "space-y-32" }, Ne = {
|
|
|
568
568
|
}, null, 8, ["label", "onClick"])])]),
|
|
569
569
|
_: 1
|
|
570
570
|
}, 512)) : z("", !0)]),
|
|
571
|
-
default: p(() => [U.value.length === 0 ? (d(), h(e(
|
|
571
|
+
default: p(() => [U.value.length === 0 ? (d(), h(e(Te), {
|
|
572
572
|
key: 0,
|
|
573
573
|
subtitle: e(g)("menu.catalog.empty.subtitle"),
|
|
574
574
|
title: e(g)("menu.catalog.empty.title")
|
|
@@ -600,7 +600,7 @@ const Ue = { class: "space-y-32" }, Ne = {
|
|
|
600
600
|
variant: e(K).Tertiary,
|
|
601
601
|
"prepend-icon": "delete",
|
|
602
602
|
onClick: q((O) => u(c), ["stop"])
|
|
603
|
-
}, null, 8, ["text-color", "variant", "onClick"])])], 8, Ke))), 128))])) : (d(), h(
|
|
603
|
+
}, null, 8, ["text-color", "variant", "onClick"])])], 8, Ke))), 128))])) : (d(), h(Fe, {
|
|
604
604
|
key: 0
|
|
605
605
|
}, {
|
|
606
606
|
default: p(() => [n(b, {
|
|
@@ -619,7 +619,7 @@ const Ue = { class: "space-y-32" }, Ne = {
|
|
|
619
619
|
"dismiss-away": ""
|
|
620
620
|
}, {
|
|
621
621
|
"side-sheet-header": p(() => [_("p", qe, R(e(g)("menu.catalog.usage.title")), 1)]),
|
|
622
|
-
default: p(() => [_("div", We, [(d(!0), S(P, null, W(w.value, (c, O) => (d(), h(
|
|
622
|
+
default: p(() => [_("div", We, [(d(!0), S(P, null, W(w.value, (c, O) => (d(), h(Ue, {
|
|
623
623
|
key: O,
|
|
624
624
|
catalog: c
|
|
625
625
|
}, null, 8, ["catalog"]))), 128))])]),
|