@feedmepos/mf-menu 0.32.14 → 0.32.16
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-BFBPwGfb.js → App-Cp6hAf4r.js} +7 -7
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-BDPEBgIX.js → ApplyProduct.vue_vue_type_script_setup_true_lang-Bq8Ai6ir.js} +20 -20
- package/dist/{Catalog-CEUlUbTo.js → Catalog-DZlT5Kv0.js} +20 -20
- package/dist/{Category-GK_sF5cc.js → Category-CgRn_W4_.js} +24 -24
- package/dist/{Category-oxm_RKMU.js → Category-DrZWC1TQ.js} +84 -84
- package/dist/{CookingGuide-BIqPXo2F.js → CookingGuide-DkXKDRwI.js} +65 -65
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-_LjfOdmQ.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-BLpFpC3r.js} +1 -1
- package/dist/{Group-G3Zm4zVj.js → Group-CoNa29qN.js} +1 -1
- package/dist/{Group-bW-m1xOv.js → Group-jthvxhWq.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-DN7BsgdL.js → Group.vue_vue_type_script_setup_true_lang-edBI3IhG.js} +27 -27
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BBcZxmMz.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Bpu5NPdL.js} +5 -5
- package/dist/ImportProductDialog.vue_vue_type_script_setup_true_lang-CFoEsqQW.js +72979 -0
- package/dist/{Ingredient-D0S3lRbC.js → Ingredient-87kh0Zeg.js} +26 -26
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-BYAInJ7N.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DA12Hppy.js} +1052 -1052
- package/dist/{LinkProductSideSheet-DduICm_3.js → LinkProductSideSheet-q_E0OxBI.js} +3 -3
- package/dist/{MenuSetting-Ddpakood.js → MenuSetting-DrSVmJrv.js} +5 -5
- package/dist/{PrintRoute-CxDRBk-Z.js → PrintRoute-Ag3VVqG5.js} +20 -20
- package/dist/{Product-DAwEX6dW.js → Product-M4UF0g_r.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-BH7BRpJ2.js → Product.vue_vue_type_script_setup_true_lang-BuXgUwkf.js} +49 -49
- package/dist/{ProductInternalTools--i0xQb6O.js → ProductInternalTools-COwLVN9M.js} +20 -20
- package/dist/Products-1nOux6aQ.js +292 -0
- package/dist/Publish-DND24UOM.js +1300 -0
- package/dist/{Recipe-DIfPG7dG.js → Recipe-BahCl2QF.js} +9 -9
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-DiutI4rb.js → RuleView.vue_vue_type_script_setup_true_lang-DxCclyLW.js} +134 -134
- package/dist/{Scheduler-D-qRoZEk.js → Scheduler-CxW9mXnC.js} +7 -7
- package/dist/{ServingSequence-DdGQTO5m.js → ServingSequence-DBtmKTWP.js} +27 -27
- package/dist/{Setting-Cy3lcj6b.js → Setting-D2CdAkIV.js} +17 -17
- package/dist/{Subcategory-bX7uTJKn.js → Subcategory-B4TkrH7w.js} +37 -37
- package/dist/{Takeaway-Dt4W1Tmn.js → Takeaway-BReaJjqu.js} +1 -1
- package/dist/{Takeaway-DoTobUpw.js → Takeaway-R8sKp9dk.js} +9 -9
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-Ccqd0SSb.js → Takeaway.vue_vue_type_script_setup_true_lang-DPphTwY2.js} +54 -54
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-Bxd5sGBt.js → Thumbnail.vue_vue_type_script_setup_true_lang-CA-t0MP_.js} +12 -12
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BTny5xEr.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DVJGepyS.js} +15 -14
- package/dist/{Unit-li0qBwz-.js → Unit-DaupB3J7.js} +2 -2
- package/dist/{Variant-CGcJ_TZj.js → Variant-CesYb5do.js} +14 -14
- package/dist/{_id_-BWdsDm62.js → _id_-CN8RH43s.js} +14 -14
- package/dist/{app-M9IH0JfT.js → app-d97Ud4fA.js} +26 -26
- package/dist/{app-4fAuR8EW.js → app-s52udDOz.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/helper/import-export-utils.d.ts +22 -22
- package/dist/apps/mf-menu/src/helper/menuExport.d.ts +59 -33
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-3-xHTXMe.js → linked-status-KQPs_XUH.js} +2 -2
- package/dist/assets/menu-export-KHAdCiC5.js +107 -0
- package/dist/assets/{override-menu-9sR4Y3Xg.js → override-menu-CsUVrV3Q.js} +2 -2
- package/dist/assets/{validate-menu-BmHir2_T.js → validate-menu-BEJZow8d.js} +2 -2
- package/dist/{catalog-DFja-c1u.js → catalog-9_jtmYlm.js} +1 -1
- package/dist/{catalogSetting-CcpYLKqf.js → catalogSetting-Btjwav-1.js} +1 -1
- package/dist/{category-DpZwNc4t.js → category-DRwNEBe8.js} +1 -1
- package/dist/{currency-BAE6MewY.js → currency-Do-UYAXP.js} +1 -1
- package/dist/dayjs.min-BaRcKvRp.js +6 -0
- package/dist/{index-CKinAgXM.js → index-BFWW3J1P.js} +1 -1
- package/dist/{index-vusQqUrf.js → index-CuCfLbb2.js} +17 -17
- package/dist/{index-CVzNrW67.js → index-D1GAORV_.js} +4 -4
- package/dist/{index.vue_vue_type_script_setup_true_lang-BdR9Cau8.js → index.vue_vue_type_script_setup_true_lang-_DMs_swc.js} +2439 -2439
- package/dist/{item-CwwbAMhc.js → item-Ge1k1cYH.js} +245 -244
- package/dist/{jszip.min-DYs79nMN.js → jszip.min-BSs0LVJA.js} +2 -2
- package/dist/{menu-BaIAvmpZ.js → menu-DL-wM6sR.js} +1 -1
- package/dist/{menuV2-B2fEnjKF.js → menuV2-DMWng1KE.js} +55 -55
- package/dist/{priceTier-BSQ1vmHy.js → priceTier-BHOMDhXP.js} +1 -1
- package/dist/{scheduler-C7lp1B_N.js → scheduler-B_ztjqQh.js} +4 -4
- package/dist/{subcategory-DUGbyIKt.js → subcategory-53vsxcNn.js} +2 -2
- package/dist/{toExcel-CnvNPzQj.js → toExcel-B5cp0vaL.js} +2 -2
- package/dist/{unit-gzTDfacM.js → unit-VmVDMUZb.js} +12 -12
- package/package.json +3 -3
- package/dist/ImportProductDialog.vue_vue_type_script_setup_true_lang-BpYIAC6_.js +0 -96043
- package/dist/Products-DHP2P67R.js +0 -794
- package/dist/Publish-BwI7NOud.js +0 -1264
- package/dist/dayjs.min-Bbp8wB12.js +0 -6
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as K, ref as F, computed as B, watch as se, resolveComponent as p, createElementBlock as E, openBlock as f, Fragment as X, renderSlot as re, createVNode as d, unref as e, withCtx as g, createElementVNode as n, toDisplayString as T, h as N, withModifiers as D, getCurrentInstance as ie, renderList as ce, createBlock as L, createCommentVNode as ue } from "vue";
|
|
2
2
|
import { useI18n as j } from "@feedmepos/mf-common";
|
|
3
|
-
import { useSnackbar as Y, components as R, useDialog as ee, FmButtonVariant as
|
|
3
|
+
import { useSnackbar as Y, components as R, useDialog as ee, FmButtonVariant as Z, useBreakpoints as de, FmButtonColorThemeVariant as me } from "@feedmepos/ui-library";
|
|
4
4
|
import { _ as pe } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
5
|
-
import { G, u as ge,
|
|
5
|
+
import { G, u as ge, a0 as fe, Z as _e, A, a3 as ye, Q as q, M as te, a4 as ve } from "./index.vue_vue_type_script_setup_true_lang-_DMs_swc.js";
|
|
6
6
|
import { _ as he } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
7
|
-
import { _ as be } from "./app-
|
|
7
|
+
import { _ as be } from "./app-d97Ud4fA.js";
|
|
8
8
|
import { c as xe } from "./createForm-BoUQeZTd.js";
|
|
9
|
-
import { _ as
|
|
9
|
+
import { _ as H } from "./RuleView.vue_vue_type_script_setup_true_lang-DxCclyLW.js";
|
|
10
10
|
import { u as Ce } from "./discardConfirm-BHni0LNu.js";
|
|
11
|
-
import { c as
|
|
11
|
+
import { c as J } from "./object-DVUNCr7w.js";
|
|
12
12
|
import { r as ke } from "./rules-CIWTZQfh.js";
|
|
13
|
-
import { u as
|
|
13
|
+
import { u as Q, a as we } from "./menu-DL-wM6sR.js";
|
|
14
14
|
import { c as Fe } from "./check-C9mY6LiX.js";
|
|
15
|
-
import { u as Ve } from "./item-
|
|
16
|
-
import { u as
|
|
15
|
+
import { u as Ve } from "./item-Ge1k1cYH.js";
|
|
16
|
+
import { u as ae } from "./category-DRwNEBe8.js";
|
|
17
17
|
const $e = {
|
|
18
18
|
class: "fm-typo-en-title-md-600"
|
|
19
19
|
}, Me = {
|
|
@@ -26,27 +26,27 @@ const $e = {
|
|
|
26
26
|
class: "flex-1"
|
|
27
27
|
}, Te = {
|
|
28
28
|
class: "flex-1 overflow-hidden min-h-[300px]"
|
|
29
|
-
},
|
|
29
|
+
}, Ue = {
|
|
30
30
|
class: "flex gap-8 items-center justify-start"
|
|
31
|
-
},
|
|
31
|
+
}, Le = /* @__PURE__ */ K({
|
|
32
32
|
__name: "Form",
|
|
33
33
|
props: {
|
|
34
34
|
initialValue: {}
|
|
35
35
|
},
|
|
36
|
-
setup(
|
|
36
|
+
setup(O, {
|
|
37
37
|
expose: h
|
|
38
38
|
}) {
|
|
39
|
-
const _ =
|
|
39
|
+
const _ = O, V = Y(), b = G(V), $ = q(b), m = ge(), r = Ve(), {
|
|
40
40
|
categories: x
|
|
41
|
-
} =
|
|
41
|
+
} = Q(), {
|
|
42
42
|
t
|
|
43
|
-
} = j(),
|
|
44
|
-
Fe.isBoolean(
|
|
45
|
-
}, i = F(
|
|
43
|
+
} = j(), U = F(!1), u = F(!1), M = (a) => {
|
|
44
|
+
Fe.isBoolean(a) ? u.value = a : u.value = !u.value;
|
|
45
|
+
}, i = F(J(_.initialValue)), C = F(""), S = B(() => {
|
|
46
46
|
var k;
|
|
47
|
-
const
|
|
48
|
-
return _e(
|
|
49
|
-
}),
|
|
47
|
+
const a = ((k = x.value.find((w) => w.id === i.value.id)) == null ? void 0 : k.items) || [], o = fe(i.value.id);
|
|
48
|
+
return _e(a, (w) => w.code || w.name, o);
|
|
49
|
+
}), P = [{
|
|
50
50
|
accessorKey: "name",
|
|
51
51
|
header: () => t("menu.category.products.columns.name"),
|
|
52
52
|
enableSorting: !1
|
|
@@ -62,17 +62,17 @@ const $e = {
|
|
|
62
62
|
headerContentClass: "-mx-16"
|
|
63
63
|
},
|
|
64
64
|
header: "",
|
|
65
|
-
cell: (
|
|
66
|
-
const
|
|
67
|
-
return
|
|
65
|
+
cell: (a) => {
|
|
66
|
+
const o = a.row.original;
|
|
67
|
+
return N("div", {
|
|
68
68
|
class: "flex justify-end"
|
|
69
|
-
}, [
|
|
69
|
+
}, [N(R.FmButton, {
|
|
70
70
|
icon: "edit",
|
|
71
71
|
outline: !0,
|
|
72
72
|
variant: "tertiary",
|
|
73
73
|
textColor: "neutral-gray-400",
|
|
74
74
|
onClick: D(async () => {
|
|
75
|
-
await s(
|
|
75
|
+
await s(o);
|
|
76
76
|
}, ["stop", "prevent"])
|
|
77
77
|
})]);
|
|
78
78
|
}
|
|
@@ -80,43 +80,43 @@ const $e = {
|
|
|
80
80
|
async function l() {
|
|
81
81
|
await r.create(i.value.id);
|
|
82
82
|
}
|
|
83
|
-
async function s(
|
|
84
|
-
await r.update(
|
|
83
|
+
async function s(a) {
|
|
84
|
+
await r.update(a._id);
|
|
85
85
|
}
|
|
86
|
-
const y = B(() => m.version ===
|
|
87
|
-
async function I(
|
|
88
|
-
const
|
|
89
|
-
await r.updateMany(
|
|
86
|
+
const y = B(() => m.version === A.F_MENU_VERSION.enum.v4);
|
|
87
|
+
async function I(a) {
|
|
88
|
+
const o = ye(a, i.value.id);
|
|
89
|
+
await r.updateMany(o);
|
|
90
90
|
}
|
|
91
91
|
const z = Ce(() => i.value.name !== _.initialValue.name, () => {
|
|
92
92
|
u.value = !1;
|
|
93
93
|
});
|
|
94
94
|
async function c() {
|
|
95
|
-
const
|
|
96
|
-
updateMenu:
|
|
95
|
+
const a = m.categories.find((k) => k._id === i.value.id), {
|
|
96
|
+
updateMenu: o
|
|
97
97
|
} = $;
|
|
98
|
-
await
|
|
99
|
-
module:
|
|
98
|
+
await o({
|
|
99
|
+
module: A.F_MENU_MODULE_V4_KEY.enum.category,
|
|
100
100
|
operation: te.F_OPERATION_TYPE.update,
|
|
101
101
|
data: {
|
|
102
|
-
...
|
|
103
|
-
name: i.value.name ?? (
|
|
102
|
+
...a,
|
|
103
|
+
name: i.value.name ?? (a == null ? void 0 : a.name)
|
|
104
104
|
}
|
|
105
105
|
}, i.value.name), M(!1);
|
|
106
106
|
}
|
|
107
107
|
return se(() => u.value, () => {
|
|
108
|
-
u.value && (i.value =
|
|
108
|
+
u.value && (i.value = J(_.initialValue));
|
|
109
109
|
}), h({
|
|
110
110
|
trigger: M,
|
|
111
111
|
show: u
|
|
112
|
-
}), (
|
|
113
|
-
const k = p("FmTextField"), w = p("FmButton"),
|
|
114
|
-
return f(), E(
|
|
112
|
+
}), (a, o) => {
|
|
113
|
+
const k = p("FmTextField"), w = p("FmButton"), oe = p("FmSearch"), ne = p("FmTable"), W = p("fm-button"), le = p("fm-side-sheet");
|
|
114
|
+
return f(), E(X, null, [re(a.$slots, "default", {
|
|
115
115
|
trigger: M
|
|
116
116
|
}), d(le, {
|
|
117
117
|
id: "group-form",
|
|
118
118
|
modelValue: u.value,
|
|
119
|
-
"onUpdate:modelValue":
|
|
119
|
+
"onUpdate:modelValue": o[4] || (o[4] = (v) => u.value = v),
|
|
120
120
|
"is-container": e(R).FmForm,
|
|
121
121
|
"is-container-props": {
|
|
122
122
|
onValidationSuccess: c,
|
|
@@ -126,31 +126,31 @@ const $e = {
|
|
|
126
126
|
"onOn:clickedAway": e(z)
|
|
127
127
|
}, {
|
|
128
128
|
"side-sheet-header": g(() => [n("p", $e, T(e(t)("menu.category.title")), 1)]),
|
|
129
|
-
"side-sheet-footer": g(() => [n("div",
|
|
129
|
+
"side-sheet-footer": g(() => [n("div", Ue, [d(W, {
|
|
130
130
|
label: e(t)("menu.common.actions.update"),
|
|
131
|
-
loading:
|
|
131
|
+
loading: U.value,
|
|
132
132
|
size: "lg",
|
|
133
133
|
type: "submit",
|
|
134
134
|
variant: "primary",
|
|
135
135
|
disabled: !i.value.id
|
|
136
|
-
}, null, 8, ["label", "loading", "disabled"]), d(
|
|
136
|
+
}, null, 8, ["label", "loading", "disabled"]), d(W, {
|
|
137
137
|
label: e(t)("menu.common.actions.cancel"),
|
|
138
138
|
size: "lg",
|
|
139
139
|
variant: "tertiary",
|
|
140
|
-
onClick:
|
|
140
|
+
onClick: o[3] || (o[3] = () => u.value = !1)
|
|
141
141
|
}, null, 8, ["label"])])]),
|
|
142
|
-
default: g(() => [n("div", Me, [d(
|
|
142
|
+
default: g(() => [n("div", Me, [d(H, {
|
|
143
143
|
title: e(t)("menu.category.detail")
|
|
144
144
|
}, {
|
|
145
145
|
default: g(() => [d(k, {
|
|
146
146
|
label: e(t)("menu.category.name"),
|
|
147
147
|
modelValue: i.value.name,
|
|
148
|
-
"onUpdate:modelValue":
|
|
148
|
+
"onUpdate:modelValue": o[0] || (o[0] = (v) => i.value.name = v),
|
|
149
149
|
disabled: !i.value.id,
|
|
150
150
|
rules: [e(ke)]
|
|
151
151
|
}, null, 8, ["label", "modelValue", "disabled", "rules"])]),
|
|
152
152
|
_: 1
|
|
153
|
-
}, 8, ["title"]), d(
|
|
153
|
+
}, 8, ["title"]), d(H, {
|
|
154
154
|
title: e(t)("menu.category.products.title"),
|
|
155
155
|
class: "flex-1 min-h-0",
|
|
156
156
|
shrinkable: !0
|
|
@@ -165,12 +165,12 @@ const $e = {
|
|
|
165
165
|
}, null, 8, ["label"])]),
|
|
166
166
|
default: g(() => [n("div", Se, [n("div", Ee, T(e(t)("menu.category.products.linked_count", {
|
|
167
167
|
count: S.value.length
|
|
168
|
-
})), 1), n("div", Be, [d(
|
|
168
|
+
})), 1), n("div", Be, [d(oe, {
|
|
169
169
|
placeholder: e(t)("menu.common.actions.search"),
|
|
170
170
|
modelValue: C.value,
|
|
171
|
-
"onUpdate:modelValue":
|
|
171
|
+
"onUpdate:modelValue": o[1] || (o[1] = (v) => C.value = v)
|
|
172
172
|
}, null, 8, ["placeholder", "modelValue"])])]), n("div", Te, [d(ne, {
|
|
173
|
-
"column-defs":
|
|
173
|
+
"column-defs": P,
|
|
174
174
|
draggable: y.value,
|
|
175
175
|
"page-size": S.value.length,
|
|
176
176
|
"row-data": S.value,
|
|
@@ -179,7 +179,7 @@ const $e = {
|
|
|
179
179
|
"hide-footer": "",
|
|
180
180
|
"pin-header-row": "",
|
|
181
181
|
onDndChanged: I,
|
|
182
|
-
onRowClick:
|
|
182
|
+
onRowClick: o[2] || (o[2] = (v) => s(v.original))
|
|
183
183
|
}, null, 8, ["draggable", "page-size", "row-data", "search-value"])])]),
|
|
184
184
|
_: 1
|
|
185
185
|
}, 8, ["title"])])]),
|
|
@@ -187,9 +187,9 @@ const $e = {
|
|
|
187
187
|
}, 8, ["modelValue", "is-container", "is-container-props", "onOn:clickedAway"])], 64);
|
|
188
188
|
};
|
|
189
189
|
}
|
|
190
|
-
}),
|
|
190
|
+
}), Ne = Le, Oe = {
|
|
191
191
|
key: 0
|
|
192
|
-
},
|
|
192
|
+
}, Pe = {
|
|
193
193
|
class: "flex justify-end items-center"
|
|
194
194
|
}, Ie = {
|
|
195
195
|
class: "w-[320px]"
|
|
@@ -200,23 +200,23 @@ const $e = {
|
|
|
200
200
|
class: "p-8"
|
|
201
201
|
}, Re = {
|
|
202
202
|
class: "flex flex-1 flex-col min-h-0 overflow-scroll divide-y divide-fm-color-neutral-gray-100 pb-64"
|
|
203
|
-
},
|
|
203
|
+
}, Ae = ["onClick"], Ke = {
|
|
204
204
|
class: "flex-1 space-y-4"
|
|
205
205
|
}, je = {
|
|
206
206
|
class: "fm-typo-en-body-lg-600"
|
|
207
207
|
}, Ye = {
|
|
208
208
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
209
|
-
}, Ge = /* @__PURE__ */
|
|
209
|
+
}, Ge = /* @__PURE__ */ K({
|
|
210
210
|
__name: "CategoryTable",
|
|
211
|
-
setup(
|
|
212
|
-
const h = ee(), _ = Y(), V = G(_), b = q(V), $ =
|
|
211
|
+
setup(O) {
|
|
212
|
+
const h = ee(), _ = Y(), V = G(_), b = q(V), $ = ae({
|
|
213
213
|
dialog: h,
|
|
214
214
|
menuLoader: b
|
|
215
215
|
}), {
|
|
216
216
|
categories: m
|
|
217
|
-
} =
|
|
217
|
+
} = Q(), r = F(""), x = B(() => m.value.filter((l) => l.name.toLowerCase().includes(r.value.toLowerCase()))), {
|
|
218
218
|
t
|
|
219
|
-
} = j(),
|
|
219
|
+
} = j(), U = F([{
|
|
220
220
|
accessorKey: "name",
|
|
221
221
|
header: () => t("menu.category.columns.title"),
|
|
222
222
|
enableSorting: !1,
|
|
@@ -244,9 +244,9 @@ const $e = {
|
|
|
244
244
|
header: "",
|
|
245
245
|
cell: (l) => {
|
|
246
246
|
const s = l.row.original;
|
|
247
|
-
return
|
|
247
|
+
return N("div", {
|
|
248
248
|
class: "flex justify-end"
|
|
249
|
-
}, [
|
|
249
|
+
}, [N(R.FmButton, {
|
|
250
250
|
icon: "delete",
|
|
251
251
|
disabled: !s.id,
|
|
252
252
|
variant: "tertiary",
|
|
@@ -273,7 +273,7 @@ const $e = {
|
|
|
273
273
|
primaryActions: {
|
|
274
274
|
text: "Remove",
|
|
275
275
|
close: !0,
|
|
276
|
-
variant:
|
|
276
|
+
variant: Z.Destructive
|
|
277
277
|
},
|
|
278
278
|
secondaryActions: {
|
|
279
279
|
text: "Cancel",
|
|
@@ -281,7 +281,7 @@ const $e = {
|
|
|
281
281
|
}
|
|
282
282
|
}).onPrimary(async () => {
|
|
283
283
|
await b.updateMenu({
|
|
284
|
-
module:
|
|
284
|
+
module: A.F_MENU_MODULE_V4_KEY.enum.category,
|
|
285
285
|
operation: te.F_OPERATION_TYPE.delete,
|
|
286
286
|
// `category.id` is guaranteed to be defined due to the earlier check in `deleteCategory`.
|
|
287
287
|
data: l.id
|
|
@@ -294,14 +294,14 @@ const $e = {
|
|
|
294
294
|
}
|
|
295
295
|
const i = ie();
|
|
296
296
|
async function C(l) {
|
|
297
|
-
xe(i,
|
|
297
|
+
xe(i, Ne, {
|
|
298
298
|
initialValue: l
|
|
299
299
|
});
|
|
300
300
|
}
|
|
301
|
-
const S = de(),
|
|
301
|
+
const S = de(), P = B(() => S.breakpoints.value.xs);
|
|
302
302
|
return (l, s) => {
|
|
303
303
|
const y = p("FmSearch"), I = p("FmTable"), z = p("FmButton");
|
|
304
|
-
return
|
|
304
|
+
return P.value ? (f(), E("div", ze, [n("div", De, [d(y, {
|
|
305
305
|
autofocus: "",
|
|
306
306
|
modelValue: r.value,
|
|
307
307
|
"onUpdate:modelValue": s[2] || (s[2] = (c) => r.value = c),
|
|
@@ -309,19 +309,19 @@ const $e = {
|
|
|
309
309
|
placeholder: e(t)("menu.common.labels.search_placeholder", {
|
|
310
310
|
type: "categories"
|
|
311
311
|
})
|
|
312
|
-
}, null, 8, ["modelValue", "placeholder"])]), n("div", Re, [(f(!0), E(
|
|
312
|
+
}, null, 8, ["modelValue", "placeholder"])]), n("div", Re, [(f(!0), E(X, null, ce(x.value, (c) => (f(), E("div", {
|
|
313
313
|
key: c.id || "",
|
|
314
314
|
class: "flex flex-row py-12 px-16",
|
|
315
|
-
onClick: (
|
|
316
|
-
}, [n("div",
|
|
315
|
+
onClick: (a) => C(c)
|
|
316
|
+
}, [n("div", Ke, [n("p", je, T(c.name), 1), n("p", Ye, T(e(t)(c.items.length > 1 ? "menu.common.labels.product_linked_plural" : "menu.common.labels.product_linked_singular", {
|
|
317
317
|
count: c.items.length
|
|
318
318
|
})), 1)]), d(z, {
|
|
319
319
|
"text-color": e(me).NeutralGray400,
|
|
320
|
-
variant: e(
|
|
320
|
+
variant: e(Z).Tertiary,
|
|
321
321
|
"prepend-icon": "delete",
|
|
322
322
|
disabled: !c.id,
|
|
323
|
-
onClick: D((
|
|
324
|
-
}, null, 8, ["text-color", "variant", "disabled", "onClick"])], 8,
|
|
323
|
+
onClick: D((a) => u(c), ["stop"])
|
|
324
|
+
}, null, 8, ["text-color", "variant", "disabled", "onClick"])], 8, Ae))), 128))])])) : (f(), E("div", Oe, [n("div", Pe, [n("div", Ie, [d(y, {
|
|
325
325
|
modelValue: r.value,
|
|
326
326
|
"onUpdate:modelValue": s[0] || (s[0] = (c) => r.value = c),
|
|
327
327
|
autofocus: "",
|
|
@@ -331,7 +331,7 @@ const $e = {
|
|
|
331
331
|
})
|
|
332
332
|
}, null, 8, ["modelValue", "placeholder"])])]), d(be, null, {
|
|
333
333
|
default: g(() => [d(I, {
|
|
334
|
-
"column-defs":
|
|
334
|
+
"column-defs": U.value,
|
|
335
335
|
draggable: !0,
|
|
336
336
|
"page-size": e(m).length,
|
|
337
337
|
"row-data": e(m),
|
|
@@ -346,19 +346,19 @@ const $e = {
|
|
|
346
346
|
})]));
|
|
347
347
|
};
|
|
348
348
|
}
|
|
349
|
-
}), qe = { class: "flex-1 flex justify-between gap-8 pl-8" },
|
|
349
|
+
}), qe = { class: "flex-1 flex justify-between gap-8 pl-8" }, Qe = { class: "flex items-center" }, We = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Ze = { class: "fm-typo-en-body-md-600 font-semibold" }, pt = /* @__PURE__ */ K({
|
|
350
350
|
__name: "Category",
|
|
351
|
-
setup(
|
|
352
|
-
const h = ee(), _ = Y(), V = G(_), b = q(V), $ =
|
|
351
|
+
setup(O) {
|
|
352
|
+
const h = ee(), _ = Y(), V = G(_), b = q(V), $ = ae({ dialog: h, menuLoader: b }), { categories: m } = Q(), { t: r } = j();
|
|
353
353
|
function x() {
|
|
354
354
|
$.create();
|
|
355
355
|
}
|
|
356
356
|
const t = B(() => m.value.length);
|
|
357
|
-
return we().resetOnMount(), (
|
|
357
|
+
return we().resetOnMount(), (U, u) => (f(), L(he, {
|
|
358
358
|
heading: e(r)("menu.category.title")
|
|
359
359
|
}, {
|
|
360
360
|
default: g(() => [
|
|
361
|
-
e(m).length > 0 ? (f(),
|
|
361
|
+
e(m).length > 0 ? (f(), L(Ge, { key: 0 })) : (f(), L(e(ve), {
|
|
362
362
|
key: 1,
|
|
363
363
|
action: {
|
|
364
364
|
text: e(r)("menu.category.add"),
|
|
@@ -370,12 +370,12 @@ const $e = {
|
|
|
370
370
|
]),
|
|
371
371
|
"append-heading": g(() => [
|
|
372
372
|
n("div", qe, [
|
|
373
|
-
n("div",
|
|
374
|
-
n("div",
|
|
375
|
-
n("p",
|
|
373
|
+
n("div", Qe, [
|
|
374
|
+
n("div", We, [
|
|
375
|
+
n("p", Ze, T(t.value), 1)
|
|
376
376
|
])
|
|
377
377
|
]),
|
|
378
|
-
e(m).length > 0 ? (f(),
|
|
378
|
+
e(m).length > 0 ? (f(), L(pe, {
|
|
379
379
|
key: 0,
|
|
380
380
|
label: e(r)("menu.category.add"),
|
|
381
381
|
"prepend-icon": "add",
|