@feedmepos/mf-report 5.28.4-beta.1 → 5.28.4-beta.3

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 (28) hide show
  1. package/dist/{App-TTaomYWJ.js → App-BNdbl8v-.js} +4 -4
  2. package/dist/{DateRangeSelect-CDWvx37Z.js → DateRangeSelect-DczITWsu.js} +1 -1
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-B4GS0LAe.js → Default.vue_vue_type_script_setup_true_lang-BPL7To4C.js} +1 -1
  4. package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-BXb30lZS.js → DynamicWidget.vue_vue_type_script_setup_true_lang-CenrOQ58.js} +4 -4
  5. package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-Mkp4Nbem.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-Dio9m6Jz.js} +3 -3
  6. package/dist/{InsightView-DNJahikW.js → InsightView-CcE2OQ0R.js} +5 -5
  7. package/dist/{Integration-BeErYlGf.js → Integration-bZ0kl1l-.js} +3 -3
  8. package/dist/{Integrations-DFuALsa_.js → Integrations-CKCjfBSD.js} +2 -2
  9. package/dist/{Layout-BSfIs3TK.js → Layout-_uXqK8iF.js} +1 -1
  10. package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-C-DhURYX.js → LocationSelect.vue_vue_type_script_setup_true_lang-Dl8s1Do5.js} +2 -2
  11. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-By-I-Ye-.js → MenuTab.vue_vue_type_script_setup_true_lang-B4qIaFPZ.js} +5 -5
  12. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-BWLE2D5s.js → NavigationTab.vue_vue_type_script_setup_true_lang-CPULQ1tP.js} +5 -5
  13. package/dist/{OverviewView-C6bc-nyW.js → OverviewView-hUv0WWJj.js} +4 -4
  14. package/dist/{Report-Cgrz4IUu.js → Report-fXqGDAk7.js} +170 -154
  15. package/dist/{ReportCanvasView-6ratBE_J.js → ReportCanvasView-CX21rslR.js} +3 -3
  16. package/dist/{ReportEditor-ChllQ8e0.js → ReportEditor-BAo9nIf7.js} +7 -7
  17. package/dist/{ReportView-wesF2Wbp.js → ReportView-OyJkdf8K.js} +6 -6
  18. package/dist/{ReportViewRoute-BgYwRrL6.js → ReportViewRoute-C8XeKxEq.js} +2 -2
  19. package/dist/{Setting-DiWyp9vo.js → Setting-Xqal_aQw.js} +3 -3
  20. package/dist/{Template-Ce-SmgVJ.js → Template-8Us5mNqQ.js} +3 -3
  21. package/dist/{TileEditor-BBNuA1AB.js → TileEditor-Cqfrs4fd.js} +6 -6
  22. package/dist/{TilePageStack.vue_vue_type_script_setup_true_lang-nTBw3Jmd.js → TilePageStack.vue_vue_type_script_setup_true_lang-U0BMLySg.js} +2 -2
  23. package/dist/{TransitionFade-CDVNSlPY.js → TransitionFade-SusB-gSL.js} +5 -5
  24. package/dist/{app-DI6EG74T.js → app-CDCDr2QW.js} +12 -12
  25. package/dist/app.js +1 -1
  26. package/dist/{report-CFFZa-VL.js → report-CpnEtrkQ.js} +1 -1
  27. package/dist/{useRestaurantPermission-CmkLx2Hj.js → useRestaurantPermission-CBDedKqH.js} +1 -1
  28. package/package.json +1 -1
@@ -1,59 +1,75 @@
1
- import { defineComponent as Ne, ref as z, watch as be, computed as R, h as f, withModifiers as ge, resolveComponent as k, createBlock as Z, openBlock as J, withCtx as u, createVNode as i, createElementVNode as C, unref as t, normalizeStyle as Ue, normalizeClass as y, withDirectives as Se, createElementBlock as Te, Fragment as Ae, renderList as ze, toDisplayString as _, createTextVNode as Je, vShow as Ce } from "vue";
2
- import { storeToRefs as he } from "pinia";
3
- import { u as Be, s as Ee } from "./report-CFFZa-VL.js";
4
- import { _ as Ke } from "./Default.vue_vue_type_script_setup_true_lang-B4GS0LAe.js";
5
- import { u as Me } from "./message-dialog-UoMWOnil.js";
6
- import { u as Ye } from "./global-loader-BuxFfehu.js";
7
- import { useSnackbar as qe, useBreakpoints as He, components as je, FmButtonColorThemeVariant as Ge } from "@feedmepos/ui-library";
8
- import { _ as Qe } from "./SelectComponent.vue_vue_type_script_setup_true_lang-DW7Dk7iQ.js";
9
- import { c as We, a as we, h as Xe } from "./app-DI6EG74T.js";
10
- import { useRouter as Ze, useRoute as et, onBeforeRouteLeave as tt } from "vue-router";
11
- import { useI18n as ot } from "@feedmepos/mf-common";
1
+ import { defineComponent as Ue, ref as M, watch as ge, computed as P, h as f, withModifiers as Se, resolveComponent as k, createBlock as Z, openBlock as z, withCtx as d, createVNode as c, createElementVNode as h, unref as t, normalizeStyle as Te, normalizeClass as v, withDirectives as he, createElementBlock as Ae, Fragment as Me, renderList as ze, toDisplayString as _, createTextVNode as Je, vShow as we } from "vue";
2
+ import { storeToRefs as Re } from "pinia";
3
+ import { u as Be, s as Ke } from "./report-CpnEtrkQ.js";
4
+ import { _ as Ee } from "./Default.vue_vue_type_script_setup_true_lang-BPL7To4C.js";
5
+ import { u as Ye } from "./message-dialog-UoMWOnil.js";
6
+ import { u as qe } from "./global-loader-BuxFfehu.js";
7
+ import { useSnackbar as He, useBreakpoints as je, components as Ge, FmButtonColorThemeVariant as Qe } from "@feedmepos/ui-library";
8
+ import { _ as We } from "./SelectComponent.vue_vue_type_script_setup_true_lang-DW7Dk7iQ.js";
9
+ import { c as Xe, a as Pe, h as Ze } from "./app-CDCDr2QW.js";
10
+ import { useRouter as et, useRoute as tt, onBeforeRouteLeave as ot } from "vue-router";
11
+ import { useI18n as at } from "@feedmepos/mf-common";
12
12
  import { r as ee } from "./i18n-DbyciK4x.js";
13
- const at = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, st = { class: "w-[343px]" }, rt = { class: "fm-typo-en-body-md-600" }, St = /* @__PURE__ */ Ne({
13
+ const st = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, rt = { class: "w-[343px]" }, nt = { class: "fm-typo-en-body-md-600" }, ht = /* @__PURE__ */ Ue({
14
14
  __name: "Report",
15
- setup(nt) {
16
- const { t: a, te: B } = ot(), te = Ze(), oe = et(), b = Be(), Re = We(), { business: Pe } = he(we()), {
17
- reports: d,
18
- overviewReport: E,
15
+ setup(lt) {
16
+ const { t: a, te: J } = at(), te = et(), oe = tt(), b = Be(), Ce = Xe(), { business: Ie } = Re(Pe()), {
17
+ reports: u,
18
+ overviewReport: B,
19
19
  categories: $,
20
20
  pinReport: O,
21
- isOpenAddReportDialog: Ie,
21
+ isOpenAddReportDialog: ke,
22
22
  scrollPositionY: ae,
23
23
  customReportQuota: F,
24
24
  canCreateCustomReport: se
25
- } = he(b), { promptMessage: re } = Me(), { promptLoader: K } = Ye(), l = qe(), { breakpoints: p } = He(), { canRead: ne, canUpdate: le, canDuplicate: ie, canDelete: M, canCreateReport: ke } = Xe(), h = z();
26
- tt(() => {
27
- h.value && (ae.value = h.value.$el.children[0].scrollTop);
28
- }), be(h, () => {
29
- h.value && setTimeout(() => {
30
- h.value && (h.value.$el.children[0].scrollTop = ae.value);
25
+ } = Re(b), { promptMessage: re } = Ye(), { promptLoader: K } = qe(), l = He(), { breakpoints: p } = je(), { canRead: ne, canUpdate: le, canDuplicate: ce, canDelete: E, canCreateReport: xe } = Ze(), w = M();
26
+ ot(() => {
27
+ w.value && (ae.value = w.value.$el.children[0].scrollTop);
28
+ }), ge(w, () => {
29
+ w.value && setTimeout(() => {
30
+ w.value && (w.value.$el.children[0].scrollTop = ae.value);
31
31
  }, 200);
32
32
  });
33
- const Y = R(() => O.value && d.value ? d.value.filter((o) => {
33
+ const Y = P(() => O.value && u.value ? u.value.filter((o) => {
34
34
  var e;
35
35
  return (e = O.value) == null ? void 0 : e.includes(o.id);
36
36
  }) : []);
37
- be(
38
- [() => Pe.value],
37
+ ge(
38
+ [() => Ie.value],
39
39
  () => {
40
40
  b.refreshPinReport();
41
41
  },
42
42
  { immediate: !0 }
43
43
  );
44
- const ce = R(() => Y.value.length > 0 ? d.value.filter(
44
+ const ie = P(() => Y.value.length > 0 ? u.value.filter(
45
45
  (o) => Y.value.findIndex((e) => e.id === o.id) === -1
46
- ) : d.value), { FmButton: xe, FmMenu: q, FmMenuItem: w, FmIcon: H, FmChip: j, FmTooltip: De, FmSwitch: pe } = je, v = z(/* @__PURE__ */ new Set()), ue = R(() => [
46
+ ) : u.value), { FmButton: De, FmMenu: q, FmMenuItem: R, FmIcon: H, FmChip: j, FmTooltip: _e, FmSwitch: pe } = Ge, y = M(/* @__PURE__ */ new Set()), de = /* @__PURE__ */ new Set([
47
+ "closeup",
48
+ "dailySales",
49
+ "hourlySales",
50
+ "productSales",
51
+ "discount",
52
+ "addonSales",
53
+ "userProductSales",
54
+ "categorySales",
55
+ "sourceProductSales",
56
+ "slotSales",
57
+ "drawer",
58
+ "counter",
59
+ "timesheet",
60
+ "void_",
61
+ "refund"
62
+ ]), ue = P(() => [
47
63
  { value: void 0, label: "All" },
48
64
  ...$.value.map((o) => ({
49
65
  value: o.id,
50
66
  label: o.name
51
67
  }))
52
- ]), L = z(ue.value[0]), G = z(""), P = R(() => ce.value.length === 0 || $.value.length === 0 ? [] : [
68
+ ]), L = M(ue.value[0]), G = M(""), C = P(() => ie.value.length === 0 || $.value.length === 0 ? [] : [
53
69
  ...Y.value.map((e) => {
54
70
  const r = $.value.find((n) => n.id === e.category);
55
71
  return {
56
- name: ee(a, B, e.name, "other"),
72
+ name: ee(a, J, e.name, "other"),
57
73
  categoryId: (r == null ? void 0 : r.id) ?? "",
58
74
  category: r != null && r.name ? a(`report.category.${r.name}`) : a("report.common.uncategorized"),
59
75
  reportId: e.id,
@@ -63,14 +79,14 @@ const at = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, st
63
79
  canUpdate: le(e),
64
80
  canRead: ne(e),
65
81
  isSupportPos: !!e.isSupportPos,
66
- isPosSupportConfigurable: e.isPosSupportConfigurable !== !1,
82
+ isMandatoryPosReport: e.isDefault && de.has(e.permissionKey ?? ""),
67
83
  reportType: e.reportType
68
84
  };
69
85
  }),
70
- ...ce.value.map((e) => {
86
+ ...ie.value.map((e) => {
71
87
  const r = $.value.find((n) => n.id === e.category);
72
88
  return {
73
- name: ee(a, B, e.name, "other"),
89
+ name: ee(a, J, e.name, "other"),
74
90
  categoryId: (r == null ? void 0 : r.id) ?? "",
75
91
  category: r != null && r.name ? a(`report.category.${r.name}`) : a("report.common.uncategorized"),
76
92
  reportId: e.id,
@@ -80,13 +96,13 @@ const at = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, st
80
96
  canUpdate: le(e),
81
97
  canRead: ne(e),
82
98
  isSupportPos: !!e.isSupportPos,
83
- isPosSupportConfigurable: e.isPosSupportConfigurable !== !1,
99
+ isMandatoryPosReport: e.isDefault && de.has(e.permissionKey ?? ""),
84
100
  reportType: e.reportType
85
101
  };
86
102
  })
87
- ].filter((e) => L.value.value && e.categoryId !== L.value.value ? !1 : `${(e == null ? void 0 : e.name) || ""}${(e == null ? void 0 : e.description) || ""}`.toLowerCase().indexOf(G.value.toLowerCase()) !== -1)), _e = R(
88
- () => P.value.map((o) => `${o.name}${o.category}`).toString()
89
- ), $e = R(() => [
103
+ ].filter((e) => L.value.value && e.categoryId !== L.value.value ? !1 : `${(e == null ? void 0 : e.name) || ""}${(e == null ? void 0 : e.description) || ""}`.toLowerCase().indexOf(G.value.toLowerCase()) !== -1)), $e = P(
104
+ () => C.value.map((o) => `${o.name}${o.category}`).toString()
105
+ ), Oe = P(() => [
90
106
  {
91
107
  accessorKey: "name",
92
108
  header: a("report.common.name"),
@@ -135,11 +151,11 @@ const at = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, st
135
151
  id: "Action",
136
152
  header: a("report.common.actions"),
137
153
  meta: {
138
- width: "220px"
154
+ width: "140px"
139
155
  },
140
156
  cell: (o) => {
141
157
  var m;
142
- const e = o.row.original, r = e.reportId, n = d.value.find((g) => g.id === r), X = r === ((m = E.value) == null ? void 0 : m.id), T = !e.canRead, D = n ? ie(n) : !1, A = n ? M(n) : !1, s = !e.canUpdate || !e.isPosSupportConfigurable || v.value.has(r), I = e.isPosSupportConfigurable ? a("reportV5.reportList.posV8Hint") : a("reportV5.reportList.mandatoryPosReportHint"), c = [
158
+ const e = o.row.original, r = e.reportId, n = u.value.find((g) => g.id === r), X = r === ((m = B.value) == null ? void 0 : m.id), T = !e.canRead, D = n ? ce(n) : !1, A = n ? E(n) : !1, s = !e.canUpdate || e.isMandatoryPosReport || y.value.has(r), I = e.isMandatoryPosReport ? a("reportV5.reportList.mandatoryPosReportHint") : a("reportV5.reportList.posV8Hint"), i = [
143
159
  {
144
160
  label: a("report.common.duplicate"),
145
161
  onClick: () => {
@@ -154,7 +170,7 @@ const at = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, st
154
170
  {
155
171
  label: a(X ? "report.common.unsetAsOverview" : "report.common.setAsOverview"),
156
172
  onClick: async () => {
157
- n && de(n);
173
+ n && me(n);
158
174
  },
159
175
  variant: "",
160
176
  disabled: !1
@@ -162,7 +178,7 @@ const at = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, st
162
178
  {
163
179
  label: a("report.common.remove"),
164
180
  onClick: () => {
165
- n && (A ? fe(n) : l.open({
181
+ n && (A ? ye(n) : l.open({
166
182
  message: a("report.messages.noPermissionDeleteReport"),
167
183
  type: "error"
168
184
  }));
@@ -179,19 +195,19 @@ const at = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, st
179
195
  {
180
196
  default: () => [
181
197
  f(
182
- De,
198
+ _e,
183
199
  { content: I, placement: "bottom", zIndex: 2e3 },
184
200
  {
185
201
  default: () => f(pe, {
186
202
  modelValue: e.isSupportPos,
187
203
  disabled: s,
188
- label: "POS v8",
204
+ label: a("report.common.showInPOS"),
189
205
  "aria-label": a("report.common.showInPOS"),
190
206
  class: "mr-2",
191
207
  "onUpdate:modelValue": () => {
192
- n && me(n);
208
+ n && fe(n);
193
209
  },
194
- onClick: ge(() => {
210
+ onClick: Se(() => {
195
211
  }, ["stop"])
196
212
  })
197
213
  }
@@ -201,8 +217,8 @@ const at = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, st
201
217
  {
202
218
  disabled: T,
203
219
  title: T ? a("report.messages.noPermission") : void 0,
204
- onClick: ge(() => {
205
- n && ye(n);
220
+ onClick: Se(() => {
221
+ n && be(n);
206
222
  }, ["stop"]),
207
223
  class: `text-fm-color-neutral-gray-400 ${e.pin ? "" : "show-pin"} hover:bg-fm-color-opacity-sm rounded-lg flex items-center justify-center`
208
224
  },
@@ -229,9 +245,9 @@ const at = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, st
229
245
  disabled: !1
230
246
  },
231
247
  {
232
- default: () => c.map(
248
+ default: () => i.map(
233
249
  (g) => f(
234
- w,
250
+ R,
235
251
  {
236
252
  onClick: g.disabled ? {} : g.onClick,
237
253
  label: g.label,
@@ -244,12 +260,12 @@ const at = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, st
244
260
  )
245
261
  ),
246
262
  "menu-button": () => f(
247
- xe,
263
+ De,
248
264
  {
249
265
  variant: "tertiary",
250
266
  size: "md",
251
267
  icon: "more_vert",
252
- iconColor: Ge.NeutralGray400,
268
+ iconColor: Qe.NeutralGray400,
253
269
  disabled: !1
254
270
  },
255
271
  {}
@@ -262,11 +278,11 @@ const at = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, st
262
278
  }
263
279
  }
264
280
  ]);
265
- async function de(o) {
281
+ async function me(o) {
266
282
  await K(async () => {
267
283
  var e;
268
284
  try {
269
- const r = o.id === ((e = E.value) == null ? void 0 : e.id);
285
+ const r = o.id === ((e = B.value) == null ? void 0 : e.id);
270
286
  await b.updateDefaultReport(r ? null : o.id), l.open({
271
287
  message: `Successfully ${r ? "unset" : "set"} ${o.name} as Overview`,
272
288
  type: "success"
@@ -276,24 +292,24 @@ const at = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, st
276
292
  }
277
293
  });
278
294
  }
279
- async function me(o) {
280
- if (!v.value.has(o.id)) {
281
- v.value = new Set(v.value).add(o.id);
295
+ async function fe(o) {
296
+ if (!y.value.has(o.id)) {
297
+ y.value = new Set(y.value).add(o.id);
282
298
  try {
283
299
  const e = !o.isSupportPos;
284
- await Ee(o.id, e), o.isSupportPos = e;
300
+ await Ke(o.id, e), o.isSupportPos = e;
285
301
  } catch (e) {
286
302
  console.log(e), l.open({
287
303
  message: a("report.messages.failedToAction", { action: a("report.common.update") }),
288
304
  type: "error"
289
305
  });
290
306
  } finally {
291
- const e = new Set(v.value);
292
- e.delete(o.id), v.value = e;
307
+ const e = new Set(y.value);
308
+ e.delete(o.id), y.value = e;
293
309
  }
294
310
  }
295
311
  }
296
- async function Oe(o) {
312
+ async function Fe(o) {
297
313
  if (await re({
298
314
  title: a("report.common.duplicate"),
299
315
  message: a("report.messages.confirmAction", {
@@ -315,15 +331,15 @@ const at = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, st
315
331
  }
316
332
  }
317
333
  function Q(o) {
318
- const e = d.value.find((r) => r.id === o.reportId);
319
- return !e || !ie(e);
334
+ const e = u.value.find((r) => r.id === o.reportId);
335
+ return !e || !ce(e);
320
336
  }
321
337
  function W(o) {
322
- const e = d.value.find((r) => r.id === o.reportId);
323
- return !o.editable || !e || !M(e);
338
+ const e = u.value.find((r) => r.id === o.reportId);
339
+ return !o.editable || !e || !E(e);
324
340
  }
325
- async function fe(o) {
326
- if (!M(o)) {
341
+ async function ye(o) {
342
+ if (!E(o)) {
327
343
  l.open({
328
344
  message: a("report.messages.noPermissionDeleteReport"),
329
345
  type: "error"
@@ -346,7 +362,7 @@ const at = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, st
346
362
  }
347
363
  async function ve(o) {
348
364
  if (se.value)
349
- await Oe(o);
365
+ await Fe(o);
350
366
  else {
351
367
  let e = `Your current plan only support up to ${F.value} custom reports.`;
352
368
  F.value === 0 && (e = "Your current plan does not support custom report."), l.open({
@@ -355,8 +371,8 @@ const at = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, st
355
371
  });
356
372
  }
357
373
  }
358
- function Fe() {
359
- if (!ke.value) {
374
+ function Le() {
375
+ if (!xe.value) {
360
376
  l.open({
361
377
  message: a("report.messages.noPermission"),
362
378
  type: "error"
@@ -364,7 +380,7 @@ const at = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, st
364
380
  return;
365
381
  }
366
382
  if (se.value)
367
- Ie.value = !0;
383
+ ke.value = !0;
368
384
  else {
369
385
  let o = `Your current plan only support up to ${F.value} custom reports.`;
370
386
  F.value === 0 && (o = "Your current plan does not support custom report."), l.open({
@@ -373,8 +389,8 @@ const at = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, st
373
389
  });
374
390
  }
375
391
  }
376
- function ye(o) {
377
- const e = ee(a, B, o.name, "other") ?? "";
392
+ function be(o) {
393
+ const e = ee(a, J, o.name, "other") ?? "";
378
394
  O.value && O.value.includes(o.id) ? (l.open({
379
395
  message: `${a("report.common.unpin")} ${e} ${a("report.common.successful")}`,
380
396
  type: "success"
@@ -383,15 +399,15 @@ const at = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, st
383
399
  type: "success"
384
400
  }), b.cachePinReport(o));
385
401
  }
386
- function Le(o) {
402
+ function Ve(o) {
387
403
  L.value = o;
388
404
  }
389
- const { selectedLocationIds: x, dateRange: V, compareDateRange: N, timeRange: S, locations: Ve } = we(), U = R(() => x.length === Ve.length);
405
+ const { selectedLocationIds: x, dateRange: V, compareDateRange: N, timeRange: S, locations: Ne } = Pe(), U = P(() => x.length === Ne.length);
390
406
  return (o, e) => {
391
407
  const r = k("FmPageHead"), n = k("FmSearch"), X = k("FmForm"), T = k("FmListItem"), D = k("FmList"), A = k("FmTable");
392
- return J(), Z(Ke, null, {
393
- default: u(() => [
394
- i(r, {
408
+ return z(), Z(Ee, null, {
409
+ default: d(() => [
410
+ c(r, {
395
411
  title: t(a)("report.common.report", 1),
396
412
  class: "h-[68px]",
397
413
  actions: [
@@ -402,60 +418,60 @@ const at = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, st
402
418
  prependIcon: "add"
403
419
  }
404
420
  ],
405
- "onClick:action": e[0] || (e[0] = (s) => Fe())
421
+ "onClick:action": e[0] || (e[0] = (s) => Le())
406
422
  }, null, 8, ["title", "actions"]),
407
- C("div", {
408
- class: y(`overflow-y-hidden flex flex-col gap-8 ${t(p).sm || t(p).xs ? "mb-20" : ""}`),
409
- style: Ue({ height: `calc(100% - ${t(p).lg || t(p).md ? 72 : 64}px)` })
423
+ h("div", {
424
+ class: v(`overflow-y-hidden flex flex-col gap-8 ${t(p).sm || t(p).xs ? "mb-20" : ""}`),
425
+ style: Te({ height: `calc(100% - ${t(p).lg || t(p).md ? 72 : 64}px)` })
410
426
  }, [
411
- i(X, {
412
- class: y(`flex items-center gap-2 ${t(p).sm || t(p).xs ? "px-3" : "px-24"}`)
427
+ c(X, {
428
+ class: v(`flex items-center gap-2 ${t(p).sm || t(p).xs ? "px-3" : "px-24"}`)
413
429
  }, {
414
- default: u(() => [
415
- i(t(q), null, {
416
- "menu-button": u(() => [
417
- i(t(j), { class: "fm-typo-en-body-md-600 text-fm-color-neutral-gray-400" }, {
418
- default: u(() => [
419
- C("p", null, _(t(a)(`report.category.${L.value.label}`)), 1),
420
- i(t(H), { name: "expand_more" })
430
+ default: d(() => [
431
+ c(t(q), null, {
432
+ "menu-button": d(() => [
433
+ c(t(j), { class: "fm-typo-en-body-md-600 text-fm-color-neutral-gray-400" }, {
434
+ default: d(() => [
435
+ h("p", null, _(t(a)(`report.category.${L.value.label}`)), 1),
436
+ c(t(H), { name: "expand_more" })
421
437
  ]),
422
438
  _: 1
423
439
  })
424
440
  ]),
425
- default: u(() => [
426
- (J(!0), Te(Ae, null, ze(ue.value, (s, I) => (J(), Z(t(w), {
441
+ default: d(() => [
442
+ (z(!0), Ae(Me, null, ze(ue.value, (s, I) => (z(), Z(t(R), {
427
443
  key: I,
428
444
  label: t(a)(`report.category.${s.label}`),
429
- onClick: () => Le(s)
445
+ onClick: () => Ve(s)
430
446
  }, null, 8, ["label", "onClick"]))), 128))
431
447
  ]),
432
448
  _: 1
433
449
  }),
434
- C("div", {
435
- class: y(`flex ${t(p).sm || t(p).xs ? "justify-center items-center" : ""}`)
450
+ h("div", {
451
+ class: v(`flex ${t(p).sm || t(p).xs ? "justify-center items-center" : ""}`)
436
452
  }, [
437
- C("p", at, _(t(a)("report.common.results", { count: P.value.length })), 1)
453
+ h("p", st, _(t(a)("report.common.results", { count: C.value.length })), 1)
438
454
  ], 2),
439
- e[3] || (e[3] = C("div", { class: "grow" }, null, -1)),
440
- C("div", st, [
441
- i(n, {
455
+ e[3] || (e[3] = h("div", { class: "grow" }, null, -1)),
456
+ h("div", rt, [
457
+ c(n, {
442
458
  modelValue: G.value,
443
459
  "onUpdate:modelValue": e[1] || (e[1] = (s) => G.value = s),
444
- class: y(`${t(p).lg || t(p).md ? "grow" : ""}`)
460
+ class: v(`${t(p).lg || t(p).md ? "grow" : ""}`)
445
461
  }, null, 8, ["modelValue", "class"])
446
462
  ])
447
463
  ]),
448
464
  _: 1
449
465
  }, 8, ["class"]),
450
- Se((J(), Z(A, {
451
- key: _e.value,
466
+ he((z(), Z(A, {
467
+ key: $e.value,
452
468
  ref_key: "table",
453
- ref: h,
454
- class: y([t(p).sm || t(p).xs ? "px-0" : "px-24", "report-table"]),
469
+ ref: w,
470
+ class: v([t(p).sm || t(p).xs ? "px-0" : "px-24", "report-table"]),
455
471
  style: { height: "calc(100% - 40px)" },
456
- "column-defs": $e.value,
457
- "row-data": P.value,
458
- "page-size": P.value.length,
472
+ "column-defs": Oe.value,
473
+ "row-data": C.value,
474
+ "page-size": C.value.length,
459
475
  "hide-footer": !0,
460
476
  "row-class-name": "row",
461
477
  onRowClick: e[2] || (e[2] = (s) => {
@@ -466,7 +482,7 @@ const at = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, st
466
482
  });
467
483
  return;
468
484
  }
469
- t(Re).suppressReportRouteSync = !0, t(b).updateCurrentReportId(s.original.reportId), t(te).push({
485
+ t(Ce).suppressReportRouteSync = !0, t(b).updateCurrentReportId(s.original.reportId), t(te).push({
470
486
  name: "reportView",
471
487
  query: {
472
488
  ...t(oe).query,
@@ -483,8 +499,8 @@ const at = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, st
483
499
  });
484
500
  })
485
501
  }, {
486
- "list-row": u(({ original: s }) => [
487
- i(D, {
502
+ "list-row": d(({ original: s }) => [
503
+ c(D, {
488
504
  onClick: () => {
489
505
  if (!s.canRead) {
490
506
  t(l).open({
@@ -510,49 +526,49 @@ const at = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, st
510
526
  }));
511
527
  }
512
528
  }, {
513
- default: u(() => [
514
- i(T, {
529
+ default: d(() => [
530
+ c(T, {
515
531
  tag: "label",
516
532
  clickable: ""
517
533
  }, {
518
- append: u(() => [
519
- i(t(j), {
520
- class: y(`${s.category !== "Uncategorized" ? "bg-fm-color-system-info-100 text-fm-color-typo-info" : "text-fm-color-typo-secondary"} ${s.canRead ? "" : "opacity-40 cursor-not-allowed"}`),
534
+ append: d(() => [
535
+ c(t(j), {
536
+ class: v(`${s.category !== "Uncategorized" ? "bg-fm-color-system-info-100 text-fm-color-typo-info" : "text-fm-color-typo-secondary"} ${s.canRead ? "" : "opacity-40 cursor-not-allowed"}`),
521
537
  compact: !0
522
538
  }, {
523
- default: u(() => [
524
- C("p", rt, _(s.category), 1)
539
+ default: d(() => [
540
+ h("p", nt, _(s.category), 1)
525
541
  ]),
526
542
  _: 2
527
543
  }, 1032, ["class"]),
528
- i(t(q), {
544
+ c(t(q), {
529
545
  placement: "left",
530
546
  "stop-click-propagation": !0
531
547
  }, {
532
- "menu-button": u(() => [
533
- i(t(H), {
548
+ "menu-button": d(() => [
549
+ c(t(H), {
534
550
  name: "more_vert",
535
551
  class: "btn-color"
536
552
  })
537
553
  ]),
538
- default: u(() => {
554
+ default: d(() => {
539
555
  var I;
540
556
  return [
541
- i(t(w), {
557
+ c(t(R), {
542
558
  label: s.pin ? "Unpin" : "Pin",
543
559
  onClick: () => {
544
- const c = t(d).find(
560
+ const i = t(u).find(
545
561
  (m) => m.id === s.reportId
546
562
  );
547
- c && ye(c);
563
+ i && be(i);
548
564
  }
549
565
  }, null, 8, ["label", "onClick"]),
550
- i(t(w), {
566
+ c(t(R), {
551
567
  label: t(a)("report.common.showInPOS"),
552
- disabled: !s.canUpdate || !s.isPosSupportConfigurable || v.value.has(s.reportId),
553
- "aria-disabled": !s.canUpdate || !s.isPosSupportConfigurable || v.value.has(s.reportId),
554
- class: y(
555
- !s.canUpdate || !s.isPosSupportConfigurable || v.value.has(s.reportId) ? "text-fm-color-typo-disabled" : ""
568
+ disabled: !s.canUpdate || s.isMandatoryPosReport || y.value.has(s.reportId),
569
+ "aria-disabled": !s.canUpdate || s.isMandatoryPosReport || y.value.has(s.reportId),
570
+ class: v(
571
+ !s.canUpdate || s.isMandatoryPosReport || y.value.has(s.reportId) ? "text-fm-color-typo-disabled" : ""
556
572
  ),
557
573
  onClick: () => {
558
574
  if (!s.canUpdate) {
@@ -562,63 +578,63 @@ const at = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, st
562
578
  });
563
579
  return;
564
580
  }
565
- const c = t(d).find(
581
+ const i = t(u).find(
566
582
  (m) => m.id === s.reportId
567
583
  );
568
- c && me(c);
584
+ i && fe(i);
569
585
  }
570
586
  }, {
571
- append: u(() => [
572
- i(t(pe), {
587
+ append: d(() => [
588
+ c(t(pe), {
573
589
  "model-value": s.isSupportPos,
574
- disabled: !s.canUpdate || !s.isPosSupportConfigurable || v.value.has(s.reportId),
590
+ disabled: !s.canUpdate || s.isMandatoryPosReport || y.value.has(s.reportId),
575
591
  "aria-label": "Show in POS v8",
576
592
  class: "pointer-events-none"
577
593
  }, null, 8, ["model-value", "disabled"])
578
594
  ]),
579
595
  _: 2
580
596
  }, 1032, ["label", "disabled", "aria-disabled", "class", "onClick"]),
581
- i(t(w), {
597
+ c(t(R), {
582
598
  label: t(a)("report.common.duplicate"),
583
599
  disabled: Q(s),
584
- class: y(
600
+ class: v(
585
601
  Q(s) ? "text-fm-color-typo-disabled" : ""
586
602
  ),
587
603
  onClick: () => {
588
- const c = t(d).find(
604
+ const i = t(u).find(
589
605
  (m) => m.id === s.reportId
590
606
  );
591
- c && !Q(s) ? ve(c) : t(l).open({
607
+ i && !Q(s) ? ve(i) : t(l).open({
592
608
  message: t(a)("report.messages.noPermissionDuplicateReport"),
593
609
  type: "error"
594
610
  });
595
611
  }
596
612
  }, null, 8, ["label", "disabled", "class", "onClick"]),
597
- i(t(w), {
613
+ c(t(R), {
598
614
  label: t(a)(
599
- s.reportId === ((I = t(E)) == null ? void 0 : I.id) ? "report.common.unsetAsOverview" : "report.common.setAsOverview"
615
+ s.reportId === ((I = t(B)) == null ? void 0 : I.id) ? "report.common.unsetAsOverview" : "report.common.setAsOverview"
600
616
  ),
601
617
  onClick: () => {
602
- const c = t(d).find(
618
+ const i = t(u).find(
603
619
  (m) => m.id === s.reportId
604
620
  );
605
- c && de(c);
621
+ i && me(i);
606
622
  }
607
623
  }, null, 8, ["label", "onClick"]),
608
- i(t(w), {
624
+ c(t(R), {
609
625
  label: t(a)("report.common.delete"),
610
626
  disabled: W(s),
611
- class: y(
627
+ class: v(
612
628
  W(s) ? "text-fm-color-typo-disabled" : "text-fm-color-typo-error"
613
629
  ),
614
630
  onClick: () => {
615
- const c = t(d).find(
631
+ const i = t(u).find(
616
632
  (m) => m.id === s.reportId
617
633
  );
618
- c && !W(s) && fe(c);
634
+ i && !W(s) && ye(i);
619
635
  }
620
636
  }, {
621
- label: u(() => [
637
+ label: d(() => [
622
638
  Je(_(t(a)("report.common.delete")), 1)
623
639
  ]),
624
640
  _: 2
@@ -628,9 +644,9 @@ const at = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, st
628
644
  _: 2
629
645
  }, 1024)
630
646
  ]),
631
- default: u(() => [
632
- C("span", {
633
- class: y(["fm-typo-en-body-lg-400 line-clamp-1 break-all text-fm-color-typo-primary", s.canRead ? "" : "opacity-40 cursor-not-allowed"])
647
+ default: d(() => [
648
+ h("span", {
649
+ class: v(["fm-typo-en-body-lg-400 line-clamp-1 break-all text-fm-color-typo-primary", s.canRead ? "" : "opacity-40 cursor-not-allowed"])
634
650
  }, _(s.name), 3)
635
651
  ]),
636
652
  _: 2
@@ -641,10 +657,10 @@ const at = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, st
641
657
  ]),
642
658
  _: 1
643
659
  }, 8, ["class", "column-defs", "row-data", "page-size"])), [
644
- [Ce, P.value.length > 0]
660
+ [we, C.value.length > 0]
645
661
  ]),
646
- Se(i(Qe, null, null, 512), [
647
- [Ce, P.value.length === 0]
662
+ he(c(We, null, null, 512), [
663
+ [we, C.value.length === 0]
648
664
  ])
649
665
  ], 6)
650
666
  ]),
@@ -654,5 +670,5 @@ const at = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, st
654
670
  }
655
671
  });
656
672
  export {
657
- St as default
673
+ ht as default
658
674
  };