@feedmepos/mf-menu 0.32.53-dev → 0.32.54-dev
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-PbFbM-b9.js → App-_uZ_L5Bj.js} +5 -5
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-DRl0F9ex.js → ApplyProduct.vue_vue_type_script_setup_true_lang-Dli8SXgX.js} +3 -3
- package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-Dxaiz_KJ.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-U6Aa4RBu.js} +2 -2
- package/dist/{Catalog-BV1mgE-z.js → Catalog-rve2AyBy.js} +6 -6
- package/dist/{Category-C5RNTUST.js → Category-Di_80MXe.js} +4 -4
- package/dist/{Category-C2ymwzxI.js → Category-Dx6Iv5dA.js} +4 -4
- package/dist/{CookingGuide-Byn0p1cx.js → CookingGuide-03JjR4b3.js} +4 -4
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-CftleIRB.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-BkpSzeX7.js} +1 -1
- package/dist/{Group-B-Z1yY_a.js → Group-Bf0jRPu1.js} +1 -1
- package/dist/{Group-CAOu7mTu.js → Group-DOYvyvNP.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-CMfGMwA5.js → Group.vue_vue_type_script_setup_true_lang-D13BHYJ8.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DEzXdEtH.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BHbSityl.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-BtZtkQHn.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CfWxf1OZ.js} +7 -7
- package/dist/{Ingredient-_-Z-auCy.js → Ingredient-woydsWk1.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-rBo5MgKk.js → InventoryBinding.vue_vue_type_script_setup_true_lang-Bzgn6e5M.js} +2 -2
- package/dist/{LinkProductSideSheet-Cpr-OzhV.js → LinkProductSideSheet-BtBCL69w.js} +3 -3
- package/dist/{MenuSetting-BHAYHNoL.js → MenuSetting-CbQ91-NJ.js} +6 -6
- package/dist/{OrderPacing-0xP2FLqE.js → OrderPacing-CLzZpgsR.js} +5 -5
- package/dist/{PrintRoute-BXqPWXr-.js → PrintRoute-KRiyp9Kl.js} +4 -4
- package/dist/{Product-CCwCq0oF.js → Product-D3UzjY9t.js} +1 -1
- package/dist/Product.vue_vue_type_script_setup_true_lang-DqCAzLTO.js +1640 -0
- package/dist/{ProductInternalTools-BsUazT7k.js → ProductInternalTools-Q_KUcji3.js} +5 -5
- package/dist/{Products-Y2h_hLvm.js → Products-DEb5wblc.js} +53 -53
- package/dist/{Publish-10DtltRY.js → Publish-CknToYHP.js} +263 -265
- package/dist/{Recipe-BKCEiBY4.js → Recipe-C_b8VZgp.js} +4 -4
- package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-Y2Ei1h4p.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-_aZHbTtg.js} +1 -1
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-Bc-WFsaf.js → RuleView.vue_vue_type_script_setup_true_lang-CyTH_at9.js} +2 -2
- package/dist/{Scheduler-D1WnpvQd.js → Scheduler-PzqfgLBJ.js} +3 -3
- package/dist/{ServingSequence-DZ4MchF3.js → ServingSequence-Bxk1S39y.js} +3 -3
- package/dist/{Setting-BgO-a6VG.js → Setting-CO2sP1z2.js} +5 -5
- package/dist/{Subcategory-mLhMiNx9.js → Subcategory-5MLdVGr-.js} +5 -5
- package/dist/{Takeaway-BN8itU_F.js → Takeaway-CflkNfbT.js} +4 -4
- package/dist/{Takeaway-B9fVwXW3.js → Takeaway-Ctbpomn2.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-CNNtpfY0.js → Takeaway.vue_vue_type_script_setup_true_lang-BH-1yxKn.js} +5 -5
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-IEPm4c9G.js → Thumbnail.vue_vue_type_script_setup_true_lang-B7Nq3IJ1.js} +4 -4
- package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-BWq9E3Pr.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-C_xhyVnX.js} +1 -1
- package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-D2Mdr76E.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-B5-Ab7yn.js} +2 -2
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CgEcWKsF.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Dm_wi_uJ.js} +13 -13
- package/dist/{Unit-CJTyfSaA.js → Unit-BO-xI_h8.js} +2 -2
- package/dist/{Variant-CSR0PyJt.js → Variant-D8CO6krd.js} +3 -3
- package/dist/{_id_-B-uZfPBS.js → _id_-C6UOR3cy.js} +9 -9
- package/dist/{app-nRTse_K5.js → app-BNSww5M4.js} +37 -37
- package/dist/{app-vpEeMZuq.js → app-CfxU4t_L.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +9 -0
- package/dist/apps/mf-menu/src/components/feature/SubcategoryManager/SubcategorySelector.vue.d.ts +5 -0
- package/dist/apps/mf-menu/src/helper/item.d.ts +1 -0
- package/dist/apps/mf-menu/src/manager/menu/item.d.ts +1 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-kcewbkLn.js → linked-status-CddGEfc5.js} +12 -12
- package/dist/assets/{menu-export-LL-Hfzyk.js → menu-export-DN0u3z_7.js} +2 -2
- package/dist/assets/{override-menu-kO9kvtlN.js → override-menu-DG2Z1XPH.js} +2 -2
- package/dist/assets/{validate-menu-Bv0NTZv1.js → validate-menu-DDEraWh4.js} +2 -2
- package/dist/{catalog-CVMKoUf8.js → catalog-B8cFusU-.js} +1 -1
- package/dist/{catalogSetting-CJofGu7O.js → catalogSetting-hSXLLFjE.js} +1 -1
- package/dist/{currency-DeBYT9j_.js → currency-evm4Kufz.js} +1 -1
- package/dist/{dayjs.min-Ws3b1WxF.js → dayjs.min-DKkIcWKQ.js} +2 -2
- package/dist/{index-OUJmHOAU.js → index-DF-RLnW4.js} +5 -5
- package/dist/{index-v56nMLPD.js → index-r-T_x-og.js} +4 -4
- package/dist/{index.vue_vue_type_script_setup_true_lang-DPaHA1bp.js → index.vue_vue_type_script_setup_true_lang-H0pKxrKD.js} +396 -389
- package/dist/{item-D5rytEqk.js → item-CiGZwVCJ.js} +220 -218
- package/dist/{jszip.min-C6uUCcnL.js → jszip.min-CTld7lET.js} +52 -52
- package/dist/{memberPricing-CBzr9qLU.js → memberPricing-Bh1SOfnP.js} +1 -1
- package/dist/{menu-BhxWRy0N.js → menu-l0HseABF.js} +1 -1
- package/dist/{menuV2-Ds1f3a8P.js → menuV2-CmL0MaZU.js} +101 -101
- package/dist/mf-menu.css +1 -1
- package/dist/{order_pacing-CYuEj5Sb.js → order_pacing-BP0_MGpd.js} +5 -5
- package/dist/{priceTier-KEgRA3RV.js → priceTier-W5k8zWVc.js} +1 -1
- package/dist/{rules-C1xA7rwc.js → rules-D2vbYzGl.js} +3 -3
- package/dist/{scheduler-C5YdAro0.js → scheduler-6526OHxm.js} +4 -4
- package/dist/{toExcel-Dv-vcMzg.js → toExcel-DCUF2hIQ.js} +2 -2
- package/dist/{unit-WEAw3qgL.js → unit-CA0Ctbtn.js} +2 -2
- package/package.json +1 -1
- package/dist/Product.vue_vue_type_script_setup_true_lang-BHjCwlbX.js +0 -1606
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { defineComponent as J, ref as P, computed as
|
|
2
|
-
import { D as E } from "./dayjs.min-
|
|
3
|
-
import { useRouter as
|
|
4
|
-
import { O as
|
|
5
|
-
import { z as
|
|
1
|
+
import { defineComponent as J, ref as P, computed as D, onMounted as me, resolveComponent as $, createElementBlock as F, openBlock as y, createVNode as b, createElementVNode as f, toDisplayString as T, unref as c, Fragment as j, renderList as Q, createBlock as Y, watch as pe, withCtx as z, h as B, normalizeClass as ce, createCommentVNode as X, createTextVNode as _e, mergeProps as Ue, normalizeStyle as Oe, renderSlot as Be, withModifiers as le, onUnmounted as Te } from "vue";
|
|
2
|
+
import { D as E } from "./dayjs.min-DKkIcWKQ.js";
|
|
3
|
+
import { useRouter as ze } from "vue-router";
|
|
4
|
+
import { O as Ee, b as Le } from "./app-5fxKLAzS.js";
|
|
5
|
+
import { z as je, D as Ke, B as Ce, ah as Ye, a5 as we, ai as W, u as xe, G as ge, H as He, y as qe } from "./index.vue_vue_type_script_setup_true_lang-H0pKxrKD.js";
|
|
6
6
|
import { useI18n as Z, useCoreStore as he, RestaurantSelector as Ve } from "@feedmepos/mf-common";
|
|
7
|
-
import { useSnackbar as fe, useDialogChild as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { _ as
|
|
7
|
+
import { useSnackbar as fe, useDialogChild as Ge, useProxiedModel as Je, useDialog as Se, components as ee, FmButtonVariant as ye } from "@feedmepos/ui-library";
|
|
8
|
+
import { _ as We } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
|
|
9
|
+
import { _ as Qe } from "./app-BNSww5M4.js";
|
|
10
10
|
import { a as Xe, w as Ze } from "./tooltip-B5BiPMx9.js";
|
|
11
|
-
import { u as
|
|
12
|
-
import { _ as
|
|
13
|
-
function
|
|
14
|
-
return
|
|
11
|
+
import { u as Fe } from "./discardConfirm-BHni0LNu.js";
|
|
12
|
+
import { _ as Ie } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
|
+
function Pe(N) {
|
|
14
|
+
return N ? E(N).format("DD/MM/YY HH:mm") : "-";
|
|
15
15
|
}
|
|
16
|
-
function et(
|
|
16
|
+
function et(N, x, l) {
|
|
17
17
|
const p = (i, g = !1) => {
|
|
18
18
|
var h;
|
|
19
19
|
return i === void 0 && !g ? "-" : ((h = l.find((_) => _.value === (i || null))) == null ? void 0 : h.label) || "-";
|
|
20
20
|
};
|
|
21
|
-
return
|
|
21
|
+
return N.map((i) => {
|
|
22
22
|
var e;
|
|
23
|
-
const g = (e =
|
|
23
|
+
const g = (e = x.find(({ _id: k }) => k === i._id)) == null ? void 0 : e.posVersion, h = !!g && !!je.Pos.canUse({ feature: Ke.F_FEATURE.enum.taxAndServiceChargeV4, posVersion: g }), _ = p(i.catalogId);
|
|
24
24
|
return {
|
|
25
25
|
...i,
|
|
26
26
|
_default: _,
|
|
27
27
|
_posTakeaway: i.takeawayCatalog ? p(i.takeawayCatalog) : _,
|
|
28
28
|
_additionalCatalogs: (i.additionalCatalogs || []).map((k) => p(k)),
|
|
29
|
-
_lastUpdate:
|
|
29
|
+
_lastUpdate: Pe(i.updatedAt),
|
|
30
30
|
_pickup: h ? p(i.pickupCatalog, !0) : "-",
|
|
31
31
|
_canUsePickup: h,
|
|
32
32
|
_posVersion: g || "-"
|
|
@@ -44,18 +44,18 @@ const tt = {
|
|
|
44
44
|
props: {
|
|
45
45
|
restaurant: {}
|
|
46
46
|
},
|
|
47
|
-
setup(
|
|
48
|
-
const
|
|
47
|
+
setup(N) {
|
|
48
|
+
const x = N, l = fe(), { custom: p } = Ce(l), i = P(!1), g = P(null);
|
|
49
49
|
async function h() {
|
|
50
50
|
await p(
|
|
51
51
|
async () => {
|
|
52
52
|
var a;
|
|
53
|
-
g.value = await
|
|
53
|
+
g.value = await Ye.readMenuById(((a = x.restaurant.revertConfig) == null ? void 0 : a._id) || "");
|
|
54
54
|
},
|
|
55
55
|
{ isLoading: i }
|
|
56
56
|
);
|
|
57
57
|
}
|
|
58
|
-
const _ =
|
|
58
|
+
const _ = D(() => {
|
|
59
59
|
var a;
|
|
60
60
|
return [
|
|
61
61
|
{ label: "Main", value: null },
|
|
@@ -64,9 +64,9 @@ const tt = {
|
|
|
64
64
|
value: n._id
|
|
65
65
|
}))
|
|
66
66
|
];
|
|
67
|
-
}), { t: e } = Z(), k =
|
|
67
|
+
}), { t: e } = Z(), k = D(() => {
|
|
68
68
|
var o;
|
|
69
|
-
const a =
|
|
69
|
+
const a = x.restaurant.revertConfig;
|
|
70
70
|
if (!a) return [];
|
|
71
71
|
const n = et(
|
|
72
72
|
[
|
|
@@ -79,10 +79,10 @@ const tt = {
|
|
|
79
79
|
_.value
|
|
80
80
|
)[0];
|
|
81
81
|
return [
|
|
82
|
-
{ label: e("menu.revert.labels.restaurant"), value:
|
|
82
|
+
{ label: e("menu.revert.labels.restaurant"), value: x.restaurant.name },
|
|
83
83
|
{
|
|
84
84
|
label: e("menu.revert.labels.revert_to"),
|
|
85
|
-
value:
|
|
85
|
+
value: Pe((o = g.value) == null ? void 0 : o.updatedAt)
|
|
86
86
|
},
|
|
87
87
|
{ label: e("menu.revert.labels.default"), value: n._default },
|
|
88
88
|
{ label: e("menu.revert.labels.pos_takeaway"), value: n._posTakeaway },
|
|
@@ -94,13 +94,13 @@ const tt = {
|
|
|
94
94
|
];
|
|
95
95
|
});
|
|
96
96
|
me(async () => h());
|
|
97
|
-
const { emitData: s } =
|
|
97
|
+
const { emitData: s } = Ge();
|
|
98
98
|
return (a, n) => {
|
|
99
99
|
const o = $("FmCircularProgress");
|
|
100
100
|
return i.value ? (y(), F("div", tt, [
|
|
101
101
|
b(o, { size: "lg" })
|
|
102
102
|
])) : (y(), F("div", lt, [
|
|
103
|
-
f("div", at,
|
|
103
|
+
f("div", at, T(c(e)("menu.revert.description", { name: x.restaurant.name })), 1),
|
|
104
104
|
f("div", st, [
|
|
105
105
|
(y(!0), F(j, null, Q(k.value, (r) => (y(), Y(Xe, {
|
|
106
106
|
key: r.label,
|
|
@@ -124,17 +124,17 @@ const tt = {
|
|
|
124
124
|
}
|
|
125
125
|
},
|
|
126
126
|
emits: ["update:modelValue"],
|
|
127
|
-
setup(
|
|
128
|
-
emit:
|
|
127
|
+
setup(N, {
|
|
128
|
+
emit: x
|
|
129
129
|
}) {
|
|
130
|
-
const l =
|
|
130
|
+
const l = N, p = x, i = P([]), g = D(() => l.restaurants.map((o) => ({
|
|
131
131
|
label: o.name,
|
|
132
132
|
value: o._id
|
|
133
|
-
}))), h = P(""), _ =
|
|
134
|
-
const o = Array.isArray(i.value) ? i.value : [], r = o.map((
|
|
133
|
+
}))), h = P(""), _ = D(() => {
|
|
134
|
+
const o = Array.isArray(i.value) ? i.value : [], r = o.map((m) => g.value.find((R) => R.value === m)).filter((m) => m !== void 0);
|
|
135
135
|
let d = [];
|
|
136
|
-
return h.value ? (d = g.value.filter((
|
|
137
|
-
}), e =
|
|
136
|
+
return h.value ? (d = g.value.filter((m) => m.label.toLowerCase().includes(h.value.toLowerCase()) && !o.includes(m.value)), [...r, ...d]) : (d = g.value.filter((m) => !o.includes(m.value)), [...r, ...d]);
|
|
137
|
+
}), e = D(() => i.value.length > 0 && i.value.length === _.value.length), k = D(() => i.value.filter((o) => _.value.some((r) => r.value === o))), s = () => {
|
|
138
138
|
const o = i.value.filter((r) => !k.value.includes(r));
|
|
139
139
|
e.value === !0 ? a(o) : a(_.value.map((r) => r.value));
|
|
140
140
|
}, a = (o) => {
|
|
@@ -147,7 +147,7 @@ const tt = {
|
|
|
147
147
|
return l.restaurants.filter((r) => o.includes(r._id)).map((r) => r.name);
|
|
148
148
|
}
|
|
149
149
|
return (o, r) => {
|
|
150
|
-
const d = $("FmSearch"),
|
|
150
|
+
const d = $("FmSearch"), m = $("FmCheckbox"), R = $("FmSelect");
|
|
151
151
|
return y(), Y(R, {
|
|
152
152
|
modelValue: i.value,
|
|
153
153
|
"onUpdate:modelValue": r[1] || (r[1] = (S) => i.value = S),
|
|
@@ -156,13 +156,13 @@ const tt = {
|
|
|
156
156
|
multiselect: !0,
|
|
157
157
|
"hide-chips": !0
|
|
158
158
|
}, {
|
|
159
|
-
default:
|
|
160
|
-
"menu-wrapper":
|
|
159
|
+
default: z(() => [f("p", ot, T(i.value.length === l.restaurants.length ? "All restaurants" : n(i.value).join(", ")), 1)]),
|
|
160
|
+
"menu-wrapper": z(() => [f("div", ut, [b(d, {
|
|
161
161
|
class: "py-8",
|
|
162
162
|
modelValue: h.value,
|
|
163
163
|
"onUpdate:modelValue": r[0] || (r[0] = (S) => h.value = S),
|
|
164
164
|
placeholder: "Search Restaurant"
|
|
165
|
-
}, null, 8, ["modelValue"]), b(
|
|
165
|
+
}, null, 8, ["modelValue"]), b(m, {
|
|
166
166
|
class: "py-8",
|
|
167
167
|
"model-value": e.value,
|
|
168
168
|
label: "All restaurants",
|
|
@@ -171,7 +171,7 @@ const tt = {
|
|
|
171
171
|
"onUpdate:modelValue": s
|
|
172
172
|
}, null, 8, ["model-value", "indeterminate"]), (y(!0), F(j, null, Q(_.value, (S, H) => (y(), F("div", {
|
|
173
173
|
key: H
|
|
174
|
-
}, [b(
|
|
174
|
+
}, [b(m, {
|
|
175
175
|
"model-value": i.value,
|
|
176
176
|
label: S.label,
|
|
177
177
|
value: S.value,
|
|
@@ -202,12 +202,12 @@ const tt = {
|
|
|
202
202
|
required: !0
|
|
203
203
|
}
|
|
204
204
|
},
|
|
205
|
-
setup(
|
|
205
|
+
setup(N) {
|
|
206
206
|
const {
|
|
207
|
-
t:
|
|
208
|
-
} = Z(), l =
|
|
207
|
+
t: x
|
|
208
|
+
} = Z(), l = N, p = he(), i = [{
|
|
209
209
|
accessorKey: "restaurantName",
|
|
210
|
-
header:
|
|
210
|
+
header: x("menu.publish.scheduler_publish.restaurant_publish_details.table.column.restaurant"),
|
|
211
211
|
cell: (a) => {
|
|
212
212
|
const n = a.getValue();
|
|
213
213
|
return B("p", {
|
|
@@ -218,7 +218,7 @@ const tt = {
|
|
|
218
218
|
}, {
|
|
219
219
|
id: "status",
|
|
220
220
|
accessorKey: "publishStatus",
|
|
221
|
-
header:
|
|
221
|
+
header: x("menu.publish.scheduler_publish.restaurant_publish_details.table.column.status"),
|
|
222
222
|
cell: ({
|
|
223
223
|
row: a
|
|
224
224
|
}) => {
|
|
@@ -229,7 +229,7 @@ const tt = {
|
|
|
229
229
|
}
|
|
230
230
|
}, {
|
|
231
231
|
accessorKey: "publishedAt",
|
|
232
|
-
header:
|
|
232
|
+
header: x("menu.publish.scheduler_publish.restaurant_publish_details.table.column.published_at"),
|
|
233
233
|
cell: ({
|
|
234
234
|
row: a
|
|
235
235
|
}) => {
|
|
@@ -238,20 +238,20 @@ const tt = {
|
|
|
238
238
|
class: "whitespace-nowrap"
|
|
239
239
|
}, n);
|
|
240
240
|
}
|
|
241
|
-
}], g = P([]), h =
|
|
241
|
+
}], g = P([]), h = D(() => Object.entries(l.statusMap).map(([a, n]) => ({
|
|
242
242
|
label: n.label,
|
|
243
243
|
value: a
|
|
244
|
-
}))), _ = P(null), e =
|
|
244
|
+
}))), _ = P(null), e = D(() => Object.entries(l.restaurantPublishStatus).filter(([a, n]) => g.value.length === 0 ? !0 : g.value.includes(n.status)).filter(([a, n]) => !_.value || _.value.length === 0 ? !0 : _.value.includes(a)).map(([a, n]) => ({
|
|
245
245
|
restaurantName: s(a),
|
|
246
246
|
publishStatus: l.statusMap[n.status].label,
|
|
247
247
|
publishedAt: n.publishedAt ? E(n.publishedAt).format("YYYY-MM-DD HH:mm:ss") : ""
|
|
248
|
-
})).sort((a, n) => a.restaurantName.localeCompare(n.restaurantName))), k =
|
|
248
|
+
})).sort((a, n) => a.restaurantName.localeCompare(n.restaurantName))), k = D(() => {
|
|
249
249
|
var n, o;
|
|
250
250
|
const a = {};
|
|
251
251
|
for (const r of p.restaurants.value) {
|
|
252
252
|
if (!(r != null && r._id)) continue;
|
|
253
|
-
const d = (n = r == null ? void 0 : r.profile) == null ? void 0 : n.code,
|
|
254
|
-
a[r._id] = `${d ? d + " - " : ""}${
|
|
253
|
+
const d = (n = r == null ? void 0 : r.profile) == null ? void 0 : n.code, m = (o = r == null ? void 0 : r.profile) == null ? void 0 : o.name;
|
|
254
|
+
a[r._id] = `${d ? d + " - " : ""}${m || "Unknown Restaurant"}`;
|
|
255
255
|
}
|
|
256
256
|
return a;
|
|
257
257
|
});
|
|
@@ -260,7 +260,7 @@ const tt = {
|
|
|
260
260
|
}
|
|
261
261
|
return (a, n) => {
|
|
262
262
|
const o = $("FmSelect"), r = $("FmTable");
|
|
263
|
-
return y(), F(j, null, [f("div", it, [f("div", dt, [b(
|
|
263
|
+
return y(), F(j, null, [f("div", it, [f("div", dt, [b(c(Ve), {
|
|
264
264
|
multiple: "",
|
|
265
265
|
modelValue: _.value,
|
|
266
266
|
"onUpdate:modelValue": n[0] || (n[0] = (d) => _.value = d)
|
|
@@ -272,27 +272,24 @@ const tt = {
|
|
|
272
272
|
multiselect: "",
|
|
273
273
|
"hide-chips": ""
|
|
274
274
|
}, {
|
|
275
|
-
default:
|
|
276
|
-
var
|
|
277
|
-
return (
|
|
278
|
-
}).join(", ")), 1)) : (y(), F("div", mt,
|
|
275
|
+
default: z(() => [g.value.length > 0 ? (y(), F("div", ct, T(g.value.map((d) => {
|
|
276
|
+
var m;
|
|
277
|
+
return (m = l.statusMap[d]) == null ? void 0 : m.label;
|
|
278
|
+
}).join(", ")), 1)) : (y(), F("div", mt, T(c(x)("menu.publish.scheduler_publish.restaurant_publish_details.select_publish_status")), 1))]),
|
|
279
279
|
_: 1
|
|
280
|
-
}, 8, ["modelValue", "items"])]),
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
}))]),
|
|
294
|
-
_: 1
|
|
295
|
-
})], 64);
|
|
280
|
+
}, 8, ["modelValue", "items"])]), e.value.length > 0 ? (y(), Y(r, {
|
|
281
|
+
key: 0,
|
|
282
|
+
class: "flex-1 overflow-hidden",
|
|
283
|
+
"column-defs": i,
|
|
284
|
+
"row-data": e.value,
|
|
285
|
+
"page-size": Object.entries(l.restaurantPublishStatus).length,
|
|
286
|
+
"hide-footer": "",
|
|
287
|
+
"pin-header-row": ""
|
|
288
|
+
}, null, 8, ["row-data", "page-size"])) : (y(), Y(we, {
|
|
289
|
+
key: 1,
|
|
290
|
+
title: c(x)("menu.publish.scheduler_publish.restaurant_publish_details.no_publish_status"),
|
|
291
|
+
subtitle: ""
|
|
292
|
+
}, null, 8, ["title"]))], 64);
|
|
296
293
|
};
|
|
297
294
|
}
|
|
298
295
|
}), ht = { class: "fm-calendar__name-row fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, ft = ["id"], vt = {
|
|
@@ -307,15 +304,15 @@ const tt = {
|
|
|
307
304
|
onCellMouseOver: { type: Function, default: void 0 },
|
|
308
305
|
cellSize: { default: "md" }
|
|
309
306
|
},
|
|
310
|
-
setup(
|
|
311
|
-
const { t:
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
307
|
+
setup(N) {
|
|
308
|
+
const { t: x } = Z(), l = () => [
|
|
309
|
+
x("menu.publish.scheduler.calender.day.sun"),
|
|
310
|
+
x("menu.publish.scheduler.calender.day.mon"),
|
|
311
|
+
x("menu.publish.scheduler.calender.day.tue"),
|
|
312
|
+
x("menu.publish.scheduler.calender.day.wed"),
|
|
313
|
+
x("menu.publish.scheduler.calender.day.thu"),
|
|
314
|
+
x("menu.publish.scheduler.calender.day.fri"),
|
|
315
|
+
x("menu.publish.scheduler.calender.day.sat")
|
|
319
316
|
], p = E(), i = (h, _) => typeof h == "function" ? h(..._) : h, g = (h, _) => {
|
|
320
317
|
if (!_) return;
|
|
321
318
|
const e = {
|
|
@@ -339,7 +336,7 @@ const tt = {
|
|
|
339
336
|
(y(!0), F(j, null, Q(l(), (e) => (y(), F("div", {
|
|
340
337
|
key: e,
|
|
341
338
|
class: ce(["fm-calendar__cell", `fm-calendar__cell__${h.cellSize}`])
|
|
342
|
-
},
|
|
339
|
+
}, T(e), 3))), 128))
|
|
343
340
|
]),
|
|
344
341
|
f("div", null, [
|
|
345
342
|
(y(!0), F(j, null, Q(h.days, (e, k) => (y(), F("div", {
|
|
@@ -355,7 +352,7 @@ const tt = {
|
|
|
355
352
|
!s.isCurrentMonth && "fm-calendar__cell--not-current-month"
|
|
356
353
|
]])
|
|
357
354
|
}, [
|
|
358
|
-
s.date.isSame(
|
|
355
|
+
s.date.isSame(c(p), "day") && s.isCurrentMonth ? (y(), F("div", vt)) : X("", !0),
|
|
359
356
|
s.isCurrentMonth ? (y(), F("button", {
|
|
360
357
|
key: 1,
|
|
361
358
|
class: "fm-calendar__cell__button",
|
|
@@ -365,13 +362,13 @@ const tt = {
|
|
|
365
362
|
var n;
|
|
366
363
|
return (n = h.onCellMouseOver) == null ? void 0 : n.call(h, s.date);
|
|
367
364
|
}
|
|
368
|
-
},
|
|
365
|
+
}, T(s.date.date()), 41, bt)) : X("", !0)
|
|
369
366
|
], 10, ft))), 128))
|
|
370
367
|
]))), 128))
|
|
371
368
|
])
|
|
372
369
|
]));
|
|
373
370
|
}
|
|
374
|
-
}), ke = /* @__PURE__ */
|
|
371
|
+
}), ke = /* @__PURE__ */ Ie(_t, [["__scopeId", "data-v-47484312"]]), gt = { class: "fm-typo-en-body-md-600" }, yt = {
|
|
375
372
|
id: "in-calendar-app",
|
|
376
373
|
class: "h-[264px] overflow-y-auto w-[160px]"
|
|
377
374
|
}, kt = ["onVnodeMounted"], Ct = ["onVnodeMounted"], se = /* @__PURE__ */ J({
|
|
@@ -383,8 +380,8 @@ const tt = {
|
|
|
383
380
|
max: {}
|
|
384
381
|
},
|
|
385
382
|
emits: ["update:modelValue"],
|
|
386
|
-
setup(
|
|
387
|
-
const { t: l } = Z(), p =
|
|
383
|
+
setup(N, { emit: x }) {
|
|
384
|
+
const { t: l } = Z(), p = N, i = x, g = P(!1), h = D(() => {
|
|
388
385
|
const s = E(p.min).startOf("year"), a = E(p.max).startOf("year"), n = a.diff(s, "year"), o = [];
|
|
389
386
|
for (let r = 0; r <= n; r++)
|
|
390
387
|
o.push(a.subtract(r, "year"));
|
|
@@ -418,16 +415,16 @@ const tt = {
|
|
|
418
415
|
trigger: "click",
|
|
419
416
|
onMenuChanged: a[0] || (a[0] = (d) => g.value = d)
|
|
420
417
|
}, {
|
|
421
|
-
"menu-button":
|
|
418
|
+
"menu-button": z(() => [
|
|
422
419
|
f("div", {
|
|
423
420
|
class: ce(["flex gap-4 h-24 items-center px-4 rounded-sm", g.value ? "text-fm-color-primary" : "hover:bg-fm-color-neutral-gray-100"])
|
|
424
421
|
}, [
|
|
425
422
|
f("div", gt, [
|
|
426
423
|
s.picker === "month" ? (y(), F(j, { key: 0 }, [
|
|
427
|
-
_e(
|
|
424
|
+
_e(T(s.modelValue.format(c(l)("menu.publish.scheduler.date.monthFormat"))), 1)
|
|
428
425
|
], 64)) : X("", !0),
|
|
429
426
|
s.picker === "year" ? (y(), F(j, { key: 1 }, [
|
|
430
|
-
_e(
|
|
427
|
+
_e(T(s.modelValue.format(c(l)("menu.publish.scheduler.date.yearFormat"))), 1)
|
|
431
428
|
], 64)) : X("", !0)
|
|
432
429
|
]),
|
|
433
430
|
b(n, {
|
|
@@ -437,33 +434,33 @@ const tt = {
|
|
|
437
434
|
}, null, 8, ["name"])
|
|
438
435
|
], 2)
|
|
439
436
|
]),
|
|
440
|
-
default:
|
|
437
|
+
default: z(() => [
|
|
441
438
|
f("ul", yt, [
|
|
442
|
-
s.picker === "month" ? (y(!0), F(j, { key: 0 }, Q(Array.from(Array(12), (d,
|
|
443
|
-
key: d.format(
|
|
444
|
-
onVnodeMounted: (
|
|
445
|
-
|
|
446
|
-
s.modelValue.format(
|
|
439
|
+
s.picker === "month" ? (y(!0), F(j, { key: 0 }, Q(Array.from(Array(12), (d, m) => s.modelValue.month(m)), (d) => (y(), F("li", {
|
|
440
|
+
key: d.format(c(l)("menu.publish.scheduler.date.monthFormat")),
|
|
441
|
+
onVnodeMounted: (m) => k(
|
|
442
|
+
m,
|
|
443
|
+
s.modelValue.format(c(l)("menu.publish.scheduler.date.monthFormat")) === d.format(c(l)("menu.publish.scheduler.date.monthFormat"))
|
|
447
444
|
)
|
|
448
445
|
}, [
|
|
449
446
|
b(o, {
|
|
450
447
|
disabled: !_(d),
|
|
451
|
-
"model-value": s.modelValue.format(
|
|
452
|
-
label: d.format(
|
|
453
|
-
"onUpdate:modelValue": (
|
|
448
|
+
"model-value": s.modelValue.format(c(l)("menu.publish.scheduler.date.monthFormat")) === d.format(c(l)("menu.publish.scheduler.date.monthFormat")),
|
|
449
|
+
label: d.format(c(l)("menu.publish.scheduler.date.monthFormat")),
|
|
450
|
+
"onUpdate:modelValue": (m) => i("update:modelValue", d)
|
|
454
451
|
}, null, 8, ["disabled", "model-value", "label", "onUpdate:modelValue"])
|
|
455
452
|
], 8, kt))), 128)) : X("", !0),
|
|
456
453
|
s.picker === "year" ? (y(!0), F(j, { key: 1 }, Q(h.value, (d) => (y(), F("li", {
|
|
457
|
-
key: d.format(
|
|
458
|
-
onVnodeMounted: (
|
|
459
|
-
|
|
460
|
-
s.modelValue.format(
|
|
454
|
+
key: d.format(c(l)("menu.publish.scheduler.date.yearFormat")),
|
|
455
|
+
onVnodeMounted: (m) => k(
|
|
456
|
+
m,
|
|
457
|
+
s.modelValue.format(c(l)("menu.publish.scheduler.date.yearFormat")) === d.format(c(l)("menu.publish.scheduler.date.yearFormat"))
|
|
461
458
|
)
|
|
462
459
|
}, [
|
|
463
460
|
b(o, {
|
|
464
|
-
"model-value": s.modelValue.format(
|
|
465
|
-
label: d.format(
|
|
466
|
-
"onUpdate:modelValue": (
|
|
461
|
+
"model-value": s.modelValue.format(c(l)("menu.publish.scheduler.date.yearFormat")) === d.format(c(l)("menu.publish.scheduler.date.yearFormat")),
|
|
462
|
+
label: d.format(c(l)("menu.publish.scheduler.date.yearFormat")),
|
|
463
|
+
"onUpdate:modelValue": (m) => e(d)
|
|
467
464
|
}, null, 8, ["model-value", "label", "onUpdate:modelValue"])
|
|
468
465
|
], 8, Ct))), 128)) : X("", !0)
|
|
469
466
|
])
|
|
@@ -490,57 +487,57 @@ const tt = {
|
|
|
490
487
|
helperState: { default: "none" }
|
|
491
488
|
},
|
|
492
489
|
emits: ["update:schedulerTime"],
|
|
493
|
-
setup(
|
|
494
|
-
const { t: l } = Z(), p =
|
|
490
|
+
setup(N, { emit: x }) {
|
|
491
|
+
const { t: l } = Z(), p = N, i = x, g = Je(p, "modelValue"), h = P({
|
|
495
492
|
hours: new Date(g.value).getHours() % 12 || 12,
|
|
496
493
|
minutes: new Date(g.value).getMinutes(),
|
|
497
494
|
period: new Date(g.value).getHours() >= 12 ? "PM" : "AM"
|
|
498
495
|
/* AM */
|
|
499
496
|
}), _ = P(E(g.value, ne)), e = P(!1);
|
|
500
|
-
function k(
|
|
501
|
-
const [C,
|
|
497
|
+
function k(V, u) {
|
|
498
|
+
const [C, A, U] = V.split("-").map(Number), O = new Date(C, A - 1, U);
|
|
502
499
|
let M = u.hours % 12;
|
|
503
500
|
return u.period === "PM" && (M += 12), O.setHours(M), O.setMinutes(u.minutes), O.setSeconds(0), O.setMilliseconds(0), O;
|
|
504
501
|
}
|
|
505
502
|
const s = () => {
|
|
506
503
|
g.value = _.value.format(ne);
|
|
507
|
-
const
|
|
508
|
-
i("update:schedulerTime",
|
|
504
|
+
const V = k(g.value, h.value);
|
|
505
|
+
i("update:schedulerTime", V.toISOString()), setTimeout(() => {
|
|
509
506
|
e.value = !1;
|
|
510
507
|
}, 0);
|
|
511
508
|
}, a = () => {
|
|
512
509
|
_.value = g.value ? E(g.value) : null, e.value = !1;
|
|
513
|
-
}, n = (
|
|
514
|
-
e.value =
|
|
515
|
-
}, o = P(E().startOf("month")), r = P(E().startOf("month").add(1, "month")), d = (
|
|
516
|
-
|
|
517
|
-
},
|
|
518
|
-
const u = [], C =
|
|
519
|
-
let U =
|
|
510
|
+
}, n = (V) => {
|
|
511
|
+
e.value = V, V || a();
|
|
512
|
+
}, o = P(E().startOf("month")), r = P(E().startOf("month").add(1, "month")), d = (V, u) => {
|
|
513
|
+
V === "left" ? (o.value = u, r.value = u.add(1, "month")) : V === "right" && (r.value = u, o.value = u.subtract(1, "month"));
|
|
514
|
+
}, m = D(() => S(o.value)), R = D(() => S(o.value.add(1, "month"))), S = (V) => {
|
|
515
|
+
const u = [], C = V.endOf("month"), A = V.month();
|
|
516
|
+
let U = V.startOf("week"), O = [];
|
|
520
517
|
for (; U.isBefore(C.endOf("week")); )
|
|
521
518
|
U.day() === 0 && O.length > 0 && (u.push(O), O = []), O.push({
|
|
522
519
|
date: U,
|
|
523
|
-
isCurrentMonth: U.month() ===
|
|
520
|
+
isCurrentMonth: U.month() === A
|
|
524
521
|
}), U = U.add(1, "day");
|
|
525
522
|
return O.length > 0 && u.push(O), u.length < 6 && u.push([]), u;
|
|
526
|
-
}, H = (
|
|
527
|
-
_.value =
|
|
523
|
+
}, H = (V) => {
|
|
524
|
+
_.value = V;
|
|
528
525
|
};
|
|
529
|
-
return (
|
|
530
|
-
const C = $("FmIcon"),
|
|
526
|
+
return (V, u) => {
|
|
527
|
+
const C = $("FmIcon"), A = $("FmTimeInput"), U = $("FmButton"), O = $("FmPopover");
|
|
531
528
|
return y(), Y(O, {
|
|
532
529
|
"show-popover": e.value,
|
|
533
530
|
"z-index": p.zIndex,
|
|
534
531
|
"exclude-el-from-click-outside": ["in-calendar-app"],
|
|
535
532
|
onPopoverChanged: n
|
|
536
533
|
}, {
|
|
537
|
-
"popover-button":
|
|
538
|
-
f("div",
|
|
534
|
+
"popover-button": z(() => [
|
|
535
|
+
f("div", Ue({
|
|
539
536
|
opened: e.value,
|
|
540
|
-
showValidBorder:
|
|
537
|
+
showValidBorder: V.showValidBorder
|
|
541
538
|
}, { class: "text-fm-color-primary" }), " Select Date & Time ", 16)
|
|
542
539
|
]),
|
|
543
|
-
default:
|
|
540
|
+
default: z(() => [
|
|
544
541
|
f("div", wt, [
|
|
545
542
|
f("div", xt, [
|
|
546
543
|
f("div", Vt, [
|
|
@@ -556,15 +553,15 @@ const tt = {
|
|
|
556
553
|
}),
|
|
557
554
|
f("div", Ft, [
|
|
558
555
|
b(se, {
|
|
559
|
-
max:
|
|
560
|
-
min:
|
|
556
|
+
max: V.max,
|
|
557
|
+
min: V.min,
|
|
561
558
|
"model-value": o.value,
|
|
562
559
|
picker: "month",
|
|
563
560
|
"onUpdate:modelValue": u[1] || (u[1] = (M) => d("left", M))
|
|
564
561
|
}, null, 8, ["max", "min", "model-value"]),
|
|
565
562
|
b(se, {
|
|
566
|
-
max:
|
|
567
|
-
min:
|
|
563
|
+
max: V.max,
|
|
564
|
+
min: V.min,
|
|
568
565
|
"model-value": o.value,
|
|
569
566
|
picker: "year",
|
|
570
567
|
"onUpdate:modelValue": u[2] || (u[2] = (M) => d("left", M))
|
|
@@ -577,7 +574,7 @@ const tt = {
|
|
|
577
574
|
isSelected: (M) => M.isSame(_.value, "date")
|
|
578
575
|
}
|
|
579
576
|
},
|
|
580
|
-
days:
|
|
577
|
+
days: m.value,
|
|
581
578
|
"on-day-click": (M) => H(M.date)
|
|
582
579
|
}, null, 8, ["day-cell-class", "days", "on-day-click"])
|
|
583
580
|
]),
|
|
@@ -585,15 +582,15 @@ const tt = {
|
|
|
585
582
|
f("div", It, [
|
|
586
583
|
f("div", Pt, [
|
|
587
584
|
b(se, {
|
|
588
|
-
max:
|
|
589
|
-
min:
|
|
585
|
+
max: V.max,
|
|
586
|
+
min: V.min,
|
|
590
587
|
"model-value": r.value,
|
|
591
588
|
picker: "month",
|
|
592
589
|
"onUpdate:modelValue": u[3] || (u[3] = (M) => d("right", M))
|
|
593
590
|
}, null, 8, ["max", "min", "model-value"]),
|
|
594
591
|
b(se, {
|
|
595
|
-
max:
|
|
596
|
-
min:
|
|
592
|
+
max: V.max,
|
|
593
|
+
min: V.min,
|
|
597
594
|
"model-value": r.value,
|
|
598
595
|
picker: "year",
|
|
599
596
|
"onUpdate:modelValue": u[4] || (u[4] = (M) => d("right", M))
|
|
@@ -620,7 +617,7 @@ const tt = {
|
|
|
620
617
|
])
|
|
621
618
|
])
|
|
622
619
|
]),
|
|
623
|
-
b(
|
|
620
|
+
b(A, {
|
|
624
621
|
"model-value": h.value ?? {
|
|
625
622
|
hours: 0,
|
|
626
623
|
minutes: 0,
|
|
@@ -631,14 +628,14 @@ const tt = {
|
|
|
631
628
|
}, null, 8, ["model-value"]),
|
|
632
629
|
f("div", Mt, [
|
|
633
630
|
b(U, {
|
|
634
|
-
label:
|
|
631
|
+
label: c(l)("common.cancel"),
|
|
635
632
|
size: "md",
|
|
636
633
|
variant: "tertiary",
|
|
637
634
|
onClick: a
|
|
638
635
|
}, null, 8, ["label"]),
|
|
639
636
|
b(U, {
|
|
640
637
|
disabled: !_.value,
|
|
641
|
-
label:
|
|
638
|
+
label: c(l)("common.confirm"),
|
|
642
639
|
size: "md",
|
|
643
640
|
variant: "primary",
|
|
644
641
|
onClick: s
|
|
@@ -650,28 +647,28 @@ const tt = {
|
|
|
650
647
|
}, 8, ["show-popover", "z-index"]);
|
|
651
648
|
};
|
|
652
649
|
}
|
|
653
|
-
}),
|
|
650
|
+
}), At = { class: "container" }, Dt = /* @__PURE__ */ J({
|
|
654
651
|
__name: "ProgressBar",
|
|
655
652
|
props: {
|
|
656
653
|
bgcolor: {},
|
|
657
654
|
completed: {}
|
|
658
655
|
},
|
|
659
|
-
setup(
|
|
660
|
-
const
|
|
656
|
+
setup(N) {
|
|
657
|
+
const x = N, l = D(() => ({
|
|
661
658
|
height: "100%",
|
|
662
|
-
width: `${
|
|
663
|
-
backgroundColor:
|
|
659
|
+
width: `${x.completed ?? 0}%`,
|
|
660
|
+
backgroundColor: x.bgcolor,
|
|
664
661
|
transition: "width 1s ease-in-out",
|
|
665
662
|
borderRadius: "inherit",
|
|
666
663
|
textAlign: "right"
|
|
667
664
|
}));
|
|
668
|
-
return (p, i) => (y(), F("div",
|
|
665
|
+
return (p, i) => (y(), F("div", At, [
|
|
669
666
|
f("div", {
|
|
670
|
-
style:
|
|
667
|
+
style: Oe(l.value)
|
|
671
668
|
}, null, 4)
|
|
672
669
|
]));
|
|
673
670
|
}
|
|
674
|
-
}),
|
|
671
|
+
}), Nt = /* @__PURE__ */ Ie(Dt, [["__scopeId", "data-v-709d7500"]]), Rt = {
|
|
675
672
|
class: "flex items-center gap-24"
|
|
676
673
|
}, Ut = {
|
|
677
674
|
class: "fm-typo-en-title-md-600"
|
|
@@ -688,13 +685,13 @@ const tt = {
|
|
|
688
685
|
}
|
|
689
686
|
},
|
|
690
687
|
emits: ["publishMenu"],
|
|
691
|
-
setup(
|
|
692
|
-
expose:
|
|
688
|
+
setup(N, {
|
|
689
|
+
expose: x,
|
|
693
690
|
emit: l
|
|
694
691
|
}) {
|
|
695
692
|
const {
|
|
696
693
|
t: p
|
|
697
|
-
} = Z(), i = fe(), g = Se(), h =
|
|
694
|
+
} = Z(), i = fe(), g = Se(), h = N, _ = {
|
|
698
695
|
[W.enum.PENDING]: {
|
|
699
696
|
label: p("menu.publish.scheduler_publish.status.pending"),
|
|
700
697
|
textColor: "text-fm-color-neutral-gray-300",
|
|
@@ -718,25 +715,25 @@ const tt = {
|
|
|
718
715
|
}, e = xe(), k = P(!1), s = (u) => {
|
|
719
716
|
typeof u == "boolean" ? k.value = u : k.value = !k.value;
|
|
720
717
|
};
|
|
721
|
-
|
|
718
|
+
x({
|
|
722
719
|
show: k,
|
|
723
720
|
trigger: s
|
|
724
721
|
});
|
|
725
|
-
const a = l, n =
|
|
722
|
+
const a = l, n = D(() => e.state.nextSchedulerPublish ?? {}), o = D(() => Object.entries(n.value).map(([C, A]) => {
|
|
726
723
|
var M;
|
|
727
|
-
const U = e.runningPublishJob, O = Object.keys(
|
|
724
|
+
const U = e.runningPublishJob, O = Object.keys(A.restaurants || {}).length;
|
|
728
725
|
return {
|
|
729
726
|
date: C,
|
|
730
|
-
publisher: ((M =
|
|
727
|
+
publisher: ((M = A.owner) == null ? void 0 : M.name) ?? "Unknown",
|
|
731
728
|
total_restaurants: p("menu.publish.scheduler_publish.table.row.restaurants", {
|
|
732
729
|
total: O
|
|
733
730
|
}),
|
|
734
|
-
restaurantPublishStatus:
|
|
735
|
-
status:
|
|
731
|
+
restaurantPublishStatus: A.restaurants || {},
|
|
732
|
+
status: A.status,
|
|
736
733
|
progress: U === C ? h.progress ?? 0 : 0
|
|
737
734
|
// Only apply progress to the running job's row
|
|
738
735
|
};
|
|
739
|
-
})), r = P([]), d = P(null),
|
|
736
|
+
})), r = P([]), d = P(null), m = P(null), R = [{
|
|
740
737
|
accessorKey: "date",
|
|
741
738
|
header: p("menu.publish.scheduler_publish.table.columns.date"),
|
|
742
739
|
cell: ({
|
|
@@ -745,10 +742,10 @@ const tt = {
|
|
|
745
742
|
if (u.original.date === "new") {
|
|
746
743
|
if (d.value !== null)
|
|
747
744
|
return new Date(d.value).toLocaleString();
|
|
748
|
-
const
|
|
745
|
+
const A = E(Date.now()).toISOString();
|
|
749
746
|
return B($t, {
|
|
750
747
|
class: "flex h-full items-center",
|
|
751
|
-
modelValue:
|
|
748
|
+
modelValue: A,
|
|
752
749
|
"onUpdate:schedulerTime": (U) => {
|
|
753
750
|
d.value = U;
|
|
754
751
|
}
|
|
@@ -766,8 +763,8 @@ const tt = {
|
|
|
766
763
|
row: u
|
|
767
764
|
}) => u.original.date === "new" ? B(rt, {
|
|
768
765
|
restaurants: h.restaurants,
|
|
769
|
-
"onUpdate:modelValue": (
|
|
770
|
-
r.value =
|
|
766
|
+
"onUpdate:modelValue": (A) => {
|
|
767
|
+
r.value = A;
|
|
771
768
|
}
|
|
772
769
|
}) : B("p", {}, u.original.total_restaurants)
|
|
773
770
|
}, {
|
|
@@ -784,7 +781,7 @@ const tt = {
|
|
|
784
781
|
prependIcon: "close",
|
|
785
782
|
textColor: "system-error-300",
|
|
786
783
|
onClick: () => {
|
|
787
|
-
d.value = null, S.value = null,
|
|
784
|
+
d.value = null, S.value = null, m.value = null;
|
|
788
785
|
}
|
|
789
786
|
}), B(ee.FmButton, {
|
|
790
787
|
variant: "tertiary",
|
|
@@ -792,13 +789,13 @@ const tt = {
|
|
|
792
789
|
textColor: "system-success-300",
|
|
793
790
|
onClick: async () => {
|
|
794
791
|
if (!d.value || r.value.length === 0) {
|
|
795
|
-
|
|
792
|
+
m.value = !1, i.open({
|
|
796
793
|
type: "error",
|
|
797
794
|
message: "Please select date and restaurants to schedule publish."
|
|
798
795
|
});
|
|
799
796
|
return;
|
|
800
797
|
} else
|
|
801
|
-
|
|
798
|
+
m.value = !0;
|
|
802
799
|
}
|
|
803
800
|
})]) : B("div", {
|
|
804
801
|
class: "flex justify-between items-center gap-32"
|
|
@@ -810,7 +807,7 @@ const tt = {
|
|
|
810
807
|
class: `fm-typo-en-body-md-400 ${_[C].textColor}`
|
|
811
808
|
}, _[C].label), ...C === W.enum.RUNNING ? [B("p", {
|
|
812
809
|
class: `fm-typo-en-body-md-400 ${_[C].textColor}`
|
|
813
|
-
}, `(${u.original.progress}/${u.original.total_restaurants})`)] : []]), B(
|
|
810
|
+
}, `(${u.original.progress}/${u.original.total_restaurants})`)] : []]), B(Nt, {
|
|
814
811
|
bgcolor: _[C].backgroundColor,
|
|
815
812
|
completed: C === W.enum.PENDING ? 0 : C === W.enum.RUNNING ? Math.floor((u.original.progress ?? 0) / parseInt(u.original.total_restaurants) * 100) : (C === W.enum.COMPLETED, 100)
|
|
816
813
|
})]), B(ee.FmButton, {
|
|
@@ -826,7 +823,8 @@ const tt = {
|
|
|
826
823
|
statusMap: _
|
|
827
824
|
},
|
|
828
825
|
contentClass: "flex flex-col h-full",
|
|
829
|
-
maxWidth: "800px"
|
|
826
|
+
maxWidth: "800px",
|
|
827
|
+
maxHeight: "80vh"
|
|
830
828
|
});
|
|
831
829
|
}
|
|
832
830
|
}), B(ee.FmButton, {
|
|
@@ -871,48 +869,48 @@ const tt = {
|
|
|
871
869
|
});
|
|
872
870
|
const S = P(null);
|
|
873
871
|
function H() {
|
|
874
|
-
|
|
872
|
+
m.value = !1, S.value = {
|
|
875
873
|
date: "new",
|
|
876
874
|
restaurantsIds: []
|
|
877
875
|
};
|
|
878
876
|
}
|
|
879
|
-
pe(
|
|
877
|
+
pe(m, async (u) => {
|
|
880
878
|
u && (a("publishMenu", {
|
|
881
879
|
schedulerTime: d.value,
|
|
882
880
|
restaurantIds: r.value
|
|
883
|
-
}), await e.getNextSchedulerPublish(), d.value = null, r.value = [],
|
|
881
|
+
}), await e.getNextSchedulerPublish(), d.value = null, r.value = [], m.value = !1, S.value = null, m.value = null);
|
|
884
882
|
});
|
|
885
|
-
const
|
|
886
|
-
k.value = !1, S.value = null, d.value = null, r.value = [],
|
|
883
|
+
const V = Fe(() => m.value !== null && m.value === !1, () => {
|
|
884
|
+
k.value = !1, S.value = null, d.value = null, r.value = [], m.value = null;
|
|
887
885
|
});
|
|
888
886
|
return (u, C) => {
|
|
889
|
-
const
|
|
890
|
-
return y(), F(j, null, [
|
|
887
|
+
const A = $("FmButton"), U = $("FmTable"), O = $("FmSideSheet");
|
|
888
|
+
return y(), F(j, null, [Be(u.$slots, "default", {
|
|
891
889
|
trigger: s
|
|
892
890
|
}), b(O, {
|
|
893
891
|
modelValue: k.value,
|
|
894
892
|
"onUpdate:modelValue": C[1] || (C[1] = (M) => k.value = M),
|
|
895
893
|
"close-button": !1,
|
|
896
894
|
"max-width": 800,
|
|
897
|
-
"onOn:clickedAway":
|
|
895
|
+
"onOn:clickedAway": c(V)
|
|
898
896
|
}, {
|
|
899
|
-
"side-sheet-header":
|
|
900
|
-
variant:
|
|
897
|
+
"side-sheet-header": z(() => [f("div", Rt, [b(A, {
|
|
898
|
+
variant: c(ye).Tertiary,
|
|
901
899
|
"prepend-icon": "arrow_back",
|
|
902
|
-
onClick: le(
|
|
903
|
-
}, null, 8, ["variant", "onClick"]), f("p", Ut,
|
|
904
|
-
default:
|
|
900
|
+
onClick: le(c(V), ["stop"])
|
|
901
|
+
}, null, 8, ["variant", "onClick"]), f("p", Ut, T(c(p)("menu.publish.actions.publish_progress")), 1)])]),
|
|
902
|
+
default: z(() => [f("div", null, [b(U, {
|
|
905
903
|
class: "pb-8",
|
|
906
904
|
"row-data": [...o.value, S.value].filter(Boolean),
|
|
907
905
|
"column-defs": R,
|
|
908
906
|
"shrink-at": !1,
|
|
909
907
|
pageSize: o.value.length + (S.value ? 1 : 0),
|
|
910
908
|
"hide-footer": ""
|
|
911
|
-
}, null, 8, ["row-data", "pageSize"]),
|
|
909
|
+
}, null, 8, ["row-data", "pageSize"]), c(e).state.featureFlags.schedulerPublish && !S.value ? (y(), Y(A, {
|
|
912
910
|
key: 0,
|
|
913
|
-
variant:
|
|
911
|
+
variant: c(ye).Plain,
|
|
914
912
|
"prepend-icon": "add",
|
|
915
|
-
label:
|
|
913
|
+
label: c(p)("menu.publish.actions.add_scheduler_publish"),
|
|
916
914
|
onClick: C[0] || (C[0] = () => H())
|
|
917
915
|
}, null, 8, ["variant", "label"])) : X("", !0)])]),
|
|
918
916
|
_: 1
|
|
@@ -928,9 +926,9 @@ const tt = {
|
|
|
928
926
|
}
|
|
929
927
|
},
|
|
930
928
|
emits: ["onComplete"],
|
|
931
|
-
setup(
|
|
932
|
-
const { t: p } = Z(), i =
|
|
933
|
-
|
|
929
|
+
setup(N, { expose: x, emit: l }) {
|
|
930
|
+
const { t: p } = Z(), i = N;
|
|
931
|
+
x({
|
|
934
932
|
show: n,
|
|
935
933
|
hide: o
|
|
936
934
|
});
|
|
@@ -944,33 +942,33 @@ const tt = {
|
|
|
944
942
|
additionalCatalogs: []
|
|
945
943
|
};
|
|
946
944
|
}
|
|
947
|
-
const _ =
|
|
945
|
+
const _ = D(() => [
|
|
948
946
|
{
|
|
949
947
|
label: p("menu.publish.update_catalog_dialog.sections.default.use_default"),
|
|
950
948
|
value: null
|
|
951
949
|
},
|
|
952
|
-
...i.catalogs.map((
|
|
953
|
-
label:
|
|
954
|
-
value:
|
|
950
|
+
...i.catalogs.map((m) => ({
|
|
951
|
+
label: m.name,
|
|
952
|
+
value: m._id
|
|
955
953
|
}))
|
|
956
|
-
]), e =
|
|
954
|
+
]), e = D(() => [
|
|
957
955
|
{
|
|
958
956
|
label: p("menu.publish.update_catalog_dialog.sections.default.use_default"),
|
|
959
957
|
value: null
|
|
960
958
|
},
|
|
961
|
-
...i.catalogs.map((
|
|
962
|
-
label:
|
|
963
|
-
value:
|
|
959
|
+
...i.catalogs.map((m) => ({
|
|
960
|
+
label: m.name,
|
|
961
|
+
value: m._id
|
|
964
962
|
}))
|
|
965
963
|
]), k = P(h()), s = P(!1), a = P(void 0);
|
|
966
|
-
function n(
|
|
967
|
-
a.value =
|
|
964
|
+
function n(m) {
|
|
965
|
+
a.value = m ? ge(m) : h(), k.value = ge(a.value), s.value = !0;
|
|
968
966
|
}
|
|
969
967
|
function o() {
|
|
970
968
|
s.value = !1;
|
|
971
969
|
}
|
|
972
|
-
const r =
|
|
973
|
-
() => !
|
|
970
|
+
const r = Fe(
|
|
971
|
+
() => !He.isEqual(a.value, k.value),
|
|
974
972
|
() => {
|
|
975
973
|
o();
|
|
976
974
|
}
|
|
@@ -978,63 +976,63 @@ const tt = {
|
|
|
978
976
|
function d() {
|
|
979
977
|
o(), g("onComplete", k.value);
|
|
980
978
|
}
|
|
981
|
-
return (
|
|
982
|
-
const S = $("FmSelect"), H = $("FmCheckbox"),
|
|
979
|
+
return (m, R) => {
|
|
980
|
+
const S = $("FmSelect"), H = $("FmCheckbox"), V = $("FmButton"), u = $("FmSideSheet");
|
|
983
981
|
return y(), Y(u, {
|
|
984
982
|
modelValue: s.value,
|
|
985
983
|
"onUpdate:modelValue": R[5] || (R[5] = (C) => s.value = C),
|
|
986
984
|
"max-width": 560,
|
|
987
|
-
"onOn:clickedAway":
|
|
985
|
+
"onOn:clickedAway": c(r)
|
|
988
986
|
}, {
|
|
989
|
-
"side-sheet-header":
|
|
990
|
-
f("span", Bt,
|
|
987
|
+
"side-sheet-header": z(() => [
|
|
988
|
+
f("span", Bt, T(c(p)("menu.publish.update_catalog_dialog.title")), 1)
|
|
991
989
|
]),
|
|
992
|
-
"side-sheet-footer":
|
|
990
|
+
"side-sheet-footer": z(() => [
|
|
993
991
|
f("div", Lt, [
|
|
994
|
-
b(
|
|
995
|
-
label:
|
|
992
|
+
b(V, {
|
|
993
|
+
label: c(p)("menu.publish.update_catalog_dialog.actions.update"),
|
|
996
994
|
size: "lg",
|
|
997
995
|
variant: "primary",
|
|
998
996
|
onClick: R[4] || (R[4] = () => d())
|
|
999
997
|
}, null, 8, ["label"]),
|
|
1000
|
-
b(
|
|
1001
|
-
label:
|
|
998
|
+
b(V, {
|
|
999
|
+
label: c(p)("menu.publish.update_catalog_dialog.actions.cancel"),
|
|
1002
1000
|
size: "lg",
|
|
1003
1001
|
variant: "tertiary",
|
|
1004
1002
|
onClick: o
|
|
1005
1003
|
}, null, 8, ["label"])
|
|
1006
1004
|
])
|
|
1007
1005
|
]),
|
|
1008
|
-
default:
|
|
1006
|
+
default: z(() => [
|
|
1009
1007
|
b(S, {
|
|
1010
1008
|
modelValue: k.value.catalogId,
|
|
1011
1009
|
"onUpdate:modelValue": R[0] || (R[0] = (C) => k.value.catalogId = C),
|
|
1012
1010
|
items: _.value,
|
|
1013
1011
|
class: "mb-24",
|
|
1014
|
-
label:
|
|
1012
|
+
label: c(p)("menu.publish.update_catalog_dialog.sections.default.label")
|
|
1015
1013
|
}, null, 8, ["modelValue", "items", "label"]),
|
|
1016
1014
|
b(S, {
|
|
1017
1015
|
modelValue: k.value.takeawayCatalog,
|
|
1018
1016
|
"onUpdate:modelValue": R[1] || (R[1] = (C) => k.value.takeawayCatalog = C),
|
|
1019
1017
|
items: e.value,
|
|
1020
1018
|
class: "mb-24",
|
|
1021
|
-
label:
|
|
1019
|
+
label: c(p)("menu.publish.update_catalog_dialog.sections.pos_takeaway.label")
|
|
1022
1020
|
}, null, 8, ["modelValue", "items", "label"]),
|
|
1023
1021
|
b(S, {
|
|
1024
1022
|
modelValue: k.value.pickupCatalog,
|
|
1025
1023
|
"onUpdate:modelValue": R[2] || (R[2] = (C) => k.value.pickupCatalog = C),
|
|
1026
1024
|
items: e.value,
|
|
1027
|
-
label:
|
|
1025
|
+
label: c(p)("menu.publish.update_catalog_dialog.sections.pickup.label")
|
|
1028
1026
|
}, null, 8, ["modelValue", "items", "label"]),
|
|
1029
1027
|
f("div", Tt, [
|
|
1030
|
-
f("div", zt,
|
|
1031
|
-
f("div", Et,
|
|
1032
|
-
(y(!0), F(j, null, Q(
|
|
1028
|
+
f("div", zt, T(c(p)("menu.publish.update_catalog_dialog.sections.additional.title")), 1),
|
|
1029
|
+
f("div", Et, T(c(p)("menu.publish.update_catalog_dialog.sections.additional.subtitle")), 1),
|
|
1030
|
+
(y(!0), F(j, null, Q(N.catalogs, (C) => (y(), F("div", {
|
|
1033
1031
|
key: C._id
|
|
1034
1032
|
}, [
|
|
1035
1033
|
b(H, {
|
|
1036
1034
|
modelValue: k.value.additionalCatalogs,
|
|
1037
|
-
"onUpdate:modelValue": R[3] || (R[3] = (
|
|
1035
|
+
"onUpdate:modelValue": R[3] || (R[3] = (A) => k.value.additionalCatalogs = A),
|
|
1038
1036
|
label: C.name,
|
|
1039
1037
|
value: C._id
|
|
1040
1038
|
}, null, 8, ["modelValue", "label", "value"])
|
|
@@ -1079,14 +1077,14 @@ const tt = {
|
|
|
1079
1077
|
class: "xs:block hidden fixed bottom-72 right-16"
|
|
1080
1078
|
}, _l = /* @__PURE__ */ J({
|
|
1081
1079
|
__name: "Publish",
|
|
1082
|
-
setup(
|
|
1083
|
-
const
|
|
1080
|
+
setup(N) {
|
|
1081
|
+
const x = ze(), {
|
|
1084
1082
|
t: l
|
|
1085
1083
|
} = Z(), p = ({
|
|
1086
1084
|
row: t
|
|
1087
1085
|
}) => {
|
|
1088
1086
|
const v = t.status === "latest";
|
|
1089
|
-
return b(
|
|
1087
|
+
return b(We, {
|
|
1090
1088
|
label: l(v ? "menu.publish.table.status.latest" : "menu.publish.table.status.outdated"),
|
|
1091
1089
|
variant: v ? "success" : "warning"
|
|
1092
1090
|
}, null);
|
|
@@ -1116,7 +1114,7 @@ const tt = {
|
|
|
1116
1114
|
enableSorting: !1,
|
|
1117
1115
|
cell: (t) => {
|
|
1118
1116
|
const v = t.getValue();
|
|
1119
|
-
return
|
|
1117
|
+
return m(v);
|
|
1120
1118
|
}
|
|
1121
1119
|
}, {
|
|
1122
1120
|
accessorKey: "status",
|
|
@@ -1145,7 +1143,7 @@ const tt = {
|
|
|
1145
1143
|
icon: "ios_share",
|
|
1146
1144
|
variant: "secondary",
|
|
1147
1145
|
onClick: le(async () => {
|
|
1148
|
-
const w =
|
|
1146
|
+
const w = V(t.row.original);
|
|
1149
1147
|
await U(w);
|
|
1150
1148
|
}, ["stop", "prevent"])
|
|
1151
1149
|
})]);
|
|
@@ -1153,7 +1151,7 @@ const tt = {
|
|
|
1153
1151
|
meta: {
|
|
1154
1152
|
width: "150px"
|
|
1155
1153
|
}
|
|
1156
|
-
}], h = P(""), _ = P(), e = xe(), k = he(), s =
|
|
1154
|
+
}], h = P(""), _ = P(), e = xe(), k = he(), s = D(() => {
|
|
1157
1155
|
var v;
|
|
1158
1156
|
const t = /* @__PURE__ */ new Map();
|
|
1159
1157
|
for (const w of k.restaurants.value)
|
|
@@ -1164,7 +1162,7 @@ const tt = {
|
|
|
1164
1162
|
const w = s.value.get(t);
|
|
1165
1163
|
return w ? `${v} (${w})` : v;
|
|
1166
1164
|
}
|
|
1167
|
-
const n = Se(), o =
|
|
1165
|
+
const n = Se(), o = D(() => e.version !== qe.enum.v3);
|
|
1168
1166
|
async function r(t) {
|
|
1169
1167
|
t.revertConfig && n.open({
|
|
1170
1168
|
title: "Revert menu",
|
|
@@ -1181,7 +1179,7 @@ const tt = {
|
|
|
1181
1179
|
close: !0
|
|
1182
1180
|
}
|
|
1183
1181
|
}).onPrimary(async () => {
|
|
1184
|
-
await
|
|
1182
|
+
await A.minor(async () => {
|
|
1185
1183
|
await e.revertRestaurantMenu(t._id);
|
|
1186
1184
|
}, {
|
|
1187
1185
|
customId: t._id,
|
|
@@ -1189,18 +1187,18 @@ const tt = {
|
|
|
1189
1187
|
});
|
|
1190
1188
|
});
|
|
1191
1189
|
}
|
|
1192
|
-
const d =
|
|
1193
|
-
version:
|
|
1190
|
+
const d = D(() => l("menu.publish.labels.main_version", {
|
|
1191
|
+
version: m(e.state.menu.updatedAt)
|
|
1194
1192
|
}));
|
|
1195
|
-
function
|
|
1193
|
+
function m(t) {
|
|
1196
1194
|
return t ? E(t).format("DD/MM/YYYY hh:mmA") : "";
|
|
1197
1195
|
}
|
|
1198
|
-
const R =
|
|
1196
|
+
const R = D(() => e.state.menu.modules.catalog), S = D(() => A.queue.value.some((t) => t.id === e.state.menu._id));
|
|
1199
1197
|
function H(t) {
|
|
1200
1198
|
var v;
|
|
1201
1199
|
return t ? ((v = R.value.find((w) => w._id === t)) == null ? void 0 : v.name) ?? l("menu.publish.labels.catalog.invalid") : l("menu.publish.labels.catalog.main");
|
|
1202
1200
|
}
|
|
1203
|
-
function
|
|
1201
|
+
function V(t) {
|
|
1204
1202
|
return {
|
|
1205
1203
|
restaurantId: t._id,
|
|
1206
1204
|
catalogId: t.catalogId,
|
|
@@ -1211,20 +1209,20 @@ const tt = {
|
|
|
1211
1209
|
}
|
|
1212
1210
|
function u(t) {
|
|
1213
1211
|
var w;
|
|
1214
|
-
const v =
|
|
1212
|
+
const v = V(t);
|
|
1215
1213
|
(w = _.value) == null || w.show(v);
|
|
1216
1214
|
}
|
|
1217
|
-
const C = fe(),
|
|
1215
|
+
const C = fe(), A = Ce(C);
|
|
1218
1216
|
async function U(t) {
|
|
1219
1217
|
var w;
|
|
1220
1218
|
const v = (w = q.value.find((G) => G._id === t.restaurantId)) == null ? void 0 : w.name;
|
|
1221
|
-
await
|
|
1219
|
+
await A.minor(async () => await e.publishMenu(t), {
|
|
1222
1220
|
customId: e.state.menu._id,
|
|
1223
1221
|
message: `Publishing menu for ${v}`,
|
|
1224
1222
|
successMessage: `Published to ${v}`
|
|
1225
1223
|
});
|
|
1226
1224
|
}
|
|
1227
|
-
const O = P(null), M =
|
|
1225
|
+
const O = P(null), M = D(() => l("menu.common.labels.status")), ve = D(() => l("menu.publish.table.status.latest")), be = D(() => l("menu.publish.table.status.outdated")), q = D(() => {
|
|
1228
1226
|
const t = h.value.toLowerCase(), v = e.state.menu.updatedAt;
|
|
1229
1227
|
return e.state.restaurants.filter((w) => {
|
|
1230
1228
|
var G;
|
|
@@ -1239,21 +1237,21 @@ const tt = {
|
|
|
1239
1237
|
},
|
|
1240
1238
|
status: v === w.updatedAt ? "latest" : "outdated",
|
|
1241
1239
|
[M.value]: v === w.updatedAt ? ve.value : be.value
|
|
1242
|
-
})).filter((w) =>
|
|
1240
|
+
})).filter((w) => Ee(w, oe.value)).filter(({
|
|
1243
1241
|
displayName: w,
|
|
1244
1242
|
catalog: G
|
|
1245
1243
|
}) => t ? w.toLowerCase().includes(t) || G.default.toLowerCase().includes(t) || G.takeaway.toLowerCase().includes(t) || G.pickup.toLowerCase().includes(t) : !0);
|
|
1246
1244
|
}), oe = P({
|
|
1247
1245
|
logic: "AND",
|
|
1248
1246
|
rules: []
|
|
1249
|
-
}),
|
|
1247
|
+
}), Me = D(() => [{
|
|
1250
1248
|
type: "string",
|
|
1251
1249
|
key: M.value,
|
|
1252
1250
|
entity: "menu",
|
|
1253
1251
|
values: [ve.value, be.value]
|
|
1254
1252
|
}]), ae = P(0), L = P(null), te = P(null), ue = P(null);
|
|
1255
|
-
async function
|
|
1256
|
-
await
|
|
1253
|
+
async function $e() {
|
|
1254
|
+
await A.minor(async () => await e.readRestaurants(), {
|
|
1257
1255
|
customId: e.state.menu._id
|
|
1258
1256
|
}), await e.getNextSchedulerPublish(), e.runningPublishJob !== null ? L.value === null && (L.value = setInterval(async () => {
|
|
1259
1257
|
await ie();
|
|
@@ -1263,14 +1261,14 @@ const tt = {
|
|
|
1263
1261
|
if (S.value) return;
|
|
1264
1262
|
const v = Object.keys(i.value).filter((K) => i.value[K]), w = v.length === 0 || v.length === q.value.length ? q.value : q.value.filter((K) => v.includes(K._id));
|
|
1265
1263
|
if (t ? t.restaurantIds.length === e.state.restaurants.length : q.value.length === e.state.restaurants.length && (v.length === 0 || v.length === q.value.length))
|
|
1266
|
-
await
|
|
1264
|
+
await A.minor(async () => {
|
|
1267
1265
|
await e.publishAllMenu(t == null ? void 0 : t.schedulerTime);
|
|
1268
1266
|
}, {
|
|
1269
1267
|
successMessage: "Menu publish registered for all restaurants."
|
|
1270
1268
|
}), te.value = !1;
|
|
1271
1269
|
else {
|
|
1272
1270
|
const K = (t == null ? void 0 : t.restaurantIds) || w.map((de) => de._id);
|
|
1273
|
-
await
|
|
1271
|
+
await A.minor(async () => {
|
|
1274
1272
|
await e.publishMultipleMenu(K, t == null ? void 0 : t.schedulerTime, !1);
|
|
1275
1273
|
}, {
|
|
1276
1274
|
successMessage: `Menu publish registered for ${t != null && t.restaurantIds ? t.restaurantIds.length : w.length} restaurant(s).`
|
|
@@ -1289,34 +1287,34 @@ const tt = {
|
|
|
1289
1287
|
await e.getNextSchedulerPublish(), L.value === null && (L.value = setInterval(async () => {
|
|
1290
1288
|
await ie();
|
|
1291
1289
|
}, 3e4));
|
|
1292
|
-
}),
|
|
1290
|
+
}), Te(() => {
|
|
1293
1291
|
L.value != null && (clearInterval(L.value), L.value = null);
|
|
1294
1292
|
}), (t, v) => {
|
|
1295
|
-
const w = $("FmChip"), G = $("FmSpacer"), K = $("FmButton"), de = $("FmBadge"), Ae = $("FmSearch"), De = $("FmTable"),
|
|
1296
|
-
return y(), F(j, null, [f("div", Kt, [f("div", Yt, [f("div", Ht, [f("div", qt,
|
|
1293
|
+
const w = $("FmChip"), G = $("FmSpacer"), K = $("FmButton"), de = $("FmBadge"), Ae = $("FmSearch"), De = $("FmTable"), Ne = $("FmListItem"), Re = $("FmList");
|
|
1294
|
+
return y(), F(j, null, [f("div", Kt, [f("div", Yt, [f("div", Ht, [f("div", qt, T(c(l)("menu.publish.title")), 1)]), b(w, {
|
|
1297
1295
|
label: d.value,
|
|
1298
1296
|
class: "xs:hidden text-fm-color-primary bg-fm-color-system-warning-100"
|
|
1299
1297
|
}, null, 8, ["label"]), b(G), f("div", Gt, [b(K, {
|
|
1300
1298
|
disabled: S.value,
|
|
1301
|
-
label:
|
|
1299
|
+
label: c(l)("menu.publish.actions.refresh"),
|
|
1302
1300
|
variant: "secondary",
|
|
1303
|
-
onClick: v[0] || (v[0] = () =>
|
|
1301
|
+
onClick: v[0] || (v[0] = () => $e())
|
|
1304
1302
|
}, null, 8, ["disabled", "label"])]), f("div", Jt, [b(Ot, {
|
|
1305
1303
|
progress: ae.value,
|
|
1306
1304
|
restaurants: q.value,
|
|
1307
1305
|
onPublishMenu: v[1] || (v[1] = (I) => re(I))
|
|
1308
1306
|
}, {
|
|
1309
|
-
default:
|
|
1307
|
+
default: z(({
|
|
1310
1308
|
trigger: I
|
|
1311
|
-
}) => [
|
|
1309
|
+
}) => [c(e).runningPublishJob !== null ? (y(), Y(de, {
|
|
1312
1310
|
key: 0,
|
|
1313
1311
|
variant: "critical",
|
|
1314
1312
|
value: 1
|
|
1315
1313
|
}, {
|
|
1316
|
-
default:
|
|
1314
|
+
default: z(() => [b(K, {
|
|
1317
1315
|
variant: "secondary",
|
|
1318
1316
|
disabled: S.value,
|
|
1319
|
-
label:
|
|
1317
|
+
label: c(l)("menu.publish.actions.publish_progress"),
|
|
1320
1318
|
onClick: I
|
|
1321
1319
|
}, null, 8, ["disabled", "label", "onClick"])]),
|
|
1322
1320
|
_: 2
|
|
@@ -1324,25 +1322,25 @@ const tt = {
|
|
|
1324
1322
|
key: 1,
|
|
1325
1323
|
variant: "secondary",
|
|
1326
1324
|
disabled: S.value,
|
|
1327
|
-
label:
|
|
1325
|
+
label: c(l)("menu.publish.actions.publish_progress"),
|
|
1328
1326
|
onClick: I
|
|
1329
1327
|
}, null, 8, ["disabled", "label", "onClick"]))]),
|
|
1330
1328
|
_: 1
|
|
1331
1329
|
}, 8, ["progress", "restaurants"])]), f("div", Wt, [b(K, {
|
|
1332
1330
|
disabled: S.value,
|
|
1333
1331
|
icon: "ios_share",
|
|
1334
|
-
label:
|
|
1332
|
+
label: c(l)("menu.publish.actions.publish_all"),
|
|
1335
1333
|
variant: "primary",
|
|
1336
1334
|
onClick: v[2] || (v[2] = () => re())
|
|
1337
|
-
}, null, 8, ["disabled", "label"])])]), f("div", Qt, [b(
|
|
1335
|
+
}, null, 8, ["disabled", "label"])])]), f("div", Qt, [b(c(Ve), {
|
|
1338
1336
|
multiple: "",
|
|
1339
1337
|
modelValue: O.value,
|
|
1340
1338
|
"onUpdate:modelValue": v[4] || (v[4] = (I) => O.value = I)
|
|
1341
1339
|
}, {
|
|
1342
|
-
"append-right":
|
|
1340
|
+
"append-right": z(() => [b(c(Le), {
|
|
1343
1341
|
modelValue: oe.value,
|
|
1344
1342
|
"onUpdate:modelValue": v[3] || (v[3] = (I) => oe.value = I),
|
|
1345
|
-
attributes:
|
|
1343
|
+
attributes: Me.value
|
|
1346
1344
|
}, null, 8, ["modelValue", "attributes"])]),
|
|
1347
1345
|
_: 1
|
|
1348
1346
|
}, 8, ["modelValue"]), b(Ae, {
|
|
@@ -1350,13 +1348,13 @@ const tt = {
|
|
|
1350
1348
|
"onUpdate:modelValue": v[5] || (v[5] = (I) => h.value = I),
|
|
1351
1349
|
autofocus: "",
|
|
1352
1350
|
class: "w-[320px] xs:w-full",
|
|
1353
|
-
placeholder:
|
|
1351
|
+
placeholder: c(l)("menu.publish.table.search.placeholder")
|
|
1354
1352
|
}, null, 8, ["modelValue", "placeholder"])]), q.value.length > 0 ? (y(), F(j, {
|
|
1355
1353
|
key: 0
|
|
1356
|
-
}, [b(
|
|
1354
|
+
}, [b(Qe, {
|
|
1357
1355
|
class: "xs:hidden block"
|
|
1358
1356
|
}, {
|
|
1359
|
-
default:
|
|
1357
|
+
default: z(() => [b(De, {
|
|
1360
1358
|
modelValue: i.value,
|
|
1361
1359
|
"onUpdate:modelValue": v[6] || (v[6] = (I) => i.value = I),
|
|
1362
1360
|
"get-row-id": (I) => I._id,
|
|
@@ -1372,11 +1370,11 @@ const tt = {
|
|
|
1372
1370
|
onRowClick: v[7] || (v[7] = (I) => u(I.original))
|
|
1373
1371
|
}, null, 8, ["modelValue", "get-row-id", "loading", "page-size", "row-data"])]),
|
|
1374
1372
|
_: 1
|
|
1375
|
-
}), b(
|
|
1373
|
+
}), b(Re, {
|
|
1376
1374
|
class: "flex-col flex-1 min-h-0 overflow-auto xs:flex hidden w-full pb-64",
|
|
1377
1375
|
separator: ""
|
|
1378
1376
|
}, {
|
|
1379
|
-
default:
|
|
1377
|
+
default: z(() => [(y(!0), F(j, null, Q(q.value, (I) => (y(), Y(Ne, {
|
|
1380
1378
|
key: I._id,
|
|
1381
1379
|
label: I.displayName,
|
|
1382
1380
|
style: {
|
|
@@ -1384,9 +1382,9 @@ const tt = {
|
|
|
1384
1382
|
},
|
|
1385
1383
|
onClick: () => u(I)
|
|
1386
1384
|
}, {
|
|
1387
|
-
default:
|
|
1385
|
+
default: z(() => [f("div", Xt, [f("div", Zt, [f("div", el, T(m(I.updatedAt)), 1), b(p, {
|
|
1388
1386
|
row: I
|
|
1389
|
-
}, null, 8, ["row"])]), f("div", tl, [f("div", ll,
|
|
1387
|
+
}, null, 8, ["row"])]), f("div", tl, [f("div", ll, T(I.displayName), 1), f("div", al, [f("div", null, "Default: " + T(I.catalog.default), 1), f("div", null, "POS takeaway: " + T(I.catalog.takeaway), 1), f("div", null, "Pickup: " + T(I.catalog.pickup), 1)])])]), f("div", sl, [o.value && I.revertConfig ? (y(), Y(K, {
|
|
1390
1388
|
key: 0,
|
|
1391
1389
|
disabled: S.value,
|
|
1392
1390
|
icon: "undo",
|
|
@@ -1396,20 +1394,20 @@ const tt = {
|
|
|
1396
1394
|
disabled: S.value,
|
|
1397
1395
|
icon: "ios_share",
|
|
1398
1396
|
variant: "tertiary",
|
|
1399
|
-
onClick: le(() => U(
|
|
1397
|
+
onClick: le(() => U(V(I)), ["stop"])
|
|
1400
1398
|
}, null, 8, ["disabled", "onClick"])])]),
|
|
1401
1399
|
_: 2
|
|
1402
1400
|
}, 1032, ["label", "onClick"]))), 128))]),
|
|
1403
1401
|
_: 1
|
|
1404
|
-
})], 64)) : (y(), Y(
|
|
1402
|
+
})], 64)) : (y(), Y(c(we), {
|
|
1405
1403
|
key: 1,
|
|
1406
|
-
title:
|
|
1407
|
-
subtitle:
|
|
1404
|
+
title: c(l)("menu.publish.empty.title"),
|
|
1405
|
+
subtitle: c(l)("menu.publish.empty.subtitle"),
|
|
1408
1406
|
action: {
|
|
1409
|
-
text:
|
|
1407
|
+
text: c(l)("menu.publish.empty.action"),
|
|
1410
1408
|
icon: "add",
|
|
1411
1409
|
callback: () => {
|
|
1412
|
-
|
|
1410
|
+
c(x).push({
|
|
1413
1411
|
name: "$settings-my-business"
|
|
1414
1412
|
});
|
|
1415
1413
|
}
|
|
@@ -1417,7 +1415,7 @@ const tt = {
|
|
|
1417
1415
|
}, null, 8, ["title", "subtitle", "action"]))]), f("div", nl, [b(K, {
|
|
1418
1416
|
disabled: S.value,
|
|
1419
1417
|
icon: "ios_share",
|
|
1420
|
-
label:
|
|
1418
|
+
label: c(l)("menu.publish.actions.publish_all"),
|
|
1421
1419
|
variant: "fab",
|
|
1422
1420
|
onClick: v[8] || (v[8] = () => re())
|
|
1423
1421
|
}, null, 8, ["disabled", "label"])]), b(jt, {
|