@feedmepos/mf-menu 0.32.64 → 0.32.66-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-W8bH6kiT.js → App-CI_iNcgK.js} +8 -8
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-DvHmwIP2.js → ApplyProduct.vue_vue_type_script_setup_true_lang-CYxG4ihX.js} +3 -3
- package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-2nFIpZv4.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-UllnR0h6.js} +3 -3
- package/dist/{Catalog-pywklogh.js → Catalog-Bh2SAffq.js} +6 -6
- package/dist/{Category-UMDcymDA.js → Category-CVKnqszH.js} +14 -14
- package/dist/{Category-CLs58F_F.js → Category-DfTtG9CR.js} +8 -8
- package/dist/{CookingGuide-Cefv83hr.js → CookingGuide-ya45J1Mt.js} +5 -5
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-C9CvjWEO.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-i6fzPFdp.js} +1 -1
- package/dist/{Group-CfxNpgp7.js → Group-DLo3Tq5F.js} +1 -1
- package/dist/{Group-Ujeo9noG.js → Group-d5ODb1qt.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-C-eZ5PGS.js → Group.vue_vue_type_script_setup_true_lang-mJM1hfDS.js} +48 -48
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-qTEz4XWJ.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Ctw_g4uv.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Kf10i_T2.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-OzkvL_JP.js} +6376 -6365
- package/dist/{Ingredient-CsHbFizZ.js → Ingredient-BT24CVH8.js} +4 -4
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-NKoRT-LI.js → InventoryBinding.vue_vue_type_script_setup_true_lang-Cd2xFodR.js} +2 -2
- package/dist/{LinkProductSideSheet-B-Trz4a6.js → LinkProductSideSheet-CAjxumsy.js} +4 -4
- package/dist/{MenuSetting-BNWjJAp4.js → MenuSetting-CrKps0Pr.js} +7 -7
- package/dist/{OrderPacing-DhKmymC7.js → OrderPacing-DV8YhW4M.js} +5 -5
- package/dist/{PrintRoute-DaIY94Ts.js → PrintRoute-N_c01sX7.js} +5 -5
- package/dist/{Product-SBeMVZBU.js → Product-i45cWBne.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-CDoJwAFZ.js → Product.vue_vue_type_script_setup_true_lang-SBnKF6Dc.js} +108 -108
- package/dist/{ProductInternalTools-BAHMukHo.js → ProductInternalTools-C10beN3h.js} +25 -25
- package/dist/{Products-CvUK4ngP.js → Products-Copz_NxK.js} +68 -68
- package/dist/{Publish-BqI8LP_Y.js → Publish-Dx9g-Iml.js} +4 -4
- package/dist/{Recipe--LCvPofA.js → Recipe-B0dhSxLY.js} +5 -5
- package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-DaqG3ZEC.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-BfTWVSgk.js} +1 -1
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-DsCNLIVd.js → RuleView.vue_vue_type_script_setup_true_lang-CGjp5ObO.js} +595 -595
- package/dist/{Scheduler-BkXNha9_.js → Scheduler-Bdy9DG0p.js} +3 -3
- package/dist/{ServingSequence-DvF8yZTp.js → ServingSequence-onP8TGmt.js} +3 -3
- package/dist/{Setting-dfdQhacG.js → Setting-h1N-6VJG.js} +5 -5
- package/dist/{Subcategory-DoiEnCY-.js → Subcategory-uRvIJSP2.js} +6 -6
- package/dist/{Takeaway-Pyol2JIm.js → Takeaway-1LAZ7cjz.js} +4 -4
- package/dist/{Takeaway-CfTKoZgq.js → Takeaway-BVfssE0J.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-A2Uz3Vx5.js → Takeaway.vue_vue_type_script_setup_true_lang-DQy0jvn3.js} +5 -5
- package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-BAMLQtFW.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-CFfvrpnY.js} +1 -1
- package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-Bx6Dfb9q.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-DY_CAuFa.js} +2 -2
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Bex1NCnU.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BL_x8Upd.js} +341 -340
- package/dist/{Unit-ODy76xeS.js → Unit-Bdjbice8.js} +2 -2
- package/dist/{Variant-BFUqQyub.js → Variant-D6lnVRhc.js} +3 -3
- package/dist/{_id_-DQO6Zi8b.js → _id_-_IoP91Df.js} +10 -10
- package/dist/{app-BNqI06Lw.js → app-CHa-DBPQ.js} +32 -32
- package/dist/{app-BNF3d7ks.js → app-DuSxtjmC.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/helper/import-export-utils.d.ts +4 -4
- package/dist/apps/mf-menu/src/helper/itemCategories.d.ts +18 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{override-menu-BCrsilnp.js → linked-status-DBJxrh2U.js} +4 -4
- package/dist/assets/{menu-export-oSHHIKfH.js → menu-export-UgrjUnN2.js} +39 -39
- package/dist/assets/{linked-status-OJYsf1K1.js → override-menu-CIRYGinT.js} +4 -4
- package/dist/assets/{validate-menu-CoDW8e4r.js → validate-menu-D8-_8UwY.js} +2 -2
- package/dist/{catalog-BiUOGVhu.js → catalog-C_rhdKvu.js} +1 -1
- package/dist/{catalogSetting-Dt03eB79.js → catalogSetting-SujM_d4-.js} +1 -1
- package/dist/{currency-I2Plgz6g.js → currency-CBsQulKD.js} +1 -1
- package/dist/{dayjs.min-CVgq1MI5.js → dayjs.min-CBi2aUyP.js} +2 -2
- package/dist/{discardConfirm-CU5H7XLz.js → discardConfirm-BhV1iT_G.js} +1 -1
- package/dist/index-CtMD-H5N.js +310 -0
- package/dist/{index-OUaL4kl7.js → index-D10URGOP.js} +5 -5
- package/dist/{index-D79td5bo.js → index-aXVdUVi9.js} +6 -6
- package/dist/{index.vue_vue_type_script_setup_true_lang-BJ5dPd5h.js → index.vue_vue_type_script_setup_true_lang-cI7uKVre.js} +462 -462
- package/dist/{item-BPryyFAB.js → item-B7ovTnkT.js} +1262 -1338
- package/dist/{jszip.min-D3CS7h7J.js → jszip.min-nm6XtoQ3.js} +167 -167
- package/dist/{linkProducts-ClCfYWFx.js → linkProducts-lOTzQqNK.js} +4 -4
- package/dist/{memberPricing-CLr-Y_7e.js → memberPricing-BYT32y4D.js} +1 -1
- package/dist/{menu-gBc-za7C.js → menu-6qHiTu0j.js} +1 -1
- package/dist/{menuV2-D7O1K9Ej.js → menuV2-ILhcIRUD.js} +67 -67
- package/dist/{order_pacing-DVn2Kb9a.js → order_pacing-Bq09k_C7.js} +5 -5
- package/dist/{priceTier-33L1xIZW.js → priceTier-BzuYYCqN.js} +1 -1
- package/dist/{rules-C7ujXDzl.js → rules-BrliKHcG.js} +3 -3
- package/dist/{scheduler-Dzj2Ed1a.js → scheduler-6lSaa1nT.js} +5 -5
- package/dist/{toExcel-CGOr53pl.js → toExcel-C8QPvQuM.js} +2 -2
- package/dist/{unit-CfREeFuX.js → unit-s4XWrNN2.js} +3 -3
- package/package.json +1 -1
- package/dist/index-CD_omf3p.js +0 -222
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
import { ref as ee, computed as M, getCurrentInstance as Cn, render as In, defineComponent as fe, onMounted as Xe, resolveComponent as H, resolveDirective as nn, createElementBlock as J, openBlock as A, Fragment as Se, createVNode as s, unref as e, withCtx as q, createElementVNode as K, createBlock as ne, createCommentVNode as Z, normalizeClass as $e, renderList as Ae, toDisplayString as ye, createTextVNode as Tn, withDirectives as at, renderSlot as Be, watch as Oe, h as Ie, isVNode as xn, nextTick as gt, vShow as on, withModifiers as Je, createSlots as Sn, onBeforeUnmount as Rt, watchEffect as En, onUnmounted as Fn, normalizeStyle as mt, mergeProps as Vn, normalizeProps as $n, guardReactiveProps as Pn, mergeModels as Dn, useModel as On, Teleport as Mn, Transition as Un, withKeys as Rn } from "vue";
|
|
2
|
-
import { x as An, y as Nn, z as Ln, A as Gn, B as
|
|
3
|
-
import { a as
|
|
4
|
-
import { l as Ve, u as Kt } from "./discardConfirm-
|
|
2
|
+
import { x as An, y as Nn, z as Ln, A as Gn, B as rn, D as Ft, P as Kn, I as Bn, G as zn, H as jn, J as At, K as Yn, M as qn, N as an, O as ln, Q as Wn, R as Nt, T as Lt, U as Gt, V as sn, W as Vt, X as Hn, Y as Xn, Z as Qn, $ as Jn, a0 as Zn, a1 as eo, a2 as un, a3 as Ht, a4 as dn, a5 as to, a6 as no, a7 as oo, a8 as ro, a9 as cn, w as ao, aa as lo, ab as qe, ac as io, ad as so } from "./item-B7ovTnkT.js";
|
|
3
|
+
import { a as uo, b as co, d as mo, _ as po, T as fo } from "./app-CHa-DBPQ.js";
|
|
4
|
+
import { l as Ve, u as Kt } from "./discardConfirm-BhV1iT_G.js";
|
|
5
5
|
import { useI18n as _e, useCoreStore as lt, CustomAttributesForm as mn } from "@feedmepos/mf-common";
|
|
6
|
-
import { useDialog as Qe, useSnackbar as Ye, components as Ce, FmButtonVariant as Pe, FmButtonColorThemeVariant as Re, useBreakpoints as
|
|
7
|
-
import { a as Te, g as Fe, h as xe, u as vt, i as Bt, b as bt, r as
|
|
8
|
-
import { defineStore as
|
|
9
|
-
import { _ as Me, a as
|
|
10
|
-
import { u as be, g as $t, m as
|
|
11
|
-
import { s as Pt, _ as Fo } from "./index-
|
|
6
|
+
import { useDialog as Qe, useSnackbar as Ye, components as Ce, FmButtonVariant as Pe, FmButtonColorThemeVariant as Re, useBreakpoints as go, useDialogChild as pn } from "@feedmepos/ui-library";
|
|
7
|
+
import { a as Te, g as Fe, h as xe, u as vt, i as Bt, b as bt, r as vo, F as et, j as he, m as je, d as ke, o as bo, k as ct, l as yo, I as ht, n as fn, s as kt, w as Xt, p as _o, q as ho, t as Qt, v as ko } from "./index.vue_vue_type_script_setup_true_lang-cI7uKVre.js";
|
|
8
|
+
import { defineStore as wo } from "pinia";
|
|
9
|
+
import { _ as Me, a as Co } from "./RuleView.vue_vue_type_script_setup_true_lang-CGjp5ObO.js";
|
|
10
|
+
import { u as be, g as $t, m as Io } from "./menuV2-ILhcIRUD.js";
|
|
11
|
+
import { g as To, s as Pt, _ as xo, a as So, b as Eo, c as Fo, d as Jt, e as Vo } from "./index-CtMD-H5N.js";
|
|
12
12
|
import { useAppStore as gn, RemyButton as vn } from "@feedmepos/mf-remy-panel";
|
|
13
13
|
import { _ as Ke } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
|
|
14
|
-
import { c as
|
|
14
|
+
import { c as $o } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
|
15
15
|
import { _ as Dt } from "./tooltip-B5BiPMx9.js";
|
|
16
16
|
import { g as st } from "./translation-fNx6yEpy.js";
|
|
17
17
|
import { _ as it } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
18
|
-
import { _ as Ze, T as
|
|
19
|
-
import { L as Ot } from "./LinkProductSideSheet-
|
|
20
|
-
import { u as
|
|
18
|
+
import { _ as Ze, T as Po, l as Do } from "./index-aXVdUVi9.js";
|
|
19
|
+
import { L as Ot } from "./LinkProductSideSheet-CAjxumsy.js";
|
|
20
|
+
import { u as Oo } from "./search-BAPEUu1R.js";
|
|
21
21
|
import { c as zt } from "./check-C9mY6LiX.js";
|
|
22
|
-
import { f as ze } from "./currency-
|
|
23
|
-
import { u as jt } from "./memberPricing-
|
|
24
|
-
import { c as
|
|
25
|
-
import { useInventoryStore as
|
|
26
|
-
import { u as
|
|
22
|
+
import { f as ze } from "./currency-CBsQulKD.js";
|
|
23
|
+
import { u as jt } from "./memberPricing-BYT32y4D.js";
|
|
24
|
+
import { c as Mo } from "./string-DpfFixWH.js";
|
|
25
|
+
import { useInventoryStore as Uo, InventoryBindingSummary as Ro } from "@feedmepos/mf-inventory-portal";
|
|
26
|
+
import { u as Ao } from "./priceTier-BzuYYCqN.js";
|
|
27
27
|
import { d as Yt } from "./RuleConditionSelector.vue_vue_type_style_index_0_lang-CK8z7qA8.js";
|
|
28
|
-
import { _ as
|
|
28
|
+
import { _ as No } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-CYxG4ihX.js";
|
|
29
29
|
import "./app-5fxKLAzS.js";
|
|
30
30
|
/* empty css */
|
|
31
|
-
import { a as
|
|
31
|
+
import { a as Lo, u as Go } from "./linkProducts-lOTzQqNK.js";
|
|
32
32
|
import { c as pt } from "./object-DVUNCr7w.js";
|
|
33
|
-
import { _ as
|
|
33
|
+
import { _ as Ko } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
|
|
34
34
|
import { _ as Zt } from "./MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js";
|
|
35
|
-
import { _ as
|
|
35
|
+
import { _ as Bo } from "./RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-BfTWVSgk.js";
|
|
36
36
|
var tt = /* @__PURE__ */ ((i) => (i.PRIMARY = "primary", i.PLAIN = "plain", i))(tt || {}), Le = /* @__PURE__ */ ((i) => (i.CATEGORY = "view_list", i.ITEM = "fastfood", i.VARIANT = "lunch_dining", i.GROUP = "database", i.FOLDER = "folder", i))(Le || {});
|
|
37
37
|
function wt(i, a) {
|
|
38
38
|
return i <= 0 ? null : { label: a };
|
|
@@ -52,14 +52,14 @@ function Ct(i) {
|
|
|
52
52
|
function It(i, ...a) {
|
|
53
53
|
return [...i, ...a.filter((t) => t !== null)];
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function zo(i, a) {
|
|
56
56
|
const t = !!a.price;
|
|
57
57
|
return {
|
|
58
58
|
label: t ? Te.Dinero.fromFdoDinero(a.price).toFormat(!0) : Te.Dinero.fromFdoDinero(i.price).toFormat(!0),
|
|
59
59
|
variant: t ? tt.PRIMARY : tt.PLAIN
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function jo(i, a) {
|
|
63
63
|
const t = /* @__PURE__ */ new Set();
|
|
64
64
|
function o(r) {
|
|
65
65
|
let b = r;
|
|
@@ -95,21 +95,21 @@ function zo(i, a) {
|
|
|
95
95
|
shouldExpandNodeIds: Array.from(t)
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function Yo(i) {
|
|
99
99
|
return {
|
|
100
100
|
levels: i.split(/[>,]/).map((t) => t.trim()).filter((t) => t !== "").map((t) => ({
|
|
101
101
|
query: t.split(" ").filter((o) => o.trim() !== "").map((o) => o.trim())
|
|
102
102
|
}))
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function qo(i, a) {
|
|
106
106
|
if (!a || a.trim() === "")
|
|
107
107
|
return {
|
|
108
108
|
subTree: i,
|
|
109
109
|
shouldExpandNodeIds: []
|
|
110
110
|
};
|
|
111
|
-
const t =
|
|
112
|
-
return
|
|
111
|
+
const t = Yo(a);
|
|
112
|
+
return jo(i, t);
|
|
113
113
|
}
|
|
114
114
|
function Tt(i, a, t) {
|
|
115
115
|
const o = [...i], m = o[a];
|
|
@@ -120,7 +120,7 @@ function Tt(i, a, t) {
|
|
|
120
120
|
function en(i, a) {
|
|
121
121
|
return a ? `${a}, ${i}` : i;
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function Wo(i) {
|
|
124
124
|
const a = /* @__PURE__ */ new Map();
|
|
125
125
|
function t(o) {
|
|
126
126
|
var m;
|
|
@@ -128,16 +128,16 @@ function qo(i) {
|
|
|
128
128
|
}
|
|
129
129
|
return i.forEach(t), a;
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function Ho(i) {
|
|
132
132
|
const a = /* @__PURE__ */ new Map();
|
|
133
133
|
return i.forEach((t, o) => {
|
|
134
134
|
a.set(t.id, o);
|
|
135
135
|
}), a;
|
|
136
136
|
}
|
|
137
|
-
const yt =
|
|
137
|
+
const yt = wo("mf-menu-tree", () => {
|
|
138
138
|
const i = ee(), a = ee([]), t = ee(null), o = ee([]);
|
|
139
139
|
function m(y) {
|
|
140
|
-
a.value = y, C.value =
|
|
140
|
+
a.value = y, C.value = Wo(y);
|
|
141
141
|
}
|
|
142
142
|
function r(y) {
|
|
143
143
|
t.value = y;
|
|
@@ -187,7 +187,7 @@ let ut = null, We = null, He = null;
|
|
|
187
187
|
function bn() {
|
|
188
188
|
return We && (clearTimeout(We), We = null), He ? (He(), He = null, !0) : !1;
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function Xo(i, a, t) {
|
|
191
191
|
function m(_) {
|
|
192
192
|
if (!i.value) return !1;
|
|
193
193
|
const C = i.value.validate();
|
|
@@ -246,7 +246,7 @@ function Ho(i, a, t) {
|
|
|
246
246
|
saveItemFormEditingStateDebounced: m
|
|
247
247
|
};
|
|
248
248
|
}
|
|
249
|
-
function
|
|
249
|
+
function Qo(i, a) {
|
|
250
250
|
if (!a)
|
|
251
251
|
throw new Error("combinationKey is required");
|
|
252
252
|
if (!i[a])
|
|
@@ -256,7 +256,7 @@ function Xo(i, a) {
|
|
|
256
256
|
function yn(i) {
|
|
257
257
|
return i._id.startsWith("mMenuV4");
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function Jo({
|
|
260
260
|
menu: i,
|
|
261
261
|
catalogId: a,
|
|
262
262
|
schedulerId: t,
|
|
@@ -274,8 +274,8 @@ function Qo({
|
|
|
274
274
|
return (F = _ == null ? void 0 : _.items) == null ? void 0 : F.filter((C) => C._id === o);
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
|
-
function
|
|
278
|
-
const m =
|
|
277
|
+
function Zo(i, a, t, o) {
|
|
278
|
+
const m = Jo({ menu: i, catalogId: a, schedulerId: t, itemId: o });
|
|
279
279
|
if (!m)
|
|
280
280
|
throw new Error(`Item overrider ${o} not found`);
|
|
281
281
|
const r = i.modules.item.find((b) => b._id === o);
|
|
@@ -283,10 +283,10 @@ function Jo(i, a, t, o) {
|
|
|
283
283
|
throw new Error(`Item ${o} not found in merged menu`);
|
|
284
284
|
return Nn(r, m);
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function er(i) {
|
|
287
287
|
const a = ee(null), t = M(() => a.value ? !i.state.currentCatalogId && !i.state.currentSchedulerId ? i.state.menu.modules.item.find(
|
|
288
288
|
(m) => m._id === a.value
|
|
289
|
-
) :
|
|
289
|
+
) : Zo(
|
|
290
290
|
i.state.menu,
|
|
291
291
|
i.state.currentCatalogId,
|
|
292
292
|
i.state.currentSchedulerId,
|
|
@@ -307,7 +307,7 @@ const _t = () => {
|
|
|
307
307
|
function m() {
|
|
308
308
|
var C, P, y;
|
|
309
309
|
if (!o) throw new Error("No current instance found");
|
|
310
|
-
const { container: c, vNode: _ } =
|
|
310
|
+
const { container: c, vNode: _ } = $o(
|
|
311
311
|
Gn,
|
|
312
312
|
o,
|
|
313
313
|
{
|
|
@@ -374,43 +374,43 @@ const _t = () => {
|
|
|
374
374
|
deleteCategory: b,
|
|
375
375
|
rearrange: F
|
|
376
376
|
};
|
|
377
|
-
}, er = {
|
|
378
|
-
class: "flex flex-col gap-24"
|
|
379
377
|
}, tr = {
|
|
380
|
-
class:
|
|
378
|
+
class: "flex flex-col gap-24"
|
|
381
379
|
}, nr = {
|
|
382
|
-
class: "
|
|
380
|
+
class: /* @__PURE__ */ $e(["flex space-x-16", "xs:flex-col xs:space-x-0 xs:space-y-16"])
|
|
383
381
|
}, or = {
|
|
384
|
-
class: "
|
|
382
|
+
class: "w-[160px] xs:w-full"
|
|
385
383
|
}, rr = {
|
|
386
|
-
class: "
|
|
384
|
+
class: "flex-1"
|
|
387
385
|
}, ar = {
|
|
388
|
-
class: "
|
|
386
|
+
class: "py-12 px-16 space-y-4"
|
|
389
387
|
}, lr = {
|
|
390
|
-
class: "
|
|
388
|
+
class: "relative"
|
|
391
389
|
}, ir = {
|
|
392
|
-
class: "fm-typo-en-body-
|
|
390
|
+
class: "fm-typo-en-body-lg-600"
|
|
393
391
|
}, sr = {
|
|
394
|
-
class: "
|
|
392
|
+
class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary"
|
|
395
393
|
}, ur = {
|
|
396
|
-
class: "
|
|
394
|
+
class: "absolute top-32 right-4 flex gap-4"
|
|
397
395
|
}, dr = {
|
|
398
|
-
class: "
|
|
396
|
+
class: "py-12 px-16 space-y-4"
|
|
399
397
|
}, cr = {
|
|
400
|
-
class: "
|
|
398
|
+
class: "flex flex-col gap-16"
|
|
401
399
|
}, mr = {
|
|
400
|
+
class: "space-y-8"
|
|
401
|
+
}, pr = {
|
|
402
402
|
key: 0,
|
|
403
403
|
class: "flex items-center gap-8"
|
|
404
|
-
}, pr = {
|
|
405
|
-
class: "flex flex-col gap-16"
|
|
406
404
|
}, fr = {
|
|
405
|
+
class: "flex flex-col gap-16"
|
|
406
|
+
}, gr = {
|
|
407
407
|
key: 1,
|
|
408
408
|
class: "flex flex-col gap-24"
|
|
409
409
|
};
|
|
410
410
|
var Ge = /* @__PURE__ */ function(i) {
|
|
411
411
|
return i.ADD_ON = "ADD_ON", i.PRODUCT = "PRODUCT", i;
|
|
412
412
|
}(Ge || {});
|
|
413
|
-
const
|
|
413
|
+
const vr = /* @__PURE__ */ fe({
|
|
414
414
|
__name: "ProductDetail",
|
|
415
415
|
props: {
|
|
416
416
|
isOverride: {
|
|
@@ -433,7 +433,7 @@ const gr = /* @__PURE__ */ fe({
|
|
|
433
433
|
checkMenuIsLoading: b
|
|
434
434
|
} = Bt(bt(Ye())), F = lt(), c = a, _ = M(() => m.rules.item);
|
|
435
435
|
function C(d) {
|
|
436
|
-
c("update:form", "images", d), c("update:form", "thumbnail",
|
|
436
|
+
c("update:form", "images", d), c("update:form", "thumbnail", vo({
|
|
437
437
|
images: d,
|
|
438
438
|
thumbnail: t.form.thumbnail ?? null
|
|
439
439
|
}));
|
|
@@ -444,7 +444,7 @@ const gr = /* @__PURE__ */ fe({
|
|
|
444
444
|
value: R.id
|
|
445
445
|
}));
|
|
446
446
|
return t.isAddon ? d : d.filter((R) => !!R.value);
|
|
447
|
-
}), n = M(() => _.value.addon), T = M(() => !y.value.find((d) => !!d.value)), S = M(() =>
|
|
447
|
+
}), n = M(() => _.value.addon), T = M(() => !y.value.find((d) => !!d.value)), S = M(() => To(t.form.category ? t.form : t.fallback) || []), Y = M(() => S.value.reduce((d, R) => (d[R._id] = R, d), {})), V = M({
|
|
448
448
|
get() {
|
|
449
449
|
return S.value.map((d) => d._id);
|
|
450
450
|
},
|
|
@@ -464,7 +464,7 @@ const gr = /* @__PURE__ */ fe({
|
|
|
464
464
|
}
|
|
465
465
|
}), $ = ee(), x = ({
|
|
466
466
|
multiple: d = !0
|
|
467
|
-
} = {}) => t.isAddon ? null : s(
|
|
467
|
+
} = {}) => t.isAddon ? null : s(qn, {
|
|
468
468
|
ref: $,
|
|
469
469
|
disabled: !_.value.category || b(),
|
|
470
470
|
items: y.value,
|
|
@@ -606,7 +606,7 @@ const gr = /* @__PURE__ */ fe({
|
|
|
606
606
|
}, {
|
|
607
607
|
default: q(() => {
|
|
608
608
|
var Q, Ne, nt, Ue, qt, Wt;
|
|
609
|
-
return [K("div",
|
|
609
|
+
return [K("div", tr, [K("div", nr, [K("div", or, [s(L, {
|
|
610
610
|
"model-value": d.form.code,
|
|
611
611
|
placeholder: ((Q = d.fallback) == null ? void 0 : Q.code) || e(k)("menu.product.form.detail.fields.code.placeholder"),
|
|
612
612
|
"helper-text": !f.value && N.value > 0 ? e(k)("menu.product.form.detail.fields.code.duplicate_hint", {
|
|
@@ -617,7 +617,7 @@ const gr = /* @__PURE__ */ fe({
|
|
|
617
617
|
count: N.value
|
|
618
618
|
})],
|
|
619
619
|
"onUpdate:modelValue": R[0] || (R[0] = (se) => c("update:form", "code", e(Ft)(se, d.isOverride)))
|
|
620
|
-
}, null, 8, ["model-value", "placeholder", "helper-text", "label", "rules"])]), K("div",
|
|
620
|
+
}, null, 8, ["model-value", "placeholder", "helper-text", "label", "rules"])]), K("div", rr, [s(L, {
|
|
621
621
|
id: "product-name",
|
|
622
622
|
disabled: !_.value.name,
|
|
623
623
|
"helper-text": D.value > 0 ? e(k)("menu.product.form.detail.fields.name.duplicate_warning", {
|
|
@@ -635,7 +635,7 @@ const gr = /* @__PURE__ */ fe({
|
|
|
635
635
|
placement: "top",
|
|
636
636
|
"z-index": 999
|
|
637
637
|
}, {
|
|
638
|
-
content: q(() => [K("div",
|
|
638
|
+
content: q(() => [K("div", ar, [(A(!0), J(Se, null, Ae(oe.value, (se) => (A(), J("div", {
|
|
639
639
|
key: se.locale
|
|
640
640
|
}, ye(se.name) + " (" + ye(se.localeDisplay) + ") ", 1))), 128))])]),
|
|
641
641
|
default: q(() => [s(X, {
|
|
@@ -657,21 +657,21 @@ const gr = /* @__PURE__ */ fe({
|
|
|
657
657
|
placeholder: ((nt = d.fallback) == null ? void 0 : nt.name2) || e(k)("menu.product.form.detail.fields.name2.placeholder"),
|
|
658
658
|
label: e(k)("menu.product.form.detail.fields.name2.label"),
|
|
659
659
|
"onUpdate:modelValue": R[2] || (R[2] = (se) => c("update:form", "name2", e(Ft)(se, d.isOverride)))
|
|
660
|
-
}, null, 8, ["disabled", "helper-text", "model-value", "placeholder", "label"]), K("div",
|
|
660
|
+
}, null, 8, ["disabled", "helper-text", "model-value", "placeholder", "label"]), K("div", lr, [s(re, {
|
|
661
661
|
disabled: !_.value.description,
|
|
662
662
|
"model-value": d.form.description || "",
|
|
663
663
|
placeholder: ((Ue = d.fallback) == null ? void 0 : Ue.description) || e(k)("menu.product.form.detail.fields.description.placeholder"),
|
|
664
664
|
"onUpdate:modelValue": R[3] || (R[3] = (se) => c("update:form", "description", se.trim())),
|
|
665
665
|
class: "description"
|
|
666
666
|
}, {
|
|
667
|
-
label: q(() => [K("p",
|
|
667
|
+
label: q(() => [K("p", ir, [Tn(ye(e(k)("menu.product.form.detail.fields.description.label")) + " ", 1), K("span", sr, ye(e(k)("menu.product.form.detail.fields.description.optional")), 1)])]),
|
|
668
668
|
_: 1
|
|
669
|
-
}, 8, ["disabled", "model-value", "placeholder"]), K("div",
|
|
669
|
+
}, 8, ["disabled", "model-value", "placeholder"]), K("div", ur, [s(W, {
|
|
670
670
|
variant: "plain",
|
|
671
671
|
placement: "top",
|
|
672
672
|
"z-index": 999
|
|
673
673
|
}, {
|
|
674
|
-
content: q(() => [K("div",
|
|
674
|
+
content: q(() => [K("div", dr, [(A(!0), J(Se, null, Ae(ce.value, (se) => (A(), J("div", {
|
|
675
675
|
key: se.locale
|
|
676
676
|
}, ye(se.name) + " (" + ye(se.localeDisplay) + ") ", 1))), 128))])]),
|
|
677
677
|
default: q(() => {
|
|
@@ -688,7 +688,7 @@ const gr = /* @__PURE__ */ fe({
|
|
|
688
688
|
}), at(s(e(vn), {
|
|
689
689
|
class: "cursor-pointer",
|
|
690
690
|
onClick: l
|
|
691
|
-
}, null, 512), [[de, e(Dt)("Suggest description")]])])]), s(
|
|
691
|
+
}, null, 512), [[de, e(Dt)("Suggest description")]])])]), s(Kn, {
|
|
692
692
|
disabled: !_.value.images,
|
|
693
693
|
"item-id": d.form._id || "",
|
|
694
694
|
"legacy-thumbnail": d.form.thumbnail ?? ((qt = d.fallback) == null ? void 0 : qt.thumbnail) ?? null,
|
|
@@ -704,17 +704,17 @@ const gr = /* @__PURE__ */ fe({
|
|
|
704
704
|
"model-value": d.isAddon ? Ge.ADD_ON : Ge.PRODUCT,
|
|
705
705
|
"onUpdate:modelValue": R[4] || (R[4] = (se) => g(se))
|
|
706
706
|
}, {
|
|
707
|
-
default: q(() => [K("div",
|
|
707
|
+
default: q(() => [K("div", cr, [K("div", mr, [s(ie, {
|
|
708
708
|
disabled: T.value,
|
|
709
709
|
value: Ge.PRODUCT,
|
|
710
710
|
label: e(k)("menu.product.form.detail.category.options.product.label"),
|
|
711
711
|
sublabel: e(k)("menu.product.form.detail.category.options.product.sublabel")
|
|
712
|
-
}, null, 8, ["disabled", "value", "label", "sublabel"]), s(
|
|
712
|
+
}, null, 8, ["disabled", "value", "label", "sublabel"]), s(Bn, null, {
|
|
713
713
|
default: q(() => [e(m).isV4 ? (A(), ne(x, {
|
|
714
714
|
key: 0
|
|
715
715
|
})) : Z("", !0)]),
|
|
716
716
|
_: 1
|
|
717
|
-
})]), T.value ? (A(), J("div",
|
|
717
|
+
})]), T.value ? (A(), J("div", pr, [s(ue, {
|
|
718
718
|
title: e(k)("menu.product.form.detail.category.add_first"),
|
|
719
719
|
variant: "info"
|
|
720
720
|
}, null, 8, ["title"]), s(we, {
|
|
@@ -744,7 +744,7 @@ const gr = /* @__PURE__ */ fe({
|
|
|
744
744
|
key: 0,
|
|
745
745
|
label: e(k)("menu.product.form.detail.path.label")
|
|
746
746
|
}, {
|
|
747
|
-
default: q(() => [K("div",
|
|
747
|
+
default: q(() => [K("div", fr, [s(zn, {
|
|
748
748
|
modelValue: p.value,
|
|
749
749
|
"onUpdate:modelValue": R[5] || (R[5] = (se) => p.value = se),
|
|
750
750
|
items: w.value,
|
|
@@ -753,7 +753,7 @@ const gr = /* @__PURE__ */ fe({
|
|
|
753
753
|
"is-local-only": !0
|
|
754
754
|
}, null, 8, ["modelValue", "items", "placeholder", "disabled"])])]),
|
|
755
755
|
_: 1
|
|
756
|
-
}, 8, ["label"])) : Z("", !0), e(m).isV4 && !d.isOverride ? (A(), J("div",
|
|
756
|
+
}, 8, ["label"])) : Z("", !0), e(m).isV4 && !d.isOverride ? (A(), J("div", gr, [s(le, {
|
|
757
757
|
label: e(k)("menu.product.form.detail.fields.shelf_life.label"),
|
|
758
758
|
"model-value": d.form.shelfLife ?? null,
|
|
759
759
|
rules: [(se) => se == null || se > 0 || e(k)("menu.common.validation.min_value", {
|
|
@@ -762,7 +762,7 @@ const gr = /* @__PURE__ */ fe({
|
|
|
762
762
|
"onUpdate:modelValue": R[6] || (R[6] = (se) => {
|
|
763
763
|
(se == null || se > 0) && c("update:form", "shelfLife", se);
|
|
764
764
|
})
|
|
765
|
-
}, null, 8, ["label", "model-value", "rules"]), s(
|
|
765
|
+
}, null, 8, ["label", "model-value", "rules"]), s(jn, {
|
|
766
766
|
form: d.form,
|
|
767
767
|
"onUpdate:orderQuantity": R[7] || (R[7] = (se) => c("update:form", "orderQuantity", se))
|
|
768
768
|
}, null, 8, ["form"])])) : Z("", !0), s(At, {
|
|
@@ -776,7 +776,7 @@ const gr = /* @__PURE__ */ fe({
|
|
|
776
776
|
}, null, 8, ["disabled", "model-value", "order-from-none", "required", "default-label", "label"])];
|
|
777
777
|
}),
|
|
778
778
|
_: 1
|
|
779
|
-
}, 8, ["title"]), s(
|
|
779
|
+
}, 8, ["title"]), s(Yn, {
|
|
780
780
|
modelValue: G.value,
|
|
781
781
|
"onUpdate:modelValue": R[9] || (R[9] = (Q) => G.value = Q),
|
|
782
782
|
"product-name": d.form.name || ((ae = d.fallback) == null ? void 0 : ae.name) || "",
|
|
@@ -791,7 +791,7 @@ const gr = /* @__PURE__ */ fe({
|
|
|
791
791
|
}, null, 8, ["modelValue", "product-name", "product-name-locale", "product-description", "product-description-locale", "initial-section"])], 64);
|
|
792
792
|
};
|
|
793
793
|
}
|
|
794
|
-
}),
|
|
794
|
+
}), br = /* @__PURE__ */ it(vr, [["__scopeId", "data-v-30393c7a"]]), yr = /* @__PURE__ */ fe({
|
|
795
795
|
__name: "AddForm",
|
|
796
796
|
setup(i) {
|
|
797
797
|
const a = be(), t = M(() => a.rules.group), o = M(() => !!a.state.currentCatalogId || !!a.state.currentSchedulerId), m = M(() => {
|
|
@@ -822,7 +822,7 @@ const gr = /* @__PURE__ */ fe({
|
|
|
822
822
|
position: a.groups.length - 1,
|
|
823
823
|
itemsLinked: []
|
|
824
824
|
}), b = ee(r()), { t: F } = _e();
|
|
825
|
-
return (c, _) => t.value.create ? (A(), ne(e(
|
|
825
|
+
return (c, _) => t.value.create ? (A(), ne(e($r), {
|
|
826
826
|
key: 0,
|
|
827
827
|
"categorized-items": e(a).categorizedItems,
|
|
828
828
|
config: m.value,
|
|
@@ -840,7 +840,7 @@ const gr = /* @__PURE__ */ fe({
|
|
|
840
840
|
_: 3
|
|
841
841
|
}, 8, ["categorized-items", "config", "group", "title"])) : Z("", !0);
|
|
842
842
|
}
|
|
843
|
-
}),
|
|
843
|
+
}), _r = { class: "fm-typo-en-title-sm-600" }, hr = { class: "flex items-end space-x-24" }, kr = { class: "flex" }, _n = /* @__PURE__ */ fe({
|
|
844
844
|
__name: "UpdateForm",
|
|
845
845
|
props: {
|
|
846
846
|
combinations: {},
|
|
@@ -923,7 +923,7 @@ const gr = /* @__PURE__ */ fe({
|
|
|
923
923
|
return {
|
|
924
924
|
...N,
|
|
925
925
|
groups: (h = N.groups) == null ? void 0 : h.map((g) => ({
|
|
926
|
-
...
|
|
926
|
+
...Wn(g, S())
|
|
927
927
|
}))
|
|
928
928
|
};
|
|
929
929
|
});
|
|
@@ -967,15 +967,15 @@ const gr = /* @__PURE__ */ fe({
|
|
|
967
967
|
variant: "outlined"
|
|
968
968
|
}, {
|
|
969
969
|
default: q(() => [
|
|
970
|
-
K("p",
|
|
971
|
-
K("div",
|
|
970
|
+
K("p", _r, ye(e(x)("menu.group.option.variant")), 1),
|
|
971
|
+
K("div", hr, [
|
|
972
972
|
s(h, {
|
|
973
973
|
modelValue: _.value,
|
|
974
974
|
"onUpdate:modelValue": N[0] || (N[0] = (l) => _.value = l),
|
|
975
975
|
items: P.value,
|
|
976
976
|
class: "flex-1"
|
|
977
977
|
}, null, 8, ["modelValue", "items"]),
|
|
978
|
-
K("div",
|
|
978
|
+
K("div", kr, [
|
|
979
979
|
s(g, {
|
|
980
980
|
variant: e(Pe).Tertiary,
|
|
981
981
|
"prepend-icon": "keyboard_arrow_left",
|
|
@@ -998,19 +998,19 @@ const gr = /* @__PURE__ */ fe({
|
|
|
998
998
|
}, 8, ["categorized-items", "group", "title"]);
|
|
999
999
|
};
|
|
1000
1000
|
}
|
|
1001
|
-
}),
|
|
1001
|
+
}), wr = {
|
|
1002
1002
|
key: 0
|
|
1003
|
-
}, wr = {
|
|
1004
|
-
key: 1
|
|
1005
1003
|
}, Cr = {
|
|
1006
|
-
|
|
1004
|
+
key: 1
|
|
1007
1005
|
}, Ir = {
|
|
1006
|
+
class: "xs:overflow-x-scroll"
|
|
1007
|
+
}, Tr = {
|
|
1008
1008
|
class: "xs:min-w-[640px]"
|
|
1009
1009
|
};
|
|
1010
|
-
function
|
|
1010
|
+
function xr(i) {
|
|
1011
1011
|
return typeof i == "function" || Object.prototype.toString.call(i) === "[object Object]" && !xn(i);
|
|
1012
1012
|
}
|
|
1013
|
-
const
|
|
1013
|
+
const Sr = /* @__PURE__ */ fe({
|
|
1014
1014
|
__name: "OptionTable",
|
|
1015
1015
|
props: {
|
|
1016
1016
|
config: {},
|
|
@@ -1033,7 +1033,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
1033
1033
|
}))])), {
|
|
1034
1034
|
searchKey: y,
|
|
1035
1035
|
filter: n
|
|
1036
|
-
} =
|
|
1036
|
+
} = Oo(), T = M(() => {
|
|
1037
1037
|
const I = Object.entries(t.group.items).filter(([, E]) => n([E.code || "", E.name || E.fallbackName, V(E.price ?? E.fallbackPrice), $(E.orderFrom || E.fallbackOrder), ...(E.items || []).map((d) => [d.code || "", d.name || d.fallbackName, V(d.price ?? d.fallbackPrice), $(d.orderFrom || d.fallbackOrder)].join(""))]));
|
|
1038
1038
|
return Object.fromEntries(I);
|
|
1039
1039
|
}), S = (I) => ({
|
|
@@ -1044,7 +1044,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
1044
1044
|
orderFrom: t.config.orderFrom(I)
|
|
1045
1045
|
}), Y = M(() => !0), V = (I) => I ? ze(I, !1) : "", $ = (I) => {
|
|
1046
1046
|
var E;
|
|
1047
|
-
return I == null ? "" : (E =
|
|
1047
|
+
return I == null ? "" : (E = bo()[I]) == null ? void 0 : E.label;
|
|
1048
1048
|
}, x = M(() => Object.values(T.value)), D = ee({}), {
|
|
1049
1049
|
t: u
|
|
1050
1050
|
} = _e(), f = jt(), N = ee([{
|
|
@@ -1258,7 +1258,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
1258
1258
|
default: () => [R.length > 0 ? s(Ce.FmBadge, {
|
|
1259
1259
|
class: "bg-fm-color-primary text-fm-color-neutral-white !right-0 !top-0",
|
|
1260
1260
|
value: R.length
|
|
1261
|
-
},
|
|
1261
|
+
}, xr(W) ? W : {
|
|
1262
1262
|
default: () => [W]
|
|
1263
1263
|
}) : W]
|
|
1264
1264
|
});
|
|
@@ -1321,7 +1321,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
1321
1321
|
}, null)];
|
|
1322
1322
|
}
|
|
1323
1323
|
})
|
|
1324
|
-
}), R.length === 0 ? L() : s(
|
|
1324
|
+
}), R.length === 0 ? L() : s(Hn, {
|
|
1325
1325
|
itemName: v(E),
|
|
1326
1326
|
groups: R,
|
|
1327
1327
|
allItems: r.state.menu.modules.item
|
|
@@ -1374,7 +1374,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
1374
1374
|
}
|
|
1375
1375
|
}]), h = M(() => r.state.menu.modules.item.reduce((I, E) => (I[E._id] = E, I), {})), g = M(() => {
|
|
1376
1376
|
const I = r.state.menu.modules.item, E = r.state.menu.modules.group;
|
|
1377
|
-
return Object.values(t.group.items).flatMap((d) => [d, ...d.items ?? []]).reduce((d, R) => (d[U(R)] =
|
|
1377
|
+
return Object.values(t.group.items).flatMap((d) => [d, ...d.items ?? []]).reduce((d, R) => (d[U(R)] = Xn(R, I, E), d), {});
|
|
1378
1378
|
});
|
|
1379
1379
|
function U(I) {
|
|
1380
1380
|
return `${I._id}:${I.combinationKey ?? ""}`;
|
|
@@ -1453,7 +1453,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
1453
1453
|
var d;
|
|
1454
1454
|
return I[E._id] = {
|
|
1455
1455
|
price: E.price,
|
|
1456
|
-
variants:
|
|
1456
|
+
variants: yo(((d = E.variant) == null ? void 0 : d.variantCombinations) || [], "combinationKey")
|
|
1457
1457
|
}, I;
|
|
1458
1458
|
}, {})), pe = async (I) => {
|
|
1459
1459
|
let E = ln(t.group);
|
|
@@ -1478,7 +1478,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
1478
1478
|
[R._id]: R
|
|
1479
1479
|
}), {}), o("update:group", E);
|
|
1480
1480
|
}
|
|
1481
|
-
const ve =
|
|
1481
|
+
const ve = go(), me = M(() => ve.breakpoints.value.xs);
|
|
1482
1482
|
return (I, E) => {
|
|
1483
1483
|
const d = H("fm-button"), R = H("fm-table");
|
|
1484
1484
|
return A(), ne(Me, {
|
|
@@ -1486,7 +1486,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
1486
1486
|
}, {
|
|
1487
1487
|
"append-title": q(() => [I.config.link() ? (A(), J(Se, {
|
|
1488
1488
|
key: 0
|
|
1489
|
-
}, [_.value ? (A(), J("div",
|
|
1489
|
+
}, [_.value ? (A(), J("div", wr, [s(Ot, {
|
|
1490
1490
|
"categorized-items": I.categorizedItems,
|
|
1491
1491
|
"initial-value": P.value,
|
|
1492
1492
|
"show-variant": I.config.bindToVariant,
|
|
@@ -1508,7 +1508,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
1508
1508
|
onClick: L
|
|
1509
1509
|
}, null, 8, ["text-color", "border-color", "label", "onClick"])]),
|
|
1510
1510
|
_: 1
|
|
1511
|
-
}, 8, ["categorized-items", "initial-value", "show-variant", "title"])])) : (A(), J("div",
|
|
1511
|
+
}, 8, ["categorized-items", "initial-value", "show-variant", "title"])])) : (A(), J("div", Cr, [s(d, {
|
|
1512
1512
|
"text-color": e(Re).ColorPrimary,
|
|
1513
1513
|
"border-color": e(Re).ColorPrimary,
|
|
1514
1514
|
variant: "secondary",
|
|
@@ -1516,7 +1516,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
1516
1516
|
"prepend-icon": "add",
|
|
1517
1517
|
onClick: k
|
|
1518
1518
|
}, null, 8, ["text-color", "border-color", "label"])]))], 64)) : Z("", !0)]),
|
|
1519
|
-
default: q(() => [K("div",
|
|
1519
|
+
default: q(() => [K("div", Ir, [K("div", Tr, [s(R, {
|
|
1520
1520
|
"column-defs": N.value,
|
|
1521
1521
|
"column-visibility": p.value,
|
|
1522
1522
|
draggable: !me.value && S(null).name,
|
|
@@ -1535,10 +1535,10 @@ const xr = /* @__PURE__ */ fe({
|
|
|
1535
1535
|
}, 8, ["title"]);
|
|
1536
1536
|
};
|
|
1537
1537
|
}
|
|
1538
|
-
}),
|
|
1538
|
+
}), Er = { class: "fm-typo-en-title-md-600" }, Fr = {
|
|
1539
1539
|
key: 0,
|
|
1540
1540
|
class: "pt-8 space-y-32"
|
|
1541
|
-
},
|
|
1541
|
+
}, Vr = { class: "flex gap-8 items-center justify-start" }, hn = /* @__PURE__ */ fe({
|
|
1542
1542
|
__name: "BaseForm",
|
|
1543
1543
|
props: {
|
|
1544
1544
|
title: {},
|
|
@@ -1551,11 +1551,11 @@ const xr = /* @__PURE__ */ fe({
|
|
|
1551
1551
|
emits: ["update:group", "submit:group", "status:show"],
|
|
1552
1552
|
setup(i, { expose: a, emit: t }) {
|
|
1553
1553
|
let o = i;
|
|
1554
|
-
const m = t, r = be(), b = lt(), F = Qe(), c = Bt(bt(Ye())), { countDefaultItems: _, validateGroupItems: C, minMaxValidationRules: P } =
|
|
1554
|
+
const m = t, r = be(), b = lt(), F = Qe(), c = Bt(bt(Ye())), { countDefaultItems: _, validateGroupItems: C, minMaxValidationRules: P } = Qn(
|
|
1555
1555
|
() => o.group
|
|
1556
1556
|
), y = ee(!1), n = ee(!1), T = (p) => {
|
|
1557
1557
|
zt.isBoolean(p) ? n.value = p : n.value = !n.value;
|
|
1558
|
-
}, S = M(() => o.group ? o.config(o.group) : null), Y = M(() =>
|
|
1558
|
+
}, S = M(() => o.group ? o.config(o.group) : null), Y = M(() => Jn(S.value)), V = (p) => Y.value.includes(p), $ = M(() => [
|
|
1559
1559
|
{
|
|
1560
1560
|
label: "Normal",
|
|
1561
1561
|
value: he.enum.NORMAL
|
|
@@ -1607,7 +1607,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
1607
1607
|
), h = M(() => o.action === "add" ? w("common.add") : w("common.update"));
|
|
1608
1608
|
async function g() {
|
|
1609
1609
|
if (o.action === "add") {
|
|
1610
|
-
const { group: p, linkItems: k } =
|
|
1610
|
+
const { group: p, linkItems: k } = eo(o.group), G = {
|
|
1611
1611
|
module: xe.enum.group,
|
|
1612
1612
|
operation: Fe.F_OPERATION_TYPE.create,
|
|
1613
1613
|
data: p,
|
|
@@ -1667,12 +1667,12 @@ const xr = /* @__PURE__ */ fe({
|
|
|
1667
1667
|
"onOn:clickedAway": e(N)
|
|
1668
1668
|
}, {
|
|
1669
1669
|
"side-sheet-header": q(() => [
|
|
1670
|
-
K("p",
|
|
1670
|
+
K("p", Er, ye(p.title), 1)
|
|
1671
1671
|
]),
|
|
1672
1672
|
"side-sheet-footer": q(() => [
|
|
1673
|
-
K("div",
|
|
1673
|
+
K("div", Vr, [
|
|
1674
1674
|
s(ve, {
|
|
1675
|
-
label: e(
|
|
1675
|
+
label: e(Mo)(h.value),
|
|
1676
1676
|
loading: y.value,
|
|
1677
1677
|
size: "lg",
|
|
1678
1678
|
type: "submit",
|
|
@@ -1687,9 +1687,9 @@ const xr = /* @__PURE__ */ fe({
|
|
|
1687
1687
|
])
|
|
1688
1688
|
]),
|
|
1689
1689
|
default: q(() => [
|
|
1690
|
-
p.group ? (A(), J("div",
|
|
1690
|
+
p.group ? (A(), J("div", Fr, [
|
|
1691
1691
|
Be(p.$slots, "variant-section"),
|
|
1692
|
-
s(
|
|
1692
|
+
s(Co, null, {
|
|
1693
1693
|
default: q(() => [
|
|
1694
1694
|
K("div", null, [
|
|
1695
1695
|
s(G, {
|
|
@@ -1708,7 +1708,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
1708
1708
|
rules: e(P)
|
|
1709
1709
|
}, {
|
|
1710
1710
|
default: q(() => [
|
|
1711
|
-
s(
|
|
1711
|
+
s(Zn, null, {
|
|
1712
1712
|
default: q(() => [
|
|
1713
1713
|
s(B, {
|
|
1714
1714
|
modelValue: p.group.min,
|
|
@@ -1797,7 +1797,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
1797
1797
|
})
|
|
1798
1798
|
}, {
|
|
1799
1799
|
default: q(() => [
|
|
1800
|
-
s(
|
|
1800
|
+
s(Sr, {
|
|
1801
1801
|
"allow-refund-inventory": p.allowRefundInventory ?? !1,
|
|
1802
1802
|
"categorized-items": p.categorizedItems,
|
|
1803
1803
|
config: S.value,
|
|
@@ -1815,13 +1815,13 @@ const xr = /* @__PURE__ */ fe({
|
|
|
1815
1815
|
], 64);
|
|
1816
1816
|
};
|
|
1817
1817
|
}
|
|
1818
|
-
}),
|
|
1818
|
+
}), $r = hn, tn = yr, Pr = _n, Dr = {
|
|
1819
1819
|
key: 0,
|
|
1820
1820
|
class: "flex flex-col space-y-16 h-[440px]"
|
|
1821
|
-
},
|
|
1821
|
+
}, Or = { class: "flex-1 flex-shrink space-y-8 min-h-0 overflow-y-scroll p-8" }, Mr = { class: "flex justify-between pb-16" }, Ur = { class: "flex gap-8" }, Rr = {
|
|
1822
1822
|
key: 1,
|
|
1823
1823
|
class: "flex flex-col items-center space-y-16"
|
|
1824
|
-
},
|
|
1824
|
+
}, Ar = { class: "flex flex-col items-center space-y-4 w-full" }, Nr = { class: "fm-typo-en-title-sm-600" }, Lr = { class: "text-fm-color-typo-secondary" }, Gr = /* @__PURE__ */ fe({
|
|
1825
1825
|
__name: "SelectGroupDialog",
|
|
1826
1826
|
props: {
|
|
1827
1827
|
groupIds: {}
|
|
@@ -1873,7 +1873,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
1873
1873
|
};
|
|
1874
1874
|
return (Y, V) => {
|
|
1875
1875
|
const $ = H("FmSearch"), x = H("FmCheckbox"), D = H("FmButton");
|
|
1876
|
-
return C.value.length > 0 ? (A(), J("div",
|
|
1876
|
+
return C.value.length > 0 ? (A(), J("div", Dr, [
|
|
1877
1877
|
K("div", null, [
|
|
1878
1878
|
s($, {
|
|
1879
1879
|
autofocus: "",
|
|
@@ -1882,7 +1882,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
1882
1882
|
placeholder: e(T)("menu.common.labels.search_groups")
|
|
1883
1883
|
}, null, 8, ["modelValue", "placeholder"])
|
|
1884
1884
|
]),
|
|
1885
|
-
K("div",
|
|
1885
|
+
K("div", Or, [
|
|
1886
1886
|
K("div", null, [
|
|
1887
1887
|
(A(!0), J(Se, null, Ae(C.value, (u) => (A(), J("div", {
|
|
1888
1888
|
key: u.value
|
|
@@ -1901,7 +1901,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
1901
1901
|
]))), 128))
|
|
1902
1902
|
])
|
|
1903
1903
|
]),
|
|
1904
|
-
K("div",
|
|
1904
|
+
K("div", Mr, [
|
|
1905
1905
|
s(e(tn), null, {
|
|
1906
1906
|
default: q(({ trigger: u }) => [
|
|
1907
1907
|
s(D, {
|
|
@@ -1913,7 +1913,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
1913
1913
|
]),
|
|
1914
1914
|
_: 1
|
|
1915
1915
|
}),
|
|
1916
|
-
K("div",
|
|
1916
|
+
K("div", Ur, [
|
|
1917
1917
|
s(D, {
|
|
1918
1918
|
label: e(T)("menu.common.actions.cancel"),
|
|
1919
1919
|
variant: "tertiary",
|
|
@@ -1925,10 +1925,10 @@ const xr = /* @__PURE__ */ fe({
|
|
|
1925
1925
|
}, null, 8, ["label"])
|
|
1926
1926
|
])
|
|
1927
1927
|
])
|
|
1928
|
-
])) : (A(), J("div",
|
|
1929
|
-
K("div",
|
|
1930
|
-
K("p",
|
|
1931
|
-
K("p",
|
|
1928
|
+
])) : (A(), J("div", Rr, [
|
|
1929
|
+
K("div", Ar, [
|
|
1930
|
+
K("p", Nr, ye(e(T)("menu.common.empty.no_group.title")), 1),
|
|
1931
|
+
K("p", Lr, ye(e(T)("menu.common.empty.no_group.subtitle")), 1)
|
|
1932
1932
|
]),
|
|
1933
1933
|
s(e(tn), null, {
|
|
1934
1934
|
default: q(({ trigger: u }) => [
|
|
@@ -1943,7 +1943,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
1943
1943
|
]));
|
|
1944
1944
|
};
|
|
1945
1945
|
}
|
|
1946
|
-
}),
|
|
1946
|
+
}), Kr = /* @__PURE__ */ fe({
|
|
1947
1947
|
__name: "ProductGroup",
|
|
1948
1948
|
props: {
|
|
1949
1949
|
isOverride: {
|
|
@@ -2069,7 +2069,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
2069
2069
|
onClick: Je(async () => {
|
|
2070
2070
|
u(v);
|
|
2071
2071
|
}, ["stop", "prevent"])
|
|
2072
|
-
}), Ie(
|
|
2072
|
+
}), Ie(Pr, {
|
|
2073
2073
|
// variant items
|
|
2074
2074
|
combinations: N.value ?? [],
|
|
2075
2075
|
// combinationKey: varaintName
|
|
@@ -2095,7 +2095,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
2095
2095
|
function x() {
|
|
2096
2096
|
r.open({
|
|
2097
2097
|
title: b("menu.product.form.group.add"),
|
|
2098
|
-
contentComponent:
|
|
2098
|
+
contentComponent: Gr,
|
|
2099
2099
|
contentComponentProps: {
|
|
2100
2100
|
groupIds: y.value
|
|
2101
2101
|
}
|
|
@@ -2105,7 +2105,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
2105
2105
|
}
|
|
2106
2106
|
function D(l) {
|
|
2107
2107
|
var p;
|
|
2108
|
-
const v = l.find((k) =>
|
|
2108
|
+
const v = l.find((k) => to(o.state.menu, k, t.form._id));
|
|
2109
2109
|
if (v) {
|
|
2110
2110
|
m.open({
|
|
2111
2111
|
type: "error",
|
|
@@ -2215,11 +2215,11 @@ const xr = /* @__PURE__ */ fe({
|
|
|
2215
2215
|
}, 8, ["title", "sub-title", "id"]);
|
|
2216
2216
|
};
|
|
2217
2217
|
}
|
|
2218
|
-
}),
|
|
2218
|
+
}), Br = {
|
|
2219
2219
|
class: "xs:overflow-x-scroll"
|
|
2220
|
-
},
|
|
2220
|
+
}, zr = {
|
|
2221
2221
|
class: "xs:min-w-[640px]"
|
|
2222
|
-
},
|
|
2222
|
+
}, jr = /* @__PURE__ */ fe({
|
|
2223
2223
|
__name: "ProductInventory",
|
|
2224
2224
|
props: {
|
|
2225
2225
|
isOverride: {
|
|
@@ -2343,7 +2343,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
2343
2343
|
for (const D of Y.value)
|
|
2344
2344
|
D.getKey() === x && D.trigger(!0);
|
|
2345
2345
|
}
|
|
2346
|
-
const $ =
|
|
2346
|
+
const $ = Uo();
|
|
2347
2347
|
return Xe(() => {
|
|
2348
2348
|
$.readInventory();
|
|
2349
2349
|
}), (x, D) => {
|
|
@@ -2352,7 +2352,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
2352
2352
|
title: e(t)("menu.inventory.title"),
|
|
2353
2353
|
subTitle: e(t)("menu.inventory.subtitle")
|
|
2354
2354
|
}, {
|
|
2355
|
-
default: q(() => [K("div",
|
|
2355
|
+
default: q(() => [K("div", Br, [K("div", zr, [(A(!0), J(Se, null, Ae(T.value, (f) => (A(), ne(e(Vt), {
|
|
2356
2356
|
key: f._id,
|
|
2357
2357
|
ref_for: !0,
|
|
2358
2358
|
ref_key: "inventoryManagerForms",
|
|
@@ -2366,7 +2366,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
2366
2366
|
"onUpdate:inventory": (N) => {
|
|
2367
2367
|
S(f._id, N);
|
|
2368
2368
|
}
|
|
2369
|
-
}, null, 8, ["title", "name", "bindingKey", "initialValue", "onUpdate:inventory"]))), 128)), s(e(
|
|
2369
|
+
}, null, 8, ["title", "name", "bindingKey", "initialValue", "onUpdate:inventory"]))), 128)), s(e(Ro), {
|
|
2370
2370
|
"row-data": T.value,
|
|
2371
2371
|
onRowClick: V
|
|
2372
2372
|
}, null, 8, ["row-data"])])])]),
|
|
@@ -2391,22 +2391,22 @@ const xr = /* @__PURE__ */ fe({
|
|
|
2391
2391
|
}, 8, ["title", "sub-title"])], 64)) : Z("", !0)], 64);
|
|
2392
2392
|
};
|
|
2393
2393
|
}
|
|
2394
|
-
}),
|
|
2394
|
+
}), Yr = ["id"], qr = {
|
|
2395
2395
|
key: 0,
|
|
2396
2396
|
class: "flex fm-corner-radius-lg p-16 border border-fm-color-neutral-gray-100 items-center justify-between"
|
|
2397
|
-
},
|
|
2397
|
+
}, Wr = { class: "flex flex-col space-y-4" }, Hr = { class: "fm-typo-en-body-lg-600" }, Xr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Qr = { class: "flex items-center gap-8" }, Jr = { class: "space-y-16" }, Zr = { class: "space-y-8" }, ea = {
|
|
2398
2398
|
key: 0,
|
|
2399
2399
|
class: "pl-32 pb-4 space-x-16 flex items-center"
|
|
2400
|
-
},
|
|
2400
|
+
}, ta = { class: "fm-typo-en-body-lg-400" }, na = { class: "w-[258px]" }, oa = { class: "w-[117px]" }, ra = {
|
|
2401
2401
|
key: 0,
|
|
2402
2402
|
class: "space-y-8"
|
|
2403
|
-
},
|
|
2403
|
+
}, aa = {
|
|
2404
2404
|
key: 0,
|
|
2405
2405
|
class: "pl-32 pb-4 flex space-x-16"
|
|
2406
|
-
},
|
|
2406
|
+
}, la = { class: "w-[258px] xs:w-full" }, ia = {
|
|
2407
2407
|
key: 1,
|
|
2408
2408
|
class: "space-y-8"
|
|
2409
|
-
},
|
|
2409
|
+
}, sa = { class: "pl-32 pb-4 flex space-x-16" }, ua = { class: "w-[258px] xs:w-full" }, da = /* @__PURE__ */ fe({
|
|
2410
2410
|
__name: "ProductPrice",
|
|
2411
2411
|
props: {
|
|
2412
2412
|
isOverride: { type: Boolean },
|
|
@@ -2466,7 +2466,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
2466
2466
|
command: "suggestPrice"
|
|
2467
2467
|
});
|
|
2468
2468
|
}
|
|
2469
|
-
const Y =
|
|
2469
|
+
const Y = Ao(m), V = M(() => {
|
|
2470
2470
|
var u, f;
|
|
2471
2471
|
return ((u = m.currentCatalog) == null ? void 0 : u.priceTierRules) ?? ((f = m.currentCatalog) == null ? void 0 : f.usePriceTiers) ?? [];
|
|
2472
2472
|
}), $ = jt(), x = M(() => $.getMemberPricingPriceVariant(t.form.price_variant));
|
|
@@ -2521,13 +2521,13 @@ const xr = /* @__PURE__ */ fe({
|
|
|
2521
2521
|
"shift-menu": "",
|
|
2522
2522
|
"onUpdate:modelValue": f[1] || (f[1] = (p) => b("update:form", "taxes", [e(ht).decodeTax(p)]))
|
|
2523
2523
|
}, null, 8, ["disabled", "items", "label", "model-value"])
|
|
2524
|
-
], 8,
|
|
2525
|
-
e(m).isV4 ? (A(), J("div",
|
|
2526
|
-
K("div",
|
|
2527
|
-
K("p",
|
|
2528
|
-
K("p",
|
|
2524
|
+
], 8, Yr),
|
|
2525
|
+
e(m).isV4 ? (A(), J("div", qr, [
|
|
2526
|
+
K("div", Wr, [
|
|
2527
|
+
K("p", Hr, ye(e(r)("menu.product.form.member_price.title")), 1),
|
|
2528
|
+
K("p", Xr, ye(e(r)("menu.product.form.member_price.description")), 1)
|
|
2529
2529
|
]),
|
|
2530
|
-
K("div",
|
|
2530
|
+
K("div", Qr, [
|
|
2531
2531
|
s(Nt, {
|
|
2532
2532
|
title: e(r)("menu.product.form.member_price.configure.title"),
|
|
2533
2533
|
currentConfig: "Main Pricing",
|
|
@@ -2567,7 +2567,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
2567
2567
|
default: q(() => {
|
|
2568
2568
|
var p;
|
|
2569
2569
|
return [
|
|
2570
|
-
u.isOverride ? Z("", !0) : (A(), ne(
|
|
2570
|
+
u.isOverride ? Z("", !0) : (A(), ne(no, {
|
|
2571
2571
|
key: 0,
|
|
2572
2572
|
"price-tiers": e(Y).priceTiers.value,
|
|
2573
2573
|
"model-value": u.form.priceTiers || ((p = u.fallback) == null ? void 0 : p.priceTiers) || {},
|
|
@@ -2584,7 +2584,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
2584
2584
|
default: q(() => {
|
|
2585
2585
|
var p, k, G;
|
|
2586
2586
|
return [
|
|
2587
|
-
K("div",
|
|
2587
|
+
K("div", Jr, [
|
|
2588
2588
|
s(g, {
|
|
2589
2589
|
disabled: !F.value.openPrice || u.isAddon,
|
|
2590
2590
|
"model-value": u.form.openPrice ?? ((p = u.fallback) == null ? void 0 : p.openPrice) ?? !1,
|
|
@@ -2593,7 +2593,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
2593
2593
|
sublabel: e(r)("menu.product.form.price.settings.open_price.sublabel"),
|
|
2594
2594
|
"onUpdate:modelValue": f[5] || (f[5] = (B) => b("update:form", "openPrice", B))
|
|
2595
2595
|
}, null, 8, ["disabled", "model-value", "value", "label", "sublabel"]),
|
|
2596
|
-
K("div",
|
|
2596
|
+
K("div", Zr, [
|
|
2597
2597
|
s(g, {
|
|
2598
2598
|
disabled: !F.value.unit || u.isAddon,
|
|
2599
2599
|
"model-value": c.value,
|
|
@@ -2602,9 +2602,9 @@ const xr = /* @__PURE__ */ fe({
|
|
|
2602
2602
|
sublabel: e(r)("menu.product.form.price.settings.sell_by_unit.sublabel"),
|
|
2603
2603
|
"onUpdate:modelValue": _
|
|
2604
2604
|
}, null, 8, ["disabled", "model-value", "value", "label", "sublabel"]),
|
|
2605
|
-
c.value ? (A(), J("div",
|
|
2606
|
-
K("p",
|
|
2607
|
-
K("div",
|
|
2605
|
+
c.value ? (A(), J("div", ea, [
|
|
2606
|
+
K("p", ta, ye(e(r)("menu.product.form.price.settings.sell_by_unit.per_unit.label")), 1),
|
|
2607
|
+
K("div", na, [
|
|
2608
2608
|
s(U, {
|
|
2609
2609
|
disabled: !F.value.unit,
|
|
2610
2610
|
"model-value": u.form.perXUnit || ((k = u.fallback) == null ? void 0 : k.perXUnit) || null,
|
|
@@ -2619,7 +2619,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
2619
2619
|
"onUpdate:modelValue": y
|
|
2620
2620
|
}, null, 8, ["disabled", "model-value", "rules", "placeholder"])
|
|
2621
2621
|
]),
|
|
2622
|
-
K("div",
|
|
2622
|
+
K("div", oa, [
|
|
2623
2623
|
s(U, {
|
|
2624
2624
|
disabled: !F.value.unit,
|
|
2625
2625
|
"model-value": u.form.unit || ((G = u.fallback) == null ? void 0 : G.unit) || null,
|
|
@@ -2632,15 +2632,15 @@ const xr = /* @__PURE__ */ fe({
|
|
|
2632
2632
|
])
|
|
2633
2633
|
])) : Z("", !0)
|
|
2634
2634
|
]),
|
|
2635
|
-
F.value.costing ? (A(), J("div",
|
|
2635
|
+
F.value.costing ? (A(), J("div", ra, [
|
|
2636
2636
|
s(g, {
|
|
2637
2637
|
"model-value": !!u.form.costing,
|
|
2638
2638
|
value: !!u.form.costing,
|
|
2639
2639
|
label: e(r)("menu.product.form.price.settings.track_costing.label"),
|
|
2640
2640
|
"onUpdate:modelValue": f[7] || (f[7] = (B) => b("update:form", "costing", B ? e(Te.Dinero).zero().toObject() : void 0))
|
|
2641
2641
|
}, null, 8, ["model-value", "value", "label"]),
|
|
2642
|
-
u.form.costing ? (A(), J("div",
|
|
2643
|
-
K("div",
|
|
2642
|
+
u.form.costing ? (A(), J("div", aa, [
|
|
2643
|
+
K("div", la, [
|
|
2644
2644
|
s(Ze, {
|
|
2645
2645
|
class: "w-full",
|
|
2646
2646
|
min: 0,
|
|
@@ -2652,7 +2652,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
2652
2652
|
])
|
|
2653
2653
|
])) : Z("", !0)
|
|
2654
2654
|
])) : Z("", !0),
|
|
2655
|
-
F.value.minPrice ? (A(), J("div",
|
|
2655
|
+
F.value.minPrice ? (A(), J("div", ia, [
|
|
2656
2656
|
s(g, {
|
|
2657
2657
|
disabled: !F.value.minPrice || u.isAddon,
|
|
2658
2658
|
"model-value": !!u.form.minPrice,
|
|
@@ -2660,8 +2660,8 @@ const xr = /* @__PURE__ */ fe({
|
|
|
2660
2660
|
label: e(r)("menu.product.form.price.settings.min_price.label"),
|
|
2661
2661
|
"onUpdate:modelValue": f[9] || (f[9] = (B) => b("update:form", "minPrice", B ? e(Te.Dinero).zero().toObject() : void 0))
|
|
2662
2662
|
}, null, 8, ["disabled", "model-value", "value", "label"]),
|
|
2663
|
-
K("div",
|
|
2664
|
-
K("div",
|
|
2663
|
+
K("div", sa, [
|
|
2664
|
+
K("div", ua, [
|
|
2665
2665
|
u.form.minPrice ? (A(), ne(Ze, {
|
|
2666
2666
|
key: 0,
|
|
2667
2667
|
max: e(Te.Dinero).fromFdoDinero(u.form.price).toUnit(),
|
|
@@ -2685,7 +2685,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
2685
2685
|
}, 8, ["title"]);
|
|
2686
2686
|
};
|
|
2687
2687
|
}
|
|
2688
|
-
}),
|
|
2688
|
+
}), ca = { class: "space-y-16" }, ma = { class: "flex items-center space-x-4" }, pa = { class: "handle" }, fa = { class: "pt-16" }, ga = /* @__PURE__ */ fe({
|
|
2689
2689
|
__name: "ProductPrint",
|
|
2690
2690
|
props: {
|
|
2691
2691
|
isOverride: { type: Boolean },
|
|
@@ -2794,7 +2794,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
2794
2794
|
"onUpdate:modelValue": $[1] || ($[1] = (g) => n(g))
|
|
2795
2795
|
}, {
|
|
2796
2796
|
default: q(() => [
|
|
2797
|
-
K("div",
|
|
2797
|
+
K("div", ca, [
|
|
2798
2798
|
(A(!0), J(Se, null, Ae(Y.value, (g, U) => (A(), ne(D, {
|
|
2799
2799
|
key: U,
|
|
2800
2800
|
label: g.label,
|
|
@@ -2820,8 +2820,8 @@ const xr = /* @__PURE__ */ fe({
|
|
|
2820
2820
|
item: q(({ element: g }) => {
|
|
2821
2821
|
var U, l, v, w, p;
|
|
2822
2822
|
return [
|
|
2823
|
-
K("div",
|
|
2824
|
-
K("div",
|
|
2823
|
+
K("div", ma, [
|
|
2824
|
+
K("div", pa, [
|
|
2825
2825
|
_.value ? (A(), ne(f, {
|
|
2826
2826
|
key: 0,
|
|
2827
2827
|
disabled: !((l = (U = t.form.print) == null ? void 0 : U.department) != null && l.includes(g)),
|
|
@@ -2846,9 +2846,9 @@ const xr = /* @__PURE__ */ fe({
|
|
|
2846
2846
|
}),
|
|
2847
2847
|
_: 1
|
|
2848
2848
|
}, 8, ["item-key", "model-value"])) : Z("", !0),
|
|
2849
|
-
s(e(
|
|
2849
|
+
s(e(oo), { "apply-product": !1 }, {
|
|
2850
2850
|
default: q(({ trigger: g }) => [
|
|
2851
|
-
K("div",
|
|
2851
|
+
K("div", fa, [
|
|
2852
2852
|
s(f, {
|
|
2853
2853
|
variant: e(Pe).Secondary,
|
|
2854
2854
|
label: e(m)("menu.product.form.print.routes.add"),
|
|
@@ -2868,7 +2868,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
2868
2868
|
}, 8, ["title"]);
|
|
2869
2869
|
};
|
|
2870
2870
|
}
|
|
2871
|
-
}),
|
|
2871
|
+
}), va = /* @__PURE__ */ fe({
|
|
2872
2872
|
__name: "ProductTakeaway",
|
|
2873
2873
|
props: {
|
|
2874
2874
|
isOverride: {
|
|
@@ -2890,7 +2890,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
2890
2890
|
} = _e(), b = a, {
|
|
2891
2891
|
hasVariant: F,
|
|
2892
2892
|
takeaways: c
|
|
2893
|
-
} =
|
|
2893
|
+
} = ro(t, b, m), _ = M(() => [t.isOverride ? {
|
|
2894
2894
|
label: r("menu.product.form.takeaway.options.follows_main"),
|
|
2895
2895
|
value: null
|
|
2896
2896
|
} : {
|
|
@@ -2909,7 +2909,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
2909
2909
|
header: () => r("menu.product.form.takeaway.columns.takeaway"),
|
|
2910
2910
|
cell: (P) => {
|
|
2911
2911
|
const y = P.getValue(), n = P.row.original;
|
|
2912
|
-
return Ie(
|
|
2912
|
+
return Ie(Po, {
|
|
2913
2913
|
action: "add",
|
|
2914
2914
|
applyProduct: !1,
|
|
2915
2915
|
bindToVariant: o.rules.item.bindToVariant,
|
|
@@ -2918,7 +2918,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
2918
2918
|
module: xe.enum.takeaway,
|
|
2919
2919
|
operation: Fe.F_OPERATION_TYPE.create,
|
|
2920
2920
|
data: T,
|
|
2921
|
-
link:
|
|
2921
|
+
link: Do(T.usedBy || [])
|
|
2922
2922
|
});
|
|
2923
2923
|
}
|
|
2924
2924
|
}, {
|
|
@@ -2964,10 +2964,10 @@ const xr = /* @__PURE__ */ fe({
|
|
|
2964
2964
|
}, 8, ["title", "sub-title"]);
|
|
2965
2965
|
};
|
|
2966
2966
|
}
|
|
2967
|
-
}),
|
|
2967
|
+
}), ba = { class: "fm-typo-en-title-md-600" }, ya = { class: "py-16 space-y-32" }, _a = ["data-not-allow-sort"], ha = {
|
|
2968
2968
|
key: 1,
|
|
2969
2969
|
class: "w-24"
|
|
2970
|
-
},
|
|
2970
|
+
}, ka = { class: "flex-1" }, wa = { class: "flex gap-8 items-center justify-start" }, Ca = /* @__PURE__ */ fe({
|
|
2971
2971
|
__name: "VariantManagerForm",
|
|
2972
2972
|
props: {
|
|
2973
2973
|
initialValue: {}
|
|
@@ -3074,10 +3074,10 @@ const xr = /* @__PURE__ */ fe({
|
|
|
3074
3074
|
"onOn:clickedAway": e($)
|
|
3075
3075
|
}, {
|
|
3076
3076
|
"side-sheet-header": q(() => [
|
|
3077
|
-
K("p",
|
|
3077
|
+
K("p", ba, ye(F.value), 1)
|
|
3078
3078
|
]),
|
|
3079
3079
|
"side-sheet-footer": q(() => [
|
|
3080
|
-
K("div",
|
|
3080
|
+
K("div", wa, [
|
|
3081
3081
|
s(h, {
|
|
3082
3082
|
label: c.value,
|
|
3083
3083
|
loading: P.value,
|
|
@@ -3096,7 +3096,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
3096
3096
|
default: q(() => {
|
|
3097
3097
|
var U;
|
|
3098
3098
|
return [
|
|
3099
|
-
K("div",
|
|
3099
|
+
K("div", ya, [
|
|
3100
3100
|
s(Me, {
|
|
3101
3101
|
title: e(b)("menu.variant.form.detail")
|
|
3102
3102
|
}, {
|
|
@@ -3133,8 +3133,8 @@ const xr = /* @__PURE__ */ fe({
|
|
|
3133
3133
|
key: 0,
|
|
3134
3134
|
class: "handle",
|
|
3135
3135
|
name: "drag_handle"
|
|
3136
|
-
})) : v > 0 ? (A(), J("div",
|
|
3137
|
-
K("div",
|
|
3136
|
+
})) : v > 0 ? (A(), J("div", ha)) : Z("", !0),
|
|
3137
|
+
K("div", ka, [
|
|
3138
3138
|
s(f, {
|
|
3139
3139
|
"model-value": l.name,
|
|
3140
3140
|
rules: [
|
|
@@ -3157,7 +3157,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
3157
3157
|
} : void 0
|
|
3158
3158
|
]), 1032, ["model-value", "rules", "placeholder", "onUpdate:modelValue"])
|
|
3159
3159
|
])
|
|
3160
|
-
], 8,
|
|
3160
|
+
], 8, _a)
|
|
3161
3161
|
]),
|
|
3162
3162
|
_: 1
|
|
3163
3163
|
}, 8, ["model-value"])
|
|
@@ -3168,7 +3168,7 @@ const xr = /* @__PURE__ */ fe({
|
|
|
3168
3168
|
]),
|
|
3169
3169
|
_: 1
|
|
3170
3170
|
}, 8, ["title"]),
|
|
3171
|
-
(U = C.value.usedBy) != null && U.length ? (A(), ne(
|
|
3171
|
+
(U = C.value.usedBy) != null && U.length ? (A(), ne(No, {
|
|
3172
3172
|
key: 0,
|
|
3173
3173
|
editable: !1,
|
|
3174
3174
|
overrides: C.value.usedBy || [],
|
|
@@ -3183,11 +3183,11 @@ const xr = /* @__PURE__ */ fe({
|
|
|
3183
3183
|
};
|
|
3184
3184
|
}
|
|
3185
3185
|
});
|
|
3186
|
-
function
|
|
3186
|
+
function Ia() {
|
|
3187
3187
|
const i = cn();
|
|
3188
3188
|
function a() {
|
|
3189
3189
|
i.open({
|
|
3190
|
-
component:
|
|
3190
|
+
component: Ca,
|
|
3191
3191
|
props: {
|
|
3192
3192
|
initialValue: void 0
|
|
3193
3193
|
}
|
|
@@ -3197,13 +3197,13 @@ function Ca() {
|
|
|
3197
3197
|
createVariant: a
|
|
3198
3198
|
};
|
|
3199
3199
|
}
|
|
3200
|
-
const
|
|
3200
|
+
const Ta = {
|
|
3201
3201
|
key: 0,
|
|
3202
3202
|
class: "flex flex-col space-y-16 h-[440px]"
|
|
3203
|
-
},
|
|
3203
|
+
}, xa = { class: "flex-1 flex-shrink space-y-8 min-h-0 overflow-y-scroll p-8" }, Sa = { class: "flex justify-between pb-16" }, Ea = { class: "flex gap-8" }, Fa = {
|
|
3204
3204
|
key: 1,
|
|
3205
3205
|
class: "flex flex-col items-center space-y-16"
|
|
3206
|
-
},
|
|
3206
|
+
}, Va = { class: "flex flex-col items-center space-y-4 w-full" }, $a = { class: "fm-typo-en-title-sm-600" }, Pa = { class: "text-fm-color-typo-secondary" }, Da = /* @__PURE__ */ fe({
|
|
3207
3207
|
__name: "SelectVariantDialog",
|
|
3208
3208
|
props: {
|
|
3209
3209
|
selectedVariants: {}
|
|
@@ -3213,12 +3213,12 @@ const Ia = {
|
|
|
3213
3213
|
label: y.name,
|
|
3214
3214
|
value: y._id,
|
|
3215
3215
|
disabled: !1
|
|
3216
|
-
}))), c = ee(ke(b.selectedVariants)), _ = ee(""), { createVariant: C } =
|
|
3216
|
+
}))), c = ee(ke(b.selectedVariants)), _ = ee(""), { createVariant: C } = Ia(), P = () => {
|
|
3217
3217
|
t(c.value), o("primary"), a.close();
|
|
3218
3218
|
};
|
|
3219
3219
|
return (y, n) => {
|
|
3220
3220
|
const T = H("FmSearch"), S = H("FmCheckbox"), Y = H("FmButton");
|
|
3221
|
-
return F.value.length > 0 ? (A(), J("div",
|
|
3221
|
+
return F.value.length > 0 ? (A(), J("div", Ta, [
|
|
3222
3222
|
K("div", null, [
|
|
3223
3223
|
s(T, {
|
|
3224
3224
|
autofocus: "",
|
|
@@ -3227,7 +3227,7 @@ const Ia = {
|
|
|
3227
3227
|
placeholder: e(r)("menu.common.labels.search_variants")
|
|
3228
3228
|
}, null, 8, ["modelValue", "placeholder"])
|
|
3229
3229
|
]),
|
|
3230
|
-
K("div",
|
|
3230
|
+
K("div", xa, [
|
|
3231
3231
|
K("div", null, [
|
|
3232
3232
|
(A(!0), J(Se, null, Ae(F.value, (V) => (A(), J("div", {
|
|
3233
3233
|
key: V.value
|
|
@@ -3246,7 +3246,7 @@ const Ia = {
|
|
|
3246
3246
|
]))), 128))
|
|
3247
3247
|
])
|
|
3248
3248
|
]),
|
|
3249
|
-
K("div",
|
|
3249
|
+
K("div", Sa, [
|
|
3250
3250
|
e(m).rules.item.variant ? (A(), ne(Y, {
|
|
3251
3251
|
key: 0,
|
|
3252
3252
|
label: e(r)("menu.common.actions.add_new_variant"),
|
|
@@ -3254,7 +3254,7 @@ const Ia = {
|
|
|
3254
3254
|
"text-color": "primary",
|
|
3255
3255
|
onClick: n[3] || (n[3] = (V) => e(C)())
|
|
3256
3256
|
}, null, 8, ["label"])) : Z("", !0),
|
|
3257
|
-
K("div",
|
|
3257
|
+
K("div", Ea, [
|
|
3258
3258
|
s(Y, {
|
|
3259
3259
|
label: e(r)("menu.common.actions.cancel"),
|
|
3260
3260
|
variant: "tertiary",
|
|
@@ -3266,10 +3266,10 @@ const Ia = {
|
|
|
3266
3266
|
}, null, 8, ["label"])
|
|
3267
3267
|
])
|
|
3268
3268
|
])
|
|
3269
|
-
])) : (A(), J("div",
|
|
3270
|
-
K("div",
|
|
3271
|
-
K("p",
|
|
3272
|
-
K("p",
|
|
3269
|
+
])) : (A(), J("div", Fa, [
|
|
3270
|
+
K("div", Va, [
|
|
3271
|
+
K("p", $a, ye(e(r)("menu.common.empty.no_variant.title")), 1),
|
|
3272
|
+
K("p", Pa, ye(e(r)("menu.common.empty.no_variant.subtitle")), 1)
|
|
3273
3273
|
]),
|
|
3274
3274
|
s(Y, {
|
|
3275
3275
|
label: e(r)("menu.variant.add"),
|
|
@@ -3279,15 +3279,15 @@ const Ia = {
|
|
|
3279
3279
|
]));
|
|
3280
3280
|
};
|
|
3281
3281
|
}
|
|
3282
|
-
}),
|
|
3282
|
+
}), Oa = {
|
|
3283
3283
|
class: "space-y-16"
|
|
3284
|
-
}, Oa = {
|
|
3285
|
-
class: "flex items-center space-x-8"
|
|
3286
3284
|
}, Ma = {
|
|
3287
|
-
class: "flex items-center
|
|
3285
|
+
class: "flex items-center space-x-8"
|
|
3288
3286
|
}, Ua = {
|
|
3287
|
+
class: "flex items-center flex-1 h-[36px] px-8 border border-fm-color-neutral-gray-300 rounded-md bg-fm-color-neutral-white"
|
|
3288
|
+
}, Ra = {
|
|
3289
3289
|
class: "flex-1 fm-typo-en-body-lg-400"
|
|
3290
|
-
},
|
|
3290
|
+
}, Aa = /* @__PURE__ */ fe({
|
|
3291
3291
|
__name: "ProductVariants",
|
|
3292
3292
|
props: {
|
|
3293
3293
|
isOverride: {
|
|
@@ -3304,7 +3304,7 @@ const Ia = {
|
|
|
3304
3304
|
setup(i, {
|
|
3305
3305
|
emit: a
|
|
3306
3306
|
}) {
|
|
3307
|
-
const t = i, o = vt(), m = be(), r =
|
|
3307
|
+
const t = i, o = vt(), m = be(), r = ao(), b = Ye(), F = Qe(), {
|
|
3308
3308
|
t: c
|
|
3309
3309
|
} = _e(), _ = M(() => m.rules.item), C = M(() => _.value.minPrice && !!t.form.minPrice), P = M(() => !m.state.currentCatalogId), y = M(() => m.variants.reduce((l, v) => (l[v._id] = v, l), {})), n = a;
|
|
3310
3310
|
function T(l) {
|
|
@@ -3334,7 +3334,7 @@ const Ia = {
|
|
|
3334
3334
|
var l;
|
|
3335
3335
|
F.open({
|
|
3336
3336
|
title: "Add variant",
|
|
3337
|
-
contentComponent:
|
|
3337
|
+
contentComponent: Da,
|
|
3338
3338
|
contentComponentProps: {
|
|
3339
3339
|
selectedVariants: ((l = t.form.variant) == null ? void 0 : l.variantGroupIds) ?? []
|
|
3340
3340
|
}
|
|
@@ -3536,7 +3536,7 @@ const Ia = {
|
|
|
3536
3536
|
"price-tiers-variant": w.priceTiers_variant,
|
|
3537
3537
|
fallback: (pe = w.fallback) == null ? void 0 : pe.priceTiers,
|
|
3538
3538
|
"onUpdate:value": (O) => {
|
|
3539
|
-
u(l.row.index, "priceTiers", O.priceTiers), u(l.row.index, "priceTiers_variant",
|
|
3539
|
+
u(l.row.index, "priceTiers", O.priceTiers), u(l.row.index, "priceTiers_variant", lo(O.priceTiersVariant));
|
|
3540
3540
|
}
|
|
3541
3541
|
}, null)]);
|
|
3542
3542
|
}
|
|
@@ -3582,7 +3582,7 @@ const Ia = {
|
|
|
3582
3582
|
}, null, 8, ["label"])) : Z("", !0)]),
|
|
3583
3583
|
default: q(() => {
|
|
3584
3584
|
var B;
|
|
3585
|
-
return [K("div",
|
|
3585
|
+
return [K("div", Oa, [s(k, {
|
|
3586
3586
|
"model-value": (B = l.form.variant) == null ? void 0 : B.variantGroupIds,
|
|
3587
3587
|
rules: [U]
|
|
3588
3588
|
}, {
|
|
@@ -3600,11 +3600,11 @@ const Ia = {
|
|
|
3600
3600
|
element: ce
|
|
3601
3601
|
}) => {
|
|
3602
3602
|
var pe;
|
|
3603
|
-
return [K("div",
|
|
3603
|
+
return [K("div", Ma, [s(w, {
|
|
3604
3604
|
variant: e(Pe).Tertiary,
|
|
3605
3605
|
class: "handle",
|
|
3606
3606
|
"prepend-icon": "drag_handle"
|
|
3607
|
-
}, null, 8, ["variant"]), K("div",
|
|
3607
|
+
}, null, 8, ["variant"]), K("div", Ua, [K("p", Ra, ye((pe = y.value[ce]) == null ? void 0 : pe.name), 1), s(p, {
|
|
3608
3608
|
class: "cursor-pointer",
|
|
3609
3609
|
name: "close",
|
|
3610
3610
|
onClick: Je((O) => {
|
|
@@ -3635,31 +3635,31 @@ const Ia = {
|
|
|
3635
3635
|
}, 8, ["id", "title", "sub-title"]);
|
|
3636
3636
|
};
|
|
3637
3637
|
}
|
|
3638
|
-
}),
|
|
3638
|
+
}), Na = {
|
|
3639
3639
|
key: 0,
|
|
3640
3640
|
class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
|
|
3641
|
-
},
|
|
3641
|
+
}, La = {
|
|
3642
3642
|
key: 2,
|
|
3643
3643
|
class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
|
|
3644
|
-
},
|
|
3644
|
+
}, Ga = {
|
|
3645
3645
|
key: 3,
|
|
3646
3646
|
class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
|
|
3647
|
-
},
|
|
3647
|
+
}, Ka = {
|
|
3648
3648
|
key: 5,
|
|
3649
3649
|
class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
|
|
3650
|
-
},
|
|
3650
|
+
}, Ba = {
|
|
3651
3651
|
key: 6,
|
|
3652
3652
|
class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
|
|
3653
|
-
},
|
|
3653
|
+
}, za = {
|
|
3654
3654
|
key: 8,
|
|
3655
3655
|
class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
|
|
3656
|
-
},
|
|
3656
|
+
}, ja = {
|
|
3657
3657
|
key: 10,
|
|
3658
3658
|
class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
|
|
3659
|
-
},
|
|
3659
|
+
}, Ya = {
|
|
3660
3660
|
key: 12,
|
|
3661
3661
|
class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
|
|
3662
|
-
},
|
|
3662
|
+
}, qa = /* @__PURE__ */ fe({
|
|
3663
3663
|
__name: "ItemForm",
|
|
3664
3664
|
props: {
|
|
3665
3665
|
initialForm: {},
|
|
@@ -3709,7 +3709,7 @@ const Ia = {
|
|
|
3709
3709
|
n.value = z, O();
|
|
3710
3710
|
};
|
|
3711
3711
|
async function V() {
|
|
3712
|
-
y.value = n.value._id && $.value ? (await
|
|
3712
|
+
y.value = n.value._id && $.value ? (await Io(
|
|
3713
3713
|
o.mergedMenu,
|
|
3714
3714
|
[n.value],
|
|
3715
3715
|
o.menu,
|
|
@@ -3861,7 +3861,7 @@ const Ia = {
|
|
|
3861
3861
|
}
|
|
3862
3862
|
});
|
|
3863
3863
|
function O() {
|
|
3864
|
-
m("update:editingState",
|
|
3864
|
+
m("update:editingState", so(Ve.cloneDeep(n.value)));
|
|
3865
3865
|
}
|
|
3866
3866
|
const te = ee(null);
|
|
3867
3867
|
function ve() {
|
|
@@ -3939,7 +3939,7 @@ const Ia = {
|
|
|
3939
3939
|
ref: C,
|
|
3940
3940
|
items: _.value
|
|
3941
3941
|
}, null, 8, ["items"]),
|
|
3942
|
-
s(
|
|
3942
|
+
s(xo, { "menu-store": e(b) }, null, 8, ["menu-store"]),
|
|
3943
3943
|
s(qe, {
|
|
3944
3944
|
toggle: u.value,
|
|
3945
3945
|
"onUpdate:toggle": [
|
|
@@ -3953,7 +3953,7 @@ const Ia = {
|
|
|
3953
3953
|
default: q(() => {
|
|
3954
3954
|
var Q;
|
|
3955
3955
|
return [
|
|
3956
|
-
s(
|
|
3956
|
+
s(br, {
|
|
3957
3957
|
fallback: y.value,
|
|
3958
3958
|
form: n.value,
|
|
3959
3959
|
"is-addon": x.value,
|
|
@@ -3965,7 +3965,7 @@ const Ia = {
|
|
|
3965
3965
|
}),
|
|
3966
3966
|
_: 1
|
|
3967
3967
|
}, 8, ["toggle", "disabled", "description", "title"]),
|
|
3968
|
-
$.value ? Z("", !0) : (A(), J("div",
|
|
3968
|
+
$.value ? Z("", !0) : (A(), J("div", Na)),
|
|
3969
3969
|
D.value ? (A(), ne(Me, {
|
|
3970
3970
|
key: 1,
|
|
3971
3971
|
title: e(F)("menu.product.form.sections.tagging.title"),
|
|
@@ -3981,7 +3981,7 @@ const Ia = {
|
|
|
3981
3981
|
]),
|
|
3982
3982
|
_: 1
|
|
3983
3983
|
}, 8, ["title", "sub-title"])) : Z("", !0),
|
|
3984
|
-
D.value ? (A(), J("div",
|
|
3984
|
+
D.value ? (A(), J("div", La)) : Z("", !0),
|
|
3985
3985
|
s(qe, {
|
|
3986
3986
|
toggle: h.value,
|
|
3987
3987
|
"onUpdate:toggle": [
|
|
@@ -3993,7 +3993,7 @@ const Ia = {
|
|
|
3993
3993
|
title: e(F)("menu.product.form.sections.price.title")
|
|
3994
3994
|
}, {
|
|
3995
3995
|
default: q(() => [
|
|
3996
|
-
s(
|
|
3996
|
+
s(da, {
|
|
3997
3997
|
fallback: y.value,
|
|
3998
3998
|
form: n.value,
|
|
3999
3999
|
"is-addon": x.value,
|
|
@@ -4003,7 +4003,7 @@ const Ia = {
|
|
|
4003
4003
|
]),
|
|
4004
4004
|
_: 1
|
|
4005
4005
|
}, 8, ["toggle", "disabled", "description", "title"]),
|
|
4006
|
-
P.value.print && !$.value ? (A(), J("div",
|
|
4006
|
+
P.value.print && !$.value ? (A(), J("div", Ga)) : Z("", !0),
|
|
4007
4007
|
P.value.print ? (A(), ne(qe, {
|
|
4008
4008
|
key: 4,
|
|
4009
4009
|
toggle: G.value,
|
|
@@ -4016,7 +4016,7 @@ const Ia = {
|
|
|
4016
4016
|
title: "Update print"
|
|
4017
4017
|
}, {
|
|
4018
4018
|
default: q(() => [
|
|
4019
|
-
s(
|
|
4019
|
+
s(ga, {
|
|
4020
4020
|
fallback: y.value,
|
|
4021
4021
|
form: n.value,
|
|
4022
4022
|
"full-combinations": T.value,
|
|
@@ -4028,7 +4028,7 @@ const Ia = {
|
|
|
4028
4028
|
]),
|
|
4029
4029
|
_: 1
|
|
4030
4030
|
}, 8, ["toggle"])) : Z("", !0),
|
|
4031
|
-
$.value ? Z("", !0) : (A(), J("div",
|
|
4031
|
+
$.value ? Z("", !0) : (A(), J("div", Ka)),
|
|
4032
4032
|
s(qe, {
|
|
4033
4033
|
toggle: U.value,
|
|
4034
4034
|
"onUpdate:toggle": [
|
|
@@ -4040,7 +4040,7 @@ const Ia = {
|
|
|
4040
4040
|
title: e(F)("menu.product.form.sections.variant.title")
|
|
4041
4041
|
}, {
|
|
4042
4042
|
default: q(() => [
|
|
4043
|
-
s(
|
|
4043
|
+
s(Aa, {
|
|
4044
4044
|
fallback: y.value,
|
|
4045
4045
|
form: n.value,
|
|
4046
4046
|
"full-combinations": T.value,
|
|
@@ -4052,7 +4052,7 @@ const Ia = {
|
|
|
4052
4052
|
]),
|
|
4053
4053
|
_: 1
|
|
4054
4054
|
}, 8, ["toggle", "disabled", "description", "title"]),
|
|
4055
|
-
P.value.group && !$.value ? (A(), J("div",
|
|
4055
|
+
P.value.group && !$.value ? (A(), J("div", Ba)) : Z("", !0),
|
|
4056
4056
|
P.value.group ? (A(), ne(qe, {
|
|
4057
4057
|
key: 7,
|
|
4058
4058
|
toggle: oe.value,
|
|
@@ -4065,7 +4065,7 @@ const Ia = {
|
|
|
4065
4065
|
title: "Update group"
|
|
4066
4066
|
}, {
|
|
4067
4067
|
default: q(() => [
|
|
4068
|
-
s(
|
|
4068
|
+
s(Kr, {
|
|
4069
4069
|
fallback: y.value,
|
|
4070
4070
|
form: n.value,
|
|
4071
4071
|
"full-combinations": T.value,
|
|
@@ -4077,7 +4077,7 @@ const Ia = {
|
|
|
4077
4077
|
]),
|
|
4078
4078
|
_: 1
|
|
4079
4079
|
}, 8, ["toggle", "disabled"])) : Z("", !0),
|
|
4080
|
-
P.value.inventory && !$.value ? (A(), J("div",
|
|
4080
|
+
P.value.inventory && !$.value ? (A(), J("div", za)) : Z("", !0),
|
|
4081
4081
|
P.value.inventory ? (A(), ne(qe, {
|
|
4082
4082
|
key: 9,
|
|
4083
4083
|
toggle: v.value,
|
|
@@ -4090,7 +4090,7 @@ const Ia = {
|
|
|
4090
4090
|
title: e(F)("menu.product.form.sections.inventory.title")
|
|
4091
4091
|
}, {
|
|
4092
4092
|
default: q(() => [
|
|
4093
|
-
s(
|
|
4093
|
+
s(jr, {
|
|
4094
4094
|
fallback: y.value,
|
|
4095
4095
|
form: n.value,
|
|
4096
4096
|
"full-combinations": T.value,
|
|
@@ -4102,7 +4102,7 @@ const Ia = {
|
|
|
4102
4102
|
]),
|
|
4103
4103
|
_: 1
|
|
4104
4104
|
}, 8, ["toggle", "disabled", "description", "title"])) : Z("", !0),
|
|
4105
|
-
P.value.takeaway(n.value.category ?? ((ae = y.value) == null ? void 0 : ae.category)) && !$.value ? (A(), J("div",
|
|
4105
|
+
P.value.takeaway(n.value.category ?? ((ae = y.value) == null ? void 0 : ae.category)) && !$.value ? (A(), J("div", ja)) : Z("", !0),
|
|
4106
4106
|
P.value.takeaway(n.value.category ?? ((ge = y.value) == null ? void 0 : ge.category)) ? (A(), ne(qe, {
|
|
4107
4107
|
key: 11,
|
|
4108
4108
|
toggle: p.value,
|
|
@@ -4115,7 +4115,7 @@ const Ia = {
|
|
|
4115
4115
|
title: e(F)("menu.product.form.sections.takeaway.title")
|
|
4116
4116
|
}, {
|
|
4117
4117
|
default: q(() => [
|
|
4118
|
-
s(
|
|
4118
|
+
s(va, {
|
|
4119
4119
|
fallback: y.value,
|
|
4120
4120
|
form: n.value,
|
|
4121
4121
|
"full-combinations": T.value,
|
|
@@ -4127,8 +4127,8 @@ const Ia = {
|
|
|
4127
4127
|
]),
|
|
4128
4128
|
_: 1
|
|
4129
4129
|
}, 8, ["toggle", "disabled", "description", "title"])) : Z("", !0),
|
|
4130
|
-
P.value.serveDelay && !$.value ? (A(), J("div",
|
|
4131
|
-
P.value.serveDelay ? (A(), ne(
|
|
4130
|
+
P.value.serveDelay && !$.value ? (A(), J("div", Ya)) : Z("", !0),
|
|
4131
|
+
P.value.serveDelay ? (A(), ne(io, {
|
|
4132
4132
|
key: 13,
|
|
4133
4133
|
form: n.value,
|
|
4134
4134
|
"onUpdate:linkedOrderPacing": j[20] || (j[20] = (Q) => X(Q)),
|
|
@@ -4142,8 +4142,8 @@ const Ia = {
|
|
|
4142
4142
|
};
|
|
4143
4143
|
}
|
|
4144
4144
|
});
|
|
4145
|
-
function
|
|
4146
|
-
const { storageKey: a, defaultWidth: t, minWidth: o, maxWidth: m } = i, r =
|
|
4145
|
+
function Wa(i) {
|
|
4146
|
+
const { storageKey: a, defaultWidth: t, minWidth: o, maxWidth: m } = i, r = uo(a, t), b = ee(!1), F = ee(null);
|
|
4147
4147
|
function c(P) {
|
|
4148
4148
|
P.preventDefault(), b.value = !0, document.addEventListener("mousemove", _), document.addEventListener("mouseup", C), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
|
|
4149
4149
|
}
|
|
@@ -4166,24 +4166,24 @@ function qa(i) {
|
|
|
4166
4166
|
stopResize: C
|
|
4167
4167
|
};
|
|
4168
4168
|
}
|
|
4169
|
-
const
|
|
4169
|
+
const Ha = {
|
|
4170
4170
|
class: "h-full relative bg-fm-color-neutral-gray-100",
|
|
4171
4171
|
style: { width: "1px" }
|
|
4172
|
-
},
|
|
4172
|
+
}, Xa = { class: "flex-1 pr-24" }, Qa = {
|
|
4173
4173
|
key: 0,
|
|
4174
4174
|
class: "absolute inset-0 flex items-center justify-center bg-white bg-opacity-70"
|
|
4175
|
-
},
|
|
4175
|
+
}, Ja = "tree-editor-left-panel-width", Za = 300, el = 600, tl = 300, nl = /* @__PURE__ */ fe({
|
|
4176
4176
|
__name: "TreeEditorLayout",
|
|
4177
4177
|
setup(i) {
|
|
4178
4178
|
const {
|
|
4179
4179
|
panelWidth: a,
|
|
4180
4180
|
containerRef: t,
|
|
4181
4181
|
startResize: o
|
|
4182
|
-
} =
|
|
4183
|
-
storageKey:
|
|
4184
|
-
defaultWidth:
|
|
4185
|
-
minWidth:
|
|
4186
|
-
maxWidth:
|
|
4182
|
+
} = Wa({
|
|
4183
|
+
storageKey: Ja,
|
|
4184
|
+
defaultWidth: tl,
|
|
4185
|
+
minWidth: Za,
|
|
4186
|
+
maxWidth: el
|
|
4187
4187
|
});
|
|
4188
4188
|
return (m, r) => (A(), J("div", {
|
|
4189
4189
|
ref_key: "containerRef",
|
|
@@ -4196,24 +4196,24 @@ const Wa = {
|
|
|
4196
4196
|
}, [
|
|
4197
4197
|
Be(m.$slots, "left-panel", {}, void 0, !0)
|
|
4198
4198
|
], 4),
|
|
4199
|
-
K("div",
|
|
4199
|
+
K("div", Ha, [
|
|
4200
4200
|
K("div", {
|
|
4201
4201
|
class: "absolute left-[-3px] right-[-3px] top-0 bottom-0 resize-handle z-10",
|
|
4202
4202
|
onMousedown: r[0] || (r[0] = //@ts-ignore
|
|
4203
4203
|
(...b) => e(o) && e(o)(...b))
|
|
4204
4204
|
}, null, 32)
|
|
4205
4205
|
]),
|
|
4206
|
-
K("div",
|
|
4206
|
+
K("div", Xa, [
|
|
4207
4207
|
Be(m.$slots, "right-panel", {}, void 0, !0)
|
|
4208
4208
|
]),
|
|
4209
|
-
m.$slots.overlay ? (A(), J("div",
|
|
4209
|
+
m.$slots.overlay ? (A(), J("div", Qa, [
|
|
4210
4210
|
Be(m.$slots, "overlay", {}, void 0, !0)
|
|
4211
4211
|
])) : Z("", !0)
|
|
4212
4212
|
], 512));
|
|
4213
4213
|
}
|
|
4214
|
-
}),
|
|
4214
|
+
}), ol = /* @__PURE__ */ it(nl, [["__scopeId", "data-v-570141b0"]]);
|
|
4215
4215
|
var Ee = /* @__PURE__ */ ((i) => (i.SELECT_CATEGORY = "SELECT_CATEGORY", i.CREATE_CATEGORY = "CREATE_CATEGORY", i.UPDATE_CATEGORY = "UPDATE_CATEGORY", i.DELETE_CATEGORY = "DELETE_CATEGORY", i.SELECT_ITEM = "SELECT_ITEM", i.CREATE_ITEM = "CREATE_ITEM", i.UPDATE_ITEM = "UPDATE_ITEM", i.DELETE_ITEM = "DELETE_ITEM", i.SELECT_PRICE = "SELECT_PRICE", i.SELECT_VARIANT = "SELECT_VARIANT", i.SELECT_GROUP = "SELECT_GROUP", i.EDIT_GROUP = "EDIT_GROUP", i))(Ee || {});
|
|
4216
|
-
function
|
|
4216
|
+
function rl(i, a, t) {
|
|
4217
4217
|
const o = () => ({
|
|
4218
4218
|
position: 0,
|
|
4219
4219
|
subCategoryMeta: {}
|
|
@@ -4229,6 +4229,7 @@ function kn() {
|
|
|
4229
4229
|
const _ = {
|
|
4230
4230
|
...je.generator.initMenuV4Item(),
|
|
4231
4231
|
category: F,
|
|
4232
|
+
position: So(i.state.menu.modules.item),
|
|
4232
4233
|
name: c
|
|
4233
4234
|
};
|
|
4234
4235
|
await i.updateMenu({
|
|
@@ -4264,12 +4265,12 @@ function kn() {
|
|
|
4264
4265
|
const V = y.get(S.id);
|
|
4265
4266
|
if (V) {
|
|
4266
4267
|
let $ = null;
|
|
4267
|
-
C && C._id !== c._id && ($ =
|
|
4268
|
+
C && C._id !== c._id && ($ = Eo(
|
|
4268
4269
|
V,
|
|
4269
4270
|
C == null ? void 0 : C._id,
|
|
4270
4271
|
c._id
|
|
4271
4272
|
));
|
|
4272
|
-
const x =
|
|
4273
|
+
const x = Fo(
|
|
4273
4274
|
$ ?? V,
|
|
4274
4275
|
c._id,
|
|
4275
4276
|
Y + 1
|
|
@@ -4277,7 +4278,7 @@ function kn() {
|
|
|
4277
4278
|
Object.assign(V, x);
|
|
4278
4279
|
}
|
|
4279
4280
|
} else if (S.type === "subCategory")
|
|
4280
|
-
P =
|
|
4281
|
+
P = rl(P, [..._, S.id], {
|
|
4281
4282
|
position: Y
|
|
4282
4283
|
});
|
|
4283
4284
|
else
|
|
@@ -4304,7 +4305,7 @@ function kn() {
|
|
|
4304
4305
|
}
|
|
4305
4306
|
var rt = /* @__PURE__ */ ((i) => (i.CATEGORY = "category", i.ITEM = "item", i.SUB_CATEGORY = "subCategory", i))(rt || {});
|
|
4306
4307
|
const ot = /* @__PURE__ */ new Map(), dt = /* @__PURE__ */ new Map();
|
|
4307
|
-
function
|
|
4308
|
+
function al() {
|
|
4308
4309
|
const { t: i } = _e(), a = be(), t = _t(), o = kn(), m = M(
|
|
4309
4310
|
() => a.subcategories.reduce((n, T) => (n[T._id] = T, n), {})
|
|
4310
4311
|
);
|
|
@@ -4388,7 +4389,7 @@ function rl() {
|
|
|
4388
4389
|
var Y, V, $, x;
|
|
4389
4390
|
if (!n.children)
|
|
4390
4391
|
return n;
|
|
4391
|
-
const T = ((V = (Y = _(n)) == null ? void 0 : Y.meta) == null ? void 0 : V.rawId) ?? null, S =
|
|
4392
|
+
const T = ((V = (Y = _(n)) == null ? void 0 : Y.meta) == null ? void 0 : V.rawId) ?? null, S = Vo(T);
|
|
4392
4393
|
return (($ = n.meta) == null ? void 0 : $.nodeType) === "category" || ((x = n.meta) == null ? void 0 : x.nodeType) === "subCategory" ? (n.children = kt(
|
|
4393
4394
|
n.children,
|
|
4394
4395
|
(D) => D.label,
|
|
@@ -4407,7 +4408,7 @@ function rl() {
|
|
|
4407
4408
|
}
|
|
4408
4409
|
async function y({ eventEmitter: n }) {
|
|
4409
4410
|
var B, oe, ce, pe;
|
|
4410
|
-
const T = a.state.menu, S = !a.state.currentCatalogId, Y = !a.state.currentSchedulerId, V = (((oe = (B = a.currentCatalog) == null ? void 0 : B.linkItemRules) == null ? void 0 : oe.length) ?? 0) > 0, $ =
|
|
4411
|
+
const T = a.state.menu, S = !a.state.currentCatalogId, Y = !a.state.currentSchedulerId, V = (((oe = (B = a.currentCatalog) == null ? void 0 : B.linkItemRules) == null ? void 0 : oe.length) ?? 0) > 0, $ = Lo(), x = a.mergedMenu;
|
|
4411
4412
|
ot.clear(), dt.clear();
|
|
4412
4413
|
for (const O of T.modules.item)
|
|
4413
4414
|
ot.set(O._id, O);
|
|
@@ -4559,11 +4560,11 @@ function rl() {
|
|
|
4559
4560
|
id: E(O._id, L.combinationKey),
|
|
4560
4561
|
icon: Le.VARIANT,
|
|
4561
4562
|
label: en(
|
|
4562
|
-
|
|
4563
|
+
Qo(d, L.combinationKey),
|
|
4563
4564
|
L.code
|
|
4564
4565
|
),
|
|
4565
4566
|
children: N(O, L),
|
|
4566
|
-
rightLabel:
|
|
4567
|
+
rightLabel: zo(O, L),
|
|
4567
4568
|
chips: W,
|
|
4568
4569
|
onClick: () => {
|
|
4569
4570
|
n({
|
|
@@ -4606,7 +4607,7 @@ function rl() {
|
|
|
4606
4607
|
showOnHover: !0,
|
|
4607
4608
|
tooltip: i("menu.tree_editor.actions.link_category_to_catalog"),
|
|
4608
4609
|
onClick: () => {
|
|
4609
|
-
const ve = a.state.menu.modules.item.filter((me) =>
|
|
4610
|
+
const ve = a.state.menu.modules.item.filter((me) => Jt(me).some(({ _id: E }) => E === O._id));
|
|
4610
4611
|
$.addProduct(ve.map((me) => me._id));
|
|
4611
4612
|
}
|
|
4612
4613
|
}), {
|
|
@@ -4655,7 +4656,7 @@ function rl() {
|
|
|
4655
4656
|
const p = (O, te) => `item-${te ?? "addon"}-${O}`;
|
|
4656
4657
|
for (const O of x.modules.item) {
|
|
4657
4658
|
const te = ot.get(O._id);
|
|
4658
|
-
|
|
4659
|
+
Jt(O).forEach(({ _id: me }) => {
|
|
4659
4660
|
var E, d, R, L, X, W, re, ie;
|
|
4660
4661
|
const I = me ? U.find((ue) => ue.id === g(me)) : w;
|
|
4661
4662
|
if (I) {
|
|
@@ -4751,7 +4752,7 @@ function rl() {
|
|
|
4751
4752
|
generateTreeFromMenu: y
|
|
4752
4753
|
};
|
|
4753
4754
|
}
|
|
4754
|
-
function
|
|
4755
|
+
function ll() {
|
|
4755
4756
|
const i = Ye(), a = kn(), t = _t(), o = yt();
|
|
4756
4757
|
function m(h) {
|
|
4757
4758
|
i.open({
|
|
@@ -5018,10 +5019,10 @@ const Mt = /* @__PURE__ */ fe({
|
|
|
5018
5019
|
};
|
|
5019
5020
|
}
|
|
5020
5021
|
}), wn = 300;
|
|
5021
|
-
function
|
|
5022
|
+
function il(i) {
|
|
5022
5023
|
const { itemHeight: a, emit: t, getFlattenedItems: o, getContainerRef: m, canDropFn: r } = i, b = ee(!1), F = ee(null), c = ee(null), _ = ee(null), C = ee(0), P = ee({ x: 0, y: 0 }), y = ee(/* @__PURE__ */ new Map());
|
|
5023
5024
|
function n(V, $) {
|
|
5024
|
-
$.button === 0 && (P.value = { x: $.clientX, y: $.clientY }, F.value = V, C.value = $.clientY, y.value =
|
|
5025
|
+
$.button === 0 && (P.value = { x: $.clientX, y: $.clientY }, F.value = V, C.value = $.clientY, y.value = Ho(o()), setTimeout(() => {
|
|
5025
5026
|
F.value === V && (b.value = !0, P.value = { x: $.clientX, y: $.clientY }, t("updateDragState", V, null, null), document.addEventListener("mousemove", T), document.addEventListener("mouseup", S));
|
|
5026
5027
|
}, wn));
|
|
5027
5028
|
}
|
|
@@ -5075,7 +5076,7 @@ function ll(i) {
|
|
|
5075
5076
|
cancelDrag: Y
|
|
5076
5077
|
};
|
|
5077
5078
|
}
|
|
5078
|
-
function
|
|
5079
|
+
function sl(i, a) {
|
|
5079
5080
|
let t = null;
|
|
5080
5081
|
const o = typeof a == "function" ? a : () => a.value;
|
|
5081
5082
|
function m(F) {
|
|
@@ -5095,7 +5096,7 @@ function il(i, a) {
|
|
|
5095
5096
|
onMouseUp: b
|
|
5096
5097
|
};
|
|
5097
5098
|
}
|
|
5098
|
-
const
|
|
5099
|
+
const ul = { key: 0 }, dl = ["innerHTML"], cl = /* @__PURE__ */ fe({
|
|
5099
5100
|
__name: "HighlightableSpan",
|
|
5100
5101
|
props: {
|
|
5101
5102
|
text: {},
|
|
@@ -5108,35 +5109,35 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5108
5109
|
const o = a.highlightedStrings.map((r) => r.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|"), m = new RegExp(`(${o})`, "gi");
|
|
5109
5110
|
return a.text.replace(m, '<span class="highlighted-span">$1</span>');
|
|
5110
5111
|
});
|
|
5111
|
-
return (o, m) => !o.highlightedStrings || o.highlightedStrings.length === 0 ? (A(), J("span",
|
|
5112
|
+
return (o, m) => !o.highlightedStrings || o.highlightedStrings.length === 0 ? (A(), J("span", ul, ye(o.text), 1)) : (A(), J("span", {
|
|
5112
5113
|
key: 1,
|
|
5113
5114
|
innerHTML: t.value
|
|
5114
|
-
}, null, 8,
|
|
5115
|
+
}, null, 8, dl));
|
|
5115
5116
|
}
|
|
5116
|
-
}), xt = /* @__PURE__ */ it(
|
|
5117
|
+
}), xt = /* @__PURE__ */ it(cl, [["__scopeId", "data-v-f6f1080b"]]), ml = {
|
|
5117
5118
|
class: "flex-1 min-w-0 flex items-center gap-4 relative pl-12"
|
|
5118
|
-
}, ml = {
|
|
5119
|
-
class: "flex items-center gap-4 min-w-0"
|
|
5120
5119
|
}, pl = {
|
|
5121
|
-
class: "min-w-0
|
|
5120
|
+
class: "flex items-center gap-4 min-w-0"
|
|
5122
5121
|
}, fl = {
|
|
5123
|
-
class: "
|
|
5122
|
+
class: "min-w-0 flex-1"
|
|
5124
5123
|
}, gl = {
|
|
5125
|
-
class: "
|
|
5124
|
+
class: "py-4 px-8 space-y-12 fm-typo-en-body-md-400"
|
|
5126
5125
|
}, vl = {
|
|
5127
|
-
class: "
|
|
5126
|
+
class: "flex-shrink-0 flex items-center gap-4"
|
|
5128
5127
|
}, bl = {
|
|
5129
|
-
class: "
|
|
5128
|
+
class: "right-area flex items-center gap-4"
|
|
5130
5129
|
}, yl = {
|
|
5130
|
+
class: "flex flex-nowrap items-center show-on-hover"
|
|
5131
|
+
}, _l = {
|
|
5131
5132
|
key: 0,
|
|
5132
5133
|
class: "drop-indicator-before"
|
|
5133
|
-
},
|
|
5134
|
+
}, hl = {
|
|
5134
5135
|
key: 1,
|
|
5135
5136
|
class: "drop-indicator-after"
|
|
5136
|
-
},
|
|
5137
|
+
}, kl = {
|
|
5137
5138
|
key: 2,
|
|
5138
5139
|
class: "drop-indicator-inside"
|
|
5139
|
-
},
|
|
5140
|
+
}, wl = /* @__PURE__ */ fe({
|
|
5140
5141
|
__name: "FmTreeNode",
|
|
5141
5142
|
props: {
|
|
5142
5143
|
node: {},
|
|
@@ -5172,7 +5173,7 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5172
5173
|
onMouseDown: _,
|
|
5173
5174
|
onMouseMove: C,
|
|
5174
5175
|
onMouseUp: P
|
|
5175
|
-
} =
|
|
5176
|
+
} = sl((y) => {
|
|
5176
5177
|
var n;
|
|
5177
5178
|
(n = t.node) != null && n.draggable && c("dragStart", y);
|
|
5178
5179
|
}, () => {
|
|
@@ -5198,7 +5199,7 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5198
5199
|
(...x) => e(P) && e(P)(...x)),
|
|
5199
5200
|
onMouseleave: n[6] || (n[6] = //@ts-ignore
|
|
5200
5201
|
(...x) => e(P) && e(P)(...x))
|
|
5201
|
-
}, [K("div",
|
|
5202
|
+
}, [K("div", ml, [K("div", pl, [(Y = y.node) != null && Y.draggable && !y.node.disabled ? (A(), ne(T, {
|
|
5202
5203
|
key: 0,
|
|
5203
5204
|
name: "drag_indicator",
|
|
5204
5205
|
size: "sm",
|
|
@@ -5216,13 +5217,13 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5216
5217
|
outline: "",
|
|
5217
5218
|
name: y.node.icon,
|
|
5218
5219
|
class: "text-fm-color-neutral-gray-400 flex-shrink-0"
|
|
5219
|
-
}, null, 8, ["name"])) : Z("", !0), K("div",
|
|
5220
|
+
}, null, 8, ["name"])) : Z("", !0), K("div", fl, [s(S, {
|
|
5220
5221
|
content: y.node.label,
|
|
5221
5222
|
variant: "rich",
|
|
5222
5223
|
placement: "top",
|
|
5223
5224
|
"z-index": 50
|
|
5224
5225
|
}, {
|
|
5225
|
-
content: q(() => [K("div",
|
|
5226
|
+
content: q(() => [K("div", gl, [s(xt, {
|
|
5226
5227
|
class: $e(`${F.value} block`),
|
|
5227
5228
|
text: y.node.label,
|
|
5228
5229
|
highlightedStrings: y.highlightedStrings
|
|
@@ -5233,13 +5234,13 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5233
5234
|
highlightedStrings: y.highlightedStrings
|
|
5234
5235
|
}, null, 8, ["class", "text", "highlightedStrings"])]),
|
|
5235
5236
|
_: 1
|
|
5236
|
-
}, 8, ["content"])])]), K("div",
|
|
5237
|
+
}, 8, ["content"])])]), K("div", vl, [(A(!0), J(Se, null, Ae(y.node.chips, (x) => (A(), ne(Ko, {
|
|
5237
5238
|
key: x.label,
|
|
5238
5239
|
size: x.size || "xs",
|
|
5239
5240
|
label: x.label,
|
|
5240
5241
|
variant: x.variant || "neutral",
|
|
5241
5242
|
border: x.border
|
|
5242
|
-
}, null, 8, ["size", "label", "variant", "border"]))), 128))])]), K("div",
|
|
5243
|
+
}, null, 8, ["size", "label", "variant", "border"]))), 128))])]), K("div", bl, [K("div", yl, [(A(!0), J(Se, null, Ae(y.node.actions, (x) => (A(), ne(Ut, {
|
|
5243
5244
|
key: x.id,
|
|
5244
5245
|
name: x.icon,
|
|
5245
5246
|
tooltip: x.tooltip,
|
|
@@ -5256,15 +5257,15 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5256
5257
|
var D, u;
|
|
5257
5258
|
return (u = (D = y.node.rightLabel) == null ? void 0 : D.onClick) == null ? void 0 : u.call(D);
|
|
5258
5259
|
}, ["stop"]))
|
|
5259
|
-
}, null, 8, ["class", "text", "highlightedStrings"])]), y.dropTarget && y.dropPosition === "before" ? (A(), J("div",
|
|
5260
|
+
}, null, 8, ["class", "text", "highlightedStrings"])]), y.dropTarget && y.dropPosition === "before" ? (A(), J("div", _l)) : Z("", !0), y.dropTarget && y.dropPosition === "after" ? (A(), J("div", hl)) : Z("", !0), y.dropTarget && y.dropPosition === "inside" ? (A(), J("div", kl)) : Z("", !0)], 34);
|
|
5260
5261
|
};
|
|
5261
5262
|
}
|
|
5262
|
-
}),
|
|
5263
|
+
}), Cl = ["id"], Il = {
|
|
5263
5264
|
class: "flex items-center gap-4 min-w-fit px-8"
|
|
5264
|
-
},
|
|
5265
|
+
}, Tl = {
|
|
5265
5266
|
key: 1,
|
|
5266
5267
|
class: "empty-tree-message"
|
|
5267
|
-
}, St = 32,
|
|
5268
|
+
}, St = 32, xl = /* @__PURE__ */ fe({
|
|
5268
5269
|
__name: "FmTree",
|
|
5269
5270
|
props: {
|
|
5270
5271
|
nodes: {},
|
|
@@ -5305,7 +5306,7 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5305
5306
|
scrollTo: C,
|
|
5306
5307
|
containerProps: P,
|
|
5307
5308
|
wrapperProps: y
|
|
5308
|
-
} =
|
|
5309
|
+
} = co(c, {
|
|
5309
5310
|
itemHeight: St,
|
|
5310
5311
|
overscan: 10
|
|
5311
5312
|
});
|
|
@@ -5328,7 +5329,7 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5328
5329
|
mousePosition: x,
|
|
5329
5330
|
onDragStart: D,
|
|
5330
5331
|
cancelDrag: u
|
|
5331
|
-
} =
|
|
5332
|
+
} = il({
|
|
5332
5333
|
itemHeight: St,
|
|
5333
5334
|
emit: (f, ...N) => {
|
|
5334
5335
|
f === "updateDragState" ? r("updateDragState", ...N) : f === "nodeDragDrop" && r("nodeDragDrop", N[0]);
|
|
@@ -5360,7 +5361,7 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5360
5361
|
"being-dragged": e(Y) === U.id
|
|
5361
5362
|
}]),
|
|
5362
5363
|
id: `tree-node-${U.id}`
|
|
5363
|
-
}, [(A(), ne(
|
|
5364
|
+
}, [(A(), ne(wl, {
|
|
5364
5365
|
key: U.id,
|
|
5365
5366
|
node: U.node,
|
|
5366
5367
|
selected: m.selectedNodeId === U.id,
|
|
@@ -5375,7 +5376,7 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5375
5376
|
style: mt({
|
|
5376
5377
|
paddingLeft: `${U.level * 20}px`
|
|
5377
5378
|
})
|
|
5378
|
-
}, null, 8, ["node", "selected", "expandable", "expanded", "highlightedStrings", "dragging", "dropTarget", "dropPosition", "onToggleExpand", "onDragStart", "style"]))], 10,
|
|
5379
|
+
}, null, 8, ["node", "selected", "expandable", "expanded", "highlightedStrings", "dragging", "dropTarget", "dropPosition", "onToggleExpand", "onDragStart", "style"]))], 10, Cl);
|
|
5379
5380
|
}), 128))], 16), e(S) && e(Y) ? (A(), J("div", {
|
|
5380
5381
|
key: 0,
|
|
5381
5382
|
class: "drag-overlay",
|
|
@@ -5385,12 +5386,12 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5385
5386
|
transform: "translate3d(0,0,0)"
|
|
5386
5387
|
// Force hardware acceleration
|
|
5387
5388
|
})
|
|
5388
|
-
}, [K("div",
|
|
5389
|
+
}, [K("div", Il, [s(h, {
|
|
5389
5390
|
name: "drag_indicator"
|
|
5390
|
-
}), K("span", null, ye((g = c.value.find((U) => U.id === e(Y))) == null ? void 0 : g.node.label), 1)])], 4)) : Z("", !0), c.value.length === 0 ? (A(), J("div",
|
|
5391
|
+
}), K("span", null, ye((g = c.value.find((U) => U.id === e(Y))) == null ? void 0 : g.node.label), 1)])], 4)) : Z("", !0), c.value.length === 0 ? (A(), J("div", Tl, ye(e(o)("menu.tree_editor.labels.no_items")), 1)) : Z("", !0)], 16);
|
|
5391
5392
|
};
|
|
5392
5393
|
}
|
|
5393
|
-
}),
|
|
5394
|
+
}), Sl = /* @__PURE__ */ it(xl, [["__scopeId", "data-v-9244f342"]]), El = { class: "py-4 px-8 flex items-center gap-4 text-fm-color-primary cursor-pointer relative" }, Fl = {
|
|
5394
5395
|
key: 1,
|
|
5395
5396
|
class: "fm-typo-en-body-md-400"
|
|
5396
5397
|
}, Et = /* @__PURE__ */ fe({
|
|
@@ -5402,23 +5403,23 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5402
5403
|
setup(i) {
|
|
5403
5404
|
return (a, t) => {
|
|
5404
5405
|
const o = H("FmIcon");
|
|
5405
|
-
return A(), J("div",
|
|
5406
|
+
return A(), J("div", El, [
|
|
5406
5407
|
a.icon ? (A(), ne(o, {
|
|
5407
5408
|
key: 0,
|
|
5408
5409
|
name: a.icon
|
|
5409
5410
|
}, null, 8, ["name"])) : Z("", !0),
|
|
5410
|
-
a.label ? (A(), J("span",
|
|
5411
|
+
a.label ? (A(), J("span", Fl, ye(a.label), 1)) : Z("", !0),
|
|
5411
5412
|
t[0] || (t[0] = K("div", { class: "absolute inset-0 fm-corner-radius-md hover:bg-fm-color-opacity-sm" }, null, -1))
|
|
5412
5413
|
]);
|
|
5413
5414
|
};
|
|
5414
5415
|
}
|
|
5415
|
-
}),
|
|
5416
|
+
}), Vl = {
|
|
5416
5417
|
class: "flex flex-col gap-4"
|
|
5417
|
-
}, Vl = {
|
|
5418
|
-
class: "flex items-center justify-between"
|
|
5419
5418
|
}, $l = {
|
|
5419
|
+
class: "flex items-center justify-between"
|
|
5420
|
+
}, Pl = {
|
|
5420
5421
|
class: "flex items-center"
|
|
5421
|
-
},
|
|
5422
|
+
}, Dl = /* @__PURE__ */ fe({
|
|
5422
5423
|
__name: "ProductsTree",
|
|
5423
5424
|
props: {
|
|
5424
5425
|
menu: {},
|
|
@@ -5432,9 +5433,9 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5432
5433
|
const t = i, o = a, m = yt(), r = be(), b = _t(), {
|
|
5433
5434
|
canDropFn: F,
|
|
5434
5435
|
handleNodeDragDrop: c
|
|
5435
|
-
} =
|
|
5436
|
+
} = ll(), _ = M(() => t.filterState.searchKey), C = mo(_, 300), {
|
|
5436
5437
|
generateTreeFromMenu: P
|
|
5437
|
-
} =
|
|
5438
|
+
} = al();
|
|
5438
5439
|
async function y() {
|
|
5439
5440
|
return await P({
|
|
5440
5441
|
filterState: t.filterState,
|
|
@@ -5446,7 +5447,7 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5446
5447
|
Oe([() => t.overridedMenu, () => C.value], async () => {
|
|
5447
5448
|
const u = await y();
|
|
5448
5449
|
if (t.filterState.searchKey) {
|
|
5449
|
-
const f =
|
|
5450
|
+
const f = qo(u.tree, t.filterState.searchKey);
|
|
5450
5451
|
m.setTreeNodes(f.subTree), m.setExpandedNodeIds(f.shouldExpandNodeIds);
|
|
5451
5452
|
} else
|
|
5452
5453
|
m.setTreeNodes(u.tree);
|
|
@@ -5461,8 +5462,8 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5461
5462
|
catalogManager: $,
|
|
5462
5463
|
schedulerManager: x,
|
|
5463
5464
|
noScheduler: D
|
|
5464
|
-
} =
|
|
5465
|
-
return (u, f) => (A(), J("div",
|
|
5465
|
+
} = Go(!0);
|
|
5466
|
+
return (u, f) => (A(), J("div", Vl, [K("div", $l, [e(r).rules.category.create ? (A(), ne(Et, {
|
|
5466
5467
|
key: 0,
|
|
5467
5468
|
label: e(n)("menu.tree_editor.actions.add_category"),
|
|
5468
5469
|
icon: "add",
|
|
@@ -5507,7 +5508,7 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5507
5508
|
onClick: N
|
|
5508
5509
|
}, null, 8, ["label", "onClick"])]),
|
|
5509
5510
|
_: 1
|
|
5510
|
-
}, 8, ["categorized-items", "initial-value", "menu-items", "categories", "link-item-rules", "no-scheduler", "onSubmit"])) : Z("", !0), K("div",
|
|
5511
|
+
}, 8, ["categorized-items", "initial-value", "menu-items", "categories", "link-item-rules", "no-scheduler", "onSubmit"])) : Z("", !0), K("div", Pl, [s(Ut, {
|
|
5511
5512
|
name: "expand_all",
|
|
5512
5513
|
tooltip: e(n)("menu.tree_editor.actions.expand_all"),
|
|
5513
5514
|
visible: !0,
|
|
@@ -5517,8 +5518,8 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5517
5518
|
tooltip: e(n)("menu.tree_editor.actions.collapse_all"),
|
|
5518
5519
|
visible: !0,
|
|
5519
5520
|
onClick: f[2] || (f[2] = (N) => e(m).collapseAllNodes())
|
|
5520
|
-
}, null, 8, ["tooltip"])])]), s(
|
|
5521
|
-
default: q(() => [s(
|
|
5521
|
+
}, null, 8, ["tooltip"])])]), s(po, null, {
|
|
5522
|
+
default: q(() => [s(Sl, {
|
|
5522
5523
|
nodes: e(m).treeNodes,
|
|
5523
5524
|
selectedNodeId: e(m).selectedNodeId,
|
|
5524
5525
|
expandedNodeIds: e(m).expandedNodeIds,
|
|
@@ -5529,7 +5530,7 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5529
5530
|
_: 1
|
|
5530
5531
|
})]));
|
|
5531
5532
|
}
|
|
5532
|
-
}),
|
|
5533
|
+
}), Ol = { class: "space-y-8" }, Ml = /* @__PURE__ */ fe({
|
|
5533
5534
|
__name: "TreeFilter",
|
|
5534
5535
|
props: /* @__PURE__ */ Dn({
|
|
5535
5536
|
menu: {}
|
|
@@ -5571,7 +5572,7 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5571
5572
|
});
|
|
5572
5573
|
return (P, y) => {
|
|
5573
5574
|
const n = H("FmSearch");
|
|
5574
|
-
return A(), J("div",
|
|
5575
|
+
return A(), J("div", Ol, [
|
|
5575
5576
|
s(Zt, {
|
|
5576
5577
|
"model-value": m.value.catalogId || "",
|
|
5577
5578
|
items: r.value,
|
|
@@ -5589,7 +5590,7 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5589
5590
|
"custom-label": F.value,
|
|
5590
5591
|
"onUpdate:modelValue": y[1] || (y[1] = (T) => m.value.schedulerId = T)
|
|
5591
5592
|
}, null, 8, ["model-value", "items", "placeholder", "search-placeholder", "custom-label"])) : Z("", !0),
|
|
5592
|
-
C.value ? (A(), ne(
|
|
5593
|
+
C.value ? (A(), ne(Bo, {
|
|
5593
5594
|
key: 1,
|
|
5594
5595
|
"current-restaurant-attr-params": e(o).state.currentRestaurantAttrParams,
|
|
5595
5596
|
onConfirm: y[2] || (y[2] = (T) => e(o).setRestaurantAttrParams(T)),
|
|
@@ -5604,10 +5605,10 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5604
5605
|
]);
|
|
5605
5606
|
};
|
|
5606
5607
|
}
|
|
5607
|
-
}),
|
|
5608
|
+
}), Ul = { class: "h-full flex flex-col relative" }, Rl = { class: "p-8" }, Al = { class: "flex-1 p-8" }, Nl = {
|
|
5608
5609
|
key: 0,
|
|
5609
5610
|
class: "absolute inset-0 flex items-center justify-center tree-overlay"
|
|
5610
|
-
},
|
|
5611
|
+
}, Ll = { class: "flex items-center justify-center gap-16" }, Gl = /* @__PURE__ */ fe({
|
|
5611
5612
|
__name: "TreePanel",
|
|
5612
5613
|
props: {
|
|
5613
5614
|
menu: {},
|
|
@@ -5625,31 +5626,31 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5625
5626
|
m.selectCatalog(o.value.catalogId), m.selectScheduler(o.value.schedulerId);
|
|
5626
5627
|
}), (r, b) => {
|
|
5627
5628
|
const F = H("FmCircularProgress");
|
|
5628
|
-
return A(), J("div",
|
|
5629
|
-
K("div",
|
|
5630
|
-
s(
|
|
5629
|
+
return A(), J("div", Ul, [
|
|
5630
|
+
K("div", Rl, [
|
|
5631
|
+
s(Ml, {
|
|
5631
5632
|
menu: r.menu,
|
|
5632
5633
|
modelValue: o.value,
|
|
5633
5634
|
"onUpdate:modelValue": b[0] || (b[0] = (c) => o.value = c)
|
|
5634
5635
|
}, null, 8, ["menu", "modelValue"])
|
|
5635
5636
|
]),
|
|
5636
|
-
K("div",
|
|
5637
|
-
s(
|
|
5637
|
+
K("div", Al, [
|
|
5638
|
+
s(Dl, {
|
|
5638
5639
|
menu: r.menu,
|
|
5639
5640
|
"overrided-menu": r.overridedMenu,
|
|
5640
5641
|
"filter-state": o.value,
|
|
5641
5642
|
onTreeEvent: b[1] || (b[1] = (c) => t("tree-event", c))
|
|
5642
5643
|
}, null, 8, ["menu", "overrided-menu", "filter-state"])
|
|
5643
5644
|
]),
|
|
5644
|
-
r.loading ? (A(), J("div",
|
|
5645
|
-
K("div",
|
|
5645
|
+
r.loading ? (A(), J("div", Nl, [
|
|
5646
|
+
K("div", Ll, [
|
|
5646
5647
|
s(F, { size: "lg" })
|
|
5647
5648
|
])
|
|
5648
5649
|
])) : Z("", !0)
|
|
5649
5650
|
]);
|
|
5650
5651
|
};
|
|
5651
5652
|
}
|
|
5652
|
-
}),
|
|
5653
|
+
}), Kl = { class: "pl-24 scroll-y-auto h-full overflow-y-auto relative" }, Bl = { key: 1 }, zl = { class: "text-center text-sm text-gray-500 p-16" }, jl = /* @__PURE__ */ fe({
|
|
5653
5654
|
__name: "TreeEditor",
|
|
5654
5655
|
props: {
|
|
5655
5656
|
menu: {}
|
|
@@ -5661,7 +5662,7 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5661
5662
|
}), Rt(() => {
|
|
5662
5663
|
o.$dispose(), m.setExpandedNodeIds([]), m.setSelectedNodeId(null);
|
|
5663
5664
|
});
|
|
5664
|
-
const r = ee(null), { currentItemId: b, initialForm: F, itemFormKey: c } =
|
|
5665
|
+
const r = ee(null), { currentItemId: b, initialForm: F, itemFormKey: c } = er(o), { saveItemFormEditingStateDebounced: _ } = Xo(r, o), C = ee(null);
|
|
5665
5666
|
async function P(n) {
|
|
5666
5667
|
if (n.type === Ee.SELECT_ITEM || n.type === Ee.SELECT_PRICE || n.type === Ee.SELECT_GROUP || n.type === Ee.SELECT_VARIANT) {
|
|
5667
5668
|
if (!y(n.itemId))
|
|
@@ -5690,9 +5691,9 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5690
5691
|
}
|
|
5691
5692
|
return n && (b.value = n, m.setSelectedNodeByItemId(n)), !0;
|
|
5692
5693
|
}
|
|
5693
|
-
return (n, T) => (A(), ne(
|
|
5694
|
+
return (n, T) => (A(), ne(ol, null, {
|
|
5694
5695
|
"left-panel": q(() => [
|
|
5695
|
-
s(
|
|
5696
|
+
s(Gl, {
|
|
5696
5697
|
menu: n.menu,
|
|
5697
5698
|
"overrided-menu": e(o).mergedMenu,
|
|
5698
5699
|
loading: e(o).workerIsComputing,
|
|
@@ -5700,8 +5701,8 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5700
5701
|
}, null, 8, ["menu", "overrided-menu", "loading"])
|
|
5701
5702
|
]),
|
|
5702
5703
|
"right-panel": q(() => [
|
|
5703
|
-
K("div",
|
|
5704
|
-
e(F) ? (A(), ne(
|
|
5704
|
+
K("div", Kl, [
|
|
5705
|
+
e(F) ? (A(), ne(qa, {
|
|
5705
5706
|
ref_key: "itemFormRef",
|
|
5706
5707
|
ref: r,
|
|
5707
5708
|
key: e(c),
|
|
@@ -5711,24 +5712,24 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5711
5712
|
"category-id": null,
|
|
5712
5713
|
focused: C.value,
|
|
5713
5714
|
"onUpdate:editingState": e(_)
|
|
5714
|
-
}, null, 8, ["initial-form", "menu", "merged-menu", "focused", "onUpdate:editingState"])) : (A(), J("div",
|
|
5715
|
-
K("div",
|
|
5715
|
+
}, null, 8, ["initial-form", "menu", "merged-menu", "focused", "onUpdate:editingState"])) : (A(), J("div", Bl, [
|
|
5716
|
+
K("div", zl, ye(e(a)("menu.tree_editor.labels.please_select_a_product_to_edit")), 1)
|
|
5716
5717
|
]))
|
|
5717
5718
|
])
|
|
5718
5719
|
]),
|
|
5719
5720
|
_: 1
|
|
5720
5721
|
}));
|
|
5721
5722
|
}
|
|
5722
|
-
}),
|
|
5723
|
+
}), Yl = {
|
|
5723
5724
|
class: /* @__PURE__ */ $e([
|
|
5724
5725
|
"flex items-center",
|
|
5725
5726
|
"px-24 pt-16 pb-8",
|
|
5726
5727
|
"border-b border-fm-color-neutral-gray-100",
|
|
5727
5728
|
"space-x-4"
|
|
5728
5729
|
])
|
|
5729
|
-
},
|
|
5730
|
+
}, ql = { class: "fm-typo-en-title-sm-600 mr-auto" }, Wl = { class: "flex items-center gap-8" }, Hl = {
|
|
5730
5731
|
class: /* @__PURE__ */ $e(["flex flex-col", "flex-1 overflow-scroll", "w-full"])
|
|
5731
|
-
},
|
|
5732
|
+
}, Xl = /* @__PURE__ */ fe({
|
|
5732
5733
|
__name: "TreeEditorForm",
|
|
5733
5734
|
props: {
|
|
5734
5735
|
menu: {},
|
|
@@ -5743,11 +5744,11 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5743
5744
|
const C = ee(!1), P = () => {
|
|
5744
5745
|
m(
|
|
5745
5746
|
async () => {
|
|
5746
|
-
await
|
|
5747
|
-
const n = _.state.menu, T =
|
|
5747
|
+
await Xt(), bn(), await gt();
|
|
5748
|
+
const n = _.state.menu, T = _o(n), S = ho(t.menu.modules.item, T.modules.item);
|
|
5748
5749
|
if (await c.updateMenuSetting(T), await c.importMenu(T), S.length)
|
|
5749
5750
|
try {
|
|
5750
|
-
await
|
|
5751
|
+
await Qt(S);
|
|
5751
5752
|
} catch (Y) {
|
|
5752
5753
|
console.error("Failed to clean up removed product images", Y);
|
|
5753
5754
|
}
|
|
@@ -5763,14 +5764,14 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5763
5764
|
() => !Ve.isEqual(t.menu.modules, _.state.menu.modules),
|
|
5764
5765
|
() => {
|
|
5765
5766
|
(async () => {
|
|
5766
|
-
await
|
|
5767
|
-
const n =
|
|
5767
|
+
await Xt();
|
|
5768
|
+
const n = ko(
|
|
5768
5769
|
_.state.menu.modules.item,
|
|
5769
5770
|
t.menu.modules.item
|
|
5770
5771
|
);
|
|
5771
5772
|
if (n.length)
|
|
5772
5773
|
try {
|
|
5773
|
-
await
|
|
5774
|
+
await Qt(n);
|
|
5774
5775
|
} catch (T) {
|
|
5775
5776
|
console.error("Failed to clean up discarded product images", T);
|
|
5776
5777
|
}
|
|
@@ -5792,9 +5793,9 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5792
5793
|
onKeyup: Rn(e(y), ["esc"])
|
|
5793
5794
|
}, {
|
|
5794
5795
|
default: q(() => [
|
|
5795
|
-
K("div",
|
|
5796
|
-
K("p",
|
|
5797
|
-
K("div",
|
|
5796
|
+
K("div", Yl, [
|
|
5797
|
+
K("p", ql, ye(e(r)("menu.tree_editor.title")), 1),
|
|
5798
|
+
K("div", Wl, [
|
|
5798
5799
|
s(S, {
|
|
5799
5800
|
icon: "undo",
|
|
5800
5801
|
disabled: !e(_).canUndoHistory,
|
|
@@ -5820,8 +5821,8 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5820
5821
|
}, null, 8, ["label", "loading"])
|
|
5821
5822
|
])
|
|
5822
5823
|
]),
|
|
5823
|
-
K("div",
|
|
5824
|
-
s(
|
|
5824
|
+
K("div", Hl, [
|
|
5825
|
+
s(jl, { menu: n.menu }, null, 8, ["menu"])
|
|
5825
5826
|
])
|
|
5826
5827
|
]),
|
|
5827
5828
|
_: 1
|
|
@@ -5832,7 +5833,7 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5832
5833
|
]);
|
|
5833
5834
|
};
|
|
5834
5835
|
}
|
|
5835
|
-
}),
|
|
5836
|
+
}), Ql = /* @__PURE__ */ it(Xl, [["__scopeId", "data-v-8e2b5ffd"]]), Di = /* @__PURE__ */ fe({
|
|
5836
5837
|
__name: "TreeEditorOpenner",
|
|
5837
5838
|
setup(i) {
|
|
5838
5839
|
const a = vt(), t = cn();
|
|
@@ -5841,12 +5842,12 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5841
5842
|
}
|
|
5842
5843
|
const m = () => {
|
|
5843
5844
|
t.open({
|
|
5844
|
-
component:
|
|
5845
|
+
component: Ql,
|
|
5845
5846
|
props: { menu: a.state.menu }
|
|
5846
5847
|
});
|
|
5847
5848
|
};
|
|
5848
5849
|
function r(b) {
|
|
5849
|
-
b.data.type ===
|
|
5850
|
+
b.data.type === fo && m();
|
|
5850
5851
|
}
|
|
5851
5852
|
return Xe(() => {
|
|
5852
5853
|
window.addEventListener("message", r);
|
|
@@ -5856,5 +5857,5 @@ const sl = { key: 0 }, ul = ["innerHTML"], dl = /* @__PURE__ */ fe({
|
|
|
5856
5857
|
}
|
|
5857
5858
|
});
|
|
5858
5859
|
export {
|
|
5859
|
-
|
|
5860
|
+
Di as _
|
|
5860
5861
|
};
|