@feedmepos/mf-menu 0.32.41 → 0.32.42-dev.3
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-Bt5lFavE.js → App-1oMjfIcc.js} +7 -7
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-DpyJ5gr2.js → ApplyProduct.vue_vue_type_script_setup_true_lang-AIw0Zgzf.js} +3 -3
- package/dist/{Catalog-DJyGxDRP.js → Catalog-CvQo24ck.js} +44 -44
- package/dist/{Category-BlIUSUxn.js → Category-C8bM8EwO.js} +24 -24
- package/dist/{Category-CNTOOIJE.js → Category-DmIaxrrK.js} +24 -24
- package/dist/{CookingGuide-CpZfKE5H.js → CookingGuide-CKEbyk4o.js} +105 -105
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-QzZR2W1U.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-Ci4gwgnH.js} +1 -1
- package/dist/{Group-B88fbCOf.js → Group-CoYyRvcx.js} +1 -1
- package/dist/{Group-Bhnov3p8.js → Group-EnJDk54z.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-CRAX3mIt.js → Group.vue_vue_type_script_setup_true_lang-tH2U82rV.js} +18 -18
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Bqh6a0oO.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BDxjuWcY.js} +30 -30
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-DPAxkce6.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-gVXNoAaN.js} +1457 -1456
- package/dist/{Ingredient-BORYH8yl.js → Ingredient-7PPPp7Yf.js} +20 -20
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-Ci-CaBED.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DQPjpqtv.js} +2 -2
- package/dist/{LinkProductSideSheet-DQN59t0a.js → LinkProductSideSheet-BS-MEIOG.js} +45 -45
- package/dist/{MenuSetting-cI0j1omE.js → MenuSetting-BNVyT0oG.js} +47 -47
- package/dist/{PrintRoute-CXSuomGR.js → PrintRoute-BMdk0zDv.js} +39 -39
- package/dist/{Product-DgbQeeKt.js → Product-DbIK7Eog.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-D0cnQC3i.js → Product.vue_vue_type_script_setup_true_lang-FnX_M8lJ.js} +139 -139
- package/dist/{ProductInternalTools-B1zpNBze.js → ProductInternalTools-BC8jWpQd.js} +66 -66
- package/dist/Products-CPi2vuUO.js +307 -0
- package/dist/{Publish-Cqdk3SjG.js → Publish-BcxHXZ1J.js} +29 -29
- package/dist/{Recipe-anT6QBZT.js → Recipe-egyxyFfA.js} +24 -24
- package/dist/RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-CP1NjxzF.js +144 -0
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-Cc_k57qi.js → RuleView.vue_vue_type_script_setup_true_lang-CPMCeAK9.js} +366 -366
- package/dist/{Scheduler-Z64VCw-y.js → Scheduler-Cb-IJtj8.js} +11 -11
- package/dist/{ServingSequence-B7ZbvY1v.js → ServingSequence-B46n34xA.js} +44 -44
- package/dist/{Setting-DnVCq2hY.js → Setting-B_dZG5ZC.js} +17 -17
- package/dist/{Subcategory-dpz-Um56.js → Subcategory-DbjLfXvf.js} +51 -51
- package/dist/{Takeaway-DiyOBq1g.js → Takeaway-D4axornr.js} +13 -13
- package/dist/{Takeaway-mwLXbT9q.js → Takeaway-DNu6jYFC.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-tg3AJE3_.js → Takeaway.vue_vue_type_script_setup_true_lang-Dvm8Lfp3.js} +28 -28
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-FRH0zCh6.js → Thumbnail.vue_vue_type_script_setup_true_lang-BjPOOURv.js} +27 -27
- package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-nGzNSAX9.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-CXGsdChM.js} +4 -4
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-C9eskCL4.js +5767 -0
- package/dist/{Unit-CmF2olR8.js → Unit-jV5Bee8E.js} +8 -8
- package/dist/{Variant-C9-_-SLX.js → Variant-jGcgA-W8.js} +24 -24
- package/dist/{_id_-C4Zpr6wS.js → _id_-CtvQ64EN.js} +28 -28
- package/dist/app-B6laFmet.js +2286 -0
- package/dist/{app-CrcPPLl1.js → app-eq7TaFfk.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-68qGGp41.js → linked-status-Db18QnYH.js} +5 -5
- package/dist/assets/{menu-export-CRtF4W1I.js → menu-export-24uzPEwW.js} +2 -2
- package/dist/assets/{override-menu-DB0DJf_x.js → override-menu-DreGPEa-.js} +5 -5
- package/dist/assets/{validate-menu-oi_J1ue-.js → validate-menu-BSFHH8O3.js} +2 -2
- package/dist/{catalog-Cp4kVRAL.js → catalog-CXcQ-QmP.js} +1 -1
- package/dist/{catalogSetting-Cr0DX5kw.js → catalogSetting-DnUHD0I1.js} +1 -1
- package/dist/{currency-C_IuOt0j.js → currency-CwtLEvAZ.js} +1 -1
- package/dist/dayjs.min-BgQgGKeN.js +7 -0
- package/dist/{index-CXzIkkUH.js → index-Cx1Nqii7.js} +31 -31
- package/dist/{index-DzLNqNMt.js → index-D-Saeea8.js} +43 -43
- package/dist/{index.vue_vue_type_script_setup_true_lang-DyiwvQnC.js → index.vue_vue_type_script_setup_true_lang-CA1qH7Vf.js} +244 -269
- package/dist/{item-C3_GKsNy.js → item-CKRLnCIs.js} +15 -15
- package/dist/{jszip.min-BiRK-xY3.js → jszip.min-DOHC0a7i.js} +388 -387
- package/dist/{menu-CYrjppCV.js → menu-BduvULfe.js} +1 -1
- package/dist/{menuV2-DWQ093x3.js → menuV2-Da1zBhkS.js} +83 -83
- package/dist/{priceTier-CD3j-Ccs.js → priceTier-tObdSj6z.js} +1 -1
- package/dist/{rules-BTZh0AjD.js → rules-DD816lrT.js} +11 -11
- package/dist/{scheduler-PVlNN-pB.js → scheduler-CDhxmmVX.js} +29 -29
- package/dist/{toExcel-lSyQhZQ9.js → toExcel-tz6MIiQY.js} +2 -2
- package/dist/{unit-1MnbZYm8.js → unit-NGl3h7Qh.js} +35 -35
- package/package.json +2 -1
- package/dist/Products-JodXj4IG.js +0 -291
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BzwlZ9jW.js +0 -6130
- package/dist/app-BC-PDZ1J.js +0 -363
- package/dist/dayjs.min-fN9Ef6y1.js +0 -6
- package/dist/index-vqNnqeRW.js +0 -246
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { ref as F, computed as x, defineComponent as
|
|
2
|
-
import { u as Fe,
|
|
3
|
-
import { useI18n as Ie, useCoreStore as
|
|
4
|
-
import { u as Se } from "./menu-
|
|
5
|
-
import { L as Ge } from "./LinkProductSideSheet-
|
|
6
|
-
import {
|
|
7
|
-
import { _ as Me, a as qe } from "./CustomAttributeChip.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { _ as Ue, u as
|
|
9
|
-
import { f as
|
|
10
|
-
import { u as ot, C as
|
|
11
|
-
import { b as We, H as
|
|
12
|
-
import { useBreakpoints as rt, components as te, useDialog as
|
|
13
|
-
import { F as
|
|
14
|
-
import { _ as
|
|
1
|
+
import { ref as F, computed as x, defineComponent as B, resolveComponent as j, createBlock as I, openBlock as m, withCtx as T, createElementVNode as g, createVNode as d, unref as a, createElementBlock as w, Fragment as pe, renderList as we, createCommentVNode as M, normalizeClass as ve, toDisplayString as N, withModifiers as fe, mergeModels as Je, useModel as Xe, renderSlot as _e, watch as de, createTextVNode as et, watchEffect as tt, nextTick as Ae, resolveDynamicComponent as lt, onMounted as at, h as D, isRef as Be, normalizeStyle as ft } from "vue";
|
|
2
|
+
import { u as Fe, Q as Ce, z as me, G as Re, H as ge, T as gt, ac as bt, ad as _t, ae as Pe, af as yt, P as ht, a2 as be, ag as Ee } from "./index.vue_vue_type_script_setup_true_lang-CA1qH7Vf.js";
|
|
3
|
+
import { useI18n as Ie, useCoreStore as ze, useCustomAttributes as xt } from "@feedmepos/mf-common";
|
|
4
|
+
import { u as Se } from "./menu-BduvULfe.js";
|
|
5
|
+
import { L as Ge } from "./LinkProductSideSheet-BS-MEIOG.js";
|
|
6
|
+
import { _ as Le } from "./RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-CP1NjxzF.js";
|
|
7
|
+
import { _ as Me, a as qe } from "./CustomAttributeChip.vue_vue_type_script_setup_true_lang-Ci4gwgnH.js";
|
|
8
|
+
import { _ as Ue, u as Ct } from "./Thumbnail.vue_vue_type_script_setup_true_lang-BjPOOURv.js";
|
|
9
|
+
import { f as kt, o as wt, a as St, m as Vt } from "./menuV2-Da1zBhkS.js";
|
|
10
|
+
import { u as ot, C as Ft } from "./item-CKRLnCIs.js";
|
|
11
|
+
import { b as We, H as It } from "./app-5fxKLAzS.js";
|
|
12
|
+
import { useBreakpoints as rt, components as te, useDialog as $t, FmButtonColorThemeVariant as W, FmButtonVariant as ee } from "@feedmepos/ui-library";
|
|
13
|
+
import { F as Tt } from "./index-CisutoS9.js";
|
|
14
|
+
import { _ as Oe, d as Pt, e as At } from "./app-B6laFmet.js";
|
|
15
15
|
import { _ as ke } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
|
|
16
|
-
import { _ as Rt } from "./index-
|
|
17
|
-
import { r as Mt, _ as Ut } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-
|
|
18
|
-
import { c as
|
|
19
|
-
import { f as
|
|
16
|
+
import { _ as Rt } from "./index-Cx1Nqii7.js";
|
|
17
|
+
import { r as Mt, _ as Ut } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-gVXNoAaN.js";
|
|
18
|
+
import { c as zt } from "./check-C9mY6LiX.js";
|
|
19
|
+
import { f as Ot } from "./currency-CwtLEvAZ.js";
|
|
20
20
|
import { w as Dt } from "./tooltip-B5BiPMx9.js";
|
|
21
21
|
import { g as jt } from "./translation-Cdap0IVg.js";
|
|
22
|
-
function
|
|
22
|
+
function Kt(k, e, i = k) {
|
|
23
23
|
const n = F(!0), t = x(() => {
|
|
24
24
|
if (!n.value && !e.value)
|
|
25
25
|
return !0;
|
|
@@ -42,50 +42,50 @@ function Bt(k, e, i = k) {
|
|
|
42
42
|
}, toggleOption: (f) => {
|
|
43
43
|
var b, y, S;
|
|
44
44
|
let s;
|
|
45
|
-
e.value === void 0 && n.value ? s = [f] : e.value === void 0 && !n.value ? s = (b = k.value.map((
|
|
45
|
+
e.value === void 0 && n.value ? s = [f] : e.value === void 0 && !n.value ? s = (b = k.value.map((z) => z.value)) == null ? void 0 : b.filter((z) => z !== f) : (y = e.value) != null && y.includes(f) ? s = (S = e.value) == null ? void 0 : S.filter((z) => z !== f) : s = [...e.value || [], f], s.length === 0 ? (e.value = void 0, n.value = !0) : s.length === k.value.length ? (e.value = void 0, n.value = !1) : e.value = s;
|
|
46
46
|
} };
|
|
47
47
|
}
|
|
48
|
-
const
|
|
48
|
+
const Nt = { class: "inline-flex items-center" }, Bt = {
|
|
49
49
|
key: 0,
|
|
50
50
|
class: /* @__PURE__ */ ve([
|
|
51
51
|
"fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap",
|
|
52
52
|
"text-fm-color-neutral-gray-400"
|
|
53
53
|
])
|
|
54
|
-
}, Et = { class: "p-4" }, Gt = { class: "flex-1 overflow-y-auto min-h-0" }, He = /* @__PURE__ */
|
|
54
|
+
}, Et = { class: "p-4" }, Gt = { class: "flex-1 overflow-y-auto min-h-0" }, He = /* @__PURE__ */ B({
|
|
55
55
|
__name: "CategorySelector",
|
|
56
56
|
emits: ["toggleAttributeFilter"],
|
|
57
57
|
setup(k, { emit: e }) {
|
|
58
58
|
const i = e, n = Fe(), { categories: t, selectedCategories: u } = Se(), l = x(() => n.state.currentCategoryIds), v = x(
|
|
59
|
-
() => t.value.map((
|
|
59
|
+
() => t.value.map((K) => ({ label: K.name, value: K.id }))
|
|
60
60
|
), f = x(() => v.value.filter(
|
|
61
|
-
(
|
|
61
|
+
(K) => K.label.toLowerCase().includes(y.value.toLowerCase())
|
|
62
62
|
)), { t: s } = Ie(), b = x(() => {
|
|
63
|
-
var
|
|
64
|
-
return t.value.length === ((
|
|
63
|
+
var K, O, H;
|
|
64
|
+
return t.value.length === ((K = u.value) == null ? void 0 : K.length) ? s("menu.category.selector.all") : ((O = u.value) == null ? void 0 : O.length) === 1 ? u.value[0].name : `${(H = u.value) == null ? void 0 : H.length}`;
|
|
65
65
|
}), y = F(""), S = x({
|
|
66
66
|
get: () => l.value,
|
|
67
|
-
set: (
|
|
68
|
-
n.selectCategory(
|
|
67
|
+
set: (K) => {
|
|
68
|
+
n.selectCategory(K);
|
|
69
69
|
}
|
|
70
|
-
}), { allSelected:
|
|
70
|
+
}), { allSelected: z, toggleAll: Y, toggleOption: V, indeterminate: oe } = Kt(
|
|
71
71
|
v,
|
|
72
72
|
S,
|
|
73
73
|
f
|
|
74
|
-
),
|
|
74
|
+
), Z = ze(), re = x(() => Z.itemAttributeSettings.value.length > 0);
|
|
75
75
|
function L() {
|
|
76
76
|
i("toggleAttributeFilter");
|
|
77
77
|
}
|
|
78
|
-
return (
|
|
79
|
-
const H = j("FmIcon"),
|
|
78
|
+
return (K, O) => {
|
|
79
|
+
const H = j("FmIcon"), J = j("FmChip"), ne = j("FmSearch"), Q = j("FmMenuItem"), se = j("FmMenu");
|
|
80
80
|
return m(), I(se, {
|
|
81
81
|
"close-on-click": !1,
|
|
82
82
|
width: 220
|
|
83
83
|
}, {
|
|
84
84
|
"menu-button": T(() => [
|
|
85
|
-
g("div",
|
|
86
|
-
d(
|
|
85
|
+
g("div", Nt, [
|
|
86
|
+
d(J, null, {
|
|
87
87
|
default: T(() => [
|
|
88
|
-
b.value ? (m(), w("div",
|
|
88
|
+
b.value ? (m(), w("div", Bt, N(a(s)("menu.category.selector.title", { label: b.value })), 1)) : M("", !0),
|
|
89
89
|
d(H, {
|
|
90
90
|
color: "neutral-gray-400",
|
|
91
91
|
name: "expand_more",
|
|
@@ -101,7 +101,7 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
|
|
|
101
101
|
outline: "",
|
|
102
102
|
color: "neutral-gray-400",
|
|
103
103
|
size: "sm",
|
|
104
|
-
onClick:
|
|
104
|
+
onClick: O[0] || (O[0] = fe(() => {
|
|
105
105
|
}, ["prevent"]))
|
|
106
106
|
})
|
|
107
107
|
])) : M("", !0)
|
|
@@ -115,7 +115,7 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
|
|
|
115
115
|
d(ne, {
|
|
116
116
|
autofocus: "",
|
|
117
117
|
modelValue: y.value,
|
|
118
|
-
"onUpdate:modelValue":
|
|
118
|
+
"onUpdate:modelValue": O[1] || (O[1] = (R) => y.value = R),
|
|
119
119
|
placeholder: a(s)("menu.common.actions.search")
|
|
120
120
|
}, null, 8, ["modelValue", "placeholder"])
|
|
121
121
|
]),
|
|
@@ -123,7 +123,7 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
|
|
|
123
123
|
d(Q, {
|
|
124
124
|
label: "All",
|
|
125
125
|
"has-checkbox": "",
|
|
126
|
-
"model-value": a(
|
|
126
|
+
"model-value": a(z),
|
|
127
127
|
indeterminate: a(oe),
|
|
128
128
|
onClick: a(Y)
|
|
129
129
|
}, null, 8, ["model-value", "indeterminate", "onClick"]),
|
|
@@ -133,7 +133,7 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
|
|
|
133
133
|
key: R.value || "",
|
|
134
134
|
label: R.label,
|
|
135
135
|
"has-checkbox": "",
|
|
136
|
-
"model-value": a(
|
|
136
|
+
"model-value": a(z) || (($ = S.value) == null ? void 0 : $.includes(R.value)),
|
|
137
137
|
onClick: (P) => a(V)(R.value)
|
|
138
138
|
}, null, 8, ["label", "model-value", "onClick"]);
|
|
139
139
|
}), 128))
|
|
@@ -146,10 +146,10 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
|
|
|
146
146
|
}), Lt = { class: "flex flex-wrap gap-8" }, qt = { class: "py-12 px-16 space-y-12" }, Wt = { class: "fm-typo-en-body-md-600 text-fm-color-neutral-gray-600" }, Ht = { class: "flex flex-wrap gap-8" }, Qt = {
|
|
147
147
|
key: 0,
|
|
148
148
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
149
|
-
}, Yt = { key: 0 },
|
|
149
|
+
}, Yt = { key: 0 }, Zt = {
|
|
150
150
|
key: 1,
|
|
151
151
|
class: "inline-block w-8"
|
|
152
|
-
},
|
|
152
|
+
}, Jt = { key: 0 }, Xt = { key: 1 }, Qe = /* @__PURE__ */ B({
|
|
153
153
|
__name: "CategoriesChip",
|
|
154
154
|
props: {
|
|
155
155
|
categories: { default: () => [] },
|
|
@@ -167,15 +167,15 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
|
|
|
167
167
|
const y = j("FmTooltip");
|
|
168
168
|
return t.value ? (m(), w(pe, { key: 1 }, [
|
|
169
169
|
s.categories.length > 0 ? (m(), w("p", Qt, [
|
|
170
|
-
g("span", null,
|
|
171
|
-
g("span", null,
|
|
172
|
-
v.value ? (m(), w("span",
|
|
170
|
+
g("span", null, N(a(i)("menu.product.table.columns.category")) + ": ", 1),
|
|
171
|
+
g("span", null, N(f.value), 1),
|
|
172
|
+
v.value ? (m(), w("span", Zt)) : (m(), w("br", Yt)),
|
|
173
173
|
s.categories.length > u.value ? (m(), w("span", {
|
|
174
174
|
key: 2,
|
|
175
175
|
class: "fm-typo-en-body-md-400 text-fm-color-primary cursor-pointer",
|
|
176
176
|
onClick: b[0] || (b[0] = fe((S) => v.value = !v.value, ["stop", "prevent"]))
|
|
177
177
|
}, [
|
|
178
|
-
v.value ? (m(), w("span",
|
|
178
|
+
v.value ? (m(), w("span", Jt, N(a(i)("menu.product.table.category.expand", { count: s.categories.length - u.value })), 1)) : (m(), w("span", Xt, N(a(i)("menu.product.table.category.collapse")), 1))
|
|
179
179
|
])) : M("", !0)
|
|
180
180
|
])) : M("", !0)
|
|
181
181
|
], 64)) : (m(), I(y, {
|
|
@@ -187,7 +187,7 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
|
|
|
187
187
|
}, {
|
|
188
188
|
content: T(() => [
|
|
189
189
|
g("div", qt, [
|
|
190
|
-
g("p", Wt,
|
|
190
|
+
g("p", Wt, N(a(i)("menu.product.table.category.all")), 1),
|
|
191
191
|
g("div", Ht, [
|
|
192
192
|
(m(!0), w(pe, null, we(e.categories, (S) => (m(), I(ke, {
|
|
193
193
|
key: S,
|
|
@@ -215,9 +215,9 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
|
|
|
215
215
|
}));
|
|
216
216
|
};
|
|
217
217
|
}
|
|
218
|
-
}), el = /* @__PURE__ */
|
|
218
|
+
}), el = /* @__PURE__ */ B({
|
|
219
219
|
__name: "ProductSearcher",
|
|
220
|
-
props: /* @__PURE__ */
|
|
220
|
+
props: /* @__PURE__ */ Je({
|
|
221
221
|
label: {},
|
|
222
222
|
helperText: {},
|
|
223
223
|
menu: {}
|
|
@@ -248,9 +248,9 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
|
|
|
248
248
|
}), tl = { class: "flex" }, ll = { class: "w-[260px] space-y-16 h-full" }, al = { class: "flex items-center gap-4 px-8" }, ol = { class: "fm-typo-en-title-sm-600" }, rl = {
|
|
249
249
|
key: 0,
|
|
250
250
|
class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4"
|
|
251
|
-
}, nl = { class: "fm-typo-en-body-md-600" }, sl = { class: "flex-1" }, nt = /* @__PURE__ */
|
|
251
|
+
}, nl = { class: "fm-typo-en-body-md-600" }, sl = { class: "flex-1" }, nt = /* @__PURE__ */ B({
|
|
252
252
|
__name: "ViewLayout",
|
|
253
|
-
props: /* @__PURE__ */
|
|
253
|
+
props: /* @__PURE__ */ Je({
|
|
254
254
|
title: {},
|
|
255
255
|
titleBadge: {},
|
|
256
256
|
items: {}
|
|
@@ -266,12 +266,12 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
|
|
|
266
266
|
return m(), w("div", tl, [
|
|
267
267
|
g("div", ll, [
|
|
268
268
|
g("div", al, [
|
|
269
|
-
g("p", ol,
|
|
269
|
+
g("p", ol, N(i.title), 1),
|
|
270
270
|
i.titleBadge !== void 0 ? (m(), w("div", rl, [
|
|
271
|
-
g("p", nl,
|
|
271
|
+
g("p", nl, N(i.titleBadge), 1)
|
|
272
272
|
])) : M("", !0)
|
|
273
273
|
]),
|
|
274
|
-
d(
|
|
274
|
+
d(Oe, null, {
|
|
275
275
|
default: T(() => [
|
|
276
276
|
d(t, {
|
|
277
277
|
modelValue: e.value,
|
|
@@ -289,7 +289,7 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
|
|
|
289
289
|
]);
|
|
290
290
|
};
|
|
291
291
|
}
|
|
292
|
-
}), Ve = /* @__PURE__ */
|
|
292
|
+
}), Ve = /* @__PURE__ */ B({
|
|
293
293
|
__name: "OrderFromChip",
|
|
294
294
|
props: {
|
|
295
295
|
orderFrom: {}
|
|
@@ -304,7 +304,7 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
|
|
|
304
304
|
}, null, 8, ["label", "variant"]);
|
|
305
305
|
};
|
|
306
306
|
}
|
|
307
|
-
}), ul = /* @__PURE__ */
|
|
307
|
+
}), ul = /* @__PURE__ */ B({
|
|
308
308
|
__name: "GroupViewTable",
|
|
309
309
|
props: {
|
|
310
310
|
data: {}
|
|
@@ -372,7 +372,7 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
|
|
|
372
372
|
u();
|
|
373
373
|
}), (l, v) => {
|
|
374
374
|
const f = j("FmTable");
|
|
375
|
-
return m(), I(
|
|
375
|
+
return m(), I(Oe, null, {
|
|
376
376
|
default: T(() => [d(f, {
|
|
377
377
|
"column-defs": i,
|
|
378
378
|
"row-data": l.data,
|
|
@@ -387,7 +387,7 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
|
|
|
387
387
|
});
|
|
388
388
|
};
|
|
389
389
|
}
|
|
390
|
-
}), il = /* @__PURE__ */
|
|
390
|
+
}), il = /* @__PURE__ */ B({
|
|
391
391
|
__name: "GroupView",
|
|
392
392
|
props: {
|
|
393
393
|
itemId: {},
|
|
@@ -434,7 +434,7 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
|
|
|
434
434
|
b.badge = () => d(te.FmCircularProgress, {
|
|
435
435
|
size: "md"
|
|
436
436
|
}, null);
|
|
437
|
-
const y = await
|
|
437
|
+
const y = await kt(Re(e.menu), s, e.itemId);
|
|
438
438
|
b.badge = y.length, b.disabled = y.length <= 0, b.itemInGroup = y;
|
|
439
439
|
}
|
|
440
440
|
}
|
|
@@ -462,7 +462,7 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
|
|
|
462
462
|
}
|
|
463
463
|
}), cl = {
|
|
464
464
|
class: "scroll-x-auto"
|
|
465
|
-
}, dl = /* @__PURE__ */
|
|
465
|
+
}, dl = /* @__PURE__ */ B({
|
|
466
466
|
__name: "ProductViewTable",
|
|
467
467
|
props: {
|
|
468
468
|
itemId: {},
|
|
@@ -522,7 +522,7 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
|
|
|
522
522
|
var l;
|
|
523
523
|
return t(u, ((l = e.menu.modules.scheduler.find((v) => v._id === u)) == null ? void 0 : l.name) || "Unknown");
|
|
524
524
|
})], n.value.forEach(async (u) => {
|
|
525
|
-
const v = (await
|
|
525
|
+
const v = (await wt(Re(e.menu), e.catalogId, u.schedulerId)).modules.item.find((s) => s._id === e.itemId), f = n.value.findIndex((s) => s.schedulerId === u.schedulerId);
|
|
526
526
|
if (v) {
|
|
527
527
|
const s = Re(n.value);
|
|
528
528
|
s[f].loading = !1, s[f].code = v.code || "--", s[f].productName = v.name || "--", s[f].price = me.Dinero.fromFdoDinero(v.price).toFormat(), s[f].orderFrom = v.orderFrom || "--", n.value = s;
|
|
@@ -530,7 +530,7 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
|
|
|
530
530
|
});
|
|
531
531
|
}), (u, l) => {
|
|
532
532
|
const v = j("FmTable");
|
|
533
|
-
return m(), I(
|
|
533
|
+
return m(), I(Oe, null, {
|
|
534
534
|
default: T(() => [g("div", cl, [d(v, {
|
|
535
535
|
class: "min-w-[800px]",
|
|
536
536
|
"column-defs": i,
|
|
@@ -543,7 +543,7 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
|
|
|
543
543
|
});
|
|
544
544
|
};
|
|
545
545
|
}
|
|
546
|
-
}), ml = /* @__PURE__ */
|
|
546
|
+
}), ml = /* @__PURE__ */ B({
|
|
547
547
|
__name: "ProductView",
|
|
548
548
|
props: {
|
|
549
549
|
itemId: {},
|
|
@@ -552,7 +552,7 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
|
|
|
552
552
|
setup(k) {
|
|
553
553
|
const e = k, i = F(null);
|
|
554
554
|
tt(async () => {
|
|
555
|
-
i.value = await
|
|
555
|
+
i.value = await St(e.menu, e.itemId), await Ae(), n.value = t.value[0].value;
|
|
556
556
|
});
|
|
557
557
|
const n = F(""), t = x(() => {
|
|
558
558
|
var f, s;
|
|
@@ -602,7 +602,7 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
|
|
|
602
602
|
}), pl = { class: "flex items-center gap-8" }, vl = { class: "space-y-4" }, fl = { class: "fm-typo-en-title-md-600" }, gl = { key: 0 }, bl = { class: "text-fm-color-typo-secondary" }, _l = {
|
|
603
603
|
key: 0,
|
|
604
604
|
class: "text-fm-color-typo-secondary"
|
|
605
|
-
}, yl = { class: "flex items-center gap-4" }, hl = /* @__PURE__ */
|
|
605
|
+
}, yl = { class: "flex items-center gap-4" }, hl = /* @__PURE__ */ B({
|
|
606
606
|
__name: "ProductBaseInfo",
|
|
607
607
|
props: {
|
|
608
608
|
itemId: {},
|
|
@@ -624,10 +624,10 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
|
|
|
624
624
|
}, null, 8, ["alt", "src"]),
|
|
625
625
|
g("div", vl, [
|
|
626
626
|
g("p", fl, [
|
|
627
|
-
(f = i.value) != null && f.code ? (m(), w("span", gl,
|
|
628
|
-
g("span", null,
|
|
627
|
+
(f = i.value) != null && f.code ? (m(), w("span", gl, N((s = i.value) == null ? void 0 : s.code) + ", ", 1)) : M("", !0),
|
|
628
|
+
g("span", null, N((b = i.value) == null ? void 0 : b.name), 1)
|
|
629
629
|
]),
|
|
630
|
-
g("p", bl, "Base price: " +
|
|
630
|
+
g("p", bl, "Base price: " + N(n.value), 1),
|
|
631
631
|
(y = i.value) != null && y.customAttributes ? (m(), w("div", _l, [
|
|
632
632
|
g("div", yl, [
|
|
633
633
|
u[0] || (u[0] = g("span", null, "Tagging:", -1)),
|
|
@@ -641,7 +641,7 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
|
|
|
641
641
|
]);
|
|
642
642
|
};
|
|
643
643
|
}
|
|
644
|
-
}), xl = { class: "space-y-16" }, Cl = /* @__PURE__ */
|
|
644
|
+
}), xl = { class: "space-y-16" }, Cl = /* @__PURE__ */ B({
|
|
645
645
|
__name: "ProductViewer",
|
|
646
646
|
props: {
|
|
647
647
|
itemId: {},
|
|
@@ -684,7 +684,7 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
|
|
|
684
684
|
]);
|
|
685
685
|
};
|
|
686
686
|
}
|
|
687
|
-
}), kl = { class: "space-y-24" }, wl = { key: 0 }, Sl = /* @__PURE__ */
|
|
687
|
+
}), kl = { class: "space-y-24" }, wl = { key: 0 }, Sl = /* @__PURE__ */ B({
|
|
688
688
|
__name: "ProductOverview",
|
|
689
689
|
props: {
|
|
690
690
|
itemId: {},
|
|
@@ -714,7 +714,7 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
|
|
|
714
714
|
])
|
|
715
715
|
]));
|
|
716
716
|
}
|
|
717
|
-
}), Vl = /* @__PURE__ */
|
|
717
|
+
}), Vl = /* @__PURE__ */ B({
|
|
718
718
|
__name: "OverviewSheet",
|
|
719
719
|
setup(k) {
|
|
720
720
|
const e = F(null), i = F(!1);
|
|
@@ -750,14 +750,14 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
|
|
|
750
750
|
}
|
|
751
751
|
});
|
|
752
752
|
var Fl = Mt();
|
|
753
|
-
const Ye = /* @__PURE__ */
|
|
753
|
+
const Ye = /* @__PURE__ */ B({
|
|
754
754
|
__name: "ImportButton",
|
|
755
755
|
setup(k) {
|
|
756
756
|
const e = F(!1);
|
|
757
757
|
function i() {
|
|
758
758
|
e.value = !e.value;
|
|
759
759
|
}
|
|
760
|
-
const n =
|
|
760
|
+
const n = ze();
|
|
761
761
|
return at(() => {
|
|
762
762
|
const t = n.currentCountry.value;
|
|
763
763
|
if (t)
|
|
@@ -774,7 +774,7 @@ const Ye = /* @__PURE__ */ N({
|
|
|
774
774
|
_e(t.$slots, "default", { trigger: i })
|
|
775
775
|
], 64));
|
|
776
776
|
}
|
|
777
|
-
}),
|
|
777
|
+
}), Ze = (k) => d("div", {
|
|
778
778
|
class: "flex flex-1 justify-end"
|
|
779
779
|
}, [d("span", null, [k, et(" ")])]), Il = {
|
|
780
780
|
class: "flex justify-between items-center space-x-8"
|
|
@@ -795,20 +795,20 @@ const Ye = /* @__PURE__ */ N({
|
|
|
795
795
|
}, Ul = {
|
|
796
796
|
key: 1,
|
|
797
797
|
class: "px-16 py-4 space-x-8 flex justify-end"
|
|
798
|
-
}, Ol = {
|
|
799
|
-
key: 2
|
|
800
798
|
}, zl = {
|
|
799
|
+
key: 2
|
|
800
|
+
}, Ol = {
|
|
801
801
|
class: "flex space-x-8"
|
|
802
802
|
}, Dl = {
|
|
803
803
|
key: 1,
|
|
804
804
|
class: "pt-8 flex flex-col flex-1 overflow-hidden"
|
|
805
805
|
}, jl = {
|
|
806
806
|
class: "space-y-8 pb-8"
|
|
807
|
-
}, Bl = {
|
|
808
|
-
class: "w-full px-8"
|
|
809
807
|
}, Kl = {
|
|
810
|
-
class: "
|
|
808
|
+
class: "w-full px-8"
|
|
811
809
|
}, Nl = {
|
|
810
|
+
class: "flex space-x-8 px-8"
|
|
811
|
+
}, Bl = {
|
|
812
812
|
key: 0,
|
|
813
813
|
class: "px-8"
|
|
814
814
|
}, El = {
|
|
@@ -826,13 +826,13 @@ const Ye = /* @__PURE__ */ N({
|
|
|
826
826
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
827
827
|
}, Yl = {
|
|
828
828
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
829
|
-
}, Jl = {
|
|
830
|
-
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
831
829
|
}, Zl = {
|
|
830
|
+
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
831
|
+
}, Jl = {
|
|
832
832
|
key: 1
|
|
833
833
|
}, Xl = {
|
|
834
834
|
class: "flex space-x-8"
|
|
835
|
-
}, ea = /* @__PURE__ */
|
|
835
|
+
}, ea = /* @__PURE__ */ B({
|
|
836
836
|
__name: "ProductTable",
|
|
837
837
|
props: {
|
|
838
838
|
modelValue: {},
|
|
@@ -848,9 +848,9 @@ const Ye = /* @__PURE__ */ N({
|
|
|
848
848
|
}) {
|
|
849
849
|
const n = k, {
|
|
850
850
|
t
|
|
851
|
-
} = Ie(), u =
|
|
851
|
+
} = Ie(), u = ze(), l = Fe(), v = $t(), f = ot(), s = u.currentCountry, b = x(() => s.value ? me.Country.getCountry(s.value) : null), y = x(() => l.rules.item), {
|
|
852
852
|
selectedCategories: S
|
|
853
|
-
} = Se(),
|
|
853
|
+
} = Se(), z = x(() => {
|
|
854
854
|
const o = ge.flatten(S.value.map((r) => r.items));
|
|
855
855
|
return ge.uniqBy(o, (r) => r._id);
|
|
856
856
|
}), Y = i, V = F(!1);
|
|
@@ -858,27 +858,27 @@ const Ye = /* @__PURE__ */ N({
|
|
|
858
858
|
Y("update:editing", o);
|
|
859
859
|
});
|
|
860
860
|
const oe = (o) => {
|
|
861
|
-
|
|
862
|
-
},
|
|
861
|
+
zt.isBoolean(o) ? V.value = o : V.value = !V.value;
|
|
862
|
+
}, Z = F(!1), re = F(null);
|
|
863
863
|
async function L() {
|
|
864
|
-
|
|
864
|
+
Z.value = !Z.value, Z.value && (await Ae(), re.value && re.value.toggleProperty(!0));
|
|
865
865
|
}
|
|
866
866
|
e({
|
|
867
867
|
toggleAttributeFilter: L
|
|
868
868
|
});
|
|
869
869
|
const {
|
|
870
|
-
attributes:
|
|
871
|
-
filterRule:
|
|
870
|
+
attributes: K,
|
|
871
|
+
filterRule: O,
|
|
872
872
|
mongoQuery: H
|
|
873
873
|
} = xt({
|
|
874
|
-
valueSource:
|
|
874
|
+
valueSource: z,
|
|
875
875
|
entity: "item"
|
|
876
|
-
}),
|
|
876
|
+
}), J = F(""), ne = Pt(J, 300), Q = x(() => {
|
|
877
877
|
const o = (c) => {
|
|
878
878
|
var h;
|
|
879
879
|
return !ne.value || !ne.value.trim() ? !0 : [c.code, c.name, je(c), ...Pe(se.value, c), (h = Ce()[c.orderFrom]) == null ? void 0 : h.label, Object.values(c.customAttributes ?? {}).join(" ")].join(" ").toLowerCase().includes(ne.value.toLowerCase());
|
|
880
|
-
}, r = (c) => H.value ?
|
|
881
|
-
return
|
|
880
|
+
}, r = (c) => H.value ? It(c.customAttributes, H.value) : !0;
|
|
881
|
+
return z.value.filter((c) => o(c) && r(c));
|
|
882
882
|
}), {
|
|
883
883
|
categories: se
|
|
884
884
|
} = Se(), R = x(() => l.categories.map((o) => ({
|
|
@@ -969,7 +969,7 @@ const Ye = /* @__PURE__ */ N({
|
|
|
969
969
|
accessorKey: "price",
|
|
970
970
|
header: () => {
|
|
971
971
|
var o;
|
|
972
|
-
return
|
|
972
|
+
return Ze(t("menu.product.table.columns.price", {
|
|
973
973
|
currency: (o = b.value) == null ? void 0 : o.currency.symbol
|
|
974
974
|
}));
|
|
975
975
|
},
|
|
@@ -987,7 +987,7 @@ const Ye = /* @__PURE__ */ N({
|
|
|
987
987
|
min: 0,
|
|
988
988
|
disabled: !c.editPrice,
|
|
989
989
|
// @ts-ignore
|
|
990
|
-
placeholder: p ?
|
|
990
|
+
placeholder: p ? Ot(p, !1) : void 0,
|
|
991
991
|
modelValue: P(c._id, "price") ?? ((h = Te(c._id)) == null ? void 0 : h.price),
|
|
992
992
|
// @ts-ignore
|
|
993
993
|
"onUpdate:modelValue": (C) => {
|
|
@@ -998,7 +998,7 @@ const Ye = /* @__PURE__ */ N({
|
|
|
998
998
|
}
|
|
999
999
|
}, {
|
|
1000
1000
|
accessorKey: "taxes",
|
|
1001
|
-
header: () =>
|
|
1001
|
+
header: () => Ze(G.value.systemCode),
|
|
1002
1002
|
size: V.value ? 120 : 80,
|
|
1003
1003
|
enableSorting: !1,
|
|
1004
1004
|
meta: {
|
|
@@ -1031,7 +1031,7 @@ const Ye = /* @__PURE__ */ N({
|
|
|
1031
1031
|
categories: Pe(se.value, r)
|
|
1032
1032
|
});
|
|
1033
1033
|
const c = yt(n.originalValue, n.modelValue, r._id) ?? ht(r), p = (c == null ? void 0 : c.map((C) => C._id)) ?? [], h = c == null ? void 0 : c.reduce((C, _) => (C[_._id] = _, C), {});
|
|
1034
|
-
return D(
|
|
1034
|
+
return D(Ft, {
|
|
1035
1035
|
shouldShowChips: !1,
|
|
1036
1036
|
shouldShowSelectedItemsWithinPlaceholder: !0,
|
|
1037
1037
|
modelValue: p.length > 0 ? p : [null],
|
|
@@ -1042,8 +1042,8 @@ const Ye = /* @__PURE__ */ N({
|
|
|
1042
1042
|
A(r._id, {
|
|
1043
1043
|
category: _,
|
|
1044
1044
|
additionalCategories: ae.map((xe) => {
|
|
1045
|
-
const
|
|
1046
|
-
return
|
|
1045
|
+
const Ne = h == null ? void 0 : h[xe];
|
|
1046
|
+
return Ne || {
|
|
1047
1047
|
_id: xe,
|
|
1048
1048
|
position: null
|
|
1049
1049
|
};
|
|
@@ -1141,7 +1141,7 @@ const Ye = /* @__PURE__ */ N({
|
|
|
1141
1141
|
const p = o[0][c], h = Q.value[parseInt(c)];
|
|
1142
1142
|
h && (p ? r.push(h) : X.value = r.filter((C) => C !== h));
|
|
1143
1143
|
}), X.value = r;
|
|
1144
|
-
}), de(() =>
|
|
1144
|
+
}), de(() => z.value, () => {
|
|
1145
1145
|
le.value = {}, X.value = [];
|
|
1146
1146
|
}), de(() => V.value, () => {
|
|
1147
1147
|
le.value = {}, X.value = [];
|
|
@@ -1224,9 +1224,9 @@ const Ye = /* @__PURE__ */ N({
|
|
|
1224
1224
|
if (r && c) {
|
|
1225
1225
|
const h = r.override.scheduler[c] ?? {}, C = (p = h == null ? void 0 : h.items) == null ? void 0 : p.filter((_) => _._id === o);
|
|
1226
1226
|
return C == null ? void 0 : C[0];
|
|
1227
|
-
} else return r ? r.override.items[o][0] : c ? l.schedulers.find((_) => _._id === c).items.filter((_) => _._id === o)[0] :
|
|
1227
|
+
} else return r ? r.override.items[o][0] : c ? l.schedulers.find((_) => _._id === c).items.filter((_) => _._id === o)[0] : z.value.find((h) => h._id === o);
|
|
1228
1228
|
}
|
|
1229
|
-
const dt = rt(), mt = x(() => dt.breakpoints.value.xs),
|
|
1229
|
+
const dt = rt(), mt = x(() => dt.breakpoints.value.xs), Ke = F(null), pt = At(Ke, Z), vt = x(() => {
|
|
1230
1230
|
var r;
|
|
1231
1231
|
return {
|
|
1232
1232
|
height: `calc(100vh - ${((r = pt.value) == null ? void 0 : r.top) + 24}px)`
|
|
@@ -1234,20 +1234,20 @@ const Ye = /* @__PURE__ */ N({
|
|
|
1234
1234
|
});
|
|
1235
1235
|
return (o, r) => {
|
|
1236
1236
|
const c = j("fm-search"), p = j("fm-button"), h = j("fm-table"), C = j("fm-form");
|
|
1237
|
-
return mt.value ? (m(), w("div", Dl, [g("div", jl, [g("div",
|
|
1238
|
-
"model-value":
|
|
1239
|
-
"onUpdate:modelValue": r[5] || (r[5] = (_) =>
|
|
1237
|
+
return mt.value ? (m(), w("div", Dl, [g("div", jl, [g("div", Kl, [d(c, {
|
|
1238
|
+
"model-value": J.value,
|
|
1239
|
+
"onUpdate:modelValue": r[5] || (r[5] = (_) => J.value = _),
|
|
1240
1240
|
autofocus: "",
|
|
1241
1241
|
placeholder: a(t)("menu.product.table.search.placeholder")
|
|
1242
1242
|
}, null, 8, ["model-value", "placeholder"])]), r[8] || (r[8] = g("div", {
|
|
1243
1243
|
class: "w-full h-[1px] bg-fm-color-neutral-gray-100"
|
|
1244
|
-
}, null, -1)), g("div",
|
|
1244
|
+
}, null, -1)), g("div", Nl, [_e(o.$slots, "filter")]), Z.value ? (m(), w("div", Bl, [d(a(We), {
|
|
1245
1245
|
ref_key: "attributeFilterRef",
|
|
1246
1246
|
ref: re,
|
|
1247
|
-
attributes: a(
|
|
1248
|
-
modelValue: a(
|
|
1249
|
-
"onUpdate:modelValue": r[6] || (r[6] = (_) =>
|
|
1250
|
-
}, null, 8, ["attributes", "modelValue"])])) : M("", !0)]),
|
|
1247
|
+
attributes: a(K),
|
|
1248
|
+
modelValue: a(O),
|
|
1249
|
+
"onUpdate:modelValue": r[6] || (r[6] = (_) => Be(O) ? O.value = _ : null)
|
|
1250
|
+
}, null, 8, ["attributes", "modelValue"])])) : M("", !0)]), z.value.length ? (m(), w("div", El, [(m(!0), w(pe, null, we(Q.value, (_) => {
|
|
1251
1251
|
var ae;
|
|
1252
1252
|
return m(), w("div", {
|
|
1253
1253
|
key: _._id,
|
|
@@ -1257,9 +1257,9 @@ const Ye = /* @__PURE__ */ N({
|
|
|
1257
1257
|
alt: _.name,
|
|
1258
1258
|
size: 72,
|
|
1259
1259
|
src: _.thumbnail
|
|
1260
|
-
}, null, 8, ["alt", "src"]), g("div", ql, [g("div", Wl, [g("p", Hl,
|
|
1260
|
+
}, null, 8, ["alt", "src"]), g("div", ql, [g("div", Wl, [g("p", Hl, N(_.name), 1), d(Ve, {
|
|
1261
1261
|
"order-from": _.orderFrom
|
|
1262
|
-
}, null, 8, ["order-from"])]), g("p", Ql,
|
|
1262
|
+
}, null, 8, ["order-from"])]), g("p", Ql, N(je(_)), 1), g("p", Yl, N(a(t)("menu.product.table.columns.code")) + ": " + N(((ae = Te(_._id)) == null ? void 0 : ae.code) || "--"), 1), g("p", Zl, [d(Qe, {
|
|
1263
1263
|
categories: a(Pe)(a(se), _)
|
|
1264
1264
|
}, null, 8, ["categories"])]), d(Me, {
|
|
1265
1265
|
"custom-attributes": _.customAttributes
|
|
@@ -1273,7 +1273,7 @@ const Ye = /* @__PURE__ */ N({
|
|
|
1273
1273
|
thumbnail: _.thumbnail
|
|
1274
1274
|
}]), ["stop"])
|
|
1275
1275
|
}, null, 8, ["text-color", "variant", "onClick"])], 8, Gl);
|
|
1276
|
-
}), 128))])) : (m(), w("div",
|
|
1276
|
+
}), 128))])) : (m(), w("div", Jl, [d(be, {
|
|
1277
1277
|
subtitle: a(t)("menu.product.table.empty.subtitle"),
|
|
1278
1278
|
title: a(t)("menu.product.table.empty.title")
|
|
1279
1279
|
}, {
|
|
@@ -1303,17 +1303,17 @@ const Ye = /* @__PURE__ */ N({
|
|
|
1303
1303
|
onValidationSuccess: De
|
|
1304
1304
|
}, {
|
|
1305
1305
|
default: T(() => [g("div", Il, [g("div", $l, [_e(o.$slots, "filter")]), g("div", Tl, [d(c, {
|
|
1306
|
-
"model-value":
|
|
1307
|
-
"onUpdate:modelValue": r[0] || (r[0] = (_) =>
|
|
1306
|
+
"model-value": J.value,
|
|
1307
|
+
"onUpdate:modelValue": r[0] || (r[0] = (_) => J.value = _),
|
|
1308
1308
|
autofocus: "",
|
|
1309
1309
|
placeholder: a(t)("menu.product.table.search.placeholder")
|
|
1310
|
-
}, null, 8, ["model-value", "placeholder"])])]),
|
|
1310
|
+
}, null, 8, ["model-value", "placeholder"])])]), Z.value ? (m(), w("div", Pl, [d(a(We), {
|
|
1311
1311
|
ref_key: "attributeFilterRef",
|
|
1312
1312
|
ref: re,
|
|
1313
|
-
attributes: a(
|
|
1314
|
-
modelValue: a(
|
|
1315
|
-
"onUpdate:modelValue": r[1] || (r[1] = (_) =>
|
|
1316
|
-
}, null, 8, ["attributes", "modelValue"])])) : M("", !0),
|
|
1313
|
+
attributes: a(K),
|
|
1314
|
+
modelValue: a(O),
|
|
1315
|
+
"onUpdate:modelValue": r[1] || (r[1] = (_) => Be(O) ? O.value = _ : null)
|
|
1316
|
+
}, null, 8, ["attributes", "modelValue"])])) : M("", !0), z.value.length ? (m(), w("div", Al, [X.value.length && !V.value ? (m(), w("div", Rl, [g("p", Ml, N(a(t)("menu.product.table.selection.count", {
|
|
1317
1317
|
count: X.value.length
|
|
1318
1318
|
})), 1), d(p, {
|
|
1319
1319
|
label: a(t)("menu.product.table.selection.actions.deselect_all"),
|
|
@@ -1344,8 +1344,8 @@ const Ye = /* @__PURE__ */ N({
|
|
|
1344
1344
|
type: "submit"
|
|
1345
1345
|
}, null, 8, ["borderColor", "textColor", "variant", "label"])])) : M("", !0), g("div", {
|
|
1346
1346
|
ref_key: "tableWrapper",
|
|
1347
|
-
ref:
|
|
1348
|
-
}, [(m(), I(lt(V.value ?
|
|
1347
|
+
ref: Ke
|
|
1348
|
+
}, [(m(), I(lt(V.value ? Tt : "div"), {
|
|
1349
1349
|
ref: "fullWrapper",
|
|
1350
1350
|
title: V.value ? a(t)("menu.product.table.bulk_edit.title") : "",
|
|
1351
1351
|
show: V.value,
|
|
@@ -1385,11 +1385,11 @@ const Ye = /* @__PURE__ */ N({
|
|
|
1385
1385
|
onRowClick: r[3] || (r[3] = (_) => V.value ? void 0 : ct(_))
|
|
1386
1386
|
}, null, 8, ["class", "modelValue", "column-defs", "column-visibility", "loading", "page-size", "row-data", "selection", "virtual-row-height"])]),
|
|
1387
1387
|
_: 1
|
|
1388
|
-
}, 40, ["title", "show", "primary-action", "secondary-actions", "style"]))], 512)])) : (m(), w("div",
|
|
1388
|
+
}, 40, ["title", "show", "primary-action", "secondary-actions", "style"]))], 512)])) : (m(), w("div", zl, [d(be, {
|
|
1389
1389
|
subtitle: a(t)("menu.product.table.empty.subtitle"),
|
|
1390
1390
|
title: a(t)("menu.product.table.empty.title")
|
|
1391
1391
|
}, {
|
|
1392
|
-
action: T(() => [g("div",
|
|
1392
|
+
action: T(() => [g("div", Ol, [d(p, {
|
|
1393
1393
|
variant: a(ee).Primary,
|
|
1394
1394
|
label: a(t)("menu.product.table.empty.actions.add"),
|
|
1395
1395
|
"prepend-icon": "add",
|
|
@@ -1421,7 +1421,7 @@ const Ye = /* @__PURE__ */ N({
|
|
|
1421
1421
|
}, aa = { class: "flex flex-col flex-1 overflow-hidden" }, oa = {
|
|
1422
1422
|
key: 1,
|
|
1423
1423
|
class: "pt-16 xs:pt-8 space-y-24"
|
|
1424
|
-
}, ra = { class: "flex items-center gap-8 px-16" }, Fa = /* @__PURE__ */
|
|
1424
|
+
}, ra = { class: "flex items-center gap-8 px-16" }, Fa = /* @__PURE__ */ B({
|
|
1425
1425
|
__name: "Product",
|
|
1426
1426
|
setup(k) {
|
|
1427
1427
|
const e = Fe(), i = x(() => e.rules.item), n = ot(), t = x(() => !e.state.currentCatalogId), u = x(() => e.rules.item), l = x(() => !e.state.currentSchedulerId), v = F(!1), f = F(!1), s = x(() => {
|
|
@@ -1438,7 +1438,7 @@ const Ye = /* @__PURE__ */ N({
|
|
|
1438
1438
|
}), b = F({}), y = F({}), S = async () => {
|
|
1439
1439
|
var ue, q;
|
|
1440
1440
|
f.value = !0;
|
|
1441
|
-
const R = !!s.value, $ = ge.flatten(Y.value.map((E) => E.items)), P = R && v.value ? await
|
|
1441
|
+
const R = !!s.value, $ = ge.flatten(Y.value.map((E) => E.items)), P = R && v.value ? await Vt(
|
|
1442
1442
|
e.mergedMenu,
|
|
1443
1443
|
$,
|
|
1444
1444
|
e.state.menu,
|
|
@@ -1466,32 +1466,32 @@ const Ye = /* @__PURE__ */ N({
|
|
|
1466
1466
|
}, E;
|
|
1467
1467
|
}, {});
|
|
1468
1468
|
b.value = A, y.value = { ...A }, f.value = !1;
|
|
1469
|
-
}, { categories:
|
|
1469
|
+
}, { categories: z, selectedCategories: Y } = Se(), V = F(null);
|
|
1470
1470
|
function oe() {
|
|
1471
1471
|
V.value && V.value.toggleAttributeFilter();
|
|
1472
1472
|
}
|
|
1473
1473
|
tt(async () => {
|
|
1474
1474
|
Y.value && await S();
|
|
1475
1475
|
});
|
|
1476
|
-
function
|
|
1476
|
+
function Z() {
|
|
1477
1477
|
n.create(null);
|
|
1478
1478
|
}
|
|
1479
1479
|
const re = () => {
|
|
1480
1480
|
Y.value && S();
|
|
1481
|
-
}, { t: L } = Ie(),
|
|
1481
|
+
}, { t: L } = Ie(), K = x(() => {
|
|
1482
1482
|
var R, $;
|
|
1483
1483
|
return ($ = (R = e.currentCatalog) == null ? void 0 : R.linkItemRules) == null ? void 0 : $.length;
|
|
1484
1484
|
}), {
|
|
1485
|
-
menuItems:
|
|
1485
|
+
menuItems: O,
|
|
1486
1486
|
categories: H,
|
|
1487
|
-
linkItemRules:
|
|
1487
|
+
linkItemRules: J,
|
|
1488
1488
|
handleSubmit: ne,
|
|
1489
1489
|
catalogManager: Q,
|
|
1490
1490
|
schedulerManager: se
|
|
1491
|
-
} =
|
|
1491
|
+
} = Ct(!1);
|
|
1492
1492
|
return (R, $) => {
|
|
1493
1493
|
const P = j("fm-button");
|
|
1494
|
-
return a(
|
|
1494
|
+
return a(z).length ? (m(), w("div", ta, [
|
|
1495
1495
|
g("div", la, [
|
|
1496
1496
|
g("div", aa, [
|
|
1497
1497
|
a(Y) ? (m(), I(ea, {
|
|
@@ -1508,7 +1508,7 @@ const Ye = /* @__PURE__ */ N({
|
|
|
1508
1508
|
filter: T(() => [
|
|
1509
1509
|
d(He, { onToggleAttributeFilter: oe }),
|
|
1510
1510
|
u.value.multiScheduler ? (m(), I(qe, { key: 0 })) : M("", !0),
|
|
1511
|
-
|
|
1511
|
+
K.value ? (m(), I(Le, {
|
|
1512
1512
|
key: 1,
|
|
1513
1513
|
"current-restaurant-attr-params": a(e).state.currentRestaurantAttrParams,
|
|
1514
1514
|
onConfirm: $[0] || ($[0] = (A) => a(e).setRestaurantAttrParams(A))
|
|
@@ -1522,7 +1522,7 @@ const Ye = /* @__PURE__ */ N({
|
|
|
1522
1522
|
g("div", ra, [
|
|
1523
1523
|
d(He),
|
|
1524
1524
|
u.value.multiScheduler ? (m(), I(qe, { key: 0 })) : M("", !0),
|
|
1525
|
-
|
|
1525
|
+
K.value ? (m(), I(Le, {
|
|
1526
1526
|
key: 1,
|
|
1527
1527
|
"current-restaurant-attr-params": a(e).state.currentRestaurantAttrParams,
|
|
1528
1528
|
onConfirm: $[3] || ($[3] = (A) => a(e).setRestaurantAttrParams(A))
|
|
@@ -1532,7 +1532,7 @@ const Ye = /* @__PURE__ */ N({
|
|
|
1532
1532
|
key: 0,
|
|
1533
1533
|
action: {
|
|
1534
1534
|
text: a(L)("menu.product.empty.with_create.action"),
|
|
1535
|
-
callback:
|
|
1535
|
+
callback: Z
|
|
1536
1536
|
},
|
|
1537
1537
|
subtitle: a(L)("menu.product.empty.with_create.subtitle"),
|
|
1538
1538
|
title: a(L)("menu.product.empty.with_create.title")
|
|
@@ -1546,9 +1546,9 @@ const Ye = /* @__PURE__ */ N({
|
|
|
1546
1546
|
"categorized-items": a(Q).linkableItems.value,
|
|
1547
1547
|
"initial-value": a(Q).currentItems.value,
|
|
1548
1548
|
"show-variant": !1,
|
|
1549
|
-
"menu-items": a(
|
|
1549
|
+
"menu-items": a(O),
|
|
1550
1550
|
categories: a(H),
|
|
1551
|
-
"link-item-rules": a(
|
|
1551
|
+
"link-item-rules": a(J),
|
|
1552
1552
|
"no-scheduler": l.value,
|
|
1553
1553
|
"is-local-only": !0,
|
|
1554
1554
|
onSubmit: a(ne)
|
|
@@ -1574,9 +1574,9 @@ const Ye = /* @__PURE__ */ N({
|
|
|
1574
1574
|
"categorized-items": a(se).linkableItems.value,
|
|
1575
1575
|
"initial-value": a(se).currentItems.value,
|
|
1576
1576
|
"show-variant": !1,
|
|
1577
|
-
"menu-items": a(
|
|
1577
|
+
"menu-items": a(O),
|
|
1578
1578
|
categories: a(H),
|
|
1579
|
-
"link-item-rules": a(
|
|
1579
|
+
"link-item-rules": a(J),
|
|
1580
1580
|
"no-scheduler": l.value,
|
|
1581
1581
|
"is-local-only": !0,
|
|
1582
1582
|
onSubmit: a(ne)
|