@feedmepos/mf-menu 0.32.7-beta.2 → 0.32.7-dev
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-BIQ0CTci.js → App-DCkQc7e4.js} +98 -98
- package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-uzmq3vwy.js +161 -0
- package/dist/BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js +74 -0
- package/dist/{Catalog-D2wc24o8.js → Catalog-CUPoRid3.js} +9 -9
- package/dist/{Category-DA5-55d2.js → Category-BkvhZ57Y.js} +7 -7
- package/dist/{Category-BPufryqK.js → Category-Cdw0ikhP.js} +4 -4
- package/dist/{CookingGuide-DKvou40e.js → CookingGuide-BZ-4oULM.js} +6 -6
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-DHoAYdGI.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CJvVFWdR.js} +3 -3
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js +26 -0
- package/dist/{Group-D60oAvmM.js → Group-C1FaXdUb.js} +1 -1
- package/dist/{Group-Bgpc6qE1.js → Group-Cec83DWm.js} +4 -4
- package/dist/{Group.vue_vue_type_script_setup_true_lang-BXn3--BL.js → Group.vue_vue_type_script_setup_true_lang-2_lLBdX2.js} +128 -128
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BD9IZkwW.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BEDyKWhK.js} +91 -91
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-BE3LdBYY.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-BteTvMnx.js} +3225 -3225
- package/dist/{Ingredient-Brv4hml-.js → Ingredient-DulL8h2B.js} +29 -29
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CIOX-pq1.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DoBx7Dal.js} +104 -104
- package/dist/{LinkProductSideSheet-BDMbKJ8o.js → LinkProductSideSheet-Br2eE8pC.js} +251 -251
- package/dist/MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js +69 -0
- package/dist/{MenuSetting-DvCu23my.js → MenuSetting-DxW4LCW4.js} +77 -77
- package/dist/{PageLayout.vue_vue_type_script_setup_true_lang-vFqWGM6P.js → PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js} +8 -8
- package/dist/{PrintRoute-DwgLKDUV.js → PrintRoute-Da6Zkx-0.js} +5 -5
- package/dist/{Product-EmoWM778.js → Product-Cs76t18_.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-5HyO_RYw.js → Product.vue_vue_type_script_setup_true_lang-C6SOu4Vv.js} +606 -606
- package/dist/{ProductInternalTools-PqzouaF2.js → ProductInternalTools-DPbeRvTM.js} +10 -10
- package/dist/{Products-ZgfTT9dI.js → Products--7dGfuuT.js} +52 -52
- package/dist/{Publish-CUdRwmN1.js → Publish-COmZtiyX.js} +5 -5
- package/dist/{Recipe-BRUxyire.js → Recipe-BaN_1zrP.js} +5 -5
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-CPFGkaTr.js → RuleView.vue_vue_type_script_setup_true_lang-DputprQj.js} +451 -448
- package/dist/{Scheduler-BXdZh-xC.js → Scheduler-BSUpIAaK.js} +4 -4
- package/dist/{ServingSequence-EAZHOHiy.js → ServingSequence-dXBb7e5d.js} +4 -4
- package/dist/{Setting-BRut_Xj0.js → Setting-CalEQW0n.js} +6 -6
- package/dist/{Subcategory-D6Yrs-vO.js → Subcategory-zPHtX7Vc.js} +5 -5
- package/dist/{Takeaway-Bi8JfDWa.js → Takeaway-CRDj2Bpe.js} +5 -5
- package/dist/{Takeaway-CRdlNTu7.js → Takeaway-CcnmeTmu.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-DKQZ9J8Z.js → Takeaway.vue_vue_type_script_setup_true_lang-Cj7vyOaP.js} +5 -5
- package/dist/{TextChip.vue_vue_type_script_setup_true_lang-BJMcI3U2.js → TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js} +5 -5
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-DDWk-WUW.js → Thumbnail.vue_vue_type_script_setup_true_lang-B0552qsN.js} +74 -74
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BwnyIDNH.js +6038 -0
- package/dist/{Unit-Ccs_k5IS.js → Unit-C7-Oj5S3.js} +3 -3
- package/dist/{Variant-BHmgMXq7.js → Variant-CYiMkE0q.js} +4 -4
- package/dist/{_id_-DSSoi4Gy.js → _id_-D75ZcNlf.js} +11 -11
- package/dist/{app-CzXxFrl1.js → app-5fxKLAzS.js} +447 -447
- package/dist/{app-C8Dm2-h4.js → app-BhLVpUSl.js} +35 -35
- package/dist/{app-B9seAt5l.js → app-DzVMOviz.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +20 -0
- package/dist/apps/mf-menu/src/components/feature/CategoryManager/CategoriesSelector.vue.d.ts +1 -1
- package/dist/apps/mf-menu/src/components/feature/MenuSelector.vue.d.ts +1 -1
- package/dist/apps/mf-menu/src/components/feature/SubcategoryManager/SubcategorySelector.vue.d.ts +1 -1
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +2 -1
- 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-BoIPm5hC.js +13 -0
- package/dist/assets/override-menu-DfTrwWpR.js +13 -0
- package/dist/assets/validate-menu-BhWvQ3T9.js +13 -0
- package/dist/{catalog-CD-fdGdY.js → catalog-CudNSsIP.js} +1 -1
- package/dist/{catalogSetting-Ci85lXor.js → catalogSetting-BVHO9tK3.js} +1 -1
- package/dist/{category-6NAH0dUF.js → category-BQpgz1lk.js} +1 -1
- package/dist/{currency-BP_z7R5d.js → currency-BfS7H2KE.js} +1 -1
- package/dist/{index-BLMijxTj.js → index-BHdPJta4.js} +91 -91
- package/dist/{index-C1XCbqC-.js → index-DmGJvREM.js} +56 -56
- package/dist/{index-Cftm4-G_.js → index-DuLXS699.js} +5 -5
- package/dist/{index-DgDQzkPR.js → index-aaoziUNI.js} +30 -30
- package/dist/{index.vue_vue_type_script_setup_true_lang-D-k9WcQV.js → index.vue_vue_type_script_setup_true_lang-Dje9kp-F.js} +40026 -40153
- package/dist/item-BtKW0wdj.js +7685 -0
- package/dist/{iteration-ZG64Re91.js → iteration-CaliNodx.js} +1 -1
- package/dist/{jszip.min-BETdv0rh.js → jszip.min-DXbkmgRD.js} +102 -102
- package/dist/{menu-COMXycAe.js → menu-D-lUEuvX.js} +1 -1
- package/dist/{menuV2-CeRS0Jw3.js → menuV2-D-6O36DO.js} +357 -348
- package/dist/mf-menu.css +1 -1
- package/dist/packages/shared/src/components/form/SelectFilter.vue.d.ts +1 -1
- package/dist/{priceTier-t2T3Q87F.js → priceTier-DKnYaOA9.js} +1 -1
- package/dist/{scheduler-BbJUVuiK.js → scheduler-DEwfbYPL.js} +7 -7
- package/dist/{subcategory-61kOQh4g.js → subcategory-CQKklgcd.js} +2 -2
- package/dist/{toExcel-DIYaK18-.js → toExcel-CRwL-QqF.js} +2 -2
- package/dist/{unit-B6StucsI.js → unit-BzM1rmN7.js} +151 -151
- package/dist/{vuedraggable-DnBIRDMr.js → vuedraggable-CK8z7qA8.js} +2 -2
- package/package.json +3 -2
- package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-BpEjqhAC.js +0 -161
- package/dist/BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-CnCoRLDg.js +0 -74
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-B3Ixruh-.js +0 -26
- package/dist/MenuSelector.vue_vue_type_script_setup_true_lang-Bm_hSelC.js +0 -69
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-JdHaBpaX.js +0 -5997
- package/dist/assets/linked-status-Cuf8X8_g.js +0 -13
- package/dist/assets/override-menu-yxQLf82k.js +0 -13
- package/dist/assets/validate-menu-BwbenBs6.js +0 -13
- package/dist/item-ByEPWjef.js +0 -6819
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { defineComponent as k, computed as d, ref as I, resolveComponent as l, createBlock as i, openBlock as m, withCtx as c, createElementVNode as a, createVNode as r, createElementBlock as L, Fragment as M, renderList as S, renderSlot as g, toDisplayString as x } from "vue";
|
|
2
|
+
import { useI18n as B } from "@feedmepos/mf-common";
|
|
3
|
+
const E = { class: "w-full flex items-center justify-between" }, N = { class: "p-4" }, P = { class: "flex-1 overflow-y-auto min-h-0" }, K = /* @__PURE__ */ k({
|
|
4
|
+
__name: "MenuSelector",
|
|
5
|
+
props: {
|
|
6
|
+
modelValue: {},
|
|
7
|
+
items: {},
|
|
8
|
+
placeholder: { default: "" },
|
|
9
|
+
searchPlaceholder: { default: "" },
|
|
10
|
+
title: { default: "" },
|
|
11
|
+
customLabel: {}
|
|
12
|
+
},
|
|
13
|
+
emits: ["update:modelValue"],
|
|
14
|
+
setup(p, { emit: f }) {
|
|
15
|
+
const t = p, _ = f, { t: $ } = B(), u = d(() => {
|
|
16
|
+
const e = t.items.find((o) => o.value === t.modelValue);
|
|
17
|
+
return e ? e.label : t.placeholder;
|
|
18
|
+
}), h = d(() => t.items.filter(
|
|
19
|
+
(e) => e.label.toLowerCase().includes(s.value.toLowerCase())
|
|
20
|
+
)), s = I("");
|
|
21
|
+
function v(e) {
|
|
22
|
+
_("update:modelValue", e);
|
|
23
|
+
}
|
|
24
|
+
return (e, o) => {
|
|
25
|
+
const b = l("FmIcon"), F = l("FmChip"), C = l("FmSearch"), V = l("FmMenuItem"), w = l("FmMenu");
|
|
26
|
+
return m(), i(w, { width: 220 }, {
|
|
27
|
+
"menu-button": c(() => [
|
|
28
|
+
r(F, {
|
|
29
|
+
label: u.value,
|
|
30
|
+
class: "w-full fm-typo-en-body-md-600 text-fm-color-neutral-gray-400"
|
|
31
|
+
}, {
|
|
32
|
+
default: c(() => [
|
|
33
|
+
a("div", E, [
|
|
34
|
+
a("p", null, x(e.customLabel || e.title || u.value), 1),
|
|
35
|
+
r(b, {
|
|
36
|
+
name: "expand_more",
|
|
37
|
+
size: "sm"
|
|
38
|
+
}),
|
|
39
|
+
g(e.$slots, "append")
|
|
40
|
+
])
|
|
41
|
+
]),
|
|
42
|
+
_: 3
|
|
43
|
+
}, 8, ["label"])
|
|
44
|
+
]),
|
|
45
|
+
default: c(() => [
|
|
46
|
+
a("div", N, [
|
|
47
|
+
r(C, {
|
|
48
|
+
autofocus: "",
|
|
49
|
+
modelValue: s.value,
|
|
50
|
+
"onUpdate:modelValue": o[0] || (o[0] = (n) => s.value = n),
|
|
51
|
+
placeholder: e.searchPlaceholder
|
|
52
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
53
|
+
]),
|
|
54
|
+
a("div", P, [
|
|
55
|
+
(m(!0), L(M, null, S(h.value, (n, y) => (m(), i(V, {
|
|
56
|
+
key: y,
|
|
57
|
+
label: n.label,
|
|
58
|
+
onClick: (j) => v(n.value)
|
|
59
|
+
}, null, 8, ["label", "onClick"]))), 128))
|
|
60
|
+
])
|
|
61
|
+
]),
|
|
62
|
+
_: 3
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
export {
|
|
68
|
+
K as _
|
|
69
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as X, ref as C, computed as $, watch as j, resolveComponent as g, createBlock as L, openBlock as d, unref as t, withCtx as y, createElementVNode as r, createVNode as u, createElementBlock as h, Fragment as
|
|
2
|
-
import { u as Z, I as
|
|
1
|
+
import { defineComponent as X, ref as C, computed as $, watch as j, resolveComponent as g, createBlock as L, openBlock as d, unref as t, withCtx as y, createElementVNode as r, createVNode as u, createElementBlock as h, Fragment as q, renderList as Y, createCommentVNode as B, toDisplayString as A, withModifiers as oe } from "vue";
|
|
2
|
+
import { u as Z, I as K, a3 as ae, D as ne, A as re, H as le } from "./index.vue_vue_type_script_setup_true_lang-Dje9kp-F.js";
|
|
3
3
|
import { useI18n as ee, useCoreStore as ie } from "@feedmepos/mf-common";
|
|
4
4
|
import { components as te, FmButtonVariant as N, useDialog as ce, useSnackbar as ue, useBreakpoints as me, FmButtonColorThemeVariant as W } from "@feedmepos/ui-library";
|
|
5
|
-
import { u as de, m as
|
|
6
|
-
import { _ as se } from "./app-
|
|
5
|
+
import { u as de, m as E, _ as Q, b as pe, c as _e, f as P } from "./RuleView.vue_vue_type_script_setup_true_lang-DputprQj.js";
|
|
6
|
+
import { _ as se } from "./app-BhLVpUSl.js";
|
|
7
7
|
import { u as ve } from "./discardConfirm-BHni0LNu.js";
|
|
8
|
-
import { _ as fe } from "./PageLayout.vue_vue_type_script_setup_true_lang-
|
|
9
|
-
import { C as z, a as M } from "./catalogSetting-
|
|
10
|
-
import { u as ge } from "./priceTier-
|
|
8
|
+
import { _ as fe } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
9
|
+
import { C as z, a as M } from "./catalogSetting-BVHO9tK3.js";
|
|
10
|
+
import { u as ge } from "./priceTier-DKnYaOA9.js";
|
|
11
11
|
const be = {
|
|
12
12
|
class: "fm-typo-en-title-md-600 mr-auto"
|
|
13
13
|
}, ye = {
|
|
@@ -34,10 +34,10 @@ const be = {
|
|
|
34
34
|
editingGroup: {}
|
|
35
35
|
},
|
|
36
36
|
emits: ["update:modelValue", "submit"],
|
|
37
|
-
setup(
|
|
37
|
+
setup(H, {
|
|
38
38
|
emit: n
|
|
39
39
|
}) {
|
|
40
|
-
const x =
|
|
40
|
+
const x = H, G = n, {
|
|
41
41
|
t: i
|
|
42
42
|
} = ee(), T = Z(), l = C({
|
|
43
43
|
name: "",
|
|
@@ -51,59 +51,59 @@ const be = {
|
|
|
51
51
|
categories: $(() => T.categories || [])
|
|
52
52
|
}), m = $({
|
|
53
53
|
get: () => x.modelValue,
|
|
54
|
-
set: (
|
|
54
|
+
set: (s) => G("update:modelValue", s)
|
|
55
55
|
}), V = C(null);
|
|
56
|
-
j(() => x.editingGroup, (
|
|
57
|
-
|
|
58
|
-
name:
|
|
59
|
-
description:
|
|
60
|
-
rules:
|
|
56
|
+
j(() => x.editingGroup, (s) => {
|
|
57
|
+
s ? l.value = {
|
|
58
|
+
name: s.name,
|
|
59
|
+
description: s.description,
|
|
60
|
+
rules: s.rules.map((e) => ({
|
|
61
61
|
...e,
|
|
62
62
|
restaurantRule: e.restaurantRule ? {
|
|
63
|
-
restaurantAttributes:
|
|
64
|
-
restaurantCustomAttributes:
|
|
63
|
+
restaurantAttributes: E(e.restaurantRule.restaurantAttributes),
|
|
64
|
+
restaurantCustomAttributes: E(e.restaurantRule.restaurantCustomAttributes)
|
|
65
65
|
} : void 0,
|
|
66
66
|
itemRule: e.itemRule ? {
|
|
67
|
-
itemAttributes: b(
|
|
68
|
-
itemCustomAttributes:
|
|
67
|
+
itemAttributes: b(E(e.itemRule.itemAttributes)),
|
|
68
|
+
itemCustomAttributes: E(e.itemRule.itemCustomAttributes)
|
|
69
69
|
} : void 0
|
|
70
70
|
}))
|
|
71
71
|
} : l.value = {
|
|
72
72
|
name: "",
|
|
73
73
|
description: "",
|
|
74
74
|
rules: []
|
|
75
|
-
}, V.value =
|
|
75
|
+
}, V.value = K.cloneDeep(l.value);
|
|
76
76
|
}, {
|
|
77
77
|
immediate: !0
|
|
78
|
-
}), j(() => x.modelValue, (
|
|
79
|
-
|
|
78
|
+
}), j(() => x.modelValue, (s) => {
|
|
79
|
+
s || (l.value = {
|
|
80
80
|
name: "",
|
|
81
81
|
description: "",
|
|
82
82
|
rules: []
|
|
83
83
|
});
|
|
84
84
|
});
|
|
85
|
-
function S(
|
|
86
|
-
return `${
|
|
85
|
+
function S(s) {
|
|
86
|
+
return `${s}_${(/* @__PURE__ */ new Date()).toISOString()}`;
|
|
87
87
|
}
|
|
88
88
|
async function U() {
|
|
89
89
|
var e;
|
|
90
|
-
const
|
|
90
|
+
const s = {
|
|
91
91
|
_id: ((e = x.editingGroup) == null ? void 0 : e._id) ?? S("group"),
|
|
92
92
|
name: l.value.name,
|
|
93
93
|
description: l.value.description,
|
|
94
|
-
rules: l.value.rules.map((
|
|
95
|
-
_id:
|
|
96
|
-
restaurantRule:
|
|
97
|
-
restaurantAttributes:
|
|
98
|
-
restaurantCustomAttributes:
|
|
94
|
+
rules: l.value.rules.map((a) => ({
|
|
95
|
+
_id: a._id,
|
|
96
|
+
restaurantRule: a.restaurantRule ? {
|
|
97
|
+
restaurantAttributes: P(a.restaurantRule.restaurantAttributes),
|
|
98
|
+
restaurantCustomAttributes: P(a.restaurantRule.restaurantCustomAttributes)
|
|
99
99
|
} : void 0,
|
|
100
|
-
itemRule:
|
|
101
|
-
itemAttributes:
|
|
102
|
-
itemCustomAttributes:
|
|
100
|
+
itemRule: a.itemRule ? {
|
|
101
|
+
itemAttributes: P(R(a.itemRule.itemAttributes)),
|
|
102
|
+
itemCustomAttributes: P(a.itemRule.itemCustomAttributes)
|
|
103
103
|
} : void 0
|
|
104
104
|
}))
|
|
105
105
|
};
|
|
106
|
-
G("submit",
|
|
106
|
+
G("submit", s);
|
|
107
107
|
}
|
|
108
108
|
const w = () => ({
|
|
109
109
|
_id: S("rule"),
|
|
@@ -116,23 +116,23 @@ const be = {
|
|
|
116
116
|
itemCustomAttributes: null
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
|
-
function D(
|
|
120
|
-
l.value.rules = l.value.rules.filter((e) => e._id !==
|
|
119
|
+
function D(s) {
|
|
120
|
+
l.value.rules = l.value.rules.filter((e) => e._id !== s);
|
|
121
121
|
}
|
|
122
122
|
function I() {
|
|
123
123
|
m.value = !1;
|
|
124
124
|
}
|
|
125
|
-
const v = ve(() => !
|
|
125
|
+
const v = ve(() => !K.isEqual(V.value, l.value), () => {
|
|
126
126
|
m.value = !1;
|
|
127
127
|
});
|
|
128
|
-
function c(
|
|
129
|
-
l.value.rules.map((
|
|
130
|
-
...
|
|
128
|
+
function c(s) {
|
|
129
|
+
l.value.rules.map((a) => a._id).includes(s.menuRule._id) ? l.value.rules = l.value.rules.map((a) => a._id === s.menuRule._id ? s.menuRule : a) : l.value.rules.push({
|
|
130
|
+
...s.menuRule
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
133
|
const p = C();
|
|
134
|
-
return (
|
|
135
|
-
const
|
|
134
|
+
return (s, e) => {
|
|
135
|
+
const a = g("fm-button"), _ = g("FmTextField"), k = g("FmButton"), F = g("FmFormGroup"), f = g("fm-side-sheet");
|
|
136
136
|
return d(), L(f, {
|
|
137
137
|
modelValue: m.value,
|
|
138
138
|
"onUpdate:modelValue": e[6] || (e[6] = (o) => m.value = o),
|
|
@@ -144,24 +144,24 @@ const be = {
|
|
|
144
144
|
"max-width": 760,
|
|
145
145
|
"onOn:clickedAway": t(v)
|
|
146
146
|
}, {
|
|
147
|
-
"side-sheet-header": y(() => [u(
|
|
147
|
+
"side-sheet-header": y(() => [u(a, {
|
|
148
148
|
variant: t(N).Tertiary,
|
|
149
149
|
class: "cursor-pointer mr-4",
|
|
150
150
|
"prepend-icon": "arrow_back",
|
|
151
151
|
onClick: e[0] || (e[0] = () => m.value = !1)
|
|
152
|
-
}, null, 8, ["variant"]), r("p", be, A(
|
|
153
|
-
"side-sheet-footer": y(() => [r("div", Ce, [u(
|
|
152
|
+
}, null, 8, ["variant"]), r("p", be, A(s.editingGroup ? t(i)("menu.rule_groups.edit_group") : t(i)("menu.rule_groups.create_group")), 1)]),
|
|
153
|
+
"side-sheet-footer": y(() => [r("div", Ce, [u(a, {
|
|
154
154
|
label: t(i)("common.save"),
|
|
155
155
|
size: "lg",
|
|
156
156
|
type: "submit",
|
|
157
157
|
variant: "primary"
|
|
158
|
-
}, null, 8, ["label"]), u(
|
|
158
|
+
}, null, 8, ["label"]), u(a, {
|
|
159
159
|
label: t(i)("common.cancel"),
|
|
160
160
|
size: "lg",
|
|
161
161
|
variant: "tertiary",
|
|
162
162
|
onClick: I
|
|
163
163
|
}, null, 8, ["label"])])]),
|
|
164
|
-
default: y(() => [r("div", ye, [u(
|
|
164
|
+
default: y(() => [r("div", ye, [u(Q, {
|
|
165
165
|
title: t(i)("menu.rule_groups.form.basic_info")
|
|
166
166
|
}, {
|
|
167
167
|
default: y(() => [r("div", he, [u(_, {
|
|
@@ -187,13 +187,13 @@ const be = {
|
|
|
187
187
|
"model-value": l.value.rules,
|
|
188
188
|
rules: [(o) => o.length > 0 || t(i)("menu.rule_groups.validation.at_least_one_rule_required")]
|
|
189
189
|
}, {
|
|
190
|
-
default: y(() => [u(
|
|
190
|
+
default: y(() => [u(Q, {
|
|
191
191
|
title: t(i)("menu.rule_groups.form.rules"),
|
|
192
192
|
"sub-title": t(i)("menu.rule_groups.form.rules_description")
|
|
193
193
|
}, {
|
|
194
|
-
default: y(() => [l.value.rules.length > 0 ? (d(!0), h(
|
|
194
|
+
default: y(() => [l.value.rules.length > 0 ? (d(!0), h(q, {
|
|
195
195
|
key: 0
|
|
196
|
-
}, Y(l.value.rules, (o, O) => (d(), h(
|
|
196
|
+
}, Y(l.value.rules, (o, O) => (d(), h(q, {
|
|
197
197
|
key: O
|
|
198
198
|
}, [r("div", xe, [r("div", ke, [u(pe, {
|
|
199
199
|
"model-value": o,
|
|
@@ -268,7 +268,7 @@ const be = {
|
|
|
268
268
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
269
269
|
}, Le = /* @__PURE__ */ X({
|
|
270
270
|
__name: "LinkProductRuleGroups",
|
|
271
|
-
setup(
|
|
271
|
+
setup(H) {
|
|
272
272
|
const {
|
|
273
273
|
t: n
|
|
274
274
|
} = ee(), x = ce(), G = ue(), i = ne(G), T = Z(), l = C(T.state.menu.ruleGroupSettings || {
|
|
@@ -298,8 +298,8 @@ const be = {
|
|
|
298
298
|
icon: "delete",
|
|
299
299
|
"text-color": W.NeutralGray400,
|
|
300
300
|
variant: N.Tertiary,
|
|
301
|
-
onClick: (
|
|
302
|
-
|
|
301
|
+
onClick: (a) => {
|
|
302
|
+
a.stopPropagation(), c(e.row.original._id);
|
|
303
303
|
}
|
|
304
304
|
}, null)])
|
|
305
305
|
}];
|
|
@@ -313,11 +313,11 @@ const be = {
|
|
|
313
313
|
R.value = e, b.value = !0;
|
|
314
314
|
}
|
|
315
315
|
function c(e) {
|
|
316
|
-
const
|
|
317
|
-
|
|
316
|
+
const a = l.value.groups.find((_) => _._id === e);
|
|
317
|
+
a && x.open({
|
|
318
318
|
title: n("menu.rule_groups.delete_dialog.title"),
|
|
319
319
|
message: n("menu.rule_groups.delete_dialog.message", {
|
|
320
|
-
name:
|
|
320
|
+
name: a.name
|
|
321
321
|
}),
|
|
322
322
|
primaryActions: {
|
|
323
323
|
text: n("menu.common.actions.remove"),
|
|
@@ -329,7 +329,7 @@ const be = {
|
|
|
329
329
|
close: !0
|
|
330
330
|
}
|
|
331
331
|
}).onPrimary(async () => {
|
|
332
|
-
const _ =
|
|
332
|
+
const _ = K.cloneDeep(l.value);
|
|
333
333
|
_.groups = _.groups.filter((k) => k._id !== e), await p(_), x.close();
|
|
334
334
|
});
|
|
335
335
|
}
|
|
@@ -342,18 +342,18 @@ const be = {
|
|
|
342
342
|
successMessage: n("menu.rule_groups.saved_successfully")
|
|
343
343
|
});
|
|
344
344
|
}
|
|
345
|
-
async function
|
|
345
|
+
async function s(e) {
|
|
346
346
|
var k;
|
|
347
|
-
const
|
|
348
|
-
|
|
347
|
+
const a = (k = l.value.groups) == null ? void 0 : k.findIndex((F) => F._id === e._id), _ = K.cloneDeep(l.value);
|
|
348
|
+
a >= 0 ? _.groups[a] = e : _.groups.push(e), await p(_), b.value = !1;
|
|
349
349
|
}
|
|
350
350
|
return j(() => b.value, (e) => {
|
|
351
351
|
e || (R.value = null);
|
|
352
|
-
}), (e,
|
|
352
|
+
}), (e, a) => {
|
|
353
353
|
const _ = g("FmButton"), k = g("FmSearch"), F = g("FmTable");
|
|
354
354
|
return d(), h("div", null, [V.value ? (d(), h("div", Ue, [r("div", Ie, [r("div", Me, [u(k, {
|
|
355
355
|
modelValue: S.value,
|
|
356
|
-
"onUpdate:modelValue":
|
|
356
|
+
"onUpdate:modelValue": a[1] || (a[1] = (f) => S.value = f),
|
|
357
357
|
autofocus: "",
|
|
358
358
|
class: "w-full",
|
|
359
359
|
placeholder: t(n)("menu.rule_groups.search_placeholder")
|
|
@@ -361,7 +361,7 @@ const be = {
|
|
|
361
361
|
icon: "add",
|
|
362
362
|
variant: t(N).Secondary,
|
|
363
363
|
onClick: I
|
|
364
|
-
}, null, 8, ["variant"])]), r("div", Be, [(d(!0), h(
|
|
364
|
+
}, null, 8, ["variant"])]), r("div", Be, [(d(!0), h(q, null, Y(U.value, (f) => (d(), h("div", {
|
|
365
365
|
key: f._id,
|
|
366
366
|
class: "flex flex-row py-12 px-16 cursor-pointer",
|
|
367
367
|
onClick: (o) => v(f)
|
|
@@ -376,7 +376,7 @@ const be = {
|
|
|
376
376
|
onClick: I
|
|
377
377
|
}, null, 8, ["label"])]), r("div", $e, [r("div", Ge, [u(k, {
|
|
378
378
|
modelValue: S.value,
|
|
379
|
-
"onUpdate:modelValue":
|
|
379
|
+
"onUpdate:modelValue": a[0] || (a[0] = (f) => S.value = f),
|
|
380
380
|
autofocus: "",
|
|
381
381
|
class: "mb-8",
|
|
382
382
|
placeholder: t(n)("menu.rule_groups.search_placeholder")
|
|
@@ -391,9 +391,9 @@ const be = {
|
|
|
391
391
|
_: 1
|
|
392
392
|
})])), u(Te, {
|
|
393
393
|
modelValue: b.value,
|
|
394
|
-
"onUpdate:modelValue":
|
|
394
|
+
"onUpdate:modelValue": a[2] || (a[2] = (f) => b.value = f),
|
|
395
395
|
"editing-group": R.value,
|
|
396
|
-
onSubmit:
|
|
396
|
+
onSubmit: s
|
|
397
397
|
}, null, 8, ["modelValue", "editing-group"])]);
|
|
398
398
|
};
|
|
399
399
|
}
|
|
@@ -419,7 +419,7 @@ const be = {
|
|
|
419
419
|
key: 2
|
|
420
420
|
}, at = /* @__PURE__ */ X({
|
|
421
421
|
__name: "MenuSetting",
|
|
422
|
-
setup(
|
|
422
|
+
setup(H) {
|
|
423
423
|
var I;
|
|
424
424
|
const {
|
|
425
425
|
t: n
|
|
@@ -445,9 +445,9 @@ const be = {
|
|
|
445
445
|
if (!G.currentCountry.value) return [];
|
|
446
446
|
const v = m.value.mode === M.MANUAL ? m.value.inclusive ?? [] : [];
|
|
447
447
|
return re.Country.getCountry(G.currentCountry.value).taxSystems.map((p) => {
|
|
448
|
-
const
|
|
448
|
+
const s = v.find((e) => e.systemCode === p.code);
|
|
449
449
|
return {
|
|
450
|
-
inclusive: (
|
|
450
|
+
inclusive: (s == null ? void 0 : s.inclusive) || !1,
|
|
451
451
|
systemCode: p.code
|
|
452
452
|
};
|
|
453
453
|
});
|
|
@@ -455,8 +455,8 @@ const be = {
|
|
|
455
455
|
function S(v) {
|
|
456
456
|
const c = m.value, p = c.mode === M.AUTO ? z.manualTax(V.value) : le(c);
|
|
457
457
|
p.inclusive ?? (p.inclusive = []);
|
|
458
|
-
const
|
|
459
|
-
|
|
458
|
+
const s = p.inclusive.findIndex((e) => e.systemCode === v.systemCode);
|
|
459
|
+
s < 0 ? p.inclusive.push(v) : p.inclusive.splice(s, 1, v), m.value = p;
|
|
460
460
|
}
|
|
461
461
|
async function U() {
|
|
462
462
|
if (l.value.lowStock !== null && l.value.lowStock !== void 0 && !Number.isInteger(l.value.lowStock))
|
|
@@ -492,7 +492,7 @@ const be = {
|
|
|
492
492
|
}, null)])
|
|
493
493
|
}];
|
|
494
494
|
return (v, c) => {
|
|
495
|
-
const p = g("FmTabs"),
|
|
495
|
+
const p = g("FmTabs"), s = g("fm-radio"), e = g("fm-radio-group"), a = g("fm-checkbox"), _ = g("FormItem"), k = g("FmStepperField"), F = g("FmButton"), f = g("FmTable");
|
|
496
496
|
return d(), L(fe, {
|
|
497
497
|
heading: t(n)("menu.menu_setting.title")
|
|
498
498
|
}, {
|
|
@@ -500,7 +500,7 @@ const be = {
|
|
|
500
500
|
items: R.value,
|
|
501
501
|
modelValue: b.value,
|
|
502
502
|
"onUpdate:modelValue": c[0] || (c[0] = (o) => b.value = o)
|
|
503
|
-
}, null, 8, ["items", "modelValue"]), r("div", je, [b.value === "conf" ? (d(), h("div", Ee, [u(
|
|
503
|
+
}, null, 8, ["items", "modelValue"]), r("div", je, [b.value === "conf" ? (d(), h("div", Ee, [u(Q, {
|
|
504
504
|
title: "Tax setting"
|
|
505
505
|
}, {
|
|
506
506
|
default: y(() => [u(_, {
|
|
@@ -512,17 +512,17 @@ const be = {
|
|
|
512
512
|
o === t(M).AUTO ? m.value = t(z).autoTax() : m.value = t(z).manualTax(V.value);
|
|
513
513
|
})
|
|
514
514
|
}, {
|
|
515
|
-
default: y(() => [u(
|
|
515
|
+
default: y(() => [u(s, {
|
|
516
516
|
value: t(M).AUTO,
|
|
517
517
|
label: t(n)("menu.setting.tax.modes.auto.label"),
|
|
518
518
|
sublabel: t(n)("menu.setting.tax.modes.auto.sublabel")
|
|
519
|
-
}, null, 8, ["value", "label", "sublabel"]), u(
|
|
519
|
+
}, null, 8, ["value", "label", "sublabel"]), u(s, {
|
|
520
520
|
value: t(M).MANUAL,
|
|
521
521
|
label: t(n)("menu.setting.tax.modes.manual.label"),
|
|
522
522
|
sublabel: t(n)("menu.setting.tax.modes.manual.sublabel")
|
|
523
523
|
}, null, 8, ["value", "label", "sublabel"])]),
|
|
524
524
|
_: 1
|
|
525
|
-
}, 8, ["model-value"]), m.value.mode === t(M).MANUAL ? (d(), h("div", Pe, [(d(!0), h(
|
|
525
|
+
}, 8, ["model-value"]), m.value.mode === t(M).MANUAL ? (d(), h("div", Pe, [(d(!0), h(q, null, Y(V.value, (o) => (d(), L(a, {
|
|
526
526
|
key: o.systemCode,
|
|
527
527
|
"model-value": o.inclusive,
|
|
528
528
|
value: !0,
|
|
@@ -537,7 +537,7 @@ const be = {
|
|
|
537
537
|
_: 1
|
|
538
538
|
}, 8, ["label"])]),
|
|
539
539
|
_: 1
|
|
540
|
-
}), u(
|
|
540
|
+
}), u(Q, {
|
|
541
541
|
title: t(n)("menu.menu_setting.fields.low_stock.title"),
|
|
542
542
|
"sub-title": t(n)("menu.menu_setting.fields.low_stock.subtitle")
|
|
543
543
|
}, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as n, createElementBlock as a, openBlock as l, normalizeClass as t, createElementVNode as s, renderSlot as o, toDisplayString as r } from "vue";
|
|
2
2
|
const d = {
|
|
3
3
|
class: /* @__PURE__ */ t([
|
|
4
4
|
"flex flex-col",
|
|
@@ -7,22 +7,22 @@ const d = {
|
|
|
7
7
|
"min-h-[calc(100dvh-56px)]",
|
|
8
8
|
"xs:max-h-[calc(100dvh-56px)]"
|
|
9
9
|
])
|
|
10
|
-
},
|
|
10
|
+
}, p = {
|
|
11
11
|
class: /* @__PURE__ */ t([
|
|
12
12
|
"flex items-center",
|
|
13
13
|
"mb-24 xs:mb-0 xs:p-16",
|
|
14
14
|
"xs:border-b border-fm-color-neutral-gray-100"
|
|
15
15
|
])
|
|
16
|
-
},
|
|
16
|
+
}, c = { class: "fm-typo-en-title-md-600" }, _ = /* @__PURE__ */ n({
|
|
17
17
|
__name: "PageLayout",
|
|
18
18
|
props: {
|
|
19
19
|
heading: {}
|
|
20
20
|
},
|
|
21
|
-
setup(
|
|
22
|
-
return (e, m) => (
|
|
23
|
-
s("div",
|
|
21
|
+
setup(i) {
|
|
22
|
+
return (e, m) => (l(), a("div", d, [
|
|
23
|
+
s("div", p, [
|
|
24
24
|
o(e.$slots, "prepend-heading"),
|
|
25
|
-
s("h1",
|
|
25
|
+
s("h1", c, r(e.heading), 1),
|
|
26
26
|
o(e.$slots, "append-heading")
|
|
27
27
|
]),
|
|
28
28
|
o(e.$slots, "default")
|
|
@@ -30,5 +30,5 @@ const d = {
|
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
32
|
export {
|
|
33
|
-
|
|
33
|
+
_
|
|
34
34
|
};
|
|
@@ -2,12 +2,12 @@ import { defineComponent as J, ref as T, computed as f, resolveComponent as g, c
|
|
|
2
2
|
import { useI18n as Q } from "@feedmepos/mf-common";
|
|
3
3
|
import { components as W, useSnackbar as te, useDialog as oe } from "@feedmepos/ui-library";
|
|
4
4
|
import { _ as ne } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
5
|
-
import { _ as ae } from "./app-
|
|
6
|
-
import { H as j, I as le, J as Y, z as C, u as re, O as se, D as ie, a3 as ue } from "./index.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import { _ as H } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { _ as ae } from "./app-BhLVpUSl.js";
|
|
6
|
+
import { H as j, I as le, J as Y, z as C, u as re, O as se, D as ie, a3 as ue } from "./index.vue_vue_type_script_setup_true_lang-Dje9kp-F.js";
|
|
7
|
+
import { _ as H } from "./RuleView.vue_vue_type_script_setup_true_lang-DputprQj.js";
|
|
8
8
|
import { u as de } from "./discardConfirm-BHni0LNu.js";
|
|
9
|
-
import { L as ce } from "./LinkProductSideSheet-
|
|
10
|
-
import { _ as me } from "./PageLayout.vue_vue_type_script_setup_true_lang-
|
|
9
|
+
import { L as ce } from "./LinkProductSideSheet-Br2eE8pC.js";
|
|
10
|
+
import { _ as me } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
11
11
|
const pe = { class: "fm-typo-en-title-md-600" }, _e = { class: "space-y-32" }, fe = { class: "space-y-16" }, ve = { class: "flex items-center gap-8" }, ye = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ge = { class: "flex-1" }, he = { class: "grow overflow-y-auto" }, be = { class: "text-fm-color-typo-secondary bg-fm-color-neutral-gray-100 px-16 py-8 border-b border-b-fm-color-neutral-gray-200" }, xe = { class: "px-16 py-8 flex-1" }, ke = { class: "py-8" }, Fe = { class: "flex gap-8 items-center justify-start" }, Ie = /* @__PURE__ */ J({
|
|
12
12
|
__name: "PrintDepartmentDialog",
|
|
13
13
|
props: {
|