@feedmepos/mf-menu 0.32.66-dev.2 → 0.32.66-dev.4
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-D0YpNkYr.js → App-DdmEswyc.js} +6 -6
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-YPM2sgEJ.js → ApplyProduct.vue_vue_type_script_setup_true_lang-ChxM7qYy.js} +7 -7
- package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-CAXhUciI.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-bZiXME9Z.js} +3 -3
- package/dist/{Catalog-I3XpPLoT.js → Catalog-GcX5VX2M.js} +6 -6
- package/dist/{Category-BTmqDRbK.js → Category-B2Kv3yJp.js} +4 -4
- package/dist/{Category-CfCp_M4X.js → Category-BwH-wVv2.js} +4 -4
- package/dist/{CookingGuide-BRHwTegP.js → CookingGuide-CWDprGu6.js} +5 -5
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-ksv-RMn2.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CmACeNnV.js} +1 -1
- package/dist/{Group-Bwj6UATr.js → Group-BavmrRXD.js} +3 -3
- package/dist/{Group-BvrANEY8.js → Group-YNbaHa27.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-CYLH4YhA.js → Group.vue_vue_type_script_setup_true_lang-9rGR3rec.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DWpeinru.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D12xx6Vd.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-DEvUaDcb.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-NAKJ0sFP.js} +9 -8
- package/dist/{Ingredient-B8n9cRsp.js → Ingredient-DHjSUUIP.js} +4 -4
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-92V2JZvW.js → InventoryBinding.vue_vue_type_script_setup_true_lang-U5AkGUri.js} +2 -2
- package/dist/{LinkProductSideSheet-LF2pdsYn.js → LinkProductSideSheet-BkNMJOiZ.js} +4 -4
- package/dist/{MenuSetting-DrObZATH.js → MenuSetting-Bm4O6MZ6.js} +7 -7
- package/dist/{OrderPacing-CIP1oshR.js → OrderPacing-DliNofLl.js} +5 -5
- package/dist/{PrintRoute-BUErmYxT.js → PrintRoute-1Py1_tzI.js} +5 -5
- package/dist/{Product-DBRc2y1I.js → Product-D3kyQmwQ.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-BvtMo0M4.js → Product.vue_vue_type_script_setup_true_lang-D-heQeQu.js} +622 -610
- package/dist/{ProductInternalTools-CnYr5piv.js → ProductInternalTools-87_B55Fr.js} +6 -6
- package/dist/{Products-DkqJELto.js → Products-B-J389Ks.js} +52 -52
- package/dist/Publish-BlYboQl0.js +1532 -0
- package/dist/{Recipe-DxTc4llT.js → Recipe-qb3ZdJGw.js} +5 -5
- package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-BC59l-9q.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-CXqE4HLg.js} +1 -1
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-BpGitWig.js → RuleView.vue_vue_type_script_setup_true_lang-CODY5qdL.js} +3 -3
- package/dist/{Scheduler-CtdYHGoQ.js → Scheduler-CeM3y0Ha.js} +3 -3
- package/dist/{ServingSequence-Bx0Z7ob9.js → ServingSequence-BCzXUO9n.js} +124 -121
- package/dist/{Setting-BWKT6o_d.js → Setting-sy6vMuPB.js} +5 -5
- package/dist/{Subcategory-BckJmrDm.js → Subcategory-BZti9kYo.js} +6 -6
- package/dist/{Takeaway-Dvt7GRhi.js → Takeaway-C9puqL8n.js} +4 -4
- package/dist/{Takeaway-DULjBrov.js → Takeaway-D5JlmD6u.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BanPhJ_p.js → Takeaway.vue_vue_type_script_setup_true_lang-j8d0lXOL.js} +10 -10
- package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-BA1GwxTn.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-DX_DRNF2.js} +1 -1
- package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-B45Qj3ka.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-DesC2w1k.js} +2 -2
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-mlqLqR9u.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CmuuSoGs.js} +15 -15
- package/dist/{Unit-C2rVtZXW.js → Unit-Cc42yyN6.js} +2 -2
- package/dist/{Variant-C1aRShIB.js → Variant-D19fCBB3.js} +3 -3
- package/dist/{_id_-TNQRaQmS.js → _id_-B9MKg_D-.js} +10 -10
- package/dist/{app-Cbzk6cOz.js → app-BN0HgwNB.js} +328 -328
- package/dist/{app-DwyLCetV.js → app-kMpCkgGC.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/api/media.d.ts +63 -10
- package/dist/apps/mf-menu/src/app.d.ts +130 -10
- package/dist/apps/mf-menu/src/components/feature/Fields/RangeSlider.vue.d.ts +62 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/productImages.d.ts +95 -12
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/ImageEditorDialog.vue.d.ts +56 -0
- package/dist/apps/mf-menu/src/composable/imageSource.d.ts +7 -0
- package/dist/apps/mf-menu/src/composable/imageVersion.d.ts +11 -0
- package/dist/apps/mf-menu/src/helper/itemOverrider.d.ts +10 -0
- package/dist/apps/mf-menu/src/stores/menu.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/Publish/publishStatus.d.ts +27 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{override-menu-Ccftxk6t.js → linked-status-CfzY6n0e.js} +4 -4
- package/dist/assets/{menu-export-BaTSKjZt.js → menu-export-CALDQ8k1.js} +3 -3
- package/dist/assets/{linked-status-BY2u9ovw.js → override-menu-CmqrughS.js} +4 -4
- package/dist/assets/{validate-menu-CLI_SnXI.js → validate-menu-BgjAdwUE.js} +4 -4
- package/dist/{catalog-CVzF_mVG.js → catalog-BuKsorK6.js} +1 -1
- package/dist/{catalogSetting-C1g9ndFL.js → catalogSetting-B5EtNHwb.js} +1 -1
- package/dist/{currency-BMMqzZYC.js → currency-BTbX6PWL.js} +1 -1
- package/dist/{dayjs.min-BozAuX2f.js → dayjs.min-KeFRLajb.js} +2 -2
- package/dist/{discardConfirm-CFESnGLS.js → discardConfirm-zfX1nuye.js} +1 -1
- package/dist/{index-BNzLcju2.js → index-DDJHOjwR.js} +1 -1
- package/dist/{index-CyomkF6Q.js → index-DTakcRjO.js} +5 -5
- package/dist/{index-BRt5TwuO.js → index-DfoDRA0k.js} +6 -6
- package/dist/{index.vue_vue_type_script_setup_true_lang-CESDAztS.js → index.vue_vue_type_script_setup_true_lang-DybNA4Np.js} +24886 -24717
- package/dist/{item-Bg78_1Z3.js → item-jpOmJGLW.js} +5058 -4584
- package/dist/{jszip.min-CfmqMq7-.js → jszip.min-DyvQ41lT.js} +3 -3
- package/dist/{linkProducts-Dk-7vVTM.js → linkProducts-DFJMpL5n.js} +4 -4
- package/dist/{memberPricing-BeLPeWJc.js → memberPricing-BZgeIGmU.js} +1 -1
- package/dist/{menu-Cn6vin1M.js → menu-BupVgTY-.js} +1 -1
- package/dist/{menuV2-DMl-WMCG.js → menuV2-B9-ODrLW.js} +85 -85
- package/dist/mf-menu.css +1 -1
- package/dist/{order_pacing-SVJqBJun.js → order_pacing-Dfey1efO.js} +5 -5
- package/dist/{priceTier-BOIqyyMG.js → priceTier-eGLFeyfY.js} +1 -1
- package/dist/{rules-Bw94jp35.js → rules-BS6BLc8X.js} +3 -3
- package/dist/{scheduler-BooRYOi1.js → scheduler-3BGOjjCO.js} +5 -5
- package/dist/{toExcel-FAK9N74s.js → toExcel-BmTqFf7v.js} +2 -2
- package/dist/{unit-BiH3semx.js → unit-D2oVUlp4.js} +3 -3
- package/package.json +1 -1
- package/dist/Publish-C94D_B2o.js +0 -1434
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/ImageUploadDialog.vue.d.ts +0 -18
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
import { ref as F, computed as
|
|
2
|
-
import { l as be } from "./discardConfirm-
|
|
3
|
-
import { u as Ie, o as we, a as ce, d as Ue, I as
|
|
4
|
-
import { useI18n as $e, useCoreStore as
|
|
5
|
-
import { u as Ve } from "./menu-
|
|
6
|
-
import { L as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { u as
|
|
10
|
-
import { f as
|
|
11
|
-
import { w as
|
|
12
|
-
import { b as
|
|
13
|
-
import { useBreakpoints as
|
|
14
|
-
import { f as
|
|
15
|
-
import { _ as
|
|
1
|
+
import { ref as F, computed as x, defineComponent as G, resolveComponent as K, createBlock as I, openBlock as m, withCtx as $, createElementVNode as g, createVNode as d, unref as n, createElementBlock as w, Fragment as de, renderList as Se, createCommentVNode as M, normalizeClass as me, toDisplayString as E, withModifiers as fe, mergeModels as at, useModel as ot, renderSlot as ye, watch as ie, createTextVNode as nt, watchEffect as rt, nextTick as Oe, resolveDynamicComponent as st, onMounted as ut, h as O, isRef as qe, normalizeStyle as xt } from "vue";
|
|
2
|
+
import { l as be } from "./discardConfirm-zfX1nuye.js";
|
|
3
|
+
import { u as Ie, o as we, a as ce, d as Ue, I as Ct, Q as wt, _ as _e } from "./index.vue_vue_type_script_setup_true_lang-DybNA4Np.js";
|
|
4
|
+
import { useI18n as $e, useCoreStore as De, useCustomAttributes as kt } from "@feedmepos/mf-common";
|
|
5
|
+
import { u as Ve } from "./menu-BupVgTY-.js";
|
|
6
|
+
import { L as We } from "./LinkProductSideSheet-BkNMJOiZ.js";
|
|
7
|
+
import { _ as He } from "./RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-CXqE4HLg.js";
|
|
8
|
+
import { _ as ze, a as Qe } from "./CustomAttributeChip.vue_vue_type_script_setup_true_lang-CmACeNnV.js";
|
|
9
|
+
import { u as St } from "./linkProducts-DFJMpL5n.js";
|
|
10
|
+
import { f as Vt, o as Ft, a as It, m as $t } from "./menuV2-B9-ODrLW.js";
|
|
11
|
+
import { w as it, al as Tt, am as Pt, M as At, G as Rt, an as Ye } from "./item-jpOmJGLW.js";
|
|
12
|
+
import { b as Ze, H as Mt } from "./app-5fxKLAzS.js";
|
|
13
|
+
import { useBreakpoints as ct, components as ee, useDialog as Ot, FmButtonColorThemeVariant as W, FmButtonVariant as X } from "@feedmepos/ui-library";
|
|
14
|
+
import { f as Ne, h as Re, g as Ut, F as zt } from "./index-DDJHOjwR.js";
|
|
15
|
+
import { _ as Ke, d as Nt, e as Dt } from "./app-BN0HgwNB.js";
|
|
16
16
|
import { _ as ke } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
|
|
17
|
-
import { _ as
|
|
18
|
-
import { r as
|
|
19
|
-
import { _ as
|
|
20
|
-
import { c as
|
|
21
|
-
import { f as
|
|
22
|
-
import { w as
|
|
23
|
-
function
|
|
24
|
-
const
|
|
25
|
-
if (!
|
|
17
|
+
import { _ as Kt } from "./index-DfoDRA0k.js";
|
|
18
|
+
import { r as Bt, _ as jt } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-NAKJ0sFP.js";
|
|
19
|
+
import { _ as Je } from "./TranslationViewChip.vue_vue_type_script_setup_true_lang-DiK3fi9J.js";
|
|
20
|
+
import { c as Et } from "./check-C9mY6LiX.js";
|
|
21
|
+
import { f as Gt } from "./currency-BTbX6PWL.js";
|
|
22
|
+
import { w as Lt } from "./tooltip-B5BiPMx9.js";
|
|
23
|
+
function qt(h, e, c = h) {
|
|
24
|
+
const r = F(!0), o = x(() => {
|
|
25
|
+
if (!r.value && !e.value)
|
|
26
26
|
return !0;
|
|
27
|
-
if (
|
|
27
|
+
if (e.value && e.value.length > 0) {
|
|
28
28
|
const f = c.value.map((s) => s.value);
|
|
29
|
-
return
|
|
29
|
+
return e.value.length === f.length && e.value.every((s) => f.includes(s));
|
|
30
30
|
}
|
|
31
31
|
return !1;
|
|
32
|
-
}), u =
|
|
33
|
-
var f, s,
|
|
34
|
-
return !!((f =
|
|
32
|
+
}), u = x(() => {
|
|
33
|
+
var f, s, b, _;
|
|
34
|
+
return !!((f = e.value) != null && f.length && ((s = e.value) == null ? void 0 : s.length) > 0 && ((b = e.value) == null ? void 0 : b.length) < ((_ = h.value) == null ? void 0 : _.length));
|
|
35
35
|
});
|
|
36
|
-
return { allCleared:
|
|
36
|
+
return { allCleared: r, allSelected: o, indeterminate: u, toggleAll: () => {
|
|
37
37
|
if (o.value) {
|
|
38
|
-
|
|
38
|
+
e.value = void 0, r.value = !0;
|
|
39
39
|
return;
|
|
40
40
|
}
|
|
41
41
|
const f = c.value.map((s) => s.value);
|
|
42
|
-
f.length ===
|
|
42
|
+
f.length === h.value.length ? (e.value = void 0, r.value = !1) : (e.value = f, r.value = !1);
|
|
43
43
|
}, toggleOption: (f) => {
|
|
44
|
-
var
|
|
44
|
+
var b, _, k;
|
|
45
45
|
let s;
|
|
46
|
-
|
|
46
|
+
e.value === void 0 && r.value ? s = [f] : e.value === void 0 && !r.value ? s = (b = h.value.map((N) => N.value)) == null ? void 0 : b.filter((N) => N !== f) : (_ = e.value) != null && _.includes(f) ? s = (k = e.value) == null ? void 0 : k.filter((N) => N !== f) : s = [...e.value || [], f], s.length === 0 ? (e.value = void 0, r.value = !0) : s.length === h.value.length ? (e.value = void 0, r.value = !1) : e.value = s;
|
|
47
47
|
} };
|
|
48
48
|
}
|
|
49
|
-
const
|
|
49
|
+
const Wt = { class: "inline-flex items-center" }, Ht = {
|
|
50
50
|
key: 0,
|
|
51
51
|
class: /* @__PURE__ */ me([
|
|
52
52
|
"fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap",
|
|
53
53
|
"text-fm-color-neutral-gray-400"
|
|
54
54
|
])
|
|
55
|
-
},
|
|
55
|
+
}, Qt = { class: "p-4" }, Yt = { class: "flex-1 overflow-y-auto min-h-0" }, Xe = /* @__PURE__ */ G({
|
|
56
56
|
__name: "CategorySelector",
|
|
57
57
|
emits: ["toggleAttributeFilter"],
|
|
58
|
-
setup(
|
|
59
|
-
const c =
|
|
58
|
+
setup(h, { emit: e }) {
|
|
59
|
+
const c = e, r = Ie(), { categories: o, selectedCategories: u } = Ve(), a = x(() => r.state.currentCategoryIds), v = x(
|
|
60
60
|
() => o.value.map((B) => ({ label: B.name, value: B.id }))
|
|
61
|
-
), f =
|
|
62
|
-
(B) => B.label.toLowerCase().includes(
|
|
63
|
-
)), { t: s } = $e(),
|
|
61
|
+
), f = x(() => v.value.filter(
|
|
62
|
+
(B) => B.label.toLowerCase().includes(_.value.toLowerCase())
|
|
63
|
+
)), { t: s } = $e(), b = x(() => {
|
|
64
64
|
var B, D, H;
|
|
65
65
|
return o.value.length === ((B = u.value) == null ? void 0 : B.length) ? s("menu.category.selector.all") : ((D = u.value) == null ? void 0 : D.length) === 1 ? u.value[0].name : `${(H = u.value) == null ? void 0 : H.length}`;
|
|
66
|
-
}),
|
|
66
|
+
}), _ = F(""), k = x({
|
|
67
67
|
get: () => a.value,
|
|
68
68
|
set: (B) => {
|
|
69
|
-
|
|
69
|
+
r.selectCategory(B);
|
|
70
70
|
}
|
|
71
|
-
}), { allSelected: N, toggleAll: Y, toggleOption: S, indeterminate: ae } =
|
|
71
|
+
}), { allSelected: N, toggleAll: Y, toggleOption: S, indeterminate: ae } = qt(
|
|
72
72
|
v,
|
|
73
73
|
k,
|
|
74
74
|
f
|
|
75
|
-
), Z =
|
|
75
|
+
), Z = De(), oe = x(() => Z.itemAttributeSettings.value.length > 0);
|
|
76
76
|
function q() {
|
|
77
77
|
c("toggleAttributeFilter");
|
|
78
78
|
}
|
|
79
79
|
return (B, D) => {
|
|
80
|
-
const H = K("FmIcon"), J = K("FmChip"),
|
|
81
|
-
return m(), I(
|
|
80
|
+
const H = K("FmIcon"), J = K("FmChip"), ne = K("FmSearch"), Q = K("FmMenuItem"), re = K("FmMenu");
|
|
81
|
+
return m(), I(re, {
|
|
82
82
|
"close-on-click": !1,
|
|
83
83
|
width: 220
|
|
84
84
|
}, {
|
|
85
85
|
"menu-button": $(() => [
|
|
86
|
-
|
|
86
|
+
g("div", Wt, [
|
|
87
87
|
d(J, null, {
|
|
88
88
|
default: $(() => [
|
|
89
|
-
|
|
89
|
+
b.value ? (m(), w("div", Ht, E(n(s)("menu.category.selector.title", { label: b.value })), 1)) : M("", !0),
|
|
90
90
|
d(H, {
|
|
91
91
|
color: "neutral-gray-400",
|
|
92
92
|
name: "expand_more",
|
|
@@ -112,21 +112,21 @@ const qt = { class: "inline-flex items-center" }, Wt = {
|
|
|
112
112
|
])
|
|
113
113
|
]),
|
|
114
114
|
default: $(() => [
|
|
115
|
-
|
|
116
|
-
d(
|
|
115
|
+
g("div", Qt, [
|
|
116
|
+
d(ne, {
|
|
117
117
|
autofocus: "",
|
|
118
|
-
modelValue:
|
|
119
|
-
"onUpdate:modelValue": D[1] || (D[1] = (P) =>
|
|
120
|
-
placeholder:
|
|
118
|
+
modelValue: _.value,
|
|
119
|
+
"onUpdate:modelValue": D[1] || (D[1] = (P) => _.value = P),
|
|
120
|
+
placeholder: n(s)("menu.common.actions.search")
|
|
121
121
|
}, null, 8, ["modelValue", "placeholder"])
|
|
122
122
|
]),
|
|
123
|
-
|
|
123
|
+
g("div", Yt, [
|
|
124
124
|
d(Q, {
|
|
125
125
|
label: "All",
|
|
126
126
|
"has-checkbox": "",
|
|
127
|
-
"model-value":
|
|
128
|
-
indeterminate:
|
|
129
|
-
onClick:
|
|
127
|
+
"model-value": n(N),
|
|
128
|
+
indeterminate: n(ae),
|
|
129
|
+
onClick: n(Y)
|
|
130
130
|
}, null, 8, ["model-value", "indeterminate", "onClick"]),
|
|
131
131
|
(m(!0), w(de, null, Se(f.value, (P) => {
|
|
132
132
|
var T;
|
|
@@ -134,8 +134,8 @@ const qt = { class: "inline-flex items-center" }, Wt = {
|
|
|
134
134
|
key: P.value || "",
|
|
135
135
|
label: P.label,
|
|
136
136
|
"has-checkbox": "",
|
|
137
|
-
"model-value":
|
|
138
|
-
onClick: (
|
|
137
|
+
"model-value": n(N) || ((T = k.value) == null ? void 0 : T.includes(P.value)),
|
|
138
|
+
onClick: (U) => n(S)(P.value)
|
|
139
139
|
}, null, 8, ["label", "model-value", "onClick"]);
|
|
140
140
|
}), 128))
|
|
141
141
|
])
|
|
@@ -144,42 +144,42 @@ const qt = { class: "inline-flex items-center" }, Wt = {
|
|
|
144
144
|
});
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
|
-
}),
|
|
147
|
+
}), Zt = { class: "flex flex-wrap gap-8" }, Jt = { class: "py-12 px-16 space-y-12" }, Xt = { class: "fm-typo-en-body-md-600 text-fm-color-neutral-gray-600" }, el = { class: "flex flex-wrap gap-8" }, tl = {
|
|
148
148
|
key: 0,
|
|
149
149
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
150
|
-
},
|
|
150
|
+
}, ll = { key: 0 }, al = {
|
|
151
151
|
key: 1,
|
|
152
152
|
class: "inline-block w-8"
|
|
153
|
-
},
|
|
153
|
+
}, ol = { key: 0 }, nl = { key: 1 }, et = /* @__PURE__ */ G({
|
|
154
154
|
__name: "CategoriesChip",
|
|
155
155
|
props: {
|
|
156
156
|
categories: { default: () => [] },
|
|
157
157
|
ellipsis: { type: Boolean, default: !0 }
|
|
158
158
|
},
|
|
159
|
-
setup(
|
|
160
|
-
const
|
|
159
|
+
setup(h) {
|
|
160
|
+
const e = h, { t: c } = $e(), r = ct(), o = x(() => r.breakpoints.value.xs), u = x(() => e.ellipsis ? o.value ? 1 : 2 : 1 / 0), a = x(() => e.categories.length <= u.value ? e.categories : e.categories.slice(0, u.value)), v = F(!0), f = x(() => {
|
|
161
161
|
if (v.value) {
|
|
162
|
-
const
|
|
163
|
-
return
|
|
162
|
+
const b = a.value.join(", ");
|
|
163
|
+
return b.length > 20 ? b.slice(0, 20) + "..." : b;
|
|
164
164
|
}
|
|
165
|
-
return
|
|
165
|
+
return e.categories.join(", ");
|
|
166
166
|
});
|
|
167
|
-
return (s,
|
|
168
|
-
const
|
|
167
|
+
return (s, b) => {
|
|
168
|
+
const _ = K("FmTooltip");
|
|
169
169
|
return o.value ? (m(), w(de, { key: 1 }, [
|
|
170
|
-
s.categories.length > 0 ? (m(), w("p",
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
v.value ? (m(), w("span",
|
|
170
|
+
s.categories.length > 0 ? (m(), w("p", tl, [
|
|
171
|
+
g("span", null, E(n(c)("menu.product.table.columns.category")) + ": ", 1),
|
|
172
|
+
g("span", null, E(f.value), 1),
|
|
173
|
+
v.value ? (m(), w("span", al)) : (m(), w("br", ll)),
|
|
174
174
|
s.categories.length > u.value ? (m(), w("span", {
|
|
175
175
|
key: 2,
|
|
176
176
|
class: "fm-typo-en-body-md-400 text-fm-color-primary cursor-pointer",
|
|
177
|
-
onClick:
|
|
177
|
+
onClick: b[0] || (b[0] = fe((k) => v.value = !v.value, ["stop", "prevent"]))
|
|
178
178
|
}, [
|
|
179
|
-
v.value ? (m(), w("span",
|
|
179
|
+
v.value ? (m(), w("span", ol, E(n(c)("menu.product.table.category.expand", { count: s.categories.length - u.value })), 1)) : (m(), w("span", nl, E(n(c)("menu.product.table.category.collapse")), 1))
|
|
180
180
|
])) : M("", !0)
|
|
181
181
|
])) : M("", !0)
|
|
182
|
-
], 64)) : (m(), I(
|
|
182
|
+
], 64)) : (m(), I(_, {
|
|
183
183
|
key: 0,
|
|
184
184
|
class: "flex",
|
|
185
185
|
variant: "rich",
|
|
@@ -187,10 +187,10 @@ const qt = { class: "inline-flex items-center" }, Wt = {
|
|
|
187
187
|
"z-index": 50
|
|
188
188
|
}, {
|
|
189
189
|
content: $(() => [
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
(m(!0), w(de, null, Se(
|
|
190
|
+
g("div", Jt, [
|
|
191
|
+
g("p", Xt, E(n(c)("menu.product.table.category.all")), 1),
|
|
192
|
+
g("div", el, [
|
|
193
|
+
(m(!0), w(de, null, Se(e.categories, (k) => (m(), I(ke, {
|
|
194
194
|
key: k,
|
|
195
195
|
label: k,
|
|
196
196
|
variant: "neutral"
|
|
@@ -199,7 +199,7 @@ const qt = { class: "inline-flex items-center" }, Wt = {
|
|
|
199
199
|
])
|
|
200
200
|
]),
|
|
201
201
|
default: $(() => [
|
|
202
|
-
|
|
202
|
+
g("div", Zt, [
|
|
203
203
|
(m(!0), w(de, null, Se(a.value, (k) => (m(), I(ke, {
|
|
204
204
|
key: k,
|
|
205
205
|
label: k,
|
|
@@ -218,7 +218,7 @@ const qt = { class: "inline-flex items-center" }, Wt = {
|
|
|
218
218
|
}
|
|
219
219
|
}), rl = /* @__PURE__ */ G({
|
|
220
220
|
__name: "ProductSearcher",
|
|
221
|
-
props: /* @__PURE__ */
|
|
221
|
+
props: /* @__PURE__ */ at({
|
|
222
222
|
label: {},
|
|
223
223
|
helperText: {},
|
|
224
224
|
menu: {}
|
|
@@ -227,8 +227,8 @@ const qt = { class: "inline-flex items-center" }, Wt = {
|
|
|
227
227
|
modelModifiers: {}
|
|
228
228
|
}),
|
|
229
229
|
emits: ["update:modelValue"],
|
|
230
|
-
setup(
|
|
231
|
-
const
|
|
230
|
+
setup(h) {
|
|
231
|
+
const e = h, c = ot(h, "modelValue"), r = x(() => e.menu.modules.item.map((o) => ({
|
|
232
232
|
label: o.code ? `${o.code} ${o.name}` : o.name,
|
|
233
233
|
value: o._id
|
|
234
234
|
})));
|
|
@@ -237,7 +237,7 @@ const qt = { class: "inline-flex items-center" }, Wt = {
|
|
|
237
237
|
return m(), I(a, {
|
|
238
238
|
modelValue: c.value,
|
|
239
239
|
"onUpdate:modelValue": u[0] || (u[0] = (v) => c.value = v),
|
|
240
|
-
items:
|
|
240
|
+
items: r.value,
|
|
241
241
|
searchable: !0,
|
|
242
242
|
"search-target": "label",
|
|
243
243
|
placeholder: "Search by product name or code",
|
|
@@ -246,12 +246,12 @@ const qt = { class: "inline-flex items-center" }, Wt = {
|
|
|
246
246
|
}, null, 8, ["modelValue", "items", "label", "helper-text"]);
|
|
247
247
|
};
|
|
248
248
|
}
|
|
249
|
-
}),
|
|
249
|
+
}), sl = { class: "flex" }, ul = { class: "w-[260px] space-y-16 h-full" }, il = { class: "flex items-center gap-4 px-8" }, cl = { class: "fm-typo-en-title-sm-600" }, dl = {
|
|
250
250
|
key: 0,
|
|
251
251
|
class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4"
|
|
252
|
-
},
|
|
252
|
+
}, ml = { class: "fm-typo-en-body-md-600" }, pl = { class: "flex-1" }, dt = /* @__PURE__ */ G({
|
|
253
253
|
__name: "ViewLayout",
|
|
254
|
-
props: /* @__PURE__ */
|
|
254
|
+
props: /* @__PURE__ */ at({
|
|
255
255
|
title: {},
|
|
256
256
|
titleBadge: {},
|
|
257
257
|
items: {}
|
|
@@ -260,31 +260,31 @@ const qt = { class: "inline-flex items-center" }, Wt = {
|
|
|
260
260
|
modelModifiers: {}
|
|
261
261
|
}),
|
|
262
262
|
emits: ["update:modelValue"],
|
|
263
|
-
setup(
|
|
264
|
-
const
|
|
265
|
-
return (c,
|
|
263
|
+
setup(h) {
|
|
264
|
+
const e = ot(h, "modelValue");
|
|
265
|
+
return (c, r) => {
|
|
266
266
|
const o = K("FmCollapsibleTabs");
|
|
267
|
-
return m(), w("div",
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
c.titleBadge !== void 0 ? (m(), w("div",
|
|
272
|
-
|
|
267
|
+
return m(), w("div", sl, [
|
|
268
|
+
g("div", ul, [
|
|
269
|
+
g("div", il, [
|
|
270
|
+
g("p", cl, E(c.title), 1),
|
|
271
|
+
c.titleBadge !== void 0 ? (m(), w("div", dl, [
|
|
272
|
+
g("p", ml, E(c.titleBadge), 1)
|
|
273
273
|
])) : M("", !0)
|
|
274
274
|
]),
|
|
275
|
-
d(
|
|
275
|
+
d(Ke, null, {
|
|
276
276
|
default: $(() => [
|
|
277
277
|
d(o, {
|
|
278
|
-
modelValue:
|
|
279
|
-
"onUpdate:modelValue":
|
|
278
|
+
modelValue: e.value,
|
|
279
|
+
"onUpdate:modelValue": r[0] || (r[0] = (u) => e.value = u),
|
|
280
280
|
items: c.items
|
|
281
281
|
}, null, 8, ["modelValue", "items"])
|
|
282
282
|
]),
|
|
283
283
|
_: 1
|
|
284
284
|
})
|
|
285
285
|
]),
|
|
286
|
-
|
|
287
|
-
|
|
286
|
+
r[1] || (r[1] = g("div", { class: "w-[1px] min-h-full ml-4 mr-12 bg-fm-color-neutral-gray-100 self-stretch" }, null, -1)),
|
|
287
|
+
g("div", pl, [
|
|
288
288
|
ye(c.$slots, "default")
|
|
289
289
|
])
|
|
290
290
|
]);
|
|
@@ -295,23 +295,23 @@ const qt = { class: "inline-flex items-center" }, Wt = {
|
|
|
295
295
|
props: {
|
|
296
296
|
orderFrom: {}
|
|
297
297
|
},
|
|
298
|
-
setup(
|
|
299
|
-
const
|
|
300
|
-
return (
|
|
298
|
+
setup(h) {
|
|
299
|
+
const e = h, c = we();
|
|
300
|
+
return (r, o) => {
|
|
301
301
|
var u, a;
|
|
302
302
|
return m(), I(ke, {
|
|
303
|
-
label: ((u =
|
|
304
|
-
variant: (a =
|
|
303
|
+
label: ((u = n(c)[e.orderFrom]) == null ? void 0 : u.label) || e.orderFrom,
|
|
304
|
+
variant: (a = n(c)[e.orderFrom]) == null ? void 0 : a.variant
|
|
305
305
|
}, null, 8, ["label", "variant"]);
|
|
306
306
|
};
|
|
307
307
|
}
|
|
308
|
-
}),
|
|
308
|
+
}), vl = /* @__PURE__ */ G({
|
|
309
309
|
__name: "GroupViewTable",
|
|
310
310
|
props: {
|
|
311
311
|
data: {}
|
|
312
312
|
},
|
|
313
|
-
setup(
|
|
314
|
-
const
|
|
313
|
+
setup(h) {
|
|
314
|
+
const e = h, c = [{
|
|
315
315
|
accessorKey: "code",
|
|
316
316
|
header: () => "Code",
|
|
317
317
|
enableSorting: !1,
|
|
@@ -326,7 +326,7 @@ const qt = { class: "inline-flex items-center" }, Wt = {
|
|
|
326
326
|
variant: "tertiary",
|
|
327
327
|
class: ["cursor-pointer", "transition-transform", a.getIsExpanded() ? "transform rotate-180" : ""],
|
|
328
328
|
onClick: a.getToggleExpandedHandler()
|
|
329
|
-
}, null),
|
|
329
|
+
}, null), nt("Found in group: "), v.groupName]) : v.code;
|
|
330
330
|
},
|
|
331
331
|
meta: {
|
|
332
332
|
colspan: (a) => a.original.subRows ? 5 : 1
|
|
@@ -365,41 +365,41 @@ const qt = { class: "inline-flex items-center" }, Wt = {
|
|
|
365
365
|
meta: {
|
|
366
366
|
colspan: (a) => a.original.subRows ? 0 : 1
|
|
367
367
|
}
|
|
368
|
-
}],
|
|
368
|
+
}], r = F({}), o = (a) => a.subRows;
|
|
369
369
|
function u() {
|
|
370
|
-
|
|
370
|
+
r.value = Object.fromEntries(e.data.map((a, v) => [v, !0]));
|
|
371
371
|
}
|
|
372
|
-
return ie(() =>
|
|
372
|
+
return ie(() => e.data, () => {
|
|
373
373
|
u();
|
|
374
374
|
}), (a, v) => {
|
|
375
375
|
const f = K("FmTable");
|
|
376
|
-
return m(), I(
|
|
376
|
+
return m(), I(Ke, null, {
|
|
377
377
|
default: $(() => [d(f, {
|
|
378
378
|
"column-defs": c,
|
|
379
379
|
"row-data": a.data,
|
|
380
380
|
"hide-footer": !0,
|
|
381
381
|
"page-size": 1e6,
|
|
382
382
|
"get-sub-row": o,
|
|
383
|
-
"expanded-state":
|
|
383
|
+
"expanded-state": r.value,
|
|
384
384
|
"shrink-at": !1,
|
|
385
|
-
"onUpdate:expandedState": v[0] || (v[0] = (s) =>
|
|
385
|
+
"onUpdate:expandedState": v[0] || (v[0] = (s) => r.value = s)
|
|
386
386
|
}, null, 8, ["row-data", "expanded-state"])]),
|
|
387
387
|
_: 1
|
|
388
388
|
});
|
|
389
389
|
};
|
|
390
390
|
}
|
|
391
|
-
}),
|
|
391
|
+
}), fl = /* @__PURE__ */ G({
|
|
392
392
|
__name: "GroupView",
|
|
393
393
|
props: {
|
|
394
394
|
itemId: {},
|
|
395
395
|
menu: {}
|
|
396
396
|
},
|
|
397
|
-
setup(
|
|
398
|
-
const
|
|
399
|
-
const s = o.value.find((
|
|
400
|
-
return ((s == null ? void 0 : s.itemInGroup) || []).map((
|
|
401
|
-
groupName:
|
|
402
|
-
subRows:
|
|
397
|
+
setup(h) {
|
|
398
|
+
const e = h, c = F(""), r = x(() => o.value.reduce((s, b) => s + (typeof b.badge == "number" ? b.badge ?? 1 : 0), 0)), o = F([]), u = x(() => {
|
|
399
|
+
const s = o.value.find((_) => _.value === c.value);
|
|
400
|
+
return ((s == null ? void 0 : s.itemInGroup) || []).map((_) => ({
|
|
401
|
+
groupName: _.group.name,
|
|
402
|
+
subRows: _.items.map((k) => ({
|
|
403
403
|
// @ts-ignore
|
|
404
404
|
code: k.code || k.fallbackCode,
|
|
405
405
|
productName: k.combinationKey ? "" : k.name ?? "",
|
|
@@ -418,25 +418,25 @@ const qt = { class: "inline-flex items-center" }, Wt = {
|
|
|
418
418
|
disabled: !1,
|
|
419
419
|
badge: void 0,
|
|
420
420
|
itemInGroup: []
|
|
421
|
-
}, ...
|
|
422
|
-
label:
|
|
423
|
-
value:
|
|
424
|
-
catalogId:
|
|
421
|
+
}, ...e.menu.modules.catalog.map((b) => ({
|
|
422
|
+
label: b.name,
|
|
423
|
+
value: b._id,
|
|
424
|
+
catalogId: b._id,
|
|
425
425
|
data: [],
|
|
426
426
|
disabled: !1,
|
|
427
427
|
badge: void 0,
|
|
428
428
|
itemInGroup: []
|
|
429
429
|
}))];
|
|
430
430
|
}
|
|
431
|
-
|
|
431
|
+
x(() => o.value.find((s) => s.value === c.value));
|
|
432
432
|
async function v(s) {
|
|
433
|
-
const
|
|
434
|
-
if (
|
|
435
|
-
|
|
433
|
+
const b = o.value.find((_) => _.catalogId === s);
|
|
434
|
+
if (b) {
|
|
435
|
+
b.badge = () => d(ee.FmCircularProgress, {
|
|
436
436
|
size: "md"
|
|
437
437
|
}, null);
|
|
438
|
-
const
|
|
439
|
-
|
|
438
|
+
const _ = await Vt(Ue(e.menu), s, e.itemId);
|
|
439
|
+
b.badge = _.length, b.disabled = _.length <= 0, b.itemInGroup = _;
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
442
|
function f() {
|
|
@@ -444,26 +444,26 @@ const qt = { class: "inline-flex items-center" }, Wt = {
|
|
|
444
444
|
v(s.catalogId);
|
|
445
445
|
});
|
|
446
446
|
}
|
|
447
|
-
return ie([() =>
|
|
448
|
-
|
|
447
|
+
return ie([() => e.menu, () => e.itemId], () => {
|
|
448
|
+
e.menu && e.itemId && f();
|
|
449
449
|
}, {
|
|
450
450
|
immediate: !0
|
|
451
|
-
}), (s,
|
|
451
|
+
}), (s, b) => (m(), I(dt, {
|
|
452
452
|
modelValue: c.value,
|
|
453
|
-
"onUpdate:modelValue":
|
|
453
|
+
"onUpdate:modelValue": b[0] || (b[0] = (_) => c.value = _),
|
|
454
454
|
items: o.value,
|
|
455
455
|
title: "Catalog",
|
|
456
|
-
"title-badge":
|
|
456
|
+
"title-badge": r.value
|
|
457
457
|
}, {
|
|
458
|
-
default: $(() => [d(
|
|
458
|
+
default: $(() => [d(vl, {
|
|
459
459
|
data: u.value
|
|
460
460
|
}, null, 8, ["data"])]),
|
|
461
461
|
_: 1
|
|
462
462
|
}, 8, ["modelValue", "items", "title-badge"]));
|
|
463
463
|
}
|
|
464
|
-
}),
|
|
464
|
+
}), gl = {
|
|
465
465
|
class: "scroll-x-auto"
|
|
466
|
-
},
|
|
466
|
+
}, bl = /* @__PURE__ */ G({
|
|
467
467
|
__name: "ProductViewTable",
|
|
468
468
|
props: {
|
|
469
469
|
itemId: {},
|
|
@@ -471,8 +471,8 @@ const qt = { class: "inline-flex items-center" }, Wt = {
|
|
|
471
471
|
catalogId: {},
|
|
472
472
|
schedulerIds: {}
|
|
473
473
|
},
|
|
474
|
-
setup(
|
|
475
|
-
const
|
|
474
|
+
setup(h) {
|
|
475
|
+
const e = h, c = [{
|
|
476
476
|
accessorKey: "scheduler",
|
|
477
477
|
header: () => "Scheduler",
|
|
478
478
|
enableSorting: !1,
|
|
@@ -506,7 +506,7 @@ const qt = { class: "inline-flex items-center" }, Wt = {
|
|
|
506
506
|
}, null);
|
|
507
507
|
},
|
|
508
508
|
enableSorting: !1
|
|
509
|
-
}],
|
|
509
|
+
}], r = F([]);
|
|
510
510
|
function o(u, a) {
|
|
511
511
|
return {
|
|
512
512
|
loading: !0,
|
|
@@ -518,44 +518,44 @@ const qt = { class: "inline-flex items-center" }, Wt = {
|
|
|
518
518
|
orderFrom: "--"
|
|
519
519
|
};
|
|
520
520
|
}
|
|
521
|
-
return ie([() =>
|
|
522
|
-
|
|
521
|
+
return ie([() => e.menu, () => e.catalogId, () => e.schedulerIds], async () => {
|
|
522
|
+
r.value = [o(null, "All day"), ...e.schedulerIds.map((u) => {
|
|
523
523
|
var a;
|
|
524
|
-
return o(u, ((a =
|
|
525
|
-
})],
|
|
526
|
-
const v = (await
|
|
524
|
+
return o(u, ((a = e.menu.modules.scheduler.find((v) => v._id === u)) == null ? void 0 : a.name) || "Unknown");
|
|
525
|
+
})], r.value.forEach(async (u) => {
|
|
526
|
+
const v = (await Ft(Ue(e.menu), e.catalogId, u.schedulerId)).modules.item.find((s) => s._id === e.itemId), f = r.value.findIndex((s) => s.schedulerId === u.schedulerId);
|
|
527
527
|
if (v) {
|
|
528
|
-
const s = Ue(
|
|
529
|
-
s[f].loading = !1, s[f].code = v.code || "--", s[f].productName = v.name || "--", s[f].price = ce.Dinero.fromFdoDinero(v.price).toFormat(), s[f].orderFrom = v.orderFrom || "--",
|
|
528
|
+
const s = Ue(r.value);
|
|
529
|
+
s[f].loading = !1, s[f].code = v.code || "--", s[f].productName = v.name || "--", s[f].price = ce.Dinero.fromFdoDinero(v.price).toFormat(), s[f].orderFrom = v.orderFrom || "--", r.value = s;
|
|
530
530
|
}
|
|
531
531
|
});
|
|
532
532
|
}), (u, a) => {
|
|
533
533
|
const v = K("FmTable");
|
|
534
|
-
return m(), I(
|
|
535
|
-
default: $(() => [
|
|
534
|
+
return m(), I(Ke, null, {
|
|
535
|
+
default: $(() => [g("div", gl, [d(v, {
|
|
536
536
|
class: "min-w-[800px]",
|
|
537
537
|
"column-defs": c,
|
|
538
|
-
"row-data":
|
|
538
|
+
"row-data": r.value,
|
|
539
539
|
"hide-footer": !0,
|
|
540
|
-
"page-size":
|
|
540
|
+
"page-size": r.value.length,
|
|
541
541
|
"shrink-at": !1
|
|
542
542
|
}, null, 8, ["row-data", "page-size"])])]),
|
|
543
543
|
_: 1
|
|
544
544
|
});
|
|
545
545
|
};
|
|
546
546
|
}
|
|
547
|
-
}),
|
|
547
|
+
}), _l = /* @__PURE__ */ G({
|
|
548
548
|
__name: "ProductView",
|
|
549
549
|
props: {
|
|
550
550
|
itemId: {},
|
|
551
551
|
menu: {}
|
|
552
552
|
},
|
|
553
|
-
setup(
|
|
554
|
-
const
|
|
553
|
+
setup(h) {
|
|
554
|
+
const e = h, c = F(null);
|
|
555
555
|
rt(async () => {
|
|
556
|
-
c.value = await
|
|
556
|
+
c.value = await It(e.menu, e.itemId), await Oe(), r.value = o.value[0].value;
|
|
557
557
|
});
|
|
558
|
-
const
|
|
558
|
+
const r = F(""), o = x(() => {
|
|
559
559
|
var f, s;
|
|
560
560
|
const a = {
|
|
561
561
|
label: "Master product",
|
|
@@ -567,23 +567,23 @@ const qt = { class: "inline-flex items-center" }, Wt = {
|
|
|
567
567
|
};
|
|
568
568
|
if (!c.value)
|
|
569
569
|
return [a];
|
|
570
|
-
const v =
|
|
570
|
+
const v = e.menu.modules.catalog.map((b) => {
|
|
571
571
|
var k;
|
|
572
|
-
const
|
|
572
|
+
const _ = (k = c.value) == null ? void 0 : k.catalogs[b._id];
|
|
573
573
|
return {
|
|
574
|
-
label:
|
|
575
|
-
value:
|
|
576
|
-
disabled: !
|
|
577
|
-
catalogId:
|
|
578
|
-
badge:
|
|
579
|
-
schedulerIds:
|
|
574
|
+
label: b.name,
|
|
575
|
+
value: b._id,
|
|
576
|
+
disabled: !_,
|
|
577
|
+
catalogId: b._id,
|
|
578
|
+
badge: _ ? ((_ == null ? void 0 : _.schedulers.length) || 0) + 1 : 0,
|
|
579
|
+
schedulerIds: _ == null ? void 0 : _.schedulers
|
|
580
580
|
};
|
|
581
581
|
});
|
|
582
582
|
return [a, ...v];
|
|
583
|
-
}), u =
|
|
584
|
-
return (a, v) => (m(), I(
|
|
585
|
-
modelValue:
|
|
586
|
-
"onUpdate:modelValue": v[0] || (v[0] = (f) =>
|
|
583
|
+
}), u = x(() => o.value.find((a) => a.value === r.value));
|
|
584
|
+
return (a, v) => (m(), I(dt, {
|
|
585
|
+
modelValue: r.value,
|
|
586
|
+
"onUpdate:modelValue": v[0] || (v[0] = (f) => r.value = f),
|
|
587
587
|
items: o.value,
|
|
588
588
|
title: "Catalog",
|
|
589
589
|
"title-badge": o.value.filter((f) => !f.disabled).length
|
|
@@ -591,7 +591,7 @@ const qt = { class: "inline-flex items-center" }, Wt = {
|
|
|
591
591
|
default: $(() => {
|
|
592
592
|
var f, s;
|
|
593
593
|
return [
|
|
594
|
-
d(
|
|
594
|
+
d(bl, {
|
|
595
595
|
menu: a.menu,
|
|
596
596
|
"item-id": a.itemId,
|
|
597
597
|
"catalog-id": ((f = u.value) == null ? void 0 : f.catalogId) || null,
|
|
@@ -602,39 +602,39 @@ const qt = { class: "inline-flex items-center" }, Wt = {
|
|
|
602
602
|
_: 1
|
|
603
603
|
}, 8, ["modelValue", "items", "title-badge"]));
|
|
604
604
|
}
|
|
605
|
-
}),
|
|
605
|
+
}), yl = { class: "flex items-center gap-8" }, hl = { class: "space-y-4" }, xl = { class: "fm-typo-en-title-md-600" }, Cl = { key: 0 }, wl = { class: "text-fm-color-typo-secondary" }, kl = {
|
|
606
606
|
key: 0,
|
|
607
607
|
class: "text-fm-color-typo-secondary"
|
|
608
|
-
},
|
|
608
|
+
}, Sl = { class: "flex items-center gap-4" }, Vl = /* @__PURE__ */ G({
|
|
609
609
|
__name: "ProductBaseInfo",
|
|
610
610
|
props: {
|
|
611
611
|
itemId: {},
|
|
612
612
|
menu: {}
|
|
613
613
|
},
|
|
614
|
-
setup(
|
|
615
|
-
const
|
|
614
|
+
setup(h) {
|
|
615
|
+
const e = h, c = x(() => e.menu.modules.item.find((o) => o._id === e.itemId)), r = x(() => {
|
|
616
616
|
var o;
|
|
617
617
|
return ce.Dinero.fromFdoDinero((o = c.value) == null ? void 0 : o.price).toFormat(!0);
|
|
618
618
|
});
|
|
619
619
|
return (o, u) => {
|
|
620
|
-
var a, v, f, s,
|
|
621
|
-
return m(), w("div",
|
|
622
|
-
d(
|
|
620
|
+
var a, v, f, s, b, _, k;
|
|
621
|
+
return m(), w("div", yl, [
|
|
622
|
+
d(Ne, {
|
|
623
623
|
alt: ((a = c.value) == null ? void 0 : a.name) ?? null,
|
|
624
624
|
size: 72,
|
|
625
625
|
src: (v = c.value) == null ? void 0 : v.thumbnail,
|
|
626
626
|
crossorigin: !1
|
|
627
627
|
}, null, 8, ["alt", "src"]),
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
(f = c.value) != null && f.code ? (m(), w("span",
|
|
631
|
-
|
|
628
|
+
g("div", hl, [
|
|
629
|
+
g("p", xl, [
|
|
630
|
+
(f = c.value) != null && f.code ? (m(), w("span", Cl, E((s = c.value) == null ? void 0 : s.code) + ", ", 1)) : M("", !0),
|
|
631
|
+
g("span", null, E((b = c.value) == null ? void 0 : b.name), 1)
|
|
632
632
|
]),
|
|
633
|
-
|
|
634
|
-
(
|
|
635
|
-
|
|
636
|
-
u[0] || (u[0] =
|
|
637
|
-
d(
|
|
633
|
+
g("p", wl, "Base price: " + E(r.value), 1),
|
|
634
|
+
(_ = c.value) != null && _.customAttributes ? (m(), w("div", kl, [
|
|
635
|
+
g("div", Sl, [
|
|
636
|
+
u[0] || (u[0] = g("span", null, "Tagging:", -1)),
|
|
637
|
+
d(ze, {
|
|
638
638
|
ellipsis: !1,
|
|
639
639
|
"custom-attributes": (k = c.value) == null ? void 0 : k.customAttributes
|
|
640
640
|
}, null, 8, ["custom-attributes"])
|
|
@@ -644,90 +644,90 @@ const qt = { class: "inline-flex items-center" }, Wt = {
|
|
|
644
644
|
]);
|
|
645
645
|
};
|
|
646
646
|
}
|
|
647
|
-
}),
|
|
647
|
+
}), Fl = { class: "space-y-16" }, Il = /* @__PURE__ */ G({
|
|
648
648
|
__name: "ProductViewer",
|
|
649
649
|
props: {
|
|
650
650
|
itemId: {},
|
|
651
651
|
menu: {}
|
|
652
652
|
},
|
|
653
|
-
setup(
|
|
654
|
-
const
|
|
653
|
+
setup(h) {
|
|
654
|
+
const e = F("product"), c = x(() => [
|
|
655
655
|
{
|
|
656
656
|
value: "product",
|
|
657
657
|
label: "Product",
|
|
658
|
-
component:
|
|
658
|
+
component: _l
|
|
659
659
|
},
|
|
660
660
|
{
|
|
661
661
|
value: "group",
|
|
662
662
|
label: "Group",
|
|
663
|
-
component:
|
|
663
|
+
component: fl
|
|
664
664
|
}
|
|
665
665
|
]);
|
|
666
|
-
return (
|
|
666
|
+
return (r, o) => {
|
|
667
667
|
var a;
|
|
668
668
|
const u = K("FmTabs");
|
|
669
|
-
return m(), w("div",
|
|
670
|
-
d(
|
|
671
|
-
"item-id":
|
|
672
|
-
menu:
|
|
669
|
+
return m(), w("div", Fl, [
|
|
670
|
+
d(Vl, {
|
|
671
|
+
"item-id": r.itemId,
|
|
672
|
+
menu: r.menu
|
|
673
673
|
}, null, 8, ["item-id", "menu"]),
|
|
674
|
-
|
|
674
|
+
g("div", null, [
|
|
675
675
|
d(u, {
|
|
676
|
-
modelValue:
|
|
677
|
-
"onUpdate:modelValue": o[0] || (o[0] = (v) =>
|
|
676
|
+
modelValue: e.value,
|
|
677
|
+
"onUpdate:modelValue": o[0] || (o[0] = (v) => e.value = v),
|
|
678
678
|
items: c.value
|
|
679
679
|
}, null, 8, ["modelValue", "items"])
|
|
680
680
|
]),
|
|
681
|
-
|
|
682
|
-
(m(), I(
|
|
683
|
-
"item-id":
|
|
684
|
-
menu:
|
|
681
|
+
g("div", null, [
|
|
682
|
+
(m(), I(st((a = c.value.find((v) => v.value === e.value)) == null ? void 0 : a.component), {
|
|
683
|
+
"item-id": r.itemId,
|
|
684
|
+
menu: r.menu
|
|
685
685
|
}, null, 8, ["item-id", "menu"]))
|
|
686
686
|
])
|
|
687
687
|
]);
|
|
688
688
|
};
|
|
689
689
|
}
|
|
690
|
-
}),
|
|
690
|
+
}), $l = { class: "space-y-24" }, Tl = { key: 0 }, Pl = /* @__PURE__ */ G({
|
|
691
691
|
__name: "ProductOverview",
|
|
692
692
|
props: {
|
|
693
693
|
itemId: {},
|
|
694
694
|
showSearch: { type: Boolean, default: !1 }
|
|
695
695
|
},
|
|
696
|
-
setup(
|
|
697
|
-
const
|
|
698
|
-
return
|
|
699
|
-
|
|
700
|
-
}), (o, u) => (m(), w("div",
|
|
701
|
-
o.showSearch ? (m(), w("div",
|
|
696
|
+
setup(h) {
|
|
697
|
+
const e = h, c = Ie(), r = F(null);
|
|
698
|
+
return ut(() => {
|
|
699
|
+
r.value = e.itemId;
|
|
700
|
+
}), (o, u) => (m(), w("div", $l, [
|
|
701
|
+
o.showSearch ? (m(), w("div", Tl, [
|
|
702
702
|
d(rl, {
|
|
703
|
-
modelValue:
|
|
704
|
-
"onUpdate:modelValue": u[0] || (u[0] = (a) =>
|
|
703
|
+
modelValue: r.value,
|
|
704
|
+
"onUpdate:modelValue": u[0] || (u[0] = (a) => r.value = a),
|
|
705
705
|
class: "w-1/2",
|
|
706
706
|
label: "Search and compare prices",
|
|
707
707
|
"helper-text": "Quickly find products and view their prices across different catalogs and schedules.",
|
|
708
|
-
menu:
|
|
708
|
+
menu: n(c).state.menu
|
|
709
709
|
}, null, 8, ["modelValue", "menu"])
|
|
710
710
|
])) : M("", !0),
|
|
711
|
-
|
|
712
|
-
|
|
711
|
+
g("div", null, [
|
|
712
|
+
r.value ? (m(), I(Il, {
|
|
713
713
|
key: 0,
|
|
714
|
-
"item-id":
|
|
715
|
-
menu:
|
|
714
|
+
"item-id": r.value,
|
|
715
|
+
menu: n(c).state.menu
|
|
716
716
|
}, null, 8, ["item-id", "menu"])) : M("", !0)
|
|
717
717
|
])
|
|
718
718
|
]));
|
|
719
719
|
}
|
|
720
|
-
}),
|
|
720
|
+
}), Al = /* @__PURE__ */ G({
|
|
721
721
|
__name: "OverviewSheet",
|
|
722
|
-
setup(
|
|
723
|
-
const
|
|
724
|
-
function
|
|
725
|
-
c.value = !c.value, o && (
|
|
722
|
+
setup(h) {
|
|
723
|
+
const e = F(null), c = F(!1);
|
|
724
|
+
function r(o) {
|
|
725
|
+
c.value = !c.value, o && (e.value = o);
|
|
726
726
|
}
|
|
727
727
|
return (o, u) => {
|
|
728
728
|
const a = K("FmSideSheet");
|
|
729
729
|
return m(), w(de, null, [
|
|
730
|
-
ye(o.$slots, "default", { trigger:
|
|
730
|
+
ye(o.$slots, "default", { trigger: r }),
|
|
731
731
|
d(a, {
|
|
732
732
|
id: "product-overview",
|
|
733
733
|
modelValue: c.value,
|
|
@@ -736,13 +736,13 @@ const qt = { class: "inline-flex items-center" }, Wt = {
|
|
|
736
736
|
"dismiss-away": ""
|
|
737
737
|
}, {
|
|
738
738
|
"side-sheet-header": $(() => u[1] || (u[1] = [
|
|
739
|
-
|
|
739
|
+
g("p", { class: "fm-typo-en-title-md-600" }, "Product Overview", -1)
|
|
740
740
|
])),
|
|
741
741
|
default: $(() => [
|
|
742
|
-
|
|
743
|
-
c.value &&
|
|
742
|
+
g("div", null, [
|
|
743
|
+
c.value && e.value ? (m(), I(Pl, {
|
|
744
744
|
key: 0,
|
|
745
|
-
"item-id":
|
|
745
|
+
"item-id": e.value
|
|
746
746
|
}, null, 8, ["item-id"])) : M("", !0)
|
|
747
747
|
])
|
|
748
748
|
]),
|
|
@@ -752,88 +752,92 @@ const qt = { class: "inline-flex items-center" }, Wt = {
|
|
|
752
752
|
};
|
|
753
753
|
}
|
|
754
754
|
});
|
|
755
|
-
var
|
|
756
|
-
const
|
|
755
|
+
var Rl = Bt();
|
|
756
|
+
const tt = /* @__PURE__ */ G({
|
|
757
757
|
__name: "ImportButton",
|
|
758
|
-
setup(
|
|
759
|
-
const
|
|
758
|
+
setup(h) {
|
|
759
|
+
const e = F(!1);
|
|
760
760
|
function c() {
|
|
761
|
-
|
|
761
|
+
e.value = !e.value;
|
|
762
762
|
}
|
|
763
|
-
const
|
|
764
|
-
return
|
|
765
|
-
const o =
|
|
763
|
+
const r = De();
|
|
764
|
+
return ut(() => {
|
|
765
|
+
const o = r.currentCountry.value;
|
|
766
766
|
if (o)
|
|
767
767
|
try {
|
|
768
|
-
|
|
768
|
+
Rl.setCountryConfig(o);
|
|
769
769
|
} catch (u) {
|
|
770
770
|
console.log("Unable to set country config", u);
|
|
771
771
|
}
|
|
772
772
|
}), (o, u) => (m(), w(de, null, [
|
|
773
|
-
d(
|
|
774
|
-
modelValue:
|
|
775
|
-
"onUpdate:modelValue": u[0] || (u[0] = (a) =>
|
|
773
|
+
d(jt, {
|
|
774
|
+
modelValue: e.value,
|
|
775
|
+
"onUpdate:modelValue": u[0] || (u[0] = (a) => e.value = a)
|
|
776
776
|
}, null, 8, ["modelValue"]),
|
|
777
777
|
ye(o.$slots, "default", { trigger: c })
|
|
778
778
|
], 64));
|
|
779
779
|
}
|
|
780
|
-
})
|
|
780
|
+
});
|
|
781
|
+
function Me(h) {
|
|
782
|
+
return (h == null ? void 0 : h.find((e) => !e.combinationKey)) ?? (h == null ? void 0 : h[0]);
|
|
783
|
+
}
|
|
784
|
+
const lt = (h) => d("div", {
|
|
781
785
|
class: "flex flex-1 justify-end"
|
|
782
|
-
}, [d("span", null, [
|
|
786
|
+
}, [d("span", null, [h, nt(" ")])]), Ml = {
|
|
783
787
|
class: "flex justify-between items-center space-x-8"
|
|
784
|
-
},
|
|
788
|
+
}, Ol = {
|
|
785
789
|
class: "flex space-x-8 items-center"
|
|
786
790
|
}, Ul = {
|
|
787
791
|
class: "w-[320px]"
|
|
788
|
-
}, Ol = {
|
|
789
|
-
key: 0
|
|
790
792
|
}, zl = {
|
|
793
|
+
key: 0
|
|
794
|
+
}, Nl = {
|
|
791
795
|
key: 1,
|
|
792
796
|
class: /* @__PURE__ */ me(["flex-1 flex flex-col", "divide-y divide-fm-color-neutral-gray-100", "overflow-hidden"])
|
|
793
|
-
},
|
|
797
|
+
}, Dl = {
|
|
794
798
|
key: 0,
|
|
795
799
|
class: "flex items-center p-4"
|
|
796
|
-
}, Dl = {
|
|
797
|
-
class: /* @__PURE__ */ me(["mr-8", "fm-typo-en-body-md-400"])
|
|
798
800
|
}, Kl = {
|
|
801
|
+
class: /* @__PURE__ */ me(["mr-8", "fm-typo-en-body-md-400"])
|
|
802
|
+
}, Bl = {
|
|
799
803
|
key: 1,
|
|
800
804
|
class: "px-16 py-4 space-x-8 flex justify-end"
|
|
801
|
-
}, Bl = {
|
|
802
|
-
key: 2
|
|
803
805
|
}, jl = {
|
|
804
|
-
|
|
806
|
+
key: 2
|
|
805
807
|
}, El = {
|
|
808
|
+
class: "flex space-x-8"
|
|
809
|
+
}, Gl = {
|
|
806
810
|
key: 1,
|
|
807
811
|
class: "pt-8 flex flex-col flex-1 overflow-hidden"
|
|
808
|
-
}, Gl = {
|
|
809
|
-
class: "space-y-8 pb-8"
|
|
810
812
|
}, Ll = {
|
|
811
|
-
class: "
|
|
813
|
+
class: "space-y-8 pb-8"
|
|
812
814
|
}, ql = {
|
|
813
|
-
class: "
|
|
815
|
+
class: "w-full px-8"
|
|
814
816
|
}, Wl = {
|
|
817
|
+
class: "flex space-x-8 px-8"
|
|
818
|
+
}, Hl = {
|
|
815
819
|
key: 0,
|
|
816
820
|
class: "px-8"
|
|
817
|
-
},
|
|
821
|
+
}, Ql = {
|
|
818
822
|
key: 0,
|
|
819
823
|
class: /* @__PURE__ */ me(["flex flex-col flex-1", "overflow-scroll", "divide-y divide-fm-color-neutral-gray-100", "pb-64"])
|
|
820
|
-
},
|
|
824
|
+
}, Yl = ["onClick"], Zl = {
|
|
821
825
|
class: "min-w-0 flex flex-1 items-center justify-start space-x-16"
|
|
822
|
-
}, Zl = {
|
|
823
|
-
class: "flex-1 min-w-0"
|
|
824
826
|
}, Jl = {
|
|
825
|
-
class: "flex
|
|
827
|
+
class: "flex-1 min-w-0"
|
|
826
828
|
}, Xl = {
|
|
827
|
-
class: "flex-
|
|
829
|
+
class: "flex justify-between items-center gap-8 pb-4"
|
|
828
830
|
}, ea = {
|
|
829
|
-
class: "fm-typo-en-body-
|
|
831
|
+
class: "flex-1 min-w-0 fm-typo-en-body-lg-600 line-clamp-2"
|
|
830
832
|
}, ta = {
|
|
831
833
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
832
834
|
}, la = {
|
|
833
835
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
834
836
|
}, aa = {
|
|
835
|
-
|
|
837
|
+
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
836
838
|
}, oa = {
|
|
839
|
+
key: 1
|
|
840
|
+
}, na = {
|
|
837
841
|
class: "flex space-x-8"
|
|
838
842
|
}, ra = /* @__PURE__ */ G({
|
|
839
843
|
__name: "ProductTable",
|
|
@@ -845,71 +849,71 @@ const et = /* @__PURE__ */ G({
|
|
|
845
849
|
}
|
|
846
850
|
},
|
|
847
851
|
emits: ["update:model-value", "reset:model-value", "update:editing", "update:search-key"],
|
|
848
|
-
setup(
|
|
849
|
-
expose:
|
|
852
|
+
setup(h, {
|
|
853
|
+
expose: e,
|
|
850
854
|
emit: c
|
|
851
855
|
}) {
|
|
852
|
-
const
|
|
856
|
+
const r = h, {
|
|
853
857
|
t: o
|
|
854
|
-
} = $e(), u =
|
|
858
|
+
} = $e(), u = De(), a = Ie(), v = Ot(), f = it(), s = u.currentCountry, b = x(() => s.value ? ce.Country.getCountry(s.value) : null), _ = x(() => a.rules.item), {
|
|
855
859
|
selectedCategories: k
|
|
856
|
-
} = Ve(), N =
|
|
857
|
-
const
|
|
858
|
-
return be.uniqBy(
|
|
860
|
+
} = Ve(), N = x(() => {
|
|
861
|
+
const l = be.flatten(k.value.map((t) => t.items));
|
|
862
|
+
return be.uniqBy(l, (t) => t._id);
|
|
859
863
|
}), Y = c, S = F(!1);
|
|
860
|
-
ie(() => S.value, (
|
|
861
|
-
Y("update:editing",
|
|
864
|
+
ie(() => S.value, (l) => {
|
|
865
|
+
Y("update:editing", l);
|
|
862
866
|
});
|
|
863
|
-
const ae = (
|
|
864
|
-
|
|
867
|
+
const ae = (l) => {
|
|
868
|
+
Et.isBoolean(l) ? S.value = l : S.value = !S.value;
|
|
865
869
|
}, Z = F(!1), oe = F(null);
|
|
866
870
|
async function q() {
|
|
867
|
-
Z.value = !Z.value, Z.value && (await
|
|
871
|
+
Z.value = !Z.value, Z.value && (await Oe(), oe.value && oe.value.toggleProperty(!0));
|
|
868
872
|
}
|
|
869
|
-
|
|
873
|
+
e({
|
|
870
874
|
toggleAttributeFilter: q
|
|
871
875
|
});
|
|
872
876
|
const {
|
|
873
877
|
attributes: B,
|
|
874
878
|
filterRule: D,
|
|
875
879
|
mongoQuery: H
|
|
876
|
-
} =
|
|
880
|
+
} = kt({
|
|
877
881
|
valueSource: N,
|
|
878
882
|
entity: "item"
|
|
879
|
-
}), J = F(""),
|
|
880
|
-
const
|
|
881
|
-
var
|
|
882
|
-
return !
|
|
883
|
-
},
|
|
884
|
-
return N.value.filter((i) =>
|
|
883
|
+
}), J = F(""), ne = Nt(J, 300), Q = x(() => {
|
|
884
|
+
const l = (i) => {
|
|
885
|
+
var C;
|
|
886
|
+
return !ne.value || !ne.value.trim() ? !0 : [i.code, i.name, je(i), ...Re(re.value, i), A(i.subCategories), (C = we()[i.orderFrom]) == null ? void 0 : C.label, Object.values(i.customAttributes ?? {}).join(" ")].join(" ").toLowerCase().includes(ne.value.toLowerCase());
|
|
887
|
+
}, t = (i) => H.value ? Mt(i.customAttributes, H.value) : !0;
|
|
888
|
+
return N.value.filter((i) => l(i) && t(i));
|
|
885
889
|
}), {
|
|
886
|
-
categories:
|
|
887
|
-
} = Ve(), P =
|
|
888
|
-
label:
|
|
889
|
-
value:
|
|
890
|
-
}))), T =
|
|
891
|
-
label:
|
|
892
|
-
value:
|
|
893
|
-
}))),
|
|
894
|
-
function A(
|
|
895
|
-
return (
|
|
890
|
+
categories: re
|
|
891
|
+
} = Ve(), P = x(() => a.categories.map((l) => ({
|
|
892
|
+
label: l.name,
|
|
893
|
+
value: l._id || null
|
|
894
|
+
}))), T = x(() => a.subcategories.map((l) => ({
|
|
895
|
+
label: l.name,
|
|
896
|
+
value: l._id
|
|
897
|
+
}))), U = x(() => a.subcategories.reduce((l, t) => (l[t._id] = t.name, l), {}));
|
|
898
|
+
function A(l) {
|
|
899
|
+
return (l == null ? void 0 : l.map((t) => U.value[t]).filter(Boolean).join("/")) || "--";
|
|
896
900
|
}
|
|
897
|
-
const te = (
|
|
898
|
-
let p = be.clone(
|
|
899
|
-
const
|
|
900
|
-
|
|
901
|
-
...
|
|
902
|
-
...
|
|
903
|
-
} : p[
|
|
904
|
-
...
|
|
905
|
-
[
|
|
901
|
+
const te = (l, t, i) => {
|
|
902
|
+
let p = be.clone(r.modelValue);
|
|
903
|
+
const C = p[l];
|
|
904
|
+
C && (typeof t == "object" && t !== null ? p[l] = {
|
|
905
|
+
...C,
|
|
906
|
+
...t
|
|
907
|
+
} : p[l] = {
|
|
908
|
+
...C,
|
|
909
|
+
[t]: i
|
|
906
910
|
}, Y("update:model-value", p));
|
|
907
|
-
}, j =
|
|
908
|
-
field:
|
|
909
|
-
}), se = (
|
|
910
|
-
const
|
|
911
|
-
return
|
|
912
|
-
}), ge =
|
|
911
|
+
}, j = Tt(() => r.originalValue, () => r.modelValue), z = be.debounce(te, 300), R = (l) => (t) => !!t || o("menu.product.table.validation.name_required", {
|
|
912
|
+
field: l
|
|
913
|
+
}), se = (l) => l >= 0 || o("menu.product.table.validation.price_min"), L = [R("Name")], pe = () => [(l) => se(typeof l == "number" ? l : Number(l) ?? 0)], he = we(), xe = x(() => {
|
|
914
|
+
const l = a.isV4;
|
|
915
|
+
return Ct.setCoreStore(u).taxSetting(l);
|
|
916
|
+
}), ge = x(() => [{
|
|
913
917
|
accessorKey: "thumbnail",
|
|
914
918
|
header: "",
|
|
915
919
|
size: 110,
|
|
@@ -917,11 +921,11 @@ const et = /* @__PURE__ */ G({
|
|
|
917
921
|
cellClass: "px-0",
|
|
918
922
|
headerContentClass: "px-0"
|
|
919
923
|
},
|
|
920
|
-
cell: (
|
|
921
|
-
var
|
|
922
|
-
return
|
|
923
|
-
src:
|
|
924
|
-
alt: (i = (
|
|
924
|
+
cell: (l) => {
|
|
925
|
+
var t, i;
|
|
926
|
+
return O(Ne, {
|
|
927
|
+
src: l.getValue(),
|
|
928
|
+
alt: (i = (t = l == null ? void 0 : l.row) == null ? void 0 : t.original) == null ? void 0 : i.name,
|
|
925
929
|
className: "my-8 mx-12",
|
|
926
930
|
size: 72,
|
|
927
931
|
crossorigin: !1
|
|
@@ -933,18 +937,18 @@ const et = /* @__PURE__ */ G({
|
|
|
933
937
|
header: () => o("menu.product.table.columns.code"),
|
|
934
938
|
enableSorting: !1,
|
|
935
939
|
size: 100,
|
|
936
|
-
cell: (
|
|
937
|
-
const
|
|
940
|
+
cell: (l) => {
|
|
941
|
+
const t = l.row.original, i = l.getValue() || "--";
|
|
938
942
|
if (!S.value) return d("span", {
|
|
939
943
|
class: "break-all"
|
|
940
944
|
}, [i]);
|
|
941
|
-
const p = Pe(
|
|
942
|
-
return
|
|
943
|
-
disabled: !
|
|
944
|
-
modelValue: j(
|
|
945
|
-
placeholder:
|
|
946
|
-
"onUpdate:modelValue": (
|
|
947
|
-
z(
|
|
945
|
+
const p = Pe(t._id);
|
|
946
|
+
return O(ee.FmTextField, {
|
|
947
|
+
disabled: !_.value.code,
|
|
948
|
+
modelValue: j(t._id, "code") ?? (p == null ? void 0 : p.code),
|
|
949
|
+
placeholder: r.modelValue[t._id].fallbackCode,
|
|
950
|
+
"onUpdate:modelValue": (C) => {
|
|
951
|
+
z(t._id, "code", C);
|
|
948
952
|
}
|
|
949
953
|
});
|
|
950
954
|
}
|
|
@@ -953,36 +957,36 @@ const et = /* @__PURE__ */ G({
|
|
|
953
957
|
header: () => o("menu.product.table.columns.name"),
|
|
954
958
|
enableSorting: !1,
|
|
955
959
|
size: 250,
|
|
956
|
-
cell: (
|
|
957
|
-
const
|
|
958
|
-
return S.value ?
|
|
960
|
+
cell: (l) => {
|
|
961
|
+
const t = l.row.original, i = l.getValue();
|
|
962
|
+
return S.value ? O("div", {
|
|
959
963
|
class: "flex items-center gap-8"
|
|
960
|
-
}, [
|
|
961
|
-
disabled: !
|
|
962
|
-
modelValue: j(
|
|
964
|
+
}, [O(ee.FmTextField, {
|
|
965
|
+
disabled: !_.value.name,
|
|
966
|
+
modelValue: j(t._id, "name") ?? t.name,
|
|
963
967
|
"onUpdate:modelValue": (p) => {
|
|
964
|
-
z(
|
|
968
|
+
z(t._id, "name", p);
|
|
965
969
|
},
|
|
966
970
|
rules: L,
|
|
967
|
-
placeholder:
|
|
968
|
-
}),
|
|
969
|
-
nameLocale:
|
|
971
|
+
placeholder: t.fallbackName
|
|
972
|
+
}), t.name_locale ? O(Je, {
|
|
973
|
+
nameLocale: t.name_locale ?? {},
|
|
970
974
|
showNumber: 1
|
|
971
|
-
}) : null]) :
|
|
975
|
+
}) : null]) : O("div", {
|
|
972
976
|
class: "flex items-center gap-8"
|
|
973
|
-
}, [
|
|
977
|
+
}, [O("span", {
|
|
974
978
|
class: "text-wrap"
|
|
975
|
-
}, i),
|
|
976
|
-
nameLocale:
|
|
979
|
+
}, i), t.name_locale ? O(Je, {
|
|
980
|
+
nameLocale: t.name_locale ?? {},
|
|
977
981
|
showNumber: 1
|
|
978
982
|
}) : null]);
|
|
979
983
|
}
|
|
980
984
|
}, {
|
|
981
985
|
accessorKey: "price",
|
|
982
986
|
header: () => {
|
|
983
|
-
var
|
|
984
|
-
return
|
|
985
|
-
currency: (
|
|
987
|
+
var l;
|
|
988
|
+
return lt(o("menu.product.table.columns.price", {
|
|
989
|
+
currency: (l = b.value) == null ? void 0 : l.currency.symbol
|
|
986
990
|
}));
|
|
987
991
|
},
|
|
988
992
|
enableSorting: !1,
|
|
@@ -990,17 +994,17 @@ const et = /* @__PURE__ */ G({
|
|
|
990
994
|
meta: {
|
|
991
995
|
textAlign: "right"
|
|
992
996
|
},
|
|
993
|
-
cell: (
|
|
994
|
-
var
|
|
995
|
-
const
|
|
996
|
-
if (!S.value) return ce.Dinero.fromFdoDinero(
|
|
997
|
-
const i =
|
|
998
|
-
return
|
|
997
|
+
cell: (l) => {
|
|
998
|
+
var C;
|
|
999
|
+
const t = l.getValue();
|
|
1000
|
+
if (!S.value) return ce.Dinero.fromFdoDinero(t).toFormat();
|
|
1001
|
+
const i = r.modelValue[l.row.original._id], p = i.fallbackPrice;
|
|
1002
|
+
return O(Kt, {
|
|
999
1003
|
min: 0,
|
|
1000
1004
|
disabled: !i.editPrice,
|
|
1001
1005
|
// @ts-ignore
|
|
1002
|
-
placeholder: p ?
|
|
1003
|
-
modelValue: j(i._id, "price") ?? ((
|
|
1006
|
+
placeholder: p ? Gt(p, !1) : void 0,
|
|
1007
|
+
modelValue: j(i._id, "price") ?? ((C = Pe(i._id)) == null ? void 0 : C.price),
|
|
1004
1008
|
// @ts-ignore
|
|
1005
1009
|
"onUpdate:modelValue": (V) => {
|
|
1006
1010
|
te(i._id, "price", V);
|
|
@@ -1010,21 +1014,21 @@ const et = /* @__PURE__ */ G({
|
|
|
1010
1014
|
}
|
|
1011
1015
|
}, {
|
|
1012
1016
|
accessorKey: "taxes",
|
|
1013
|
-
header: () =>
|
|
1017
|
+
header: () => lt(xe.value.systemCode),
|
|
1014
1018
|
size: S.value ? 120 : 80,
|
|
1015
1019
|
enableSorting: !1,
|
|
1016
1020
|
meta: {
|
|
1017
1021
|
textAlign: "right"
|
|
1018
1022
|
},
|
|
1019
|
-
cell: (
|
|
1020
|
-
const
|
|
1023
|
+
cell: (l) => {
|
|
1024
|
+
const t = l.getValue(), i = l.row.original, p = a.taxSetting.countryTaxOptions, C = a.getSelectedTax(t, i.fallbackTaxes, a.taxSetting.countryTaxOptions), V = p.find((le) => le.value === C);
|
|
1021
1025
|
if (!S.value)
|
|
1022
|
-
return `${V != null && V.meta.rate ?
|
|
1023
|
-
const
|
|
1024
|
-
return
|
|
1025
|
-
disabled: !
|
|
1026
|
+
return `${V != null && V.meta.rate ? wt(V.meta.rate) : 0}%`;
|
|
1027
|
+
const y = a.getSelectedTax(j(i._id, "taxes") ?? t, i.fallbackTaxes, a.taxSetting.countryTaxOptions);
|
|
1028
|
+
return O(ee.FmSelect, {
|
|
1029
|
+
disabled: !_.value.tax,
|
|
1026
1030
|
items: a.taxSetting.countryTaxOptions,
|
|
1027
|
-
modelValue:
|
|
1031
|
+
modelValue: y,
|
|
1028
1032
|
"onUpdate:modelValue": async (le) => {
|
|
1029
1033
|
const Ae = a.decodeTax(le);
|
|
1030
1034
|
z(i._id, "taxes", [Ae]);
|
|
@@ -1036,27 +1040,27 @@ const et = /* @__PURE__ */ G({
|
|
|
1036
1040
|
header: () => o("menu.product.table.columns.category"),
|
|
1037
1041
|
enableSorting: !1,
|
|
1038
1042
|
size: 140,
|
|
1039
|
-
cell: (
|
|
1040
|
-
const
|
|
1043
|
+
cell: (l) => {
|
|
1044
|
+
const t = l.row.original;
|
|
1041
1045
|
if (!S.value)
|
|
1042
|
-
return
|
|
1043
|
-
categories: Re(
|
|
1046
|
+
return O(et, {
|
|
1047
|
+
categories: Re(re.value, t)
|
|
1044
1048
|
});
|
|
1045
|
-
const i =
|
|
1046
|
-
return
|
|
1049
|
+
const i = Pt(r.originalValue, r.modelValue, t._id) ?? Ut(t), p = (i == null ? void 0 : i.map((V) => V._id)) ?? [], C = i == null ? void 0 : i.reduce((V, y) => (V[y._id] = y, V), {});
|
|
1050
|
+
return O(At, {
|
|
1047
1051
|
shouldShowChips: !1,
|
|
1048
1052
|
shouldShowSelectedItemsWithinPlaceholder: !0,
|
|
1049
1053
|
modelValue: p.length > 0 ? p : [null],
|
|
1050
1054
|
items: P.value,
|
|
1051
1055
|
disabled: !!(a.state.currentCatalogId || a.state.currentSchedulerId),
|
|
1052
1056
|
"onUpdate:modelValue": async (V) => {
|
|
1053
|
-
const [
|
|
1054
|
-
z(
|
|
1055
|
-
category:
|
|
1056
|
-
additionalCategories: le.map((
|
|
1057
|
-
const
|
|
1058
|
-
return
|
|
1059
|
-
_id:
|
|
1057
|
+
const [y, ...le] = V, Ae = y === "" || y === null;
|
|
1058
|
+
z(t._id, {
|
|
1059
|
+
category: y,
|
|
1060
|
+
additionalCategories: le.map((Ge) => {
|
|
1061
|
+
const Le = C == null ? void 0 : C[Ge];
|
|
1062
|
+
return Le || {
|
|
1063
|
+
_id: Ge,
|
|
1060
1064
|
position: null
|
|
1061
1065
|
};
|
|
1062
1066
|
}),
|
|
@@ -1072,22 +1076,22 @@ const et = /* @__PURE__ */ G({
|
|
|
1072
1076
|
header: () => o("menu.product.table.columns.subcategory"),
|
|
1073
1077
|
enableSorting: !1,
|
|
1074
1078
|
size: 180,
|
|
1075
|
-
cell: (
|
|
1076
|
-
const
|
|
1077
|
-
return S.value ?
|
|
1079
|
+
cell: (l) => {
|
|
1080
|
+
const t = l.row.original;
|
|
1081
|
+
return S.value ? O(Rt, {
|
|
1078
1082
|
// Keep virtual table row height stable while editing.
|
|
1079
1083
|
shouldShowChips: !1,
|
|
1080
|
-
modelValue: j(
|
|
1084
|
+
modelValue: j(t._id, "subCategories") ?? t.subCategories ?? [],
|
|
1081
1085
|
items: T.value,
|
|
1082
1086
|
placeholder: o("menu.product.form.detail.path.placeholder"),
|
|
1083
1087
|
disabled: !!(a.state.currentCatalogId || a.state.currentSchedulerId),
|
|
1084
1088
|
isLocalOnly: !1,
|
|
1085
1089
|
"onUpdate:modelValue": async (i) => {
|
|
1086
|
-
z(
|
|
1090
|
+
z(t._id, "subCategories", i);
|
|
1087
1091
|
}
|
|
1088
|
-
}) :
|
|
1092
|
+
}) : O("span", {
|
|
1089
1093
|
class: "break-all"
|
|
1090
|
-
}, A(
|
|
1094
|
+
}, A(t.subCategories));
|
|
1091
1095
|
}
|
|
1092
1096
|
}] : [], {
|
|
1093
1097
|
id: "tagging",
|
|
@@ -1095,32 +1099,32 @@ const et = /* @__PURE__ */ G({
|
|
|
1095
1099
|
header: () => o("menu.product.table.columns.tagging"),
|
|
1096
1100
|
enableSorting: !1,
|
|
1097
1101
|
size: 140,
|
|
1098
|
-
cell: (
|
|
1099
|
-
const
|
|
1100
|
-
return
|
|
1101
|
-
customAttributes:
|
|
1102
|
+
cell: (l) => {
|
|
1103
|
+
const t = l.row.original;
|
|
1104
|
+
return O(ze, {
|
|
1105
|
+
customAttributes: t.customAttributes
|
|
1102
1106
|
});
|
|
1103
1107
|
}
|
|
1104
1108
|
}, {
|
|
1105
1109
|
accessorKey: "orderFrom",
|
|
1106
1110
|
header: () => o("menu.product.table.columns.order_from"),
|
|
1107
1111
|
enableSorting: !0,
|
|
1108
|
-
sortingFn: (
|
|
1109
|
-
const [i, p] = [
|
|
1112
|
+
sortingFn: (l, t) => {
|
|
1113
|
+
const [i, p] = [l, t].map((C) => he[C.original.orderFrom].sortingIndex);
|
|
1110
1114
|
return i - p;
|
|
1111
1115
|
},
|
|
1112
1116
|
size: 140,
|
|
1113
|
-
cell: (
|
|
1114
|
-
const
|
|
1115
|
-
return S.value ?
|
|
1116
|
-
disabled: !
|
|
1117
|
+
cell: (l) => {
|
|
1118
|
+
const t = l.getValue(), i = l.row.original;
|
|
1119
|
+
return S.value ? O(ee.FmSelect, {
|
|
1120
|
+
disabled: !_.value.orderFrom,
|
|
1117
1121
|
items: Object.values(we()),
|
|
1118
|
-
modelValue: j(i._id, "orderFrom") ??
|
|
1122
|
+
modelValue: j(i._id, "orderFrom") ?? t,
|
|
1119
1123
|
"onUpdate:modelValue": async (p) => {
|
|
1120
1124
|
te(i._id, "orderFrom", p);
|
|
1121
1125
|
}
|
|
1122
|
-
}) :
|
|
1123
|
-
orderFrom:
|
|
1126
|
+
}) : O(Fe, {
|
|
1127
|
+
orderFrom: t
|
|
1124
1128
|
});
|
|
1125
1129
|
}
|
|
1126
1130
|
}, {
|
|
@@ -1131,9 +1135,9 @@ const et = /* @__PURE__ */ G({
|
|
|
1131
1135
|
headerClass: "py-4",
|
|
1132
1136
|
textAlign: "right"
|
|
1133
1137
|
},
|
|
1134
|
-
header: () =>
|
|
1138
|
+
header: () => O("div", {
|
|
1135
1139
|
class: "w-full px-4 flex justify-end"
|
|
1136
|
-
}, [
|
|
1140
|
+
}, [Lt(O(ee.FmButton, {
|
|
1137
1141
|
variant: X.Tertiary,
|
|
1138
1142
|
textColor: W.NeutralGray400,
|
|
1139
1143
|
prependIcon: "edit",
|
|
@@ -1141,11 +1145,11 @@ const et = /* @__PURE__ */ G({
|
|
|
1141
1145
|
onClick: ae,
|
|
1142
1146
|
type: "button"
|
|
1143
1147
|
}), "Bulk edit")]),
|
|
1144
|
-
cell: (
|
|
1145
|
-
const
|
|
1148
|
+
cell: (l) => {
|
|
1149
|
+
const t = l.row.original;
|
|
1146
1150
|
return d("div", {
|
|
1147
1151
|
class: "px-4 flex justify-end"
|
|
1148
|
-
}, [d(
|
|
1152
|
+
}, [d(Al, null, {
|
|
1149
1153
|
default: ({
|
|
1150
1154
|
trigger: i
|
|
1151
1155
|
}) => d(ee.FmButton, {
|
|
@@ -1153,7 +1157,7 @@ const et = /* @__PURE__ */ G({
|
|
|
1153
1157
|
variant: "tertiary",
|
|
1154
1158
|
textColor: W.NeutralGray400,
|
|
1155
1159
|
onClick: fe(() => {
|
|
1156
|
-
i(
|
|
1160
|
+
i(t._id);
|
|
1157
1161
|
}, ["stop", "prevent"])
|
|
1158
1162
|
}, null)
|
|
1159
1163
|
}), d(ee.FmButton, {
|
|
@@ -1162,9 +1166,9 @@ const et = /* @__PURE__ */ G({
|
|
|
1162
1166
|
textColor: W.NeutralGray400,
|
|
1163
1167
|
onClick: fe(async () => {
|
|
1164
1168
|
await f.deleteItem([{
|
|
1165
|
-
_id:
|
|
1166
|
-
name:
|
|
1167
|
-
thumbnail:
|
|
1169
|
+
_id: t._id,
|
|
1170
|
+
name: t.name,
|
|
1171
|
+
thumbnail: t.thumbnail
|
|
1168
1172
|
}]);
|
|
1169
1173
|
}, ["stop", "prevent"])
|
|
1170
1174
|
}, null)]);
|
|
@@ -1172,25 +1176,25 @@ const et = /* @__PURE__ */ G({
|
|
|
1172
1176
|
}]);
|
|
1173
1177
|
a.taxSetting.systemCode || ge.value.splice(4, 1);
|
|
1174
1178
|
const ve = F({}), ue = F([]);
|
|
1175
|
-
ie([() => ve.value, () => Q.value], (
|
|
1176
|
-
let
|
|
1177
|
-
Object.keys(
|
|
1178
|
-
const p =
|
|
1179
|
-
|
|
1180
|
-
}), ue.value =
|
|
1179
|
+
ie([() => ve.value, () => Q.value], (l) => {
|
|
1180
|
+
let t = [];
|
|
1181
|
+
Object.keys(l[0]).forEach((i) => {
|
|
1182
|
+
const p = l[0][i], C = Q.value[parseInt(i)];
|
|
1183
|
+
C && (p ? t.push(C) : ue.value = t.filter((V) => V !== C));
|
|
1184
|
+
}), ue.value = t;
|
|
1181
1185
|
}), ie(() => N.value, () => {
|
|
1182
1186
|
ve.value = {}, ue.value = [];
|
|
1183
1187
|
}), ie(() => S.value, () => {
|
|
1184
1188
|
ve.value = {}, ue.value = [];
|
|
1185
1189
|
});
|
|
1186
|
-
const
|
|
1190
|
+
const mt = () => {
|
|
1187
1191
|
ve.value = {};
|
|
1188
1192
|
};
|
|
1189
|
-
async function
|
|
1190
|
-
await
|
|
1191
|
-
const
|
|
1192
|
-
const
|
|
1193
|
-
return
|
|
1193
|
+
async function Be() {
|
|
1194
|
+
await Oe();
|
|
1195
|
+
const l = () => !!a.currentCatalog || !!a.state.currentSchedulerId, t = (p) => p === "" || p === null ? l() ? "" : null : p, i = Object.values(r.modelValue).filter((p) => {
|
|
1196
|
+
const C = Object.values(r.originalValue).find((V) => V._id === p._id);
|
|
1197
|
+
return Ye(C, p);
|
|
1194
1198
|
}).map((p) => ({
|
|
1195
1199
|
_id: p._id,
|
|
1196
1200
|
name: p.name,
|
|
@@ -1198,22 +1202,22 @@ const et = /* @__PURE__ */ G({
|
|
|
1198
1202
|
price: p.price,
|
|
1199
1203
|
orderFrom: p.orderFrom ?? null,
|
|
1200
1204
|
taxes: p.taxes,
|
|
1201
|
-
category:
|
|
1205
|
+
category: t(p.category || null),
|
|
1202
1206
|
additionalCategories: p.additionalCategories,
|
|
1203
1207
|
subCategories: p.subCategories
|
|
1204
1208
|
}));
|
|
1205
1209
|
await f.updateMany(i), ae(!1);
|
|
1206
1210
|
}
|
|
1207
|
-
const
|
|
1208
|
-
await f.deleteItem(ue.value.map((
|
|
1209
|
-
_id:
|
|
1210
|
-
name:
|
|
1211
|
-
thumbnail:
|
|
1211
|
+
const pt = async () => {
|
|
1212
|
+
await f.deleteItem(ue.value.map((l) => ({
|
|
1213
|
+
_id: l._id,
|
|
1214
|
+
name: l.name,
|
|
1215
|
+
thumbnail: l.thumbnail
|
|
1212
1216
|
})));
|
|
1213
1217
|
}, Ce = () => {
|
|
1214
1218
|
Y("reset:model-value");
|
|
1215
1219
|
}, Te = () => {
|
|
1216
|
-
Object.entries(
|
|
1220
|
+
Object.entries(r.modelValue).some(([t, i]) => Ye(i, r.originalValue[t])) ? v.open({
|
|
1217
1221
|
title: "You have unsaved changes!",
|
|
1218
1222
|
message: "Are you sure you want to discard? You will lose all the changes if discard edit.",
|
|
1219
1223
|
primaryActions: {
|
|
@@ -1228,108 +1232,116 @@ const et = /* @__PURE__ */ G({
|
|
|
1228
1232
|
}).onPrimary(() => {
|
|
1229
1233
|
Ce(), ae(!1);
|
|
1230
1234
|
}) : (ae(!1), Ce());
|
|
1231
|
-
},
|
|
1232
|
-
var
|
|
1235
|
+
}, vt = x(() => {
|
|
1236
|
+
var l, t;
|
|
1233
1237
|
return {
|
|
1234
1238
|
thumbnail: !S.value,
|
|
1235
1239
|
actions: !S.value,
|
|
1236
|
-
tagging: !S.value && ((
|
|
1240
|
+
tagging: !S.value && ((t = (l = u.itemAttributeSettings) == null ? void 0 : l.value) == null ? void 0 : t.length) > 0
|
|
1237
1241
|
};
|
|
1238
|
-
}),
|
|
1239
|
-
f.update(
|
|
1242
|
+
}), ft = (l) => {
|
|
1243
|
+
f.update(l._id);
|
|
1240
1244
|
};
|
|
1241
|
-
async function
|
|
1242
|
-
await f.update(
|
|
1245
|
+
async function gt(l) {
|
|
1246
|
+
await f.update(l.original._id);
|
|
1243
1247
|
}
|
|
1244
|
-
function
|
|
1245
|
-
var
|
|
1246
|
-
const
|
|
1248
|
+
function je(l) {
|
|
1249
|
+
var y;
|
|
1250
|
+
const t = l.price ?? // TODO: fix type error
|
|
1247
1251
|
// @ts-ignore
|
|
1248
|
-
|
|
1252
|
+
l.fallbackPrice ?? ce.Dinero.fromNumber({
|
|
1249
1253
|
number: 0
|
|
1250
|
-
}).toObject(), i =
|
|
1254
|
+
}).toObject(), i = l.taxes, p = a.taxSetting.countryTaxOptions, C = ce.Dinero.fromFdoDinero(t).toFormat(), V = (y = b.value) == null ? void 0 : y.currency.symbol;
|
|
1251
1255
|
return a.getSelectedTax(
|
|
1252
1256
|
i,
|
|
1253
1257
|
// TODO: fix type error
|
|
1254
1258
|
// @ts-ignore
|
|
1255
|
-
|
|
1259
|
+
l.fallbackTaxes,
|
|
1256
1260
|
p
|
|
1257
|
-
), `${V == null ? void 0 : V.toUpperCase()}${
|
|
1261
|
+
), `${V == null ? void 0 : V.toUpperCase()}${C}`;
|
|
1258
1262
|
}
|
|
1259
|
-
function Pe(
|
|
1263
|
+
function Pe(l) {
|
|
1260
1264
|
var p;
|
|
1261
|
-
const
|
|
1262
|
-
if (
|
|
1263
|
-
const
|
|
1264
|
-
return
|
|
1265
|
-
} else
|
|
1265
|
+
const t = a.currentCatalog, i = a.state.currentSchedulerId;
|
|
1266
|
+
if (t && i) {
|
|
1267
|
+
const C = t.override.scheduler[i] ?? {};
|
|
1268
|
+
return Me((p = C == null ? void 0 : C.items) == null ? void 0 : p.filter((V) => V._id === l));
|
|
1269
|
+
} else {
|
|
1270
|
+
if (t)
|
|
1271
|
+
return Me(t.override.items[l]);
|
|
1272
|
+
if (i) {
|
|
1273
|
+
const C = a.schedulers.find((V) => V._id === i);
|
|
1274
|
+
return Me(C.items.filter((V) => V._id === l));
|
|
1275
|
+
} else
|
|
1276
|
+
return N.value.find((C) => C._id === l);
|
|
1277
|
+
}
|
|
1266
1278
|
}
|
|
1267
|
-
const
|
|
1268
|
-
var
|
|
1279
|
+
const bt = ct(), _t = x(() => bt.breakpoints.value.xs), Ee = F(null), yt = Dt(Ee, Z), ht = x(() => {
|
|
1280
|
+
var t;
|
|
1269
1281
|
return {
|
|
1270
|
-
height: `calc(100vh - ${((
|
|
1282
|
+
height: `calc(100vh - ${((t = yt.value) == null ? void 0 : t.top) + 24}px)`
|
|
1271
1283
|
};
|
|
1272
1284
|
});
|
|
1273
|
-
return (
|
|
1274
|
-
const i = K("fm-search"), p = K("fm-button"),
|
|
1275
|
-
return
|
|
1285
|
+
return (l, t) => {
|
|
1286
|
+
const i = K("fm-search"), p = K("fm-button"), C = K("fm-table"), V = K("fm-form");
|
|
1287
|
+
return _t.value ? (m(), w("div", Gl, [g("div", Ll, [g("div", ql, [d(i, {
|
|
1276
1288
|
"model-value": J.value,
|
|
1277
|
-
"onUpdate:modelValue":
|
|
1289
|
+
"onUpdate:modelValue": t[5] || (t[5] = (y) => J.value = y),
|
|
1278
1290
|
autofocus: "",
|
|
1279
|
-
placeholder:
|
|
1280
|
-
}, null, 8, ["model-value", "placeholder"])]),
|
|
1291
|
+
placeholder: n(o)("menu.product.table.search.placeholder")
|
|
1292
|
+
}, null, 8, ["model-value", "placeholder"])]), t[8] || (t[8] = g("div", {
|
|
1281
1293
|
class: "w-full h-[1px] bg-fm-color-neutral-gray-100"
|
|
1282
|
-
}, null, -1)),
|
|
1294
|
+
}, null, -1)), g("div", Wl, [ye(l.$slots, "filter")]), Z.value ? (m(), w("div", Hl, [d(n(Ze), {
|
|
1283
1295
|
ref_key: "attributeFilterRef",
|
|
1284
1296
|
ref: oe,
|
|
1285
|
-
attributes:
|
|
1286
|
-
modelValue:
|
|
1287
|
-
"onUpdate:modelValue":
|
|
1288
|
-
}, null, 8, ["attributes", "modelValue"])])) : M("", !0)]), N.value.length ? (m(), w("div",
|
|
1297
|
+
attributes: n(B),
|
|
1298
|
+
modelValue: n(D),
|
|
1299
|
+
"onUpdate:modelValue": t[6] || (t[6] = (y) => qe(D) ? D.value = y : null)
|
|
1300
|
+
}, null, 8, ["attributes", "modelValue"])])) : M("", !0)]), N.value.length ? (m(), w("div", Ql, [(m(!0), w(de, null, Se(Q.value, (y) => {
|
|
1289
1301
|
var le;
|
|
1290
1302
|
return m(), w("div", {
|
|
1291
|
-
key:
|
|
1303
|
+
key: y._id,
|
|
1292
1304
|
class: "max-w-full py-12 px-16 space-x-16 flex items-center",
|
|
1293
|
-
onClick: () =>
|
|
1294
|
-
}, [
|
|
1295
|
-
alt:
|
|
1305
|
+
onClick: () => ft(y)
|
|
1306
|
+
}, [g("div", Zl, [d(Ne, {
|
|
1307
|
+
alt: y.name,
|
|
1296
1308
|
size: 72,
|
|
1297
|
-
src:
|
|
1298
|
-
}, null, 8, ["alt", "src"]),
|
|
1299
|
-
"order-from":
|
|
1300
|
-
}, null, 8, ["order-from"])]),
|
|
1301
|
-
categories:
|
|
1302
|
-
}, null, 8, ["categories"])]), d(
|
|
1303
|
-
"custom-attributes":
|
|
1309
|
+
src: y.thumbnail
|
|
1310
|
+
}, null, 8, ["alt", "src"]), g("div", Jl, [g("div", Xl, [g("p", ea, E(y.name), 1), d(Fe, {
|
|
1311
|
+
"order-from": y.orderFrom
|
|
1312
|
+
}, null, 8, ["order-from"])]), g("p", ta, E(je(y)), 1), g("p", la, E(n(o)("menu.product.table.columns.code")) + ": " + E(((le = Pe(y._id)) == null ? void 0 : le.code) || "--"), 1), g("p", aa, [d(et, {
|
|
1313
|
+
categories: n(Re)(n(re), y)
|
|
1314
|
+
}, null, 8, ["categories"])]), d(ze, {
|
|
1315
|
+
"custom-attributes": y.customAttributes
|
|
1304
1316
|
}, null, 8, ["custom-attributes"])])]), d(p, {
|
|
1305
|
-
"text-color":
|
|
1306
|
-
variant:
|
|
1317
|
+
"text-color": n(W).NeutralGray400,
|
|
1318
|
+
variant: n(X).Tertiary,
|
|
1307
1319
|
"prepend-icon": "delete",
|
|
1308
|
-
onClick: fe(() =>
|
|
1309
|
-
_id:
|
|
1310
|
-
name:
|
|
1311
|
-
thumbnail:
|
|
1320
|
+
onClick: fe(() => n(f).deleteItem([{
|
|
1321
|
+
_id: y._id,
|
|
1322
|
+
name: y.name,
|
|
1323
|
+
thumbnail: y.thumbnail
|
|
1312
1324
|
}]), ["stop"])
|
|
1313
|
-
}, null, 8, ["text-color", "variant", "onClick"])], 8,
|
|
1314
|
-
}), 128))])) : (m(), w("div",
|
|
1315
|
-
subtitle:
|
|
1316
|
-
title:
|
|
1325
|
+
}, null, 8, ["text-color", "variant", "onClick"])], 8, Yl);
|
|
1326
|
+
}), 128))])) : (m(), w("div", oa, [d(_e, {
|
|
1327
|
+
subtitle: n(o)("menu.product.table.empty.subtitle"),
|
|
1328
|
+
title: n(o)("menu.product.table.empty.title")
|
|
1317
1329
|
}, {
|
|
1318
|
-
action: $(() => [
|
|
1319
|
-
variant:
|
|
1320
|
-
label:
|
|
1330
|
+
action: $(() => [g("div", na, [d(p, {
|
|
1331
|
+
variant: n(X).Primary,
|
|
1332
|
+
label: n(o)("menu.product.table.empty.actions.add"),
|
|
1321
1333
|
"prepend-icon": "add",
|
|
1322
|
-
onClick:
|
|
1323
|
-
}, null, 8, ["variant", "label"]), d(
|
|
1334
|
+
onClick: t[7] || (t[7] = (y) => n(f).create(null))
|
|
1335
|
+
}, null, 8, ["variant", "label"]), d(tt, null, {
|
|
1324
1336
|
default: $(({
|
|
1325
|
-
trigger:
|
|
1337
|
+
trigger: y
|
|
1326
1338
|
}) => [d(p, {
|
|
1327
|
-
"bg-color":
|
|
1328
|
-
"text-color":
|
|
1329
|
-
variant:
|
|
1330
|
-
label:
|
|
1339
|
+
"bg-color": n(W).NeutralGray100,
|
|
1340
|
+
"text-color": n(W).NeutralGray400,
|
|
1341
|
+
variant: n(X).Primary,
|
|
1342
|
+
label: n(o)("menu.product.table.empty.actions.import"),
|
|
1331
1343
|
"prepend-icon": "download",
|
|
1332
|
-
onClick:
|
|
1344
|
+
onClick: y
|
|
1333
1345
|
}, null, 8, ["bg-color", "text-color", "variant", "label", "onClick"])]),
|
|
1334
1346
|
_: 1
|
|
1335
1347
|
})])]),
|
|
@@ -1338,80 +1350,80 @@ const et = /* @__PURE__ */ G({
|
|
|
1338
1350
|
key: 0,
|
|
1339
1351
|
"blame-form-child-on-validation-failed": "",
|
|
1340
1352
|
class: "flex flex-col flex-1 space-y-8 overflow-hidden",
|
|
1341
|
-
onValidationSuccess:
|
|
1353
|
+
onValidationSuccess: Be
|
|
1342
1354
|
}, {
|
|
1343
|
-
default: $(() => [
|
|
1355
|
+
default: $(() => [g("div", Ml, [g("div", Ol, [ye(l.$slots, "filter")]), g("div", Ul, [d(i, {
|
|
1344
1356
|
"model-value": J.value,
|
|
1345
|
-
"onUpdate:modelValue":
|
|
1357
|
+
"onUpdate:modelValue": t[0] || (t[0] = (y) => J.value = y),
|
|
1346
1358
|
autofocus: "",
|
|
1347
|
-
placeholder:
|
|
1348
|
-
}, null, 8, ["model-value", "placeholder"])])]), Z.value ? (m(), w("div",
|
|
1359
|
+
placeholder: n(o)("menu.product.table.search.placeholder")
|
|
1360
|
+
}, null, 8, ["model-value", "placeholder"])])]), Z.value ? (m(), w("div", zl, [d(n(Ze), {
|
|
1349
1361
|
ref_key: "attributeFilterRef",
|
|
1350
1362
|
ref: oe,
|
|
1351
|
-
attributes:
|
|
1352
|
-
modelValue:
|
|
1353
|
-
"onUpdate:modelValue":
|
|
1354
|
-
}, null, 8, ["attributes", "modelValue"])])) : M("", !0), N.value.length ? (m(), w("div",
|
|
1363
|
+
attributes: n(B),
|
|
1364
|
+
modelValue: n(D),
|
|
1365
|
+
"onUpdate:modelValue": t[1] || (t[1] = (y) => qe(D) ? D.value = y : null)
|
|
1366
|
+
}, null, 8, ["attributes", "modelValue"])])) : M("", !0), N.value.length ? (m(), w("div", Nl, [ue.value.length && !S.value ? (m(), w("div", Dl, [g("p", Kl, E(n(o)("menu.product.table.selection.count", {
|
|
1355
1367
|
count: ue.value.length
|
|
1356
1368
|
})), 1), d(p, {
|
|
1357
|
-
label:
|
|
1369
|
+
label: n(o)("menu.product.table.selection.actions.deselect_all"),
|
|
1358
1370
|
type: "button",
|
|
1359
1371
|
variant: "plain",
|
|
1360
|
-
onClick:
|
|
1372
|
+
onClick: mt
|
|
1361
1373
|
}, null, 8, ["label"]), d(p, {
|
|
1362
|
-
"border-color":
|
|
1363
|
-
"text-color":
|
|
1374
|
+
"border-color": n(W).SystemError300,
|
|
1375
|
+
"text-color": n(W).SystemError300,
|
|
1364
1376
|
class: "ml-auto",
|
|
1365
|
-
label:
|
|
1377
|
+
label: n(o)("menu.product.table.selection.actions.remove"),
|
|
1366
1378
|
"prepend-icon": "delete",
|
|
1367
1379
|
variant: "secondary",
|
|
1368
|
-
onClick:
|
|
1369
|
-
}, null, 8, ["border-color", "text-color", "label"])])) : M("", !0), S.value ? (m(), w("div",
|
|
1370
|
-
variant:
|
|
1371
|
-
label:
|
|
1380
|
+
onClick: pt
|
|
1381
|
+
}, null, 8, ["border-color", "text-color", "label"])])) : M("", !0), S.value ? (m(), w("div", Bl, [d(p, {
|
|
1382
|
+
variant: n(X).Tertiary,
|
|
1383
|
+
label: n(o)("menu.product.table.bulk_edit.actions.reset_all"),
|
|
1372
1384
|
onClick: Ce
|
|
1373
1385
|
}, null, 8, ["variant", "label"]), d(p, {
|
|
1374
|
-
variant:
|
|
1375
|
-
label:
|
|
1386
|
+
variant: n(X).Tertiary,
|
|
1387
|
+
label: n(o)("menu.common.actions.cancel"),
|
|
1376
1388
|
onClick: Te
|
|
1377
1389
|
}, null, 8, ["variant", "label"]), d(p, {
|
|
1378
|
-
borderColor:
|
|
1379
|
-
textColor:
|
|
1380
|
-
variant:
|
|
1381
|
-
label:
|
|
1390
|
+
borderColor: n(W).ColorPrimary,
|
|
1391
|
+
textColor: n(W).ColorPrimary,
|
|
1392
|
+
variant: n(X).Secondary,
|
|
1393
|
+
label: n(o)("menu.product.table.bulk_edit.actions.save"),
|
|
1382
1394
|
type: "submit"
|
|
1383
|
-
}, null, 8, ["borderColor", "textColor", "variant", "label"])])) : M("", !0),
|
|
1395
|
+
}, null, 8, ["borderColor", "textColor", "variant", "label"])])) : M("", !0), g("div", {
|
|
1384
1396
|
ref_key: "tableWrapper",
|
|
1385
|
-
ref:
|
|
1386
|
-
}, [(m(), I(
|
|
1397
|
+
ref: Ee
|
|
1398
|
+
}, [(m(), I(st(S.value ? zt : "div"), {
|
|
1387
1399
|
ref: "fullWrapper",
|
|
1388
|
-
title: S.value ?
|
|
1400
|
+
title: S.value ? n(o)("menu.product.table.bulk_edit.title") : "",
|
|
1389
1401
|
show: S.value,
|
|
1390
1402
|
"primary-action": {
|
|
1391
|
-
label:
|
|
1403
|
+
label: n(o)("menu.product.table.bulk_edit.actions.save")
|
|
1392
1404
|
},
|
|
1393
1405
|
"secondary-actions": [{
|
|
1394
|
-
label:
|
|
1406
|
+
label: n(o)("menu.product.table.bulk_edit.actions.reset_all"),
|
|
1395
1407
|
click: Ce
|
|
1396
1408
|
}, {
|
|
1397
|
-
label:
|
|
1409
|
+
label: n(o)("menu.common.actions.cancel"),
|
|
1398
1410
|
click: Te
|
|
1399
1411
|
}],
|
|
1400
1412
|
class: "overflow-x-scroll",
|
|
1401
|
-
style: ht
|
|
1402
|
-
onOnPrimary:
|
|
1413
|
+
style: xt(ht.value),
|
|
1414
|
+
onOnPrimary: Be,
|
|
1403
1415
|
onOnCancel: Te
|
|
1404
1416
|
}, {
|
|
1405
|
-
default: $(() => [d(
|
|
1417
|
+
default: $(() => [d(C, {
|
|
1406
1418
|
class: me({
|
|
1407
1419
|
"min-w-[1280px]": !0,
|
|
1408
1420
|
"mt-24": S.value
|
|
1409
1421
|
}),
|
|
1410
1422
|
modelValue: ve.value,
|
|
1411
|
-
"onUpdate:modelValue":
|
|
1423
|
+
"onUpdate:modelValue": t[2] || (t[2] = (y) => ve.value = y),
|
|
1412
1424
|
"column-defs": ge.value,
|
|
1413
|
-
"column-visibility":
|
|
1414
|
-
loading:
|
|
1425
|
+
"column-visibility": vt.value,
|
|
1426
|
+
loading: l.isCalculating,
|
|
1415
1427
|
"page-size": Q.value.length,
|
|
1416
1428
|
"row-data": Q.value,
|
|
1417
1429
|
"shrink-at": !1,
|
|
@@ -1420,28 +1432,28 @@ const et = /* @__PURE__ */ G({
|
|
|
1420
1432
|
"virtual-row-height": S.value ? 48 : 91,
|
|
1421
1433
|
"hide-footer": "",
|
|
1422
1434
|
"pin-header-row": "",
|
|
1423
|
-
onRowClick:
|
|
1435
|
+
onRowClick: t[3] || (t[3] = (y) => S.value ? void 0 : gt(y))
|
|
1424
1436
|
}, null, 8, ["class", "modelValue", "column-defs", "column-visibility", "loading", "page-size", "row-data", "selection", "virtual-row-height"])]),
|
|
1425
1437
|
_: 1
|
|
1426
|
-
}, 40, ["title", "show", "primary-action", "secondary-actions", "style"]))], 512)])) : (m(), w("div",
|
|
1427
|
-
subtitle:
|
|
1428
|
-
title:
|
|
1438
|
+
}, 40, ["title", "show", "primary-action", "secondary-actions", "style"]))], 512)])) : (m(), w("div", jl, [d(_e, {
|
|
1439
|
+
subtitle: n(o)("menu.product.table.empty.subtitle"),
|
|
1440
|
+
title: n(o)("menu.product.table.empty.title")
|
|
1429
1441
|
}, {
|
|
1430
|
-
action: $(() => [
|
|
1431
|
-
variant:
|
|
1432
|
-
label:
|
|
1442
|
+
action: $(() => [g("div", El, [d(p, {
|
|
1443
|
+
variant: n(X).Primary,
|
|
1444
|
+
label: n(o)("menu.product.table.empty.actions.add"),
|
|
1433
1445
|
"prepend-icon": "add",
|
|
1434
|
-
onClick:
|
|
1435
|
-
}, null, 8, ["variant", "label"]), d(
|
|
1446
|
+
onClick: t[4] || (t[4] = (y) => n(f).create(null))
|
|
1447
|
+
}, null, 8, ["variant", "label"]), d(tt, null, {
|
|
1436
1448
|
default: $(({
|
|
1437
|
-
trigger:
|
|
1449
|
+
trigger: y
|
|
1438
1450
|
}) => [d(p, {
|
|
1439
|
-
"bg-color":
|
|
1440
|
-
"text-color":
|
|
1441
|
-
variant:
|
|
1442
|
-
label:
|
|
1451
|
+
"bg-color": n(W).NeutralGray100,
|
|
1452
|
+
"text-color": n(W).NeutralGray400,
|
|
1453
|
+
variant: n(X).Primary,
|
|
1454
|
+
label: n(o)("menu.product.table.empty.actions.import"),
|
|
1443
1455
|
"prepend-icon": "download",
|
|
1444
|
-
onClick:
|
|
1456
|
+
onClick: y
|
|
1445
1457
|
}, null, 8, ["bg-color", "text-color", "variant", "label", "onClick"])]),
|
|
1446
1458
|
_: 1
|
|
1447
1459
|
})])]),
|
|
@@ -1451,37 +1463,37 @@ const et = /* @__PURE__ */ G({
|
|
|
1451
1463
|
}));
|
|
1452
1464
|
};
|
|
1453
1465
|
}
|
|
1454
|
-
}),
|
|
1466
|
+
}), sa = {
|
|
1455
1467
|
key: 0,
|
|
1456
1468
|
class: /* @__PURE__ */ me(["flex flex-col", "flex-1", "overflow-hidden"])
|
|
1457
|
-
},
|
|
1469
|
+
}, ua = {
|
|
1458
1470
|
class: /* @__PURE__ */ me(["pt-16 xs:pt-0", "flex xs:flex-col", "flex-1", "w-full", "overflow-hidden"])
|
|
1459
|
-
},
|
|
1471
|
+
}, ia = { class: "flex flex-col flex-1 overflow-hidden" }, ca = {
|
|
1460
1472
|
key: 1,
|
|
1461
1473
|
class: "pt-16 xs:pt-8 space-y-24"
|
|
1462
|
-
},
|
|
1474
|
+
}, da = { class: "flex items-center gap-8 px-16" }, Ma = /* @__PURE__ */ G({
|
|
1463
1475
|
__name: "Product",
|
|
1464
|
-
setup(
|
|
1465
|
-
const
|
|
1466
|
-
var T,
|
|
1476
|
+
setup(h) {
|
|
1477
|
+
const e = Ie(), c = x(() => e.rules.item), r = it(), o = x(() => !e.state.currentCatalogId), u = x(() => e.rules.item), a = x(() => !e.state.currentSchedulerId), v = F(!1), f = F(!1), s = x(() => {
|
|
1478
|
+
var T, U, A, te;
|
|
1467
1479
|
if (o.value && a.value) return;
|
|
1468
1480
|
if (a.value) {
|
|
1469
|
-
const j = (T =
|
|
1481
|
+
const j = (T = e.currentCatalog) == null ? void 0 : T.override.items;
|
|
1470
1482
|
return j ? Object.entries(j).reduce((z, [R, se]) => {
|
|
1471
1483
|
const L = se.find((pe) => !pe.combinationKey);
|
|
1472
1484
|
return L && (z[R] = L), z;
|
|
1473
1485
|
}, {}) : {};
|
|
1474
1486
|
}
|
|
1475
|
-
return ((o.value ? (
|
|
1476
|
-
}),
|
|
1487
|
+
return ((o.value ? (U = e.currentScheduler) == null ? void 0 : U.items : (te = (A = e.currentCatalog) == null ? void 0 : A.override.scheduler[e.state.currentSchedulerId]) == null ? void 0 : te.items) ?? []).reduce((j, z) => (z.combinationKey || (j[z._id] = z), j), {});
|
|
1488
|
+
}), b = F({}), _ = F({}), k = async () => {
|
|
1477
1489
|
var te, j;
|
|
1478
1490
|
f.value = !0;
|
|
1479
|
-
const P = !!s.value, T = be.flatten(Y.value.map((z) => z.items)),
|
|
1480
|
-
|
|
1491
|
+
const P = !!s.value, T = be.flatten(Y.value.map((z) => z.items)), U = P && v.value ? await $t(
|
|
1492
|
+
e.mergedMenu,
|
|
1481
1493
|
T,
|
|
1482
|
-
|
|
1483
|
-
(te =
|
|
1484
|
-
(j =
|
|
1494
|
+
e.state.menu,
|
|
1495
|
+
(te = e.currentCatalog) == null ? void 0 : te._id,
|
|
1496
|
+
(j = e.currentScheduler) == null ? void 0 : j._id,
|
|
1485
1497
|
!1
|
|
1486
1498
|
) : void 0, A = T.reduce((z, R, se) => {
|
|
1487
1499
|
var pe, he, xe, ge;
|
|
@@ -1497,14 +1509,14 @@ const et = /* @__PURE__ */ G({
|
|
|
1497
1509
|
orderFrom: P ? L == null ? void 0 : L.orderFrom : R.orderFrom,
|
|
1498
1510
|
taxes: P ? null : R.taxes,
|
|
1499
1511
|
thumbnail: R.thumbnail,
|
|
1500
|
-
fallbackPrice: (he =
|
|
1512
|
+
fallbackPrice: (he = U == null ? void 0 : U[se]) == null ? void 0 : he.price,
|
|
1501
1513
|
fallbackName: P ? R.name : void 0,
|
|
1502
|
-
fallbackCode: (xe =
|
|
1503
|
-
fallbackOrder: (ge =
|
|
1514
|
+
fallbackCode: (xe = U == null ? void 0 : U[se]) == null ? void 0 : xe.code,
|
|
1515
|
+
fallbackOrder: (ge = U == null ? void 0 : U[se]) == null ? void 0 : ge.orderFrom,
|
|
1504
1516
|
fallbackTaxes: P ? R.taxes : null
|
|
1505
1517
|
}, z;
|
|
1506
1518
|
}, {});
|
|
1507
|
-
|
|
1519
|
+
b.value = A, _.value = { ...A }, f.value = !1;
|
|
1508
1520
|
}, { categories: N, selectedCategories: Y } = Ve(), S = F(null);
|
|
1509
1521
|
function ae() {
|
|
1510
1522
|
S.value && S.value.toggleAttributeFilter();
|
|
@@ -1513,88 +1525,88 @@ const et = /* @__PURE__ */ G({
|
|
|
1513
1525
|
Y.value && await k();
|
|
1514
1526
|
});
|
|
1515
1527
|
function Z() {
|
|
1516
|
-
|
|
1528
|
+
r.create(null);
|
|
1517
1529
|
}
|
|
1518
1530
|
const oe = () => {
|
|
1519
1531
|
Y.value && k();
|
|
1520
|
-
}, { t: q } = $e(), B =
|
|
1532
|
+
}, { t: q } = $e(), B = x(() => {
|
|
1521
1533
|
var P, T;
|
|
1522
|
-
return (T = (P =
|
|
1534
|
+
return (T = (P = e.currentCatalog) == null ? void 0 : P.linkItemRules) == null ? void 0 : T.length;
|
|
1523
1535
|
}), {
|
|
1524
1536
|
menuItems: D,
|
|
1525
1537
|
categories: H,
|
|
1526
1538
|
linkItemRules: J,
|
|
1527
|
-
handleSubmit:
|
|
1539
|
+
handleSubmit: ne,
|
|
1528
1540
|
catalogManager: Q,
|
|
1529
|
-
schedulerManager:
|
|
1530
|
-
} =
|
|
1541
|
+
schedulerManager: re
|
|
1542
|
+
} = St(!1);
|
|
1531
1543
|
return (P, T) => {
|
|
1532
|
-
const
|
|
1533
|
-
return
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1544
|
+
const U = K("fm-button");
|
|
1545
|
+
return n(N).length ? (m(), w("div", sa, [
|
|
1546
|
+
g("div", ua, [
|
|
1547
|
+
g("div", ia, [
|
|
1548
|
+
n(Y) ? (m(), I(ra, {
|
|
1537
1549
|
key: 0,
|
|
1538
1550
|
ref_key: "productTableRef",
|
|
1539
1551
|
ref: S,
|
|
1540
1552
|
"is-calculating": f.value,
|
|
1541
|
-
"model-value":
|
|
1542
|
-
"original-value":
|
|
1543
|
-
"onUpdate:modelValue": T[1] || (T[1] = (A) =>
|
|
1553
|
+
"model-value": b.value,
|
|
1554
|
+
"original-value": _.value,
|
|
1555
|
+
"onUpdate:modelValue": T[1] || (T[1] = (A) => b.value = A),
|
|
1544
1556
|
"onReset:modelValue": oe,
|
|
1545
1557
|
"onUpdate:editing": T[2] || (T[2] = (A) => v.value = A)
|
|
1546
1558
|
}, {
|
|
1547
1559
|
filter: $(() => [
|
|
1548
|
-
d(
|
|
1549
|
-
u.value.multiScheduler ? (m(), I(
|
|
1550
|
-
B.value ? (m(), I(
|
|
1560
|
+
d(Xe, { onToggleAttributeFilter: ae }),
|
|
1561
|
+
u.value.multiScheduler ? (m(), I(Qe, { key: 0 })) : M("", !0),
|
|
1562
|
+
B.value ? (m(), I(He, {
|
|
1551
1563
|
key: 1,
|
|
1552
|
-
"current-restaurant-attr-params":
|
|
1553
|
-
onConfirm: T[0] || (T[0] = (A) =>
|
|
1564
|
+
"current-restaurant-attr-params": n(e).state.currentRestaurantAttrParams,
|
|
1565
|
+
onConfirm: T[0] || (T[0] = (A) => n(e).setRestaurantAttrParams(A))
|
|
1554
1566
|
}, null, 8, ["current-restaurant-attr-params"])) : M("", !0)
|
|
1555
1567
|
]),
|
|
1556
1568
|
_: 1
|
|
1557
1569
|
}, 8, ["is-calculating", "model-value", "original-value"])) : M("", !0)
|
|
1558
1570
|
])
|
|
1559
1571
|
])
|
|
1560
|
-
])) : (m(), w("div",
|
|
1561
|
-
|
|
1562
|
-
d(
|
|
1563
|
-
u.value.multiScheduler ? (m(), I(
|
|
1564
|
-
B.value ? (m(), I(
|
|
1572
|
+
])) : (m(), w("div", ca, [
|
|
1573
|
+
g("div", da, [
|
|
1574
|
+
d(Xe),
|
|
1575
|
+
u.value.multiScheduler ? (m(), I(Qe, { key: 0 })) : M("", !0),
|
|
1576
|
+
B.value ? (m(), I(He, {
|
|
1565
1577
|
key: 1,
|
|
1566
|
-
"current-restaurant-attr-params":
|
|
1567
|
-
onConfirm: T[3] || (T[3] = (A) =>
|
|
1578
|
+
"current-restaurant-attr-params": n(e).state.currentRestaurantAttrParams,
|
|
1579
|
+
onConfirm: T[3] || (T[3] = (A) => n(e).setRestaurantAttrParams(A))
|
|
1568
1580
|
}, null, 8, ["current-restaurant-attr-params"])) : M("", !0)
|
|
1569
1581
|
]),
|
|
1570
1582
|
c.value.create ? (m(), I(_e, {
|
|
1571
1583
|
key: 0,
|
|
1572
1584
|
action: {
|
|
1573
|
-
text:
|
|
1585
|
+
text: n(q)("menu.product.empty.with_create.action"),
|
|
1574
1586
|
callback: Z
|
|
1575
1587
|
},
|
|
1576
|
-
subtitle:
|
|
1577
|
-
title:
|
|
1588
|
+
subtitle: n(q)("menu.product.empty.with_create.subtitle"),
|
|
1589
|
+
title: n(q)("menu.product.empty.with_create.title")
|
|
1578
1590
|
}, null, 8, ["action", "subtitle", "title"])) : a.value ? (m(), I(_e, {
|
|
1579
1591
|
key: 1,
|
|
1580
|
-
subtitle:
|
|
1581
|
-
title:
|
|
1592
|
+
subtitle: n(q)("menu.product.empty.no_scheduler.subtitle"),
|
|
1593
|
+
title: n(q)("menu.product.empty.no_scheduler.title")
|
|
1582
1594
|
}, {
|
|
1583
1595
|
action: $(() => [
|
|
1584
|
-
d(
|
|
1585
|
-
"categorized-items":
|
|
1586
|
-
"initial-value":
|
|
1596
|
+
d(We, {
|
|
1597
|
+
"categorized-items": n(Q).linkableItems.value,
|
|
1598
|
+
"initial-value": n(Q).currentItems.value,
|
|
1587
1599
|
"show-variant": !1,
|
|
1588
|
-
"menu-items":
|
|
1589
|
-
categories:
|
|
1590
|
-
"link-item-rules":
|
|
1600
|
+
"menu-items": n(D),
|
|
1601
|
+
categories: n(H),
|
|
1602
|
+
"link-item-rules": n(J),
|
|
1591
1603
|
"no-scheduler": a.value,
|
|
1592
1604
|
"is-local-only": !0,
|
|
1593
|
-
onSubmit:
|
|
1605
|
+
onSubmit: n(ne)
|
|
1594
1606
|
}, {
|
|
1595
1607
|
default: $(({ trigger: A }) => [
|
|
1596
|
-
d(
|
|
1597
|
-
label:
|
|
1608
|
+
d(U, {
|
|
1609
|
+
label: n(q)("menu.common.actions.link_product"),
|
|
1598
1610
|
"prepend-icon": "link",
|
|
1599
1611
|
onClick: A
|
|
1600
1612
|
}, null, 8, ["label", "onClick"])
|
|
@@ -1605,24 +1617,24 @@ const et = /* @__PURE__ */ G({
|
|
|
1605
1617
|
_: 1
|
|
1606
1618
|
}, 8, ["subtitle", "title"])) : (m(), I(_e, {
|
|
1607
1619
|
key: 2,
|
|
1608
|
-
subtitle:
|
|
1609
|
-
title:
|
|
1620
|
+
subtitle: n(q)("menu.product.empty.with_scheduler.subtitle"),
|
|
1621
|
+
title: n(q)("menu.product.empty.with_scheduler.title")
|
|
1610
1622
|
}, {
|
|
1611
1623
|
action: $(() => [
|
|
1612
|
-
d(
|
|
1613
|
-
"categorized-items":
|
|
1614
|
-
"initial-value":
|
|
1624
|
+
d(We, {
|
|
1625
|
+
"categorized-items": n(re).linkableItems.value,
|
|
1626
|
+
"initial-value": n(re).currentItems.value,
|
|
1615
1627
|
"show-variant": !1,
|
|
1616
|
-
"menu-items":
|
|
1617
|
-
categories:
|
|
1618
|
-
"link-item-rules":
|
|
1628
|
+
"menu-items": n(D),
|
|
1629
|
+
categories: n(H),
|
|
1630
|
+
"link-item-rules": n(J),
|
|
1619
1631
|
"no-scheduler": a.value,
|
|
1620
1632
|
"is-local-only": !0,
|
|
1621
|
-
onSubmit:
|
|
1633
|
+
onSubmit: n(ne)
|
|
1622
1634
|
}, {
|
|
1623
1635
|
default: $(({ trigger: A }) => [
|
|
1624
|
-
d(
|
|
1625
|
-
label:
|
|
1636
|
+
d(U, {
|
|
1637
|
+
label: n(q)("menu.common.actions.apply_product"),
|
|
1626
1638
|
onClick: A
|
|
1627
1639
|
}, null, 8, ["label", "onClick"])
|
|
1628
1640
|
]),
|
|
@@ -1636,6 +1648,6 @@ const et = /* @__PURE__ */ G({
|
|
|
1636
1648
|
}
|
|
1637
1649
|
});
|
|
1638
1650
|
export {
|
|
1639
|
-
|
|
1640
|
-
|
|
1651
|
+
tt as _,
|
|
1652
|
+
Ma as a
|
|
1641
1653
|
};
|