@burh/nuxt-core 1.0.280 → 1.0.284
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.
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
<!-- FERRAMENTAS -->
|
|
4
4
|
<div class="tools mt-3">
|
|
5
5
|
<button
|
|
6
|
-
@click="
|
|
6
|
+
@click="
|
|
7
|
+
isLocked && tool.event !== 'share'
|
|
8
|
+
? $emit('open-contact')
|
|
9
|
+
: $emit(tool.event)
|
|
10
|
+
"
|
|
7
11
|
class="ml-3 burh-color"
|
|
8
12
|
:class="{
|
|
9
13
|
'disabled-button': isLocked && tool.event !== 'share'
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<label for="email">E-mail</label>
|
|
20
20
|
</div>
|
|
21
21
|
</div>
|
|
22
|
-
<validation-observer ref="
|
|
22
|
+
<validation-observer ref="sendDisc">
|
|
23
23
|
<div class="row px-4" v-for="(slot, idx) in slots" :key="idx">
|
|
24
24
|
<validation-provider
|
|
25
25
|
tag="div"
|
|
@@ -75,6 +75,7 @@
|
|
|
75
75
|
<script>
|
|
76
76
|
import { Select, Option } from 'element-ui';
|
|
77
77
|
import Basics from '../Loadings/Basics';
|
|
78
|
+
import swal from 'sweetalert2';
|
|
78
79
|
|
|
79
80
|
export default {
|
|
80
81
|
name: 'send-course',
|
|
@@ -133,18 +134,48 @@ export default {
|
|
|
133
134
|
}
|
|
134
135
|
];
|
|
135
136
|
},
|
|
136
|
-
sendTest() {
|
|
137
|
-
|
|
137
|
+
async sendTest() {
|
|
138
|
+
const pass = await this.$refs.sendDisc.validate();
|
|
139
|
+
if(this.creditsAmount <= 0){
|
|
140
|
+
const Toast = swal.mixin({
|
|
141
|
+
toast: true,
|
|
142
|
+
position: 'top-end',
|
|
143
|
+
showConfirmButton: false,
|
|
144
|
+
timer: 3000
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
Toast.fire({
|
|
148
|
+
type: 'warning',
|
|
149
|
+
title: 'Esta empresa não possui ou excedeu a quantidade de usos desse serviço!'
|
|
150
|
+
});
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
if (!pass) {
|
|
154
|
+
const Toast = swal.mixin({
|
|
155
|
+
toast: true,
|
|
156
|
+
position: 'top-end',
|
|
157
|
+
showConfirmButton: false,
|
|
158
|
+
timer: 3000
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
Toast.fire({
|
|
162
|
+
type: 'warning',
|
|
163
|
+
title: 'Preecha todos os campos corretamente'
|
|
164
|
+
});
|
|
165
|
+
return;
|
|
166
|
+
} else {
|
|
167
|
+
this.loading = true;
|
|
168
|
+
setTimeout(() => {
|
|
169
|
+
this.$emit('submit', this.slots);
|
|
170
|
+
this.resetSlots();
|
|
171
|
+
requestAnimationFrame(() => {
|
|
172
|
+
this.$refs.sendCourse.reset();
|
|
173
|
+
});
|
|
174
|
+
this.loading = false;
|
|
175
|
+
this.closeModal();
|
|
176
|
+
}, 2000);
|
|
177
|
+
}
|
|
138
178
|
|
|
139
|
-
this.$emit('submit', this.slots);
|
|
140
|
-
this.resetSlots();
|
|
141
|
-
requestAnimationFrame(() => {
|
|
142
|
-
this.$refs.sendCourse.reset();
|
|
143
|
-
});
|
|
144
|
-
setTimeout(() => {
|
|
145
|
-
this.closeModal();
|
|
146
|
-
this.loading = false;
|
|
147
|
-
}, 2000);
|
|
148
179
|
}
|
|
149
180
|
},
|
|
150
181
|
watch: {
|