@feedmepos/mf-menu 0.32.17 → 0.32.18-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-Cfl37TTw.js +152661 -0
- package/dist/{Catalog-ChlP8Cid.js → Catalog-Yxsb-D33.js} +47 -52
- package/dist/{Category-CHs96ibF.js → Category-0vJH8Ct0.js} +86 -92
- package/dist/{Category-B1tAJpNd.js → Category-qp0wI14I.js} +25 -26
- package/dist/{CookingGuide-mEvca-0v.js → CookingGuide-EpAr5F5U.js} +139 -143
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-Bk26jQI7.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CkyD0sdI.js} +14 -16
- package/dist/{Group-Ye2IIY52.js → Group-B3W9iSbO.js} +5 -5
- package/dist/{Group-Co2Vf4Lw.js → Group-DLCh0fDU.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-BcxSbvJS.js → Group.vue_vue_type_script_setup_true_lang-Bzy_hXDv.js} +176 -186
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D1f8VG-n.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BFaAXp7r.js} +81 -88
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Jv6iJlg9.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CxP8lDD0.js} +2502 -2508
- package/dist/{Ingredient-BgnW8sWo.js → Ingredient-CVLMr_YB.js} +102 -105
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-8ziHcUiK.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CdTC5ykI.js} +1058 -1059
- package/dist/{MenuSetting-GEngjeC8.js → MenuSetting-Blpi1vSd.js} +58 -61
- package/dist/{PrintRoute-BSlUQT7g.js → PrintRoute-BS7PPPkE.js} +49 -52
- package/dist/{Product-DNg_BUuV.js → Product-DDeNKQ7u.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-Cehy2oy-.js → Product.vue_vue_type_script_setup_true_lang-rmv8m4_D.js} +286 -298
- package/dist/{ProductInternalTools-B5A67yxH.js → ProductInternalTools-CVuothk9.js} +45 -46
- package/dist/{Products-DCsxmTPB.js → Products-BIvsHKEt.js} +111 -116
- package/dist/{Publish-Cst0Ll6T.js → Publish-CDADU3Pp.js} +154 -159
- package/dist/{Recipe-DupS3SQT.js → Recipe-CMhW7e_z.js} +40 -43
- package/dist/{Scheduler-BcThU1M6.js → Scheduler-BpxunKBV.js} +7 -7
- package/dist/{ServingSequence-CT3THBH6.js → ServingSequence-BQVuYyAB.js} +54 -58
- package/dist/{Setting-Dxh8E3no.js → Setting-Dj0yyP37.js} +63 -66
- package/dist/{Subcategory-DhJEzofz.js → Subcategory-BH4DDZM4.js} +72 -76
- package/dist/{Takeaway-DSC7U4Jk.js → Takeaway-CGJBZ_sJ.js} +1 -1
- package/dist/{Takeaway-B8BSSKNj.js → Takeaway-DifOudVE.js} +20 -21
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BLpiJlk2.js → Takeaway.vue_vue_type_script_setup_true_lang-D-R5_S5G.js} +59 -64
- package/dist/{Unit-joU7vZZu.js → Unit-DXDox2Ut.js} +8 -8
- package/dist/{Variant-D8YjRJ6N.js → Variant-DbJVwgm5.js} +75 -78
- package/dist/{_id_-Bd9uo1WW.js → _id_-RFYwWjbM.js} +34 -38
- package/dist/{app-BNrAos5Z.js → app-Z0KWH9-d.js} +74 -335
- package/dist/app.js +4 -5
- package/dist/apps/mf-menu/src/app.d.ts +1 -2
- package/dist/apps/mf-menu/src/helper/import-export-utils.d.ts +1 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-DbjzbFTw.js → linked-status-CkmoJAm-.js} +2 -2
- package/dist/assets/{menu-export-D_oNY_wi.js → menu-export-DcINiK28.js} +3 -3
- package/dist/assets/{override-menu-CIU7U1_4.js → override-menu-PUKiu-df.js} +2 -2
- package/dist/assets/{validate-menu-kuOxuwG9.js → validate-menu-CcqiRhNT.js} +2 -2
- package/dist/{catalogSetting-BHgsBDTl.js → catalogSetting-Bf66H-j7.js} +1 -1
- package/dist/dayjs.min-DNPTnUFp.js +6 -0
- package/dist/{jszip.min-7SsHzD5O.js → jszip.min-CO2_Gf69.js} +545 -545
- package/dist/{menu-Cd4NbFVq.js → menu-Brxar171.js} +1 -1
- package/dist/mf-menu.css +1 -1
- package/dist/{scheduler-B6OokVIA.js → scheduler-CqdIiE8G.js} +56 -60
- package/dist/{toExcel-BZkbXlHv.js → toExcel-CRJIU0NC.js} +2 -2
- package/dist/{unit-D6QOkMoM.js → unit-wYPYkm33.js} +98 -105
- package/package.json +1 -1
- package/dist/App-BiSEuDkd.js +0 -13484
- package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-C_SjdLpO.js +0 -161
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js +0 -26
- package/dist/LinkProductSideSheet-DFDYEUBh.js +0 -687
- package/dist/MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js +0 -69
- package/dist/RuleView.vue_vue_type_script_setup_true_lang-BeesK2ym.js +0 -3285
- package/dist/TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js +0 -20
- package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-C3qXnZlz.js +0 -399
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CMe76XvZ.js +0 -6011
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/app-5fxKLAzS.js +0 -8163
- package/dist/app-nTzkERJW.js +0 -68
- package/dist/catalog-BO2nXwe5.js +0 -199
- package/dist/category-CuG3DsGL.js +0 -156
- package/dist/check-C9mY6LiX.js +0 -9
- package/dist/createComponentProgrammatically-Bt2rn1IQ.js +0 -11
- package/dist/currency-DxC5zyZB.js +0 -7
- package/dist/dayjs.min-BvFUSPWD.js +0 -6
- package/dist/discardConfirm-BHni0LNu.js +0 -28
- package/dist/index-B0nhvuxR.js +0 -273
- package/dist/index-C2zPvt64.js +0 -239
- package/dist/index-C36JQix-.js +0 -246
- package/dist/index-CisutoS9.js +0 -156
- package/dist/index.vue_vue_type_script_setup_true_lang-DCBYExNb.js +0 -109064
- package/dist/item-K01xd1Z0.js +0 -6868
- package/dist/menuV2-DKE-xanq.js +0 -1052
- package/dist/object-DVUNCr7w.js +0 -16
- package/dist/priceTier-Beavb91W.js +0 -87
- package/dist/search-BAPEUu1R.js +0 -15
- package/dist/string-DpfFixWH.js +0 -4
- package/dist/subcategory-DnslmmRD.js +0 -148
- package/dist/tooltip-B5BiPMx9.js +0 -32
- package/dist/vuedraggable-CK8z7qA8.js +0 -1728
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { u as me,
|
|
3
|
-
import { useCoreStore as
|
|
4
|
-
import { useSnackbar as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { _ as
|
|
7
|
-
import { _ as z, a as ke } from "./GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D1f8VG-n.js";
|
|
8
|
-
import { C as _, a as x } from "./catalogSetting-BHgsBDTl.js";
|
|
9
|
-
import { C as xe } from "./catalog-BO2nXwe5.js";
|
|
1
|
+
import { defineComponent as oe, computed as p, ref as se, watch as ue, watchEffect as ie, resolveComponent as m, createElementBlock as V, openBlock as r, normalizeClass as H, createVNode as s, withCtx as c, createElementVNode as v, createBlock as g, createCommentVNode as k, unref as e, Fragment as D, renderList as B, createTextVNode as re, toDisplayString as N } from "vue";
|
|
2
|
+
import { u as me, a as ce, e as f, d as de, i as pe, G as ve, a8 as w, c as E, a9 as ge } from "./App-Cfl37TTw.js";
|
|
3
|
+
import { useCoreStore as fe, useI18n as _e } from "@feedmepos/mf-common";
|
|
4
|
+
import { useSnackbar as be, useDialog as ye, FmButtonVariant as $, FmButtonColorThemeVariant as P, components as ke } from "@feedmepos/ui-library";
|
|
5
|
+
import { _ as z, a as xe } from "./GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BFaAXp7r.js";
|
|
6
|
+
import { C as _, a as x } from "./catalogSetting-Bf66H-j7.js";
|
|
10
7
|
const Ce = {
|
|
11
8
|
class: /* @__PURE__ */ H(["overflow-scroll", "flex-1", "xs:px-16 xs:py-16", "pt-16"])
|
|
12
9
|
}, Oe = {
|
|
@@ -26,25 +23,25 @@ const Ce = {
|
|
|
26
23
|
class: "fm-typo-en-body-md-400"
|
|
27
24
|
}, he = {
|
|
28
25
|
class: "flex justify-end"
|
|
29
|
-
},
|
|
26
|
+
}, Be = /* @__PURE__ */ oe({
|
|
30
27
|
__name: "Setting",
|
|
31
28
|
setup(Ne) {
|
|
32
|
-
const F =
|
|
29
|
+
const F = fe(), u = me(), j = be(), T = ce(j), {
|
|
33
30
|
minor: q
|
|
34
|
-
} =
|
|
35
|
-
t:
|
|
36
|
-
} =
|
|
31
|
+
} = T, G = ye(), {
|
|
32
|
+
t: o
|
|
33
|
+
} = _e(), O = p(() => u.currentCatalog), b = p(() => !O.value), S = p(() => u.version === f.F_MENU_VERSION.enum.v4), {
|
|
37
34
|
updateMenu: J
|
|
38
|
-
} = de(
|
|
39
|
-
function
|
|
40
|
-
return
|
|
35
|
+
} = de(T), l = se(_.initCatalogSetting()), W = p(() => u.catalogs.filter((t) => t._id !== u.state.currentCatalogId).map((t) => t.name)), Y = p(() => u.state.restaurants.filter((t) => [...t.additionalCatalogs, t.inHouseDelivery, ...t.linkedDeliveryCatalogs.map((n) => n.catalog), t.pickupCatalog, t.takeawayCatalog, t.catalogId].includes(u.state.currentCatalogId)).map((t) => t.name));
|
|
36
|
+
function A() {
|
|
37
|
+
return Y.value.length > 0 ? s("div", {
|
|
41
38
|
class: ["flex items-center", "bg-fm-color-system-warning-100", "rounded-lg", "py-16 px-24 space-x-8"]
|
|
42
|
-
}, [s(
|
|
39
|
+
}, [s(ke.FmIcon, {
|
|
43
40
|
color: "system-warning-300",
|
|
44
41
|
name: "warning"
|
|
45
42
|
}, null), s("p", {
|
|
46
43
|
class: "fm-typo-en-body-lg-400"
|
|
47
|
-
}, [
|
|
44
|
+
}, [o("menu.setting.catalog.warnings.delivery")])]) : null;
|
|
48
45
|
}
|
|
49
46
|
function I() {
|
|
50
47
|
const t = O.value;
|
|
@@ -62,8 +59,8 @@ const Ce = {
|
|
|
62
59
|
};
|
|
63
60
|
});
|
|
64
61
|
});
|
|
65
|
-
function
|
|
66
|
-
const
|
|
62
|
+
function K(t) {
|
|
63
|
+
const n = l.value.taxSetting, i = n.mode === x.AUTO ? _.manualTax(R.value) : E(n);
|
|
67
64
|
i.inclusive ?? (i.inclusive = []);
|
|
68
65
|
const d = i.inclusive.findIndex((C) => C.systemCode === t.systemCode);
|
|
69
66
|
d < 0 ? i.inclusive.push(t) : i.inclusive.splice(d, 1, t), U.value = i;
|
|
@@ -76,9 +73,9 @@ const Ce = {
|
|
|
76
73
|
set: (t) => {
|
|
77
74
|
l.value.taxSetting = t;
|
|
78
75
|
}
|
|
79
|
-
}),
|
|
76
|
+
}), Q = async () => {
|
|
80
77
|
const t = _.toCatalog(l.value);
|
|
81
|
-
O.value ? await new
|
|
78
|
+
O.value ? await new ge({
|
|
82
79
|
...O.value,
|
|
83
80
|
...t
|
|
84
81
|
}, u, J, G).update() : await q(async () => {
|
|
@@ -90,49 +87,49 @@ const Ce = {
|
|
|
90
87
|
customId: u.state.menu._id
|
|
91
88
|
});
|
|
92
89
|
};
|
|
93
|
-
function X(t,
|
|
94
|
-
const i =
|
|
95
|
-
i.markupOptions && (i.markupOptions[t] =
|
|
90
|
+
function X(t, n) {
|
|
91
|
+
const i = E(l.value);
|
|
92
|
+
i.markupOptions && (i.markupOptions[t] = n, l.value = i);
|
|
96
93
|
}
|
|
97
94
|
function Z(t) {
|
|
98
|
-
const
|
|
99
|
-
|
|
95
|
+
const n = E(l.value);
|
|
96
|
+
n.markupOptions && (n.markupOptions.splice(t, 1), l.value = n);
|
|
100
97
|
}
|
|
101
|
-
return (t,
|
|
102
|
-
const i = m("fm-text-field"), d = m("fm-radio"), C = m("fm-radio-group"), ee = m("fm-checkbox"), L = m("fm-switch"), te = m("fm-select"), h = m("fm-button"), ae = m("fm-chip"), le = m("fm-card"),
|
|
103
|
-
return r(), V("div", Ce, [s(
|
|
98
|
+
return (t, n) => {
|
|
99
|
+
const i = m("fm-text-field"), d = m("fm-radio"), C = m("fm-radio-group"), ee = m("fm-checkbox"), L = m("fm-switch"), te = m("fm-select"), h = m("fm-button"), ae = m("fm-chip"), le = m("fm-card"), ne = m("fm-form");
|
|
100
|
+
return r(), V("div", Ce, [s(ne, {
|
|
104
101
|
class: H(["space-y-40 max-w-[751px]", "h-fit"]),
|
|
105
102
|
"blame-form-child-on-validation-failed": "",
|
|
106
|
-
onValidationSuccess:
|
|
103
|
+
onValidationSuccess: Q
|
|
107
104
|
}, {
|
|
108
|
-
default: c(() => [v("div", Oe, [b.value ? k("", !0) : (r(), g(
|
|
105
|
+
default: c(() => [v("div", Oe, [b.value ? k("", !0) : (r(), g(ve, {
|
|
109
106
|
key: 0,
|
|
110
|
-
title: e(
|
|
107
|
+
title: e(o)("menu.setting.catalog.title")
|
|
111
108
|
}, {
|
|
112
109
|
default: c(() => [s(i, {
|
|
113
110
|
modelValue: l.value.name,
|
|
114
|
-
"onUpdate:modelValue":
|
|
115
|
-
rules: [(a) => !
|
|
116
|
-
label: e(
|
|
117
|
-
}, null, 8, ["modelValue", "rules", "label"]), s(
|
|
111
|
+
"onUpdate:modelValue": n[0] || (n[0] = (a) => l.value.name = a),
|
|
112
|
+
rules: [(a) => !W.value.includes(a.trim()) || e(o)("menu.setting.catalog.fields.name.used"), (a) => !!a.trim() || e(o)("menu.setting.catalog.fields.name.required")],
|
|
113
|
+
label: e(o)("menu.setting.catalog.fields.name.label")
|
|
114
|
+
}, null, 8, ["modelValue", "rules", "label"]), s(A)]),
|
|
118
115
|
_: 1
|
|
119
|
-
}, 8, ["title"])), s(
|
|
120
|
-
label: e(
|
|
116
|
+
}, 8, ["title"])), s(w, {
|
|
117
|
+
label: e(o)("menu.setting.tax.title")
|
|
121
118
|
}, {
|
|
122
119
|
default: c(() => [s(C, {
|
|
123
120
|
"model-value": l.value.taxSetting.mode,
|
|
124
|
-
"onUpdate:modelValue":
|
|
121
|
+
"onUpdate:modelValue": n[1] || (n[1] = (a) => {
|
|
125
122
|
a === e(x).AUTO ? U.value = e(_).autoTax() : U.value = e(_).manualTax(R.value);
|
|
126
123
|
})
|
|
127
124
|
}, {
|
|
128
125
|
default: c(() => [s(d, {
|
|
129
126
|
value: e(x).AUTO,
|
|
130
|
-
label: e(
|
|
131
|
-
sublabel: e(
|
|
127
|
+
label: e(o)("menu.setting.tax.modes.auto.label"),
|
|
128
|
+
sublabel: e(o)("menu.setting.tax.modes.auto.sublabel")
|
|
132
129
|
}, null, 8, ["value", "label", "sublabel"]), s(d, {
|
|
133
130
|
value: e(x).MANUAL,
|
|
134
|
-
label: e(
|
|
135
|
-
sublabel: e(
|
|
131
|
+
label: e(o)("menu.setting.tax.modes.manual.label"),
|
|
132
|
+
sublabel: e(o)("menu.setting.tax.modes.manual.sublabel")
|
|
136
133
|
}, null, 8, ["value", "label", "sublabel"])]),
|
|
137
134
|
_: 1
|
|
138
135
|
}, 8, ["model-value"]), l.value.taxSetting.mode === e(x).MANUAL ? (r(), V("div", Se, [(r(!0), V(D, null, B(R.value, (a) => (r(), g(ee, {
|
|
@@ -141,23 +138,23 @@ const Ce = {
|
|
|
141
138
|
value: !0,
|
|
142
139
|
label: a.systemCode + " inclusive",
|
|
143
140
|
"onUpdate:modelValue": (y) => {
|
|
144
|
-
|
|
141
|
+
K({
|
|
145
142
|
...a,
|
|
146
143
|
inclusive: y
|
|
147
144
|
});
|
|
148
145
|
}
|
|
149
146
|
}, null, 8, ["model-value", "label", "onUpdate:modelValue"]))), 128))])) : k("", !0)]),
|
|
150
147
|
_: 1
|
|
151
|
-
}, 8, ["label"]), !b.value && S.value ? (r(), g(
|
|
148
|
+
}, 8, ["label"]), !b.value && S.value ? (r(), g(w, {
|
|
152
149
|
key: 1,
|
|
153
|
-
label: e(
|
|
150
|
+
label: e(o)("menu.setting.link.title")
|
|
154
151
|
}, {
|
|
155
152
|
default: c(() => [s(L, {
|
|
156
153
|
"model-value": l.value.orderFrom && l.value.orderFrom !== e(f.F_ORDER_FROM).enum.NONE,
|
|
157
|
-
label: e(
|
|
154
|
+
label: e(o)("menu.setting.link.auto_link.label"),
|
|
158
155
|
"label-placement": "right",
|
|
159
|
-
sublabel: e(
|
|
160
|
-
"onUpdate:modelValue":
|
|
156
|
+
sublabel: e(o)("menu.setting.link.auto_link.sublabel"),
|
|
157
|
+
"onUpdate:modelValue": n[2] || (n[2] = (a) => l.value.orderFrom = a ? e(f.F_ORDER_FROM).enum.ALL : e(f.F_ORDER_FROM).enum.NONE)
|
|
161
158
|
}, null, 8, ["model-value", "label", "sublabel"]), l.value.orderFrom !== e(f.F_ORDER_FROM).enum.NONE ? (r(), g(te, {
|
|
162
159
|
key: 0,
|
|
163
160
|
class: "ml-[60px]",
|
|
@@ -169,24 +166,24 @@ const Ce = {
|
|
|
169
166
|
value: e(f.F_ORDER_FROM).enum.POS_ONLY
|
|
170
167
|
}],
|
|
171
168
|
"model-value": l.value.orderFrom,
|
|
172
|
-
"onUpdate:modelValue":
|
|
169
|
+
"onUpdate:modelValue": n[3] || (n[3] = (a) => l.value.orderFrom = a)
|
|
173
170
|
}, null, 8, ["items", "model-value"])) : k("", !0)]),
|
|
174
171
|
_: 1
|
|
175
|
-
}, 8, ["label"])) : k("", !0), !b.value && S.value ? (r(), g(
|
|
172
|
+
}, 8, ["label"])) : k("", !0), !b.value && S.value ? (r(), g(w, {
|
|
176
173
|
key: 2,
|
|
177
|
-
label: e(
|
|
174
|
+
label: e(o)("menu.setting.markup.title")
|
|
178
175
|
}, {
|
|
179
176
|
default: c(() => [s(L, {
|
|
180
177
|
"model-value": !!l.value.markupOptions,
|
|
181
|
-
label: e(
|
|
178
|
+
label: e(o)("menu.setting.markup.auto_markup.label"),
|
|
182
179
|
"label-placement": "right",
|
|
183
|
-
sublabel: e(
|
|
184
|
-
"onUpdate:modelValue":
|
|
180
|
+
sublabel: e(o)("menu.setting.markup.auto_markup.sublabel"),
|
|
181
|
+
"onUpdate:modelValue": n[4] || (n[4] = (a) => l.value.markupOptions = a ? [] : null)
|
|
185
182
|
}, null, 8, ["model-value", "label", "sublabel"]), v("div", Me, [s(z, {
|
|
186
183
|
categories: e(u).categories,
|
|
187
184
|
items: e(u).items,
|
|
188
185
|
action: "add",
|
|
189
|
-
"onUpdate:modelValue":
|
|
186
|
+
"onUpdate:modelValue": n[5] || (n[5] = (a) => {
|
|
190
187
|
a && (l.value.markupOptions = [...l.value.markupOptions ?? [], a]);
|
|
191
188
|
})
|
|
192
189
|
}, {
|
|
@@ -224,11 +221,11 @@ const Ce = {
|
|
|
224
221
|
}, {
|
|
225
222
|
default: c(() => [re(" Markup percentage: " + N(a.percentage) + "% ", 1)]),
|
|
226
223
|
_: 2
|
|
227
|
-
}, 1024), v("p", Re, N(e(
|
|
224
|
+
}, 1024), v("p", Re, N(e(o)("menu.setting.markup.config", {
|
|
228
225
|
number: y + 1
|
|
229
|
-
})), 1), v("p", Ue, N(a.includeItems ? e(
|
|
226
|
+
})), 1), v("p", Ue, N(a.includeItems ? e(o)("menu.setting.markup.products.linked", {
|
|
230
227
|
count: a.includeItems.length
|
|
231
|
-
}) : e(
|
|
228
|
+
}) : e(o)("menu.setting.markup.products.all")), 1)]), s(h, {
|
|
232
229
|
variant: e($).Tertiary,
|
|
233
230
|
"prepend-icon": "delete",
|
|
234
231
|
onClick: (we) => Z(y)
|
|
@@ -238,15 +235,15 @@ const Ce = {
|
|
|
238
235
|
_: 2
|
|
239
236
|
}, 1032, ["categories", "items", "model-value", "onUpdate:modelValue"]))), 128))])]),
|
|
240
237
|
_: 1
|
|
241
|
-
}, 8, ["label"])) : k("", !0), s(
|
|
238
|
+
}, 8, ["label"])) : k("", !0), s(xe, {
|
|
242
239
|
modelValue: l.value,
|
|
243
|
-
"onUpdate:modelValue":
|
|
240
|
+
"onUpdate:modelValue": n[6] || (n[6] = (a) => l.value = a),
|
|
244
241
|
"is-main-catalog": b.value,
|
|
245
242
|
"is-v4": S.value
|
|
246
|
-
}, null, 8, ["modelValue", "is-main-catalog", "is-v4"]), b.value ? (r(), g(
|
|
243
|
+
}, null, 8, ["modelValue", "is-main-catalog", "is-v4"]), b.value ? (r(), g(A, {
|
|
247
244
|
key: 3
|
|
248
245
|
})) : k("", !0)]), v("div", he, [s(h, {
|
|
249
|
-
label: e(
|
|
246
|
+
label: e(o)("common.save"),
|
|
250
247
|
type: "submit"
|
|
251
248
|
}, null, 8, ["label"])])]),
|
|
252
249
|
_: 1
|
|
@@ -255,5 +252,5 @@ const Ce = {
|
|
|
255
252
|
}
|
|
256
253
|
});
|
|
257
254
|
export {
|
|
258
|
-
|
|
255
|
+
Be as default
|
|
259
256
|
};
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
import { defineComponent as L, ref as w, watch as W, resolveComponent as y, createElementBlock as V, openBlock as p, Fragment as P, renderSlot as X, createVNode as m, unref as
|
|
1
|
+
import { defineComponent as L, ref as w, watch as W, resolveComponent as y, createElementBlock as V, openBlock as p, Fragment as P, renderSlot as X, createVNode as m, unref as a, withCtx as h, createElementVNode as s, toDisplayString as T, computed as F, h as A, withModifiers as R, getCurrentInstance as Z, renderList as ee, createBlock as S, createCommentVNode as ae } from "vue";
|
|
2
2
|
import { useI18n as B } from "@feedmepos/mf-common";
|
|
3
|
-
import { useSnackbar as O, components as j, useDialog as Y, FmButtonVariant as z, useBreakpoints as
|
|
3
|
+
import { useSnackbar as O, components as j, useDialog as Y, FmButtonVariant as z, useBreakpoints as te, FmButtonColorThemeVariant 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 {
|
|
6
|
-
import { _ as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { c as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { r as ue } from "./rules-CIWTZQfh.js";
|
|
12
|
-
import { c as de } from "./check-C9mY6LiX.js";
|
|
13
|
-
import { u as q } from "./subcategory-DnslmmRD.js";
|
|
14
|
-
import { a as me } from "./menu-Cd4NbFVq.js";
|
|
5
|
+
import { a as D, u as N, C as I, F as le, b as se, d as U, m as K, e as q, J as G, _ as re } from "./App-Cfl37TTw.js";
|
|
6
|
+
import { _ as ie } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
7
|
+
import { _ as ce } from "./app-Z0KWH9-d.js";
|
|
8
|
+
import { c as ue } from "./createForm-BoUQeZTd.js";
|
|
9
|
+
import { r as de } from "./rules-CIWTZQfh.js";
|
|
10
|
+
import { a as me } from "./menu-Brxar171.js";
|
|
15
11
|
const pe = {
|
|
16
12
|
class: "fm-typo-en-title-md-600"
|
|
17
13
|
}, _e = {
|
|
@@ -23,22 +19,22 @@ const pe = {
|
|
|
23
19
|
props: {
|
|
24
20
|
initialValue: {}
|
|
25
21
|
},
|
|
26
|
-
setup(
|
|
22
|
+
setup($, {
|
|
27
23
|
expose: f
|
|
28
24
|
}) {
|
|
29
|
-
const _ =
|
|
30
|
-
t
|
|
25
|
+
const _ = $, x = O(), g = D(x), C = U(g), d = N(), {
|
|
26
|
+
t
|
|
31
27
|
} = B(), v = w(!1), e = w(!1), b = (r) => {
|
|
32
|
-
|
|
33
|
-
}, n = w(I(_.initialValue)),
|
|
28
|
+
se.isBoolean(r) ? e.value = r : e.value = !e.value;
|
|
29
|
+
}, n = w(I(_.initialValue)), M = le(() => n.value.name !== _.initialValue.name, () => {
|
|
34
30
|
e.value = !1;
|
|
35
31
|
});
|
|
36
32
|
async function E() {
|
|
37
|
-
const r = d.subcategories.find((
|
|
33
|
+
const r = d.subcategories.find((k) => k._id === n.value._id), {
|
|
38
34
|
updateMenu: c
|
|
39
|
-
} =
|
|
35
|
+
} = C;
|
|
40
36
|
await c({
|
|
41
|
-
module:
|
|
37
|
+
module: q.F_MENU_MODULE_V4_KEY.enum.subCategory,
|
|
42
38
|
operation: K.F_OPERATION_TYPE.update,
|
|
43
39
|
// @ts-ignore FIXME: The backend hasn't exported SubcategoryRequest yet. Fix this once it's available.
|
|
44
40
|
data: {
|
|
@@ -53,41 +49,41 @@ const pe = {
|
|
|
53
49
|
trigger: b,
|
|
54
50
|
show: e
|
|
55
51
|
}), (r, c) => {
|
|
56
|
-
const
|
|
52
|
+
const k = y("FmTextField"), o = y("fm-button"), l = y("fm-side-sheet");
|
|
57
53
|
return p(), V(P, null, [X(r.$slots, "default", {
|
|
58
54
|
trigger: b
|
|
59
55
|
}), m(l, {
|
|
60
56
|
id: "group-form",
|
|
61
57
|
modelValue: e.value,
|
|
62
58
|
"onUpdate:modelValue": c[2] || (c[2] = (u) => e.value = u),
|
|
63
|
-
"is-container":
|
|
59
|
+
"is-container": a(j).FmForm,
|
|
64
60
|
"is-container-props": {
|
|
65
61
|
onValidationSuccess: E,
|
|
66
62
|
blameFormChildOnValidationFailed: !0
|
|
67
63
|
},
|
|
68
64
|
"max-width": 560,
|
|
69
|
-
"onOn:clickedAway":
|
|
65
|
+
"onOn:clickedAway": a(M)
|
|
70
66
|
}, {
|
|
71
|
-
"side-sheet-header": h(() => [s("p", pe, T(t
|
|
67
|
+
"side-sheet-header": h(() => [s("p", pe, T(a(t)("menu.subcategory.title")), 1)]),
|
|
72
68
|
"side-sheet-footer": h(() => [s("div", fe, [m(o, {
|
|
73
|
-
label: t
|
|
69
|
+
label: a(t)("menu.common.actions.update"),
|
|
74
70
|
loading: v.value,
|
|
75
71
|
size: "lg",
|
|
76
72
|
type: "submit",
|
|
77
73
|
variant: "primary",
|
|
78
74
|
disabled: !n.value._id
|
|
79
75
|
}, null, 8, ["label", "loading", "disabled"]), m(o, {
|
|
80
|
-
label: t
|
|
76
|
+
label: a(t)("menu.common.actions.cancel"),
|
|
81
77
|
size: "lg",
|
|
82
78
|
variant: "tertiary",
|
|
83
79
|
onClick: c[1] || (c[1] = () => e.value = !1)
|
|
84
80
|
}, null, 8, ["label"])])]),
|
|
85
|
-
default: h(() => [s("div", _e, [m(
|
|
86
|
-
label: t
|
|
81
|
+
default: h(() => [s("div", _e, [m(k, {
|
|
82
|
+
label: a(t)("menu.subcategory.name"),
|
|
87
83
|
modelValue: n.value.name,
|
|
88
84
|
"onUpdate:modelValue": c[0] || (c[0] = (u) => n.value.name = u),
|
|
89
85
|
disabled: !n.value._id,
|
|
90
|
-
rules: [
|
|
86
|
+
rules: [a(de)]
|
|
91
87
|
}, null, 8, ["label", "modelValue", "disabled", "rules"])])]),
|
|
92
88
|
_: 1
|
|
93
89
|
}, 8, ["modelValue", "is-container", "is-container-props", "onOn:clickedAway"])], 64);
|
|
@@ -102,21 +98,21 @@ const pe = {
|
|
|
102
98
|
}, xe = {
|
|
103
99
|
key: 1,
|
|
104
100
|
class: "flex-1 flex flex-col min-h-0"
|
|
105
|
-
}, ke = {
|
|
106
|
-
class: "p-8"
|
|
107
101
|
}, Ce = {
|
|
102
|
+
class: "p-8"
|
|
103
|
+
}, ke = {
|
|
108
104
|
class: "flex flex-1 flex-col min-h-0 overflow-scroll divide-y divide-fm-color-neutral-gray-100 pb-64"
|
|
109
105
|
}, Ve = ["onClick"], we = {
|
|
110
106
|
class: "flex-1 space-y-4"
|
|
111
107
|
}, Fe = {
|
|
112
108
|
class: "fm-typo-en-body-lg-600"
|
|
113
|
-
},
|
|
109
|
+
}, Se = /* @__PURE__ */ L({
|
|
114
110
|
__name: "SubcategoryTable",
|
|
115
|
-
setup(
|
|
116
|
-
const f = Y(), _ = O(), x = D(_), g =
|
|
111
|
+
setup($) {
|
|
112
|
+
const f = Y(), _ = O(), x = D(_), g = U(x), C = G({
|
|
117
113
|
dialog: f,
|
|
118
114
|
menuLoader: g
|
|
119
|
-
}), d = F(() => N().subcategories),
|
|
115
|
+
}), d = F(() => N().subcategories), t = w(""), v = F(() => d.value.filter((o) => o.name.toLowerCase().includes(t.value.toLowerCase()))), {
|
|
120
116
|
t: e
|
|
121
117
|
} = B(), b = w([{
|
|
122
118
|
accessorKey: "name",
|
|
@@ -135,9 +131,9 @@ const pe = {
|
|
|
135
131
|
header: "",
|
|
136
132
|
cell: (o) => {
|
|
137
133
|
const l = o.row.original;
|
|
138
|
-
return
|
|
134
|
+
return A("div", {
|
|
139
135
|
class: "flex justify-end"
|
|
140
|
-
}, [
|
|
136
|
+
}, [A(j.FmButton, {
|
|
141
137
|
icon: "delete",
|
|
142
138
|
disabled: !l._id,
|
|
143
139
|
variant: "tertiary",
|
|
@@ -172,103 +168,103 @@ const pe = {
|
|
|
172
168
|
}
|
|
173
169
|
}).onPrimary(async () => {
|
|
174
170
|
await g.updateMenu({
|
|
175
|
-
module:
|
|
171
|
+
module: q.F_MENU_MODULE_V4_KEY.enum.subCategory,
|
|
176
172
|
operation: K.F_OPERATION_TYPE.delete,
|
|
177
173
|
data: o._id
|
|
178
174
|
}, o.name, !0);
|
|
179
175
|
});
|
|
180
176
|
}
|
|
181
|
-
async function
|
|
177
|
+
async function M(o) {
|
|
182
178
|
const l = o.map((u) => u._id).filter((u) => !!u);
|
|
183
|
-
await
|
|
179
|
+
await C.rearrange(l);
|
|
184
180
|
}
|
|
185
181
|
const E = Z();
|
|
186
182
|
async function r(o) {
|
|
187
|
-
|
|
183
|
+
ue(E, ve, {
|
|
188
184
|
initialValue: o
|
|
189
185
|
});
|
|
190
186
|
}
|
|
191
|
-
const c =
|
|
187
|
+
const c = te(), k = F(() => c.breakpoints.value.xs);
|
|
192
188
|
return (o, l) => {
|
|
193
|
-
const u = y("FmSearch"),
|
|
194
|
-
return
|
|
189
|
+
const u = y("FmSearch"), J = y("FmTable"), H = y("FmButton");
|
|
190
|
+
return k.value ? (p(), V("div", xe, [s("div", Ce, [m(u, {
|
|
195
191
|
autofocus: "",
|
|
196
|
-
modelValue:
|
|
197
|
-
"onUpdate:modelValue": l[2] || (l[2] = (i) =>
|
|
192
|
+
modelValue: t.value,
|
|
193
|
+
"onUpdate:modelValue": l[2] || (l[2] = (i) => t.value = i),
|
|
198
194
|
class: "w-full",
|
|
199
|
-
placeholder:
|
|
195
|
+
placeholder: a(e)("menu.common.labels.search_placeholder", {
|
|
200
196
|
type: "categories"
|
|
201
197
|
})
|
|
202
|
-
}, null, 8, ["modelValue", "placeholder"])]), s("div",
|
|
198
|
+
}, null, 8, ["modelValue", "placeholder"])]), s("div", ke, [(p(!0), V(P, null, ee(v.value, (i) => (p(), V("div", {
|
|
203
199
|
key: i._id || "",
|
|
204
200
|
class: "flex flex-row py-12 px-16",
|
|
205
|
-
onClick: (
|
|
201
|
+
onClick: (Q) => r(i)
|
|
206
202
|
}, [s("div", we, [s("p", Fe, T(i.name), 1)]), m(H, {
|
|
207
|
-
"text-color":
|
|
208
|
-
variant:
|
|
203
|
+
"text-color": a(oe).NeutralGray400,
|
|
204
|
+
variant: a(z).Tertiary,
|
|
209
205
|
"prepend-icon": "delete",
|
|
210
206
|
disabled: !i._id,
|
|
211
|
-
onClick: R((
|
|
207
|
+
onClick: R((Q) => n(i), ["stop"])
|
|
212
208
|
}, null, 8, ["text-color", "variant", "disabled", "onClick"])], 8, Ve))), 128))])])) : (p(), V("div", be, [s("div", ye, [s("div", he, [m(u, {
|
|
213
|
-
modelValue:
|
|
214
|
-
"onUpdate:modelValue": l[0] || (l[0] = (i) =>
|
|
209
|
+
modelValue: t.value,
|
|
210
|
+
"onUpdate:modelValue": l[0] || (l[0] = (i) => t.value = i),
|
|
215
211
|
autofocus: "",
|
|
216
212
|
class: "mb-8",
|
|
217
|
-
placeholder:
|
|
218
|
-
type:
|
|
213
|
+
placeholder: a(e)("menu.common.labels.search_placeholder", {
|
|
214
|
+
type: a(e)("menu.subcategory.title")
|
|
219
215
|
})
|
|
220
|
-
}, null, 8, ["modelValue", "placeholder"])])]), m(
|
|
221
|
-
default: h(() => [m(
|
|
216
|
+
}, null, 8, ["modelValue", "placeholder"])])]), m(ce, null, {
|
|
217
|
+
default: h(() => [m(J, {
|
|
222
218
|
"column-defs": b.value,
|
|
223
219
|
draggable: !0,
|
|
224
220
|
"page-size": d.value.length,
|
|
225
221
|
"row-data": d.value,
|
|
226
|
-
"search-value":
|
|
222
|
+
"search-value": t.value,
|
|
227
223
|
"shrink-at": !1,
|
|
228
224
|
"hide-footer": "",
|
|
229
225
|
"pin-header-row": "",
|
|
230
|
-
onDndChanged:
|
|
226
|
+
onDndChanged: M,
|
|
231
227
|
onRowClick: l[1] || (l[1] = (i) => r(i.original))
|
|
232
228
|
}, null, 8, ["column-defs", "page-size", "row-data", "search-value"])]),
|
|
233
229
|
_: 1
|
|
234
230
|
})]));
|
|
235
231
|
};
|
|
236
232
|
}
|
|
237
|
-
}),
|
|
233
|
+
}), $e = { class: "flex-1 flex justify-between gap-8 pl-8" }, Me = { class: "flex items-center" }, Ee = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Le = { class: "fm-typo-en-body-md-600 font-semibold" }, Pe = /* @__PURE__ */ L({
|
|
238
234
|
__name: "Subcategory",
|
|
239
|
-
setup(
|
|
240
|
-
const f = Y(), _ = O(), x = D(_), g =
|
|
235
|
+
setup($) {
|
|
236
|
+
const f = Y(), _ = O(), x = D(_), g = U(x), C = G({ dialog: f, menuLoader: g }), d = F(() => N().subcategories), { t } = B();
|
|
241
237
|
function v() {
|
|
242
|
-
|
|
238
|
+
C.create();
|
|
243
239
|
}
|
|
244
240
|
const e = F(() => d.value.length);
|
|
245
|
-
return me().resetOnMount(), (b, n) => (p(),
|
|
246
|
-
heading: t
|
|
241
|
+
return me().resetOnMount(), (b, n) => (p(), S(ie, {
|
|
242
|
+
heading: a(t)("menu.subcategory.title")
|
|
247
243
|
}, {
|
|
248
244
|
default: h(() => [
|
|
249
|
-
d.value.length > 0 ? (p(),
|
|
245
|
+
d.value.length > 0 ? (p(), S(Se, { key: 0 })) : (p(), S(a(re), {
|
|
250
246
|
key: 1,
|
|
251
247
|
action: {
|
|
252
|
-
text: t
|
|
248
|
+
text: a(t)("menu.subcategory.add"),
|
|
253
249
|
callback: v
|
|
254
250
|
},
|
|
255
|
-
subtitle: t
|
|
256
|
-
title: t
|
|
251
|
+
subtitle: a(t)("menu.subcategory.empty.subtitle"),
|
|
252
|
+
title: a(t)("menu.subcategory.empty.title")
|
|
257
253
|
}, null, 8, ["action", "subtitle", "title"]))
|
|
258
254
|
]),
|
|
259
255
|
"append-heading": h(() => [
|
|
260
|
-
s("div",
|
|
261
|
-
s("div",
|
|
256
|
+
s("div", $e, [
|
|
257
|
+
s("div", Me, [
|
|
262
258
|
s("div", Ee, [
|
|
263
259
|
s("p", Le, T(e.value), 1)
|
|
264
260
|
])
|
|
265
261
|
]),
|
|
266
|
-
d.value.length > 0 ? (p(),
|
|
262
|
+
d.value.length > 0 ? (p(), S(ne, {
|
|
267
263
|
key: 0,
|
|
268
|
-
label: t
|
|
264
|
+
label: a(t)("menu.subcategory.add"),
|
|
269
265
|
"prepend-icon": "add",
|
|
270
266
|
onClick: v
|
|
271
|
-
}, null, 8, ["label"])) :
|
|
267
|
+
}, null, 8, ["label"])) : ae("", !0)
|
|
272
268
|
])
|
|
273
269
|
]),
|
|
274
270
|
_: 1
|
|
@@ -276,5 +272,5 @@ const pe = {
|
|
|
276
272
|
}
|
|
277
273
|
});
|
|
278
274
|
export {
|
|
279
|
-
|
|
275
|
+
Pe as default
|
|
280
276
|
};
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import { defineComponent as f, computed as y, ref as k, createBlock as i, openBlock as d, unref as a, withCtx as s, createElementVNode as t, toDisplayString as b, createCommentVNode as g, createVNode as m } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import { useI18n as
|
|
4
|
-
import { useSnackbar as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { _ as
|
|
7
|
-
import { _ as
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
const U = { class: "flex-1 flex justify-between gap-8 pl-8" }, B = { class: "flex items-center" }, F = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, A = { class: "fm-typo-en-body-md-600 font-semibold" }, z = /* @__PURE__ */ f({
|
|
2
|
+
import { a as x, u as v, T as w, d as E, M, m as T, e as V } from "./App-Cfl37TTw.js";
|
|
3
|
+
import { useI18n as h } from "@feedmepos/mf-common";
|
|
4
|
+
import { useSnackbar as C } from "@feedmepos/ui-library";
|
|
5
|
+
import { _ as N } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
6
|
+
import { _ as S } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
7
|
+
import { _ as L } from "./Takeaway.vue_vue_type_script_setup_true_lang-D-R5_S5G.js";
|
|
8
|
+
import { a as O } from "./menu-Brxar171.js";
|
|
9
|
+
const U = { class: "flex-1 flex justify-between gap-8 pl-8" }, B = { class: "flex items-center" }, F = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, D = { class: "fm-typo-en-body-md-600 font-semibold" }, G = /* @__PURE__ */ f({
|
|
11
10
|
__name: "Takeaway",
|
|
12
|
-
setup(
|
|
13
|
-
const u =
|
|
14
|
-
return O().resetOnMount(), (
|
|
11
|
+
setup(I) {
|
|
12
|
+
const u = C(), l = x(u), c = v(), p = E(l), _ = y(() => c.rules.item.bindToVariant), n = k(0), { t: r } = h();
|
|
13
|
+
return O().resetOnMount(), (P, o) => (d(), i(S, {
|
|
15
14
|
heading: a(r)("menu.takeaway.title")
|
|
16
15
|
}, {
|
|
17
16
|
default: s(() => [
|
|
18
|
-
m(
|
|
17
|
+
m(L, {
|
|
19
18
|
"onUpdate:count": o[0] || (o[0] = (e) => n.value = e)
|
|
20
19
|
})
|
|
21
20
|
]),
|
|
@@ -23,27 +22,27 @@ const U = { class: "flex-1 flex justify-between gap-8 pl-8" }, B = { class: "fle
|
|
|
23
22
|
t("div", U, [
|
|
24
23
|
t("div", B, [
|
|
25
24
|
t("div", F, [
|
|
26
|
-
t("p",
|
|
25
|
+
t("p", D, b(n.value), 1)
|
|
27
26
|
])
|
|
28
27
|
]),
|
|
29
28
|
t("div", null, [
|
|
30
|
-
n.value > 0 ? (d(), i(a(
|
|
29
|
+
n.value > 0 ? (d(), i(a(w), {
|
|
31
30
|
key: 0,
|
|
32
31
|
"bind-to-variant": _.value,
|
|
33
32
|
action: "add",
|
|
34
33
|
"apply-product": "",
|
|
35
|
-
"onUpdate:takeaway": o[1] || (o[1] = (e) => a(
|
|
34
|
+
"onUpdate:takeaway": o[1] || (o[1] = (e) => a(p).updateMenu(
|
|
36
35
|
{
|
|
37
|
-
module: a(
|
|
38
|
-
operation: a(
|
|
36
|
+
module: a(V.F_MENU_MODULE_V4_KEY).enum.takeaway,
|
|
37
|
+
operation: a(T.F_OPERATION_TYPE).create,
|
|
39
38
|
data: e,
|
|
40
|
-
link: a(
|
|
39
|
+
link: a(M)(e.usedBy || [])
|
|
41
40
|
},
|
|
42
41
|
e.name
|
|
43
42
|
))
|
|
44
43
|
}, {
|
|
45
44
|
default: s(({ trigger: e }) => [
|
|
46
|
-
m(
|
|
45
|
+
m(N, {
|
|
47
46
|
label: a(r)("menu.takeaway.actions.add"),
|
|
48
47
|
"prepend-icon": "add",
|
|
49
48
|
type: "button",
|
|
@@ -60,5 +59,5 @@ const U = { class: "flex-1 flex justify-between gap-8 pl-8" }, B = { class: "fle
|
|
|
60
59
|
}
|
|
61
60
|
});
|
|
62
61
|
export {
|
|
63
|
-
|
|
62
|
+
G as default
|
|
64
63
|
};
|