@feedmepos/mf-menu 0.32.74-dev.1 → 0.32.74-dev.2
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-CQlnJm8d.js → App-BZJOUASB.js} +14 -8
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-C-hyPy4I.js → ApplyProduct.vue_vue_type_script_setup_true_lang-DzjeYfsJ.js} +3 -3
- package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-LJt8hPTI.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-eor0uw1Y.js} +3 -3
- package/dist/{Catalog-Cxg0R0CD.js → Catalog-D0umhJUp.js} +6 -6
- package/dist/{Category-D7_CG1CC.js → Category-Bv5dZoqU.js} +4 -4
- package/dist/{Category-98B4V0OI.js → Category-CJmrsNBN.js} +4 -4
- package/dist/{CookingGuide-BiWZRQbV.js → CookingGuide-Bh5p7H6A.js} +379 -355
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-Cqx5-2Dd.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-BTHIfVPy.js} +1 -1
- package/dist/{Group-BlNGsFml.js → Group-C8Q1IzVZ.js} +3 -3
- package/dist/{Group-BvVoGWbB.js → Group-CmFBND8g.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-DhEpy0CJ.js → Group.vue_vue_type_script_setup_true_lang-B7GbWmBQ.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-myAdxHAx.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D2UVK2TK.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CalnjNRi.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-B9ZqKykt.js} +7 -7
- package/dist/{Ingredient-C4uC1qTF.js → Ingredient-BpmjZsq4.js} +4 -4
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-gjv6yZ63.js → InventoryBinding.vue_vue_type_script_setup_true_lang-BurM3XXk.js} +2 -2
- package/dist/{LinkProductSideSheet-C8Kj6Jyt.js → LinkProductSideSheet-B-t5u8nb.js} +4 -4
- package/dist/{MenuSetting-CAPi6Izt.js → MenuSetting-Db2aNWHK.js} +7 -7
- package/dist/{OrderPacing--zgGLCUl.js → OrderPacing-DU2DHxAo.js} +5 -5
- package/dist/{PrintRoute-C8Tg1K1B.js → PrintRoute-DS8Lx8Ri.js} +5 -5
- package/dist/{Product-CEURFcln.js → Product-CksOjTKQ.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-HgjS8yfr.js → Product.vue_vue_type_script_setup_true_lang-70WBdgsM.js} +14 -14
- package/dist/{ProductInternalTools-CqSTTmyx.js → ProductInternalTools-DswBFeOb.js} +6 -6
- package/dist/{Products-CQYNalBC.js → Products-CD5n0Ltb.js} +39 -39
- package/dist/{Publish-CpVIPPEM.js → Publish-CFAsGvpA.js} +219 -218
- package/dist/{Recipe-V-S3rBvy.js → Recipe-CZR9PxpD.js} +5 -5
- package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-Dt0VFU0y.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-ButQyFDb.js} +1 -1
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-22NsN8mu.js → RuleView.vue_vue_type_script_setup_true_lang-DvX2UUYM.js} +211 -211
- package/dist/{Scheduler-D0ZqvQ4s.js → Scheduler-BGWwvr3d.js} +3 -3
- package/dist/{ServingSequence-D9C5TjFW.js → ServingSequence-CoLqEMgr.js} +3 -3
- package/dist/{Setting-D9uwzTvD.js → Setting-BDuqIiz2.js} +5 -5
- package/dist/{Subcategory-_22wHoRp.js → Subcategory-CKuQ2pml.js} +6 -6
- package/dist/{Takeaway-wfO-wSGr.js → Takeaway-DUn4mRZx.js} +1 -1
- package/dist/{Takeaway-DpKf0dsW.js → Takeaway-Dt7S6z9Y.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BKtMSeUC.js → Takeaway.vue_vue_type_script_setup_true_lang-BVJlUn1u.js} +5 -5
- package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-U5JPHpID.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-r8nutWvj.js} +1 -1
- package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-DYONF0J1.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-CF6FVQdM.js} +2 -2
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BsGSRfgw.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BH5-P0Kt.js} +15 -15
- package/dist/{Unit-D9gfltw8.js → Unit-sZHi2Guy.js} +2 -2
- package/dist/{Variant-Bhd-SCn-.js → Variant-vmPBmjkL.js} +3 -3
- package/dist/{_id_-CujuaivS.js → _id_-G5xT-CDM.js} +10 -10
- package/dist/{app-CoNjmiQZ.js → app-BCiY6nMZ.js} +37 -37
- package/dist/{app-B6R97xu0.js → app-CQQONQx1.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +15 -0
- package/dist/apps/mf-menu/src/helper/publishMeta.d.ts +6 -0
- package/dist/apps/mf-menu/src/manager/cooking_guide.d.ts +1 -0
- package/dist/apps/mf-menu/src/views/CookingGuide/CookingGuideDialog.vue.d.ts +8 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{override-menu-DA-3_JUT.js → linked-status-CWeGw11g.js} +4 -4
- package/dist/assets/{menu-export-DxJDiXRy.js → menu-export-RVHhfZC0.js} +4 -4
- package/dist/assets/{linked-status-Dc3gO2HQ.js → override-menu-CmqY9Tc2.js} +4 -4
- package/dist/assets/{validate-menu-CKGM50-c.js → validate-menu-C_e-tlnW.js} +3 -3
- package/dist/{catalog-BrBzi08u.js → catalog-Dn80bXkC.js} +1 -1
- package/dist/{catalogSetting-D98TJXis.js → catalogSetting-XIo6mkWP.js} +1 -1
- package/dist/{currency-_TMjPxjp.js → currency-BgSIYyGK.js} +1 -1
- package/dist/{dayjs.min-DcRBfAVF.js → dayjs.min-ByUWJqU9.js} +2 -2
- package/dist/{discardConfirm-BAt6f7Sp.js → discardConfirm-DoHu8ey7.js} +1 -1
- package/dist/{index-8ewnoIGG.js → index-B3VNODTK.js} +5 -5
- package/dist/{index-BSA0nxGD.js → index-C7BxlGX6.js} +1 -1
- package/dist/{index-B24fO6WH.js → index-MADgW2jB.js} +6 -6
- package/dist/{index.vue_vue_type_script_setup_true_lang-46y6YBq_.js → index.vue_vue_type_script_setup_true_lang-DAAzVaVe.js} +439 -439
- package/dist/{item-CxEy3ZPG.js → item-BrzBNpuQ.js} +19 -19
- package/dist/{jszip.min-CEGB8m6H.js → jszip.min-Cy3k9Boh.js} +3 -3
- package/dist/{linkProducts-OId1UtJl.js → linkProducts-EknVvUC0.js} +4 -4
- package/dist/{memberPricing-Do-xGYT8.js → memberPricing-CDcaR7Xz.js} +1 -1
- package/dist/{menu-IbXlP_Qz.js → menu-CIN8mtZY.js} +1 -1
- package/dist/{menuV2-DzbiKMo1.js → menuV2-iONFEnvV.js} +41 -41
- package/dist/{order_pacing-zD2uNjRk.js → order_pacing-C-cVrKAt.js} +5 -5
- package/dist/{priceTier-PDKu3MmF.js → priceTier-Nhz0AAh5.js} +1 -1
- package/dist/publishMeta-CAbjnmmS.js +7 -0
- package/dist/{rules-BipalTU1.js → rules-CwKc3N3r.js} +3 -3
- package/dist/{scheduler-BzHaaiZi.js → scheduler-DvQ0P3PV.js} +5 -5
- package/dist/{toExcel-B6kYroYI.js → toExcel-4gZ8GSKd.js} +2 -2
- package/dist/{unit-CJal-c2M.js → unit-CmIuFFl0.js} +3 -3
- package/package.json +1 -1
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { defineComponent as ee, ref as
|
|
1
|
+
import { defineComponent as ee, ref as M, computed as $, onMounted as we, resolveComponent as A, createElementBlock as N, openBlock as C, createVNode as _, createElementVNode as h, toDisplayString as K, unref as p, Fragment as H, renderList as te, createBlock as W, watch as Re, withCtx as j, h as E, normalizeClass as ke, createCommentVNode as ae, createTextVNode as Me, mergeProps as Ye, normalizeStyle as Je, renderSlot as We, withModifiers as re, onUnmounted as Qe } from "vue";
|
|
2
2
|
import { useRouter as Xe } from "vue-router";
|
|
3
3
|
import { O as Ze, b as et } from "./app-5fxKLAzS.js";
|
|
4
|
-
import { a as tt, e as at, b as De, N as lt, _ as Oe, O as z, u as Ue, d as Ne, F as st } from "./index.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { a as tt, e as at, b as De, N as lt, _ as Oe, O as z, u as Ue, d as Ne, F as st } from "./index.vue_vue_type_script_setup_true_lang-DAAzVaVe.js";
|
|
5
5
|
import { formatDateTime as ie, useI18n as le, useAppLocale as ce, useCoreStore as xe, RestaurantSelector as Te, prefersHour12 as nt } from "@feedmepos/mf-common";
|
|
6
6
|
import { useSnackbar as Se, useDialogChild as ot, useProxiedModel as ut, useDialog as Be, components as oe, FmButtonVariant as $e } from "@feedmepos/ui-library";
|
|
7
7
|
import { _ as rt } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
|
|
8
|
-
import { _ as it } from "./app-
|
|
8
|
+
import { _ as it } from "./app-BCiY6nMZ.js";
|
|
9
9
|
import { a as ct, w as dt } from "./tooltip-B5BiPMx9.js";
|
|
10
|
-
import { D as
|
|
11
|
-
import { u as Ee, l as mt } from "./discardConfirm-
|
|
10
|
+
import { D as q } from "./dayjs.min-ByUWJqU9.js";
|
|
11
|
+
import { u as Ee, l as mt } from "./discardConfirm-DoHu8ey7.js";
|
|
12
12
|
import { _ as Le } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
|
+
import { r as pt } from "./publishMeta-CAbjnmmS.js";
|
|
13
14
|
function ze(V, v, l) {
|
|
14
15
|
return V ? ie(
|
|
15
16
|
V,
|
|
@@ -24,7 +25,7 @@ function ze(V, v, l) {
|
|
|
24
25
|
l
|
|
25
26
|
) : "-";
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
+
function ht(V, v, l, m, u) {
|
|
28
29
|
const w = (r, k = !1) => {
|
|
29
30
|
var i;
|
|
30
31
|
return r === void 0 && !k ? "-" : ((i = l.find((y) => y.value === (r || null))) == null ? void 0 : i.label) || "-";
|
|
@@ -44,19 +45,19 @@ function pt(V, v, l, m, u) {
|
|
|
44
45
|
};
|
|
45
46
|
});
|
|
46
47
|
}
|
|
47
|
-
const
|
|
48
|
+
const ft = {
|
|
48
49
|
key: 0,
|
|
49
50
|
class: "flex items-center justify-center"
|
|
50
|
-
},
|
|
51
|
+
}, vt = {
|
|
51
52
|
key: 1,
|
|
52
53
|
class: "space-y-16"
|
|
53
|
-
},
|
|
54
|
+
}, bt = { class: "text-fm-color-typo-secondary" }, _t = { class: "space-y-4" }, gt = /* @__PURE__ */ ee({
|
|
54
55
|
__name: "RevertDialog",
|
|
55
56
|
props: {
|
|
56
57
|
restaurant: {}
|
|
57
58
|
},
|
|
58
59
|
setup(V) {
|
|
59
|
-
const v = V, l = Se(), { custom: m } = De(l), u =
|
|
60
|
+
const v = V, l = Se(), { custom: m } = De(l), u = M(!1), w = M(null);
|
|
60
61
|
async function r() {
|
|
61
62
|
await m(
|
|
62
63
|
async () => {
|
|
@@ -79,7 +80,7 @@ const ht = {
|
|
|
79
80
|
var g;
|
|
80
81
|
const a = v.restaurant.revertConfig;
|
|
81
82
|
if (!a) return [];
|
|
82
|
-
const n =
|
|
83
|
+
const n = ht(
|
|
83
84
|
[
|
|
84
85
|
{
|
|
85
86
|
...a,
|
|
@@ -110,12 +111,12 @@ const ht = {
|
|
|
110
111
|
const { emitData: s } = ot();
|
|
111
112
|
return (a, n) => {
|
|
112
113
|
const g = A("FmCircularProgress");
|
|
113
|
-
return u.value ? (C(), N("div",
|
|
114
|
+
return u.value ? (C(), N("div", ft, [
|
|
114
115
|
_(g, { size: "lg" })
|
|
115
|
-
])) : (C(), N("div",
|
|
116
|
-
h("div",
|
|
117
|
-
h("div",
|
|
118
|
-
(C(!0), N(
|
|
116
|
+
])) : (C(), N("div", vt, [
|
|
117
|
+
h("div", bt, K(p(i)("menu.revert.description", { name: v.restaurant.name })), 1),
|
|
118
|
+
h("div", _t, [
|
|
119
|
+
(C(!0), N(H, null, te(f.value, (o) => (C(), W(ct, {
|
|
119
120
|
key: o.label,
|
|
120
121
|
name: o.label,
|
|
121
122
|
value: o.value || "--"
|
|
@@ -124,11 +125,11 @@ const ht = {
|
|
|
124
125
|
]));
|
|
125
126
|
};
|
|
126
127
|
}
|
|
127
|
-
}),
|
|
128
|
+
}), yt = {
|
|
128
129
|
class: "break-all fm-typo-en-body-lg-400 line-clamp-1"
|
|
129
|
-
},
|
|
130
|
+
}, Ct = {
|
|
130
131
|
class: "flex flex-col"
|
|
131
|
-
},
|
|
132
|
+
}, kt = /* @__PURE__ */ ee({
|
|
132
133
|
__name: "PublishRestaurantSelector",
|
|
133
134
|
props: {
|
|
134
135
|
restaurants: {
|
|
@@ -140,10 +141,10 @@ const ht = {
|
|
|
140
141
|
setup(V, {
|
|
141
142
|
emit: v
|
|
142
143
|
}) {
|
|
143
|
-
const l = V, m = v, u =
|
|
144
|
+
const l = V, m = v, u = M([]), w = $(() => l.restaurants.map((a) => ({
|
|
144
145
|
label: a.name,
|
|
145
146
|
value: a._id
|
|
146
|
-
}))), r =
|
|
147
|
+
}))), r = M(""), k = $(() => {
|
|
147
148
|
const a = Array.isArray(u.value) ? u.value : [], n = a.map((o) => w.value.find((x) => x.value === o)).filter((o) => o !== void 0);
|
|
148
149
|
let g = [];
|
|
149
150
|
return r.value ? (g = w.value.filter((o) => o.label.toLowerCase().includes(r.value.toLowerCase()) && !a.includes(o.value)), [...n, ...g]) : (g = w.value.filter((o) => !a.includes(o.value)), [...n, ...g]);
|
|
@@ -169,8 +170,8 @@ const ht = {
|
|
|
169
170
|
multiselect: !0,
|
|
170
171
|
"hide-chips": !0
|
|
171
172
|
}, {
|
|
172
|
-
default: j(() => [h("p",
|
|
173
|
-
"menu-wrapper": j(() => [h("div",
|
|
173
|
+
default: j(() => [h("p", yt, K(u.value.length === l.restaurants.length ? "All restaurants" : s(u.value).join(", ")), 1)]),
|
|
174
|
+
"menu-wrapper": j(() => [h("div", Ct, [_(g, {
|
|
174
175
|
class: "py-8",
|
|
175
176
|
modelValue: r.value,
|
|
176
177
|
"onUpdate:modelValue": n[0] || (n[0] = (S) => r.value = S),
|
|
@@ -182,7 +183,7 @@ const ht = {
|
|
|
182
183
|
value: "1",
|
|
183
184
|
indeterminate: u.value.length > 0,
|
|
184
185
|
"onUpdate:modelValue": t
|
|
185
|
-
}, null, 8, ["model-value", "indeterminate"]), (C(!0), N(
|
|
186
|
+
}, null, 8, ["model-value", "indeterminate"]), (C(!0), N(H, null, te(k.value, (S, T) => (C(), N("div", {
|
|
186
187
|
key: T
|
|
187
188
|
}, [_(o, {
|
|
188
189
|
"model-value": u.value,
|
|
@@ -194,16 +195,16 @@ const ht = {
|
|
|
194
195
|
}, 8, ["modelValue", "items"]);
|
|
195
196
|
};
|
|
196
197
|
}
|
|
197
|
-
}),
|
|
198
|
+
}), wt = {
|
|
198
199
|
class: "flex pb-16 w-full items-center justify-between gap-8"
|
|
199
|
-
}, wt = {
|
|
200
|
-
class: "flex-1 min-w-0 max-w-[300px]"
|
|
201
200
|
}, xt = {
|
|
202
|
-
|
|
201
|
+
class: "flex-1 min-w-0 max-w-[300px]"
|
|
203
202
|
}, St = {
|
|
203
|
+
key: 0
|
|
204
|
+
}, Vt = {
|
|
204
205
|
key: 1,
|
|
205
206
|
class: "text-fm-color-neutral-gray-200"
|
|
206
|
-
},
|
|
207
|
+
}, Ft = /* @__PURE__ */ ee({
|
|
207
208
|
__name: "RestaurantPublishDetail",
|
|
208
209
|
props: {
|
|
209
210
|
restaurantPublishStatus: {
|
|
@@ -254,10 +255,10 @@ const ht = {
|
|
|
254
255
|
class: "whitespace-nowrap"
|
|
255
256
|
}, n);
|
|
256
257
|
}
|
|
257
|
-
}], k =
|
|
258
|
+
}], k = M([]), i = $(() => Object.entries(u.statusMap).map(([a, n]) => ({
|
|
258
259
|
label: n.label,
|
|
259
260
|
value: a
|
|
260
|
-
}))), y =
|
|
261
|
+
}))), y = M(null), t = $(() => Object.entries(u.restaurantPublishStatus).filter(([a, n]) => k.value.length === 0 ? !0 : k.value.includes(n.status)).filter(([a, n]) => !y.value || y.value.length === 0 ? !0 : y.value.includes(a)).map(([a, n]) => ({
|
|
261
262
|
restaurantName: s(a),
|
|
262
263
|
publishStatus: u.statusMap[n.status].label,
|
|
263
264
|
publishedAt: n.publishedAt ? ie(n.publishedAt, l.value, {
|
|
@@ -283,7 +284,7 @@ const ht = {
|
|
|
283
284
|
}
|
|
284
285
|
return (a, n) => {
|
|
285
286
|
const g = A("FmSelect"), o = A("FmTable");
|
|
286
|
-
return C(), N(
|
|
287
|
+
return C(), N(H, null, [h("div", wt, [h("div", xt, [_(p(Te), {
|
|
287
288
|
multiple: "",
|
|
288
289
|
modelValue: y.value,
|
|
289
290
|
"onUpdate:modelValue": n[0] || (n[0] = (x) => y.value = x)
|
|
@@ -295,10 +296,10 @@ const ht = {
|
|
|
295
296
|
multiselect: "",
|
|
296
297
|
"hide-chips": ""
|
|
297
298
|
}, {
|
|
298
|
-
default: j(() => [k.value.length > 0 ? (C(), N("div",
|
|
299
|
+
default: j(() => [k.value.length > 0 ? (C(), N("div", St, K(k.value.map((x) => {
|
|
299
300
|
var S;
|
|
300
301
|
return (S = u.statusMap[x]) == null ? void 0 : S.label;
|
|
301
|
-
}).join(", ")), 1)) : (C(), N("div",
|
|
302
|
+
}).join(", ")), 1)) : (C(), N("div", Vt, K(p(v)("menu.publish.scheduler_publish.restaurant_publish_details.select_publish_status")), 1))]),
|
|
302
303
|
_: 1
|
|
303
304
|
}, 8, ["modelValue", "items"])]), t.value.length > 0 ? (C(), W(o, {
|
|
304
305
|
key: 0,
|
|
@@ -315,10 +316,10 @@ const ht = {
|
|
|
315
316
|
}, null, 8, ["title"]))], 64);
|
|
316
317
|
};
|
|
317
318
|
}
|
|
318
|
-
}),
|
|
319
|
+
}), Pt = { class: "fm-calendar__name-row fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, It = ["id"], Mt = {
|
|
319
320
|
key: 0,
|
|
320
321
|
class: "fm-calendar__cell__button--today"
|
|
321
|
-
},
|
|
322
|
+
}, Nt = ["onClick", "onMouseover"], $t = /* @__PURE__ */ ee({
|
|
322
323
|
__name: "FmCalendar",
|
|
323
324
|
props: {
|
|
324
325
|
days: {},
|
|
@@ -336,7 +337,7 @@ const ht = {
|
|
|
336
337
|
v("menu.publish.scheduler.calender.day.thu"),
|
|
337
338
|
v("menu.publish.scheduler.calender.day.fri"),
|
|
338
339
|
v("menu.publish.scheduler.calender.day.sat")
|
|
339
|
-
], m =
|
|
340
|
+
], m = q(), u = (r, k) => typeof r == "function" ? r(...k) : r, w = (r, k) => {
|
|
340
341
|
if (!k) return;
|
|
341
342
|
const i = {
|
|
342
343
|
"fm-calendar__cell--selected": !1,
|
|
@@ -355,18 +356,18 @@ const ht = {
|
|
|
355
356
|
return [i, y];
|
|
356
357
|
};
|
|
357
358
|
return (r, k) => (C(), N("div", null, [
|
|
358
|
-
h("div",
|
|
359
|
-
(C(!0), N(
|
|
359
|
+
h("div", Pt, [
|
|
360
|
+
(C(!0), N(H, null, te(l(), (i) => (C(), N("div", {
|
|
360
361
|
key: i,
|
|
361
362
|
class: ke(["fm-calendar__cell", `fm-calendar__cell__${r.cellSize}`])
|
|
362
363
|
}, K(i), 3))), 128))
|
|
363
364
|
]),
|
|
364
365
|
h("div", null, [
|
|
365
|
-
(C(!0), N(
|
|
366
|
+
(C(!0), N(H, null, te(r.days, (i, y) => (C(), N("div", {
|
|
366
367
|
key: y,
|
|
367
368
|
class: "fm-calendar__row fm-typo-en-body-md-400"
|
|
368
369
|
}, [
|
|
369
|
-
(C(!0), N(
|
|
370
|
+
(C(!0), N(H, null, te(i, (t) => (C(), N("div", {
|
|
370
371
|
id: `${t.date.toISOString()}`,
|
|
371
372
|
key: t.date.date(),
|
|
372
373
|
class: ke(["fm-calendar__cell", [
|
|
@@ -375,7 +376,7 @@ const ht = {
|
|
|
375
376
|
!t.isCurrentMonth && "fm-calendar__cell--not-current-month"
|
|
376
377
|
]])
|
|
377
378
|
}, [
|
|
378
|
-
t.date.isSame(p(m), "day") && t.isCurrentMonth ? (C(), N("div",
|
|
379
|
+
t.date.isSame(p(m), "day") && t.isCurrentMonth ? (C(), N("div", Mt)) : ae("", !0),
|
|
379
380
|
t.isCurrentMonth ? (C(), N("button", {
|
|
380
381
|
key: 1,
|
|
381
382
|
class: "fm-calendar__cell__button",
|
|
@@ -385,16 +386,16 @@ const ht = {
|
|
|
385
386
|
var s;
|
|
386
387
|
return (s = r.onCellMouseOver) == null ? void 0 : s.call(r, t.date);
|
|
387
388
|
}
|
|
388
|
-
}, K(t.date.date()), 41,
|
|
389
|
-
], 10,
|
|
389
|
+
}, K(t.date.date()), 41, Nt)) : ae("", !0)
|
|
390
|
+
], 10, It))), 128))
|
|
390
391
|
]))), 128))
|
|
391
392
|
])
|
|
392
393
|
]));
|
|
393
394
|
}
|
|
394
|
-
}), Ae = /* @__PURE__ */ Le(
|
|
395
|
+
}), Ae = /* @__PURE__ */ Le($t, [["__scopeId", "data-v-47484312"]]), At = { class: "fm-typo-en-body-md-600" }, Rt = {
|
|
395
396
|
id: "in-calendar-app",
|
|
396
397
|
class: "h-[264px] overflow-y-auto w-[160px]"
|
|
397
|
-
},
|
|
398
|
+
}, Dt = ["onVnodeMounted"], Ot = ["onVnodeMounted"], ve = /* @__PURE__ */ ee({
|
|
398
399
|
__name: "FmDateRangeYearMonthPicker",
|
|
399
400
|
props: {
|
|
400
401
|
modelValue: {},
|
|
@@ -404,16 +405,16 @@ const ht = {
|
|
|
404
405
|
},
|
|
405
406
|
emits: ["update:modelValue"],
|
|
406
407
|
setup(V, { emit: v }) {
|
|
407
|
-
const { t: l } = le(), m = V, u = v, w =
|
|
408
|
-
const t =
|
|
408
|
+
const { t: l } = le(), m = V, u = v, w = M(!1), r = $(() => {
|
|
409
|
+
const t = q(m.min).startOf("year"), f = q(m.max).startOf("year"), s = f.diff(t, "year"), a = [];
|
|
409
410
|
for (let n = 0; n <= s; n++)
|
|
410
411
|
a.push(f.subtract(n, "year"));
|
|
411
412
|
return a;
|
|
412
413
|
}), k = (t) => {
|
|
413
|
-
const f =
|
|
414
|
+
const f = q(m.min).startOf("month"), s = q(m.max).startOf("month");
|
|
414
415
|
return t.get("year") === f.get("year") ? t.startOf("month").isAfter(f) || t.get("month") === f.get("month") : t.get("year") === s.get("year") ? t.startOf("month").isBefore(s) || t.get("month") === s.get("month") : !0;
|
|
415
416
|
}, i = (t) => {
|
|
416
|
-
const f =
|
|
417
|
+
const f = q(m.min).startOf("month"), s = q(m.max).startOf("month");
|
|
417
418
|
if (f.get("year") === t.get("year")) {
|
|
418
419
|
u("update:modelValue", f);
|
|
419
420
|
return;
|
|
@@ -442,11 +443,11 @@ const ht = {
|
|
|
442
443
|
h("div", {
|
|
443
444
|
class: ke(["flex gap-4 h-24 items-center px-4 rounded-sm", w.value ? "text-fm-color-primary" : "hover:bg-fm-color-neutral-gray-100"])
|
|
444
445
|
}, [
|
|
445
|
-
h("div",
|
|
446
|
-
t.picker === "month" ? (C(), N(
|
|
446
|
+
h("div", At, [
|
|
447
|
+
t.picker === "month" ? (C(), N(H, { key: 0 }, [
|
|
447
448
|
Me(K(t.modelValue.format(p(l)("menu.publish.scheduler.date.monthFormat"))), 1)
|
|
448
449
|
], 64)) : ae("", !0),
|
|
449
|
-
t.picker === "year" ? (C(), N(
|
|
450
|
+
t.picker === "year" ? (C(), N(H, { key: 1 }, [
|
|
450
451
|
Me(K(t.modelValue.format(p(l)("menu.publish.scheduler.date.yearFormat"))), 1)
|
|
451
452
|
], 64)) : ae("", !0)
|
|
452
453
|
]),
|
|
@@ -458,8 +459,8 @@ const ht = {
|
|
|
458
459
|
], 2)
|
|
459
460
|
]),
|
|
460
461
|
default: j(() => [
|
|
461
|
-
h("ul",
|
|
462
|
-
t.picker === "month" ? (C(!0), N(
|
|
462
|
+
h("ul", Rt, [
|
|
463
|
+
t.picker === "month" ? (C(!0), N(H, { key: 0 }, te(Array.from(Array(12), (g, o) => t.modelValue.month(o)), (g) => (C(), N("li", {
|
|
463
464
|
key: g.format(p(l)("menu.publish.scheduler.date.monthFormat")),
|
|
464
465
|
onVnodeMounted: (o) => y(
|
|
465
466
|
o,
|
|
@@ -472,8 +473,8 @@ const ht = {
|
|
|
472
473
|
label: g.format(p(l)("menu.publish.scheduler.date.monthFormat")),
|
|
473
474
|
"onUpdate:modelValue": (o) => u("update:modelValue", g)
|
|
474
475
|
}, null, 8, ["disabled", "model-value", "label", "onUpdate:modelValue"])
|
|
475
|
-
], 8,
|
|
476
|
-
t.picker === "year" ? (C(!0), N(
|
|
476
|
+
], 8, Dt))), 128)) : ae("", !0),
|
|
477
|
+
t.picker === "year" ? (C(!0), N(H, { key: 1 }, te(r.value, (g) => (C(), N("li", {
|
|
477
478
|
key: g.format(p(l)("menu.publish.scheduler.date.yearFormat")),
|
|
478
479
|
onVnodeMounted: (o) => y(
|
|
479
480
|
o,
|
|
@@ -485,20 +486,20 @@ const ht = {
|
|
|
485
486
|
label: g.format(p(l)("menu.publish.scheduler.date.yearFormat")),
|
|
486
487
|
"onUpdate:modelValue": (o) => i(g)
|
|
487
488
|
}, null, 8, ["model-value", "label", "onUpdate:modelValue"])
|
|
488
|
-
], 8,
|
|
489
|
+
], 8, Ot))), 128)) : ae("", !0)
|
|
489
490
|
])
|
|
490
491
|
]),
|
|
491
492
|
_: 1
|
|
492
493
|
});
|
|
493
494
|
};
|
|
494
495
|
}
|
|
495
|
-
}),
|
|
496
|
+
}), Ut = { class: "p-12 space-y-4 w-[552px]" }, Tt = { class: "w-max" }, Bt = { class: "flex space-x-24" }, Et = { class: "flex items-center py-8 space-x-16" }, Lt = { class: "flex space-x-4" }, zt = { class: "flex items-center justify-end py-8 space-x-16" }, Kt = { class: "flex space-x-4" }, jt = { class: "flex gap-8 items-center justify-end w-full" }, be = "YYYY-MM-DD", Gt = /* @__PURE__ */ ee({
|
|
496
497
|
__name: "DateTimePicker",
|
|
497
498
|
props: {
|
|
498
499
|
modelValue: {},
|
|
499
500
|
showValidBorder: { type: Boolean, default: !1 },
|
|
500
|
-
min: { default: () =>
|
|
501
|
-
max: { default: () =>
|
|
501
|
+
min: { default: () => q().subtract(50, "year").format(be) },
|
|
502
|
+
max: { default: () => q().add(25, "year").format(be) },
|
|
502
503
|
zIndex: { default: void 0 },
|
|
503
504
|
label: { default: "" },
|
|
504
505
|
labelMark: { default: "none" },
|
|
@@ -521,13 +522,13 @@ const ht = {
|
|
|
521
522
|
/* AM */
|
|
522
523
|
} : { hours: c.getHours(), minutes: c.getMinutes() };
|
|
523
524
|
}
|
|
524
|
-
const t =
|
|
525
|
+
const t = M(y()), f = $(
|
|
525
526
|
() => ({
|
|
526
527
|
hours: 0,
|
|
527
528
|
minutes: 0,
|
|
528
529
|
period: w.value ? "AM" : void 0
|
|
529
530
|
})
|
|
530
|
-
), s =
|
|
531
|
+
), s = M(q(i.value, be)), a = M(!1);
|
|
531
532
|
function n(c, b) {
|
|
532
533
|
const [U, Q, B] = c.split("-").map(Number), L = new Date(U, Q - 1, B);
|
|
533
534
|
let R = b.hours;
|
|
@@ -540,12 +541,12 @@ const ht = {
|
|
|
540
541
|
a.value = !1;
|
|
541
542
|
}, 0);
|
|
542
543
|
}, o = () => {
|
|
543
|
-
s.value = i.value ?
|
|
544
|
+
s.value = i.value ? q(i.value) : null, a.value = !1;
|
|
544
545
|
}, x = (c) => {
|
|
545
546
|
a.value = c, c || o();
|
|
546
|
-
}, S =
|
|
547
|
+
}, S = M(q().startOf("month")), T = M(q().startOf("month").add(1, "month")), G = (c, b) => {
|
|
547
548
|
c === "left" ? (S.value = b, T.value = b.add(1, "month")) : c === "right" && (T.value = b, S.value = b.subtract(1, "month"));
|
|
548
|
-
},
|
|
549
|
+
}, Y = $(() => X(S.value)), D = $(() => X(S.value.add(1, "month"))), X = (c) => {
|
|
549
550
|
const b = [], U = c.endOf("month"), Q = c.month();
|
|
550
551
|
let B = c.startOf("week"), L = [];
|
|
551
552
|
for (; B.isBefore(U.endOf("week")); )
|
|
@@ -572,33 +573,33 @@ const ht = {
|
|
|
572
573
|
}, { class: "text-fm-color-primary" }), " Select Date & Time ", 16)
|
|
573
574
|
]),
|
|
574
575
|
default: j(() => [
|
|
575
|
-
h("div",
|
|
576
|
-
h("div",
|
|
577
|
-
h("div",
|
|
576
|
+
h("div", Ut, [
|
|
577
|
+
h("div", Tt, [
|
|
578
|
+
h("div", Bt, [
|
|
578
579
|
h("div", null, [
|
|
579
|
-
h("div",
|
|
580
|
+
h("div", Et, [
|
|
580
581
|
_(U, {
|
|
581
582
|
outline: !1,
|
|
582
583
|
class: "cursor-pointer select-none",
|
|
583
584
|
color: "#1C1C1E",
|
|
584
585
|
name: "chevron_left",
|
|
585
586
|
size: "md",
|
|
586
|
-
onClick: b[0] || (b[0] = () =>
|
|
587
|
+
onClick: b[0] || (b[0] = () => G("left", S.value.subtract(1, "month")))
|
|
587
588
|
}),
|
|
588
|
-
h("div",
|
|
589
|
+
h("div", Lt, [
|
|
589
590
|
_(ve, {
|
|
590
591
|
max: c.max,
|
|
591
592
|
min: c.min,
|
|
592
593
|
"model-value": S.value,
|
|
593
594
|
picker: "month",
|
|
594
|
-
"onUpdate:modelValue": b[1] || (b[1] = (R) =>
|
|
595
|
+
"onUpdate:modelValue": b[1] || (b[1] = (R) => G("left", R))
|
|
595
596
|
}, null, 8, ["max", "min", "model-value"]),
|
|
596
597
|
_(ve, {
|
|
597
598
|
max: c.max,
|
|
598
599
|
min: c.min,
|
|
599
600
|
"model-value": S.value,
|
|
600
601
|
picker: "year",
|
|
601
|
-
"onUpdate:modelValue": b[2] || (b[2] = (R) =>
|
|
602
|
+
"onUpdate:modelValue": b[2] || (b[2] = (R) => G("left", R))
|
|
602
603
|
}, null, 8, ["max", "min", "model-value"])
|
|
603
604
|
])
|
|
604
605
|
]),
|
|
@@ -608,26 +609,26 @@ const ht = {
|
|
|
608
609
|
isSelected: (R) => R.isSame(s.value, "date")
|
|
609
610
|
}
|
|
610
611
|
},
|
|
611
|
-
days:
|
|
612
|
+
days: Y.value,
|
|
612
613
|
"on-day-click": (R) => F(R.date)
|
|
613
614
|
}, null, 8, ["day-cell-class", "days", "on-day-click"])
|
|
614
615
|
]),
|
|
615
616
|
h("div", null, [
|
|
616
|
-
h("div",
|
|
617
|
-
h("div",
|
|
617
|
+
h("div", zt, [
|
|
618
|
+
h("div", Kt, [
|
|
618
619
|
_(ve, {
|
|
619
620
|
max: c.max,
|
|
620
621
|
min: c.min,
|
|
621
622
|
"model-value": T.value,
|
|
622
623
|
picker: "month",
|
|
623
|
-
"onUpdate:modelValue": b[3] || (b[3] = (R) =>
|
|
624
|
+
"onUpdate:modelValue": b[3] || (b[3] = (R) => G("right", R))
|
|
624
625
|
}, null, 8, ["max", "min", "model-value"]),
|
|
625
626
|
_(ve, {
|
|
626
627
|
max: c.max,
|
|
627
628
|
min: c.min,
|
|
628
629
|
"model-value": T.value,
|
|
629
630
|
picker: "year",
|
|
630
|
-
"onUpdate:modelValue": b[4] || (b[4] = (R) =>
|
|
631
|
+
"onUpdate:modelValue": b[4] || (b[4] = (R) => G("right", R))
|
|
631
632
|
}, null, 8, ["max", "min", "model-value"])
|
|
632
633
|
]),
|
|
633
634
|
_(U, {
|
|
@@ -636,7 +637,7 @@ const ht = {
|
|
|
636
637
|
color: "#1C1C1E",
|
|
637
638
|
name: "chevron_right",
|
|
638
639
|
size: "md",
|
|
639
|
-
onClick: b[5] || (b[5] = () =>
|
|
640
|
+
onClick: b[5] || (b[5] = () => G("left", S.value.add(1, "month")))
|
|
640
641
|
})
|
|
641
642
|
]),
|
|
642
643
|
_(Ae, {
|
|
@@ -656,7 +657,7 @@ const ht = {
|
|
|
656
657
|
"model-value": t.value ?? f.value,
|
|
657
658
|
"onUpdate:modelValue": b[6] || (b[6] = (R) => t.value = R)
|
|
658
659
|
}, null, 8, ["hour12", "model-value"]),
|
|
659
|
-
h("div",
|
|
660
|
+
h("div", jt, [
|
|
660
661
|
_(B, {
|
|
661
662
|
label: p(l)("common.cancel"),
|
|
662
663
|
size: "md",
|
|
@@ -677,7 +678,7 @@ const ht = {
|
|
|
677
678
|
}, 8, ["show-popover", "z-index"]);
|
|
678
679
|
};
|
|
679
680
|
}
|
|
680
|
-
}),
|
|
681
|
+
}), qt = { class: "container" }, Ht = /* @__PURE__ */ ee({
|
|
681
682
|
__name: "ProgressBar",
|
|
682
683
|
props: {
|
|
683
684
|
bgcolor: {},
|
|
@@ -692,17 +693,17 @@ const ht = {
|
|
|
692
693
|
borderRadius: "inherit",
|
|
693
694
|
textAlign: "right"
|
|
694
695
|
}));
|
|
695
|
-
return (m, u) => (C(), N("div",
|
|
696
|
+
return (m, u) => (C(), N("div", qt, [
|
|
696
697
|
h("div", {
|
|
697
698
|
style: Je(l.value)
|
|
698
699
|
}, null, 4)
|
|
699
700
|
]));
|
|
700
701
|
}
|
|
701
|
-
}),
|
|
702
|
+
}), Yt = /* @__PURE__ */ Le(Ht, [["__scopeId", "data-v-709d7500"]]), Jt = {
|
|
702
703
|
class: "flex items-center gap-24"
|
|
703
|
-
},
|
|
704
|
+
}, Wt = {
|
|
704
705
|
class: "fm-typo-en-title-md-600"
|
|
705
|
-
},
|
|
706
|
+
}, Qt = /* @__PURE__ */ ee({
|
|
706
707
|
__name: "PublishProgressView",
|
|
707
708
|
props: {
|
|
708
709
|
progress: {
|
|
@@ -752,7 +753,7 @@ const ht = {
|
|
|
752
753
|
textColor: "text-fm-color-system-error-300",
|
|
753
754
|
backgroundColor: "#FF3B30"
|
|
754
755
|
}
|
|
755
|
-
}, f = Ue(), s =
|
|
756
|
+
}, f = Ue(), s = M(!1), a = (F) => {
|
|
756
757
|
typeof F == "boolean" ? s.value = F : s.value = !s.value;
|
|
757
758
|
};
|
|
758
759
|
v({
|
|
@@ -772,7 +773,7 @@ const ht = {
|
|
|
772
773
|
status: b.status,
|
|
773
774
|
progress: b.status === z.enum.RUNNING && U === c ? y.progress ?? 0 : 0
|
|
774
775
|
};
|
|
775
|
-
})), x =
|
|
776
|
+
})), x = M([]), S = M(null), T = M(null), G = [{
|
|
776
777
|
accessorKey: "date",
|
|
777
778
|
header: m("menu.publish.scheduler_publish.table.columns.date"),
|
|
778
779
|
cell: ({
|
|
@@ -781,8 +782,8 @@ const ht = {
|
|
|
781
782
|
if (F.original.date === "new") {
|
|
782
783
|
if (S.value !== null)
|
|
783
784
|
return ie(S.value, u.value, r, w.value);
|
|
784
|
-
const b =
|
|
785
|
-
return E(
|
|
785
|
+
const b = q(Date.now()).toISOString();
|
|
786
|
+
return E(Gt, {
|
|
786
787
|
class: "flex h-full items-center",
|
|
787
788
|
modelValue: b,
|
|
788
789
|
"onUpdate:schedulerTime": (U) => {
|
|
@@ -800,7 +801,7 @@ const ht = {
|
|
|
800
801
|
header: m("menu.publish.scheduler_publish.table.columns.total_restaurants"),
|
|
801
802
|
cell: ({
|
|
802
803
|
row: F
|
|
803
|
-
}) => F.original.date === "new" ? E(
|
|
804
|
+
}) => F.original.date === "new" ? E(kt, {
|
|
804
805
|
restaurants: y.restaurants,
|
|
805
806
|
"onUpdate:modelValue": (b) => {
|
|
806
807
|
x.value = b;
|
|
@@ -820,7 +821,7 @@ const ht = {
|
|
|
820
821
|
prependIcon: "close",
|
|
821
822
|
textColor: "system-error-300",
|
|
822
823
|
onClick: () => {
|
|
823
|
-
S.value = null,
|
|
824
|
+
S.value = null, Y.value = null, T.value = null;
|
|
824
825
|
}
|
|
825
826
|
}), E(oe.FmButton, {
|
|
826
827
|
variant: "tertiary",
|
|
@@ -846,7 +847,7 @@ const ht = {
|
|
|
846
847
|
class: `fm-typo-en-body-md-400 ${t[c].textColor}`
|
|
847
848
|
}, t[c].label), ...c === z.enum.RUNNING ? [E("p", {
|
|
848
849
|
class: `fm-typo-en-body-md-400 ${t[c].textColor}`
|
|
849
|
-
}, `(${F.original.progress}/${F.original.total_restaurants})`)] : []]), E(
|
|
850
|
+
}, `(${F.original.progress}/${F.original.total_restaurants})`)] : []]), E(Yt, {
|
|
850
851
|
bgcolor: t[c].backgroundColor,
|
|
851
852
|
completed: c === z.enum.PENDING ? 0 : c === z.enum.RUNNING ? Math.floor((F.original.progress ?? 0) / parseInt(F.original.total_restaurants) * 100) : (c === z.enum.COMPLETED, 100)
|
|
852
853
|
})]), E(oe.FmButton, {
|
|
@@ -856,7 +857,7 @@ const ht = {
|
|
|
856
857
|
onClick: () => {
|
|
857
858
|
i.open({
|
|
858
859
|
title: m("menu.publish.scheduler_publish.restaurant_publish_details.title"),
|
|
859
|
-
contentComponent:
|
|
860
|
+
contentComponent: Ft,
|
|
860
861
|
contentComponentProps: {
|
|
861
862
|
restaurantPublishStatus: F.original.restaurantPublishStatus,
|
|
862
863
|
statusMap: t
|
|
@@ -872,7 +873,7 @@ const ht = {
|
|
|
872
873
|
disabled: c !== z.enum.PENDING,
|
|
873
874
|
textColor: "system-error-300",
|
|
874
875
|
onClick: () => {
|
|
875
|
-
const U =
|
|
876
|
+
const U = q(F.original.date).toISOString();
|
|
876
877
|
i.open({
|
|
877
878
|
title: "Confirm Remove",
|
|
878
879
|
message: "Are you sure you want to remove this scheduled publish? This action cannot be undone.",
|
|
@@ -906,9 +907,9 @@ const ht = {
|
|
|
906
907
|
we(async () => {
|
|
907
908
|
await f.getNextSchedulerPublish();
|
|
908
909
|
});
|
|
909
|
-
const
|
|
910
|
+
const Y = M(null);
|
|
910
911
|
function D() {
|
|
911
|
-
T.value = !1,
|
|
912
|
+
T.value = !1, Y.value = {
|
|
912
913
|
date: "new",
|
|
913
914
|
restaurantsIds: []
|
|
914
915
|
};
|
|
@@ -917,14 +918,14 @@ const ht = {
|
|
|
917
918
|
F && (n("publishMenu", {
|
|
918
919
|
schedulerTime: S.value,
|
|
919
920
|
restaurantIds: x.value
|
|
920
|
-
}), await f.getNextSchedulerPublish(), S.value = null, x.value = [], T.value = !1,
|
|
921
|
+
}), await f.getNextSchedulerPublish(), S.value = null, x.value = [], T.value = !1, Y.value = null, T.value = null);
|
|
921
922
|
});
|
|
922
923
|
const X = Ee(() => T.value !== null && T.value === !1, () => {
|
|
923
|
-
s.value = !1,
|
|
924
|
+
s.value = !1, Y.value = null, S.value = null, x.value = [], T.value = null;
|
|
924
925
|
});
|
|
925
926
|
return (F, c) => {
|
|
926
927
|
const b = A("FmButton"), U = A("FmTable"), Q = A("FmSideSheet");
|
|
927
|
-
return C(), N(
|
|
928
|
+
return C(), N(H, null, [We(F.$slots, "default", {
|
|
928
929
|
trigger: a
|
|
929
930
|
}), _(Q, {
|
|
930
931
|
modelValue: s.value,
|
|
@@ -933,19 +934,19 @@ const ht = {
|
|
|
933
934
|
"max-width": 800,
|
|
934
935
|
"onOn:clickedAway": p(X)
|
|
935
936
|
}, {
|
|
936
|
-
"side-sheet-header": j(() => [h("div",
|
|
937
|
+
"side-sheet-header": j(() => [h("div", Jt, [_(b, {
|
|
937
938
|
variant: p($e).Tertiary,
|
|
938
939
|
"prepend-icon": "arrow_back",
|
|
939
940
|
onClick: re(p(X), ["stop"])
|
|
940
|
-
}, null, 8, ["variant", "onClick"]), h("p",
|
|
941
|
+
}, null, 8, ["variant", "onClick"]), h("p", Wt, K(p(m)("menu.publish.actions.publish_progress")), 1)])]),
|
|
941
942
|
default: j(() => [h("div", null, [_(U, {
|
|
942
943
|
class: "pb-8",
|
|
943
|
-
"row-data": [...o.value,
|
|
944
|
-
"column-defs":
|
|
944
|
+
"row-data": [...o.value, Y.value].filter(Boolean),
|
|
945
|
+
"column-defs": G,
|
|
945
946
|
"shrink-at": !1,
|
|
946
|
-
pageSize: o.value.length + (
|
|
947
|
+
pageSize: o.value.length + (Y.value ? 1 : 0),
|
|
947
948
|
"hide-footer": ""
|
|
948
|
-
}, null, 8, ["row-data", "pageSize"]), p(f).state.featureFlags.schedulerPublish && !
|
|
949
|
+
}, null, 8, ["row-data", "pageSize"]), p(f).state.featureFlags.schedulerPublish && !Y.value ? (C(), W(b, {
|
|
949
950
|
key: 0,
|
|
950
951
|
variant: p($e).Plain,
|
|
951
952
|
"prepend-icon": "add",
|
|
@@ -956,22 +957,22 @@ const ht = {
|
|
|
956
957
|
}, 8, ["modelValue", "onOn:clickedAway"])], 64);
|
|
957
958
|
};
|
|
958
959
|
}
|
|
959
|
-
}),
|
|
960
|
-
function
|
|
960
|
+
}), Xt = 12e4;
|
|
961
|
+
function Zt(V) {
|
|
961
962
|
return V === z.enum.RUNNING || V === z.enum.PENDING;
|
|
962
963
|
}
|
|
963
|
-
function
|
|
964
|
+
function ea(V) {
|
|
964
965
|
const v = /* @__PURE__ */ new Map();
|
|
965
966
|
for (const l of Object.values(V ?? {})) {
|
|
966
|
-
if (!
|
|
967
|
+
if (!Zt(l.status)) continue;
|
|
967
968
|
const m = l.status === z.enum.RUNNING ? "publishing" : "queued";
|
|
968
969
|
for (const [u, w] of Object.entries(l.restaurants ?? {}))
|
|
969
970
|
w.status === z.enum.COMPLETED || w.status === z.enum.FAILED || (m === "publishing" || !v.has(u)) && v.set(u, m);
|
|
970
971
|
}
|
|
971
972
|
return v;
|
|
972
973
|
}
|
|
973
|
-
function
|
|
974
|
-
const l = v +
|
|
974
|
+
function ta(V, v) {
|
|
975
|
+
const l = v + Xt;
|
|
975
976
|
return Object.entries(V ?? {}).some(([m, u]) => {
|
|
976
977
|
if (u.status === z.enum.RUNNING) return !0;
|
|
977
978
|
if (u.status !== z.enum.PENDING) return !1;
|
|
@@ -979,13 +980,13 @@ function ea(V, v) {
|
|
|
979
980
|
return Number.isNaN(w) || w <= l;
|
|
980
981
|
});
|
|
981
982
|
}
|
|
982
|
-
function
|
|
983
|
+
function aa(V) {
|
|
983
984
|
return Object.values(V ?? {}).some((v) => v.status === z.enum.PENDING);
|
|
984
985
|
}
|
|
985
|
-
function
|
|
986
|
+
function la(V, v, l, m) {
|
|
986
987
|
return V.get(v) ?? (m === l ? "latest" : "outdated");
|
|
987
988
|
}
|
|
988
|
-
const
|
|
989
|
+
const sa = { class: "fm-typo-en-title-md-600" }, na = { class: "mt-40" }, oa = { class: "fm-typo-en-title-sm-600" }, ua = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mt-4 mb-8" }, ra = { class: "flex gap-8 items-center justify-start" }, ia = /* @__PURE__ */ ee({
|
|
989
990
|
__name: "UpdateCatalogDialog",
|
|
990
991
|
props: {
|
|
991
992
|
catalogs: {
|
|
@@ -1028,7 +1029,7 @@ const la = { class: "fm-typo-en-title-md-600" }, sa = { class: "mt-40" }, na = {
|
|
|
1028
1029
|
label: o.name,
|
|
1029
1030
|
value: o._id
|
|
1030
1031
|
}))
|
|
1031
|
-
]), y =
|
|
1032
|
+
]), y = M(r()), t = M(!1), f = M(void 0);
|
|
1032
1033
|
function s(o) {
|
|
1033
1034
|
f.value = o ? Ne(o) : r(), y.value = Ne(f.value), t.value = !0;
|
|
1034
1035
|
}
|
|
@@ -1045,25 +1046,25 @@ const la = { class: "fm-typo-en-title-md-600" }, sa = { class: "mt-40" }, na = {
|
|
|
1045
1046
|
a(), w("onComplete", y.value);
|
|
1046
1047
|
}
|
|
1047
1048
|
return (o, x) => {
|
|
1048
|
-
const S = A("FmSelect"), T = A("FmCheckbox"),
|
|
1049
|
-
return C(), W(
|
|
1049
|
+
const S = A("FmSelect"), T = A("FmCheckbox"), G = A("FmButton"), Y = A("FmSideSheet");
|
|
1050
|
+
return C(), W(Y, {
|
|
1050
1051
|
modelValue: t.value,
|
|
1051
1052
|
"onUpdate:modelValue": x[5] || (x[5] = (D) => t.value = D),
|
|
1052
1053
|
"max-width": 560,
|
|
1053
1054
|
"onOn:clickedAway": p(n)
|
|
1054
1055
|
}, {
|
|
1055
1056
|
"side-sheet-header": j(() => [
|
|
1056
|
-
h("span",
|
|
1057
|
+
h("span", sa, K(p(m)("menu.publish.update_catalog_dialog.title")), 1)
|
|
1057
1058
|
]),
|
|
1058
1059
|
"side-sheet-footer": j(() => [
|
|
1059
|
-
h("div",
|
|
1060
|
-
_(
|
|
1060
|
+
h("div", ra, [
|
|
1061
|
+
_(G, {
|
|
1061
1062
|
label: p(m)("menu.publish.update_catalog_dialog.actions.update"),
|
|
1062
1063
|
size: "lg",
|
|
1063
1064
|
variant: "primary",
|
|
1064
1065
|
onClick: x[4] || (x[4] = () => g())
|
|
1065
1066
|
}, null, 8, ["label"]),
|
|
1066
|
-
_(
|
|
1067
|
+
_(G, {
|
|
1067
1068
|
label: p(m)("menu.publish.update_catalog_dialog.actions.cancel"),
|
|
1068
1069
|
size: "lg",
|
|
1069
1070
|
variant: "tertiary",
|
|
@@ -1092,10 +1093,10 @@ const la = { class: "fm-typo-en-title-md-600" }, sa = { class: "mt-40" }, na = {
|
|
|
1092
1093
|
items: i.value,
|
|
1093
1094
|
label: p(m)("menu.publish.update_catalog_dialog.sections.pickup.label")
|
|
1094
1095
|
}, null, 8, ["modelValue", "items", "label"]),
|
|
1095
|
-
h("div",
|
|
1096
|
-
h("div",
|
|
1097
|
-
h("div",
|
|
1098
|
-
(C(!0), N(
|
|
1096
|
+
h("div", na, [
|
|
1097
|
+
h("div", oa, K(p(m)("menu.publish.update_catalog_dialog.sections.additional.title")), 1),
|
|
1098
|
+
h("div", ua, K(p(m)("menu.publish.update_catalog_dialog.sections.additional.subtitle")), 1),
|
|
1099
|
+
(C(!0), N(H, null, te(V.catalogs, (D) => (C(), N("div", {
|
|
1099
1100
|
key: D._id
|
|
1100
1101
|
}, [
|
|
1101
1102
|
_(T, {
|
|
@@ -1111,39 +1112,39 @@ const la = { class: "fm-typo-en-title-md-600" }, sa = { class: "mt-40" }, na = {
|
|
|
1111
1112
|
}, 8, ["modelValue", "onOn:clickedAway"]);
|
|
1112
1113
|
};
|
|
1113
1114
|
}
|
|
1114
|
-
}),
|
|
1115
|
+
}), ca = {
|
|
1115
1116
|
class: "flex flex-col p-24 bg-fm-color-neutral-white min-h-[calc(100dvh-56px)] xs:max-h-[calc(100dvh-56px)]"
|
|
1116
|
-
}, ca = {
|
|
1117
|
-
class: "flex items-center xs:mb-8 mb-24"
|
|
1118
1117
|
}, da = {
|
|
1119
|
-
class: "
|
|
1118
|
+
class: "flex items-center xs:mb-8 mb-24"
|
|
1120
1119
|
}, ma = {
|
|
1121
|
-
class: "
|
|
1120
|
+
class: "mr-8"
|
|
1122
1121
|
}, pa = {
|
|
1123
|
-
class: "
|
|
1122
|
+
class: "fm-typo-en-title-md-600"
|
|
1124
1123
|
}, ha = {
|
|
1125
1124
|
class: "xs:hidden mr-16"
|
|
1126
1125
|
}, fa = {
|
|
1127
|
-
class: "xs:hidden"
|
|
1126
|
+
class: "xs:hidden mr-16"
|
|
1128
1127
|
}, va = {
|
|
1129
|
-
class: "
|
|
1128
|
+
class: "xs:hidden"
|
|
1130
1129
|
}, ba = {
|
|
1131
|
-
class: "
|
|
1130
|
+
class: "pb-8 flex justify-between items-start xs:flex-col xs:items-stretch gap-8"
|
|
1132
1131
|
}, _a = {
|
|
1133
|
-
class: "flex
|
|
1132
|
+
class: "grow flex flex-col gap-4"
|
|
1134
1133
|
}, ga = {
|
|
1135
|
-
class: "
|
|
1134
|
+
class: "flex gap-8 items-center"
|
|
1136
1135
|
}, ya = {
|
|
1137
|
-
class: "
|
|
1136
|
+
class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary"
|
|
1138
1137
|
}, Ca = {
|
|
1139
|
-
class: "
|
|
1138
|
+
class: "space-y-4"
|
|
1140
1139
|
}, ka = {
|
|
1141
|
-
class: "fm-typo-en-body-
|
|
1140
|
+
class: "fm-typo-en-body-lg-600"
|
|
1142
1141
|
}, wa = {
|
|
1143
|
-
class: "
|
|
1142
|
+
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
1144
1143
|
}, xa = {
|
|
1144
|
+
class: "flex gap-8"
|
|
1145
|
+
}, Sa = {
|
|
1145
1146
|
class: "xs:block hidden fixed bottom-72 right-16"
|
|
1146
|
-
},
|
|
1147
|
+
}, Va = 3e4, Ea = /* @__PURE__ */ ee({
|
|
1147
1148
|
__name: "Publish",
|
|
1148
1149
|
setup(V) {
|
|
1149
1150
|
const v = Xe(), {
|
|
@@ -1180,7 +1181,7 @@ const la = { class: "fm-typo-en-title-md-600" }, sa = { class: "mt-40" }, na = {
|
|
|
1180
1181
|
label: l(d.labelKey),
|
|
1181
1182
|
variant: d.variant
|
|
1182
1183
|
}, null);
|
|
1183
|
-
}, i =
|
|
1184
|
+
}, i = M({}), y = [{
|
|
1184
1185
|
accessorKey: "displayName",
|
|
1185
1186
|
header: () => l("menu.publish.table.columns.restaurant"),
|
|
1186
1187
|
cell: (e) => e.getValue(),
|
|
@@ -1206,7 +1207,7 @@ const la = { class: "fm-typo-en-title-md-600" }, sa = { class: "mt-40" }, na = {
|
|
|
1206
1207
|
enableSorting: !1,
|
|
1207
1208
|
cell: (e) => {
|
|
1208
1209
|
const d = e.getValue();
|
|
1209
|
-
return
|
|
1210
|
+
return G(d);
|
|
1210
1211
|
}
|
|
1211
1212
|
}, {
|
|
1212
1213
|
accessorKey: "status",
|
|
@@ -1245,7 +1246,7 @@ const la = { class: "fm-typo-en-title-md-600" }, sa = { class: "mt-40" }, na = {
|
|
|
1245
1246
|
meta: {
|
|
1246
1247
|
width: "150px"
|
|
1247
1248
|
}
|
|
1248
|
-
}], t =
|
|
1249
|
+
}], t = M(""), f = M(), s = Ue(), a = xe(), n = $(() => {
|
|
1249
1250
|
var d;
|
|
1250
1251
|
const e = /* @__PURE__ */ new Map();
|
|
1251
1252
|
for (const O of a.restaurants.value)
|
|
@@ -1260,7 +1261,7 @@ const la = { class: "fm-typo-en-title-md-600" }, sa = { class: "mt-40" }, na = {
|
|
|
1260
1261
|
async function S(e) {
|
|
1261
1262
|
e.revertConfig && o.open({
|
|
1262
1263
|
title: "Revert menu",
|
|
1263
|
-
contentComponent:
|
|
1264
|
+
contentComponent: gt,
|
|
1264
1265
|
contentComponentProps: {
|
|
1265
1266
|
restaurant: e
|
|
1266
1267
|
},
|
|
@@ -1282,9 +1283,9 @@ const la = { class: "fm-typo-en-title-md-600" }, sa = { class: "mt-40" }, na = {
|
|
|
1282
1283
|
});
|
|
1283
1284
|
}
|
|
1284
1285
|
const T = $(() => l("menu.publish.labels.main_version", {
|
|
1285
|
-
version:
|
|
1286
|
+
version: G(s.state.menu.updatedAt)
|
|
1286
1287
|
}));
|
|
1287
|
-
function
|
|
1288
|
+
function G(e) {
|
|
1288
1289
|
return e ? ie(e, m.value, {
|
|
1289
1290
|
year: "numeric",
|
|
1290
1291
|
month: "numeric",
|
|
@@ -1293,10 +1294,10 @@ const la = { class: "fm-typo-en-title-md-600" }, sa = { class: "mt-40" }, na = {
|
|
|
1293
1294
|
minute: "2-digit"
|
|
1294
1295
|
}, u.value) : "";
|
|
1295
1296
|
}
|
|
1296
|
-
const
|
|
1297
|
+
const Y = $(() => s.state.menu.modules.catalog), D = $(() => U.queue.value.some((e) => e.id === s.state.menu._id));
|
|
1297
1298
|
function X(e) {
|
|
1298
1299
|
var d;
|
|
1299
|
-
return e ? ((d =
|
|
1300
|
+
return e ? ((d = Y.value.find((O) => O._id === e)) == null ? void 0 : d.name) ?? l("menu.publish.labels.catalog.invalid") : l("menu.publish.labels.catalog.main");
|
|
1300
1301
|
}
|
|
1301
1302
|
function F(e) {
|
|
1302
1303
|
return {
|
|
@@ -1312,14 +1313,14 @@ const la = { class: "fm-typo-en-title-md-600" }, sa = { class: "mt-40" }, na = {
|
|
|
1312
1313
|
const d = F(e);
|
|
1313
1314
|
(O = f.value) == null || O.show(d);
|
|
1314
1315
|
}
|
|
1315
|
-
const b = Se(), U = De(b), Q = $(() =>
|
|
1316
|
+
const b = Se(), U = De(b), Q = $(() => ea(s.state.nextSchedulerPublish));
|
|
1316
1317
|
function B(e) {
|
|
1317
1318
|
return D.value || U.checkIsLoading(e) || Q.value.has(e);
|
|
1318
1319
|
}
|
|
1319
1320
|
async function L(e) {
|
|
1320
1321
|
var O;
|
|
1321
1322
|
if (D.value) return;
|
|
1322
|
-
const d = (O = Z.value.find((
|
|
1323
|
+
const d = (O = Z.value.find((se) => se._id === e.restaurantId)) == null ? void 0 : O.name;
|
|
1323
1324
|
await U.minor(async () => {
|
|
1324
1325
|
await s.publishMenu(e, !1), s.patchRestaurantCatalogs(e);
|
|
1325
1326
|
}, {
|
|
@@ -1328,36 +1329,36 @@ const la = { class: "fm-typo-en-title-md-600" }, sa = { class: "mt-40" }, na = {
|
|
|
1328
1329
|
successMessage: `Menu publish registered for ${d}.`
|
|
1329
1330
|
}), await pe(!0);
|
|
1330
1331
|
}
|
|
1331
|
-
const R =
|
|
1332
|
-
const e = t.value.toLowerCase(), d = s.state.menu.updatedAt, O = Q.value,
|
|
1333
|
-
return s.state.restaurants.filter((
|
|
1334
|
-
var
|
|
1335
|
-
return !R.value || ((
|
|
1336
|
-
}).map((
|
|
1337
|
-
const
|
|
1332
|
+
const R = M(null), Ve = $(() => l("menu.common.labels.status")), Z = $(() => {
|
|
1333
|
+
const e = t.value.toLowerCase(), d = s.state.menu.updatedAt, O = Q.value, se = s.state.publishMetaRestaurants ?? {};
|
|
1334
|
+
return s.state.restaurants.filter((P) => {
|
|
1335
|
+
var J;
|
|
1336
|
+
return !R.value || ((J = R.value) == null ? void 0 : J.includes(P._id));
|
|
1337
|
+
}).map((P) => {
|
|
1338
|
+
const J = se[P._id], he = pt(se, P._id, P.updatedAt), fe = la(O, P._id, he, d);
|
|
1338
1339
|
return {
|
|
1339
|
-
...
|
|
1340
|
+
...P,
|
|
1340
1341
|
updatedAt: he,
|
|
1341
1342
|
// Same shape the backend builds for `/restaurants`: the previous catalog
|
|
1342
1343
|
// selection, pointing at the menu the last publish shipped.
|
|
1343
|
-
revertConfig:
|
|
1344
|
-
...
|
|
1345
|
-
_id:
|
|
1346
|
-
} :
|
|
1347
|
-
displayName: g(
|
|
1344
|
+
revertConfig: J ? {
|
|
1345
|
+
...J.revertConfig,
|
|
1346
|
+
_id: J.menuId
|
|
1347
|
+
} : P.revertConfig,
|
|
1348
|
+
displayName: g(P._id, P.name),
|
|
1348
1349
|
catalog: {
|
|
1349
|
-
default: X(
|
|
1350
|
-
takeaway: X(
|
|
1351
|
-
pickup: X(
|
|
1350
|
+
default: X(P.catalogId),
|
|
1351
|
+
takeaway: X(P.takeawayCatalog),
|
|
1352
|
+
pickup: X(P.pickupCatalog)
|
|
1352
1353
|
},
|
|
1353
1354
|
status: fe,
|
|
1354
1355
|
[Ve.value]: r(fe)
|
|
1355
1356
|
};
|
|
1356
|
-
}).filter((
|
|
1357
|
-
displayName:
|
|
1358
|
-
catalog:
|
|
1359
|
-
}) => e ?
|
|
1360
|
-
}), _e =
|
|
1357
|
+
}).filter((P) => Ze(P, _e.value)).filter(({
|
|
1358
|
+
displayName: P,
|
|
1359
|
+
catalog: J
|
|
1360
|
+
}) => e ? P.toLowerCase().includes(e) || J.default.toLowerCase().includes(e) || J.takeaway.toLowerCase().includes(e) || J.pickup.toLowerCase().includes(e) : !0);
|
|
1361
|
+
}), _e = M({
|
|
1361
1362
|
logic: "AND",
|
|
1362
1363
|
rules: []
|
|
1363
1364
|
}), Ke = $(() => [{
|
|
@@ -1365,9 +1366,9 @@ const la = { class: "fm-typo-en-title-md-600" }, sa = { class: "mt-40" }, na = {
|
|
|
1365
1366
|
key: Ve.value,
|
|
1366
1367
|
entity: "menu",
|
|
1367
1368
|
values: Object.keys(w).map(r)
|
|
1368
|
-
}]), Fe =
|
|
1369
|
+
}]), Fe = M(0), Pe = [3e3, 3e3, 5e3, 1e4, 3e4], ne = M(null), ue = M(0), de = M(!1), ge = M(!1), Ie = M(!0);
|
|
1369
1370
|
function ye() {
|
|
1370
|
-
|
|
1371
|
+
ne.value !== null && (clearTimeout(ne.value), ne.value = null);
|
|
1371
1372
|
}
|
|
1372
1373
|
async function je() {
|
|
1373
1374
|
await s.getNextSchedulerPublish(), Fe.value = s.runningPublishJob !== null ? await s.getPublishRestaurantsProgress() : 0;
|
|
@@ -1391,18 +1392,18 @@ const la = { class: "fm-typo-en-title-md-600" }, sa = { class: "mt-40" }, na = {
|
|
|
1391
1392
|
ge.value = !1, ue.value = 0, await me();
|
|
1392
1393
|
return;
|
|
1393
1394
|
}
|
|
1394
|
-
if (e ||
|
|
1395
|
+
if (e || ta(s.state.nextSchedulerPublish, Date.now())) {
|
|
1395
1396
|
const d = Pe[Math.min(ue.value, Pe.length - 1)];
|
|
1396
|
-
ue.value += 1,
|
|
1397
|
+
ue.value += 1, ne.value = setTimeout(() => void me(), d);
|
|
1397
1398
|
return;
|
|
1398
1399
|
}
|
|
1399
|
-
|
|
1400
|
+
aa(s.state.nextSchedulerPublish) && (ue.value = 0, ne.value = setTimeout(() => void me(), Va));
|
|
1400
1401
|
}
|
|
1401
1402
|
}
|
|
1402
1403
|
async function pe(e = !1) {
|
|
1403
1404
|
if (e)
|
|
1404
1405
|
ye(), ue.value = 0;
|
|
1405
|
-
else if (
|
|
1406
|
+
else if (ne.value !== null || de.value)
|
|
1406
1407
|
return;
|
|
1407
1408
|
await me();
|
|
1408
1409
|
}
|
|
@@ -1415,7 +1416,7 @@ const la = { class: "fm-typo-en-title-md-600" }, sa = { class: "mt-40" }, na = {
|
|
|
1415
1416
|
}
|
|
1416
1417
|
async function Ce(e) {
|
|
1417
1418
|
if (D.value) return;
|
|
1418
|
-
const d = Object.keys(i.value).filter((
|
|
1419
|
+
const d = Object.keys(i.value).filter((P) => i.value[P]), O = d.length === 0 || d.length === Z.value.length ? Z.value : Z.value.filter((P) => d.includes(P._id));
|
|
1419
1420
|
if (e ? e.restaurantIds.length === s.state.restaurants.length : Z.value.length === s.state.restaurants.length && (d.length === 0 || d.length === Z.value.length))
|
|
1420
1421
|
await U.minor(async () => {
|
|
1421
1422
|
await s.publishAllMenu(e == null ? void 0 : e.schedulerTime, !1);
|
|
@@ -1424,9 +1425,9 @@ const la = { class: "fm-typo-en-title-md-600" }, sa = { class: "mt-40" }, na = {
|
|
|
1424
1425
|
successMessage: "Menu publish registered for all restaurants."
|
|
1425
1426
|
});
|
|
1426
1427
|
else {
|
|
1427
|
-
const
|
|
1428
|
+
const P = (e == null ? void 0 : e.restaurantIds) || O.map((J) => J._id);
|
|
1428
1429
|
await U.minor(async () => {
|
|
1429
|
-
await s.publishMultipleMenu(
|
|
1430
|
+
await s.publishMultipleMenu(P, e == null ? void 0 : e.schedulerTime, !1);
|
|
1430
1431
|
}, {
|
|
1431
1432
|
customId: s.state.menu._id,
|
|
1432
1433
|
successMessage: `Menu publish registered for ${e != null && e.restaurantIds ? e.restaurantIds.length : O.length} restaurant(s).`
|
|
@@ -1439,74 +1440,74 @@ const la = { class: "fm-typo-en-title-md-600" }, sa = { class: "mt-40" }, na = {
|
|
|
1439
1440
|
}), Qe(() => {
|
|
1440
1441
|
Ie.value = !1, ye();
|
|
1441
1442
|
}), (e, d) => {
|
|
1442
|
-
const O = A("FmChip"),
|
|
1443
|
-
return C(), N(
|
|
1443
|
+
const O = A("FmChip"), se = A("FmSpacer"), P = A("FmButton"), J = A("FmBadge"), he = A("FmSearch"), fe = A("FmTable"), qe = A("FmListItem"), He = A("FmList");
|
|
1444
|
+
return C(), N(H, null, [h("div", ca, [h("div", da, [h("div", ma, [h("div", pa, K(p(l)("menu.publish.title")), 1)]), _(O, {
|
|
1444
1445
|
label: T.value,
|
|
1445
1446
|
class: "xs:hidden text-fm-color-primary bg-fm-color-system-warning-100"
|
|
1446
|
-
}, null, 8, ["label"]), _(
|
|
1447
|
+
}, null, 8, ["label"]), _(se), h("div", ha, [_(P, {
|
|
1447
1448
|
disabled: D.value,
|
|
1448
1449
|
label: p(l)("menu.publish.actions.refresh"),
|
|
1449
1450
|
variant: "secondary",
|
|
1450
1451
|
onClick: d[0] || (d[0] = () => Ge())
|
|
1451
|
-
}, null, 8, ["disabled", "label"])]), h("div",
|
|
1452
|
+
}, null, 8, ["disabled", "label"])]), h("div", fa, [_(Qt, {
|
|
1452
1453
|
progress: Fe.value,
|
|
1453
1454
|
restaurants: Z.value,
|
|
1454
|
-
onPublishMenu: d[1] || (d[1] = (
|
|
1455
|
+
onPublishMenu: d[1] || (d[1] = (I) => Ce(I))
|
|
1455
1456
|
}, {
|
|
1456
1457
|
default: j(({
|
|
1457
|
-
trigger:
|
|
1458
|
-
}) => [p(s).activePublishJob !== null ? (C(), W(
|
|
1458
|
+
trigger: I
|
|
1459
|
+
}) => [p(s).activePublishJob !== null ? (C(), W(J, {
|
|
1459
1460
|
key: 0,
|
|
1460
1461
|
variant: "critical",
|
|
1461
1462
|
value: 1
|
|
1462
1463
|
}, {
|
|
1463
|
-
default: j(() => [_(
|
|
1464
|
+
default: j(() => [_(P, {
|
|
1464
1465
|
variant: "secondary",
|
|
1465
1466
|
disabled: D.value,
|
|
1466
1467
|
label: p(l)("menu.publish.actions.publish_progress"),
|
|
1467
|
-
onClick:
|
|
1468
|
+
onClick: I
|
|
1468
1469
|
}, null, 8, ["disabled", "label", "onClick"])]),
|
|
1469
1470
|
_: 2
|
|
1470
|
-
}, 1024)) : (C(), W(
|
|
1471
|
+
}, 1024)) : (C(), W(P, {
|
|
1471
1472
|
key: 1,
|
|
1472
1473
|
variant: "secondary",
|
|
1473
1474
|
disabled: D.value,
|
|
1474
1475
|
label: p(l)("menu.publish.actions.publish_progress"),
|
|
1475
|
-
onClick:
|
|
1476
|
+
onClick: I
|
|
1476
1477
|
}, null, 8, ["disabled", "label", "onClick"]))]),
|
|
1477
1478
|
_: 1
|
|
1478
|
-
}, 8, ["progress", "restaurants"])]), h("div",
|
|
1479
|
+
}, 8, ["progress", "restaurants"])]), h("div", va, [_(P, {
|
|
1479
1480
|
disabled: D.value,
|
|
1480
1481
|
icon: "ios_share",
|
|
1481
1482
|
label: p(l)("menu.publish.actions.publish_all"),
|
|
1482
1483
|
variant: "primary",
|
|
1483
1484
|
onClick: d[2] || (d[2] = () => Ce())
|
|
1484
|
-
}, null, 8, ["disabled", "label"])])]), h("div",
|
|
1485
|
+
}, null, 8, ["disabled", "label"])])]), h("div", ba, [_(p(Te), {
|
|
1485
1486
|
multiple: "",
|
|
1486
1487
|
modelValue: R.value,
|
|
1487
|
-
"onUpdate:modelValue": d[4] || (d[4] = (
|
|
1488
|
+
"onUpdate:modelValue": d[4] || (d[4] = (I) => R.value = I)
|
|
1488
1489
|
}, {
|
|
1489
1490
|
"append-right": j(() => [_(p(et), {
|
|
1490
1491
|
modelValue: _e.value,
|
|
1491
|
-
"onUpdate:modelValue": d[3] || (d[3] = (
|
|
1492
|
+
"onUpdate:modelValue": d[3] || (d[3] = (I) => _e.value = I),
|
|
1492
1493
|
attributes: Ke.value
|
|
1493
1494
|
}, null, 8, ["modelValue", "attributes"])]),
|
|
1494
1495
|
_: 1
|
|
1495
1496
|
}, 8, ["modelValue"]), _(he, {
|
|
1496
1497
|
modelValue: t.value,
|
|
1497
|
-
"onUpdate:modelValue": d[5] || (d[5] = (
|
|
1498
|
+
"onUpdate:modelValue": d[5] || (d[5] = (I) => t.value = I),
|
|
1498
1499
|
autofocus: "",
|
|
1499
1500
|
class: "w-[320px] xs:w-full",
|
|
1500
1501
|
placeholder: p(l)("menu.publish.table.search.placeholder")
|
|
1501
|
-
}, null, 8, ["modelValue", "placeholder"])]), Z.value.length > 0 ? (C(), N(
|
|
1502
|
+
}, null, 8, ["modelValue", "placeholder"])]), Z.value.length > 0 ? (C(), N(H, {
|
|
1502
1503
|
key: 0
|
|
1503
1504
|
}, [_(it, {
|
|
1504
1505
|
class: "xs:hidden block"
|
|
1505
1506
|
}, {
|
|
1506
1507
|
default: j(() => [_(fe, {
|
|
1507
1508
|
modelValue: i.value,
|
|
1508
|
-
"onUpdate:modelValue": d[6] || (d[6] = (
|
|
1509
|
-
"get-row-id": (
|
|
1509
|
+
"onUpdate:modelValue": d[6] || (d[6] = (I) => i.value = I),
|
|
1510
|
+
"get-row-id": (I) => I._id,
|
|
1510
1511
|
"column-defs": y,
|
|
1511
1512
|
loading: D.value,
|
|
1512
1513
|
"page-size": Z.value.length,
|
|
@@ -1516,34 +1517,34 @@ const la = { class: "fm-typo-en-title-md-600" }, sa = { class: "mt-40" }, na = {
|
|
|
1516
1517
|
selection: "multiple",
|
|
1517
1518
|
"hide-footer": "",
|
|
1518
1519
|
"pin-header-row": "",
|
|
1519
|
-
onRowClick: d[7] || (d[7] = (
|
|
1520
|
+
onRowClick: d[7] || (d[7] = (I) => c(I.original))
|
|
1520
1521
|
}, null, 8, ["modelValue", "get-row-id", "loading", "page-size", "row-data"])]),
|
|
1521
1522
|
_: 1
|
|
1522
1523
|
}), _(He, {
|
|
1523
1524
|
class: "flex-col flex-1 min-h-0 overflow-auto xs:flex hidden w-full pb-64",
|
|
1524
1525
|
separator: ""
|
|
1525
1526
|
}, {
|
|
1526
|
-
default: j(() => [(C(!0), N(
|
|
1527
|
-
key:
|
|
1528
|
-
label:
|
|
1527
|
+
default: j(() => [(C(!0), N(H, null, te(Z.value, (I) => (C(), W(qe, {
|
|
1528
|
+
key: I._id,
|
|
1529
|
+
label: I.displayName,
|
|
1529
1530
|
style: {
|
|
1530
1531
|
padding: "12px 0 !important"
|
|
1531
1532
|
},
|
|
1532
|
-
onClick: () => c(
|
|
1533
|
+
onClick: () => c(I)
|
|
1533
1534
|
}, {
|
|
1534
|
-
default: j(() => [h("div",
|
|
1535
|
-
row:
|
|
1536
|
-
}, null, 8, ["row"])]), h("div",
|
|
1535
|
+
default: j(() => [h("div", _a, [h("div", ga, [h("div", ya, K(G(I.updatedAt)), 1), _(k, {
|
|
1536
|
+
row: I
|
|
1537
|
+
}, null, 8, ["row"])]), h("div", Ca, [h("div", ka, K(I.displayName), 1), h("div", wa, [h("div", null, "Default: " + K(I.catalog.default), 1), h("div", null, "POS takeaway: " + K(I.catalog.takeaway), 1), h("div", null, "Pickup: " + K(I.catalog.pickup), 1)])])]), h("div", xa, [x.value && I.revertConfig ? (C(), W(P, {
|
|
1537
1538
|
key: 0,
|
|
1538
|
-
disabled: B(
|
|
1539
|
+
disabled: B(I._id),
|
|
1539
1540
|
icon: "undo",
|
|
1540
1541
|
variant: "tertiary",
|
|
1541
|
-
onClick: re(() => S(
|
|
1542
|
-
}, null, 8, ["disabled", "onClick"])) : ae("", !0), _(
|
|
1543
|
-
disabled: B(
|
|
1542
|
+
onClick: re(() => S(I), ["stop"])
|
|
1543
|
+
}, null, 8, ["disabled", "onClick"])) : ae("", !0), _(P, {
|
|
1544
|
+
disabled: B(I._id),
|
|
1544
1545
|
icon: "ios_share",
|
|
1545
1546
|
variant: "tertiary",
|
|
1546
|
-
onClick: re(() => L(F(
|
|
1547
|
+
onClick: re(() => L(F(I)), ["stop"])
|
|
1547
1548
|
}, null, 8, ["disabled", "onClick"])])]),
|
|
1548
1549
|
_: 2
|
|
1549
1550
|
}, 1032, ["label", "onClick"]))), 128))]),
|
|
@@ -1561,21 +1562,21 @@ const la = { class: "fm-typo-en-title-md-600" }, sa = { class: "mt-40" }, na = {
|
|
|
1561
1562
|
});
|
|
1562
1563
|
}
|
|
1563
1564
|
}
|
|
1564
|
-
}, null, 8, ["title", "subtitle", "action"]))]), h("div",
|
|
1565
|
+
}, null, 8, ["title", "subtitle", "action"]))]), h("div", Sa, [_(P, {
|
|
1565
1566
|
disabled: D.value,
|
|
1566
1567
|
icon: "ios_share",
|
|
1567
1568
|
label: p(l)("menu.publish.actions.publish_all"),
|
|
1568
1569
|
variant: "fab",
|
|
1569
1570
|
onClick: d[8] || (d[8] = () => Ce())
|
|
1570
|
-
}, null, 8, ["disabled", "label"])]), _(
|
|
1571
|
+
}, null, 8, ["disabled", "label"])]), _(ia, {
|
|
1571
1572
|
ref_key: "updateCatalogDialogRef",
|
|
1572
1573
|
ref: f,
|
|
1573
|
-
catalogs:
|
|
1574
|
+
catalogs: Y.value,
|
|
1574
1575
|
onOnComplete: L
|
|
1575
1576
|
}, null, 8, ["catalogs"])], 64);
|
|
1576
1577
|
};
|
|
1577
1578
|
}
|
|
1578
1579
|
});
|
|
1579
1580
|
export {
|
|
1580
|
-
|
|
1581
|
+
Ea as default
|
|
1581
1582
|
};
|