@feedmepos/mf-menu 0.32.37-dev.1 → 0.32.38-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-Bb-3_ZSx.js → App-DGdS9nht.js} +5 -5
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-BARmH5Kv.js → ApplyProduct.vue_vue_type_script_setup_true_lang-CBy3XScH.js} +3 -3
- package/dist/{Catalog-yRIPAnDC.js → Catalog-BuI0IVpf.js} +6 -6
- package/dist/{Category-Ca9K5MhL.js → Category-DSTt-Sl6.js} +9 -9
- package/dist/Category-DbL3CS-5.js +224 -0
- package/dist/{CookingGuide-B8BEcGEe.js → CookingGuide-Baw7iMDl.js} +4 -4
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-DIpsCALu.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-BDZDojOt.js} +1 -1
- package/dist/{Group-BT99kxFT.js → Group-BnzmEllK.js} +1 -1
- package/dist/{Group-th2sIKMq.js → Group-D158_Fr0.js} +7 -7
- package/dist/{Group.vue_vue_type_script_setup_true_lang-BBucri8m.js → Group.vue_vue_type_script_setup_true_lang-C3H6xvlY.js} +227 -216
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-RBYXZiHI.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D2G40Yc6.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-DrPwZuUE.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-D-JOSWUn.js} +6 -6
- package/dist/{Ingredient-BEcfdvoj.js → Ingredient-C-gP75uQ.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CXWw_gWA.js → InventoryBinding.vue_vue_type_script_setup_true_lang-BpuYVaKl.js} +2 -2
- package/dist/{LinkProductSideSheet-5r07FaSs.js → LinkProductSideSheet-DN5fbJVw.js} +3 -3
- package/dist/{MenuSetting-HhVipfSP.js → MenuSetting-CjQ6_Ti_.js} +5 -5
- package/dist/{PrintRoute-xkZf95vB.js → PrintRoute-DK25vS8X.js} +4 -4
- package/dist/{Product-Bn_h8_wa.js → Product-DCEMAuw3.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-3mmMzUVq.js → Product.vue_vue_type_script_setup_true_lang-DCutU0Ny.js} +348 -337
- package/dist/{ProductInternalTools-BRsD97bC.js → ProductInternalTools-CiDa1V3D.js} +22 -22
- package/dist/{Products-CpDyGrq_.js → Products-DUxtMLiy.js} +50 -50
- package/dist/{Publish-Ce67sfIi.js → Publish-Bs5zVwDw.js} +3 -3
- package/dist/{Recipe-6pn-8XJc.js → Recipe-_WCpFOU6.js} +4 -4
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-o8JUN34b.js → RuleView.vue_vue_type_script_setup_true_lang-3AVOVYpW.js} +2 -2
- package/dist/{Scheduler-DVIqTWNo.js → Scheduler-BqFwfRlm.js} +3 -3
- package/dist/{ServingSequence-yaPOAqwr.js → ServingSequence-ByNsE8ha.js} +3 -3
- package/dist/{Setting-DCpmd6aM.js → Setting-widqJGfT.js} +5 -5
- package/dist/Subcategory-DXaz2g4-.js +345 -0
- package/dist/{Takeaway-B8yW3jnm.js → Takeaway-Ce_y1_UW.js} +1 -1
- package/dist/{Takeaway-fjsxTI9x.js → Takeaway-DVBJn6re.js} +4 -4
- package/dist/Takeaway.vue_vue_type_script_setup_true_lang-DK2Cp2Dg.js +316 -0
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-c0N8J2_E.js → Thumbnail.vue_vue_type_script_setup_true_lang-CAiNaQMP.js} +4 -4
- package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-BPs9D7Pq.js +185 -0
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-nFLEeipN.js +6120 -0
- package/dist/{Unit-CB7huz6v.js → Unit-XJLHLSYf.js} +2 -2
- package/dist/Variant-BA1AQl9-.js +247 -0
- package/dist/{_id_-C6pbjMX7.js → _id_-CA2rV7Eb.js} +9 -9
- package/dist/app-C9zsFCoJ.js +363 -0
- package/dist/{app-C2AxZIV0.js → app-D2Sxejos.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +264 -0
- package/dist/apps/mf-menu/src/components/ProductTranslationDialog.vue.d.ts +41 -0
- package/dist/apps/mf-menu/src/components/TranslationBadge.vue.d.ts +29 -0
- package/dist/apps/mf-menu/src/components/TranslationFieldSection.vue.d.ts +39 -0
- package/dist/apps/mf-menu/src/components/TranslationSideSheet.vue.d.ts +23 -0
- package/dist/apps/mf-menu/src/components/feature/ApplyProduct/ApplyProduct.vue.d.ts +12 -0
- package/dist/apps/mf-menu/src/components/feature/ApplyProduct/ApplyProductDialog.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/feature/ApplyProduct/index.d.ts +54 -0
- package/dist/apps/mf-menu/src/components/feature/CategoryManager/Form.vue.d.ts +1 -0
- package/dist/apps/mf-menu/src/components/feature/Fields/ImageDropField.vue.d.ts +1 -0
- package/dist/apps/mf-menu/src/components/feature/GroupManager/OptionTable.vue.d.ts +16 -0
- package/dist/apps/mf-menu/src/components/feature/GroupManager/ProductOverrideTranslation.vue.d.ts +22 -0
- package/dist/apps/mf-menu/src/components/feature/GroupManager/UpdateForm.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierButton.vue.d.ts +20 -0
- package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierForm.vue.d.ts +20 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/category.d.ts +8 -2
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/item.d.ts +24 -1
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/scheduler.d.ts +16 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/useItemFormManagement.d.ts +10 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/OptionTable.vue.d.ts +16 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/UpdateForm.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/index.d.ts +24 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/item/ItemForm.vue.d.ts +30 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/menuUtils.d.ts +10 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +125 -1
- package/dist/apps/mf-menu/src/components/feature/VariantManager/ProductVariantTranslation.vue.d.ts +37 -0
- package/dist/apps/mf-menu/src/components/import/PreviewAddonContent.vue.d.ts +20 -0
- package/dist/apps/mf-menu/src/composable/linkProducts.d.ts +16 -0
- package/dist/apps/mf-menu/src/helper/item.d.ts +1 -0
- package/dist/apps/mf-menu/src/helper/itemCategories.d.ts +10 -0
- package/dist/apps/mf-menu/src/helper/menu.d.ts +11 -0
- package/dist/apps/mf-menu/src/helper/menuImport.d.ts +125 -1
- package/dist/apps/mf-menu/src/helper/menuSanitizer.d.ts +125 -1
- package/dist/apps/mf-menu/src/manager/menu/category.d.ts +8 -2
- package/dist/apps/mf-menu/src/manager/menu/group.d.ts +1 -0
- package/dist/apps/mf-menu/src/manager/menu/item.d.ts +125 -1
- package/dist/apps/mf-menu/src/manager/menu/subcategory.d.ts +6 -0
- package/dist/apps/mf-menu/src/stores/manager/item.d.ts +31 -1
- package/dist/apps/mf-menu/src/stores/manager/scheduler.d.ts +16 -0
- package/dist/apps/mf-menu/src/stores/manager/takeaway.d.ts +9 -0
- package/dist/apps/mf-menu/src/stores/menu.d.ts +125 -1
- package/dist/apps/mf-menu/src/utils/translation.d.ts +2 -0
- package/dist/apps/mf-menu/src/views/Catalog/Edit/AddCategoryDialogContentComponent.vue.d.ts +1 -0
- package/dist/apps/mf-menu/src/views/Catalog/Edit/AddProductPopup/Form.vue.d.ts +20 -0
- package/dist/apps/mf-menu/src/views/Publish/UpdateCatalogDialog.vue.d.ts +46 -0
- package/dist/apps/mf-menu/src/views/Scheduler/FilterForm.vue.d.ts +10 -0
- package/dist/apps/mf-menu/src/views/Scheduler/SchedulerDialog.vue.d.ts +10 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/linked-status-BrleJSCp.js +13 -0
- package/dist/assets/menu-export-Da3-wtnw.js +107 -0
- package/dist/assets/override-menu-ChjeVe4O.js +13 -0
- package/dist/assets/validate-menu-YVTxOfeq.js +13 -0
- package/dist/{catalog-CExooVeT.js → catalog-YvUT-JIh.js} +1 -1
- package/dist/{catalogSetting-DdEejp3Q.js → catalogSetting-CXOYJZO3.js} +1 -1
- package/dist/{currency-Prr2X-1u.js → currency-np4zdWW1.js} +1 -1
- package/dist/dayjs.min-CSuLNurY.js +6 -0
- package/dist/{index-D3Vh13iX.js → index-3wQe-6lg.js} +1 -1
- package/dist/index-CFbB7bM3.js +335 -0
- package/dist/index-Cek4Z9eM.js +539 -0
- package/dist/{index.vue_vue_type_script_setup_true_lang-BF1UnZ5l.js → index.vue_vue_type_script_setup_true_lang-HZXySVXs.js} +18035 -17833
- package/dist/item-DR9qrNf6.js +8117 -0
- package/dist/{jszip.min-BQ_xBh4o.js → jszip.min-Bz8ZTO2s.js} +2 -2
- package/dist/{menu-B0qJanmj.js → menu-BWsDRctK.js} +1 -1
- package/dist/{menuV2-DdCaRGqL.js → menuV2-CfsbyMis.js} +74 -74
- package/dist/mf-menu.css +1 -1
- package/dist/{priceTier-B-XJVQDe.js → priceTier-BNCJtFVM.js} +1 -1
- package/dist/rules-DU-MRKWH.js +212 -0
- package/dist/{scheduler-DyVdWsn7.js → scheduler-BizSj8q8.js} +4 -4
- package/dist/{toExcel-D0rRKbjh.js → toExcel-DhRigI9c.js} +2 -2
- package/dist/translation-BeqjfyEb.js +75 -0
- package/dist/{unit-DcHsbLOz.js → unit-CaOym7HP.js} +2 -2
- package/package.json +3 -3
- package/dist/Category-DJriqKNV.js +0 -392
- package/dist/Subcategory-Dsf5NLIa.js +0 -280
- package/dist/Takeaway.vue_vue_type_script_setup_true_lang-Bk2edy2M.js +0 -305
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CgF9dq-t.js +0 -6024
- package/dist/Variant-DSOF9uPl.js +0 -230
- package/dist/app-DPNctjt-.js +0 -363
- package/dist/assets/linked-status-DVG3fmWg.js +0 -13
- package/dist/assets/menu-export-CVc1O3S8.js +0 -107
- package/dist/assets/override-menu-ClMYkz3D.js +0 -13
- package/dist/assets/validate-menu-CWDyO0w0.js +0 -13
- package/dist/category-3SQRILcp.js +0 -156
- package/dist/dayjs.min-BOYFHQRS.js +0 -6
- package/dist/index-DBRFZboy.js +0 -273
- package/dist/index-TgR8MNiA.js +0 -239
- package/dist/item-C2wRl41j.js +0 -6950
- package/dist/rules-CIWTZQfh.js +0 -6
- package/dist/subcategory-DMfXewrZ.js +0 -148
|
@@ -1,305 +0,0 @@
|
|
|
1
|
-
import { getCurrentInstance as te, defineComponent as oe, computed as h, watch as ne, h as R, resolveComponent as S, createElementBlock as C, openBlock as _, Fragment as O, normalizeClass as D, createElementVNode as k, createVNode as V, unref as t, isRef as j, withCtx as P, renderList as ie, createBlock as G, createCommentVNode as $, toDisplayString as I, withModifiers as Q } from "vue";
|
|
2
|
-
import { G as H, u as J, Q as W, M as N, A as z, I as L, B as se, ap as q, a5 as re } from "./index.vue_vue_type_script_setup_true_lang-BF1UnZ5l.js";
|
|
3
|
-
import { useI18n as X, useCoreStore as le } from "@feedmepos/mf-common";
|
|
4
|
-
import { useDialog as ce, useSnackbar as Z, FmButtonVariant as A, components as de, useBreakpoints as ue } from "@feedmepos/ui-library";
|
|
5
|
-
import { _ as me } from "./app-DPNctjt-.js";
|
|
6
|
-
import { a as ye, l as ee, T as pe } from "./index-DBRFZboy.js";
|
|
7
|
-
import { u as fe } from "./search-BAPEUu1R.js";
|
|
8
|
-
import { f as F } from "./currency-Prr2X-1u.js";
|
|
9
|
-
import { defineStore as _e } from "pinia";
|
|
10
|
-
import { C as ke } from "./catalog-CExooVeT.js";
|
|
11
|
-
import { c as ve } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
|
12
|
-
function we(T, M, l, m) {
|
|
13
|
-
var y, v, w, g;
|
|
14
|
-
const i = L(T);
|
|
15
|
-
i.override.takeaway[l._id] = {
|
|
16
|
-
price: l.price || void 0
|
|
17
|
-
};
|
|
18
|
-
const f = [...l.usedBy, ...M.usedBy];
|
|
19
|
-
for (const r of f) {
|
|
20
|
-
const c = l.usedBy.some(
|
|
21
|
-
(e) => e._id == r._id && e.combinationKey == r.combinationKey
|
|
22
|
-
) ? l._id : null, a = (i.override.items[r._id] || []).findIndex(
|
|
23
|
-
(e) => e.combinationKey === r.combinationKey
|
|
24
|
-
);
|
|
25
|
-
let d;
|
|
26
|
-
if (a >= 0)
|
|
27
|
-
d = (y = i.override.items[r._id][a]) != null && y.takeawayUsed ? L((v = i.override.items[r._id][a]) == null ? void 0 : v.takeawayUsed) : void 0;
|
|
28
|
-
else {
|
|
29
|
-
const e = m.find((u) => u._id === r._id);
|
|
30
|
-
r.combinationKey ? d = ((g = (w = e == null ? void 0 : e.variant) == null ? void 0 : w.variantCombinations.find(
|
|
31
|
-
(u) => u.combinationKey === r.combinationKey
|
|
32
|
-
)) == null ? void 0 : g.takeawayUsed) || (e == null ? void 0 : e.takeawayUsed) : d = e == null ? void 0 : e.takeawayUsed;
|
|
33
|
-
}
|
|
34
|
-
if (a >= 0)
|
|
35
|
-
i.override.items[r._id][a].takeawayUsed = c;
|
|
36
|
-
else if (d !== c) {
|
|
37
|
-
const e = {
|
|
38
|
-
_id: r._id,
|
|
39
|
-
combinationKey: r.combinationKey,
|
|
40
|
-
takeawayUsed: c
|
|
41
|
-
};
|
|
42
|
-
i.override.items[r._id] = [...i.override.items[r._id] || [], e];
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return i;
|
|
46
|
-
}
|
|
47
|
-
const ge = _e("takeaway-manager", () => {
|
|
48
|
-
const T = ce(), M = Z(), l = H(M), m = W(l), i = J(), f = te(), { t: y } = X(), v = (a) => {
|
|
49
|
-
var e, u;
|
|
50
|
-
const { vNode: d } = ve(
|
|
51
|
-
ye,
|
|
52
|
-
f,
|
|
53
|
-
a
|
|
54
|
-
);
|
|
55
|
-
(u = (e = d.component) == null ? void 0 : e.exposed) == null || u.trigger();
|
|
56
|
-
};
|
|
57
|
-
async function w(a) {
|
|
58
|
-
var u, U;
|
|
59
|
-
const e = ((U = (u = i.currentCatalog) == null ? void 0 : u.override.takeaway[a._id]) == null ? void 0 : U.price) ? null : i.state.menu.modules.takeaway.find((b) => b._id === a._id);
|
|
60
|
-
v({
|
|
61
|
-
initialValue: a,
|
|
62
|
-
applyProduct: !0,
|
|
63
|
-
bindToVariant: i.rules.item.bindToVariant,
|
|
64
|
-
fallback: e,
|
|
65
|
-
action: "update",
|
|
66
|
-
"onUpdate:takeaway": async (b) => {
|
|
67
|
-
let o = L(i.currentCatalog);
|
|
68
|
-
b.price ? o.override.takeaway[a._id] = { price: b.price } : delete o.override.takeaway[a._id], o = we(o, a, b, i.state.menu.modules.item), await new ke(o, i, m.updateMenu, T).update();
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
async function g(a) {
|
|
73
|
-
v({
|
|
74
|
-
initialValue: a,
|
|
75
|
-
bindToVariant: i.rules.item.bindToVariant,
|
|
76
|
-
applyProduct: !0,
|
|
77
|
-
action: "update",
|
|
78
|
-
"onUpdate:takeaway": async (d) => {
|
|
79
|
-
await m.updateMenu(
|
|
80
|
-
{
|
|
81
|
-
module: z.F_MENU_MODULE_V4_KEY.enum.takeaway,
|
|
82
|
-
operation: N.F_OPERATION_TYPE.update,
|
|
83
|
-
data: d,
|
|
84
|
-
link: ee(d.usedBy || [])
|
|
85
|
-
},
|
|
86
|
-
d.name
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
async function r(a) {
|
|
92
|
-
i.currentCatalog ? await w(a) : await g(a);
|
|
93
|
-
}
|
|
94
|
-
async function c(a) {
|
|
95
|
-
T.open({
|
|
96
|
-
title: y("menu.common.dialog.remove.takeaway.title"),
|
|
97
|
-
message: y("menu.common.dialog.remove.takeaway.message", { name: a.name }),
|
|
98
|
-
primaryActions: {
|
|
99
|
-
text: y("menu.common.actions.remove"),
|
|
100
|
-
close: !0,
|
|
101
|
-
variant: A.Destructive
|
|
102
|
-
},
|
|
103
|
-
secondaryActions: {
|
|
104
|
-
text: y("menu.common.actions.cancel"),
|
|
105
|
-
close: !0
|
|
106
|
-
}
|
|
107
|
-
}).onPrimary(async () => {
|
|
108
|
-
await m.updateMenu(
|
|
109
|
-
{
|
|
110
|
-
module: z.F_MENU_MODULE_V4_KEY.enum.takeaway,
|
|
111
|
-
operation: N.F_OPERATION_TYPE.delete,
|
|
112
|
-
data: a._id
|
|
113
|
-
},
|
|
114
|
-
a.name,
|
|
115
|
-
!0
|
|
116
|
-
);
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
return {
|
|
120
|
-
deleteTakeaway: c,
|
|
121
|
-
updateTakeaway: r
|
|
122
|
-
};
|
|
123
|
-
}), be = {
|
|
124
|
-
key: 0,
|
|
125
|
-
class: /* @__PURE__ */ D(["flex-1 overflow-hidden", "space-y-16", "flex flex-col", "overflow-hidden", "pt-16"])
|
|
126
|
-
}, he = {
|
|
127
|
-
class: "flex items-center space-x-8 justify-end"
|
|
128
|
-
}, xe = {
|
|
129
|
-
class: "w-[320px]"
|
|
130
|
-
}, Ce = {
|
|
131
|
-
class: "px-16 pt-8"
|
|
132
|
-
}, Ve = {
|
|
133
|
-
class: /* @__PURE__ */ D(["flex-1", "overflow-scroll", "divide-y divide-fm-color-neutral-gray-100"])
|
|
134
|
-
}, Te = ["onClick"], Me = {
|
|
135
|
-
class: "flex-1"
|
|
136
|
-
}, Ue = {
|
|
137
|
-
class: "fm-typo-en-body-lg-600 mb-4"
|
|
138
|
-
}, Ee = {
|
|
139
|
-
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
140
|
-
}, Ke = {
|
|
141
|
-
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
142
|
-
}, Ie = {
|
|
143
|
-
key: 1,
|
|
144
|
-
class: "xs:pt-24"
|
|
145
|
-
}, Re = /* @__PURE__ */ oe({
|
|
146
|
-
__name: "Takeaway",
|
|
147
|
-
emits: ["update:count"],
|
|
148
|
-
setup(T, {
|
|
149
|
-
emit: M
|
|
150
|
-
}) {
|
|
151
|
-
const l = J(), m = ge(), i = h(() => l.rules.item.bindToVariant), f = h(() => l.rules.takeaway), y = W(H(Z())), v = le(), w = h(() => se.Country.getCountry(v.currentCountry.value).currency), g = h(() => l.takeaways.map((o) => ({
|
|
152
|
-
...o,
|
|
153
|
-
usedBy: l.items.reduce((s, p) => {
|
|
154
|
-
var n, E, Y;
|
|
155
|
-
const x = p.takeawayUsed === o._id;
|
|
156
|
-
if ((!i.value || !((E = (n = p.variant) == null ? void 0 : n.variantGroupIds) != null && E.length)) && x)
|
|
157
|
-
s.push({
|
|
158
|
-
_id: p._id
|
|
159
|
-
});
|
|
160
|
-
else {
|
|
161
|
-
const ae = (((Y = p.variant) == null ? void 0 : Y.variantCombinations) || []).filter((K) => K.takeawayUsed === o._id || !K.takeawayUsed && x).map((K) => ({
|
|
162
|
-
_id: p._id,
|
|
163
|
-
combinationKey: K.combinationKey
|
|
164
|
-
}));
|
|
165
|
-
s = [...s, ...ae];
|
|
166
|
-
}
|
|
167
|
-
return s;
|
|
168
|
-
}, [])
|
|
169
|
-
}))), {
|
|
170
|
-
filter: r,
|
|
171
|
-
searchKey: c
|
|
172
|
-
} = fe(), a = h(() => g.value.filter((o) => r([o.name, F(o.price, !1)]))), d = M;
|
|
173
|
-
ne(() => a.value.length, (o) => {
|
|
174
|
-
d("update:count", o);
|
|
175
|
-
}, {
|
|
176
|
-
immediate: !0
|
|
177
|
-
});
|
|
178
|
-
const {
|
|
179
|
-
t: e
|
|
180
|
-
} = X(), u = h(() => [{
|
|
181
|
-
accessorKey: "name",
|
|
182
|
-
header: () => e("menu.takeaway.table.columns.name"),
|
|
183
|
-
enableSorting: !1,
|
|
184
|
-
size: 700
|
|
185
|
-
}, {
|
|
186
|
-
accessorKey: "price",
|
|
187
|
-
header: () => e("menu.takeaway.table.columns.price", {
|
|
188
|
-
symbol: w.value.symbol
|
|
189
|
-
}),
|
|
190
|
-
enableSorting: !1,
|
|
191
|
-
size: 200,
|
|
192
|
-
meta: {
|
|
193
|
-
textAlign: "right"
|
|
194
|
-
},
|
|
195
|
-
cell: (o) => {
|
|
196
|
-
const s = o.getValue();
|
|
197
|
-
return F(s, !1);
|
|
198
|
-
}
|
|
199
|
-
}, {
|
|
200
|
-
accessorKey: "usedBy",
|
|
201
|
-
header: () => e("menu.takeaway.table.columns.products"),
|
|
202
|
-
enableSorting: !1,
|
|
203
|
-
size: 200,
|
|
204
|
-
cell: (o) => {
|
|
205
|
-
const s = o.getValue(), p = q(l.categorizedItems, s).flatMap((x) => x.items).length ?? 0;
|
|
206
|
-
return e("menu.takeaway.table.items_linked", {
|
|
207
|
-
count: p
|
|
208
|
-
});
|
|
209
|
-
}
|
|
210
|
-
}, {
|
|
211
|
-
id: "action",
|
|
212
|
-
size: 52,
|
|
213
|
-
meta: {
|
|
214
|
-
cellClass: "pl-16",
|
|
215
|
-
headerContentClass: "-mx-16"
|
|
216
|
-
},
|
|
217
|
-
cell: (o) => R("div", {
|
|
218
|
-
class: "flex justify-end items-center"
|
|
219
|
-
}, [f.value.delete ? R(de.FmButton, {
|
|
220
|
-
prependIcon: "delete",
|
|
221
|
-
variant: A.Tertiary,
|
|
222
|
-
textColor: "neutral-gray-400",
|
|
223
|
-
onClick: (s) => {
|
|
224
|
-
s.stopPropagation(), m.deleteTakeaway(o.row.original);
|
|
225
|
-
}
|
|
226
|
-
}) : null])
|
|
227
|
-
}]), U = ue(), b = h(() => U.breakpoints.value.xs);
|
|
228
|
-
return (o, s) => {
|
|
229
|
-
const p = S("fm-search"), x = S("fm-table"), B = S("fm-button");
|
|
230
|
-
return g.value.length ? (_(), C(O, {
|
|
231
|
-
key: 0
|
|
232
|
-
}, [b.value ? (_(), C(O, {
|
|
233
|
-
key: 1
|
|
234
|
-
}, [k("div", Ce, [V(p, {
|
|
235
|
-
class: "w-full",
|
|
236
|
-
autofocus: "",
|
|
237
|
-
modelValue: t(c),
|
|
238
|
-
"onUpdate:modelValue": s[2] || (s[2] = (n) => j(c) ? c.value = n : null),
|
|
239
|
-
placeholder: t(e)("menu.takeaway.table.search.placeholder")
|
|
240
|
-
}, null, 8, ["modelValue", "placeholder"])]), k("div", Ve, [(_(!0), C(O, null, ie(a.value, (n) => (_(), C("div", {
|
|
241
|
-
key: n._id,
|
|
242
|
-
class: D(["py-12 px-16", "flex space-x-8", "items-center"]),
|
|
243
|
-
onClick: () => {
|
|
244
|
-
f.value.edit && t(m).updateTakeaway(n);
|
|
245
|
-
}
|
|
246
|
-
}, [k("div", Me, [k("p", Ue, I(n.name), 1), k("p", Ee, I(`${t(q)(t(l).categorizedItems, n.usedBy).flatMap((E) => E.items).length ?? 0} items linked`), 1), k("p", Ke, " Price: " + I(w.value.symbol) + I(t(F)(n.price, !1)), 1)]), f.value.delete ? (_(), G(B, {
|
|
247
|
-
key: 0,
|
|
248
|
-
variant: t(A).Tertiary,
|
|
249
|
-
"text-color": "neutral-gray-400",
|
|
250
|
-
"prepend-icon": "delete",
|
|
251
|
-
onClick: Q(() => t(m).deleteTakeaway(n), ["stop"])
|
|
252
|
-
}, null, 8, ["variant", "onClick"])) : $("", !0)], 8, Te))), 128))])], 64)) : (_(), C("div", be, [k("div", he, [k("div", xe, [V(p, {
|
|
253
|
-
autofocus: "",
|
|
254
|
-
modelValue: t(c),
|
|
255
|
-
"onUpdate:modelValue": s[0] || (s[0] = (n) => j(c) ? c.value = n : null),
|
|
256
|
-
placeholder: t(e)("menu.takeaway.table.search.placeholder")
|
|
257
|
-
}, null, 8, ["modelValue", "placeholder"])])]), V(me, null, {
|
|
258
|
-
default: P(() => [V(x, {
|
|
259
|
-
"column-defs": u.value,
|
|
260
|
-
loading: t(y).checkMenuIsLoading(),
|
|
261
|
-
"page-size": a.value.length,
|
|
262
|
-
"row-data": a.value,
|
|
263
|
-
"search-value": t(c),
|
|
264
|
-
"shrink-at": !1,
|
|
265
|
-
class: "flex-1 overflow-hidden",
|
|
266
|
-
"hide-footer": "",
|
|
267
|
-
"pin-header-row": "",
|
|
268
|
-
onRowClick: s[1] || (s[1] = (n) => {
|
|
269
|
-
f.value.edit && t(m).updateTakeaway(n.original);
|
|
270
|
-
})
|
|
271
|
-
}, null, 8, ["column-defs", "loading", "page-size", "row-data", "search-value"])]),
|
|
272
|
-
_: 1
|
|
273
|
-
})]))], 64)) : (_(), C("div", Ie, [V(t(re), {
|
|
274
|
-
subtitle: t(e)("menu.takeaway.empty.subtitle"),
|
|
275
|
-
title: t(e)("menu.takeaway.empty.title")
|
|
276
|
-
}, {
|
|
277
|
-
action: P(() => [f.value.create ? (_(), G(t(pe), {
|
|
278
|
-
key: 0,
|
|
279
|
-
"bind-to-variant": i.value,
|
|
280
|
-
action: "add",
|
|
281
|
-
"apply-product": "",
|
|
282
|
-
"onUpdate:takeaway": s[3] || (s[3] = (n) => t(y).updateMenu({
|
|
283
|
-
module: t(z.F_MENU_MODULE_V4_KEY).enum.takeaway,
|
|
284
|
-
operation: t(N.F_OPERATION_TYPE).create,
|
|
285
|
-
data: n,
|
|
286
|
-
link: t(ee)(n.usedBy || [])
|
|
287
|
-
}, n.name))
|
|
288
|
-
}, {
|
|
289
|
-
default: P(({
|
|
290
|
-
trigger: n
|
|
291
|
-
}) => [V(B, {
|
|
292
|
-
"prepend-icon": "add",
|
|
293
|
-
label: t(e)("menu.takeaway.empty.action"),
|
|
294
|
-
onClick: Q(n, ["stop"])
|
|
295
|
-
}, null, 8, ["label", "onClick"])]),
|
|
296
|
-
_: 1
|
|
297
|
-
}, 8, ["bind-to-variant"])) : $("", !0)]),
|
|
298
|
-
_: 1
|
|
299
|
-
}, 8, ["subtitle", "title"])]));
|
|
300
|
-
};
|
|
301
|
-
}
|
|
302
|
-
});
|
|
303
|
-
export {
|
|
304
|
-
Re as _
|
|
305
|
-
};
|