@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,19 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as A, ref as F, computed as B, watch as se, resolveComponent as p, createElementBlock as E, openBlock as _, Fragment as Z, renderSlot as re, createVNode as u, unref as e, withCtx as g, createElementVNode as n, toDisplayString as T, h as L, withModifiers as z, getCurrentInstance as ie, renderList as ce, createBlock as I, createCommentVNode as de } 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 J, useBreakpoints as ue, 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,
|
|
6
|
-
import { _ as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { c as
|
|
9
|
-
import {
|
|
10
|
-
import { u as
|
|
11
|
-
import { c as J } from "./object-DVUNCr7w.js";
|
|
12
|
-
import { r as ke } from "./rules-CIWTZQfh.js";
|
|
13
|
-
import { u as Q, a as we } from "./menu-Cd4NbFVq.js";
|
|
14
|
-
import { c as Fe } from "./check-C9mY6LiX.js";
|
|
15
|
-
import { u as Ve } from "./item-K01xd1Z0.js";
|
|
16
|
-
import { u as ae } from "./category-CuG3DsGL.js";
|
|
5
|
+
import { a as G, u as ge, k as _e, C as Q, D as fe, E as ye, e as K, F as ve, G as X, b as he, H as be, d as q, m as te, I as ae, _ as xe } from "./App-Cfl37TTw.js";
|
|
6
|
+
import { _ as Ce } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
7
|
+
import { _ as ke } from "./app-Z0KWH9-d.js";
|
|
8
|
+
import { c as we } from "./createForm-BoUQeZTd.js";
|
|
9
|
+
import { r as Fe } from "./rules-CIWTZQfh.js";
|
|
10
|
+
import { u as H, a as Ve } from "./menu-Brxar171.js";
|
|
17
11
|
const $e = {
|
|
18
12
|
class: "fm-typo-en-title-md-600"
|
|
19
13
|
}, Me = {
|
|
@@ -28,25 +22,25 @@ const $e = {
|
|
|
28
22
|
class: "flex-1 overflow-hidden min-h-[300px]"
|
|
29
23
|
}, Ue = {
|
|
30
24
|
class: "flex gap-8 items-center justify-start"
|
|
31
|
-
},
|
|
25
|
+
}, Ie = /* @__PURE__ */ A({
|
|
32
26
|
__name: "Form",
|
|
33
27
|
props: {
|
|
34
28
|
initialValue: {}
|
|
35
29
|
},
|
|
36
|
-
setup(
|
|
30
|
+
setup(N, {
|
|
37
31
|
expose: h
|
|
38
32
|
}) {
|
|
39
|
-
const
|
|
33
|
+
const f = N, V = Y(), b = G(V), $ = q(b), m = ge(), r = _e(), {
|
|
40
34
|
categories: x
|
|
41
|
-
} =
|
|
35
|
+
} = H(), {
|
|
42
36
|
t
|
|
43
|
-
} = j(), U = F(!1),
|
|
44
|
-
|
|
45
|
-
}, i = F(
|
|
37
|
+
} = j(), U = F(!1), d = F(!1), M = (a) => {
|
|
38
|
+
he.isBoolean(a) ? d.value = a : d.value = !d.value;
|
|
39
|
+
}, i = F(Q(f.initialValue)), C = F(""), S = B(() => {
|
|
46
40
|
var k;
|
|
47
41
|
const a = ((k = x.value.find((w) => w.id === i.value.id)) == null ? void 0 : k.items) || [], o = fe(i.value.id);
|
|
48
|
-
return
|
|
49
|
-
}),
|
|
42
|
+
return ye(a, (w) => w.code || w.name, o);
|
|
43
|
+
}), O = [{
|
|
50
44
|
accessorKey: "name",
|
|
51
45
|
header: () => t("menu.category.products.columns.name"),
|
|
52
46
|
enableSorting: !1
|
|
@@ -64,14 +58,14 @@ const $e = {
|
|
|
64
58
|
header: "",
|
|
65
59
|
cell: (a) => {
|
|
66
60
|
const o = a.row.original;
|
|
67
|
-
return
|
|
61
|
+
return L("div", {
|
|
68
62
|
class: "flex justify-end"
|
|
69
|
-
}, [
|
|
63
|
+
}, [L(R.FmButton, {
|
|
70
64
|
icon: "edit",
|
|
71
65
|
outline: !0,
|
|
72
66
|
variant: "tertiary",
|
|
73
67
|
textColor: "neutral-gray-400",
|
|
74
|
-
onClick:
|
|
68
|
+
onClick: z(async () => {
|
|
75
69
|
await s(o);
|
|
76
70
|
}, ["stop", "prevent"])
|
|
77
71
|
})]);
|
|
@@ -83,20 +77,20 @@ const $e = {
|
|
|
83
77
|
async function s(a) {
|
|
84
78
|
await r.update(a._id);
|
|
85
79
|
}
|
|
86
|
-
const y = B(() => m.version ===
|
|
87
|
-
async function
|
|
88
|
-
const o =
|
|
80
|
+
const y = B(() => m.version === K.F_MENU_VERSION.enum.v4);
|
|
81
|
+
async function P(a) {
|
|
82
|
+
const o = be(a, i.value.id);
|
|
89
83
|
await r.updateMany(o);
|
|
90
84
|
}
|
|
91
|
-
const
|
|
92
|
-
|
|
85
|
+
const D = ve(() => i.value.name !== f.initialValue.name, () => {
|
|
86
|
+
d.value = !1;
|
|
93
87
|
});
|
|
94
88
|
async function c() {
|
|
95
89
|
const a = m.categories.find((k) => k._id === i.value.id), {
|
|
96
90
|
updateMenu: o
|
|
97
91
|
} = $;
|
|
98
92
|
await o({
|
|
99
|
-
module:
|
|
93
|
+
module: K.F_MENU_MODULE_V4_KEY.enum.category,
|
|
100
94
|
operation: te.F_OPERATION_TYPE.update,
|
|
101
95
|
data: {
|
|
102
96
|
...a,
|
|
@@ -104,58 +98,58 @@ const $e = {
|
|
|
104
98
|
}
|
|
105
99
|
}, i.value.name), M(!1);
|
|
106
100
|
}
|
|
107
|
-
return se(() =>
|
|
108
|
-
|
|
101
|
+
return se(() => d.value, () => {
|
|
102
|
+
d.value && (i.value = Q(f.initialValue));
|
|
109
103
|
}), h({
|
|
110
104
|
trigger: M,
|
|
111
|
-
show:
|
|
105
|
+
show: d
|
|
112
106
|
}), (a, o) => {
|
|
113
107
|
const k = p("FmTextField"), w = p("FmButton"), oe = p("FmSearch"), ne = p("FmTable"), W = p("fm-button"), le = p("fm-side-sheet");
|
|
114
|
-
return
|
|
108
|
+
return _(), E(Z, null, [re(a.$slots, "default", {
|
|
115
109
|
trigger: M
|
|
116
|
-
}),
|
|
110
|
+
}), u(le, {
|
|
117
111
|
id: "group-form",
|
|
118
|
-
modelValue:
|
|
119
|
-
"onUpdate:modelValue": o[4] || (o[4] = (v) =>
|
|
112
|
+
modelValue: d.value,
|
|
113
|
+
"onUpdate:modelValue": o[4] || (o[4] = (v) => d.value = v),
|
|
120
114
|
"is-container": e(R).FmForm,
|
|
121
115
|
"is-container-props": {
|
|
122
116
|
onValidationSuccess: c,
|
|
123
117
|
blameFormChildOnValidationFailed: !0
|
|
124
118
|
},
|
|
125
119
|
"max-width": 560,
|
|
126
|
-
"onOn:clickedAway": e(
|
|
120
|
+
"onOn:clickedAway": e(D)
|
|
127
121
|
}, {
|
|
128
122
|
"side-sheet-header": g(() => [n("p", $e, T(e(t)("menu.category.title")), 1)]),
|
|
129
|
-
"side-sheet-footer": g(() => [n("div", Ue, [
|
|
123
|
+
"side-sheet-footer": g(() => [n("div", Ue, [u(W, {
|
|
130
124
|
label: e(t)("menu.common.actions.update"),
|
|
131
125
|
loading: U.value,
|
|
132
126
|
size: "lg",
|
|
133
127
|
type: "submit",
|
|
134
128
|
variant: "primary",
|
|
135
129
|
disabled: !i.value.id
|
|
136
|
-
}, null, 8, ["label", "loading", "disabled"]),
|
|
130
|
+
}, null, 8, ["label", "loading", "disabled"]), u(W, {
|
|
137
131
|
label: e(t)("menu.common.actions.cancel"),
|
|
138
132
|
size: "lg",
|
|
139
133
|
variant: "tertiary",
|
|
140
|
-
onClick: o[3] || (o[3] = () =>
|
|
134
|
+
onClick: o[3] || (o[3] = () => d.value = !1)
|
|
141
135
|
}, null, 8, ["label"])])]),
|
|
142
|
-
default: g(() => [n("div", Me, [
|
|
136
|
+
default: g(() => [n("div", Me, [u(X, {
|
|
143
137
|
title: e(t)("menu.category.detail")
|
|
144
138
|
}, {
|
|
145
|
-
default: g(() => [
|
|
139
|
+
default: g(() => [u(k, {
|
|
146
140
|
label: e(t)("menu.category.name"),
|
|
147
141
|
modelValue: i.value.name,
|
|
148
142
|
"onUpdate:modelValue": o[0] || (o[0] = (v) => i.value.name = v),
|
|
149
143
|
disabled: !i.value.id,
|
|
150
|
-
rules: [e(
|
|
144
|
+
rules: [e(Fe)]
|
|
151
145
|
}, null, 8, ["label", "modelValue", "disabled", "rules"])]),
|
|
152
146
|
_: 1
|
|
153
|
-
}, 8, ["title"]),
|
|
147
|
+
}, 8, ["title"]), u(X, {
|
|
154
148
|
title: e(t)("menu.category.products.title"),
|
|
155
149
|
class: "flex-1 min-h-0",
|
|
156
150
|
shrinkable: !0
|
|
157
151
|
}, {
|
|
158
|
-
"append-title": g(() => [
|
|
152
|
+
"append-title": g(() => [u(w, {
|
|
159
153
|
label: e(t)("menu.category.products.add"),
|
|
160
154
|
variant: "secondary",
|
|
161
155
|
"prepend-icon": "add",
|
|
@@ -165,12 +159,12 @@ const $e = {
|
|
|
165
159
|
}, null, 8, ["label"])]),
|
|
166
160
|
default: g(() => [n("div", Se, [n("div", Ee, T(e(t)("menu.category.products.linked_count", {
|
|
167
161
|
count: S.value.length
|
|
168
|
-
})), 1), n("div", Be, [
|
|
162
|
+
})), 1), n("div", Be, [u(oe, {
|
|
169
163
|
placeholder: e(t)("menu.common.actions.search"),
|
|
170
164
|
modelValue: C.value,
|
|
171
165
|
"onUpdate:modelValue": o[1] || (o[1] = (v) => C.value = v)
|
|
172
|
-
}, null, 8, ["placeholder", "modelValue"])])]), n("div", Te, [
|
|
173
|
-
"column-defs":
|
|
166
|
+
}, null, 8, ["placeholder", "modelValue"])])]), n("div", Te, [u(ne, {
|
|
167
|
+
"column-defs": O,
|
|
174
168
|
draggable: y.value,
|
|
175
169
|
"page-size": S.value.length,
|
|
176
170
|
"row-data": S.value,
|
|
@@ -178,7 +172,7 @@ const $e = {
|
|
|
178
172
|
"shrink-at": !1,
|
|
179
173
|
"hide-footer": "",
|
|
180
174
|
"pin-header-row": "",
|
|
181
|
-
onDndChanged:
|
|
175
|
+
onDndChanged: P,
|
|
182
176
|
onRowClick: o[2] || (o[2] = (v) => s(v.original))
|
|
183
177
|
}, null, 8, ["draggable", "page-size", "row-data", "search-value"])])]),
|
|
184
178
|
_: 1
|
|
@@ -187,34 +181,34 @@ const $e = {
|
|
|
187
181
|
}, 8, ["modelValue", "is-container", "is-container-props", "onOn:clickedAway"])], 64);
|
|
188
182
|
};
|
|
189
183
|
}
|
|
190
|
-
}),
|
|
184
|
+
}), Le = Ie, Ne = {
|
|
191
185
|
key: 0
|
|
192
|
-
},
|
|
186
|
+
}, Oe = {
|
|
193
187
|
class: "flex justify-end items-center"
|
|
194
|
-
},
|
|
188
|
+
}, Pe = {
|
|
195
189
|
class: "w-[320px]"
|
|
196
|
-
},
|
|
190
|
+
}, De = {
|
|
197
191
|
key: 1,
|
|
198
192
|
class: "flex-1 flex flex-col min-h-0"
|
|
199
|
-
},
|
|
193
|
+
}, ze = {
|
|
200
194
|
class: "p-8"
|
|
201
195
|
}, Re = {
|
|
202
196
|
class: "flex flex-1 flex-col min-h-0 overflow-scroll divide-y divide-fm-color-neutral-gray-100 pb-64"
|
|
203
|
-
},
|
|
197
|
+
}, Ke = ["onClick"], Ae = {
|
|
204
198
|
class: "flex-1 space-y-4"
|
|
205
199
|
}, je = {
|
|
206
200
|
class: "fm-typo-en-body-lg-600"
|
|
207
201
|
}, Ye = {
|
|
208
202
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
209
|
-
}, Ge = /* @__PURE__ */
|
|
203
|
+
}, Ge = /* @__PURE__ */ A({
|
|
210
204
|
__name: "CategoryTable",
|
|
211
|
-
setup(
|
|
212
|
-
const h = ee(),
|
|
205
|
+
setup(N) {
|
|
206
|
+
const h = ee(), f = Y(), V = G(f), b = q(V), $ = ae({
|
|
213
207
|
dialog: h,
|
|
214
208
|
menuLoader: b
|
|
215
209
|
}), {
|
|
216
210
|
categories: m
|
|
217
|
-
} =
|
|
211
|
+
} = H(), r = F(""), x = B(() => m.value.filter((l) => l.name.toLowerCase().includes(r.value.toLowerCase()))), {
|
|
218
212
|
t
|
|
219
213
|
} = j(), U = F([{
|
|
220
214
|
accessorKey: "name",
|
|
@@ -244,22 +238,22 @@ const $e = {
|
|
|
244
238
|
header: "",
|
|
245
239
|
cell: (l) => {
|
|
246
240
|
const s = l.row.original;
|
|
247
|
-
return
|
|
241
|
+
return L("div", {
|
|
248
242
|
class: "flex justify-end"
|
|
249
|
-
}, [
|
|
243
|
+
}, [L(R.FmButton, {
|
|
250
244
|
icon: "delete",
|
|
251
245
|
disabled: !s.id,
|
|
252
246
|
variant: "tertiary",
|
|
253
247
|
textColor: "neutral-gray-400",
|
|
254
|
-
onClick:
|
|
255
|
-
await
|
|
248
|
+
onClick: z(async () => {
|
|
249
|
+
await d(s);
|
|
256
250
|
}, ["stop", "prevent"])
|
|
257
251
|
})]);
|
|
258
252
|
}
|
|
259
253
|
}]);
|
|
260
|
-
async function
|
|
254
|
+
async function d(l) {
|
|
261
255
|
if (!l.id) {
|
|
262
|
-
|
|
256
|
+
f.open({
|
|
263
257
|
message: t("menu.category.dialog.remove.error"),
|
|
264
258
|
type: "warning"
|
|
265
259
|
});
|
|
@@ -273,7 +267,7 @@ const $e = {
|
|
|
273
267
|
primaryActions: {
|
|
274
268
|
text: "Remove",
|
|
275
269
|
close: !0,
|
|
276
|
-
variant:
|
|
270
|
+
variant: J.Destructive
|
|
277
271
|
},
|
|
278
272
|
secondaryActions: {
|
|
279
273
|
text: "Cancel",
|
|
@@ -281,7 +275,7 @@ const $e = {
|
|
|
281
275
|
}
|
|
282
276
|
}).onPrimary(async () => {
|
|
283
277
|
await b.updateMenu({
|
|
284
|
-
module:
|
|
278
|
+
module: K.F_MENU_MODULE_V4_KEY.enum.category,
|
|
285
279
|
operation: te.F_OPERATION_TYPE.delete,
|
|
286
280
|
// `category.id` is guaranteed to be defined due to the earlier check in `deleteCategory`.
|
|
287
281
|
data: l.id
|
|
@@ -294,14 +288,14 @@ const $e = {
|
|
|
294
288
|
}
|
|
295
289
|
const i = ie();
|
|
296
290
|
async function C(l) {
|
|
297
|
-
|
|
291
|
+
we(i, Le, {
|
|
298
292
|
initialValue: l
|
|
299
293
|
});
|
|
300
294
|
}
|
|
301
|
-
const S =
|
|
295
|
+
const S = ue(), O = B(() => S.breakpoints.value.xs);
|
|
302
296
|
return (l, s) => {
|
|
303
|
-
const y = p("FmSearch"),
|
|
304
|
-
return
|
|
297
|
+
const y = p("FmSearch"), P = p("FmTable"), D = p("FmButton");
|
|
298
|
+
return O.value ? (_(), E("div", De, [n("div", ze, [u(y, {
|
|
305
299
|
autofocus: "",
|
|
306
300
|
modelValue: r.value,
|
|
307
301
|
"onUpdate:modelValue": s[2] || (s[2] = (c) => r.value = c),
|
|
@@ -309,19 +303,19 @@ const $e = {
|
|
|
309
303
|
placeholder: e(t)("menu.common.labels.search_placeholder", {
|
|
310
304
|
type: "categories"
|
|
311
305
|
})
|
|
312
|
-
}, null, 8, ["modelValue", "placeholder"])]), n("div", Re, [(
|
|
306
|
+
}, null, 8, ["modelValue", "placeholder"])]), n("div", Re, [(_(!0), E(Z, null, ce(x.value, (c) => (_(), E("div", {
|
|
313
307
|
key: c.id || "",
|
|
314
308
|
class: "flex flex-row py-12 px-16",
|
|
315
309
|
onClick: (a) => C(c)
|
|
316
|
-
}, [n("div",
|
|
310
|
+
}, [n("div", Ae, [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
311
|
count: c.items.length
|
|
318
|
-
})), 1)]),
|
|
312
|
+
})), 1)]), u(D, {
|
|
319
313
|
"text-color": e(me).NeutralGray400,
|
|
320
|
-
variant: e(
|
|
314
|
+
variant: e(J).Tertiary,
|
|
321
315
|
"prepend-icon": "delete",
|
|
322
316
|
disabled: !c.id,
|
|
323
|
-
onClick:
|
|
324
|
-
}, null, 8, ["text-color", "variant", "disabled", "onClick"])], 8,
|
|
317
|
+
onClick: z((a) => d(c), ["stop"])
|
|
318
|
+
}, null, 8, ["text-color", "variant", "disabled", "onClick"])], 8, Ke))), 128))])])) : (_(), E("div", Ne, [n("div", Oe, [n("div", Pe, [u(y, {
|
|
325
319
|
modelValue: r.value,
|
|
326
320
|
"onUpdate:modelValue": s[0] || (s[0] = (c) => r.value = c),
|
|
327
321
|
autofocus: "",
|
|
@@ -329,8 +323,8 @@ const $e = {
|
|
|
329
323
|
placeholder: e(t)("menu.common.labels.search_placeholder", {
|
|
330
324
|
type: e(t)("menu.category.title")
|
|
331
325
|
})
|
|
332
|
-
}, null, 8, ["modelValue", "placeholder"])])]),
|
|
333
|
-
default: g(() => [
|
|
326
|
+
}, null, 8, ["modelValue", "placeholder"])])]), u(ke, null, {
|
|
327
|
+
default: g(() => [u(P, {
|
|
334
328
|
"column-defs": U.value,
|
|
335
329
|
draggable: !0,
|
|
336
330
|
"page-size": e(m).length,
|
|
@@ -346,19 +340,19 @@ const $e = {
|
|
|
346
340
|
})]));
|
|
347
341
|
};
|
|
348
342
|
}
|
|
349
|
-
}), qe = { class: "flex-1 flex justify-between gap-8 pl-8" },
|
|
343
|
+
}), qe = { class: "flex-1 flex justify-between gap-8 pl-8" }, He = { class: "flex items-center" }, We = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Je = { class: "fm-typo-en-body-md-600 font-semibold" }, rt = /* @__PURE__ */ A({
|
|
350
344
|
__name: "Category",
|
|
351
|
-
setup(
|
|
352
|
-
const h = ee(),
|
|
345
|
+
setup(N) {
|
|
346
|
+
const h = ee(), f = Y(), V = G(f), b = q(V), $ = ae({ dialog: h, menuLoader: b }), { categories: m } = H(), { t: r } = j();
|
|
353
347
|
function x() {
|
|
354
348
|
$.create();
|
|
355
349
|
}
|
|
356
350
|
const t = B(() => m.value.length);
|
|
357
|
-
return
|
|
351
|
+
return Ve().resetOnMount(), (U, d) => (_(), I(Ce, {
|
|
358
352
|
heading: e(r)("menu.category.title")
|
|
359
353
|
}, {
|
|
360
354
|
default: g(() => [
|
|
361
|
-
e(m).length > 0 ? (
|
|
355
|
+
e(m).length > 0 ? (_(), I(Ge, { key: 0 })) : (_(), I(e(xe), {
|
|
362
356
|
key: 1,
|
|
363
357
|
action: {
|
|
364
358
|
text: e(r)("menu.category.add"),
|
|
@@ -370,17 +364,17 @@ const $e = {
|
|
|
370
364
|
]),
|
|
371
365
|
"append-heading": g(() => [
|
|
372
366
|
n("div", qe, [
|
|
373
|
-
n("div",
|
|
367
|
+
n("div", He, [
|
|
374
368
|
n("div", We, [
|
|
375
|
-
n("p",
|
|
369
|
+
n("p", Je, T(t.value), 1)
|
|
376
370
|
])
|
|
377
371
|
]),
|
|
378
|
-
e(m).length > 0 ? (
|
|
372
|
+
e(m).length > 0 ? (_(), I(pe, {
|
|
379
373
|
key: 0,
|
|
380
374
|
label: e(r)("menu.category.add"),
|
|
381
375
|
"prepend-icon": "add",
|
|
382
376
|
onClick: x
|
|
383
|
-
}, null, 8, ["label"])) :
|
|
377
|
+
}, null, 8, ["label"])) : de("", !0)
|
|
384
378
|
])
|
|
385
379
|
]),
|
|
386
380
|
_: 1
|
|
@@ -388,5 +382,5 @@ const $e = {
|
|
|
388
382
|
}
|
|
389
383
|
});
|
|
390
384
|
export {
|
|
391
|
-
|
|
385
|
+
rt as default
|
|
392
386
|
};
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import { defineComponent as V, computed as k, ref as C, resolveComponent as w, createElementBlock as g, openBlock as u, createElementVNode as i, createVNode as _, unref as a, withCtx as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { useSnackbar as
|
|
4
|
-
import {
|
|
5
|
-
import { _ as
|
|
6
|
-
import { u as B } from "./menu-
|
|
7
|
-
|
|
8
|
-
const Z = {
|
|
1
|
+
import { defineComponent as V, computed as k, ref as C, resolveComponent as w, createElementBlock as g, openBlock as u, createElementVNode as i, createVNode as _, unref as a, withCtx as I, Fragment as K, renderList as P, toDisplayString as E, createBlock as S } from "vue";
|
|
2
|
+
import { useI18n as L } from "@feedmepos/mf-common";
|
|
3
|
+
import { useSnackbar as M, useBreakpoints as U, useDialog as $ } from "@feedmepos/ui-library";
|
|
4
|
+
import { a as F, u as Y, E as j, d as T, m as q, e as A, I as R, _ as G } from "./App-Cfl37TTw.js";
|
|
5
|
+
import { _ as H } from "./app-Z0KWH9-d.js";
|
|
6
|
+
import { u as B } from "./menu-Brxar171.js";
|
|
7
|
+
const J = {
|
|
9
8
|
key: 0
|
|
10
|
-
},
|
|
9
|
+
}, Q = {
|
|
11
10
|
class: "flex justify-end items-center"
|
|
12
|
-
}, J = {
|
|
13
|
-
class: "w-[320px]"
|
|
14
11
|
}, W = {
|
|
12
|
+
class: "w-[320px]"
|
|
13
|
+
}, X = {
|
|
15
14
|
key: 1,
|
|
16
15
|
class: "flex-1 flex flex-col min-h-0"
|
|
17
|
-
},
|
|
16
|
+
}, Z = {
|
|
18
17
|
class: "p-8"
|
|
19
18
|
}, ee = {
|
|
20
19
|
class: "flex flex-1 flex-col min-h-0 overflow-scroll divide-y divide-fm-color-neutral-gray-100 pb-64"
|
|
@@ -27,7 +26,7 @@ const Z = {
|
|
|
27
26
|
}, ne = /* @__PURE__ */ V({
|
|
28
27
|
__name: "CategoryTable",
|
|
29
28
|
setup(D) {
|
|
30
|
-
const f =
|
|
29
|
+
const f = M(), y = F(f), h = T(y), d = Y(), {
|
|
31
30
|
categories: v
|
|
32
31
|
} = B(), b = k(() => {
|
|
33
32
|
var r, t;
|
|
@@ -39,10 +38,10 @@ const Z = {
|
|
|
39
38
|
position: e.id ? ((p = l[e.id]) == null ? void 0 : p.position) ?? c + 1 : null
|
|
40
39
|
};
|
|
41
40
|
});
|
|
42
|
-
return
|
|
41
|
+
return j(o, (e) => e.name);
|
|
43
42
|
}), n = C(""), m = k(() => b.value.filter((l) => l.name.toLowerCase().includes(n.value.toLowerCase()))), {
|
|
44
43
|
t: s
|
|
45
|
-
} =
|
|
44
|
+
} = L(), x = C([{
|
|
46
45
|
accessorKey: "name",
|
|
47
46
|
header: () => s("menu.category.columns.title"),
|
|
48
47
|
enableSorting: !1,
|
|
@@ -75,8 +74,8 @@ const Z = {
|
|
|
75
74
|
_id: c.id
|
|
76
75
|
});
|
|
77
76
|
}), await r({
|
|
78
|
-
module:
|
|
79
|
-
operation:
|
|
77
|
+
module: A.F_MENU_MODULE_V4_KEY.enum.catalog,
|
|
78
|
+
operation: q.F_OPERATION_TYPE.update,
|
|
80
79
|
data: {
|
|
81
80
|
...o,
|
|
82
81
|
override: {
|
|
@@ -86,10 +85,10 @@ const Z = {
|
|
|
86
85
|
}
|
|
87
86
|
}, "Category");
|
|
88
87
|
}
|
|
89
|
-
const O =
|
|
88
|
+
const O = U(), z = k(() => O.breakpoints.value.xs);
|
|
90
89
|
return (l, o) => {
|
|
91
90
|
const r = w("FmSearch"), t = w("FmTable");
|
|
92
|
-
return z.value ? (u(), g("div",
|
|
91
|
+
return z.value ? (u(), g("div", X, [i("div", Z, [_(r, {
|
|
93
92
|
autofocus: "",
|
|
94
93
|
modelValue: n.value,
|
|
95
94
|
"onUpdate:modelValue": o[1] || (o[1] = (e) => n.value = e),
|
|
@@ -97,12 +96,12 @@ const Z = {
|
|
|
97
96
|
placeholder: a(s)("menu.common.labels.search_placeholder", {
|
|
98
97
|
type: a(s)("menu.category.title")
|
|
99
98
|
})
|
|
100
|
-
}, null, 8, ["modelValue", "placeholder"])]), i("div", ee, [(u(!0), g(
|
|
99
|
+
}, null, 8, ["modelValue", "placeholder"])]), i("div", ee, [(u(!0), g(K, null, P(m.value, (e) => (u(), g("div", {
|
|
101
100
|
key: e.id || "",
|
|
102
101
|
class: "flex flex-row py-12 px-16"
|
|
103
102
|
}, [i("div", oe, [i("p", te, E(e.name), 1), i("p", ae, E(a(s)(e.items.length > 1 ? "menu.common.labels.product_linked_plural" : "menu.common.labels.product_linked_singular", {
|
|
104
103
|
count: e.items.length
|
|
105
|
-
})), 1)])]))), 128))])])) : (u(), g("div",
|
|
104
|
+
})), 1)])]))), 128))])])) : (u(), g("div", J, [i("div", Q, [i("div", W, [_(r, {
|
|
106
105
|
modelValue: n.value,
|
|
107
106
|
"onUpdate:modelValue": o[0] || (o[0] = (e) => n.value = e),
|
|
108
107
|
autofocus: "",
|
|
@@ -110,8 +109,8 @@ const Z = {
|
|
|
110
109
|
placeholder: a(s)("menu.common.labels.search_placeholder", {
|
|
111
110
|
type: a(s)("menu.category.title")
|
|
112
111
|
})
|
|
113
|
-
}, null, 8, ["modelValue", "placeholder"])])]), _(
|
|
114
|
-
default:
|
|
112
|
+
}, null, 8, ["modelValue", "placeholder"])])]), _(H, null, {
|
|
113
|
+
default: I(() => [_(t, {
|
|
115
114
|
"column-defs": x.value,
|
|
116
115
|
draggable: a(d).rules.category.overrideSequence,
|
|
117
116
|
"page-size": m.value.length,
|
|
@@ -126,10 +125,10 @@ const Z = {
|
|
|
126
125
|
})]));
|
|
127
126
|
};
|
|
128
127
|
}
|
|
129
|
-
}),
|
|
128
|
+
}), de = /* @__PURE__ */ V({
|
|
130
129
|
__name: "Category",
|
|
131
130
|
setup(D) {
|
|
132
|
-
const f =
|
|
131
|
+
const f = $(), y = M(), h = F(y), d = T(h), v = R({ dialog: f, menuLoader: d }), { categories: b } = B(), { t: n } = L();
|
|
133
132
|
function m() {
|
|
134
133
|
v.create();
|
|
135
134
|
}
|
|
@@ -149,5 +148,5 @@ const Z = {
|
|
|
149
148
|
}
|
|
150
149
|
});
|
|
151
150
|
export {
|
|
152
|
-
|
|
151
|
+
de as default
|
|
153
152
|
};
|