@feedmepos/mf-menu 0.32.61-dev.3 → 0.32.63-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-TgWTfhbY.js → App-DhfTGlgM.js} +466 -461
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-BeW-aCRL.js → ApplyProduct.vue_vue_type_script_setup_true_lang-C5-8qdJK.js} +3 -3
- package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-C8il14gy.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-CXm-0H18.js} +8 -8
- package/dist/{Catalog-hnhpn9Of.js → Catalog-WuZJfM6l.js} +78 -78
- package/dist/{Category-DIubPG8Y.js → Category-BeIo7XWY.js} +20 -20
- package/dist/{Category-wXfspM5v.js → Category-D-cQQCPS.js} +19 -19
- package/dist/{CookingGuide-CR1cBZ3S.js → CookingGuide-B-yvD9ZA.js} +88 -88
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-DlpZfbx-.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-2_yzXoa4.js} +1 -1
- package/dist/{Group-DbG3cLfp.js → Group-13i5igrS.js} +5 -5
- package/dist/{Group-DTzbprcr.js → Group-CY8lUzQG.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-CMEdW613.js → Group.vue_vue_type_script_setup_true_lang-DZhxy0tb.js} +95 -94
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-aLcNgJLb.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CWqv-oUd.js} +13 -13
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CnChdePY.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-DTs4Vpdi.js} +219 -220
- package/dist/{Ingredient-BBGzGfS2.js → Ingredient-vrUOW6gk.js} +49 -49
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-B9CfZ7oA.js → InventoryBinding.vue_vue_type_script_setup_true_lang-xcVjRjqD.js} +2 -2
- package/dist/{LinkProductSideSheet-CLd4LEy4.js → LinkProductSideSheet-DMbJG6wf.js} +8 -8
- package/dist/{MenuSetting-BuS9_e0y.js → MenuSetting-Di2xwm00.js} +10 -10
- package/dist/{OrderPacing-2QPouAql.js → OrderPacing-CCe-IcGO.js} +28 -28
- package/dist/{PrintRoute-D-SiyoaP.js → PrintRoute-CcfObcHY.js} +27 -27
- package/dist/{Product-nmlc3rrr.js → Product-ChUVnMgG.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-DYn_bqcn.js → Product.vue_vue_type_script_setup_true_lang-C9Qp50hL.js} +153 -152
- package/dist/{ProductInternalTools-BgDSe1XP.js → ProductInternalTools-D9HXhgo5.js} +80 -79
- package/dist/{Products-BPa6wC-o.js → Products-Bly2ktEC.js} +82 -81
- package/dist/{Publish-DbI1wemN.js → Publish-C8ubb8Qf.js} +113 -113
- package/dist/{Recipe-CAgscHCL.js → Recipe-BpMRLsyO.js} +32 -32
- package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-DNG5WX4W.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-BD5OCDRn.js} +1 -1
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-DNk48PUl.js → RuleView.vue_vue_type_script_setup_true_lang-Ba3djmX1.js} +313 -312
- package/dist/{Scheduler-C8TXHcb2.js → Scheduler-CiB4b2Fn.js} +9 -9
- package/dist/{ServingSequence-CQzQWvUA.js → ServingSequence-BlcyW-dv.js} +18 -18
- package/dist/{Setting-gun4ZUQ4.js → Setting-DqkL6YYU.js} +31 -31
- package/dist/{Subcategory-CqcWpp94.js → Subcategory-B4Jg_wtT.js} +43 -43
- package/dist/{Takeaway-DV_ND3Ts.js → Takeaway-5G3f7jWT.js} +1 -1
- package/dist/{Takeaway-DsRU9wBO.js → Takeaway-5rFPYYNA.js} +16 -16
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-GMA7-Hrb.js → Takeaway.vue_vue_type_script_setup_true_lang-CVsOhg_E.js} +23 -23
- package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-DAwsbPs4.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-CPqxA6JD.js} +1 -1
- package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-DYVBVDBy.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-yrNuTD-3.js} +8 -9
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-T71R68sq.js +5836 -0
- package/dist/{Unit-BcPn6opY.js → Unit-CAkdmQLg.js} +2 -2
- package/dist/{Variant-Wkd9mHWk.js → Variant-BbLQqbAK.js} +13 -13
- package/dist/{_id_-CuOgqnZ3.js → _id_-Dzacr40I.js} +13 -13
- package/dist/{app-BsNMWUZ9.js → app-4yWs09Fr.js} +495 -495
- package/dist/{app-kS8tUq_w.js → app-Deov1985.js} +3 -3
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/api/media.d.ts +161 -0
- package/dist/apps/mf-menu/src/app.d.ts +340 -0
- package/dist/apps/mf-menu/src/components/feature/CategoryManager/CategoriesSelector.vue.d.ts +1 -1
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/productImages.d.ts +150 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/CustomDimensionDialog.vue.d.ts +17 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/ImageUploadDialog.vue.d.ts +16 -1
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/ManageImageDrawer.vue.d.ts +42 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/ProductImageField.vue.d.ts +75 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/RegenerateImageDialog.vue.d.ts +17 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/item/ProductDetail.vue.d.ts +3 -6
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +1 -1
- package/dist/apps/mf-menu/src/composable/remyImageTarget.d.ts +5 -0
- package/dist/apps/mf-menu/src/helper/menu.d.ts +14 -1
- package/dist/apps/mf-menu/src/stores/menu.d.ts +1 -0
- package/dist/apps/mf-menu/src/types/rule.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/Catalog/Edit/AddProductPopup/Form.vue.d.ts +3 -2
- package/dist/apps/mf-menu/src/views/Catalog/Edit/AddProductPopup/ProductDetail.vue.d.ts +8 -8
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-CHvHJGH9.js → linked-status-B2WLhKkV.js} +4 -4
- package/dist/assets/{menu-export-Bd2A9o3e.js → menu-export-Dcw5a_dN.js} +3 -3
- package/dist/assets/{override-menu-cifFGmrk.js → override-menu-cBe2aMY6.js} +4 -4
- package/dist/assets/{validate-menu-B8cp1kCt.js → validate-menu-BM-5GK85.js} +3 -3
- package/dist/{catalog-BxfmkFrE.js → catalog-DKygS2Cs.js} +6 -6
- package/dist/{catalogSetting-ebS4mr1i.js → catalogSetting-Bn2TplvM.js} +1 -1
- package/dist/currency-DXgNHtK8.js +7 -0
- package/dist/dayjs.min-DpX65tgj.js +7 -0
- package/dist/discardConfirm-DZwzKO-Q.js +3704 -0
- package/dist/{index-CUrfs4iN.js → index-B48KLyqg.js} +61 -61
- package/dist/{index-BxvnAb0l.js → index-BEocaqRK.js} +30 -30
- package/dist/index-K-MBqJJo.js +222 -0
- package/dist/{index.vue_vue_type_script_setup_true_lang-C3c2B-qJ.js → index.vue_vue_type_script_setup_true_lang-Nl505vPi.js} +44918 -51563
- package/dist/item-Da3ArD-G.js +13213 -0
- package/dist/{jszip.min-DccvCJln.js → jszip.min-Cc2eR4Cq.js} +52 -52
- package/dist/linkProducts-GNuUxFEE.js +331 -0
- package/dist/{memberPricing-FatZi_6k.js → memberPricing-T-jr7tn1.js} +1 -1
- package/dist/{menu-DcPMF0nf.js → menu-DSDRAil-.js} +1 -1
- package/dist/{menuV2-CVo-19H-.js → menuV2-fTlJdjxi.js} +89 -87
- package/dist/mf-menu.css +1 -1
- package/dist/{order_pacing-CWDYwJcW.js → order_pacing-Dgo1fySS.js} +17 -17
- package/dist/packages/shared/src/helpers/agentCode.d.ts +9 -0
- package/dist/{priceTier-C58Ixr5m.js → priceTier-aT_gIfrN.js} +3 -3
- package/dist/{rules-DwomOoC9.js → rules-Cx2hkV20.js} +8 -8
- package/dist/{scheduler-CJcxPgeF.js → scheduler-Bd-q7yF8.js} +62 -62
- package/dist/{toExcel-DjWt9SEm.js → toExcel-qfjR83qT.js} +2 -2
- package/dist/{unit-KhTILQfe.js → unit-n1T9grbM.js} +64 -64
- package/package.json +3 -3
- package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-C5hn1NYM.js +0 -399
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BFUOqfDO.js +0 -6058
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/thumbnailUpload.d.ts +0 -6
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/ImageUploadForm.vue.d.ts +0 -38
- package/dist/currency-BM5m7MDE.js +0 -7
- package/dist/dayjs.min-X4vHGjJn.js +0 -7
- package/dist/discardConfirm-BHni0LNu.js +0 -28
- package/dist/index-CisutoS9.js +0 -156
- package/dist/item-26-Gw7Ug.js +0 -9098
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { ref as F, computed as h, defineComponent as G, resolveComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { _ as
|
|
8
|
-
import { _ as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
1
|
+
import { ref as F, computed as h, defineComponent as G, resolveComponent as B, createBlock as I, openBlock as m, withCtx as $, createElementVNode as b, createVNode as d, unref as r, createElementBlock as w, Fragment as de, renderList as Se, createCommentVNode as M, normalizeClass as me, toDisplayString as E, withModifiers as fe, mergeModels as lt, useModel as at, renderSlot as ye, watch as ie, createTextVNode as ot, watchEffect as rt, nextTick as Me, resolveDynamicComponent as nt, onMounted as st, h as N, isRef as Le, normalizeStyle as ht } from "vue";
|
|
2
|
+
import { l as be } from "./discardConfirm-DZwzKO-Q.js";
|
|
3
|
+
import { u as Ie, o as we, a as ce, d as Ne, I as xt, N as Ct, _ as _e } from "./index.vue_vue_type_script_setup_true_lang-Nl505vPi.js";
|
|
4
|
+
import { useI18n as $e, useCoreStore as ze, useCustomAttributes as wt } from "@feedmepos/mf-common";
|
|
5
|
+
import { u as Ve } from "./menu-DSDRAil-.js";
|
|
6
|
+
import { L as qe } from "./LinkProductSideSheet-DMbJG6wf.js";
|
|
7
|
+
import { _ as We } from "./RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-BD5OCDRn.js";
|
|
8
|
+
import { _ as Ue, a as He } from "./CustomAttributeChip.vue_vue_type_script_setup_true_lang-2_yzXoa4.js";
|
|
9
|
+
import { u as kt } from "./linkProducts-GNuUxFEE.js";
|
|
10
|
+
import { f as St, o as Vt, a as Ft, m as It } from "./menuV2-fTlJdjxi.js";
|
|
11
|
+
import { w as ut, aq as $t, ar as Re, as as Tt, B as Pt, N as At, H as Rt, at as Qe } from "./item-Da3ArD-G.js";
|
|
11
12
|
import { b as Ye, H as Mt } from "./app-5fxKLAzS.js";
|
|
12
|
-
import { useBreakpoints as it, components as ee, useDialog as
|
|
13
|
-
import { F as
|
|
14
|
-
import { _ as De, d as Ot, e as
|
|
13
|
+
import { useBreakpoints as it, components as ee, useDialog as Nt, FmButtonColorThemeVariant as W, FmButtonVariant as X } from "@feedmepos/ui-library";
|
|
14
|
+
import { a as Oe, F as Ut } from "./index-K-MBqJJo.js";
|
|
15
|
+
import { _ as De, d as Ot, e as zt } from "./app-4yWs09Fr.js";
|
|
15
16
|
import { _ as ke } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
|
|
16
|
-
import { _ as Dt } from "./index-
|
|
17
|
-
import { r as
|
|
17
|
+
import { _ as Dt } from "./index-BEocaqRK.js";
|
|
18
|
+
import { r as Bt, _ as Kt } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-DTs4Vpdi.js";
|
|
18
19
|
import { _ as Ze } from "./TranslationViewChip.vue_vue_type_script_setup_true_lang-DiK3fi9J.js";
|
|
19
20
|
import { c as jt } from "./check-C9mY6LiX.js";
|
|
20
|
-
import { f as Et } from "./currency-
|
|
21
|
+
import { f as Et } from "./currency-DXgNHtK8.js";
|
|
21
22
|
import { w as Gt } from "./tooltip-B5BiPMx9.js";
|
|
22
23
|
function Lt(C, l, c = C) {
|
|
23
24
|
const n = F(!0), o = h(() => {
|
|
@@ -42,10 +43,10 @@ function Lt(C, l, c = C) {
|
|
|
42
43
|
}, toggleOption: (f) => {
|
|
43
44
|
var _, y, k;
|
|
44
45
|
let s;
|
|
45
|
-
l.value === void 0 && n.value ? s = [f] : l.value === void 0 && !n.value ? s = (_ = C.value.map((
|
|
46
|
+
l.value === void 0 && n.value ? s = [f] : l.value === void 0 && !n.value ? s = (_ = C.value.map((z) => z.value)) == null ? void 0 : _.filter((z) => z !== f) : (y = l.value) != null && y.includes(f) ? s = (k = l.value) == null ? void 0 : k.filter((z) => z !== f) : s = [...l.value || [], f], s.length === 0 ? (l.value = void 0, n.value = !0) : s.length === C.value.length ? (l.value = void 0, n.value = !1) : l.value = s;
|
|
46
47
|
} };
|
|
47
48
|
}
|
|
48
|
-
const
|
|
49
|
+
const qt = { class: "inline-flex items-center" }, Wt = {
|
|
49
50
|
key: 0,
|
|
50
51
|
class: /* @__PURE__ */ me([
|
|
51
52
|
"fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap",
|
|
@@ -56,36 +57,36 @@ const Wt = { class: "inline-flex items-center" }, qt = {
|
|
|
56
57
|
emits: ["toggleAttributeFilter"],
|
|
57
58
|
setup(C, { emit: l }) {
|
|
58
59
|
const c = l, n = Ie(), { categories: o, selectedCategories: u } = Ve(), a = h(() => n.state.currentCategoryIds), v = h(
|
|
59
|
-
() => o.value.map((
|
|
60
|
+
() => o.value.map((K) => ({ label: K.name, value: K.id }))
|
|
60
61
|
), f = h(() => v.value.filter(
|
|
61
|
-
(
|
|
62
|
+
(K) => K.label.toLowerCase().includes(y.value.toLowerCase())
|
|
62
63
|
)), { t: s } = $e(), _ = h(() => {
|
|
63
|
-
var
|
|
64
|
-
return o.value.length === ((
|
|
64
|
+
var K, D, H;
|
|
65
|
+
return o.value.length === ((K = u.value) == null ? void 0 : K.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}`;
|
|
65
66
|
}), y = F(""), k = h({
|
|
66
67
|
get: () => a.value,
|
|
67
|
-
set: (
|
|
68
|
-
n.selectCategory(
|
|
68
|
+
set: (K) => {
|
|
69
|
+
n.selectCategory(K);
|
|
69
70
|
}
|
|
70
|
-
}), { allSelected:
|
|
71
|
+
}), { allSelected: z, toggleAll: Y, toggleOption: S, indeterminate: ae } = Lt(
|
|
71
72
|
v,
|
|
72
73
|
k,
|
|
73
74
|
f
|
|
74
|
-
), Z =
|
|
75
|
-
function
|
|
75
|
+
), Z = ze(), oe = h(() => Z.itemAttributeSettings.value.length > 0);
|
|
76
|
+
function q() {
|
|
76
77
|
c("toggleAttributeFilter");
|
|
77
78
|
}
|
|
78
|
-
return (
|
|
79
|
-
const H =
|
|
79
|
+
return (K, D) => {
|
|
80
|
+
const H = B("FmIcon"), J = B("FmChip"), re = B("FmSearch"), Q = B("FmMenuItem"), ne = B("FmMenu");
|
|
80
81
|
return m(), I(ne, {
|
|
81
82
|
"close-on-click": !1,
|
|
82
83
|
width: 220
|
|
83
84
|
}, {
|
|
84
85
|
"menu-button": $(() => [
|
|
85
|
-
b("div",
|
|
86
|
+
b("div", qt, [
|
|
86
87
|
d(J, null, {
|
|
87
88
|
default: $(() => [
|
|
88
|
-
_.value ? (m(), w("div",
|
|
89
|
+
_.value ? (m(), w("div", Wt, E(r(s)("menu.category.selector.title", { label: _.value })), 1)) : M("", !0),
|
|
89
90
|
d(H, {
|
|
90
91
|
color: "neutral-gray-400",
|
|
91
92
|
name: "expand_more",
|
|
@@ -94,7 +95,7 @@ const Wt = { class: "inline-flex items-center" }, qt = {
|
|
|
94
95
|
oe.value ? (m(), w("div", {
|
|
95
96
|
key: 1,
|
|
96
97
|
class: "pl-8 flex items-center justify-center border-l border-fm-color-neutral-gray-200",
|
|
97
|
-
onClick: fe(
|
|
98
|
+
onClick: fe(q, ["stop"])
|
|
98
99
|
}, [
|
|
99
100
|
d(H, {
|
|
100
101
|
name: "filter_alt",
|
|
@@ -123,7 +124,7 @@ const Wt = { class: "inline-flex items-center" }, qt = {
|
|
|
123
124
|
d(Q, {
|
|
124
125
|
label: "All",
|
|
125
126
|
"has-checkbox": "",
|
|
126
|
-
"model-value": r(
|
|
127
|
+
"model-value": r(z),
|
|
127
128
|
indeterminate: r(ae),
|
|
128
129
|
onClick: r(Y)
|
|
129
130
|
}, null, 8, ["model-value", "indeterminate", "onClick"]),
|
|
@@ -133,8 +134,8 @@ const Wt = { class: "inline-flex items-center" }, qt = {
|
|
|
133
134
|
key: P.value || "",
|
|
134
135
|
label: P.label,
|
|
135
136
|
"has-checkbox": "",
|
|
136
|
-
"model-value": r(
|
|
137
|
-
onClick: (
|
|
137
|
+
"model-value": r(z) || ((T = k.value) == null ? void 0 : T.includes(P.value)),
|
|
138
|
+
onClick: (U) => r(S)(P.value)
|
|
138
139
|
}, null, 8, ["label", "model-value", "onClick"]);
|
|
139
140
|
}), 128))
|
|
140
141
|
])
|
|
@@ -164,7 +165,7 @@ const Wt = { class: "inline-flex items-center" }, qt = {
|
|
|
164
165
|
return l.categories.join(", ");
|
|
165
166
|
});
|
|
166
167
|
return (s, _) => {
|
|
167
|
-
const y =
|
|
168
|
+
const y = B("FmTooltip");
|
|
168
169
|
return o.value ? (m(), w(de, { key: 1 }, [
|
|
169
170
|
s.categories.length > 0 ? (m(), w("p", el, [
|
|
170
171
|
b("span", null, E(r(c)("menu.product.table.columns.category")) + ": ", 1),
|
|
@@ -232,7 +233,7 @@ const Wt = { class: "inline-flex items-center" }, qt = {
|
|
|
232
233
|
value: o._id
|
|
233
234
|
})));
|
|
234
235
|
return (o, u) => {
|
|
235
|
-
const a =
|
|
236
|
+
const a = B("FmSelect");
|
|
236
237
|
return m(), I(a, {
|
|
237
238
|
modelValue: c.value,
|
|
238
239
|
"onUpdate:modelValue": u[0] || (u[0] = (v) => c.value = v),
|
|
@@ -262,7 +263,7 @@ const Wt = { class: "inline-flex items-center" }, qt = {
|
|
|
262
263
|
setup(C) {
|
|
263
264
|
const l = at(C, "modelValue");
|
|
264
265
|
return (c, n) => {
|
|
265
|
-
const o =
|
|
266
|
+
const o = B("FmCollapsibleTabs");
|
|
266
267
|
return m(), w("div", nl, [
|
|
267
268
|
b("div", sl, [
|
|
268
269
|
b("div", ul, [
|
|
@@ -371,7 +372,7 @@ const Wt = { class: "inline-flex items-center" }, qt = {
|
|
|
371
372
|
return ie(() => l.data, () => {
|
|
372
373
|
u();
|
|
373
374
|
}), (a, v) => {
|
|
374
|
-
const f =
|
|
375
|
+
const f = B("FmTable");
|
|
375
376
|
return m(), I(De, null, {
|
|
376
377
|
default: $(() => [d(f, {
|
|
377
378
|
"column-defs": c,
|
|
@@ -434,7 +435,7 @@ const Wt = { class: "inline-flex items-center" }, qt = {
|
|
|
434
435
|
_.badge = () => d(ee.FmCircularProgress, {
|
|
435
436
|
size: "md"
|
|
436
437
|
}, null);
|
|
437
|
-
const y = await
|
|
438
|
+
const y = await St(Ne(l.menu), s, l.itemId);
|
|
438
439
|
_.badge = y.length, _.disabled = y.length <= 0, _.itemInGroup = y;
|
|
439
440
|
}
|
|
440
441
|
}
|
|
@@ -522,14 +523,14 @@ const Wt = { class: "inline-flex items-center" }, qt = {
|
|
|
522
523
|
var a;
|
|
523
524
|
return o(u, ((a = l.menu.modules.scheduler.find((v) => v._id === u)) == null ? void 0 : a.name) || "Unknown");
|
|
524
525
|
})], n.value.forEach(async (u) => {
|
|
525
|
-
const v = (await
|
|
526
|
+
const v = (await Vt(Ne(l.menu), l.catalogId, u.schedulerId)).modules.item.find((s) => s._id === l.itemId), f = n.value.findIndex((s) => s.schedulerId === u.schedulerId);
|
|
526
527
|
if (v) {
|
|
527
|
-
const s =
|
|
528
|
+
const s = Ne(n.value);
|
|
528
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 || "--", n.value = s;
|
|
529
530
|
}
|
|
530
531
|
});
|
|
531
532
|
}), (u, a) => {
|
|
532
|
-
const v =
|
|
533
|
+
const v = B("FmTable");
|
|
533
534
|
return m(), I(De, null, {
|
|
534
535
|
default: $(() => [b("div", fl, [d(v, {
|
|
535
536
|
class: "min-w-[800px]",
|
|
@@ -552,7 +553,7 @@ const Wt = { class: "inline-flex items-center" }, qt = {
|
|
|
552
553
|
setup(C) {
|
|
553
554
|
const l = C, c = F(null);
|
|
554
555
|
rt(async () => {
|
|
555
|
-
c.value = await
|
|
556
|
+
c.value = await Ft(l.menu, l.itemId), await Me(), n.value = o.value[0].value;
|
|
556
557
|
});
|
|
557
558
|
const n = F(""), o = h(() => {
|
|
558
559
|
var f, s;
|
|
@@ -633,7 +634,7 @@ const Wt = { class: "inline-flex items-center" }, qt = {
|
|
|
633
634
|
(y = c.value) != null && y.customAttributes ? (m(), w("div", wl, [
|
|
634
635
|
b("div", kl, [
|
|
635
636
|
u[0] || (u[0] = b("span", null, "Tagging:", -1)),
|
|
636
|
-
d(
|
|
637
|
+
d(Ue, {
|
|
637
638
|
ellipsis: !1,
|
|
638
639
|
"custom-attributes": (k = c.value) == null ? void 0 : k.customAttributes
|
|
639
640
|
}, null, 8, ["custom-attributes"])
|
|
@@ -664,7 +665,7 @@ const Wt = { class: "inline-flex items-center" }, qt = {
|
|
|
664
665
|
]);
|
|
665
666
|
return (n, o) => {
|
|
666
667
|
var a;
|
|
667
|
-
const u =
|
|
668
|
+
const u = B("FmTabs");
|
|
668
669
|
return m(), w("div", Vl, [
|
|
669
670
|
d(Sl, {
|
|
670
671
|
"item-id": n.itemId,
|
|
@@ -724,7 +725,7 @@ const Wt = { class: "inline-flex items-center" }, qt = {
|
|
|
724
725
|
c.value = !c.value, o && (l.value = o);
|
|
725
726
|
}
|
|
726
727
|
return (o, u) => {
|
|
727
|
-
const a =
|
|
728
|
+
const a = B("FmSideSheet");
|
|
728
729
|
return m(), w(de, null, [
|
|
729
730
|
ye(o.$slots, "default", { trigger: n }),
|
|
730
731
|
d(a, {
|
|
@@ -751,7 +752,7 @@ const Wt = { class: "inline-flex items-center" }, qt = {
|
|
|
751
752
|
};
|
|
752
753
|
}
|
|
753
754
|
});
|
|
754
|
-
var Al =
|
|
755
|
+
var Al = Bt();
|
|
755
756
|
const et = /* @__PURE__ */ G({
|
|
756
757
|
__name: "ImportButton",
|
|
757
758
|
setup(C) {
|
|
@@ -759,7 +760,7 @@ const et = /* @__PURE__ */ G({
|
|
|
759
760
|
function c() {
|
|
760
761
|
l.value = !l.value;
|
|
761
762
|
}
|
|
762
|
-
const n =
|
|
763
|
+
const n = ze();
|
|
763
764
|
return st(() => {
|
|
764
765
|
const o = n.currentCountry.value;
|
|
765
766
|
if (o)
|
|
@@ -769,7 +770,7 @@ const et = /* @__PURE__ */ G({
|
|
|
769
770
|
console.log("Unable to set country config", u);
|
|
770
771
|
}
|
|
771
772
|
}), (o, u) => (m(), w(de, null, [
|
|
772
|
-
d(
|
|
773
|
+
d(Kt, {
|
|
773
774
|
modelValue: l.value,
|
|
774
775
|
"onUpdate:modelValue": u[0] || (u[0] = (a) => l.value = a)
|
|
775
776
|
}, null, 8, ["modelValue"]),
|
|
@@ -782,22 +783,22 @@ const et = /* @__PURE__ */ G({
|
|
|
782
783
|
class: "flex justify-between items-center space-x-8"
|
|
783
784
|
}, Ml = {
|
|
784
785
|
class: "flex space-x-8 items-center"
|
|
785
|
-
},
|
|
786
|
+
}, Nl = {
|
|
786
787
|
class: "w-[320px]"
|
|
787
|
-
},
|
|
788
|
+
}, Ul = {
|
|
788
789
|
key: 0
|
|
789
790
|
}, Ol = {
|
|
790
791
|
key: 1,
|
|
791
792
|
class: /* @__PURE__ */ me(["flex-1 flex flex-col", "divide-y divide-fm-color-neutral-gray-100", "overflow-hidden"])
|
|
792
|
-
},
|
|
793
|
+
}, zl = {
|
|
793
794
|
key: 0,
|
|
794
795
|
class: "flex items-center p-4"
|
|
795
796
|
}, Dl = {
|
|
796
797
|
class: /* @__PURE__ */ me(["mr-8", "fm-typo-en-body-md-400"])
|
|
797
|
-
},
|
|
798
|
+
}, Bl = {
|
|
798
799
|
key: 1,
|
|
799
800
|
class: "px-16 py-4 space-x-8 flex justify-end"
|
|
800
|
-
},
|
|
801
|
+
}, Kl = {
|
|
801
802
|
key: 2
|
|
802
803
|
}, jl = {
|
|
803
804
|
class: "flex space-x-8"
|
|
@@ -808,9 +809,9 @@ const et = /* @__PURE__ */ G({
|
|
|
808
809
|
class: "space-y-8 pb-8"
|
|
809
810
|
}, Ll = {
|
|
810
811
|
class: "w-full px-8"
|
|
811
|
-
}, Wl = {
|
|
812
|
-
class: "flex space-x-8 px-8"
|
|
813
812
|
}, ql = {
|
|
813
|
+
class: "flex space-x-8 px-8"
|
|
814
|
+
}, Wl = {
|
|
814
815
|
key: 0,
|
|
815
816
|
class: "px-8"
|
|
816
817
|
}, Hl = {
|
|
@@ -850,9 +851,9 @@ const et = /* @__PURE__ */ G({
|
|
|
850
851
|
}) {
|
|
851
852
|
const n = C, {
|
|
852
853
|
t: o
|
|
853
|
-
} = $e(), u =
|
|
854
|
+
} = $e(), u = ze(), a = Ie(), v = Nt(), f = ut(), s = u.currentCountry, _ = h(() => s.value ? ce.Country.getCountry(s.value) : null), y = h(() => a.rules.item), {
|
|
854
855
|
selectedCategories: k
|
|
855
|
-
} = Ve(),
|
|
856
|
+
} = Ve(), z = h(() => {
|
|
856
857
|
const t = be.flatten(k.value.map((e) => e.items));
|
|
857
858
|
return be.uniqBy(t, (e) => e._id);
|
|
858
859
|
}), Y = c, S = F(!1);
|
|
@@ -862,25 +863,25 @@ const et = /* @__PURE__ */ G({
|
|
|
862
863
|
const ae = (t) => {
|
|
863
864
|
jt.isBoolean(t) ? S.value = t : S.value = !S.value;
|
|
864
865
|
}, Z = F(!1), oe = F(null);
|
|
865
|
-
async function
|
|
866
|
+
async function q() {
|
|
866
867
|
Z.value = !Z.value, Z.value && (await Me(), oe.value && oe.value.toggleProperty(!0));
|
|
867
868
|
}
|
|
868
869
|
l({
|
|
869
|
-
toggleAttributeFilter:
|
|
870
|
+
toggleAttributeFilter: q
|
|
870
871
|
});
|
|
871
872
|
const {
|
|
872
|
-
attributes:
|
|
873
|
+
attributes: K,
|
|
873
874
|
filterRule: D,
|
|
874
875
|
mongoQuery: H
|
|
875
|
-
} =
|
|
876
|
-
valueSource:
|
|
876
|
+
} = wt({
|
|
877
|
+
valueSource: z,
|
|
877
878
|
entity: "item"
|
|
878
879
|
}), J = F(""), re = Ot(J, 300), Q = h(() => {
|
|
879
880
|
const t = (i) => {
|
|
880
881
|
var x;
|
|
881
|
-
return !re.value || !re.value.trim() ? !0 : [i.code, i.name,
|
|
882
|
+
return !re.value || !re.value.trim() ? !0 : [i.code, i.name, Ke(i), ...Re(ne.value, i), A(i.subCategories), (x = we()[i.orderFrom]) == null ? void 0 : x.label, Object.values(i.customAttributes ?? {}).join(" ")].join(" ").toLowerCase().includes(re.value.toLowerCase());
|
|
882
883
|
}, e = (i) => H.value ? Mt(i.customAttributes, H.value) : !0;
|
|
883
|
-
return
|
|
884
|
+
return z.value.filter((i) => t(i) && e(i));
|
|
884
885
|
}), {
|
|
885
886
|
categories: ne
|
|
886
887
|
} = Ve(), P = h(() => a.categories.map((t) => ({
|
|
@@ -889,9 +890,9 @@ const et = /* @__PURE__ */ G({
|
|
|
889
890
|
}))), T = h(() => a.subcategories.map((t) => ({
|
|
890
891
|
label: t.name,
|
|
891
892
|
value: t._id
|
|
892
|
-
}))),
|
|
893
|
+
}))), U = h(() => a.subcategories.reduce((t, e) => (t[e._id] = e.name, t), {}));
|
|
893
894
|
function A(t) {
|
|
894
|
-
return (t == null ? void 0 : t.map((e) =>
|
|
895
|
+
return (t == null ? void 0 : t.map((e) => U.value[e]).filter(Boolean).join("/")) || "--";
|
|
895
896
|
}
|
|
896
897
|
const te = (t, e, i) => {
|
|
897
898
|
let p = be.clone(n.modelValue);
|
|
@@ -903,7 +904,7 @@ const et = /* @__PURE__ */ G({
|
|
|
903
904
|
...x,
|
|
904
905
|
[e]: i
|
|
905
906
|
}, Y("update:model-value", p));
|
|
906
|
-
}, j =
|
|
907
|
+
}, j = $t(() => n.originalValue, () => n.modelValue), O = be.debounce(te, 300), R = (t) => (e) => !!e || o("menu.product.table.validation.name_required", {
|
|
907
908
|
field: t
|
|
908
909
|
}), se = (t) => t >= 0 || o("menu.product.table.validation.price_min"), L = [R("Name")], pe = () => [(t) => se(typeof t == "number" ? t : Number(t) ?? 0)], he = we(), xe = h(() => {
|
|
909
910
|
const t = a.isV4;
|
|
@@ -918,7 +919,7 @@ const et = /* @__PURE__ */ G({
|
|
|
918
919
|
},
|
|
919
920
|
cell: (t) => {
|
|
920
921
|
var e, i;
|
|
921
|
-
return
|
|
922
|
+
return N(Oe, {
|
|
922
923
|
src: t.getValue(),
|
|
923
924
|
alt: (i = (e = t == null ? void 0 : t.row) == null ? void 0 : e.original) == null ? void 0 : i.name,
|
|
924
925
|
className: "my-8 mx-12",
|
|
@@ -938,7 +939,7 @@ const et = /* @__PURE__ */ G({
|
|
|
938
939
|
class: "break-all"
|
|
939
940
|
}, [i]);
|
|
940
941
|
const p = Pe(e._id);
|
|
941
|
-
return
|
|
942
|
+
return N(ee.FmTextField, {
|
|
942
943
|
disabled: !y.value.code,
|
|
943
944
|
modelValue: j(e._id, "code") ?? (p == null ? void 0 : p.code),
|
|
944
945
|
placeholder: n.modelValue[e._id].fallbackCode,
|
|
@@ -954,9 +955,9 @@ const et = /* @__PURE__ */ G({
|
|
|
954
955
|
size: 250,
|
|
955
956
|
cell: (t) => {
|
|
956
957
|
const e = t.row.original, i = t.getValue();
|
|
957
|
-
return S.value ?
|
|
958
|
+
return S.value ? N("div", {
|
|
958
959
|
class: "flex items-center gap-8"
|
|
959
|
-
}, [
|
|
960
|
+
}, [N(ee.FmTextField, {
|
|
960
961
|
disabled: !y.value.name,
|
|
961
962
|
modelValue: j(e._id, "name") ?? e.name,
|
|
962
963
|
"onUpdate:modelValue": (p) => {
|
|
@@ -964,14 +965,14 @@ const et = /* @__PURE__ */ G({
|
|
|
964
965
|
},
|
|
965
966
|
rules: L,
|
|
966
967
|
placeholder: e.fallbackName
|
|
967
|
-
}), e.name_locale ?
|
|
968
|
+
}), e.name_locale ? N(Ze, {
|
|
968
969
|
nameLocale: e.name_locale ?? {},
|
|
969
970
|
showNumber: 1
|
|
970
|
-
}) : null]) :
|
|
971
|
+
}) : null]) : N("div", {
|
|
971
972
|
class: "flex items-center gap-8"
|
|
972
|
-
}, [
|
|
973
|
+
}, [N("span", {
|
|
973
974
|
class: "text-wrap"
|
|
974
|
-
}, i), e.name_locale ?
|
|
975
|
+
}, i), e.name_locale ? N(Ze, {
|
|
975
976
|
nameLocale: e.name_locale ?? {},
|
|
976
977
|
showNumber: 1
|
|
977
978
|
}) : null]);
|
|
@@ -994,7 +995,7 @@ const et = /* @__PURE__ */ G({
|
|
|
994
995
|
const e = t.getValue();
|
|
995
996
|
if (!S.value) return ce.Dinero.fromFdoDinero(e).toFormat();
|
|
996
997
|
const i = n.modelValue[t.row.original._id], p = i.fallbackPrice;
|
|
997
|
-
return
|
|
998
|
+
return N(Dt, {
|
|
998
999
|
min: 0,
|
|
999
1000
|
disabled: !i.editPrice,
|
|
1000
1001
|
// @ts-ignore
|
|
@@ -1018,9 +1019,9 @@ const et = /* @__PURE__ */ G({
|
|
|
1018
1019
|
cell: (t) => {
|
|
1019
1020
|
const e = t.getValue(), i = t.row.original, p = a.taxSetting.countryTaxOptions, x = a.getSelectedTax(e, i.fallbackTaxes, a.taxSetting.countryTaxOptions), V = p.find((le) => le.value === x);
|
|
1020
1021
|
if (!S.value)
|
|
1021
|
-
return `${V != null && V.meta.rate ?
|
|
1022
|
+
return `${V != null && V.meta.rate ? Ct(V.meta.rate) : 0}%`;
|
|
1022
1023
|
const g = a.getSelectedTax(j(i._id, "taxes") ?? e, i.fallbackTaxes, a.taxSetting.countryTaxOptions);
|
|
1023
|
-
return
|
|
1024
|
+
return N(ee.FmSelect, {
|
|
1024
1025
|
disabled: !y.value.tax,
|
|
1025
1026
|
items: a.taxSetting.countryTaxOptions,
|
|
1026
1027
|
modelValue: g,
|
|
@@ -1038,11 +1039,11 @@ const et = /* @__PURE__ */ G({
|
|
|
1038
1039
|
cell: (t) => {
|
|
1039
1040
|
const e = t.row.original;
|
|
1040
1041
|
if (!S.value)
|
|
1041
|
-
return
|
|
1042
|
+
return N(Xe, {
|
|
1042
1043
|
categories: Re(ne.value, e)
|
|
1043
1044
|
});
|
|
1044
|
-
const i =
|
|
1045
|
-
return
|
|
1045
|
+
const i = Tt(n.originalValue, n.modelValue, e._id) ?? Pt(e), p = (i == null ? void 0 : i.map((V) => V._id)) ?? [], x = i == null ? void 0 : i.reduce((V, g) => (V[g._id] = g, V), {});
|
|
1046
|
+
return N(At, {
|
|
1046
1047
|
shouldShowChips: !1,
|
|
1047
1048
|
shouldShowSelectedItemsWithinPlaceholder: !0,
|
|
1048
1049
|
modelValue: p.length > 0 ? p : [null],
|
|
@@ -1073,7 +1074,7 @@ const et = /* @__PURE__ */ G({
|
|
|
1073
1074
|
size: 180,
|
|
1074
1075
|
cell: (t) => {
|
|
1075
1076
|
const e = t.row.original;
|
|
1076
|
-
return S.value ?
|
|
1077
|
+
return S.value ? N(Rt, {
|
|
1077
1078
|
// Keep virtual table row height stable while editing.
|
|
1078
1079
|
shouldShowChips: !1,
|
|
1079
1080
|
modelValue: j(e._id, "subCategories") ?? e.subCategories ?? [],
|
|
@@ -1084,7 +1085,7 @@ const et = /* @__PURE__ */ G({
|
|
|
1084
1085
|
"onUpdate:modelValue": async (i) => {
|
|
1085
1086
|
O(e._id, "subCategories", i);
|
|
1086
1087
|
}
|
|
1087
|
-
}) :
|
|
1088
|
+
}) : N("span", {
|
|
1088
1089
|
class: "break-all"
|
|
1089
1090
|
}, A(e.subCategories));
|
|
1090
1091
|
}
|
|
@@ -1096,7 +1097,7 @@ const et = /* @__PURE__ */ G({
|
|
|
1096
1097
|
size: 140,
|
|
1097
1098
|
cell: (t) => {
|
|
1098
1099
|
const e = t.row.original;
|
|
1099
|
-
return
|
|
1100
|
+
return N(Ue, {
|
|
1100
1101
|
customAttributes: e.customAttributes
|
|
1101
1102
|
});
|
|
1102
1103
|
}
|
|
@@ -1111,14 +1112,14 @@ const et = /* @__PURE__ */ G({
|
|
|
1111
1112
|
size: 140,
|
|
1112
1113
|
cell: (t) => {
|
|
1113
1114
|
const e = t.getValue(), i = t.row.original;
|
|
1114
|
-
return S.value ?
|
|
1115
|
+
return S.value ? N(ee.FmSelect, {
|
|
1115
1116
|
disabled: !y.value.orderFrom,
|
|
1116
1117
|
items: Object.values(we()),
|
|
1117
1118
|
modelValue: j(i._id, "orderFrom") ?? e,
|
|
1118
1119
|
"onUpdate:modelValue": async (p) => {
|
|
1119
1120
|
te(i._id, "orderFrom", p);
|
|
1120
1121
|
}
|
|
1121
|
-
}) :
|
|
1122
|
+
}) : N(Fe, {
|
|
1122
1123
|
orderFrom: e
|
|
1123
1124
|
});
|
|
1124
1125
|
}
|
|
@@ -1130,11 +1131,11 @@ const et = /* @__PURE__ */ G({
|
|
|
1130
1131
|
headerClass: "py-4",
|
|
1131
1132
|
textAlign: "right"
|
|
1132
1133
|
},
|
|
1133
|
-
header: () =>
|
|
1134
|
+
header: () => N("div", {
|
|
1134
1135
|
class: "w-full px-4 flex justify-end"
|
|
1135
|
-
}, [Gt(
|
|
1136
|
+
}, [Gt(N(ee.FmButton, {
|
|
1136
1137
|
variant: X.Tertiary,
|
|
1137
|
-
textColor:
|
|
1138
|
+
textColor: W.NeutralGray400,
|
|
1138
1139
|
prependIcon: "edit",
|
|
1139
1140
|
class: "flex justify-end",
|
|
1140
1141
|
onClick: ae,
|
|
@@ -1150,7 +1151,7 @@ const et = /* @__PURE__ */ G({
|
|
|
1150
1151
|
}) => d(ee.FmButton, {
|
|
1151
1152
|
icon: "overview",
|
|
1152
1153
|
variant: "tertiary",
|
|
1153
|
-
textColor:
|
|
1154
|
+
textColor: W.NeutralGray400,
|
|
1154
1155
|
onClick: fe(() => {
|
|
1155
1156
|
i(e._id);
|
|
1156
1157
|
}, ["stop", "prevent"])
|
|
@@ -1158,7 +1159,7 @@ const et = /* @__PURE__ */ G({
|
|
|
1158
1159
|
}), d(ee.FmButton, {
|
|
1159
1160
|
icon: "delete",
|
|
1160
1161
|
variant: "tertiary",
|
|
1161
|
-
textColor:
|
|
1162
|
+
textColor: W.NeutralGray400,
|
|
1162
1163
|
onClick: fe(async () => {
|
|
1163
1164
|
await f.deleteItem([{
|
|
1164
1165
|
_id: e._id,
|
|
@@ -1177,7 +1178,7 @@ const et = /* @__PURE__ */ G({
|
|
|
1177
1178
|
const p = t[0][i], x = Q.value[parseInt(i)];
|
|
1178
1179
|
x && (p ? e.push(x) : ue.value = e.filter((V) => V !== x));
|
|
1179
1180
|
}), ue.value = e;
|
|
1180
|
-
}), ie(() =>
|
|
1181
|
+
}), ie(() => z.value, () => {
|
|
1181
1182
|
ve.value = {}, ue.value = [];
|
|
1182
1183
|
}), ie(() => S.value, () => {
|
|
1183
1184
|
ve.value = {}, ue.value = [];
|
|
@@ -1185,11 +1186,11 @@ const et = /* @__PURE__ */ G({
|
|
|
1185
1186
|
const dt = () => {
|
|
1186
1187
|
ve.value = {};
|
|
1187
1188
|
};
|
|
1188
|
-
async function
|
|
1189
|
+
async function Be() {
|
|
1189
1190
|
await Me();
|
|
1190
1191
|
const t = () => !!a.currentCatalog || !!a.state.currentSchedulerId, e = (p) => p === "" || p === null ? t() ? "" : null : p, i = Object.values(n.modelValue).filter((p) => {
|
|
1191
1192
|
const x = Object.values(n.originalValue).find((V) => V._id === p._id);
|
|
1192
|
-
return
|
|
1193
|
+
return Qe(x, p);
|
|
1193
1194
|
}).map((p) => ({
|
|
1194
1195
|
_id: p._id,
|
|
1195
1196
|
name: p.name,
|
|
@@ -1212,7 +1213,7 @@ const et = /* @__PURE__ */ G({
|
|
|
1212
1213
|
}, Ce = () => {
|
|
1213
1214
|
Y("reset:model-value");
|
|
1214
1215
|
}, Te = () => {
|
|
1215
|
-
Object.entries(n.modelValue).some(([e, i]) =>
|
|
1216
|
+
Object.entries(n.modelValue).some(([e, i]) => Qe(i, n.originalValue[e])) ? v.open({
|
|
1216
1217
|
title: "You have unsaved changes!",
|
|
1217
1218
|
message: "Are you sure you want to discard? You will lose all the changes if discard edit.",
|
|
1218
1219
|
primaryActions: {
|
|
@@ -1240,7 +1241,7 @@ const et = /* @__PURE__ */ G({
|
|
|
1240
1241
|
async function ft(t) {
|
|
1241
1242
|
await f.update(t.original._id);
|
|
1242
1243
|
}
|
|
1243
|
-
function
|
|
1244
|
+
function Ke(t) {
|
|
1244
1245
|
var g;
|
|
1245
1246
|
const e = t.price ?? // TODO: fix type error
|
|
1246
1247
|
// @ts-ignore
|
|
@@ -1261,16 +1262,16 @@ const et = /* @__PURE__ */ G({
|
|
|
1261
1262
|
if (e && i) {
|
|
1262
1263
|
const x = e.override.scheduler[i] ?? {}, V = (p = x == null ? void 0 : x.items) == null ? void 0 : p.filter((g) => g._id === t);
|
|
1263
1264
|
return V == null ? void 0 : V[0];
|
|
1264
|
-
} else return e ? e.override.items[t][0] : i ? a.schedulers.find((g) => g._id === i).items.filter((g) => g._id === t)[0] :
|
|
1265
|
+
} else return e ? e.override.items[t][0] : i ? a.schedulers.find((g) => g._id === i).items.filter((g) => g._id === t)[0] : z.value.find((x) => x._id === t);
|
|
1265
1266
|
}
|
|
1266
|
-
const gt = it(), bt = h(() => gt.breakpoints.value.xs), je = F(null), _t =
|
|
1267
|
+
const gt = it(), bt = h(() => gt.breakpoints.value.xs), je = F(null), _t = zt(je, Z), yt = h(() => {
|
|
1267
1268
|
var e;
|
|
1268
1269
|
return {
|
|
1269
1270
|
height: `calc(100vh - ${((e = _t.value) == null ? void 0 : e.top) + 24}px)`
|
|
1270
1271
|
};
|
|
1271
1272
|
});
|
|
1272
1273
|
return (t, e) => {
|
|
1273
|
-
const i =
|
|
1274
|
+
const i = B("fm-search"), p = B("fm-button"), x = B("fm-table"), V = B("fm-form");
|
|
1274
1275
|
return bt.value ? (m(), w("div", El, [b("div", Gl, [b("div", Ll, [d(i, {
|
|
1275
1276
|
"model-value": J.value,
|
|
1276
1277
|
"onUpdate:modelValue": e[5] || (e[5] = (g) => J.value = g),
|
|
@@ -1278,13 +1279,13 @@ const et = /* @__PURE__ */ G({
|
|
|
1278
1279
|
placeholder: r(o)("menu.product.table.search.placeholder")
|
|
1279
1280
|
}, null, 8, ["model-value", "placeholder"])]), e[8] || (e[8] = b("div", {
|
|
1280
1281
|
class: "w-full h-[1px] bg-fm-color-neutral-gray-100"
|
|
1281
|
-
}, null, -1)), b("div",
|
|
1282
|
+
}, null, -1)), b("div", ql, [ye(t.$slots, "filter")]), Z.value ? (m(), w("div", Wl, [d(r(Ye), {
|
|
1282
1283
|
ref_key: "attributeFilterRef",
|
|
1283
1284
|
ref: oe,
|
|
1284
|
-
attributes: r(
|
|
1285
|
+
attributes: r(K),
|
|
1285
1286
|
modelValue: r(D),
|
|
1286
1287
|
"onUpdate:modelValue": e[6] || (e[6] = (g) => Le(D) ? D.value = g : null)
|
|
1287
|
-
}, null, 8, ["attributes", "modelValue"])])) : M("", !0)]),
|
|
1288
|
+
}, null, 8, ["attributes", "modelValue"])])) : M("", !0)]), z.value.length ? (m(), w("div", Hl, [(m(!0), w(de, null, Se(Q.value, (g) => {
|
|
1288
1289
|
var le;
|
|
1289
1290
|
return m(), w("div", {
|
|
1290
1291
|
key: g._id,
|
|
@@ -1296,12 +1297,12 @@ const et = /* @__PURE__ */ G({
|
|
|
1296
1297
|
src: g.thumbnail
|
|
1297
1298
|
}, null, 8, ["alt", "src"]), b("div", Zl, [b("div", Jl, [b("p", Xl, E(g.name), 1), d(Fe, {
|
|
1298
1299
|
"order-from": g.orderFrom
|
|
1299
|
-
}, null, 8, ["order-from"])]), b("p", ea, E(
|
|
1300
|
+
}, null, 8, ["order-from"])]), b("p", ea, E(Ke(g)), 1), b("p", ta, E(r(o)("menu.product.table.columns.code")) + ": " + E(((le = Pe(g._id)) == null ? void 0 : le.code) || "--"), 1), b("p", la, [d(Xe, {
|
|
1300
1301
|
categories: r(Re)(r(ne), g)
|
|
1301
|
-
}, null, 8, ["categories"])]), d(
|
|
1302
|
+
}, null, 8, ["categories"])]), d(Ue, {
|
|
1302
1303
|
"custom-attributes": g.customAttributes
|
|
1303
1304
|
}, null, 8, ["custom-attributes"])])]), d(p, {
|
|
1304
|
-
"text-color": r(
|
|
1305
|
+
"text-color": r(W).NeutralGray400,
|
|
1305
1306
|
variant: r(X).Tertiary,
|
|
1306
1307
|
"prepend-icon": "delete",
|
|
1307
1308
|
onClick: fe(() => r(f).deleteItem([{
|
|
@@ -1323,8 +1324,8 @@ const et = /* @__PURE__ */ G({
|
|
|
1323
1324
|
default: $(({
|
|
1324
1325
|
trigger: g
|
|
1325
1326
|
}) => [d(p, {
|
|
1326
|
-
"bg-color": r(
|
|
1327
|
-
"text-color": r(
|
|
1327
|
+
"bg-color": r(W).NeutralGray100,
|
|
1328
|
+
"text-color": r(W).NeutralGray400,
|
|
1328
1329
|
variant: r(X).Primary,
|
|
1329
1330
|
label: r(o)("menu.product.table.empty.actions.import"),
|
|
1330
1331
|
"prepend-icon": "download",
|
|
@@ -1337,20 +1338,20 @@ const et = /* @__PURE__ */ G({
|
|
|
1337
1338
|
key: 0,
|
|
1338
1339
|
"blame-form-child-on-validation-failed": "",
|
|
1339
1340
|
class: "flex flex-col flex-1 space-y-8 overflow-hidden",
|
|
1340
|
-
onValidationSuccess:
|
|
1341
|
+
onValidationSuccess: Be
|
|
1341
1342
|
}, {
|
|
1342
|
-
default: $(() => [b("div", Rl, [b("div", Ml, [ye(t.$slots, "filter")]), b("div",
|
|
1343
|
+
default: $(() => [b("div", Rl, [b("div", Ml, [ye(t.$slots, "filter")]), b("div", Nl, [d(i, {
|
|
1343
1344
|
"model-value": J.value,
|
|
1344
1345
|
"onUpdate:modelValue": e[0] || (e[0] = (g) => J.value = g),
|
|
1345
1346
|
autofocus: "",
|
|
1346
1347
|
placeholder: r(o)("menu.product.table.search.placeholder")
|
|
1347
|
-
}, null, 8, ["model-value", "placeholder"])])]), Z.value ? (m(), w("div",
|
|
1348
|
+
}, null, 8, ["model-value", "placeholder"])])]), Z.value ? (m(), w("div", Ul, [d(r(Ye), {
|
|
1348
1349
|
ref_key: "attributeFilterRef",
|
|
1349
1350
|
ref: oe,
|
|
1350
|
-
attributes: r(
|
|
1351
|
+
attributes: r(K),
|
|
1351
1352
|
modelValue: r(D),
|
|
1352
1353
|
"onUpdate:modelValue": e[1] || (e[1] = (g) => Le(D) ? D.value = g : null)
|
|
1353
|
-
}, null, 8, ["attributes", "modelValue"])])) : M("", !0),
|
|
1354
|
+
}, null, 8, ["attributes", "modelValue"])])) : M("", !0), z.value.length ? (m(), w("div", Ol, [ue.value.length && !S.value ? (m(), w("div", zl, [b("p", Dl, E(r(o)("menu.product.table.selection.count", {
|
|
1354
1355
|
count: ue.value.length
|
|
1355
1356
|
})), 1), d(p, {
|
|
1356
1357
|
label: r(o)("menu.product.table.selection.actions.deselect_all"),
|
|
@@ -1358,14 +1359,14 @@ const et = /* @__PURE__ */ G({
|
|
|
1358
1359
|
variant: "plain",
|
|
1359
1360
|
onClick: dt
|
|
1360
1361
|
}, null, 8, ["label"]), d(p, {
|
|
1361
|
-
"border-color": r(
|
|
1362
|
-
"text-color": r(
|
|
1362
|
+
"border-color": r(W).SystemError300,
|
|
1363
|
+
"text-color": r(W).SystemError300,
|
|
1363
1364
|
class: "ml-auto",
|
|
1364
1365
|
label: r(o)("menu.product.table.selection.actions.remove"),
|
|
1365
1366
|
"prepend-icon": "delete",
|
|
1366
1367
|
variant: "secondary",
|
|
1367
1368
|
onClick: mt
|
|
1368
|
-
}, null, 8, ["border-color", "text-color", "label"])])) : M("", !0), S.value ? (m(), w("div",
|
|
1369
|
+
}, null, 8, ["border-color", "text-color", "label"])])) : M("", !0), S.value ? (m(), w("div", Bl, [d(p, {
|
|
1369
1370
|
variant: r(X).Tertiary,
|
|
1370
1371
|
label: r(o)("menu.product.table.bulk_edit.actions.reset_all"),
|
|
1371
1372
|
onClick: Ce
|
|
@@ -1374,15 +1375,15 @@ const et = /* @__PURE__ */ G({
|
|
|
1374
1375
|
label: r(o)("menu.common.actions.cancel"),
|
|
1375
1376
|
onClick: Te
|
|
1376
1377
|
}, null, 8, ["variant", "label"]), d(p, {
|
|
1377
|
-
borderColor: r(
|
|
1378
|
-
textColor: r(
|
|
1378
|
+
borderColor: r(W).ColorPrimary,
|
|
1379
|
+
textColor: r(W).ColorPrimary,
|
|
1379
1380
|
variant: r(X).Secondary,
|
|
1380
1381
|
label: r(o)("menu.product.table.bulk_edit.actions.save"),
|
|
1381
1382
|
type: "submit"
|
|
1382
1383
|
}, null, 8, ["borderColor", "textColor", "variant", "label"])])) : M("", !0), b("div", {
|
|
1383
1384
|
ref_key: "tableWrapper",
|
|
1384
1385
|
ref: je
|
|
1385
|
-
}, [(m(), I(nt(S.value ?
|
|
1386
|
+
}, [(m(), I(nt(S.value ? Ut : "div"), {
|
|
1386
1387
|
ref: "fullWrapper",
|
|
1387
1388
|
title: S.value ? r(o)("menu.product.table.bulk_edit.title") : "",
|
|
1388
1389
|
show: S.value,
|
|
@@ -1398,7 +1399,7 @@ const et = /* @__PURE__ */ G({
|
|
|
1398
1399
|
}],
|
|
1399
1400
|
class: "overflow-x-scroll",
|
|
1400
1401
|
style: ht(yt.value),
|
|
1401
|
-
onOnPrimary:
|
|
1402
|
+
onOnPrimary: Be,
|
|
1402
1403
|
onOnCancel: Te
|
|
1403
1404
|
}, {
|
|
1404
1405
|
default: $(() => [d(x, {
|
|
@@ -1422,7 +1423,7 @@ const et = /* @__PURE__ */ G({
|
|
|
1422
1423
|
onRowClick: e[3] || (e[3] = (g) => S.value ? void 0 : ft(g))
|
|
1423
1424
|
}, null, 8, ["class", "modelValue", "column-defs", "column-visibility", "loading", "page-size", "row-data", "selection", "virtual-row-height"])]),
|
|
1424
1425
|
_: 1
|
|
1425
|
-
}, 40, ["title", "show", "primary-action", "secondary-actions", "style"]))], 512)])) : (m(), w("div",
|
|
1426
|
+
}, 40, ["title", "show", "primary-action", "secondary-actions", "style"]))], 512)])) : (m(), w("div", Kl, [d(_e, {
|
|
1426
1427
|
subtitle: r(o)("menu.product.table.empty.subtitle"),
|
|
1427
1428
|
title: r(o)("menu.product.table.empty.title")
|
|
1428
1429
|
}, {
|
|
@@ -1435,8 +1436,8 @@ const et = /* @__PURE__ */ G({
|
|
|
1435
1436
|
default: $(({
|
|
1436
1437
|
trigger: g
|
|
1437
1438
|
}) => [d(p, {
|
|
1438
|
-
"bg-color": r(
|
|
1439
|
-
"text-color": r(
|
|
1439
|
+
"bg-color": r(W).NeutralGray100,
|
|
1440
|
+
"text-color": r(W).NeutralGray400,
|
|
1440
1441
|
variant: r(X).Primary,
|
|
1441
1442
|
label: r(o)("menu.product.table.empty.actions.import"),
|
|
1442
1443
|
"prepend-icon": "download",
|
|
@@ -1458,11 +1459,11 @@ const et = /* @__PURE__ */ G({
|
|
|
1458
1459
|
}, ua = { class: "flex flex-col flex-1 overflow-hidden" }, ia = {
|
|
1459
1460
|
key: 1,
|
|
1460
1461
|
class: "pt-16 xs:pt-8 space-y-24"
|
|
1461
|
-
}, ca = { class: "flex items-center gap-8 px-16" },
|
|
1462
|
+
}, ca = { class: "flex items-center gap-8 px-16" }, Ra = /* @__PURE__ */ G({
|
|
1462
1463
|
__name: "Product",
|
|
1463
1464
|
setup(C) {
|
|
1464
1465
|
const l = Ie(), c = h(() => l.rules.item), n = ut(), o = h(() => !l.state.currentCatalogId), u = h(() => l.rules.item), a = h(() => !l.state.currentSchedulerId), v = F(!1), f = F(!1), s = h(() => {
|
|
1465
|
-
var T,
|
|
1466
|
+
var T, U, A, te;
|
|
1466
1467
|
if (o.value && a.value) return;
|
|
1467
1468
|
if (a.value) {
|
|
1468
1469
|
const j = (T = l.currentCatalog) == null ? void 0 : T.override.items;
|
|
@@ -1471,11 +1472,11 @@ const et = /* @__PURE__ */ G({
|
|
|
1471
1472
|
return L && (O[R] = L), O;
|
|
1472
1473
|
}, {}) : {};
|
|
1473
1474
|
}
|
|
1474
|
-
return ((o.value ? (
|
|
1475
|
+
return ((o.value ? (U = l.currentScheduler) == null ? void 0 : U.items : (te = (A = l.currentCatalog) == null ? void 0 : A.override.scheduler[l.state.currentSchedulerId]) == null ? void 0 : te.items) ?? []).reduce((j, O) => (O.combinationKey || (j[O._id] = O), j), {});
|
|
1475
1476
|
}), _ = F({}), y = F({}), k = async () => {
|
|
1476
1477
|
var te, j;
|
|
1477
1478
|
f.value = !0;
|
|
1478
|
-
const P = !!s.value, T = be.flatten(Y.value.map((O) => O.items)),
|
|
1479
|
+
const P = !!s.value, T = be.flatten(Y.value.map((O) => O.items)), U = P && v.value ? await It(
|
|
1479
1480
|
l.mergedMenu,
|
|
1480
1481
|
T,
|
|
1481
1482
|
l.state.menu,
|
|
@@ -1496,15 +1497,15 @@ const et = /* @__PURE__ */ G({
|
|
|
1496
1497
|
orderFrom: P ? L == null ? void 0 : L.orderFrom : R.orderFrom,
|
|
1497
1498
|
taxes: P ? null : R.taxes,
|
|
1498
1499
|
thumbnail: R.thumbnail,
|
|
1499
|
-
fallbackPrice: (he =
|
|
1500
|
+
fallbackPrice: (he = U == null ? void 0 : U[se]) == null ? void 0 : he.price,
|
|
1500
1501
|
fallbackName: P ? R.name : void 0,
|
|
1501
|
-
fallbackCode: (xe =
|
|
1502
|
-
fallbackOrder: (ge =
|
|
1502
|
+
fallbackCode: (xe = U == null ? void 0 : U[se]) == null ? void 0 : xe.code,
|
|
1503
|
+
fallbackOrder: (ge = U == null ? void 0 : U[se]) == null ? void 0 : ge.orderFrom,
|
|
1503
1504
|
fallbackTaxes: P ? R.taxes : null
|
|
1504
1505
|
}, O;
|
|
1505
1506
|
}, {});
|
|
1506
1507
|
_.value = A, y.value = { ...A }, f.value = !1;
|
|
1507
|
-
}, { categories:
|
|
1508
|
+
}, { categories: z, selectedCategories: Y } = Ve(), S = F(null);
|
|
1508
1509
|
function ae() {
|
|
1509
1510
|
S.value && S.value.toggleAttributeFilter();
|
|
1510
1511
|
}
|
|
@@ -1516,7 +1517,7 @@ const et = /* @__PURE__ */ G({
|
|
|
1516
1517
|
}
|
|
1517
1518
|
const oe = () => {
|
|
1518
1519
|
Y.value && k();
|
|
1519
|
-
}, { t:
|
|
1520
|
+
}, { t: q } = $e(), K = h(() => {
|
|
1520
1521
|
var P, T;
|
|
1521
1522
|
return (T = (P = l.currentCatalog) == null ? void 0 : P.linkItemRules) == null ? void 0 : T.length;
|
|
1522
1523
|
}), {
|
|
@@ -1526,10 +1527,10 @@ const et = /* @__PURE__ */ G({
|
|
|
1526
1527
|
handleSubmit: re,
|
|
1527
1528
|
catalogManager: Q,
|
|
1528
1529
|
schedulerManager: ne
|
|
1529
|
-
} =
|
|
1530
|
+
} = kt(!1);
|
|
1530
1531
|
return (P, T) => {
|
|
1531
|
-
const
|
|
1532
|
-
return r(
|
|
1532
|
+
const U = B("fm-button");
|
|
1533
|
+
return r(z).length ? (m(), w("div", na, [
|
|
1533
1534
|
b("div", sa, [
|
|
1534
1535
|
b("div", ua, [
|
|
1535
1536
|
r(Y) ? (m(), I(ra, {
|
|
@@ -1545,8 +1546,8 @@ const et = /* @__PURE__ */ G({
|
|
|
1545
1546
|
}, {
|
|
1546
1547
|
filter: $(() => [
|
|
1547
1548
|
d(Je, { onToggleAttributeFilter: ae }),
|
|
1548
|
-
u.value.multiScheduler ? (m(), I(
|
|
1549
|
-
|
|
1549
|
+
u.value.multiScheduler ? (m(), I(He, { key: 0 })) : M("", !0),
|
|
1550
|
+
K.value ? (m(), I(We, {
|
|
1550
1551
|
key: 1,
|
|
1551
1552
|
"current-restaurant-attr-params": r(l).state.currentRestaurantAttrParams,
|
|
1552
1553
|
onConfirm: T[0] || (T[0] = (A) => r(l).setRestaurantAttrParams(A))
|
|
@@ -1559,8 +1560,8 @@ const et = /* @__PURE__ */ G({
|
|
|
1559
1560
|
])) : (m(), w("div", ia, [
|
|
1560
1561
|
b("div", ca, [
|
|
1561
1562
|
d(Je),
|
|
1562
|
-
u.value.multiScheduler ? (m(), I(
|
|
1563
|
-
|
|
1563
|
+
u.value.multiScheduler ? (m(), I(He, { key: 0 })) : M("", !0),
|
|
1564
|
+
K.value ? (m(), I(We, {
|
|
1564
1565
|
key: 1,
|
|
1565
1566
|
"current-restaurant-attr-params": r(l).state.currentRestaurantAttrParams,
|
|
1566
1567
|
onConfirm: T[3] || (T[3] = (A) => r(l).setRestaurantAttrParams(A))
|
|
@@ -1569,15 +1570,15 @@ const et = /* @__PURE__ */ G({
|
|
|
1569
1570
|
c.value.create ? (m(), I(_e, {
|
|
1570
1571
|
key: 0,
|
|
1571
1572
|
action: {
|
|
1572
|
-
text: r(
|
|
1573
|
+
text: r(q)("menu.product.empty.with_create.action"),
|
|
1573
1574
|
callback: Z
|
|
1574
1575
|
},
|
|
1575
|
-
subtitle: r(
|
|
1576
|
-
title: r(
|
|
1576
|
+
subtitle: r(q)("menu.product.empty.with_create.subtitle"),
|
|
1577
|
+
title: r(q)("menu.product.empty.with_create.title")
|
|
1577
1578
|
}, null, 8, ["action", "subtitle", "title"])) : a.value ? (m(), I(_e, {
|
|
1578
1579
|
key: 1,
|
|
1579
|
-
subtitle: r(
|
|
1580
|
-
title: r(
|
|
1580
|
+
subtitle: r(q)("menu.product.empty.no_scheduler.subtitle"),
|
|
1581
|
+
title: r(q)("menu.product.empty.no_scheduler.title")
|
|
1581
1582
|
}, {
|
|
1582
1583
|
action: $(() => [
|
|
1583
1584
|
d(qe, {
|
|
@@ -1592,8 +1593,8 @@ const et = /* @__PURE__ */ G({
|
|
|
1592
1593
|
onSubmit: r(re)
|
|
1593
1594
|
}, {
|
|
1594
1595
|
default: $(({ trigger: A }) => [
|
|
1595
|
-
d(
|
|
1596
|
-
label: r(
|
|
1596
|
+
d(U, {
|
|
1597
|
+
label: r(q)("menu.common.actions.link_product"),
|
|
1597
1598
|
"prepend-icon": "link",
|
|
1598
1599
|
onClick: A
|
|
1599
1600
|
}, null, 8, ["label", "onClick"])
|
|
@@ -1604,8 +1605,8 @@ const et = /* @__PURE__ */ G({
|
|
|
1604
1605
|
_: 1
|
|
1605
1606
|
}, 8, ["subtitle", "title"])) : (m(), I(_e, {
|
|
1606
1607
|
key: 2,
|
|
1607
|
-
subtitle: r(
|
|
1608
|
-
title: r(
|
|
1608
|
+
subtitle: r(q)("menu.product.empty.with_scheduler.subtitle"),
|
|
1609
|
+
title: r(q)("menu.product.empty.with_scheduler.title")
|
|
1609
1610
|
}, {
|
|
1610
1611
|
action: $(() => [
|
|
1611
1612
|
d(qe, {
|
|
@@ -1620,8 +1621,8 @@ const et = /* @__PURE__ */ G({
|
|
|
1620
1621
|
onSubmit: r(re)
|
|
1621
1622
|
}, {
|
|
1622
1623
|
default: $(({ trigger: A }) => [
|
|
1623
|
-
d(
|
|
1624
|
-
label: r(
|
|
1624
|
+
d(U, {
|
|
1625
|
+
label: r(q)("menu.common.actions.apply_product"),
|
|
1625
1626
|
onClick: A
|
|
1626
1627
|
}, null, 8, ["label", "onClick"])
|
|
1627
1628
|
]),
|
|
@@ -1636,5 +1637,5 @@ const et = /* @__PURE__ */ G({
|
|
|
1636
1637
|
});
|
|
1637
1638
|
export {
|
|
1638
1639
|
et as _,
|
|
1639
|
-
|
|
1640
|
+
Ra as a
|
|
1640
1641
|
};
|