@feedmepos/mf-menu 0.31.40-beta.2 → 0.31.40-prod
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-CoKv0BFp.js → App-aWEH-ZEk.js} +9 -9
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-B14Q0hS_.js → ApplyProduct.vue_vue_type_script_setup_true_lang-jJyinQZl.js} +3 -3
- package/dist/{Catalog-BRovMtuI.js → Catalog-BoFfFdn8.js} +9 -8
- package/dist/{Category-DytZqgIt.js → Category-CWYbb3Jn.js} +4 -4
- package/dist/{Category-CT8-B4zh.js → Category-DZ45uikR.js} +6 -6
- package/dist/{CookingGuide-Ct5qRLG0.js → CookingGuide-BU0PRWIQ.js} +4 -4
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-D3R3TCba.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-Z5xsKDIE.js} +1 -1
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js +50 -0
- package/dist/{Group-Dk1yQTTt.js → Group-BMQDeqiS.js} +1 -1
- package/dist/{Group-G_H8i5_8.js → Group-C0T_uknK.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-CoTdB2d5.js → Group.vue_vue_type_script_setup_true_lang-DyfmY6F1.js} +8 -8
- package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D6qro5w_.js +367 -0
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-BKx7uQtR.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-Dl-Wvt3D.js} +14 -13
- package/dist/{Ingredient-ChynYQq6.js → Ingredient-3lwDUQx_.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-DyaUxnMx.js → InventoryBinding.vue_vue_type_script_setup_true_lang-VLrrTkSC.js} +2 -2
- package/dist/LinkProductSideSheet-LDZjKX95.js +297 -0
- package/dist/{app-CiBqmBzO.js → LinkProductSideSheet.vue_vue_type_style_index_0_scoped_97fa9d58_lang-DvG3mOom.js} +2084 -2120
- package/dist/MenuSetting-AhutsCVy.js +185 -0
- package/dist/{PrintRoute-DwAZHUrQ.js → PrintRoute-DfJ-vUAb.js} +4 -4
- package/dist/{Product-Bx2NPQvC.js → Product-F4PoLm9v.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-od_O6x7E.js → Product.vue_vue_type_script_setup_true_lang-DT5gffpA.js} +465 -468
- package/dist/{ProductInternalTools-BOguHh06.js → ProductInternalTools-DSGU-OqU.js} +6 -6
- package/dist/{Products-DA2hOsxr.js → Products-COzW2Z4g.js} +85 -88
- package/dist/{Publish-WATQWkjh.js → Publish-CDXVWCk2.js} +3 -3
- package/dist/{Recipe-WPwGgur3.js → Recipe-BZx4wrcP.js} +4 -4
- package/dist/{Scheduler-Djjggrh2.js → Scheduler-wHCWSeU2.js} +3 -3
- package/dist/{ServingSequence-CryZJTWA.js → ServingSequence-BbYEhDYh.js} +3 -3
- package/dist/{Setting-BtLsmoqY.js → Setting-C9Tlw1Iy.js} +45 -44
- package/dist/{Subcategory-BvlYDquD.js → Subcategory-C8AwfrKb.js} +4 -4
- package/dist/{Takeaway-8khxlcKQ.js → Takeaway-DaEUn-yM.js} +4 -4
- package/dist/{Takeaway-BBvFxAlx.js → Takeaway-t1053wg2.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-B8blN-yJ.js → Takeaway.vue_vue_type_script_setup_true_lang-7XycP5fU.js} +5 -5
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-CA9RlNkt.js → Thumbnail.vue_vue_type_script_setup_true_lang-B7oLH9cP.js} +95 -97
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Ci6iqOry.js +5998 -0
- package/dist/{Unit-Diu00sM2.js → Unit-CnqptGCz.js} +2 -2
- package/dist/{Variant-CO15W0wb.js → Variant-DiOYOwJs.js} +3 -3
- package/dist/{_id_-CxA_FzSG.js → _id_-BSfU16VO.js} +75 -78
- package/dist/{app-Blbof2Ga.js → app-Cou6qPF2.js} +1 -1
- package/dist/{app-5ESai6-B.js → app-Ddb81PNo.js} +278 -278
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/api/menu.d.ts +1 -2
- package/dist/apps/mf-menu/src/app.d.ts +0 -144
- package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierRuleEditor.vue.d.ts +0 -36
- package/dist/apps/mf-menu/src/components/feature/RestaurantAttributesSelector.vue.d.ts +3 -9
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/useItemFormManagement.d.ts +9 -2
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +4 -294
- package/dist/apps/mf-menu/src/composable/linkProducts.d.ts +0 -40
- package/dist/apps/mf-menu/src/helper/import-export.d.ts +0 -285
- package/dist/apps/mf-menu/src/helper/menu.d.ts +0 -285
- package/dist/apps/mf-menu/src/manager/menu/item.d.ts +0 -285
- package/dist/apps/mf-menu/src/stores/menu.d.ts +3 -293
- package/dist/apps/mf-menu/src/views/Publish/UpdateCatalogDialog.vue.d.ts +0 -166
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/linked-status-B_crHhZH.js +24 -0
- package/dist/assets/override-menu-BmlCEpHH.js +24 -0
- package/dist/assets/validate-menu-CF-psoB-.js +24 -0
- package/dist/{catalog-CXjEQ80k.js → catalog-DSuJhsUb.js} +1 -1
- package/dist/{catalogSetting-aJSUDY_z.js → catalogSetting-C3gEw9ov.js} +1 -1
- package/dist/{category-TqQULuHq.js → category-CwWq3KCE.js} +1 -1
- package/dist/{currency-CRjh8ne7.js → currency-g45Sh-t6.js} +1 -1
- package/dist/{dayjs.min-MBmYgyRY.js → dayjs.min-g3eN5z-V.js} +1 -1
- package/dist/index-0Q5T9VZV.js +214 -0
- package/dist/{index-dkHuztwB.js → index-0yRUi7LL.js} +1 -1
- package/dist/{index-CzjFGFvP.js → index-BLQCYEc6.js} +8 -7
- package/dist/{index-B1NS2hBa.js → index-QsLFbxyG.js} +4 -4
- package/dist/{item-Dj14On9a.js → item-BvvQ9urP.js} +386 -386
- package/dist/{jszip.min-Be1afVon.js → jszip.min-DzdUiaR4.js} +353 -353
- package/dist/{menu-C0Xu-iTb.js → menu-DFNvhoNQ.js} +31149 -31298
- package/dist/{menu-kRDoPBjm.js → menu-QrVg2Ph7.js} +7 -7
- package/dist/{menuV2-D6Gmxd9X.js → menuV2-Ezf_jW40.js} +137 -142
- package/dist/mf-menu.css +1 -1
- package/dist/{priceTier-CJlFGOpm.js → priceTier-zENsn3P_.js} +1 -1
- package/dist/{scheduler-B11d6fJr.js → scheduler-BuwGSv6A.js} +8 -8
- package/dist/{subcategory-D6hTbHP-.js → subcategory-O3L_zCJA.js} +2 -2
- package/dist/{toExcel-BedErXvS.js → toExcel-CpRy_4nG.js} +2 -2
- package/dist/{unit-D5jDzsM2.js → unit-Ct_7Hfa2.js} +41 -42
- package/package.json +3 -3
- package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-B_Yv8Thl.js +0 -399
- package/dist/LinkProductSideSheet-DsoPo7Q_.js +0 -361
- package/dist/MenuSetting-CDSc-56P.js +0 -618
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-LVWB5CIa.js +0 -5994
- package/dist/apps/mf-menu/src/composable/attributes.d.ts +0 -26
- package/dist/apps/mf-menu/src/utils/array.d.ts +0 -1
- package/dist/apps/mf-menu/src/utils/customAttributes.d.ts +0 -12
- package/dist/apps/mf-menu/src/views/MenuSetting/LinkProductRuleGroups.vue.d.ts +0 -2
- package/dist/apps/mf-menu/src/views/MenuSetting/RuleGroupSideSheet.vue.d.ts +0 -176
- package/dist/assets/linked-status-x1efKEih.js +0 -13
- package/dist/assets/override-menu-D8d9BWzy.js +0 -13
- package/dist/assets/validate-menu-DUJ20GHx.js +0 -13
- package/dist/customAttributes-32VmzFKZ.js +0 -177
- package/dist/index-FzHOAFSW.js +0 -246
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { defineComponent as P, computed as T, ref as F, watch as H, createVNode as n, resolveComponent as c, createBlock as V, openBlock as d, unref as e, withCtx as p, createElementVNode as _, createElementBlock as k, createCommentVNode as y, Fragment as K, renderList as q, toDisplayString as U } from "vue";
|
|
2
|
+
import { u as J, G as Q, B as R, H as M } from "./menu-DFNvhoNQ.js";
|
|
3
|
+
import { useI18n as W, useCoreStore as X } from "@feedmepos/mf-common";
|
|
4
|
+
import { useSnackbar as Y, components as Z, FmButtonVariant as ee, FmButtonColorThemeVariant as te } from "@feedmepos/ui-library";
|
|
5
|
+
import { _ as A } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
|
|
6
|
+
import { _ as le } from "./app-Ddb81PNo.js";
|
|
7
|
+
import { _ as ne } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
8
|
+
import { C as b, a as m } from "./catalogSetting-C3gEw9ov.js";
|
|
9
|
+
import { u as oe } from "./priceTier-zENsn3P_.js";
|
|
10
|
+
const ae = {
|
|
11
|
+
class: "py-16"
|
|
12
|
+
}, se = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "space-y-32 max-w-[750px] xs:p-16"
|
|
15
|
+
}, ue = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "pl-32 space-x-8"
|
|
18
|
+
}, ie = {
|
|
19
|
+
key: 1
|
|
20
|
+
}, re = {
|
|
21
|
+
class: "space-y-8"
|
|
22
|
+
}, ce = {
|
|
23
|
+
class: "flex items-center justify-between"
|
|
24
|
+
}, me = {
|
|
25
|
+
class: "fm-typo-en-title-md-600"
|
|
26
|
+
}, de = {
|
|
27
|
+
class: "text-fm-color-typo-secondary"
|
|
28
|
+
}, ye = /* @__PURE__ */ P({
|
|
29
|
+
__name: "MenuSetting",
|
|
30
|
+
setup(pe) {
|
|
31
|
+
var h;
|
|
32
|
+
const {
|
|
33
|
+
t
|
|
34
|
+
} = W(), v = J(), w = X(), B = Y(), N = Q(B), u = T(() => ({
|
|
35
|
+
lowStock: v.state.menu.lowStockThreshold,
|
|
36
|
+
taxSetting: v.state.menu.masterCatalogSetting,
|
|
37
|
+
priceTierSettings: v.state.menu.priceTierSettings
|
|
38
|
+
})), x = F("conf"), I = T(() => [{
|
|
39
|
+
label: t("menu.menu_setting.tabs.menu_configuration"),
|
|
40
|
+
value: "conf"
|
|
41
|
+
}, ...v.isV4 ? [{
|
|
42
|
+
label: t("menu.menu_setting.tabs.price_group"),
|
|
43
|
+
value: "price-group"
|
|
44
|
+
}] : []]), i = F(b.transformTax((h = u.value.taxSetting) == null ? void 0 : h.inclusiveTaxes));
|
|
45
|
+
H(() => u.value, (a) => {
|
|
46
|
+
var l;
|
|
47
|
+
i.value = b.transformTax((l = a.taxSetting) == null ? void 0 : l.inclusiveTaxes);
|
|
48
|
+
});
|
|
49
|
+
const S = T(() => {
|
|
50
|
+
if (!w.currentCountry.value) return [];
|
|
51
|
+
const a = i.value.mode === m.MANUAL ? i.value.inclusive ?? [] : [];
|
|
52
|
+
return R.Country.getCountry(w.currentCountry.value).taxSystems.map((s) => {
|
|
53
|
+
const r = a.find((g) => g.systemCode === s.code);
|
|
54
|
+
return {
|
|
55
|
+
inclusive: (r == null ? void 0 : r.inclusive) || !1,
|
|
56
|
+
systemCode: s.code
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
function L(a) {
|
|
61
|
+
const l = i.value, s = l.mode === m.AUTO ? b.manualTax(S.value) : M(l);
|
|
62
|
+
s.inclusive ?? (s.inclusive = []);
|
|
63
|
+
const r = s.inclusive.findIndex((g) => g.systemCode === a.systemCode);
|
|
64
|
+
r < 0 ? s.inclusive.push(a) : s.inclusive.splice(r, 1, a), i.value = s;
|
|
65
|
+
}
|
|
66
|
+
async function O() {
|
|
67
|
+
if (u.value.lowStock !== null && u.value.lowStock !== void 0 && !Number.isInteger(u.value.lowStock))
|
|
68
|
+
return;
|
|
69
|
+
const a = i.value.mode === m.AUTO ? null : M(i.value.inclusive);
|
|
70
|
+
await N.minor(async () => {
|
|
71
|
+
const l = u.value.lowStock === null || u.value.lowStock === void 0 || u.value.lowStock === 0;
|
|
72
|
+
await v.updateMenuSetting({
|
|
73
|
+
masterCatalogSetting: {
|
|
74
|
+
inclusiveTaxes: a
|
|
75
|
+
},
|
|
76
|
+
lowStockThreshold: l ? null : u.value.lowStock,
|
|
77
|
+
priceTierSettings: f.priceTiers.value
|
|
78
|
+
});
|
|
79
|
+
}, {
|
|
80
|
+
successMessage: t("menu.menu_setting.fields.low_stock.updated")
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
const f = oe(), z = [{
|
|
84
|
+
header: t("menu.price_tier.settings_table.columns.name"),
|
|
85
|
+
accessorKey: "key",
|
|
86
|
+
enableSorting: !1
|
|
87
|
+
}, {
|
|
88
|
+
id: "actions",
|
|
89
|
+
size: 50,
|
|
90
|
+
cell: (a) => n("div", {
|
|
91
|
+
class: "px-4 flex justify-end"
|
|
92
|
+
}, [n(Z.FmButton, {
|
|
93
|
+
icon: "delete",
|
|
94
|
+
"text-color": te.NeutralGray400,
|
|
95
|
+
variant: ee.Tertiary,
|
|
96
|
+
onClick: () => f.deletePriceTier(a.row.original.key)
|
|
97
|
+
}, null)])
|
|
98
|
+
}];
|
|
99
|
+
return (a, l) => {
|
|
100
|
+
const s = c("FmTabs"), r = c("fm-radio"), g = c("fm-radio-group"), E = c("fm-checkbox"), $ = c("FormItem"), j = c("FmStepperField"), C = c("FmButton"), D = c("FmTable");
|
|
101
|
+
return d(), V(ne, {
|
|
102
|
+
heading: e(t)("menu.menu_setting.title")
|
|
103
|
+
}, {
|
|
104
|
+
default: p(() => [n(s, {
|
|
105
|
+
items: I.value,
|
|
106
|
+
modelValue: x.value,
|
|
107
|
+
"onUpdate:modelValue": l[0] || (l[0] = (o) => x.value = o)
|
|
108
|
+
}, null, 8, ["items", "modelValue"]), _("div", ae, [x.value === "conf" ? (d(), k("div", se, [n(A, {
|
|
109
|
+
title: "Tax setting"
|
|
110
|
+
}, {
|
|
111
|
+
default: p(() => [n($, {
|
|
112
|
+
label: e(t)("menu.setting.tax.title")
|
|
113
|
+
}, {
|
|
114
|
+
default: p(() => [n(g, {
|
|
115
|
+
"model-value": i.value.mode,
|
|
116
|
+
"onUpdate:modelValue": l[1] || (l[1] = (o) => {
|
|
117
|
+
o === e(m).AUTO ? i.value = e(b).autoTax() : i.value = e(b).manualTax(S.value);
|
|
118
|
+
})
|
|
119
|
+
}, {
|
|
120
|
+
default: p(() => [n(r, {
|
|
121
|
+
value: e(m).AUTO,
|
|
122
|
+
label: e(t)("menu.setting.tax.modes.auto.label"),
|
|
123
|
+
sublabel: e(t)("menu.setting.tax.modes.auto.sublabel")
|
|
124
|
+
}, null, 8, ["value", "label", "sublabel"]), n(r, {
|
|
125
|
+
value: e(m).MANUAL,
|
|
126
|
+
label: e(t)("menu.setting.tax.modes.manual.label"),
|
|
127
|
+
sublabel: e(t)("menu.setting.tax.modes.manual.sublabel")
|
|
128
|
+
}, null, 8, ["value", "label", "sublabel"])]),
|
|
129
|
+
_: 1
|
|
130
|
+
}, 8, ["model-value"]), i.value.mode === e(m).MANUAL ? (d(), k("div", ue, [(d(!0), k(K, null, q(S.value, (o) => (d(), V(E, {
|
|
131
|
+
key: o.systemCode,
|
|
132
|
+
"model-value": o.inclusive,
|
|
133
|
+
value: !0,
|
|
134
|
+
label: o.systemCode + " inclusive",
|
|
135
|
+
"onUpdate:modelValue": (G) => {
|
|
136
|
+
L({
|
|
137
|
+
...o,
|
|
138
|
+
inclusive: G
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
}, null, 8, ["model-value", "label", "onUpdate:modelValue"]))), 128))])) : y("", !0)]),
|
|
142
|
+
_: 1
|
|
143
|
+
}, 8, ["label"])]),
|
|
144
|
+
_: 1
|
|
145
|
+
}), n(A, {
|
|
146
|
+
title: e(t)("menu.menu_setting.fields.low_stock.title"),
|
|
147
|
+
"sub-title": e(t)("menu.menu_setting.fields.low_stock.subtitle")
|
|
148
|
+
}, {
|
|
149
|
+
default: p(() => [n(j, {
|
|
150
|
+
"model-value": u.value.lowStock || null,
|
|
151
|
+
min: 0,
|
|
152
|
+
max: 1e3,
|
|
153
|
+
step: 1,
|
|
154
|
+
placeholder: e(t)("menu.menu_setting.fields.low_stock.not_set"),
|
|
155
|
+
"onUpdate:modelValue": l[2] || (l[2] = (o) => {
|
|
156
|
+
u.value.lowStock = o;
|
|
157
|
+
}),
|
|
158
|
+
rules: [(o) => o === null || Number.isInteger(o) || e(t)("menu.menu_setting.fields.low_stock.must_be_integer")],
|
|
159
|
+
"helper-text": e(t)("menu.menu_setting.fields.low_stock.helper_text")
|
|
160
|
+
}, null, 8, ["model-value", "placeholder", "rules", "helper-text"])]),
|
|
161
|
+
_: 1
|
|
162
|
+
}, 8, ["title", "sub-title"]), n(C, {
|
|
163
|
+
onClick: O,
|
|
164
|
+
label: e(t)("common.save")
|
|
165
|
+
}, null, 8, ["label"])])) : y("", !0), x.value === "price-group" ? (d(), k("div", ie, [_("div", re, [_("div", ce, [_("div", null, [_("h1", me, U(e(t)("menu.price_tier.price_group")), 1), _("p", de, U(e(t)("menu.price_tier.description")), 1)]), n(C, {
|
|
166
|
+
label: e(t)("menu.price_tier.add_price_group"),
|
|
167
|
+
icon: "add",
|
|
168
|
+
onClick: e(f).create
|
|
169
|
+
}, null, 8, ["label", "onClick"])]), n(le, null, {
|
|
170
|
+
default: p(() => [n(D, {
|
|
171
|
+
"column-defs": z,
|
|
172
|
+
"row-data": e(f).priceTiers.value,
|
|
173
|
+
"page-size": e(f).priceTiers.value.length,
|
|
174
|
+
"hide-footer": !0
|
|
175
|
+
}, null, 8, ["row-data", "page-size"])]),
|
|
176
|
+
_: 1
|
|
177
|
+
})])])) : y("", !0)])]),
|
|
178
|
+
_: 1
|
|
179
|
+
}, 8, ["heading"]);
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
export {
|
|
184
|
+
ye as default
|
|
185
|
+
};
|
|
@@ -2,11 +2,11 @@ import { defineComponent as H, 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, A as C, u as re, O as se, G as ie } from "./menu-
|
|
7
|
-
import { _ as G } from "./
|
|
5
|
+
import { _ as ae } from "./app-Ddb81PNo.js";
|
|
6
|
+
import { H as j, I as le, J as Y, A as C, u as re, O as se, G as ie } from "./menu-DFNvhoNQ.js";
|
|
7
|
+
import { _ as G } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
|
|
8
8
|
import { u as ue } from "./discardConfirm-BHni0LNu.js";
|
|
9
|
-
import { L as de } from "./LinkProductSideSheet-
|
|
9
|
+
import { L as de } from "./LinkProductSideSheet-LDZjKX95.js";
|
|
10
10
|
import { _ as ce } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
|
|
11
11
|
import { _ as me } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
12
12
|
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__ */ H({
|