@feedmepos/mf-menu 0.31.16-beta.1 → 0.31.17-beta.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-Bsppf5CN.js → App-BUjwToat.js} +5 -5
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-DTuPAGEJ.js → ApplyProduct.vue_vue_type_script_setup_true_lang-CBPOCkmg.js} +2 -2
- package/dist/{Catalog-Bj3MNcLG.js → Catalog-BkfsckOV.js} +18 -18
- package/dist/{Category-CHvG2e6b.js → Category-C7EPAK0G.js} +36 -36
- package/dist/{Category-WLIH1Zyc.js → Category-DTKlxBpE.js} +24 -24
- package/dist/{CookingGuide-C8N45xnL.js → CookingGuide-DCazfCuz.js} +56 -56
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-GriZxAIw.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-2hApsFMq.js} +1 -1
- package/dist/{Group-CR3LWKXE.js → Group-DLjkPLk9.js} +1 -1
- package/dist/{Group-Byj3qEBv.js → Group-DNBFvwk-.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-tecpeqJT.js → Group.vue_vue_type_script_setup_true_lang-8Upt5al2.js} +54 -54
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BkLHDcZV.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BIWySrgb.js} +6 -6
- package/dist/ImportProductDialog.vue_vue_type_script_setup_true_lang-YOzhk0a0.js +96257 -0
- package/dist/{Ingredient-BCfCDCFS.js → Ingredient-BUIIhzYV.js} +52 -52
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CpXnjduY.js → InventoryBinding.vue_vue_type_script_setup_true_lang-nqY-pxrW.js} +1052 -1052
- package/dist/{LinkProductSideSheet-BGlLnnm9.js → LinkProductSideSheet-xIuPAwp7.js} +14 -14
- package/dist/{MenuSetting-CdKhTxyc.js → MenuSetting-C3J66nHM.js} +11 -11
- package/dist/{PrintRoute-B-UlUlSD.js → PrintRoute-DnZrJ9IW.js} +26 -26
- package/dist/{Product-BggNPOwm.js → Product-jBcyCvO7.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-DPOaafZ-.js → Product.vue_vue_type_script_setup_true_lang-CsaY9Kve.js} +113 -113
- package/dist/ProductInternalTools-CUZSrxvR.js +415 -0
- package/dist/Products-CRFXG-Du.js +270 -0
- package/dist/{Publish-BTPdN1Ub.js → Publish-Ch5QlJ9v.js} +37 -37
- package/dist/{Recipe-CibJRxHH.js → Recipe-BZJUndG3.js} +25 -25
- package/dist/{Scheduler-DAShXnol.js → Scheduler-BgMTPzhG.js} +13 -13
- package/dist/{ServingSequence-DFs7VR5V.js → ServingSequence-BISPWfTD.js} +36 -36
- package/dist/{Setting-aApApOKZ.js → Setting-4L-p0np0.js} +24 -24
- package/dist/{Subcategory-CGnGq5Kd.js → Subcategory-CptCl4cb.js} +39 -39
- package/dist/{Takeaway-rJDqoozq.js → Takeaway-BAM3XfIf.js} +1 -1
- package/dist/{Takeaway-C8M-Z4eK.js → Takeaway-DqiGDTfg.js} +12 -12
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-CrFeCwvr.js → Takeaway.vue_vue_type_script_setup_true_lang-oZo0esEd.js} +25 -25
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CCVSPoDB.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-C7QOuqzZ.js} +115 -115
- package/dist/{Unit-CcWjE73k.js → Unit-BYAvg037.js} +8 -8
- package/dist/{Variant-BDPjFaAa.js → Variant-uGUG4vH2.js} +18 -18
- package/dist/{_id_-mUBoDBKS.js → _id_-Uf140OcM.js} +19 -19
- package/dist/{app-BBoQR7rs.js → app-50bXo6rU.js} +262 -247
- package/dist/{app-sdhJyRKX.js → app-CUuWtEOn.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +12 -0
- package/dist/apps/mf-menu/src/components/import/PreviewAddonContent.vue.d.ts +1618 -0
- package/dist/apps/mf-menu/src/components/productInternalTools/ImageUpdatePreview.vue.d.ts +33 -0
- package/dist/apps/mf-menu/src/components/productInternalTools/ImageUploadDialog.vue.d.ts +28 -0
- package/dist/apps/mf-menu/src/helper/import-export.d.ts +15 -19
- package/dist/apps/mf-menu/src/utils/batchProcessor.d.ts +33 -0
- package/dist/apps/mf-menu/src/utils/images.d.ts +44 -0
- package/dist/apps/mf-menu/src/views/Product/ProductInternalTools.vue.d.ts +2 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-BkX3Y-ws.js → linked-status-Dsak7omL.js} +2 -2
- package/dist/assets/{override-menu-Bo0ZNZ-U.js → override-menu-COqLF5sS.js} +2 -2
- package/dist/assets/{validate-menu-CIWz9YXT.js → validate-menu-DkLBw23v.js} +2 -2
- package/dist/{catalog-BbukcamZ.js → catalog-x_NpHc5w.js} +1 -1
- package/dist/{catalogSetting-7ZMZjqGs.js → catalogSetting-DU_dUoSh.js} +1 -1
- package/dist/{category-Cq2MmCBq.js → category-DJRGfRhf.js} +1 -1
- package/dist/{currency-OQd6moI9.js → currency-ljvNxerM.js} +1 -1
- package/dist/{dayjs.min-m51FMJgI.js → dayjs.min-DsjutQjn.js} +1 -1
- package/dist/{index-b9FcXU4s.js → index-Bb7-YO3o.js} +23 -23
- package/dist/{index-DlTid7hh.js → index-C58VTE70.js} +14 -14
- package/dist/{index-B5uSVMTf.js → index-CBnsZeF8.js} +1 -1
- package/dist/{item-96CGb3Kx.js → item-Cerfyitf.js} +1521 -1485
- package/dist/jszip.min-Co4cqzOU.js +2393 -0
- package/dist/{menu-Bqiz6B2P.js → menu-B7KFi80A.js} +154 -154
- package/dist/{menu-BmBsIlGC.js → menu-Bpul41jT.js} +1 -1
- package/dist/mf-menu.css +1 -1
- package/dist/{priceTier-Ck8MqQWD.js → priceTier-CfW69h1F.js} +1 -1
- package/dist/{scheduler-DeOCwKnf.js → scheduler-DsO3qpTw.js} +3 -3
- package/dist/{subcategory-DbiQCCF5.js → subcategory-Cb_rqtHz.js} +84 -84
- package/dist/{toExcel-BsguLQA5.js → toExcel-P9X-WSN5.js} +15 -15
- package/dist/{unit-CnM6N-39.js → unit-Dej_sihQ.js} +24 -24
- package/package.json +3 -2
- package/dist/ImportProductDialog.vue_vue_type_script_setup_true_lang-BRlU0arf.js +0 -73010
- package/dist/Products-DZFgAKxB.js +0 -2660
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { ref as V, computed as x, defineComponent as E, resolveComponent as B, createBlock as P, openBlock as v, withCtx as A, createElementVNode as g, createVNode as m, unref as n, createElementBlock as C, Fragment as ne, renderList as xe, createCommentVNode as z, normalizeClass as re, toDisplayString as j, withModifiers as ie, mergeModels as Qe, useModel as He, renderSlot as ve, watch as ae, createTextVNode as Ye, watchEffect as
|
|
2
|
-
import { u as ke,
|
|
1
|
+
import { ref as V, computed as x, defineComponent as E, resolveComponent as B, createBlock as P, openBlock as v, withCtx as A, createElementVNode as g, createVNode as m, unref as n, createElementBlock as C, Fragment as ne, renderList as xe, createCommentVNode as z, normalizeClass as re, toDisplayString as j, withModifiers as ie, mergeModels as Qe, useModel as He, renderSlot as ve, watch as ae, createTextVNode as Ye, watchEffect as Ze, nextTick as $e, resolveDynamicComponent as Je, onMounted as Xe, h as q, normalizeStyle as vt } from "vue";
|
|
2
|
+
import { u as ke, Q as ye, z as oe, H as Te, I as me, U as ft, aa as gt, ab as bt, ac as Ie, ad as _t, P as yt, ae as Re } from "./menu-B7KFi80A.js";
|
|
3
3
|
import { useI18n as Se, useCoreStore as Oe } from "@feedmepos/mf-common";
|
|
4
|
-
import { u as Ce } from "./menu-
|
|
4
|
+
import { u as Ce } from "./menu-Bpul41jT.js";
|
|
5
5
|
import { _ as pe } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
|
|
6
|
-
import { L as Be } from "./LinkProductSideSheet-
|
|
7
|
-
import { _ as Pe, h as je, a as ht, b as Ee } from "./CustomAttributeChip.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { f as xt, o as Ct, b as wt, m as kt } from "./subcategory-
|
|
9
|
-
import { r as St, _ as Ft, a as Vt, u as It } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-
|
|
10
|
-
import { u as et, C as $t } from "./item-
|
|
11
|
-
import { useBreakpoints as tt, components as
|
|
12
|
-
import { F as Pt } from "./index-
|
|
13
|
-
import { _ as
|
|
6
|
+
import { L as Be } from "./LinkProductSideSheet-xIuPAwp7.js";
|
|
7
|
+
import { _ as Pe, h as je, a as ht, b as Ee } from "./CustomAttributeChip.vue_vue_type_script_setup_true_lang-2hApsFMq.js";
|
|
8
|
+
import { f as xt, o as Ct, b as wt, m as kt } from "./subcategory-Cb_rqtHz.js";
|
|
9
|
+
import { r as St, _ as Ft, a as Vt, u as It } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-YOzhk0a0.js";
|
|
10
|
+
import { u as et, C as $t } from "./item-Cerfyitf.js";
|
|
11
|
+
import { useBreakpoints as tt, components as J, useDialog as Tt, FmButtonColorThemeVariant as Q, FmButtonVariant as Z } from "@feedmepos/ui-library";
|
|
12
|
+
import { F as Pt } from "./index-CBnsZeF8.js";
|
|
13
|
+
import { _ as Ue, u as At } from "./app-50bXo6rU.js";
|
|
14
14
|
import { _ as he } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
|
|
15
|
-
import { _ as Ot } from "./index-
|
|
15
|
+
import { _ as Ot } from "./index-C58VTE70.js";
|
|
16
16
|
import { _ as Ae } from "./Thumbnail.vue_vue_type_script_setup_true_lang-DzQ8_6Bi.js";
|
|
17
|
-
import { c as
|
|
18
|
-
import { f as
|
|
17
|
+
import { c as Ut } from "./check-C9mY6LiX.js";
|
|
18
|
+
import { f as Mt } from "./currency-ljvNxerM.js";
|
|
19
19
|
import { w as zt } from "./tooltip-B5BiPMx9.js";
|
|
20
20
|
import { r as Dt } from "./index-Ce4v8o7D.js";
|
|
21
|
-
function
|
|
21
|
+
function Nt(w, a) {
|
|
22
22
|
const r = V(!0), u = x(() => {
|
|
23
23
|
var s, f;
|
|
24
24
|
return !r.value && (!a.value || ((s = a.value) == null ? void 0 : s.length) === ((f = w.value) == null ? void 0 : f.length));
|
|
@@ -34,7 +34,7 @@ function Kt(w, a) {
|
|
|
34
34
|
a.value === void 0 && r.value ? f = [s] : a.value === void 0 && !r.value ? f = (p = w.value.map((k) => k.value)) == null ? void 0 : p.filter((k) => k !== s) : (b = a.value) != null && b.includes(s) ? f = (y = a.value) == null ? void 0 : y.filter((k) => k !== s) : f = [...a.value || [], s], f.length === 0 ? (a.value = void 0, r.value = !0) : f.length === w.value.length ? (a.value = void 0, r.value = !1) : a.value = f;
|
|
35
35
|
} };
|
|
36
36
|
}
|
|
37
|
-
const
|
|
37
|
+
const Kt = { class: "inline-flex items-center" }, Rt = {
|
|
38
38
|
key: 0,
|
|
39
39
|
class: /* @__PURE__ */ re([
|
|
40
40
|
"fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap",
|
|
@@ -56,7 +56,7 @@ const Nt = { class: "inline-flex items-center" }, Rt = {
|
|
|
56
56
|
set: (G) => {
|
|
57
57
|
u.selectCategory(G);
|
|
58
58
|
}
|
|
59
|
-
}), { allSelected: L, toggleAll: ee, toggleOption: S, indeterminate: H } =
|
|
59
|
+
}), { allSelected: L, toggleAll: ee, toggleOption: S, indeterminate: H } = Nt(
|
|
60
60
|
s,
|
|
61
61
|
k
|
|
62
62
|
), W = Oe(), te = x(() => W.itemAttributeSettings.value.length > 0);
|
|
@@ -64,14 +64,14 @@ const Nt = { class: "inline-flex items-center" }, Rt = {
|
|
|
64
64
|
r("toggleAttributeFilter");
|
|
65
65
|
}
|
|
66
66
|
return (G, I) => {
|
|
67
|
-
const D = B("FmIcon"),
|
|
68
|
-
return v(), P(
|
|
67
|
+
const D = B("FmIcon"), M = B("FmChip"), T = B("FmSearch"), $ = B("FmMenuItem"), N = B("FmMenu");
|
|
68
|
+
return v(), P(N, {
|
|
69
69
|
"close-on-click": !1,
|
|
70
70
|
width: 220
|
|
71
71
|
}, {
|
|
72
72
|
"menu-button": A(() => [
|
|
73
|
-
g("div",
|
|
74
|
-
m(
|
|
73
|
+
g("div", Kt, [
|
|
74
|
+
m(M, null, {
|
|
75
75
|
default: A(() => [
|
|
76
76
|
b.value ? (v(), C("div", Rt, j(n(p)("menu.category.selector.title", { label: b.value })), 1)) : z("", !0),
|
|
77
77
|
m(D, {
|
|
@@ -103,7 +103,7 @@ const Nt = { class: "inline-flex items-center" }, Rt = {
|
|
|
103
103
|
m(T, {
|
|
104
104
|
autofocus: "",
|
|
105
105
|
modelValue: y.value,
|
|
106
|
-
"onUpdate:modelValue": I[1] || (I[1] = (
|
|
106
|
+
"onUpdate:modelValue": I[1] || (I[1] = (U) => y.value = U),
|
|
107
107
|
placeholder: n(p)("menu.common.actions.search")
|
|
108
108
|
}, null, 8, ["modelValue", "placeholder"])
|
|
109
109
|
]),
|
|
@@ -115,14 +115,14 @@ const Nt = { class: "inline-flex items-center" }, Rt = {
|
|
|
115
115
|
indeterminate: n(H),
|
|
116
116
|
onClick: n(ee)
|
|
117
117
|
}, null, 8, ["model-value", "indeterminate", "onClick"]),
|
|
118
|
-
(v(!0), C(ne, null, xe(f.value, (
|
|
119
|
-
var
|
|
118
|
+
(v(!0), C(ne, null, xe(f.value, (U) => {
|
|
119
|
+
var K;
|
|
120
120
|
return v(), P($, {
|
|
121
|
-
key:
|
|
122
|
-
label:
|
|
121
|
+
key: U.value || "",
|
|
122
|
+
label: U.label,
|
|
123
123
|
"has-checkbox": "",
|
|
124
|
-
"model-value": n(L) || ((
|
|
125
|
-
onClick: (O) => n(S)(
|
|
124
|
+
"model-value": n(L) || ((K = k.value) == null ? void 0 : K.includes(U.value)),
|
|
125
|
+
onClick: (O) => n(S)(U.value)
|
|
126
126
|
}, null, 8, ["label", "model-value", "onClick"]);
|
|
127
127
|
}), 128))
|
|
128
128
|
])
|
|
@@ -137,7 +137,7 @@ const Nt = { class: "inline-flex items-center" }, Rt = {
|
|
|
137
137
|
}, Qt = { key: 0 }, Ht = {
|
|
138
138
|
key: 1,
|
|
139
139
|
class: "inline-block w-8"
|
|
140
|
-
}, Yt = { key: 0 },
|
|
140
|
+
}, Yt = { key: 0 }, Zt = { key: 1 }, Le = /* @__PURE__ */ E({
|
|
141
141
|
__name: "CategoriesChip",
|
|
142
142
|
props: {
|
|
143
143
|
categories: { default: () => [] },
|
|
@@ -163,7 +163,7 @@ const Nt = { class: "inline-flex items-center" }, Rt = {
|
|
|
163
163
|
class: "fm-typo-en-body-md-400 text-fm-color-primary cursor-pointer",
|
|
164
164
|
onClick: b[0] || (b[0] = ie((k) => s.value = !s.value, ["stop", "prevent"]))
|
|
165
165
|
}, [
|
|
166
|
-
s.value ? (v(), C("span", Yt, j(n(r)("menu.product.table.category.expand", { count: p.categories.length - i.value })), 1)) : (v(), C("span",
|
|
166
|
+
s.value ? (v(), C("span", Yt, j(n(r)("menu.product.table.category.expand", { count: p.categories.length - i.value })), 1)) : (v(), C("span", Zt, j(n(r)("menu.product.table.category.collapse")), 1))
|
|
167
167
|
])) : z("", !0)
|
|
168
168
|
])) : z("", !0)
|
|
169
169
|
], 64)) : (v(), P(y, {
|
|
@@ -203,7 +203,7 @@ const Nt = { class: "inline-flex items-center" }, Rt = {
|
|
|
203
203
|
}));
|
|
204
204
|
};
|
|
205
205
|
}
|
|
206
|
-
}),
|
|
206
|
+
}), Jt = /* @__PURE__ */ E({
|
|
207
207
|
__name: "ProductSearcher",
|
|
208
208
|
props: /* @__PURE__ */ Qe({
|
|
209
209
|
label: {},
|
|
@@ -259,7 +259,7 @@ const Nt = { class: "inline-flex items-center" }, Rt = {
|
|
|
259
259
|
g("p", ol, j(r.titleBadge), 1)
|
|
260
260
|
])) : z("", !0)
|
|
261
261
|
]),
|
|
262
|
-
m(
|
|
262
|
+
m(Ue, null, {
|
|
263
263
|
default: A(() => [
|
|
264
264
|
m(l, {
|
|
265
265
|
modelValue: a.value,
|
|
@@ -308,7 +308,7 @@ const Nt = { class: "inline-flex items-center" }, Rt = {
|
|
|
308
308
|
const s = o.original;
|
|
309
309
|
return s.subRows ? m("div", {
|
|
310
310
|
class: "flex items-center gap-2 fm-typo-en-body-md-600 text-fm-color-typo-secondary"
|
|
311
|
-
}, [m(
|
|
311
|
+
}, [m(J.FmButton, {
|
|
312
312
|
icon: "keyboard_arrow_up",
|
|
313
313
|
variant: "tertiary",
|
|
314
314
|
class: ["cursor-pointer", "transition-transform", o.getIsExpanded() ? "transform rotate-180" : ""],
|
|
@@ -360,7 +360,7 @@ const Nt = { class: "inline-flex items-center" }, Rt = {
|
|
|
360
360
|
i();
|
|
361
361
|
}), (o, s) => {
|
|
362
362
|
const f = B("FmTable");
|
|
363
|
-
return v(), P(
|
|
363
|
+
return v(), P(Ue, null, {
|
|
364
364
|
default: A(() => [m(f, {
|
|
365
365
|
"column-defs": r,
|
|
366
366
|
"row-data": o.data,
|
|
@@ -419,7 +419,7 @@ const Nt = { class: "inline-flex items-center" }, Rt = {
|
|
|
419
419
|
async function s(p) {
|
|
420
420
|
const b = l.value.find((y) => y.catalogId === p);
|
|
421
421
|
if (b) {
|
|
422
|
-
b.badge = () => m(
|
|
422
|
+
b.badge = () => m(J.FmCircularProgress, {
|
|
423
423
|
size: "md"
|
|
424
424
|
}, null);
|
|
425
425
|
const y = await xt(Te(a.menu), p, a.itemId);
|
|
@@ -464,7 +464,7 @@ const Nt = { class: "inline-flex items-center" }, Rt = {
|
|
|
464
464
|
header: () => "Scheduler",
|
|
465
465
|
enableSorting: !1,
|
|
466
466
|
cell: (i) => {
|
|
467
|
-
const o = i.row.original, s = o.loading ? m(
|
|
467
|
+
const o = i.row.original, s = o.loading ? m(J.FmCircularProgress, {
|
|
468
468
|
size: "md"
|
|
469
469
|
}, null) : null;
|
|
470
470
|
return m("div", {
|
|
@@ -518,7 +518,7 @@ const Nt = { class: "inline-flex items-center" }, Rt = {
|
|
|
518
518
|
});
|
|
519
519
|
}), (i, o) => {
|
|
520
520
|
const s = B("FmTable");
|
|
521
|
-
return v(), P(
|
|
521
|
+
return v(), P(Ue, null, {
|
|
522
522
|
default: A(() => [g("div", ul, [m(s, {
|
|
523
523
|
class: "min-w-[800px]",
|
|
524
524
|
"column-defs": r,
|
|
@@ -539,7 +539,7 @@ const Nt = { class: "inline-flex items-center" }, Rt = {
|
|
|
539
539
|
},
|
|
540
540
|
setup(w) {
|
|
541
541
|
const a = w, r = V(null);
|
|
542
|
-
|
|
542
|
+
Ze(async () => {
|
|
543
543
|
r.value = await wt(a.menu, a.itemId), await $e(), u.value = l.value[0].value;
|
|
544
544
|
});
|
|
545
545
|
const u = V(""), l = x(() => {
|
|
@@ -664,7 +664,7 @@ const Nt = { class: "inline-flex items-center" }, Rt = {
|
|
|
664
664
|
}, null, 8, ["modelValue", "items"])
|
|
665
665
|
]),
|
|
666
666
|
g("div", null, [
|
|
667
|
-
(v(), P(
|
|
667
|
+
(v(), P(Je((o = r.value.find((s) => s.value === a.value)) == null ? void 0 : o.component), {
|
|
668
668
|
"item-id": u.itemId,
|
|
669
669
|
menu: u.menu
|
|
670
670
|
}, null, 8, ["item-id", "menu"]))
|
|
@@ -684,7 +684,7 @@ const Nt = { class: "inline-flex items-center" }, Rt = {
|
|
|
684
684
|
u.value = a.itemId;
|
|
685
685
|
}), (l, i) => (v(), C("div", xl, [
|
|
686
686
|
l.showSearch ? (v(), C("div", Cl, [
|
|
687
|
-
m(
|
|
687
|
+
m(Jt, {
|
|
688
688
|
modelValue: u.value,
|
|
689
689
|
"onUpdate:modelValue": i[0] || (i[0] = (o) => u.value = o),
|
|
690
690
|
class: "w-1/2",
|
|
@@ -783,18 +783,18 @@ const We = /* @__PURE__ */ E({
|
|
|
783
783
|
}, Ol = {
|
|
784
784
|
key: 1,
|
|
785
785
|
class: "px-16 py-4 space-x-8 flex justify-end"
|
|
786
|
-
}, Ml = {
|
|
787
|
-
key: 2
|
|
788
786
|
}, Ul = {
|
|
787
|
+
key: 2
|
|
788
|
+
}, Ml = {
|
|
789
789
|
class: "flex space-x-8"
|
|
790
790
|
}, zl = {
|
|
791
791
|
key: 1,
|
|
792
792
|
class: "pt-8 flex flex-col flex-1 overflow-hidden"
|
|
793
793
|
}, Dl = {
|
|
794
794
|
class: "space-y-8 pb-8"
|
|
795
|
-
}, Kl = {
|
|
796
|
-
class: "w-full px-8"
|
|
797
795
|
}, Nl = {
|
|
796
|
+
class: "w-full px-8"
|
|
797
|
+
}, Kl = {
|
|
798
798
|
class: "flex space-x-8 px-8"
|
|
799
799
|
}, Rl = {
|
|
800
800
|
key: 0,
|
|
@@ -818,9 +818,9 @@ const We = /* @__PURE__ */ E({
|
|
|
818
818
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
819
819
|
}, Yl = {
|
|
820
820
|
key: 1
|
|
821
|
-
},
|
|
821
|
+
}, Zl = {
|
|
822
822
|
class: "flex space-x-8"
|
|
823
|
-
},
|
|
823
|
+
}, Jl = /* @__PURE__ */ E({
|
|
824
824
|
__name: "ProductTable",
|
|
825
825
|
props: {
|
|
826
826
|
modelValue: {},
|
|
@@ -846,7 +846,7 @@ const We = /* @__PURE__ */ E({
|
|
|
846
846
|
ee("update:editing", e);
|
|
847
847
|
});
|
|
848
848
|
const H = (e) => {
|
|
849
|
-
|
|
849
|
+
Ut.isBoolean(e) ? S.value = e : S.value = !S.value;
|
|
850
850
|
}, W = V(!1), te = V(null);
|
|
851
851
|
async function ce() {
|
|
852
852
|
W.value = !W.value, W.value && (await $e(), te.value && te.value.toggleProperty(!0));
|
|
@@ -865,21 +865,21 @@ const We = /* @__PURE__ */ E({
|
|
|
865
865
|
}).filter((d) => typeof d == "string" && !!d);
|
|
866
866
|
return [...new Set(t)];
|
|
867
867
|
}
|
|
868
|
-
const
|
|
868
|
+
const M = x(() => i.itemAttributeSettings.value.map((e) => {
|
|
869
869
|
const t = D(e.key);
|
|
870
870
|
return {
|
|
871
871
|
...e,
|
|
872
872
|
values: t
|
|
873
873
|
};
|
|
874
|
-
})), T = V(""), $ = Dt(T, 300),
|
|
874
|
+
})), T = V(""), $ = Dt(T, 300), N = x(() => {
|
|
875
875
|
const e = (c) => {
|
|
876
876
|
var h;
|
|
877
|
-
return !$.value || !$.value.trim() ? !0 : [c.code, c.name, De(c), ...Ie(
|
|
877
|
+
return !$.value || !$.value.trim() ? !0 : [c.code, c.name, De(c), ...Ie(U.value, c), (h = ye()[c.orderFrom]) == null ? void 0 : h.label, Object.values(c.customAttributes ?? {}).join(" ")].join(" ").toLowerCase().includes($.value.toLowerCase());
|
|
878
878
|
}, t = (c) => !c.customAttributes && !I.value.rules.length ? !0 : ht(c.customAttributes ?? {}, I.value);
|
|
879
879
|
return L.value.filter((c) => e(c) && t(c));
|
|
880
880
|
}), {
|
|
881
|
-
categories:
|
|
882
|
-
} = Ce(),
|
|
881
|
+
categories: U
|
|
882
|
+
} = Ce(), K = x(() => o.categories.map((e) => ({
|
|
883
883
|
label: e.name,
|
|
884
884
|
value: e._id || null
|
|
885
885
|
}))), O = (e, t, c) => {
|
|
@@ -894,7 +894,7 @@ const We = /* @__PURE__ */ E({
|
|
|
894
894
|
}, ee("update:model-value", d));
|
|
895
895
|
}, Y = gt(() => u.originalValue, () => u.modelValue), R = me.debounce(O, 300), se = (e) => (t) => !!t || l("menu.product.table.validation.name_required", {
|
|
896
896
|
field: e
|
|
897
|
-
}), de = (e) => e >= 0 || l("menu.product.table.validation.price_min"), fe = [se("Name")], ge = () => [(e) => de(typeof e == "number" ? e : Number(e) ?? 0)], at = ye(), ot = x(() => ft.setCoreStore(i).taxSetting()),
|
|
897
|
+
}), de = (e) => e >= 0 || l("menu.product.table.validation.price_min"), fe = [se("Name")], ge = () => [(e) => de(typeof e == "number" ? e : Number(e) ?? 0)], at = ye(), ot = x(() => ft.setCoreStore(i).taxSetting()), Me = x(() => [{
|
|
898
898
|
accessorKey: "thumbnail",
|
|
899
899
|
header: "",
|
|
900
900
|
size: 110,
|
|
@@ -924,7 +924,7 @@ const We = /* @__PURE__ */ E({
|
|
|
924
924
|
class: "break-all"
|
|
925
925
|
}, [c]);
|
|
926
926
|
const d = Ve(t._id);
|
|
927
|
-
return q(
|
|
927
|
+
return q(J.FmTextField, {
|
|
928
928
|
disabled: !y.value.code,
|
|
929
929
|
modelValue: Y(t._id, "code") ?? (d == null ? void 0 : d.code),
|
|
930
930
|
placeholder: u.modelValue[t._id].fallbackCode,
|
|
@@ -940,7 +940,7 @@ const We = /* @__PURE__ */ E({
|
|
|
940
940
|
size: 200,
|
|
941
941
|
cell: (e) => {
|
|
942
942
|
const t = e.row.original, c = e.getValue();
|
|
943
|
-
return S.value ? q(
|
|
943
|
+
return S.value ? q(J.FmTextField, {
|
|
944
944
|
disabled: !y.value.name,
|
|
945
945
|
modelValue: Y(t._id, "name") ?? t.name,
|
|
946
946
|
"onUpdate:modelValue": (d) => {
|
|
@@ -972,7 +972,7 @@ const We = /* @__PURE__ */ E({
|
|
|
972
972
|
min: 0,
|
|
973
973
|
disabled: !c.editPrice,
|
|
974
974
|
// @ts-ignore
|
|
975
|
-
placeholder: d ?
|
|
975
|
+
placeholder: d ? Mt(d, !1) : void 0,
|
|
976
976
|
modelValue: Y(c._id, "price") ?? ((h = Ve(c._id)) == null ? void 0 : h.price),
|
|
977
977
|
// @ts-ignore
|
|
978
978
|
"onUpdate:modelValue": (F) => {
|
|
@@ -994,7 +994,7 @@ const We = /* @__PURE__ */ E({
|
|
|
994
994
|
if (!S.value)
|
|
995
995
|
return `${F != null && F.meta.rate ? bt(F.meta.rate) : 0}%`;
|
|
996
996
|
const _ = o.getSelectedTax(Y(c._id, "taxes") ?? t, c.fallbackTaxes, o.taxSetting.countryTaxOptions);
|
|
997
|
-
return q(
|
|
997
|
+
return q(J.FmSelect, {
|
|
998
998
|
disabled: !y.value.tax,
|
|
999
999
|
items: o.taxSetting.countryTaxOptions,
|
|
1000
1000
|
modelValue: _,
|
|
@@ -1013,22 +1013,22 @@ const We = /* @__PURE__ */ E({
|
|
|
1013
1013
|
const t = e.row.original;
|
|
1014
1014
|
if (!S.value)
|
|
1015
1015
|
return q(Le, {
|
|
1016
|
-
categories: Ie(
|
|
1016
|
+
categories: Ie(U.value, t)
|
|
1017
1017
|
});
|
|
1018
1018
|
const c = _t(u.originalValue, u.modelValue, t._id) ?? yt(t), d = (c == null ? void 0 : c.map((F) => F._id)) ?? [], h = c == null ? void 0 : c.reduce((F, _) => (F[_._id] = _, F), {});
|
|
1019
1019
|
return q($t, {
|
|
1020
1020
|
shouldShowChips: !1,
|
|
1021
1021
|
shouldShowSelectedItemsWithinPlaceholder: !0,
|
|
1022
1022
|
modelValue: d.length > 0 ? d : [null],
|
|
1023
|
-
items:
|
|
1023
|
+
items: K.value,
|
|
1024
1024
|
disabled: !!(o.state.currentCatalogId || o.state.currentSchedulerId),
|
|
1025
1025
|
"onUpdate:modelValue": async (F) => {
|
|
1026
1026
|
const [_, ...X] = F;
|
|
1027
1027
|
R(t._id, {
|
|
1028
1028
|
category: _,
|
|
1029
1029
|
additionalCategories: X.map((_e) => {
|
|
1030
|
-
const
|
|
1031
|
-
return
|
|
1030
|
+
const Ke = h == null ? void 0 : h[_e];
|
|
1031
|
+
return Ke || {
|
|
1032
1032
|
_id: _e,
|
|
1033
1033
|
position: null
|
|
1034
1034
|
};
|
|
@@ -1060,7 +1060,7 @@ const We = /* @__PURE__ */ E({
|
|
|
1060
1060
|
size: 140,
|
|
1061
1061
|
cell: (e) => {
|
|
1062
1062
|
const t = e.getValue(), c = e.row.original;
|
|
1063
|
-
return S.value ? q(
|
|
1063
|
+
return S.value ? q(J.FmSelect, {
|
|
1064
1064
|
disabled: !y.value.orderFrom,
|
|
1065
1065
|
items: Object.values(ye()),
|
|
1066
1066
|
modelValue: Y(c._id, "orderFrom") ?? t,
|
|
@@ -1081,8 +1081,8 @@ const We = /* @__PURE__ */ E({
|
|
|
1081
1081
|
},
|
|
1082
1082
|
header: () => q("div", {
|
|
1083
1083
|
class: "w-full px-4 flex justify-end"
|
|
1084
|
-
}, [zt(q(
|
|
1085
|
-
variant:
|
|
1084
|
+
}, [zt(q(J.FmButton, {
|
|
1085
|
+
variant: Z.Tertiary,
|
|
1086
1086
|
textColor: Q.NeutralGray400,
|
|
1087
1087
|
prependIcon: "edit",
|
|
1088
1088
|
class: "flex justify-end",
|
|
@@ -1096,7 +1096,7 @@ const We = /* @__PURE__ */ E({
|
|
|
1096
1096
|
}, [m(kl, null, {
|
|
1097
1097
|
default: ({
|
|
1098
1098
|
trigger: c
|
|
1099
|
-
}) => m(
|
|
1099
|
+
}) => m(J.FmButton, {
|
|
1100
1100
|
icon: "overview",
|
|
1101
1101
|
variant: "tertiary",
|
|
1102
1102
|
textColor: Q.NeutralGray400,
|
|
@@ -1104,7 +1104,7 @@ const We = /* @__PURE__ */ E({
|
|
|
1104
1104
|
c(t._id);
|
|
1105
1105
|
}, ["stop", "prevent"])
|
|
1106
1106
|
}, null)
|
|
1107
|
-
}), m(
|
|
1107
|
+
}), m(J.FmButton, {
|
|
1108
1108
|
icon: "delete",
|
|
1109
1109
|
variant: "tertiary",
|
|
1110
1110
|
textColor: Q.NeutralGray400,
|
|
@@ -1118,12 +1118,12 @@ const We = /* @__PURE__ */ E({
|
|
|
1118
1118
|
}, null)]);
|
|
1119
1119
|
}
|
|
1120
1120
|
}]);
|
|
1121
|
-
o.taxSetting.systemCode ||
|
|
1121
|
+
o.taxSetting.systemCode || Me.value.splice(4, 1);
|
|
1122
1122
|
const ue = V({}), le = V([]);
|
|
1123
|
-
ae([() => ue.value, () =>
|
|
1123
|
+
ae([() => ue.value, () => N.value], (e) => {
|
|
1124
1124
|
let t = [];
|
|
1125
1125
|
Object.keys(e[0]).forEach((c) => {
|
|
1126
|
-
const d = e[0][c], h =
|
|
1126
|
+
const d = e[0][c], h = N.value[parseInt(c)];
|
|
1127
1127
|
h && (d ? t.push(h) : le.value = t.filter((F) => F !== h));
|
|
1128
1128
|
}), le.value = t;
|
|
1129
1129
|
}), ae(() => L.value, () => {
|
|
@@ -1166,7 +1166,7 @@ const We = /* @__PURE__ */ E({
|
|
|
1166
1166
|
primaryActions: {
|
|
1167
1167
|
text: "Discard",
|
|
1168
1168
|
close: !0,
|
|
1169
|
-
variant:
|
|
1169
|
+
variant: Z.Destructive
|
|
1170
1170
|
},
|
|
1171
1171
|
secondaryActions: {
|
|
1172
1172
|
text: "Cancel",
|
|
@@ -1211,7 +1211,7 @@ const We = /* @__PURE__ */ E({
|
|
|
1211
1211
|
return F == null ? void 0 : F[0];
|
|
1212
1212
|
} else return t ? t.override.items[e][0] : c ? o.schedulers.find((_) => _._id === c).items.filter((_) => _._id === e)[0] : L.value.find((h) => h._id === e);
|
|
1213
1213
|
}
|
|
1214
|
-
const ct = tt(), dt = x(() => ct.breakpoints.value.xs),
|
|
1214
|
+
const ct = tt(), dt = x(() => ct.breakpoints.value.xs), Ne = V(null), mt = At(Ne, W), pt = x(() => {
|
|
1215
1215
|
var t;
|
|
1216
1216
|
return {
|
|
1217
1217
|
height: `calc(100vh - ${((t = mt.value) == null ? void 0 : t.top) + 24}px)`
|
|
@@ -1219,20 +1219,20 @@ const We = /* @__PURE__ */ E({
|
|
|
1219
1219
|
});
|
|
1220
1220
|
return (e, t) => {
|
|
1221
1221
|
const c = B("fm-search"), d = B("fm-button"), h = B("fm-table"), F = B("fm-form");
|
|
1222
|
-
return dt.value ? (v(), C("div", zl, [g("div", Dl, [g("div",
|
|
1222
|
+
return dt.value ? (v(), C("div", zl, [g("div", Dl, [g("div", Nl, [m(c, {
|
|
1223
1223
|
"model-value": T.value,
|
|
1224
1224
|
"onUpdate:modelValue": t[5] || (t[5] = (_) => T.value = _),
|
|
1225
1225
|
autofocus: "",
|
|
1226
1226
|
placeholder: n(l)("menu.product.table.search.placeholder")
|
|
1227
1227
|
}, null, 8, ["model-value", "placeholder"])]), t[8] || (t[8] = g("div", {
|
|
1228
1228
|
class: "w-full h-[1px] bg-fm-color-neutral-gray-100"
|
|
1229
|
-
}, null, -1)), g("div",
|
|
1229
|
+
}, null, -1)), g("div", Kl, [ve(e.$slots, "filter")]), W.value ? (v(), C("div", Rl, [m(n(je), {
|
|
1230
1230
|
ref_key: "attributeFilterRef",
|
|
1231
1231
|
ref: te,
|
|
1232
|
-
attributes:
|
|
1232
|
+
attributes: M.value,
|
|
1233
1233
|
modelValue: I.value,
|
|
1234
1234
|
"onUpdate:modelValue": t[6] || (t[6] = (_) => I.value = _)
|
|
1235
|
-
}, null, 8, ["attributes", "modelValue"])])) : z("", !0)]), L.value.length ? (v(), C("div", Bl, [(v(!0), C(ne, null, xe(
|
|
1235
|
+
}, null, 8, ["attributes", "modelValue"])])) : z("", !0)]), L.value.length ? (v(), C("div", Bl, [(v(!0), C(ne, null, xe(N.value, (_) => {
|
|
1236
1236
|
var X;
|
|
1237
1237
|
return v(), C("div", {
|
|
1238
1238
|
key: _._id,
|
|
@@ -1245,12 +1245,12 @@ const We = /* @__PURE__ */ E({
|
|
|
1245
1245
|
}, null, 8, ["alt", "src"]), g("div", Gl, [g("div", Ll, [g("p", Wl, j(_.name), 1), m(we, {
|
|
1246
1246
|
"order-from": _.orderFrom
|
|
1247
1247
|
}, null, 8, ["order-from"])]), g("p", ql, j(De(_)), 1), g("p", Ql, j(n(l)("menu.product.table.columns.code")) + ": " + j(((X = Ve(_._id)) == null ? void 0 : X.code) || "--"), 1), g("p", Hl, [m(Le, {
|
|
1248
|
-
categories: n(Ie)(n(
|
|
1248
|
+
categories: n(Ie)(n(U), _)
|
|
1249
1249
|
}, null, 8, ["categories"])]), m(Pe, {
|
|
1250
1250
|
"custom-attributes": _.customAttributes
|
|
1251
1251
|
}, null, 8, ["custom-attributes"])])]), m(d, {
|
|
1252
1252
|
"text-color": n(Q).NeutralGray400,
|
|
1253
|
-
variant: n(
|
|
1253
|
+
variant: n(Z).Tertiary,
|
|
1254
1254
|
"prepend-icon": "delete",
|
|
1255
1255
|
onClick: ie(() => n(f).deleteItem([{
|
|
1256
1256
|
_id: _._id,
|
|
@@ -1262,8 +1262,8 @@ const We = /* @__PURE__ */ E({
|
|
|
1262
1262
|
subtitle: n(l)("menu.product.table.empty.subtitle"),
|
|
1263
1263
|
title: n(l)("menu.product.table.empty.title")
|
|
1264
1264
|
}, {
|
|
1265
|
-
action: A(() => [g("div",
|
|
1266
|
-
variant: n(
|
|
1265
|
+
action: A(() => [g("div", Zl, [m(d, {
|
|
1266
|
+
variant: n(Z).Primary,
|
|
1267
1267
|
label: n(l)("menu.product.table.empty.actions.add"),
|
|
1268
1268
|
"prepend-icon": "add",
|
|
1269
1269
|
onClick: t[7] || (t[7] = (_) => n(f).create(null))
|
|
@@ -1273,7 +1273,7 @@ const We = /* @__PURE__ */ E({
|
|
|
1273
1273
|
}) => [m(d, {
|
|
1274
1274
|
"bg-color": n(Q).NeutralGray100,
|
|
1275
1275
|
"text-color": n(Q).NeutralGray400,
|
|
1276
|
-
variant: n(
|
|
1276
|
+
variant: n(Z).Primary,
|
|
1277
1277
|
label: n(l)("menu.product.table.empty.actions.import"),
|
|
1278
1278
|
"prepend-icon": "download",
|
|
1279
1279
|
onClick: _
|
|
@@ -1295,7 +1295,7 @@ const We = /* @__PURE__ */ E({
|
|
|
1295
1295
|
}, null, 8, ["model-value", "placeholder"])])]), W.value ? (v(), C("div", $l, [m(n(je), {
|
|
1296
1296
|
ref_key: "attributeFilterRef",
|
|
1297
1297
|
ref: te,
|
|
1298
|
-
attributes:
|
|
1298
|
+
attributes: M.value,
|
|
1299
1299
|
modelValue: I.value,
|
|
1300
1300
|
"onUpdate:modelValue": t[1] || (t[1] = (_) => I.value = _)
|
|
1301
1301
|
}, null, 8, ["attributes", "modelValue"])])) : z("", !0), L.value.length ? (v(), C("div", Tl, [le.value.length && !S.value ? (v(), C("div", Pl, [g("p", Al, j(n(l)("menu.product.table.selection.count", {
|
|
@@ -1314,23 +1314,23 @@ const We = /* @__PURE__ */ E({
|
|
|
1314
1314
|
variant: "secondary",
|
|
1315
1315
|
onClick: rt
|
|
1316
1316
|
}, null, 8, ["border-color", "text-color", "label"])])) : z("", !0), S.value ? (v(), C("div", Ol, [m(d, {
|
|
1317
|
-
variant: n(
|
|
1317
|
+
variant: n(Z).Tertiary,
|
|
1318
1318
|
label: n(l)("menu.product.table.bulk_edit.actions.reset_all"),
|
|
1319
1319
|
onClick: be
|
|
1320
1320
|
}, null, 8, ["variant", "label"]), m(d, {
|
|
1321
|
-
variant: n(
|
|
1321
|
+
variant: n(Z).Tertiary,
|
|
1322
1322
|
label: n(l)("menu.common.actions.cancel"),
|
|
1323
1323
|
onClick: Fe
|
|
1324
1324
|
}, null, 8, ["variant", "label"]), m(d, {
|
|
1325
1325
|
borderColor: n(Q).ColorPrimary,
|
|
1326
1326
|
textColor: n(Q).ColorPrimary,
|
|
1327
|
-
variant: n(
|
|
1327
|
+
variant: n(Z).Secondary,
|
|
1328
1328
|
label: n(l)("menu.product.table.bulk_edit.actions.save"),
|
|
1329
1329
|
type: "submit"
|
|
1330
1330
|
}, null, 8, ["borderColor", "textColor", "variant", "label"])])) : z("", !0), g("div", {
|
|
1331
1331
|
ref_key: "tableWrapper",
|
|
1332
|
-
ref:
|
|
1333
|
-
}, [(v(), P(
|
|
1332
|
+
ref: Ne
|
|
1333
|
+
}, [(v(), P(Je(S.value ? Pt : "div"), {
|
|
1334
1334
|
ref: "fullWrapper",
|
|
1335
1335
|
title: S.value ? n(l)("menu.product.table.bulk_edit.title") : "",
|
|
1336
1336
|
show: S.value,
|
|
@@ -1356,11 +1356,11 @@ const We = /* @__PURE__ */ E({
|
|
|
1356
1356
|
}),
|
|
1357
1357
|
modelValue: ue.value,
|
|
1358
1358
|
"onUpdate:modelValue": t[2] || (t[2] = (_) => ue.value = _),
|
|
1359
|
-
"column-defs":
|
|
1359
|
+
"column-defs": Me.value,
|
|
1360
1360
|
"column-visibility": st.value,
|
|
1361
1361
|
loading: e.isCalculating,
|
|
1362
|
-
"page-size":
|
|
1363
|
-
"row-data":
|
|
1362
|
+
"page-size": N.value.length,
|
|
1363
|
+
"row-data": N.value,
|
|
1364
1364
|
"shrink-at": !1,
|
|
1365
1365
|
selection: S.value ? void 0 : "multiple",
|
|
1366
1366
|
virtual: !0,
|
|
@@ -1370,12 +1370,12 @@ const We = /* @__PURE__ */ E({
|
|
|
1370
1370
|
onRowClick: t[3] || (t[3] = (_) => S.value ? void 0 : it(_))
|
|
1371
1371
|
}, null, 8, ["class", "modelValue", "column-defs", "column-visibility", "loading", "page-size", "row-data", "selection", "virtual-row-height"])]),
|
|
1372
1372
|
_: 1
|
|
1373
|
-
}, 40, ["title", "show", "primary-action", "secondary-actions", "style"]))], 512)])) : (v(), C("div",
|
|
1373
|
+
}, 40, ["title", "show", "primary-action", "secondary-actions", "style"]))], 512)])) : (v(), C("div", Ul, [m(pe, {
|
|
1374
1374
|
subtitle: n(l)("menu.product.table.empty.subtitle"),
|
|
1375
1375
|
title: n(l)("menu.product.table.empty.title")
|
|
1376
1376
|
}, {
|
|
1377
|
-
action: A(() => [g("div",
|
|
1378
|
-
variant: n(
|
|
1377
|
+
action: A(() => [g("div", Ml, [m(d, {
|
|
1378
|
+
variant: n(Z).Primary,
|
|
1379
1379
|
label: n(l)("menu.product.table.empty.actions.add"),
|
|
1380
1380
|
"prepend-icon": "add",
|
|
1381
1381
|
onClick: t[4] || (t[4] = (_) => n(f).create(null))
|
|
@@ -1385,7 +1385,7 @@ const We = /* @__PURE__ */ E({
|
|
|
1385
1385
|
}) => [m(d, {
|
|
1386
1386
|
"bg-color": n(Q).NeutralGray100,
|
|
1387
1387
|
"text-color": n(Q).NeutralGray400,
|
|
1388
|
-
variant: n(
|
|
1388
|
+
variant: n(Z).Primary,
|
|
1389
1389
|
label: n(l)("menu.product.table.empty.actions.import"),
|
|
1390
1390
|
"prepend-icon": "download",
|
|
1391
1391
|
onClick: _
|
|
@@ -1410,30 +1410,30 @@ const We = /* @__PURE__ */ E({
|
|
|
1410
1410
|
__name: "Product",
|
|
1411
1411
|
setup(w) {
|
|
1412
1412
|
const a = ke(), r = x(() => a.rules.item), u = Vt(), l = et(), i = It(), o = x(() => !a.state.currentCatalogId), s = x(() => a.rules.item), f = x(() => !a.state.currentSchedulerId), p = V(!1), b = V(!1), y = x(() => {
|
|
1413
|
-
var
|
|
1413
|
+
var M, T, $, N;
|
|
1414
1414
|
if (o.value && f.value) return;
|
|
1415
1415
|
if (f.value) {
|
|
1416
|
-
const
|
|
1417
|
-
return
|
|
1416
|
+
const U = (M = a.currentCatalog) == null ? void 0 : M.override.items;
|
|
1417
|
+
return U ? Object.entries(U).reduce((K, [O, Y]) => {
|
|
1418
1418
|
const R = Y.find((se) => !se.combinationKey);
|
|
1419
|
-
return R && (
|
|
1419
|
+
return R && (K[O] = R), K;
|
|
1420
1420
|
}, {}) : {};
|
|
1421
1421
|
}
|
|
1422
|
-
return ((o.value ? (T = a.currentScheduler) == null ? void 0 : T.items : (
|
|
1422
|
+
return ((o.value ? (T = a.currentScheduler) == null ? void 0 : T.items : (N = ($ = a.currentCatalog) == null ? void 0 : $.override.scheduler[a.state.currentSchedulerId]) == null ? void 0 : N.items) ?? []).reduce((U, K) => (K.combinationKey || (U[K._id] = K), U), {});
|
|
1423
1423
|
}), k = V({}), L = V({}), ee = async () => {
|
|
1424
|
-
var
|
|
1424
|
+
var N, U;
|
|
1425
1425
|
b.value = !0;
|
|
1426
|
-
const D = !!y.value,
|
|
1426
|
+
const D = !!y.value, M = me.flatten(H.value.map((K) => K.items)), T = D && p.value ? await kt(
|
|
1427
1427
|
a.mergedMenu,
|
|
1428
|
-
|
|
1428
|
+
M,
|
|
1429
1429
|
a.state.menu,
|
|
1430
|
-
(
|
|
1431
|
-
(
|
|
1430
|
+
(N = a.currentCatalog) == null ? void 0 : N._id,
|
|
1431
|
+
(U = a.currentScheduler) == null ? void 0 : U._id,
|
|
1432
1432
|
!1
|
|
1433
|
-
) : void 0, $ =
|
|
1433
|
+
) : void 0, $ = M.reduce((K, O, Y) => {
|
|
1434
1434
|
var se, de, fe, ge;
|
|
1435
1435
|
const R = (se = y.value) == null ? void 0 : se[O._id];
|
|
1436
|
-
return
|
|
1436
|
+
return K[O._id] = {
|
|
1437
1437
|
_id: O._id,
|
|
1438
1438
|
name: O.name,
|
|
1439
1439
|
code: D ? R == null ? void 0 : R.code : O == null ? void 0 : O.code,
|
|
@@ -1448,14 +1448,14 @@ const We = /* @__PURE__ */ E({
|
|
|
1448
1448
|
fallbackCode: (fe = T == null ? void 0 : T[Y]) == null ? void 0 : fe.code,
|
|
1449
1449
|
fallbackOrder: (ge = T == null ? void 0 : T[Y]) == null ? void 0 : ge.orderFrom,
|
|
1450
1450
|
fallbackTaxes: D ? O.taxes : null
|
|
1451
|
-
},
|
|
1451
|
+
}, K;
|
|
1452
1452
|
}, {});
|
|
1453
1453
|
k.value = $, L.value = { ...$ }, b.value = !1;
|
|
1454
1454
|
}, { categories: S, selectedCategories: H } = Ce(), W = V(null);
|
|
1455
1455
|
function te() {
|
|
1456
1456
|
W.value && W.value.toggleAttributeFilter();
|
|
1457
1457
|
}
|
|
1458
|
-
|
|
1458
|
+
Ze(async () => {
|
|
1459
1459
|
H.value && await ee();
|
|
1460
1460
|
});
|
|
1461
1461
|
function ce() {
|
|
@@ -1464,21 +1464,21 @@ const We = /* @__PURE__ */ E({
|
|
|
1464
1464
|
const G = () => {
|
|
1465
1465
|
H.value && ee();
|
|
1466
1466
|
}, { t: I } = Se();
|
|
1467
|
-
return (D,
|
|
1467
|
+
return (D, M) => {
|
|
1468
1468
|
const T = B("fm-button");
|
|
1469
1469
|
return n(S).length ? (v(), C("div", Xl, [
|
|
1470
1470
|
g("div", ea, [
|
|
1471
1471
|
g("div", ta, [
|
|
1472
|
-
n(H) ? (v(), P(
|
|
1472
|
+
n(H) ? (v(), P(Jl, {
|
|
1473
1473
|
key: 0,
|
|
1474
1474
|
ref_key: "productTableRef",
|
|
1475
1475
|
ref: W,
|
|
1476
1476
|
"is-calculating": b.value,
|
|
1477
1477
|
"model-value": k.value,
|
|
1478
1478
|
"original-value": L.value,
|
|
1479
|
-
"onUpdate:modelValue":
|
|
1479
|
+
"onUpdate:modelValue": M[0] || (M[0] = ($) => k.value = $),
|
|
1480
1480
|
"onReset:modelValue": G,
|
|
1481
|
-
"onUpdate:editing":
|
|
1481
|
+
"onUpdate:editing": M[1] || (M[1] = ($) => p.value = $)
|
|
1482
1482
|
}, {
|
|
1483
1483
|
filter: A(() => [
|
|
1484
1484
|
m(Ge, { onToggleAttributeFilter: te }),
|
|
@@ -1511,7 +1511,7 @@ const We = /* @__PURE__ */ E({
|
|
|
1511
1511
|
"categorized-items": n(i).linkableItems.value,
|
|
1512
1512
|
"initial-value": n(i).currentItems.value,
|
|
1513
1513
|
"show-variant": !1,
|
|
1514
|
-
onSubmit:
|
|
1514
|
+
onSubmit: M[2] || (M[2] = ($) => n(i).applyProduct($.map((N) => N._id)))
|
|
1515
1515
|
}, {
|
|
1516
1516
|
default: A(({ trigger: $ }) => [
|
|
1517
1517
|
m(T, {
|
|
@@ -1534,7 +1534,7 @@ const We = /* @__PURE__ */ E({
|
|
|
1534
1534
|
"categorized-items": n(u).linkableItems.value,
|
|
1535
1535
|
"initial-value": n(u).currentItems.value,
|
|
1536
1536
|
"show-variant": !1,
|
|
1537
|
-
onSubmit:
|
|
1537
|
+
onSubmit: M[3] || (M[3] = ($) => n(u).applyProduct($.map((N) => N._id)))
|
|
1538
1538
|
}, {
|
|
1539
1539
|
default: A(({ trigger: $ }) => [
|
|
1540
1540
|
m(T, {
|