@enso-ui/monitored-emails 1.0.1 → 1.1.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.
package/package.json
CHANGED
|
@@ -1,13 +1,55 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="columns is-centered">
|
|
3
3
|
<div class="column is-three-quarters-desktop is-full-touch">
|
|
4
|
-
<enso-form class="box form-box has-background-light raises-on-hover"
|
|
4
|
+
<enso-form class="box form-box has-background-light raises-on-hover">
|
|
5
|
+
<template #actions-left>
|
|
6
|
+
<div class="level-item">
|
|
7
|
+
<a class="button is-primary"
|
|
8
|
+
@click="testMail">
|
|
9
|
+
<span class="is-hidden-mobile">
|
|
10
|
+
{{ i18n('Test') }}
|
|
11
|
+
</span>
|
|
12
|
+
<span class="icon">
|
|
13
|
+
<fa icon="check-double"/>
|
|
14
|
+
</span>
|
|
15
|
+
<span class="is-hidden-mobile"/>
|
|
16
|
+
</a>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
</enso-form>
|
|
5
20
|
</div>
|
|
6
21
|
</div>
|
|
7
22
|
</template>
|
|
8
23
|
|
|
9
24
|
<script setup>
|
|
25
|
+
import { inject } from 'vue';
|
|
26
|
+
import { useRoute } from 'vue-router';
|
|
10
27
|
import { EnsoForm } from '@enso-ui/forms/bulma';
|
|
28
|
+
import { FontAwesomeIcon as Fa } from '@fortawesome/vue-fontawesome';
|
|
29
|
+
import { library } from '@fortawesome/fontawesome-svg-core';
|
|
30
|
+
import { faCheckDouble } from '@fortawesome/free-solid-svg-icons';
|
|
31
|
+
|
|
32
|
+
library.add(faCheckDouble);
|
|
33
|
+
|
|
34
|
+
const http = inject('http');
|
|
35
|
+
const i18n = inject('i18n');
|
|
36
|
+
const errorHandler = inject('errorHandler');
|
|
37
|
+
const route = inject('route');
|
|
38
|
+
const toastr = inject('toastr');
|
|
39
|
+
|
|
40
|
+
const currentRoute = useRoute();
|
|
41
|
+
|
|
42
|
+
console.log(currentRoute.params.monitoredEmail);
|
|
43
|
+
const testRoute = route('administration.monitoredEmails.testEmail', { monitoredEmail: currentRoute.params.monitoredEmail });
|
|
44
|
+
|
|
45
|
+
const testMail = () => http.get(testRoute)
|
|
46
|
+
.then(({ data }) => {
|
|
47
|
+
if(data.status)
|
|
48
|
+
toastr.success(data.message);
|
|
49
|
+
else toastr.error(data.message);
|
|
50
|
+
})
|
|
51
|
+
.catch(errorHandler);
|
|
52
|
+
|
|
11
53
|
</script>
|
|
12
54
|
|
|
13
55
|
<style lang="scss">
|