@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
|
@@ -0,0 +1,519 @@
|
|
|
1
|
+
import { defineComponent as ce, computed as T, resolveComponent as p, createElementBlock as r, openBlock as u, createVNode as t, createCommentVNode as V, unref as a, toDisplayString as D, createElementVNode as y, withCtx as m, Fragment as $, renderList as I, createBlock as K, ref as Y, Transition as de, createTextVNode as _e } from "vue";
|
|
2
|
+
import { u as he, l as ge } from "./discardConfirm-DVc_4r3v.js";
|
|
3
|
+
import { d as w, z as U, u as Ve, F as ke, A as H, g as ie, h as re, P as me } from "./index.vue_vue_type_script_setup_true_lang-kdkFlB2a.js";
|
|
4
|
+
import { useI18n as pe, useAppLocale as Fe, prefersHour12 as be } from "@feedmepos/mf-common";
|
|
5
|
+
import { components as xe } from "@feedmepos/ui-library";
|
|
6
|
+
import { _ as Ce } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
|
|
7
|
+
import { _ as se } from "./RuleView.vue_vue_type_script_setup_true_lang-D7TpK5fD.js";
|
|
8
|
+
import { u as Se } from "./menu-AX8l-jmp.js";
|
|
9
|
+
import { L as we } from "./LinkProductSideSheet-BpRT3ZyK.js";
|
|
10
|
+
const Pe = { class: "space-y-8" }, Ee = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "space-y-16"
|
|
13
|
+
}, Ue = { key: 0 }, Te = {
|
|
14
|
+
key: 1,
|
|
15
|
+
class: "flex items-center"
|
|
16
|
+
}, De = { class: "flex flex-row items-center gap-8" }, $e = { class: "flex flex-1 flex-wrap flex-row items-center gap-4" }, Ae = { key: 0 }, Oe = { class: "w-[120px]" }, Re = "code", Ne = /* @__PURE__ */ ce({
|
|
17
|
+
__name: "FilterForm",
|
|
18
|
+
props: {
|
|
19
|
+
modelValue: {}
|
|
20
|
+
},
|
|
21
|
+
emits: ["update:modelValue"],
|
|
22
|
+
setup(g, { emit: X }) {
|
|
23
|
+
const v = g, e = X, { categories: M } = Se(), j = T(() => M.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: _ } = pe(), ee = [
|
|
29
|
+
{ label: _("menu.scheduler.dialog.sections.filter.types.code"), value: "code" },
|
|
30
|
+
{ label: _("menu.scheduler.dialog.sections.filter.types.category"), value: "category" }
|
|
31
|
+
], z = () => {
|
|
32
|
+
e("update:modelValue", [...v.modelValue || [], { type: Re, value: [""] }]);
|
|
33
|
+
}, le = (s) => {
|
|
34
|
+
const d = w(v.modelValue || []);
|
|
35
|
+
d.splice(s, 1), e("update:modelValue", d);
|
|
36
|
+
}, te = (s, d) => {
|
|
37
|
+
const c = w(v.modelValue || []);
|
|
38
|
+
c[s].type = d, d === "category" ? c[s].value = [] : c[s].value = [""], e("update:modelValue", c);
|
|
39
|
+
}, x = (s) => {
|
|
40
|
+
const d = w(v.modelValue || []);
|
|
41
|
+
d[s].value.push(""), e("update:modelValue", d);
|
|
42
|
+
}, G = (s, d) => {
|
|
43
|
+
const c = w(v.modelValue || []);
|
|
44
|
+
c[s].value.splice(d, 1), e("update:modelValue", c);
|
|
45
|
+
}, o = (s, d) => {
|
|
46
|
+
const c = w(v.modelValue || []);
|
|
47
|
+
c[s].value = d, e("update:modelValue", c);
|
|
48
|
+
}, P = (s, d, c) => {
|
|
49
|
+
const A = w(v.modelValue || []);
|
|
50
|
+
A[s].value[d] = c, e("update:modelValue", A);
|
|
51
|
+
};
|
|
52
|
+
return (s, d) => {
|
|
53
|
+
var L, q;
|
|
54
|
+
const c = p("FmSwitch"), A = p("FmIcon"), Q = p("FmTooltip"), B = p("FmSelect"), O = p("FmButton"), ae = p("FmTextField");
|
|
55
|
+
return u(), r("div", Pe, [
|
|
56
|
+
t(c, {
|
|
57
|
+
"model-value": !!v.modelValue,
|
|
58
|
+
value: "autoLink",
|
|
59
|
+
label: a(_)("menu.scheduler.dialog.sections.autolink.label"),
|
|
60
|
+
sublabel: a(_)("menu.scheduler.dialog.sections.autolink.sublabel"),
|
|
61
|
+
"label-placement": "right",
|
|
62
|
+
"onUpdate:modelValue": Z
|
|
63
|
+
}, null, 8, ["model-value", "label", "sublabel"]),
|
|
64
|
+
v.modelValue ? (u(), r("div", Ee, [
|
|
65
|
+
((L = v.modelValue) == null ? void 0 : L.length) === 0 ? (u(), r("div", Ue, D(a(_)("menu.scheduler.dialog.sections.autolink.all_items")), 1)) : V("", !0),
|
|
66
|
+
((q = v.modelValue) == null ? void 0 : q.length) > 0 ? (u(), r("div", Te, [
|
|
67
|
+
y("div", null, D(a(_)("menu.scheduler.dialog.sections.autolink.filter_message")), 1),
|
|
68
|
+
t(Q, {
|
|
69
|
+
content: a(_)("menu.scheduler.dialog.sections.autolink.tooltip"),
|
|
70
|
+
variant: "plain",
|
|
71
|
+
"z-index": 999
|
|
72
|
+
}, {
|
|
73
|
+
default: m(() => [
|
|
74
|
+
t(A, {
|
|
75
|
+
name: "help",
|
|
76
|
+
outline: "",
|
|
77
|
+
class: "ml-4"
|
|
78
|
+
})
|
|
79
|
+
]),
|
|
80
|
+
_: 1
|
|
81
|
+
}, 8, ["content"])
|
|
82
|
+
])) : V("", !0),
|
|
83
|
+
(u(!0), r($, null, I(v.modelValue || [], (C, k) => (u(), r("div", { key: k }, [
|
|
84
|
+
y("div", De, [
|
|
85
|
+
y("div", $e, [
|
|
86
|
+
t(B, {
|
|
87
|
+
"model-value": C.type,
|
|
88
|
+
items: ee,
|
|
89
|
+
"onUpdate:modelValue": (F) => te(k, F)
|
|
90
|
+
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
91
|
+
y("div", null, D(a(_)("menu.scheduler.dialog.sections.filter.matches")), 1),
|
|
92
|
+
C.type === "category" ? (u(), K(B, {
|
|
93
|
+
key: 0,
|
|
94
|
+
"model-value": C.value,
|
|
95
|
+
"onUpdate:modelValue": (F) => o(k, F),
|
|
96
|
+
items: j.value || [],
|
|
97
|
+
multiselect: "",
|
|
98
|
+
placeholder: a(_)("menu.scheduler.dialog.sections.filter.placeholder.category")
|
|
99
|
+
}, null, 8, ["model-value", "onUpdate:modelValue", "items", "placeholder"])) : (u(), r($, { key: 1 }, [
|
|
100
|
+
(u(!0), r($, null, I(C.value, (F, R) => (u(), r("div", {
|
|
101
|
+
class: "flex items-center gap-4",
|
|
102
|
+
key: R
|
|
103
|
+
}, [
|
|
104
|
+
R > 0 ? (u(), r("div", Ae, D(a(_)("menu.scheduler.dialog.sections.filter.or")), 1)) : V("", !0),
|
|
105
|
+
y("div", Oe, [
|
|
106
|
+
t(ae, {
|
|
107
|
+
"model-value": F,
|
|
108
|
+
"onUpdate:modelValue": (J) => P(k, R, J)
|
|
109
|
+
}, {
|
|
110
|
+
append: m(() => [
|
|
111
|
+
C.value.length > 1 ? (u(), K(O, {
|
|
112
|
+
key: 0,
|
|
113
|
+
icon: "close",
|
|
114
|
+
onClick: (J) => G(k, R),
|
|
115
|
+
variant: "tertiary"
|
|
116
|
+
}, null, 8, ["onClick"])) : V("", !0)
|
|
117
|
+
]),
|
|
118
|
+
_: 2
|
|
119
|
+
}, 1032, ["model-value", "onUpdate:modelValue"])
|
|
120
|
+
])
|
|
121
|
+
]))), 128)),
|
|
122
|
+
t(O, {
|
|
123
|
+
icon: "add",
|
|
124
|
+
onClick: (F) => x(k),
|
|
125
|
+
variant: "tertiary"
|
|
126
|
+
}, null, 8, ["onClick"])
|
|
127
|
+
], 64))
|
|
128
|
+
]),
|
|
129
|
+
t(O, {
|
|
130
|
+
variant: "secondary",
|
|
131
|
+
icon: "delete",
|
|
132
|
+
onClick: (F) => le(k)
|
|
133
|
+
}, null, 8, ["onClick"])
|
|
134
|
+
])
|
|
135
|
+
]))), 128)),
|
|
136
|
+
t(O, {
|
|
137
|
+
variant: "secondary",
|
|
138
|
+
label: a(_)("menu.scheduler.dialog.sections.filter.add"),
|
|
139
|
+
onClick: z
|
|
140
|
+
}, null, 8, ["label"])
|
|
141
|
+
])) : V("", !0)
|
|
142
|
+
]);
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
}), Ie = {
|
|
146
|
+
key: 0,
|
|
147
|
+
class: "pl-32"
|
|
148
|
+
}, Me = { class: "flex flex-wrap gap-8" }, ze = {
|
|
149
|
+
key: 0,
|
|
150
|
+
class: "pl-32 flex flex-col items-start gap-16"
|
|
151
|
+
}, Be = { class: "w-full" }, Le = {
|
|
152
|
+
key: 0,
|
|
153
|
+
class: "mt-8"
|
|
154
|
+
}, qe = { class: "text-red-500 text-sm" }, Ye = { class: "bg-fm-color-neutral-gray-100 px-16 py-8 border-b border-b-gray-200" }, He = { class: "px-16 py-8 flex-1" }, Ke = { class: "px-16 py-8" }, je = { class: "flex gap-8 items-center justify-start" }, al = /* @__PURE__ */ ce({
|
|
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: X, emit: v }) {
|
|
168
|
+
const { t: e } = pe(), { locale: M } = Fe(), j = T(() => be(M.value)), Z = g;
|
|
169
|
+
X({
|
|
170
|
+
show: s,
|
|
171
|
+
hide: d
|
|
172
|
+
});
|
|
173
|
+
const _ = {
|
|
174
|
+
[U.enum.monday]: e("menu.scheduler.days.monday"),
|
|
175
|
+
[U.enum.tuesday]: e("menu.scheduler.days.tuesday"),
|
|
176
|
+
[U.enum.wednesday]: e("menu.scheduler.days.wednesday"),
|
|
177
|
+
[U.enum.thursday]: e("menu.scheduler.days.thursday"),
|
|
178
|
+
[U.enum.friday]: e("menu.scheduler.days.friday"),
|
|
179
|
+
[U.enum.saturday]: e("menu.scheduler.days.saturday"),
|
|
180
|
+
[U.enum.sunday]: e("menu.scheduler.days.sunday")
|
|
181
|
+
}, ee = v;
|
|
182
|
+
function z() {
|
|
183
|
+
return {
|
|
184
|
+
_id: "",
|
|
185
|
+
name: "",
|
|
186
|
+
items: [],
|
|
187
|
+
groups: [],
|
|
188
|
+
repeat: H.enum.daily,
|
|
189
|
+
timePeriod: [],
|
|
190
|
+
weekDay: []
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
const le = Ve(), te = T(() => le.version === ke.enum.v4), x = Y("all"), G = Y(z()), o = Y(z()), P = Y(!1);
|
|
194
|
+
function s(i) {
|
|
195
|
+
o.value = i ? w(i) : z(), G.value = w(o.value), x.value = o.value.timePeriod.length === 0 ? "all" : "custom", P.value = !0;
|
|
196
|
+
}
|
|
197
|
+
function d() {
|
|
198
|
+
P.value = !1;
|
|
199
|
+
}
|
|
200
|
+
function c() {
|
|
201
|
+
o.value.timePeriod.push({
|
|
202
|
+
start: "00:00",
|
|
203
|
+
end: "23:59"
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
function A(i) {
|
|
207
|
+
o.value.timePeriod.splice(i, 1);
|
|
208
|
+
}
|
|
209
|
+
function Q(i) {
|
|
210
|
+
const [l, f] = i.split(":").map(Number);
|
|
211
|
+
return l * 60 + f;
|
|
212
|
+
}
|
|
213
|
+
function B(i, l) {
|
|
214
|
+
const f = Q(i), h = Q(l);
|
|
215
|
+
return f <= h ? [{ start: f, end: h }] : [
|
|
216
|
+
{ start: f, 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 O(i, l) {
|
|
223
|
+
return Math.max(i.start, l.start) <= Math.min(i.end, l.end);
|
|
224
|
+
}
|
|
225
|
+
function ae(i) {
|
|
226
|
+
if (i.length <= 1) return null;
|
|
227
|
+
for (let l = 0; l < i.length; l++)
|
|
228
|
+
for (let f = l + 1; f < i.length; f++) {
|
|
229
|
+
const h = i[l], E = i[f], ne = B(h.start, h.end), W = B(E.start, E.end);
|
|
230
|
+
for (const S of ne)
|
|
231
|
+
for (const ue of W)
|
|
232
|
+
if (O(S, ue))
|
|
233
|
+
return e("menu.scheduler.dialog.sections.period.overlap");
|
|
234
|
+
}
|
|
235
|
+
return null;
|
|
236
|
+
}
|
|
237
|
+
const L = Y();
|
|
238
|
+
function q() {
|
|
239
|
+
return {
|
|
240
|
+
...o.value,
|
|
241
|
+
timePeriod: x.value === "all" ? [] : o.value.timePeriod,
|
|
242
|
+
weekDay: o.value.repeat === H.enum.daily ? [] : o.value.weekDay
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
async function C() {
|
|
246
|
+
oe.value || (ee("onComplete", q()), d());
|
|
247
|
+
}
|
|
248
|
+
const k = T(() => o.value._id ? e("menu.scheduler.dialog.update.title") : e("menu.scheduler.dialog.add.title")), F = T(() => o.value._id ? e("menu.scheduler.dialog.update.action") : e("menu.scheduler.dialog.add.action"));
|
|
249
|
+
function R(i) {
|
|
250
|
+
o.value.items = o.value.items.filter((l) => l._id !== i);
|
|
251
|
+
}
|
|
252
|
+
const J = T(() => Z.categorizedItems.reduce((i, l) => {
|
|
253
|
+
const f = l.items.filter(
|
|
254
|
+
(h) => o.value.items.some(({ _id: E }) => h._id === E)
|
|
255
|
+
);
|
|
256
|
+
return f.length && i.push({ ...l, items: f }), i;
|
|
257
|
+
}, [])), oe = T(() => x.value === "custom" && o.value.timePeriod.length > 0 ? ae(o.value.timePeriod) : null), ve = he(
|
|
258
|
+
() => !ge.isEqual(G.value, q()),
|
|
259
|
+
() => {
|
|
260
|
+
P.value = !1;
|
|
261
|
+
}
|
|
262
|
+
);
|
|
263
|
+
return (i, l) => {
|
|
264
|
+
const f = p("FmTextField"), h = p("FmRadio"), E = p("FmRadioGroup"), ne = p("FmCheckbox"), W = p("FmTimePicker"), S = p("FmButton"), ue = p("FmSpacer"), fe = p("FmForm"), ye = p("FmSideSheet");
|
|
265
|
+
return u(), K(ye, {
|
|
266
|
+
modelValue: P.value,
|
|
267
|
+
"onUpdate:modelValue": l[7] || (l[7] = (n) => P.value = n),
|
|
268
|
+
header: k.value,
|
|
269
|
+
"max-width": 560,
|
|
270
|
+
"is-container": a(xe).FmForm,
|
|
271
|
+
"is-container-props": {
|
|
272
|
+
onValidationSuccess: C,
|
|
273
|
+
blameFormChildOnValidationFailed: !0,
|
|
274
|
+
class: "flex flex-col h-full"
|
|
275
|
+
},
|
|
276
|
+
"onOn:clickedAway": a(ve)
|
|
277
|
+
}, {
|
|
278
|
+
"side-sheet-footer": m(() => [
|
|
279
|
+
y("div", je, [
|
|
280
|
+
t(S, {
|
|
281
|
+
label: F.value,
|
|
282
|
+
size: "lg",
|
|
283
|
+
variant: "primary",
|
|
284
|
+
onClick: l[6] || (l[6] = () => {
|
|
285
|
+
var n;
|
|
286
|
+
return (n = L.value) == null ? void 0 : n.validateInputs();
|
|
287
|
+
})
|
|
288
|
+
}, null, 8, ["label"]),
|
|
289
|
+
t(S, {
|
|
290
|
+
label: a(e)("menu.scheduler.dialog.actions.cancel"),
|
|
291
|
+
size: "lg",
|
|
292
|
+
variant: "tertiary",
|
|
293
|
+
onClick: d
|
|
294
|
+
}, null, 8, ["label"])
|
|
295
|
+
])
|
|
296
|
+
]),
|
|
297
|
+
default: m(() => [
|
|
298
|
+
t(fe, {
|
|
299
|
+
ref_key: "formRef",
|
|
300
|
+
ref: L,
|
|
301
|
+
class: "flex flex-col flex-1 overflow-hidden",
|
|
302
|
+
onValidationSuccess: C
|
|
303
|
+
}, {
|
|
304
|
+
default: m(() => [
|
|
305
|
+
t(se, {
|
|
306
|
+
title: a(e)("menu.scheduler.dialog.sections.detail.title")
|
|
307
|
+
}, {
|
|
308
|
+
default: m(() => [
|
|
309
|
+
t(f, {
|
|
310
|
+
autofocus: "",
|
|
311
|
+
modelValue: o.value.name,
|
|
312
|
+
"onUpdate:modelValue": l[0] || (l[0] = (n) => o.value.name = n),
|
|
313
|
+
rules: [(n) => !!n || a(e)("menu.scheduler.dialog.sections.detail.name.required")],
|
|
314
|
+
label: a(e)("menu.scheduler.dialog.sections.detail.name.label"),
|
|
315
|
+
placeholder: a(e)("menu.scheduler.dialog.sections.detail.name.placeholder")
|
|
316
|
+
}, null, 8, ["modelValue", "rules", "label", "placeholder"])
|
|
317
|
+
]),
|
|
318
|
+
_: 1
|
|
319
|
+
}, 8, ["title"]),
|
|
320
|
+
t(se, {
|
|
321
|
+
title: a(e)("menu.scheduler.dialog.sections.availability.title")
|
|
322
|
+
}, {
|
|
323
|
+
default: m(() => [
|
|
324
|
+
y("div", null, [
|
|
325
|
+
t(E, {
|
|
326
|
+
modelValue: o.value.repeat,
|
|
327
|
+
"onUpdate:modelValue": l[1] || (l[1] = (n) => o.value.repeat = n)
|
|
328
|
+
}, {
|
|
329
|
+
default: m(() => [
|
|
330
|
+
t(h, {
|
|
331
|
+
label: a(e)("menu.scheduler.dialog.sections.availability.daily"),
|
|
332
|
+
value: a(H).enum.daily
|
|
333
|
+
}, null, 8, ["label", "value"]),
|
|
334
|
+
t(h, {
|
|
335
|
+
label: a(e)("menu.scheduler.dialog.sections.availability.weekly"),
|
|
336
|
+
value: a(H).enum.weekly
|
|
337
|
+
}, null, 8, ["label", "value"])
|
|
338
|
+
]),
|
|
339
|
+
_: 1
|
|
340
|
+
}, 8, ["modelValue"]),
|
|
341
|
+
t(de, { name: "expand" }, {
|
|
342
|
+
default: m(() => [
|
|
343
|
+
o.value.repeat === a(H).enum.weekly ? (u(), r("div", Ie, [
|
|
344
|
+
y("div", Me, [
|
|
345
|
+
(u(), r($, null, I(_, (n, b) => t(ne, {
|
|
346
|
+
key: b,
|
|
347
|
+
modelValue: o.value.weekDay,
|
|
348
|
+
"onUpdate:modelValue": l[2] || (l[2] = (N) => o.value.weekDay = N),
|
|
349
|
+
label: n,
|
|
350
|
+
value: b
|
|
351
|
+
}, null, 8, ["modelValue", "label", "value"])), 64))
|
|
352
|
+
])
|
|
353
|
+
])) : V("", !0)
|
|
354
|
+
]),
|
|
355
|
+
_: 1
|
|
356
|
+
})
|
|
357
|
+
]),
|
|
358
|
+
y("div", null, [
|
|
359
|
+
t(E, {
|
|
360
|
+
label: a(e)("menu.scheduler.dialog.sections.period.title"),
|
|
361
|
+
modelValue: x.value,
|
|
362
|
+
"onUpdate:modelValue": l[3] || (l[3] = (n) => x.value = n)
|
|
363
|
+
}, {
|
|
364
|
+
default: m(() => [
|
|
365
|
+
t(h, {
|
|
366
|
+
label: a(e)("menu.scheduler.dialog.sections.period.all_day"),
|
|
367
|
+
value: "all"
|
|
368
|
+
}, null, 8, ["label"]),
|
|
369
|
+
t(h, {
|
|
370
|
+
label: a(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: m(() => [
|
|
378
|
+
x.value === "custom" ? (u(), r("div", ze, [
|
|
379
|
+
y("div", Be, [
|
|
380
|
+
(u(!0), r($, null, I(o.value.timePeriod, (n, b) => (u(), r("div", {
|
|
381
|
+
key: b,
|
|
382
|
+
class: "w-full flex gap-8 items-center"
|
|
383
|
+
}, [
|
|
384
|
+
t(W, {
|
|
385
|
+
modelValue: n.start,
|
|
386
|
+
"onUpdate:modelValue": (N) => n.start = N,
|
|
387
|
+
locale: a(M),
|
|
388
|
+
hour12: j.value,
|
|
389
|
+
class: "flex-1"
|
|
390
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "locale", "hour12"]),
|
|
391
|
+
l[8] || (l[8] = _e(" - ")),
|
|
392
|
+
t(W, {
|
|
393
|
+
modelValue: n.end,
|
|
394
|
+
"onUpdate:modelValue": (N) => n.end = N,
|
|
395
|
+
locale: a(M),
|
|
396
|
+
hour12: j.value,
|
|
397
|
+
class: "flex-1"
|
|
398
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "locale", "hour12"]),
|
|
399
|
+
t(S, {
|
|
400
|
+
icon: "close",
|
|
401
|
+
variant: "tertiary",
|
|
402
|
+
onClick: (N) => A(b)
|
|
403
|
+
}, null, 8, ["onClick"])
|
|
404
|
+
]))), 128)),
|
|
405
|
+
oe.value ? (u(), r("div", Le, [
|
|
406
|
+
y("div", qe, D(oe.value), 1)
|
|
407
|
+
])) : V("", !0)
|
|
408
|
+
]),
|
|
409
|
+
t(S, {
|
|
410
|
+
icon: "add",
|
|
411
|
+
label: a(e)("menu.scheduler.dialog.sections.period.add"),
|
|
412
|
+
variant: "secondary",
|
|
413
|
+
"text-color": "primary",
|
|
414
|
+
"border-color": "primary",
|
|
415
|
+
onClick: c
|
|
416
|
+
}, null, 8, ["label"])
|
|
417
|
+
])) : V("", !0)
|
|
418
|
+
]),
|
|
419
|
+
_: 1
|
|
420
|
+
})
|
|
421
|
+
]),
|
|
422
|
+
te.value ? (u(), K(Ce, {
|
|
423
|
+
key: 0,
|
|
424
|
+
label: a(e)("menu.scheduler.dialog.sections.autolink.title")
|
|
425
|
+
}, {
|
|
426
|
+
default: m(() => [
|
|
427
|
+
t(Ne, {
|
|
428
|
+
modelValue: o.value.filters,
|
|
429
|
+
"onUpdate:modelValue": l[4] || (l[4] = (n) => o.value.filters = n)
|
|
430
|
+
}, null, 8, ["modelValue"])
|
|
431
|
+
]),
|
|
432
|
+
_: 1
|
|
433
|
+
}, 8, ["label"])) : V("", !0)
|
|
434
|
+
]),
|
|
435
|
+
_: 1
|
|
436
|
+
}, 8, ["title"]),
|
|
437
|
+
g.canApplyItems ? (u(), K(se, {
|
|
438
|
+
key: 0,
|
|
439
|
+
title: a(e)("menu.scheduler.dialog.sections.products.title")
|
|
440
|
+
}, {
|
|
441
|
+
"append-title": m(() => [
|
|
442
|
+
t(ue),
|
|
443
|
+
t(we, {
|
|
444
|
+
"categorized-items": g.categorizedItems,
|
|
445
|
+
"initial-value": o.value.items,
|
|
446
|
+
onSubmit: l[5] || (l[5] = ({ items: n }) => o.value.items = n)
|
|
447
|
+
}, {
|
|
448
|
+
default: m(({ trigger: n }) => [
|
|
449
|
+
t(S, {
|
|
450
|
+
icon: "link",
|
|
451
|
+
label: a(e)("menu.scheduler.dialog.sections.products.link"),
|
|
452
|
+
variant: "secondary",
|
|
453
|
+
"text-color": "primary",
|
|
454
|
+
"border-color": "primary",
|
|
455
|
+
onClick: n
|
|
456
|
+
}, null, 8, ["label", "onClick"])
|
|
457
|
+
]),
|
|
458
|
+
_: 1
|
|
459
|
+
}, 8, ["categorized-items", "initial-value"])
|
|
460
|
+
]),
|
|
461
|
+
default: m(() => [
|
|
462
|
+
(u(!0), r($, null, I(J.value, (n) => (u(), r("div", {
|
|
463
|
+
key: n.id
|
|
464
|
+
}, [
|
|
465
|
+
y("div", Ye, D(n.name), 1),
|
|
466
|
+
(u(!0), r($, null, I(n.items, (b) => (u(), r("div", {
|
|
467
|
+
key: b._id,
|
|
468
|
+
class: "flex border-b border-b-gray-100 items-center"
|
|
469
|
+
}, [
|
|
470
|
+
y("div", He, D(b.name), 1),
|
|
471
|
+
y("div", Ke, [
|
|
472
|
+
t(S, {
|
|
473
|
+
icon: "delete",
|
|
474
|
+
variant: "tertiary",
|
|
475
|
+
"text-color": "neutral-gray-400",
|
|
476
|
+
onClick: () => R(b._id)
|
|
477
|
+
}, null, 8, ["onClick"])
|
|
478
|
+
])
|
|
479
|
+
]))), 128))
|
|
480
|
+
]))), 128))
|
|
481
|
+
]),
|
|
482
|
+
_: 1
|
|
483
|
+
}, 8, ["title"])) : V("", !0)
|
|
484
|
+
]),
|
|
485
|
+
_: 1
|
|
486
|
+
}, 512)
|
|
487
|
+
]),
|
|
488
|
+
_: 1
|
|
489
|
+
}, 8, ["modelValue", "header", "is-container", "is-container-props", "onOn:clickedAway"]);
|
|
490
|
+
};
|
|
491
|
+
}
|
|
492
|
+
});
|
|
493
|
+
function ol(g) {
|
|
494
|
+
return {
|
|
495
|
+
module: re.enum.scheduler,
|
|
496
|
+
operation: ie.F_OPERATION_TYPE.create,
|
|
497
|
+
data: me.parse(g)
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
function nl(g) {
|
|
501
|
+
return {
|
|
502
|
+
module: re.enum.scheduler,
|
|
503
|
+
operation: ie.F_OPERATION_TYPE.update,
|
|
504
|
+
data: me.parse(g)
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
function ul(g) {
|
|
508
|
+
return {
|
|
509
|
+
module: re.enum.scheduler,
|
|
510
|
+
operation: ie.F_OPERATION_TYPE.delete,
|
|
511
|
+
data: g._id
|
|
512
|
+
};
|
|
513
|
+
}
|
|
514
|
+
export {
|
|
515
|
+
al as _,
|
|
516
|
+
ol as c,
|
|
517
|
+
ul as d,
|
|
518
|
+
nl as u
|
|
519
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { u as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import "./discardConfirm-
|
|
1
|
+
import { u as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-BCKgLffo.js";
|
|
2
|
+
import "./discardConfirm-DVc_4r3v.js";
|
|
3
3
|
var Z = {
|
|
4
4
|
defaultAmount: 0,
|
|
5
5
|
defaultCurrency: "USD",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineStore as H } from "pinia";
|
|
2
2
|
import { defineComponent as M, computed as x, ref as A, watch as S, resolveComponent as V, createBlock as J, openBlock as F, withCtx as w, createVNode as m, createElementVNode as f, normalizeClass as Q, createElementBlock as C, toDisplayString as k, unref as l, Fragment as N, renderSlot as X, renderList as Z, getCurrentInstance as ee } from "vue";
|
|
3
|
-
import { D as O, E as te, B as P, d as E, i as $, b as j, m as h, C as ne, g as T, h as D, u as oe } from "./index.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import { D as O, E as te, B as P, d as E, i as $, b as j, m as h, C as ne, g as T, h as D, u as oe } from "./index.vue_vue_type_script_setup_true_lang-kdkFlB2a.js";
|
|
4
4
|
import { useI18n as q } from "@feedmepos/mf-common";
|
|
5
5
|
import { useSnackbar as I, components as ae, useDialog as le, FmButtonVariant as ue } from "@feedmepos/ui-library";
|
|
6
|
-
import { u as ie, l as se } from "./discardConfirm-
|
|
6
|
+
import { u as ie, l as se } from "./discardConfirm-DVc_4r3v.js";
|
|
7
7
|
import { c as re } from "./check-C9mY6LiX.js";
|
|
8
8
|
import "./RuleConditionSelector.vue_vue_type_style_index_0_lang-CK8z7qA8.js";
|
|
9
|
-
import "./menuV2-
|
|
9
|
+
import "./menuV2-DyTvIOlq.js";
|
|
10
10
|
import "./app-5fxKLAzS.js";
|
|
11
11
|
/* empty css */
|
|
12
12
|
import { c as me } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feedmepos/mf-menu",
|
|
3
|
-
"version": "0.32.
|
|
3
|
+
"version": "0.32.68",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@feedmepos/menu": "2.0.4",
|
|
28
28
|
"@feedmepos/mf-inventory-portal": "https://registry.npmjs.org/@feedmepos/mf-inventory-portal/-/mf-inventory-portal-0.0.19-dev.6.tgz",
|
|
29
29
|
"@feedmepos/mf-remy-panel": "0.18.0-dev.6",
|
|
30
|
-
"@feedmepos/ui-library": "1.10.
|
|
30
|
+
"@feedmepos/ui-library": "1.10.15",
|
|
31
31
|
"@feedmepos/zod-entity": "0.0.4-alpha.9",
|
|
32
32
|
"@types/dinero.js": "^1.9.4",
|
|
33
33
|
"@vue/devtools-api": "^6.5.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"vue3-lottie": "^3.3.0",
|
|
57
57
|
"vuedraggable": "^4.1.0",
|
|
58
58
|
"xlsx": "^0.18.5",
|
|
59
|
-
"@feedmepos/mf-common": "^1.29.
|
|
59
|
+
"@feedmepos/mf-common": "^1.29.29"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@rollup/plugin-commonjs": "^28.0.2",
|