@burh/nuxt-core 1.0.207 → 1.0.208
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/components/argon-core/BaseDropdown.vue +114 -114
- package/components/burh-ds/Cards/PerformanceCard.vue +81 -81
- package/components/burh-ds/Carousel/ImageCarousel.vue +106 -106
- package/components/burh-ds/Curriculum/UserCurriculum/index.vue +134 -134
- package/components/burh-ds/Headings/AppHeader.vue +72 -72
- package/components/burh-ds/Inputs/HtmlEditor.vue +64 -61
- package/components/burh-ds/Modals/SharedModal.vue +270 -257
- package/components/burh-ds/Modals/SmsModal.vue +271 -246
- package/nuxt.config.js +206 -206
- package/package.json +1 -1
|
@@ -1,266 +1,291 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
2
|
+
<modal :show.sync="isModalOpen" v-on:close="closeModal" class="modal">
|
|
3
|
+
<template slot="header">
|
|
4
|
+
<h2 class="display-4 px-4">
|
|
5
|
+
Enviar SMS
|
|
6
|
+
</h2>
|
|
7
|
+
</template>
|
|
8
|
+
<validation-observer ref="smsModal" tag="div">
|
|
9
|
+
<div class="px-3">
|
|
10
|
+
<div>
|
|
11
|
+
<base-input
|
|
12
|
+
v-model="receiver"
|
|
13
|
+
label="Para"
|
|
14
|
+
v-mask="['(##) #####-####']"
|
|
15
|
+
placeholder="Adicionar um número de telefone"
|
|
16
|
+
:class="'w-100'"
|
|
17
|
+
@change="addNumber(receiver)"
|
|
18
|
+
/>
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
20
|
+
<div class="row justify-content-start">
|
|
21
|
+
<badge
|
|
22
|
+
v-for="(numbers, index) in allNumbers"
|
|
23
|
+
:key="index"
|
|
24
|
+
type="primary"
|
|
25
|
+
class="col-3 mx-3 px-1"
|
|
26
|
+
>{{ numbers
|
|
27
|
+
}}<i
|
|
28
|
+
class="fas fa-times ml-1 cursor-pointer"
|
|
29
|
+
@click="deleteNumber(index)"
|
|
30
|
+
></i
|
|
31
|
+
></badge>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
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
|
-
|
|
35
|
+
<div class="mb-4">
|
|
36
|
+
<div class="d-flex flex-column">
|
|
37
|
+
<label for="template" class="form-control-label"
|
|
38
|
+
>Modelo</label
|
|
39
|
+
>
|
|
40
|
+
<div class="d-flex align-items-center form-group">
|
|
41
|
+
<el-select
|
|
42
|
+
filterable
|
|
43
|
+
name="template"
|
|
44
|
+
no-match-text="Nenhum modelo encontrado"
|
|
45
|
+
no-data-text="Nenhum modelo encontrado"
|
|
46
|
+
placeholder="Escolha o modelo"
|
|
47
|
+
:class="'col-9 px-0'"
|
|
48
|
+
@change="changeMessage(messageTitle)"
|
|
49
|
+
v-model="messageTitle"
|
|
50
|
+
:clearable="true"
|
|
51
|
+
>
|
|
52
|
+
<el-option
|
|
53
|
+
v-for="(templates, index) in models"
|
|
54
|
+
class="select-danger"
|
|
55
|
+
:value="templates.title"
|
|
56
|
+
:key="index"
|
|
57
|
+
></el-option>
|
|
58
|
+
</el-select>
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
60
|
+
<el-tooltip
|
|
61
|
+
class="item"
|
|
62
|
+
effect="dark"
|
|
63
|
+
:content="'Remover Template'"
|
|
64
|
+
placement="top"
|
|
65
|
+
>
|
|
66
|
+
<i
|
|
67
|
+
v-if="messageTitle"
|
|
68
|
+
@click="deleteTemplate(messageTitle)"
|
|
69
|
+
class="fas fa-trash col-3 ml-5"
|
|
70
|
+
:class="
|
|
71
|
+
belongsToUser()
|
|
72
|
+
? 'text-danger cursor-pointer'
|
|
73
|
+
: ''
|
|
74
|
+
"
|
|
75
|
+
></i>
|
|
76
|
+
</el-tooltip>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
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
|
-
|
|
80
|
+
<validation-provider
|
|
81
|
+
tag="div"
|
|
82
|
+
class="pb-3"
|
|
83
|
+
name="Texto da mensagem"
|
|
84
|
+
rules="required"
|
|
85
|
+
v-slot="{ errors }"
|
|
86
|
+
>
|
|
87
|
+
<label for="message" class="form-control-label"
|
|
88
|
+
>Mensagem</label
|
|
89
|
+
>
|
|
90
|
+
<textarea
|
|
91
|
+
class="form-control"
|
|
92
|
+
v-model="message"
|
|
93
|
+
name="message"
|
|
94
|
+
:class="{ 'is-invalid': errors.length }"
|
|
95
|
+
placeholder="Mensagem que será enviada"
|
|
96
|
+
></textarea>
|
|
97
|
+
<div
|
|
98
|
+
v-if="errors.length"
|
|
99
|
+
class="invalid-feedback"
|
|
100
|
+
style="display: block;"
|
|
101
|
+
>
|
|
102
|
+
{{ errors[0] }}
|
|
103
|
+
</div>
|
|
104
|
+
</validation-provider>
|
|
105
105
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
<el-checkbox class="mt-4" v-model="saveModel"
|
|
107
|
+
>Salvar modelo de mensagem</el-checkbox
|
|
108
|
+
>
|
|
109
109
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
110
|
+
<validation-provider
|
|
111
|
+
tag="div"
|
|
112
|
+
v-if="saveModel"
|
|
113
|
+
:class="'d-flex align-items-center'"
|
|
114
|
+
name="Titulo para o modelo"
|
|
115
|
+
rules="required"
|
|
116
|
+
v-slot="{ errors }"
|
|
117
|
+
>
|
|
118
|
+
<base-input
|
|
119
|
+
v-model="modelName"
|
|
120
|
+
placeholder="Titulo para o modelo"
|
|
121
|
+
:class="'mt-4 col-9 px-0'"
|
|
122
|
+
:error="errors[0]"
|
|
123
|
+
:valid="errors.length ? true : false"
|
|
124
|
+
/>
|
|
125
125
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
126
|
+
<i
|
|
127
|
+
class="text-primary fas fa-save cursor-pointer col-3 ml-5"
|
|
128
|
+
@click="saveTemplate()"
|
|
129
|
+
></i>
|
|
130
|
+
</validation-provider>
|
|
131
|
+
</div>
|
|
132
|
+
<div class="d-flex">
|
|
133
|
+
<base-button
|
|
134
|
+
size="md"
|
|
135
|
+
type="primary"
|
|
136
|
+
role="button"
|
|
137
|
+
@click="sendSms()"
|
|
138
|
+
class="ml-auto"
|
|
139
|
+
>Enviar
|
|
140
|
+
</base-button>
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
143
|
+
</validation-observer>
|
|
144
|
+
</modal>
|
|
145
145
|
</template>
|
|
146
146
|
|
|
147
147
|
<script>
|
|
148
|
-
import { Select, Option, Checkbox, Tooltip, Button } from
|
|
149
|
-
import { mask } from
|
|
150
|
-
import swal from
|
|
148
|
+
import { Select, Option, Checkbox, Tooltip, Button } from 'element-ui';
|
|
149
|
+
import { mask } from 'vue-the-mask';
|
|
150
|
+
import swal from 'sweetalert2';
|
|
151
|
+
import { isConsole } from 'mobile-device-detect';
|
|
151
152
|
export default {
|
|
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
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
if (this.saveModel) {
|
|
227
|
-
this.$emit("save-model", this.modelName, this.message);
|
|
228
|
-
}
|
|
229
|
-
},
|
|
230
|
-
addNumber(number) {
|
|
231
|
-
this.allNumbers.push(number);
|
|
232
|
-
this.receiver = "";
|
|
233
|
-
},
|
|
234
|
-
deleteNumber(index) {
|
|
235
|
-
this.allNumbers.splice(index, 1);
|
|
236
|
-
},
|
|
237
|
-
changeMessage(messageName) {
|
|
238
|
-
let message = this.models.find(data => data.title == messageName);
|
|
239
|
-
this.message = message ? message.message : "";
|
|
240
|
-
},
|
|
241
|
-
deleteTemplate(messageName) {
|
|
242
|
-
let template = this.models.find(data => data.title == messageName);
|
|
243
|
-
this.$emit("remove-template", template);
|
|
244
|
-
},
|
|
245
|
-
belongsToUser() {
|
|
246
|
-
let template = this.models.find(
|
|
247
|
-
data => data.title == this.messageTitle
|
|
248
|
-
);
|
|
153
|
+
directives: { mask },
|
|
154
|
+
name: 'send-sms',
|
|
155
|
+
components: {
|
|
156
|
+
[Select.name]: Select,
|
|
157
|
+
[Option.name]: Option,
|
|
158
|
+
[Checkbox.name]: Checkbox,
|
|
159
|
+
[Tooltip.name]: Tooltip
|
|
160
|
+
},
|
|
161
|
+
computed: {
|
|
162
|
+
isModalOpen: {
|
|
163
|
+
get() {
|
|
164
|
+
return this.show;
|
|
165
|
+
},
|
|
166
|
+
set(show) {
|
|
167
|
+
this.$emit('input', show);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
props: {
|
|
172
|
+
show: {
|
|
173
|
+
type: Boolean,
|
|
174
|
+
default: false
|
|
175
|
+
},
|
|
176
|
+
templates: null
|
|
177
|
+
},
|
|
178
|
+
model: {
|
|
179
|
+
prop: 'show'
|
|
180
|
+
},
|
|
181
|
+
watch: {
|
|
182
|
+
templates(newValue) {
|
|
183
|
+
this.models = newValue;
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
data() {
|
|
187
|
+
return {
|
|
188
|
+
models: this.templates,
|
|
189
|
+
messageTitle: null,
|
|
190
|
+
receiver: null,
|
|
191
|
+
message: '',
|
|
192
|
+
saveModel: false,
|
|
193
|
+
modelName: null,
|
|
194
|
+
allNumbers: []
|
|
195
|
+
};
|
|
196
|
+
},
|
|
197
|
+
methods: {
|
|
198
|
+
closeModal() {
|
|
199
|
+
this.$emit('close-modal');
|
|
200
|
+
},
|
|
201
|
+
async sendSms() {
|
|
202
|
+
const pass = await this.$refs.smsModal.validate();
|
|
203
|
+
if (!pass) {
|
|
204
|
+
swal.fire({
|
|
205
|
+
title: 'Aviso',
|
|
206
|
+
html: 'Preecha todos os campos corretamente',
|
|
207
|
+
buttonsStyling: false,
|
|
208
|
+
type: 'error',
|
|
209
|
+
confirmButtonClass: 'btn btn-primary btn-fill'
|
|
210
|
+
});
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
if (this.allNumbers.length == 0) {
|
|
214
|
+
swal.fire({
|
|
215
|
+
title: 'Aviso',
|
|
216
|
+
html: 'Adicione pelo menos um número de telefone para continuar',
|
|
217
|
+
buttonsStyling: false,
|
|
218
|
+
type: 'error',
|
|
219
|
+
confirmButtonClass: 'btn btn-primary btn-fill'
|
|
220
|
+
});
|
|
221
|
+
return;
|
|
222
|
+
} else {
|
|
223
|
+
swal.fire({
|
|
224
|
+
title: 'Tem certeza?',
|
|
225
|
+
text: 'Quer mesmo enviar sms para esses números?',
|
|
226
|
+
icon: 'warning',
|
|
249
227
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
228
|
+
buttonsStyling: false,
|
|
229
|
+
confirmButtonText: 'Enviar',
|
|
230
|
+
confirmButtonClass: 'btn btn-primary btn-fill btn-swal-sms',
|
|
231
|
+
showCancelButton: true,
|
|
232
|
+
cancelButtonText: 'Cancelar',
|
|
233
|
+
cancelButtonClass: 'btn btn-outline-default btn-fill',
|
|
234
|
+
reverseButtons: true,
|
|
235
|
+
}).then((result) => {
|
|
236
|
+
if(result.value) {
|
|
237
|
+
this.$emit('send-sms', this.allNumbers, this.message);
|
|
238
|
+
} else {
|
|
239
|
+
swal.close();
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
saveTemplate() {
|
|
245
|
+
if (this.saveModel) {
|
|
246
|
+
this.$emit('save-model', this.modelName, this.message);
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
addNumber(number) {
|
|
250
|
+
this.allNumbers.push(number);
|
|
251
|
+
this.receiver = '';
|
|
252
|
+
},
|
|
253
|
+
deleteNumber(index) {
|
|
254
|
+
this.allNumbers.splice(index, 1);
|
|
255
|
+
},
|
|
256
|
+
changeMessage(messageName) {
|
|
257
|
+
let message = this.models.find(data => data.title == messageName);
|
|
258
|
+
this.message = message ? message.message : '';
|
|
259
|
+
},
|
|
260
|
+
deleteTemplate(messageName) {
|
|
261
|
+
let template = this.models.find(data => data.title == messageName);
|
|
262
|
+
this.$emit('remove-template', template);
|
|
263
|
+
},
|
|
264
|
+
belongsToUser() {
|
|
265
|
+
let template = this.models.find(
|
|
266
|
+
data => data.title == this.messageTitle
|
|
267
|
+
);
|
|
254
268
|
|
|
255
|
-
|
|
256
|
-
|
|
269
|
+
if (!template) {
|
|
270
|
+
this.messageTitle = null;
|
|
271
|
+
return false;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
return (
|
|
275
|
+
parseInt(this.$store.state.user.currentUser.id) ==
|
|
257
276
|
template.user_id
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
mounted() {}
|
|
262
281
|
};
|
|
263
282
|
</script>
|
|
283
|
+
<style lang="scss">
|
|
284
|
+
.btn-swal-sms{
|
|
285
|
+
background-color:#FFCF02 !important;
|
|
286
|
+
border-color: #FFCF02 !important;
|
|
287
|
+
}
|
|
288
|
+
</style>
|
|
264
289
|
<style lang="scss" scoped>
|
|
265
290
|
.badge {
|
|
266
291
|
margin-bottom: 1.5rem;
|