@feedmepos/mf-menu 0.32.63-dev.3 → 0.32.63-dev.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-DHxlR--3.js → App-D8wf-3gk.js} +6 -6
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-6noIwjis.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BBMuf15P.js} +3 -3
- package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-CMI2Nh0n.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-CR7AGqfY.js} +3 -3
- package/dist/{Catalog-B-S0gygH.js → Catalog-Dzs2obez.js} +6 -6
- package/dist/{Category-DOhNama9.js → Category-CF-bfcWZ.js} +4 -4
- package/dist/{Category-DGDddfLx.js → Category-CRG_zlyN.js} +4 -4
- package/dist/{CookingGuide-CUR57F4P.js → CookingGuide-CumoLERq.js} +5 -5
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-bIONGM6k.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-Cw0LfYWI.js} +1 -1
- package/dist/{Group-BsGJ0omP.js → Group-Bl6IXiL5.js} +1 -1
- package/dist/{Group-z-0jQPCd.js → Group-XPHRRll5.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-bBWkJ2Hx.js → Group.vue_vue_type_script_setup_true_lang-Dp41u-9T.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BbqcH4sM.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DBim4X7-.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CVGilzd0.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-AK0_2AOY.js} +6 -6
- package/dist/{Ingredient-D38IVDXK.js → Ingredient-BBi88auU.js} +4 -4
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CKmyz9CP.js → InventoryBinding.vue_vue_type_script_setup_true_lang-D8C0do_V.js} +2 -2
- package/dist/{LinkProductSideSheet-DsBA_o9g.js → LinkProductSideSheet-BQc-iCkQ.js} +4 -4
- package/dist/{MenuSetting-D-tln58o.js → MenuSetting-FTo1hoSN.js} +7 -7
- package/dist/{OrderPacing-BdCEHKD9.js → OrderPacing-BUcd8nJm.js} +5 -5
- package/dist/{PrintRoute-DKFMqyeI.js → PrintRoute-DUnqYpDY.js} +5 -5
- package/dist/{Product-Dzo4ljes.js → Product-5jToTVxL.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-BtE2aiwU.js → Product.vue_vue_type_script_setup_true_lang-CvUR3VeZ.js} +13 -13
- package/dist/{ProductInternalTools-Z6XR4zko.js → ProductInternalTools-DVo8n6WR.js} +6 -6
- package/dist/{Products-CCo675Ee.js → Products-74l_V3s-.js} +51 -51
- package/dist/{Publish-tixV8Of1.js → Publish-C_N7lkj5.js} +4 -4
- package/dist/{Recipe-V9kzxmlf.js → Recipe-Ds_84fu9.js} +5 -5
- package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-DBhAzVz3.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-B1wtDQ9P.js} +1 -1
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-D9DqmAVY.js → RuleView.vue_vue_type_script_setup_true_lang-ntxQXlpV.js} +193 -193
- package/dist/{Scheduler-0UpDGQKJ.js → Scheduler--pD1opc1.js} +3 -3
- package/dist/{ServingSequence-CutiXht7.js → ServingSequence-B3xxkMbp.js} +3 -3
- package/dist/{Setting-jyYmoDiq.js → Setting-GBA945nB.js} +5 -5
- package/dist/{Subcategory-CQSKOLjU.js → Subcategory-BikyD-je.js} +6 -6
- package/dist/{Takeaway-CQ0m09TB.js → Takeaway-DqDIobRV.js} +1 -1
- package/dist/{Takeaway-DeCthkOI.js → Takeaway-XPKWPa1W.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-FHE6oQ0d.js → Takeaway.vue_vue_type_script_setup_true_lang-CJG-SwOd.js} +5 -5
- package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-D9Ga3fOj.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-ogrcEhDA.js} +1 -1
- package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-Bz32rpvX.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-BZfaB7Vl.js} +2 -2
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DCPGAyOm.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DaSfi9fx.js} +14 -14
- package/dist/{Unit-_XiPfauV.js → Unit-yJJmRvha.js} +2 -2
- package/dist/{Variant-DfdMywhn.js → Variant-DcCYBJS2.js} +3 -3
- package/dist/{_id_-Yj5av4B4.js → _id_-BpkYdn5i.js} +9 -9
- package/dist/{app-BcGgfvbE.js → app-BMI3O5C9.js} +32 -32
- package/dist/{app-CqdVluGs.js → app-BzMTHTrI.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/assets/{override-menu-CHL7Bynw.js → linked-status-C8NLd-zI.js} +4 -4
- package/dist/assets/{menu-export-CK5bJyLT.js → menu-export-hXupkCVZ.js} +3 -3
- package/dist/assets/{linked-status-DdDQXL8Y.js → override-menu-CwJOJV2k.js} +4 -4
- package/dist/assets/{validate-menu-g2fslPcE.js → validate-menu-BrXEl7Mi.js} +3 -3
- package/dist/{catalog-B_yk-l1-.js → catalog-L2sdRcQf.js} +1 -1
- package/dist/{catalogSetting-Dl7uIiJm.js → catalogSetting-CGSmZhMj.js} +1 -1
- package/dist/{currency-BpjSDqef.js → currency-QIXheiUu.js} +1 -1
- package/dist/{dayjs.min-CVH5LqOA.js → dayjs.min-CGH3EzsL.js} +2 -2
- package/dist/{discardConfirm-fCmrAVO1.js → discardConfirm-B61hQjlH.js} +1 -1
- package/dist/{index-LYc0WKDO.js → index-CUcUva0h.js} +6 -6
- package/dist/{index-Cru6sUb6.js → index-DCSeBwkM.js} +5 -5
- package/dist/{index.vue_vue_type_script_setup_true_lang-qgDBinUn.js → index.vue_vue_type_script_setup_true_lang-BVBi4Vvc.js} +439 -439
- package/dist/{item-EPxRgVm0.js → item-BMyRZqY8.js} +171 -170
- package/dist/{jszip.min-CNgWv4I3.js → jszip.min-BaD6pNmW.js} +3 -3
- package/dist/{linkProducts-DvQ0oP1V.js → linkProducts-CqH6KCgg.js} +4 -4
- package/dist/{memberPricing-deWSH2K0.js → memberPricing-DNAuPva3.js} +1 -1
- package/dist/{menu-DKJ7olgK.js → menu-BNrZkzpK.js} +1 -1
- package/dist/{menuV2-CB3eZiiP.js → menuV2-D1bGhwPG.js} +41 -41
- package/dist/{order_pacing-DvP19Nxa.js → order_pacing-CmC9xxja.js} +5 -5
- package/dist/{priceTier-DyxDcoSh.js → priceTier-DZ5JRGkT.js} +1 -1
- package/dist/{rules-GmuBnHtU.js → rules-B2yeUFyY.js} +3 -3
- package/dist/{scheduler-BWAzMbPl.js → scheduler-DVKJQGbT.js} +5 -5
- package/dist/{toExcel-BMOGsD6n.js → toExcel-D8feJ9ZC.js} +2 -2
- package/dist/{unit-BCREKGn9.js → unit-DI5JogzR.js} +3 -3
- package/package.json +1 -1
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
import { defineStore as Ni } from "pinia";
|
|
2
2
|
import { defineComponent as fe, resolveComponent as M, createElementBlock as W, createBlock as Q, openBlock as _, createElementVNode as C, createVNode as h, toDisplayString as oe, Fragment as ve, renderList as Ie, h as Ue, ref as H, computed as E, watch as Se, unref as m, renderSlot as Oe, withCtx as F, createCommentVNode as ee, Transition as ar, normalizeClass as Ve, resolveDynamicComponent as Cn, withDirectives as Xe, vShow as Pn, mergeProps as Bi, withModifiers as ct, onBeforeUnmount as Li, resolveDirective as Ht, onMounted as Wt, onUnmounted as Eo, createTextVNode as Sn, getCurrentInstance as Oo, render as xn, useSlots as rr, markRaw as sr, mergeModels as Xo, useModel as lr, isVNode as ur, nextTick as ji, normalizeProps as cr, guardReactiveProps as dr, normalizeStyle as mr } from "vue";
|
|
3
|
-
import { V as pr, W as fr, g as Ne, h as Be, k as Pe, T as hr, X as gr, s as Wi, d as Ce, m as at, j as Te, a as Ye, n as vr, u as De, b as st, i as pt, Y as br, Z as yr, $ as Gi, a0 as _n, a1 as Zo, a2 as Gn, a3 as Et, a4 as _r, a5 as wr, a6 as Qo, a7 as kr, a8 as Cr, a9 as Jo, aa as Sr, ab as xr, ac as Ar, ad as ei, ae as ti, t as Hi, af as Tr, F as At, x as ni, r as Rr, o as Ir, l as Er, I as Hn, ag as Or, Q as Dr, w as oi, v as $r, ah as Pr } from "./index.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import { V as pr, W as fr, g as Ne, h as Be, k as Pe, T as hr, X as gr, s as Wi, d as Ce, m as at, j as Te, a as Ye, n as vr, u as De, b as st, i as pt, Y as br, Z as yr, $ as Gi, a0 as _n, a1 as Zo, a2 as Gn, a3 as Et, a4 as _r, a5 as wr, a6 as Qo, a7 as kr, a8 as Cr, a9 as Jo, aa as Sr, ab as xr, ac as Ar, ad as ei, ae as ti, t as Hi, af as Tr, F as At, x as ni, r as Rr, o as Ir, l as Er, I as Hn, ag as Or, Q as Dr, w as oi, v as $r, ah as Pr } from "./index.vue_vue_type_script_setup_true_lang-BVBi4Vvc.js";
|
|
4
4
|
import { useI18n as ge, useCoreStore as zt, CustomAttributesForm as Ki } from "@feedmepos/mf-common";
|
|
5
5
|
import { useDialog as tt, useSnackbar as Qe, useDialogChild as Nt, FmButtonVariant as ze, components as Ee, FmButtonColorThemeVariant as nt, useBreakpoints as qi } from "@feedmepos/ui-library";
|
|
6
|
-
import { C as gt } from "./catalog-
|
|
7
|
-
import { g as co, a as Vr, m as Fr, i as Mr } from "./menuV2-
|
|
6
|
+
import { C as gt } from "./catalog-L2sdRcQf.js";
|
|
7
|
+
import { g as co, a as Vr, m as Fr, i as Mr } from "./menuV2-D1bGhwPG.js";
|
|
8
8
|
import { c as Yi } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
|
9
9
|
import { a as ii, _ as Vt } from "./tooltip-B5BiPMx9.js";
|
|
10
|
-
import { H as Ur, L as zr } from "./LinkProductSideSheet-
|
|
11
|
-
import { _ as Ke, u as Nr, a as Br } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
10
|
+
import { H as Ur, L as zr } from "./LinkProductSideSheet-BQc-iCkQ.js";
|
|
11
|
+
import { _ as Ke, u as Nr, a as Br } from "./RuleView.vue_vue_type_script_setup_true_lang-ntxQXlpV.js";
|
|
12
12
|
import { a as Gt, s as mo, F as Lr, _ as jr } from "./index-CD_omf3p.js";
|
|
13
|
-
import { e as Wr } from "./app-
|
|
14
|
-
import { l as $e, u as Xt } from "./discardConfirm-
|
|
13
|
+
import { e as Wr } from "./app-BMI3O5C9.js";
|
|
14
|
+
import { l as $e, u as Xt } from "./discardConfirm-B61hQjlH.js";
|
|
15
15
|
import { _ as Tt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
16
|
import { useAppStore as cn, RemyButton as An } from "@feedmepos/mf-remy-panel";
|
|
17
17
|
import { _ as yt } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
|
|
18
|
-
import { u as Gr, r as Hr } from "./rules-
|
|
19
|
-
import { _ as Xi, a as Tn, b as Rn, c as In } from "./TranslationFieldSection.vue_vue_type_script_setup_true_lang-
|
|
18
|
+
import { u as Gr, r as Hr } from "./rules-B2yeUFyY.js";
|
|
19
|
+
import { _ as Xi, a as Tn, b as Rn, c as In } from "./TranslationFieldSection.vue_vue_type_script_setup_true_lang-ogrcEhDA.js";
|
|
20
20
|
import { a as po, g as Ct } from "./translation-fNx6yEpy.js";
|
|
21
21
|
import { c as En } from "./object-DVUNCr7w.js";
|
|
22
|
-
import { _ as Do } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-
|
|
23
|
-
import { u as Kr } from "./menu-
|
|
22
|
+
import { _ as Do } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-BZfaB7Vl.js";
|
|
23
|
+
import { u as Kr } from "./menu-BNrZkzpK.js";
|
|
24
24
|
import { c as Bt } from "./check-C9mY6LiX.js";
|
|
25
|
-
import { _ as bt, l as fo, T as qr } from "./index-
|
|
25
|
+
import { _ as bt, l as fo, T as qr } from "./index-CUcUva0h.js";
|
|
26
26
|
import { useInventoryStore as Zi, InventoryBindingForm as Yr, InventoryBindingSummary as Xr } from "@feedmepos/mf-inventory-portal";
|
|
27
|
-
import { f as rt } from "./currency-
|
|
28
|
-
import { u as Vn } from "./memberPricing-
|
|
29
|
-
import { u as Qi } from "./priceTier-
|
|
27
|
+
import { f as rt } from "./currency-QIXheiUu.js";
|
|
28
|
+
import { u as Vn } from "./memberPricing-DNAuPva3.js";
|
|
29
|
+
import { u as Qi } from "./priceTier-DZ5JRGkT.js";
|
|
30
30
|
import { u as Zr } from "./search-BAPEUu1R.js";
|
|
31
31
|
import { c as Qr } from "./string-DpfFixWH.js";
|
|
32
32
|
import { d as Ji } from "./RuleConditionSelector.vue_vue_type_style_index_0_lang-CK8z7qA8.js";
|
|
33
|
-
import { _ as Jr } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-
|
|
34
|
-
import { u as es, a as ts } from "./order_pacing-
|
|
35
|
-
import { V as ai } from "./index-
|
|
33
|
+
import { _ as Jr } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-BBMuf15P.js";
|
|
34
|
+
import { u as es, a as ts } from "./order_pacing-CmC9xxja.js";
|
|
35
|
+
import { V as ai } from "./index-DCSeBwkM.js";
|
|
36
36
|
var Kn, mn, qn = 0, Yn = 0;
|
|
37
37
|
function ns(e, t, n) {
|
|
38
38
|
var o = 0, i = new Array(16);
|
|
@@ -3115,7 +3115,7 @@ const Yl = { class: "flex flex-col items-center gap-12" }, Xl = { class: "fm-typ
|
|
|
3115
3115
|
return !(v in (((S = c.value) == null ? void 0 : S.imageSet) ?? {}));
|
|
3116
3116
|
})
|
|
3117
3117
|
);
|
|
3118
|
-
function
|
|
3118
|
+
function Z() {
|
|
3119
3119
|
A && clearTimeout(A), A = null;
|
|
3120
3120
|
}
|
|
3121
3121
|
async function ne() {
|
|
@@ -3132,24 +3132,25 @@ const Yl = { class: "flex flex-col items-center gap-12" }, Xl = { class: "fm-typ
|
|
|
3132
3132
|
), g.value = !0;
|
|
3133
3133
|
const re = Date.now(), D = { ...R.value };
|
|
3134
3134
|
Object.entries(D).forEach(([O, K]) => {
|
|
3135
|
-
|
|
3135
|
+
const X = f.value[O] === "active" && q[O] !== "active", le = f.value[O] === "failed";
|
|
3136
|
+
!X && !le && re < K || (delete D[O], b.value = { ...b.value, [O]: re });
|
|
3136
3137
|
}), R.value = D;
|
|
3137
3138
|
} catch {
|
|
3138
3139
|
return;
|
|
3139
3140
|
}
|
|
3140
|
-
|
|
3141
|
+
Z(), (Object.values(f.value).some((S) => S === "pending") || Object.keys(R.value).length > 0) && n.modelValue && (A = setTimeout(ne, 5e3));
|
|
3141
3142
|
}
|
|
3142
3143
|
Se(
|
|
3143
3144
|
() => [n.modelValue, n.image],
|
|
3144
3145
|
([v, S]) => {
|
|
3145
3146
|
if (!v) {
|
|
3146
|
-
|
|
3147
|
+
Z(), T.value = !1;
|
|
3147
3148
|
return;
|
|
3148
3149
|
}
|
|
3149
3150
|
c.value = S ? { ...S, imageSet: { ...S.imageSet } } : null, p.value = c.value ? { ...c.value, imageSet: { ...c.value.imageSet } } : null, f.value = {}, g.value = !1, w.value = {}, b.value = {}, R.value = {}, y.value = null, ne();
|
|
3150
3151
|
},
|
|
3151
3152
|
{ immediate: !0 }
|
|
3152
|
-
), Li(
|
|
3153
|
+
), Li(Z);
|
|
3153
3154
|
async function j(v) {
|
|
3154
3155
|
if (!(!c.value || !v.length))
|
|
3155
3156
|
try {
|
|
@@ -3307,7 +3308,7 @@ const Yl = { class: "flex flex-col items-center gap-12" }, Xl = { class: "fm-typ
|
|
|
3307
3308
|
return _(), Q(O, {
|
|
3308
3309
|
id: "manage-product-image",
|
|
3309
3310
|
modelValue: u.value,
|
|
3310
|
-
"onUpdate:modelValue": S[4] || (S[4] = (
|
|
3311
|
+
"onUpdate:modelValue": S[4] || (S[4] = (X) => u.value = X),
|
|
3311
3312
|
"close-button": "",
|
|
3312
3313
|
"max-width": 860
|
|
3313
3314
|
}, {
|
|
@@ -3327,7 +3328,7 @@ const Yl = { class: "flex flex-col items-center gap-12" }, Xl = { class: "fm-typ
|
|
|
3327
3328
|
label: m(i)("menu.common.actions.cancel"),
|
|
3328
3329
|
size: "lg",
|
|
3329
3330
|
variant: "tertiary",
|
|
3330
|
-
onClick: S[1] || (S[1] = (
|
|
3331
|
+
onClick: S[1] || (S[1] = (X) => u.value = !1)
|
|
3331
3332
|
}, null, 8, ["label"])
|
|
3332
3333
|
])
|
|
3333
3334
|
]),
|
|
@@ -3368,7 +3369,7 @@ const Yl = { class: "flex flex-col items-center gap-12" }, Xl = { class: "fm-typ
|
|
|
3368
3369
|
Xe((_(), W("button", {
|
|
3369
3370
|
class: "block shrink-0 cursor-pointer overflow-hidden rounded-md",
|
|
3370
3371
|
type: "button",
|
|
3371
|
-
onClick: S[0] || (S[0] = (
|
|
3372
|
+
onClick: S[0] || (S[0] = (X) => N(null))
|
|
3372
3373
|
}, [
|
|
3373
3374
|
h(Gt, {
|
|
3374
3375
|
alt: "Original",
|
|
@@ -3384,72 +3385,72 @@ const Yl = { class: "flex flex-col items-center gap-12" }, Xl = { class: "fm-typ
|
|
|
3384
3385
|
C("p", yu, oe(m(i)("menu.product_image.manage.custom_sizing")), 1)
|
|
3385
3386
|
])
|
|
3386
3387
|
]),
|
|
3387
|
-
(_(!0), W(ve, null, Ie(V.value, (
|
|
3388
|
-
key:
|
|
3388
|
+
(_(!0), W(ve, null, Ie(V.value, (X) => (_(), W("div", {
|
|
3389
|
+
key: X.ratio,
|
|
3389
3390
|
class: "flex items-center gap-16 py-12"
|
|
3390
3391
|
}, [
|
|
3391
3392
|
Xe((_(), W("button", {
|
|
3392
3393
|
type: "button",
|
|
3393
|
-
disabled: !
|
|
3394
|
+
disabled: !X.url,
|
|
3394
3395
|
class: "block shrink-0 cursor-pointer overflow-hidden rounded-md disabled:cursor-default disabled:opacity-40",
|
|
3395
|
-
onClick: (le) =>
|
|
3396
|
+
onClick: (le) => X.url && N(X.ratio)
|
|
3396
3397
|
}, [
|
|
3397
3398
|
h(Gt, {
|
|
3398
|
-
alt:
|
|
3399
|
+
alt: X.label,
|
|
3399
3400
|
crossorigin: !1,
|
|
3400
3401
|
size: { width: 80, height: 80 },
|
|
3401
|
-
src:
|
|
3402
|
+
src: X.url
|
|
3402
3403
|
}, null, 8, ["alt", "src"])
|
|
3403
3404
|
], 8, _u)), [
|
|
3404
3405
|
[K, m(i)("menu.product_image.preview.title")]
|
|
3405
3406
|
]),
|
|
3406
3407
|
C("div", wu, [
|
|
3407
3408
|
C("div", ku, [
|
|
3408
|
-
C("p", Cu, oe(
|
|
3409
|
-
|
|
3409
|
+
C("p", Cu, oe(X.label), 1),
|
|
3410
|
+
X.required ? (_(), Q(q, {
|
|
3410
3411
|
key: 0,
|
|
3411
3412
|
color: "negative",
|
|
3412
3413
|
label: m(i)("menu.product_image.manage.required"),
|
|
3413
3414
|
size: "sm"
|
|
3414
3415
|
}, null, 8, ["label"])) : ee("", !0),
|
|
3415
|
-
|
|
3416
|
+
X.status === "pending" ? (_(), Q(q, {
|
|
3416
3417
|
key: 1,
|
|
3417
3418
|
color: "warning",
|
|
3418
3419
|
label: m(i)("menu.product_image.status.pending"),
|
|
3419
3420
|
size: "sm"
|
|
3420
|
-
}, null, 8, ["label"])) :
|
|
3421
|
+
}, null, 8, ["label"])) : X.status === "failed" ? (_(), Q(q, {
|
|
3421
3422
|
key: 2,
|
|
3422
3423
|
color: "negative",
|
|
3423
3424
|
label: m(i)("menu.product_image.status.failed"),
|
|
3424
3425
|
size: "sm"
|
|
3425
3426
|
}, null, 8, ["label"])) : ee("", !0)
|
|
3426
3427
|
]),
|
|
3427
|
-
|
|
3428
|
-
!
|
|
3428
|
+
X.purpose ? (_(), W("p", Su, oe(m(i)(`menu.product_image.purpose.${X.purpose}`)), 1)) : ee("", !0),
|
|
3429
|
+
!X.required && !X.url ? (_(), W("p", xu, oe(m(i)("menu.product_image.manage.custom_image_hint")), 1)) : ee("", !0)
|
|
3429
3430
|
]),
|
|
3430
3431
|
C("div", Au, [
|
|
3431
3432
|
Xe(h(P, {
|
|
3432
|
-
disabled: d.value || y.value !== null ||
|
|
3433
|
+
disabled: d.value || y.value !== null || X.status === "pending",
|
|
3433
3434
|
icon: "image",
|
|
3434
3435
|
variant: m(ze).Tertiary,
|
|
3435
|
-
onClick: (le) => pe(
|
|
3436
|
+
onClick: (le) => pe(X)
|
|
3436
3437
|
}, null, 8, ["disabled", "variant", "onClick"]), [
|
|
3437
3438
|
[K, m(i)("menu.product_image.replace.action")]
|
|
3438
3439
|
]),
|
|
3439
3440
|
Xe(h(P, {
|
|
3440
|
-
disabled: d.value || y.value !== null ||
|
|
3441
|
+
disabled: d.value || y.value !== null || X.status === "pending",
|
|
3441
3442
|
icon: "autorenew",
|
|
3442
3443
|
variant: m(ze).Tertiary,
|
|
3443
|
-
onClick: (le) => te(
|
|
3444
|
+
onClick: (le) => te(X)
|
|
3444
3445
|
}, null, 8, ["disabled", "variant", "onClick"]), [
|
|
3445
3446
|
[K, m(i)("menu.product_image.regenerate.action")]
|
|
3446
3447
|
]),
|
|
3447
|
-
|
|
3448
|
+
X.removable ? (_(), Q(P, {
|
|
3448
3449
|
key: 0,
|
|
3449
|
-
disabled: d.value || y.value !== null ||
|
|
3450
|
+
disabled: d.value || y.value !== null || X.status === "pending",
|
|
3450
3451
|
icon: "close",
|
|
3451
3452
|
variant: m(ze).Tertiary,
|
|
3452
|
-
onClick: (le) => ce(
|
|
3453
|
+
onClick: (le) => ce(X.ratio)
|
|
3453
3454
|
}, null, 8, ["disabled", "variant", "onClick"])) : ee("", !0)
|
|
3454
3455
|
])
|
|
3455
3456
|
]))), 128))
|
|
@@ -3472,9 +3473,9 @@ const Yl = { class: "flex flex-col items-center gap-12" }, Xl = { class: "fm-typ
|
|
|
3472
3473
|
])) : ee("", !0),
|
|
3473
3474
|
h(D, {
|
|
3474
3475
|
modelValue: T.value,
|
|
3475
|
-
"onUpdate:modelValue": S[2] || (S[2] = (
|
|
3476
|
+
"onUpdate:modelValue": S[2] || (S[2] = (X) => T.value = X),
|
|
3476
3477
|
"max-width": 560,
|
|
3477
|
-
"onOn:clickedAway": S[3] || (S[3] = (
|
|
3478
|
+
"onOn:clickedAway": S[3] || (S[3] = (X) => T.value = !1)
|
|
3478
3479
|
}, {
|
|
3479
3480
|
"dialog-header": F(() => [
|
|
3480
3481
|
C("p", $u, oe($.value), 1)
|
|
@@ -3642,7 +3643,7 @@ const zu = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
|
|
|
3642
3643
|
}
|
|
3643
3644
|
}
|
|
3644
3645
|
}
|
|
3645
|
-
function
|
|
3646
|
+
function Z(G) {
|
|
3646
3647
|
z(
|
|
3647
3648
|
$(G) ? { type: "legacy" } : { type: "image", imageId: G._id },
|
|
3648
3649
|
V(G)
|
|
@@ -3662,12 +3663,12 @@ const zu = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
|
|
|
3662
3663
|
const P = _n(S);
|
|
3663
3664
|
if (P) throw new Error(i(`menu.product_image.error.${P}`));
|
|
3664
3665
|
if (G.type === "staged") {
|
|
3665
|
-
const K = I.value.find((
|
|
3666
|
+
const K = I.value.find((X) => X._id === G.imageId);
|
|
3666
3667
|
if (!K) return;
|
|
3667
3668
|
URL.revokeObjectURL(K.previewUrl), o(
|
|
3668
3669
|
"update:staged",
|
|
3669
3670
|
I.value.map(
|
|
3670
|
-
(
|
|
3671
|
+
(X) => X._id === G.imageId ? { ...X, file: S, previewUrl: URL.createObjectURL(S) } : X
|
|
3671
3672
|
)
|
|
3672
3673
|
);
|
|
3673
3674
|
return;
|
|
@@ -3885,7 +3886,7 @@ const zu = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12"
|
|
|
3885
3886
|
title: m(i)("menu.remy.title"),
|
|
3886
3887
|
class: "absolute bottom-8 right-8 rounded-full bg-fm-color-neutral-white w-32 h-32 flex items-center justify-center shadow-sm",
|
|
3887
3888
|
type: "button",
|
|
3888
|
-
onClick: ct((K) =>
|
|
3889
|
+
onClick: ct((K) => Z(O), ["stop"])
|
|
3889
3890
|
}, [
|
|
3890
3891
|
h(S, {
|
|
3891
3892
|
name: "auto_awesome",
|
|
@@ -7454,7 +7455,7 @@ const hp = {
|
|
|
7454
7455
|
function z(j) {
|
|
7455
7456
|
b.value.name = j;
|
|
7456
7457
|
}
|
|
7457
|
-
const
|
|
7458
|
+
const Z = Xt(() => {
|
|
7458
7459
|
if (R.value)
|
|
7459
7460
|
return !!b.value.name || !!(f.value && Object.keys(f.value).length > 0);
|
|
7460
7461
|
const j = r.categories.find((te) => te._id === b.value.id), ie = b.value.name !== (j == null ? void 0 : j.name), se = (j == null ? void 0 : j.name_locale) || {}, Y = f.value || {}, me = JSON.stringify(se) !== JSON.stringify(Y), pe = !!g.value || g.value === null && !!(j != null && j.thumbnail);
|
|
@@ -7531,7 +7532,7 @@ const hp = {
|
|
|
7531
7532
|
blameFormChildOnValidationFailed: !0
|
|
7532
7533
|
},
|
|
7533
7534
|
"max-width": 560,
|
|
7534
|
-
"onOn:clickedAway": m(
|
|
7535
|
+
"onOn:clickedAway": m(Z)
|
|
7535
7536
|
}, {
|
|
7536
7537
|
"side-sheet-header": F(() => [C("p", hp, oe(R.value ? m(u)("menu.category.manager.dialog.add.title") : m(u)("menu.category.title")), 1)]),
|
|
7537
7538
|
"side-sheet-footer": F(() => [C("div", Cp, [y.value ? ee("", !0) : (_(), Q(se, {
|
|
@@ -7880,9 +7881,9 @@ const Lp = /* @__PURE__ */ fe({
|
|
|
7880
7881
|
} = pt(st(Qe())), c = t, p = E(() => o.rules.item), f = E(() => !!o.state.currentCatalogId && !o.state.currentSchedulerId), g = E(() => {
|
|
7881
7882
|
var K;
|
|
7882
7883
|
const D = n.form.images ?? ((K = n.fallback) == null ? void 0 : K.images), O = n.form.image;
|
|
7883
|
-
return !D || !O || !D.some((
|
|
7884
|
-
...
|
|
7885
|
-
isDefault:
|
|
7884
|
+
return !D || !O || !D.some((X) => X._id === O) ? D : D.map((X) => ({
|
|
7885
|
+
...X,
|
|
7886
|
+
isDefault: X._id === O
|
|
7886
7887
|
}));
|
|
7887
7888
|
});
|
|
7888
7889
|
function w(D) {
|
|
@@ -7903,10 +7904,10 @@ const Lp = /* @__PURE__ */ fe({
|
|
|
7903
7904
|
return L.value.map((D) => D._id);
|
|
7904
7905
|
},
|
|
7905
7906
|
set(D = []) {
|
|
7906
|
-
const [O, ...K] = D.map((
|
|
7907
|
-
const le = I.value[
|
|
7907
|
+
const [O, ...K] = D.map((X) => {
|
|
7908
|
+
const le = I.value[X];
|
|
7908
7909
|
return le || {
|
|
7909
|
-
_id:
|
|
7910
|
+
_id: X,
|
|
7910
7911
|
position: null
|
|
7911
7912
|
};
|
|
7912
7913
|
});
|
|
@@ -7954,8 +7955,8 @@ const Lp = /* @__PURE__ */ fe({
|
|
|
7954
7955
|
const D = n.form.name2 || ((O = n.fallback) == null ? void 0 : O.name2);
|
|
7955
7956
|
return D ? o.items.filter((K) => !!K.category && K._id !== n.form._id && K.name2 === D).length : 0;
|
|
7956
7957
|
}), B = E(() => o.state.featureFlags.uniqueProductCode), k = E(() => {
|
|
7957
|
-
var
|
|
7958
|
-
const D = n.form.code || ((
|
|
7958
|
+
var X, le, Ae;
|
|
7959
|
+
const D = n.form.code || ((X = n.fallback) == null ? void 0 : X.code);
|
|
7959
7960
|
if (!D) return 0;
|
|
7960
7961
|
let O = o.itemCodeMap.get(D) || 0;
|
|
7961
7962
|
const K = o.items.find((xe) => xe._id === n.form._id);
|
|
@@ -7964,12 +7965,12 @@ const Lp = /* @__PURE__ */ fe({
|
|
|
7964
7965
|
}), O;
|
|
7965
7966
|
}), V = E(() => n.isAddon ? $t.ADD_ON : $t.PRODUCT);
|
|
7966
7967
|
function z(D) {
|
|
7967
|
-
var K,
|
|
7968
|
+
var K, X, le;
|
|
7968
7969
|
if (V.value === D) return;
|
|
7969
7970
|
const O = D == $t.ADD_ON;
|
|
7970
|
-
c("update:form", "category", n.isOverride ? O ? "" : ((K = n.fallback) == null ? void 0 : K.category) ?? ((
|
|
7971
|
+
c("update:form", "category", n.isOverride ? O ? "" : ((K = n.fallback) == null ? void 0 : K.category) ?? ((X = b.value.find((Ae) => !!Ae.value)) == null ? void 0 : X.value) : O ? null : (le = b.value.find((Ae) => !!Ae.value)) == null ? void 0 : le.value), O && (c("update:form", "additionalCategories", []), c("update:form", "subCategories", []));
|
|
7971
7972
|
}
|
|
7972
|
-
const
|
|
7973
|
+
const Z = cn();
|
|
7973
7974
|
Nn("apply-description", (D) => {
|
|
7974
7975
|
c("update:form", "description", D || "");
|
|
7975
7976
|
});
|
|
@@ -7984,7 +7985,7 @@ const Lp = /* @__PURE__ */ fe({
|
|
|
7984
7985
|
}
|
|
7985
7986
|
i.pushDataLayer({
|
|
7986
7987
|
event: "menu_catalog_item_general_remy_suggest_description"
|
|
7987
|
-
}),
|
|
7988
|
+
}), Z.activate({
|
|
7988
7989
|
prompt: `Suggest a menu description for ${n.form.name}`,
|
|
7989
7990
|
command: "suggestDescription"
|
|
7990
7991
|
});
|
|
@@ -8003,8 +8004,8 @@ const Lp = /* @__PURE__ */ fe({
|
|
|
8003
8004
|
t: Y
|
|
8004
8005
|
} = ge(), me = H(!1), pe = H("name"), te = E(() => {
|
|
8005
8006
|
var le, Ae;
|
|
8006
|
-
const D = [], O = "en-US", K = n.form.name_locale,
|
|
8007
|
-
return (n.form.name || (le = n.fallback) != null && le.name) && !
|
|
8007
|
+
const D = [], O = "en-US", K = n.form.name_locale, X = K == null ? void 0 : K[O];
|
|
8008
|
+
return (n.form.name || (le = n.fallback) != null && le.name) && !X && D.push({
|
|
8008
8009
|
locale: O,
|
|
8009
8010
|
name: n.form.name || ((Ae = n.fallback) == null ? void 0 : Ae.name) || "",
|
|
8010
8011
|
localeDisplay: Ct(O)
|
|
@@ -8017,8 +8018,8 @@ const Lp = /* @__PURE__ */ fe({
|
|
|
8017
8018
|
}), D;
|
|
8018
8019
|
}), ce = E(() => {
|
|
8019
8020
|
var le, Ae;
|
|
8020
|
-
const D = [], O = "en-US", K = n.form.description_locale,
|
|
8021
|
-
return (n.form.description || (le = n.fallback) != null && le.description) && !
|
|
8021
|
+
const D = [], O = "en-US", K = n.form.description_locale, X = K == null ? void 0 : K[O];
|
|
8022
|
+
return (n.form.description || (le = n.fallback) != null && le.description) && !X && D.push({
|
|
8022
8023
|
locale: O,
|
|
8023
8024
|
name: n.form.description || ((Ae = n.fallback) == null ? void 0 : Ae.description) || "",
|
|
8024
8025
|
localeDisplay: Ct(O)
|
|
@@ -8054,7 +8055,7 @@ const Lp = /* @__PURE__ */ fe({
|
|
|
8054
8055
|
});
|
|
8055
8056
|
return (D, O) => {
|
|
8056
8057
|
var Rt, Je;
|
|
8057
|
-
const K = M("fm-text-field"),
|
|
8058
|
+
const K = M("fm-text-field"), X = M("fm-button"), le = M("FmTooltip"), Ae = M("fm-textarea"), xe = M("fm-radio"), je = M("FmSnackbar"), ae = M("FmButton"), J = M("fm-radio-group"), ye = M("FmFormGroup"), ke = M("FmStepperField"), ue = Ht("tooltip");
|
|
8058
8059
|
return _(), W(ve, null, [h(Ke, {
|
|
8059
8060
|
title: m(Y)("menu.product.form.detail.title")
|
|
8060
8061
|
}, {
|
|
@@ -8093,7 +8094,7 @@ const Lp = /* @__PURE__ */ fe({
|
|
|
8093
8094
|
content: F(() => [C("div", Op, [(_(!0), W(ve, null, Ie(te.value, (he) => (_(), W("div", {
|
|
8094
8095
|
key: he.locale
|
|
8095
8096
|
}, oe(he.name) + " (" + oe(he.localeDisplay) + ") ", 1))), 128))])]),
|
|
8096
|
-
default: F(() => [h(
|
|
8097
|
+
default: F(() => [h(X, {
|
|
8097
8098
|
variant: "tertiary",
|
|
8098
8099
|
icon: "g_translate",
|
|
8099
8100
|
onClick: be,
|
|
@@ -8131,7 +8132,7 @@ const Lp = /* @__PURE__ */ fe({
|
|
|
8131
8132
|
}, oe(he.name) + " (" + oe(he.localeDisplay) + ") ", 1))), 128))])]),
|
|
8132
8133
|
default: F(() => {
|
|
8133
8134
|
var he;
|
|
8134
|
-
return [Xe(h(
|
|
8135
|
+
return [Xe(h(X, {
|
|
8135
8136
|
variant: "tertiary",
|
|
8136
8137
|
icon: "g_translate",
|
|
8137
8138
|
class: "cursor-pointer",
|
|
@@ -8539,17 +8540,17 @@ const Qp = /* @__PURE__ */ Tt(Yp, [["render", Zp]]), Jp = { class: "fm-typo-en-t
|
|
|
8539
8540
|
...Object.fromEntries($),
|
|
8540
8541
|
items: U.items.map((z) => {
|
|
8541
8542
|
var ne;
|
|
8542
|
-
const
|
|
8543
|
+
const Z = (ne = T.items) == null ? void 0 : ne.find(
|
|
8543
8544
|
(j) => j._id == z._id && j.combinationKey == z.combinationKey
|
|
8544
8545
|
);
|
|
8545
8546
|
return {
|
|
8546
8547
|
...z,
|
|
8547
|
-
...
|
|
8548
|
-
price: (
|
|
8549
|
-
price_variant: (
|
|
8550
|
-
priceTiers: (
|
|
8551
|
-
priceTiers_variant: (
|
|
8552
|
-
inventoryBindings: (
|
|
8548
|
+
...Z ?? {},
|
|
8549
|
+
price: (Z == null ? void 0 : Z.price) || null,
|
|
8550
|
+
price_variant: (Z == null ? void 0 : Z.price_variant) || null,
|
|
8551
|
+
priceTiers: (Z == null ? void 0 : Z.priceTiers) || null,
|
|
8552
|
+
priceTiers_variant: (Z == null ? void 0 : Z.priceTiers_variant) || null,
|
|
8553
|
+
inventoryBindings: (Z == null ? void 0 : Z.inventoryBindings) || null
|
|
8553
8554
|
};
|
|
8554
8555
|
})
|
|
8555
8556
|
};
|
|
@@ -9457,9 +9458,9 @@ const ih = /* @__PURE__ */ fe({
|
|
|
9457
9458
|
modelValue: re,
|
|
9458
9459
|
disabled: q,
|
|
9459
9460
|
"onUpdate:modelValue": (K) => {
|
|
9460
|
-
var
|
|
9461
|
+
var X;
|
|
9461
9462
|
if (S) {
|
|
9462
|
-
const le = (
|
|
9463
|
+
const le = (X = v.row.getParentRow()) == null ? void 0 : X.original;
|
|
9463
9464
|
if (!le) return;
|
|
9464
9465
|
k(le._id, P.combinationKey ?? "", "isDefault", K);
|
|
9465
9466
|
} else
|
|
@@ -9507,9 +9508,9 @@ const ih = /* @__PURE__ */ fe({
|
|
|
9507
9508
|
disabled: q,
|
|
9508
9509
|
rules: D ? void 0 : [(K) => ((K == null ? void 0 : K.length) ?? 0) > 0 || T("menu.group.option.product_title_required")],
|
|
9509
9510
|
"onUpdate:modelValue": (K) => {
|
|
9510
|
-
var
|
|
9511
|
+
var X;
|
|
9511
9512
|
if (re) {
|
|
9512
|
-
const le = (
|
|
9513
|
+
const le = (X = v.row.getParentRow()) == null ? void 0 : X.original;
|
|
9513
9514
|
if (!le) return;
|
|
9514
9515
|
k(le._id, P.combinationKey ?? "", "name", K || null);
|
|
9515
9516
|
} else
|
|
@@ -9518,8 +9519,8 @@ const ih = /* @__PURE__ */ fe({
|
|
|
9518
9519
|
class: "min-w-[300px]"
|
|
9519
9520
|
}, {
|
|
9520
9521
|
append: () => {
|
|
9521
|
-
var K,
|
|
9522
|
-
return (
|
|
9522
|
+
var K, X;
|
|
9523
|
+
return (X = (K = v.row.original) == null ? void 0 : K.items) != null && X.length ? Ue(Ee.FmIcon, {
|
|
9523
9524
|
name: "keyboard_arrow_up",
|
|
9524
9525
|
onClick: v.row.getToggleExpandedHandler(),
|
|
9525
9526
|
class: ["cursor-pointer", "transition-transform", v.row.getIsExpanded() ? "transform rotate-180" : ""],
|
|
@@ -9539,7 +9540,7 @@ const ih = /* @__PURE__ */ fe({
|
|
|
9539
9540
|
},
|
|
9540
9541
|
size: 400,
|
|
9541
9542
|
cell: (v) => {
|
|
9542
|
-
const S = v.getValue(), P = v.row.original, q = !y(null).priceEdit || P.orderFrom === Pe.enum.NONE, re = P.fallbackPrice, D = v.row.depth > 0, O = x.getMemberPricingPriceVariant(P.price_variant), K = Object.values(O).every((
|
|
9543
|
+
const S = v.getValue(), P = v.row.original, q = !y(null).priceEdit || P.orderFrom === Pe.enum.NONE, re = P.fallbackPrice, D = v.row.depth > 0, O = x.getMemberPricingPriceVariant(P.price_variant), K = Object.values(O).every((X) => X === null);
|
|
9543
9544
|
return h("div", {
|
|
9544
9545
|
class: "flex items-center gap-8"
|
|
9545
9546
|
}, [h(bt, {
|
|
@@ -9549,7 +9550,7 @@ const ih = /* @__PURE__ */ fe({
|
|
|
9549
9550
|
required: !re && !q,
|
|
9550
9551
|
nullable: !!re,
|
|
9551
9552
|
min: b.value ? void 0 : 0,
|
|
9552
|
-
"onUpdate:model-value": (
|
|
9553
|
+
"onUpdate:model-value": (X) => {
|
|
9553
9554
|
var le;
|
|
9554
9555
|
if (D) {
|
|
9555
9556
|
const Ae = (le = v.row.getParentRow()) == null ? void 0 : le.original;
|
|
@@ -9559,10 +9560,10 @@ const ih = /* @__PURE__ */ fe({
|
|
|
9559
9560
|
P.combinationKey ?? "",
|
|
9560
9561
|
// @ts-ignore
|
|
9561
9562
|
"price",
|
|
9562
|
-
|
|
9563
|
+
X
|
|
9563
9564
|
);
|
|
9564
9565
|
} else
|
|
9565
|
-
B(P._id, "price",
|
|
9566
|
+
B(P._id, "price", X);
|
|
9566
9567
|
},
|
|
9567
9568
|
showCurrency: !1,
|
|
9568
9569
|
class: "min-w-[88px]"
|
|
@@ -9575,11 +9576,11 @@ const ih = /* @__PURE__ */ fe({
|
|
|
9575
9576
|
showRemy: !1,
|
|
9576
9577
|
basePrice: S,
|
|
9577
9578
|
basePriceFallback: re ? rt(re) : void 0,
|
|
9578
|
-
"onUpdate:value": (
|
|
9579
|
+
"onUpdate:value": (X) => {
|
|
9579
9580
|
var Ae;
|
|
9580
9581
|
const le = {
|
|
9581
|
-
price:
|
|
9582
|
-
price_variant: qo(
|
|
9582
|
+
price: X.basePrice,
|
|
9583
|
+
price_variant: qo(X.priceVariants)
|
|
9583
9584
|
};
|
|
9584
9585
|
if (D) {
|
|
9585
9586
|
const xe = (Ae = v.row.getParentRow()) == null ? void 0 : Ae.original;
|
|
@@ -9590,11 +9591,11 @@ const ih = /* @__PURE__ */ fe({
|
|
|
9590
9591
|
}
|
|
9591
9592
|
}, {
|
|
9592
9593
|
default: ({
|
|
9593
|
-
trigger:
|
|
9594
|
+
trigger: X
|
|
9594
9595
|
}) => h(Ee.FmButton, {
|
|
9595
9596
|
variant: ze.Plain,
|
|
9596
9597
|
label: T("menu.product.form.member_price.configure.title"),
|
|
9597
|
-
onClick: () =>
|
|
9598
|
+
onClick: () => X()
|
|
9598
9599
|
}, {
|
|
9599
9600
|
default: () => h("span", {
|
|
9600
9601
|
class: "underline line-clamp-2 break-all"
|
|
@@ -9675,13 +9676,13 @@ const ih = /* @__PURE__ */ fe({
|
|
|
9675
9676
|
priceTiersVariant: S.priceTiers_variant,
|
|
9676
9677
|
disabled: P,
|
|
9677
9678
|
"onUpdate:value": (O) => {
|
|
9678
|
-
var
|
|
9679
|
+
var X;
|
|
9679
9680
|
const K = {
|
|
9680
9681
|
priceTiers: O.priceTiers,
|
|
9681
9682
|
priceTiers_variant: Ko(O.priceTiersVariant)
|
|
9682
9683
|
};
|
|
9683
9684
|
if (q) {
|
|
9684
|
-
const le = (
|
|
9685
|
+
const le = (X = v.row.getParentRow()) == null ? void 0 : X.original;
|
|
9685
9686
|
if (!le) return;
|
|
9686
9687
|
k(le._id, S.combinationKey ?? "", K);
|
|
9687
9688
|
} else
|
|
@@ -9695,10 +9696,10 @@ const ih = /* @__PURE__ */ fe({
|
|
|
9695
9696
|
"onUpdate:inventory": (O) => {
|
|
9696
9697
|
var K;
|
|
9697
9698
|
if (q) {
|
|
9698
|
-
const
|
|
9699
|
-
if (!
|
|
9699
|
+
const X = (K = v.row.getParentRow()) == null ? void 0 : K.original;
|
|
9700
|
+
if (!X) return;
|
|
9700
9701
|
k(
|
|
9701
|
-
|
|
9702
|
+
X._id,
|
|
9702
9703
|
S.combinationKey ?? "",
|
|
9703
9704
|
// @ts-ignore
|
|
9704
9705
|
"inventoryBindings",
|
|
@@ -9750,13 +9751,13 @@ const ih = /* @__PURE__ */ fe({
|
|
|
9750
9751
|
hideVariantSection: !0,
|
|
9751
9752
|
"onUpdate:combinations": (K) => {
|
|
9752
9753
|
var le, Ae;
|
|
9753
|
-
const
|
|
9754
|
+
const X = ((le = K[0]) == null ? void 0 : le.groups) || [];
|
|
9754
9755
|
if (q) {
|
|
9755
9756
|
const xe = (Ae = v.row.getParentRow()) == null ? void 0 : Ae.original;
|
|
9756
9757
|
if (!xe) return;
|
|
9757
|
-
k(xe._id, S.combinationKey ?? "", "groups",
|
|
9758
|
+
k(xe._id, S.combinationKey ?? "", "groups", X);
|
|
9758
9759
|
} else
|
|
9759
|
-
B(S._id, "groups",
|
|
9760
|
+
B(S._id, "groups", X);
|
|
9760
9761
|
}
|
|
9761
9762
|
}, {
|
|
9762
9763
|
default: ({
|
|
@@ -9824,10 +9825,10 @@ const ih = /* @__PURE__ */ fe({
|
|
|
9824
9825
|
});
|
|
9825
9826
|
}
|
|
9826
9827
|
function k(v, S, P, q) {
|
|
9827
|
-
var K,
|
|
9828
|
+
var K, X;
|
|
9828
9829
|
const re = Ce(n.group), D = (K = re.items[v].items) == null ? void 0 : K.findIndex((le) => le.combinationKey === S);
|
|
9829
9830
|
if (!Bt.isSet(D)) return;
|
|
9830
|
-
let O = (
|
|
9831
|
+
let O = (X = re.items[v].items) == null ? void 0 : X[D];
|
|
9831
9832
|
O && (typeof P == "object" && P !== null ? O = {
|
|
9832
9833
|
...O,
|
|
9833
9834
|
...P
|
|
@@ -9843,7 +9844,7 @@ const ih = /* @__PURE__ */ fe({
|
|
|
9843
9844
|
function z(v) {
|
|
9844
9845
|
n.config.isV4 ? o("update:group", v) : o("update:unmap-group", On(v));
|
|
9845
9846
|
}
|
|
9846
|
-
const
|
|
9847
|
+
const Z = E(() => n.categorizedItems.flatMap((v) => v.items).reduce((v, S) => {
|
|
9847
9848
|
var P;
|
|
9848
9849
|
return v[S._id] = {
|
|
9849
9850
|
price: S.price,
|
|
@@ -9875,7 +9876,7 @@ const ih = /* @__PURE__ */ fe({
|
|
|
9875
9876
|
if (!re || !re.variant || ((O = re.variant.variantCombinations) == null ? void 0 : O.length) === 0)
|
|
9876
9877
|
return;
|
|
9877
9878
|
(re.variant.variantCombinations || []).forEach((K) => {
|
|
9878
|
-
const
|
|
9879
|
+
const X = `${K._id}:${K.combinationKey}`, le = !P.has(X);
|
|
9879
9880
|
S.push({
|
|
9880
9881
|
_id: K._id,
|
|
9881
9882
|
combinationKey: K.combinationKey,
|
|
@@ -9892,7 +9893,7 @@ const ih = /* @__PURE__ */ fe({
|
|
|
9892
9893
|
items: P.map((q) => {
|
|
9893
9894
|
const re = S.items.find((O) => O._id == q._id && O.combinationKey == q.combinationKey);
|
|
9894
9895
|
q.orderFrom && re && (re.orderFrom = q.orderFrom);
|
|
9895
|
-
const D =
|
|
9896
|
+
const D = Z.value[q._id];
|
|
9896
9897
|
return re || {
|
|
9897
9898
|
...q,
|
|
9898
9899
|
name: null,
|
|
@@ -10180,7 +10181,7 @@ const rh = { class: "fm-typo-en-title-md-600" }, sh = {
|
|
|
10180
10181
|
i("status:show", te), te && (await ji(), B.value = $e.clone(o.group));
|
|
10181
10182
|
}
|
|
10182
10183
|
);
|
|
10183
|
-
const
|
|
10184
|
+
const Z = E(() => {
|
|
10184
10185
|
var te;
|
|
10185
10186
|
return ((te = r.groupAttributeSettings) == null ? void 0 : te.value.length) > 0 && !b.value.isOverride;
|
|
10186
10187
|
}), ne = E(() => {
|
|
@@ -10228,7 +10229,7 @@ const rh = { class: "fm-typo-en-title-md-600" }, sh = {
|
|
|
10228
10229
|
h(O, {
|
|
10229
10230
|
id: "group-form",
|
|
10230
10231
|
modelValue: g.value,
|
|
10231
|
-
"onUpdate:modelValue": ce[9] || (ce[9] = (
|
|
10232
|
+
"onUpdate:modelValue": ce[9] || (ce[9] = (X) => g.value = X),
|
|
10232
10233
|
"is-container": m(Ee).FmForm,
|
|
10233
10234
|
"is-container-props": {
|
|
10234
10235
|
onValidationSuccess: z,
|
|
@@ -10262,12 +10263,12 @@ const rh = { class: "fm-typo-en-title-md-600" }, sh = {
|
|
|
10262
10263
|
Oe(te.$slots, "variant-section"),
|
|
10263
10264
|
h(Br, null, {
|
|
10264
10265
|
default: F(() => {
|
|
10265
|
-
var
|
|
10266
|
+
var X;
|
|
10266
10267
|
return [
|
|
10267
10268
|
h(v, {
|
|
10268
10269
|
modelValue: x.value,
|
|
10269
10270
|
"onUpdate:modelValue": ce[1] || (ce[1] = (le) => x.value = le),
|
|
10270
|
-
placeholder: (
|
|
10271
|
+
placeholder: (X = B.value) == null ? void 0 : X.name,
|
|
10271
10272
|
disabled: A("name"),
|
|
10272
10273
|
rules: A("name") ? [] : ie.value,
|
|
10273
10274
|
autofocus: "",
|
|
@@ -10365,7 +10366,7 @@ const rh = { class: "fm-typo-en-title-md-600" }, sh = {
|
|
|
10365
10366
|
]),
|
|
10366
10367
|
_: 1
|
|
10367
10368
|
}, 8, ["label"]),
|
|
10368
|
-
|
|
10369
|
+
Z.value ? (_(), Q(Ke, {
|
|
10369
10370
|
key: 1,
|
|
10370
10371
|
title: m(Y)("menu.group.form.tagging.title"),
|
|
10371
10372
|
"sub-title": m(Y)("menu.group.form.tagging.subtitle")
|
|
@@ -10399,8 +10400,8 @@ const rh = { class: "fm-typo-en-title-md-600" }, sh = {
|
|
|
10399
10400
|
"categorized-items": te.categorizedItems,
|
|
10400
10401
|
config: b.value,
|
|
10401
10402
|
group: te.group,
|
|
10402
|
-
"onUpdate:group": ce[6] || (ce[6] = (
|
|
10403
|
-
"onUpdate:unmapGroup": ce[7] || (ce[7] = (
|
|
10403
|
+
"onUpdate:group": ce[6] || (ce[6] = (X) => I(X)),
|
|
10404
|
+
"onUpdate:unmapGroup": ce[7] || (ce[7] = (X) => I(N(X)))
|
|
10404
10405
|
}, null, 8, ["allow-refund-inventory", "categorized-items", "config", "group"])
|
|
10405
10406
|
]),
|
|
10406
10407
|
_: 1
|
|
@@ -10412,7 +10413,7 @@ const rh = { class: "fm-typo-en-title-md-600" }, sh = {
|
|
|
10412
10413
|
te.group ? (_(), Q(Do, {
|
|
10413
10414
|
key: 0,
|
|
10414
10415
|
modelValue: w.value,
|
|
10415
|
-
"onUpdate:modelValue": ce[10] || (ce[10] = (
|
|
10416
|
+
"onUpdate:modelValue": ce[10] || (ce[10] = (X) => w.value = X),
|
|
10416
10417
|
title: m(Y)("menu.group.title"),
|
|
10417
10418
|
name: x.value ?? ((K = B.value) == null ? void 0 : K.name) ?? "",
|
|
10418
10419
|
"name-locale": te.group.name_locale,
|
|
@@ -10571,11 +10572,11 @@ const rh = { class: "fm-typo-en-title-md-600" }, sh = {
|
|
|
10571
10572
|
t: l
|
|
10572
10573
|
} = ge(), s = t, u = E(() => i.rules.group), d = E(() => i.rules.item), c = E(() => i.groups);
|
|
10573
10574
|
function p(k, V) {
|
|
10574
|
-
return Ce(V ?? []).map((
|
|
10575
|
-
const ne = k.find((j) => j._id ===
|
|
10575
|
+
return Ce(V ?? []).map((Z) => {
|
|
10576
|
+
const ne = k.find((j) => j._id === Z._id);
|
|
10576
10577
|
return {
|
|
10577
10578
|
name: (ne == null ? void 0 : ne.name) ?? "",
|
|
10578
|
-
...
|
|
10579
|
+
...Z,
|
|
10579
10580
|
position: ne == null ? void 0 : ne.position
|
|
10580
10581
|
};
|
|
10581
10582
|
});
|
|
@@ -10585,7 +10586,7 @@ const rh = { class: "fm-typo-en-title-md-600" }, sh = {
|
|
|
10585
10586
|
return [...g(p(c.value, n.form.groups || ((V = n.fallback) == null ? void 0 : V.groups) || [])).map((z) => z._id)];
|
|
10586
10587
|
});
|
|
10587
10588
|
function g(k) {
|
|
10588
|
-
return Ce(k ?? []).sort((z,
|
|
10589
|
+
return Ce(k ?? []).sort((z, Z) => z.position - Z.position);
|
|
10589
10590
|
}
|
|
10590
10591
|
function w(k) {
|
|
10591
10592
|
const V = c.value.find((ne) => ne._id === k);
|
|
@@ -10641,7 +10642,7 @@ const rh = { class: "fm-typo-en-title-md-600" }, sh = {
|
|
|
10641
10642
|
enableSorting: !1,
|
|
10642
10643
|
size: 200,
|
|
10643
10644
|
cell: (k) => {
|
|
10644
|
-
const V = k.row.original._id,
|
|
10645
|
+
const V = k.row.original._id, Z = w(V).join(", ");
|
|
10645
10646
|
return h(Ee.FmTooltip, {
|
|
10646
10647
|
"z-index": 51,
|
|
10647
10648
|
class: "flex",
|
|
@@ -10650,14 +10651,14 @@ const rh = { class: "fm-typo-en-title-md-600" }, sh = {
|
|
|
10650
10651
|
}, {
|
|
10651
10652
|
default: () => h("div", {
|
|
10652
10653
|
class: "line-clamp-2 break-all"
|
|
10653
|
-
}, [
|
|
10654
|
+
}, [Z]),
|
|
10654
10655
|
content: () => h("div", {
|
|
10655
10656
|
class: "py-12 px-16 space-y-12"
|
|
10656
10657
|
}, [h("p", {
|
|
10657
10658
|
class: "fm-typo-en-body-md-600 text-fm-color-neutral-gray-600"
|
|
10658
10659
|
}, [l("menu.group.list.columns.products")]), h("div", {
|
|
10659
10660
|
class: "flex flex-wrap gap-8"
|
|
10660
|
-
}, [
|
|
10661
|
+
}, [Z])])
|
|
10661
10662
|
});
|
|
10662
10663
|
}
|
|
10663
10664
|
}, {
|
|
@@ -10709,11 +10710,11 @@ const rh = { class: "fm-typo-en-title-md-600" }, sh = {
|
|
|
10709
10710
|
var V;
|
|
10710
10711
|
for (const z of k)
|
|
10711
10712
|
if (Ps(i.state.menu, z, n.form._id)) {
|
|
10712
|
-
const
|
|
10713
|
+
const Z = (V = y.value[z]) == null ? void 0 : V.name;
|
|
10713
10714
|
o.open({
|
|
10714
10715
|
type: "error",
|
|
10715
10716
|
message: l("menu.product.form.group.circularError", {
|
|
10716
|
-
groupName:
|
|
10717
|
+
groupName: Z,
|
|
10717
10718
|
productName: n.form.name
|
|
10718
10719
|
})
|
|
10719
10720
|
});
|
|
@@ -10723,10 +10724,10 @@ const rh = { class: "fm-typo-en-title-md-600" }, sh = {
|
|
|
10723
10724
|
});
|
|
10724
10725
|
}
|
|
10725
10726
|
function I(k) {
|
|
10726
|
-
const V = k.reduce((z,
|
|
10727
|
+
const V = k.reduce((z, Z) => {
|
|
10727
10728
|
var j;
|
|
10728
|
-
const ne = ((j = n.form.groups) == null ? void 0 : j.find((ie) => ie._id ===
|
|
10729
|
-
_id:
|
|
10729
|
+
const ne = ((j = n.form.groups) == null ? void 0 : j.find((ie) => ie._id === Z)) || {
|
|
10730
|
+
_id: Z,
|
|
10730
10731
|
groupKey: ""
|
|
10731
10732
|
};
|
|
10732
10733
|
return z.push(ne), z;
|
|
@@ -10737,13 +10738,13 @@ const rh = { class: "fm-typo-en-title-md-600" }, sh = {
|
|
|
10737
10738
|
}));
|
|
10738
10739
|
}
|
|
10739
10740
|
function T(k) {
|
|
10740
|
-
var z,
|
|
10741
|
+
var z, Z, ne;
|
|
10741
10742
|
if (!n.form.groups)
|
|
10742
10743
|
return;
|
|
10743
10744
|
const V = Ce(n.form.groups);
|
|
10744
10745
|
V.splice(V.findIndex((j) => j._id === k), 1);
|
|
10745
10746
|
for (const j of ((z = n.form.variant) == null ? void 0 : z.variantCombinations) || [])
|
|
10746
|
-
(ne = j.groups) == null || ne.splice((
|
|
10747
|
+
(ne = j.groups) == null || ne.splice((Z = j.groups) == null ? void 0 : Z.findIndex((ie) => ie._id === k), 1);
|
|
10747
10748
|
s("replace:form", a.initDynamicGroupItem({
|
|
10748
10749
|
...n.form,
|
|
10749
10750
|
groups: V
|
|
@@ -10787,7 +10788,7 @@ const rh = { class: "fm-typo-en-title-md-600" }, sh = {
|
|
|
10787
10788
|
}) : s("update:form", "groups", k[0].groups || []);
|
|
10788
10789
|
};
|
|
10789
10790
|
return (k, V) => {
|
|
10790
|
-
const z = M("FmButton"),
|
|
10791
|
+
const z = M("FmButton"), Z = M("FmTable");
|
|
10791
10792
|
return _(), Q(Ke, {
|
|
10792
10793
|
title: m(l)("menu.product.form.group.title"),
|
|
10793
10794
|
"sub-title": m(l)("menu.product.form.group.subtitle")
|
|
@@ -10802,7 +10803,7 @@ const rh = { class: "fm-typo-en-title-md-600" }, sh = {
|
|
|
10802
10803
|
default: F(() => [h(Ja, null, {
|
|
10803
10804
|
default: F(() => {
|
|
10804
10805
|
var ne;
|
|
10805
|
-
return [((ne = f.value) == null ? void 0 : ne.length) > 0 ? (_(), Q(
|
|
10806
|
+
return [((ne = f.value) == null ? void 0 : ne.length) > 0 ? (_(), Q(Z, {
|
|
10806
10807
|
key: 0,
|
|
10807
10808
|
"column-defs": R.value,
|
|
10808
10809
|
"column-visibility": A.value,
|
|
@@ -11148,7 +11149,7 @@ const rh = { class: "fm-typo-en-title-md-600" }, sh = {
|
|
|
11148
11149
|
h(U, {
|
|
11149
11150
|
variant: m(ze).Secondary,
|
|
11150
11151
|
label: m(r)("menu.product.form.member_price.configure.title"),
|
|
11151
|
-
onClick: (
|
|
11152
|
+
onClick: (Z) => z()
|
|
11152
11153
|
}, null, 8, ["variant", "label", "onClick"])
|
|
11153
11154
|
]),
|
|
11154
11155
|
_: 1
|
|
@@ -11178,8 +11179,8 @@ const rh = { class: "fm-typo-en-title-md-600" }, sh = {
|
|
|
11178
11179
|
"model-value": I.form.priceTiers || ((z = I.fallback) == null ? void 0 : z.priceTiers) || {},
|
|
11179
11180
|
"allow-negative-price": !1,
|
|
11180
11181
|
"price-variant": I.form.priceTiers_variant,
|
|
11181
|
-
"onUpdate:modelValue": T[4] || (T[4] = (
|
|
11182
|
-
"onUpdate:priceTiersVariant": T[5] || (T[5] = (
|
|
11182
|
+
"onUpdate:modelValue": T[4] || (T[4] = (Z) => l("update:form", "priceTiers", Z)),
|
|
11183
|
+
"onUpdate:priceTiersVariant": T[5] || (T[5] = (Z) => L(Z, !0))
|
|
11183
11184
|
}, null, 8, ["price-tiers", "model-value", "price-variant"]))
|
|
11184
11185
|
];
|
|
11185
11186
|
}),
|
|
@@ -11189,7 +11190,7 @@ const rh = { class: "fm-typo-en-title-md-600" }, sh = {
|
|
|
11189
11190
|
label: m(r)("menu.product.form.price.settings.title")
|
|
11190
11191
|
}, {
|
|
11191
11192
|
default: F(() => {
|
|
11192
|
-
var z,
|
|
11193
|
+
var z, Z, ne;
|
|
11193
11194
|
return [
|
|
11194
11195
|
C("div", Oh, [
|
|
11195
11196
|
h($, {
|
|
@@ -11214,7 +11215,7 @@ const rh = { class: "fm-typo-en-title-md-600" }, sh = {
|
|
|
11214
11215
|
C("div", Vh, [
|
|
11215
11216
|
h(N, {
|
|
11216
11217
|
disabled: !s.value.unit,
|
|
11217
|
-
"model-value": I.form.perXUnit || ((
|
|
11218
|
+
"model-value": I.form.perXUnit || ((Z = I.fallback) == null ? void 0 : Z.perXUnit) || null,
|
|
11218
11219
|
rules: [
|
|
11219
11220
|
(j) => !!j || m(r)("menu.product.form.price.settings.sell_by_unit.per_unit.required"),
|
|
11220
11221
|
(j) => !j || j > 0 || m(r)("menu.product.form.price.settings.sell_by_unit.per_unit.min")
|
|
@@ -11557,7 +11558,7 @@ const rh = { class: "fm-typo-en-title-md-600" }, sh = {
|
|
|
11557
11558
|
"model-value": (((z = n.form.print) == null ? void 0 : z.department) ?? []).includes($),
|
|
11558
11559
|
value: $,
|
|
11559
11560
|
class: "flex-1",
|
|
11560
|
-
"onUpdate:modelValue": (
|
|
11561
|
+
"onUpdate:modelValue": (Z) => w($, Z)
|
|
11561
11562
|
}, null, 8, ["id", "data-checked", "label", "model-value", "value", "onUpdate:modelValue"])
|
|
11562
11563
|
])
|
|
11563
11564
|
];
|
|
@@ -12098,9 +12099,9 @@ const sg = {
|
|
|
12098
12099
|
const V = $e.clone(n.form);
|
|
12099
12100
|
for (const {
|
|
12100
12101
|
key: z,
|
|
12101
|
-
value:
|
|
12102
|
+
value: Z
|
|
12102
12103
|
} of k)
|
|
12103
|
-
V[z] =
|
|
12104
|
+
V[z] = Z;
|
|
12104
12105
|
f("replace:form", V);
|
|
12105
12106
|
}
|
|
12106
12107
|
function w(k) {
|
|
@@ -12111,8 +12112,8 @@ const sg = {
|
|
|
12111
12112
|
price: V == null ? void 0 : V.price,
|
|
12112
12113
|
inventoryBindings: (V == null ? void 0 : V.inventoryBindings) || n.form.inventoryBindings,
|
|
12113
12114
|
takeawayUsed: (V == null ? void 0 : V.takeawayUsed) || n.form.takeawayUsed,
|
|
12114
|
-
groups: (V == null ? void 0 : V.groups) || ((z = n.form.groups) == null ? void 0 : z.map((
|
|
12115
|
-
...
|
|
12115
|
+
groups: (V == null ? void 0 : V.groups) || ((z = n.form.groups) == null ? void 0 : z.map((Z) => ({
|
|
12116
|
+
...Z,
|
|
12116
12117
|
groupKey: ""
|
|
12117
12118
|
})))
|
|
12118
12119
|
};
|
|
@@ -12140,18 +12141,18 @@ const sg = {
|
|
|
12140
12141
|
var V;
|
|
12141
12142
|
return (((V = n.form.variant) == null ? void 0 : V.variantCombinations) || []).map((z) => {
|
|
12142
12143
|
var j, ie;
|
|
12143
|
-
const
|
|
12144
|
+
const Z = (ie = (j = n.fallback) == null ? void 0 : j.variant) == null ? void 0 : ie.variantCombinations.find(({
|
|
12144
12145
|
combinationKey: se
|
|
12145
12146
|
}) => se === z.combinationKey), ne = x.value ? null : z.price;
|
|
12146
12147
|
return {
|
|
12147
12148
|
...z,
|
|
12148
12149
|
price: ne,
|
|
12149
12150
|
fallback: {
|
|
12150
|
-
...
|
|
12151
|
+
...Z,
|
|
12151
12152
|
_id: z._id,
|
|
12152
12153
|
combinationKey: z.combinationKey,
|
|
12153
|
-
price: c.value ? n.form.price ?? (
|
|
12154
|
-
minPrice: n.form.minPrice ?? (
|
|
12154
|
+
price: c.value ? n.form.price ?? (Z == null ? void 0 : Z.price) : ne ?? (Z == null ? void 0 : Z.price),
|
|
12155
|
+
minPrice: n.form.minPrice ?? (Z == null ? void 0 : Z.minPrice),
|
|
12155
12156
|
priceTiers: n.form.priceTiers
|
|
12156
12157
|
}
|
|
12157
12158
|
};
|
|
@@ -12160,7 +12161,7 @@ const sg = {
|
|
|
12160
12161
|
function L(k, V = (z) => z) {
|
|
12161
12162
|
var ne;
|
|
12162
12163
|
const z = k.filter((j) => !!j);
|
|
12163
|
-
let
|
|
12164
|
+
let Z;
|
|
12164
12165
|
if (z.length) {
|
|
12165
12166
|
const j = z.map((se) => o.variants.find((Y) => Y._id === se)), ie = at.fullVariantCombination(j).map(({
|
|
12166
12167
|
combinationKey: se
|
|
@@ -12179,7 +12180,7 @@ const sg = {
|
|
|
12179
12180
|
});
|
|
12180
12181
|
return;
|
|
12181
12182
|
}
|
|
12182
|
-
|
|
12183
|
+
Z = {
|
|
12183
12184
|
...n.form,
|
|
12184
12185
|
variant: {
|
|
12185
12186
|
variantGroupIds: z,
|
|
@@ -12196,19 +12197,19 @@ const sg = {
|
|
|
12196
12197
|
}, {
|
|
12197
12198
|
key: "takeawayUsed",
|
|
12198
12199
|
value: ie.length === 1 ? ie[0] : null
|
|
12199
|
-
}]),
|
|
12200
|
+
}]), Z = {
|
|
12200
12201
|
...n.form,
|
|
12201
12202
|
variant: void 0,
|
|
12202
12203
|
takeawayUsed: ie.length === 1 ? ie[0] : null
|
|
12203
12204
|
};
|
|
12204
12205
|
}
|
|
12205
|
-
f("replace:form", i.initDynamicGroupItem(
|
|
12206
|
+
f("replace:form", i.initDynamicGroupItem(Z));
|
|
12206
12207
|
}
|
|
12207
12208
|
async function I(k, V, z) {
|
|
12208
|
-
const
|
|
12209
|
-
|
|
12209
|
+
const Z = $e.clone(n.form);
|
|
12210
|
+
Z.variant.variantCombinations[k][V] = z, g([{
|
|
12210
12211
|
key: "variant",
|
|
12211
|
-
value:
|
|
12212
|
+
value: Z.variant
|
|
12212
12213
|
}]);
|
|
12213
12214
|
}
|
|
12214
12215
|
const T = E(() => {
|
|
@@ -12253,10 +12254,10 @@ const sg = {
|
|
|
12253
12254
|
enableSorting: !1,
|
|
12254
12255
|
cell: (k) => {
|
|
12255
12256
|
var ne, j;
|
|
12256
|
-
const V = k.getValue(),
|
|
12257
|
+
const V = k.getValue(), Z = (ne = k.row.original.fallback) == null ? void 0 : ne.orderFrom;
|
|
12257
12258
|
return h($o, {
|
|
12258
12259
|
modelValue: V,
|
|
12259
|
-
fallback: n.form.orderFrom ??
|
|
12260
|
+
fallback: n.form.orderFrom ?? Z ?? ((j = n.fallback) == null ? void 0 : j.orderFrom),
|
|
12260
12261
|
disable: !u.value.orderFrom,
|
|
12261
12262
|
required: u.value.orderFrom && u.value.orderFromActiveOnly,
|
|
12262
12263
|
editActiveOnly: u.value.orderFromActiveOnly || !1,
|
|
@@ -12354,7 +12355,7 @@ const sg = {
|
|
|
12354
12355
|
}) : !0;
|
|
12355
12356
|
}
|
|
12356
12357
|
return (k, V) => {
|
|
12357
|
-
const z = M("fm-button"),
|
|
12358
|
+
const z = M("fm-button"), Z = M("fm-icon"), ne = M("FmFormGroup"), j = M("fm-table");
|
|
12358
12359
|
return _(), Q(Ke, {
|
|
12359
12360
|
title: m(l)("menu.product.form.variant.title"),
|
|
12360
12361
|
"sub-title": m(l)("menu.product.form.variant.subtitle")
|
|
@@ -12390,7 +12391,7 @@ const sg = {
|
|
|
12390
12391
|
variant: m(ze).Tertiary,
|
|
12391
12392
|
class: "handle",
|
|
12392
12393
|
"prepend-icon": "drag_handle"
|
|
12393
|
-
}, null, 8, ["variant"]), C("div", _g, [C("p", wg, oe((me = p.value[Y]) == null ? void 0 : me.name), 1), h(
|
|
12394
|
+
}, null, 8, ["variant"]), C("div", _g, [C("p", wg, oe((me = p.value[Y]) == null ? void 0 : me.name), 1), h(Z, {
|
|
12394
12395
|
class: "cursor-pointer",
|
|
12395
12396
|
name: "close",
|
|
12396
12397
|
onClick: ct((pe) => {
|
|
@@ -12457,7 +12458,7 @@ const sg = {
|
|
|
12457
12458
|
},
|
|
12458
12459
|
emits: ["update:show", "submit:form"],
|
|
12459
12460
|
setup(e, { emit: t }) {
|
|
12460
|
-
var
|
|
12461
|
+
var X, le, Ae, xe, je;
|
|
12461
12462
|
const n = e, o = t, i = De(), a = zt(), { t: r } = ge(), l = E(() => n.action === "add" ? r("menu.product.form.title.add") : r("menu.product.form.title.update")), s = E(() => i.rules.item), u = (ae) => new Promise((J) => setTimeout(J, ae));
|
|
12462
12463
|
Wt(async () => {
|
|
12463
12464
|
n.autoShow && (await u(100), c());
|
|
@@ -12606,8 +12607,8 @@ const sg = {
|
|
|
12606
12607
|
price: void 0
|
|
12607
12608
|
});
|
|
12608
12609
|
}
|
|
12609
|
-
const
|
|
12610
|
-
(((
|
|
12610
|
+
const Z = H(
|
|
12611
|
+
(((X = f.value.variant) == null ? void 0 : X.variantCombinations) || []).some(
|
|
12611
12612
|
(ae) => !!ae.price || !!ae.orderFrom || !!ae.code
|
|
12612
12613
|
)
|
|
12613
12614
|
);
|
|
@@ -12920,9 +12921,9 @@ const sg = {
|
|
|
12920
12921
|
}, 8, ["toggle"])) : ee("", !0),
|
|
12921
12922
|
I.value ? ee("", !0) : (_(), W("div", Tg)),
|
|
12922
12923
|
h(Ot, {
|
|
12923
|
-
toggle:
|
|
12924
|
+
toggle: Z.value,
|
|
12924
12925
|
"onUpdate:toggle": [
|
|
12925
|
-
J[10] || (J[10] = (ue) =>
|
|
12926
|
+
J[10] || (J[10] = (ue) => Z.value = ue),
|
|
12926
12927
|
J[11] || (J[11] = (ue) => ne(ue))
|
|
12927
12928
|
],
|
|
12928
12929
|
disabled: !I.value,
|
|
@@ -13169,7 +13170,7 @@ const Wn = Ni("item-manager", () => {
|
|
|
13169
13170
|
const U = e.currentCatalog, $ = e.state.currentSchedulerId, N = U.override.scheduler[$] ?? {}, B = (k = N == null ? void 0 : N.items) == null ? void 0 : k.filter((V) => V._id === x._id);
|
|
13170
13171
|
await u(x, B, async (V) => {
|
|
13171
13172
|
const z = V.modules.catalog.find(
|
|
13172
|
-
(
|
|
13173
|
+
(Z) => Z._id === U._id
|
|
13173
13174
|
);
|
|
13174
13175
|
await new gt(z, e, i.updateMenu, n).update();
|
|
13175
13176
|
});
|
|
@@ -13198,8 +13199,8 @@ const Wn = Ni("item-manager", () => {
|
|
|
13198
13199
|
var B, k;
|
|
13199
13200
|
const U = e.state.currentSchedulerId, $ = Ce(e.currentCatalog), N = (k = ((B = $.override.scheduler[U]) == null ? void 0 : B.items) || []) == null ? void 0 : k.reduce((V, z) => {
|
|
13200
13201
|
if (z.combinationKey) return [...V, z];
|
|
13201
|
-
const
|
|
13202
|
-
return
|
|
13202
|
+
const Z = x.find((ne) => ne._id === z._id);
|
|
13203
|
+
return Z ? [...V, { ...z, price: Z.price }] : [...V, z];
|
|
13203
13204
|
}, []);
|
|
13204
13205
|
$.override.scheduler = {
|
|
13205
13206
|
...$.override.scheduler,
|
|
@@ -13214,18 +13215,18 @@ const Wn = Ni("item-manager", () => {
|
|
|
13214
13215
|
var B;
|
|
13215
13216
|
const U = Ce(e.currentCatalog), $ = (B = Object.entries(U.override.items)) == null ? void 0 : B.reduce(
|
|
13216
13217
|
(k, [V, z]) => {
|
|
13217
|
-
const
|
|
13218
|
-
if (!
|
|
13218
|
+
const Z = x.find((j) => j._id === V);
|
|
13219
|
+
if (!Z)
|
|
13219
13220
|
return k[V] = z, k;
|
|
13220
13221
|
const ne = z.find((j) => !j.combinationKey);
|
|
13221
13222
|
return k[V] = [
|
|
13222
13223
|
...z.filter((j) => !!j.combinationKey),
|
|
13223
13224
|
{
|
|
13224
13225
|
...ne,
|
|
13225
|
-
code:
|
|
13226
|
-
name:
|
|
13227
|
-
price:
|
|
13228
|
-
orderFrom:
|
|
13226
|
+
code: Z.code || void 0,
|
|
13227
|
+
name: Z.name,
|
|
13228
|
+
price: Z.price,
|
|
13229
|
+
orderFrom: Z.orderFrom ?? ne.orderFrom
|
|
13229
13230
|
}
|
|
13230
13231
|
], k;
|
|
13231
13232
|
},
|