@feedmepos/mf-menu 0.18.17 → 0.19.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-DFJJHptK.js +158 -0
  2. package/dist/{ApplyProducts.vue_vue_type_script_setup_true_lang-BJ0b_uKf.js → ApplyProducts.vue_vue_type_script_setup_true_lang-CXoRwrTi.js} +2 -2
  3. package/dist/Catalog-CXzqtCF8.js +551 -0
  4. package/dist/Category-DKbtLbq8.js +387 -0
  5. package/dist/CookingGuide-BKon8TdH.js +862 -0
  6. package/dist/Group-D1UDksBG.js +46 -0
  7. package/dist/{Group-jEtbECLb.js → Group-izOWb_Bh.js} +1 -1
  8. package/dist/Group.vue_vue_type_script_setup_true_lang-DAlQcgYp.js +558 -0
  9. package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Q7es2wmt.js +237 -0
  10. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Bw4uxqAp.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-Db0uYw5O.js} +11723 -11723
  11. package/dist/Ingredient-BIJu9P_9.js +484 -0
  12. package/dist/LinkProductSideSheet-BNdFZThd.js +104 -0
  13. package/dist/PrintRoute--fYPFcy7.js +417 -0
  14. package/dist/{Product-Bnr9oFr2.js → Product-vLtISbkD.js} +1 -1
  15. package/dist/Product.vue_vue_type_script_setup_true_lang-BHCihe6o.js +826 -0
  16. package/dist/Products-JaCNtcHS.js +236 -0
  17. package/dist/Publish-jpmiyB-b.js +525 -0
  18. package/dist/Recipe-B6y-oLPG.js +320 -0
  19. package/dist/Scheduler-Dj1rlr-U.js +222 -0
  20. package/dist/SchedulerSelector.vue_vue_type_script_setup_true_lang-BVAkohGJ.js +48 -0
  21. package/dist/ServingSequence-BhIfCyXl.js +4 -0
  22. package/dist/{Setting-DN8TQdIR.js → Setting-B5R1JfaL.js} +1 -1
  23. package/dist/Setting.vue_vue_type_script_setup_true_lang-xXtg0JOn.js +253 -0
  24. package/dist/Takeaway-BSFSz_JL.js +63 -0
  25. package/dist/{Takeaway-y0Nk0JAb.js → Takeaway-DjFTtbw6.js} +1 -1
  26. package/dist/Takeaway.vue_vue_type_script_setup_true_lang-BUGL0wfZ.js +302 -0
  27. package/dist/TaxSetting-D9Q8XNgJ.js +25 -0
  28. package/dist/Unit-Cr_8O3zB.js +142 -0
  29. package/dist/Variant-loUMfNRB.js +222 -0
  30. package/dist/_id_-0w7KjYyQ.js +189 -0
  31. package/dist/{app-D7e31gIv.js → app-t9ONnc0s.js} +31701 -26207
  32. package/dist/app.js +7 -6
  33. package/dist/apps/mf-menu/src/app.d.ts +2784 -0
  34. package/dist/apps/mf-menu/src/components/feature/Fields/OrderFrom.vue.d.ts +2 -2
  35. package/dist/apps/mf-menu/src/components/feature/LinkProduct/LinkProductSideSheet.vue.d.ts +2 -2
  36. package/dist/apps/mf-menu/src/manager/menu/catalog.d.ts +1 -0
  37. package/dist/apps/mf-menu/src/stores/manager/item.d.ts +1 -1
  38. package/dist/apps/mf-menu/src/stores/menu.d.ts +16 -16
  39. package/dist/apps/mf-menu/src/views/Publish/UpdateCatalogDialog.vue.d.ts +12 -12
  40. package/dist/apps/mf-menu/src/views/Scheduler/FilterForm.vue.d.ts +4 -4
  41. package/dist/apps/mf-menu/src/views/Scheduler/SchedulerDialog.vue.d.ts +4 -4
  42. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  43. package/dist/assets/{linked-status-D5tq3eE2.js → linked-status-DLL4aRiX.js} +8 -8
  44. package/dist/assets/{validate-menu-AcCpPyQZ.js → validate-menu-CoXc16jh.js} +8 -8
  45. package/dist/{catalog-Ck7lLTN2.js → catalog-4OmC0JA3.js} +66 -62
  46. package/dist/category-BE33DRqp.js +155 -0
  47. package/dist/{currency-CclA5a-2.js → currency-JHgYNbTQ.js} +1 -1
  48. package/dist/{index-DDd9B_ur.js → index-CE3zjhyh.js} +732 -740
  49. package/dist/index-pSg9p-28.js +238 -0
  50. package/dist/item-CEPx51U1.js +6371 -0
  51. package/dist/{lodash-BIQx_fko.js → lodash-VivR_BQ2.js} +1 -1
  52. package/dist/{menu-CYzbNubv.js → menu-ETQrtbbU.js} +1 -1
  53. package/dist/{object-DUtbNpoS.js → object-DEM5FMTB.js} +4 -4
  54. package/dist/scheduler-SRT_5Nio.js +491 -0
  55. package/dist/string-DpfFixWH.js +4 -0
  56. package/dist/style.css +1 -1
  57. package/dist/takeaway-RcvqKigG.js +267 -0
  58. package/dist/{toExcel-BXPcj8Gp.js → toExcel-BcgskY3F.js} +2 -2
  59. package/dist/unit-DLL7xIF1.js +350 -0
  60. package/package.json +4 -2
  61. package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-D9QsJ4vO.js +0 -155
  62. package/dist/Catalog-CZW54QJU.js +0 -570
  63. package/dist/Category-DvsP_L7d.js +0 -405
  64. package/dist/CookingGuide-DC3uXetk.js +0 -848
  65. package/dist/Group-DK5xqeYX.js +0 -44
  66. package/dist/Group.vue_vue_type_script_setup_true_lang-DGZ9hnPg.js +0 -538
  67. package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BQXqlXw4.js +0 -234
  68. package/dist/Ingredient-354LLwdX.js +0 -498
  69. package/dist/LinkProductSideSheet-anxSsu0z.js +0 -102
  70. package/dist/PrintRoute-DrSvtNLX.js +0 -425
  71. package/dist/Product.vue_vue_type_script_setup_true_lang-bBY54Q_1.js +0 -815
  72. package/dist/Products-CZyueqSO.js +0 -234
  73. package/dist/Publish-kRM1UuPk.js +0 -518
  74. package/dist/Recipe-nKpLIJs8.js +0 -345
  75. package/dist/Scheduler-DmZ8atXG.js +0 -233
  76. package/dist/SchedulerSelector.vue_vue_type_script_setup_true_lang-CdsxA-p0.js +0 -48
  77. package/dist/ServingSequence-j00_ko5R.js +0 -4
  78. package/dist/Setting.vue_vue_type_script_setup_true_lang-Cx06MCJs.js +0 -247
  79. package/dist/Takeaway-BXZXCAaM.js +0 -61
  80. package/dist/Takeaway.vue_vue_type_script_setup_true_lang-9WVkdLZF.js +0 -316
  81. package/dist/TaxSetting-DdHx7ACN.js +0 -21
  82. package/dist/Unit-biPvleyL.js +0 -161
  83. package/dist/Variant-BP1IRNQx.js +0 -231
  84. package/dist/_id_-BiaNDI2N.js +0 -188
  85. package/dist/category-KiA5-36F.js +0 -154
  86. package/dist/index-BFeZlU8X.js +0 -232
  87. package/dist/item-Bcg7SiYv.js +0 -6325
  88. package/dist/scheduler-D1tgE0_9.js +0 -480
  89. package/dist/takeaway-BKsoD4EL.js +0 -264
  90. package/dist/unit-CswFvAyc.js +0 -346
@@ -1,518 +0,0 @@
1
- import { defineComponent as j, computed as w, ref as V, resolveComponent as b, openBlock as f, createBlock as R, unref as E, withCtx as P, createElementVNode as l, createVNode as i, createElementBlock as S, Fragment as U, renderList as Y, onMounted as le, createTextVNode as q, toDisplayString as M, withModifiers as B, createCommentVNode as oe, h as z } from "vue";
2
- import { d as H, D as G, c as ne, e as se, a as J, w as ie, u as ue, b as re, j as de, k as ce } from "./app-D7e31gIv.js";
3
- import { useSnackbar as Q, useDialogChild as me, useDialog as pe, components as W } from "@feedmepos/ui-library";
4
- import { u as ve, l as fe } from "./lodash-BIQx_fko.js";
5
- import { _ as ge } from "./TextChip.vue_vue_type_script_setup_true_lang-CNp85hoQ.js";
6
- import { _ as ye, w as be } from "./InfoBasic.vue_vue_type_script_setup_true_lang-DxQBDu16.js";
7
- import { useRouter as _e } from "vue-router";
8
- import { useCoreStore as Ce } from "@feedmepos/mf-common";
9
- const ke = { class: "mt-40" }, we = { class: "flex gap-8 items-center justify-start" }, he = /* @__PURE__ */ j({
10
- __name: "UpdateCatalogDialog",
11
- props: {
12
- catalogs: {
13
- type: Array,
14
- required: !0
15
- }
16
- },
17
- emits: ["onComplete"],
18
- setup(_, { expose: C, emit: F }) {
19
- const g = _;
20
- C({
21
- show: h,
22
- hide: k
23
- });
24
- const n = F;
25
- function p() {
26
- return {
27
- restaurantId: "",
28
- catalogId: void 0,
29
- takeawayCatalog: void 0,
30
- pickupCatalog: null,
31
- additionalCatalogs: []
32
- };
33
- }
34
- const v = w(() => [
35
- {
36
- label: "Use default",
37
- value: null
38
- },
39
- ...g.catalogs.map((m) => ({
40
- label: m.name,
41
- value: m._id
42
- }))
43
- ]), y = w(() => [
44
- {
45
- label: "Use default",
46
- value: null
47
- },
48
- ...g.catalogs.map((m) => ({
49
- label: m.name,
50
- value: m._id
51
- }))
52
- ]), t = V(p()), s = V(!1), u = V(void 0);
53
- function h(m) {
54
- u.value = m ? H(m) : p(), t.value = H(u.value), s.value = !0;
55
- }
56
- function k() {
57
- s.value = !1;
58
- }
59
- const D = ve(
60
- () => !fe.isEqual(u.value, t.value),
61
- () => {
62
- k();
63
- }
64
- );
65
- function $() {
66
- k(), n("onComplete", t.value);
67
- }
68
- return (m, o) => {
69
- const x = b("FmSelect"), L = b("FmCheckbox"), A = b("FmButton"), I = b("FmSideSheet");
70
- return f(), R(I, {
71
- modelValue: s.value,
72
- "onUpdate:modelValue": o[5] || (o[5] = (r) => s.value = r),
73
- "max-width": 560,
74
- "onOn:clickedAway": E(D)
75
- }, {
76
- "side-sheet-header": P(() => o[6] || (o[6] = [
77
- l("span", { class: "fm-typo-en-title-md-600" }, "Update catalog", -1)
78
- ])),
79
- "side-sheet-footer": P(() => [
80
- l("div", we, [
81
- i(A, {
82
- label: "Update",
83
- size: "lg",
84
- variant: "primary",
85
- onClick: o[4] || (o[4] = () => $())
86
- }),
87
- i(A, {
88
- label: "Cancel",
89
- size: "lg",
90
- variant: "tertiary",
91
- onClick: k
92
- })
93
- ])
94
- ]),
95
- default: P(() => [
96
- i(x, {
97
- modelValue: t.value.catalogId,
98
- "onUpdate:modelValue": o[0] || (o[0] = (r) => t.value.catalogId = r),
99
- items: v.value,
100
- class: "mb-24",
101
- label: "Default catalog"
102
- }, null, 8, ["modelValue", "items"]),
103
- i(x, {
104
- modelValue: t.value.takeawayCatalog,
105
- "onUpdate:modelValue": o[1] || (o[1] = (r) => t.value.takeawayCatalog = r),
106
- items: y.value,
107
- class: "mb-24",
108
- label: "POS takeaway catalog"
109
- }, null, 8, ["modelValue", "items"]),
110
- i(x, {
111
- modelValue: t.value.pickupCatalog,
112
- "onUpdate:modelValue": o[2] || (o[2] = (r) => t.value.pickupCatalog = r),
113
- items: y.value,
114
- label: "Pick up catalog"
115
- }, null, 8, ["modelValue", "items"]),
116
- l("div", ke, [
117
- o[7] || (o[7] = l("div", { class: "fm-typo-en-title-sm-600" }, "Additional catalog", -1)),
118
- o[8] || (o[8] = l("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mt-4 mb-8" }, " Additional catalogs can be utilized by table ", -1)),
119
- (f(!0), S(U, null, Y(_.catalogs, (r) => (f(), S("div", {
120
- key: r._id
121
- }, [
122
- i(L, {
123
- modelValue: t.value.additionalCatalogs,
124
- "onUpdate:modelValue": o[3] || (o[3] = (N) => t.value.additionalCatalogs = N),
125
- label: r.name,
126
- value: r._id
127
- }, null, 8, ["modelValue", "label", "value"])
128
- ]))), 128))
129
- ])
130
- ]),
131
- _: 1
132
- }, 8, ["modelValue", "onOn:clickedAway"]);
133
- };
134
- }
135
- });
136
- function X(_) {
137
- return _ ? G(_).format("DD/MM/YY HH:mm") : "-";
138
- }
139
- function xe(_, C, F) {
140
- const g = (n, p = !1) => {
141
- var v;
142
- return n === void 0 && !p ? "-" : ((v = F.find((y) => y.value === (n || null))) == null ? void 0 : v.label) || "-";
143
- };
144
- return _.map((n) => {
145
- var t;
146
- const p = (t = C.find(({ _id: s }) => s === n._id)) == null ? void 0 : t.posVersion, v = !!p && !!ne.Pos.canUse({ feature: se.F_FEATURE.enum.taxAndServiceChargeV4, posVersion: p }), y = g(n.catalogId);
147
- return {
148
- ...n,
149
- _default: y,
150
- _posTakeaway: n.takeawayCatalog ? g(n.takeawayCatalog) : y,
151
- _additionalCatalogs: (n.additionalCatalogs || []).map((s) => g(s)),
152
- _lastUpdate: X(n.updatedAt),
153
- _pickup: v ? g(n.pickupCatalog, !0) : "-",
154
- _canUsePickup: v,
155
- _posVersion: p || "-"
156
- };
157
- });
158
- }
159
- const Ve = {
160
- key: 0,
161
- class: "flex items-center justify-center"
162
- }, Se = {
163
- key: 1,
164
- class: "space-y-16"
165
- }, Fe = { class: "text-fm-color-typo-secondary" }, Ae = { class: "space-y-4" }, Ie = /* @__PURE__ */ j({
166
- __name: "RevertDialog",
167
- props: {
168
- restaurant: {}
169
- },
170
- setup(_) {
171
- const C = _, F = Q(), { custom: g } = J(F), n = V(!1), p = V(null);
172
- async function v() {
173
- await g(
174
- async () => {
175
- var s;
176
- p.value = await ie.readMenuById(((s = C.restaurant.revertConfig) == null ? void 0 : s._id) || "");
177
- },
178
- { isLoading: n }
179
- );
180
- }
181
- const y = w(() => {
182
- var s;
183
- return [
184
- { label: "Main", value: null },
185
- ...(((s = p.value) == null ? void 0 : s.modules.catalog) || []).map((u) => ({
186
- label: u.name,
187
- value: u._id
188
- }))
189
- ];
190
- }), t = w(() => {
191
- var h;
192
- const s = C.restaurant.revertConfig;
193
- if (!s) return [];
194
- const u = xe(
195
- [
196
- {
197
- ...s,
198
- catalogId: s.catalogId || null
199
- }
200
- ],
201
- Ce().restaurants.value,
202
- y.value
203
- )[0];
204
- return [
205
- { label: "Restaurant", value: C.restaurant.name },
206
- { label: "Revert to", value: X((h = p.value) == null ? void 0 : h.updatedAt) },
207
- { label: "Default", value: u._default },
208
- { label: "POS Takeaway", value: u._posTakeaway },
209
- { label: "Pick up", value: u._pickup },
210
- { label: "Additional catalogs", value: u._additionalCatalogs.join(", ") }
211
- ];
212
- });
213
- return le(async () => v()), me(), (s, u) => {
214
- const h = b("FmCircularProgress");
215
- return n.value ? (f(), S("div", Ve, [
216
- i(h, { size: "lg" })
217
- ])) : (f(), S("div", Se, [
218
- l("div", Fe, [
219
- q(" Revert " + M(C.restaurant.name) + "'s menu to the last published version. ", 1),
220
- u[0] || (u[0] = l("br", null, null, -1)),
221
- u[1] || (u[1] = q(" Delivery catalog will be set to Main if it's not in last published version. "))
222
- ]),
223
- l("div", Ae, [
224
- (f(!0), S(U, null, Y(t.value, (k) => (f(), R(ye, {
225
- key: k.label,
226
- name: k.label,
227
- value: k.value || "--"
228
- }, null, 8, ["name", "value"]))), 128))
229
- ])
230
- ]));
231
- };
232
- }
233
- }), Me = {
234
- class: "flex flex-col p-24 bg-fm-color-neutral-white min-h-[calc(100dvh-56px)] xs:max-h-[calc(100dvh-56px)]"
235
- }, Pe = {
236
- class: "flex items-center xs:mb-8 mb-24"
237
- }, De = {
238
- class: "xs:hidden"
239
- }, Re = {
240
- class: "flex justify-end"
241
- }, Ue = {
242
- class: "grow flex flex-col gap-4"
243
- }, $e = {
244
- class: "flex gap-8 items-center"
245
- }, Le = {
246
- class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary"
247
- }, Oe = {
248
- class: "space-y-4"
249
- }, Be = {
250
- class: "fm-typo-en-body-lg-600"
251
- }, Ne = {
252
- class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
253
- }, Te = {
254
- class: "flex gap-8"
255
- }, ze = {
256
- class: "xs:block hidden fixed bottom-72 right-16"
257
- }, Je = /* @__PURE__ */ j({
258
- __name: "Publish",
259
- setup(_) {
260
- const C = _e(), F = (e) => t.state.menu.updatedAt === e.updatedAt, g = ({
261
- row: e
262
- }) => {
263
- const a = F(e);
264
- return i(ge, {
265
- label: a ? "Latest" : "Outdated",
266
- variant: a ? "success" : "warning"
267
- }, null);
268
- }, n = V({}), p = [{
269
- accessorKey: "name",
270
- header: "Restaurant",
271
- cell: (e) => e.getValue(),
272
- enableSorting: !0
273
- }, {
274
- accessorKey: "catalog",
275
- header: "Default",
276
- enableSorting: !1,
277
- cell: (e) => e.getValue().default
278
- }, {
279
- accessorKey: "catalog",
280
- header: "POS takeaway",
281
- enableSorting: !1,
282
- cell: (e) => e.getValue().takeaway
283
- }, {
284
- accessorKey: "catalog",
285
- header: "Pick up",
286
- enableSorting: !1,
287
- cell: (e) => e.getValue().pickup
288
- }, {
289
- accessorKey: "updatedAt",
290
- header: "Version",
291
- enableSorting: !1,
292
- cell: (e) => {
293
- const a = e.getValue();
294
- return D(a);
295
- }
296
- }, {
297
- header: "Status",
298
- enableSorting: !1,
299
- size: 80,
300
- cell: (e) => i(g, {
301
- row: e.row.original
302
- }, null)
303
- }, {
304
- accessorKey: "_id",
305
- header: "",
306
- size: 52,
307
- enableSorting: !1,
308
- cell: (e) => {
309
- const a = e.row.original;
310
- return t.state.menu.updatedAt, a.updatedAt, z("div", {
311
- class: "flex justify-end gap-8"
312
- }, [u && a.revertConfig ? be(z(W.FmButton, {
313
- prependIcon: "undo",
314
- variant: "secondary",
315
- onClick: B(async () => {
316
- await h(e.row.original);
317
- }, ["stop", "prevent"])
318
- }), "Revert Menu") : null, z(W.FmButton, {
319
- label: "Publish",
320
- icon: "ios_share",
321
- variant: "secondary",
322
- onClick: B(async () => {
323
- const c = x(e.row.original);
324
- await I(c);
325
- }, ["stop", "prevent"])
326
- })]);
327
- },
328
- meta: {
329
- width: "150px"
330
- }
331
- }], v = V(""), y = V(), t = ue(), s = pe(), u = w(() => t.version !== re.F_MENU_VERSION.enum.v3);
332
- async function h(e) {
333
- e.revertConfig && s.open({
334
- title: "Revert menu",
335
- contentComponent: Ie,
336
- contentComponentProps: {
337
- restaurant: e
338
- },
339
- primaryActions: {
340
- text: "Revert",
341
- close: !0
342
- },
343
- secondaryActions: {
344
- text: "Cancel",
345
- close: !0
346
- }
347
- }).onPrimary(async () => {
348
- await A.minor(async () => {
349
- await t.revertRestaurantMenu(e._id);
350
- }, {
351
- customId: e._id,
352
- message: `Revert menu of ${e.name}`
353
- });
354
- });
355
- }
356
- const k = w(() => `Main version: ${D(t.state.menu.updatedAt)}`);
357
- function D(e) {
358
- return e ? G(e).format("DD/MM/YYYY hh:mmA") : "";
359
- }
360
- const $ = w(() => t.state.menu.modules.catalog), m = w(() => A.queue.value.some((e) => e.id === t.state.menu._id));
361
- function o(e) {
362
- var a;
363
- return e ? ((a = $.value.find((c) => c._id === e)) == null ? void 0 : a.name) ?? "Invalid catalog" : "Main";
364
- }
365
- function x(e) {
366
- return {
367
- restaurantId: e._id,
368
- catalogId: e.catalogId || void 0,
369
- takeawayCatalog: e.takeawayCatalog || void 0,
370
- pickupCatalog: e.pickupCatalog || null,
371
- additionalCatalogs: e.additionalCatalogs
372
- };
373
- }
374
- function L(e) {
375
- var c;
376
- const a = x(e);
377
- (c = y.value) == null || c.show(a);
378
- }
379
- const A = J(Q());
380
- async function I(e) {
381
- var c;
382
- const a = (c = r.value.find((T) => T._id === e.restaurantId)) == null ? void 0 : c.name;
383
- await A.minor(async () => await t.publishMenu(e), {
384
- customId: t.state.menu._id,
385
- message: `Publishing menu for ${a}`,
386
- successMessage: `Published to ${a}`
387
- });
388
- }
389
- const r = w(() => t.state.restaurants.map((e) => ({
390
- ...e,
391
- catalog: {
392
- default: o(e.catalogId),
393
- takeaway: o(e.takeawayCatalog),
394
- pickup: o(e.pickupCatalog)
395
- }
396
- }))), N = w(() => {
397
- const e = v.value.toLowerCase();
398
- return r.value.filter(({
399
- name: a,
400
- catalog: c
401
- }) => a.toLowerCase().includes(e) || c.default.toLowerCase().includes(e) || c.takeaway.toLowerCase().includes(e) || c.pickup.toLowerCase().includes(e));
402
- });
403
- async function K() {
404
- if (m.value) return;
405
- const e = Object.keys(n.value).map(Number).filter((a) => n.value[a]);
406
- if (e.length === 0 || e.length === r.value.length)
407
- await A.minor(async () => await t.publishAllMenu(), {
408
- customId: t.state.menu._id
409
- });
410
- else
411
- for (const a of e) {
412
- const c = r.value[a];
413
- await I(x(c));
414
- }
415
- }
416
- return (e, a) => {
417
- const c = b("FmChip"), T = b("FmSpacer"), O = b("FmButton"), Z = b("FmSearch"), ee = b("FmTable"), ae = b("FmListItem"), te = b("FmList");
418
- return f(), S(U, null, [l("div", Me, [l("div", Pe, [a[5] || (a[5] = l("div", {
419
- class: "mr-8"
420
- }, [l("div", {
421
- class: "fm-typo-en-title-md-600"
422
- }, "Publish"), l("div", {
423
- class: "hidden xs:block fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
424
- })], -1)), i(c, {
425
- label: k.value,
426
- class: "xs:hidden text-fm-color-primary bg-fm-color-system-warning-100"
427
- }, null, 8, ["label"]), i(T), l("div", De, [i(O, {
428
- disabled: m.value,
429
- icon: "ios_share",
430
- label: "Publish all",
431
- variant: "primary",
432
- onClick: a[0] || (a[0] = () => K())
433
- }, null, 8, ["disabled"])])]), l("div", Re, [i(Z, {
434
- modelValue: v.value,
435
- "onUpdate:modelValue": a[1] || (a[1] = (d) => v.value = d),
436
- autofocus: "",
437
- class: "mb-8 w-[320px] xs:w-full",
438
- placeholder: "Search"
439
- }, null, 8, ["modelValue"])]), r.value.length > 0 ? (f(), S(U, {
440
- key: 0
441
- }, [i(de, {
442
- class: "xs:hidden block"
443
- }, {
444
- default: P(() => [i(ee, {
445
- modelValue: n.value,
446
- "onUpdate:modelValue": a[2] || (a[2] = (d) => n.value = d),
447
- "column-defs": p,
448
- loading: m.value,
449
- "page-size": r.value.length,
450
- "row-data": r.value,
451
- "search-value": v.value,
452
- shrinkAt: !1,
453
- selection: "multiple",
454
- "hide-footer": "",
455
- "pin-header-row": "",
456
- onRowClick: a[3] || (a[3] = (d) => L(d.original))
457
- }, null, 8, ["modelValue", "loading", "page-size", "row-data", "search-value"])]),
458
- _: 1
459
- }), i(te, {
460
- class: "flex-col flex-1 min-h-0 overflow-auto xs:flex hidden w-full pb-64",
461
- separator: ""
462
- }, {
463
- default: P(() => [(f(!0), S(U, null, Y(N.value, (d) => (f(), R(ae, {
464
- key: d._id,
465
- label: d.name,
466
- style: {
467
- padding: "12px 0 !important"
468
- },
469
- onClick: () => L(d)
470
- }, {
471
- default: P(() => [l("div", Ue, [l("div", $e, [l("div", Le, M(D(d.updatedAt)), 1), i(g, {
472
- row: d
473
- }, null, 8, ["row"])]), l("div", Oe, [l("div", Be, M(d.name), 1), l("div", Ne, [l("div", null, "Default: " + M(d.catalog.default), 1), l("div", null, "POS takeaway: " + M(d.catalog.takeaway), 1), l("div", null, "Pickup: " + M(d.catalog.pickup), 1)])])]), l("div", Te, [u.value && d.revertConfig ? (f(), R(O, {
474
- key: 0,
475
- disabled: m.value,
476
- icon: "undo",
477
- variant: "tertiary",
478
- onClick: B(() => h(d), ["stop"])
479
- }, null, 8, ["disabled", "onClick"])) : oe("", !0), i(O, {
480
- disabled: m.value,
481
- icon: "ios_share",
482
- variant: "tertiary",
483
- onClick: B(() => I(x(d)), ["stop"])
484
- }, null, 8, ["disabled", "onClick"])])]),
485
- _: 2
486
- }, 1032, ["label", "onClick"]))), 128))]),
487
- _: 1
488
- })], 64)) : (f(), R(E(ce), {
489
- key: 1,
490
- title: "Create restaurant",
491
- subtitle: "You have not created any restaurant yet. Add a restaurant to start publishing menu",
492
- action: {
493
- text: "Create restaurant",
494
- icon: "add",
495
- callback: () => {
496
- E(C).push({
497
- name: "$settings-my-business"
498
- });
499
- }
500
- }
501
- }, null, 8, ["action"]))]), l("div", ze, [i(O, {
502
- disabled: m.value,
503
- icon: "ios_share",
504
- label: "Publish all",
505
- variant: "fab",
506
- onClick: a[4] || (a[4] = () => K())
507
- }, null, 8, ["disabled"])]), i(he, {
508
- ref_key: "updateCatalogDialogRef",
509
- ref: y,
510
- catalogs: $.value,
511
- onOnComplete: I
512
- }, null, 8, ["catalogs"])], 64);
513
- };
514
- }
515
- });
516
- export {
517
- Je as default
518
- };