@feedmepos/mf-menu 0.19.13 → 0.19.14-prod
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-Bvkr0nD3.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BSovyhqX.js} +2 -2
- package/dist/{ApplyProducts.vue_vue_type_script_setup_true_lang-Hx8MMYfJ.js → ApplyProducts.vue_vue_type_script_setup_true_lang-D5aaTRkz.js} +2 -2
- package/dist/{Catalog-C3Cx3sFF.js → Catalog-BYYifdfJ.js} +3 -3
- package/dist/{Category-C_5RCWZ_.js → Category-e8c0tw8h.js} +6 -6
- package/dist/{CookingGuide-BzLjzKZI.js → CookingGuide-DMnTmk_8.js} +3 -3
- package/dist/{Group-DJm-Mk3u.js → Group-CLIsfWX3.js} +4 -4
- package/dist/{Group-DjTfdOWl.js → Group-CaDmF3AR.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-DBk_yau1.js → Group.vue_vue_type_script_setup_true_lang-PENLCXXH.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-By61Cx0K.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Q2LR4FP6.js} +2 -2
- package/dist/{Ingredient-CN3KCmFG.js → Ingredient-BWU2-Ua8.js} +4 -4
- package/dist/{LinkProductSideSheet-DBx4NpGw.js → LinkProductSideSheet-BZ2c8_5d.js} +2 -2
- package/dist/{PrintRoute-DMUblGYw.js → PrintRoute-BAaAfFhF.js} +3 -3
- package/dist/{Product-BVAvSbra.js → Product-D37eK0oa.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-D5gHIGvK.js → Product.vue_vue_type_script_setup_true_lang-pmlcJ_lo.js} +175 -175
- package/dist/{Products-CM4pI3iG.js → Products-DI-5WIs0.js} +8 -8
- package/dist/{Publish-MLYmwkhU.js → Publish-obLODJXU.js} +2 -2
- package/dist/{Recipe-CtY40lpO.js → Recipe-CmKE2qA5.js} +4 -4
- package/dist/{Scheduler-DDL5yw94.js → Scheduler-CUrw1foH.js} +2 -2
- package/dist/{SchedulerSelector.vue_vue_type_script_setup_true_lang-DkzeDjf4.js → SchedulerSelector.vue_vue_type_script_setup_true_lang-DEhsA4qf.js} +1 -1
- package/dist/ServingSequence-ClA10lGC.js +4 -0
- package/dist/{Setting-B9VYv_FV.js → Setting-ihj9Z0Ln.js} +1 -1
- package/dist/{Setting.vue_vue_type_script_setup_true_lang-q4SDPU1B.js → Setting.vue_vue_type_script_setup_true_lang-CTlqAZAz.js} +3 -3
- package/dist/{Takeaway-CDQjt5mB.js → Takeaway-CBNpejSO.js} +1 -1
- package/dist/{Takeaway-BNKH3pYw.js → Takeaway-CEOs4P5E.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-DLs6tg28.js → Takeaway.vue_vue_type_script_setup_true_lang-DhUNK_dv.js} +4 -4
- package/dist/{TaxSetting-LXV73pLm.js → TaxSetting-CVA079fp.js} +4 -4
- package/dist/{Unit-YqlS_aYJ.js → Unit-C76OzxP4.js} +2 -2
- package/dist/{Variant-Cfec4-WR.js → Variant-u7nswT69.js} +2 -2
- package/dist/{_id_-B3cTaq5i.js → _id_-BFe9fNhM.js} +6 -6
- package/dist/{app-r8ZKmdn1.js → app-CRitM2h9.js} +31 -31
- package/dist/app.js +2 -2
- package/dist/assets/{linked-status-CWjLtoRl.js → linked-status-Dk7oWtth.js} +3 -3
- package/dist/assets/{validate-menu-3nJfxanr.js → validate-menu-DTZRFWMQ.js} +3 -3
- package/dist/{catalog-Gpaw0veN.js → catalog-CfV5iAWl.js} +1 -1
- package/dist/{catalog-CIHro4Q-.js → catalog-DJ5d9ulP.js} +432 -432
- package/dist/{category-C1Nv2k2C.js → category-C3zgJIEk.js} +1 -1
- package/dist/{currency-CWaEAteR.js → currency-_tzFpUoT.js} +1 -1
- package/dist/{index-q8vb7C-b.js → index-CO2U2b81.js} +24 -24
- package/dist/{index-DiPpC8uS.js → index-EHnXhu76.js} +3 -3
- package/dist/{item-DF8-obPB.js → item-_pbcnuSu.js} +11 -11
- package/dist/{lodash-DT3SfcPy.js → lodash-BhcSIMrj.js} +1 -1
- package/dist/{menu-BtnsqPSW.js → menu-CdpCgYHx.js} +1 -1
- package/dist/{object-GEcPWoWM.js → object-BYyBc1_G.js} +1 -1
- package/dist/{scheduler-Cdw2OBBp.js → scheduler-ly3zh074.js} +4 -4
- package/dist/{takeaway-5q1fUkoY.js → takeaway-roKQTPYu.js} +4 -4
- package/dist/{toExcel-D59bd39T.js → toExcel-BGWiUPS6.js} +2 -2
- package/dist/{unit-DYZD3TgN.js → unit-C0tNkALo.js} +2 -2
- package/package.json +2 -2
- package/dist/ServingSequence-OCghftu3.js +0 -4
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { u as ye, a as De, c as ve, y as fe, F as lt, z as at, k as ie, g as ot, A as Fe, i as je } from "./app-
|
|
3
|
-
import { _ as $e } from "./SchedulerSelector.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { ref as N, computed as g, defineComponent as ce, resolveComponent as q, openBlock as b, createBlock as G, withCtx as O, createVNode as u, createElementVNode as f, toDisplayString as Q, unref as l, createElementBlock as z, Fragment as xe, renderList as Ne, createTextVNode as He, mergeModels as Ze, useModel as Je, renderSlot as he, watch as pe, h as A, withModifiers as Ve, createCommentVNode as ue, resolveDynamicComponent as Qe, normalizeStyle as Xe, normalizeClass as se, nextTick as et, watchEffect as tt } from "vue";
|
|
2
|
+
import { u as ye, a as De, c as ve, y as fe, F as lt, z as at, k as ie, g as ot, A as Fe, i as je } from "./app-CRitM2h9.js";
|
|
3
|
+
import { _ as $e } from "./SchedulerSelector.vue_vue_type_script_setup_true_lang-DEhsA4qf.js";
|
|
4
4
|
import { useI18n as Ce, useCoreStore as nt } from "@feedmepos/mf-common";
|
|
5
|
-
import { useSnackbar as Ue, useDialog as Be, components as re, FmButtonVariant as
|
|
5
|
+
import { useSnackbar as Ue, useDialog as Be, components as re, FmButtonVariant as Y, FmButtonColorThemeVariant as R, useBreakpoints as Ae } from "@feedmepos/ui-library";
|
|
6
6
|
import "vue-router";
|
|
7
|
-
import { u as ge } from "./menu-
|
|
8
|
-
import { u as Ee } from "./category-
|
|
7
|
+
import { u as ge } from "./menu-CdpCgYHx.js";
|
|
8
|
+
import { u as Ee } from "./category-C3zgJIEk.js";
|
|
9
9
|
import "./vuedraggable-WU01qJgi.js";
|
|
10
|
-
import { _ as rt, c as Ie, a as st, u as ut } from "./catalog-
|
|
11
|
-
import { _ as it } from "./takeaway-
|
|
12
|
-
import { f as ct } from "./currency-
|
|
13
|
-
import { l as be } from "./lodash-
|
|
14
|
-
import { u as Ke, m as dt } from "./item-
|
|
10
|
+
import { _ as rt, c as Ie, a as st, u as ut } from "./catalog-DJ5d9ulP.js";
|
|
11
|
+
import { _ as it } from "./takeaway-roKQTPYu.js";
|
|
12
|
+
import { f as ct } from "./currency-_tzFpUoT.js";
|
|
13
|
+
import { l as be } from "./lodash-BhcSIMrj.js";
|
|
14
|
+
import { u as Ke, m as dt } from "./item-_pbcnuSu.js";
|
|
15
15
|
import { w as mt } from "./InfoBasic.vue_vue_type_script_setup_true_lang-DxQBDu16.js";
|
|
16
|
-
import { F as pt } from "./object-
|
|
16
|
+
import { F as pt } from "./object-BYyBc1_G.js";
|
|
17
17
|
import { _ as Te } from "./TextChip.vue_vue_type_script_setup_true_lang-CNp85hoQ.js";
|
|
18
|
-
import { L as Oe } from "./LinkProductSideSheet-
|
|
18
|
+
import { L as Oe } from "./LinkProductSideSheet-BZ2c8_5d.js";
|
|
19
19
|
function vt(M, d) {
|
|
20
|
-
const m =
|
|
21
|
-
var
|
|
22
|
-
return !m.value && (!d.value || ((
|
|
20
|
+
const m = N(!0), n = g(() => {
|
|
21
|
+
var v, y;
|
|
22
|
+
return !m.value && (!d.value || ((v = d.value) == null ? void 0 : v.length) === ((y = M.value) == null ? void 0 : y.length));
|
|
23
23
|
}), F = g(() => {
|
|
24
|
-
var
|
|
25
|
-
return !!((
|
|
24
|
+
var v, y, $, _;
|
|
25
|
+
return !!((v = d.value) != null && v.length && ((y = d.value) == null ? void 0 : y.length) > 0 && (($ = d.value) == null ? void 0 : $.length) < ((_ = M.value) == null ? void 0 : _.length));
|
|
26
26
|
});
|
|
27
27
|
return { allCleared: m, allSelected: n, indeterminate: F, toggleAll: () => {
|
|
28
28
|
d.value = void 0, m.value = !m.value;
|
|
29
|
-
}, toggleOption: (
|
|
30
|
-
var $, _,
|
|
29
|
+
}, toggleOption: (v) => {
|
|
30
|
+
var $, _, W;
|
|
31
31
|
let y;
|
|
32
|
-
d.value === void 0 && m.value ? y = [
|
|
32
|
+
d.value === void 0 && m.value ? y = [v] : d.value === void 0 && !m.value ? y = ($ = M.value.map((I) => I.value)) == null ? void 0 : $.filter((I) => I !== v) : (_ = d.value) != null && _.includes(v) ? y = (W = d.value) == null ? void 0 : W.filter((I) => I !== v) : y = [...d.value || [], v], y.length === 0 ? (d.value = void 0, m.value = !0) : y.length === M.value.length ? (d.value = void 0, m.value = !1) : d.value = y;
|
|
33
33
|
} };
|
|
34
34
|
}
|
|
35
35
|
const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, Me = /* @__PURE__ */ ce({
|
|
@@ -39,18 +39,18 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
39
39
|
() => m.value.map((C) => ({ label: C.name, value: C.id }))
|
|
40
40
|
), J = g(() => r.value.filter(
|
|
41
41
|
(C) => C.label.toLowerCase().includes($.value.toLowerCase())
|
|
42
|
-
)), { t:
|
|
43
|
-
var C, c,
|
|
44
|
-
return m.value.length === ((C = n.value) == null ? void 0 : C.length) ?
|
|
45
|
-
}), $ =
|
|
42
|
+
)), { t: v } = Ce(), y = g(() => {
|
|
43
|
+
var C, c, D;
|
|
44
|
+
return m.value.length === ((C = n.value) == null ? void 0 : C.length) ? v("menu.category.selector.all") : ((c = n.value) == null ? void 0 : c.length) === 1 ? n.value[0].name : `${(D = n.value) == null ? void 0 : D.length}`;
|
|
45
|
+
}), $ = N(""), _ = g({
|
|
46
46
|
get: () => F.value,
|
|
47
47
|
set: (C) => {
|
|
48
48
|
d.selectCategory(C);
|
|
49
49
|
}
|
|
50
|
-
}), { allCleared:
|
|
50
|
+
}), { allCleared: W, allSelected: I, toggleAll: H, toggleOption: Z, indeterminate: E } = vt(r, _);
|
|
51
51
|
return (C, c) => {
|
|
52
|
-
const
|
|
53
|
-
return b(),
|
|
52
|
+
const D = q("FmIcon"), K = q("FmChip"), L = q("FmSearch"), ae = q("FmMenuItem"), X = q("FmMenu");
|
|
53
|
+
return b(), G(X, {
|
|
54
54
|
"close-on-click": !1,
|
|
55
55
|
width: "220px"
|
|
56
56
|
}, {
|
|
@@ -60,19 +60,19 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
60
60
|
class: "fm-typo-en-body-md-600 text-fm-color-neutral-gray-400"
|
|
61
61
|
}, {
|
|
62
62
|
default: O(() => [
|
|
63
|
-
f("p", null, Q(l(
|
|
64
|
-
u(
|
|
63
|
+
f("p", null, Q(l(v)("menu.category.selector.title", { label: y.value })), 1),
|
|
64
|
+
u(D, { name: "expand_more" })
|
|
65
65
|
]),
|
|
66
66
|
_: 1
|
|
67
67
|
}, 8, ["label"])
|
|
68
68
|
]),
|
|
69
69
|
default: O(() => [
|
|
70
70
|
f("div", ft, [
|
|
71
|
-
u(
|
|
71
|
+
u(L, {
|
|
72
72
|
autofocus: "",
|
|
73
73
|
modelValue: $.value,
|
|
74
|
-
"onUpdate:modelValue": c[0] || (c[0] = (
|
|
75
|
-
placeholder: l(
|
|
74
|
+
"onUpdate:modelValue": c[0] || (c[0] = (j) => $.value = j),
|
|
75
|
+
placeholder: l(v)("menu.common.actions.search")
|
|
76
76
|
}, null, 8, ["modelValue", "placeholder"])
|
|
77
77
|
]),
|
|
78
78
|
f("div", bt, [
|
|
@@ -80,17 +80,17 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
80
80
|
label: "All",
|
|
81
81
|
"has-checkbox": "",
|
|
82
82
|
"model-value": l(I),
|
|
83
|
-
indeterminate: l(
|
|
84
|
-
onClick: l(
|
|
83
|
+
indeterminate: l(E),
|
|
84
|
+
onClick: l(H)
|
|
85
85
|
}, null, 8, ["model-value", "indeterminate", "onClick"]),
|
|
86
|
-
(b(!0),
|
|
86
|
+
(b(!0), z(xe, null, Ne(J.value, (j) => {
|
|
87
87
|
var S;
|
|
88
|
-
return b(),
|
|
89
|
-
key:
|
|
90
|
-
label:
|
|
88
|
+
return b(), G(ae, {
|
|
89
|
+
key: j.value || "",
|
|
90
|
+
label: j.label,
|
|
91
91
|
"has-checkbox": "",
|
|
92
|
-
"model-value": l(I) || ((S = _.value) == null ? void 0 : S.includes(
|
|
93
|
-
onClick: (
|
|
92
|
+
"model-value": l(I) || ((S = _.value) == null ? void 0 : S.includes(j.value)),
|
|
93
|
+
onClick: (U) => l(Z)(j.value)
|
|
94
94
|
}, null, 8, ["label", "model-value", "onClick"]);
|
|
95
95
|
}), 128))
|
|
96
96
|
])
|
|
@@ -116,11 +116,11 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
116
116
|
value: F._id || null
|
|
117
117
|
})));
|
|
118
118
|
return (F, r) => {
|
|
119
|
-
const J =
|
|
120
|
-
return b(),
|
|
119
|
+
const J = q("FmSelect");
|
|
120
|
+
return b(), G(J, {
|
|
121
121
|
items: n.value,
|
|
122
122
|
modelValue: m.value,
|
|
123
|
-
"onUpdate:modelValue": r[0] || (r[0] = (
|
|
123
|
+
"onUpdate:modelValue": r[0] || (r[0] = (v) => m.value = v),
|
|
124
124
|
disabled: F.disabled
|
|
125
125
|
}, null, 8, ["items", "modelValue", "disabled"]);
|
|
126
126
|
};
|
|
@@ -128,11 +128,11 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
128
128
|
}), ze = /* @__PURE__ */ ce({
|
|
129
129
|
__name: "ImportButton",
|
|
130
130
|
setup(M) {
|
|
131
|
-
const d =
|
|
131
|
+
const d = N(!1);
|
|
132
132
|
function m() {
|
|
133
133
|
d.value = !d.value;
|
|
134
134
|
}
|
|
135
|
-
return (n, F) => (b(),
|
|
135
|
+
return (n, F) => (b(), z(xe, null, [
|
|
136
136
|
u(rt, {
|
|
137
137
|
modelValue: d.value,
|
|
138
138
|
"onUpdate:modelValue": F[0] || (F[0] = (r) => d.value = r)
|
|
@@ -206,24 +206,24 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
206
206
|
}) {
|
|
207
207
|
const m = M, {
|
|
208
208
|
t: n
|
|
209
|
-
} = Ce(), F = nt(), r = ye(), J = Ue(),
|
|
209
|
+
} = Ce(), F = nt(), r = ye(), J = Ue(), v = Be(), y = De(J), $ = je(y);
|
|
210
210
|
Ee({
|
|
211
|
-
dialog:
|
|
211
|
+
dialog: v,
|
|
212
212
|
menuLoader: $
|
|
213
213
|
});
|
|
214
214
|
const _ = Ke();
|
|
215
215
|
g(() => !r.state.currentSchedulerId);
|
|
216
|
-
const
|
|
217
|
-
g(() =>
|
|
216
|
+
const W = F.currentCountry, I = g(() => W.value ? ve.Country.getCountry(W.value) : null), H = g(() => r.rules.item);
|
|
217
|
+
g(() => Z.value.length === 1 && Z.value[0].id === null);
|
|
218
218
|
const {
|
|
219
|
-
selectedCategories:
|
|
220
|
-
} = ge(),
|
|
219
|
+
selectedCategories: Z
|
|
220
|
+
} = ge(), E = g(() => be.flatten(Z.value.map((e) => e.items))), C = d, c = N(!1);
|
|
221
221
|
pe(() => c.value, (e) => {
|
|
222
222
|
C("update:editing", e);
|
|
223
223
|
});
|
|
224
|
-
const
|
|
224
|
+
const D = (e) => {
|
|
225
225
|
ot.isBoolean(e) ? c.value = e : c.value = !c.value;
|
|
226
|
-
}, K =
|
|
226
|
+
}, K = N(""), L = g(() => E.value.filter((e) => {
|
|
227
227
|
var o;
|
|
228
228
|
return !K.value || !K.value.trim() ? !0 : `${e.code} ${e.name} ${ke(e)} ${X(e.category || null)} ${(o = fe()[e.orderFrom]) == null ? void 0 : o.label}`.toLowerCase().includes(K.value.toLowerCase());
|
|
229
229
|
})), {
|
|
@@ -231,16 +231,16 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
231
231
|
} = ge(), X = (e) => {
|
|
232
232
|
const t = ae.value.find((o) => o.id === e || e === null && o.id === "");
|
|
233
233
|
return t == null ? void 0 : t.name;
|
|
234
|
-
},
|
|
234
|
+
}, j = (e, t, o) => {
|
|
235
235
|
let a = be.clone(m.modelValue);
|
|
236
236
|
const i = a[e];
|
|
237
237
|
i && (a[e] = {
|
|
238
238
|
...i,
|
|
239
239
|
[t]: o
|
|
240
240
|
}, C("update:model-value", a));
|
|
241
|
-
}, S = be.debounce(
|
|
241
|
+
}, S = be.debounce(j, 300), U = (e) => (t) => !!t || n("menu.product.table.validation.name_required", {
|
|
242
242
|
field: e
|
|
243
|
-
}), w = (e) => e >= 0 || n("menu.product.table.validation.price_min"), V = [
|
|
243
|
+
}), w = (e) => e >= 0 || n("menu.product.table.validation.price_min"), V = [U("Name")], h = () => [(e) => w(typeof e == "number" ? e : Number(e) ?? 0)], P = fe(), B = N([{
|
|
244
244
|
accessorKey: "thumbnail",
|
|
245
245
|
header: "",
|
|
246
246
|
size: 64,
|
|
@@ -250,7 +250,7 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
250
250
|
},
|
|
251
251
|
cell: (e) => {
|
|
252
252
|
var t, o;
|
|
253
|
-
return
|
|
253
|
+
return A(Ie, {
|
|
254
254
|
src: e.getValue(),
|
|
255
255
|
alt: (o = (t = e == null ? void 0 : e.row) == null ? void 0 : t.original) == null ? void 0 : o.name,
|
|
256
256
|
className: "my-8 mx-12",
|
|
@@ -267,8 +267,8 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
267
267
|
const t = e.row.original, o = e.getValue() || "--";
|
|
268
268
|
if (!c.value) return o;
|
|
269
269
|
const a = _e(t._id);
|
|
270
|
-
return
|
|
271
|
-
disabled: !
|
|
270
|
+
return A(re.FmTextField, {
|
|
271
|
+
disabled: !H.value.code,
|
|
272
272
|
modelValue: a == null ? void 0 : a.code,
|
|
273
273
|
placeholder: m.modelValue[t._id].fallbackCode,
|
|
274
274
|
"onUpdate:modelValue": (i) => {
|
|
@@ -283,8 +283,8 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
283
283
|
size: 240,
|
|
284
284
|
cell: (e) => {
|
|
285
285
|
const t = e.row.original, o = e.getValue();
|
|
286
|
-
return c.value ?
|
|
287
|
-
disabled: !
|
|
286
|
+
return c.value ? A(re.FmTextField, {
|
|
287
|
+
disabled: !H.value.name,
|
|
288
288
|
modelValue: t.name,
|
|
289
289
|
"onUpdate:modelValue": (a) => {
|
|
290
290
|
S(t._id, "name", a);
|
|
@@ -311,7 +311,7 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
311
311
|
const t = e.getValue();
|
|
312
312
|
if (!c.value) return ve.Dinero.fromFdoDinero(t).toFormat();
|
|
313
313
|
const o = m.modelValue[e.row.original._id], a = o.fallbackPrice;
|
|
314
|
-
return
|
|
314
|
+
return A(it, {
|
|
315
315
|
min: 0,
|
|
316
316
|
disabled: !o.editPrice,
|
|
317
317
|
// @ts-ignore
|
|
@@ -319,7 +319,7 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
319
319
|
modelValue: (i = _e(o._id)) == null ? void 0 : i.price,
|
|
320
320
|
// @ts-ignore
|
|
321
321
|
"onUpdate:modelValue": (k) => {
|
|
322
|
-
|
|
322
|
+
j(o._id, "price", k);
|
|
323
323
|
},
|
|
324
324
|
rules: h()
|
|
325
325
|
});
|
|
@@ -337,8 +337,8 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
337
337
|
if (!c.value)
|
|
338
338
|
return `${k != null && k.meta.rate ? lt(k.meta.rate) : 0}%`;
|
|
339
339
|
const s = r.getSelectedTax(t, o.fallbackTaxes, r.taxSetting.countryTaxOptions);
|
|
340
|
-
return
|
|
341
|
-
disabled: !
|
|
340
|
+
return A(re.FmSelect, {
|
|
341
|
+
disabled: !H.value.tax,
|
|
342
342
|
items: r.taxSetting.countryTaxOptions,
|
|
343
343
|
modelValue: s,
|
|
344
344
|
"onUpdate:modelValue": async (le) => {
|
|
@@ -354,7 +354,7 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
354
354
|
size: 140,
|
|
355
355
|
cell: (e) => {
|
|
356
356
|
const t = e.row.original;
|
|
357
|
-
return c.value ?
|
|
357
|
+
return c.value ? A(gt, {
|
|
358
358
|
"model-value": m.modelValue[t._id].category,
|
|
359
359
|
disabled: !!(r.state.currentCatalogId || r.state.currentSchedulerId),
|
|
360
360
|
"onUpdate:modelValue": async (o) => {
|
|
@@ -367,21 +367,21 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
367
367
|
header: () => n("menu.product.table.columns.order_from"),
|
|
368
368
|
enableSorting: !0,
|
|
369
369
|
sortingFn: (e, t) => {
|
|
370
|
-
const [o, a] = [e, t].map((i) =>
|
|
370
|
+
const [o, a] = [e, t].map((i) => P[i.original.orderFrom].sortingIndex);
|
|
371
371
|
return o - a;
|
|
372
372
|
},
|
|
373
373
|
size: 110,
|
|
374
374
|
cell: (e) => {
|
|
375
375
|
var i, k;
|
|
376
376
|
const t = e.getValue(), o = e.row.original, a = fe();
|
|
377
|
-
return c.value ?
|
|
378
|
-
disabled: !
|
|
377
|
+
return c.value ? A(re.FmSelect, {
|
|
378
|
+
disabled: !H.value.orderFrom,
|
|
379
379
|
items: Object.values(fe()),
|
|
380
380
|
modelValue: t,
|
|
381
381
|
"onUpdate:modelValue": async (s) => {
|
|
382
|
-
|
|
382
|
+
j(o._id, "orderFrom", s);
|
|
383
383
|
}
|
|
384
|
-
}) :
|
|
384
|
+
}) : A(Te, {
|
|
385
385
|
label: (i = a[t]) == null ? void 0 : i.label,
|
|
386
386
|
variant: (k = a[t]) == null ? void 0 : k.variant
|
|
387
387
|
});
|
|
@@ -394,24 +394,24 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
394
394
|
headerClass: "py-4",
|
|
395
395
|
textAlign: "right"
|
|
396
396
|
},
|
|
397
|
-
header: () =>
|
|
397
|
+
header: () => A("div", {
|
|
398
398
|
class: "w-full px-4 flex justify-end"
|
|
399
|
-
}, [mt(
|
|
400
|
-
variant:
|
|
401
|
-
textColor:
|
|
399
|
+
}, [mt(A(re.FmButton, {
|
|
400
|
+
variant: Y.Tertiary,
|
|
401
|
+
textColor: R.NeutralGray400,
|
|
402
402
|
prependIcon: "edit",
|
|
403
403
|
class: "flex justify-end",
|
|
404
|
-
onClick:
|
|
404
|
+
onClick: D,
|
|
405
405
|
type: "button"
|
|
406
406
|
}), "Bulk edit")]),
|
|
407
407
|
cell: (e) => {
|
|
408
408
|
const t = e.row.original;
|
|
409
|
-
return
|
|
409
|
+
return A("div", {
|
|
410
410
|
class: "px-4 flex justify-end"
|
|
411
|
-
}, [
|
|
411
|
+
}, [A(re.FmButton, {
|
|
412
412
|
icon: "delete",
|
|
413
413
|
variant: "tertiary",
|
|
414
|
-
textColor:
|
|
414
|
+
textColor: R.NeutralGray400,
|
|
415
415
|
onClick: Ve(async () => {
|
|
416
416
|
await _.deleteItem([{
|
|
417
417
|
_id: t._id,
|
|
@@ -422,17 +422,17 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
422
422
|
})]);
|
|
423
423
|
}
|
|
424
424
|
}]);
|
|
425
|
-
r.taxSetting.systemCode ||
|
|
426
|
-
const x =
|
|
425
|
+
r.taxSetting.systemCode || B.value.splice(4, 1);
|
|
426
|
+
const x = N({}), p = N([]);
|
|
427
427
|
pe(() => x.value, (e) => {
|
|
428
428
|
let t = [];
|
|
429
429
|
Object.keys(e).forEach((o) => {
|
|
430
|
-
e[o] ? t.push(
|
|
431
|
-
}),
|
|
432
|
-
}), pe(() =>
|
|
433
|
-
x.value = {},
|
|
430
|
+
e[o] ? t.push(L.value[parseInt(o)]) : p.value = t.filter((i) => i !== L.value[parseInt(o)]);
|
|
431
|
+
}), p.value = t, console.log("selectedItems", p.value);
|
|
432
|
+
}), pe(() => E.value, () => {
|
|
433
|
+
x.value = {}, p.value = [];
|
|
434
434
|
}), pe(() => c.value, () => {
|
|
435
|
-
x.value = {},
|
|
435
|
+
x.value = {}, p.value = [];
|
|
436
436
|
});
|
|
437
437
|
const ee = () => {
|
|
438
438
|
x.value = {};
|
|
@@ -451,10 +451,10 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
451
451
|
taxes: a.taxes,
|
|
452
452
|
category: t(a.category || null)
|
|
453
453
|
}));
|
|
454
|
-
await _.updateMany(o),
|
|
454
|
+
await _.updateMany(o), D(!1);
|
|
455
455
|
}
|
|
456
456
|
const oe = async () => {
|
|
457
|
-
await _.deleteItem(
|
|
457
|
+
await _.deleteItem(p.value.map((e) => ({
|
|
458
458
|
_id: e._id,
|
|
459
459
|
name: e.name,
|
|
460
460
|
thumbnail: e.thumbnail
|
|
@@ -462,21 +462,21 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
462
462
|
}, te = () => {
|
|
463
463
|
C("reset:model-value");
|
|
464
464
|
}, ne = () => {
|
|
465
|
-
Object.entries(m.modelValue).some(([t, o]) => Fe(o, m.originalValue[t])) ?
|
|
465
|
+
Object.entries(m.modelValue).some(([t, o]) => Fe(o, m.originalValue[t])) ? v.open({
|
|
466
466
|
title: "You have unsaved changes!",
|
|
467
467
|
message: "Are you sure you want to discard? You will lose all the changes if discard edit.",
|
|
468
468
|
primaryActions: {
|
|
469
469
|
text: "Discard",
|
|
470
470
|
close: !0,
|
|
471
|
-
variant:
|
|
471
|
+
variant: Y.Destructive
|
|
472
472
|
},
|
|
473
473
|
secondaryActions: {
|
|
474
474
|
text: "Cancel",
|
|
475
475
|
close: !0
|
|
476
476
|
}
|
|
477
477
|
}).onPrimary(() => {
|
|
478
|
-
te(),
|
|
479
|
-
}) : (
|
|
478
|
+
te(), D(!1);
|
|
479
|
+
}) : (D(!1), te());
|
|
480
480
|
}, de = g(() => ({
|
|
481
481
|
thumbnail: !c.value,
|
|
482
482
|
actions: !c.value
|
|
@@ -511,26 +511,26 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
511
511
|
_id: o
|
|
512
512
|
};
|
|
513
513
|
return ((a = i == null ? void 0 : i.items) == null ? void 0 : a.filter((s) => s._id === e))[0];
|
|
514
|
-
} else return t ? t.override.items[e][0] : o ? r.schedulers.find((s) => s._id === o).items.filter((s) => s._id === e)[0] :
|
|
514
|
+
} else return t ? t.override.items[e][0] : o ? r.schedulers.find((s) => s._id === o).items.filter((s) => s._id === e)[0] : E.value.find((i) => i._id === e);
|
|
515
515
|
}
|
|
516
|
-
const Ge = Ae(), qe = g(() => Ge.breakpoints.value.xs), Se =
|
|
516
|
+
const Ge = Ae(), qe = g(() => Ge.breakpoints.value.xs), Se = N(null), We = at(Se), Ye = g(() => {
|
|
517
517
|
var t;
|
|
518
518
|
return {
|
|
519
519
|
height: `calc(100vh - ${((t = We.value) == null ? void 0 : t.top) + 24}px)`
|
|
520
520
|
};
|
|
521
521
|
});
|
|
522
522
|
return (e, t) => {
|
|
523
|
-
const o =
|
|
524
|
-
return qe.value ? (b(),
|
|
523
|
+
const o = q("fm-search"), a = q("fm-button"), i = q("fm-table"), k = q("fm-form");
|
|
524
|
+
return qe.value ? (b(), z("div", Ft, [f("div", $t, [f("div", It, [u(o, {
|
|
525
525
|
"model-value": K.value,
|
|
526
526
|
"onUpdate:modelValue": t[4] || (t[4] = (s) => K.value = s),
|
|
527
527
|
autofocus: "",
|
|
528
528
|
placeholder: l(n)("menu.product.table.search.placeholder")
|
|
529
529
|
}, null, 8, ["model-value", "placeholder"])]), t[6] || (t[6] = f("div", {
|
|
530
530
|
class: "w-full h-[1px] bg-fm-color-neutral-gray-100"
|
|
531
|
-
}, null, -1)), f("div", Tt, [he(e.$slots, "filter")])]),
|
|
531
|
+
}, null, -1)), f("div", Tt, [he(e.$slots, "filter")])]), E.value.length ? (b(), z("div", Ot, [(b(!0), z(xe, null, Ne(L.value, (s) => {
|
|
532
532
|
var le, me, we;
|
|
533
|
-
return b(),
|
|
533
|
+
return b(), z("div", {
|
|
534
534
|
key: s._id,
|
|
535
535
|
class: "max-w-full py-12 px-16 space-x-16 flex items-center",
|
|
536
536
|
onClick: () => Le(s)
|
|
@@ -539,11 +539,11 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
539
539
|
size: 72,
|
|
540
540
|
src: s.thumbnail
|
|
541
541
|
}, null, 8, ["alt", "src"]), f("div", zt, [f("div", Nt, [f("p", Dt, Q(s.name), 1), u(Te, {
|
|
542
|
-
label: (le = l(
|
|
543
|
-
variant: (me = l(
|
|
542
|
+
label: (le = l(P)[s.orderFrom || ""]) == null ? void 0 : le.label,
|
|
543
|
+
variant: (me = l(P)[s.orderFrom || ""]) == null ? void 0 : me.variant
|
|
544
544
|
}, null, 8, ["label", "variant"])]), f("p", jt, Q(ke(s)), 1), f("p", Ut, Q(l(n)("menu.product.table.columns.code")) + ": " + Q(((we = _e(s._id)) == null ? void 0 : we.code) || "--"), 1), f("p", Bt, Q(l(n)("menu.product.table.columns.category")) + ": " + Q(X(s.category || null)), 1)])]), u(a, {
|
|
545
|
-
"text-color": l(
|
|
546
|
-
variant: l(
|
|
545
|
+
"text-color": l(R).NeutralGray400,
|
|
546
|
+
variant: l(Y).Tertiary,
|
|
547
547
|
"prepend-icon": "delete",
|
|
548
548
|
onClick: Ve(() => l(_).deleteItem([{
|
|
549
549
|
_id: s._id,
|
|
@@ -551,12 +551,12 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
551
551
|
thumbnail: s.thumbnail
|
|
552
552
|
}]), ["stop"])
|
|
553
553
|
}, null, 8, ["text-color", "variant", "onClick"])], 8, Mt);
|
|
554
|
-
}), 128))])) : (b(),
|
|
554
|
+
}), 128))])) : (b(), z("div", At, [u(ie, {
|
|
555
555
|
subtitle: l(n)("menu.product.table.empty.subtitle"),
|
|
556
556
|
title: l(n)("menu.product.table.empty.title")
|
|
557
557
|
}, {
|
|
558
558
|
action: O(() => [f("div", Et, [u(a, {
|
|
559
|
-
variant: l(
|
|
559
|
+
variant: l(Y).Primary,
|
|
560
560
|
label: l(n)("menu.product.table.empty.actions.add"),
|
|
561
561
|
"prepend-icon": "add",
|
|
562
562
|
onClick: t[5] || (t[5] = (s) => l(_).create(null))
|
|
@@ -564,9 +564,9 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
564
564
|
default: O(({
|
|
565
565
|
trigger: s
|
|
566
566
|
}) => [u(a, {
|
|
567
|
-
"bg-color": l(
|
|
568
|
-
"text-color": l(
|
|
569
|
-
variant: l(
|
|
567
|
+
"bg-color": l(R).NeutralGray100,
|
|
568
|
+
"text-color": l(R).NeutralGray400,
|
|
569
|
+
variant: l(Y).Primary,
|
|
570
570
|
label: l(n)("menu.product.table.empty.actions.import"),
|
|
571
571
|
"prepend-icon": "download",
|
|
572
572
|
onClick: s
|
|
@@ -574,7 +574,7 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
574
574
|
_: 1
|
|
575
575
|
})])]),
|
|
576
576
|
_: 1
|
|
577
|
-
}, 8, ["subtitle", "title"])]))])) : (b(),
|
|
577
|
+
}, 8, ["subtitle", "title"])]))])) : (b(), G(k, {
|
|
578
578
|
key: 0,
|
|
579
579
|
"blame-form-child-on-validation-failed": "",
|
|
580
580
|
class: "flex flex-col flex-1 space-y-8 overflow-hidden",
|
|
@@ -585,39 +585,39 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
585
585
|
"onUpdate:modelValue": t[0] || (t[0] = (s) => K.value = s),
|
|
586
586
|
autofocus: "",
|
|
587
587
|
placeholder: l(n)("menu.product.table.search.placeholder")
|
|
588
|
-
}, null, 8, ["model-value", "placeholder"])])]),
|
|
589
|
-
count:
|
|
588
|
+
}, null, 8, ["model-value", "placeholder"])])]), E.value.length ? (b(), z("div", xt, [p.value.length && !c.value ? (b(), z("div", Ct, [f("p", kt, Q(l(n)("menu.product.table.selection.count", {
|
|
589
|
+
count: p.value.length
|
|
590
590
|
})), 1), u(a, {
|
|
591
591
|
label: l(n)("menu.product.table.selection.actions.deselect_all"),
|
|
592
592
|
type: "button",
|
|
593
593
|
variant: "plain",
|
|
594
594
|
onClick: ee
|
|
595
595
|
}, null, 8, ["label"]), u(a, {
|
|
596
|
-
"border-color": l(
|
|
597
|
-
"text-color": l(
|
|
596
|
+
"border-color": l(R).SystemError300,
|
|
597
|
+
"text-color": l(R).SystemError300,
|
|
598
598
|
class: "ml-auto",
|
|
599
599
|
label: l(n)("menu.product.table.selection.actions.remove"),
|
|
600
600
|
"prepend-icon": "delete",
|
|
601
601
|
variant: "secondary",
|
|
602
602
|
onClick: oe
|
|
603
|
-
}, null, 8, ["border-color", "text-color", "label"])])) : ue("", !0), c.value ? (b(),
|
|
604
|
-
variant: l(
|
|
603
|
+
}, null, 8, ["border-color", "text-color", "label"])])) : ue("", !0), c.value ? (b(), z("div", St, [u(a, {
|
|
604
|
+
variant: l(Y).Tertiary,
|
|
605
605
|
label: l(n)("menu.product.table.bulk_edit.actions.reset_all"),
|
|
606
606
|
onClick: te
|
|
607
607
|
}, null, 8, ["variant", "label"]), u(a, {
|
|
608
|
-
variant: l(
|
|
608
|
+
variant: l(Y).Tertiary,
|
|
609
609
|
label: l(n)("menu.common.actions.cancel"),
|
|
610
610
|
onClick: ne
|
|
611
611
|
}, null, 8, ["variant", "label"]), u(a, {
|
|
612
|
-
borderColor: l(
|
|
613
|
-
textColor: l(
|
|
614
|
-
variant: l(
|
|
612
|
+
borderColor: l(R).ColorPrimary,
|
|
613
|
+
textColor: l(R).ColorPrimary,
|
|
614
|
+
variant: l(Y).Secondary,
|
|
615
615
|
label: l(n)("menu.product.table.bulk_edit.actions.save"),
|
|
616
616
|
type: "submit"
|
|
617
617
|
}, null, 8, ["borderColor", "textColor", "variant", "label"])])) : ue("", !0), f("div", {
|
|
618
618
|
ref_key: "tableWrapper",
|
|
619
619
|
ref: Se
|
|
620
|
-
}, [(b(),
|
|
620
|
+
}, [(b(), G(Qe(c.value ? pt : "div"), {
|
|
621
621
|
title: l(n)("menu.product.table.bulk_edit.title"),
|
|
622
622
|
show: c.value,
|
|
623
623
|
"primary-action": {
|
|
@@ -641,11 +641,11 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
641
641
|
}),
|
|
642
642
|
modelValue: x.value,
|
|
643
643
|
"onUpdate:modelValue": t[1] || (t[1] = (s) => x.value = s),
|
|
644
|
-
"column-defs":
|
|
644
|
+
"column-defs": B.value,
|
|
645
645
|
"column-visibility": de.value,
|
|
646
646
|
loading: e.isCalculating,
|
|
647
|
-
"page-size":
|
|
648
|
-
"row-data":
|
|
647
|
+
"page-size": E.value.length,
|
|
648
|
+
"row-data": L.value,
|
|
649
649
|
selection: c.value ? void 0 : "multiple",
|
|
650
650
|
"shrink-at": !1,
|
|
651
651
|
"hide-footer": "",
|
|
@@ -653,12 +653,12 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
653
653
|
onRowClick: t[2] || (t[2] = (s) => c.value ? void 0 : Re(s))
|
|
654
654
|
}, null, 8, ["class", "modelValue", "column-defs", "column-visibility", "loading", "page-size", "row-data", "selection"])]),
|
|
655
655
|
_: 1
|
|
656
|
-
}, 40, ["title", "show", "primary-action", "secondary-actions", "style"]))], 512)])) : (b(),
|
|
656
|
+
}, 40, ["title", "show", "primary-action", "secondary-actions", "style"]))], 512)])) : (b(), z("div", wt, [u(ie, {
|
|
657
657
|
subtitle: l(n)("menu.product.table.empty.subtitle"),
|
|
658
658
|
title: l(n)("menu.product.table.empty.title")
|
|
659
659
|
}, {
|
|
660
660
|
action: O(() => [f("div", Vt, [u(a, {
|
|
661
|
-
variant: l(
|
|
661
|
+
variant: l(Y).Primary,
|
|
662
662
|
label: l(n)("menu.product.table.empty.actions.add"),
|
|
663
663
|
"prepend-icon": "add",
|
|
664
664
|
onClick: t[3] || (t[3] = (s) => l(_).create(null))
|
|
@@ -666,9 +666,9 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
666
666
|
default: O(({
|
|
667
667
|
trigger: s
|
|
668
668
|
}) => [u(a, {
|
|
669
|
-
"bg-color": l(
|
|
670
|
-
"text-color": l(
|
|
671
|
-
variant: l(
|
|
669
|
+
"bg-color": l(R).NeutralGray100,
|
|
670
|
+
"text-color": l(R).NeutralGray400,
|
|
671
|
+
variant: l(Y).Primary,
|
|
672
672
|
label: l(n)("menu.product.table.empty.actions.import"),
|
|
673
673
|
"prepend-icon": "download",
|
|
674
674
|
onClick: s
|
|
@@ -697,87 +697,87 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
697
697
|
dialog: d,
|
|
698
698
|
menuLoader: F
|
|
699
699
|
});
|
|
700
|
-
const r = ye(), J = g(() => r.rules.item),
|
|
701
|
-
var w, V, h,
|
|
700
|
+
const r = ye(), J = g(() => r.rules.item), v = st(), y = Ke(), $ = ut(), _ = g(() => !r.state.currentCatalogId), W = g(() => r.rules.item), I = g(() => !r.state.currentSchedulerId), H = N(!1), Z = N(!1), E = g(() => {
|
|
701
|
+
var w, V, h, P;
|
|
702
702
|
if (_.value && I.value) return;
|
|
703
703
|
if (I.value) {
|
|
704
|
-
const
|
|
705
|
-
return
|
|
704
|
+
const B = (w = r.currentCatalog) == null ? void 0 : w.override.items;
|
|
705
|
+
return B ? Object.entries(B).reduce((x, [p, ee]) => {
|
|
706
706
|
const T = ee.find((oe) => !oe.combinationKey);
|
|
707
|
-
return T && (x[
|
|
707
|
+
return T && (x[p] = T), x;
|
|
708
708
|
}, {}) : {};
|
|
709
709
|
}
|
|
710
|
-
return ((_.value ? (V = r.currentScheduler) == null ? void 0 : V.items : (
|
|
711
|
-
}), C =
|
|
712
|
-
var
|
|
713
|
-
|
|
714
|
-
const
|
|
710
|
+
return ((_.value ? (V = r.currentScheduler) == null ? void 0 : V.items : (P = (h = r.currentCatalog) == null ? void 0 : h.override.scheduler[r.state.currentSchedulerId]) == null ? void 0 : P.items) ?? []).reduce((B, x) => (x.combinationKey || (B[x._id] = x), B), {});
|
|
711
|
+
}), C = N({}), c = N({}), D = async () => {
|
|
712
|
+
var P, B;
|
|
713
|
+
Z.value = !0;
|
|
714
|
+
const U = !!E.value, w = be.flatten(L.value.map((x) => x.items)), V = U && H.value ? await dt(
|
|
715
715
|
r.mergedMenu,
|
|
716
716
|
w,
|
|
717
717
|
r.state.menu,
|
|
718
|
-
(
|
|
719
|
-
(
|
|
718
|
+
(P = r.currentCatalog) == null ? void 0 : P._id,
|
|
719
|
+
(B = r.currentScheduler) == null ? void 0 : B._id,
|
|
720
720
|
!1
|
|
721
|
-
) : void 0, h = w.reduce((x,
|
|
721
|
+
) : void 0, h = w.reduce((x, p, ee) => {
|
|
722
722
|
var oe, te, ne, de;
|
|
723
|
-
const T = (oe =
|
|
724
|
-
return x[
|
|
725
|
-
_id:
|
|
726
|
-
name:
|
|
727
|
-
code:
|
|
728
|
-
category:
|
|
729
|
-
price:
|
|
730
|
-
orderFrom:
|
|
731
|
-
taxes:
|
|
732
|
-
thumbnail:
|
|
723
|
+
const T = (oe = E.value) == null ? void 0 : oe[p._id];
|
|
724
|
+
return x[p._id] = {
|
|
725
|
+
_id: p._id,
|
|
726
|
+
name: p.name,
|
|
727
|
+
code: U ? T == null ? void 0 : T.code : p == null ? void 0 : p.code,
|
|
728
|
+
category: p.category,
|
|
729
|
+
price: U && W.value.editPrice ? T == null ? void 0 : T.price : p.price,
|
|
730
|
+
orderFrom: U ? T == null ? void 0 : T.orderFrom : p.orderFrom,
|
|
731
|
+
taxes: U ? null : p.taxes,
|
|
732
|
+
thumbnail: p.thumbnail,
|
|
733
733
|
fallbackPrice: (te = V == null ? void 0 : V[ee]) == null ? void 0 : te.price,
|
|
734
|
-
fallbackName:
|
|
734
|
+
fallbackName: U ? p.name : void 0,
|
|
735
735
|
fallbackCode: (ne = V == null ? void 0 : V[ee]) == null ? void 0 : ne.code,
|
|
736
736
|
fallbackOrder: (de = V == null ? void 0 : V[ee]) == null ? void 0 : de.orderFrom,
|
|
737
|
-
fallbackTaxes:
|
|
737
|
+
fallbackTaxes: U ? p.taxes : null
|
|
738
738
|
}, x;
|
|
739
739
|
}, {});
|
|
740
|
-
C.value = h, c.value = { ...h },
|
|
741
|
-
}, { categories: K, selectedCategories:
|
|
740
|
+
C.value = h, c.value = { ...h }, Z.value = !1;
|
|
741
|
+
}, { categories: K, selectedCategories: L } = ge();
|
|
742
742
|
tt(async () => {
|
|
743
|
-
|
|
743
|
+
L.value && await D();
|
|
744
744
|
});
|
|
745
745
|
function ae() {
|
|
746
746
|
y.create(null);
|
|
747
747
|
}
|
|
748
748
|
const X = () => {
|
|
749
|
-
|
|
750
|
-
},
|
|
751
|
-
g(() =>
|
|
749
|
+
L.value && D();
|
|
750
|
+
}, j = Ae();
|
|
751
|
+
g(() => j.breakpoints.value.xs);
|
|
752
752
|
const { t: S } = Ce();
|
|
753
|
-
return (
|
|
754
|
-
const V =
|
|
755
|
-
return l(K).length ? (b(),
|
|
753
|
+
return (U, w) => {
|
|
754
|
+
const V = q("fm-button");
|
|
755
|
+
return l(K).length ? (b(), z("div", Lt, [
|
|
756
756
|
f("div", Rt, [
|
|
757
757
|
f("div", Gt, [
|
|
758
|
-
l(
|
|
758
|
+
l(L) ? (b(), G(Kt, {
|
|
759
759
|
key: 0,
|
|
760
|
-
"is-calculating":
|
|
760
|
+
"is-calculating": Z.value,
|
|
761
761
|
"model-value": C.value,
|
|
762
762
|
"original-value": c.value,
|
|
763
763
|
"onUpdate:modelValue": w[0] || (w[0] = (h) => C.value = h),
|
|
764
764
|
"onReset:modelValue": X,
|
|
765
|
-
"onUpdate:editing": w[1] || (w[1] = (h) =>
|
|
765
|
+
"onUpdate:editing": w[1] || (w[1] = (h) => H.value = h)
|
|
766
766
|
}, {
|
|
767
767
|
filter: O(() => [
|
|
768
768
|
u(Me),
|
|
769
|
-
|
|
769
|
+
W.value.multiScheduler ? (b(), G($e, { key: 0 })) : ue("", !0)
|
|
770
770
|
]),
|
|
771
771
|
_: 1
|
|
772
772
|
}, 8, ["is-calculating", "model-value", "original-value"])) : ue("", !0)
|
|
773
773
|
])
|
|
774
774
|
])
|
|
775
|
-
])) : (b(),
|
|
775
|
+
])) : (b(), z("div", qt, [
|
|
776
776
|
f("div", Wt, [
|
|
777
777
|
u(Me),
|
|
778
|
-
|
|
778
|
+
W.value.multiScheduler ? (b(), G($e, { key: 0 })) : ue("", !0)
|
|
779
779
|
]),
|
|
780
|
-
J.value.create ? (b(),
|
|
780
|
+
J.value.create ? (b(), G(ie, {
|
|
781
781
|
key: 0,
|
|
782
782
|
action: {
|
|
783
783
|
text: l(S)("menu.product.empty.with_create.action"),
|
|
@@ -785,7 +785,7 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
785
785
|
},
|
|
786
786
|
subtitle: l(S)("menu.product.empty.with_create.subtitle"),
|
|
787
787
|
title: l(S)("menu.product.empty.with_create.title")
|
|
788
|
-
}, null, 8, ["action", "subtitle", "title"])) : I.value ? (b(),
|
|
788
|
+
}, null, 8, ["action", "subtitle", "title"])) : I.value ? (b(), G(ie, {
|
|
789
789
|
key: 1,
|
|
790
790
|
subtitle: l(S)("menu.product.empty.no_scheduler.subtitle"),
|
|
791
791
|
title: l(S)("menu.product.empty.no_scheduler.title")
|
|
@@ -795,7 +795,7 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
795
795
|
"categorized-items": l($).linkableItems.value,
|
|
796
796
|
"initial-value": l($).currentItems.value,
|
|
797
797
|
"show-variant": !1,
|
|
798
|
-
onSubmit: w[2] || (w[2] = (h) => l($).applyProduct(h.map((
|
|
798
|
+
onSubmit: w[2] || (w[2] = (h) => l($).applyProduct(h.map((P) => P._id)))
|
|
799
799
|
}, {
|
|
800
800
|
default: O(({ trigger: h }) => [
|
|
801
801
|
u(V, {
|
|
@@ -808,17 +808,17 @@ const ft = { class: "p-4" }, bt = { class: "flex-1 overflow-y-auto min-h-0" }, M
|
|
|
808
808
|
}, 8, ["categorized-items", "initial-value"])
|
|
809
809
|
]),
|
|
810
810
|
_: 1
|
|
811
|
-
}, 8, ["subtitle", "title"])) : (b(),
|
|
811
|
+
}, 8, ["subtitle", "title"])) : (b(), G(ie, {
|
|
812
812
|
key: 2,
|
|
813
813
|
subtitle: l(S)("menu.product.empty.with_scheduler.subtitle"),
|
|
814
814
|
title: l(S)("menu.product.empty.with_scheduler.title")
|
|
815
815
|
}, {
|
|
816
816
|
action: O(() => [
|
|
817
817
|
u(Oe, {
|
|
818
|
-
"categorized-items": l(
|
|
819
|
-
"initial-value": l(
|
|
818
|
+
"categorized-items": l(v).linkableItems.value,
|
|
819
|
+
"initial-value": l(v).currentItems.value,
|
|
820
820
|
"show-variant": !1,
|
|
821
|
-
onSubmit: w[3] || (w[3] = (h) => l(
|
|
821
|
+
onSubmit: w[3] || (w[3] = (h) => l(v).applyProduct(h.map((P) => P._id)))
|
|
822
822
|
}, {
|
|
823
823
|
default: O(({ trigger: h }) => [
|
|
824
824
|
u(V, {
|