@feedmepos/mf-report 5.22.23 → 5.22.24

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 (30) hide show
  1. package/dist/{App-Zn-puM1b.js → App-vJDVOth7.js} +5 -5
  2. package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-CpoV8rC8.js → BaseDialog.vue_vue_type_script_setup_true_lang-CuDpyny4.js} +636 -623
  3. package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-B5vOl_Qi.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-DFIMIp0w.js} +2 -2
  4. package/dist/{Default.vue_vue_type_script_setup_true_lang-B4qeIU-5.js → Default.vue_vue_type_script_setup_true_lang-yPwz9xco.js} +2 -2
  5. package/dist/{FilterSelector.vue_vue_type_script_setup_true_lang-pbAzVGA4.js → FilterSelector.vue_vue_type_script_setup_true_lang-BcODTyl7.js} +6 -6
  6. package/dist/InsightView-DNa3QEKr.js +670 -0
  7. package/dist/{Integration-DSpComdb.js → Integration-B8bI4Prk.js} +4 -4
  8. package/dist/{Integrations-DWsnA_ad.js → Integrations-BlVASP74.js} +4 -4
  9. package/dist/Layout-DW47sZuO.js +29 -0
  10. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-Dg6agPDE.js → MenuTab.vue_vue_type_script_setup_true_lang-rtidppHZ.js} +5 -5
  11. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-CJXAXP9k.js → NavigationTab.vue_vue_type_script_setup_true_lang-Bzc3bo-E.js} +5 -5
  12. package/dist/{NoData.vue_vue_type_script_setup_true_lang-BeANsyve.js → NoData.vue_vue_type_script_setup_true_lang-DaoGO26M.js} +1 -1
  13. package/dist/NoPermission.vue_vue_type_script_setup_true_lang-G3Os8ZFD.js +25 -0
  14. package/dist/OverviewView-qupMQGx3.js +67 -0
  15. package/dist/{Report-C3KsOYeU.js → Report-BZXMhOBE.js} +4 -4
  16. package/dist/{ReportEditor-CtgWwf3_.js → ReportEditor-gtLvhWsX.js} +6 -6
  17. package/dist/{ReportView-DfU2sOC5.js → ReportView-OKevCUGl.js} +8 -8
  18. package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang--GXm-kRc.js → SelectComponent.vue_vue_type_script_setup_true_lang-CPVvQ97s.js} +1 -1
  19. package/dist/Setting-CwZBJq6_.js +328 -0
  20. package/dist/{TileEditor-RhXE0gx2.js → TileEditor-DC0MmQ9i.js} +8 -8
  21. package/dist/{TransitionFade-rhvb0xo6.js → TransitionFade-Wch1EA34.js} +6 -6
  22. package/dist/{app-Bk5L2zfK.js → app--_wgvJ4h.js} +15 -11
  23. package/dist/app.js +1 -1
  24. package/dist/{useRestaurantPermission-CUzN375q.js → useRestaurantPermission-owy2OAuf.js} +1 -1
  25. package/dist/{vue-i18n-BGJaPUEy.js → vue-i18n-CsqQ6wm5.js} +1010 -1009
  26. package/package.json +2 -2
  27. package/dist/InsightView-CmNgn19R.js +0 -662
  28. package/dist/Layout-DnvPqfQI.js +0 -19
  29. package/dist/OverviewView-B_x6fZFf.js +0 -62
  30. package/dist/Setting-B2oXF461.js +0 -324
@@ -0,0 +1,29 @@
1
+ import { defineComponent as _, resolveComponent as t, createBlock as o, openBlock as e, withCtx as p, createElementBlock as l, unref as n, Fragment as u, createVNode as r } from "vue";
2
+ import { _ as f } from "./Default.vue_vue_type_script_setup_true_lang-yPwz9xco.js";
3
+ import { _ as g } from "./NoPermission.vue_vue_type_script_setup_true_lang-G3Os8ZFD.js";
4
+ import { u as d } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CuDpyny4.js";
5
+ import { storeToRefs as v } from "pinia";
6
+ import { u as k } from "./vue-i18n-CsqQ6wm5.js";
7
+ const N = /* @__PURE__ */ _({
8
+ __name: "Layout",
9
+ setup(w) {
10
+ const { t: a } = k(), i = d(), { isIntegrationAccessible: m } = v(i);
11
+ return (x, y) => {
12
+ const s = t("router-view"), c = t("FmPageHead");
13
+ return e(), o(f, null, {
14
+ default: p(() => [
15
+ n(m) ? (e(), o(s, { key: 0 })) : (e(), l(u, { key: 1 }, [
16
+ r(c, {
17
+ title: n(a)("report.view.integration.title")
18
+ }, null, 8, ["title"]),
19
+ r(g)
20
+ ], 64))
21
+ ]),
22
+ _: 1
23
+ });
24
+ };
25
+ }
26
+ });
27
+ export {
28
+ N as default
29
+ };
@@ -1,10 +1,10 @@
1
1
  import { defineComponent as R, computed as V, createElementBlock as x, openBlock as a, createElementVNode as y, createVNode as u, unref as e, isRef as p, withCtx as _, createBlock as g, createCommentVNode as k, useModel as $, resolveComponent as f, normalizeClass as C, Fragment as w, renderList as M, toDisplayString as T } from "vue";
2
- import { b as B } from "./vue-i18n-BGJaPUEy.js";
2
+ import { b as B } from "./vue-i18n-CsqQ6wm5.js";
3
3
  import { storeToRefs as D } from "pinia";
4
- import { a as I } from "./NavigationTab.vue_vue_type_script_setup_true_lang-CJXAXP9k.js";
5
- import { _ as U } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-B5vOl_Qi.js";
6
- import { _ as N } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CpoV8rC8.js";
7
- import { a as S } from "./FilterSelector.vue_vue_type_script_setup_true_lang-pbAzVGA4.js";
4
+ import { a as I } from "./NavigationTab.vue_vue_type_script_setup_true_lang-Bzc3bo-E.js";
5
+ import { _ as U } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-DFIMIp0w.js";
6
+ import { _ as N } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CuDpyny4.js";
7
+ import { a as S } from "./FilterSelector.vue_vue_type_script_setup_true_lang-BcODTyl7.js";
8
8
  import { useRoute as z } from "vue-router";
9
9
  import { useBreakpoints as E } from "@feedmepos/ui-library";
10
10
  const L = { class: "flex flex-col gap-2 overflow-x-auto overflow-y-hidden scrollbar-hide" }, O = { class: "flex flex-col gap-2 py-2" }, q = /* @__PURE__ */ R({
@@ -4,12 +4,12 @@ var Dl = (e, r, t) => S5(e, typeof r != "symbol" ? r + "" : r, t);
4
4
  import { defineComponent as tr, computed as Ke, useModel as Pn, ref as Ie, watch as Qr, resolveComponent as ve, createBlock as Ge, unref as X, openBlock as ae, withCtx as We, createElementVNode as J, createVNode as ee, toDisplayString as Xe, withDirectives as Vi, createElementBlock as De, Fragment as mt, renderList as Xt, vShow as Gs, createTextVNode as Zr, mergeModels as ci, createCommentVNode as dt, normalizeClass as Bn, onMounted as s0, withKeys as Xh, withModifiers as si, isRef as ri, vModelText as zh, normalizeStyle as l0, renderSlot as Hh, mergeProps as O5, nextTick as D5, resolveDynamicComponent as bd, createSlots as I5 } from "vue";
5
5
  import { useRouter as qh, useRoute as Wh } from "vue-router";
6
6
  import { storeToRefs as mr, defineStore as o0 } from "pinia";
7
- import { a as ol, m as kd, n as V5, i as ni, R as qa, k as Qs, o as Gl, _ as f0, e as L5, v as F5, j as N5, r as M5, p as yn, w as R5, u as B5 } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CpoV8rC8.js";
7
+ import { a as ol, m as kd, n as V5, i as ni, R as qa, k as Qs, o as Gl, _ as f0, e as L5, v as F5, j as N5, r as M5, p as yn, w as R5, u as B5 } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CuDpyny4.js";
8
8
  import { useBreakpoints as ko, components as Li, useSnackbar as Hi, useDialog as X5, useDialogChild as z5, FmButtonVariant as Td } from "@feedmepos/ui-library";
9
- import { u as ba, a as Ua, F as Za, r as fl, b as hi, q as To, j as H5, d as q5, k as Il, l as jh, p as W5 } from "./vue-i18n-BGJaPUEy.js";
10
- import { a as Cd, _ as j5 } from "./SelectComponent.vue_vue_type_script_setup_true_lang--GXm-kRc.js";
11
- import { C as hr, g as U5, e as ti, f as Uh, a as Z5, _ as Zh } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-B5vOl_Qi.js";
12
- import { d as Lt, c as Yh, b as Y5 } from "./app-Bk5L2zfK.js";
9
+ import { u as ba, a as Ua, F as Za, r as fl, b as hi, q as To, j as H5, d as q5, k as Il, l as jh, p as W5 } from "./vue-i18n-CsqQ6wm5.js";
10
+ import { a as Cd, _ as j5 } from "./SelectComponent.vue_vue_type_script_setup_true_lang-CPVvQ97s.js";
11
+ import { C as hr, g as U5, e as ti, f as Uh, a as Z5, _ as Zh } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-DFIMIp0w.js";
12
+ import { d as Lt, c as Yh, b as Y5 } from "./app--_wgvJ4h.js";
13
13
  import { detectLocale as G5, useCoreStore as Q5 } from "@feedmepos/mf-common";
14
14
  const K5 = { class: "flex flex-col" }, J5 = { class: "fm-typo-en-title-sm-600" }, _5 = { class: "grow" }, $5 = { class: "flex flex-col gap-8" }, e8 = { class: "flex flex-col w-full" }, t8 = { class: "flex flex-col gap-5 p-6" }, r8 = { class: "flex" }, xd = {
15
15
  // sales: [
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as u, computed as o, resolveComponent as d, createElementBlock as r, openBlock as a, renderSlot as f, createVNode as g, withCtx as _, createCommentVNode as y, createElementVNode as l, toDisplayString as n } from "vue";
2
- import { u as h } from "./vue-i18n-BGJaPUEy.js";
2
+ import { u as h } from "./vue-i18n-CsqQ6wm5.js";
3
3
  const v = { class: "flex flex-col h-full" }, D = ["src"], T = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, b = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary text-center" }, F = /* @__PURE__ */ u({
4
4
  __name: "NoData",
5
5
  props: {
@@ -0,0 +1,25 @@
1
+ import { defineComponent as l, computed as s, createBlock as m, openBlock as a, withCtx as u, renderSlot as p } from "vue";
2
+ import { u as c } from "./vue-i18n-CsqQ6wm5.js";
3
+ import { _ } from "./NoData.vue_vue_type_script_setup_true_lang-DaoGO26M.js";
4
+ const T = /* @__PURE__ */ l({
5
+ __name: "NoPermission",
6
+ props: {
7
+ title: { default: "report.messages.noPermission" },
8
+ subTitle: { default: "report.messages.noPermissionPageAccess" }
9
+ },
10
+ setup(o) {
11
+ const e = o, { t } = c(), i = s(() => t(e.title)), n = s(() => t(e.subTitle));
12
+ return (r, f) => (a(), m(_, {
13
+ title: i.value,
14
+ "sub-title": n.value
15
+ }, {
16
+ menu: u(() => [
17
+ p(r.$slots, "menu")
18
+ ]),
19
+ _: 3
20
+ }, 8, ["title", "sub-title"]));
21
+ }
22
+ });
23
+ export {
24
+ T as _
25
+ };
@@ -0,0 +1,67 @@
1
+ import { defineComponent as h, computed as u, resolveComponent as C, createBlock as n, openBlock as r, withCtx as d, createVNode as _, createElementVNode as S, unref as e, normalizeStyle as B, normalizeClass as f, createElementBlock as v, Fragment as F, renderList as L } from "vue";
2
+ import { _ as N } from "./FilterSelector.vue_vue_type_script_setup_true_lang-BcODTyl7.js";
3
+ import { _ as O } from "./Default.vue_vue_type_script_setup_true_lang-yPwz9xco.js";
4
+ import { a as P, u as R } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CuDpyny4.js";
5
+ import { storeToRefs as g } from "pinia";
6
+ import { _ as V } from "./NoData.vue_vue_type_script_setup_true_lang-DaoGO26M.js";
7
+ import { useBreakpoints as z } from "@feedmepos/ui-library";
8
+ import { _ as D } from "./MenuTab.vue_vue_type_script_setup_true_lang-rtidppHZ.js";
9
+ import { useI18n as E } from "@feedmepos/mf-common";
10
+ import { r as H } from "./i18n-CI_sQ5d_.js";
11
+ import { _ as I } from "./NoPermission.vue_vue_type_script_setup_true_lang-G3Os8ZFD.js";
12
+ const Y = /* @__PURE__ */ h({
13
+ __name: "OverviewView",
14
+ setup(T) {
15
+ const { t: s, te: x } = E(), w = P(), k = R(), { breakpoints: o } = z(), { isOpenDownloadDialog: $, overviewReport: a } = g(w), { isOverviewAccessible: i } = g(k), l = u(() => {
16
+ var t;
17
+ return ((t = a.value) == null ? void 0 : t.tiles) || [];
18
+ }), y = u(() => {
19
+ var t;
20
+ return i.value ? H(s, x, (t = a.value) == null ? void 0 : t.name, "other") : s("report.view.overview.title");
21
+ });
22
+ return (t, m) => {
23
+ const b = C("FmPageHead");
24
+ return r(), n(O, null, {
25
+ default: d(() => [
26
+ _(b, {
27
+ title: y.value,
28
+ class: "h-[68px]",
29
+ actions: e(i) ? [
30
+ {
31
+ label: e(s)("report.common.download"),
32
+ value: "download",
33
+ isPrimary: !0,
34
+ prependIcon: "download"
35
+ }
36
+ ] : [],
37
+ "onClick:action": m[0] || (m[0] = (p) => $.value = !0)
38
+ }, null, 8, ["title", "actions"]),
39
+ S("div", {
40
+ class: f(`flex flex-col gap-2 ${e(o).sm || e(o).xs ? "mb-20" : ""}`),
41
+ style: B({ height: `calc(100% - ${e(o).lg || e(o).md ? 72 : 64}px)` })
42
+ }, [
43
+ e(i) ? l.value.length > 0 && e(a) ? (r(), v("div", {
44
+ key: 1,
45
+ class: f(["grid grid-cols-12", e(o).sm || e(o).xs ? "px-3 gap-[16px]" : "px-24 gap-[24px]"])
46
+ }, [
47
+ (r(!0), v(F, null, L(l.value, (p, c) => (r(), n(N, {
48
+ key: `widget_${e(a).id}_${c}`,
49
+ "model-value": p,
50
+ index: c
51
+ }, null, 8, ["model-value", "index"]))), 128))
52
+ ], 2)) : (r(), n(V, { key: 2 })) : (r(), n(I, { key: 0 }, {
53
+ menu: d(() => [
54
+ _(D)
55
+ ]),
56
+ _: 1
57
+ }))
58
+ ], 6)
59
+ ]),
60
+ _: 1
61
+ });
62
+ };
63
+ }
64
+ });
65
+ export {
66
+ Y as default
67
+ };
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as $e, ref as j, watch as pe, computed as b, h as p, withModifiers as De, resolveComponent as k, createBlock as G, openBlock as A, withCtx as m, createVNode as c, createElementVNode as w, unref as e, normalizeStyle as Ie, normalizeClass as x, withDirectives as H, createElementBlock as Fe, Fragment as Oe, renderList as Pe, toDisplayString as J, createTextVNode as Le, vShow as Q } from "vue";
2
2
  import { storeToRefs as de } from "pinia";
3
- import { a as Ne, u as Ve, c as Ae } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CpoV8rC8.js";
4
- import { _ as Je } from "./Default.vue_vue_type_script_setup_true_lang-B4qeIU-5.js";
3
+ import { a as Ne, u as Ve, c as Ae } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CuDpyny4.js";
4
+ import { _ as Je } from "./Default.vue_vue_type_script_setup_true_lang-yPwz9xco.js";
5
5
  import { u as ze } from "./message-dialog-UoMWOnil.js";
6
- import { b as fe, e as Be } from "./vue-i18n-BGJaPUEy.js";
6
+ import { b as fe, e as Be } from "./vue-i18n-CsqQ6wm5.js";
7
7
  import { useSnackbar as Te, useBreakpoints as Ue, components as Ee, FmButtonColorThemeVariant as Ke } from "@feedmepos/ui-library";
8
- import { _ as Me } from "./NoData.vue_vue_type_script_setup_true_lang-BeANsyve.js";
8
+ import { _ as Me } from "./NoData.vue_vue_type_script_setup_true_lang-DaoGO26M.js";
9
9
  import { useRouter as Ye, useRoute as qe, onBeforeRouteLeave as je } from "vue-router";
10
10
  import { useI18n as Ge } from "@feedmepos/mf-common";
11
11
  import { r as W } from "./i18n-CI_sQ5d_.js";
@@ -1,15 +1,15 @@
1
1
  import { defineComponent as be, mergeModels as fe, useModel as ge, ref as I, computed as U, resolveComponent as y, createBlock as T, openBlock as r, withCtx as p, createElementVNode as h, createVNode as a, unref as t, normalizeClass as xe, createTextVNode as Ee, toDisplayString as Q, createElementBlock as C, Fragment as Z, renderSlot as Ge, createCommentVNode as A, watch as ve, renderList as me, resolveDynamicComponent as sl, isRef as Ke, normalizeStyle as Pe, onMounted as ul } from "vue";
2
- import { W as dl, g as ml, _ as cl, a as pl, i as vl, S as Le, d as He, T as fl, b as gl } from "./TransitionFade-rhvb0xo6.js";
3
- import { C as pe, D as K, d as we, a as Qe, b as bl, v as Te } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CpoV8rC8.js";
2
+ import { W as dl, g as ml, _ as cl, a as pl, i as vl, S as Le, d as He, T as fl, b as gl } from "./TransitionFade-Wch1EA34.js";
3
+ import { C as pe, D as K, d as we, a as Qe, b as bl, v as Te } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CuDpyny4.js";
4
4
  import { storeToRefs as Be } from "pinia";
5
5
  import { useRouter as Xe, useRoute as Ye } from "vue-router";
6
6
  import { useBreakpoints as De, useSnackbar as Ze, FmButtonColorThemeVariant as Fe } from "@feedmepos/ui-library";
7
7
  import { u as el } from "./message-dialog-UoMWOnil.js";
8
- import { u as Se, b as yl, h as Ie, e as hl } from "./vue-i18n-BGJaPUEy.js";
8
+ import { u as Se, b as yl, h as Ie, e as hl } from "./vue-i18n-CsqQ6wm5.js";
9
9
  import { r as Oe } from "./i18n-CI_sQ5d_.js";
10
- import { g as _l, a as je, _ as qe } from "./FilterSelector.vue_vue_type_script_setup_true_lang-pbAzVGA4.js";
11
- import { _ as We } from "./NoData.vue_vue_type_script_setup_true_lang-BeANsyve.js";
12
- import { a as ze } from "./SelectComponent.vue_vue_type_script_setup_true_lang--GXm-kRc.js";
10
+ import { g as _l, a as je, _ as qe } from "./FilterSelector.vue_vue_type_script_setup_true_lang-BcODTyl7.js";
11
+ import { _ as We } from "./NoData.vue_vue_type_script_setup_true_lang-DaoGO26M.js";
12
+ import { a as ze } from "./SelectComponent.vue_vue_type_script_setup_true_lang-CPVvQ97s.js";
13
13
  const wl = /* @__PURE__ */ be({
14
14
  __name: "WidgetDialog",
15
15
  props: /* @__PURE__ */ fe({
@@ -1,17 +1,17 @@
1
1
  import { defineComponent as ee, ref as oe, computed as c, watch as te, resolveComponent as J, createBlock as _, openBlock as d, withCtx as w, createVNode as S, createElementVNode as k, unref as s, toDisplayString as re, normalizeStyle as ae, normalizeClass as T, createElementBlock as N, Fragment as se, renderList as ne } from "vue";
2
- import { _ as le } from "./MenuTab.vue_vue_type_script_setup_true_lang-Dg6agPDE.js";
3
- import { _ as ie } from "./FilterSelector.vue_vue_type_script_setup_true_lang-pbAzVGA4.js";
2
+ import { _ as le } from "./MenuTab.vue_vue_type_script_setup_true_lang-rtidppHZ.js";
3
+ import { _ as ie } from "./FilterSelector.vue_vue_type_script_setup_true_lang-BcODTyl7.js";
4
4
  import { useRouter as ue, useRoute as ce } from "vue-router";
5
- import { _ as pe } from "./Default.vue_vue_type_script_setup_true_lang-B4qeIU-5.js";
6
- import { a as me, c as de, s as ve } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CpoV8rC8.js";
5
+ import { _ as pe } from "./Default.vue_vue_type_script_setup_true_lang-yPwz9xco.js";
6
+ import { a as me, c as de, s as ve } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CuDpyny4.js";
7
7
  import { storeToRefs as f } from "pinia";
8
- import { b as fe, c as ge, u as ye, g as be } from "./NavigationTab.vue_vue_type_script_setup_true_lang-CJXAXP9k.js";
9
- import { _ as _e } from "./NoData.vue_vue_type_script_setup_true_lang-BeANsyve.js";
8
+ import { b as fe, c as ge, u as ye, g as be } from "./NavigationTab.vue_vue_type_script_setup_true_lang-Bzc3bo-E.js";
9
+ import { _ as _e } from "./NoData.vue_vue_type_script_setup_true_lang-DaoGO26M.js";
10
10
  import { useSnackbar as we, useBreakpoints as Se } from "@feedmepos/ui-library";
11
- import { u as ke, e as xe, d as he } from "./vue-i18n-BGJaPUEy.js";
11
+ import { u as ke, e as xe, d as he } from "./vue-i18n-CsqQ6wm5.js";
12
12
  import { u as Ce } from "./message-dialog-UoMWOnil.js";
13
13
  import { r as Re } from "./i18n-CI_sQ5d_.js";
14
- import { _ as Pe } from "./SelectComponent.vue_vue_type_script_setup_true_lang--GXm-kRc.js";
14
+ import { _ as Pe } from "./SelectComponent.vue_vue_type_script_setup_true_lang-CPVvQ97s.js";
15
15
  const De = { class: "fm-typo-en-title-md-600 block min-w-0 max-w-full overflow-hidden text-ellipsis whitespace-nowrap" }, Oe = { class: "sticky top-0 z-10 bg-white" }, Ie = /* @__PURE__ */ ee({
16
16
  __name: "ReportView",
17
17
  setup($e) {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as B, mergeModels as D, useModel as z, ref as b, computed as f, resolveComponent as n, createBlock as y, openBlock as _, withCtx as m, createElementVNode as c, normalizeStyle as L, withDirectives as U, createElementBlock as $, createVNode as d, unref as E, vShow as H, Fragment as N, renderList as O, toDisplayString as g, normalizeClass as q } from "vue";
2
- import { u as A } from "./vue-i18n-BGJaPUEy.js";
2
+ import { u as A } from "./vue-i18n-CsqQ6wm5.js";
3
3
  const K = (s, u) => {
4
4
  const t = s.__vccOpts || s;
5
5
  for (const [o, i] of u)
@@ -0,0 +1,328 @@
1
+ import { defineComponent as U, ref as H, useModel as q, resolveComponent as b, createElementBlock as D, openBlock as g, createBlock as N, createElementVNode as t, resolveDynamicComponent as ie, unref as e, withCtx as x, createVNode as a, normalizeClass as O, toDisplayString as r, Fragment as W, renderList as X, withDirectives as J, createTextVNode as me, vShow as L, watch as ue, normalizeStyle as pe } from "vue";
2
+ import { _ as de } from "./Default.vue_vue_type_script_setup_true_lang-yPwz9xco.js";
3
+ import { d as I } from "./app--_wgvJ4h.js";
4
+ import { components as A, useSnackbar as Y, useBreakpoints as Z, FmButtonColorThemeVariant as G } from "@feedmepos/ui-library";
5
+ import { t as B, u as ce, l as fe } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CuDpyny4.js";
6
+ import { u as ve } from "./message-dialog-UoMWOnil.js";
7
+ import { u as E, C as K, D as _e, b as ge } from "./vue-i18n-CsqQ6wm5.js";
8
+ import { detectLocale as F } from "@feedmepos/mf-common";
9
+ import { a as ee } from "./SelectComponent.vue_vue_type_script_setup_true_lang-CPVvQ97s.js";
10
+ import { storeToRefs as Q } from "pinia";
11
+ import { _ as ye } from "./NoPermission.vue_vue_type_script_setup_true_lang-G3Os8ZFD.js";
12
+ const he = { class: "px-5 py-2" }, xe = { class: "flex" }, be = { class: "flex px-5 gap-2" }, Ce = { class: "flex flex-col gap-2" }, Ve = { class: "fm-typo-en-title-sm-600" }, Te = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, De = { class: "w-full gap-[24px] flex flex-col pt-2" }, Se = { class: "flex items-center w-full gap-3" }, $e = { class: "text-fm-color-typo-primary" }, ke = { class: "text-fm-color-typo-secondary" }, Fe = { class: "flex items-center gap-2" }, Re = /* @__PURE__ */ U({
13
+ __name: "ReportHour",
14
+ props: {
15
+ modelValue: {
16
+ required: !0,
17
+ default: () => []
18
+ },
19
+ modelModifiers: {}
20
+ },
21
+ emits: ["update:modelValue"],
22
+ setup(S) {
23
+ const l = H(!1), p = H(), y = {
24
+ name: "",
25
+ isDefault: !1,
26
+ startTime: { hour: 0, minute: 0 },
27
+ endTime: { hour: 0, minute: 0 }
28
+ }, { FmForm: o } = A, c = H(), { promptMessage: T } = ve(), f = Y(), n = H(JSON.parse(JSON.stringify(y))), s = q(S, "modelValue"), { t: i } = E(), P = () => {
29
+ l.value = !1, n.value && p.value === void 0 ? s.value.push(n.value) : s.value[p.value] = n.value;
30
+ }, R = () => {
31
+ var v;
32
+ (v = c.value) == null || v.validateInputs();
33
+ }, m = () => {
34
+ l.value = !1, n.value = y;
35
+ }, M = (v) => {
36
+ p.value = v, n.value = JSON.parse(JSON.stringify(s.value[p.value])), l.value = !0;
37
+ }, te = () => {
38
+ n.value = y, l.value = !0;
39
+ }, oe = async (v) => {
40
+ const u = s.value.find((C, d) => d === v);
41
+ if (!u) {
42
+ f.open({ message: `index ${v} cannot be found`, type: "error" });
43
+ return;
44
+ }
45
+ await T({
46
+ title: i("report.setting.reportHour.deleteTitle"),
47
+ message: i("report.setting.reportHour.deleteConfirm", { name: u.name })
48
+ }) && (s.value = s.value.filter((d, j) => j !== v), s.value.find((d) => d.isDefault) || (s.value[0].isDefault = !0), n.value = y);
49
+ }, le = (v, u) => {
50
+ v ? s.value = s.value.map(($, C) => ({
51
+ ...$,
52
+ isDefault: u === C
53
+ })) : s.value = s.value.map(($, C) => ({
54
+ ...$,
55
+ isDefault: C === 0
56
+ }));
57
+ }, { breakpoints: w } = Z(), { FmSideSheet: ae, FmTopSheet: se } = A;
58
+ return (v, u) => {
59
+ const $ = b("FmTextField"), C = b("FmTimePicker"), d = b("FmButton"), j = b("FmSwitch"), re = b("FmChip"), ne = b("FmCard");
60
+ return g(), D("div", null, [
61
+ (g(), N(ie(e(w).lg || e(w).md ? e(ae) : e(se)), {
62
+ modelValue: l.value,
63
+ "onUpdate:modelValue": u[3] || (u[3] = (h) => l.value = h),
64
+ "fullscreen-size": "sm",
65
+ "dismiss-away": !0
66
+ }, {
67
+ "side-sheet-header": x(() => [
68
+ t("p", null, r(e(i)("report.setting.reportHour.addTitle")), 1)
69
+ ]),
70
+ "top-sheet-header": x(() => [
71
+ t("div", he, [
72
+ t("p", null, r(e(i)("report.setting.reportHour.addTitle")), 1)
73
+ ])
74
+ ]),
75
+ "side-sheet-footer": x(() => [
76
+ t("div", xe, [
77
+ a(d, {
78
+ label: "Save",
79
+ variant: "primary",
80
+ onClick: R
81
+ }),
82
+ a(d, {
83
+ label: "Cancel",
84
+ variant: "tertiary",
85
+ onClick: m
86
+ })
87
+ ])
88
+ ]),
89
+ "top-sheet-footer": x(() => [
90
+ t("div", be, [
91
+ a(d, {
92
+ label: "Save",
93
+ variant: "primary",
94
+ onClick: R
95
+ }),
96
+ a(d, {
97
+ label: "Cancel",
98
+ variant: "tertiary",
99
+ onClick: m
100
+ })
101
+ ])
102
+ ]),
103
+ default: x(() => [
104
+ a(e(o), {
105
+ ref_key: "form",
106
+ ref: c,
107
+ class: O(["flex flex-col gap-2", `${e(w).sm || e(w).xs ? "px-24" : ""}`]),
108
+ onValidationSuccess: P
109
+ }, {
110
+ default: x(() => {
111
+ var h, V, k, z;
112
+ return [
113
+ a($, {
114
+ modelValue: n.value.name,
115
+ "onUpdate:modelValue": u[0] || (u[0] = (_) => n.value.name = _),
116
+ label: e(i)("report.setting.reportHour.hourSetName"),
117
+ placeholder: e(i)("report.setting.reportHour.namePlaceholder"),
118
+ rules: [(_) => _ !== "" || e(i)("report.setting.reportHour.cannotBeEmpty")]
119
+ }, null, 8, ["modelValue", "label", "placeholder", "rules"]),
120
+ a(C, {
121
+ "model-value": e(I)().hour(((h = n.value.startTime) == null ? void 0 : h.hour) ?? 0).minute(((V = n.value.startTime) == null ? void 0 : V.minute) ?? 0).locale(e(F)()).format("HH:mm"),
122
+ class: "grow",
123
+ label: e(i)("report.setting.reportHour.startTime"),
124
+ "onUpdate:modelValue": u[1] || (u[1] = (_) => {
125
+ _ && (n.value.startTime.hour = Number(_.split(":")[0]), n.value.startTime.minute = Number(_.split(":")[1]));
126
+ })
127
+ }, null, 8, ["model-value", "label"]),
128
+ a(C, {
129
+ "model-value": e(I)().hour(((k = n.value.endTime) == null ? void 0 : k.hour) ?? 0).minute(((z = n.value.endTime) == null ? void 0 : z.minute) ?? 0).format("HH:mm"),
130
+ class: "grow",
131
+ label: e(i)("report.setting.reportHour.closeTime"),
132
+ "onUpdate:modelValue": u[2] || (u[2] = (_) => {
133
+ _ && (n.value.endTime.hour = Number(_.split(":")[0]), n.value.endTime.minute = Number(_.split(":")[1]));
134
+ })
135
+ }, null, 8, ["model-value", "label"])
136
+ ];
137
+ }),
138
+ _: 1
139
+ }, 8, ["class"])
140
+ ]),
141
+ _: 1
142
+ }, 8, ["modelValue"])),
143
+ t("div", Ce, [
144
+ t("p", Ve, r(e(i)("report.setting.reportHour.title")), 1),
145
+ t("p", Te, r(e(i)("report.setting.reportHour.description")), 1)
146
+ ]),
147
+ t("div", De, [
148
+ (g(!0), D(W, null, X(s.value, (h, V) => (g(), N(ne, {
149
+ key: `report_${V}`,
150
+ class: "flex p-4",
151
+ variant: "outlined"
152
+ }, {
153
+ default: x(() => [
154
+ t("div", Se, [
155
+ a(j, {
156
+ "model-value": h.isDefault,
157
+ "onUpdate:modelValue": (k) => le(k, V)
158
+ }, null, 8, ["model-value", "onUpdate:modelValue"]),
159
+ t("div", null, [
160
+ t("p", $e, [
161
+ me(r(h.name) + " ", 1),
162
+ J(a(re, {
163
+ label: e(i)("report.common.default"),
164
+ class: "bg-fm-color-system-info-100 border-fm-color-typo-info text-fm-color-typo-info",
165
+ compact: ""
166
+ }, null, 8, ["label"]), [
167
+ [L, h.isDefault]
168
+ ])
169
+ ]),
170
+ t("p", ke, r(e(B)(h.startTime, e(F)())) + " - " + r(e(B)(h.endTime, e(F)())), 1)
171
+ ]),
172
+ u[4] || (u[4] = t("div", { class: "grow" }, null, -1)),
173
+ J(t("div", Fe, [
174
+ a(d, {
175
+ icon: "edit",
176
+ variant: "tertiary",
177
+ onClick: (k) => M(V)
178
+ }, null, 8, ["onClick"]),
179
+ a(d, {
180
+ icon: "delete",
181
+ variant: "tertiary",
182
+ onClick: (k) => oe(V)
183
+ }, null, 8, ["onClick"])
184
+ ], 512), [
185
+ [L, V !== 0]
186
+ ])
187
+ ])
188
+ ]),
189
+ _: 2
190
+ }, 1024))), 128)),
191
+ t("div", null, [
192
+ a(d, {
193
+ label: e(i)("report.setting.reportHour.add"),
194
+ variant: "secondary",
195
+ icon: "add",
196
+ "icon-position": "prepend",
197
+ "border-color": e(G).ColorPrimary,
198
+ "text-color": e(G).ColorPrimary,
199
+ onClick: te
200
+ }, null, 8, ["label", "border-color", "text-color"])
201
+ ])
202
+ ])
203
+ ]);
204
+ };
205
+ }
206
+ }), we = { class: "py-2 w-full gap-2 flex flex-col" }, He = { class: "fm-typo-en-title-sm-600" }, Oe = /* @__PURE__ */ U({
207
+ __name: "CompareRangeSetting",
208
+ props: {
209
+ modelValue: {
210
+ required: !0,
211
+ default: K.PRECEDING_PERIOD
212
+ },
213
+ modelModifiers: {}
214
+ },
215
+ emits: ["update:modelValue"],
216
+ setup(S) {
217
+ const { t: l } = E(), p = q(S, "modelValue"), y = Object.values(K).map((o) => ({
218
+ label: l(`report.compare.${o}`),
219
+ value: o
220
+ })).slice(0, -1);
221
+ return (o, c) => (g(), D("div", we, [
222
+ t("p", He, r(e(l)("report.setting.summary.comparisonDateRange")), 1),
223
+ a(ee, {
224
+ modelValue: p.value,
225
+ "onUpdate:modelValue": c[0] || (c[0] = (T) => p.value = T),
226
+ label: e(l)("report.setting.summary.comparisonDateRange"),
227
+ items: e(y),
228
+ "disable-search": !0
229
+ }, null, 8, ["modelValue", "label", "items"])
230
+ ]));
231
+ }
232
+ }), Ne = { class: "py-2 w-full gap-2 flex flex-col" }, Be = { class: "fm-typo-en-title-sm-600" }, Ue = /* @__PURE__ */ U({
233
+ __name: "DateRangeSetting",
234
+ props: {
235
+ modelValue: { required: !0 },
236
+ modelModifiers: {}
237
+ },
238
+ emits: ["update:modelValue"],
239
+ setup(S) {
240
+ const { t: l } = E(), p = q(S, "modelValue"), y = Object.values(_e).filter((o) => !["This month", "Last month"].includes(o)).map((o) => ({
241
+ label: l(`report.date.${o}`),
242
+ value: o
243
+ }));
244
+ return (o, c) => (g(), D("div", Ne, [
245
+ t("p", Be, r(e(l)("report.setting.summary.defaultDateRange")), 1),
246
+ a(ee, {
247
+ modelValue: p.value,
248
+ "onUpdate:modelValue": c[0] || (c[0] = (T) => p.value = T),
249
+ label: e(l)("report.setting.summary.defaultDateRange"),
250
+ items: e(y),
251
+ "disable-search": !0
252
+ }, null, 8, ["modelValue", "label", "items"])
253
+ ]));
254
+ }
255
+ }), Ee = { class: "w-2/4" }, Pe = { class: "fm-typo-en-title-sm-600" }, Me = { class: "text-fm-color-typo-secondary" }, je = { class: "fm-typo-en-body-lg-600" }, Je = { class: "text-fm-color-typo-secondary" }, Le = { class: "fm-typo-en-body-lg-600" }, qe = { class: "text-fm-color-typo-secondary" }, ze = { class: "fm-typo-en-body-lg-600" }, ot = /* @__PURE__ */ U({
256
+ __name: "Setting",
257
+ setup(S) {
258
+ const { breakpoints: l } = Z(), p = ge(), y = ce(), { defaultDateSetting: o } = Q(p), { isSettingAccessible: c } = Q(y), T = Y(), { t: f } = E();
259
+ return ue(
260
+ [
261
+ () => o.value.defaultCompareType,
262
+ () => o.value.defaultDateRange,
263
+ () => o.value.timeOptions
264
+ ],
265
+ () => {
266
+ c.value && (o.value.timeOptions.length === 0 ? T.open({ message: f("report.setting.reportHour.cannotBeEmptyError"), type: "error" }) : p.createOrUpdateBusinessSetting(o.value));
267
+ },
268
+ { deep: !0 }
269
+ ), (n, s) => {
270
+ const i = b("FmPageHead"), P = b("FmMenuDivider"), R = b("FmCard");
271
+ return g(), N(de, null, {
272
+ default: x(() => [
273
+ a(i, {
274
+ title: e(f)("report.view.setting.title")
275
+ }, null, 8, ["title"]),
276
+ e(c) ? (g(), D("div", {
277
+ key: 1,
278
+ class: O(`${e(l).sm || e(l).xs ? "pb-20" : ""} overflow-y-auto flex`),
279
+ style: pe({ height: `calc(100% - ${e(l).sm || e(l).xs ? 60 : 72}px)` })
280
+ }, [
281
+ t("div", {
282
+ class: O(`${e(l).lg || e(l).md ? "px-24" : "px-3"} w-full flex flex-col gap-[40px]`)
283
+ }, [
284
+ a(Re, {
285
+ modelValue: e(o).timeOptions,
286
+ "onUpdate:modelValue": s[0] || (s[0] = (m) => e(o).timeOptions = m)
287
+ }, null, 8, ["modelValue"]),
288
+ a(Ue, {
289
+ modelValue: e(o).defaultDateRange,
290
+ "onUpdate:modelValue": s[1] || (s[1] = (m) => e(o).defaultDateRange = m)
291
+ }, null, 8, ["modelValue"]),
292
+ a(Oe, {
293
+ modelValue: e(o).defaultCompareType,
294
+ "onUpdate:modelValue": s[2] || (s[2] = (m) => e(o).defaultCompareType = m)
295
+ }, null, 8, ["modelValue"])
296
+ ], 2),
297
+ J(t("div", Ee, [
298
+ a(R, {
299
+ variant: "outlined",
300
+ class: O(["flex flex-col gap-3", `${e(l).lg || e(l).md ? "mr-5 p-6" : ""}`])
301
+ }, {
302
+ default: x(() => [
303
+ t("p", Pe, r(e(f)("report.setting.summary.title")), 1),
304
+ a(P),
305
+ t("p", Me, r(e(f)("report.setting.summary.reportHour")), 1),
306
+ (g(!0), D(W, null, X(e(o).timeOptions, (m, M) => (g(), D("div", { key: M }, [
307
+ t("p", je, r(m.name) + r(m.isDefault ? `(${e(f)("report.setting.reportHour.default")})` : "") + " " + r(e(B)(m.startTime, e(F)())) + " " + r(e(B)(m.endTime, e(F)())) + " " + r(e(fe)(m.startTime, m.endTime)), 1)
308
+ ]))), 128)),
309
+ t("p", Je, r(e(f)("report.setting.summary.defaultDateRange")), 1),
310
+ t("p", Le, r(e(f)(`report.date.${e(o).defaultDateRange}`)), 1),
311
+ t("p", qe, r(e(f)("report.setting.summary.comparisonDateRange")), 1),
312
+ t("p", ze, r(e(f)(`report.compare.${e(o).defaultCompareType}`)), 1)
313
+ ]),
314
+ _: 1
315
+ }, 8, ["class"])
316
+ ], 512), [
317
+ [L, e(l).lg || e(l).md]
318
+ ])
319
+ ], 6)) : (g(), N(ye, { key: 0 }))
320
+ ]),
321
+ _: 1
322
+ });
323
+ };
324
+ }
325
+ });
326
+ export {
327
+ ot as default
328
+ };
@@ -1,17 +1,17 @@
1
1
  import { defineComponent as se, mergeModels as ve, useModel as ge, computed as S, ref as ee, resolveComponent as D, createElementBlock as P, openBlock as v, createVNode as d, createElementVNode as b, unref as l, withCtx as Y, toDisplayString as J, Fragment as de, renderList as xe, withModifiers as ye, createTextVNode as Ue, watch as he, createCommentVNode as N, createBlock as O, onUnmounted as Bl, renderSlot as rl, onMounted as Ye, onBeforeUnmount as ul, resolveDynamicComponent as dl, normalizeClass as ke, withDirectives as we, vShow as Ce, withKeys as el, vModelText as Ll, normalizeStyle as Ee, isRef as Al } from "vue";
2
2
  import { useRoute as Ml, useRouter as Nl } from "vue-router";
3
- import { h as Ol, d as Re, S as We, a as zl, W as jl, c as Rl, T as Il, b as Pl } from "./TransitionFade-rhvb0xo6.js";
4
- import { W as G, b as ml, e as De, D as Xl, S as ll, C as El, P as ol, a as Wl } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CpoV8rC8.js";
3
+ import { h as Ol, d as Re, S as We, a as zl, W as jl, c as Rl, T as Il, b as Pl } from "./TransitionFade-Wch1EA34.js";
4
+ import { W as G, b as ml, e as De, D as Xl, S as ll, C as El, P as ol, a as Wl } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CuDpyny4.js";
5
5
  import { storeToRefs as Se } from "pinia";
6
6
  import { u as cl } from "./message-dialog-UoMWOnil.js";
7
7
  import { useSnackbar as ql, useBreakpoints as pl, FmButtonColorThemeVariant as tl } from "@feedmepos/ui-library";
8
- import { a as fe, _ as vl } from "./SelectComponent.vue_vue_type_script_setup_true_lang--GXm-kRc.js";
9
- import { u as ce, i as $e, b as fl } from "./vue-i18n-BGJaPUEy.js";
8
+ import { a as fe, _ as vl } from "./SelectComponent.vue_vue_type_script_setup_true_lang-CPVvQ97s.js";
9
+ import { u as ce, i as $e, b as fl } from "./vue-i18n-CsqQ6wm5.js";
10
10
  import { r as me } from "./i18n-CI_sQ5d_.js";
11
- import { b as Te, u as Oe, R as al, L as Fe, c as Ne, S as le, d as ie, e as nl, f as Hl, Y as Yl, X as Gl, _ as gl, a as Jl } from "./FilterSelector.vue_vue_type_script_setup_true_lang-pbAzVGA4.js";
12
- import { d as ze } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-B5vOl_Qi.js";
13
- import { d as Me } from "./app-Bk5L2zfK.js";
14
- import { _ as yl } from "./NoData.vue_vue_type_script_setup_true_lang-BeANsyve.js";
11
+ import { b as Te, u as Oe, R as al, L as Fe, c as Ne, S as le, d as ie, e as nl, f as Hl, Y as Yl, X as Gl, _ as gl, a as Jl } from "./FilterSelector.vue_vue_type_script_setup_true_lang-BcODTyl7.js";
12
+ import { d as ze } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-DFIMIp0w.js";
13
+ import { d as Me } from "./app--_wgvJ4h.js";
14
+ import { _ as yl } from "./NoData.vue_vue_type_script_setup_true_lang-DaoGO26M.js";
15
15
  const Ie = [
16
16
  {
17
17
  type: G.Circular,
@@ -1,15 +1,15 @@
1
1
  import { defineComponent as Te, onBeforeMount as In, onBeforeUnmount as Fn, resolveComponent as N, createElementBlock as ee, openBlock as V, normalizeStyle as kn, unref as X, renderSlot as ze, createVNode as A, createElementVNode as ue, toDisplayString as Ae, TransitionGroup as An, nextTick as nn, h as Rt, mergeModels as Nt, useModel as Ge, computed as Fe, Fragment as qe, renderList as on, createBlock as Pe, normalizeClass as Xt, withCtx as ie, Transition as xt, createCommentVNode as ce, ref as Se, watch as pt, withModifiers as Yt, createTextVNode as Nn } from "vue";
2
- import { u as Pt, e as Pn, p as Vn, i as rn } from "./vue-i18n-BGJaPUEy.js";
2
+ import { u as Pt, e as Pn, p as Vn, i as rn } from "./vue-i18n-CsqQ6wm5.js";
3
3
  import { useCoreStore as Mn } from "@feedmepos/mf-common";
4
4
  import { storeToRefs as Ln } from "pinia";
5
5
  import { useRoute as Bn } from "vue-router";
6
- import { W as F, d as De, e as $n } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CpoV8rC8.js";
7
- import { _ as Vt, a as Wt } from "./SelectComponent.vue_vue_type_script_setup_true_lang--GXm-kRc.js";
8
- import { R as Rn, I as Be, h as an, i as ln, g as Xn } from "./FilterSelector.vue_vue_type_script_setup_true_lang-pbAzVGA4.js";
9
- import { d as ht } from "./app-Bk5L2zfK.js";
6
+ import { W as F, d as De, e as $n } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CuDpyny4.js";
7
+ import { _ as Vt, a as Wt } from "./SelectComponent.vue_vue_type_script_setup_true_lang-CPVvQ97s.js";
8
+ import { R as Rn, I as Be, h as an, i as ln, g as Xn } from "./FilterSelector.vue_vue_type_script_setup_true_lang-BcODTyl7.js";
9
+ import { d as ht } from "./app--_wgvJ4h.js";
10
10
  import { r as Yn } from "./i18n-CI_sQ5d_.js";
11
11
  import { useSnackbar as Wn } from "@feedmepos/ui-library";
12
- import { d as Un } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-B5vOl_Qi.js";
12
+ import { d as Un } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-DFIMIp0w.js";
13
13
  const jn = {
14
14
  key: 0,
15
15
  class: "flex gap-24 flex-col h-screen w-screen justify-center items-center"