@feedmepos/mf-menu 0.31.27-beta.1 → 0.31.28-beta.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-CMS69WcY.js → App-Ca6EfbM0.js} +6 -6
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-DZRZ5OcA.js → ApplyProduct.vue_vue_type_script_setup_true_lang-TjghlPjP.js} +2 -2
- package/dist/{Catalog-ffSd6aqq.js → Catalog-DcqEymK_.js} +5 -5
- package/dist/{Category-BC-CGCF7.js → Category-DqhkqPn5.js} +5 -5
- package/dist/{Category-BTO8pYAh.js → Category-DrV8RFw0.js} +4 -4
- package/dist/{CookingGuide-BTLEbMz8.js → CookingGuide-D5324ACr.js} +3 -3
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-Bp8YSvTf.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-C1eTlRgY.js} +1 -1
- package/dist/{Group-WTI2IBHI.js → Group-DPr6FkUR.js} +3 -3
- package/dist/{Group-BJGPdjU2.js → Group-DdKAKDX5.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-CLip0CIE.js → Group.vue_vue_type_script_setup_true_lang-DHUn8wtV.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D5piFax4.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CcL8xIIp.js} +3 -3
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CjplMJNQ.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CxG33Zfx.js} +5039 -5010
- package/dist/{Ingredient-UvO3motH.js → Ingredient-CPMYSTHx.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-DYq7cCQf.js → InventoryBinding.vue_vue_type_script_setup_true_lang-B8edmN9o.js} +2 -2
- package/dist/{LinkProductSideSheet-BPtYQ4XV.js → LinkProductSideSheet-CMv-Cl8o.js} +1 -1
- package/dist/{MenuSetting-CwAJjD_p.js → MenuSetting-DTlVQhH-.js} +4 -4
- package/dist/{PrintRoute-Cm3goDUl.js → PrintRoute-DZ_go_P2.js} +3 -3
- package/dist/{Product-HjuxsN8O.js → Product-C_fICCS0.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-ClUvPn7_.js → Product.vue_vue_type_script_setup_true_lang-B5_7D3Uf.js} +11 -11
- package/dist/{ProductInternalTools-C9bIXdAk.js → ProductInternalTools-BB1Fx1SL.js} +5 -5
- package/dist/{Products-DAPARzpG.js → Products-BSP9BtpB.js} +10 -10
- package/dist/{Publish-DzdbzfwH.js → Publish-DfLwMpi0.js} +3 -3
- package/dist/{Recipe-D0-nUdYC.js → Recipe-ckiwtBvy.js} +4 -4
- package/dist/{Scheduler-9Kd5PmoF.js → Scheduler-GoFfvH3g.js} +3 -3
- package/dist/{ServingSequence-zo5R8QIh.js → ServingSequence-DJRYP2Wa.js} +3 -3
- package/dist/{Setting-CtzteiOM.js → Setting-BaVXtHHw.js} +4 -4
- package/dist/{Subcategory-BmwDMU5H.js → Subcategory-D1ellIJv.js} +4 -4
- package/dist/{Takeaway-CyMa3NY6.js → Takeaway-4mhVvPZX.js} +1 -1
- package/dist/{Takeaway-Bkqn5jTE.js → Takeaway-D4kbxdXq.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-CKk2hvBT.js → Takeaway.vue_vue_type_script_setup_true_lang-DmyujVsL.js} +5 -5
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-COaXurQ1.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DlXbq9hl.js} +12 -12
- package/dist/{Unit-Dt8DDjdA.js → Unit-PRuwV5nD.js} +2 -2
- package/dist/{Variant-QOUHDtkr.js → Variant-DiA_U-c8.js} +3 -3
- package/dist/{_id_-jopb3ztm.js → _id_-CX0cWun0.js} +9 -9
- package/dist/{app-DwbO44_c.js → app-BbWAbjQS.js} +75 -75
- package/dist/{app-yS8K7_sg.js → app-DhM14nc-.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +4 -0
- package/dist/apps/mf-menu/src/helper/menu.d.ts +1 -0
- package/dist/assets/{linked-status-C1SMYqxL.js → linked-status-D9s16EpF.js} +2 -2
- package/dist/assets/{override-menu-BHUTkarJ.js → override-menu-DJ-HMb-L.js} +2 -2
- package/dist/assets/{validate-menu-BM2IsXBA.js → validate-menu-B4g9NVpd.js} +2 -2
- package/dist/{catalog-Dpdf5ZHD.js → catalog-DICGX26b.js} +1 -1
- package/dist/{catalogSetting-D7UWrxID.js → catalogSetting-DNi3sae4.js} +1 -1
- package/dist/{category-3hnf2fFI.js → category-BVdpkvEY.js} +1 -1
- package/dist/{currency-B2_-inGF.js → currency-D6GTzLnp.js} +1 -1
- package/dist/{dayjs.min-C1jj4j8U.js → dayjs.min-D1QpwzEr.js} +1 -1
- package/dist/{index-CimxGuue.js → index-7J2wjscT.js} +1 -1
- package/dist/{index-Ck1ONRAO.js → index-CiHIyK0U.js} +3 -3
- package/dist/{index-BIZibBLC.js → index-DnV90eV6.js} +2 -2
- package/dist/{item-CyutZ1gl.js → item-D-55zj01.js} +14 -14
- package/dist/{jszip.min-AyQNVJNb.js → jszip.min-Dc1Q_2By.js} +353 -353
- package/dist/{menu-DU1ye-GJ.js → menu-DCNRkoVE.js} +1 -1
- package/dist/{menu-VVCkGXjV.js → menu-qiZp8pU6.js} +5210 -5190
- package/dist/{priceTier-eKtUcuDB.js → priceTier-DH9-fsOO.js} +1 -1
- package/dist/scheduler-v8esE-NR.js +515 -0
- package/dist/{subcategory-CYoskXOE.js → subcategory-vXszdIfw.js} +51 -51
- package/dist/{toExcel-DrBSnbwg.js → toExcel-CXJmxvpO.js} +2 -2
- package/dist/{unit-DDfHpHJM.js → unit-Fgtp7mfX.js} +1 -1
- package/package.json +2 -2
- package/dist/scheduler-BMPmtUvL.js +0 -473
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as d, ref as g, watch as _, resolveComponent as S, createBlock as T, openBlock as f, unref as y, computed as h } from "vue";
|
|
2
2
|
import { useI18n as m } from "@feedmepos/mf-common";
|
|
3
3
|
import { useDialogChild as w, useDialog as x, useSnackbar as C } from "@feedmepos/ui-library";
|
|
4
|
-
import { u as k, D as M } from "./menu-
|
|
4
|
+
import { u as k, D as M } from "./menu-qiZp8pU6.js";
|
|
5
5
|
const v = /* @__PURE__ */ d({
|
|
6
6
|
__name: "AddPriceGroupDialog",
|
|
7
7
|
setup(s) {
|
|
@@ -0,0 +1,515 @@
|
|
|
1
|
+
import { defineComponent as ie, computed as Y, resolveComponent as _, createElementBlock as d, openBlock as u, createVNode as t, createCommentVNode as F, unref as n, toDisplayString as A, createElementVNode as h, withCtx as v, Fragment as N, renderList as M, createBlock as I, ref as H, Transition as se, createTextVNode as me } from "vue";
|
|
2
|
+
import { H as S, G as r, u as pe, I as ve, J as ue } from "./menu-qiZp8pU6.js";
|
|
3
|
+
import { useI18n as de } from "@feedmepos/mf-common";
|
|
4
|
+
import { components as _e } from "@feedmepos/ui-library";
|
|
5
|
+
import { _ as fe } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
|
|
6
|
+
import { _ as ne } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
|
|
7
|
+
import { u as ye } from "./discardConfirm-BHni0LNu.js";
|
|
8
|
+
import { u as he } from "./menu-DCNRkoVE.js";
|
|
9
|
+
import { L as ge } from "./LinkProductSideSheet-CMv-Cl8o.js";
|
|
10
|
+
const Ve = { class: "space-y-8" }, Fe = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "space-y-16"
|
|
13
|
+
}, ke = { key: 0 }, be = {
|
|
14
|
+
key: 1,
|
|
15
|
+
class: "flex items-center"
|
|
16
|
+
}, Ee = { class: "flex flex-row items-center gap-8" }, Ce = { class: "flex flex-1 flex-wrap flex-row items-center gap-4" }, Ue = { key: 0 }, xe = { class: "w-[120px]" }, Se = "code", De = /* @__PURE__ */ ie({
|
|
17
|
+
__name: "FilterForm",
|
|
18
|
+
props: {
|
|
19
|
+
modelValue: {}
|
|
20
|
+
},
|
|
21
|
+
emits: ["update:modelValue"],
|
|
22
|
+
setup(V, { emit: j }) {
|
|
23
|
+
const f = V, e = j, { categories: J } = he(), W = Y(() => J.value.map((s) => s.id === null ? { label: s.name, value: "" } : {
|
|
24
|
+
label: s.name,
|
|
25
|
+
value: s.id
|
|
26
|
+
})), X = (s) => {
|
|
27
|
+
s ? e("update:modelValue", []) : e("update:modelValue", void 0);
|
|
28
|
+
}, { t: p } = de(), Z = [
|
|
29
|
+
{ label: p("menu.scheduler.dialog.sections.filter.types.code"), value: "code" },
|
|
30
|
+
{ label: p("menu.scheduler.dialog.sections.filter.types.category"), value: "category" }
|
|
31
|
+
], ee = () => {
|
|
32
|
+
e("update:modelValue", [...f.modelValue || [], { type: Se, value: [""] }]);
|
|
33
|
+
}, C = (s) => {
|
|
34
|
+
const c = S(f.modelValue || []);
|
|
35
|
+
c.splice(s, 1), e("update:modelValue", c);
|
|
36
|
+
}, z = (s, c) => {
|
|
37
|
+
const m = S(f.modelValue || []);
|
|
38
|
+
m[s].type = c, c === "category" ? m[s].value = [] : m[s].value = [""], e("update:modelValue", m);
|
|
39
|
+
}, a = (s) => {
|
|
40
|
+
const c = S(f.modelValue || []);
|
|
41
|
+
c[s].value.push(""), e("update:modelValue", c);
|
|
42
|
+
}, D = (s, c) => {
|
|
43
|
+
const m = S(f.modelValue || []);
|
|
44
|
+
m[s].value.splice(c, 1), e("update:modelValue", m);
|
|
45
|
+
}, le = (s, c) => {
|
|
46
|
+
const m = S(f.modelValue || []);
|
|
47
|
+
m[s].value = c, e("update:modelValue", m);
|
|
48
|
+
}, O = (s, c, m) => {
|
|
49
|
+
const w = S(f.modelValue || []);
|
|
50
|
+
w[s].value[c] = m, e("update:modelValue", w);
|
|
51
|
+
};
|
|
52
|
+
return (s, c) => {
|
|
53
|
+
var $, K;
|
|
54
|
+
const m = _("FmSwitch"), w = _("FmIcon"), te = _("FmTooltip"), B = _("FmSelect"), P = _("FmButton"), q = _("FmTextField");
|
|
55
|
+
return u(), d("div", Ve, [
|
|
56
|
+
t(m, {
|
|
57
|
+
"model-value": !!f.modelValue,
|
|
58
|
+
value: "autoLink",
|
|
59
|
+
label: n(p)("menu.scheduler.dialog.sections.autolink.label"),
|
|
60
|
+
sublabel: n(p)("menu.scheduler.dialog.sections.autolink.sublabel"),
|
|
61
|
+
"label-placement": "right",
|
|
62
|
+
"onUpdate:modelValue": X
|
|
63
|
+
}, null, 8, ["model-value", "label", "sublabel"]),
|
|
64
|
+
f.modelValue ? (u(), d("div", Fe, [
|
|
65
|
+
(($ = f.modelValue) == null ? void 0 : $.length) === 0 ? (u(), d("div", ke, A(n(p)("menu.scheduler.dialog.sections.autolink.all_items")), 1)) : F("", !0),
|
|
66
|
+
((K = f.modelValue) == null ? void 0 : K.length) > 0 ? (u(), d("div", be, [
|
|
67
|
+
h("div", null, A(n(p)("menu.scheduler.dialog.sections.autolink.filter_message")), 1),
|
|
68
|
+
t(te, {
|
|
69
|
+
content: n(p)("menu.scheduler.dialog.sections.autolink.tooltip"),
|
|
70
|
+
variant: "plain",
|
|
71
|
+
"z-index": 999
|
|
72
|
+
}, {
|
|
73
|
+
default: v(() => [
|
|
74
|
+
t(w, {
|
|
75
|
+
name: "help",
|
|
76
|
+
outline: "",
|
|
77
|
+
class: "ml-4"
|
|
78
|
+
})
|
|
79
|
+
]),
|
|
80
|
+
_: 1
|
|
81
|
+
}, 8, ["content"])
|
|
82
|
+
])) : F("", !0),
|
|
83
|
+
(u(!0), d(N, null, M(f.modelValue || [], (T, k) => (u(), d("div", { key: k }, [
|
|
84
|
+
h("div", Ee, [
|
|
85
|
+
h("div", Ce, [
|
|
86
|
+
t(B, {
|
|
87
|
+
"model-value": T.type,
|
|
88
|
+
items: Z,
|
|
89
|
+
"onUpdate:modelValue": (b) => z(k, b)
|
|
90
|
+
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
91
|
+
h("div", null, A(n(p)("menu.scheduler.dialog.sections.filter.matches")), 1),
|
|
92
|
+
T.type === "category" ? (u(), I(B, {
|
|
93
|
+
key: 0,
|
|
94
|
+
"model-value": T.value,
|
|
95
|
+
"onUpdate:modelValue": (b) => le(k, b),
|
|
96
|
+
items: W.value || [],
|
|
97
|
+
multiselect: "",
|
|
98
|
+
placeholder: n(p)("menu.scheduler.dialog.sections.filter.placeholder.category")
|
|
99
|
+
}, null, 8, ["model-value", "onUpdate:modelValue", "items", "placeholder"])) : (u(), d(N, { key: 1 }, [
|
|
100
|
+
(u(!0), d(N, null, M(T.value, (b, U) => (u(), d("div", {
|
|
101
|
+
class: "flex items-center gap-4",
|
|
102
|
+
key: U
|
|
103
|
+
}, [
|
|
104
|
+
U > 0 ? (u(), d("div", Ue, A(n(p)("menu.scheduler.dialog.sections.filter.or")), 1)) : F("", !0),
|
|
105
|
+
h("div", xe, [
|
|
106
|
+
t(q, {
|
|
107
|
+
"model-value": b,
|
|
108
|
+
"onUpdate:modelValue": (Q) => O(k, U, Q)
|
|
109
|
+
}, {
|
|
110
|
+
append: v(() => [
|
|
111
|
+
T.value.length > 1 ? (u(), I(P, {
|
|
112
|
+
key: 0,
|
|
113
|
+
icon: "close",
|
|
114
|
+
onClick: (Q) => D(k, U),
|
|
115
|
+
variant: "tertiary"
|
|
116
|
+
}, null, 8, ["onClick"])) : F("", !0)
|
|
117
|
+
]),
|
|
118
|
+
_: 2
|
|
119
|
+
}, 1032, ["model-value", "onUpdate:modelValue"])
|
|
120
|
+
])
|
|
121
|
+
]))), 128)),
|
|
122
|
+
t(P, {
|
|
123
|
+
icon: "add",
|
|
124
|
+
onClick: (b) => a(k),
|
|
125
|
+
variant: "tertiary"
|
|
126
|
+
}, null, 8, ["onClick"])
|
|
127
|
+
], 64))
|
|
128
|
+
]),
|
|
129
|
+
t(P, {
|
|
130
|
+
variant: "secondary",
|
|
131
|
+
icon: "delete",
|
|
132
|
+
onClick: (b) => C(k)
|
|
133
|
+
}, null, 8, ["onClick"])
|
|
134
|
+
])
|
|
135
|
+
]))), 128)),
|
|
136
|
+
t(P, {
|
|
137
|
+
variant: "secondary",
|
|
138
|
+
label: n(p)("menu.scheduler.dialog.sections.filter.add"),
|
|
139
|
+
onClick: ee
|
|
140
|
+
}, null, 8, ["label"])
|
|
141
|
+
])) : F("", !0)
|
|
142
|
+
]);
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
}), we = {
|
|
146
|
+
key: 0,
|
|
147
|
+
class: "pl-32"
|
|
148
|
+
}, Pe = { class: "flex flex-wrap gap-8" }, Te = {
|
|
149
|
+
key: 0,
|
|
150
|
+
class: "pl-32 flex flex-col items-start gap-16"
|
|
151
|
+
}, Le = { class: "w-full" }, Ae = {
|
|
152
|
+
key: 0,
|
|
153
|
+
class: "mt-8"
|
|
154
|
+
}, Ne = { class: "text-red-500 text-sm" }, Re = { class: "bg-fm-color-neutral-gray-100 px-16 py-8 border-b border-b-gray-200" }, Ye = { class: "px-16 py-8 flex-1" }, Me = { class: "px-16 py-8" }, Oe = { class: "flex gap-8 items-center justify-start" }, je = /* @__PURE__ */ ie({
|
|
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(V, { expose: j, emit: f }) {
|
|
168
|
+
const { t: e } = de(), J = V;
|
|
169
|
+
j({
|
|
170
|
+
show: le,
|
|
171
|
+
hide: O
|
|
172
|
+
});
|
|
173
|
+
const W = {
|
|
174
|
+
[r.F_SCHEDULE_DAY.enum.monday]: e("menu.scheduler.days.monday"),
|
|
175
|
+
[r.F_SCHEDULE_DAY.enum.tuesday]: e("menu.scheduler.days.tuesday"),
|
|
176
|
+
[r.F_SCHEDULE_DAY.enum.wednesday]: e("menu.scheduler.days.wednesday"),
|
|
177
|
+
[r.F_SCHEDULE_DAY.enum.thursday]: e("menu.scheduler.days.thursday"),
|
|
178
|
+
[r.F_SCHEDULE_DAY.enum.friday]: e("menu.scheduler.days.friday"),
|
|
179
|
+
[r.F_SCHEDULE_DAY.enum.saturday]: e("menu.scheduler.days.saturday"),
|
|
180
|
+
[r.F_SCHEDULE_DAY.enum.sunday]: e("menu.scheduler.days.sunday")
|
|
181
|
+
}, X = f;
|
|
182
|
+
function p() {
|
|
183
|
+
return {
|
|
184
|
+
_id: "",
|
|
185
|
+
name: "",
|
|
186
|
+
items: [],
|
|
187
|
+
groups: [],
|
|
188
|
+
repeat: r.F_SCHEDULE_FREQUENCY.enum.daily,
|
|
189
|
+
timePeriod: [],
|
|
190
|
+
weekDay: []
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
const Z = pe(), ee = Y(() => Z.version === r.F_MENU_VERSION.enum.v4), C = H("all"), z = H(p()), a = H(p()), D = H(!1);
|
|
194
|
+
function le(i) {
|
|
195
|
+
a.value = i ? S(i) : p(), z.value = S(a.value), C.value = a.value.timePeriod.length === 0 ? "all" : "custom", D.value = !0;
|
|
196
|
+
}
|
|
197
|
+
function O() {
|
|
198
|
+
D.value = !1;
|
|
199
|
+
}
|
|
200
|
+
function s() {
|
|
201
|
+
a.value.timePeriod.push({
|
|
202
|
+
start: "00:00",
|
|
203
|
+
end: "23:59"
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
function c(i) {
|
|
207
|
+
a.value.timePeriod.splice(i, 1);
|
|
208
|
+
}
|
|
209
|
+
function m(i) {
|
|
210
|
+
const [l, y] = i.split(":").map(Number);
|
|
211
|
+
return l * 60 + y;
|
|
212
|
+
}
|
|
213
|
+
function w(i, l) {
|
|
214
|
+
const y = m(i), g = m(l);
|
|
215
|
+
return y <= g ? [{ start: y, end: g }] : [
|
|
216
|
+
{ start: y, end: 24 * 60 - 1 },
|
|
217
|
+
// Until end of day (23:59)
|
|
218
|
+
{ start: 0, end: g }
|
|
219
|
+
// From start of next day
|
|
220
|
+
];
|
|
221
|
+
}
|
|
222
|
+
function te(i, l) {
|
|
223
|
+
return Math.max(i.start, l.start) <= Math.min(i.end, l.end);
|
|
224
|
+
}
|
|
225
|
+
function B(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 g = i[l], L = i[y], ae = w(g.start, g.end), G = w(L.start, L.end);
|
|
230
|
+
for (const x of ae)
|
|
231
|
+
for (const oe of G)
|
|
232
|
+
if (te(x, oe))
|
|
233
|
+
return e("menu.scheduler.dialog.sections.period.overlap");
|
|
234
|
+
}
|
|
235
|
+
return null;
|
|
236
|
+
}
|
|
237
|
+
const P = H();
|
|
238
|
+
function q() {
|
|
239
|
+
return {
|
|
240
|
+
...a.value,
|
|
241
|
+
timePeriod: C.value === "all" ? [] : a.value.timePeriod,
|
|
242
|
+
weekDay: a.value.repeat === r.F_SCHEDULE_FREQUENCY.enum.daily ? [] : a.value.weekDay
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
async function $() {
|
|
246
|
+
U.value || (X("onComplete", q()), O());
|
|
247
|
+
}
|
|
248
|
+
const K = Y(() => a.value._id ? e("menu.scheduler.dialog.update.title") : e("menu.scheduler.dialog.add.title")), T = Y(() => 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 b = Y(() => J.categorizedItems.reduce((i, l) => {
|
|
253
|
+
const y = l.items.filter(
|
|
254
|
+
(g) => a.value.items.some(({ _id: L }) => g._id === L)
|
|
255
|
+
);
|
|
256
|
+
return y.length && i.push({ ...l, items: y }), i;
|
|
257
|
+
}, [])), U = Y(() => C.value === "custom" && a.value.timePeriod.length > 0 ? B(a.value.timePeriod) : null), Q = ye(
|
|
258
|
+
() => !ve.isEqual(z.value, q()),
|
|
259
|
+
() => {
|
|
260
|
+
D.value = !1;
|
|
261
|
+
}
|
|
262
|
+
);
|
|
263
|
+
return (i, l) => {
|
|
264
|
+
const y = _("FmTextField"), g = _("FmRadio"), L = _("FmRadioGroup"), ae = _("FmCheckbox"), G = _("FmTimePicker"), x = _("FmButton"), oe = _("FmSpacer"), re = _("FmForm"), ce = _("FmSideSheet");
|
|
265
|
+
return u(), I(ce, {
|
|
266
|
+
modelValue: D.value,
|
|
267
|
+
"onUpdate:modelValue": l[7] || (l[7] = (o) => D.value = o),
|
|
268
|
+
header: K.value,
|
|
269
|
+
"max-width": 560,
|
|
270
|
+
"is-container": n(_e).FmForm,
|
|
271
|
+
"is-container-props": {
|
|
272
|
+
onValidationSuccess: $,
|
|
273
|
+
blameFormChildOnValidationFailed: !0,
|
|
274
|
+
class: "flex flex-col h-full"
|
|
275
|
+
},
|
|
276
|
+
"onOn:clickedAway": n(Q)
|
|
277
|
+
}, {
|
|
278
|
+
"side-sheet-footer": v(() => [
|
|
279
|
+
h("div", Oe, [
|
|
280
|
+
t(x, {
|
|
281
|
+
label: T.value,
|
|
282
|
+
size: "lg",
|
|
283
|
+
variant: "primary",
|
|
284
|
+
onClick: l[6] || (l[6] = () => {
|
|
285
|
+
var o;
|
|
286
|
+
return (o = P.value) == null ? void 0 : o.validateInputs();
|
|
287
|
+
})
|
|
288
|
+
}, null, 8, ["label"]),
|
|
289
|
+
t(x, {
|
|
290
|
+
label: n(e)("menu.scheduler.dialog.actions.cancel"),
|
|
291
|
+
size: "lg",
|
|
292
|
+
variant: "tertiary",
|
|
293
|
+
onClick: O
|
|
294
|
+
}, null, 8, ["label"])
|
|
295
|
+
])
|
|
296
|
+
]),
|
|
297
|
+
default: v(() => [
|
|
298
|
+
t(re, {
|
|
299
|
+
ref_key: "formRef",
|
|
300
|
+
ref: P,
|
|
301
|
+
class: "flex flex-col flex-1 overflow-hidden",
|
|
302
|
+
onValidationSuccess: $
|
|
303
|
+
}, {
|
|
304
|
+
default: v(() => [
|
|
305
|
+
t(ne, {
|
|
306
|
+
title: n(e)("menu.scheduler.dialog.sections.detail.title")
|
|
307
|
+
}, {
|
|
308
|
+
default: v(() => [
|
|
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(ne, {
|
|
321
|
+
title: n(e)("menu.scheduler.dialog.sections.availability.title")
|
|
322
|
+
}, {
|
|
323
|
+
default: v(() => [
|
|
324
|
+
h("div", null, [
|
|
325
|
+
t(L, {
|
|
326
|
+
modelValue: a.value.repeat,
|
|
327
|
+
"onUpdate:modelValue": l[1] || (l[1] = (o) => a.value.repeat = o)
|
|
328
|
+
}, {
|
|
329
|
+
default: v(() => [
|
|
330
|
+
t(g, {
|
|
331
|
+
label: n(e)("menu.scheduler.dialog.sections.availability.daily"),
|
|
332
|
+
value: n(r.F_SCHEDULE_FREQUENCY).enum.daily
|
|
333
|
+
}, null, 8, ["label", "value"]),
|
|
334
|
+
t(g, {
|
|
335
|
+
label: n(e)("menu.scheduler.dialog.sections.availability.weekly"),
|
|
336
|
+
value: n(r.F_SCHEDULE_FREQUENCY).enum.weekly
|
|
337
|
+
}, null, 8, ["label", "value"])
|
|
338
|
+
]),
|
|
339
|
+
_: 1
|
|
340
|
+
}, 8, ["modelValue"]),
|
|
341
|
+
t(se, { name: "expand" }, {
|
|
342
|
+
default: v(() => [
|
|
343
|
+
a.value.repeat === n(r.F_SCHEDULE_FREQUENCY).enum.weekly ? (u(), d("div", we, [
|
|
344
|
+
h("div", Pe, [
|
|
345
|
+
(u(), d(N, null, M(W, (o, E) => t(ae, {
|
|
346
|
+
key: E,
|
|
347
|
+
modelValue: a.value.weekDay,
|
|
348
|
+
"onUpdate:modelValue": l[2] || (l[2] = (R) => a.value.weekDay = R),
|
|
349
|
+
label: o,
|
|
350
|
+
value: E
|
|
351
|
+
}, null, 8, ["modelValue", "label", "value"])), 64))
|
|
352
|
+
])
|
|
353
|
+
])) : F("", !0)
|
|
354
|
+
]),
|
|
355
|
+
_: 1
|
|
356
|
+
})
|
|
357
|
+
]),
|
|
358
|
+
h("div", null, [
|
|
359
|
+
t(L, {
|
|
360
|
+
label: n(e)("menu.scheduler.dialog.sections.period.title"),
|
|
361
|
+
modelValue: C.value,
|
|
362
|
+
"onUpdate:modelValue": l[3] || (l[3] = (o) => C.value = o)
|
|
363
|
+
}, {
|
|
364
|
+
default: v(() => [
|
|
365
|
+
t(g, {
|
|
366
|
+
label: n(e)("menu.scheduler.dialog.sections.period.all_day"),
|
|
367
|
+
value: "all"
|
|
368
|
+
}, null, 8, ["label"]),
|
|
369
|
+
t(g, {
|
|
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(se, { name: "expand" }, {
|
|
377
|
+
default: v(() => [
|
|
378
|
+
C.value === "custom" ? (u(), d("div", Te, [
|
|
379
|
+
h("div", Le, [
|
|
380
|
+
(u(!0), d(N, null, M(a.value.timePeriod, (o, E) => (u(), d("div", {
|
|
381
|
+
key: E,
|
|
382
|
+
class: "w-full flex gap-8 items-center"
|
|
383
|
+
}, [
|
|
384
|
+
t(G, {
|
|
385
|
+
modelValue: o.start,
|
|
386
|
+
"onUpdate:modelValue": (R) => o.start = R,
|
|
387
|
+
class: "flex-1"
|
|
388
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
389
|
+
l[8] || (l[8] = me(" - ")),
|
|
390
|
+
t(G, {
|
|
391
|
+
modelValue: o.end,
|
|
392
|
+
"onUpdate:modelValue": (R) => o.end = R,
|
|
393
|
+
class: "flex-1"
|
|
394
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
395
|
+
t(x, {
|
|
396
|
+
icon: "close",
|
|
397
|
+
variant: "tertiary",
|
|
398
|
+
onClick: (R) => c(E)
|
|
399
|
+
}, null, 8, ["onClick"])
|
|
400
|
+
]))), 128)),
|
|
401
|
+
U.value ? (u(), d("div", Ae, [
|
|
402
|
+
h("div", Ne, A(U.value), 1)
|
|
403
|
+
])) : F("", !0)
|
|
404
|
+
]),
|
|
405
|
+
t(x, {
|
|
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
|
+
])) : F("", !0)
|
|
414
|
+
]),
|
|
415
|
+
_: 1
|
|
416
|
+
})
|
|
417
|
+
]),
|
|
418
|
+
ee.value ? (u(), I(fe, {
|
|
419
|
+
key: 0,
|
|
420
|
+
label: n(e)("menu.scheduler.dialog.sections.autolink.title")
|
|
421
|
+
}, {
|
|
422
|
+
default: v(() => [
|
|
423
|
+
t(De, {
|
|
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"])) : F("", !0)
|
|
430
|
+
]),
|
|
431
|
+
_: 1
|
|
432
|
+
}, 8, ["title"]),
|
|
433
|
+
V.canApplyItems ? (u(), I(ne, {
|
|
434
|
+
key: 0,
|
|
435
|
+
title: n(e)("menu.scheduler.dialog.sections.products.title")
|
|
436
|
+
}, {
|
|
437
|
+
"append-title": v(() => [
|
|
438
|
+
t(oe),
|
|
439
|
+
t(ge, {
|
|
440
|
+
"categorized-items": V.categorizedItems,
|
|
441
|
+
"initial-value": a.value.items,
|
|
442
|
+
onSubmit: l[5] || (l[5] = (o) => a.value.items = o)
|
|
443
|
+
}, {
|
|
444
|
+
default: v(({ trigger: o }) => [
|
|
445
|
+
t(x, {
|
|
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: v(() => [
|
|
458
|
+
(u(!0), d(N, null, M(b.value, (o) => (u(), d("div", {
|
|
459
|
+
key: o.id
|
|
460
|
+
}, [
|
|
461
|
+
h("div", Re, A(o.name), 1),
|
|
462
|
+
(u(!0), d(N, null, M(o.items, (E) => (u(), d("div", {
|
|
463
|
+
key: E._id,
|
|
464
|
+
class: "flex border-b border-b-gray-100 items-center"
|
|
465
|
+
}, [
|
|
466
|
+
h("div", Ye, A(E.name), 1),
|
|
467
|
+
h("div", Me, [
|
|
468
|
+
t(x, {
|
|
469
|
+
icon: "delete",
|
|
470
|
+
variant: "tertiary",
|
|
471
|
+
"text-color": "neutral-gray-400",
|
|
472
|
+
onClick: () => k(E._id)
|
|
473
|
+
}, null, 8, ["onClick"])
|
|
474
|
+
])
|
|
475
|
+
]))), 128))
|
|
476
|
+
]))), 128))
|
|
477
|
+
]),
|
|
478
|
+
_: 1
|
|
479
|
+
}, 8, ["title"])) : F("", !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 Je(V) {
|
|
490
|
+
return {
|
|
491
|
+
module: r.F_MENU_MODULE_V4_KEY.enum.scheduler,
|
|
492
|
+
operation: ue.F_OPERATION_TYPE.create,
|
|
493
|
+
data: r.FdoMenuV4Scheduler.parse(V)
|
|
494
|
+
};
|
|
495
|
+
}
|
|
496
|
+
function We(V) {
|
|
497
|
+
return {
|
|
498
|
+
module: r.F_MENU_MODULE_V4_KEY.enum.scheduler,
|
|
499
|
+
operation: ue.F_OPERATION_TYPE.update,
|
|
500
|
+
data: r.FdoMenuV4Scheduler.parse(V)
|
|
501
|
+
};
|
|
502
|
+
}
|
|
503
|
+
function Xe(V) {
|
|
504
|
+
return {
|
|
505
|
+
module: r.F_MENU_MODULE_V4_KEY.enum.scheduler,
|
|
506
|
+
operation: ue.F_OPERATION_TYPE.delete,
|
|
507
|
+
data: V._id
|
|
508
|
+
};
|
|
509
|
+
}
|
|
510
|
+
export {
|
|
511
|
+
je as _,
|
|
512
|
+
Je as c,
|
|
513
|
+
Xe as d,
|
|
514
|
+
We as u
|
|
515
|
+
};
|