@piveau/piveau-hub-ui-modules 4.6.20 → 4.6.22

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,98 +1,90 @@
1
- import { computed as P, ref as u, getCurrentInstance as at, openBlock as a, createElementBlock as v, createElementVNode as l, createTextVNode as e, toDisplayString as i, unref as n, createCommentVNode as A, normalizeClass as k, Fragment as J, renderList as K, withDirectives as B, vModelText as N, isRef as X } from "vue";
2
- import { useRouter as vt, useRoute as dt } from "vue-router";
3
- import { useStore as pt, mapActions as mt } from "vuex";
4
- import O from "axios";
1
+ import { computed as z, ref as u, getCurrentInstance as rt, openBlock as a, createElementBlock as v, createElementVNode as l, createTextVNode as e, toDisplayString as i, unref as n, createCommentVNode as M, normalizeClass as k, Fragment as K, renderList as G, withDirectives as N, vModelText as W, isRef as H } from "vue";
2
+ import { useRouter as at, useRoute as vt } from "vue-router";
3
+ import { useStore as dt, mapActions as pt } from "vuex";
4
+ import F from "axios";
5
5
  import "./CatalogueMQA.vue2.mjs";
6
- import ft from "../_virtual/_plugin-vue_export-helper.mjs";
7
- const gt = { class: "container mb-3" }, bt = { class: "debug" }, yt = { key: 0 }, kt = { key: 1 }, Ct = { key: 0 }, wt = { class: "mqaWrapper" }, At = { key: 0 }, St = ["onUpdate:modelValue", "onInput"], Mt = ["onClick"], $t = ["onClick"], It = {
6
+ import mt from "../_virtual/_plugin-vue_export-helper.mjs";
7
+ const ft = { class: "container mb-3" }, bt = { class: "debug" }, gt = { key: 0 }, yt = { key: 1 }, kt = { key: 0 }, Ct = { class: "mqaWrapper" }, wt = { key: 0 }, Mt = ["onUpdate:modelValue", "onInput"], St = ["onClick"], $t = ["onClick"], It = {
8
8
  key: 0,
9
9
  class: "errormsg"
10
- }, Dt = { class: "d-flex mt-3" }, Vt = {
10
+ }, At = { class: "d-flex mt-3" }, Dt = {
11
11
  key: 1,
12
12
  class: "errormsg"
13
- }, Ut = { class: "mqaWrapper" }, qt = { class: "d-flex mt-3" }, Bt = { class: "mr-3 my-3" }, Nt = ["disabled", "onClick"], Tt = { class: "my-3" }, Et = ["disabled"], Wt = { class: "caretWrap" }, xt = { class: "mqaWrapper" }, Pt = { class: "w-50 mt-3" }, Ot = { class: "actionWrapper" }, zt = {
13
+ }, Vt = { class: "mqaWrapper" }, Bt = { class: "d-flex mt-3" }, Ut = { class: "mr-3 my-3" }, qt = ["disabled", "onClick"], Nt = { class: "my-3" }, Wt = ["disabled"], xt = { class: "caretWrap" }, Et = { class: "mqaWrapper" }, Rt = { class: "w-50 mt-3" }, Pt = { class: "actionWrapper" }, zt = {
14
14
  __name: "CatalogueMQA",
15
- setup(Rt) {
16
- const T = pt(), E = vt();
17
- P(() => T.getters["auth/getUserDrafts"]);
18
- const Y = P(() => T.getters["auth/getUserData"]), z = P(() => Y.value.rtpToken);
19
- mt("auth", {
15
+ setup(Ft) {
16
+ const x = dt(), E = at();
17
+ z(() => x.getters["auth/getUserDrafts"]);
18
+ const X = z(() => x.getters["auth/getUserData"]), B = z(() => X.value.rtpToken);
19
+ pt("auth", {
20
20
  updateUserData: "updateUserData"
21
21
  });
22
- const R = (s) => {
23
- T.dispatch("snackbar/showSnackbar", s);
22
+ const Q = (s) => {
23
+ x.dispatch("snackbar/showSnackbar", s);
24
24
  }, U = () => {
25
- R({
25
+ Q({
26
26
  message: "Saved Successfully",
27
27
  variant: "success"
28
28
  });
29
- }, Z = dt();
30
- let y = u(!1), f = u(!1), h = u(null), D = u("Activate"), W = u(!1), d = u(!1), g = u(), c = ["Mo", "Tue", "We", "Th", "Fr", "Sa", "Su"], p = u(1), $ = u(!1), C = u(0), S = u(""), b = u(""), M = u(null);
31
- const q = Z.params.id, j = at(), x = j.appContext.app.config.globalProperties.$env.api.notificationBaseUrl, F = j.appContext.app.config.globalProperties.$env.api.apiKey, Q = (s) => {
32
- f.value && (M.value = s, b.value = M);
29
+ }, Y = vt();
30
+ let y = u(!1), f = u(!1), Z = u(null), D = u("Activate"), R = u(!1), d = u(!1), b = u(), h = ["Mo", "Tue", "We", "Th", "Fr", "Sa", "Su"], p = u(1), I = u(!1), C = u(0), S = u(""), g = u(""), $ = u(null);
31
+ const q = Y.params.id, T = rt(), P = T.appContext.app.config.globalProperties.$env.api.notificationBaseUrl;
32
+ T.appContext.app.config.globalProperties.$env.api.apiKey;
33
+ const L = (s) => {
34
+ f.value && ($.value = s, g.value = $);
33
35
  }, _ = () => {
34
- f.value = !0, y.value = !1, M.value = b.value;
35
- }, tt = () => {
36
- f.value = !1, y.value = !0, M.value = b.value;
37
- }, w = u({}), L = (s) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s);
38
- let m = u({ mail: "", isValid: !0 }), I = u({});
39
- const lt = async () => {
36
+ f.value = !0, y.value = !1, $.value = g.value;
37
+ }, c = () => {
38
+ f.value = !1, y.value = !0, $.value = g.value;
39
+ }, w = u({}), j = (s) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s);
40
+ let m = u({ mail: "", isValid: !0 }), A = u({});
41
+ const tt = async () => {
40
42
  const s = {
41
43
  method: "get",
42
- url: `${x}/catalogue/${q}/setting`,
44
+ url: `${P}/catalogue/${q}/setting`,
43
45
  headers: {
44
- Authorization: `Bearer ${z.value}`
46
+ Authorization: `Bearer ${B.value}`
45
47
  }
46
48
  };
47
49
  try {
48
- const t = await O.request(s);
49
- w.value = t.data, w.value.activeStatus === !0 && (d.value = !0, D.value = "Deactivate"), w.value.activeStatus === !1 && (d.value = !1, D.value = "Activate"), g.value = w.value.receiverEmailList, S.value = w.value.frequency.unit, b.value = w.value.frequency.value, C.value = w.value.threshold, S.value === "week" ? (f.value = !0, y.value = !1, M.value = b.value) : S.value === "month" && (f.value = !1, y.value = !0, p.value = b.value), console.log("Response:", t);
50
+ const t = await F.request(s);
51
+ w.value = t.data, w.value.activeStatus === !0 && (d.value = !0, D.value = "Deactivate"), w.value.activeStatus === !1 && (d.value = !1, D.value = "Activate"), b.value = w.value.receiverEmailList, S.value = w.value.frequency.unit, g.value = w.value.frequency.value, C.value = w.value.threshold, S.value === "week" ? (f.value = !0, y.value = !1, $.value = g.value) : S.value === "month" && (f.value = !1, y.value = !0, p.value = g.value), console.log("Response:", t);
50
52
  } catch (t) {
51
53
  console.log("Full error:", t);
52
54
  }
53
- }, et = async () => {
54
- f.value === !0 ? (S.value = "week", b.value = M.value) : y.value === !0 && (S.value = "month", b.value = p.value);
55
+ }, lt = async () => {
56
+ f.value === !0 ? (S.value = "week", g.value = $.value) : y.value === !0 && (S.value = "month", g.value = p.value);
55
57
  const s = {
56
58
  method: "post",
57
- url: `${x}/catalogue/${q}/setting`,
59
+ url: `${P}/catalogue/${q}/setting`,
58
60
  headers: {
59
- Authorization: F,
60
- Accept: "application/json",
61
- "Content-Type": "application/json",
62
- "Access-Control-Allow-Origin": "*",
63
- "Access-Control-Allow-Methods": "GET, POST, OPTIONS",
64
- "Access-Control-Allow-Headers": "Authorization"
61
+ Authorization: `Bearer ${B.value}`
65
62
  },
66
63
  withCredentials: !0,
67
64
  data: JSON.stringify({
68
- receiverEmailList: g.value,
65
+ receiverEmailList: b.value,
69
66
  threshold: Number(C.value),
70
67
  frequency: {
71
68
  unit: S.value,
72
- value: b.value
69
+ value: g.value
73
70
  },
74
71
  activeStatus: !0
75
72
  })
76
73
  };
77
74
  try {
78
- const t = await O.request(s);
75
+ const t = await F.request(s);
79
76
  return console.log("Settings updated:", t.data), U(), E.push({ name: "DataProviderInterface-UserCatalogues" }), t.data;
80
77
  } catch (t) {
81
78
  throw U(), console.log("Error updating settings:", t), t;
82
79
  }
83
80
  };
84
- lt();
85
- const G = async () => {
81
+ tt();
82
+ const J = async () => {
86
83
  const s = {
87
84
  method: "post",
88
- url: `${x}/catalogue/${q}/setting`,
85
+ url: `${P}/catalogue/${q}/setting`,
89
86
  headers: {
90
- Authorization: F,
91
- Accept: "application/json",
92
- "Content-Type": "application/json",
93
- "Access-Control-Allow-Origin": "*",
94
- "Access-Control-Allow-Methods": "GET, POST, OPTIONS",
95
- "Access-Control-Allow-Headers": "Authorization"
87
+ Authorization: `Bearer ${B.value}`
96
88
  },
97
89
  withCredentials: !0,
98
90
  data: JSON.stringify({
@@ -100,35 +92,35 @@ const gt = { class: "container mb-3" }, bt = { class: "debug" }, yt = { key: 0 }
100
92
  })
101
93
  };
102
94
  try {
103
- const t = await O.request(s);
95
+ const t = await F.request(s);
104
96
  return console.log("Settings updated:", t.data), U(), d.value || E.push({ name: "DataProviderInterface-UserCatalogues" }), t.data;
105
97
  } catch (t) {
106
98
  throw U(), console.log("Error updating settings:", t), t;
107
99
  }
108
- }, nt = () => {
109
- $.value = !0, R({
100
+ }, et = () => {
101
+ I.value = !0, Q({
110
102
  message: "Email added successfully.",
111
103
  variant: "success"
112
104
  });
105
+ }, nt = (s) => {
106
+ const t = b.value[s].trim();
107
+ j(t) ? (I.value = !1, delete A.value[s]) : A.value[s] = "*Invalid email format";
113
108
  }, st = (s) => {
114
- const t = g.value[s].trim();
115
- L(t) ? ($.value = !1, delete I.value[s]) : I.value[s] = "*Invalid email format";
116
- }, ot = (s) => {
117
- g.value.splice(s, 1);
118
- }, H = (s) => {
119
- s === "up" && p.value < 28 ? (p.value > 8 && (W.value = !0), p.value++) : p.value > 1 && (p.value < 11 && (W.value = !1), p.value--);
120
- }, ut = () => {
109
+ b.value.splice(s, 1);
110
+ }, O = (s) => {
111
+ s === "up" && p.value < 28 ? (p.value > 8 && (R.value = !0), p.value++) : p.value > 1 && (p.value < 11 && (R.value = !1), p.value--);
112
+ }, ot = () => {
121
113
  if (m.value.mail.trim() === "") {
122
114
  m.value.isValid = !1;
123
115
  return;
124
116
  }
125
- L(m.value.mail) ? (g.value.push(m.value.mail), m.value.mail = "", m.value.isValid = !0) : m.value.isValid = !1;
117
+ j(m.value.mail) ? (b.value.push(m.value.mail), m.value.mail = "", m.value.isValid = !0) : m.value.isValid = !1;
118
+ }, ut = () => {
119
+ d.value ? (d.value = !1, D.value = "Activate", J()) : (d.value = !0, D.value = "Deactivate", J());
126
120
  }, it = () => {
127
- d.value ? (d.value = !1, D.value = "Activate", G()) : (d.value = !0, D.value = "Deactivate", G());
128
- }, rt = () => {
129
121
  E.push({ name: "DataProviderInterface-UserCatalogues" });
130
122
  };
131
- return (s, t) => (a(), v("div", gt, [
123
+ return (s, t) => (a(), v("div", ft, [
132
124
  l("div", null, [
133
125
  l("div", null, [
134
126
  l("div", bt, [
@@ -137,14 +129,14 @@ const gt = { class: "container mb-3" }, bt = { class: "debug" }, yt = { key: 0 }
137
129
  t[14] || (t[14] = l("br", null, null, -1)),
138
130
  t[15] || (t[15] = l("br", null, null, -1)),
139
131
  t[16] || (t[16] = e()),
140
- l("textarea", null, " " + i(z.value) + " ", 1),
132
+ l("textarea", null, " " + i(B.value) + " ", 1),
141
133
  t[17] || (t[17] = e()),
142
134
  t[18] || (t[18] = l("hr", null, null, -1)),
143
135
  e(" " + i(w.value) + " ", 1),
144
136
  t[19] || (t[19] = l("br", null, null, -1)),
145
137
  t[20] || (t[20] = e(" --- ")),
146
138
  t[21] || (t[21] = l("br", null, null, -1)),
147
- e(" " + i(n(g)) + " ", 1),
139
+ e(" " + i(n(b)) + " ", 1),
148
140
  t[22] || (t[22] = l("br", null, null, -1)),
149
141
  t[23] || (t[23] = e("---")),
150
142
  t[24] || (t[24] = l("br", null, null, -1)),
@@ -164,7 +156,7 @@ const gt = { class: "container mb-3" }, bt = { class: "debug" }, yt = { key: 0 }
164
156
  unit: ` + i(n(S)) + " ", 1),
165
157
  t[33] || (t[33] = l("br", null, null, -1)),
166
158
  e(`
167
- value: ` + i(n(b)) + " ", 1),
159
+ value: ` + i(n(g)) + " ", 1),
168
160
  t[34] || (t[34] = l("br", null, null, -1)),
169
161
  t[35] || (t[35] = e("---")),
170
162
  t[36] || (t[36] = l("br", null, null, -1)),
@@ -186,9 +178,9 @@ const gt = { class: "container mb-3" }, bt = { class: "debug" }, yt = { key: 0 }
186
178
  t[40] || (t[40] = l("b", null, "MQA Rating Checks ", -1)),
187
179
  t[41] || (t[41] = e("are currently ")),
188
180
  l("b", null, [
189
- n(d) ? A("", !0) : (a(), v("span", yt, "deactivated")),
181
+ n(d) ? M("", !0) : (a(), v("span", gt, "deactivated")),
190
182
  t[38] || (t[38] = e()),
191
- n(d) ? (a(), v("span", kt, "activated")) : A("", !0)
183
+ n(d) ? (a(), v("span", yt, "activated")) : M("", !0)
192
184
  ]),
193
185
  t[42] || (t[42] = e("."))
194
186
  ])
@@ -197,90 +189,90 @@ const gt = { class: "container mb-3" }, bt = { class: "debug" }, yt = { key: 0 }
197
189
  l("button", {
198
190
  type: "button",
199
191
  class: k({ "btn btn-primary mb-5": !n(d), "btn btn-secondary": n(d) }),
200
- onClick: t[0] || (t[0] = (o) => it())
192
+ onClick: t[0] || (t[0] = (o) => ut())
201
193
  }, i(n(D)), 3)
202
194
  ]),
203
195
  t[87] || (t[87] = e()),
204
- n(d) ? (a(), v("div", Ct, [
205
- l("div", wt, [
196
+ n(d) ? (a(), v("div", kt, [
197
+ l("div", Ct, [
206
198
  t[55] || (t[55] = l("h3", null, "Recipients Mail", -1)),
207
199
  t[56] || (t[56] = e()),
208
200
  t[57] || (t[57] = l("span", null, "Add and edit mail addresses for recieving the MQA report", -1)),
209
201
  t[58] || (t[58] = e()),
210
- n(g).length != 0 ? (a(), v("table", {
202
+ n(b).length != 0 ? (a(), v("table", {
211
203
  key: 0,
212
204
  class: "mt-4",
213
205
  ref_key: "mailButtonWrap",
214
- ref: h
206
+ ref: Z
215
207
  }, [
216
208
  t[52] || (t[52] = l("tr", null, [
217
209
  l("th", null, "Mail")
218
210
  ], -1)),
219
211
  t[53] || (t[53] = e()),
220
- (a(!0), v(J, null, K(n(g), (o, r) => (a(), v("tr", {
212
+ (a(!0), v(K, null, G(n(b), (o, r) => (a(), v("tr", {
221
213
  class: "mailItems",
222
214
  key: r
223
215
  }, [
224
216
  l("td", null, [
225
- n($) ? A("", !0) : (a(), v("span", At, i(o), 1)),
217
+ n(I) ? M("", !0) : (a(), v("span", wt, i(o), 1)),
226
218
  t[49] || (t[49] = e()),
227
- n($) ? B((a(), v("input", {
219
+ n(I) ? N((a(), v("input", {
228
220
  key: 1,
229
221
  type: "text",
230
- "onUpdate:modelValue": (V) => n(g)[r] = V,
231
- class: k(["mail-input", { invalidNewMail: n(I)[r] }]),
232
- onInput: (V) => n(I)[r] = ""
233
- }, null, 42, St)), [
234
- [N, n(g)[r]]
235
- ]) : A("", !0),
222
+ "onUpdate:modelValue": (V) => n(b)[r] = V,
223
+ class: k(["mail-input", { invalidNewMail: n(A)[r] }]),
224
+ onInput: (V) => n(A)[r] = ""
225
+ }, null, 42, Mt)), [
226
+ [W, n(b)[r]]
227
+ ]) : M("", !0),
236
228
  t[50] || (t[50] = e()),
237
229
  l("div", null, [
238
230
  l("button", {
239
231
  type: "button",
240
232
  class: "btn btn-simple",
241
- onClick: (V) => n($) ? st(r) : nt()
242
- }, i(n($) ? "Save" : "Edit"), 9, Mt),
233
+ onClick: (V) => n(I) ? nt(r) : et()
234
+ }, i(n(I) ? "Save" : "Edit"), 9, St),
243
235
  t[48] || (t[48] = e()),
244
236
  l("button", {
245
237
  type: "button",
246
238
  class: "btn btn-simple",
247
- onClick: (V) => ot(r)
239
+ onClick: (V) => st(r)
248
240
  }, "Delete", 8, $t)
249
241
  ])
250
242
  ]),
251
243
  t[51] || (t[51] = e()),
252
- n(I)[r] ? (a(), v("span", It, i(n(I)[r]), 1)) : A("", !0)
244
+ n(A)[r] ? (a(), v("span", It, i(n(A)[r]), 1)) : M("", !0)
253
245
  ]))), 128))
254
- ], 512)) : A("", !0),
246
+ ], 512)) : M("", !0),
255
247
  t[59] || (t[59] = e()),
256
- l("div", Dt, [
257
- B(l("input", {
248
+ l("div", At, [
249
+ N(l("input", {
258
250
  type: "text",
259
251
  "onUpdate:modelValue": t[1] || (t[1] = (o) => n(m).mail = o),
260
252
  onInput: t[2] || (t[2] = (o) => n(m).isValid = !0),
261
253
  class: k([{ invalidNewMail: !n(m).isValid }, "mail"]),
262
254
  placeholder: "Enter email address"
263
255
  }, null, 34), [
264
- [N, n(m).mail]
256
+ [W, n(m).mail]
265
257
  ]),
266
258
  t[54] || (t[54] = e()),
267
259
  l("button", {
268
260
  type: "button",
269
261
  class: "btn btn-simple mx-3",
270
- onClick: t[3] || (t[3] = (o) => ut())
262
+ onClick: t[3] || (t[3] = (o) => ot())
271
263
  }, "+ Add Mail")
272
264
  ]),
273
265
  t[60] || (t[60] = e()),
274
- n(m).isValid ? A("", !0) : (a(), v("span", Vt, "*Invalid email format"))
266
+ n(m).isValid ? M("", !0) : (a(), v("span", Dt, "*Invalid email format"))
275
267
  ]),
276
268
  t[84] || (t[84] = e()),
277
- l("div", Ut, [
269
+ l("div", Vt, [
278
270
  t[70] || (t[70] = l("h3", null, "Frequency of Rating Checks", -1)),
279
271
  t[71] || (t[71] = e()),
280
272
  t[72] || (t[72] = l("span", null, "Configure the frequency of the MQA rating checks.", -1)),
281
273
  t[73] || (t[73] = e()),
282
- l("div", qt, [
283
- l("div", Bt, [
274
+ l("div", Bt, [
275
+ l("div", Ut, [
284
276
  l("button", {
285
277
  type: "button",
286
278
  class: k(["btn btn-simple", { activeChoiceButton: n(f) }]),
@@ -290,38 +282,38 @@ const gt = { class: "container mb-3" }, bt = { class: "debug" }, yt = { key: 0 }
290
282
  l("div", {
291
283
  class: k(["weekdays", { blur: !n(f) }])
292
284
  }, [
293
- (a(!0), v(J, null, K(n(c), (o, r) => (a(), v("span", { key: r }, [
285
+ (a(!0), v(K, null, G(n(h), (o, r) => (a(), v("span", { key: r }, [
294
286
  l("button", {
295
287
  disabled: !n(f),
296
- class: k(["dayButtons", { activeItem: n(M) === r }]),
297
- onClick: (V) => Q(r)
298
- }, i(o), 11, Nt)
288
+ class: k(["dayButtons", { activeItem: n($) === r }]),
289
+ onClick: (V) => L(r)
290
+ }, i(o), 11, qt)
299
291
  ]))), 128))
300
292
  ], 2)
301
293
  ]),
302
294
  t[69] || (t[69] = e()),
303
- l("div", Tt, [
295
+ l("div", Nt, [
304
296
  l("button", {
305
297
  type: "button",
306
298
  class: k([{ activeChoiceButton: n(y) }, "btn btn-simple"]),
307
- onClick: t[5] || (t[5] = (o) => tt())
299
+ onClick: t[5] || (t[5] = (o) => c())
308
300
  }, "Monthly", 2),
309
301
  t[68] || (t[68] = e()),
310
302
  l("div", {
311
303
  class: k(["d-flex daypicker my-3", { blur: !n(y) }])
312
304
  }, [
313
- B(l("input", {
314
- "onUpdate:modelValue": t[6] || (t[6] = (o) => X(p) ? p.value = o : p = o),
315
- onInput: t[7] || (t[7] = (o) => Q(s.index)),
316
- class: k({ dynamicWidth: n(W) }),
305
+ N(l("input", {
306
+ "onUpdate:modelValue": t[6] || (t[6] = (o) => H(p) ? p.value = o : p = o),
307
+ onInput: t[7] || (t[7] = (o) => L(s.index)),
308
+ class: k({ dynamicWidth: n(R) }),
317
309
  disabled: !n(y)
318
- }, null, 42, Et), [
319
- [N, n(p)]
310
+ }, null, 42, Wt), [
311
+ [W, n(p)]
320
312
  ]),
321
313
  t[65] || (t[65] = e()),
322
- l("div", Wt, [
314
+ l("div", xt, [
323
315
  l("button", {
324
- onClick: t[8] || (t[8] = (o) => H("up")),
316
+ onClick: t[8] || (t[8] = (o) => O("up")),
325
317
  class: "caretButtons ml-1"
326
318
  }, t[62] || (t[62] = [
327
319
  l("svg", {
@@ -337,7 +329,7 @@ const gt = { class: "container mb-3" }, bt = { class: "debug" }, yt = { key: 0 }
337
329
  ])),
338
330
  t[64] || (t[64] = e()),
339
331
  l("button", {
340
- onClick: t[9] || (t[9] = (o) => H()),
332
+ onClick: t[9] || (t[9] = (o) => O()),
341
333
  class: "caretButtons mr-1"
342
334
  }, t[63] || (t[63] = [
343
335
  l("svg", {
@@ -359,12 +351,12 @@ const gt = { class: "container mb-3" }, bt = { class: "debug" }, yt = { key: 0 }
359
351
  ])
360
352
  ]),
361
353
  t[85] || (t[85] = e()),
362
- l("div", xt, [
354
+ l("div", Et, [
363
355
  t[79] || (t[79] = l("h3", null, "Notification Treshold", -1)),
364
356
  t[80] || (t[80] = e()),
365
357
  t[81] || (t[81] = l("span", null, "Set the threshold for triggering the report.", -1)),
366
358
  t[82] || (t[82] = e()),
367
- l("div", Pt, [
359
+ l("div", Rt, [
368
360
  t[76] || (t[76] = l("div", { class: "d-flex justify-content-between" }, [
369
361
  l("span", null, [
370
362
  l("b", null, "0")
@@ -375,13 +367,13 @@ const gt = { class: "container mb-3" }, bt = { class: "debug" }, yt = { key: 0 }
375
367
  ])
376
368
  ], -1)),
377
369
  t[77] || (t[77] = e()),
378
- B(l("input", {
370
+ N(l("input", {
379
371
  type: "range",
380
- "onUpdate:modelValue": t[10] || (t[10] = (o) => X(C) ? C.value = o : C = o),
372
+ "onUpdate:modelValue": t[10] || (t[10] = (o) => H(C) ? C.value = o : C = o),
381
373
  min: "0",
382
374
  max: "400"
383
375
  }, null, 512), [
384
- [N, n(C)]
376
+ [W, n(C)]
385
377
  ]),
386
378
  t[78] || (t[78] = e()),
387
379
  l("p", null, [
@@ -392,24 +384,24 @@ const gt = { class: "container mb-3" }, bt = { class: "debug" }, yt = { key: 0 }
392
384
  ])
393
385
  ]),
394
386
  t[86] || (t[86] = e()),
395
- l("div", Ot, [
387
+ l("div", Pt, [
396
388
  l("button", {
397
389
  type: "button",
398
390
  class: "btn btn-primary",
399
- onClick: et
391
+ onClick: lt
400
392
  }, "Save"),
401
393
  t[83] || (t[83] = e()),
402
394
  l("button", {
403
395
  type: "button",
404
396
  class: "btn btn-cancel",
405
- onClick: t[11] || (t[11] = (o) => rt())
397
+ onClick: t[11] || (t[11] = (o) => it())
406
398
  }, "Cancel")
407
399
  ])
408
- ])) : A("", !0)
400
+ ])) : M("", !0)
409
401
  ]));
410
402
  }
411
- }, Jt = /* @__PURE__ */ ft(zt, [["__scopeId", "data-v-79271fe0"]]);
403
+ }, Kt = /* @__PURE__ */ mt(zt, [["__scopeId", "data-v-62c67979"]]);
412
404
  export {
413
- Jt as default
405
+ Kt as default
414
406
  };
415
407
  //# sourceMappingURL=CatalogueMQA.vue.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"CatalogueMQA.vue.mjs","sources":["../../lib/data-provider-interface/CatalogueMQA.vue"],"sourcesContent":["<template>\n <div class=\"container mb-3\">\n <div>\n <div>\n <div class=\"debug\">\n <strong> API object:</strong> <br><br>\n\n <textarea> {{ token }} </textarea>\n <hr>\n <!-- Disabled for PPE release (no backend on PPE yet)-->\n {{ notficationInfo }}\n\n <br> --- <br>\n\n {{ mailList }}\n\n <br>---<br>\n <strong>Fequency:</strong> <br>\n weekly: {{ weekly }}<br>\n monthly: {{ monthly }} <br>\n <p></p>\n unit: {{ frequencyUnit }} <br>\n value: {{ frequencyValue }}\n\n <br>---<br>\n treshold: {{ treshold }}\n\n </div>\n <h1>MQA Report Settings</h1>\n <p>Configuration for\n\n <strong>{{ catalogId }}</strong>\n <!-- <strong>Test Catalogue</strong> -->\n </p>\n <p>For this Catalogue the <b>MQA Rating Checks </b>are currently <b>\n <span v-if=\"!active\">deactivated</span>\n <span v-if=\"active\">activated</span></b>.</p>\n </div>\n\n <button type=\"button\" :class=\"{ 'btn btn-primary mb-5': !active, 'btn btn-secondary': active }\" @click=\"handleActivate()\">\n {{ activatedString }}\n </button>\n </div>\n \n <div v-if=\"active\">\n <div class=\"mqaWrapper\" >\n <h3>Recipients Mail</h3>\n <span>Add and edit mail addresses for recieving the MQA report</span>\n <table class=\"mt-4\" ref=\"mailButtonWrap\" v-if=\"mailList.length != 0\">\n <tr>\n <th>Mail</th>\n </tr>\n <tr v-for=\"(item, index) in mailList\" class=\"mailItems\" :key=\"index\">\n <td>\n <span v-if=\"!editMode\">{{ item }}</span>\n <input type=\"text\" v-model=\"mailList[index]\" class=\"mail-input\" v-if=\"editMode\"\n @input=\"editErrors[index] = ''\"\n :class=\"{ 'invalidNewMail': editErrors[index] }\" >\n \n <div>\n <button type=\"button\" class=\"btn btn-simple\"\n @click=\"editMode ? saveMail(index) : editMail(index)\">\n {{ editMode ? 'Save' : 'Edit' }}\n </button>\n <button type=\"button\" class=\"btn btn-simple\"\n @click=\"deleteMail(index)\">Delete</button>\n </div>\n </td>\n <span class=\"errormsg\" v-if=\"editErrors[index]\">{{ editErrors[index] }}</span>\n </tr>\n </table>\n <div class=\"d-flex mt-3\">\n <input type=\"text\" v-model=\"newMail.mail\" @input=\"newMail.isValid = true\"\n :class=\"{ 'invalidNewMail': !newMail.isValid }\" placeholder=\"Enter email address\"\n class=\"mail\">\n <button type=\"button\" class=\"btn btn-simple mx-3\" @click=\"addNewMail()\">+ Add Mail</button>\n </div>\n <span class=\"errormsg\" v-if=\"!newMail.isValid\">*Invalid email format</span>\n </div>\n <div class=\"mqaWrapper\">\n <h3>Frequency of Rating Checks</h3>\n <span>Configure the frequency of the MQA rating checks.</span>\n\n <div class=\"d-flex mt-3\">\n <div class=\"mr-3 my-3\">\n <button type=\"button\" class=\"btn btn-simple\" @click=\"setWeekly()\"\n :class=\"{ 'activeChoiceButton': weekly }\">Weekly</button>\n <div class=\"weekdays\" :class=\"{ 'blur': !weekly }\">\n <span v-for=\"(day, index) in week\" :key=\"index\">\n <button :disabled=\"!weekly\" class=\"dayButtons\"\n :class=\"{ 'activeItem': selectedDay === index }\" @click=\"selectDay(index)\">\n {{ day }}\n </button>\n </span>\n </div>\n </div>\n <div class=\"my-3\">\n <button type=\"button\" :class=\"{ 'activeChoiceButton': monthly }\" class=\"btn btn-simple\"\n @click=\"setMonthly()\">Monthly</button>\n <div class=\"d-flex daypicker my-3\" :class=\"{ 'blur': !monthly }\">\n <input v-model=\"daysInMonth\" @input=\"selectDay(index)\" :class=\"{ dynamicWidth: inputWidth }\"\n :disabled=\"!monthly\">\n <div class=\"caretWrap\">\n <button @click=\"editDate('up')\" class=\"caretButtons ml-1\"><svg\n xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" fill=\"currentColor\"\n class=\"bi bi-caret-up-fill\" viewBox=\"0 0 16 16\">\n <path\n d=\"m7.247 4.86-4.796 5.481c-.566.647-.106 1.659.753 1.659h9.592a1 1 0 0 0 .753-1.659l-4.796-5.48a1 1 0 0 0-1.506 0z\" />\n </svg></button>\n <button @click=\"editDate()\" class=\"caretButtons mr-1\"><svg\n xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" fill=\"currentColor\"\n class=\"bi bi-caret-down-fill\" viewBox=\"0 0 16 16\">\n <path\n d=\"M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z\" />\n </svg></button>\n </div>\n <span>day of the month</span> \n </div>\n </div>\n </div>\n </div>\n <div class=\"mqaWrapper\">\n <h3>Notification Treshold</h3>\n <span>Set the threshold for triggering the report.</span>\n <div class=\"w-50 mt-3\">\n <div class=\"d-flex justify-content-between\">\n <span><b>0</b></span>\n <span><b>400</b></span>\n </div>\n <input type=\"range\" v-model=\"treshold\" min=\"0\" max=\"400\" />\n <p>Lower than <b>{{ treshold }}</b> Points</p>\n </div>\n </div>\n <div class=\"actionWrapper\">\n <button type=\"button\" class=\"btn btn-primary\" @click=\"postNotificationSettings\">Save</button>\n <button type=\"button\" class=\"btn btn-cancel\" @click=\"back()\">Cancel</button>\n </div>\n </div>\n </div>\n\n</template>\n<script setup>\n\nimport { ref } from 'vue';\nimport { useRoute } from 'vue-router'\nimport { getCurrentInstance } from \"vue\";\nimport { useStore } from 'vuex';\nimport { useRouter } from 'vue-router';\nimport { mapActions } from 'vuex'\nimport { computed } from 'vue'\nimport { mapGetters } from 'vuex'\n\nimport axios from 'axios'\n\nconst store = useStore();\nconst router = useRouter();\nconst getUserDrafts = computed(() => store.getters['auth/getUserDrafts'])\nconst getUserData = computed(() => store.getters['auth/getUserData'])\nconst token = computed(() => getUserData.value.rtpToken)\n\n// Update the mapActions usage\nconst authActions = mapActions('auth', {\n updateUserData: 'updateUserData'\n})\n\n// Destructure the action\nconst { updateUserData } = authActions\n\nconst showSnackbar = (payload) => {\n store.dispatch('snackbar/showSnackbar', payload);\n};\n\nconst triggerSnackbar = () => {\n showSnackbar({\n message: 'Saved Successfully',\n variant: 'success',\n });\n };\n\n// Map the showSnackbar action from the snackbar module\n\nconst route = useRoute()\n\nlet monthly = ref(false)\nlet weekly = ref(false)\nlet mailButtonWrap = ref(null)\nlet activatedString = ref('Activate')\nlet inputWidth = ref(false)\nlet active = ref(false)\nlet mailList = ref()\nlet week = ['Mo', 'Tue', 'We', 'Th', 'Fr', 'Sa', 'Su']\nlet daysInMonth = ref(1)\nlet editMode = ref(false);\nlet treshold = ref(0);\nlet frequencyUnit = ref('');\nlet frequencyValue = ref('');\nlet selectedDay = ref(null);\nconst catalogId = route.params.id\nconst app = getCurrentInstance()\nconst notificationBaseUrl = app.appContext.app.config.globalProperties.$env.api.notificationBaseUrl\nconst apiKey = app.appContext.app.config.globalProperties.$env.api.apiKey\n\n\n\nconst selectDay = (index) => {\n if (weekly.value) {\n selectedDay.value = index;\n frequencyValue.value = selectedDay; // Update frequencyValue when a day is selected\n } \n};\n\nconst setWeekly = () => {\n weekly.value = true;\n monthly.value = false;\n selectedDay.value = frequencyValue.value; // Set the selected day based on frequencyValue\n};\n\nconst setMonthly = () => {\n weekly.value = false;\n monthly.value = true;\n selectedDay.value = frequencyValue.value; // Set the day of the month based on frequencyValue\n};\n\nconst notficationInfo = ref({})\n\nconst isValidEmail = (email) => {\n const regex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n return regex.test(email);\n};\n\nlet newMail = ref({ mail: '', isValid: true });\nlet editErrors = ref({});\n\n// enabeld for PPE release (dummy data)\n// mailList.value = [{ 'mail': \"mail@mail2.com\" }, { 'mail': \"mail@mail1.com\" }]\n\nconst fetchNotificationInfo = async () => {\n const config = {\n method: 'get',\n url: `${notificationBaseUrl}/catalogue/${catalogId}/setting`,\n headers: {\n Authorization: `Bearer ${token.value}`,\n },\n }\n\n try {\n const response = await axios.request(config)\n notficationInfo.value = response.data\n\n if (notficationInfo.value.activeStatus === true) {\n active.value = true\n activatedString.value = 'Deactivate'\n } if (notficationInfo.value.activeStatus === false) {\n active.value = false\n activatedString.value = 'Activate'\n }\n\n mailList.value = notficationInfo.value.receiverEmailList\n frequencyUnit.value = notficationInfo.value.frequency.unit\n frequencyValue.value = notficationInfo.value.frequency.value\n treshold.value = notficationInfo.value.threshold\n\n if (frequencyUnit.value === 'week') {\n weekly.value = true\n monthly.value = false\n selectedDay.value = frequencyValue.value; // Set the selected day based on frequencyValue\n } else if (frequencyUnit.value === 'month') {\n weekly.value = false\n monthly.value = true\n daysInMonth.value = frequencyValue.value\n }\n\n console.log('Response:', response)\n } catch (error) {\n console.log('Full error:', error)\n }\n}\n\nconst postNotificationSettings = async () => {\n\n if (weekly.value === true) {\n frequencyUnit.value = \"week\"\n frequencyValue.value = selectedDay.value\n } else if (monthly.value === true) {\n frequencyUnit.value = \"month\"\n frequencyValue.value = daysInMonth.value\n }\n\n const config = {\n method: 'post',\n url: `${notificationBaseUrl}/catalogue/${catalogId}/setting`,\n headers: {\n 'Authorization': apiKey,\n 'Accept': 'application/json',\n 'Content-Type': 'application/json',\n 'Access-Control-Allow-Origin': '*',\n 'Access-Control-Allow-Methods': 'GET, POST, OPTIONS',\n 'Access-Control-Allow-Headers': 'Authorization'\n },\n withCredentials: true,\n data: JSON.stringify({\n receiverEmailList: mailList.value,\n threshold: Number(treshold.value),\n frequency: {\n unit: frequencyUnit.value,\n value: frequencyValue.value\n },\n activeStatus: true\n })\n }\n\n try {\n const response = await axios.request(config)\n console.log('Settings updated:', response.data)\n triggerSnackbar();\n router.push({ name: 'DataProviderInterface-UserCatalogues' });\n return response.data\n \n\n } catch (error) {\n triggerSnackbar({\n message: 'Error updating settings.',\n variant: 'error',\n });\n\n console.log('Error updating settings:', error)\n \n throw error\n \n }\n \n\n}\n\nfetchNotificationInfo()\n\nconst postDeactive = async () => {\n\n const config = {\n method: 'post',\n url: `${notificationBaseUrl}/catalogue/${catalogId}/setting`,\n headers: {\n 'Authorization': apiKey,\n 'Accept': 'application/json',\n 'Content-Type': 'application/json',\n 'Access-Control-Allow-Origin': '*',\n 'Access-Control-Allow-Methods': 'GET, POST, OPTIONS',\n 'Access-Control-Allow-Headers': 'Authorization'\n },\n withCredentials: true,\n data: JSON.stringify({\n activeStatus: active.value\n })\n }\n\n try {\n const response = await axios.request(config)\n console.log('Settings updated:', response.data)\n triggerSnackbar();\n if(!active.value) {router.push({ name: 'DataProviderInterface-UserCatalogues' });}\n return response.data\n \n\n } catch (error) {\n triggerSnackbar({\n message: 'Error updating settings.',\n variant: 'error',\n });\n\n console.log('Error updating settings:', error)\n \n throw error\n \n }\n}\n\nconst editMail = () => {\n editMode.value = true\n showSnackbar({\n message: 'Email added successfully.',\n variant: 'success',\n });\n}\n\nconst saveMail = (index) => {\n const email = mailList.value[index].trim();\n if (isValidEmail(email)) {\n editMode.value = false;\n delete editErrors.value[index];\n } else {\n editErrors.value[index] = '*Invalid email format';\n }\n};\n\nconst deleteMail = (index) => {\n mailList.value.splice(index, 1);\n}\n\nconst editDate = (count) => {\n if (count === \"up\" && daysInMonth.value < 28) {\n if (daysInMonth.value > 8) {\n inputWidth.value = true\n }\n daysInMonth.value++\n }\n else if (daysInMonth.value > 1) {\n if (daysInMonth.value < 11) {\n inputWidth.value = false\n }\n daysInMonth.value--\n }\n}\n\nconst addNewMail = () => {\n if (newMail.value.mail.trim() === '') {\n newMail.value.isValid = false;\n return;\n }\n if (isValidEmail(newMail.value.mail)) {\n mailList.value.push(newMail.value.mail);\n newMail.value.mail = ''; // Clear input after successful addition\n newMail.value.isValid = true;\n } else {\n newMail.value.isValid = false;\n }\n}\nconst handleActivate = () => {\n if (!active.value) {\n active.value = true\n activatedString.value = 'Deactivate'\n postDeactive()\n } else {\n active.value = false\n activatedString.value = 'Activate'\n postDeactive()\n }\n}\n\nconst back = () => {\n router.push({ name: 'DataProviderInterface-UserCatalogues' });\n}\n\n</script>\n<style scoped>\n.debug {\n position: fixed;\n right: 20px;\n top: 20px;\n border-radius: 20px;\n width: 400px;\n z-index: 999999;\n padding: 20px;\n background: rgba(255, 255, 255, 0.2);\n border-radius: 16px;\n box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);\n backdrop-filter: blur(5px);\n -webkit-backdrop-filter: blur(5px);\n border: 1px solid rgba(255, 255, 255, 0.3);\n display: none; \n}\n\n.btn-simple {\n border-color: rgb(115, 115, 115);\n}\n\n.btn-cancel {\n border-color: transparent;\n}\n\n.mail {\n width: 270px;\n padding: 5px 5px 5px 10px;\n}\n\n\n.errormsg {\n color: red;\n font-size: 10px;\n}\n\n.activeChoiceButton {\n background-color: var(--primary);\n color: white;\n border-color: var(--primary);\n\n &:active {\n background-color: #3E6CD5 !important;\n }\n\n &:focus {\n outline: none;\n background-color: #3E6CD5;\n }\n\n &:focus-visible {\n outline: none;\n background-color: #3E6CD5;\n }\n}\n\n\n.invalid {\n border-bottom: 1px solid red !important;\n}\n\n.blur {\n opacity: 0.3;\n}\n\n.invalidNewMail {\n\n border-radius: 2px;\n border: 2px solid rgba(255, 0, 0, 0.336);\n\n &:focus {\n border-radius: 2px;\n box-shadow: 0 0 0 0.1rem rgba(255, 0, 0, 0.774);\n border: 1px solid rgba(255, 0, 0, 0.336);\n }\n\n &:focus-visible {\n outline: 0;\n border-radius: 2px;\n box-shadow: 0 0 0 0.1rem rgba(255, 0, 0, 0.774);\n border: 1px solid rgba(255, 0, 0, 0.336);\n }\n}\n\n.editable {\n transition: all 200ms ease-in-out;\n padding-left: 0.5rem;\n border-bottom: 2px solid var(--primary) !important;\n}\n\n.invalid {\n border-bottom: 1px solid red !important;\n}\n\n.caretButtons {\n all: unset;\n cursor: pointer;\n}\n\n.caretWrap {\n display: contents;\n\n}\n\n.actionWrapper {\n display: flex;\n flex-direction: row-reverse;\n margin-bottom: 100px;\n\n button {\n margin-left: 1rem;\n }\n}\n\ninput[type=\"range\"] {\n width: 100%;\n}\n\n.mqaWrapper {\n margin: 3rem 0;\n}\n\ntable {\n margin-top: 1rem;\n min-width: 50%;\n}\n\nth {\n border-bottom: 1px solid lightgray;\n}\n\ntd {\n display: flex;\n justify-content: space-between;\n padding: 15px 0 0 0cap;\n}\n\n.daypicker {\n padding: 1rem;\n border: 1px solid lightgray;\n border-radius: 15px;\n\n input {\n width: 25px;\n border: none;\n background-color: unset;\n font-weight: 700;\n }\n\n}\n\n.dynamicWidth {\n width: 22px !important;\n}\n\n.activeItem {\n background-color: var(--primary);\n color: white;\n}\n\n.weekdays {\n border: 1px solid lightgray;\n border-radius: 15px;\n margin: 1rem 0;\n overflow: hidden;\n\n .dayButtons {\n border: none;\n display: inline-block;\n text-align: center;\n flex-direction: row;\n min-width: 60px;\n padding: 1rem;\n border-right: 1px solid lightgray;\n cursor: pointer;\n\n &:focus-visible {\n outline: unset;\n background-color: #3E6CD5;\n color: white;\n }\n\n &:hover {\n background-color: #3E6CD5;\n color: white;\n }\n }\n\n span:last-child button {\n border: none;\n }\n}\n\n.mqaWrapper {\n padding: 1rem;\n background-color: #f3f6fc;\n border-radius: 3px;\n}\n\nbutton {\n background-color: unset;\n border: 1px solid var(--primary);\n color: black;\n\n &:hover {\n background-color: #3E6CD5;\n color: white;\n border: 1px solid #3E6CD5;\n }\n}\n\n.btn-primary {\n background-color: var(--primary);\n color: white;\n\n}\n\n.btn-secondary {\n color: #0e47cb;\n}\n\nbutton,\nspan {\n transition: all 100ms ease-in-out;\n}\n</style>"],"names":["store","useStore","router","useRouter","computed","getUserData","token","mapActions","showSnackbar","payload","triggerSnackbar","route","useRoute","monthly","ref","weekly","mailButtonWrap","activatedString","inputWidth","active","mailList","week","daysInMonth","editMode","treshold","frequencyUnit","frequencyValue","selectedDay","catalogId","app","getCurrentInstance","notificationBaseUrl","apiKey","selectDay","index","setWeekly","setMonthly","notficationInfo","isValidEmail","email","newMail","editErrors","fetchNotificationInfo","config","response","axios","error","postNotificationSettings","postDeactive","editMail","saveMail","deleteMail","editDate","count","addNewMail","handleActivate","back"],"mappings":";;;;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AM,UAAU,MAExBA,EAAQ,MAAM,UAAU;AAAA,IAEhC,GACMe,KAAiB,MAAM;AACzB,MAAKpC,EAAO,SAKRA,EAAO,QAAQ,IACfF,EAAgB,QAAQ,YACxB+B,EAAa,MANb7B,EAAO,QAAQ,IACfF,EAAgB,QAAQ,cACxB+B,EAAa;AAAA,IAMrB,GAEMQ,KAAO,MAAM;AACf,MAAAtD,EAAO,KAAK,EAAE,MAAM,uCAAwC,CAAA;AAAA,IAChE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"CatalogueMQA.vue.mjs","sources":["../../lib/data-provider-interface/CatalogueMQA.vue"],"sourcesContent":["<template>\n <div class=\"container mb-3\">\n <div>\n <div>\n <div class=\"debug\">\n <strong> API object:</strong> <br><br>\n\n <textarea> {{ token }} </textarea>\n <hr>\n <!-- Disabled for PPE release (no backend on PPE yet)-->\n {{ notficationInfo }}\n\n <br> --- <br>\n\n {{ mailList }}\n\n <br>---<br>\n <strong>Fequency:</strong> <br>\n weekly: {{ weekly }}<br>\n monthly: {{ monthly }} <br>\n <p></p>\n unit: {{ frequencyUnit }} <br>\n value: {{ frequencyValue }}\n\n <br>---<br>\n treshold: {{ treshold }}\n\n </div>\n <h1>MQA Report Settings</h1>\n <p>Configuration for\n\n <strong>{{ catalogId }}</strong>\n <!-- <strong>Test Catalogue</strong> -->\n </p>\n <p>For this Catalogue the <b>MQA Rating Checks </b>are currently <b>\n <span v-if=\"!active\">deactivated</span>\n <span v-if=\"active\">activated</span></b>.</p>\n </div>\n\n <button type=\"button\" :class=\"{ 'btn btn-primary mb-5': !active, 'btn btn-secondary': active }\" @click=\"handleActivate()\">\n {{ activatedString }}\n </button>\n </div>\n \n <div v-if=\"active\">\n <div class=\"mqaWrapper\" >\n <h3>Recipients Mail</h3>\n <span>Add and edit mail addresses for recieving the MQA report</span>\n <table class=\"mt-4\" ref=\"mailButtonWrap\" v-if=\"mailList.length != 0\">\n <tr>\n <th>Mail</th>\n </tr>\n <tr v-for=\"(item, index) in mailList\" class=\"mailItems\" :key=\"index\">\n <td>\n <span v-if=\"!editMode\">{{ item }}</span>\n <input type=\"text\" v-model=\"mailList[index]\" class=\"mail-input\" v-if=\"editMode\"\n @input=\"editErrors[index] = ''\"\n :class=\"{ 'invalidNewMail': editErrors[index] }\" >\n \n <div>\n <button type=\"button\" class=\"btn btn-simple\"\n @click=\"editMode ? saveMail(index) : editMail(index)\">\n {{ editMode ? 'Save' : 'Edit' }}\n </button>\n <button type=\"button\" class=\"btn btn-simple\"\n @click=\"deleteMail(index)\">Delete</button>\n </div>\n </td>\n <span class=\"errormsg\" v-if=\"editErrors[index]\">{{ editErrors[index] }}</span>\n </tr>\n </table>\n <div class=\"d-flex mt-3\">\n <input type=\"text\" v-model=\"newMail.mail\" @input=\"newMail.isValid = true\"\n :class=\"{ 'invalidNewMail': !newMail.isValid }\" placeholder=\"Enter email address\"\n class=\"mail\">\n <button type=\"button\" class=\"btn btn-simple mx-3\" @click=\"addNewMail()\">+ Add Mail</button>\n </div>\n <span class=\"errormsg\" v-if=\"!newMail.isValid\">*Invalid email format</span>\n </div>\n <div class=\"mqaWrapper\">\n <h3>Frequency of Rating Checks</h3>\n <span>Configure the frequency of the MQA rating checks.</span>\n\n <div class=\"d-flex mt-3\">\n <div class=\"mr-3 my-3\">\n <button type=\"button\" class=\"btn btn-simple\" @click=\"setWeekly()\"\n :class=\"{ 'activeChoiceButton': weekly }\">Weekly</button>\n <div class=\"weekdays\" :class=\"{ 'blur': !weekly }\">\n <span v-for=\"(day, index) in week\" :key=\"index\">\n <button :disabled=\"!weekly\" class=\"dayButtons\"\n :class=\"{ 'activeItem': selectedDay === index }\" @click=\"selectDay(index)\">\n {{ day }}\n </button>\n </span>\n </div>\n </div>\n <div class=\"my-3\">\n <button type=\"button\" :class=\"{ 'activeChoiceButton': monthly }\" class=\"btn btn-simple\"\n @click=\"setMonthly()\">Monthly</button>\n <div class=\"d-flex daypicker my-3\" :class=\"{ 'blur': !monthly }\">\n <input v-model=\"daysInMonth\" @input=\"selectDay(index)\" :class=\"{ dynamicWidth: inputWidth }\"\n :disabled=\"!monthly\">\n <div class=\"caretWrap\">\n <button @click=\"editDate('up')\" class=\"caretButtons ml-1\"><svg\n xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" fill=\"currentColor\"\n class=\"bi bi-caret-up-fill\" viewBox=\"0 0 16 16\">\n <path\n d=\"m7.247 4.86-4.796 5.481c-.566.647-.106 1.659.753 1.659h9.592a1 1 0 0 0 .753-1.659l-4.796-5.48a1 1 0 0 0-1.506 0z\" />\n </svg></button>\n <button @click=\"editDate()\" class=\"caretButtons mr-1\"><svg\n xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" fill=\"currentColor\"\n class=\"bi bi-caret-down-fill\" viewBox=\"0 0 16 16\">\n <path\n d=\"M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z\" />\n </svg></button>\n </div>\n <span>day of the month</span> \n </div>\n </div>\n </div>\n </div>\n <div class=\"mqaWrapper\">\n <h3>Notification Treshold</h3>\n <span>Set the threshold for triggering the report.</span>\n <div class=\"w-50 mt-3\">\n <div class=\"d-flex justify-content-between\">\n <span><b>0</b></span>\n <span><b>400</b></span>\n </div>\n <input type=\"range\" v-model=\"treshold\" min=\"0\" max=\"400\" />\n <p>Lower than <b>{{ treshold }}</b> Points</p>\n </div>\n </div>\n <div class=\"actionWrapper\">\n <button type=\"button\" class=\"btn btn-primary\" @click=\"postNotificationSettings\">Save</button>\n <button type=\"button\" class=\"btn btn-cancel\" @click=\"back()\">Cancel</button>\n </div>\n </div>\n </div>\n\n</template>\n<script setup>\n\nimport { ref } from 'vue';\nimport { useRoute } from 'vue-router'\nimport { getCurrentInstance } from \"vue\";\nimport { useStore } from 'vuex';\nimport { useRouter } from 'vue-router';\nimport { mapActions } from 'vuex'\nimport { computed } from 'vue'\nimport { mapGetters } from 'vuex'\n\nimport axios from 'axios'\n\nconst store = useStore();\nconst router = useRouter();\nconst getUserDrafts = computed(() => store.getters['auth/getUserDrafts'])\nconst getUserData = computed(() => store.getters['auth/getUserData'])\nconst token = computed(() => getUserData.value.rtpToken)\n\n// Update the mapActions usage\nconst authActions = mapActions('auth', {\n updateUserData: 'updateUserData'\n})\n\n// Destructure the action\nconst { updateUserData } = authActions\n\nconst showSnackbar = (payload) => {\n store.dispatch('snackbar/showSnackbar', payload);\n};\n\nconst triggerSnackbar = () => {\n showSnackbar({\n message: 'Saved Successfully',\n variant: 'success',\n });\n };\n\n// Map the showSnackbar action from the snackbar module\n\nconst route = useRoute()\n\nlet monthly = ref(false)\nlet weekly = ref(false)\nlet mailButtonWrap = ref(null)\nlet activatedString = ref('Activate')\nlet inputWidth = ref(false)\nlet active = ref(false)\nlet mailList = ref()\nlet week = ['Mo', 'Tue', 'We', 'Th', 'Fr', 'Sa', 'Su']\nlet daysInMonth = ref(1)\nlet editMode = ref(false);\nlet treshold = ref(0);\nlet frequencyUnit = ref('');\nlet frequencyValue = ref('');\nlet selectedDay = ref(null);\nconst catalogId = route.params.id\nconst app = getCurrentInstance()\nconst notificationBaseUrl = app.appContext.app.config.globalProperties.$env.api.notificationBaseUrl\nconst apiKey = app.appContext.app.config.globalProperties.$env.api.apiKey\n\n\n\nconst selectDay = (index) => {\n if (weekly.value) {\n selectedDay.value = index;\n frequencyValue.value = selectedDay; // Update frequencyValue when a day is selected\n } \n};\n\nconst setWeekly = () => {\n weekly.value = true;\n monthly.value = false;\n selectedDay.value = frequencyValue.value; // Set the selected day based on frequencyValue\n};\n\nconst setMonthly = () => {\n weekly.value = false;\n monthly.value = true;\n selectedDay.value = frequencyValue.value; // Set the day of the month based on frequencyValue\n};\n\nconst notficationInfo = ref({})\n\nconst isValidEmail = (email) => {\n const regex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n return regex.test(email);\n};\n\nlet newMail = ref({ mail: '', isValid: true });\nlet editErrors = ref({});\n\n// enabeld for PPE release (dummy data)\n// mailList.value = [{ 'mail': \"mail@mail2.com\" }, { 'mail': \"mail@mail1.com\" }]\n\nconst fetchNotificationInfo = async () => {\n const config = {\n method: 'get',\n url: `${notificationBaseUrl}/catalogue/${catalogId}/setting`,\n headers: {\n Authorization: `Bearer ${token.value}`,\n },\n }\n\n try {\n const response = await axios.request(config)\n notficationInfo.value = response.data\n\n if (notficationInfo.value.activeStatus === true) {\n active.value = true\n activatedString.value = 'Deactivate'\n } if (notficationInfo.value.activeStatus === false) {\n active.value = false\n activatedString.value = 'Activate'\n }\n\n mailList.value = notficationInfo.value.receiverEmailList\n frequencyUnit.value = notficationInfo.value.frequency.unit\n frequencyValue.value = notficationInfo.value.frequency.value\n treshold.value = notficationInfo.value.threshold\n\n if (frequencyUnit.value === 'week') {\n weekly.value = true\n monthly.value = false\n selectedDay.value = frequencyValue.value; // Set the selected day based on frequencyValue\n } else if (frequencyUnit.value === 'month') {\n weekly.value = false\n monthly.value = true\n daysInMonth.value = frequencyValue.value\n }\n\n console.log('Response:', response)\n } catch (error) {\n console.log('Full error:', error)\n }\n}\n\nconst postNotificationSettings = async () => {\n\n if (weekly.value === true) {\n frequencyUnit.value = \"week\"\n frequencyValue.value = selectedDay.value\n } else if (monthly.value === true) {\n frequencyUnit.value = \"month\"\n frequencyValue.value = daysInMonth.value\n }\n\n const config = {\n method: 'post',\n url: `${notificationBaseUrl}/catalogue/${catalogId}/setting`,\n headers: {\n Authorization: `Bearer ${token.value}`,\n },\n withCredentials: true,\n data: JSON.stringify({\n receiverEmailList: mailList.value,\n threshold: Number(treshold.value),\n frequency: {\n unit: frequencyUnit.value,\n value: frequencyValue.value\n },\n activeStatus: true\n })\n }\n\n try {\n const response = await axios.request(config)\n console.log('Settings updated:', response.data)\n triggerSnackbar();\n router.push({ name: 'DataProviderInterface-UserCatalogues' });\n return response.data\n \n\n } catch (error) {\n triggerSnackbar({\n message: 'Error updating settings.',\n variant: 'error',\n });\n\n console.log('Error updating settings:', error)\n \n throw error\n \n }\n \n\n}\n\nfetchNotificationInfo()\n\nconst postDeactive = async () => {\n\n const config = {\n method: 'post',\n url: `${notificationBaseUrl}/catalogue/${catalogId}/setting`,\n headers: {\n Authorization: `Bearer ${token.value}`,\n },\n withCredentials: true,\n data: JSON.stringify({\n activeStatus: active.value\n })\n }\n\n try {\n const response = await axios.request(config)\n console.log('Settings updated:', response.data)\n triggerSnackbar();\n if(!active.value) {router.push({ name: 'DataProviderInterface-UserCatalogues' });}\n return response.data\n \n\n } catch (error) {\n triggerSnackbar({\n message: 'Error updating settings.',\n variant: 'error',\n });\n\n console.log('Error updating settings:', error)\n \n throw error\n \n }\n}\n\nconst editMail = () => {\n editMode.value = true\n showSnackbar({\n message: 'Email added successfully.',\n variant: 'success',\n });\n}\n\nconst saveMail = (index) => {\n const email = mailList.value[index].trim();\n if (isValidEmail(email)) {\n editMode.value = false;\n delete editErrors.value[index];\n } else {\n editErrors.value[index] = '*Invalid email format';\n }\n};\n\nconst deleteMail = (index) => {\n mailList.value.splice(index, 1);\n}\n\nconst editDate = (count) => {\n if (count === \"up\" && daysInMonth.value < 28) {\n if (daysInMonth.value > 8) {\n inputWidth.value = true\n }\n daysInMonth.value++\n }\n else if (daysInMonth.value > 1) {\n if (daysInMonth.value < 11) {\n inputWidth.value = false\n }\n daysInMonth.value--\n }\n}\n\nconst addNewMail = () => {\n if (newMail.value.mail.trim() === '') {\n newMail.value.isValid = false;\n return;\n }\n if (isValidEmail(newMail.value.mail)) {\n mailList.value.push(newMail.value.mail);\n newMail.value.mail = ''; // Clear input after successful addition\n newMail.value.isValid = true;\n } else {\n newMail.value.isValid = false;\n }\n}\nconst handleActivate = () => {\n if (!active.value) {\n active.value = true\n activatedString.value = 'Deactivate'\n postDeactive()\n } else {\n active.value = false\n activatedString.value = 'Activate'\n postDeactive()\n }\n}\n\nconst back = () => {\n router.push({ name: 'DataProviderInterface-UserCatalogues' });\n}\n\n</script>\n<style scoped>\n.debug {\n position: fixed;\n right: 20px;\n top: 20px;\n border-radius: 20px;\n width: 400px;\n z-index: 999999;\n padding: 20px;\n background: rgba(255, 255, 255, 0.2);\n border-radius: 16px;\n box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);\n backdrop-filter: blur(5px);\n -webkit-backdrop-filter: blur(5px);\n border: 1px solid rgba(255, 255, 255, 0.3);\n display: none; \n}\n\n.btn-simple {\n border-color: rgb(115, 115, 115);\n}\n\n.btn-cancel {\n border-color: transparent;\n}\n\n.mail {\n width: 270px;\n padding: 5px 5px 5px 10px;\n}\n\n\n.errormsg {\n color: red;\n font-size: 10px;\n}\n\n.activeChoiceButton {\n background-color: var(--primary);\n color: white;\n border-color: var(--primary);\n\n &:active {\n background-color: #3E6CD5 !important;\n }\n\n &:focus {\n outline: none;\n background-color: #3E6CD5;\n }\n\n &:focus-visible {\n outline: none;\n background-color: #3E6CD5;\n }\n}\n\n\n.invalid {\n border-bottom: 1px solid red !important;\n}\n\n.blur {\n opacity: 0.3;\n}\n\n.invalidNewMail {\n\n border-radius: 2px;\n border: 2px solid rgba(255, 0, 0, 0.336);\n\n &:focus {\n border-radius: 2px;\n box-shadow: 0 0 0 0.1rem rgba(255, 0, 0, 0.774);\n border: 1px solid rgba(255, 0, 0, 0.336);\n }\n\n &:focus-visible {\n outline: 0;\n border-radius: 2px;\n box-shadow: 0 0 0 0.1rem rgba(255, 0, 0, 0.774);\n border: 1px solid rgba(255, 0, 0, 0.336);\n }\n}\n\n.editable {\n transition: all 200ms ease-in-out;\n padding-left: 0.5rem;\n border-bottom: 2px solid var(--primary) !important;\n}\n\n.invalid {\n border-bottom: 1px solid red !important;\n}\n\n.caretButtons {\n all: unset;\n cursor: pointer;\n}\n\n.caretWrap {\n display: contents;\n\n}\n\n.actionWrapper {\n display: flex;\n flex-direction: row-reverse;\n margin-bottom: 100px;\n\n button {\n margin-left: 1rem;\n }\n}\n\ninput[type=\"range\"] {\n width: 100%;\n}\n\n.mqaWrapper {\n margin: 3rem 0;\n}\n\ntable {\n margin-top: 1rem;\n min-width: 50%;\n}\n\nth {\n border-bottom: 1px solid lightgray;\n}\n\ntd {\n display: flex;\n justify-content: space-between;\n padding: 15px 0 0 0cap;\n}\n\n.daypicker {\n padding: 1rem;\n border: 1px solid lightgray;\n border-radius: 15px;\n\n input {\n width: 25px;\n border: none;\n background-color: unset;\n font-weight: 700;\n }\n\n}\n\n.dynamicWidth {\n width: 22px !important;\n}\n\n.activeItem {\n background-color: var(--primary);\n color: white;\n}\n\n.weekdays {\n border: 1px solid lightgray;\n border-radius: 15px;\n margin: 1rem 0;\n overflow: hidden;\n\n .dayButtons {\n border: none;\n display: inline-block;\n text-align: center;\n flex-direction: row;\n min-width: 60px;\n padding: 1rem;\n border-right: 1px solid lightgray;\n cursor: pointer;\n\n &:focus-visible {\n outline: unset;\n background-color: #3E6CD5;\n color: white;\n }\n\n &:hover {\n background-color: #3E6CD5;\n color: white;\n }\n }\n\n span:last-child button {\n border: none;\n }\n}\n\n.mqaWrapper {\n padding: 1rem;\n background-color: #f3f6fc;\n border-radius: 3px;\n}\n\nbutton {\n background-color: unset;\n border: 1px solid var(--primary);\n color: black;\n\n &:hover {\n background-color: #3E6CD5;\n color: white;\n border: 1px solid #3E6CD5;\n }\n}\n\n.btn-primary {\n background-color: var(--primary);\n color: white;\n\n}\n\n.btn-secondary {\n color: #0e47cb;\n}\n\nbutton,\nspan {\n transition: all 100ms ease-in-out;\n}\n</style>"],"names":["store","useStore","router","useRouter","computed","getUserData","token","mapActions","showSnackbar","payload","triggerSnackbar","route","useRoute","monthly","ref","weekly","mailButtonWrap","activatedString","inputWidth","active","mailList","week","daysInMonth","editMode","treshold","frequencyUnit","frequencyValue","selectedDay","catalogId","app","getCurrentInstance","notificationBaseUrl","selectDay","index","setWeekly","setMonthly","notficationInfo","isValidEmail","email","newMail","editErrors","fetchNotificationInfo","config","response","axios","error","postNotificationSettings","postDeactive","editMail","saveMail","deleteMail","editDate","count","addNewMail","handleActivate","back"],"mappings":";;;;;;;;;;;;;;;AA0JA,UAAMA,IAAQC,GAAQ,GAChBC,IAASC,GAAS;AACF,IAAAC,EAAS,MAAMJ,EAAM,QAAQ,oBAAoB,CAAC;AACxE,UAAMK,IAAcD,EAAS,MAAMJ,EAAM,QAAQ,kBAAkB,CAAC,GAC9DM,IAAQF,EAAS,MAAMC,EAAY,MAAM,QAAQ;AAGnC,IAAAE,GAAW,QAAQ;AAAA,MACrC,gBAAgB;AAAA,IAClB,CAAC;UAKKC,IAAe,CAACC,MAAY;AAChC,MAAAT,EAAM,SAAS,yBAAyBS,CAAO;AAAA,IACjD,GAEMC,IAAkB,MAAM;AAClB,MAAAF,EAAa;AAAA,QACT,SAAS;AAAA,QACT,SAAS;AAAA,MACzB,CAAa;AAAA,IACb,GAIMG,IAAQC,GAAS;AAEvB,QAAIC,IAAUC,EAAI,EAAK,GACnBC,IAASD,EAAI,EAAK,GAClBE,IAAiBF,EAAI,IAAI,GACzBG,IAAkBH,EAAI,UAAU,GAChCI,IAAaJ,EAAI,EAAK,GACtBK,IAASL,EAAI,EAAK,GAClBM,IAAWN,EAAI,GACfO,IAAO,CAAC,MAAM,OAAO,MAAM,MAAM,MAAM,MAAM,IAAI,GACjDC,IAAcR,EAAI,CAAC,GACnBS,IAAWT,EAAI,EAAK,GACpBU,IAAWV,EAAI,CAAC,GAChBW,IAAgBX,EAAI,EAAE,GACtBY,IAAiBZ,EAAI,EAAE,GACvBa,IAAcb,EAAI,IAAI;A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AAM,UAAU;AACxB;AAAA,MACJ;AACA,MAAIF,EAAaE,EAAQ,MAAM,IAAI,KAC/BnB,EAAS,MAAM,KAAKmB,EAAQ,MAAM,IAAI,GACtCA,EAAQ,MAAM,OAAO,IACrBA,EAAQ,MAAM,UAAU,MAExBA,EAAQ,MAAM,UAAU;AAAA,IAEhC,GACMe,KAAiB,MAAM;AACzB,MAAKnC,EAAO,SAKRA,EAAO,QAAQ,IACfF,EAAgB,QAAQ,YACxB8B,EAAa,MANb5B,EAAO,QAAQ,IACfF,EAAgB,QAAQ,cACxB8B,EAAa;AAAA,IAMrB,GAEMQ,KAAO,MAAM;AACf,MAAArD,EAAO,KAAK,EAAE,MAAM,uCAAwC,CAAA;AAAA,IAChE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1354,7 +1354,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
1354
1354
  goToNextStep?: any;
1355
1355
  goToPreviousStep?: any;
1356
1356
  }, {
1357
- scrollToTop: () => void;
1357
+ dpiContext: import('./composables/useDpiContext').ComputedDpiContext;
1358
1358
  }, {
1359
1359
  instance: {
1360
1360
  metadata: {