@feedmepos/mf-menu-portal 1.0.4-dev.2 → 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.
Files changed (82) hide show
  1. package/dist/{App-DtX4DyDA.js → App-CrpoLCjA.js} +3 -3
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-C9OSr8ft.js → ApplyProduct.vue_vue_type_script_setup_true_lang-Hdsnu29V.js} +1 -1
  3. package/dist/{BindingTable.vue_vue_type_script_setup_true_lang-BJN8ajuD.js → BindingTable.vue_vue_type_script_setup_true_lang-D3CmOOPY.js} +1 -1
  4. package/dist/{Catalog-Dly_r1yA.js → Catalog-VU3HhNro.js} +4 -4
  5. package/dist/{CatalogBinding-CNG4YcVq.js → CatalogBinding-BNATtZEY.js} +3 -3
  6. package/dist/{CatalogEditTabs.vue_vue_type_script_setup_true_lang-Cy2culdR.js → CatalogEditTabs.vue_vue_type_script_setup_true_lang-BmG-xpW4.js} +3 -3
  7. package/dist/CatalogEditor.vue_vue_type_script_setup_true_lang-BFsRDFpj.js +784 -0
  8. package/dist/{CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-4EZ4yM_N.js → CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-Bk4FqVmx.js} +14 -14
  9. package/dist/{Category-Dz1yFYyY.js → Category-DMoXTsfG.js} +5 -5
  10. package/dist/{Category-BS-vFDYy.js → Category-DxjdQ-NN.js} +2 -2
  11. package/dist/CategoryList.vue_vue_type_script_setup_true_lang-B3Ts1O-9.js +847 -0
  12. package/dist/{CookingGuide-CmbvWFgp.js → CookingGuide-DiZZDYD-.js} +5 -5
  13. package/dist/{Group-B7s-vPXb.js → Group-DFR8q-tt.js} +5 -5
  14. package/dist/{Group-BRmWZnHh.js → Group-rzfh_o6r.js} +2 -2
  15. package/dist/GroupList.vue_vue_type_script_setup_true_lang-DiN-wQXX.js +1807 -0
  16. package/dist/Ingredient-DpjGIuH9.js +505 -0
  17. package/dist/LinkProductSideSheet.vue_vue_type_script_setup_true_lang-CnI80Ojd.js +782 -0
  18. package/dist/{MenuSetting-Ci7V_Jxn.js → MenuSetting-DR-pDSF_.js} +4 -4
  19. package/dist/OrderPacing-JcTuweqF.js +769 -0
  20. package/dist/{OrderPacingFields.vue_vue_type_script_setup_true_lang-NCH-SrZU.js → OrderPacingFields.vue_vue_type_script_setup_true_lang-HwwJ2mGv.js} +2 -2
  21. package/dist/{Preview-BBGNaj1F.js → Preview-BZyun5lZ.js} +1 -1
  22. package/dist/{PriceTierNotice.vue_vue_type_script_setup_true_lang-BXJDpDCm.js → PriceTierNotice.vue_vue_type_script_setup_true_lang-DquqNbE1.js} +1 -1
  23. package/dist/PrintRoute-CzEx2dCt.js +518 -0
  24. package/dist/{Product-DqN0NFUU.js → Product-CQb0n06E.js} +4 -4
  25. package/dist/ProductAttributeFilter.vue_vue_type_script_setup_true_lang-B2KdolJS.js +7931 -0
  26. package/dist/{ProductEditorHost.vue_vue_type_script_setup_true_lang-Fkiw4lZp.js → ProductEditorHost.vue_vue_type_script_setup_true_lang-CBlDEjqF.js} +9 -9
  27. package/dist/ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-D8NQTCLx.js +2011 -0
  28. package/dist/{ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-CNWCT1OB.js → ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-cG47Pu-6.js} +1 -1
  29. package/dist/{ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-BoQ9mVPY.js → ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-0UwUcA2L.js} +800 -749
  30. package/dist/{ProductInternalTools-CC3SWSlT.js → ProductInternalTools-QrBR1nFp.js} +2 -2
  31. package/dist/{ProductInventoryDialog-SAhsVekx.js → ProductInventoryDialog-fV38GO1a.js} +1 -1
  32. package/dist/{ProductInventoryDialog.vue_vue_type_script_setup_true_lang-BB8UIIsW.js → ProductInventoryDialog.vue_vue_type_script_setup_true_lang-Bzb3RrMg.js} +1 -1
  33. package/dist/ProductList.vue_vue_type_script_setup_true_lang-BwKQESr3.js +2765 -0
  34. package/dist/{ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-BMDSkfcn.js → ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-CDYcHXo1.js} +1 -1
  35. package/dist/{Products-Cn6j1DOQ.js → Products-B8tysOAL.js} +3 -3
  36. package/dist/Publish-DTvOvFNa.js +1337 -0
  37. package/dist/Recipe-Ddx31csF.js +388 -0
  38. package/dist/{Scheduler-DlaSVACJ.js → Scheduler-CST5L_cw.js} +314 -254
  39. package/dist/ServingSequence-DYyEZI2S.js +374 -0
  40. package/dist/{Setting-CyCp2uw4.js → Setting-Ip0pGjks.js} +6 -6
  41. package/dist/Subcategory-BIgjzVta.js +459 -0
  42. package/dist/{Takeaway-sVVykWDg.js → Takeaway-CekhGM-m.js} +2 -2
  43. package/dist/{Takeaway-tYHCAXYU.js → Takeaway-aXsPg4JT.js} +5 -5
  44. package/dist/{TakeawayList.vue_vue_type_script_setup_true_lang-CV24v8Zg.js → TakeawayList.vue_vue_type_script_setup_true_lang-CaRR4_j3.js} +4 -4
  45. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CshqYpc9.js +1291 -0
  46. package/dist/Unit-BMW8u0Us.js +424 -0
  47. package/dist/{Variant-BNnR5rLv.js → Variant-CZsrYRMU.js} +5 -5
  48. package/dist/{_id_-a9ZtdjtT.js → _id_-D4swrvNa.js} +3 -3
  49. package/dist/{app-CmElp8cO.js → app-BWwwHsWi.js} +337 -337
  50. package/dist/app.js +1 -1
  51. package/dist/apps/mf-menu/src/app.d.ts +80 -0
  52. package/dist/apps/mf-menu/src/components/PriceTier/LinkPriceTierSection.vue.d.ts +9 -0
  53. package/dist/apps/mf-menu/src/components/Product/BulkCategorySelect.vue.d.ts +37 -0
  54. package/dist/apps/mf-menu/src/components/Product/ProductAttributeFilter.vue.d.ts +11 -1
  55. package/dist/apps/mf-menu/src/components/ProductList.vue.d.ts +2 -2
  56. package/dist/apps/mf-menu/src/components/feature/NestedGroupManager/NestedGroupOverrideSheets.vue.d.ts +27 -0
  57. package/dist/apps/mf-menu/src/components/feature/RestaurantAttributesFilter.vue.d.ts +20 -0
  58. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  59. package/dist/assets/{menu-compute-B_wpWLAj.js → menu-compute-D7TdiHt4.js} +4 -4
  60. package/dist/assets/{validate-menu-DjxNxUxH.js → validate-menu-DXppWUVq.js} +2 -2
  61. package/dist/mf-menu-portal.css +1 -1
  62. package/dist/{provide-BJRbSauL.js → provide-CDmXzkhz.js} +67539 -65978
  63. package/dist/{useActionFeedback-89GwO41T.js → useActionFeedback-Dm2HDa_2.js} +1 -1
  64. package/dist/{FormSection.vue_vue_type_script_setup_true_lang-pY-_msnM.js → vuedraggable-CBtQLb_S.js} +140 -139
  65. package/package.json +2 -2
  66. package/dist/CatalogEditor.vue_vue_type_script_setup_true_lang-Byp1db9_.js +0 -484
  67. package/dist/CategoryList.vue_vue_type_script_setup_true_lang-CrHYjrTn.js +0 -797
  68. package/dist/GroupList.vue_vue_type_script_setup_true_lang-CWr52_a-.js +0 -2183
  69. package/dist/Ingredient-BMAlctE4.js +0 -463
  70. package/dist/LinkProductSideSheet.vue_vue_type_script_setup_true_lang-CR99740r.js +0 -709
  71. package/dist/OrderPacing-Bz5kn6DY.js +0 -698
  72. package/dist/PrintRoute-BnARWdR2.js +0 -473
  73. package/dist/ProductChipSummary.vue_vue_type_script_setup_true_lang-D8DygCBl.js +0 -110
  74. package/dist/ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-DryxrG-x.js +0 -1257
  75. package/dist/ProductList.vue_vue_type_script_setup_true_lang-BDnTs366.js +0 -10353
  76. package/dist/Publish-BPJhG39B.js +0 -1261
  77. package/dist/Recipe-mt1vec5-.js +0 -350
  78. package/dist/ServingSequence-Cr1REWZP.js +0 -336
  79. package/dist/Subcategory-kuB7gYvc.js +0 -412
  80. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Dz-Chgek.js +0 -1213
  81. package/dist/Unit-BSOvZxRy.js +0 -385
  82. package/dist/apps/mf-menu/src/views/MenuManagementEditor/RestaurantAttributesFilter.vue.d.ts +0 -2
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as g, computed as m, resolveComponent as d, openBlock as F, createBlock as w, unref as s, withCtx as p, createVNode as u, mergeProps as c, renderSlot as b } from "vue";
2
2
  import { useI18n as y } from "@feedmepos/mf-common";
3
- import { _ as k } from "./FormSection.vue_vue_type_script_setup_true_lang-pY-_msnM.js";
4
- import { b as h } from "./provide-BJRbSauL.js";
3
+ import { _ as k } from "./vuedraggable-CBtQLb_S.js";
4
+ import { b as h } from "./provide-CDmXzkhz.js";
5
5
  const P = /* @__PURE__ */ g({
6
6
  __name: "OrderPacingFields",
7
7
  props: {
@@ -2,7 +2,7 @@ import { defineComponent as N, ref as J, computed as i, shallowRef as K, watch a
2
2
  import { useI18n as le } from "@feedmepos/mf-common";
3
3
  import { _ as U } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
4
4
  import { _ as te } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
5
- import { b as ae, u as ue, a as se } from "./provide-BJRbSauL.js";
5
+ import { b as ae, u as ue, a as se } from "./provide-CDmXzkhz.js";
6
6
  function ne(g, r) {
7
7
  const l = new URL(g);
8
8
  return l.searchParams.set("parent", r), { src: l.toString(), origin: l.origin };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as a, computed as c, resolveComponent as m, openBlock as l, createBlock as u, unref as p, createCommentVNode as i } from "vue";
2
2
  import { useI18n as d } from "@feedmepos/mf-common";
3
- import { u as _ } from "./provide-BJRbSauL.js";
3
+ import { u as _ } from "./provide-CDmXzkhz.js";
4
4
  const b = /* @__PURE__ */ a({
5
5
  __name: "PriceTierNotice",
6
6
  props: {
@@ -0,0 +1,518 @@
1
+ import { defineComponent as j, resolveComponent as p, openBlock as n, createElementBlock as y, createVNode as s, withCtx as d, createElementVNode as r, toDisplayString as k, createBlock as f, Fragment as L, renderList as N, createCommentVNode as $, computed as _, ref as E, shallowRef as W, onUnmounted as ke, h as C, withModifiers as M, unref as o, mergeProps as be } from "vue";
2
+ import { useI18n as he } from "@feedmepos/mf-common";
3
+ import { useDialog as we, useBreakpoints as xe, components as U } from "@feedmepos/ui-library";
4
+ import { _ as X } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
5
+ import { _ as Ce } from "./LinkProductSideSheet.vue_vue_type_script_setup_true_lang-CnI80Ojd.js";
6
+ import { _ as Y } from "./vuedraggable-CBtQLb_S.js";
7
+ import { _ as Fe } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
8
+ import { u as Pe } from "./useActionFeedback-Dm2HDa_2.js";
9
+ import { u as Se } from "./useEditorValidation-Ctef5Bxt.js";
10
+ import { b as Ve, u as Z, a as Le } from "./provide-CDmXzkhz.js";
11
+ const $e = { class: "fm-typo-en-body-lg-600" }, ze = { class: "fm-typo-en-body-lg-600" }, De = { class: "fm-typo-en-body-md-400" }, Ie = /* @__PURE__ */ j({
12
+ __name: "RemoveRouteConfirmation",
13
+ props: {
14
+ row: {}
15
+ },
16
+ setup(z) {
17
+ return (i, t) => {
18
+ const h = p("i18n-t"), F = p("FmIcon"), w = p("FmListItem"), g = p("FmList");
19
+ return n(), y("div", null, [
20
+ s(h, {
21
+ keypath: i.row.linkedProductCount > 0 ? "menu.print_route.dialogs.remove.message.with_products" : "menu.print_route.dialogs.remove.message.confirm",
22
+ scope: "global",
23
+ tag: "p"
24
+ }, {
25
+ count: d(() => [
26
+ r("span", $e, k(i.row.linkedProductCount), 1)
27
+ ]),
28
+ name: d(() => [
29
+ r("span", ze, k(i.row.name), 1)
30
+ ]),
31
+ _: 1
32
+ }, 8, ["keypath"]),
33
+ i.row.linkedProductCount > 0 ? (n(), f(g, {
34
+ key: 0,
35
+ class: "mt-8"
36
+ }, {
37
+ default: d(() => [
38
+ (n(!0), y(L, null, N(i.row.linkedProductNames, (l) => (n(), f(w, {
39
+ key: l,
40
+ class: "!p-0 !gap-4 mt-4",
41
+ clickable: !1
42
+ }, {
43
+ prepend: d(() => [
44
+ s(F, {
45
+ color: "neutral-gray-900",
46
+ name: "fiber_manual_record",
47
+ size: "sm"
48
+ })
49
+ ]),
50
+ default: d(() => [
51
+ r("span", De, k(l), 1)
52
+ ]),
53
+ _: 2
54
+ }, 1024))), 128))
55
+ ]),
56
+ _: 1
57
+ })) : $("", !0)
58
+ ]);
59
+ };
60
+ }
61
+ }), Re = { class: "flex flex-1 justify-end" }, Be = {
62
+ key: 0,
63
+ class: "flex flex-col gap-16 items-start"
64
+ }, Ae = {
65
+ class: "text-fm-color-typo-secondary",
66
+ role: "alert"
67
+ }, Ee = {
68
+ key: 1,
69
+ "data-menu-state": "unavailable"
70
+ }, Me = { class: "flex justify-end items-center" }, Ue = { class: "w-[320px] xs:w-full xs:px-16" }, Ne = { class: "min-w-0 grow space-y-4" }, je = { class: "fm-typo-en-body-lg-600 break-words" }, Ke = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary break-words" }, Qe = {
71
+ key: 2,
72
+ class: "fixed right-16 bottom-[72px] z-[100]"
73
+ }, Te = { class: "fm-typo-en-title-md-600" }, Oe = { class: "flex flex-col gap-32 pb-16" }, Ge = { class: "space-y-16" }, qe = { class: "flex items-center gap-8" }, He = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Je = { class: "flex gap-8 items-center justify-start" }, We = /* @__PURE__ */ j({
74
+ __name: "PrintRouteList",
75
+ props: {
76
+ sdk: {}
77
+ },
78
+ setup(z) {
79
+ const i = z, { t } = he(), h = Ve(), F = we(), { run: w } = Pe(), g = Z(
80
+ i.sdk.printDepartment.list
81
+ ), l = _(
82
+ () => g.value.status === "ready" ? g.value.value : null
83
+ ), ee = _(() => {
84
+ var e;
85
+ return ((e = l.value) == null ? void 0 : e.query) ?? "";
86
+ }), { breakpoints: te } = xe(), D = _(() => te.value.xs), oe = _(() => {
87
+ var e;
88
+ return [...((e = l.value) == null ? void 0 : e.rows) ?? []];
89
+ }), b = E(!1), P = E(!1), I = E(!1);
90
+ async function ae() {
91
+ I.value = !0;
92
+ try {
93
+ await w(() => i.sdk.printDepartment.retryRead(), {
94
+ showLoading: !1
95
+ });
96
+ } finally {
97
+ I.value = !1;
98
+ }
99
+ }
100
+ const K = Z(
101
+ i.sdk.linkProduct.catalogue
102
+ ), ne = _(
103
+ () => K.value.status === "ready" ? K.value.value : null
104
+ ), le = _(
105
+ () => {
106
+ var e;
107
+ return ((e = m.value) == null ? void 0 : e.linkedProductIds) ?? [];
108
+ }
109
+ ), se = _(() => {
110
+ var e;
111
+ return ((e = m.value) == null ? void 0 : e.linkedGroups) ?? [];
112
+ }), re = _(
113
+ () => {
114
+ var e;
115
+ return ((e = m.value) == null ? void 0 : e.linkedProductQuery) ?? "";
116
+ }
117
+ ), ie = _(
118
+ () => {
119
+ var e;
120
+ return ((e = m.value) == null ? void 0 : e.linkedProductCount) ?? 0;
121
+ }
122
+ );
123
+ function ue(e) {
124
+ return [
125
+ {
126
+ accessorKey: "name",
127
+ enableSorting: !1,
128
+ header: () => e.isSynthetic ? t("menu.tree_editor.labels.addon") : e.name
129
+ },
130
+ {
131
+ id: "actions",
132
+ enableSorting: !1,
133
+ header: "",
134
+ cell: (u) => C("div", { class: "flex justify-end" }, [
135
+ C(U.FmButton, {
136
+ icon: "delete",
137
+ variant: "tertiary",
138
+ textColor: "neutral-gray-400",
139
+ "aria-label": t("menu.common.actions.remove"),
140
+ onClick: M(
141
+ () => c.value.unlinkProduct(u.row.original.id),
142
+ ["stop", "prevent"]
143
+ )
144
+ })
145
+ ])
146
+ }
147
+ ];
148
+ }
149
+ const c = W(
150
+ i.sdk.printDepartment.editor()
151
+ ), x = W(
152
+ c.value.get()
153
+ );
154
+ let R = c.value.subscribe(
155
+ (e) => x.value = e
156
+ );
157
+ const m = _(
158
+ () => x.value.status === "ready" ? x.value.value : null
159
+ ), B = Se(() => c.value), Q = _(
160
+ () => m.value ? B.issue(m.value.fieldIssues, "name") : null
161
+ );
162
+ function T(e) {
163
+ R(), c.value.dispose(), c.value = i.sdk.printDepartment.editor(e), x.value = c.value.get(), R = c.value.subscribe(
164
+ (u) => x.value = u
165
+ );
166
+ }
167
+ ke(() => {
168
+ i.sdk.printDepartment.search(""), R(), c.value.dispose();
169
+ });
170
+ function A() {
171
+ !l.value || l.value.create.state !== "allowed" || (T(), b.value = !0);
172
+ }
173
+ function O(e) {
174
+ T(e.id), b.value = !0;
175
+ }
176
+ function G() {
177
+ b.value = !1;
178
+ }
179
+ function de() {
180
+ var e;
181
+ if (!((e = m.value) != null && e.dirty)) {
182
+ b.value = !1;
183
+ return;
184
+ }
185
+ F.open({
186
+ title: t("menu.common.dialog.dismiss.title"),
187
+ message: t("menu.common.dialog.dismiss.message"),
188
+ primaryActions: {
189
+ text: t("menu.common.dialog.dismiss.discard"),
190
+ close: !0
191
+ },
192
+ secondaryActions: {
193
+ text: t("menu.common.actions.cancel"),
194
+ close: !0
195
+ }
196
+ }).onPrimary(() => {
197
+ b.value = !1;
198
+ });
199
+ }
200
+ async function ce() {
201
+ var v;
202
+ const e = ((v = m.value) == null ? void 0 : v.name.trim()) ?? "";
203
+ (await w(
204
+ () => B.submit(() => c.value.submit()),
205
+ {
206
+ // Legacy's success copy is "<name> saved" for both create and update; the
207
+ // frozen baseline asserts that text, so it is not restyled here.
208
+ successMessage: t("menu.print_route.manager.action.saved", {
209
+ name: e
210
+ }),
211
+ // `submit()` publishes `submitting` synchronously only when it will
212
+ // actually issue a request; a required-field, duplicate-name or
213
+ // not-found refusal is decided locally and sends nothing. The frozen
214
+ // `printDepartment/{create,update}/empty-name` groups record the inline
215
+ // "Required" message and no snackbar at all, so the spinner must not
216
+ // flash for them.
217
+ showLoading: () => {
218
+ var S;
219
+ return ((S = m.value) == null ? void 0 : S.status) === "submitting";
220
+ }
221
+ }
222
+ )).kind === "success" && G();
223
+ }
224
+ function q(e) {
225
+ F.open({
226
+ title: t("menu.print_route.dialogs.remove.title"),
227
+ contentComponent: C(Ie, { row: e }),
228
+ primaryActions: {
229
+ text: t("menu.print_route.actions.remove"),
230
+ close: !0,
231
+ variant: "destructive"
232
+ },
233
+ secondaryActions: {
234
+ text: t("menu.print_route.actions.cancel"),
235
+ close: !0
236
+ }
237
+ }).onPrimary(async () => {
238
+ await w(() => i.sdk.printDepartment.remove(e.id), {
239
+ successMessage: t("menu.print_route.manager.action.removed", {
240
+ name: e.name
241
+ })
242
+ });
243
+ });
244
+ }
245
+ const me = _(() => [
246
+ {
247
+ accessorKey: "name",
248
+ header: () => t("menu.print_route.table.columns.name"),
249
+ cell: (e) => e.getValue(),
250
+ enableSorting: !1
251
+ },
252
+ {
253
+ accessorKey: "linkedProductCount",
254
+ header: () => t("menu.print_route.table.columns.products"),
255
+ cell: (e) => t("menu.print_route.table.columns.products_count", {
256
+ count: e.getValue()
257
+ }),
258
+ enableSorting: !1
259
+ },
260
+ {
261
+ accessorKey: "id",
262
+ header: () => "",
263
+ size: 52,
264
+ meta: { cellClass: "pl-16", headerContentClass: "-mx-16" },
265
+ enableSorting: !1,
266
+ cell: (e) => C("div", { class: "flex justify-end" }, [
267
+ C(U.FmButton, {
268
+ icon: "delete",
269
+ textColor: "neutral-gray-400",
270
+ variant: "tertiary",
271
+ disabled: e.row.original.remove.state !== "allowed",
272
+ "aria-label": t("menu.print_route.actions.remove"),
273
+ onClick: M(
274
+ () => q(e.row.original),
275
+ ["stop", "prevent"]
276
+ )
277
+ })
278
+ ])
279
+ }
280
+ ]);
281
+ function pe(e) {
282
+ c.value.setLinkedProducts(e), P.value = !1;
283
+ }
284
+ return (e, u) => {
285
+ const v = p("FmButton"), S = p("FmCircularProgress"), H = p("FmSearch"), J = p("FmTable"), _e = p("FmListItem"), ve = p("FmList"), fe = p("FmTextField"), ye = p("FmSpacer"), ge = p("FmSideSheet");
286
+ return n(), f(Fe, {
287
+ heading: o(t)("menu.print_route.title")
288
+ }, {
289
+ "append-heading": d(() => [
290
+ r("div", Re, [
291
+ l.value && l.value.totalCount > 0 && !D.value ? (n(), f(v, {
292
+ key: 0,
293
+ disabled: l.value.create.state !== "allowed",
294
+ label: o(t)("menu.print_route.actions.add"),
295
+ "prepend-icon": "add",
296
+ variant: "primary",
297
+ onClick: A
298
+ }, null, 8, ["disabled", "label"])) : $("", !0)
299
+ ])
300
+ ]),
301
+ default: d(() => [
302
+ o(g).status === "error" ? (n(), y("div", Be, [
303
+ r("p", Ae, k(o(h)(o(g).error.message)), 1),
304
+ s(v, {
305
+ label: o(t)("menu.common.actions.retry"),
306
+ loading: I.value,
307
+ "prepend-icon": "refresh",
308
+ size: "md",
309
+ variant: "secondary",
310
+ onClick: ae
311
+ }, null, 8, ["label", "loading"])
312
+ ])) : o(g).status === "unavailable" ? (n(), y("div", Ee, [
313
+ s(o(X), {
314
+ subtitle: o(t)("menu.print_route.empty.subtitle"),
315
+ title: o(t)("menu.print_route.empty.title")
316
+ }, null, 8, ["subtitle", "title"])
317
+ ])) : o(g).status === "loading" ? (n(), f(S, { key: 2 })) : l.value && l.value.totalCount === 0 ? (n(), f(o(X), {
318
+ key: 3,
319
+ action: l.value.create.state === "allowed" ? { text: o(t)("menu.print_route.empty.action"), callback: A } : void 0,
320
+ subtitle: o(t)("menu.print_route.empty.subtitle"),
321
+ title: o(t)("menu.print_route.empty.title")
322
+ }, null, 8, ["action", "subtitle", "title"])) : l.value ? (n(), y(L, { key: 4 }, [
323
+ r("div", Me, [
324
+ r("div", Ue, [
325
+ s(H, {
326
+ autofocus: "",
327
+ class: "my-8",
328
+ "model-value": ee.value,
329
+ placeholder: o(t)("menu.print_route.table.search.placeholder"),
330
+ "onUpdate:modelValue": i.sdk.printDepartment.search
331
+ }, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])
332
+ ])
333
+ ]),
334
+ D.value ? (n(), f(ve, {
335
+ key: 1,
336
+ class: "w-full px-16 flex-1 min-h-0 overflow-scroll pb-64",
337
+ separator: ""
338
+ }, {
339
+ default: d(() => [
340
+ (n(!0), y(L, null, N(l.value.rows, (a) => (n(), f(_e, {
341
+ key: a.id,
342
+ class: "!py-12 !px-0",
343
+ onClick: (V) => O(a)
344
+ }, {
345
+ default: d(() => [
346
+ r("div", Ne, [
347
+ r("div", je, k(a.name), 1),
348
+ r("div", Ke, k(o(t)("menu.print_route.table.mobile.products_linked", {
349
+ count: a.linkedProductCount
350
+ })), 1)
351
+ ]),
352
+ s(v, {
353
+ class: "shrink-0",
354
+ "aria-label": o(t)("menu.print_route.actions.remove"),
355
+ disabled: a.remove.state !== "allowed",
356
+ icon: "delete",
357
+ "text-color": "neutral-gray-400",
358
+ variant: "tertiary",
359
+ onClick: M((V) => q(a), ["stop"])
360
+ }, null, 8, ["aria-label", "disabled", "onClick"])
361
+ ]),
362
+ _: 2
363
+ }, 1032, ["onClick"]))), 128))
364
+ ]),
365
+ _: 1
366
+ })) : (n(), f(J, {
367
+ key: 0,
368
+ "column-defs": me.value,
369
+ "page-size": l.value.rows.length,
370
+ "row-data": oe.value,
371
+ "shrink-at": !1,
372
+ "hide-footer": "",
373
+ "pin-header-row": "",
374
+ onRowClick: u[0] || (u[0] = (a) => O(a.original))
375
+ }, null, 8, ["column-defs", "page-size", "row-data"])),
376
+ l.value.totalCount > 0 && D.value ? (n(), y("div", Qe, [
377
+ s(v, {
378
+ disabled: l.value.create.state !== "allowed",
379
+ label: o(t)("menu.print_route.actions.add"),
380
+ "prepend-icon": "add",
381
+ variant: "fab",
382
+ onClick: A
383
+ }, null, 8, ["disabled", "label"])
384
+ ])) : $("", !0)
385
+ ], 64)) : $("", !0),
386
+ s(ge, {
387
+ modelValue: b.value,
388
+ "onUpdate:modelValue": u[3] || (u[3] = (a) => b.value = a),
389
+ "is-container": o(U).FmForm,
390
+ "is-container-props": { onValidationSuccess: ce },
391
+ "max-width": 560,
392
+ "onOn:clickedAway": de
393
+ }, {
394
+ "side-sheet-header": d(() => {
395
+ var a;
396
+ return [
397
+ r("p", Te, k(((a = m.value) == null ? void 0 : a.mode) === "update" ? o(t)("menu.print_route.department_dialog.update.title") : o(t)("menu.print_route.department_dialog.add.title")), 1)
398
+ ];
399
+ }),
400
+ "side-sheet-footer": d(() => {
401
+ var a, V;
402
+ return [
403
+ r("div", Je, [
404
+ s(v, {
405
+ disabled: ((a = m.value) == null ? void 0 : a.submit.state) !== "allowed",
406
+ label: ((V = m.value) == null ? void 0 : V.mode) === "update" ? o(t)("menu.print_route.department_dialog.update.action") : o(t)("menu.print_route.department_dialog.add.action"),
407
+ size: "lg",
408
+ type: "submit",
409
+ variant: "primary"
410
+ }, null, 8, ["disabled", "label"]),
411
+ s(v, {
412
+ label: o(t)("menu.print_route.department_dialog.actions.cancel"),
413
+ size: "lg",
414
+ variant: "tertiary",
415
+ onClick: G
416
+ }, null, 8, ["label"])
417
+ ])
418
+ ];
419
+ }),
420
+ default: d(() => [
421
+ r("div", Oe, [
422
+ s(Y, {
423
+ title: o(t)("menu.print_route.department_dialog.sections.route_detail.title")
424
+ }, {
425
+ default: d(() => {
426
+ var a;
427
+ return [
428
+ s(fe, be({
429
+ autofocus: "",
430
+ "error-messages": Q.value ? [o(h)(Q.value)] : [],
431
+ label: o(t)(
432
+ "menu.print_route.department_dialog.sections.route_detail.name.label"
433
+ ),
434
+ "model-value": ((a = m.value) == null ? void 0 : a.name) ?? "",
435
+ placeholder: o(t)(
436
+ "menu.print_route.department_dialog.sections.route_detail.name.placeholder"
437
+ )
438
+ }, o(B).field("name", c.value.setName)), null, 16, ["error-messages", "label", "model-value", "placeholder"])
439
+ ];
440
+ }),
441
+ _: 1
442
+ }, 8, ["title"]),
443
+ s(Y, {
444
+ title: o(t)("menu.print_route.department_dialog.sections.link_product.title")
445
+ }, {
446
+ "append-title": d(() => [
447
+ s(ye),
448
+ s(v, {
449
+ label: o(t)(
450
+ "menu.print_route.department_dialog.sections.link_product.link"
451
+ ),
452
+ "border-color": "primary",
453
+ "prepend-icon": "link",
454
+ "text-color": "primary",
455
+ variant: "secondary",
456
+ onClick: u[1] || (u[1] = (a) => P.value = !0)
457
+ }, null, 8, ["label"])
458
+ ]),
459
+ default: d(() => [
460
+ r("div", Ge, [
461
+ r("div", qe, [
462
+ r("p", He, k(o(t)(
463
+ "menu.print_route.department_dialog.sections.link_product.products_linked",
464
+ { count: ie.value }
465
+ )), 1),
466
+ s(H, {
467
+ class: "flex-1",
468
+ "model-value": re.value,
469
+ placeholder: o(t)(
470
+ "menu.print_route.department_dialog.sections.link_product.search"
471
+ ),
472
+ "onUpdate:modelValue": u[2] || (u[2] = (a) => c.value.setLinkedProductQuery(String(a ?? "")))
473
+ }, null, 8, ["model-value", "placeholder"])
474
+ ]),
475
+ r("div", null, [
476
+ (n(!0), y(L, null, N(se.value, (a) => (n(), y("div", {
477
+ key: a.id ?? ""
478
+ }, [
479
+ s(J, {
480
+ "column-defs": ue(a),
481
+ "hide-footer": "",
482
+ "page-size": a.products.length,
483
+ "row-data": [...a.products],
484
+ "shrink-at": !1
485
+ }, null, 8, ["column-defs", "page-size", "row-data"])
486
+ ]))), 128))
487
+ ])
488
+ ])
489
+ ]),
490
+ _: 1
491
+ }, 8, ["title"])
492
+ ])
493
+ ]),
494
+ _: 1
495
+ }, 8, ["modelValue", "is-container", "is-container-props"]),
496
+ s(Ce, {
497
+ modelValue: P.value,
498
+ "onUpdate:modelValue": u[4] || (u[4] = (a) => P.value = a),
499
+ catalogue: ne.value,
500
+ "selected-product-ids": le.value,
501
+ title: o(t)("menu.print_route.department_dialog.sections.link_product.title"),
502
+ onSubmit: pe
503
+ }, null, 8, ["modelValue", "catalogue", "selected-product-ids", "title"])
504
+ ]),
505
+ _: 1
506
+ }, 8, ["heading"]);
507
+ };
508
+ }
509
+ }), rt = /* @__PURE__ */ j({
510
+ __name: "PrintRoute",
511
+ setup(z) {
512
+ const i = Le();
513
+ return (t, h) => (n(), f(We, { sdk: o(i) }, null, 8, ["sdk"]));
514
+ }
515
+ });
516
+ export {
517
+ rt as default
518
+ };
@@ -1,10 +1,10 @@
1
1
  import { defineComponent as m, resolveComponent as i, openBlock as c, createBlock as s, unref as t, withCtx as e, createVNode as o } from "vue";
2
2
  import { RouterLink as p } from "vue-router";
3
3
  import { useI18n as _ } from "@feedmepos/mf-common";
4
- import { _ as l } from "./ProductList.vue_vue_type_script_setup_true_lang-BDnTs366.js";
5
- import { a as u } from "./provide-BJRbSauL.js";
6
- import { R as d } from "./app-CmElp8cO.js";
7
- import { _ as f } from "./CatalogEditTabs.vue_vue_type_script_setup_true_lang-Cy2culdR.js";
4
+ import { _ as l } from "./ProductList.vue_vue_type_script_setup_true_lang-BwKQESr3.js";
5
+ import { a as u } from "./provide-CDmXzkhz.js";
6
+ import { R as d } from "./app-BWwwHsWi.js";
7
+ import { _ as f } from "./CatalogEditTabs.vue_vue_type_script_setup_true_lang-BmG-xpW4.js";
8
8
  const A = /* @__PURE__ */ m({
9
9
  __name: "Product",
10
10
  setup(k) {