@feedmepos/mf-menu 0.21.11-prod → 0.21.12-prod
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-BMwX7wK_.js → App-CgUhjrfF.js} +3 -3
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-DxBhrkZE.js → ApplyProduct.vue_vue_type_script_setup_true_lang-DJLbo_vF.js} +2 -2
- package/dist/{ApplyProducts.vue_vue_type_script_setup_true_lang-DgULuFbr.js → ApplyProducts.vue_vue_type_script_setup_true_lang-O10oJElf.js} +2 -2
- package/dist/{Catalog-CYXZdpT7.js → Catalog-tWY1caZd.js} +4 -4
- package/dist/{Category-CCQxV_wB.js → Category-CPUHCwqz.js} +6 -6
- package/dist/{CookingGuide-D4bZdOpu.js → CookingGuide-DF256Ib8.js} +4 -4
- package/dist/{Group-UQx6qeGe.js → Group-yBpmzMBN.js} +1 -1
- package/dist/{Group-DumDspmM.js → Group-yJ2v15xg.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-BtV5S6d8.js → Group.vue_vue_type_script_setup_true_lang-fwH6SVkO.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BZiZXhI3.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-SslypYcN.js} +2 -2
- package/dist/{Ingredient-CmDFKCjw.js → Ingredient-Dj1DFJZ5.js} +4 -4
- package/dist/{LinkProductBlock.vue_vue_type_script_setup_true_lang-B3mqBhHa.js → LinkProductBlock.vue_vue_type_script_setup_true_lang-CH4FWFHP.js} +1 -1
- package/dist/{LinkProductSideSheet-DHoJRH5I.js → LinkProductSideSheet-CSIFYM8Q.js} +3 -3
- package/dist/{PrintRoute-CSy7D2xv.js → PrintRoute-BpYxc7wZ.js} +4 -4
- package/dist/{Product-CPELkQAX.js → Product-B6HOzcOR.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-DhPMy1Hd.js → Product.vue_vue_type_script_setup_true_lang-Zl3kM6BB.js} +11 -11
- package/dist/{Products-BO3jJLIL.js → Products-BoBmnoP6.js} +8 -8
- package/dist/{Publish-Cziyi40E.js → Publish-Dw962KDs.js} +3 -3
- package/dist/{Recipe-kftv2S7W.js → Recipe-CH4LtC0H.js} +5 -5
- package/dist/{Scheduler-BnRTHJXZ.js → Scheduler-ChA0N2bP.js} +3 -3
- package/dist/{SchedulerSelector.vue_vue_type_script_setup_true_lang-BMSaa9jH.js → SchedulerSelector.vue_vue_type_script_setup_true_lang-B1DjrooN.js} +1 -1
- package/dist/{ServingSequence-Dci91FN9.js → ServingSequence-Ce9SXgCK.js} +4 -4
- package/dist/{Setting-DmxKcvAp.js → Setting-B1lRBzCY.js} +1 -1
- package/dist/{Setting.vue_vue_type_script_setup_true_lang-CEGPz68H.js → Setting.vue_vue_type_script_setup_true_lang-DAPrekT4.js} +3 -3
- package/dist/{Takeaway-BFKyR_fv.js → Takeaway-BtGGeSVI.js} +1 -1
- package/dist/{Takeaway-DP4gn-ZS.js → Takeaway-D3tioUd5.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-DJkpXWG6.js → Takeaway.vue_vue_type_script_setup_true_lang-CwLnLTJP.js} +5 -5
- package/dist/{TaxSetting-Cvd_iL8P.js → TaxSetting-LRFViHDu.js} +4 -4
- package/dist/{Unit-DmV5xXwI.js → Unit-DvPjgxVN.js} +2 -2
- package/dist/{Variant-BH6vqs9j.js → Variant-BunNNyN4.js} +3 -3
- package/dist/{_id_-BZimorT0.js → _id_-KnnmTgfK.js} +7 -7
- package/dist/{app-3PkhIy4v.js → app-B-yCYtbL.js} +1 -1
- package/dist/{app-BSgKD6YH.js → app-CVQKdmE1.js} +21 -21
- package/dist/app.js +1 -1
- package/dist/assets/{linked-status-Choj895l.js → linked-status-D-2YidNN.js} +3 -3
- package/dist/assets/{validate-menu-lLPfYmVZ.js → validate-menu-DYcaOgmU.js} +3 -3
- package/dist/{catalog-DdC-0qgv.js → catalog-CY5KT-j1.js} +1 -1
- package/dist/{catalog-C0Yr6lkI.js → catalog-QkFmXQyK.js} +199 -199
- package/dist/{category-CmKWRDPg.js → category-C2sHd_uR.js} +1 -1
- package/dist/{currency-DgDTZHfo.js → currency-CvLDpJEt.js} +1 -1
- package/dist/{index-G3GzZXqd.js → index-B7twbWNi.js} +3 -3
- package/dist/{index-0KQ58Tcs.js → index-DRO9RyrT.js} +33 -33
- package/dist/{item-Bf3rLQos.js → item-Cwm27jlW.js} +203 -203
- package/dist/{lodash-B5L7O11j.js → lodash-DqxZxy9H.js} +1 -1
- package/dist/{menu-BvcnjGtt.js → menu-08eLsub2.js} +1 -1
- package/dist/{menu-B_OZAwx4.js → menu-BYf8WjNK.js} +7 -7
- package/dist/{remy-Ixj7luhL.js → remy-CT3MO0Yd.js} +2 -2
- package/dist/{scheduler-fICzKFTz.js → scheduler-DmpGAct7.js} +4 -4
- package/dist/{takeaway-hefgxCRh.js → takeaway-Du3p3Gpo.js} +4 -4
- package/dist/{toExcel-BK77N5i9.js → toExcel-Co9FRIJy.js} +2 -2
- package/dist/{unit-BZfWR1wc.js → unit-ZKjzA4kY.js} +2 -2
- package/package.json +1 -1
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { defineStore as Fi } from "pinia";
|
|
2
|
-
import { G as L, J as ye, $ as hn, a0 as pn, a1 as fn, H as oe, z as _e, B as we, a2 as Ei, x as he, a3 as fi, a4 as gn, A as Ye, K as He, V as Ot, U as vn, a5 as bn, W as yn, a6 as gi, a7 as _n } from "./menu-
|
|
3
|
-
import { useDialog as $e, useSnackbar as Be, components as ke, useDialogChild as Ii, FmButtonVariant as Ke, FmButtonColorThemeVariant as Ne, useBreakpoints as
|
|
4
|
-
import { C as
|
|
5
|
-
import { openBlock as z, createElementBlock as q, createElementVNode as T, defineComponent as le, computed as
|
|
6
|
-
import { p as Ht, u as On } from "./app-
|
|
2
|
+
import { G as L, J as ye, $ as hn, a0 as pn, a1 as fn, H as oe, z as _e, B as we, a2 as Ei, x as he, a3 as fi, a4 as gn, A as Ye, K as He, V as Ot, U as vn, a5 as bn, W as yn, a6 as gi, a7 as _n } from "./menu-BYf8WjNK.js";
|
|
3
|
+
import { useDialog as $e, useSnackbar as Be, components as ke, useDialogChild as Ii, FmButtonVariant as Ke, FmButtonColorThemeVariant as Ne, useBreakpoints as Di } from "@feedmepos/ui-library";
|
|
4
|
+
import { C as De } from "./catalog-CY5KT-j1.js";
|
|
5
|
+
import { openBlock as z, createElementBlock as q, createElementVNode as T, defineComponent as le, computed as P, resolveComponent as K, createVNode as C, unref as p, createBlock as G, renderSlot as pe, withCtx as N, Fragment as Ae, renderList as Ge, resolveDynamicComponent as bt, withDirectives as Xe, vShow as _t, mergeProps as Pi, withModifiers as wt, createCommentVNode as ee, ref as Q, createTextVNode as yt, toDisplayString as se, normalizeClass as Ee, onMounted as ot, resolveDirective as Ut, h as ue, watch as Ce, Transition as wn, onBeforeUnmount as Sn, normalizeProps as Cn, guardReactiveProps as An, normalizeStyle as Rn, nextTick as xn, getCurrentInstance as kn, render as Mn } from "vue";
|
|
6
|
+
import { p as Ht, u as On } from "./app-CVQKdmE1.js";
|
|
7
7
|
import { useI18n as ce, useCoreStore as Xt, CustomAttributesForm as zn } from "@feedmepos/mf-common";
|
|
8
|
-
import { u as Fn } from "./category-
|
|
9
|
-
import { R as Te } from "./remy-
|
|
8
|
+
import { u as Fn } from "./category-C2sHd_uR.js";
|
|
9
|
+
import { R as Te } from "./remy-CT3MO0Yd.js";
|
|
10
10
|
import { a as Ti, _ as vi } from "./InfoBasic.vue_vue_type_script_setup_true_lang-DxQBDu16.js";
|
|
11
11
|
import { _ as Ve, a as En } from "./FormSection.vue_vue_type_script_setup_true_lang-BWJUD8NZ.js";
|
|
12
12
|
import { _ as ut } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
import { _ as Je } from "./FormItem.vue_vue_type_script_setup_true_lang-DKsxEK-8.js";
|
|
14
|
-
import { f as st } from "./currency-
|
|
14
|
+
import { f as st } from "./currency-CvLDpJEt.js";
|
|
15
15
|
import { c as ct, u as In } from "./search-CcGJKqRo.js";
|
|
16
|
-
import { _ as Qe, T as
|
|
16
|
+
import { _ as Qe, T as Dn, l as $t } from "./takeaway-Du3p3Gpo.js";
|
|
17
17
|
import { V as Ui } from "./vuedraggable-WU01qJgi.js";
|
|
18
|
-
import { l as Ue, u as $i } from "./lodash-
|
|
19
|
-
import { V as bi } from "./index-
|
|
20
|
-
import { s as Vt, F as
|
|
21
|
-
import { L as Tn } from "./LinkProductSideSheet-
|
|
18
|
+
import { l as Ue, u as $i } from "./lodash-DqxZxy9H.js";
|
|
19
|
+
import { V as bi } from "./index-B7twbWNi.js";
|
|
20
|
+
import { s as Vt, F as Pn } from "./object-BN9wCbKv.js";
|
|
21
|
+
import { L as Tn } from "./LinkProductSideSheet-CSIFYM8Q.js";
|
|
22
22
|
import { useInventoryStore as Vi, InventoryBindingForm as Un, InventoryBindingSummary as $n } from "@feedmepos/mf-inventory-portal";
|
|
23
23
|
import { c as Vn } from "./string-DpfFixWH.js";
|
|
24
|
-
import { _ as Nn } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-
|
|
24
|
+
import { _ as Nn } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-DJLbo_vF.js";
|
|
25
25
|
import { c as Ln } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
|
26
26
|
const Bn = {
|
|
27
27
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -189,7 +189,7 @@ class gt {
|
|
|
189
189
|
async overrideScheduler(i) {
|
|
190
190
|
const t = this.scheduler;
|
|
191
191
|
if (!t) return;
|
|
192
|
-
const n = this.menuStore.catalogs.find((l) => l._id === i), a = new
|
|
192
|
+
const n = this.menuStore.catalogs.find((l) => l._id === i), a = new De(n, this.menuStore, this.updateMenu, this.dialog), o = a.getCatalogScheduler(t._id);
|
|
193
193
|
if (!o) return;
|
|
194
194
|
const r = this.menuStore.state.menu.modules.scheduler.find(
|
|
195
195
|
(l) => l._id === t._id
|
|
@@ -236,7 +236,7 @@ class gt {
|
|
|
236
236
|
if (!t) return;
|
|
237
237
|
const n = this.menuStore.currentCatalog;
|
|
238
238
|
if (n && this.menuStore.rules.scheduler.override) {
|
|
239
|
-
const a = new
|
|
239
|
+
const a = new De(
|
|
240
240
|
n,
|
|
241
241
|
this.menuStore,
|
|
242
242
|
this.updateMenu,
|
|
@@ -265,7 +265,7 @@ class gt {
|
|
|
265
265
|
this.menuStore.categories,
|
|
266
266
|
fn(this.menuStore.state.menu.modules.item, (a) => a.code || a.name)
|
|
267
267
|
), t = new Set(
|
|
268
|
-
this.menuStore.currentCatalog ?
|
|
268
|
+
this.menuStore.currentCatalog ? De.getItemAvailable(this.menuStore.currentCatalog) : this.menuStore.state.menu.modules.item.map((a) => a._id)
|
|
269
269
|
);
|
|
270
270
|
return i.map((a) => ({
|
|
271
271
|
...a,
|
|
@@ -353,7 +353,7 @@ class Li {
|
|
|
353
353
|
this.menuStore = i, this.updateMenu = t, this.dialog = n;
|
|
354
354
|
}
|
|
355
355
|
getFallbackPrices(i) {
|
|
356
|
-
const t = this.menuStore.currentCatalog, n = this.menuStore.currentScheduler, a = new
|
|
356
|
+
const t = this.menuStore.currentCatalog, n = this.menuStore.currentScheduler, a = new De(t, this.menuStore, this.updateMenu, this.dialog), o = new gt(
|
|
357
357
|
n,
|
|
358
358
|
this.menuStore,
|
|
359
359
|
this.updateMenu,
|
|
@@ -406,14 +406,14 @@ class Li {
|
|
|
406
406
|
const n = this.getFallbackPrices(i), a = this.menuStore.state.menu.modules.item, o = this.menuStore.state.menu.modules.group, r = this.menuStore.items;
|
|
407
407
|
function l(s, u) {
|
|
408
408
|
const d = s.items.reduce((h, c) => {
|
|
409
|
-
var F,
|
|
409
|
+
var F, D, R, _;
|
|
410
410
|
const y = a.find((x) => c._id === x._id);
|
|
411
411
|
if (!y && t) return h;
|
|
412
412
|
const b = c.combinationKey ? {
|
|
413
413
|
...(F = y == null ? void 0 : y.variant) == null ? void 0 : F.variantCombinations.find(
|
|
414
414
|
(x) => x.combinationKey === c.combinationKey
|
|
415
415
|
),
|
|
416
|
-
name: Ei(he().variants, ((
|
|
416
|
+
name: Ei(he().variants, ((D = y == null ? void 0 : y.variant) == null ? void 0 : D.variantGroupIds) || [])[c.combinationKey]
|
|
417
417
|
} : y, g = (R = o.find((x) => x._id === s._id)) == null ? void 0 : R.items.find((x) => x._id === c._id && x.combinationKey === c.combinationKey), w = !t && !c.combinationKey, E = (_ = u.find(
|
|
418
418
|
(x) => x._id == c._id && x.combinationKey == c.combinationKey
|
|
419
419
|
)) == null ? void 0 : _.price, A = c.name ?? (g == null ? void 0 : g.name) ?? (b == null ? void 0 : b.name) ?? "", I = {
|
|
@@ -516,7 +516,7 @@ class Li {
|
|
|
516
516
|
return !!this.menuStore.state.currentCatalogId || !!this.menuStore.state.currentSchedulerId;
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
|
-
const Xn = "/assets/linked-status-
|
|
519
|
+
const Xn = "/assets/linked-status-D-2YidNN.js";
|
|
520
520
|
function qn(e) {
|
|
521
521
|
var n;
|
|
522
522
|
const i = oe(e), t = (n = i.variant) == null ? void 0 : n.variantCombinations;
|
|
@@ -749,7 +749,7 @@ const Zt = /* @__PURE__ */ le({
|
|
|
749
749
|
},
|
|
750
750
|
emits: ["update:model-value"],
|
|
751
751
|
setup(e, { emit: i }) {
|
|
752
|
-
const t = e, { t: n } = ce(), a = i, o =
|
|
752
|
+
const t = e, { t: n } = ce(), a = i, o = P(() => ({
|
|
753
753
|
ALL: {
|
|
754
754
|
label: n("menu.order.from.options.all"),
|
|
755
755
|
value: L.F_ORDER_FROM.enum.ALL
|
|
@@ -762,7 +762,7 @@ const Zt = /* @__PURE__ */ le({
|
|
|
762
762
|
label: n("menu.order.from.options.none"),
|
|
763
763
|
value: L.F_ORDER_FROM.enum.NONE
|
|
764
764
|
}
|
|
765
|
-
})), r =
|
|
765
|
+
})), r = P(() => {
|
|
766
766
|
const u = Object.values(o.value);
|
|
767
767
|
if (t.disable) return u;
|
|
768
768
|
let d = t.editActiveOnly ? [o.value.ALL, o.value.NONE] : u;
|
|
@@ -778,7 +778,7 @@ const Zt = /* @__PURE__ */ le({
|
|
|
778
778
|
let d = u;
|
|
779
779
|
return t.editActiveOnly && u && (d = d === L.F_ORDER_FROM.enum.NONE ? L.F_ORDER_FROM.enum.NONE : L.F_ORDER_FROM.enum.ALL), d;
|
|
780
780
|
}
|
|
781
|
-
const s =
|
|
781
|
+
const s = P(() => {
|
|
782
782
|
if (t.modelValue) return t.modelValue;
|
|
783
783
|
const u = t.editActiveOnly || t.required, d = r.value.some((h) => h.value === null), m = u && !d ? t.fallback ?? r.value[0].value : t.modelValue;
|
|
784
784
|
return m ? l(m) : null;
|
|
@@ -1199,7 +1199,7 @@ function Ri(e) {
|
|
|
1199
1199
|
function xi(e, i) {
|
|
1200
1200
|
return Math.pow(e.width - i.width, 2) + Math.pow(e.height - i.height, 2);
|
|
1201
1201
|
}
|
|
1202
|
-
function
|
|
1202
|
+
function Pe(e) {
|
|
1203
1203
|
var i = e.width, t = e.height, n = e.sizeRestrictions, a = { minimum: e.aspectRatio && e.aspectRatio.minimum || 0, maximum: e.aspectRatio && e.aspectRatio.maximum || 1 / 0 }, o = { width: Math.max(n.minWidth, Math.min(n.maxWidth, i)), height: Math.max(n.minHeight, Math.min(n.maxHeight, t)) };
|
|
1204
1204
|
function r(u, d) {
|
|
1205
1205
|
return d === void 0 && (d = !1), u.reduce(function(m, h) {
|
|
@@ -1224,7 +1224,7 @@ function po(e) {
|
|
|
1224
1224
|
return (Array.isArray(t) ? t : [t]).forEach(function(d) {
|
|
1225
1225
|
var m = {};
|
|
1226
1226
|
ge((m = typeof d == "function" ? d({ coordinates: u, imageSize: n, visibleArea: l }) : d).width) && ge(m.height) || (u = function(h, c) {
|
|
1227
|
-
var y = Y(Y(Y({}, h),
|
|
1227
|
+
var y = Y(Y(Y({}, h), Pe({ width: c.width, height: c.height, sizeRestrictions: a, aspectRatio: r })), { left: 0, top: 0 });
|
|
1228
1228
|
return s(y, { left: h.left, top: h.top });
|
|
1229
1229
|
}(u, Y(Y({}, u), m))), ge(m.left) && ge(m.top) || (u = s(u, Y(Y({}, u), m)));
|
|
1230
1230
|
}), u;
|
|
@@ -1236,7 +1236,7 @@ function fo(e) {
|
|
|
1236
1236
|
var o = e.stencilSize, r = e.sizeRestrictions, l = e.positionRestrictions;
|
|
1237
1237
|
e.stencilReference;
|
|
1238
1238
|
var s, u, d, m = Y({}, n), h = Y({}, a), c = Y({}, o);
|
|
1239
|
-
s = ne(c), u = ne(m), d === void 0 && (d = 1e-3), (s === 0 || u === 0 ? Math.abs(u - s) < d : Math.abs(u / s) < 1 + d && Math.abs(u / s) > 1 - d) || (m = Y(Y({}, m),
|
|
1239
|
+
s = ne(c), u = ne(m), d === void 0 && (d = 1e-3), (s === 0 || u === 0 ? Math.abs(u - s) < d : Math.abs(u / s) < 1 + d && Math.abs(u / s) > 1 - d) || (m = Y(Y({}, m), Pe({ sizeRestrictions: r, width: m.width, height: m.height, aspectRatio: { minimum: ne(c), maximum: ne(c) } })));
|
|
1240
1240
|
var y = At(h = xe(h, m.width * t.width / (h.width * c.width)), i({ visibleArea: h, type: "resize" }));
|
|
1241
1241
|
return y !== 1 && (h = xe(h, y), m = xe(m, y)), h = be(h = Se(h, et(ve(m), ve(h))), i({ visibleArea: h, type: "move" })), { coordinates: m = be(m, Rt(Fe(h), l)), visibleArea: h };
|
|
1242
1242
|
}
|
|
@@ -1268,11 +1268,11 @@ function bo(e) {
|
|
|
1268
1268
|
}
|
|
1269
1269
|
function yo(e) {
|
|
1270
1270
|
var i = e.imageSize, t = e.visibleArea, n = e.aspectRatio, a = e.sizeRestrictions, o = t || i, r = Math.min(n.maximum || 1 / 0, Math.max(n.minimum || 0, ne(o))), l = o.width < o.height ? { width: 0.8 * o.width, height: 0.8 * o.width / r } : { height: 0.8 * o.height, width: 0.8 * o.height * r };
|
|
1271
|
-
return
|
|
1271
|
+
return Pe(Y(Y({}, l), { aspectRatio: n, sizeRestrictions: a }));
|
|
1272
1272
|
}
|
|
1273
1273
|
function _o(e) {
|
|
1274
1274
|
var i, t, n = e.imageSize, a = e.visibleArea, o = e.boundaries, r = e.aspectRatio, l = e.sizeRestrictions, s = e.stencilSize, u = a || n;
|
|
1275
|
-
return ne(u) > ne(o) ? t = (i = s.height * u.height / o.height) * ne(s) : i = (t = s.width * u.width / o.width) / ne(s),
|
|
1275
|
+
return ne(u) > ne(o) ? t = (i = s.height * u.height / o.height) * ne(s) : i = (t = s.width * u.width / o.width) / ne(s), Pe({ width: t, height: i, aspectRatio: r, sizeRestrictions: l });
|
|
1276
1276
|
}
|
|
1277
1277
|
function wo(e) {
|
|
1278
1278
|
var i = e.getAreaRestrictions, t = e.coordinates, n = e.imageSize, a = ne(e.boundaries);
|
|
@@ -1296,7 +1296,7 @@ function So(e) {
|
|
|
1296
1296
|
}
|
|
1297
1297
|
function Co(e) {
|
|
1298
1298
|
var i = e.aspectRatio, t = e.getAreaRestrictions, n = e.coordinates, a = e.visibleArea, o = e.sizeRestrictions, r = e.positionRestrictions, l = e.imageSize, s = e.previousImageSize, u = e.angle, d = Y({}, n), m = Y({}, a), h = Le(ve(Y({ left: 0, top: 0 }, s)), u);
|
|
1299
|
-
return (d = Y(Y({},
|
|
1299
|
+
return (d = Y(Y({}, Pe({ sizeRestrictions: o, aspectRatio: i, width: d.width, height: d.height })), Le(ve(d), u))).left -= h.left - l.width / 2 + d.width / 2, d.top -= h.top - l.height / 2 + d.height / 2, m = xe(m, At(m, t({ visibleArea: m, type: "resize" }))), { coordinates: d = be(d, r), visibleArea: m = be(m = Se(m, et(ve(d), ve(n))), t({ visibleArea: m, type: "move" })) };
|
|
1300
1300
|
}
|
|
1301
1301
|
function Ao(e) {
|
|
1302
1302
|
var i = e.flip, t = e.previousFlip, n = e.rotate, a = e.getAreaRestrictions, o = e.coordinates, r = e.visibleArea, l = e.imageSize, s = Y({}, o), u = Y({}, r), d = t.horizontal !== i.horizontal, m = t.vertical !== i.vertical;
|
|
@@ -1379,7 +1379,7 @@ ti.render = function(e, i, t, n, a, o) {
|
|
|
1379
1379
|
return [C("div", { class: o.classes.root }, null, 2)];
|
|
1380
1380
|
}), _: 1 }, 8, ["class", "position", "disabled", "onDrag", "onDragEnd", "onEnter", "onLeave"]);
|
|
1381
1381
|
};
|
|
1382
|
-
var
|
|
1382
|
+
var Dt = Me("vue-bounding-box"), Oo = ["east", "west", null], zo = ["south", "north", null], Qi = { name: "BoundingBox", props: { width: { type: Number }, height: { type: Number }, transitions: { type: Object }, handlers: { type: Object, default: function() {
|
|
1383
1383
|
return { eastNorth: !0, north: !0, westNorth: !0, west: !0, westSouth: !0, south: !0, eastSouth: !0, east: !0 };
|
|
1384
1384
|
} }, handlersComponent: { type: [Object, String], default: function() {
|
|
1385
1385
|
return ei;
|
|
@@ -1410,7 +1410,7 @@ var Pt = Me("vue-bounding-box"), Oo = ["east", "west", null], zo = ["south", "no
|
|
|
1410
1410
|
return this.width && this.height && (e.width = "".concat(this.width, "px"), e.height = "".concat(this.height, "px"), this.transitions && this.transitions.enabled && (e.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction))), e;
|
|
1411
1411
|
}, classes: function() {
|
|
1412
1412
|
var e = this.handlersClasses, i = this.handlersWrappersClasses, t = this.linesClasses, n = this.linesWrappersClasses;
|
|
1413
|
-
return { root:
|
|
1413
|
+
return { root: Dt(), handlers: e, handlersWrappers: i, lines: t, linesWrappers: n };
|
|
1414
1414
|
}, lineNodes: function() {
|
|
1415
1415
|
var e = this, i = [];
|
|
1416
1416
|
return this.points.forEach(function(t) {
|
|
@@ -1423,8 +1423,8 @@ var Pt = Me("vue-bounding-box"), Oo = ["east", "west", null], zo = ["south", "no
|
|
|
1423
1423
|
var o = { name: a.name, component: e.handlersComponent, class: me(e.classes.handlers.default, e.classes.handlers[a.name]), wrapperClass: me(e.classes.handlersWrappers.default, e.classes.handlersWrappers[a.name]), hoverClass: e.classes.handlers.hover, verticalDirection: a.verticalDirection, horizontalDirection: a.horizontalDirection, disabled: !e.resizable };
|
|
1424
1424
|
if (t && n) {
|
|
1425
1425
|
var r = a.horizontalDirection, l = a.verticalDirection, s = r === "east" ? t : r === "west" ? 0 : t / 2, u = l === "south" ? n : l === "north" ? 0 : n / 2;
|
|
1426
|
-
o.wrapperClass =
|
|
1427
|
-
} else o.wrapperClass =
|
|
1426
|
+
o.wrapperClass = Dt("handler"), o.wrapperStyle = { transform: "translate(".concat(s, "px, ").concat(u, "px)") }, e.transitions && e.transitions.enabled && (o.wrapperStyle.transition = "".concat(e.transitions.time, "ms ").concat(e.transitions.timingFunction));
|
|
1427
|
+
} else o.wrapperClass = Dt("handler", Re({}, a.classname, !0));
|
|
1428
1428
|
i.push(o);
|
|
1429
1429
|
}
|
|
1430
1430
|
}), i;
|
|
@@ -1500,7 +1500,7 @@ Ji.render = function(e, i, t, n, a, o) {
|
|
|
1500
1500
|
return o.onMouseDown && o.onMouseDown.apply(o, arguments);
|
|
1501
1501
|
}) }, [pe(e.$slots, "default")], 544);
|
|
1502
1502
|
};
|
|
1503
|
-
function
|
|
1503
|
+
function Pt(e) {
|
|
1504
1504
|
var i, t;
|
|
1505
1505
|
return { rotate: e.rotate || 0, flip: { horizontal: ((i = e == null ? void 0 : e.flip) === null || i === void 0 ? void 0 : i.horizontal) || !1, vertical: ((t = e == null ? void 0 : e.flip) === null || t === void 0 ? void 0 : t.vertical) || !1 } };
|
|
1506
1506
|
}
|
|
@@ -1706,7 +1706,7 @@ nn.render = function(e, i, t, n, a, o) {
|
|
|
1706
1706
|
var on = { components: { Preview: nn }, inheritAttrs: !1 };
|
|
1707
1707
|
on.render = function(e, i, t, n, a, o) {
|
|
1708
1708
|
var r = K("preview");
|
|
1709
|
-
return z(), G(r,
|
|
1709
|
+
return z(), G(r, Pi(e.$attrs, { fill: !0 }), null, 16);
|
|
1710
1710
|
};
|
|
1711
1711
|
var Tt = Me("vue-rectangle-stencil"), an = { name: "RectangleStencil", components: { StencilPreview: on, BoundingBox: Qi, DraggableArea: Ji }, props: { image: { type: Object }, coordinates: { type: Object }, stencilCoordinates: { type: Object }, handlers: { type: Object }, handlersComponent: { type: [Object, String], default: function() {
|
|
1712
1712
|
return ei;
|
|
@@ -1746,7 +1746,7 @@ an.render = function(e, i, t, n, a, o) {
|
|
|
1746
1746
|
}), _: 1 }, 8, ["movable", "onMove", "onMoveEnd"])];
|
|
1747
1747
|
}), _: 1 }, 8, ["width", "height", "transitions", "class", "handlers", "handlers-component", "handlers-classes", "handlers-wrappers-classes", "lines", "lines-component", "lines-classes", "lines-wrappers-classes", "resizable", "onResize", "onResizeEnd"])], 6);
|
|
1748
1748
|
};
|
|
1749
|
-
var
|
|
1749
|
+
var Do = ["transitions"], Ie = Me("vue-advanced-cropper"), rn = { name: "Cropper", components: { BackgroundWrapper: jt }, props: { src: { type: String, default: null }, stencilComponent: { type: [Object, String], default: function() {
|
|
1750
1750
|
return an;
|
|
1751
1751
|
} }, backgroundWrapperComponent: { type: [Object, String], default: function() {
|
|
1752
1752
|
return jt;
|
|
@@ -1786,7 +1786,7 @@ var Po = ["transitions"], Ie = Me("vue-advanced-cropper"), rn = { name: "Cropper
|
|
|
1786
1786
|
var i = e.stretcher, t = e.imageSize, n = ne(t);
|
|
1787
1787
|
i.style.width = t.width + "px", i.style.height = i.clientWidth / n + "px", i.style.width = i.clientWidth + "px";
|
|
1788
1788
|
} }, fitCoordinates: { type: Function, default: function(e) {
|
|
1789
|
-
var i = e.visibleArea, t = e.coordinates, n = e.aspectRatio, a = e.sizeRestrictions, o = e.positionRestrictions, r = Y(Y({}, t),
|
|
1789
|
+
var i = e.visibleArea, t = e.coordinates, n = e.aspectRatio, a = e.sizeRestrictions, o = e.positionRestrictions, r = Y(Y({}, t), Pe({ width: t.width, height: t.height, aspectRatio: n, sizeRestrictions: { maxWidth: i.width, maxHeight: i.height, minHeight: Math.min(i.height, a.minHeight), minWidth: Math.min(i.width, a.minWidth) } }));
|
|
1790
1790
|
return r = be(r = Se(r, et(ve(t), ve(r))), Rt(Fe(i), o));
|
|
1791
1791
|
} }, fitVisibleArea: { type: Function, default: function(e) {
|
|
1792
1792
|
var i = e.visibleArea, t = e.boundaries, n = e.getAreaRestrictions, a = e.coordinates, o = Y({}, i);
|
|
@@ -1929,7 +1929,7 @@ var Po = ["transitions"], Ie = Me("vue-advanced-cropper"), rn = { name: "Cropper
|
|
|
1929
1929
|
var o = a({ event: { type: e, params: n }, visibleArea: i, coordinates: t, boundaries: this.boundaries, aspectRatio: this.getAspectRatio(), positionRestrictions: this.positionRestrictions, getAreaRestrictions: this.getAreaRestrictions, sizeRestrictions: this.sizeRestrictions, stencilSize: this.getStencilSize() });
|
|
1930
1930
|
return ie(ie({}, o), {}, { changed: !Ai(o.visibleArea, i) || !Ai(o.coordinates, t) });
|
|
1931
1931
|
}, runAutoZoom: function(e) {
|
|
1932
|
-
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = i.transitions, n = t !== void 0 && t, a = no(i,
|
|
1932
|
+
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = i.transitions, n = t !== void 0 && t, a = no(i, Do), o = this.processAutoZoom(e, this.visibleArea, this.coordinates, a), r = o.visibleArea, l = o.coordinates, s = o.changed;
|
|
1933
1933
|
n && s && this.enableTransitions(), this.visibleArea = r, this.coordinates = l, n && s && this.debouncedDisableTransitions();
|
|
1934
1934
|
}, normalizeEvent: function(e) {
|
|
1935
1935
|
return function(i) {
|
|
@@ -1961,7 +1961,7 @@ var Po = ["transitions"], Ie = Me("vue-advanced-cropper"), rn = { name: "Cropper
|
|
|
1961
1961
|
return u = s, !Number.isNaN(parseFloat(u)) && isFinite(u);
|
|
1962
1962
|
var u;
|
|
1963
1963
|
});
|
|
1964
|
-
}, o =
|
|
1964
|
+
}, o = Pe({ sizeRestrictions: { minWidth: a([n.width, n.minWidth]) || 0, minHeight: a([n.height, n.minHeight]) || 0, maxWidth: a([n.width, n.maxWidth]) || 1 / 0, maxHeight: a([n.height, n.maxHeight]) || 1 / 0 }, width: this.coordinates.width, height: this.coordinates.height, aspectRatio: { minimum: this.coordinates.width / this.coordinates.height, maximum: this.coordinates.width / this.coordinates.height } });
|
|
1965
1965
|
if (n.maxArea && o.width * o.height > n.maxArea) {
|
|
1966
1966
|
var r = Math.sqrt(n.maxArea / (o.width * o.height));
|
|
1967
1967
|
o = { width: Math.round(r * o.width), height: Math.round(r * o.height) };
|
|
@@ -2078,8 +2078,8 @@ var Po = ["transitions"], Ie = Me("vue-advanced-cropper"), rn = { name: "Cropper
|
|
|
2078
2078
|
r.push(String.fromCharCode.apply(null, Array.from ? Array.from(s) : s.slice())), l = l.subarray(8192);
|
|
2079
2079
|
}
|
|
2080
2080
|
return "data:image/jpeg;base64," + btoa(r.join(""));
|
|
2081
|
-
}(n) : this.imageAttributes.src = t, Ze(this.defaultTransforms) ? this.appliedImageTransforms =
|
|
2082
|
-
var r =
|
|
2081
|
+
}(n) : this.imageAttributes.src = t, Ze(this.defaultTransforms) ? this.appliedImageTransforms = Pt(this.defaultTransforms()) : vt(this.defaultTransforms) ? this.appliedImageTransforms = Pt(this.defaultTransforms) : this.appliedImageTransforms = function(o) {
|
|
2082
|
+
var r = Pt({});
|
|
2083
2083
|
if (o) switch (o) {
|
|
2084
2084
|
case 2:
|
|
2085
2085
|
r.flip.horizontal = !0;
|
|
@@ -2149,7 +2149,7 @@ var Po = ["transitions"], Ie = Me("vue-advanced-cropper"), rn = { name: "Cropper
|
|
|
2149
2149
|
}
|
|
2150
2150
|
return { minimum: i, maximum: t };
|
|
2151
2151
|
}, getStencilSize: function() {
|
|
2152
|
-
if (this.stencilSize) return e = { currentStencilSize: { width: this.stencilCoordinates.width, height: this.stencilCoordinates.height }, stencilSize: this.stencilSize, boundaries: this.boundaries, coefficient: this.coefficient, coordinates: this.coordinates, aspectRatio: this.getAspectRatio(!0) }, i = e.boundaries, t = e.stencilSize, n = e.aspectRatio, It(ne(a = Ze(t) ? t({ boundaries: i, aspectRatio: n }) : t), n) && (a =
|
|
2152
|
+
if (this.stencilSize) return e = { currentStencilSize: { width: this.stencilCoordinates.width, height: this.stencilCoordinates.height }, stencilSize: this.stencilSize, boundaries: this.boundaries, coefficient: this.coefficient, coordinates: this.coordinates, aspectRatio: this.getAspectRatio(!0) }, i = e.boundaries, t = e.stencilSize, n = e.aspectRatio, It(ne(a = Ze(t) ? t({ boundaries: i, aspectRatio: n }) : t), n) && (a = Pe({ sizeRestrictions: { maxWidth: i.width, maxHeight: i.height, minWidth: 0, minHeight: 0 }, width: a.width, height: a.height, aspectRatio: { minimum: n.minimum, maximum: n.maximum } })), (a.width > i.width || a.height > i.height) && (a = Pe({ sizeRestrictions: { maxWidth: i.width, maxHeight: i.height, minWidth: 0, minHeight: 0 }, width: a.width, height: a.height, aspectRatio: { minimum: ne(a), maximum: ne(a) } })), a;
|
|
2153
2153
|
var e, i, t, n, a;
|
|
2154
2154
|
}, getPublicProperties: function() {
|
|
2155
2155
|
return { coefficient: this.coefficient, visibleArea: this.visibleArea, coordinates: this.coordinates, boundaries: this.boundaries, sizeRestrictions: this.sizeRestrictions, positionRestrictions: this.positionRestrictions, aspectRatio: this.getAspectRatio(), imageRestriction: this.imageRestriction };
|
|
@@ -2171,11 +2171,11 @@ var Po = ["transitions"], Ie = Me("vue-advanced-cropper"), rn = { name: "Cropper
|
|
|
2171
2171
|
var o = Co({ visibleArea: this.visibleArea, coordinates: this.coordinates, previousImageSize: a, imageSize: this.imageSize, angle: e, positionRestrictions: this.positionRestrictions, sizeRestrictions: this.sizeRestrictions, getAreaRestrictions: this.getAreaRestrictions, aspectRatio: this.getAspectRatio() }), r = o.visibleArea, l = o.coordinates, s = this.processAutoZoom("rotateImage", r, l);
|
|
2172
2172
|
r = s.visibleArea, l = s.coordinates, this.visibleArea = r, this.coordinates = l, this.onChange(), n && this.debouncedDisableTransitions();
|
|
2173
2173
|
}
|
|
2174
|
-
} }, emits: ["change", "error", "ready"] },
|
|
2174
|
+
} }, emits: ["change", "error", "ready"] }, Po = { key: 0, ref: "canvas", style: { display: "none" } }, To = { key: 1, ref: "sourceCanvas", style: { display: "none" } };
|
|
2175
2175
|
rn.render = function(e, i, t, n, a, o) {
|
|
2176
2176
|
return z(), G("div", { ref: "cropper", class: o.classes.cropper }, [C("div", { ref: "stretcher", class: o.classes.stretcher }, null, 2), C("div", { class: o.classes.boundaries, style: o.boundariesStyle }, [(z(), G(bt(t.backgroundWrapperComponent), { class: o.classes.cropperWrapper, "wheel-resize": o.settings.resizeImage.wheel, "touch-resize": o.settings.resizeImage.touch, "touch-move": o.settings.moveImage.touch, "mouse-move": o.settings.moveImage.mouse, onMove: o.onManipulateImage, onResize: o.onManipulateImage }, { default: N(function() {
|
|
2177
2177
|
return [C("div", { class: o.classes.background, style: o.boundariesStyle }, null, 6), C("div", { class: o.classes.imageWrapper }, [C("img", { ref: "image", crossorigin: a.imageAttributes.crossOrigin, src: a.imageAttributes.src, class: o.classes.image, style: o.imageStyle, onMousedown: i[1] || (i[1] = wt(function() {
|
|
2178
|
-
}, ["prevent"])) }, null, 46, ["crossorigin", "src"])], 2), C("div", { class: o.classes.foreground, style: o.boundariesStyle }, null, 6), Xe((z(), G(bt(t.stencilComponent),
|
|
2178
|
+
}, ["prevent"])) }, null, 46, ["crossorigin", "src"])], 2), C("div", { class: o.classes.foreground, style: o.boundariesStyle }, null, 6), Xe((z(), G(bt(t.stencilComponent), Pi({ ref: "stencil", image: o.image, coordinates: a.coordinates, "stencil-coordinates": o.stencilCoordinates, transitions: o.transitionsOptions }, t.stencilProps, { onResize: o.onResize, onResizeEnd: o.onResizeEnd, onMove: o.onMove, onMoveEnd: o.onMoveEnd }), null, 16, ["image", "coordinates", "stencil-coordinates", "transitions", "onResize", "onResizeEnd", "onMove", "onMoveEnd"])), [[_t, a.imageLoaded]]), t.canvas ? (z(), G("canvas", Po, null, 512)) : ee("", !0), t.canvas ? (z(), G("canvas", To, null, 512)) : ee("", !0)];
|
|
2179
2179
|
}), _: 1 }, 8, ["class", "wheel-resize", "touch-resize", "touch-move", "mouse-move", "onMove", "onResize"]))], 6)], 2);
|
|
2180
2180
|
};
|
|
2181
2181
|
const Uo = {
|
|
@@ -2198,7 +2198,7 @@ const Uo = {
|
|
|
2198
2198
|
},
|
|
2199
2199
|
emits: ["update:model-value", "reset:model-value"],
|
|
2200
2200
|
setup(e, { emit: i }) {
|
|
2201
|
-
const t = e, { t: n } = ce(), a = i, o =
|
|
2201
|
+
const t = e, { t: n } = ce(), a = i, o = P(() => t.modelValue ? URL.createObjectURL(t.modelValue) : ""), r = Q();
|
|
2202
2202
|
function l(y, b) {
|
|
2203
2203
|
const w = 2e3 / y;
|
|
2204
2204
|
return {
|
|
@@ -2211,8 +2211,8 @@ const Uo = {
|
|
|
2211
2211
|
const { width: b, height: g } = y, w = 16 / 9, E = b / g;
|
|
2212
2212
|
let A = b, I = g;
|
|
2213
2213
|
E > w ? I = A / w : A = I * w;
|
|
2214
|
-
const F = l(A, I),
|
|
2215
|
-
return x.fillStyle = "white", x.fillRect(0, 0, F.width, F.height), x.drawImage(y, 0, 0, A, I, R, _, F.width, F.height),
|
|
2214
|
+
const F = l(A, I), D = io(F.width, F.height), R = A > b ? (A - b) / 2 * F.ratio : 0, _ = I > g ? (I - g) / 2 * F.ratio : 0, x = D.getContext("2d");
|
|
2215
|
+
return x.fillStyle = "white", x.fillRect(0, 0, F.width, F.height), x.drawImage(y, 0, 0, A, I, R, _, F.width, F.height), D.toDataURL();
|
|
2216
2216
|
}
|
|
2217
2217
|
const u = Q(!1);
|
|
2218
2218
|
async function d([y]) {
|
|
@@ -2325,8 +2325,8 @@ function Xo(e, i) {
|
|
|
2325
2325
|
]);
|
|
2326
2326
|
}
|
|
2327
2327
|
const qo = /* @__PURE__ */ ut(Yo, [["render", Xo]]);
|
|
2328
|
-
function ln(e) {
|
|
2329
|
-
return e || "";
|
|
2328
|
+
function ln(e, i) {
|
|
2329
|
+
return e || (i ? void 0 : "");
|
|
2330
2330
|
}
|
|
2331
2331
|
const Zo = {
|
|
2332
2332
|
class: "flex flex-row xs:flex-col gap-24"
|
|
@@ -2380,18 +2380,18 @@ const la = /* @__PURE__ */ le({
|
|
|
2380
2380
|
menuLoader: l
|
|
2381
2381
|
}), {
|
|
2382
2382
|
checkMenuIsLoading: u
|
|
2383
|
-
} = He(Ye(Be())), d = i, m =
|
|
2384
|
-
const
|
|
2383
|
+
} = He(Ye(Be())), d = i, m = P(() => n.rules.item), h = P(() => n.categorizedItems), c = P(() => {
|
|
2384
|
+
const D = h.value.map((R) => ({
|
|
2385
2385
|
label: R.name,
|
|
2386
2386
|
value: R.id
|
|
2387
2387
|
}));
|
|
2388
|
-
return t.isAddon ?
|
|
2389
|
-
}), y =
|
|
2390
|
-
var
|
|
2388
|
+
return t.isAddon ? D : D.filter((R) => !!R.value);
|
|
2389
|
+
}), y = P(() => m.value.addon), b = P(() => !c.value.find((D) => !!D.value)), g = () => {
|
|
2390
|
+
var D;
|
|
2391
2391
|
return t.isAddon ? null : Xe(C(ke.FmSelect, {
|
|
2392
2392
|
disabled: !m.value.category || t.isAddon || u(),
|
|
2393
2393
|
items: c.value,
|
|
2394
|
-
modelValue: t.form.category ?? ((
|
|
2394
|
+
modelValue: t.form.category ?? ((D = t.fallback) == null ? void 0 : D.category),
|
|
2395
2395
|
shiftMenu: !0,
|
|
2396
2396
|
"onUpdate:model-value": (R) => d("update:form", "category", R)
|
|
2397
2397
|
}, {
|
|
@@ -2411,19 +2411,19 @@ const la = /* @__PURE__ */ le({
|
|
|
2411
2411
|
ot(() => {
|
|
2412
2412
|
!b.value && t.form.category === void 0 && t.isCreate && E(je.PRODUCT);
|
|
2413
2413
|
});
|
|
2414
|
-
const w =
|
|
2414
|
+
const w = P(() => {
|
|
2415
2415
|
var R;
|
|
2416
|
-
const
|
|
2417
|
-
return
|
|
2416
|
+
const D = t.form.name || ((R = t.fallback) == null ? void 0 : R.name);
|
|
2417
|
+
return D ? n.items.filter((_) => !!_.category && _._id !== t.form._id && _.name === D).length : 0;
|
|
2418
2418
|
});
|
|
2419
|
-
function E(
|
|
2419
|
+
function E(D) {
|
|
2420
2420
|
var _, x, f;
|
|
2421
|
-
const R =
|
|
2421
|
+
const R = D == je.ADD_ON;
|
|
2422
2422
|
d("update:form", "category", t.isOverride ? R ? "" : ((_ = t.fallback) == null ? void 0 : _.category) ?? ((x = c.value.find((v) => !!v.value)) == null ? void 0 : x.value) : R ? null : (f = c.value.find((v) => !!v.value)) == null ? void 0 : f.value);
|
|
2423
2423
|
}
|
|
2424
2424
|
const A = Q(!1);
|
|
2425
2425
|
async function I() {
|
|
2426
|
-
var
|
|
2426
|
+
var D, R, _;
|
|
2427
2427
|
if (!t.form.name) {
|
|
2428
2428
|
const x = document.getElementById("product-name");
|
|
2429
2429
|
if (x) {
|
|
@@ -2437,7 +2437,7 @@ const la = /* @__PURE__ */ le({
|
|
|
2437
2437
|
A.value = !0, Ht({
|
|
2438
2438
|
event: "menu_catalog_item_general_remy_suggest_description"
|
|
2439
2439
|
}), Te.toggleDialog(!0);
|
|
2440
|
-
const x = await ((R = (
|
|
2440
|
+
const x = await ((R = (D = Te).getItemDescription) == null ? void 0 : R.call(D, {
|
|
2441
2441
|
name: t.form.name || ""
|
|
2442
2442
|
}, !0)), f = (_ = x == null ? void 0 : x.data) == null ? void 0 : _.value;
|
|
2443
2443
|
d("update:form", "description", f);
|
|
@@ -2448,7 +2448,7 @@ const la = /* @__PURE__ */ le({
|
|
|
2448
2448
|
const {
|
|
2449
2449
|
t: F
|
|
2450
2450
|
} = ce();
|
|
2451
|
-
return (
|
|
2451
|
+
return (D, R) => {
|
|
2452
2452
|
const _ = K("fm-text-field"), x = K("fm-textarea"), f = K("fm-radio"), v = K("FmSnackbar"), k = K("FmButton"), M = K("fm-radio-group"), S = K("FmFormGroup"), B = Ut("tooltip");
|
|
2453
2453
|
return z(), G(Ve, {
|
|
2454
2454
|
title: p(F)("menu.product.form.detail.title")
|
|
@@ -2456,18 +2456,18 @@ const la = /* @__PURE__ */ le({
|
|
|
2456
2456
|
default: N(() => {
|
|
2457
2457
|
var H, J;
|
|
2458
2458
|
return [T("div", Zo, [T("div", Qo, [T("div", Jo, [T("div", ea, [C(_, {
|
|
2459
|
-
"model-value":
|
|
2460
|
-
placeholder: ((H =
|
|
2459
|
+
"model-value": D.form.code,
|
|
2460
|
+
placeholder: ((H = D.fallback) == null ? void 0 : H.code) || p(F)("menu.product.form.detail.fields.code.placeholder"),
|
|
2461
2461
|
label: p(F)("menu.product.form.detail.fields.code.label"),
|
|
2462
|
-
"onUpdate:modelValue": R[0] || (R[0] = (O) => d("update:form", "code", p(ln)(O)))
|
|
2462
|
+
"onUpdate:modelValue": R[0] || (R[0] = (O) => d("update:form", "code", p(ln)(O, D.isOverride)))
|
|
2463
2463
|
}, null, 8, ["model-value", "placeholder", "label"])]), T("div", ta, [C(_, {
|
|
2464
2464
|
id: "product-name",
|
|
2465
2465
|
disabled: !m.value.name,
|
|
2466
2466
|
"helper-text": w.value > 0 ? p(F)("menu.product.form.detail.fields.name.duplicate_warning", {
|
|
2467
2467
|
count: w.value
|
|
2468
2468
|
}) : void 0,
|
|
2469
|
-
"model-value":
|
|
2470
|
-
placeholder: (J =
|
|
2469
|
+
"model-value": D.form.name,
|
|
2470
|
+
placeholder: (J = D.fallback) == null ? void 0 : J.name,
|
|
2471
2471
|
rules: m.value.name ? [(O) => !!O || p(F)("menu.product.form.detail.fields.name.required")] : void 0,
|
|
2472
2472
|
"label-mark": "required",
|
|
2473
2473
|
autofocus: "",
|
|
@@ -2475,7 +2475,7 @@ const la = /* @__PURE__ */ le({
|
|
|
2475
2475
|
"onUpdate:modelValue": R[1] || (R[1] = (O) => d("update:form", "name", O))
|
|
2476
2476
|
}, null, 8, ["disabled", "helper-text", "model-value", "placeholder", "rules", "label"])])]), T("div", ia, [C(x, {
|
|
2477
2477
|
disabled: !m.value.description,
|
|
2478
|
-
"model-value":
|
|
2478
|
+
"model-value": D.form.description,
|
|
2479
2479
|
placeholder: p(F)("menu.product.form.detail.fields.description.placeholder"),
|
|
2480
2480
|
"onUpdate:modelValue": R[2] || (R[2] = (O) => d("update:form", "description", O.trim()))
|
|
2481
2481
|
}, {
|
|
@@ -2486,7 +2486,7 @@ const la = /* @__PURE__ */ le({
|
|
|
2486
2486
|
onClick: I
|
|
2487
2487
|
}, null, 512), [[B, p(Ti)("Suggest description")]])])]), C(jo, {
|
|
2488
2488
|
disabled: !m.value.thumbnail,
|
|
2489
|
-
"model-value":
|
|
2489
|
+
"model-value": D.thumbnail,
|
|
2490
2490
|
"onUpdate:modelValue": R[3] || (R[3] = (O) => d("update:thumbnail", O)),
|
|
2491
2491
|
"onReset:modelValue": R[4] || (R[4] = (O) => d("reset:thumbnail"))
|
|
2492
2492
|
}, null, 8, ["disabled", "model-value"])]), C(Je, {
|
|
@@ -2495,7 +2495,7 @@ const la = /* @__PURE__ */ le({
|
|
|
2495
2495
|
default: N(() => [y.value ? (z(), G(M, {
|
|
2496
2496
|
key: 0,
|
|
2497
2497
|
disabled: !m.value.category,
|
|
2498
|
-
"model-value":
|
|
2498
|
+
"model-value": D.isAddon ? je.ADD_ON : je.PRODUCT,
|
|
2499
2499
|
"onUpdate:modelValue": R[5] || (R[5] = (O) => E(O))
|
|
2500
2500
|
}, {
|
|
2501
2501
|
default: N(() => [T("div", aa, [T("div", ra, [C(f, {
|
|
@@ -2524,9 +2524,9 @@ const la = /* @__PURE__ */ le({
|
|
|
2524
2524
|
_: 1
|
|
2525
2525
|
}, 8, ["disabled", "model-value"])) : ee("", !0), p(n).isV4 ? ee("", !0) : (z(), G(S, {
|
|
2526
2526
|
key: 1,
|
|
2527
|
-
modelValue:
|
|
2528
|
-
"onUpdate:modelValue": R[6] || (R[6] = (O) =>
|
|
2529
|
-
rules: [(O) => !O && !
|
|
2527
|
+
modelValue: D.form.category,
|
|
2528
|
+
"onUpdate:modelValue": R[6] || (R[6] = (O) => D.form.category = O),
|
|
2529
|
+
rules: [(O) => !O && !D.isOverride ? "Category is required" : !0]
|
|
2530
2530
|
}, {
|
|
2531
2531
|
default: N(() => [C(g)]),
|
|
2532
2532
|
_: 1
|
|
@@ -2534,7 +2534,7 @@ const la = /* @__PURE__ */ le({
|
|
|
2534
2534
|
_: 1
|
|
2535
2535
|
}, 8, ["label"]), C(Zt, {
|
|
2536
2536
|
disabled: !m.value.orderFrom,
|
|
2537
|
-
"model-value":
|
|
2537
|
+
"model-value": D.form.orderFrom,
|
|
2538
2538
|
"order-from-none": m.value.orderFromNone,
|
|
2539
2539
|
required: m.value.orderFrom,
|
|
2540
2540
|
"default-label": p(F)("menu.product.form.detail.order_from.default"),
|
|
@@ -2570,13 +2570,13 @@ const la = /* @__PURE__ */ le({
|
|
|
2570
2570
|
},
|
|
2571
2571
|
emits: ["update:form"],
|
|
2572
2572
|
setup(e, { emit: i }) {
|
|
2573
|
-
const t = e, n = Xt(), a = he(), { t: o } = ce(), r = i, l =
|
|
2573
|
+
const t = e, n = Xt(), a = he(), { t: o } = ce(), r = i, l = P(() => a.rules.item), s = P(() => {
|
|
2574
2574
|
var E, A;
|
|
2575
2575
|
const g = t.isOverride ? ((E = t.fallback) == null ? void 0 : E.unit) ?? ((A = t.fallback) == null ? void 0 : A.perXUnit) : void 0, w = t.form.unit ?? t.form.perXUnit ?? g;
|
|
2576
2576
|
return w != null;
|
|
2577
2577
|
}), u = (g) => {
|
|
2578
2578
|
r("update:form", "unit", g ? "" : void 0), r("update:form", "perXUnit", g ? 0 : void 0);
|
|
2579
|
-
}, d =
|
|
2579
|
+
}, d = P(() => Ot.setCoreStore(n).taxSetting()), m = P(() => {
|
|
2580
2580
|
var g;
|
|
2581
2581
|
return Ot.getSelectedTax(
|
|
2582
2582
|
t.form.taxes,
|
|
@@ -2600,7 +2600,7 @@ const la = /* @__PURE__ */ le({
|
|
|
2600
2600
|
}
|
|
2601
2601
|
const y = Q(!1);
|
|
2602
2602
|
async function b() {
|
|
2603
|
-
var w, E, A, I, F,
|
|
2603
|
+
var w, E, A, I, F, D, R, _;
|
|
2604
2604
|
if (!(t.form.name || "")) {
|
|
2605
2605
|
const x = document.getElementById("product-name");
|
|
2606
2606
|
if (x) {
|
|
@@ -2624,7 +2624,7 @@ const la = /* @__PURE__ */ le({
|
|
|
2624
2624
|
{
|
|
2625
2625
|
name: t.form.name || "",
|
|
2626
2626
|
lat: (A = (E = (w = n.currentRestaurant) == null ? void 0 : w.value) == null ? void 0 : E.profile.address.coordinates) == null ? void 0 : A[1],
|
|
2627
|
-
lon: (
|
|
2627
|
+
lon: (D = (F = (I = n.currentRestaurant) == null ? void 0 : I.value) == null ? void 0 : F.profile.address.coordinates) == null ? void 0 : D[0]
|
|
2628
2628
|
},
|
|
2629
2629
|
!0
|
|
2630
2630
|
));
|
|
@@ -2638,13 +2638,13 @@ const la = /* @__PURE__ */ le({
|
|
|
2638
2638
|
title: p(o)("menu.product.form.price.title")
|
|
2639
2639
|
}, {
|
|
2640
2640
|
default: N(() => {
|
|
2641
|
-
var
|
|
2641
|
+
var D;
|
|
2642
2642
|
return [
|
|
2643
2643
|
T("div", ua, [
|
|
2644
2644
|
C(Qe, {
|
|
2645
2645
|
min: 0,
|
|
2646
2646
|
"model-value": g.form.price || null,
|
|
2647
|
-
placeholder: (
|
|
2647
|
+
placeholder: (D = g.fallback) != null && D.price ? p(st)(g.fallback.price, !1) : void 0,
|
|
2648
2648
|
rules: [
|
|
2649
2649
|
l.value.price ? (R) => !!R || p(o)("menu.product.form.price.fields.selling_price.required") : void 0
|
|
2650
2650
|
].filter(p(ct).isSet),
|
|
@@ -2794,7 +2794,7 @@ const la = /* @__PURE__ */ le({
|
|
|
2794
2794
|
selectedVariants: {}
|
|
2795
2795
|
},
|
|
2796
2796
|
setup(e) {
|
|
2797
|
-
const i = $e(), { emitData: t, emitAction: n } = Ii(), a = he(), { t: o } = ce(), r = e, l =
|
|
2797
|
+
const i = $e(), { emitData: t, emitAction: n } = Ii(), a = he(), { t: o } = ce(), r = e, l = P(() => a.variants.map((m) => ({
|
|
2798
2798
|
label: m.name,
|
|
2799
2799
|
value: m._id,
|
|
2800
2800
|
disabled: !1
|
|
@@ -2874,15 +2874,15 @@ const la = /* @__PURE__ */ le({
|
|
|
2874
2874
|
]));
|
|
2875
2875
|
};
|
|
2876
2876
|
}
|
|
2877
|
-
}), Ea = {}, Ia = { class: "overflow-x-auto" },
|
|
2878
|
-
function
|
|
2877
|
+
}), Ea = {}, Ia = { class: "overflow-x-auto" }, Da = { class: "xs:w-[600px]" };
|
|
2878
|
+
function Pa(e, i) {
|
|
2879
2879
|
return z(), q("div", Ia, [
|
|
2880
|
-
T("div",
|
|
2880
|
+
T("div", Da, [
|
|
2881
2881
|
pe(e.$slots, "default")
|
|
2882
2882
|
])
|
|
2883
2883
|
]);
|
|
2884
2884
|
}
|
|
2885
|
-
const un = /* @__PURE__ */ ut(Ea, [["render",
|
|
2885
|
+
const un = /* @__PURE__ */ ut(Ea, [["render", Pa]]), Ta = {
|
|
2886
2886
|
class: "space-y-16"
|
|
2887
2887
|
}, Ua = {
|
|
2888
2888
|
class: "flex items-center space-x-8"
|
|
@@ -2909,7 +2909,7 @@ const un = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
|
|
|
2909
2909
|
}) {
|
|
2910
2910
|
const t = e, n = he(), a = ii(), o = Be(), r = $e(), {
|
|
2911
2911
|
t: l
|
|
2912
|
-
} = ce(), s =
|
|
2912
|
+
} = ce(), s = P(() => n.rules.item), u = P(() => s.value.minPrice && !!t.form.minPrice), d = P(() => !n.state.currentCatalogId), m = P(() => n.variants.reduce((_, x) => (_[x._id] = x, _), {}));
|
|
2913
2913
|
Q(!1);
|
|
2914
2914
|
const h = i;
|
|
2915
2915
|
function c(_) {
|
|
@@ -2921,7 +2921,7 @@ const un = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
|
|
|
2921
2921
|
x[f] = v;
|
|
2922
2922
|
h("replace:form", x);
|
|
2923
2923
|
}
|
|
2924
|
-
|
|
2924
|
+
P(() => n.variants.map((_) => ({
|
|
2925
2925
|
label: _.name,
|
|
2926
2926
|
value: _._id,
|
|
2927
2927
|
disabled: !1
|
|
@@ -2959,7 +2959,7 @@ const un = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
|
|
|
2959
2959
|
}
|
|
2960
2960
|
const w = (_) => {
|
|
2961
2961
|
A(_);
|
|
2962
|
-
}, E =
|
|
2962
|
+
}, E = P(() => {
|
|
2963
2963
|
var x;
|
|
2964
2964
|
return (((x = t.form.variant) == null ? void 0 : x.variantCombinations) || []).map((f) => {
|
|
2965
2965
|
var k, M;
|
|
@@ -3032,7 +3032,7 @@ const un = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
|
|
|
3032
3032
|
value: v.variant
|
|
3033
3033
|
}]);
|
|
3034
3034
|
}
|
|
3035
|
-
const F =
|
|
3035
|
+
const F = P(() => [{
|
|
3036
3036
|
accessorKey: "combinationKey",
|
|
3037
3037
|
header: () => l("menu.product.form.variant.columns.variant"),
|
|
3038
3038
|
enableSorting: !1,
|
|
@@ -3048,7 +3048,7 @@ const un = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
|
|
|
3048
3048
|
modelValue: x,
|
|
3049
3049
|
placeholder: k || l("menu.product.form.variant.placeholders.no_code"),
|
|
3050
3050
|
"onUpdate:modelValue": (B) => {
|
|
3051
|
-
I(_.row.index, "code", ln(B));
|
|
3051
|
+
I(_.row.index, "code", ln(B, t.isOverride));
|
|
3052
3052
|
}
|
|
3053
3053
|
});
|
|
3054
3054
|
}
|
|
@@ -3108,7 +3108,7 @@ const un = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
|
|
|
3108
3108
|
showCurrency: !1
|
|
3109
3109
|
});
|
|
3110
3110
|
}
|
|
3111
|
-
}]),
|
|
3111
|
+
}]), D = P(() => ({
|
|
3112
3112
|
minPrice: u.value
|
|
3113
3113
|
}));
|
|
3114
3114
|
function R(_) {
|
|
@@ -3171,7 +3171,7 @@ const un = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
|
|
|
3171
3171
|
key: 0,
|
|
3172
3172
|
class: "w-full",
|
|
3173
3173
|
"column-defs": F.value,
|
|
3174
|
-
"column-visibility":
|
|
3174
|
+
"column-visibility": D.value,
|
|
3175
3175
|
"page-size": E.value.length ?? 0,
|
|
3176
3176
|
"row-data": E.value ?? [],
|
|
3177
3177
|
"hide-footer": "",
|
|
@@ -3187,7 +3187,7 @@ const un = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
|
|
|
3187
3187
|
}), La = /* @__PURE__ */ le({
|
|
3188
3188
|
__name: "AddForm",
|
|
3189
3189
|
setup(e) {
|
|
3190
|
-
const i = he(), t =
|
|
3190
|
+
const i = he(), t = P(() => i.rules.group), n = P(() => !!i.state.currentCatalogId || !!i.state.currentSchedulerId), a = P(() => {
|
|
3191
3191
|
const s = !i.state.currentSchedulerId, u = i.rules.group.type, d = i.version === L.F_MENU_VERSION.enum.v3, m = i.rules.item.orderFromActiveOnly, h = i.rules.item.bindToVariant;
|
|
3192
3192
|
return function(y) {
|
|
3193
3193
|
return {
|
|
@@ -3346,7 +3346,7 @@ const un = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
|
|
|
3346
3346
|
setup(e, {
|
|
3347
3347
|
emit: i
|
|
3348
3348
|
}) {
|
|
3349
|
-
const t = e, n = i, a = Xt(), o = he(), r =
|
|
3349
|
+
const t = e, n = i, a = Xt(), o = he(), r = P(() => we.Country.getCountry(a.currentCountry.value)), l = Q(!1), s = P(() => t.config.isV4 || t.group.type === L.F_ADDON_GROUP_TYPE.enum.PRODUCT), u = P(() => Object.values(t.group.items).flatMap((O) => [{
|
|
3350
3350
|
_id: O._id,
|
|
3351
3351
|
combinationKey: void 0
|
|
3352
3352
|
}, ...(O.items ?? []).map((U) => ({
|
|
@@ -3355,7 +3355,7 @@ const un = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
|
|
|
3355
3355
|
}))])), {
|
|
3356
3356
|
searchKey: d,
|
|
3357
3357
|
filter: m
|
|
3358
|
-
} = In(), h =
|
|
3358
|
+
} = In(), h = P(() => {
|
|
3359
3359
|
const O = Object.entries(t.group.items).filter(([, U]) => m([U.code || "", U.name || U.fallbackName, b(U.price ?? U.fallbackPrice), g(U.orderFrom || U.fallbackOrder), ...(U.items || []).map((V) => [V.code || "", V.name || V.fallbackName, b(V.price ?? V.fallbackPrice), g(V.orderFrom || V.fallbackOrder)].join(""))]));
|
|
3360
3360
|
return Object.fromEntries(O);
|
|
3361
3361
|
}), c = (O) => ({
|
|
@@ -3363,10 +3363,10 @@ const un = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
|
|
|
3363
3363
|
link: t.config.link(O),
|
|
3364
3364
|
name: t.config.name(O),
|
|
3365
3365
|
orderFrom: t.config.orderFrom(O)
|
|
3366
|
-
}), y =
|
|
3366
|
+
}), y = P(() => t.config.isItemGroup), b = (O) => O ? st(O, !1) : "", g = (O) => {
|
|
3367
3367
|
var U;
|
|
3368
3368
|
return O == null ? "" : (U = vn()[O]) == null ? void 0 : U.label;
|
|
3369
|
-
}, w =
|
|
3369
|
+
}, w = P(() => Object.values(h.value)), E = Q({}), {
|
|
3370
3370
|
t: A
|
|
3371
3371
|
} = ce(), I = Q([{
|
|
3372
3372
|
accessorKey: "name",
|
|
@@ -3533,13 +3533,13 @@ const un = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
|
|
|
3533
3533
|
}
|
|
3534
3534
|
}, null)]);
|
|
3535
3535
|
}
|
|
3536
|
-
}]), F =
|
|
3536
|
+
}]), F = P(() => ({
|
|
3537
3537
|
name: !0,
|
|
3538
3538
|
price: c(null).price,
|
|
3539
3539
|
orderFrom: c(null).showOrderFrom,
|
|
3540
3540
|
action: c(null).inventory || c(null).link
|
|
3541
3541
|
}));
|
|
3542
|
-
async function
|
|
3542
|
+
async function D() {
|
|
3543
3543
|
const O = (/* @__PURE__ */ new Date()).toISOString();
|
|
3544
3544
|
n("update:group", {
|
|
3545
3545
|
...t.group,
|
|
@@ -3589,7 +3589,7 @@ const un = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
|
|
|
3589
3589
|
const V = oe(t.group), Z = V.items[O];
|
|
3590
3590
|
Z && (Z.items = (Z.items || []).filter((j) => j.combinationKey !== U), V.items[O] = Z, n("update:group", V));
|
|
3591
3591
|
}
|
|
3592
|
-
const v =
|
|
3592
|
+
const v = P(() => t.categorizedItems.flatMap((O) => O.items).reduce((O, U) => {
|
|
3593
3593
|
var V;
|
|
3594
3594
|
return O[U._id] = {
|
|
3595
3595
|
price: U.price,
|
|
@@ -3624,7 +3624,7 @@ const un = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
|
|
|
3624
3624
|
[Z._id]: Z
|
|
3625
3625
|
}), {}), n("update:group", U);
|
|
3626
3626
|
}
|
|
3627
|
-
const H =
|
|
3627
|
+
const H = Di(), J = P(() => H.breakpoints.value.xs);
|
|
3628
3628
|
return (O, U) => {
|
|
3629
3629
|
const V = K("fm-button"), Z = K("fm-table");
|
|
3630
3630
|
return z(), G(Ve, {
|
|
@@ -3657,7 +3657,7 @@ const un = /* @__PURE__ */ ut(Ea, [["render", Da]]), Ta = {
|
|
|
3657
3657
|
variant: "secondary",
|
|
3658
3658
|
label: p(A)("menu.group.option.add_option"),
|
|
3659
3659
|
"prepend-icon": "add",
|
|
3660
|
-
onClick:
|
|
3660
|
+
onClick: D
|
|
3661
3661
|
}, null, 8, ["text-color", "border-color", "label"])]))], 64)) : ee("", !0)]),
|
|
3662
3662
|
default: N(() => [T("div", Ha, [T("div", Xa, [C(Z, {
|
|
3663
3663
|
"column-defs": I.value,
|
|
@@ -3702,7 +3702,7 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
3702
3702
|
let n = e;
|
|
3703
3703
|
const a = t, o = he(), r = $e(), l = He(Ye(Be())), s = Q(!1), u = Q(!1), d = (I) => {
|
|
3704
3704
|
ct.isBoolean(I) ? u.value = I : u.value = !u.value;
|
|
3705
|
-
}, m =
|
|
3705
|
+
}, m = P(() => n.config(n.group)), h = P(() => [
|
|
3706
3706
|
{
|
|
3707
3707
|
label: "Normal",
|
|
3708
3708
|
value: L.F_ADDON_GROUP_TYPE.enum.NORMAL
|
|
@@ -3754,7 +3754,7 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
3754
3754
|
);
|
|
3755
3755
|
async function E() {
|
|
3756
3756
|
if (n.action === "add") {
|
|
3757
|
-
const { group: I, linkItems: F } = Ni(n.group),
|
|
3757
|
+
const { group: I, linkItems: F } = Ni(n.group), D = {
|
|
3758
3758
|
module: L.F_MENU_MODULE_V4_KEY.enum.group,
|
|
3759
3759
|
operation: ye.F_OPERATION_TYPE.create,
|
|
3760
3760
|
data: I,
|
|
@@ -3766,7 +3766,7 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
3766
3766
|
}
|
|
3767
3767
|
]
|
|
3768
3768
|
};
|
|
3769
|
-
await l.updateMenu(
|
|
3769
|
+
await l.updateMenu(D, I.name), a("submit:group", n.group);
|
|
3770
3770
|
} else n.action === "update" && a("submit:group", n.group);
|
|
3771
3771
|
d(!1);
|
|
3772
3772
|
}
|
|
@@ -3781,7 +3781,7 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
3781
3781
|
});
|
|
3782
3782
|
const { t: A } = ce();
|
|
3783
3783
|
return (I, F) => {
|
|
3784
|
-
const
|
|
3784
|
+
const D = K("fm-text-field"), R = K("fm-stepper-field"), _ = K("FmFormGroup"), x = K("fm-radio"), f = K("fm-radio-group"), v = K("fm-switch"), k = K("fm-button"), M = K("fm-side-sheet");
|
|
3785
3785
|
return z(), q(Ae, null, [
|
|
3786
3786
|
pe(I.$slots, "default", { trigger: d }),
|
|
3787
3787
|
C(M, {
|
|
@@ -3822,7 +3822,7 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
3822
3822
|
C(En, null, {
|
|
3823
3823
|
default: N(() => [
|
|
3824
3824
|
T("div", null, [
|
|
3825
|
-
C(
|
|
3825
|
+
C(D, {
|
|
3826
3826
|
modelValue: I.group.name,
|
|
3827
3827
|
"onUpdate:modelValue": F[0] || (F[0] = (S) => I.group.name = S),
|
|
3828
3828
|
disabled: !m.value.link(),
|
|
@@ -3927,26 +3927,26 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
3927
3927
|
emits: ["update:combinations"],
|
|
3928
3928
|
setup(e, { expose: i, emit: t }) {
|
|
3929
3929
|
var I, F;
|
|
3930
|
-
const n = e, a = t, o = he(), r = $e(), l = He(Ye(Be())), s = Q([]), u = Q(n.combinations[0].combinationKey || ""), d =
|
|
3931
|
-
() => s.value.findIndex((
|
|
3932
|
-
), m =
|
|
3933
|
-
() => n.combinations.map((
|
|
3934
|
-
label: n.fullCombinations[
|
|
3935
|
-
value:
|
|
3930
|
+
const n = e, a = t, o = he(), r = $e(), l = He(Ye(Be())), s = Q([]), u = Q(n.combinations[0].combinationKey || ""), d = P(
|
|
3931
|
+
() => s.value.findIndex((D) => D.combinationKey == u.value)
|
|
3932
|
+
), m = P(
|
|
3933
|
+
() => n.combinations.map((D) => ({
|
|
3934
|
+
label: n.fullCombinations[D.combinationKey || ""],
|
|
3935
|
+
value: D.combinationKey || ""
|
|
3936
3936
|
}))
|
|
3937
|
-
), h =
|
|
3937
|
+
), h = P(() => {
|
|
3938
3938
|
var v, k;
|
|
3939
|
-
const
|
|
3939
|
+
const D = ((k = (v = s.value[d.value]) == null ? void 0 : v.groups) == null ? void 0 : k.find(
|
|
3940
3940
|
(M) => M._id === n.groupId
|
|
3941
3941
|
)) || {
|
|
3942
3942
|
_id: n.groupId,
|
|
3943
3943
|
groupKey: ""
|
|
3944
|
-
}, _ = o.state.menu.modules.group.find((M) => M._id === n.groupId), x = Object.entries({ ...
|
|
3944
|
+
}, _ = o.state.menu.modules.group.find((M) => M._id === n.groupId), x = Object.entries({ ...D, items: void 0 }).filter(([, M]) => !!M), f = {
|
|
3945
3945
|
..._,
|
|
3946
3946
|
...Object.fromEntries(x),
|
|
3947
3947
|
items: _.items.map((M) => {
|
|
3948
3948
|
var B;
|
|
3949
|
-
const S = (B =
|
|
3949
|
+
const S = (B = D.items) == null ? void 0 : B.find(
|
|
3950
3950
|
(H) => H._id == M._id && H.combinationKey == M.combinationKey
|
|
3951
3951
|
);
|
|
3952
3952
|
return {
|
|
@@ -3959,22 +3959,22 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
3959
3959
|
};
|
|
3960
3960
|
return new Li(o, l.updateMenu, r).mapGroups([f], !0)[0];
|
|
3961
3961
|
});
|
|
3962
|
-
function c(
|
|
3962
|
+
function c(D) {
|
|
3963
3963
|
var f, v;
|
|
3964
3964
|
const R = (f = s.value[d.value].groups) == null ? void 0 : f.findIndex(
|
|
3965
3965
|
(k) => k._id === n.groupId
|
|
3966
|
-
), _ = oe(s.value), x = { ...qt(
|
|
3966
|
+
), _ = oe(s.value), x = { ...qt(D), _id: n.groupId, groupKey: "" };
|
|
3967
3967
|
(R ?? -1) < 0 ? _[d.value] = {
|
|
3968
3968
|
..._[d.value],
|
|
3969
3969
|
groups: [...((v = _[d.value]) == null ? void 0 : v.groups) || [], x]
|
|
3970
3970
|
} : _[d.value].groups[R] = x, s.value = _;
|
|
3971
3971
|
}
|
|
3972
|
-
function y(
|
|
3972
|
+
function y(D) {
|
|
3973
3973
|
const R = m.value.length;
|
|
3974
3974
|
let _ = d.value;
|
|
3975
|
-
|
|
3975
|
+
D === "left" ? _ = _ === 0 ? R - 1 : _ - 1 : _ = _ === R - 1 ? 0 : _ + 1, u.value = m.value[_].value;
|
|
3976
3976
|
}
|
|
3977
|
-
function b(
|
|
3977
|
+
function b(D) {
|
|
3978
3978
|
return {
|
|
3979
3979
|
isV4: o.version === L.F_MENU_VERSION.enum.v4,
|
|
3980
3980
|
link: (R) => !1,
|
|
@@ -3996,8 +3996,8 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
3996
3996
|
const w = Q(!1);
|
|
3997
3997
|
Ce(
|
|
3998
3998
|
() => w.value,
|
|
3999
|
-
(
|
|
4000
|
-
|
|
3999
|
+
(D) => {
|
|
4000
|
+
D && (s.value = oe(n.combinations), u.value = n.combinations[0].combinationKey || "");
|
|
4001
4001
|
}
|
|
4002
4002
|
);
|
|
4003
4003
|
const E = Q();
|
|
@@ -4006,7 +4006,7 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
4006
4006
|
trigger: (F = E.value) == null ? void 0 : F.trigger
|
|
4007
4007
|
});
|
|
4008
4008
|
const { t: A } = ce();
|
|
4009
|
-
return (
|
|
4009
|
+
return (D, R) => {
|
|
4010
4010
|
const _ = K("fm-select"), x = K("fm-button"), f = K("fm-card");
|
|
4011
4011
|
return z(), G(cn, {
|
|
4012
4012
|
ref_key: "sheet",
|
|
@@ -4022,7 +4022,7 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
4022
4022
|
"onStatus:show": R[5] || (R[5] = (v) => w.value = v)
|
|
4023
4023
|
}, {
|
|
4024
4024
|
default: N(({ trigger: v }) => [
|
|
4025
|
-
pe(
|
|
4025
|
+
pe(D.$slots, "default", { trigger: v })
|
|
4026
4026
|
]),
|
|
4027
4027
|
"variant-section": N(() => [
|
|
4028
4028
|
u.value ? (z(), G(f, {
|
|
@@ -4075,23 +4075,23 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
4075
4075
|
groupIds: {}
|
|
4076
4076
|
},
|
|
4077
4077
|
setup(e) {
|
|
4078
|
-
const i = e, t = $e(), { emitData: n, emitAction: a } = Ii(), o = he(), r =
|
|
4078
|
+
const i = e, t = $e(), { emitData: n, emitAction: a } = Ii(), o = he(), r = P(() => o.rules.group), l = P(() => o.groups);
|
|
4079
4079
|
function s(E) {
|
|
4080
4080
|
return oe(E ?? []).sort((I, F) => I.position - F.position);
|
|
4081
4081
|
}
|
|
4082
|
-
const u =
|
|
4082
|
+
const u = P(() => s(l.value).reduce((E, A) => (E[A._id] = {
|
|
4083
4083
|
name: A.name,
|
|
4084
4084
|
type: St(o.items, A.items)
|
|
4085
|
-
}, E), {})), d =
|
|
4085
|
+
}, E), {})), d = P(() => [
|
|
4086
4086
|
...Object.entries(u.value).map(([E, { name: A, type: I }]) => ({
|
|
4087
4087
|
label: `${A} ${r.value.type ? `(${Vt(I)})` : ""}`.trim(),
|
|
4088
4088
|
value: E
|
|
4089
4089
|
}))
|
|
4090
|
-
]), m =
|
|
4091
|
-
const E = !o.state.currentSchedulerId, A = o.rules.group.type, I = o.version == L.F_MENU_VERSION.enum.v3, F = o.rules.item.orderFromActiveOnly,
|
|
4090
|
+
]), m = P(() => !!o.state.currentCatalogId || !!o.state.currentSchedulerId), h = P(() => {
|
|
4091
|
+
const E = !o.state.currentSchedulerId, A = o.rules.group.type, I = o.version == L.F_MENU_VERSION.enum.v3, F = o.rules.item.orderFromActiveOnly, D = o.rules.item.bindToVariant;
|
|
4092
4092
|
return function(_) {
|
|
4093
4093
|
return {
|
|
4094
|
-
link: (x) => !m.value && (!x ||
|
|
4094
|
+
link: (x) => !m.value && (!x || D),
|
|
4095
4095
|
name: (x) => !m.value && !x,
|
|
4096
4096
|
type: A && !_._id && !m.value,
|
|
4097
4097
|
price: _.type != L.F_ADDON_GROUP_TYPE.enum.DYNAMIC,
|
|
@@ -4099,13 +4099,13 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
4099
4099
|
orderFrom: (x) => E ? I ? _.type == L.F_ADDON_GROUP_TYPE.enum.DYNAMIC ? m.value : !!m.value == !x : m.value : !1,
|
|
4100
4100
|
orderFromActiveOnly: F,
|
|
4101
4101
|
showOrderFrom: E ? I ? m.value ? !0 : _.type == L.F_ADDON_GROUP_TYPE.enum.PRODUCT : m.value : !1,
|
|
4102
|
-
bindToVariant:
|
|
4102
|
+
bindToVariant: D,
|
|
4103
4103
|
isOverride: m.value,
|
|
4104
4104
|
isItemGroup: !1,
|
|
4105
4105
|
isV4: !I
|
|
4106
4106
|
};
|
|
4107
4107
|
};
|
|
4108
|
-
}), c =
|
|
4108
|
+
}), c = P(() => ({
|
|
4109
4109
|
..._e.generator.initMenuV4Group(),
|
|
4110
4110
|
type: o.version === L.F_MENU_VERSION.enum.v4 ? L.F_ADDON_GROUP_TYPE.enum.PRODUCT : L.F_ADDON_GROUP_TYPE.enum.NORMAL,
|
|
4111
4111
|
items: {},
|
|
@@ -4115,7 +4115,7 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
4115
4115
|
n(y.value), a("primary"), t.close();
|
|
4116
4116
|
};
|
|
4117
4117
|
return (E, A) => {
|
|
4118
|
-
const I = K("FmSearch"), F = K("FmCheckbox"),
|
|
4118
|
+
const I = K("FmSearch"), F = K("FmCheckbox"), D = K("FmButton");
|
|
4119
4119
|
return d.value.length > 0 ? (z(), q("div", cr, [
|
|
4120
4120
|
T("div", null, [
|
|
4121
4121
|
C(I, {
|
|
@@ -4147,7 +4147,7 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
4147
4147
|
T("div", mr, [
|
|
4148
4148
|
C(p(Oi), null, {
|
|
4149
4149
|
default: N(({ trigger: R }) => [
|
|
4150
|
-
C(
|
|
4150
|
+
C(D, {
|
|
4151
4151
|
label: p(g)("menu.common.actions.add_group"),
|
|
4152
4152
|
variant: "tertiary",
|
|
4153
4153
|
"text-color": "primary",
|
|
@@ -4157,12 +4157,12 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
4157
4157
|
_: 1
|
|
4158
4158
|
}),
|
|
4159
4159
|
T("div", hr, [
|
|
4160
|
-
C(
|
|
4160
|
+
C(D, {
|
|
4161
4161
|
label: p(g)("menu.common.actions.cancel"),
|
|
4162
4162
|
variant: "tertiary",
|
|
4163
4163
|
onClick: A[3] || (A[3] = (R) => p(t).close())
|
|
4164
4164
|
}, null, 8, ["label"]),
|
|
4165
|
-
C(
|
|
4165
|
+
C(D, {
|
|
4166
4166
|
label: p(g)("menu.common.actions.confirm"),
|
|
4167
4167
|
onClick: A[4] || (A[4] = (R) => w())
|
|
4168
4168
|
}, null, 8, ["label"])
|
|
@@ -4181,7 +4181,7 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
4181
4181
|
title: p(g)("menu.group.add")
|
|
4182
4182
|
}, {
|
|
4183
4183
|
default: N(({ trigger: R }) => [
|
|
4184
|
-
C(
|
|
4184
|
+
C(D, {
|
|
4185
4185
|
label: p(g)("menu.common.actions.add_group"),
|
|
4186
4186
|
icon: "add",
|
|
4187
4187
|
onClick: (_) => R()
|
|
@@ -4211,7 +4211,7 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
4211
4211
|
}) {
|
|
4212
4212
|
const t = e, n = he(), a = ii(), o = $e(), {
|
|
4213
4213
|
t: r
|
|
4214
|
-
} = ce(), l = i, s =
|
|
4214
|
+
} = ce(), l = i, s = P(() => n.rules.group), u = P(() => n.rules.item), d = P(() => n.groups);
|
|
4215
4215
|
Q(!1);
|
|
4216
4216
|
function m(f, v) {
|
|
4217
4217
|
return oe(v ?? []).map((M) => {
|
|
@@ -4223,23 +4223,23 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
4223
4223
|
};
|
|
4224
4224
|
});
|
|
4225
4225
|
}
|
|
4226
|
-
const h =
|
|
4226
|
+
const h = P(() => {
|
|
4227
4227
|
var v;
|
|
4228
4228
|
return [...c(m(d.value, t.form.groups || ((v = t.fallback) == null ? void 0 : v.groups) || [])).map((k) => k._id)];
|
|
4229
4229
|
});
|
|
4230
4230
|
function c(f) {
|
|
4231
4231
|
return oe(f ?? []).sort((k, M) => k.position - M.position);
|
|
4232
4232
|
}
|
|
4233
|
-
const y =
|
|
4233
|
+
const y = P(() => c(d.value).reduce((f, v) => (f[v._id] = {
|
|
4234
4234
|
name: v.name,
|
|
4235
4235
|
type: St(n.items, v.items)
|
|
4236
|
-
}, f), {})), b =
|
|
4236
|
+
}, f), {})), b = P(() => [...Object.entries(y.value).map(([f, {
|
|
4237
4237
|
name: v,
|
|
4238
4238
|
type: k
|
|
4239
4239
|
}]) => ({
|
|
4240
4240
|
label: `${v} ${s.value.type ? `(${Vt(k)})` : ""}`.trim(),
|
|
4241
4241
|
value: f
|
|
4242
|
-
}))]), g =
|
|
4242
|
+
}))]), g = P(() => [{
|
|
4243
4243
|
accessorKey: "name",
|
|
4244
4244
|
header: () => r("menu.product.form.group.columns.title"),
|
|
4245
4245
|
enableSorting: !1,
|
|
@@ -4283,7 +4283,7 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
4283
4283
|
}) => ue(ke.FmButton, {
|
|
4284
4284
|
icon: "edit",
|
|
4285
4285
|
variant: "tertiary",
|
|
4286
|
-
disabled: !
|
|
4286
|
+
disabled: !D(v),
|
|
4287
4287
|
textColor: "neutral-gray-400",
|
|
4288
4288
|
onClick: k
|
|
4289
4289
|
})
|
|
@@ -4326,10 +4326,10 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
4326
4326
|
groups: v
|
|
4327
4327
|
}));
|
|
4328
4328
|
}
|
|
4329
|
-
const I =
|
|
4329
|
+
const I = P(() => {
|
|
4330
4330
|
var f;
|
|
4331
4331
|
return !!((f = t.form.variant) != null && f.variantGroupIds.length);
|
|
4332
|
-
}), F =
|
|
4332
|
+
}), F = P(() => {
|
|
4333
4333
|
var f;
|
|
4334
4334
|
return I.value ? (f = t.form.variant) == null ? void 0 : f.variantCombinations : [{
|
|
4335
4335
|
_id: t.form._id,
|
|
@@ -4337,7 +4337,7 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
4337
4337
|
groups: t.form.groups || []
|
|
4338
4338
|
}];
|
|
4339
4339
|
});
|
|
4340
|
-
function
|
|
4340
|
+
function D(f) {
|
|
4341
4341
|
var k;
|
|
4342
4342
|
if (!f) return !1;
|
|
4343
4343
|
if (u.value.overrideProductGroup) return !0;
|
|
@@ -4352,15 +4352,15 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
4352
4352
|
return !1;
|
|
4353
4353
|
}
|
|
4354
4354
|
}
|
|
4355
|
-
Ce(() => d.value.length, () => E([...h.value, d.value[d.value.length - 1]._id])),
|
|
4355
|
+
Ce(() => d.value.length, () => E([...h.value, d.value[d.value.length - 1]._id])), P(() => ({
|
|
4356
4356
|
..._e.generator.initMenuV4Group(),
|
|
4357
4357
|
type: n.version === L.F_MENU_VERSION.enum.v4 ? L.F_ADDON_GROUP_TYPE.enum.PRODUCT : L.F_ADDON_GROUP_TYPE.enum.NORMAL,
|
|
4358
4358
|
items: {},
|
|
4359
4359
|
position: n.groups.length - 1,
|
|
4360
4360
|
itemsLinked: []
|
|
4361
4361
|
}));
|
|
4362
|
-
const R =
|
|
4363
|
-
|
|
4362
|
+
const R = P(() => !!n.state.currentCatalogId || !!n.state.currentSchedulerId);
|
|
4363
|
+
P(() => {
|
|
4364
4364
|
const f = !n.state.currentSchedulerId, v = n.rules.group.type, k = n.version == L.F_MENU_VERSION.enum.v3, M = n.rules.item.orderFromActiveOnly, S = n.rules.item.bindToVariant;
|
|
4365
4365
|
return function(H) {
|
|
4366
4366
|
return {
|
|
@@ -4446,7 +4446,7 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
4446
4446
|
}) {
|
|
4447
4447
|
const {
|
|
4448
4448
|
t
|
|
4449
|
-
} = ce(), n = e, a = i, o = he(), r =
|
|
4449
|
+
} = ce(), n = e, a = i, o = he(), r = P(() => o.rules.item), l = P(() => r.value.inventory);
|
|
4450
4450
|
function s(b, g, w, E) {
|
|
4451
4451
|
return !g || g && g.length === 0 ? [{
|
|
4452
4452
|
_id: "",
|
|
@@ -4458,10 +4458,10 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
4458
4458
|
binding: A.inventoryBindings || []
|
|
4459
4459
|
}));
|
|
4460
4460
|
}
|
|
4461
|
-
const u =
|
|
4461
|
+
const u = P(() => {
|
|
4462
4462
|
var b;
|
|
4463
4463
|
return n.form.name || ((b = n.fallback) == null ? void 0 : b.name) || "";
|
|
4464
|
-
}), d =
|
|
4464
|
+
}), d = P(() => {
|
|
4465
4465
|
var b;
|
|
4466
4466
|
return s(n.form.inventoryBindings || [], ((b = n.form.variant) == null ? void 0 : b.variantCombinations) || [], u.value, o.variants);
|
|
4467
4467
|
});
|
|
@@ -4470,10 +4470,10 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
4470
4470
|
let w = Ue.clone(n.form);
|
|
4471
4471
|
const E = w.variant;
|
|
4472
4472
|
if ((((I = E == null ? void 0 : E.variantCombinations) == null ? void 0 : I.length) ?? 0) > 0 && E) {
|
|
4473
|
-
const
|
|
4474
|
-
if (
|
|
4473
|
+
const D = E.variantCombinations.findIndex((_) => _.combinationKey === b);
|
|
4474
|
+
if (D < 0) return;
|
|
4475
4475
|
const R = Ue.clone(E.variantCombinations);
|
|
4476
|
-
R[
|
|
4476
|
+
R[D].inventoryBindings = g, w = {
|
|
4477
4477
|
...w,
|
|
4478
4478
|
variant: {
|
|
4479
4479
|
variantGroupIds: ((F = w.variant) == null ? void 0 : F.variantGroupIds) || [],
|
|
@@ -4591,12 +4591,12 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
4591
4591
|
setup(e, {
|
|
4592
4592
|
emit: i
|
|
4593
4593
|
}) {
|
|
4594
|
-
const t = e, n = he(), a =
|
|
4594
|
+
const t = e, n = he(), a = P(() => n.rules.item), o = He(Ye(Be())), {
|
|
4595
4595
|
t: r
|
|
4596
|
-
} = ce(), l = i, s =
|
|
4596
|
+
} = ce(), l = i, s = P(() => {
|
|
4597
4597
|
var y, b;
|
|
4598
4598
|
return !!((b = (y = t.form.variant) == null ? void 0 : y.variantCombinations) != null && b.length);
|
|
4599
|
-
}), u =
|
|
4599
|
+
}), u = P(() => {
|
|
4600
4600
|
var y;
|
|
4601
4601
|
return [{
|
|
4602
4602
|
key: "",
|
|
@@ -4604,7 +4604,7 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
4604
4604
|
takeaway: t.form.takeawayUsed,
|
|
4605
4605
|
onUpdate: (b) => l("update:form", "takeawayUsed", b)
|
|
4606
4606
|
}];
|
|
4607
|
-
}), d =
|
|
4607
|
+
}), d = P(() => {
|
|
4608
4608
|
var y;
|
|
4609
4609
|
return (((y = t.form.variant) == null ? void 0 : y.variantCombinations) || []).map((b, g) => ({
|
|
4610
4610
|
key: b.combinationKey || "",
|
|
@@ -4619,7 +4619,7 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
4619
4619
|
});
|
|
4620
4620
|
}
|
|
4621
4621
|
}));
|
|
4622
|
-
}), m =
|
|
4622
|
+
}), m = P(() => s.value && a.value.bindToVariant ? d.value : u.value), h = P(() => [t.isOverride ? {
|
|
4623
4623
|
label: r("menu.product.form.takeaway.options.follows_main"),
|
|
4624
4624
|
value: null
|
|
4625
4625
|
} : {
|
|
@@ -4638,7 +4638,7 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
4638
4638
|
header: () => r("menu.product.form.takeaway.columns.takeaway"),
|
|
4639
4639
|
cell: (y) => {
|
|
4640
4640
|
const b = y.getValue(), g = y.row.original;
|
|
4641
|
-
return ue(
|
|
4641
|
+
return ue(Dn, {
|
|
4642
4642
|
action: "add",
|
|
4643
4643
|
applyProduct: !1,
|
|
4644
4644
|
bindToVariant: n.rules.item.bindToVariant,
|
|
@@ -4700,9 +4700,9 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
4700
4700
|
applyProduct: { type: Boolean }
|
|
4701
4701
|
},
|
|
4702
4702
|
setup(e) {
|
|
4703
|
-
const { t: i } = ce(), t = e, n = He(Ye(Be())), a =
|
|
4703
|
+
const { t: i } = ce(), t = e, n = He(Ye(Be())), a = P(
|
|
4704
4704
|
() => t.initialValue ? i("menu.print_dept.update") : i("menu.print_dept.add")
|
|
4705
|
-
), o =
|
|
4705
|
+
), o = P(
|
|
4706
4706
|
() => t.initialValue ? i("menu.common.actions.update") : i("menu.common.actions.add")
|
|
4707
4707
|
), r = Q(
|
|
4708
4708
|
t.initialValue ? oe(t.initialValue) : { ..._e.generator.initMenuV4PrintDepartment(), usedBy: [] }
|
|
@@ -4824,16 +4824,16 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
4824
4824
|
toRoot: !1
|
|
4825
4825
|
};
|
|
4826
4826
|
}
|
|
4827
|
-
const l =
|
|
4827
|
+
const l = P(() => n.rules.item), s = P(() => n.printDepartments), u = P(() => {
|
|
4828
4828
|
var w;
|
|
4829
4829
|
return ((w = t.form.print) == null ? void 0 : w.sequential) ?? !1;
|
|
4830
|
-
}), d =
|
|
4830
|
+
}), d = P(() => {
|
|
4831
4831
|
var w;
|
|
4832
4832
|
return u.value ? s.value.reduce(
|
|
4833
4833
|
(E, { _id: A }) => (E.includes(A) || (E = [...E, A]), E),
|
|
4834
4834
|
[...((w = t.form.print) == null ? void 0 : w.department) ?? []]
|
|
4835
4835
|
) : s.value.map(({ _id: E }) => E);
|
|
4836
|
-
}), m =
|
|
4836
|
+
}), m = P(() => s.value.reduce((w, E) => (w[E._id] = E.name, w), {}));
|
|
4837
4837
|
function h(w) {
|
|
4838
4838
|
o("update:form", "print", {
|
|
4839
4839
|
...r(),
|
|
@@ -4861,13 +4861,13 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
4861
4861
|
function b(w, E) {
|
|
4862
4862
|
var I, F;
|
|
4863
4863
|
let A = [...((F = (I = t.form) == null ? void 0 : I.print) == null ? void 0 : F.department) ?? []];
|
|
4864
|
-
E && !A.includes(w) ? A = [...A, w] : E || (A = A.filter((
|
|
4864
|
+
E && !A.includes(w) ? A = [...A, w] : E || (A = A.filter((D) => D !== w)), o("update:form", "print", {
|
|
4865
4865
|
...r(),
|
|
4866
4866
|
...t.form.print,
|
|
4867
4867
|
department: A
|
|
4868
4868
|
});
|
|
4869
4869
|
}
|
|
4870
|
-
const g =
|
|
4870
|
+
const g = P(() => [
|
|
4871
4871
|
{
|
|
4872
4872
|
label: a("menu.product.form.print.kds.options.all.label"),
|
|
4873
4873
|
value: !1,
|
|
@@ -4883,7 +4883,7 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
4883
4883
|
() => s.value.length,
|
|
4884
4884
|
() => b(s.value[s.value.length - 1]._id, !0)
|
|
4885
4885
|
), (w, E) => {
|
|
4886
|
-
const A = K("fm-switch"), I = K("fm-radio"), F = K("fm-radio-group"),
|
|
4886
|
+
const A = K("fm-switch"), I = K("fm-radio"), F = K("fm-radio-group"), D = K("fm-button"), R = K("fm-checkbox");
|
|
4887
4887
|
return z(), G(Ve, {
|
|
4888
4888
|
title: p(a)("menu.product.form.print.title")
|
|
4889
4889
|
}, {
|
|
@@ -4942,7 +4942,7 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
4942
4942
|
return [
|
|
4943
4943
|
T("div", zr, [
|
|
4944
4944
|
T("div", Fr, [
|
|
4945
|
-
u.value ? (z(), G(
|
|
4945
|
+
u.value ? (z(), G(D, {
|
|
4946
4946
|
key: 0,
|
|
4947
4947
|
disabled: !((v = (f = t.form.print) == null ? void 0 : f.department) != null && v.includes(x)),
|
|
4948
4948
|
class: "handle",
|
|
@@ -4969,7 +4969,7 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
4969
4969
|
C(p(Mr), { "apply-product": !1 }, {
|
|
4970
4970
|
default: N(({ trigger: x }) => [
|
|
4971
4971
|
T("div", Er, [
|
|
4972
|
-
C(
|
|
4972
|
+
C(D, {
|
|
4973
4973
|
variant: p(Ke).Secondary,
|
|
4974
4974
|
label: p(a)("menu.product.form.print.routes.add"),
|
|
4975
4975
|
"prepend-icon": "add",
|
|
@@ -4988,7 +4988,7 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
4988
4988
|
}, 8, ["title"]);
|
|
4989
4989
|
};
|
|
4990
4990
|
}
|
|
4991
|
-
}),
|
|
4991
|
+
}), Dr = { class: "flex items-center justify-between" }, Pr = { class: "space-y-4 flex-1" }, Tr = { class: "fm-typo-en-title-sm-600" }, Ur = {
|
|
4992
4992
|
key: 0,
|
|
4993
4993
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
4994
4994
|
}, $r = { key: 0 }, Vr = /* @__PURE__ */ le({
|
|
@@ -5010,8 +5010,8 @@ const er = /* @__PURE__ */ ut(Za, [["render", Ja]]), tr = { class: "fm-typo-en-t
|
|
|
5010
5010
|
variant: "outlined"
|
|
5011
5011
|
}, {
|
|
5012
5012
|
default: N(() => [
|
|
5013
|
-
T("div",
|
|
5014
|
-
T("div",
|
|
5013
|
+
T("div", Dr, [
|
|
5014
|
+
T("div", Pr, [
|
|
5015
5015
|
T("p", Tr, se(n.title), 1),
|
|
5016
5016
|
n.description ? (z(), q("p", Ur, se(n.description), 1)) : ee("", !0)
|
|
5017
5017
|
]),
|
|
@@ -5089,7 +5089,7 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Kr = {
|
|
|
5089
5089
|
},
|
|
5090
5090
|
emits: ["update:catalogAndScheduler"],
|
|
5091
5091
|
setup(e, { emit: i }) {
|
|
5092
|
-
const t = e, n = i, { t: a } = ce(), o = he(), r = Q(o.state.currentCatalogId || null), l =
|
|
5092
|
+
const t = e, n = i, { t: a } = ce(), o = he(), r = Q(o.state.currentCatalogId || null), l = P(() => {
|
|
5093
5093
|
const h = Object.keys(t.linkedStatus.catalogs).map((c) => {
|
|
5094
5094
|
var y;
|
|
5095
5095
|
return {
|
|
@@ -5104,7 +5104,7 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Kr = {
|
|
|
5104
5104
|
},
|
|
5105
5105
|
...h
|
|
5106
5106
|
];
|
|
5107
|
-
}), s = Q(o.state.currentSchedulerId || null), u = () => r.value ? t.linkedStatus.catalogs[r.value].schedulers : t.linkedStatus.schedulers, d =
|
|
5107
|
+
}), s = Q(o.state.currentSchedulerId || null), u = () => r.value ? t.linkedStatus.catalogs[r.value].schedulers : t.linkedStatus.schedulers, d = P(() => {
|
|
5108
5108
|
const c = u().map((y) => {
|
|
5109
5109
|
var b;
|
|
5110
5110
|
return {
|
|
@@ -5202,7 +5202,7 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Kr = {
|
|
|
5202
5202
|
emits: ["update:show", "submit:form"],
|
|
5203
5203
|
setup(e, { emit: i }) {
|
|
5204
5204
|
var ai, ri, si, li, ui;
|
|
5205
|
-
const t = e, n = i, a = he(), o = Xt(), { t: r } = ce(), l =
|
|
5205
|
+
const t = e, n = i, a = he(), o = Xt(), { t: r } = ce(), l = P(() => t.action === "add" ? r("menu.product.form.title.add") : r("menu.product.form.title.update")), s = P(() => a.rules.item), u = (W) => new Promise(($) => setTimeout($, W));
|
|
5206
5206
|
ot(async () => {
|
|
5207
5207
|
t.autoShow && (await u(100), m());
|
|
5208
5208
|
});
|
|
@@ -5240,7 +5240,7 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Kr = {
|
|
|
5240
5240
|
a.selectCatalog(W), a.selectScheduler($), await xn(), b.update(c.value._id), setTimeout(() => {
|
|
5241
5241
|
n("update:show", !1);
|
|
5242
5242
|
}, 100);
|
|
5243
|
-
}, w =
|
|
5243
|
+
}, w = P(() => {
|
|
5244
5244
|
var W;
|
|
5245
5245
|
return a.mapVariant((W = c.value.variant) == null ? void 0 : W.variantGroupIds);
|
|
5246
5246
|
}), E = Q(null);
|
|
@@ -5273,12 +5273,12 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Kr = {
|
|
|
5273
5273
|
($ = a.currentScheduler) == null ? void 0 : $._id
|
|
5274
5274
|
))[0] : void 0;
|
|
5275
5275
|
}
|
|
5276
|
-
const F =
|
|
5276
|
+
const F = P(
|
|
5277
5277
|
() => !!a.currentCatalog || !!a.state.currentSchedulerId
|
|
5278
|
-
),
|
|
5278
|
+
), D = P(() => {
|
|
5279
5279
|
var W;
|
|
5280
5280
|
return F.value ? c.value.category == "" || c.value.category == null && ((W = h.value) == null ? void 0 : W.category) == null : a.version === L.F_MENU_VERSION.enum.v4 && c.value.category == null;
|
|
5281
|
-
}), R =
|
|
5281
|
+
}), R = P(() => o.itemAttributeSettings.value.length > 0 && !F.value);
|
|
5282
5282
|
function _() {
|
|
5283
5283
|
var fe;
|
|
5284
5284
|
const W = a.getSelectedTax(
|
|
@@ -5291,7 +5291,7 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Kr = {
|
|
|
5291
5291
|
function x() {
|
|
5292
5292
|
E.value = null, c.value.thumbnail = null;
|
|
5293
5293
|
}
|
|
5294
|
-
const f =
|
|
5294
|
+
const f = P(() => {
|
|
5295
5295
|
var W, $, re, fe, X, ci, di, mi, hi;
|
|
5296
5296
|
return {
|
|
5297
5297
|
title: r("menu.product.form.summary.title"),
|
|
@@ -5482,14 +5482,14 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Kr = {
|
|
|
5482
5482
|
function ni() {
|
|
5483
5483
|
m(), nt();
|
|
5484
5484
|
}
|
|
5485
|
-
const { isAtMost: kt } =
|
|
5486
|
-
|
|
5485
|
+
const { isAtMost: kt } = Di();
|
|
5486
|
+
P(() => kt("sm"));
|
|
5487
5487
|
const oi = Q(null), mn = On(oi);
|
|
5488
5488
|
return (W, $) => (z(), q(Ae, null, [
|
|
5489
5489
|
pe(W.$slots, "trigger", Cn(An({
|
|
5490
5490
|
trigger: m
|
|
5491
5491
|
}))),
|
|
5492
|
-
C(
|
|
5492
|
+
C(Pn, {
|
|
5493
5493
|
title: l.value,
|
|
5494
5494
|
show: d.value,
|
|
5495
5495
|
"primary-action": {
|
|
@@ -5551,7 +5551,7 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Kr = {
|
|
|
5551
5551
|
C(la, {
|
|
5552
5552
|
fallback: h.value,
|
|
5553
5553
|
form: c.value,
|
|
5554
|
-
"is-addon":
|
|
5554
|
+
"is-addon": D.value,
|
|
5555
5555
|
"is-override": F.value,
|
|
5556
5556
|
"is-create": t.action === "add",
|
|
5557
5557
|
thumbnail: E.value,
|
|
@@ -5593,7 +5593,7 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Kr = {
|
|
|
5593
5593
|
C(Sa, {
|
|
5594
5594
|
fallback: h.value,
|
|
5595
5595
|
form: c.value,
|
|
5596
|
-
"is-addon":
|
|
5596
|
+
"is-addon": D.value,
|
|
5597
5597
|
"is-override": F.value,
|
|
5598
5598
|
"onUpdate:form": A
|
|
5599
5599
|
}, null, 8, ["fallback", "form", "is-addon", "is-override"])
|
|
@@ -5617,7 +5617,7 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Kr = {
|
|
|
5617
5617
|
fallback: h.value,
|
|
5618
5618
|
form: c.value,
|
|
5619
5619
|
"full-combinations": w.value,
|
|
5620
|
-
"is-addon":
|
|
5620
|
+
"is-addon": D.value,
|
|
5621
5621
|
"is-override": F.value,
|
|
5622
5622
|
"onUpdate:form": A,
|
|
5623
5623
|
"onReplace:form": $[6] || ($[6] = (X) => c.value = X)
|
|
@@ -5641,7 +5641,7 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Kr = {
|
|
|
5641
5641
|
fallback: h.value,
|
|
5642
5642
|
form: c.value,
|
|
5643
5643
|
"full-combinations": w.value,
|
|
5644
|
-
"is-addon":
|
|
5644
|
+
"is-addon": D.value,
|
|
5645
5645
|
"is-override": F.value,
|
|
5646
5646
|
"onUpdate:form": A,
|
|
5647
5647
|
"onReplace:form": $[9] || ($[9] = (X) => c.value = X)
|
|
@@ -5666,7 +5666,7 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Kr = {
|
|
|
5666
5666
|
fallback: h.value,
|
|
5667
5667
|
form: c.value,
|
|
5668
5668
|
"full-combinations": w.value,
|
|
5669
|
-
"is-addon":
|
|
5669
|
+
"is-addon": D.value,
|
|
5670
5670
|
"is-override": F.value,
|
|
5671
5671
|
"onUpdate:form": A,
|
|
5672
5672
|
"onReplace:form": $[12] || ($[12] = (X) => c.value = X)
|
|
@@ -5691,7 +5691,7 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Kr = {
|
|
|
5691
5691
|
fallback: h.value,
|
|
5692
5692
|
form: c.value,
|
|
5693
5693
|
"full-combinations": w.value,
|
|
5694
|
-
"is-addon":
|
|
5694
|
+
"is-addon": D.value,
|
|
5695
5695
|
"is-override": F.value,
|
|
5696
5696
|
"onUpdate:form": A,
|
|
5697
5697
|
"onReplace:form": $[15] || ($[15] = (X) => c.value = X)
|
|
@@ -5716,7 +5716,7 @@ const Br = /* @__PURE__ */ ut(Nr, [["render", Lr]]), Kr = {
|
|
|
5716
5716
|
fallback: h.value,
|
|
5717
5717
|
form: c.value,
|
|
5718
5718
|
"full-combinations": w.value,
|
|
5719
|
-
"is-addon":
|
|
5719
|
+
"is-addon": D.value,
|
|
5720
5720
|
"is-override": F.value,
|
|
5721
5721
|
"onUpdate:form": A,
|
|
5722
5722
|
"onReplace:form": $[18] || ($[18] = (X) => c.value = X)
|
|
@@ -5879,7 +5879,7 @@ const ii = Fi("item-manager", () => {
|
|
|
5879
5879
|
const J = H.modules.catalog.find(
|
|
5880
5880
|
(O) => O._id === v._id
|
|
5881
5881
|
);
|
|
5882
|
-
await new
|
|
5882
|
+
await new De(J, e, a.updateMenu, t).update();
|
|
5883
5883
|
});
|
|
5884
5884
|
}
|
|
5885
5885
|
async function y(f) {
|
|
@@ -5888,7 +5888,7 @@ const ii = Fi("item-manager", () => {
|
|
|
5888
5888
|
const M = k.modules.catalog.find(
|
|
5889
5889
|
(S) => S._id === v._id
|
|
5890
5890
|
);
|
|
5891
|
-
await new
|
|
5891
|
+
await new De(M, e, a.updateMenu, t).update();
|
|
5892
5892
|
});
|
|
5893
5893
|
}
|
|
5894
5894
|
async function b(f) {
|
|
@@ -5916,7 +5916,7 @@ const ii = Fi("item-manager", () => {
|
|
|
5916
5916
|
_id: v,
|
|
5917
5917
|
items: M
|
|
5918
5918
|
}
|
|
5919
|
-
}, await new
|
|
5919
|
+
}, await new De(k, e, a.updateMenu, t).update();
|
|
5920
5920
|
}
|
|
5921
5921
|
async function w(f) {
|
|
5922
5922
|
var S;
|
|
@@ -5939,7 +5939,7 @@ const ii = Fi("item-manager", () => {
|
|
|
5939
5939
|
},
|
|
5940
5940
|
{}
|
|
5941
5941
|
), { updateMenu: M } = a;
|
|
5942
|
-
await new
|
|
5942
|
+
await new De(
|
|
5943
5943
|
{
|
|
5944
5944
|
...v,
|
|
5945
5945
|
override: {
|
|
@@ -6005,7 +6005,7 @@ const ii = Fi("item-manager", () => {
|
|
|
6005
6005
|
const v = e.state.menu.modules.item.find((k) => k._id === f);
|
|
6006
6006
|
e.currentCatalog ? e.state.currentSchedulerId ? await c(v) : await y(v) : e.state.currentSchedulerId ? await b(v) : I(v);
|
|
6007
6007
|
}
|
|
6008
|
-
async function
|
|
6008
|
+
async function D(f) {
|
|
6009
6009
|
e.currentCatalog ? e.currentScheduler ? await g(f) : await w(f) : (
|
|
6010
6010
|
// If Main
|
|
6011
6011
|
e.currentScheduler ? await E(f) : await A(f)
|
|
@@ -6049,7 +6049,7 @@ const ii = Fi("item-manager", () => {
|
|
|
6049
6049
|
e,
|
|
6050
6050
|
a.updateMenu,
|
|
6051
6051
|
t
|
|
6052
|
-
).unlinkProduct(f.map((v) => v._id)) : e.currentCatalog ? await new
|
|
6052
|
+
).unlinkProduct(f.map((v) => v._id)) : e.currentCatalog ? await new De(
|
|
6053
6053
|
e.currentCatalog,
|
|
6054
6054
|
e,
|
|
6055
6055
|
a.updateMenu,
|
|
@@ -6071,7 +6071,7 @@ const ii = Fi("item-manager", () => {
|
|
|
6071
6071
|
initDynamicGroupItem: (f) => dn(e, f),
|
|
6072
6072
|
create: d,
|
|
6073
6073
|
update: F,
|
|
6074
|
-
updateMany:
|
|
6074
|
+
updateMany: D,
|
|
6075
6075
|
deleteItem: _,
|
|
6076
6076
|
rearrange: x
|
|
6077
6077
|
};
|