@feedmepos/mf-menu 0.32.43 → 0.32.45-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-C9b4SjED.js → App-u5AOIdU4.js} +1472 -1459
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-C1T4Ewek.js → ApplyProduct.vue_vue_type_script_setup_true_lang-RTdI8EVk.js} +3 -3
- package/dist/{Catalog-BVrf3VaX.js → Catalog-DDMz6wD9.js} +44 -44
- package/dist/{Category-BkReM5IG.js → Category-BE0d0_de.js} +24 -24
- package/dist/{Category-BMzIQqIE.js → Category-DoIleKPb.js} +78 -78
- package/dist/{CookingGuide-CvctI1TH.js → CookingGuide-iP5hFtlB.js} +105 -105
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-bYSEp6Wb.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CSaMT7Gr.js} +1 -1
- package/dist/{Group-CHkNuuHE.js → Group-AXDRjsKC.js} +3 -3
- package/dist/{Group-BQzmXagr.js → Group-xjimyqnO.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-BkruJTpL.js → Group.vue_vue_type_script_setup_true_lang-DB_X7ws3.js} +173 -173
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CBz83Qd1.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D_IUSYDa.js} +30 -30
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Dpx4meDa.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-Suib7m8i.js} +1750 -1751
- package/dist/{Ingredient-BNsKYrQB.js → Ingredient-yr2DWIMw.js} +20 -20
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-DzzwwdA_.js → InventoryBinding.vue_vue_type_script_setup_true_lang-BpiU1gRP.js} +2 -2
- package/dist/{LinkProductSideSheet-C6-wef-M.js → LinkProductSideSheet-2MbaATTn.js} +45 -45
- package/dist/{MenuSetting-DRaw7b6m.js → MenuSetting-BhkjzPiN.js} +47 -47
- package/dist/{PrintRoute-BKB-thVp.js → PrintRoute-ChqpbVo4.js} +39 -39
- package/dist/{Product-vviXmBR1.js → Product-BpnGnMzm.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-5h-k6zad.js → Product.vue_vue_type_script_setup_true_lang-COkk299w.js} +465 -463
- package/dist/{ProductInternalTools-DtLk3xFR.js → ProductInternalTools-BEwLYcEn.js} +66 -66
- package/dist/Products-lONe7x_i.js +291 -0
- package/dist/{Publish-jx0_H_26.js → Publish-CXRgBz-S.js} +29 -29
- package/dist/{Recipe-Dk04ge-_.js → Recipe-Bbt3hG6N.js} +24 -24
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-DaCVUn1i.js → RuleView.vue_vue_type_script_setup_true_lang-DXisBADc.js} +366 -366
- package/dist/{Scheduler-vFTvCVcY.js → Scheduler-DJsgP_Hi.js} +11 -11
- package/dist/{ServingSequence-DiBqQ_iS.js → ServingSequence-DALjVV2I.js} +44 -44
- package/dist/{Setting-CtzJ_pVM.js → Setting-B23o5SoS.js} +17 -17
- package/dist/{Subcategory-Cmv2W67T.js → Subcategory-CS4MEgtM.js} +109 -110
- package/dist/{Takeaway-DBW4UPFZ.js → Takeaway-CI2Y-_LF.js} +13 -13
- package/dist/{Takeaway-ChaYk0Ix.js → Takeaway-D27iA6M6.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-C7RL3ITP.js → Takeaway.vue_vue_type_script_setup_true_lang-Ca3qK9zO.js} +111 -111
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-edwJ1203.js → Thumbnail.vue_vue_type_script_setup_true_lang-Da2jQE45.js} +27 -27
- package/dist/TranslationFieldSection.vue_vue_type_script_setup_true_lang-DUScE-82.js +278 -0
- package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-E3-hgVdd.js +140 -0
- package/dist/TranslationViewChip.vue_vue_type_script_setup_true_lang-BlACWsDs.js +60 -0
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DnuNFxC7.js +6130 -0
- package/dist/{Unit-BgLqPMLe.js → Unit-5pv3oxSc.js} +8 -8
- package/dist/Variant-CTAI6p6r.js +248 -0
- package/dist/{_id_-CDN7as0K.js → _id_-D09xegPQ.js} +28 -28
- package/dist/{app-0AQBxO0B.js → app-8-JCz9b5.js} +1 -1
- package/dist/app-Bk0DN7oZ.js +363 -0
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/components/translation/LanguageChip.vue.d.ts +18 -0
- package/dist/apps/mf-menu/src/components/translation/LanguageSelector.vue.d.ts +33 -0
- package/dist/apps/mf-menu/src/components/translation/LocaleIconBadge.vue.d.ts +29 -0
- package/dist/apps/mf-menu/src/components/translation/TranslationFieldRow.vue.d.ts +39 -0
- package/dist/apps/mf-menu/src/components/translation/TranslationViewChip.vue.d.ts +15 -0
- package/dist/apps/mf-menu/src/composable/translationLanguages.d.ts +16 -0
- package/dist/apps/mf-menu/src/stores/menu.d.ts +1 -0
- package/dist/apps/mf-menu/src/utils/translation.d.ts +1 -1
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-DTIHdzDw.js → linked-status-dENy3aw3.js} +5 -5
- package/dist/assets/{menu-export-CpcyYnR-.js → menu-export-E9V7bg-T.js} +2 -2
- package/dist/assets/{override-menu-CASoFjhZ.js → override-menu-HaI7O9Fu.js} +5 -5
- package/dist/assets/{validate-menu-C5AkexWv.js → validate-menu-C8LhbVSM.js} +2 -2
- package/dist/{catalog-BA1e4WAu.js → catalog-DhXoYsFF.js} +1 -1
- package/dist/{catalogSetting-DE5rjVfj.js → catalogSetting-DyRqWzdW.js} +1 -1
- package/dist/{currency-D5qYOpxI.js → currency-BkmIftYM.js} +1 -1
- package/dist/dayjs.min-nQqVHQcC.js +6 -0
- package/dist/index-28XF3UnN.js +246 -0
- package/dist/{index-vPs04fVf.js → index-BQ95VVc6.js} +33 -32
- package/dist/index-BXWquw9Z.js +472 -0
- package/dist/{index.vue_vue_type_script_setup_true_lang-DSZsSghE.js → index.vue_vue_type_script_setup_true_lang-CJO2XWIn.js} +270 -244
- package/dist/{item-Dp17qTYi.js → item-DmTvGVsp.js} +3270 -3406
- package/dist/{jszip.min-DlpCmtaR.js → jszip.min-8Z5To_Pk.js} +6 -7
- package/dist/{menu-BOVrJ7di.js → menu-Csu9X1_I.js} +1 -1
- package/dist/{menuV2-BHnldQiM.js → menuV2-CC-vGiv5.js} +71 -71
- package/dist/{priceTier-BRQz1GRF.js → priceTier-Bj9Y6SSr.js} +1 -1
- package/dist/{rules-CO49kqfr.js → rules-Dod2cBHH.js} +12 -12
- package/dist/{scheduler-BDHjl8t7.js → scheduler-B3M-715v.js} +29 -29
- package/dist/{toExcel-DGdZKSxT.js → toExcel-67ufpOxx.js} +2 -2
- package/dist/{unit-D7QVgTp_.js → unit-BQrnccs6.js} +35 -35
- package/package.json +1 -1
- package/dist/Products-BR3iBVFd.js +0 -307
- package/dist/RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-I6qrPmxY.js +0 -144
- package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-Cs6s_csi.js +0 -196
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DIbjlDVn.js +0 -5767
- package/dist/Variant-B8yxF5mJ.js +0 -247
- package/dist/app-BU6wILmn.js +0 -2286
- package/dist/dayjs.min-BFDAHpA8.js +0 -7
- package/dist/index--nQbIQ0d.js +0 -545
- package/dist/translation-BCZ1Ruvv.js +0 -93
- /package/dist/apps/mf-menu/src/components/{TranslationBadge.vue.d.ts → translation/TranslationBadge.vue.d.ts} +0 -0
- /package/dist/apps/mf-menu/src/components/{TranslationFieldSection.vue.d.ts → translation/TranslationFieldSection.vue.d.ts} +0 -0
|
@@ -1,98 +1,97 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as z, ref as x, computed as V, watch as te, resolveComponent as C, createElementBlock as k, openBlock as p, Fragment as I, renderSlot as oe, createVNode as m, unref as n, withCtx as b, createElementVNode as c, renderList as H, toDisplayString as T, h as N, withModifiers as G, getCurrentInstance as ne, createBlock as U, createCommentVNode as le } from "vue";
|
|
2
2
|
import { useI18n as R } from "@feedmepos/mf-common";
|
|
3
|
-
import { useSnackbar as
|
|
3
|
+
import { useSnackbar as j, components as W, useDialog as X, FmButtonVariant as J, useBreakpoints as se, FmButtonColorThemeVariant as ie } from "@feedmepos/ui-library";
|
|
4
4
|
import { _ as re } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
5
|
-
import {
|
|
5
|
+
import { G as P, u as Y, Q as K, M as Z, A as ee, a4 as ce } from "./index.vue_vue_type_script_setup_true_lang-CJO2XWIn.js";
|
|
6
6
|
import { _ as ue } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
7
|
-
import { _ as me } from "./app-
|
|
7
|
+
import { _ as me } from "./app-Bk0DN7oZ.js";
|
|
8
8
|
import { c as de } from "./createForm-BoUQeZTd.js";
|
|
9
9
|
import { u as pe } from "./discardConfirm-BHni0LNu.js";
|
|
10
|
-
import { c as
|
|
11
|
-
import { r as _e, u as ae } from "./rules-
|
|
12
|
-
import { _ as fe } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-
|
|
10
|
+
import { c as q } from "./object-DVUNCr7w.js";
|
|
11
|
+
import { r as _e, u as ae } from "./rules-Dod2cBHH.js";
|
|
12
|
+
import { _ as fe } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-E3-hgVdd.js";
|
|
13
13
|
import { c as ve } from "./check-C9mY6LiX.js";
|
|
14
|
-
import { g as
|
|
15
|
-
import {
|
|
16
|
-
|
|
14
|
+
import { g as Q } from "./TranslationFieldSection.vue_vue_type_script_setup_true_lang-DUScE-82.js";
|
|
15
|
+
import { _ as ge } from "./TranslationViewChip.vue_vue_type_script_setup_true_lang-BlACWsDs.js";
|
|
16
|
+
import { a as ye } from "./menu-Csu9X1_I.js";
|
|
17
|
+
const be = {
|
|
17
18
|
class: "fm-typo-en-title-md-600"
|
|
18
|
-
}, be = {
|
|
19
|
-
class: "flex flex-col gap-32 h-full min-h-0 py-16"
|
|
20
19
|
}, he = {
|
|
21
|
-
class: "
|
|
20
|
+
class: "flex flex-col gap-32 h-full min-h-0 py-16"
|
|
22
21
|
}, xe = {
|
|
22
|
+
class: "py-12 px-16 space-y-4"
|
|
23
|
+
}, Ce = {
|
|
23
24
|
class: "flex gap-8 items-center justify-start"
|
|
24
|
-
},
|
|
25
|
+
}, ke = /* @__PURE__ */ z({
|
|
25
26
|
__name: "Form",
|
|
26
27
|
props: {
|
|
27
28
|
initialValue: {}
|
|
28
29
|
},
|
|
29
|
-
setup(
|
|
30
|
+
setup(D, {
|
|
30
31
|
expose: w
|
|
31
32
|
}) {
|
|
32
|
-
const h =
|
|
33
|
+
const h = D, S = j(), F = P(S), E = K(F), d = Y(), {
|
|
33
34
|
t: l
|
|
34
|
-
} = R(), L = x(!1), o = x(!1), $ = x(!1), u = x(void 0),
|
|
35
|
+
} = R(), L = x(!1), o = x(!1), $ = x(!1), u = x(void 0), M = (e) => {
|
|
35
36
|
ve.isBoolean(e) ? o.value = e : o.value = !o.value;
|
|
36
|
-
}, s = x(
|
|
37
|
-
var
|
|
38
|
-
const e = [],
|
|
39
|
-
return s.value.name && !
|
|
40
|
-
locale:
|
|
37
|
+
}, s = x(q(h.initialValue)), O = V(() => !!s.value.name), B = V(() => {
|
|
38
|
+
var f;
|
|
39
|
+
const e = [], a = "en-US", t = (f = u.value) == null ? void 0 : f[a];
|
|
40
|
+
return s.value.name && !t && e.push({
|
|
41
|
+
locale: a,
|
|
41
42
|
name: s.value.name,
|
|
42
|
-
localeDisplay:
|
|
43
|
-
}), u.value && Object.entries(u.value).filter(([
|
|
43
|
+
localeDisplay: Q(a)
|
|
44
|
+
}), u.value && Object.entries(u.value).filter(([y, v]) => v && v.trim()).sort(([y], [v]) => y.localeCompare(v)).forEach(([y, v]) => {
|
|
44
45
|
e.push({
|
|
45
|
-
locale:
|
|
46
|
-
name:
|
|
47
|
-
localeDisplay:
|
|
46
|
+
locale: y,
|
|
47
|
+
name: v,
|
|
48
|
+
localeDisplay: Q(y)
|
|
48
49
|
});
|
|
49
50
|
}), e;
|
|
50
51
|
});
|
|
51
|
-
function
|
|
52
|
+
function A(e) {
|
|
52
53
|
u.value = e;
|
|
53
54
|
}
|
|
54
55
|
function i(e) {
|
|
55
56
|
s.value.name = e;
|
|
56
57
|
}
|
|
57
58
|
const r = pe(() => {
|
|
58
|
-
const e = d.subcategories.find((
|
|
59
|
-
return
|
|
59
|
+
const e = d.subcategories.find((v) => v._id === s.value._id), a = s.value.name !== (e == null ? void 0 : e.name), t = (e == null ? void 0 : e.name_locale) || {}, f = u.value || {}, y = JSON.stringify(t) !== JSON.stringify(f);
|
|
60
|
+
return a || y;
|
|
60
61
|
}, () => {
|
|
61
62
|
o.value = !1;
|
|
62
63
|
});
|
|
63
64
|
async function _() {
|
|
64
|
-
const e = d.subcategories.find((
|
|
65
|
-
updateMenu:
|
|
66
|
-
} = E;
|
|
67
|
-
await
|
|
65
|
+
const e = d.subcategories.find((f) => f._id === s.value._id), {
|
|
66
|
+
updateMenu: a
|
|
67
|
+
} = E, t = u.value;
|
|
68
|
+
await a({
|
|
68
69
|
module: ee.F_MENU_MODULE_V4_KEY.enum.subCategory,
|
|
69
70
|
operation: Z.F_OPERATION_TYPE.update,
|
|
70
71
|
// @ts-ignore FIXME: The backend hasn't exported SubcategoryRequest yet. Fix this once it's available.
|
|
71
72
|
data: {
|
|
72
73
|
...e,
|
|
73
74
|
name: s.value.name ?? (e == null ? void 0 : e.name),
|
|
74
|
-
|
|
75
|
-
name_locale: u.value
|
|
76
|
-
}
|
|
75
|
+
name_locale: t
|
|
77
76
|
}
|
|
78
|
-
}, s.value.name),
|
|
77
|
+
}, s.value.name), M(!1);
|
|
79
78
|
}
|
|
80
79
|
return te(() => o.value, () => {
|
|
81
80
|
if (!o.value) return;
|
|
82
|
-
s.value =
|
|
83
|
-
const e = d.subcategories.find((
|
|
81
|
+
s.value = q(h.initialValue);
|
|
82
|
+
const e = d.subcategories.find((a) => a._id === s.value._id);
|
|
84
83
|
u.value = e == null ? void 0 : e.name_locale;
|
|
85
84
|
}), w({
|
|
86
|
-
trigger:
|
|
85
|
+
trigger: M,
|
|
87
86
|
show: o
|
|
88
|
-
}), (e,
|
|
89
|
-
const
|
|
87
|
+
}), (e, a) => {
|
|
88
|
+
const t = C("fm-button"), f = C("FmTooltip"), y = C("FmTextField"), v = C("fm-side-sheet");
|
|
90
89
|
return p(), k(I, null, [oe(e.$slots, "default", {
|
|
91
|
-
trigger:
|
|
92
|
-
}), m(
|
|
90
|
+
trigger: M
|
|
91
|
+
}), m(v, {
|
|
93
92
|
id: "group-form",
|
|
94
93
|
modelValue: o.value,
|
|
95
|
-
"onUpdate:modelValue":
|
|
94
|
+
"onUpdate:modelValue": a[3] || (a[3] = (g) => o.value = g),
|
|
96
95
|
"is-container": n(W).FmForm,
|
|
97
96
|
"is-container-props": {
|
|
98
97
|
onValidationSuccess: _,
|
|
@@ -101,39 +100,39 @@ const ye = {
|
|
|
101
100
|
"max-width": 560,
|
|
102
101
|
"onOn:clickedAway": n(r)
|
|
103
102
|
}, {
|
|
104
|
-
"side-sheet-header":
|
|
105
|
-
"side-sheet-footer":
|
|
103
|
+
"side-sheet-header": b(() => [c("p", be, T(n(l)("menu.subcategory.title")), 1)]),
|
|
104
|
+
"side-sheet-footer": b(() => [c("div", Ce, [m(t, {
|
|
106
105
|
label: n(l)("menu.common.actions.update"),
|
|
107
106
|
loading: L.value,
|
|
108
107
|
size: "lg",
|
|
109
108
|
type: "submit",
|
|
110
109
|
variant: "primary",
|
|
111
110
|
disabled: !s.value._id
|
|
112
|
-
}, null, 8, ["label", "loading", "disabled"]), m(
|
|
111
|
+
}, null, 8, ["label", "loading", "disabled"]), m(t, {
|
|
113
112
|
label: n(l)("menu.common.actions.cancel"),
|
|
114
113
|
size: "lg",
|
|
115
114
|
variant: "tertiary",
|
|
116
|
-
onClick:
|
|
115
|
+
onClick: a[2] || (a[2] = () => o.value = !1)
|
|
117
116
|
}, null, 8, ["label"])])]),
|
|
118
|
-
default:
|
|
117
|
+
default: b(() => [c("div", he, [m(y, {
|
|
119
118
|
label: n(l)("menu.subcategory.name"),
|
|
120
119
|
modelValue: s.value.name,
|
|
121
|
-
"onUpdate:modelValue":
|
|
120
|
+
"onUpdate:modelValue": a[1] || (a[1] = (g) => s.value.name = g),
|
|
122
121
|
disabled: !s.value._id,
|
|
123
122
|
rules: [n(_e)]
|
|
124
123
|
}, {
|
|
125
|
-
append:
|
|
124
|
+
append: b(() => [m(f, {
|
|
126
125
|
variant: "plain",
|
|
127
126
|
placement: "top",
|
|
128
127
|
"z-index": 999
|
|
129
128
|
}, {
|
|
130
|
-
content:
|
|
131
|
-
key:
|
|
132
|
-
},
|
|
133
|
-
default:
|
|
129
|
+
content: b(() => [c("div", xe, [(p(!0), k(I, null, H(B.value, (g) => (p(), k("div", {
|
|
130
|
+
key: g.locale
|
|
131
|
+
}, T(g.name) + " (" + T(g.localeDisplay) + ") ", 1))), 128))])]),
|
|
132
|
+
default: b(() => [m(t, {
|
|
134
133
|
variant: "tertiary",
|
|
135
134
|
icon: "g_translate",
|
|
136
|
-
onClick:
|
|
135
|
+
onClick: a[0] || (a[0] = (g) => $.value = !0),
|
|
137
136
|
disabled: !O.value
|
|
138
137
|
}, null, 8, ["disabled"])]),
|
|
139
138
|
_: 1
|
|
@@ -143,39 +142,39 @@ const ye = {
|
|
|
143
142
|
_: 1
|
|
144
143
|
}, 8, ["modelValue", "is-container", "is-container-props", "onOn:clickedAway"]), m(fe, {
|
|
145
144
|
modelValue: $.value,
|
|
146
|
-
"onUpdate:modelValue":
|
|
145
|
+
"onUpdate:modelValue": a[4] || (a[4] = (g) => $.value = g),
|
|
147
146
|
title: n(l)("menu.subcategory.title"),
|
|
148
147
|
name: s.value.name,
|
|
149
148
|
"name-locale": u.value,
|
|
150
149
|
"onUpdate:name": i,
|
|
151
|
-
"onUpdate:nameLocale":
|
|
150
|
+
"onUpdate:nameLocale": A
|
|
152
151
|
}, null, 8, ["modelValue", "title", "name", "name-locale"])], 64);
|
|
153
152
|
};
|
|
154
153
|
}
|
|
155
|
-
}),
|
|
154
|
+
}), Ve = ke, we = {
|
|
156
155
|
key: 0
|
|
157
|
-
}, we = {
|
|
158
|
-
class: "flex justify-end items-center"
|
|
159
156
|
}, Fe = {
|
|
160
|
-
class: "
|
|
157
|
+
class: "flex justify-end items-center"
|
|
161
158
|
}, Le = {
|
|
159
|
+
class: "w-[320px]"
|
|
160
|
+
}, $e = {
|
|
162
161
|
key: 1,
|
|
163
162
|
class: "flex-1 flex flex-col min-h-0"
|
|
164
|
-
}, $e = {
|
|
165
|
-
class: "p-8"
|
|
166
163
|
}, Se = {
|
|
164
|
+
class: "p-8"
|
|
165
|
+
}, Ee = {
|
|
167
166
|
class: "flex flex-1 flex-col min-h-0 overflow-scroll divide-y divide-fm-color-neutral-gray-100 pb-64"
|
|
168
|
-
},
|
|
167
|
+
}, Me = ["onClick"], Ne = {
|
|
169
168
|
class: "flex-1 space-y-4"
|
|
170
169
|
}, Te = {
|
|
171
170
|
class: "fm-typo-en-body-lg-600"
|
|
172
|
-
},
|
|
171
|
+
}, Oe = /* @__PURE__ */ z({
|
|
173
172
|
__name: "SubcategoryTable",
|
|
174
|
-
setup(
|
|
175
|
-
const w = X(), h =
|
|
173
|
+
setup(D) {
|
|
174
|
+
const w = X(), h = j(), S = P(h), F = K(S), E = ae({
|
|
176
175
|
dialog: w,
|
|
177
176
|
menuLoader: F
|
|
178
|
-
}), d = V(() =>
|
|
177
|
+
}), d = V(() => Y().subcategories), l = x(""), L = V(() => d.value.filter((i) => i.name.toLowerCase().includes(l.value.toLowerCase()))), {
|
|
179
178
|
t: o
|
|
180
179
|
} = R(), $ = x([{
|
|
181
180
|
accessorKey: "name",
|
|
@@ -185,14 +184,14 @@ const ye = {
|
|
|
185
184
|
width: "auto"
|
|
186
185
|
},
|
|
187
186
|
cell: (i) => {
|
|
188
|
-
const r = i.row.original, _ = i.getValue()
|
|
189
|
-
return
|
|
187
|
+
const r = i.row.original, _ = i.getValue();
|
|
188
|
+
return N("div", {
|
|
190
189
|
class: "flex items-center gap-8"
|
|
191
|
-
}, [
|
|
190
|
+
}, [N("span", {
|
|
192
191
|
class: "break-all"
|
|
193
|
-
}, _),
|
|
194
|
-
|
|
195
|
-
}
|
|
192
|
+
}, _), r.name_locale ? N(ge, {
|
|
193
|
+
nameLocale: r.name_locale ?? {}
|
|
194
|
+
}) : null]);
|
|
196
195
|
}
|
|
197
196
|
}, {
|
|
198
197
|
id: "actions",
|
|
@@ -204,14 +203,14 @@ const ye = {
|
|
|
204
203
|
header: "",
|
|
205
204
|
cell: (i) => {
|
|
206
205
|
const r = i.row.original;
|
|
207
|
-
return
|
|
206
|
+
return N("div", {
|
|
208
207
|
class: "flex justify-end"
|
|
209
|
-
}, [
|
|
208
|
+
}, [N(W.FmButton, {
|
|
210
209
|
icon: "delete",
|
|
211
210
|
disabled: !r._id,
|
|
212
211
|
variant: "tertiary",
|
|
213
212
|
textColor: "neutral-gray-400",
|
|
214
|
-
onClick:
|
|
213
|
+
onClick: G(async () => {
|
|
215
214
|
await u(r);
|
|
216
215
|
}, ["stop", "prevent"])
|
|
217
216
|
})]);
|
|
@@ -233,7 +232,7 @@ const ye = {
|
|
|
233
232
|
primaryActions: {
|
|
234
233
|
text: "Remove",
|
|
235
234
|
close: !0,
|
|
236
|
-
variant:
|
|
235
|
+
variant: J.Destructive
|
|
237
236
|
},
|
|
238
237
|
secondaryActions: {
|
|
239
238
|
text: "Cancel",
|
|
@@ -247,47 +246,47 @@ const ye = {
|
|
|
247
246
|
}, i.name, !0);
|
|
248
247
|
});
|
|
249
248
|
}
|
|
250
|
-
async function
|
|
249
|
+
async function M(i) {
|
|
251
250
|
const r = i.map((_) => _._id).filter((_) => !!_);
|
|
252
251
|
await E.rearrange(r);
|
|
253
252
|
}
|
|
254
253
|
const s = ne();
|
|
255
254
|
async function O(i) {
|
|
256
|
-
de(s,
|
|
255
|
+
de(s, Ve, {
|
|
257
256
|
initialValue: i
|
|
258
257
|
});
|
|
259
258
|
}
|
|
260
|
-
const
|
|
259
|
+
const B = se(), A = V(() => B.breakpoints.value.xs);
|
|
261
260
|
return (i, r) => {
|
|
262
|
-
const _ = C("FmSearch"), e = C("FmTable"),
|
|
263
|
-
return
|
|
261
|
+
const _ = C("FmSearch"), e = C("FmTable"), a = C("FmButton");
|
|
262
|
+
return A.value ? (p(), k("div", $e, [c("div", Se, [m(_, {
|
|
264
263
|
autofocus: "",
|
|
265
264
|
modelValue: l.value,
|
|
266
|
-
"onUpdate:modelValue": r[2] || (r[2] = (
|
|
265
|
+
"onUpdate:modelValue": r[2] || (r[2] = (t) => l.value = t),
|
|
267
266
|
class: "w-full",
|
|
268
267
|
placeholder: n(o)("menu.common.labels.search_placeholder", {
|
|
269
268
|
type: "categories"
|
|
270
269
|
})
|
|
271
|
-
}, null, 8, ["modelValue", "placeholder"])]), c("div",
|
|
272
|
-
key:
|
|
270
|
+
}, null, 8, ["modelValue", "placeholder"])]), c("div", Ee, [(p(!0), k(I, null, H(L.value, (t) => (p(), k("div", {
|
|
271
|
+
key: t._id || "",
|
|
273
272
|
class: "flex flex-row py-12 px-16",
|
|
274
|
-
onClick: (
|
|
275
|
-
}, [c("div", Ne, [c("p", Te,
|
|
273
|
+
onClick: (f) => O(t)
|
|
274
|
+
}, [c("div", Ne, [c("p", Te, T(t.name), 1)]), m(a, {
|
|
276
275
|
"text-color": n(ie).NeutralGray400,
|
|
277
|
-
variant: n(
|
|
276
|
+
variant: n(J).Tertiary,
|
|
278
277
|
"prepend-icon": "delete",
|
|
279
|
-
disabled: !
|
|
280
|
-
onClick:
|
|
281
|
-
}, null, 8, ["text-color", "variant", "disabled", "onClick"])], 8,
|
|
278
|
+
disabled: !t._id,
|
|
279
|
+
onClick: G((f) => u(t), ["stop"])
|
|
280
|
+
}, null, 8, ["text-color", "variant", "disabled", "onClick"])], 8, Me))), 128))])])) : (p(), k("div", we, [c("div", Fe, [c("div", Le, [m(_, {
|
|
282
281
|
modelValue: l.value,
|
|
283
|
-
"onUpdate:modelValue": r[0] || (r[0] = (
|
|
282
|
+
"onUpdate:modelValue": r[0] || (r[0] = (t) => l.value = t),
|
|
284
283
|
autofocus: "",
|
|
285
284
|
class: "mb-8",
|
|
286
285
|
placeholder: n(o)("menu.common.labels.search_placeholder", {
|
|
287
286
|
type: n(o)("menu.subcategory.title")
|
|
288
287
|
})
|
|
289
288
|
}, null, 8, ["modelValue", "placeholder"])])]), m(me, null, {
|
|
290
|
-
default:
|
|
289
|
+
default: b(() => [m(e, {
|
|
291
290
|
"column-defs": $.value,
|
|
292
291
|
draggable: !0,
|
|
293
292
|
"page-size": d.value.length,
|
|
@@ -296,26 +295,26 @@ const ye = {
|
|
|
296
295
|
"shrink-at": !1,
|
|
297
296
|
"hide-footer": "",
|
|
298
297
|
"pin-header-row": "",
|
|
299
|
-
onDndChanged:
|
|
300
|
-
onRowClick: r[1] || (r[1] = (
|
|
298
|
+
onDndChanged: M,
|
|
299
|
+
onRowClick: r[1] || (r[1] = (t) => O(t.original))
|
|
301
300
|
}, null, 8, ["column-defs", "page-size", "row-data", "search-value"])]),
|
|
302
301
|
_: 1
|
|
303
302
|
})]));
|
|
304
303
|
};
|
|
305
304
|
}
|
|
306
|
-
}),
|
|
305
|
+
}), Ue = { class: "flex-1 flex justify-between gap-8 pl-8" }, De = { class: "flex items-center" }, Be = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Ae = { class: "fm-typo-en-body-md-600 font-semibold" }, aa = /* @__PURE__ */ z({
|
|
307
306
|
__name: "Subcategory",
|
|
308
|
-
setup(
|
|
309
|
-
const w = X(), h =
|
|
307
|
+
setup(D) {
|
|
308
|
+
const w = X(), h = j(), S = P(h), F = K(S), E = ae({ dialog: w, menuLoader: F }), d = V(() => Y().subcategories), { t: l } = R();
|
|
310
309
|
function L() {
|
|
311
310
|
E.create();
|
|
312
311
|
}
|
|
313
312
|
const o = V(() => d.value.length);
|
|
314
|
-
return
|
|
313
|
+
return ye().resetOnMount(), ($, u) => (p(), U(ue, {
|
|
315
314
|
heading: n(l)("menu.subcategory.title")
|
|
316
315
|
}, {
|
|
317
|
-
default:
|
|
318
|
-
d.value.length > 0 ? (p(), U(
|
|
316
|
+
default: b(() => [
|
|
317
|
+
d.value.length > 0 ? (p(), U(Oe, { key: 0 })) : (p(), U(n(ce), {
|
|
319
318
|
key: 1,
|
|
320
319
|
action: {
|
|
321
320
|
text: n(l)("menu.subcategory.add"),
|
|
@@ -325,11 +324,11 @@ const ye = {
|
|
|
325
324
|
title: n(l)("menu.subcategory.empty.title")
|
|
326
325
|
}, null, 8, ["action", "subtitle", "title"]))
|
|
327
326
|
]),
|
|
328
|
-
"append-heading":
|
|
329
|
-
c("div",
|
|
330
|
-
c("div",
|
|
327
|
+
"append-heading": b(() => [
|
|
328
|
+
c("div", Ue, [
|
|
329
|
+
c("div", De, [
|
|
331
330
|
c("div", Be, [
|
|
332
|
-
c("p",
|
|
331
|
+
c("p", Ae, T(o.value), 1)
|
|
333
332
|
])
|
|
334
333
|
]),
|
|
335
334
|
d.value.length > 0 ? (p(), U(re, {
|
|
@@ -345,5 +344,5 @@ const ye = {
|
|
|
345
344
|
}
|
|
346
345
|
});
|
|
347
346
|
export {
|
|
348
|
-
|
|
347
|
+
aa as default
|
|
349
348
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
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 {
|
|
2
|
+
import { G as x, u as v, Q as w, M as E, A as M } from "./index.vue_vue_type_script_setup_true_lang-CJO2XWIn.js";
|
|
3
3
|
import { useI18n as T } from "@feedmepos/mf-common";
|
|
4
4
|
import { useSnackbar as V } from "@feedmepos/ui-library";
|
|
5
5
|
import { _ as h } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
6
6
|
import { _ as C } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
7
|
-
import { _ as N } from "./Takeaway.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { T as
|
|
9
|
-
import { a as
|
|
10
|
-
const
|
|
7
|
+
import { _ as N } from "./Takeaway.vue_vue_type_script_setup_true_lang-Ca3qK9zO.js";
|
|
8
|
+
import { T as S, l as L } from "./index-BQ95VVc6.js";
|
|
9
|
+
import { a as O } from "./menu-Csu9X1_I.js";
|
|
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({
|
|
11
11
|
__name: "Takeaway",
|
|
12
|
-
setup(
|
|
12
|
+
setup(D) {
|
|
13
13
|
const u = V(), l = x(u), p = v(), c = w(l), _ = y(() => p.rules.item.bindToVariant), n = k(0), { t: r } = T();
|
|
14
|
-
return
|
|
14
|
+
return O().resetOnMount(), (I, o) => (d(), i(C, {
|
|
15
15
|
heading: a(r)("menu.takeaway.title")
|
|
16
16
|
}, {
|
|
17
17
|
default: s(() => [
|
|
@@ -20,14 +20,14 @@ const L = { class: "flex-1 flex justify-between gap-8 pl-8" }, U = { class: "fle
|
|
|
20
20
|
})
|
|
21
21
|
]),
|
|
22
22
|
"append-heading": s(() => [
|
|
23
|
-
t("div",
|
|
24
|
-
t("div",
|
|
23
|
+
t("div", U, [
|
|
24
|
+
t("div", B, [
|
|
25
25
|
t("div", F, [
|
|
26
|
-
t("p",
|
|
26
|
+
t("p", A, b(n.value), 1)
|
|
27
27
|
])
|
|
28
28
|
]),
|
|
29
29
|
t("div", null, [
|
|
30
|
-
n.value > 0 ? (d(), i(a(
|
|
30
|
+
n.value > 0 ? (d(), i(a(S), {
|
|
31
31
|
key: 0,
|
|
32
32
|
"bind-to-variant": _.value,
|
|
33
33
|
action: "add",
|
|
@@ -37,7 +37,7 @@ const L = { class: "flex-1 flex justify-between gap-8 pl-8" }, U = { class: "fle
|
|
|
37
37
|
module: a(M.F_MENU_MODULE_V4_KEY).enum.takeaway,
|
|
38
38
|
operation: a(E.F_OPERATION_TYPE).create,
|
|
39
39
|
data: e,
|
|
40
|
-
link: a(
|
|
40
|
+
link: a(L)(e.usedBy || [])
|
|
41
41
|
},
|
|
42
42
|
e.name
|
|
43
43
|
))
|
|
@@ -60,5 +60,5 @@ const L = { class: "flex-1 flex justify-between gap-8 pl-8" }, U = { class: "fle
|
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
62
|
export {
|
|
63
|
-
|
|
63
|
+
z as default
|
|
64
64
|
};
|