@burh/nuxt-core 1.0.272 → 1.0.274
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,217 +1,217 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
2
|
+
<modal :show="isModalOpen" v-on:close="closeModal" size="xl" class="modal">
|
|
3
|
+
<template slot="header">
|
|
4
|
+
<h2 class="display-4 px-4">
|
|
5
|
+
Insira os e-mail que deseja enviar o treinamento
|
|
6
|
+
</h2>
|
|
7
|
+
</template>
|
|
8
|
+
<div class="row px-4">
|
|
9
|
+
<div class="col-4">
|
|
10
|
+
<label for="name">Nome Completo</label>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="col-4">
|
|
13
|
+
<label for="email">E-mail</label>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="col-4">
|
|
16
|
+
<label for="email">Cargo</label>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
<validation-observer ref="sendCourse">
|
|
20
|
+
<div class="row px-4" v-for="(slot, idx) in slots" :key="idx">
|
|
21
|
+
<validation-provider
|
|
22
|
+
tag="div"
|
|
23
|
+
class="col-4"
|
|
24
|
+
:vid="`send-name-${idx}`"
|
|
25
|
+
name="Nome"
|
|
26
|
+
rules="required|regex:\w+\s+\w+"
|
|
27
|
+
v-slot="{ errors }"
|
|
28
|
+
>
|
|
29
|
+
<base-input
|
|
30
|
+
v-model="slot.name"
|
|
31
|
+
:error="errors[0]"
|
|
32
|
+
:valid="errors.length ? true : false"
|
|
33
|
+
/>
|
|
34
|
+
</validation-provider>
|
|
35
|
+
|
|
36
|
+
<validation-provider
|
|
37
|
+
tag="div"
|
|
38
|
+
class="col-4"
|
|
39
|
+
:vid="`send-email-${idx}`"
|
|
40
|
+
name="Email"
|
|
41
|
+
rules="required|email"
|
|
42
|
+
v-slot="{ errors }"
|
|
43
|
+
>
|
|
44
|
+
<base-input
|
|
45
|
+
v-model="slot.email"
|
|
46
|
+
:error="errors[0]"
|
|
47
|
+
:valid="errors.length ? true : false"
|
|
48
|
+
/>
|
|
49
|
+
</validation-provider>
|
|
50
|
+
<div tag="div" class="col-3" name="role">
|
|
51
|
+
<el-select
|
|
52
|
+
class="select-danger"
|
|
53
|
+
v-model="slot.role"
|
|
54
|
+
:placeholder="''"
|
|
55
|
+
>
|
|
56
|
+
<el-option
|
|
57
|
+
v-for="role in corporativeRole"
|
|
58
|
+
:key="role.id"
|
|
59
|
+
:label="role.name"
|
|
60
|
+
:value="role.id"
|
|
61
|
+
>
|
|
62
|
+
</el-option>
|
|
63
|
+
</el-select>
|
|
64
|
+
</div>
|
|
65
|
+
<div class="col-1">
|
|
66
|
+
<i
|
|
67
|
+
v-if="idx !== slots.length - 1"
|
|
68
|
+
class="fa fa-trash pointer"
|
|
69
|
+
@click="removeSlot(idx)"
|
|
70
|
+
></i>
|
|
71
|
+
<i v-else class="fa fa-plus pointer" @click="addSlot"></i>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</validation-observer>
|
|
75
|
+
|
|
76
|
+
<hr />
|
|
77
|
+
|
|
78
|
+
<div class="row px-4">
|
|
79
|
+
<div class="col-12">
|
|
80
|
+
<label for="courses">Acesso aos Treinamentos</label>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
<div class="row px-4">
|
|
84
|
+
<div class="col-12">
|
|
85
|
+
<el-select
|
|
86
|
+
v-model="coursesToSend"
|
|
87
|
+
multiple
|
|
88
|
+
style="width: 100%;"
|
|
89
|
+
placeholder="Treinamentos"
|
|
90
|
+
name="courses"
|
|
91
|
+
>
|
|
92
|
+
<el-option
|
|
93
|
+
v-for="item in courses"
|
|
94
|
+
:key="item.id"
|
|
95
|
+
:label="item.name"
|
|
96
|
+
:value="item.id"
|
|
97
|
+
>
|
|
98
|
+
</el-option>
|
|
99
|
+
</el-select>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
|
|
103
|
+
<div class="row">
|
|
104
|
+
<base-button class="mx-auto" type="primary" @click="sendTest"
|
|
105
|
+
>Enviar</base-button
|
|
106
|
+
>
|
|
107
|
+
</div>
|
|
108
|
+
</modal>
|
|
109
109
|
</template>
|
|
110
110
|
|
|
111
111
|
<script>
|
|
112
|
-
import { Select, Option } from
|
|
112
|
+
import { Select, Option } from 'element-ui';
|
|
113
113
|
|
|
114
114
|
export default {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
115
|
+
name: 'send-course',
|
|
116
|
+
components: {
|
|
117
|
+
[Select.name]: Select,
|
|
118
|
+
[Option.name]: Option
|
|
119
|
+
},
|
|
120
|
+
props: {
|
|
121
|
+
isModalOpen: {
|
|
122
|
+
type: Boolean,
|
|
123
|
+
default: false
|
|
124
|
+
},
|
|
125
|
+
selectedCourse: Number,
|
|
126
|
+
corporativeRole: null,
|
|
127
|
+
courses: Array
|
|
128
|
+
},
|
|
129
|
+
methods: {
|
|
130
|
+
closeModal(e) {
|
|
131
|
+
this.$emit('closemodal', e);
|
|
132
|
+
},
|
|
133
|
+
|
|
134
|
+
removeSlot(idx) {
|
|
135
|
+
this.slots.splice(idx, 1);
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
addSlot() {
|
|
139
|
+
const newSlot = {
|
|
140
|
+
idx: '',
|
|
141
|
+
name: '',
|
|
142
|
+
email: '',
|
|
143
|
+
role: ''
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
this.slots = [...this.slots, newSlot];
|
|
147
|
+
},
|
|
148
|
+
|
|
149
|
+
async sendTest() {
|
|
150
|
+
const pass = await this.$refs.sendCourse.validate();
|
|
151
|
+
|
|
152
|
+
if (!pass) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const filterSlots = slot => slot.email !== '';
|
|
157
|
+
|
|
158
|
+
const formatRequest = () => {
|
|
159
|
+
let formattedCourses = this.coursesToSend.map(course => ({
|
|
160
|
+
course_id: course
|
|
161
|
+
}));
|
|
162
|
+
|
|
163
|
+
let formattedSlots = this.slots
|
|
164
|
+
.filter(filterSlots)
|
|
165
|
+
.map(slot => ({
|
|
166
|
+
name: slot.name.substring(slot.name.indexOf(' '), 0),
|
|
167
|
+
last_name: slot.name.substring(
|
|
168
|
+
slot.name.indexOf(' ') + 1
|
|
169
|
+
),
|
|
170
|
+
email: slot.email,
|
|
171
|
+
courses: formattedCourses,
|
|
172
|
+
role_id: slot.role
|
|
173
|
+
}));
|
|
174
|
+
|
|
175
|
+
return {
|
|
176
|
+
...formattedSlots
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
let params = {
|
|
181
|
+
users: formatRequest()
|
|
182
|
+
};
|
|
183
|
+
this.resetSlots();
|
|
184
|
+
this.$emit('send-course', params);
|
|
185
|
+
},
|
|
186
|
+
resetSlots() {
|
|
187
|
+
this.slots = [
|
|
188
|
+
{
|
|
189
|
+
idx: '',
|
|
190
|
+
name: '',
|
|
191
|
+
email: '',
|
|
192
|
+
role: ''
|
|
193
|
+
}
|
|
194
|
+
];
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
watch: {
|
|
198
|
+
selectedCourse(newValue) {
|
|
199
|
+
this.coursesToSend = newValue ? [newValue] : [];
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
data() {
|
|
203
|
+
return {
|
|
204
|
+
slots: [
|
|
205
|
+
{
|
|
206
|
+
idx: '',
|
|
207
|
+
name: '',
|
|
208
|
+
email: '',
|
|
209
|
+
role: ''
|
|
210
|
+
}
|
|
211
|
+
],
|
|
212
|
+
coursesToSend: []
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
215
|
};
|
|
216
216
|
</script>
|
|
217
217
|
<style lang="scss" scoped>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<modal :show.sync="isModalOpen" v-on:close="closeModal" class="modal">
|
|
2
|
+
<modal :show.sync="isModalOpen" v-on:close="closeModal" class="modal sms-modal">
|
|
3
3
|
<template slot="header">
|
|
4
4
|
<h2 class="display-4 px-4">
|
|
5
5
|
Enviar SMS
|
|
@@ -185,14 +185,14 @@ export default {
|
|
|
185
185
|
},
|
|
186
186
|
isModalOpen(newValue) {
|
|
187
187
|
if (!newValue) {
|
|
188
|
-
this.templates = null
|
|
189
|
-
this.models = this.templates
|
|
190
|
-
this.messageTitle = null
|
|
191
|
-
this.receiver = null
|
|
192
|
-
this.message = ''
|
|
193
|
-
this.saveModel = false
|
|
194
|
-
this.modelName = null
|
|
195
|
-
this.allNumbers = []
|
|
188
|
+
this.templates = null;
|
|
189
|
+
this.models = this.templates;
|
|
190
|
+
this.messageTitle = null;
|
|
191
|
+
this.receiver = null;
|
|
192
|
+
this.message = '';
|
|
193
|
+
this.saveModel = false;
|
|
194
|
+
this.modelName = null;
|
|
195
|
+
this.allNumbers = [];
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
198
|
|
|
@@ -215,22 +215,30 @@ export default {
|
|
|
215
215
|
async sendSms() {
|
|
216
216
|
const pass = await this.$refs.smsModal.validate();
|
|
217
217
|
if (!pass) {
|
|
218
|
-
swal.
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
218
|
+
const Toast = swal.mixin({
|
|
219
|
+
toast: true,
|
|
220
|
+
position: 'top-end',
|
|
221
|
+
showConfirmButton: false,
|
|
222
|
+
timer: 3000
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
Toast.fire({
|
|
226
|
+
type: 'warning',
|
|
227
|
+
text: 'Preecha todos os campos corretamente'
|
|
224
228
|
});
|
|
225
229
|
return;
|
|
226
230
|
}
|
|
227
231
|
if (this.allNumbers.length == 0) {
|
|
228
|
-
swal.
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
232
|
+
const Toast = swal.mixin({
|
|
233
|
+
toast: true,
|
|
234
|
+
position: 'top-end',
|
|
235
|
+
showConfirmButton: false,
|
|
236
|
+
timer: 3000
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
Toast.fire({
|
|
240
|
+
type: 'warning',
|
|
241
|
+
title: 'Adicione pelo menos um número de telefone para continuar'
|
|
234
242
|
});
|
|
235
243
|
return;
|
|
236
244
|
} else {
|
|
@@ -309,7 +317,7 @@ export default {
|
|
|
309
317
|
.badge {
|
|
310
318
|
margin-bottom: 1.5rem;
|
|
311
319
|
}
|
|
312
|
-
.modal
|
|
320
|
+
.sms-modal {
|
|
313
321
|
padding: 1.5rem !important;
|
|
314
322
|
}
|
|
315
323
|
|
|
@@ -1,60 +1,60 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
2
|
+
<div>
|
|
3
|
+
<modal
|
|
4
|
+
:show.sync="isModalOpen"
|
|
5
|
+
@close="$emit('close-modal')"
|
|
6
|
+
class="modal modal-video"
|
|
7
|
+
bodyClasses="container-fluid px-4"
|
|
8
|
+
headerClasses="container-fluid px-4"
|
|
9
|
+
>
|
|
10
|
+
<template slot="header">
|
|
11
|
+
<h5 class="display-4">{{ title }}</h5>
|
|
12
|
+
</template>
|
|
13
|
+
<div class="text-center my-4">
|
|
14
|
+
<iframe
|
|
15
|
+
v-if="isModalOpen"
|
|
16
|
+
width="100%"
|
|
17
|
+
height="540"
|
|
18
|
+
:src="link"
|
|
19
|
+
frameborder="0"
|
|
20
|
+
allowfullscreen
|
|
21
|
+
class="rounded"
|
|
22
|
+
>
|
|
23
|
+
</iframe>
|
|
24
|
+
<div class="bottom-button" v-if="button">
|
|
25
|
+
<button
|
|
26
|
+
@click="$emit('clickVideo')"
|
|
27
|
+
class="btn btn-success"
|
|
28
|
+
>
|
|
29
|
+
{{ button.text }}
|
|
30
|
+
</button>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</modal>
|
|
34
|
+
</div>
|
|
35
35
|
</template>
|
|
36
36
|
|
|
37
37
|
<script>
|
|
38
38
|
export default {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
39
|
+
name: 'video-modal',
|
|
40
|
+
props: {
|
|
41
|
+
show: {
|
|
42
|
+
type: false,
|
|
43
|
+
},
|
|
44
|
+
link: String,
|
|
45
|
+
title: String,
|
|
46
|
+
button: Object
|
|
47
|
+
},
|
|
48
|
+
data() {
|
|
49
|
+
return {
|
|
50
|
+
isModalOpen: this.show
|
|
51
|
+
};
|
|
52
|
+
},
|
|
53
|
+
watch: {
|
|
54
|
+
show(value) {
|
|
55
|
+
this.isModalOpen = value;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
58
|
};
|
|
59
59
|
</script>
|
|
60
60
|
<style lang="scss">
|
|
@@ -69,7 +69,7 @@ export default {
|
|
|
69
69
|
padding-bottom: 0;
|
|
70
70
|
}
|
|
71
71
|
.modal-body {
|
|
72
|
-
padding: 0;
|
|
72
|
+
padding: 0 !important;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
.modal-video {
|