@feedmepos/mf-report 5.4.36-beta.0 → 5.5.0-beta.0

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.
@@ -1,7 +1,7 @@
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 "./DynamicWidget.vue_vue_type_script_setup_true_lang-FIM7a1Po.js";
3
- import { _ as F } from "./Default.vue_vue_type_script_setup_true_lang-B3PsiD6a.js";
4
- import { a as P } from "./v4-BOOklPpL.js";
2
+ import { _ as b } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-9HLzKjix.js";
3
+ import { _ as F } from "./Default.vue_vue_type_script_setup_true_lang-DoZjQrXi.js";
4
+ import { a as P } from "./v4-BDHq16P_.js";
5
5
  import { storeToRefs as R } from "pinia";
6
6
  import { _ as S } from "./NoData.vue_vue_type_script_setup_true_lang-DI4X_DSc.js";
7
7
  import { useBreakpoints as V } from "@feedmepos/ui-library";
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as ce, ref as O, watch as Q, computed as w, h as f, withModifiers as ie, resolveComponent as C, createBlock as T, openBlock as F, withCtx as i, createVNode as n, createElementVNode as y, unref as e, normalizeStyle as me, normalizeClass as _, withDirectives as B, createElementBlock as ue, Fragment as pe, renderList as de, toDisplayString as R, createTextVNode as fe, vShow as D } from "vue";
2
2
  import { storeToRefs as W } from "pinia";
3
- import { a as ve } from "./v4-BOOklPpL.js";
4
- import { _ as ye } from "./Default.vue_vue_type_script_setup_true_lang-B3PsiD6a.js";
3
+ import { a as ve } from "./v4-BDHq16P_.js";
4
+ import { _ as ye } from "./Default.vue_vue_type_script_setup_true_lang-DoZjQrXi.js";
5
5
  import { u as ge } from "./message-dialog-UoMWOnil.js";
6
6
  import { b as be, f as xe } from "./global-loader-BqFQzk46.js";
7
7
  import { useSnackbar as Ce, useBreakpoints as _e, components as he, FmButtonColorThemeVariant as ke } from "@feedmepos/ui-library";
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as S, mergeModels as $, useModel as M, ref as N, computed as P, resolveComponent as c, createBlock as b, openBlock as s, withCtx as m, createElementVNode as C, createVNode as a, unref as o, normalizeClass as E, createTextVNode as fe, toDisplayString as O, createElementBlock as x, Fragment as q, renderSlot as j, createCommentVNode as U, watch as ve, resolveDynamicComponent as K, isRef as Q, renderList as H, onMounted as ge, normalizeStyle as _e } from "vue";
2
- import { W as ye, i as Ce, S as be, d as Ve, T as ke, _ as Fe } from "./TransitionFade-CpucF6O6.js";
3
- import { a as X, v as Y } from "./v4-BOOklPpL.js";
2
+ import { W as ye, i as Ce, S as be, d as Ve, T as ke, _ as Fe } from "./TransitionFade-DGn_cYeQ.js";
3
+ import { a as X, v as Y } from "./v4-BDHq16P_.js";
4
4
  import { storeToRefs as Z } from "pinia";
5
5
  import { useRouter as ee, useRoute as oe } from "vue-router";
6
6
  import { useBreakpoints as A, FmButtonColorThemeVariant as W, useSnackbar as xe } from "@feedmepos/ui-library";
7
7
  import { u as te } from "./message-dialog-UoMWOnil.js";
8
- import { _ as le } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-FIM7a1Po.js";
8
+ import { _ as le } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-9HLzKjix.js";
9
9
  import { _ as re } from "./NoData.vue_vue_type_script_setup_true_lang-DI4X_DSc.js";
10
10
  import { u as I, f as he } from "./global-loader-BqFQzk46.js";
11
11
  const we = /* @__PURE__ */ S({
@@ -1,33 +1,33 @@
1
- import { defineComponent as J, computed as v, resolveComponent as L, createBlock as g, openBlock as u, withCtx as V, createVNode as S, createElementVNode as z, unref as t, normalizeStyle as H, normalizeClass as w, createElementBlock as D, Fragment as M, renderList as Y } from "vue";
2
- import { _ as G } from "./MenuTab.vue_vue_type_script_setup_true_lang-BdDMXz7S.js";
3
- import { _ as Q } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-FIM7a1Po.js";
4
- import { useRouter as U, useRoute as W } from "vue-router";
5
- import { _ as j } from "./Default.vue_vue_type_script_setup_true_lang-B3PsiD6a.js";
6
- import { a as K } from "./v4-BOOklPpL.js";
1
+ import { defineComponent as L, computed as v, resolveComponent as V, createBlock as g, openBlock as u, withCtx as z, createVNode as D, createElementVNode as H, unref as t, normalizeStyle as M, normalizeClass as R, createElementBlock as $, Fragment as Y, renderList as G } from "vue";
2
+ import { _ as Q } from "./MenuTab.vue_vue_type_script_setup_true_lang-BdDMXz7S.js";
3
+ import { _ as U } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-9HLzKjix.js";
4
+ import { useRouter as W, useRoute as K } from "vue-router";
5
+ import { _ as X } from "./Default.vue_vue_type_script_setup_true_lang-DoZjQrXi.js";
6
+ import { a as Z } from "./v4-BDHq16P_.js";
7
7
  import { storeToRefs as p } from "pinia";
8
- import { a as X, u as Z } from "./NavigationTab.vue_vue_type_script_setup_true_lang-B6VAf7nH.js";
9
- import { _ as ee } from "./NoData.vue_vue_type_script_setup_true_lang-DI4X_DSc.js";
10
- import { useSnackbar as oe, useBreakpoints as te } from "@feedmepos/ui-library";
11
- import { u as re, f as ae, e as le } from "./global-loader-BqFQzk46.js";
12
- import { u as ne } from "./message-dialog-UoMWOnil.js";
13
- const ke = /* @__PURE__ */ J({
8
+ import { a as ee, b as oe, u as te } from "./NavigationTab.vue_vue_type_script_setup_true_lang-DfXW3V-Z.js";
9
+ import { _ as re } from "./NoData.vue_vue_type_script_setup_true_lang-DI4X_DSc.js";
10
+ import { useSnackbar as ae, useBreakpoints as le } from "@feedmepos/ui-library";
11
+ import { u as ne, f as ie, e as se } from "./global-loader-BqFQzk46.js";
12
+ import { u as ue } from "./message-dialog-UoMWOnil.js";
13
+ const xe = /* @__PURE__ */ L({
14
14
  __name: "ReportView",
15
- setup(ie) {
16
- const { t: n } = re(), m = U(), d = W(), i = oe(), { promptMessage: R } = ne(), f = K(), { promptLoader: $ } = ae(), { breakpoints: l } = te(), {
15
+ setup(ce) {
16
+ const { t: n } = ne(), m = W(), d = K(), i = ae(), { promptMessage: h } = ue(), f = Z(), b = ee(), { promptLoader: E } = ie(), { breakpoints: l } = le(), {
17
17
  currentReport: o,
18
18
  currentReportId: c,
19
- isOpenDownloadDialog: h,
20
- isOpenEmailDialog: E,
21
- editingReport: P,
22
- canCreateCustomReport: I,
19
+ isOpenDownloadDialog: P,
20
+ isOpenEmailDialog: O,
21
+ editingReport: I,
22
+ canCreateCustomReport: J,
23
23
  customReportQuota: y
24
- } = p(f), { isOpenAccountingDialog: O } = p(X()), { isOpenScheduleDialog: b } = p(Z()), { disabled: N } = p(le()), q = v(() => {
25
- const r = [
24
+ } = p(f), { isOpenAccountingDialog: N } = p(oe()), { isOpenScheduleDialog: _ } = p(te()), { disabled: q } = p(se()), A = v(() => {
25
+ const a = [
26
26
  {
27
27
  icon: "mail",
28
28
  label: n("report.common.emailSchedule"),
29
29
  onClick: () => {
30
- b.value = !0;
30
+ _.value = !0;
31
31
  }
32
32
  },
33
33
  // {
@@ -55,22 +55,32 @@ const ke = /* @__PURE__ */ J({
55
55
  onClick: () => {
56
56
  o.value && (navigator.clipboard.writeText(c.value), i.open({ message: n("report.messages.copiedReportIdToClipboard"), type: "success" }));
57
57
  }
58
+ },
59
+ {
60
+ icon: "report_jobs",
61
+ label: n("report.common.reportStatus"),
62
+ onClick: () => {
63
+ k();
64
+ }
58
65
  }
59
66
  ];
60
- return N.value || r.splice(1, 0, {
67
+ return q.value || a.splice(1, 0, {
61
68
  icon: "download",
62
69
  label: n("report.common.accountingExport"),
63
- onClick: _
64
- }), r;
70
+ onClick: C
71
+ }), a;
65
72
  });
66
- function A() {
67
- P.value = JSON.parse(JSON.stringify(o.value)), m.push({
73
+ async function k() {
74
+ b.isOpenJobDialog = !0, await b.getJobs();
75
+ }
76
+ function B() {
77
+ I.value = JSON.parse(JSON.stringify(o.value)), m.push({
68
78
  name: "reportEditor",
69
79
  query: d.query
70
80
  });
71
81
  }
72
- async function B() {
73
- if (!I.value) {
82
+ async function T() {
83
+ if (!J.value) {
74
84
  let e = `Your current plan only support up to ${y.value} custom reports.`;
75
85
  y.value === 0 && (e = "Your current plan does not support custom report."), i.open({
76
86
  message: e,
@@ -82,7 +92,7 @@ const ke = /* @__PURE__ */ J({
82
92
  i.open({ message: "No Widget", type: "error" });
83
93
  return;
84
94
  }
85
- if (await R({
95
+ if (await h({
86
96
  title: `${n("report.messages.saveReport")}`,
87
97
  message: n("report.messages.confirmAction", {
88
98
  action: n("report.common.duplicate"),
@@ -92,7 +102,7 @@ const ke = /* @__PURE__ */ J({
92
102
  const e = JSON.parse(JSON.stringify(o.value));
93
103
  e.editable = !0, e.id = "", e.name = `${e.name} duplicate`;
94
104
  try {
95
- await $(async () => {
105
+ await E(async () => {
96
106
  await f.createOrUpdateReport(e), f.updateCurrentReportId(c.value), m.push({
97
107
  name: "reportView",
98
108
  query: d.query
@@ -103,59 +113,60 @@ const ke = /* @__PURE__ */ J({
103
113
  }
104
114
  }
105
115
  }
106
- function _() {
107
- O.value = !0;
116
+ function C() {
117
+ N.value = !0;
108
118
  }
109
- function T() {
119
+ function j() {
110
120
  o.value && (navigator.clipboard.writeText(c.value), i.open({ message: "Copied report ID to clipboard", type: "success" }));
111
121
  }
112
- const k = v(() => o.value ? o.value.tiles : []), F = v(() => {
122
+ const S = v(() => o.value ? o.value.tiles : []), F = v(() => {
113
123
  var e;
114
- let r = [
124
+ let a = [
115
125
  (e = o == null ? void 0 : o.value) != null && e.editable ? { label: "Edit", value: "edit", isPrimary: !1 } : { label: "Duplicate", value: "duplicate", isPrimary: !1 },
116
126
  { label: "Download", value: "download", isPrimary: !0, prependIcon: "download" },
117
127
  { label: "Send Email", value: "email", isPrimary: !0 }
118
128
  ];
119
- return l.value.xs && (r = [
120
- ...r,
129
+ return l.value.xs && (a = [
130
+ ...a,
131
+ { label: "Send Email", value: "email", isPrimary: !1 },
132
+ { label: "Job Delivery Status", value: "report_jobs", isPrimary: !1 },
121
133
  { label: "Email schedule", value: "schedule_email", isPrimary: !1 },
122
- { label: "Copy ID", value: "content_copy", isPrimary: !1 },
123
134
  { label: "Accounting export", value: "export", isPrimary: !1 },
124
- { label: "Send Email", value: "email", isPrimary: !1 }
125
- ], r = r.filter((s) => s.value !== "edit")), r;
135
+ { label: "Copy ID", value: "content_copy", isPrimary: !1 }
136
+ ], a = a.filter((s) => s.value !== "edit")), a;
126
137
  });
127
- return (r, e) => {
128
- const s = L("FmPageHead");
129
- return u(), g(j, null, {
130
- default: V(() => {
138
+ return (a, e) => {
139
+ const s = V("FmPageHead");
140
+ return u(), g(X, null, {
141
+ default: z(() => {
131
142
  var x;
132
143
  return [
133
- S(s, {
144
+ D(s, {
134
145
  title: (x = t(o)) == null ? void 0 : x.name,
135
146
  "back-button": !0,
136
147
  actions: F.value,
137
- "onClick:back": e[0] || (e[0] = (a) => t(m).push({ name: "reports", query: t(d).query })),
138
- "onClick:action": e[1] || (e[1] = (a) => {
139
- a === "duplicate" && B(), a === "download" && (h.value = !0), a === "email" && (E.value = !0), a === "edit" && A(), a === "schedule_email" && (b.value = !0), a === "content_copy" && T(), a === "export" && _();
148
+ "onClick:back": e[0] || (e[0] = (r) => t(m).push({ name: "reports", query: t(d).query })),
149
+ "onClick:action": e[1] || (e[1] = (r) => {
150
+ r === "duplicate" && T(), r === "download" && (P.value = !0), r === "email" && (O.value = !0), r === "edit" && B(), r === "schedule_email" && (_.value = !0), r === "content_copy" && j(), r === "export" && C(), r === "report_jobs" && k();
140
151
  })
141
152
  }, null, 8, ["title", "actions"]),
142
- z("div", {
143
- class: w(`flex flex-col overflow-y-auto ${t(l).xs || t(l).sm ? "pb-20" : ""}`),
144
- style: H({ height: `calc(100% - ${t(l).lg || t(l).md ? 72 : 64}px)` })
153
+ H("div", {
154
+ class: R(`flex flex-col overflow-y-auto ${t(l).xs || t(l).sm ? "pb-20" : ""}`),
155
+ style: M({ height: `calc(100% - ${t(l).lg || t(l).md ? 72 : 64}px)` })
145
156
  }, [
146
- S(G, {
147
- "model-value": t(l).lg || t(l).md ? q.value : []
157
+ D(Q, {
158
+ "model-value": t(l).lg || t(l).md ? A.value : []
148
159
  }, null, 8, ["model-value"]),
149
- t(o) && k.value.length > 0 ? (u(), D("div", {
160
+ t(o) && S.value.length > 0 ? (u(), $("div", {
150
161
  key: 0,
151
- class: w(["grid grid-cols-12", t(l).sm || t(l).xs ? "px-3 gap-[16px]" : "px-24 gap-[24px]"])
162
+ class: R(["grid grid-cols-12", t(l).sm || t(l).xs ? "px-3 gap-[16px]" : "px-24 gap-[24px]"])
152
163
  }, [
153
- (u(!0), D(M, null, Y(k.value, (a, C) => (u(), g(Q, {
154
- key: `widget_${t(c)}_${C}`,
155
- "model-value": a,
156
- index: C
164
+ (u(!0), $(Y, null, G(S.value, (r, w) => (u(), g(U, {
165
+ key: `widget_${t(c)}_${w}`,
166
+ "model-value": r,
167
+ index: w
157
168
  }, null, 8, ["model-value", "index"]))), 128))
158
- ], 2)) : (u(), g(ee, { key: 1 }))
169
+ ], 2)) : (u(), g(re, { key: 1 }))
159
170
  ], 6)
160
171
  ];
161
172
  }),
@@ -165,5 +176,5 @@ const ke = /* @__PURE__ */ J({
165
176
  }
166
177
  });
167
178
  export {
168
- ke as default
179
+ xe as default
169
180
  };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as B, ref as H, useModel as J, resolveComponent as h, createElementBlock as k, openBlock as x, createBlock as M, createElementVNode as t, resolveDynamicComponent as ne, unref as e, withCtx as y, createVNode as a, normalizeClass as O, toDisplayString as s, Fragment as K, renderList as Q, withDirectives as E, createTextVNode as ie, vShow as j, watch as me, normalizeStyle as ue } from "vue";
2
- import { _ as de } from "./Default.vue_vue_type_script_setup_true_lang-B3PsiD6a.js";
2
+ import { _ as de } from "./Default.vue_vue_type_script_setup_true_lang-DoZjQrXi.js";
3
3
  import { u as U, d as z, C as A, D as pe, b as ce } from "./global-loader-BqFQzk46.js";
4
4
  import { components as I, useSnackbar as W, useBreakpoints as X, FmButtonColorThemeVariant as G } from "@feedmepos/ui-library";
5
5
  import { t as N, s as fe } from "./timeFormat-CAyeO7-a.js";
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as W, mergeModels as z, useModel as Y, computed as N, ref as A, resolveComponent as y, createElementBlock as L, openBlock as p, createVNode as d, createElementVNode as x, unref as i, withCtx as C, toDisplayString as I, Fragment as Q, renderList as se, withModifiers as ee, createTextVNode as ne, watch as re, createCommentVNode as T, createBlock as k, renderSlot as Ce, resolveDynamicComponent as _e, normalizeClass as Te, onMounted as Le, normalizeStyle as Be, isRef as Me } from "vue";
2
2
  import { useRoute as Re, useRouter as je } from "vue-router";
3
- import { h as Ee, d as ce, S as fe, W as Ae, a as qe, T as Pe, _ as He } from "./TransitionFade-CpucF6O6.js";
4
- import { W as S, a as Je } from "./v4-BOOklPpL.js";
3
+ import { h as Ee, d as ce, S as fe, W as Ae, a as qe, T as Pe, _ as He } from "./TransitionFade-DGn_cYeQ.js";
4
+ import { W as S, a as Je } from "./v4-BDHq16P_.js";
5
5
  import { storeToRefs as Ve } from "pinia";
6
6
  import { u as Se } from "./message-dialog-UoMWOnil.js";
7
7
  import { c as he, d as De, p as ze } from "./index-Cmh079Bh.js";
@@ -10,7 +10,7 @@ import { u as Ue } from "./report-schema-OJAFh4P6.js";
10
10
  import { _ as ie } from "./BaseDialog.vue_vue_type_script_setup_true_lang-DTNiGKgd.js";
11
11
  import { _ as H } from "./SelectComponent.vue_vue_type_script_setup_true_lang-BVs1C4af.js";
12
12
  import { u as le, d as pe } from "./global-loader-BqFQzk46.js";
13
- import { g as de, _ as $e } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-FIM7a1Po.js";
13
+ import { g as de, _ as $e } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-9HLzKjix.js";
14
14
  import { _ as Oe } from "./NoData.vue_vue_type_script_setup_true_lang-DI4X_DSc.js";
15
15
  var oe = /* @__PURE__ */ ((s) => (s.DateTime = "DATE_TIME", s.Hour = "HOUR", s.Day = "DAY", s.Week = "WEEK", s.Month = "MONTH", s.TimeOfDay = "TIME_OF_DAY", s.HourOfDay = "HOUR_OF_DAY", s.DayOfWeek = "DAY_OF_WEEK", s.DayOfMonth = "DAY_OF_MONTH", s.MonthOfYear = "MONTH_OF_YEAR", s.Year = "YEAR", s))(oe || {}), ge = /* @__PURE__ */ ((s) => (s.Asc = "ASC", s.Desc = "DESC", s))(ge || {}), Z = /* @__PURE__ */ ((s) => (s.Equal = "EQUAL", s.NotEqual = "NOT_EQUAL", s.GreaterThan = "GREATER_THAN", s.LessThan = "LESS_THAN", s.GreaterThanOrEqual = "GREATER_THAN_OR_EQUAL", s.LessThanOrEqual = "LESS_THAN_OR_EQUAL", s.Between = "BETWEEN", s.Like = "LIKE", s.NotLike = "NOT_LIKE", s.And = "AND", s.Or = "OR", s))(Z || {}), te = /* @__PURE__ */ ((s) => (s.String = "STRING", s.Timestamp = "TIMESTAMP", s.Bool = "BOOL", s.Numeric = "NUMERIC", s))(te || {});
16
16
  const we = [