@feedmepos/mf-menu 0.32.66 → 0.32.68
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-CLFnWEv5.js → App-C_wzmb6P.js} +8 -8
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-CVlLKIvY.js → ApplyProduct.vue_vue_type_script_setup_true_lang-DJ-Yyl-y.js} +3 -3
- package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-CifmNu2u.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-DHTKM2Rk.js} +3 -3
- package/dist/{Catalog-BC3jLsPs.js → Catalog-Brdx3vwv.js} +6 -6
- package/dist/{Category-Bmwlq6nL.js → Category-Clan4Fwx.js} +22 -22
- package/dist/{Category-DMkvEdKc.js → Category-Kr7zDqaR.js} +8 -8
- package/dist/{CookingGuide-qy0LTm-D.js → CookingGuide-D8K1T0Wk.js} +5 -5
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-JiZiBeEH.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-DDAz6tmK.js} +1 -1
- package/dist/{Group-BPwmyZZp.js → Group-DkEH1W-l.js} +1 -1
- package/dist/{Group-D0Xv55no.js → Group-DyOCkcWz.js} +8 -8
- package/dist/{Group.vue_vue_type_script_setup_true_lang-D8nAO7h0.js → Group.vue_vue_type_script_setup_true_lang-CMvaZV7r.js} +20 -20
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CjEnnnQj.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D0dxZUHg.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-DMzqbxts.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-BCKgLffo.js} +7 -7
- package/dist/{Ingredient-BqaX4rlX.js → Ingredient-ele1Xkxq.js} +4 -4
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-sKJRkcCq.js → InventoryBinding.vue_vue_type_script_setup_true_lang-Cd5pXFbz.js} +2 -2
- package/dist/{LinkProductSideSheet-C6R0KLzF.js → LinkProductSideSheet-BpRT3ZyK.js} +4 -4
- package/dist/{MenuSetting-BedGpIZE.js → MenuSetting-DlRwd2RR.js} +7 -7
- package/dist/{OrderPacing-C7i8LWNy.js → OrderPacing-bAAj3I9B.js} +5 -5
- package/dist/{PrintRoute-CIuQv57y.js → PrintRoute-DeiR2NvQ.js} +5 -5
- package/dist/{Product-DRcYcCoB.js → Product-VcKOCdv9.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-C1jETJyk.js → Product.vue_vue_type_script_setup_true_lang-Bz5Rr6Oo.js} +14 -14
- package/dist/{ProductInternalTools-BKZ3Z3o8.js → ProductInternalTools-BnMKscNT.js} +7 -7
- package/dist/{Products-BOz9WFoU.js → Products-DFyBBzjn.js} +59 -59
- package/dist/Publish-hJOLwfsE.js +1565 -0
- package/dist/{Recipe-DNFAMy0c.js → Recipe-DFeTDvuk.js} +5 -5
- package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-B8P0xkMT.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-BX-hs3g7.js} +1 -1
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-DxpvosGG.js → RuleView.vue_vue_type_script_setup_true_lang-D7TpK5fD.js} +636 -636
- package/dist/{Scheduler-DFc4fCB9.js → Scheduler-CacvSBtZ.js} +78 -72
- package/dist/{ServingSequence-DjIUv0-b.js → ServingSequence-Dg0-u71Y.js} +3 -3
- package/dist/{Setting-DnTMpvqy.js → Setting-BBVrC3ML.js} +5 -5
- package/dist/{Subcategory-B3HfpruL.js → Subcategory-RhioZvac.js} +6 -6
- package/dist/{Takeaway-CCJDLPwz.js → Takeaway-C_Yocsm8.js} +4 -4
- package/dist/{Takeaway-DYoO1ATi.js → Takeaway-DyIJ2dAt.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-B8RUqBww.js → Takeaway.vue_vue_type_script_setup_true_lang-iIM7kEEk.js} +5 -5
- package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-D1gjP1Yk.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-CyhcbrTQ.js} +1 -1
- package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-Cixm7NMC.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-DQelKdQf.js} +2 -2
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BN7PkI9l.js +5865 -0
- package/dist/{Unit-DTswZFER.js → Unit-bu2YYoAr.js} +2 -2
- package/dist/{Variant-hqEsHL1u.js → Variant-D4HSAKaA.js} +3 -3
- package/dist/{_id_-CGEwOGPW.js → _id_-TNWD2yHG.js} +10 -10
- package/dist/{app-Bl1kXtqs.js → app-BwvStTgj.js} +1 -1
- package/dist/{app-Da1XriaA.js → app-D8hc9pO3.js} +32 -32
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/components/feature/publish.d.ts +2 -2
- package/dist/apps/mf-menu/src/helper/overrideForm.d.ts +17 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-BvskCt3K.js → linked-status-D3zBIZmV.js} +3 -3
- package/dist/assets/{menu-export-Do1iuDTl.js → menu-export-DKP_2V0H.js} +3 -3
- package/dist/assets/{override-menu-6Z3zlZar.js → override-menu-C_m4eXlt.js} +3 -3
- package/dist/assets/{validate-menu-B5dZxzSc.js → validate-menu-DF53PcFi.js} +2 -2
- package/dist/{catalog-UnHoIEYX.js → catalog-sB0wljWA.js} +1 -1
- package/dist/{catalogSetting-DNkG_w_s.js → catalogSetting-DnRDwn_7.js} +1 -1
- package/dist/{currency-DI_9wOEf.js → currency-CJMH7GL8.js} +1 -1
- package/dist/{dayjs.min-B1nGfqJL.js → dayjs.min-BPMljI-8.js} +2 -2
- package/dist/{discardConfirm-C65bh13g.js → discardConfirm-DVc_4r3v.js} +1 -1
- package/dist/{index-CJoXwoxN.js → index-BuyOfZQk.js} +5 -5
- package/dist/{index-Uv8d5BUd.js → index-C3-Fsu9G.js} +1 -1
- package/dist/{index-rj_-6l1M.js → index-D02xcA-8.js} +6 -6
- package/dist/{index.vue_vue_type_script_setup_true_lang-BRtju05_.js → index.vue_vue_type_script_setup_true_lang-kdkFlB2a.js} +4563 -4563
- package/dist/{item-Cl-8exj2.js → item-4qAhCGxc.js} +2956 -2943
- package/dist/{jszip.min-5yjRwCyp.js → jszip.min-C7GdBMKl.js} +167 -167
- package/dist/{linkProducts-CimT6rLW.js → linkProducts-Xj0pwao2.js} +4 -4
- package/dist/{memberPricing-CZwLOzMR.js → memberPricing-DrnYW8GA.js} +1 -1
- package/dist/{menu-C4c62Xvw.js → menu-AX8l-jmp.js} +1 -1
- package/dist/{menuV2-BxVmtfZ3.js → menuV2-DyTvIOlq.js} +33 -33
- package/dist/mf-menu.css +1 -1
- package/dist/{order_pacing-C0bYumFm.js → order_pacing-0tZW1wH_.js} +5 -5
- package/dist/{priceTier-C08rb71L.js → priceTier-C3S0kEKr.js} +1 -1
- package/dist/{rules-DEd-yB4f.js → rules-BrCS7pk7.js} +3 -3
- package/dist/scheduler-Dgi_Z-de.js +519 -0
- package/dist/{toExcel-Ca_J-aHT.js → toExcel-BmRSTeYh.js} +2 -2
- package/dist/{unit-CDMOEbey.js → unit-fWmA4WXX.js} +3 -3
- package/package.json +3 -3
- package/dist/Publish-COiwVeUS.js +0 -1532
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CNs2BM3V.js +0 -5861
- package/dist/scheduler-B_-N10Gf.js +0 -515
|
@@ -1,515 +0,0 @@
|
|
|
1
|
-
import { defineComponent as re, computed as N, resolveComponent as v, createElementBlock as d, openBlock as u, createVNode as t, createCommentVNode as V, unref as n, toDisplayString as O, createElementVNode as _, withCtx as p, Fragment as R, renderList as I, createBlock as q, ref as B, Transition as de, createTextVNode as fe } from "vue";
|
|
2
|
-
import { u as ye, l as _e } from "./discardConfirm-C65bh13g.js";
|
|
3
|
-
import { d as w, z as $, u as he, F as ge, A as L, g as se, h as ie, P as ce } from "./index.vue_vue_type_script_setup_true_lang-BRtju05_.js";
|
|
4
|
-
import { useI18n as me } from "@feedmepos/mf-common";
|
|
5
|
-
import { components as Ve } from "@feedmepos/ui-library";
|
|
6
|
-
import { _ as ke } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
|
|
7
|
-
import { _ as ue } from "./RuleView.vue_vue_type_script_setup_true_lang-DxpvosGG.js";
|
|
8
|
-
import { u as Fe } from "./menu-C4c62Xvw.js";
|
|
9
|
-
import { L as be } from "./LinkProductSideSheet-C6R0KLzF.js";
|
|
10
|
-
const xe = { class: "space-y-8" }, Ce = {
|
|
11
|
-
key: 0,
|
|
12
|
-
class: "space-y-16"
|
|
13
|
-
}, Se = { key: 0 }, we = {
|
|
14
|
-
key: 1,
|
|
15
|
-
class: "flex items-center"
|
|
16
|
-
}, Pe = { class: "flex flex-row items-center gap-8" }, Ee = { class: "flex flex-1 flex-wrap flex-row items-center gap-4" }, Ue = { key: 0 }, Te = { class: "w-[120px]" }, De = "code", $e = /* @__PURE__ */ re({
|
|
17
|
-
__name: "FilterForm",
|
|
18
|
-
props: {
|
|
19
|
-
modelValue: {}
|
|
20
|
-
},
|
|
21
|
-
emits: ["update:modelValue"],
|
|
22
|
-
setup(g, { emit: J }) {
|
|
23
|
-
const f = g, e = J, { categories: W } = Fe(), X = N(() => W.value.map((s) => s.id === null ? { label: s.name, value: "" } : {
|
|
24
|
-
label: s.name,
|
|
25
|
-
value: s.id
|
|
26
|
-
})), Z = (s) => {
|
|
27
|
-
s ? e("update:modelValue", []) : e("update:modelValue", void 0);
|
|
28
|
-
}, { t: m } = me(), ee = [
|
|
29
|
-
{ label: m("menu.scheduler.dialog.sections.filter.types.code"), value: "code" },
|
|
30
|
-
{ label: m("menu.scheduler.dialog.sections.filter.types.category"), value: "category" }
|
|
31
|
-
], le = () => {
|
|
32
|
-
e("update:modelValue", [...f.modelValue || [], { type: De, value: [""] }]);
|
|
33
|
-
}, x = (s) => {
|
|
34
|
-
const r = w(f.modelValue || []);
|
|
35
|
-
r.splice(s, 1), e("update:modelValue", r);
|
|
36
|
-
}, Y = (s, r) => {
|
|
37
|
-
const c = w(f.modelValue || []);
|
|
38
|
-
c[s].type = r, r === "category" ? c[s].value = [] : c[s].value = [""], e("update:modelValue", c);
|
|
39
|
-
}, a = (s) => {
|
|
40
|
-
const r = w(f.modelValue || []);
|
|
41
|
-
r[s].value.push(""), e("update:modelValue", r);
|
|
42
|
-
}, P = (s, r) => {
|
|
43
|
-
const c = w(f.modelValue || []);
|
|
44
|
-
c[s].value.splice(r, 1), e("update:modelValue", c);
|
|
45
|
-
}, te = (s, r) => {
|
|
46
|
-
const c = w(f.modelValue || []);
|
|
47
|
-
c[s].value = r, e("update:modelValue", c);
|
|
48
|
-
}, M = (s, r, c) => {
|
|
49
|
-
const E = w(f.modelValue || []);
|
|
50
|
-
E[s].value[r] = c, e("update:modelValue", E);
|
|
51
|
-
};
|
|
52
|
-
return (s, r) => {
|
|
53
|
-
var z, G;
|
|
54
|
-
const c = v("FmSwitch"), E = v("FmIcon"), ae = v("FmTooltip"), K = v("FmSelect"), U = v("FmButton"), j = v("FmTextField");
|
|
55
|
-
return u(), d("div", xe, [
|
|
56
|
-
t(c, {
|
|
57
|
-
"model-value": !!f.modelValue,
|
|
58
|
-
value: "autoLink",
|
|
59
|
-
label: n(m)("menu.scheduler.dialog.sections.autolink.label"),
|
|
60
|
-
sublabel: n(m)("menu.scheduler.dialog.sections.autolink.sublabel"),
|
|
61
|
-
"label-placement": "right",
|
|
62
|
-
"onUpdate:modelValue": Z
|
|
63
|
-
}, null, 8, ["model-value", "label", "sublabel"]),
|
|
64
|
-
f.modelValue ? (u(), d("div", Ce, [
|
|
65
|
-
((z = f.modelValue) == null ? void 0 : z.length) === 0 ? (u(), d("div", Se, O(n(m)("menu.scheduler.dialog.sections.autolink.all_items")), 1)) : V("", !0),
|
|
66
|
-
((G = f.modelValue) == null ? void 0 : G.length) > 0 ? (u(), d("div", we, [
|
|
67
|
-
_("div", null, O(n(m)("menu.scheduler.dialog.sections.autolink.filter_message")), 1),
|
|
68
|
-
t(ae, {
|
|
69
|
-
content: n(m)("menu.scheduler.dialog.sections.autolink.tooltip"),
|
|
70
|
-
variant: "plain",
|
|
71
|
-
"z-index": 999
|
|
72
|
-
}, {
|
|
73
|
-
default: p(() => [
|
|
74
|
-
t(E, {
|
|
75
|
-
name: "help",
|
|
76
|
-
outline: "",
|
|
77
|
-
class: "ml-4"
|
|
78
|
-
})
|
|
79
|
-
]),
|
|
80
|
-
_: 1
|
|
81
|
-
}, 8, ["content"])
|
|
82
|
-
])) : V("", !0),
|
|
83
|
-
(u(!0), d(R, null, I(f.modelValue || [], (T, k) => (u(), d("div", { key: k }, [
|
|
84
|
-
_("div", Pe, [
|
|
85
|
-
_("div", Ee, [
|
|
86
|
-
t(K, {
|
|
87
|
-
"model-value": T.type,
|
|
88
|
-
items: ee,
|
|
89
|
-
"onUpdate:modelValue": (F) => Y(k, F)
|
|
90
|
-
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
91
|
-
_("div", null, O(n(m)("menu.scheduler.dialog.sections.filter.matches")), 1),
|
|
92
|
-
T.type === "category" ? (u(), q(K, {
|
|
93
|
-
key: 0,
|
|
94
|
-
"model-value": T.value,
|
|
95
|
-
"onUpdate:modelValue": (F) => te(k, F),
|
|
96
|
-
items: X.value || [],
|
|
97
|
-
multiselect: "",
|
|
98
|
-
placeholder: n(m)("menu.scheduler.dialog.sections.filter.placeholder.category")
|
|
99
|
-
}, null, 8, ["model-value", "onUpdate:modelValue", "items", "placeholder"])) : (u(), d(R, { key: 1 }, [
|
|
100
|
-
(u(!0), d(R, null, I(T.value, (F, C) => (u(), d("div", {
|
|
101
|
-
class: "flex items-center gap-4",
|
|
102
|
-
key: C
|
|
103
|
-
}, [
|
|
104
|
-
C > 0 ? (u(), d("div", Ue, O(n(m)("menu.scheduler.dialog.sections.filter.or")), 1)) : V("", !0),
|
|
105
|
-
_("div", Te, [
|
|
106
|
-
t(j, {
|
|
107
|
-
"model-value": F,
|
|
108
|
-
"onUpdate:modelValue": (H) => M(k, C, H)
|
|
109
|
-
}, {
|
|
110
|
-
append: p(() => [
|
|
111
|
-
T.value.length > 1 ? (u(), q(U, {
|
|
112
|
-
key: 0,
|
|
113
|
-
icon: "close",
|
|
114
|
-
onClick: (H) => P(k, C),
|
|
115
|
-
variant: "tertiary"
|
|
116
|
-
}, null, 8, ["onClick"])) : V("", !0)
|
|
117
|
-
]),
|
|
118
|
-
_: 2
|
|
119
|
-
}, 1032, ["model-value", "onUpdate:modelValue"])
|
|
120
|
-
])
|
|
121
|
-
]))), 128)),
|
|
122
|
-
t(U, {
|
|
123
|
-
icon: "add",
|
|
124
|
-
onClick: (F) => a(k),
|
|
125
|
-
variant: "tertiary"
|
|
126
|
-
}, null, 8, ["onClick"])
|
|
127
|
-
], 64))
|
|
128
|
-
]),
|
|
129
|
-
t(U, {
|
|
130
|
-
variant: "secondary",
|
|
131
|
-
icon: "delete",
|
|
132
|
-
onClick: (F) => x(k)
|
|
133
|
-
}, null, 8, ["onClick"])
|
|
134
|
-
])
|
|
135
|
-
]))), 128)),
|
|
136
|
-
t(U, {
|
|
137
|
-
variant: "secondary",
|
|
138
|
-
label: n(m)("menu.scheduler.dialog.sections.filter.add"),
|
|
139
|
-
onClick: le
|
|
140
|
-
}, null, 8, ["label"])
|
|
141
|
-
])) : V("", !0)
|
|
142
|
-
]);
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
}), Oe = {
|
|
146
|
-
key: 0,
|
|
147
|
-
class: "pl-32"
|
|
148
|
-
}, Re = { class: "flex flex-wrap gap-8" }, Ae = {
|
|
149
|
-
key: 0,
|
|
150
|
-
class: "pl-32 flex flex-col items-start gap-16"
|
|
151
|
-
}, Ne = { class: "w-full" }, Ie = {
|
|
152
|
-
key: 0,
|
|
153
|
-
class: "mt-8"
|
|
154
|
-
}, Me = { class: "text-red-500 text-sm" }, ze = { class: "bg-fm-color-neutral-gray-100 px-16 py-8 border-b border-b-gray-200" }, Be = { class: "px-16 py-8 flex-1" }, Le = { class: "px-16 py-8" }, qe = { class: "flex gap-8 items-center justify-start" }, Ze = /* @__PURE__ */ re({
|
|
155
|
-
__name: "SchedulerDialog",
|
|
156
|
-
props: {
|
|
157
|
-
categorizedItems: {
|
|
158
|
-
type: Array,
|
|
159
|
-
required: !0
|
|
160
|
-
},
|
|
161
|
-
canApplyItems: {
|
|
162
|
-
type: Boolean,
|
|
163
|
-
default: !0
|
|
164
|
-
}
|
|
165
|
-
},
|
|
166
|
-
emits: ["onComplete"],
|
|
167
|
-
setup(g, { expose: J, emit: f }) {
|
|
168
|
-
const { t: e } = me(), W = g;
|
|
169
|
-
J({
|
|
170
|
-
show: te,
|
|
171
|
-
hide: M
|
|
172
|
-
});
|
|
173
|
-
const X = {
|
|
174
|
-
[$.enum.monday]: e("menu.scheduler.days.monday"),
|
|
175
|
-
[$.enum.tuesday]: e("menu.scheduler.days.tuesday"),
|
|
176
|
-
[$.enum.wednesday]: e("menu.scheduler.days.wednesday"),
|
|
177
|
-
[$.enum.thursday]: e("menu.scheduler.days.thursday"),
|
|
178
|
-
[$.enum.friday]: e("menu.scheduler.days.friday"),
|
|
179
|
-
[$.enum.saturday]: e("menu.scheduler.days.saturday"),
|
|
180
|
-
[$.enum.sunday]: e("menu.scheduler.days.sunday")
|
|
181
|
-
}, Z = f;
|
|
182
|
-
function m() {
|
|
183
|
-
return {
|
|
184
|
-
_id: "",
|
|
185
|
-
name: "",
|
|
186
|
-
items: [],
|
|
187
|
-
groups: [],
|
|
188
|
-
repeat: L.enum.daily,
|
|
189
|
-
timePeriod: [],
|
|
190
|
-
weekDay: []
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
const ee = he(), le = N(() => ee.version === ge.enum.v4), x = B("all"), Y = B(m()), a = B(m()), P = B(!1);
|
|
194
|
-
function te(i) {
|
|
195
|
-
a.value = i ? w(i) : m(), Y.value = w(a.value), x.value = a.value.timePeriod.length === 0 ? "all" : "custom", P.value = !0;
|
|
196
|
-
}
|
|
197
|
-
function M() {
|
|
198
|
-
P.value = !1;
|
|
199
|
-
}
|
|
200
|
-
function s() {
|
|
201
|
-
a.value.timePeriod.push({
|
|
202
|
-
start: "00:00",
|
|
203
|
-
end: "23:59"
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
function r(i) {
|
|
207
|
-
a.value.timePeriod.splice(i, 1);
|
|
208
|
-
}
|
|
209
|
-
function c(i) {
|
|
210
|
-
const [l, y] = i.split(":").map(Number);
|
|
211
|
-
return l * 60 + y;
|
|
212
|
-
}
|
|
213
|
-
function E(i, l) {
|
|
214
|
-
const y = c(i), h = c(l);
|
|
215
|
-
return y <= h ? [{ start: y, end: h }] : [
|
|
216
|
-
{ start: y, end: 24 * 60 - 1 },
|
|
217
|
-
// Until end of day (23:59)
|
|
218
|
-
{ start: 0, end: h }
|
|
219
|
-
// From start of next day
|
|
220
|
-
];
|
|
221
|
-
}
|
|
222
|
-
function ae(i, l) {
|
|
223
|
-
return Math.max(i.start, l.start) <= Math.min(i.end, l.end);
|
|
224
|
-
}
|
|
225
|
-
function K(i) {
|
|
226
|
-
if (i.length <= 1) return null;
|
|
227
|
-
for (let l = 0; l < i.length; l++)
|
|
228
|
-
for (let y = l + 1; y < i.length; y++) {
|
|
229
|
-
const h = i[l], D = i[y], oe = E(h.start, h.end), Q = E(D.start, D.end);
|
|
230
|
-
for (const S of oe)
|
|
231
|
-
for (const ne of Q)
|
|
232
|
-
if (ae(S, ne))
|
|
233
|
-
return e("menu.scheduler.dialog.sections.period.overlap");
|
|
234
|
-
}
|
|
235
|
-
return null;
|
|
236
|
-
}
|
|
237
|
-
const U = B();
|
|
238
|
-
function j() {
|
|
239
|
-
return {
|
|
240
|
-
...a.value,
|
|
241
|
-
timePeriod: x.value === "all" ? [] : a.value.timePeriod,
|
|
242
|
-
weekDay: a.value.repeat === L.enum.daily ? [] : a.value.weekDay
|
|
243
|
-
};
|
|
244
|
-
}
|
|
245
|
-
async function z() {
|
|
246
|
-
C.value || (Z("onComplete", j()), M());
|
|
247
|
-
}
|
|
248
|
-
const G = N(() => a.value._id ? e("menu.scheduler.dialog.update.title") : e("menu.scheduler.dialog.add.title")), T = N(() => a.value._id ? e("menu.scheduler.dialog.update.action") : e("menu.scheduler.dialog.add.action"));
|
|
249
|
-
function k(i) {
|
|
250
|
-
a.value.items = a.value.items.filter((l) => l._id !== i);
|
|
251
|
-
}
|
|
252
|
-
const F = N(() => W.categorizedItems.reduce((i, l) => {
|
|
253
|
-
const y = l.items.filter(
|
|
254
|
-
(h) => a.value.items.some(({ _id: D }) => h._id === D)
|
|
255
|
-
);
|
|
256
|
-
return y.length && i.push({ ...l, items: y }), i;
|
|
257
|
-
}, [])), C = N(() => x.value === "custom" && a.value.timePeriod.length > 0 ? K(a.value.timePeriod) : null), H = ye(
|
|
258
|
-
() => !_e.isEqual(Y.value, j()),
|
|
259
|
-
() => {
|
|
260
|
-
P.value = !1;
|
|
261
|
-
}
|
|
262
|
-
);
|
|
263
|
-
return (i, l) => {
|
|
264
|
-
const y = v("FmTextField"), h = v("FmRadio"), D = v("FmRadioGroup"), oe = v("FmCheckbox"), Q = v("FmTimePicker"), S = v("FmButton"), ne = v("FmSpacer"), pe = v("FmForm"), ve = v("FmSideSheet");
|
|
265
|
-
return u(), q(ve, {
|
|
266
|
-
modelValue: P.value,
|
|
267
|
-
"onUpdate:modelValue": l[7] || (l[7] = (o) => P.value = o),
|
|
268
|
-
header: G.value,
|
|
269
|
-
"max-width": 560,
|
|
270
|
-
"is-container": n(Ve).FmForm,
|
|
271
|
-
"is-container-props": {
|
|
272
|
-
onValidationSuccess: z,
|
|
273
|
-
blameFormChildOnValidationFailed: !0,
|
|
274
|
-
class: "flex flex-col h-full"
|
|
275
|
-
},
|
|
276
|
-
"onOn:clickedAway": n(H)
|
|
277
|
-
}, {
|
|
278
|
-
"side-sheet-footer": p(() => [
|
|
279
|
-
_("div", qe, [
|
|
280
|
-
t(S, {
|
|
281
|
-
label: T.value,
|
|
282
|
-
size: "lg",
|
|
283
|
-
variant: "primary",
|
|
284
|
-
onClick: l[6] || (l[6] = () => {
|
|
285
|
-
var o;
|
|
286
|
-
return (o = U.value) == null ? void 0 : o.validateInputs();
|
|
287
|
-
})
|
|
288
|
-
}, null, 8, ["label"]),
|
|
289
|
-
t(S, {
|
|
290
|
-
label: n(e)("menu.scheduler.dialog.actions.cancel"),
|
|
291
|
-
size: "lg",
|
|
292
|
-
variant: "tertiary",
|
|
293
|
-
onClick: M
|
|
294
|
-
}, null, 8, ["label"])
|
|
295
|
-
])
|
|
296
|
-
]),
|
|
297
|
-
default: p(() => [
|
|
298
|
-
t(pe, {
|
|
299
|
-
ref_key: "formRef",
|
|
300
|
-
ref: U,
|
|
301
|
-
class: "flex flex-col flex-1 overflow-hidden",
|
|
302
|
-
onValidationSuccess: z
|
|
303
|
-
}, {
|
|
304
|
-
default: p(() => [
|
|
305
|
-
t(ue, {
|
|
306
|
-
title: n(e)("menu.scheduler.dialog.sections.detail.title")
|
|
307
|
-
}, {
|
|
308
|
-
default: p(() => [
|
|
309
|
-
t(y, {
|
|
310
|
-
autofocus: "",
|
|
311
|
-
modelValue: a.value.name,
|
|
312
|
-
"onUpdate:modelValue": l[0] || (l[0] = (o) => a.value.name = o),
|
|
313
|
-
rules: [(o) => !!o || n(e)("menu.scheduler.dialog.sections.detail.name.required")],
|
|
314
|
-
label: n(e)("menu.scheduler.dialog.sections.detail.name.label"),
|
|
315
|
-
placeholder: n(e)("menu.scheduler.dialog.sections.detail.name.placeholder")
|
|
316
|
-
}, null, 8, ["modelValue", "rules", "label", "placeholder"])
|
|
317
|
-
]),
|
|
318
|
-
_: 1
|
|
319
|
-
}, 8, ["title"]),
|
|
320
|
-
t(ue, {
|
|
321
|
-
title: n(e)("menu.scheduler.dialog.sections.availability.title")
|
|
322
|
-
}, {
|
|
323
|
-
default: p(() => [
|
|
324
|
-
_("div", null, [
|
|
325
|
-
t(D, {
|
|
326
|
-
modelValue: a.value.repeat,
|
|
327
|
-
"onUpdate:modelValue": l[1] || (l[1] = (o) => a.value.repeat = o)
|
|
328
|
-
}, {
|
|
329
|
-
default: p(() => [
|
|
330
|
-
t(h, {
|
|
331
|
-
label: n(e)("menu.scheduler.dialog.sections.availability.daily"),
|
|
332
|
-
value: n(L).enum.daily
|
|
333
|
-
}, null, 8, ["label", "value"]),
|
|
334
|
-
t(h, {
|
|
335
|
-
label: n(e)("menu.scheduler.dialog.sections.availability.weekly"),
|
|
336
|
-
value: n(L).enum.weekly
|
|
337
|
-
}, null, 8, ["label", "value"])
|
|
338
|
-
]),
|
|
339
|
-
_: 1
|
|
340
|
-
}, 8, ["modelValue"]),
|
|
341
|
-
t(de, { name: "expand" }, {
|
|
342
|
-
default: p(() => [
|
|
343
|
-
a.value.repeat === n(L).enum.weekly ? (u(), d("div", Oe, [
|
|
344
|
-
_("div", Re, [
|
|
345
|
-
(u(), d(R, null, I(X, (o, b) => t(oe, {
|
|
346
|
-
key: b,
|
|
347
|
-
modelValue: a.value.weekDay,
|
|
348
|
-
"onUpdate:modelValue": l[2] || (l[2] = (A) => a.value.weekDay = A),
|
|
349
|
-
label: o,
|
|
350
|
-
value: b
|
|
351
|
-
}, null, 8, ["modelValue", "label", "value"])), 64))
|
|
352
|
-
])
|
|
353
|
-
])) : V("", !0)
|
|
354
|
-
]),
|
|
355
|
-
_: 1
|
|
356
|
-
})
|
|
357
|
-
]),
|
|
358
|
-
_("div", null, [
|
|
359
|
-
t(D, {
|
|
360
|
-
label: n(e)("menu.scheduler.dialog.sections.period.title"),
|
|
361
|
-
modelValue: x.value,
|
|
362
|
-
"onUpdate:modelValue": l[3] || (l[3] = (o) => x.value = o)
|
|
363
|
-
}, {
|
|
364
|
-
default: p(() => [
|
|
365
|
-
t(h, {
|
|
366
|
-
label: n(e)("menu.scheduler.dialog.sections.period.all_day"),
|
|
367
|
-
value: "all"
|
|
368
|
-
}, null, 8, ["label"]),
|
|
369
|
-
t(h, {
|
|
370
|
-
label: n(e)("menu.scheduler.dialog.sections.period.custom"),
|
|
371
|
-
value: "custom"
|
|
372
|
-
}, null, 8, ["label"])
|
|
373
|
-
]),
|
|
374
|
-
_: 1
|
|
375
|
-
}, 8, ["label", "modelValue"]),
|
|
376
|
-
t(de, { name: "expand" }, {
|
|
377
|
-
default: p(() => [
|
|
378
|
-
x.value === "custom" ? (u(), d("div", Ae, [
|
|
379
|
-
_("div", Ne, [
|
|
380
|
-
(u(!0), d(R, null, I(a.value.timePeriod, (o, b) => (u(), d("div", {
|
|
381
|
-
key: b,
|
|
382
|
-
class: "w-full flex gap-8 items-center"
|
|
383
|
-
}, [
|
|
384
|
-
t(Q, {
|
|
385
|
-
modelValue: o.start,
|
|
386
|
-
"onUpdate:modelValue": (A) => o.start = A,
|
|
387
|
-
class: "flex-1"
|
|
388
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
389
|
-
l[8] || (l[8] = fe(" - ")),
|
|
390
|
-
t(Q, {
|
|
391
|
-
modelValue: o.end,
|
|
392
|
-
"onUpdate:modelValue": (A) => o.end = A,
|
|
393
|
-
class: "flex-1"
|
|
394
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
395
|
-
t(S, {
|
|
396
|
-
icon: "close",
|
|
397
|
-
variant: "tertiary",
|
|
398
|
-
onClick: (A) => r(b)
|
|
399
|
-
}, null, 8, ["onClick"])
|
|
400
|
-
]))), 128)),
|
|
401
|
-
C.value ? (u(), d("div", Ie, [
|
|
402
|
-
_("div", Me, O(C.value), 1)
|
|
403
|
-
])) : V("", !0)
|
|
404
|
-
]),
|
|
405
|
-
t(S, {
|
|
406
|
-
icon: "add",
|
|
407
|
-
label: n(e)("menu.scheduler.dialog.sections.period.add"),
|
|
408
|
-
variant: "secondary",
|
|
409
|
-
"text-color": "primary",
|
|
410
|
-
"border-color": "primary",
|
|
411
|
-
onClick: s
|
|
412
|
-
}, null, 8, ["label"])
|
|
413
|
-
])) : V("", !0)
|
|
414
|
-
]),
|
|
415
|
-
_: 1
|
|
416
|
-
})
|
|
417
|
-
]),
|
|
418
|
-
le.value ? (u(), q(ke, {
|
|
419
|
-
key: 0,
|
|
420
|
-
label: n(e)("menu.scheduler.dialog.sections.autolink.title")
|
|
421
|
-
}, {
|
|
422
|
-
default: p(() => [
|
|
423
|
-
t($e, {
|
|
424
|
-
modelValue: a.value.filters,
|
|
425
|
-
"onUpdate:modelValue": l[4] || (l[4] = (o) => a.value.filters = o)
|
|
426
|
-
}, null, 8, ["modelValue"])
|
|
427
|
-
]),
|
|
428
|
-
_: 1
|
|
429
|
-
}, 8, ["label"])) : V("", !0)
|
|
430
|
-
]),
|
|
431
|
-
_: 1
|
|
432
|
-
}, 8, ["title"]),
|
|
433
|
-
g.canApplyItems ? (u(), q(ue, {
|
|
434
|
-
key: 0,
|
|
435
|
-
title: n(e)("menu.scheduler.dialog.sections.products.title")
|
|
436
|
-
}, {
|
|
437
|
-
"append-title": p(() => [
|
|
438
|
-
t(ne),
|
|
439
|
-
t(be, {
|
|
440
|
-
"categorized-items": g.categorizedItems,
|
|
441
|
-
"initial-value": a.value.items,
|
|
442
|
-
onSubmit: l[5] || (l[5] = ({ items: o }) => a.value.items = o)
|
|
443
|
-
}, {
|
|
444
|
-
default: p(({ trigger: o }) => [
|
|
445
|
-
t(S, {
|
|
446
|
-
icon: "link",
|
|
447
|
-
label: n(e)("menu.scheduler.dialog.sections.products.link"),
|
|
448
|
-
variant: "secondary",
|
|
449
|
-
"text-color": "primary",
|
|
450
|
-
"border-color": "primary",
|
|
451
|
-
onClick: o
|
|
452
|
-
}, null, 8, ["label", "onClick"])
|
|
453
|
-
]),
|
|
454
|
-
_: 1
|
|
455
|
-
}, 8, ["categorized-items", "initial-value"])
|
|
456
|
-
]),
|
|
457
|
-
default: p(() => [
|
|
458
|
-
(u(!0), d(R, null, I(F.value, (o) => (u(), d("div", {
|
|
459
|
-
key: o.id
|
|
460
|
-
}, [
|
|
461
|
-
_("div", ze, O(o.name), 1),
|
|
462
|
-
(u(!0), d(R, null, I(o.items, (b) => (u(), d("div", {
|
|
463
|
-
key: b._id,
|
|
464
|
-
class: "flex border-b border-b-gray-100 items-center"
|
|
465
|
-
}, [
|
|
466
|
-
_("div", Be, O(b.name), 1),
|
|
467
|
-
_("div", Le, [
|
|
468
|
-
t(S, {
|
|
469
|
-
icon: "delete",
|
|
470
|
-
variant: "tertiary",
|
|
471
|
-
"text-color": "neutral-gray-400",
|
|
472
|
-
onClick: () => k(b._id)
|
|
473
|
-
}, null, 8, ["onClick"])
|
|
474
|
-
])
|
|
475
|
-
]))), 128))
|
|
476
|
-
]))), 128))
|
|
477
|
-
]),
|
|
478
|
-
_: 1
|
|
479
|
-
}, 8, ["title"])) : V("", !0)
|
|
480
|
-
]),
|
|
481
|
-
_: 1
|
|
482
|
-
}, 512)
|
|
483
|
-
]),
|
|
484
|
-
_: 1
|
|
485
|
-
}, 8, ["modelValue", "header", "is-container", "is-container-props", "onOn:clickedAway"]);
|
|
486
|
-
};
|
|
487
|
-
}
|
|
488
|
-
});
|
|
489
|
-
function el(g) {
|
|
490
|
-
return {
|
|
491
|
-
module: ie.enum.scheduler,
|
|
492
|
-
operation: se.F_OPERATION_TYPE.create,
|
|
493
|
-
data: ce.parse(g)
|
|
494
|
-
};
|
|
495
|
-
}
|
|
496
|
-
function ll(g) {
|
|
497
|
-
return {
|
|
498
|
-
module: ie.enum.scheduler,
|
|
499
|
-
operation: se.F_OPERATION_TYPE.update,
|
|
500
|
-
data: ce.parse(g)
|
|
501
|
-
};
|
|
502
|
-
}
|
|
503
|
-
function tl(g) {
|
|
504
|
-
return {
|
|
505
|
-
module: ie.enum.scheduler,
|
|
506
|
-
operation: se.F_OPERATION_TYPE.delete,
|
|
507
|
-
data: g._id
|
|
508
|
-
};
|
|
509
|
-
}
|
|
510
|
-
export {
|
|
511
|
-
Ze as _,
|
|
512
|
-
el as c,
|
|
513
|
-
tl as d,
|
|
514
|
-
ll as u
|
|
515
|
-
};
|