@feedmepos/mf-menu 0.18.17 → 0.19.0-beta.2
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/ApplyProduct.vue_vue_type_script_setup_true_lang-DFJJHptK.js +158 -0
- package/dist/{ApplyProducts.vue_vue_type_script_setup_true_lang-BJ0b_uKf.js → ApplyProducts.vue_vue_type_script_setup_true_lang-CXoRwrTi.js} +2 -2
- package/dist/Catalog-CXzqtCF8.js +551 -0
- package/dist/Category-DKbtLbq8.js +387 -0
- package/dist/CookingGuide-BKon8TdH.js +862 -0
- package/dist/Group-D1UDksBG.js +46 -0
- package/dist/{Group-jEtbECLb.js → Group-izOWb_Bh.js} +1 -1
- package/dist/Group.vue_vue_type_script_setup_true_lang-DAlQcgYp.js +558 -0
- package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Q7es2wmt.js +237 -0
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Bw4uxqAp.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-Db0uYw5O.js} +11723 -11723
- package/dist/Ingredient-BIJu9P_9.js +484 -0
- package/dist/LinkProductSideSheet-BNdFZThd.js +104 -0
- package/dist/PrintRoute--fYPFcy7.js +417 -0
- package/dist/{Product-Bnr9oFr2.js → Product-vLtISbkD.js} +1 -1
- package/dist/Product.vue_vue_type_script_setup_true_lang-BHCihe6o.js +826 -0
- package/dist/Products-JaCNtcHS.js +236 -0
- package/dist/Publish-jpmiyB-b.js +525 -0
- package/dist/Recipe-B6y-oLPG.js +320 -0
- package/dist/Scheduler-Dj1rlr-U.js +222 -0
- package/dist/SchedulerSelector.vue_vue_type_script_setup_true_lang-BVAkohGJ.js +48 -0
- package/dist/ServingSequence-BhIfCyXl.js +4 -0
- package/dist/{Setting-DN8TQdIR.js → Setting-B5R1JfaL.js} +1 -1
- package/dist/Setting.vue_vue_type_script_setup_true_lang-xXtg0JOn.js +253 -0
- package/dist/Takeaway-BSFSz_JL.js +63 -0
- package/dist/{Takeaway-y0Nk0JAb.js → Takeaway-DjFTtbw6.js} +1 -1
- package/dist/Takeaway.vue_vue_type_script_setup_true_lang-BUGL0wfZ.js +302 -0
- package/dist/TaxSetting-D9Q8XNgJ.js +25 -0
- package/dist/Unit-Cr_8O3zB.js +142 -0
- package/dist/Variant-loUMfNRB.js +222 -0
- package/dist/_id_-0w7KjYyQ.js +189 -0
- package/dist/{app-D7e31gIv.js → app-t9ONnc0s.js} +31701 -26207
- package/dist/app.js +7 -6
- package/dist/apps/mf-menu/src/app.d.ts +2784 -0
- package/dist/apps/mf-menu/src/components/feature/Fields/OrderFrom.vue.d.ts +2 -2
- package/dist/apps/mf-menu/src/components/feature/LinkProduct/LinkProductSideSheet.vue.d.ts +2 -2
- package/dist/apps/mf-menu/src/manager/menu/catalog.d.ts +1 -0
- package/dist/apps/mf-menu/src/stores/manager/item.d.ts +1 -1
- package/dist/apps/mf-menu/src/stores/menu.d.ts +16 -16
- package/dist/apps/mf-menu/src/views/Publish/UpdateCatalogDialog.vue.d.ts +12 -12
- package/dist/apps/mf-menu/src/views/Scheduler/FilterForm.vue.d.ts +4 -4
- package/dist/apps/mf-menu/src/views/Scheduler/SchedulerDialog.vue.d.ts +4 -4
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-D5tq3eE2.js → linked-status-DLL4aRiX.js} +8 -8
- package/dist/assets/{validate-menu-AcCpPyQZ.js → validate-menu-CoXc16jh.js} +8 -8
- package/dist/{catalog-Ck7lLTN2.js → catalog-4OmC0JA3.js} +66 -62
- package/dist/category-BE33DRqp.js +155 -0
- package/dist/{currency-CclA5a-2.js → currency-JHgYNbTQ.js} +1 -1
- package/dist/{index-DDd9B_ur.js → index-CE3zjhyh.js} +732 -740
- package/dist/index-pSg9p-28.js +238 -0
- package/dist/item-CEPx51U1.js +6371 -0
- package/dist/{lodash-BIQx_fko.js → lodash-VivR_BQ2.js} +1 -1
- package/dist/{menu-CYzbNubv.js → menu-ETQrtbbU.js} +1 -1
- package/dist/{object-DUtbNpoS.js → object-DEM5FMTB.js} +4 -4
- package/dist/scheduler-SRT_5Nio.js +491 -0
- package/dist/string-DpfFixWH.js +4 -0
- package/dist/style.css +1 -1
- package/dist/takeaway-RcvqKigG.js +267 -0
- package/dist/{toExcel-BXPcj8Gp.js → toExcel-BcgskY3F.js} +2 -2
- package/dist/unit-DLL7xIF1.js +350 -0
- package/package.json +4 -2
- package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-D9QsJ4vO.js +0 -155
- package/dist/Catalog-CZW54QJU.js +0 -570
- package/dist/Category-DvsP_L7d.js +0 -405
- package/dist/CookingGuide-DC3uXetk.js +0 -848
- package/dist/Group-DK5xqeYX.js +0 -44
- package/dist/Group.vue_vue_type_script_setup_true_lang-DGZ9hnPg.js +0 -538
- package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BQXqlXw4.js +0 -234
- package/dist/Ingredient-354LLwdX.js +0 -498
- package/dist/LinkProductSideSheet-anxSsu0z.js +0 -102
- package/dist/PrintRoute-DrSvtNLX.js +0 -425
- package/dist/Product.vue_vue_type_script_setup_true_lang-bBY54Q_1.js +0 -815
- package/dist/Products-CZyueqSO.js +0 -234
- package/dist/Publish-kRM1UuPk.js +0 -518
- package/dist/Recipe-nKpLIJs8.js +0 -345
- package/dist/Scheduler-DmZ8atXG.js +0 -233
- package/dist/SchedulerSelector.vue_vue_type_script_setup_true_lang-CdsxA-p0.js +0 -48
- package/dist/ServingSequence-j00_ko5R.js +0 -4
- package/dist/Setting.vue_vue_type_script_setup_true_lang-Cx06MCJs.js +0 -247
- package/dist/Takeaway-BXZXCAaM.js +0 -61
- package/dist/Takeaway.vue_vue_type_script_setup_true_lang-9WVkdLZF.js +0 -316
- package/dist/TaxSetting-DdHx7ACN.js +0 -21
- package/dist/Unit-biPvleyL.js +0 -161
- package/dist/Variant-BP1IRNQx.js +0 -231
- package/dist/_id_-BiaNDI2N.js +0 -188
- package/dist/category-KiA5-36F.js +0 -154
- package/dist/index-BFeZlU8X.js +0 -232
- package/dist/item-Bcg7SiYv.js +0 -6325
- package/dist/scheduler-D1tgE0_9.js +0 -480
- package/dist/takeaway-BKsoD4EL.js +0 -264
- package/dist/unit-CswFvAyc.js +0 -346
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { b as k, d as c, u as q, n as G, I as j, g as C } from "./app-t9ONnc0s.js";
|
|
2
|
+
import { defineComponent as H, computed as F, ref as V, watch as J, onMounted as K, resolveComponent as s, openBlock as _, createElementBlock as y, Fragment as S, renderSlot as Q, createVNode as i, unref as o, withCtx as d, createTextVNode as W, toDisplayString as I, createElementVNode as O, renderList as X, createBlock as R, createCommentVNode as h } from "vue";
|
|
3
|
+
import { c as Y } from "./string-DpfFixWH.js";
|
|
4
|
+
import { useDialog as Z, components as ee, FmButtonColorThemeVariant as L, FmButtonVariant as ae } from "@feedmepos/ui-library";
|
|
5
|
+
import { L as te } from "./LinkProductSideSheet-BNdFZThd.js";
|
|
6
|
+
var le = /* @__PURE__ */ ((p) => (p.AUTO = "auto", p.MANUAL = "manual", p))(le || {});
|
|
7
|
+
class T {
|
|
8
|
+
static fromCatalog(e, n) {
|
|
9
|
+
const g = n ? k.F_ORDER_FROM.enum.ALL : k.F_ORDER_FROM.enum.NONE;
|
|
10
|
+
return {
|
|
11
|
+
...c(e),
|
|
12
|
+
taxSetting: this.transformTax(e.inclusiveTaxes),
|
|
13
|
+
orderFrom: e.defaultOrderFrom || g,
|
|
14
|
+
markupOptions: e.markupOptions || null
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
static fromMainCatalog(e) {
|
|
18
|
+
return {
|
|
19
|
+
_id: "",
|
|
20
|
+
name: "Main",
|
|
21
|
+
taxSetting: T.transformTax(e == null ? void 0 : e.inclusiveTaxes),
|
|
22
|
+
orderFrom: k.F_ORDER_FROM.enum.ALL,
|
|
23
|
+
markupOptions: null
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
static toCatalog(e) {
|
|
27
|
+
return {
|
|
28
|
+
_id: e._id,
|
|
29
|
+
name: e.name,
|
|
30
|
+
inclusiveTaxes: e.taxSetting.mode === "auto" ? null : c(e.taxSetting.inclusive),
|
|
31
|
+
markupOptions: e.markupOptions,
|
|
32
|
+
defaultOrderFrom: e.orderFrom
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
static initCatalogSetting() {
|
|
36
|
+
return {
|
|
37
|
+
_id: "",
|
|
38
|
+
name: "",
|
|
39
|
+
orderFrom: k.F_ORDER_FROM.enum.ALL,
|
|
40
|
+
taxSetting: this.autoTax(),
|
|
41
|
+
markupOptions: null
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
static transformTax(e) {
|
|
45
|
+
return e ? {
|
|
46
|
+
mode: "manual",
|
|
47
|
+
inclusive: c(e)
|
|
48
|
+
} : {
|
|
49
|
+
mode: "auto"
|
|
50
|
+
/* AUTO */
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
static autoTax() {
|
|
54
|
+
return {
|
|
55
|
+
mode: "auto"
|
|
56
|
+
/* AUTO */
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
static manualTax(e) {
|
|
60
|
+
return { mode: "manual", inclusive: c(e) };
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
const oe = { class: "space-y-16" }, ne = { class: "ml-32 mt-16 space-y-8" }, re = {
|
|
64
|
+
key: 0,
|
|
65
|
+
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
66
|
+
}, ce = /* @__PURE__ */ H({
|
|
67
|
+
__name: "GroupMarkupPriceDialog",
|
|
68
|
+
props: {
|
|
69
|
+
modelValue: {},
|
|
70
|
+
items: {},
|
|
71
|
+
categories: {},
|
|
72
|
+
action: {}
|
|
73
|
+
},
|
|
74
|
+
emits: ["update:model-value"],
|
|
75
|
+
setup(p, { emit: e }) {
|
|
76
|
+
const n = p, g = q();
|
|
77
|
+
Z();
|
|
78
|
+
const { t: r } = G(), M = e, w = F(() => n.action === "add" ? r("menu.markup.dialog.title.add") : r("menu.markup.dialog.title.update")), m = V(!1), b = (t) => {
|
|
79
|
+
C.isBoolean(t) ? m.value = t : m.value = !m.value;
|
|
80
|
+
}, a = V(
|
|
81
|
+
n.modelValue ? c(n.modelValue) : {
|
|
82
|
+
percentage: 0,
|
|
83
|
+
includeItems: null
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
J(
|
|
87
|
+
() => m.value,
|
|
88
|
+
(t) => {
|
|
89
|
+
t && (a.value = n.modelValue ? c(n.modelValue) : {
|
|
90
|
+
percentage: 0,
|
|
91
|
+
includeItems: null
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
), F(
|
|
95
|
+
() => j(g.variants, n.categories, n.items)
|
|
96
|
+
);
|
|
97
|
+
function z(t) {
|
|
98
|
+
a.value = {
|
|
99
|
+
...a.value,
|
|
100
|
+
includeItems: t
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
const f = V(
|
|
104
|
+
0
|
|
105
|
+
/* ALL */
|
|
106
|
+
);
|
|
107
|
+
function A(t) {
|
|
108
|
+
f.value = t, a.value = {
|
|
109
|
+
...a.value,
|
|
110
|
+
includeItems: t === 0 ? null : []
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
const D = F(() => [
|
|
114
|
+
{
|
|
115
|
+
label: r("menu.markup.dialog.options.all"),
|
|
116
|
+
value: 0
|
|
117
|
+
/* ALL */
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
label: r("menu.markup.dialog.options.custom"),
|
|
121
|
+
value: 1
|
|
122
|
+
/* CUSTOM */
|
|
123
|
+
}
|
|
124
|
+
]);
|
|
125
|
+
async function E() {
|
|
126
|
+
M("update:model-value", a.value), b(!1);
|
|
127
|
+
}
|
|
128
|
+
return K(() => {
|
|
129
|
+
f.value = a.value && a.value.includeItems === null ? 0 : 1;
|
|
130
|
+
}), (t, u) => {
|
|
131
|
+
const N = s("fm-icon"), B = s("fm-stepper-field"), U = s("fm-radio"), P = s("fm-radio-group"), x = s("fm-button"), $ = s("fm-dialog");
|
|
132
|
+
return _(), y(S, null, [
|
|
133
|
+
Q(t.$slots, "default", { trigger: b }),
|
|
134
|
+
i($, {
|
|
135
|
+
modelValue: m.value,
|
|
136
|
+
"onUpdate:modelValue": u[3] || (u[3] = (v) => m.value = v),
|
|
137
|
+
"is-component": o(ee).FmForm,
|
|
138
|
+
"is-component-props": {
|
|
139
|
+
onValidationSuccess: E
|
|
140
|
+
},
|
|
141
|
+
"z-index": 101
|
|
142
|
+
}, {
|
|
143
|
+
"dialog-header": d(() => [
|
|
144
|
+
W(I(w.value), 1)
|
|
145
|
+
]),
|
|
146
|
+
"dialog-footer": d(() => [
|
|
147
|
+
i(x, {
|
|
148
|
+
class: "sm:w-full xs:w-full ml-auto",
|
|
149
|
+
label: "Cancel",
|
|
150
|
+
variant: "tertiary",
|
|
151
|
+
onClick: u[2] || (u[2] = (v) => b(!1))
|
|
152
|
+
}),
|
|
153
|
+
i(x, {
|
|
154
|
+
label: o(Y)(t.action),
|
|
155
|
+
class: "sm:w-full xs:w-full",
|
|
156
|
+
size: "md",
|
|
157
|
+
type: "submit",
|
|
158
|
+
variant: "primary"
|
|
159
|
+
}, null, 8, ["label"])
|
|
160
|
+
]),
|
|
161
|
+
default: d(() => {
|
|
162
|
+
var v;
|
|
163
|
+
return [
|
|
164
|
+
O("div", oe, [
|
|
165
|
+
i(B, {
|
|
166
|
+
modelValue: a.value.percentage,
|
|
167
|
+
"onUpdate:modelValue": u[0] || (u[0] = (l) => a.value.percentage = l),
|
|
168
|
+
decimal: 0,
|
|
169
|
+
max: 100,
|
|
170
|
+
min: 0,
|
|
171
|
+
rules: [
|
|
172
|
+
(l) => o(C).isSet(l) && l >= 0 || o(r)("menu.markup.dialog.fields.percentage.required")
|
|
173
|
+
],
|
|
174
|
+
label: o(r)("menu.markup.dialog.fields.percentage.label"),
|
|
175
|
+
placeholder: o(r)("menu.markup.dialog.fields.percentage.placeholder")
|
|
176
|
+
}, {
|
|
177
|
+
prepend: d(() => [
|
|
178
|
+
i(N, { name: "percent" })
|
|
179
|
+
]),
|
|
180
|
+
_: 1
|
|
181
|
+
}, 8, ["modelValue", "rules", "label", "placeholder"]),
|
|
182
|
+
O("div", null, [
|
|
183
|
+
i(P, {
|
|
184
|
+
modelValue: f.value,
|
|
185
|
+
"onUpdate:modelValue": [
|
|
186
|
+
u[1] || (u[1] = (l) => f.value = l),
|
|
187
|
+
A
|
|
188
|
+
],
|
|
189
|
+
class: "space-y-8"
|
|
190
|
+
}, {
|
|
191
|
+
default: d(() => [
|
|
192
|
+
(_(!0), y(S, null, X(D.value, (l) => (_(), R(U, {
|
|
193
|
+
key: l.value,
|
|
194
|
+
label: l.label,
|
|
195
|
+
value: l.value
|
|
196
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
197
|
+
]),
|
|
198
|
+
_: 1
|
|
199
|
+
}, 8, ["modelValue"]),
|
|
200
|
+
O("div", ne, [
|
|
201
|
+
i(te, {
|
|
202
|
+
title: "Link products",
|
|
203
|
+
"categorized-items": o(g).categorizedItems,
|
|
204
|
+
"initial-value": a.value.includeItems || [],
|
|
205
|
+
"show-variant": !1,
|
|
206
|
+
onSubmit: z
|
|
207
|
+
}, {
|
|
208
|
+
default: d(({ trigger: l }) => [
|
|
209
|
+
f.value === 1 ? (_(), R(x, {
|
|
210
|
+
key: 0,
|
|
211
|
+
"text-color": o(L).ColorPrimary,
|
|
212
|
+
"border-color": o(L).ColorPrimary,
|
|
213
|
+
variant: o(ae).Secondary,
|
|
214
|
+
label: o(r)("menu.markup.dialog.products.link"),
|
|
215
|
+
"prepend-icon": "link",
|
|
216
|
+
onClick: l
|
|
217
|
+
}, null, 8, ["text-color", "border-color", "variant", "label", "onClick"])) : h("", !0)
|
|
218
|
+
]),
|
|
219
|
+
_: 1
|
|
220
|
+
}, 8, ["categorized-items", "initial-value"]),
|
|
221
|
+
(v = a.value.includeItems) != null && v.length ? (_(), y("p", re, I(o(r)("menu.markup.dialog.products.count", { count: a.value.includeItems.length })), 1)) : h("", !0)
|
|
222
|
+
])
|
|
223
|
+
])
|
|
224
|
+
])
|
|
225
|
+
];
|
|
226
|
+
}),
|
|
227
|
+
_: 1
|
|
228
|
+
}, 8, ["modelValue", "is-component", "is-component-props"])
|
|
229
|
+
], 64);
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
export {
|
|
234
|
+
T as C,
|
|
235
|
+
ce as _,
|
|
236
|
+
le as a
|
|
237
|
+
};
|