@feedmepos/mf-menu-portal 1.0.4-dev.3 → 1.0.4-dev.4
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-nS46pByh.js → App-CrpoLCjA.js} +3 -3
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-C9OSr8ft.js → ApplyProduct.vue_vue_type_script_setup_true_lang-Hdsnu29V.js} +1 -1
- package/dist/{BindingTable.vue_vue_type_script_setup_true_lang-DnvN5R5w.js → BindingTable.vue_vue_type_script_setup_true_lang-D3CmOOPY.js} +1 -1
- package/dist/{Catalog-B4RS8T29.js → Catalog-VU3HhNro.js} +4 -4
- package/dist/{CatalogBinding-6_783kbu.js → CatalogBinding-BNATtZEY.js} +3 -3
- package/dist/{CatalogEditTabs.vue_vue_type_script_setup_true_lang-BawCLY5-.js → CatalogEditTabs.vue_vue_type_script_setup_true_lang-BmG-xpW4.js} +3 -3
- package/dist/{CatalogEditor.vue_vue_type_script_setup_true_lang-BjP8ZXyb.js → CatalogEditor.vue_vue_type_script_setup_true_lang-BFsRDFpj.js} +7 -7
- package/dist/{CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-Diapahfp.js → CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-Bk4FqVmx.js} +14 -14
- package/dist/{Category-CqneIGq4.js → Category-DMoXTsfG.js} +5 -5
- package/dist/{Category-DNQH1CI7.js → Category-DxjdQ-NN.js} +2 -2
- package/dist/CategoryList.vue_vue_type_script_setup_true_lang-B3Ts1O-9.js +847 -0
- package/dist/{CookingGuide-DTAiFmEL.js → CookingGuide-DiZZDYD-.js} +5 -5
- package/dist/{Group-DeUqUomY.js → Group-DFR8q-tt.js} +5 -5
- package/dist/{Group-5xO2j3CL.js → Group-rzfh_o6r.js} +2 -2
- package/dist/GroupList.vue_vue_type_script_setup_true_lang-DiN-wQXX.js +1807 -0
- package/dist/Ingredient-DpjGIuH9.js +505 -0
- package/dist/LinkProductSideSheet.vue_vue_type_script_setup_true_lang-CnI80Ojd.js +782 -0
- package/dist/{MenuSetting-DdekHsQy.js → MenuSetting-DR-pDSF_.js} +4 -4
- package/dist/OrderPacing-JcTuweqF.js +769 -0
- package/dist/{OrderPacingFields.vue_vue_type_script_setup_true_lang-C3SqQPSr.js → OrderPacingFields.vue_vue_type_script_setup_true_lang-HwwJ2mGv.js} +2 -2
- package/dist/{Preview-DGTw0POk.js → Preview-BZyun5lZ.js} +1 -1
- package/dist/{PriceTierNotice.vue_vue_type_script_setup_true_lang-DffhFv0Y.js → PriceTierNotice.vue_vue_type_script_setup_true_lang-DquqNbE1.js} +1 -1
- package/dist/PrintRoute-CzEx2dCt.js +518 -0
- package/dist/{Product-CsbcyIgD.js → Product-CQb0n06E.js} +4 -4
- package/dist/ProductAttributeFilter.vue_vue_type_script_setup_true_lang-B2KdolJS.js +7931 -0
- package/dist/{ProductEditorHost.vue_vue_type_script_setup_true_lang--rBKdKV7.js → ProductEditorHost.vue_vue_type_script_setup_true_lang-CBlDEjqF.js} +9 -9
- package/dist/ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-D8NQTCLx.js +2011 -0
- package/dist/{ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-DtCzHjpN.js → ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-cG47Pu-6.js} +1 -1
- package/dist/{ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-aDx01-WW.js → ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-0UwUcA2L.js} +630 -587
- package/dist/{ProductInternalTools-Ccd4dAmx.js → ProductInternalTools-QrBR1nFp.js} +2 -2
- package/dist/{ProductInventoryDialog-DYcKdKHi.js → ProductInventoryDialog-fV38GO1a.js} +1 -1
- package/dist/{ProductInventoryDialog.vue_vue_type_script_setup_true_lang-DySFcCJz.js → ProductInventoryDialog.vue_vue_type_script_setup_true_lang-Bzb3RrMg.js} +1 -1
- package/dist/ProductList.vue_vue_type_script_setup_true_lang-BwKQESr3.js +2765 -0
- package/dist/{ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-Dw2xiPYX.js → ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-CDYcHXo1.js} +1 -1
- package/dist/{Products-phZwCZhU.js → Products-B8tysOAL.js} +3 -3
- package/dist/Publish-DTvOvFNa.js +1337 -0
- package/dist/Recipe-Ddx31csF.js +388 -0
- package/dist/{Scheduler-C-A5m92O.js → Scheduler-CST5L_cw.js} +314 -254
- package/dist/ServingSequence-DYyEZI2S.js +374 -0
- package/dist/{Setting-C24V-lps.js → Setting-Ip0pGjks.js} +6 -6
- package/dist/Subcategory-BIgjzVta.js +459 -0
- package/dist/{Takeaway-DywX5BiX.js → Takeaway-CekhGM-m.js} +2 -2
- package/dist/{Takeaway-BFP2ohJn.js → Takeaway-aXsPg4JT.js} +5 -5
- package/dist/{TakeawayList.vue_vue_type_script_setup_true_lang-B3QS7o1v.js → TakeawayList.vue_vue_type_script_setup_true_lang-CaRR4_j3.js} +4 -4
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CshqYpc9.js +1291 -0
- package/dist/Unit-BMW8u0Us.js +424 -0
- package/dist/{Variant-BBfWhH-s.js → Variant-CZsrYRMU.js} +5 -5
- package/dist/{_id_-BooM3FX1.js → _id_-D4swrvNa.js} +3 -3
- package/dist/{app-Bmgb8ACe.js → app-BWwwHsWi.js} +312 -312
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +60 -0
- package/dist/apps/mf-menu/src/components/Product/BulkCategorySelect.vue.d.ts +37 -0
- package/dist/apps/mf-menu/src/components/Product/ProductAttributeFilter.vue.d.ts +11 -1
- package/dist/apps/mf-menu/src/components/ProductList.vue.d.ts +2 -2
- package/dist/apps/mf-menu/src/components/feature/NestedGroupManager/NestedGroupOverrideSheets.vue.d.ts +27 -0
- package/dist/apps/mf-menu/src/components/feature/RestaurantAttributesFilter.vue.d.ts +20 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{menu-compute-CG-fX5pi.js → menu-compute-D7TdiHt4.js} +4 -4
- package/dist/assets/{validate-menu-BeGMWVns.js → validate-menu-DXppWUVq.js} +2 -2
- package/dist/mf-menu-portal.css +1 -1
- package/dist/{provide-CfF0FmUz.js → provide-CDmXzkhz.js} +67990 -66891
- package/dist/{useActionFeedback-DyUCQl2x.js → useActionFeedback-Dm2HDa_2.js} +1 -1
- package/dist/{FormSection.vue_vue_type_script_setup_true_lang-pY-_msnM.js → vuedraggable-CBtQLb_S.js} +140 -139
- package/package.json +2 -2
- package/dist/CategoryList.vue_vue_type_script_setup_true_lang-Bt_onPrP.js +0 -797
- package/dist/GroupList.vue_vue_type_script_setup_true_lang-Dgya_JLB.js +0 -2183
- package/dist/Ingredient-BlDW3TfZ.js +0 -463
- package/dist/LinkProductSideSheet.vue_vue_type_script_setup_true_lang-0tCpJlOf.js +0 -709
- package/dist/OrderPacing-Bb2n5wmI.js +0 -698
- package/dist/PrintRoute-CJB4gIP2.js +0 -473
- package/dist/ProductChipSummary.vue_vue_type_script_setup_true_lang-D8DygCBl.js +0 -110
- package/dist/ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-J6LpJ5wT.js +0 -1257
- package/dist/ProductList.vue_vue_type_script_setup_true_lang-DTLslTpK.js +0 -10353
- package/dist/Publish-BeKIXu3z.js +0 -1261
- package/dist/Recipe-Fo4tBkBv.js +0 -350
- package/dist/ServingSequence-BrCwLSO7.js +0 -336
- package/dist/Subcategory-B0oZIKbw.js +0 -412
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-D7mhnrXx.js +0 -1213
- package/dist/Unit-NhEwH-kr.js +0 -385
- package/dist/apps/mf-menu/src/views/MenuManagementEditor/RestaurantAttributesFilter.vue.d.ts +0 -2
package/dist/Publish-BeKIXu3z.js
DELETED
|
@@ -1,1261 +0,0 @@
|
|
|
1
|
-
import { defineComponent as ae, openBlock as a, createElementBlock as b, createElementVNode as n, normalizeStyle as pt, normalizeClass as Te, computed as v, h as $, onUnmounted as de, resolveComponent as _, Fragment as H, createVNode as i, withCtx as x, unref as s, renderList as re, createBlock as y, toDisplayString as m, createCommentVNode as A, ref as xe, shallowRef as ie, watch as Le, createSlots as ht } from "vue";
|
|
2
|
-
import { useRouter as bt } from "vue-router";
|
|
3
|
-
import { useI18n as Ce } from "@feedmepos/mf-common";
|
|
4
|
-
import { useDialog as vt, components as se } from "@feedmepos/ui-library";
|
|
5
|
-
import { _ as De } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
|
|
6
|
-
import { _ as gt } from "./app-Bmgb8ACe.js";
|
|
7
|
-
import { _ as _t } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
|
|
8
|
-
import { b as Fe, u as me, a as ft } from "./provide-CfF0FmUz.js";
|
|
9
|
-
import { u as yt } from "./useActionFeedback-DyUCQl2x.js";
|
|
10
|
-
const kt = ["aria-valuenow"], wt = /* @__PURE__ */ ae({
|
|
11
|
-
__name: "ProgressBar",
|
|
12
|
-
props: {
|
|
13
|
-
percent: {},
|
|
14
|
-
variant: { default: "neutral" }
|
|
15
|
-
},
|
|
16
|
-
setup(K) {
|
|
17
|
-
const c = K, l = {
|
|
18
|
-
neutral: "bg-fm-color-neutral-gray-200",
|
|
19
|
-
warning: "bg-fm-color-system-warning-300",
|
|
20
|
-
success: "bg-fm-color-system-success-300",
|
|
21
|
-
error: "bg-fm-color-system-error-300"
|
|
22
|
-
};
|
|
23
|
-
return (M, k) => (a(), b("div", {
|
|
24
|
-
class: "h-4 w-full overflow-hidden fm-corner-radius-md bg-fm-color-neutral-gray-100",
|
|
25
|
-
role: "progressbar",
|
|
26
|
-
"aria-valuenow": Math.min(100, Math.max(0, c.percent)),
|
|
27
|
-
"aria-valuemin": "0",
|
|
28
|
-
"aria-valuemax": "100"
|
|
29
|
-
}, [
|
|
30
|
-
n("div", {
|
|
31
|
-
class: Te(["h-full fm-corner-radius-md", l[c.variant]]),
|
|
32
|
-
style: pt({ width: `${Math.min(100, Math.max(0, c.percent))}%` })
|
|
33
|
-
}, null, 6)
|
|
34
|
-
], 8, kt));
|
|
35
|
-
}
|
|
36
|
-
}), Re = {
|
|
37
|
-
PENDING: "text-fm-color-neutral-gray-300",
|
|
38
|
-
RUNNING: "text-fm-color-system-warning-300",
|
|
39
|
-
COMPLETED: "text-fm-color-system-success-300",
|
|
40
|
-
FAILED: "text-fm-color-system-error-300"
|
|
41
|
-
}, xt = {
|
|
42
|
-
PENDING: "neutral",
|
|
43
|
-
RUNNING: "warning",
|
|
44
|
-
COMPLETED: "success",
|
|
45
|
-
FAILED: "error"
|
|
46
|
-
}, ce = {
|
|
47
|
-
PENDING: "menu.publish.scheduler_publish.status.pending",
|
|
48
|
-
RUNNING: "menu.publish.scheduler_publish.status.running",
|
|
49
|
-
COMPLETED: "menu.publish.scheduler_publish.status.completed",
|
|
50
|
-
FAILED: "menu.publish.scheduler_publish.status.failed"
|
|
51
|
-
}, Ct = [
|
|
52
|
-
"PENDING",
|
|
53
|
-
"RUNNING",
|
|
54
|
-
"COMPLETED",
|
|
55
|
-
"FAILED"
|
|
56
|
-
], Ft = { class: "flex w-full items-center justify-between gap-8 pb-16" }, It = { class: "min-w-0 flex-1" }, St = { class: "fm-typo-en-body-md-600 select-none overflow-hidden text-ellipsis whitespace-nowrap text-fm-color-neutral-gray-400" }, $t = { key: 0 }, Pt = {
|
|
57
|
-
key: 1,
|
|
58
|
-
class: "text-fm-color-neutral-gray-200"
|
|
59
|
-
}, At = {
|
|
60
|
-
key: 0,
|
|
61
|
-
class: "text-fm-color-typo-secondary",
|
|
62
|
-
role: "alert"
|
|
63
|
-
}, Mt = {
|
|
64
|
-
key: 1,
|
|
65
|
-
class: "text-fm-color-typo-secondary",
|
|
66
|
-
role: "status"
|
|
67
|
-
}, Vt = /* @__PURE__ */ ae({
|
|
68
|
-
__name: "PublishScheduleDetails",
|
|
69
|
-
props: {
|
|
70
|
-
session: {}
|
|
71
|
-
},
|
|
72
|
-
setup(K) {
|
|
73
|
-
const c = K, { t: l, d: M, locale: k } = Ce(), Y = Fe(), F = me(c.session), p = v(
|
|
74
|
-
() => F.value.status === "ready" ? F.value.value : null
|
|
75
|
-
), D = v(() => {
|
|
76
|
-
var r;
|
|
77
|
-
return [...((r = p.value) == null ? void 0 : r.rows) ?? []];
|
|
78
|
-
}), V = v(
|
|
79
|
-
() => Ct.map((r) => ({
|
|
80
|
-
label: l(ce[r]),
|
|
81
|
-
value: r
|
|
82
|
-
}))
|
|
83
|
-
), P = v(() => {
|
|
84
|
-
var r;
|
|
85
|
-
return [...((r = p.value) == null ? void 0 : r.statusFilter) ?? []];
|
|
86
|
-
});
|
|
87
|
-
function o(r) {
|
|
88
|
-
return new Intl.ListFormat(k.value, {
|
|
89
|
-
style: "long",
|
|
90
|
-
type: "conjunction"
|
|
91
|
-
}).format(r);
|
|
92
|
-
}
|
|
93
|
-
const j = v({
|
|
94
|
-
get: () => {
|
|
95
|
-
var S;
|
|
96
|
-
const r = ((S = p.value) == null ? void 0 : S.restaurantFilter) ?? [];
|
|
97
|
-
return r.length > 0 ? [...r] : null;
|
|
98
|
-
},
|
|
99
|
-
set: (r) => c.session.setRestaurantFilter(r ?? [])
|
|
100
|
-
}), ee = v(() => {
|
|
101
|
-
var S;
|
|
102
|
-
if (j.value === null)
|
|
103
|
-
return l("menu.publish.scheduler_publish.selector.restaurant.all");
|
|
104
|
-
const r = new Map(
|
|
105
|
-
(((S = p.value) == null ? void 0 : S.restaurantOptions) ?? []).map((C) => [
|
|
106
|
-
C.restaurantId,
|
|
107
|
-
C.name ?? l("menu.common.labels.unknown")
|
|
108
|
-
])
|
|
109
|
-
);
|
|
110
|
-
return o(
|
|
111
|
-
j.value.map((C) => r.get(C)).filter((C) => C !== void 0)
|
|
112
|
-
);
|
|
113
|
-
}), pe = v(
|
|
114
|
-
() => o(
|
|
115
|
-
P.value.map(
|
|
116
|
-
(r) => l(ce[r])
|
|
117
|
-
)
|
|
118
|
-
)
|
|
119
|
-
);
|
|
120
|
-
function q(r) {
|
|
121
|
-
return j.value === null || j.value.includes(r);
|
|
122
|
-
}
|
|
123
|
-
function Q(r) {
|
|
124
|
-
return r ? M(new Date(r), {
|
|
125
|
-
year: "numeric",
|
|
126
|
-
month: "2-digit",
|
|
127
|
-
day: "2-digit",
|
|
128
|
-
hour: "2-digit",
|
|
129
|
-
hour12: !0,
|
|
130
|
-
minute: "2-digit",
|
|
131
|
-
second: "2-digit"
|
|
132
|
-
}) : "";
|
|
133
|
-
}
|
|
134
|
-
const he = v(() => [
|
|
135
|
-
{
|
|
136
|
-
accessorKey: "restaurantName",
|
|
137
|
-
header: () => l(
|
|
138
|
-
"menu.publish.scheduler_publish.restaurant_publish_details.table.column.restaurant"
|
|
139
|
-
),
|
|
140
|
-
size: 600,
|
|
141
|
-
cell: (r) => r.getValue() ?? l("menu.common.labels.unknown")
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
id: "status",
|
|
145
|
-
accessorKey: "status",
|
|
146
|
-
header: () => l(
|
|
147
|
-
"menu.publish.scheduler_publish.restaurant_publish_details.table.column.status"
|
|
148
|
-
),
|
|
149
|
-
cell: (r) => {
|
|
150
|
-
const S = r.getValue();
|
|
151
|
-
return $(
|
|
152
|
-
"p",
|
|
153
|
-
{ class: Re[S] },
|
|
154
|
-
l(ce[S])
|
|
155
|
-
);
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
accessorKey: "publishedAt",
|
|
160
|
-
header: () => l(
|
|
161
|
-
"menu.publish.scheduler_publish.restaurant_publish_details.table.column.published_at"
|
|
162
|
-
),
|
|
163
|
-
cell: (r) => $(
|
|
164
|
-
"p",
|
|
165
|
-
{ class: "whitespace-nowrap" },
|
|
166
|
-
Q(r.getValue())
|
|
167
|
-
)
|
|
168
|
-
}
|
|
169
|
-
]);
|
|
170
|
-
return de(() => c.session.dispose()), (r, S) => {
|
|
171
|
-
const C = _("FmIcon"), J = _("FmChip"), ne = _("FmMenuItem"), W = _("FmMenu"), G = _("FmSelect"), O = _("FmCircularProgress"), N = _("FmTable");
|
|
172
|
-
return a(), b(H, null, [
|
|
173
|
-
n("div", Ft, [
|
|
174
|
-
n("div", It, [
|
|
175
|
-
i(W, {
|
|
176
|
-
"close-on-click": !1,
|
|
177
|
-
width: 360
|
|
178
|
-
}, {
|
|
179
|
-
"menu-button": x(() => [
|
|
180
|
-
i(J, null, {
|
|
181
|
-
default: x(() => [
|
|
182
|
-
i(C, {
|
|
183
|
-
color: "neutral-gray-400",
|
|
184
|
-
name: "storefront",
|
|
185
|
-
outline: "",
|
|
186
|
-
size: "sm"
|
|
187
|
-
}),
|
|
188
|
-
n("div", St, m(ee.value), 1),
|
|
189
|
-
i(C, {
|
|
190
|
-
color: "neutral-gray-400",
|
|
191
|
-
name: "keyboard_arrow_down",
|
|
192
|
-
outline: "",
|
|
193
|
-
size: "sm"
|
|
194
|
-
})
|
|
195
|
-
]),
|
|
196
|
-
_: 1
|
|
197
|
-
})
|
|
198
|
-
]),
|
|
199
|
-
default: x(() => {
|
|
200
|
-
var I;
|
|
201
|
-
return [
|
|
202
|
-
i(ne, {
|
|
203
|
-
"has-checkbox": "",
|
|
204
|
-
label: s(l)("menu.publish.scheduler_publish.selector.restaurant.all"),
|
|
205
|
-
"model-value": j.value === null,
|
|
206
|
-
onClick: S[0] || (S[0] = (L) => c.session.selectAllRestaurants())
|
|
207
|
-
}, null, 8, ["label", "model-value"]),
|
|
208
|
-
(a(!0), b(H, null, re(((I = p.value) == null ? void 0 : I.restaurantOptions) ?? [], (L) => (a(), y(ne, {
|
|
209
|
-
key: L.restaurantId,
|
|
210
|
-
"has-checkbox": "",
|
|
211
|
-
label: L.name ?? s(l)("menu.common.labels.unknown"),
|
|
212
|
-
"model-value": q(L.restaurantId),
|
|
213
|
-
onClick: (Ie) => c.session.toggleRestaurant(L.restaurantId)
|
|
214
|
-
}, null, 8, ["label", "model-value", "onClick"]))), 128))
|
|
215
|
-
];
|
|
216
|
-
}),
|
|
217
|
-
_: 1
|
|
218
|
-
})
|
|
219
|
-
]),
|
|
220
|
-
i(G, {
|
|
221
|
-
class: "min-w-[200px] flex-shrink-0",
|
|
222
|
-
"aria-label": s(l)(
|
|
223
|
-
"menu.publish.scheduler_publish.restaurant_publish_details.table.column.status"
|
|
224
|
-
),
|
|
225
|
-
"hide-chips": "",
|
|
226
|
-
items: V.value,
|
|
227
|
-
"model-value": P.value,
|
|
228
|
-
multiselect: "",
|
|
229
|
-
"onUpdate:modelValue": S[1] || (S[1] = (I) => c.session.setStatusFilter(I ?? []))
|
|
230
|
-
}, {
|
|
231
|
-
default: x(() => [
|
|
232
|
-
P.value.length > 0 ? (a(), b("div", $t, m(pe.value), 1)) : (a(), b("div", Pt, m(s(l)(
|
|
233
|
-
"menu.publish.scheduler_publish.restaurant_publish_details.select_publish_status"
|
|
234
|
-
)), 1))
|
|
235
|
-
]),
|
|
236
|
-
_: 1
|
|
237
|
-
}, 8, ["aria-label", "items", "model-value"])
|
|
238
|
-
]),
|
|
239
|
-
s(F).status === "error" ? (a(), b("p", At, m(s(Y)(s(F).error.message)), 1)) : s(F).status === "unavailable" ? (a(), b("p", Mt, m(s(Y)(s(F).reason)), 1)) : s(F).status === "loading" ? (a(), y(O, { key: 2 })) : p.value && p.value.rows.length > 0 ? (a(), y(N, {
|
|
240
|
-
key: 3,
|
|
241
|
-
class: "flex-1 overflow-hidden",
|
|
242
|
-
"column-defs": he.value,
|
|
243
|
-
"hide-footer": "",
|
|
244
|
-
"page-size": p.value.rows.length,
|
|
245
|
-
"pin-header-row": "",
|
|
246
|
-
"row-data": D.value,
|
|
247
|
-
"shrink-at": !1
|
|
248
|
-
}, null, 8, ["column-defs", "page-size", "row-data"])) : p.value ? (a(), y(s(De), {
|
|
249
|
-
key: 4,
|
|
250
|
-
subtitle: "",
|
|
251
|
-
title: s(l)(
|
|
252
|
-
"menu.publish.scheduler_publish.restaurant_publish_details.no_publish_status"
|
|
253
|
-
)
|
|
254
|
-
}, null, 8, ["title"])) : A("", !0)
|
|
255
|
-
], 64);
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
}), Nt = {
|
|
259
|
-
key: 1,
|
|
260
|
-
class: "text-fm-color-typo-secondary",
|
|
261
|
-
role: "alert"
|
|
262
|
-
}, Lt = {
|
|
263
|
-
key: 2,
|
|
264
|
-
class: "space-y-16"
|
|
265
|
-
}, Tt = { class: "text-fm-color-typo-secondary" }, Dt = { class: "space-y-4" }, Rt = { class: "space-y-4" }, Ut = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Et = { class: "fm-typo-en-body-lg-600" }, Ot = { class: "space-y-4" }, Bt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, zt = { class: "fm-typo-en-body-lg-600" }, Kt = { class: "space-y-4" }, jt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Gt = { class: "fm-typo-en-body-lg-600" }, Ht = { class: "space-y-4" }, qt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Jt = { class: "fm-typo-en-body-lg-600" }, Wt = { class: "space-y-4" }, Xt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Yt = { class: "fm-typo-en-body-lg-600" }, Qt = { class: "space-y-4" }, Zt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, el = { class: "fm-typo-en-body-lg-600" }, tl = /* @__PURE__ */ ae({
|
|
266
|
-
__name: "PublishRevertPreview",
|
|
267
|
-
props: {
|
|
268
|
-
session: {}
|
|
269
|
-
},
|
|
270
|
-
setup(K) {
|
|
271
|
-
const c = K, { d: l, locale: M, t: k } = Ce(), Y = Fe(), F = me(c.session), p = v(
|
|
272
|
-
() => F.value.status === "ready" ? F.value.value : null
|
|
273
|
-
);
|
|
274
|
-
function D(o) {
|
|
275
|
-
return o === null ? k("menu.publish.labels.none") : o.kind === "default" ? k("menu.publish.labels.catalog.main") : o.kind === "missing" ? k("menu.publish.labels.catalog.invalid") : o.name;
|
|
276
|
-
}
|
|
277
|
-
function V(o) {
|
|
278
|
-
return o ? l(new Date(o), {
|
|
279
|
-
year: "2-digit",
|
|
280
|
-
month: "2-digit",
|
|
281
|
-
day: "2-digit",
|
|
282
|
-
hour: "numeric",
|
|
283
|
-
minute: "2-digit",
|
|
284
|
-
hour12: !0
|
|
285
|
-
}) : k("menu.publish.labels.none");
|
|
286
|
-
}
|
|
287
|
-
function P(o) {
|
|
288
|
-
return o.length === 0 ? k("menu.publish.labels.none") : new Intl.ListFormat(M.value, {
|
|
289
|
-
style: "long",
|
|
290
|
-
type: "conjunction"
|
|
291
|
-
}).format(o.map(D));
|
|
292
|
-
}
|
|
293
|
-
return de(() => c.session.dispose()), (o, j) => {
|
|
294
|
-
const ee = _("FmCircularProgress");
|
|
295
|
-
return s(F).status === "loading" ? (a(), y(ee, { key: 0 })) : s(F).status === "error" ? (a(), b("p", Nt, m(s(Y)(s(F).error.message)), 1)) : p.value ? (a(), b("div", Lt, [
|
|
296
|
-
n("p", Tt, m(s(k)("menu.revert.description", { name: p.value.restaurantName })), 1),
|
|
297
|
-
n("dl", Dt, [
|
|
298
|
-
n("div", Rt, [
|
|
299
|
-
n("dt", Ut, m(s(k)("menu.revert.labels.restaurant")), 1),
|
|
300
|
-
n("dd", Et, m(p.value.restaurantName), 1)
|
|
301
|
-
]),
|
|
302
|
-
n("div", Ot, [
|
|
303
|
-
n("dt", Bt, m(s(k)("menu.revert.labels.revert_to")), 1),
|
|
304
|
-
n("dd", zt, m(V(p.value.publishedAt)), 1)
|
|
305
|
-
]),
|
|
306
|
-
n("div", Kt, [
|
|
307
|
-
n("dt", jt, m(s(k)("menu.revert.labels.default")), 1),
|
|
308
|
-
n("dd", Gt, m(D(p.value.defaultCatalog)), 1)
|
|
309
|
-
]),
|
|
310
|
-
n("div", Ht, [
|
|
311
|
-
n("dt", qt, m(s(k)("menu.revert.labels.pos_takeaway")), 1),
|
|
312
|
-
n("dd", Jt, m(D(p.value.takeawayCatalog)), 1)
|
|
313
|
-
]),
|
|
314
|
-
n("div", Wt, [
|
|
315
|
-
n("dt", Xt, m(s(k)("menu.revert.labels.pickup")), 1),
|
|
316
|
-
n("dd", Yt, m(D(p.value.pickupCatalog)), 1)
|
|
317
|
-
]),
|
|
318
|
-
n("div", Qt, [
|
|
319
|
-
n("dt", Zt, m(s(k)("menu.revert.labels.additional_catalogs")), 1),
|
|
320
|
-
n("dd", el, m(P(p.value.additionalCatalogs)), 1)
|
|
321
|
-
])
|
|
322
|
-
])
|
|
323
|
-
])) : A("", !0);
|
|
324
|
-
};
|
|
325
|
-
}
|
|
326
|
-
}), ll = { class: "ml-8 flex flex-1 items-center gap-16" }, sl = {
|
|
327
|
-
key: 0,
|
|
328
|
-
class: "text-fm-color-typo-secondary",
|
|
329
|
-
role: "alert"
|
|
330
|
-
}, al = {
|
|
331
|
-
key: 1,
|
|
332
|
-
"data-menu-state": "unavailable",
|
|
333
|
-
class: "text-fm-color-typo-secondary"
|
|
334
|
-
}, nl = { class: "mb-8 flex items-center justify-between gap-8" }, ol = { class: "fm-typo-en-body-md-600 select-none overflow-hidden text-ellipsis whitespace-nowrap text-fm-color-neutral-gray-400" }, ul = { class: "ml-auto w-[280px]" }, il = { class: "flex items-center gap-24" }, rl = { class: "fm-typo-en-title-md-600" }, cl = {
|
|
335
|
-
key: 0,
|
|
336
|
-
class: "text-fm-color-typo-secondary",
|
|
337
|
-
role: "alert"
|
|
338
|
-
}, dl = {
|
|
339
|
-
key: 1,
|
|
340
|
-
class: "text-fm-color-typo-secondary",
|
|
341
|
-
role: "status"
|
|
342
|
-
}, ml = {
|
|
343
|
-
key: 5,
|
|
344
|
-
class: "bg-fm-color-neutral-gray-100"
|
|
345
|
-
}, pl = {
|
|
346
|
-
key: 1,
|
|
347
|
-
class: "text-fm-color-typo-secondary",
|
|
348
|
-
role: "alert"
|
|
349
|
-
}, hl = {
|
|
350
|
-
key: 2,
|
|
351
|
-
class: "text-fm-color-typo-secondary",
|
|
352
|
-
role: "status"
|
|
353
|
-
}, bl = { class: "grid grid-cols-[164px_163px_163px_1fr] items-center px-16 py-4" }, vl = { class: "flex justify-end gap-8" }, gl = {
|
|
354
|
-
key: 0,
|
|
355
|
-
class: "flex gap-8 px-16 pb-12"
|
|
356
|
-
}, _l = { class: "fm-typo-en-title-md-600" }, fl = { class: "mt-40" }, yl = { class: "fm-typo-en-title-sm-600" }, kl = { class: "fm-typo-en-body-md-400 mb-8 mt-4 text-fm-color-typo-secondary" }, wl = {
|
|
357
|
-
key: 1,
|
|
358
|
-
class: "text-fm-color-typo-secondary",
|
|
359
|
-
role: "alert"
|
|
360
|
-
}, xl = {
|
|
361
|
-
key: 2,
|
|
362
|
-
class: "text-fm-color-typo-secondary",
|
|
363
|
-
role: "status"
|
|
364
|
-
}, Cl = { class: "flex items-center justify-start gap-8" }, Fl = /* @__PURE__ */ ae({
|
|
365
|
-
__name: "PublishList",
|
|
366
|
-
props: {
|
|
367
|
-
sdk: {}
|
|
368
|
-
},
|
|
369
|
-
setup(K) {
|
|
370
|
-
const c = K, { t: l, n: M, d: k, locale: Y } = Ce(), F = bt(), p = Fe(), D = vt(), { run: V } = yt(), P = me(
|
|
371
|
-
c.sdk.publish.restaurants
|
|
372
|
-
), o = v(
|
|
373
|
-
() => P.value.status === "ready" ? P.value.value : null
|
|
374
|
-
), j = v(() => {
|
|
375
|
-
var e;
|
|
376
|
-
return [...((e = o.value) == null ? void 0 : e.rows) ?? []];
|
|
377
|
-
}), ee = v(
|
|
378
|
-
() => {
|
|
379
|
-
var e;
|
|
380
|
-
return ((e = o.value) == null ? void 0 : e.selectedRestaurantIds) ?? [];
|
|
381
|
-
}
|
|
382
|
-
), pe = v(
|
|
383
|
-
() => Object.fromEntries(
|
|
384
|
-
ee.value.map((e) => [e, !0])
|
|
385
|
-
)
|
|
386
|
-
), q = v(() => {
|
|
387
|
-
var e;
|
|
388
|
-
return ((e = o.value) == null ? void 0 : e.restaurantFilter) ?? [];
|
|
389
|
-
}), Q = v(() => {
|
|
390
|
-
var e;
|
|
391
|
-
return ((e = o.value) == null ? void 0 : e.statusFilter) ?? [];
|
|
392
|
-
}), he = [
|
|
393
|
-
"latest",
|
|
394
|
-
"outdated",
|
|
395
|
-
"publishing",
|
|
396
|
-
"queued"
|
|
397
|
-
];
|
|
398
|
-
function r(e) {
|
|
399
|
-
return new Intl.ListFormat(Y.value, {
|
|
400
|
-
style: "long",
|
|
401
|
-
type: "conjunction"
|
|
402
|
-
}).format(e);
|
|
403
|
-
}
|
|
404
|
-
const S = v(() => {
|
|
405
|
-
var t;
|
|
406
|
-
if (q.value.length === 0)
|
|
407
|
-
return l("menu.publish.scheduler_publish.selector.restaurant.all");
|
|
408
|
-
const e = new Map(
|
|
409
|
-
(((t = o.value) == null ? void 0 : t.restaurantOptions) ?? []).map((u) => [
|
|
410
|
-
u.restaurantId,
|
|
411
|
-
u.name
|
|
412
|
-
])
|
|
413
|
-
);
|
|
414
|
-
return r(
|
|
415
|
-
q.value.map((u) => e.get(u)).filter((u) => u !== void 0)
|
|
416
|
-
);
|
|
417
|
-
}), C = me(
|
|
418
|
-
c.sdk.publish.progress
|
|
419
|
-
), J = v(
|
|
420
|
-
() => C.value.status === "ready" ? C.value.value : null
|
|
421
|
-
), ne = v(() => {
|
|
422
|
-
var e;
|
|
423
|
-
return [...((e = J.value) == null ? void 0 : e.rows) ?? []];
|
|
424
|
-
}), W = xe(!1), G = xe(!1), O = xe(!1), N = ie(null), I = ie(null);
|
|
425
|
-
let L = null;
|
|
426
|
-
function Ie(e) {
|
|
427
|
-
return e ? k(new Date(e), {
|
|
428
|
-
year: "numeric",
|
|
429
|
-
month: "2-digit",
|
|
430
|
-
day: "2-digit",
|
|
431
|
-
hour: "2-digit",
|
|
432
|
-
minute: "2-digit",
|
|
433
|
-
second: "2-digit",
|
|
434
|
-
hour12: !0
|
|
435
|
-
}) : "";
|
|
436
|
-
}
|
|
437
|
-
function Se(e) {
|
|
438
|
-
return e ? k(new Date(e), {
|
|
439
|
-
year: "numeric",
|
|
440
|
-
month: "2-digit",
|
|
441
|
-
day: "2-digit",
|
|
442
|
-
hour: "2-digit",
|
|
443
|
-
minute: "2-digit",
|
|
444
|
-
hour12: !0
|
|
445
|
-
}) : "";
|
|
446
|
-
}
|
|
447
|
-
function Ue() {
|
|
448
|
-
var e, t;
|
|
449
|
-
return ((t = (e = R.value) == null ? void 0 : e.scheduledAt) == null ? void 0 : t.split("T")[0]) ?? null;
|
|
450
|
-
}
|
|
451
|
-
function Ee(e) {
|
|
452
|
-
const t = e == null ? void 0 : e.inputEl;
|
|
453
|
-
t instanceof HTMLInputElement && t.setAttribute(
|
|
454
|
-
"aria-label",
|
|
455
|
-
l("menu.publish.scheduler_publish.selector.date_time")
|
|
456
|
-
);
|
|
457
|
-
}
|
|
458
|
-
function Oe() {
|
|
459
|
-
var t;
|
|
460
|
-
const e = (t = R.value) == null ? void 0 : t.scheduledAt;
|
|
461
|
-
return e ? k(new Date(e), {
|
|
462
|
-
year: "numeric",
|
|
463
|
-
month: "numeric",
|
|
464
|
-
day: "numeric",
|
|
465
|
-
hour: "numeric",
|
|
466
|
-
minute: "2-digit",
|
|
467
|
-
hour12: !0
|
|
468
|
-
}) : "";
|
|
469
|
-
}
|
|
470
|
-
const Be = v(
|
|
471
|
-
() => {
|
|
472
|
-
var e;
|
|
473
|
-
return ((e = R.value) == null ? void 0 : e.scheduledAt) !== null;
|
|
474
|
-
}
|
|
475
|
-
);
|
|
476
|
-
function ze(e) {
|
|
477
|
-
var u, g, h;
|
|
478
|
-
const t = ((g = (u = R.value) == null ? void 0 : u.scheduledAt) == null ? void 0 : g.split("T")[1]) ?? "00:00";
|
|
479
|
-
(h = N.value) == null || h.setScheduledAt(`${e}T${t}`);
|
|
480
|
-
}
|
|
481
|
-
function be(e) {
|
|
482
|
-
var u, g;
|
|
483
|
-
const t = ((g = (u = R.value) == null ? void 0 : u.scheduledAt) == null ? void 0 : g.split("T")[1]) ?? "00:00";
|
|
484
|
-
return e === "minute" ? t.slice(3, 5) : t.slice(0, 2) === "00" ? "12" : t.slice(0, 2);
|
|
485
|
-
}
|
|
486
|
-
function $e(e, t) {
|
|
487
|
-
var X, Z, le;
|
|
488
|
-
const u = (X = R.value) == null ? void 0 : X.scheduledAt, g = u == null ? void 0 : u.split("T")[0];
|
|
489
|
-
if (!g) return;
|
|
490
|
-
const h = ((Z = u == null ? void 0 : u.split("T")[1]) == null ? void 0 : Z.slice(0, 2)) ?? "00", E = e === "hour" ? t === "12" ? "00" : t : h, z = e === "minute" ? t : be("minute");
|
|
491
|
-
(le = N.value) == null || le.setScheduledAt(`${g}T${E}:${z}`);
|
|
492
|
-
}
|
|
493
|
-
const Ke = v(
|
|
494
|
-
() => {
|
|
495
|
-
var e;
|
|
496
|
-
return l("menu.publish.labels.main_version", {
|
|
497
|
-
version: Se((e = o.value) == null ? void 0 : e.mainVersionAt)
|
|
498
|
-
});
|
|
499
|
-
}
|
|
500
|
-
);
|
|
501
|
-
function ve(e) {
|
|
502
|
-
switch (e.kind) {
|
|
503
|
-
case "named":
|
|
504
|
-
return e.name;
|
|
505
|
-
case "missing":
|
|
506
|
-
return l("menu.publish.labels.catalog.invalid");
|
|
507
|
-
case "default":
|
|
508
|
-
return l("menu.publish.labels.catalog.main");
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
async function je() {
|
|
512
|
-
var e;
|
|
513
|
-
((e = o.value) == null ? void 0 : e.refresh.state) === "allowed" && await V(() => c.sdk.publish.refresh(), {
|
|
514
|
-
loadingMessage: l("menu.common.loading")
|
|
515
|
-
});
|
|
516
|
-
}
|
|
517
|
-
function Ge(e) {
|
|
518
|
-
c.sdk.publish.search(e);
|
|
519
|
-
}
|
|
520
|
-
function He() {
|
|
521
|
-
F.hasRoute("$settings-my-business") && F.push({ name: "$settings-my-business" });
|
|
522
|
-
}
|
|
523
|
-
function qe(e) {
|
|
524
|
-
return q.value.length === 0 || q.value.includes(e);
|
|
525
|
-
}
|
|
526
|
-
function Je(e) {
|
|
527
|
-
c.sdk.publish.setStatusFilter(e);
|
|
528
|
-
}
|
|
529
|
-
function We(e) {
|
|
530
|
-
Je(
|
|
531
|
-
Q.value.includes(e) ? Q.value.filter((t) => t !== e) : [...Q.value, e]
|
|
532
|
-
);
|
|
533
|
-
}
|
|
534
|
-
function Xe(e) {
|
|
535
|
-
c.sdk.publish.setSelectedRestaurants(
|
|
536
|
-
Object.entries(e).filter(([, t]) => t).map(([t]) => t)
|
|
537
|
-
);
|
|
538
|
-
}
|
|
539
|
-
async function Ye() {
|
|
540
|
-
await V(() => c.sdk.publish.publish(), {
|
|
541
|
-
loadingMessage: l("menu.common.loading"),
|
|
542
|
-
successMessage: (e) => {
|
|
543
|
-
var t;
|
|
544
|
-
return e.restaurantIds.length === ((t = o.value) == null ? void 0 : t.totalCount) ? l("menu.publish.actions.snackbar.published_all") : l("menu.publish.actions.snackbar.published", {
|
|
545
|
-
count: M(e.restaurantIds.length)
|
|
546
|
-
});
|
|
547
|
-
}
|
|
548
|
-
});
|
|
549
|
-
}
|
|
550
|
-
function Qe(e) {
|
|
551
|
-
V(() => c.sdk.publish.publishOne(e.restaurantId), {
|
|
552
|
-
loadingMessage: l("menu.publish.actions.snackbar.restaurant_publishing", {
|
|
553
|
-
name: e.restaurantName
|
|
554
|
-
}),
|
|
555
|
-
successMessage: l("menu.publish.actions.snackbar.restaurant_published", {
|
|
556
|
-
name: e.restaurantName
|
|
557
|
-
})
|
|
558
|
-
});
|
|
559
|
-
}
|
|
560
|
-
function Ze(e) {
|
|
561
|
-
if (e.revert.state !== "allowed") return;
|
|
562
|
-
const t = c.sdk.publish.revertPreview(e.restaurantId);
|
|
563
|
-
D.open({
|
|
564
|
-
title: l("menu.revert.title"),
|
|
565
|
-
contentComponent: tl,
|
|
566
|
-
contentComponentProps: { session: t },
|
|
567
|
-
primaryActions: {
|
|
568
|
-
text: l("menu.revert.action"),
|
|
569
|
-
close: !0
|
|
570
|
-
},
|
|
571
|
-
secondaryActions: {
|
|
572
|
-
text: l("menu.common.actions.cancel"),
|
|
573
|
-
close: !0
|
|
574
|
-
}
|
|
575
|
-
}).onPrimary(
|
|
576
|
-
() => V(() => c.sdk.publish.revert(e.restaurantId), {
|
|
577
|
-
loadingTitle: l("menu.publish.actions.snackbar.reverting", {
|
|
578
|
-
name: e.restaurantName
|
|
579
|
-
}),
|
|
580
|
-
successMessage: l("menu.publish.actions.snackbar.reverted")
|
|
581
|
-
})
|
|
582
|
-
);
|
|
583
|
-
}
|
|
584
|
-
function et() {
|
|
585
|
-
ge();
|
|
586
|
-
const e = c.sdk.publish.scheduleEditor();
|
|
587
|
-
N.value = e, I.value = e.get(), L = e.subscribe((t) => {
|
|
588
|
-
I.value = t;
|
|
589
|
-
}), O.value = !0;
|
|
590
|
-
}
|
|
591
|
-
function ge() {
|
|
592
|
-
var e;
|
|
593
|
-
L == null || L(), L = null, (e = N.value) == null || e.dispose(), N.value = null, I.value = null;
|
|
594
|
-
}
|
|
595
|
-
const R = v(
|
|
596
|
-
() => {
|
|
597
|
-
var e;
|
|
598
|
-
return ((e = I.value) == null ? void 0 : e.status) === "ready" ? I.value.value : null;
|
|
599
|
-
}
|
|
600
|
-
);
|
|
601
|
-
async function tt() {
|
|
602
|
-
var u;
|
|
603
|
-
if (!N.value) return;
|
|
604
|
-
const e = ((u = R.value) == null ? void 0 : u.restaurantIds.length) ?? 0;
|
|
605
|
-
(await V(() => N.value.submit(), {
|
|
606
|
-
loadingMessage: l("menu.common.loading"),
|
|
607
|
-
successMessage: l("menu.publish.actions.snackbar.scheduled", {
|
|
608
|
-
count: M(e)
|
|
609
|
-
}),
|
|
610
|
-
// `submit()` switches its capability to disabled synchronously only
|
|
611
|
-
// after accepting a write. Local composite validation stays allowed,
|
|
612
|
-
// so it gets the legacy immediate error toast without a spinner.
|
|
613
|
-
showLoading: () => {
|
|
614
|
-
var h;
|
|
615
|
-
const g = (h = N.value) == null ? void 0 : h.get();
|
|
616
|
-
return (g == null ? void 0 : g.status) === "ready" && g.value.submit.state === "disabled";
|
|
617
|
-
},
|
|
618
|
-
toastFieldIssues: !0
|
|
619
|
-
})).kind === "success" && (O.value = !1);
|
|
620
|
-
}
|
|
621
|
-
Le(O, (e) => {
|
|
622
|
-
e || ge();
|
|
623
|
-
}), de(ge);
|
|
624
|
-
function lt(e) {
|
|
625
|
-
D.open({
|
|
626
|
-
title: l("menu.publish.scheduler_publish.remove_scheduled.title"),
|
|
627
|
-
message: l("menu.publish.scheduler_publish.remove_scheduled.message"),
|
|
628
|
-
primaryActions: {
|
|
629
|
-
text: l("menu.common.actions.remove"),
|
|
630
|
-
close: !0
|
|
631
|
-
},
|
|
632
|
-
secondaryActions: {
|
|
633
|
-
text: l("menu.common.actions.cancel"),
|
|
634
|
-
close: !0
|
|
635
|
-
}
|
|
636
|
-
}).onPrimary(
|
|
637
|
-
() => V(() => c.sdk.publish.cancelSchedule(e.scheduledAt), {
|
|
638
|
-
successMessage: l(
|
|
639
|
-
"menu.publish.scheduler_publish.remove_scheduled.success"
|
|
640
|
-
),
|
|
641
|
-
successPresentation: "message",
|
|
642
|
-
showLoading: !1
|
|
643
|
-
})
|
|
644
|
-
);
|
|
645
|
-
}
|
|
646
|
-
const U = ie(null), B = ie(
|
|
647
|
-
null
|
|
648
|
-
);
|
|
649
|
-
let te = null;
|
|
650
|
-
function st(e) {
|
|
651
|
-
if (e.openCatalogMapping.state !== "allowed") return;
|
|
652
|
-
_e();
|
|
653
|
-
const t = c.sdk.publish.catalogMapping(e.restaurantId);
|
|
654
|
-
U.value = t, B.value = t.get(), te = t.subscribe((u) => {
|
|
655
|
-
B.value = u;
|
|
656
|
-
}), G.value = !0;
|
|
657
|
-
}
|
|
658
|
-
function _e() {
|
|
659
|
-
var e;
|
|
660
|
-
te == null || te(), te = null, (e = U.value) == null || e.dispose(), U.value = null, B.value = null;
|
|
661
|
-
}
|
|
662
|
-
Le(G, (e) => {
|
|
663
|
-
e || _e();
|
|
664
|
-
}), de(_e);
|
|
665
|
-
const T = v(
|
|
666
|
-
() => {
|
|
667
|
-
var e;
|
|
668
|
-
return ((e = B.value) == null ? void 0 : e.status) === "ready" ? B.value.value : null;
|
|
669
|
-
}
|
|
670
|
-
), fe = v(() => {
|
|
671
|
-
var e;
|
|
672
|
-
return [
|
|
673
|
-
{
|
|
674
|
-
label: l(
|
|
675
|
-
"menu.publish.update_catalog_dialog.sections.default.use_default"
|
|
676
|
-
),
|
|
677
|
-
value: null
|
|
678
|
-
},
|
|
679
|
-
...(((e = T.value) == null ? void 0 : e.catalogOptions) ?? []).map((t) => ({
|
|
680
|
-
label: t.name,
|
|
681
|
-
value: t.catalogId
|
|
682
|
-
}))
|
|
683
|
-
];
|
|
684
|
-
}), at = v(
|
|
685
|
-
() => {
|
|
686
|
-
var e;
|
|
687
|
-
return (((e = T.value) == null ? void 0 : e.additionalCatalogs) ?? []).filter((t) => t.selected).map((t) => t.catalogId);
|
|
688
|
-
}
|
|
689
|
-
);
|
|
690
|
-
function ye(e, t) {
|
|
691
|
-
U.value && (e === "catalogId" ? U.value.setCatalogId(t) : e === "takeawayCatalog" ? U.value.setTakeawayCatalog(t) : U.value.setPickupCatalog(t));
|
|
692
|
-
}
|
|
693
|
-
function nt(e) {
|
|
694
|
-
var t;
|
|
695
|
-
(t = U.value) == null || t.setAdditionalCatalogs(e);
|
|
696
|
-
}
|
|
697
|
-
async function ot() {
|
|
698
|
-
var g, h, E, z;
|
|
699
|
-
if (!U.value) return;
|
|
700
|
-
const e = (g = T.value) == null ? void 0 : g.restaurantId, t = ((E = (h = o.value) == null ? void 0 : h.rows.find((X) => X.restaurantId === e)) == null ? void 0 : E.restaurantName) ?? ((z = T.value) == null ? void 0 : z.displayName) ?? "";
|
|
701
|
-
(await V(() => U.value.submit(), {
|
|
702
|
-
loadingTitle: l("menu.publish.actions.snackbar.restaurant_publishing", {
|
|
703
|
-
name: t
|
|
704
|
-
}),
|
|
705
|
-
loadingMessage: l("menu.common.loading"),
|
|
706
|
-
successMessage: l("menu.publish.actions.snackbar.restaurant_published", {
|
|
707
|
-
name: t
|
|
708
|
-
})
|
|
709
|
-
})).kind === "success" && (G.value = !1);
|
|
710
|
-
}
|
|
711
|
-
function ut(e) {
|
|
712
|
-
if (e.openDetails.state !== "allowed") return;
|
|
713
|
-
const t = c.sdk.publish.scheduleDetails(e.scheduledAt);
|
|
714
|
-
D.open({
|
|
715
|
-
title: l(
|
|
716
|
-
"menu.publish.scheduler_publish.restaurant_publish_details.title"
|
|
717
|
-
),
|
|
718
|
-
contentComponent: Vt,
|
|
719
|
-
contentComponentProps: { session: t },
|
|
720
|
-
contentClass: "flex flex-col h-full",
|
|
721
|
-
maxWidth: "800px",
|
|
722
|
-
maxHeight: "80vh"
|
|
723
|
-
});
|
|
724
|
-
}
|
|
725
|
-
const it = v(() => [
|
|
726
|
-
{
|
|
727
|
-
accessorKey: "displayName",
|
|
728
|
-
header: () => l("menu.publish.table.columns.restaurant"),
|
|
729
|
-
cell: (e) => e.getValue(),
|
|
730
|
-
enableSorting: !0
|
|
731
|
-
},
|
|
732
|
-
{
|
|
733
|
-
id: "defaultCatalog",
|
|
734
|
-
accessorKey: "defaultCatalog",
|
|
735
|
-
header: () => l("menu.publish.table.columns.default"),
|
|
736
|
-
enableSorting: !1,
|
|
737
|
-
cell: (e) => ve(e.getValue())
|
|
738
|
-
},
|
|
739
|
-
{
|
|
740
|
-
id: "takeawayCatalog",
|
|
741
|
-
accessorKey: "takeawayCatalog",
|
|
742
|
-
header: () => l("menu.publish.table.columns.pos_takeaway"),
|
|
743
|
-
enableSorting: !1,
|
|
744
|
-
cell: (e) => ve(e.getValue())
|
|
745
|
-
},
|
|
746
|
-
{
|
|
747
|
-
id: "pickupCatalog",
|
|
748
|
-
accessorKey: "pickupCatalog",
|
|
749
|
-
header: () => l("menu.publish.table.columns.pickup"),
|
|
750
|
-
enableSorting: !1,
|
|
751
|
-
cell: (e) => ve(e.getValue())
|
|
752
|
-
},
|
|
753
|
-
{
|
|
754
|
-
accessorKey: "publishedAt",
|
|
755
|
-
header: () => l("menu.publish.table.columns.version"),
|
|
756
|
-
enableSorting: !1,
|
|
757
|
-
cell: (e) => Se(e.getValue())
|
|
758
|
-
},
|
|
759
|
-
{
|
|
760
|
-
accessorKey: "status",
|
|
761
|
-
header: () => l("menu.common.labels.status"),
|
|
762
|
-
enableSorting: !1,
|
|
763
|
-
cell: (e) => {
|
|
764
|
-
const t = e.getValue(), u = t === "latest";
|
|
765
|
-
return $(se.FmChip, {
|
|
766
|
-
label: l(t === "publishing" ? "menu.publish.scheduler_publish.status.running" : t === "queued" ? "menu.publish.table.status.queued" : u ? "menu.publish.table.status.latest" : "menu.publish.table.status.outdated"),
|
|
767
|
-
variant: u ? "success" : t === "outdated" ? (
|
|
768
|
-
// Legacy represents an out-of-date menu as an orange, not
|
|
769
|
-
// mustard, state. FmChip's warning variant is mustard, so the
|
|
770
|
-
// neutral chip below receives the semantic warning tokens.
|
|
771
|
-
"plain"
|
|
772
|
-
) : t === "publishing" ? "info" : "plain",
|
|
773
|
-
class: t === "outdated" ? "bg-fm-color-system-warning-100 text-fm-color-primary" : void 0
|
|
774
|
-
});
|
|
775
|
-
}
|
|
776
|
-
},
|
|
777
|
-
{
|
|
778
|
-
id: "actions",
|
|
779
|
-
header: "",
|
|
780
|
-
enableSorting: !1,
|
|
781
|
-
cell: (e) => {
|
|
782
|
-
var h;
|
|
783
|
-
const t = (h = e == null ? void 0 : e.row) == null ? void 0 : h.original;
|
|
784
|
-
if (!t) return null;
|
|
785
|
-
const u = t.publish ?? { state: "disabled" }, g = t.revert ?? { state: "hidden" };
|
|
786
|
-
return $("div", { class: "flex justify-end gap-4" }, [
|
|
787
|
-
g.state === "hidden" ? null : $(se.FmButton, {
|
|
788
|
-
icon: "undo",
|
|
789
|
-
variant: "secondary",
|
|
790
|
-
disabled: g.state !== "allowed",
|
|
791
|
-
ariaLabel: l("menu.publish.actions.revert"),
|
|
792
|
-
onClick: (E) => {
|
|
793
|
-
E.stopPropagation(), Ze(t);
|
|
794
|
-
}
|
|
795
|
-
}),
|
|
796
|
-
$(se.FmButton, {
|
|
797
|
-
label: l("menu.publish.actions.publish"),
|
|
798
|
-
prependIcon: "ios_share",
|
|
799
|
-
size: "md",
|
|
800
|
-
variant: "secondary",
|
|
801
|
-
disabled: u.state !== "allowed",
|
|
802
|
-
onClick: (E) => {
|
|
803
|
-
E.stopPropagation(), Qe(t);
|
|
804
|
-
}
|
|
805
|
-
})
|
|
806
|
-
]);
|
|
807
|
-
}
|
|
808
|
-
}
|
|
809
|
-
]), rt = v(() => [
|
|
810
|
-
{
|
|
811
|
-
accessorKey: "scheduledAt",
|
|
812
|
-
header: () => l("menu.publish.scheduler_publish.table.columns.date"),
|
|
813
|
-
cell: (e) => Ie(e.getValue())
|
|
814
|
-
},
|
|
815
|
-
{
|
|
816
|
-
accessorKey: "publisherName",
|
|
817
|
-
header: () => l("menu.publish.scheduler_publish.table.columns.publisher_name"),
|
|
818
|
-
cell: (e) => e.getValue() ?? l("menu.common.labels.unknown")
|
|
819
|
-
},
|
|
820
|
-
{
|
|
821
|
-
accessorKey: "restaurantCount",
|
|
822
|
-
header: () => l("menu.publish.scheduler_publish.table.columns.total_restaurants"),
|
|
823
|
-
cell: (e) => l("menu.publish.scheduler_publish.table.row.restaurants", {
|
|
824
|
-
total: M(e.getValue())
|
|
825
|
-
})
|
|
826
|
-
},
|
|
827
|
-
{
|
|
828
|
-
id: "progress",
|
|
829
|
-
accessorKey: "progressPercent",
|
|
830
|
-
header: () => l("menu.publish.scheduler_publish.table.columns.progress"),
|
|
831
|
-
cell: (e) => {
|
|
832
|
-
var u, g;
|
|
833
|
-
const t = e.row.original;
|
|
834
|
-
return $("div", { class: "flex items-center justify-between gap-32" }, [
|
|
835
|
-
$("div", { class: "flex w-full flex-col gap-4" }, [
|
|
836
|
-
$("div", { class: "flex items-center gap-8" }, [
|
|
837
|
-
$(
|
|
838
|
-
"p",
|
|
839
|
-
{
|
|
840
|
-
class: `fm-typo-en-body-md-400 ${Re[t.status]}`
|
|
841
|
-
},
|
|
842
|
-
l(ce[t.status])
|
|
843
|
-
),
|
|
844
|
-
t.status === "RUNNING" ? $(
|
|
845
|
-
"span",
|
|
846
|
-
{
|
|
847
|
-
class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
|
|
848
|
-
},
|
|
849
|
-
l("menu.publish.scheduler_publish.table.row.progress", {
|
|
850
|
-
published: M(t.publishedCount),
|
|
851
|
-
total: M(t.restaurantCount)
|
|
852
|
-
})
|
|
853
|
-
) : null
|
|
854
|
-
]),
|
|
855
|
-
$(wt, {
|
|
856
|
-
percent: t.progressPercent,
|
|
857
|
-
variant: xt[t.status]
|
|
858
|
-
})
|
|
859
|
-
]),
|
|
860
|
-
$(se.FmButton, {
|
|
861
|
-
variant: "plain",
|
|
862
|
-
prependIcon: "info",
|
|
863
|
-
"aria-label": l(
|
|
864
|
-
"menu.publish.scheduler_publish.restaurant_publish_details.title"
|
|
865
|
-
),
|
|
866
|
-
disabled: ((u = t.openDetails) == null ? void 0 : u.state) !== "allowed",
|
|
867
|
-
onClick: () => ut(t)
|
|
868
|
-
}),
|
|
869
|
-
$(se.FmButton, {
|
|
870
|
-
icon: "delete",
|
|
871
|
-
variant: "tertiary",
|
|
872
|
-
disabled: ((g = t.cancel) == null ? void 0 : g.state) !== "allowed",
|
|
873
|
-
ariaLabel: l("menu.common.actions.remove"),
|
|
874
|
-
onClick: (h) => {
|
|
875
|
-
h.stopPropagation(), lt(t);
|
|
876
|
-
}
|
|
877
|
-
})
|
|
878
|
-
]);
|
|
879
|
-
}
|
|
880
|
-
}
|
|
881
|
-
]);
|
|
882
|
-
return (e, t) => {
|
|
883
|
-
const u = _("FmChip"), g = _("FmSpacer"), h = _("FmButton"), E = _("FmBadge"), z = _("FmCircularProgress"), X = _("FmIcon"), Z = _("FmMenuItem"), le = _("FmMenu"), ct = _("FmSearch"), Pe = _("FmTable"), ke = _("FmTextField"), dt = _("FmDatePicker"), oe = _("FmSelect"), Ae = _("FmSideSheet"), mt = _("FmCheckbox");
|
|
884
|
-
return a(), y(_t, {
|
|
885
|
-
heading: s(l)("menu.publish.title")
|
|
886
|
-
}, {
|
|
887
|
-
"append-heading": x(() => {
|
|
888
|
-
var d, f, w, ue, Me, Ve;
|
|
889
|
-
return [
|
|
890
|
-
n("div", ll, [
|
|
891
|
-
(d = o.value) != null && d.mainVersionAt ? (a(), y(u, {
|
|
892
|
-
key: 0,
|
|
893
|
-
label: Ke.value,
|
|
894
|
-
class: "bg-fm-color-system-warning-100 text-fm-color-primary"
|
|
895
|
-
}, null, 8, ["label"])) : A("", !0),
|
|
896
|
-
i(g),
|
|
897
|
-
o.value ? (a(), y(h, {
|
|
898
|
-
key: 1,
|
|
899
|
-
disabled: o.value.refresh.state !== "allowed",
|
|
900
|
-
label: s(l)("menu.publish.actions.refresh"),
|
|
901
|
-
variant: "secondary",
|
|
902
|
-
onClick: je
|
|
903
|
-
}, null, 8, ["disabled", "label"])) : A("", !0),
|
|
904
|
-
(f = o.value) != null && f.hasRunningJob ? (a(), y(E, {
|
|
905
|
-
key: 2,
|
|
906
|
-
value: 1,
|
|
907
|
-
variant: "critical"
|
|
908
|
-
}, {
|
|
909
|
-
default: x(() => {
|
|
910
|
-
var we, Ne;
|
|
911
|
-
return [
|
|
912
|
-
i(h, {
|
|
913
|
-
disabled: ((Ne = (we = o.value) == null ? void 0 : we.openProgress) == null ? void 0 : Ne.state) !== "allowed",
|
|
914
|
-
label: s(l)("menu.publish.actions.publish_progress"),
|
|
915
|
-
variant: "secondary",
|
|
916
|
-
onClick: t[0] || (t[0] = (Il) => W.value = !0)
|
|
917
|
-
}, null, 8, ["disabled", "label"])
|
|
918
|
-
];
|
|
919
|
-
}),
|
|
920
|
-
_: 1
|
|
921
|
-
})) : o.value ? (a(), y(h, {
|
|
922
|
-
key: 3,
|
|
923
|
-
disabled: ((ue = (w = o.value) == null ? void 0 : w.openProgress) == null ? void 0 : ue.state) !== "allowed",
|
|
924
|
-
label: s(l)("menu.publish.actions.publish_progress"),
|
|
925
|
-
variant: "secondary",
|
|
926
|
-
onClick: t[1] || (t[1] = (we) => W.value = !0)
|
|
927
|
-
}, null, 8, ["disabled", "label"])) : A("", !0),
|
|
928
|
-
o.value ? (a(), y(h, {
|
|
929
|
-
key: 4,
|
|
930
|
-
disabled: ((Ve = (Me = o.value) == null ? void 0 : Me.publish) == null ? void 0 : Ve.state) !== "allowed",
|
|
931
|
-
label: s(l)("menu.publish.actions.publish_all"),
|
|
932
|
-
"prepend-icon": "ios_share",
|
|
933
|
-
onClick: Ye
|
|
934
|
-
}, null, 8, ["disabled", "label"])) : A("", !0)
|
|
935
|
-
])
|
|
936
|
-
];
|
|
937
|
-
}),
|
|
938
|
-
default: x(() => [
|
|
939
|
-
s(P).status === "error" ? (a(), b("p", sl, m(s(p)(s(P).error.message)), 1)) : s(P).status === "unavailable" ? (a(), b("div", al, m(s(p)(s(P).reason)), 1)) : s(P).status === "loading" ? (a(), y(z, { key: 2 })) : o.value ? (a(), b(H, { key: 3 }, [
|
|
940
|
-
n("div", nl, [
|
|
941
|
-
i(le, {
|
|
942
|
-
"close-on-click": !1,
|
|
943
|
-
width: 360
|
|
944
|
-
}, {
|
|
945
|
-
"menu-button": x(() => [
|
|
946
|
-
i(u, null, {
|
|
947
|
-
default: x(() => [
|
|
948
|
-
i(X, {
|
|
949
|
-
color: "neutral-gray-400",
|
|
950
|
-
name: "storefront",
|
|
951
|
-
outline: "",
|
|
952
|
-
size: "sm"
|
|
953
|
-
}),
|
|
954
|
-
n("div", ol, m(S.value), 1),
|
|
955
|
-
i(X, {
|
|
956
|
-
color: "neutral-gray-400",
|
|
957
|
-
name: "keyboard_arrow_down",
|
|
958
|
-
outline: "",
|
|
959
|
-
size: "sm"
|
|
960
|
-
})
|
|
961
|
-
]),
|
|
962
|
-
_: 1
|
|
963
|
-
})
|
|
964
|
-
]),
|
|
965
|
-
default: x(() => [
|
|
966
|
-
i(Z, {
|
|
967
|
-
"has-checkbox": "",
|
|
968
|
-
label: s(l)("menu.publish.scheduler_publish.selector.restaurant.all"),
|
|
969
|
-
"model-value": q.value.length === 0,
|
|
970
|
-
onClick: t[2] || (t[2] = (d) => c.sdk.publish.selectAllRestaurants())
|
|
971
|
-
}, null, 8, ["label", "model-value"]),
|
|
972
|
-
(a(!0), b(H, null, re(o.value.restaurantOptions, (d) => (a(), y(Z, {
|
|
973
|
-
key: d.restaurantId,
|
|
974
|
-
"has-checkbox": "",
|
|
975
|
-
label: d.name,
|
|
976
|
-
"model-value": qe(d.restaurantId),
|
|
977
|
-
onClick: (f) => c.sdk.publish.toggleRestaurantFilter(d.restaurantId)
|
|
978
|
-
}, null, 8, ["label", "model-value", "onClick"]))), 128))
|
|
979
|
-
]),
|
|
980
|
-
_: 1
|
|
981
|
-
}),
|
|
982
|
-
i(le, { "close-on-click": !1 }, {
|
|
983
|
-
"menu-button": x(() => [
|
|
984
|
-
i(h, {
|
|
985
|
-
"prepend-icon": "add",
|
|
986
|
-
label: s(l)("menu.publish.table.filter"),
|
|
987
|
-
variant: "secondary"
|
|
988
|
-
}, null, 8, ["label"])
|
|
989
|
-
]),
|
|
990
|
-
default: x(() => [
|
|
991
|
-
(a(), b(H, null, re(he, (d) => i(Z, {
|
|
992
|
-
key: d,
|
|
993
|
-
"has-checkbox": "",
|
|
994
|
-
label: s(l)(
|
|
995
|
-
d === "latest" ? "menu.publish.table.status.latest" : d === "outdated" ? "menu.publish.table.status.outdated" : d === "publishing" ? "menu.publish.scheduler_publish.status.running" : "menu.publish.scheduler_publish.status.pending"
|
|
996
|
-
),
|
|
997
|
-
"model-value": Q.value.includes(d),
|
|
998
|
-
onClick: (f) => We(d)
|
|
999
|
-
}, null, 8, ["label", "model-value", "onClick"])), 64))
|
|
1000
|
-
]),
|
|
1001
|
-
_: 1
|
|
1002
|
-
}),
|
|
1003
|
-
n("div", ul, [
|
|
1004
|
-
i(ct, {
|
|
1005
|
-
"aria-label": s(l)("menu.publish.table.search.placeholder"),
|
|
1006
|
-
"model-value": o.value.query,
|
|
1007
|
-
placeholder: s(l)("menu.publish.table.search.placeholder"),
|
|
1008
|
-
"onUpdate:modelValue": Ge
|
|
1009
|
-
}, null, 8, ["aria-label", "model-value", "placeholder"])
|
|
1010
|
-
])
|
|
1011
|
-
]),
|
|
1012
|
-
o.value.totalCount === 0 ? (a(), y(s(De), {
|
|
1013
|
-
key: 0,
|
|
1014
|
-
action: {
|
|
1015
|
-
text: s(l)("menu.publish.empty.action"),
|
|
1016
|
-
icon: "add",
|
|
1017
|
-
callback: He
|
|
1018
|
-
},
|
|
1019
|
-
subtitle: s(l)("menu.publish.empty.subtitle"),
|
|
1020
|
-
title: s(l)("menu.publish.empty.title")
|
|
1021
|
-
}, null, 8, ["action", "subtitle", "title"])) : (a(), y(gt, { key: 1 }, {
|
|
1022
|
-
default: x(() => {
|
|
1023
|
-
var d, f;
|
|
1024
|
-
return [
|
|
1025
|
-
i(Pe, {
|
|
1026
|
-
"column-defs": it.value,
|
|
1027
|
-
"get-row-id": (w) => w.restaurantId,
|
|
1028
|
-
"model-value": pe.value,
|
|
1029
|
-
"page-size": Math.max(((f = (d = o.value) == null ? void 0 : d.rows) == null ? void 0 : f.length) ?? 0, 1),
|
|
1030
|
-
"pin-header-row": "",
|
|
1031
|
-
"row-data": j.value,
|
|
1032
|
-
selection: "multiple",
|
|
1033
|
-
"shrink-at": !1,
|
|
1034
|
-
virtual: !0,
|
|
1035
|
-
"hide-footer": "",
|
|
1036
|
-
"onUpdate:modelValue": Xe,
|
|
1037
|
-
onRowClick: t[3] || (t[3] = (w) => st(w.original))
|
|
1038
|
-
}, null, 8, ["column-defs", "get-row-id", "model-value", "page-size", "row-data"])
|
|
1039
|
-
];
|
|
1040
|
-
}),
|
|
1041
|
-
_: 1
|
|
1042
|
-
}))
|
|
1043
|
-
], 64)) : A("", !0),
|
|
1044
|
-
i(Ae, {
|
|
1045
|
-
modelValue: W.value,
|
|
1046
|
-
"onUpdate:modelValue": t[9] || (t[9] = (d) => W.value = d),
|
|
1047
|
-
"close-button": !1,
|
|
1048
|
-
"max-width": 800
|
|
1049
|
-
}, {
|
|
1050
|
-
"side-sheet-header": x(() => [
|
|
1051
|
-
n("div", il, [
|
|
1052
|
-
i(h, {
|
|
1053
|
-
"aria-label": s(l)("menu.common.actions.back"),
|
|
1054
|
-
"prepend-icon": "arrow_back",
|
|
1055
|
-
variant: "tertiary",
|
|
1056
|
-
onClick: t[4] || (t[4] = (d) => W.value = !1)
|
|
1057
|
-
}, null, 8, ["aria-label"]),
|
|
1058
|
-
n("p", rl, m(s(l)("menu.publish.actions.publish_progress")), 1)
|
|
1059
|
-
])
|
|
1060
|
-
]),
|
|
1061
|
-
default: x(() => {
|
|
1062
|
-
var d;
|
|
1063
|
-
return [
|
|
1064
|
-
n("div", null, [
|
|
1065
|
-
s(C).status === "error" ? (a(), b("p", cl, m(s(p)(s(C).error.message)), 1)) : s(C).status === "unavailable" ? (a(), b("p", dl, m(s(p)(s(C).reason)), 1)) : s(C).status === "loading" ? (a(), y(z, { key: 2 })) : J.value ? (a(), y(Pe, {
|
|
1066
|
-
key: 3,
|
|
1067
|
-
class: Te({ "pb-8": !O.value }),
|
|
1068
|
-
"column-defs": rt.value,
|
|
1069
|
-
"hide-footer": "",
|
|
1070
|
-
"page-size": Math.max(1, J.value.rows.length),
|
|
1071
|
-
"row-data": ne.value,
|
|
1072
|
-
"shrink-at": !1
|
|
1073
|
-
}, null, 8, ["class", "column-defs", "page-size", "row-data"])) : A("", !0),
|
|
1074
|
-
!O.value && J.value && ((d = J.value.schedule) == null ? void 0 : d.state) === "allowed" ? (a(), y(h, {
|
|
1075
|
-
key: 4,
|
|
1076
|
-
"prepend-icon": "add",
|
|
1077
|
-
label: s(l)("menu.publish.actions.add_scheduler_publish"),
|
|
1078
|
-
variant: "plain",
|
|
1079
|
-
onClick: et
|
|
1080
|
-
}, null, 8, ["label"])) : A("", !0),
|
|
1081
|
-
O.value && I.value ? (a(), b("div", ml, [
|
|
1082
|
-
I.value.status === "loading" ? (a(), y(z, { key: 0 })) : I.value.status === "error" ? (a(), b("p", pl, m(s(p)(I.value.error.message)), 1)) : I.value.status === "unavailable" ? (a(), b("p", hl, m(s(p)(I.value.reason)), 1)) : R.value ? (a(), b(H, { key: 3 }, [
|
|
1083
|
-
n("div", bl, [
|
|
1084
|
-
n("div", null, [
|
|
1085
|
-
i(dt, {
|
|
1086
|
-
label: "",
|
|
1087
|
-
"model-value": Ue() ?? void 0,
|
|
1088
|
-
"onUpdate:modelValue": ze
|
|
1089
|
-
}, {
|
|
1090
|
-
"trigger-button": x(() => [
|
|
1091
|
-
i(ke, {
|
|
1092
|
-
ref: Ee,
|
|
1093
|
-
label: "",
|
|
1094
|
-
"model-value": Oe(),
|
|
1095
|
-
placeholder: s(l)(
|
|
1096
|
-
"menu.publish.scheduler_publish.selector.date_time_placeholder"
|
|
1097
|
-
),
|
|
1098
|
-
readonly: ""
|
|
1099
|
-
}, null, 8, ["model-value", "placeholder"])
|
|
1100
|
-
]),
|
|
1101
|
-
_: 1
|
|
1102
|
-
}, 8, ["model-value"])
|
|
1103
|
-
]),
|
|
1104
|
-
t[16] || (t[16] = n("div", null, null, -1)),
|
|
1105
|
-
i(oe, {
|
|
1106
|
-
class: "w-[130px]",
|
|
1107
|
-
"data-testid": "publish-schedule-restaurants",
|
|
1108
|
-
"hide-chips": "",
|
|
1109
|
-
"menu-id": "publish-schedule-restaurants-menu",
|
|
1110
|
-
role: "combobox",
|
|
1111
|
-
"aria-label": s(l)(
|
|
1112
|
-
"menu.publish.scheduler_publish.selector.restaurant.accessibility"
|
|
1113
|
-
),
|
|
1114
|
-
items: R.value.restaurantOptions.map((f) => ({
|
|
1115
|
-
label: f.name,
|
|
1116
|
-
value: f.restaurantId
|
|
1117
|
-
})),
|
|
1118
|
-
label: "",
|
|
1119
|
-
"model-value": R.value.restaurantIds,
|
|
1120
|
-
multiselect: "",
|
|
1121
|
-
"onUpdate:modelValue": t[5] || (t[5] = (f) => {
|
|
1122
|
-
var w;
|
|
1123
|
-
return (w = N.value) == null ? void 0 : w.setRestaurantIds(f ?? []);
|
|
1124
|
-
})
|
|
1125
|
-
}, null, 8, ["aria-label", "items", "model-value"]),
|
|
1126
|
-
n("div", vl, [
|
|
1127
|
-
i(h, {
|
|
1128
|
-
"aria-label": s(l)("menu.common.actions.cancel"),
|
|
1129
|
-
"prepend-icon": "close",
|
|
1130
|
-
"text-color": "system-error-300",
|
|
1131
|
-
variant: "tertiary",
|
|
1132
|
-
onClick: t[6] || (t[6] = (f) => O.value = !1)
|
|
1133
|
-
}, null, 8, ["aria-label"]),
|
|
1134
|
-
i(h, {
|
|
1135
|
-
"aria-label": s(l)("menu.publish.actions.publish"),
|
|
1136
|
-
"prepend-icon": "check",
|
|
1137
|
-
"text-color": "system-success-300",
|
|
1138
|
-
variant: "tertiary",
|
|
1139
|
-
onClick: tt
|
|
1140
|
-
}, null, 8, ["aria-label"])
|
|
1141
|
-
])
|
|
1142
|
-
]),
|
|
1143
|
-
Be.value ? (a(), b("div", gl, [
|
|
1144
|
-
i(ke, {
|
|
1145
|
-
label: s(l)("menu.publish.scheduler_publish.selector.date_time_hour"),
|
|
1146
|
-
"model-value": be("hour"),
|
|
1147
|
-
type: "text",
|
|
1148
|
-
"onUpdate:modelValue": t[7] || (t[7] = (f) => $e("hour", f))
|
|
1149
|
-
}, null, 8, ["label", "model-value"]),
|
|
1150
|
-
i(ke, {
|
|
1151
|
-
label: s(l)("menu.publish.scheduler_publish.selector.date_time_minute"),
|
|
1152
|
-
"model-value": be("minute"),
|
|
1153
|
-
type: "text",
|
|
1154
|
-
"onUpdate:modelValue": t[8] || (t[8] = (f) => $e("minute", f))
|
|
1155
|
-
}, null, 8, ["label", "model-value"])
|
|
1156
|
-
])) : A("", !0)
|
|
1157
|
-
], 64)) : A("", !0)
|
|
1158
|
-
])) : A("", !0)
|
|
1159
|
-
])
|
|
1160
|
-
];
|
|
1161
|
-
}),
|
|
1162
|
-
_: 1
|
|
1163
|
-
}, 8, ["modelValue"]),
|
|
1164
|
-
i(Ae, {
|
|
1165
|
-
modelValue: G.value,
|
|
1166
|
-
"onUpdate:modelValue": t[15] || (t[15] = (d) => G.value = d),
|
|
1167
|
-
"max-width": 560
|
|
1168
|
-
}, ht({
|
|
1169
|
-
"side-sheet-header": x(() => [
|
|
1170
|
-
n("span", _l, m(s(l)("menu.publish.update_catalog_dialog.title")), 1)
|
|
1171
|
-
]),
|
|
1172
|
-
default: x(() => {
|
|
1173
|
-
var d, f;
|
|
1174
|
-
return [
|
|
1175
|
-
T.value ? (a(), b(H, { key: 0 }, [
|
|
1176
|
-
i(oe, {
|
|
1177
|
-
class: "mb-24",
|
|
1178
|
-
items: fe.value,
|
|
1179
|
-
label: s(l)("menu.publish.update_catalog_dialog.sections.default.label"),
|
|
1180
|
-
"model-value": T.value.defaultCatalogId,
|
|
1181
|
-
"onUpdate:modelValue": t[10] || (t[10] = (w) => ye("catalogId", w ?? null))
|
|
1182
|
-
}, null, 8, ["items", "label", "model-value"]),
|
|
1183
|
-
i(oe, {
|
|
1184
|
-
class: "mb-24",
|
|
1185
|
-
items: fe.value,
|
|
1186
|
-
label: s(l)("menu.publish.update_catalog_dialog.sections.pos_takeaway.label"),
|
|
1187
|
-
"model-value": T.value.takeawayCatalogId,
|
|
1188
|
-
"onUpdate:modelValue": t[11] || (t[11] = (w) => ye(
|
|
1189
|
-
"takeawayCatalog",
|
|
1190
|
-
w ?? null
|
|
1191
|
-
))
|
|
1192
|
-
}, null, 8, ["items", "label", "model-value"]),
|
|
1193
|
-
i(oe, {
|
|
1194
|
-
items: fe.value,
|
|
1195
|
-
label: s(l)("menu.publish.update_catalog_dialog.sections.pickup.label"),
|
|
1196
|
-
"model-value": T.value.pickupCatalogId,
|
|
1197
|
-
"onUpdate:modelValue": t[12] || (t[12] = (w) => ye(
|
|
1198
|
-
"pickupCatalog",
|
|
1199
|
-
w ?? null
|
|
1200
|
-
))
|
|
1201
|
-
}, null, 8, ["items", "label", "model-value"]),
|
|
1202
|
-
n("div", fl, [
|
|
1203
|
-
n("div", yl, m(s(l)("menu.publish.update_catalog_dialog.sections.additional.title")), 1),
|
|
1204
|
-
n("div", kl, m(s(l)(
|
|
1205
|
-
"menu.publish.update_catalog_dialog.sections.additional.subtitle"
|
|
1206
|
-
)), 1),
|
|
1207
|
-
(a(!0), b(H, null, re(T.value.additionalCatalogs, (w) => (a(), b("div", {
|
|
1208
|
-
key: w.catalogId
|
|
1209
|
-
}, [
|
|
1210
|
-
i(mt, {
|
|
1211
|
-
label: w.name,
|
|
1212
|
-
"model-value": at.value,
|
|
1213
|
-
value: w.catalogId,
|
|
1214
|
-
"onUpdate:modelValue": t[13] || (t[13] = (ue) => nt(ue))
|
|
1215
|
-
}, null, 8, ["label", "model-value", "value"])
|
|
1216
|
-
]))), 128))
|
|
1217
|
-
])
|
|
1218
|
-
], 64)) : ((d = B.value) == null ? void 0 : d.status) === "error" ? (a(), b("p", wl, m(s(p)(B.value.error.message)), 1)) : ((f = B.value) == null ? void 0 : f.status) === "unavailable" ? (a(), b("p", xl, m(s(p)(B.value.reason)), 1)) : (a(), y(z, { key: 3 }))
|
|
1219
|
-
];
|
|
1220
|
-
}),
|
|
1221
|
-
_: 2
|
|
1222
|
-
}, [
|
|
1223
|
-
T.value ? {
|
|
1224
|
-
name: "side-sheet-footer",
|
|
1225
|
-
fn: x(() => {
|
|
1226
|
-
var d;
|
|
1227
|
-
return [
|
|
1228
|
-
n("div", Cl, [
|
|
1229
|
-
i(h, {
|
|
1230
|
-
label: s(l)("menu.publish.update_catalog_dialog.actions.update"),
|
|
1231
|
-
size: "lg",
|
|
1232
|
-
disabled: ((d = T.value.submit) == null ? void 0 : d.state) !== "allowed",
|
|
1233
|
-
onClick: ot
|
|
1234
|
-
}, null, 8, ["label", "disabled"]),
|
|
1235
|
-
i(h, {
|
|
1236
|
-
label: s(l)("menu.publish.update_catalog_dialog.actions.cancel"),
|
|
1237
|
-
size: "lg",
|
|
1238
|
-
variant: "tertiary",
|
|
1239
|
-
onClick: t[14] || (t[14] = (f) => G.value = !1)
|
|
1240
|
-
}, null, 8, ["label"])
|
|
1241
|
-
])
|
|
1242
|
-
];
|
|
1243
|
-
}),
|
|
1244
|
-
key: "0"
|
|
1245
|
-
} : void 0
|
|
1246
|
-
]), 1032, ["modelValue"])
|
|
1247
|
-
]),
|
|
1248
|
-
_: 1
|
|
1249
|
-
}, 8, ["heading"]);
|
|
1250
|
-
};
|
|
1251
|
-
}
|
|
1252
|
-
}), Dl = /* @__PURE__ */ ae({
|
|
1253
|
-
__name: "Publish",
|
|
1254
|
-
setup(K) {
|
|
1255
|
-
const c = ft();
|
|
1256
|
-
return (l, M) => (a(), y(Fl, { sdk: s(c) }, null, 8, ["sdk"]));
|
|
1257
|
-
}
|
|
1258
|
-
});
|
|
1259
|
-
export {
|
|
1260
|
-
Dl as default
|
|
1261
|
-
};
|