@feedmepos/mf-report 5.19.22 → 5.19.23

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.
@@ -4,7 +4,7 @@ import { storeToRefs as D } from "pinia";
4
4
  import { a as I } from "./NavigationTab.vue_vue_type_script_setup_true_lang-CmW84nrF.js";
5
5
  import { _ as U } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-cfshXMB2.js";
6
6
  import { _ as N } from "./BaseDialog.vue_vue_type_script_setup_true_lang-g-uxOKsk.js";
7
- import { a as S } from "./FilterSelector.vue_vue_type_script_setup_true_lang-CaNN2UuW.js";
7
+ import { a as S } from "./FilterSelector.vue_vue_type_script_setup_true_lang-DT7ynfQa.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__ */ b({
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as g, computed as w, resolveComponent as k, createBlock as a, openBlock as t, withCtx as $, createVNode as d, createElementVNode as y, unref as e, normalizeStyle as C, normalizeClass as u, createElementBlock as _, Fragment as h, renderList as B } from "vue";
2
- import { _ as b } from "./FilterSelector.vue_vue_type_script_setup_true_lang-CaNN2UuW.js";
2
+ import { _ as b } from "./FilterSelector.vue_vue_type_script_setup_true_lang-DT7ynfQa.js";
3
3
  import { _ as F } from "./Default.vue_vue_type_script_setup_true_lang-CKFgPJYQ.js";
4
4
  import { a as P } from "./BaseDialog.vue_vue_type_script_setup_true_lang-g-uxOKsk.js";
5
5
  import { storeToRefs as R } from "pinia";
6
6
  import { _ as S } from "./NoData.vue_vue_type_script_setup_true_lang-BUoYdn5S.js";
7
7
  import { useBreakpoints as V } from "@feedmepos/ui-library";
8
- import { _ as z } from "./MenuTab.vue_vue_type_script_setup_true_lang-D-WSq7fL.js";
8
+ import { _ as z } from "./MenuTab.vue_vue_type_script_setup_true_lang-iMEcZvkT.js";
9
9
  import { useI18n as D } from "@feedmepos/mf-common";
10
10
  const G = /* @__PURE__ */ g({
11
11
  __name: "OverviewView",
@@ -8,7 +8,7 @@ import { useSnackbar as Fe, useBreakpoints as Le, components as Ne, FmButtonColo
8
8
  import { _ as Ve } from "./NoData.vue_vue_type_script_setup_true_lang-BUoYdn5S.js";
9
9
  import { useRouter as ze, useRoute as Je, onBeforeRouteLeave as Pe } from "vue-router";
10
10
  import { useI18n as Ae } from "@feedmepos/mf-common";
11
- import { r as ne } from "./i18n-Cif1I9J2.js";
11
+ import { r as ne } from "./i18n-DQxDgiLO.js";
12
12
  const Te = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Be = { class: "w-[343px]" }, Ee = { class: "fm-typo-en-body-md-600" }, et = /* @__PURE__ */ be({
13
13
  __name: "Report",
14
14
  setup(Me) {
@@ -1,14 +1,14 @@
1
1
  import { defineComponent as X, mergeModels as K, useModel as Q, ref as I, computed as D, resolveComponent as c, createBlock as k, openBlock as i, withCtx as u, createElementVNode as h, createVNode as o, unref as t, normalizeClass as ie, createTextVNode as _e, toDisplayString as H, createElementBlock as T, Fragment as G, renderSlot as $e, createCommentVNode as A, watch as de, renderList as ee, resolveDynamicComponent as Ie, isRef as Te, normalizeStyle as we, onMounted as Re } from "vue";
2
- import { W as We, g as qe, _ as Ee, i as Pe, S as xe, d as ke, T as Je, a as ze } from "./TransitionFade-CgWSxrTR.js";
2
+ import { W as We, g as qe, _ as Ee, i as Pe, S as xe, d as ke, T as Je, a as ze } from "./TransitionFade-DeahqXLb.js";
3
3
  import { D as j, c as ue, C as ge, a as Oe, b as He, v as re } from "./BaseDialog.vue_vue_type_script_setup_true_lang-g-uxOKsk.js";
4
4
  import { storeToRefs as me } from "pinia";
5
5
  import { useRouter as Ne, useRoute as Me } from "vue-router";
6
6
  import { useBreakpoints as pe, useSnackbar as De, FmButtonColorThemeVariant as oe } from "@feedmepos/ui-library";
7
7
  import { u as Ue } from "./message-dialog-UoMWOnil.js";
8
8
  import { u as se, b as Le, i as be, f as je } from "./vue-i18n-BQN8HgvD.js";
9
- import { a as Ce, _ as he } from "./FilterSelector.vue_vue_type_script_setup_true_lang-CaNN2UuW.js";
9
+ import { a as Ce, _ as he } from "./FilterSelector.vue_vue_type_script_setup_true_lang-DT7ynfQa.js";
10
10
  import { _ as ye } from "./NoData.vue_vue_type_script_setup_true_lang-BUoYdn5S.js";
11
- import { r as ce } from "./i18n-Cif1I9J2.js";
11
+ import { r as ce } from "./i18n-DQxDgiLO.js";
12
12
  import { _ as Ve } from "./SelectComponent.vue_vue_type_script_setup_true_lang-B2oCOTUH.js";
13
13
  const Ge = /* @__PURE__ */ X({
14
14
  __name: "WidgetDialog",
@@ -1,6 +1,6 @@
1
- import { defineComponent as z, computed as v, resolveComponent as H, createBlock as g, openBlock as u, withCtx as M, createVNode as h, createElementVNode as R, unref as o, normalizeStyle as Y, normalizeClass as D, createElementBlock as $, Fragment as G, renderList as Q } from "vue";
2
- import { _ as U } from "./MenuTab.vue_vue_type_script_setup_true_lang-D-WSq7fL.js";
3
- import { _ as W } from "./FilterSelector.vue_vue_type_script_setup_true_lang-CaNN2UuW.js";
1
+ import { defineComponent as z, computed as v, resolveComponent as H, createBlock as g, openBlock as u, withCtx as M, createVNode as h, createElementVNode as R, unref as t, normalizeStyle as Y, normalizeClass as D, createElementBlock as $, Fragment as G, renderList as Q } from "vue";
2
+ import { _ as U } from "./MenuTab.vue_vue_type_script_setup_true_lang-iMEcZvkT.js";
3
+ import { _ as W } from "./FilterSelector.vue_vue_type_script_setup_true_lang-DT7ynfQa.js";
4
4
  import { useRouter as K, useRoute as X } from "vue-router";
5
5
  import { _ as Z } from "./Default.vue_vue_type_script_setup_true_lang-CKFgPJYQ.js";
6
6
  import { a as ee } from "./BaseDialog.vue_vue_type_script_setup_true_lang-g-uxOKsk.js";
@@ -8,25 +8,25 @@ import { storeToRefs as p } from "pinia";
8
8
  import { b as oe, c as te, u as re } from "./NavigationTab.vue_vue_type_script_setup_true_lang-CmW84nrF.js";
9
9
  import { _ as ae } from "./NoData.vue_vue_type_script_setup_true_lang-BUoYdn5S.js";
10
10
  import { useSnackbar as le, useBreakpoints as ne } from "@feedmepos/ui-library";
11
- import { u as ie, f as se, e as ue } from "./vue-i18n-BQN8HgvD.js";
11
+ import { u as se, f as ie, e as ue } from "./vue-i18n-BQN8HgvD.js";
12
12
  import { u as ce } from "./message-dialog-UoMWOnil.js";
13
- import { r as pe } from "./i18n-Cif1I9J2.js";
13
+ import { r as pe } from "./i18n-DQxDgiLO.js";
14
14
  const me = { class: "sticky top-0 z-10 bg-white" }, De = /* @__PURE__ */ z({
15
15
  __name: "ReportView",
16
16
  setup(de) {
17
- const { t: r, te: P } = ie(), m = K(), c = X(), s = le(), { promptMessage: E } = ce(), d = ee(), b = oe(), { promptLoader: I } = se(), { breakpoints: n } = ne(), {
18
- currentReport: t,
17
+ const { t: e, te: E } = se(), m = K(), c = X(), i = le(), { promptMessage: P } = ce(), d = ee(), b = oe(), { promptLoader: I } = ie(), { breakpoints: n } = ne(), {
18
+ currentReport: r,
19
19
  currentReportId: f,
20
20
  isOpenDownloadDialog: O,
21
21
  isOpenEmailDialog: J,
22
22
  editingReport: N,
23
23
  canCreateCustomReport: q,
24
24
  customReportQuota: y
25
- } = p(d), { isOpenAccountingDialog: A } = p(te()), { isOpenScheduleDialog: _ } = p(re()), { disabled: B } = p(ue()), L = v(() => {
25
+ } = p(d), { isOpenAccountingDialog: B } = p(te()), { isOpenScheduleDialog: _ } = p(re()), { disabled: L } = p(ue()), T = v(() => {
26
26
  const l = [
27
27
  {
28
28
  icon: "mail",
29
- label: r("report.common.emailSchedule"),
29
+ label: e("report.common.emailSchedule"),
30
30
  onClick: () => {
31
31
  _.value = !0;
32
32
  }
@@ -52,131 +52,131 @@ const me = { class: "sticky top-0 z-10 bg-white" }, De = /* @__PURE__ */ z({
52
52
  // },
53
53
  {
54
54
  icon: "content_copy",
55
- label: r("report.common.copyID"),
55
+ label: e("report.common.copyID"),
56
56
  onClick: () => {
57
- t.value && (navigator.clipboard.writeText(f.value), s.open({ message: r("report.messages.copiedReportIdToClipboard"), type: "success" }));
57
+ r.value && (navigator.clipboard.writeText(f.value), i.open({ message: e("report.messages.copiedReportIdToClipboard"), type: "success" }));
58
58
  }
59
59
  },
60
60
  {
61
61
  icon: "report_jobs",
62
- label: r("report.common.reportStatus"),
62
+ label: e("report.common.reportStatus"),
63
63
  onClick: () => {
64
64
  k();
65
65
  }
66
66
  }
67
67
  ];
68
- return B.value || l.splice(1, 0, {
68
+ return L.value || l.splice(1, 0, {
69
69
  icon: "download",
70
- label: r("report.common.accountingExport"),
70
+ label: e("report.common.accountingExport"),
71
71
  onClick: C
72
72
  }), l;
73
73
  });
74
74
  async function k() {
75
75
  b.isOpenJobDialog = !0, await b.getJobs();
76
76
  }
77
- function T() {
78
- N.value = JSON.parse(JSON.stringify(t.value)), m.push({
77
+ function j() {
78
+ N.value = JSON.parse(JSON.stringify(r.value)), m.push({
79
79
  name: "reportEditor",
80
80
  query: c.query
81
81
  });
82
82
  }
83
- async function j() {
83
+ async function A() {
84
84
  if (!q.value) {
85
- let e = `Your current plan only support up to ${y.value} custom reports.`;
86
- y.value === 0 && (e = "Your current plan does not support custom report."), s.open({
87
- message: e,
85
+ let o = `Your current plan only support up to ${y.value} custom reports.`;
86
+ y.value === 0 && (o = "Your current plan does not support custom report."), i.open({
87
+ message: o,
88
88
  type: "error"
89
89
  });
90
90
  return;
91
91
  }
92
- if (!t.value) {
93
- s.open({ message: "No Widget", type: "error" });
92
+ if (!r.value) {
93
+ i.open({ message: "No Widget", type: "error" });
94
94
  return;
95
95
  }
96
- if (await E({
97
- title: `${r("report.messages.saveReport")}`,
98
- message: r("report.messages.confirmAction", {
99
- action: r("report.common.duplicate"),
100
- name: t.value.name
96
+ if (await P({
97
+ title: `${e("report.messages.saveReport")}`,
98
+ message: e("report.messages.confirmAction", {
99
+ action: e("report.common.duplicate"),
100
+ name: r.value.name
101
101
  })
102
- }) && t.value) {
103
- const e = JSON.parse(JSON.stringify(t.value));
104
- e.editable = !0, e.id = "", e.name = `${e.name} duplicate`;
102
+ }) && r.value) {
103
+ const o = JSON.parse(JSON.stringify(r.value));
104
+ o.editable = !0, o.id = "", o.name = `${o.name} duplicate`;
105
105
  try {
106
106
  await I(async () => {
107
- const i = await d.createOrUpdateReport(e);
108
- d.updateCurrentReportId(i.id), m.push({
107
+ const s = await d.createOrUpdateReport(o);
108
+ d.updateCurrentReportId(s.id), m.push({
109
109
  name: "reportView",
110
110
  params: c.params,
111
111
  query: c.query
112
112
  });
113
113
  });
114
- } catch (i) {
115
- console.log(i), s.open({ message: "Failed to clone report", type: "error" });
114
+ } catch (s) {
115
+ console.log(s), i.open({ message: "Failed to clone report", type: "error" });
116
116
  }
117
117
  }
118
118
  }
119
119
  function C() {
120
- A.value = !0;
120
+ B.value = !0;
121
121
  }
122
122
  function F() {
123
- t.value && (navigator.clipboard.writeText(f.value), s.open({ message: "Copied report ID to clipboard", type: "success" }));
123
+ r.value && (navigator.clipboard.writeText(f.value), i.open({ message: "Copied report ID to clipboard", type: "success" }));
124
124
  }
125
- const x = v(() => t.value ? t.value.tiles : []), V = v(() => {
126
- var e;
125
+ const x = v(() => r.value ? r.value.tiles : []), V = v(() => {
126
+ var o;
127
127
  let l = [
128
- (e = t == null ? void 0 : t.value) != null && e.editable ? { label: r("report.common.edit"), value: "edit", isPrimary: !1 } : {
129
- label: r("report.common.duplicate"),
128
+ (o = r == null ? void 0 : r.value) != null && o.editable ? { label: e("report.common.edit"), value: "edit", isPrimary: !1 } : {
129
+ label: e("report.common.duplicate"),
130
130
  value: "duplicate",
131
131
  isPrimary: !1
132
132
  },
133
133
  {
134
- label: r("report.common.download"),
134
+ label: e("report.common.download"),
135
135
  value: "download",
136
136
  isPrimary: !0,
137
137
  prependIcon: "download"
138
138
  },
139
- { label: r("report.schedule.sendEmail"), value: "email", isPrimary: !0 }
139
+ { label: e("report.schedule.sendEmail"), value: "email", isPrimary: !0 }
140
140
  ];
141
141
  return n.value.xs && (l = [
142
142
  ...l,
143
- { label: "Send Email", value: "email", isPrimary: !1 },
144
- { label: "Job Delivery Status", value: "report_jobs", isPrimary: !1 },
145
- { label: "Email schedule", value: "schedule_email", isPrimary: !1 },
146
- { label: "Accounting export", value: "export", isPrimary: !1 },
147
- { label: "Copy ID", value: "content_copy", isPrimary: !1 }
148
- ], l = l.filter((i) => i.value !== "edit")), l;
143
+ { label: e("report.schedule.sendEmail"), value: "email", isPrimary: !1 },
144
+ { label: e("report.common.reportStatus"), value: "report_jobs", isPrimary: !1 },
145
+ { label: e("report.schedule.sendEmail"), value: "schedule_email", isPrimary: !1 },
146
+ { label: e("report.common.accountingExport"), value: "export", isPrimary: !1 },
147
+ { label: e("report.common.copyID"), value: "content_copy", isPrimary: !1 }
148
+ ], l = l.filter((s) => s.value !== "edit")), l;
149
149
  });
150
- return (l, e) => {
151
- const i = H("FmPageHead");
150
+ return (l, o) => {
151
+ const s = H("FmPageHead");
152
152
  return u(), g(Z, null, {
153
153
  default: M(() => {
154
154
  var S;
155
155
  return [
156
- h(i, {
157
- title: o(pe)(o(r), o(P), (S = o(t)) == null ? void 0 : S.name, "other"),
156
+ h(s, {
157
+ title: t(pe)(t(e), t(E), (S = t(r)) == null ? void 0 : S.name, "other"),
158
158
  "back-button": !0,
159
159
  actions: V.value,
160
- "onClick:back": e[0] || (e[0] = (a) => o(m).push({ name: "reports", query: o(c).query })),
161
- "onClick:action": e[1] || (e[1] = (a) => {
162
- a === "duplicate" && j(), a === "download" && (O.value = !0), a === "email" && (J.value = !0), a === "edit" && T(), a === "schedule_email" && (_.value = !0), a === "content_copy" && F(), a === "export" && C(), a === "report_jobs" && k();
160
+ "onClick:back": o[0] || (o[0] = (a) => t(m).push({ name: "reports", query: t(c).query })),
161
+ "onClick:action": o[1] || (o[1] = (a) => {
162
+ a === "duplicate" && A(), a === "download" && (O.value = !0), a === "email" && (J.value = !0), a === "edit" && j(), a === "schedule_email" && (_.value = !0), a === "content_copy" && F(), a === "export" && C(), a === "report_jobs" && k();
163
163
  })
164
164
  }, null, 8, ["title", "actions"]),
165
165
  R("div", {
166
- class: D(`flex flex-col overflow-y-auto ${o(n).xs || o(n).sm ? "pb-20" : ""}`),
167
- style: Y({ height: `calc(100% - ${o(n).lg || o(n).md ? 72 : 64}px)` })
166
+ class: D(`flex flex-col overflow-y-auto ${t(n).xs || t(n).sm ? "pb-20" : ""}`),
167
+ style: Y({ height: `calc(100% - ${t(n).lg || t(n).md ? 72 : 64}px)` })
168
168
  }, [
169
169
  R("div", me, [
170
170
  h(U, {
171
- "model-value": o(n).lg || o(n).md ? L.value : []
171
+ "model-value": t(n).lg || t(n).md ? T.value : []
172
172
  }, null, 8, ["model-value"])
173
173
  ]),
174
- o(t) && x.value.length > 0 ? (u(), $("div", {
174
+ t(r) && x.value.length > 0 ? (u(), $("div", {
175
175
  key: 0,
176
- class: D(["grid grid-cols-12", o(n).sm || o(n).xs ? "px-3 gap-[16px]" : "px-24 gap-[24px]"])
176
+ class: D(["grid grid-cols-12", t(n).sm || t(n).xs ? "px-3 gap-[16px]" : "px-24 gap-[24px]"])
177
177
  }, [
178
178
  (u(!0), $(G, null, Q(x.value, (a, w) => (u(), g(W, {
179
- key: `widget_${o(f)}_${w}`,
179
+ key: `widget_${t(f)}_${w}`,
180
180
  "model-value": a,
181
181
  index: w
182
182
  }, null, 8, ["model-value", "index"]))), 128))