@feedmepos/mf-menu 0.32.60-dev.1 → 0.32.61-dev.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-21Fh45As.js → App-BlPyUGB_.js} +1455 -1330
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-l0PLyvfS.js → ApplyProduct.vue_vue_type_script_setup_true_lang-B4PAatkS.js} +3 -3
- package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-D9F_qZUW.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-DwANkY0s.js} +2 -2
- package/dist/{Catalog-BNFBfeVl.js → Catalog-B5MZeM6K.js} +6 -6
- package/dist/{Category-KedP0bLk.js → Category-CI_NWg74.js} +4 -4
- package/dist/{Category-D46Zh0U2.js → Category-D9KrU2k8.js} +4 -4
- package/dist/{CookingGuide-L_yCYzVo.js → CookingGuide-Cf1CHQ-X.js} +4 -4
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-CWnwBGb4.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CCHkXBZD.js} +1 -1
- package/dist/{Group-BnogWBW3.js → Group-CWi-0hkW.js} +3 -3
- package/dist/{Group-C6f8CbIA.js → Group-CuZ7PCKT.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-0YR_ZV8F.js → Group.vue_vue_type_script_setup_true_lang-BfMyMQ_H.js} +6 -6
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CXjapKCh.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-1ghoDbrV.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CFjS_1Ws.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-BEkD_xvB.js} +2696 -2696
- package/dist/{Ingredient-fTfAFfrQ.js → Ingredient-rn2OM-W7.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-BUZjQ6V4.js → InventoryBinding.vue_vue_type_script_setup_true_lang-BMBNdxYT.js} +2 -2
- package/dist/{LinkProductSideSheet-CQRvO3h0.js → LinkProductSideSheet-BAVjkhSM.js} +3 -3
- package/dist/{MenuSetting-Dh8ZUdTV.js → MenuSetting-B76zY-2b.js} +6 -6
- package/dist/{OrderPacing-BAyNtquU.js → OrderPacing-CJfw_U60.js} +5 -5
- package/dist/{PrintRoute-Cwjj0Yjh.js → PrintRoute-CDcbOaGr.js} +4 -4
- package/dist/{Product-DyPD27o5.js → Product-8RzjWAbu.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-D8VJf6ck.js → Product.vue_vue_type_script_setup_true_lang-CI7XYUGZ.js} +12 -12
- package/dist/{ProductInternalTools-CjtfIem0.js → ProductInternalTools-wpawK_Db.js} +5 -5
- package/dist/Products-B8vYu4il.js +312 -0
- package/dist/{Publish-B-d-HDdC.js → Publish-C5FqsnW3.js} +3 -3
- package/dist/{Recipe-B6XhSSjL.js → Recipe-CJKji-0v.js} +4 -4
- package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-B5NNOtuC.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-Dv69QGDe.js} +1 -1
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-C7MR2OwK.js → RuleView.vue_vue_type_script_setup_true_lang-CnEkf8GW.js} +531 -531
- package/dist/{Scheduler-aTMeXc1J.js → Scheduler-Bp_4ZoUj.js} +3 -3
- package/dist/{ServingSequence-u10_LImJ.js → ServingSequence-DchLB7W1.js} +55 -54
- package/dist/{Setting-mqRO9M3A.js → Setting-DpAnRneC.js} +5 -5
- package/dist/{Subcategory-Dws247zO.js → Subcategory-Bp_U6b_a.js} +5 -5
- package/dist/{Takeaway-l6t2P0CM.js → Takeaway-C6Yvjf9C.js} +1 -1
- package/dist/{Takeaway-xrF-l_5-.js → Takeaway-eBz0avMT.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-CTGqjfPL.js → Takeaway.vue_vue_type_script_setup_true_lang-s7cuAP0v.js} +5 -5
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-ny91N8sC.js → Thumbnail.vue_vue_type_script_setup_true_lang-DBYG98Xu.js} +4 -4
- package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-D2i3w3vg.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-BFwvDgDG.js} +1 -1
- package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-YLRlDi4-.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-BVxnZnzd.js} +2 -2
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-D5YGS6OF.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-mEghCiPA.js} +13 -13
- package/dist/{Unit-CWgfilET.js → Unit-B6bKPZIQ.js} +2 -2
- package/dist/{Variant-Bz1KfxAa.js → Variant-CJdpBl1K.js} +3 -3
- package/dist/{_id_-L2rFq9_N.js → _id_-Cf17CNOX.js} +9 -9
- package/dist/{app-B-k_3Xub.js → app-BoMWSx89.js} +33 -33
- package/dist/{app-CHE3ax6p.js → app-w1kUpkW5.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/api/index.d.ts +1 -0
- package/dist/apps/mf-menu/src/components/MenuHeaderContext.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/components/MenuRestaurantSelector.vue.d.ts +29 -0
- package/dist/apps/mf-menu/src/stores/menu.d.ts +1 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-BJ87x0uc.js → linked-status-BqJWUcVj.js} +2 -2
- package/dist/assets/menu-export-Dnxo90z1.js +186 -0
- package/dist/assets/{override-menu-Bbcn8K2b.js → override-menu-CYXqVELM.js} +2 -2
- package/dist/assets/{validate-menu-DV2Q2SYz.js → validate-menu-C8UamASu.js} +2 -2
- package/dist/{catalog-DaO8QBSU.js → catalog-DBmh4WAG.js} +1 -1
- package/dist/{catalogSetting-Bks6N0Pq.js → catalogSetting-DU1xmy0f.js} +1 -1
- package/dist/{currency-BVqmQ8Pm.js → currency-kg9-zbPt.js} +1 -1
- package/dist/{dayjs.min-C5JlG2KX.js → dayjs.min-sFCfvj7o.js} +2 -2
- package/dist/{index-CCO0ZsOp.js → index-Dsfx6bUc.js} +5 -5
- package/dist/{index-B__5-vsM.js → index-y8EZTw6Z.js} +4 -4
- package/dist/{index.vue_vue_type_script_setup_true_lang-DsMFmYGf.js → index.vue_vue_type_script_setup_true_lang-BJLNbe5R.js} +49975 -39440
- package/dist/{item-DBtmeIW9.js → item-COrHMvzn.js} +17 -17
- package/dist/{jszip.min-BIg_yHC8.js → jszip.min-DUDMau14.js} +153 -153
- package/dist/{memberPricing-C0qx6TEN.js → memberPricing-CeRIT6MO.js} +1 -1
- package/dist/{menu-DzWUnx8X.js → menu-CHgRB67k.js} +1 -1
- package/dist/{menuV2-COSJ__9Q.js → menuV2-BD8ZEaQH.js} +110 -106
- package/dist/mf-menu.css +1 -1
- package/dist/{order_pacing-C8jdjM6u.js → order_pacing-D1AnXxBm.js} +5 -5
- package/dist/{priceTier-BP2_Mn24.js → priceTier-CoMN4KMU.js} +1 -1
- package/dist/{rules-4DOmc5Ho.js → rules-DMR9hBYD.js} +3 -3
- package/dist/{scheduler-Dn9jQp6E.js → scheduler-CKoiMRzw.js} +4 -4
- package/dist/{toExcel-CXdU7vZw.js → toExcel-CwIaZ36w.js} +2 -2
- package/dist/{unit-UV-cxB98.js → unit-CQPZOeGq.js} +2 -2
- package/package.json +3 -3
- package/dist/Products-B4zwJdTK.js +0 -312
- package/dist/assets/menu-export-JPnS6OhL.js +0 -186
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as d, ref as g, watch as _, resolveComponent as S, createBlock as T, openBlock as f, unref as y, computed as h } from "vue";
|
|
2
2
|
import { useI18n as m } from "@feedmepos/mf-common";
|
|
3
3
|
import { useDialogChild as w, useDialog as x, useSnackbar as C } from "@feedmepos/ui-library";
|
|
4
|
-
import { u as k, B as M } from "./index.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { u as k, B as M } from "./index.vue_vue_type_script_setup_true_lang-BJLNbe5R.js";
|
|
5
5
|
const v = /* @__PURE__ */ d({
|
|
6
6
|
__name: "AddPriceGroupDialog",
|
|
7
7
|
setup(s) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as I, watch as h, ref as E, computed as w, resolveComponent as _, createElementBlock as F, openBlock as P, Fragment as M, createVNode as f, unref as g, withCtx as b, createElementVNode as O, renderList as q, toDisplayString as S } from "vue";
|
|
2
|
-
import { J as v, K as C, u as Y } from "./index.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { J as v, K as C, u as Y } from "./index.vue_vue_type_script_setup_true_lang-BJLNbe5R.js";
|
|
3
3
|
import { useI18n as D } from "@feedmepos/mf-common";
|
|
4
4
|
import { useDialogChild as k } from "@feedmepos/ui-library";
|
|
5
|
-
import { u as R } from "./menuV2-
|
|
6
|
-
import { _ as $ } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { u as R } from "./menuV2-BD8ZEaQH.js";
|
|
6
|
+
import { _ as $ } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-BVxnZnzd.js";
|
|
7
7
|
import { g as N } from "./translation-fNx6yEpy.js";
|
|
8
8
|
const B = { class: "py-12 px-16 space-y-4" }, U = /* @__PURE__ */ I({
|
|
9
9
|
__name: "AddSubcategoryDialogContentComponent",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as re, computed as N, resolveComponent as v, createElementBlock as d, openBlock as u, createVNode as t, createCommentVNode as V, unref as n, toDisplayString as O, createElementVNode as _, withCtx as p, Fragment as R, renderList as I, createBlock as q, ref as B, Transition as de, createTextVNode as fe } from "vue";
|
|
2
|
-
import { G as w, a6 as $, u as ye, y as _e, a7 as L, H as he, J as se, K as ie, ak as ce } from "./index.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { G as w, a6 as $, u as ye, y as _e, a7 as L, H as he, J as se, K as ie, ak as ce } from "./index.vue_vue_type_script_setup_true_lang-BJLNbe5R.js";
|
|
3
3
|
import { useI18n as me } from "@feedmepos/mf-common";
|
|
4
4
|
import { components as ge } from "@feedmepos/ui-library";
|
|
5
5
|
import { _ as Ve } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
|
|
6
|
-
import { _ as ue } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { _ as ue } from "./RuleView.vue_vue_type_script_setup_true_lang-CnEkf8GW.js";
|
|
7
7
|
import { u as ke } from "./discardConfirm-BHni0LNu.js";
|
|
8
|
-
import { u as be } from "./menu-
|
|
9
|
-
import { L as Fe } from "./LinkProductSideSheet-
|
|
8
|
+
import { u as be } from "./menu-CHgRB67k.js";
|
|
9
|
+
import { L as Fe } from "./LinkProductSideSheet-BAVjkhSM.js";
|
|
10
10
|
const xe = { class: "space-y-8" }, Ce = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "space-y-16"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { u as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import "./index.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { u as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-BEkD_xvB.js";
|
|
2
|
+
import "./index.vue_vue_type_script_setup_true_lang-BJLNbe5R.js";
|
|
3
3
|
var Z = {
|
|
4
4
|
defaultAmount: 0,
|
|
5
5
|
defaultCurrency: "USD",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineStore as J } from "pinia";
|
|
2
2
|
import { defineComponent as S, computed as x, ref as A, watch as D, resolveComponent as V, createBlock as W, openBlock as F, withCtx as w, createVNode as m, createElementVNode as f, normalizeClass as Q, createElementBlock as k, toDisplayString as C, unref as l, Fragment as L, renderSlot as X, renderList as Z, getCurrentInstance as ee } from "vue";
|
|
3
|
-
import { aa as N, ab as te, a8 as O, G as E, P as $, B as j, A as h, a9 as ne, J as T, K as M, H as ae, u as oe } from "./index.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import { aa as N, ab as te, a8 as O, G as E, P as $, B as j, A as h, a9 as ne, J as T, K as M, H as ae, u as oe } from "./index.vue_vue_type_script_setup_true_lang-BJLNbe5R.js";
|
|
4
4
|
import { useI18n as P } from "@feedmepos/mf-common";
|
|
5
5
|
import { useSnackbar as I, components as le, useDialog as ue, FmButtonVariant as ie } from "@feedmepos/ui-library";
|
|
6
6
|
import { u as se } from "./discardConfirm-BHni0LNu.js";
|
|
7
7
|
import { c as re } from "./check-C9mY6LiX.js";
|
|
8
8
|
import "./RuleConditionSelector.vue_vue_type_style_index_0_lang-CK8z7qA8.js";
|
|
9
|
-
import "./menuV2-
|
|
9
|
+
import "./menuV2-BD8ZEaQH.js";
|
|
10
10
|
import "./app-5fxKLAzS.js";
|
|
11
11
|
/* empty css */
|
|
12
12
|
import { c as me } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feedmepos/mf-menu",
|
|
3
|
-
"version": "0.32.
|
|
3
|
+
"version": "0.32.61-dev.1",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@feedmepos/hrm-permission": "1.0.6-dev.2",
|
|
25
25
|
"@feedmepos/inventory-core": "^0.2.6",
|
|
26
26
|
"@feedmepos/menu": "2.0.1",
|
|
27
|
-
"@feedmepos/entity": "0.0.
|
|
27
|
+
"@feedmepos/entity": "0.0.14",
|
|
28
28
|
"@feedmepos/mf-inventory-portal": "https://registry.npmjs.org/@feedmepos/mf-inventory-portal/-/mf-inventory-portal-0.0.19-dev.6.tgz",
|
|
29
29
|
"@feedmepos/mf-remy-panel": "^0.3.5",
|
|
30
30
|
"@feedmepos/ui-library": "1.8.8",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"vue3-lottie": "^3.3.0",
|
|
57
57
|
"vuedraggable": "^4.1.0",
|
|
58
58
|
"xlsx": "^0.18.5",
|
|
59
|
-
"@feedmepos/mf-common": "^1.29.
|
|
59
|
+
"@feedmepos/mf-common": "^1.29.25"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@rollup/plugin-commonjs": "^28.0.2",
|
|
@@ -1,312 +0,0 @@
|
|
|
1
|
-
import { defineComponent as D, computed as _, ref as W, resolveComponent as w, createBlock as m, openBlock as l, unref as e, withCtx as p, createElementVNode as d, toDisplayString as Z, createVNode as u, createCommentVNode as C, createElementBlock as L, Fragment as U } from "vue";
|
|
2
|
-
import { D as E } from "./dayjs.min-C5JlG2KX.js";
|
|
3
|
-
import { J as re, F as ie } from "./jszip.min-BIg_yHC8.js";
|
|
4
|
-
import { u as K, B as Q, z as j, D as H, y as X, A as le, G as ue, H as R, I as ce } from "./index.vue_vue_type_script_setup_true_lang-DsMFmYGf.js";
|
|
5
|
-
import { w as me } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-CFjS_1Ws.js";
|
|
6
|
-
import { h as $, A as O } from "./app-B-k_3Xub.js";
|
|
7
|
-
import { useCoreStore as ee, useI18n as de } from "@feedmepos/mf-common";
|
|
8
|
-
import { useDialog as te, useDialogChild as pe, useSnackbar as ne, useBreakpoints as _e, FmButtonVariant as T, FmButtonColorThemeVariant as h } from "@feedmepos/ui-library";
|
|
9
|
-
import { _ as I } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
10
|
-
import { _ as fe, a as q } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js";
|
|
11
|
-
import { _ as ge } from "./PageLayout.vue_vue_type_script_setup_true_lang-BVmHMvKD.js";
|
|
12
|
-
import { u as ve, a as be } from "./menu-DzWUnx8X.js";
|
|
13
|
-
import { u as ye } from "./item-DBtmeIW9.js";
|
|
14
|
-
import { _ as G, a as ke } from "./Product.vue_vue_type_script_setup_true_lang-D8VJf6ck.js";
|
|
15
|
-
import { L as J } from "./LinkProductSideSheet-CQRvO3h0.js";
|
|
16
|
-
import { _ as xe } from "./TreeEditorOpenner.vue_vue_type_script_setup_true_lang-D5YGS6OF.js";
|
|
17
|
-
import { u as Se } from "./Thumbnail.vue_vue_type_script_setup_true_lang-ny91N8sC.js";
|
|
18
|
-
import { m as he } from "./toExcel-CXdU7vZw.js";
|
|
19
|
-
const Me = { class: "space-y-24 mb-24" }, Ce = ["innerHTML"], we = { class: "flex justify-end gap-8" }, Fe = /* @__PURE__ */ D({
|
|
20
|
-
__name: "ConfirmActionDialog",
|
|
21
|
-
props: {
|
|
22
|
-
description: {},
|
|
23
|
-
value: {},
|
|
24
|
-
message: { default: "To confirm your action, type <b>[[value]]</b> in the text field." }
|
|
25
|
-
},
|
|
26
|
-
setup(V) {
|
|
27
|
-
const n = V, f = _(() => n.message.replace("[[value]]", n.value)), y = W(""), o = te(), { emitAction: k } = pe();
|
|
28
|
-
return (g, i) => {
|
|
29
|
-
const x = w("FmTextField"), S = w("FmButton"), v = w("FmForm");
|
|
30
|
-
return l(), m(v, {
|
|
31
|
-
"on-validation-success": () => e(k)("primary"),
|
|
32
|
-
"blame-form-child-on-validation-failed": ""
|
|
33
|
-
}, {
|
|
34
|
-
default: p(() => [
|
|
35
|
-
d("div", Me, [
|
|
36
|
-
d("div", null, Z(g.description), 1),
|
|
37
|
-
d("div", { innerHTML: f.value }, null, 8, Ce),
|
|
38
|
-
d("div", null, [
|
|
39
|
-
u(x, {
|
|
40
|
-
modelValue: y.value,
|
|
41
|
-
"onUpdate:modelValue": [
|
|
42
|
-
i[0] || (i[0] = (c) => y.value = c),
|
|
43
|
-
i[1] || (i[1] = () => {
|
|
44
|
-
})
|
|
45
|
-
],
|
|
46
|
-
placeholder: g.value,
|
|
47
|
-
rules: [(c) => c === g.value || "Value does not match"]
|
|
48
|
-
}, null, 8, ["modelValue", "placeholder", "rules"])
|
|
49
|
-
]),
|
|
50
|
-
d("div", we, [
|
|
51
|
-
u(S, {
|
|
52
|
-
label: "Cancel",
|
|
53
|
-
variant: "secondary",
|
|
54
|
-
onClick: i[2] || (i[2] = (c) => e(o).close())
|
|
55
|
-
}),
|
|
56
|
-
u(S, {
|
|
57
|
-
label: "Confirm",
|
|
58
|
-
type: "submit"
|
|
59
|
-
})
|
|
60
|
-
])
|
|
61
|
-
])
|
|
62
|
-
]),
|
|
63
|
-
_: 1
|
|
64
|
-
}, 8, ["on-validation-success"]);
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
}), $e = /* @__PURE__ */ D({
|
|
68
|
-
__name: "Migrate",
|
|
69
|
-
setup(V) {
|
|
70
|
-
const n = K(), f = ee(), y = ne(), { minor: o } = Q(y), k = W(!1), g = te();
|
|
71
|
-
async function i() {
|
|
72
|
-
x.value || k.value || g.open({
|
|
73
|
-
title: "Migrate to new version",
|
|
74
|
-
contentComponent: Fe,
|
|
75
|
-
contentComponentProps: {
|
|
76
|
-
value: "MIGRATE",
|
|
77
|
-
description: "Do you want to migrate to new version? Once migrate it will unable to revert to the older version."
|
|
78
|
-
}
|
|
79
|
-
}).onPrimary(async () => {
|
|
80
|
-
g.close(), await o(
|
|
81
|
-
async () => {
|
|
82
|
-
await n.migrate(), setTimeout(() => {
|
|
83
|
-
window.location.reload();
|
|
84
|
-
}, 2e3);
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
isLoading: k,
|
|
88
|
-
customId: n.state.menu._id,
|
|
89
|
-
message: "Migrating menu",
|
|
90
|
-
successMessage: "Migration completed"
|
|
91
|
-
}
|
|
92
|
-
);
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
const x = _(() => {
|
|
96
|
-
var M;
|
|
97
|
-
if (((M = f.sessionUser.value) == null ? void 0 : M.role.isAdmin) === !0)
|
|
98
|
-
return null;
|
|
99
|
-
const v = f.restaurants.value;
|
|
100
|
-
if (!v.length) return "Required at least one restaurant to migrate";
|
|
101
|
-
const c = v.filter((b) => !b.posVersion || !j.Pos.canUse({ feature: H.F_FEATURE.enum.menuV4, posVersion: b.posVersion }));
|
|
102
|
-
return c.length ? `Upgrade POS to V${j.Pos.minVersionToUse(H.F_FEATURE.enum.menuV4)} to use new menu: ${c.map((b) => b.profile.name).join(", ")}` : null;
|
|
103
|
-
});
|
|
104
|
-
return (S, v) => {
|
|
105
|
-
const c = w("FmSnackbar");
|
|
106
|
-
return !x.value && e(n).version !== e(X).enum.v4 ? (l(), m(c, {
|
|
107
|
-
key: 0,
|
|
108
|
-
class: "!max-w-full",
|
|
109
|
-
title: "New version of menu is out now!",
|
|
110
|
-
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.",
|
|
111
|
-
variant: "info",
|
|
112
|
-
action: "Migrate",
|
|
113
|
-
"z-index": 0,
|
|
114
|
-
onOnAction: i
|
|
115
|
-
})) : C("", !0);
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
}), Ve = "/assets/menu-export-JPnS6OhL.js", Ae = { class: "flex-1 flex justify-between gap-8 pl-8" }, Ee = { class: "flex items-center" }, Te = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Ie = { class: "fm-typo-en-body-md-600 font-semibold" }, De = { class: "flex gap-8" }, Xe = /* @__PURE__ */ D({
|
|
119
|
-
__name: "Products",
|
|
120
|
-
setup(V) {
|
|
121
|
-
const { t: n } = de(), f = ee(), y = Q(ne()), o = K(), k = _(() => o.rules.item), g = ye(), i = _(() => !o.state.currentSchedulerId), { selectedCategories: x } = ve(), S = _(() => ({
|
|
122
|
-
...le.menuV4ToV3(ue(o.state.menu)),
|
|
123
|
-
_id: o.state.menu._id,
|
|
124
|
-
_rev: o.state.menu._rev
|
|
125
|
-
})), v = _(() => {
|
|
126
|
-
const r = R.flatten(x.value.map((t) => t.items));
|
|
127
|
-
return R.uniqBy(r, (t) => t._id).length;
|
|
128
|
-
});
|
|
129
|
-
async function c(r, t) {
|
|
130
|
-
const a = new re();
|
|
131
|
-
for (let F = 0; F < r.length; F++)
|
|
132
|
-
a.file(`${t[F]}.xlsx`, r[F]);
|
|
133
|
-
const s = await a.generateAsync({ type: "blob" });
|
|
134
|
-
ie.saveAs(s, `books_${E().format("DD-MM-YYYY_HH-mm")}.zip`);
|
|
135
|
-
}
|
|
136
|
-
async function A() {
|
|
137
|
-
await y.minor(
|
|
138
|
-
async () => {
|
|
139
|
-
if (await o.readMenu(), o.version === X.enum.v4) {
|
|
140
|
-
const r = o.state.menu, t = E().format("DD-MM-YYYY_HH-mm"), a = [
|
|
141
|
-
`menu_${t}`,
|
|
142
|
-
`addonGroup_${t}`,
|
|
143
|
-
`itemLinkedAddon_${t}`,
|
|
144
|
-
`translationLocalization_${t}`
|
|
145
|
-
], s = await ce(
|
|
146
|
-
Ve,
|
|
147
|
-
JSON.stringify({
|
|
148
|
-
menu: r,
|
|
149
|
-
attributeSettings: f.itemAttributeSettings.value,
|
|
150
|
-
localizationKeys: o.state.featureFlags.supportedLocales
|
|
151
|
-
})
|
|
152
|
-
);
|
|
153
|
-
await c(s, a);
|
|
154
|
-
} else {
|
|
155
|
-
const r = he(S.value), t = `menu_${E().format("DD-MM-YYYY_HH-mm")}`;
|
|
156
|
-
await me(r, `${t}.xlsx`, {
|
|
157
|
-
bookType: "xlsx",
|
|
158
|
-
bookSST: !0,
|
|
159
|
-
type: "array",
|
|
160
|
-
compression: !0
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
},
|
|
164
|
-
{ successMessage: "Menu exported", customId: o.state.menu._id }
|
|
165
|
-
);
|
|
166
|
-
}
|
|
167
|
-
const {
|
|
168
|
-
menuItems: M,
|
|
169
|
-
categories: b,
|
|
170
|
-
linkItemRules: B,
|
|
171
|
-
handleSubmit: Y,
|
|
172
|
-
catalogManager: N,
|
|
173
|
-
schedulerManager: P
|
|
174
|
-
} = Se(!1), oe = _e(), ae = _(() => oe.breakpoints.value.xs), se = _(() => {
|
|
175
|
-
var a;
|
|
176
|
-
const r = ((a = f.sessionUser.value) == null ? void 0 : a.permissions) ?? [], t = {
|
|
177
|
-
action: $.Action.manage,
|
|
178
|
-
subject: $.Subject.Business.menu_menuManagement
|
|
179
|
-
};
|
|
180
|
-
return O([t], r).granted;
|
|
181
|
-
}), z = _(() => {
|
|
182
|
-
var a;
|
|
183
|
-
const r = ((a = f.sessionUser.value) == null ? void 0 : a.permissions) ?? [], t = {
|
|
184
|
-
action: $.Action.manage,
|
|
185
|
-
subject: $.Subject.Business.menu_importExport
|
|
186
|
-
};
|
|
187
|
-
return O([t], r).granted;
|
|
188
|
-
});
|
|
189
|
-
return be().resetOnMount(), (r, t) => {
|
|
190
|
-
const a = w("fm-button");
|
|
191
|
-
return l(), m(ge, {
|
|
192
|
-
heading: e(n)("menu.products.title")
|
|
193
|
-
}, {
|
|
194
|
-
default: p(() => [
|
|
195
|
-
u($e),
|
|
196
|
-
u(ke)
|
|
197
|
-
]),
|
|
198
|
-
"append-heading": p(() => [
|
|
199
|
-
d("div", Ae, [
|
|
200
|
-
d("div", Ee, [
|
|
201
|
-
d("div", Te, [
|
|
202
|
-
d("p", Ie, Z(v.value), 1)
|
|
203
|
-
])
|
|
204
|
-
]),
|
|
205
|
-
d("div", De, [
|
|
206
|
-
ae.value ? (l(), m(G, { key: 1 }, {
|
|
207
|
-
default: p(({ trigger: s }) => [
|
|
208
|
-
u(fe, null, {
|
|
209
|
-
default: p(() => [
|
|
210
|
-
u(q, {
|
|
211
|
-
label: e(n)("menu.products.actions.export"),
|
|
212
|
-
onClick: A
|
|
213
|
-
}, null, 8, ["label"]),
|
|
214
|
-
u(q, {
|
|
215
|
-
label: e(n)("menu.products.actions.import"),
|
|
216
|
-
onClick: s
|
|
217
|
-
}, null, 8, ["label", "onClick"])
|
|
218
|
-
]),
|
|
219
|
-
_: 2
|
|
220
|
-
}, 1024)
|
|
221
|
-
]),
|
|
222
|
-
_: 1
|
|
223
|
-
})) : (l(), L(U, { key: 0 }, [
|
|
224
|
-
se.value ? (l(), m(xe, { key: 0 }, {
|
|
225
|
-
default: p(({ trigger: s }) => [
|
|
226
|
-
u(a, {
|
|
227
|
-
label: e(n)("menu.tree_editor.title"),
|
|
228
|
-
"bg-color": e(h).NeutralGray100,
|
|
229
|
-
"text-color": e(h).TypoSecondary,
|
|
230
|
-
variant: e(T).Primary,
|
|
231
|
-
onClick: s
|
|
232
|
-
}, null, 8, ["label", "bg-color", "text-color", "variant", "onClick"])
|
|
233
|
-
]),
|
|
234
|
-
_: 1
|
|
235
|
-
})) : C("", !0),
|
|
236
|
-
z.value ? (l(), m(a, {
|
|
237
|
-
key: 1,
|
|
238
|
-
"bg-color": e(h).NeutralGray100,
|
|
239
|
-
"text-color": e(h).TypoSecondary,
|
|
240
|
-
variant: e(T).Primary,
|
|
241
|
-
label: e(n)("menu.products.actions.export"),
|
|
242
|
-
onClick: A
|
|
243
|
-
}, null, 8, ["bg-color", "text-color", "variant", "label"])) : C("", !0),
|
|
244
|
-
z.value ? (l(), m(G, { key: 2 }, {
|
|
245
|
-
default: p(({ trigger: s }) => [
|
|
246
|
-
u(a, {
|
|
247
|
-
"bg-color": e(h).NeutralGray100,
|
|
248
|
-
"text-color": e(h).TypoSecondary,
|
|
249
|
-
variant: e(T).Primary,
|
|
250
|
-
label: e(n)("menu.products.actions.import"),
|
|
251
|
-
onClick: s
|
|
252
|
-
}, null, 8, ["bg-color", "text-color", "variant", "label", "onClick"])
|
|
253
|
-
]),
|
|
254
|
-
_: 1
|
|
255
|
-
})) : C("", !0)
|
|
256
|
-
], 64)),
|
|
257
|
-
v.value > 0 ? (l(), L(U, { key: 2 }, [
|
|
258
|
-
k.value.create ? (l(), m(I, {
|
|
259
|
-
key: 0,
|
|
260
|
-
label: e(n)("menu.products.actions.add"),
|
|
261
|
-
"prepend-icon": "add",
|
|
262
|
-
onClick: t[0] || (t[0] = (s) => e(g).create(null))
|
|
263
|
-
}, null, 8, ["label"])) : i.value ? (l(), m(J, {
|
|
264
|
-
key: 1,
|
|
265
|
-
"categorized-items": e(N).linkableItems.value,
|
|
266
|
-
"initial-value": e(N).currentItems.value,
|
|
267
|
-
"show-variant": !1,
|
|
268
|
-
"menu-items": e(M),
|
|
269
|
-
categories: e(b),
|
|
270
|
-
"link-item-rules": e(B),
|
|
271
|
-
"no-scheduler": i.value,
|
|
272
|
-
onSubmit: e(Y)
|
|
273
|
-
}, {
|
|
274
|
-
default: p(({ trigger: s }) => [
|
|
275
|
-
u(I, {
|
|
276
|
-
label: e(n)("menu.products.actions.link"),
|
|
277
|
-
"prepend-icon": "link",
|
|
278
|
-
onClick: s
|
|
279
|
-
}, null, 8, ["label", "onClick"])
|
|
280
|
-
]),
|
|
281
|
-
_: 1
|
|
282
|
-
}, 8, ["categorized-items", "initial-value", "menu-items", "categories", "link-item-rules", "no-scheduler", "onSubmit"])) : (l(), m(J, {
|
|
283
|
-
key: 2,
|
|
284
|
-
"categorized-items": e(P).linkableItems.value,
|
|
285
|
-
"initial-value": e(P).currentItems.value,
|
|
286
|
-
"show-variant": !1,
|
|
287
|
-
"menu-items": e(M),
|
|
288
|
-
categories: e(b),
|
|
289
|
-
"link-item-rules": e(B),
|
|
290
|
-
"no-scheduler": i.value,
|
|
291
|
-
onSubmit: e(Y)
|
|
292
|
-
}, {
|
|
293
|
-
default: p(({ trigger: s }) => [
|
|
294
|
-
u(I, {
|
|
295
|
-
label: e(n)("menu.products.actions.apply_scheduler"),
|
|
296
|
-
onClick: s
|
|
297
|
-
}, null, 8, ["label", "onClick"])
|
|
298
|
-
]),
|
|
299
|
-
_: 1
|
|
300
|
-
}, 8, ["categorized-items", "initial-value", "menu-items", "categories", "link-item-rules", "no-scheduler", "onSubmit"]))
|
|
301
|
-
], 64)) : C("", !0)
|
|
302
|
-
])
|
|
303
|
-
])
|
|
304
|
-
]),
|
|
305
|
-
_: 1
|
|
306
|
-
}, 8, ["heading"]);
|
|
307
|
-
};
|
|
308
|
-
}
|
|
309
|
-
});
|
|
310
|
-
export {
|
|
311
|
-
Xe as default
|
|
312
|
-
};
|