@burh/nuxt-core 1.0.196 → 1.0.197
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,274 +1,309 @@
|
|
|
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
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
2
|
+
<div class="bg-white content-middle">
|
|
3
|
+
<!-- FERRAMENTAS -->
|
|
4
|
+
<div class="tools mt-3">
|
|
5
|
+
<button
|
|
6
|
+
@click="$emit(tool.event)"
|
|
7
|
+
class="ml-3 burh-color"
|
|
8
|
+
v-for="(tool, index) in tools"
|
|
9
|
+
:key="index"
|
|
10
|
+
>
|
|
11
|
+
{{ tool.name }}
|
|
12
|
+
</button>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<!-- SOBRE -->
|
|
16
|
+
<div class="about content-block mt-5 ml-3 mr-3">
|
|
17
|
+
<h5 class="font-weight-bold">Sobre</h5>
|
|
18
|
+
<p
|
|
19
|
+
id="USER_ABOUT"
|
|
20
|
+
class="mb-0"
|
|
21
|
+
:class="
|
|
22
|
+
!wordIsLesserThan(
|
|
23
|
+
userData.user_complementary_information.about
|
|
24
|
+
) && 'readmore'
|
|
25
|
+
"
|
|
26
|
+
>
|
|
27
|
+
{{ userData.user_complementary_information.about }}
|
|
28
|
+
</p>
|
|
29
|
+
<a
|
|
30
|
+
href="#"
|
|
31
|
+
aria-label="expandir conteudo"
|
|
32
|
+
v-show="
|
|
33
|
+
userData.user_complementary_information.about &&
|
|
34
|
+
!wordIsLesserThan(
|
|
35
|
+
userData.user_complementary_information.about
|
|
36
|
+
)
|
|
37
|
+
"
|
|
38
|
+
@click.prevent.stop="toggleReadMore($event, 'USER_ABOUT')"
|
|
39
|
+
>Ler mais</a
|
|
40
|
+
>
|
|
41
|
+
|
|
42
|
+
<p v-show="!userData.user_complementary_information.about" class="">
|
|
43
|
+
Nenhuma informação adicionada
|
|
44
|
+
</p>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<!-- EDUCAÇÃO -->
|
|
48
|
+
<h5 class="font-weight-bold mt-4 ml-3">Educação</h5>
|
|
49
|
+
<div class="no-info ml-3" v-show="userData.user_education.length === 0">
|
|
50
|
+
<p>
|
|
51
|
+
Nenhuma informação adicionada
|
|
52
|
+
</p>
|
|
53
|
+
</div>
|
|
54
|
+
<div
|
|
55
|
+
class="education ml-3"
|
|
56
|
+
v-show="userData.user_education.length > 0"
|
|
57
|
+
v-for="(edu, index) in userData.user_education"
|
|
58
|
+
:key="index"
|
|
59
|
+
>
|
|
60
|
+
<p class="sub-title">{{ edu.formation }}</p>
|
|
61
|
+
<p class="info-text">{{ edu.institution }}</p>
|
|
62
|
+
<span class="info-text">
|
|
63
|
+
{{ edu.start_month }}/{{ edu.start_year }} -
|
|
64
|
+
{{ treatEndDate(edu.end_month, edu.end_year) }}
|
|
65
|
+
{{ getTime(false, edu) }}
|
|
66
|
+
{{
|
|
67
|
+
edu.user_education_period
|
|
68
|
+
? '-' + edu.user_education_period.name
|
|
69
|
+
: ''
|
|
70
|
+
}}
|
|
71
|
+
</span>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<!-- EXPERIÊNCIAS -->
|
|
75
|
+
<h5 class="font-weight-bold mt-4 ml-3">Experiência</h5>
|
|
76
|
+
<div
|
|
77
|
+
class="no-info ml-3"
|
|
78
|
+
v-show="userData.user_experience.length === 0"
|
|
79
|
+
>
|
|
80
|
+
<p>
|
|
81
|
+
Nenhuma informação adicionada
|
|
82
|
+
</p>
|
|
83
|
+
</div>
|
|
84
|
+
<div
|
|
85
|
+
v-show="userData.user_experience.length > 0"
|
|
86
|
+
class="experience ml-3 mr-3"
|
|
87
|
+
v-for="(exp, index) in userData.user_experience"
|
|
88
|
+
:key="`experience-${index}`"
|
|
89
|
+
>
|
|
90
|
+
<p class="sub-title">{{ exp.job_title }}</p>
|
|
91
|
+
<p class="info-text">{{ exp.company }}, {{ exp.location }}</p>
|
|
92
|
+
<span class="info-text">
|
|
93
|
+
{{ exp.start_month }}/{{ exp.start_year }} -
|
|
94
|
+
{{ treatEndDate(exp.end_month, exp.end_year) }}
|
|
95
|
+
{{ getTime(true, exp) }}
|
|
96
|
+
</span>
|
|
97
|
+
|
|
98
|
+
<p
|
|
99
|
+
:id="`USER_EXPERIENCE-${index}`"
|
|
100
|
+
class="description mt-4 mb-0"
|
|
101
|
+
:class="!wordIsLesserThan(exp.description) && 'readmore'"
|
|
102
|
+
>
|
|
103
|
+
{{ exp.description }}
|
|
104
|
+
</p>
|
|
105
|
+
|
|
106
|
+
<a
|
|
107
|
+
href="#"
|
|
108
|
+
aria-label="expandir conteudo"
|
|
109
|
+
v-show="!wordIsLesserThan(exp.description)"
|
|
110
|
+
@click.prevent.stop="
|
|
111
|
+
toggleReadMore($event, `USER_EXPERIENCE-${index}`)
|
|
112
|
+
"
|
|
113
|
+
>Ler mais</a
|
|
114
|
+
><br /><br />
|
|
115
|
+
</div>
|
|
116
|
+
|
|
117
|
+
<!-- CURSOS -->
|
|
118
|
+
<h5 class="font-weight-bold mt-1 ml-3">Cursos</h5>
|
|
119
|
+
<div class="no-info ml-3" v-show="userData.user_course.length === 0">
|
|
120
|
+
<p>
|
|
121
|
+
Nenhuma informação adicionada
|
|
122
|
+
</p>
|
|
123
|
+
</div>
|
|
124
|
+
<div
|
|
125
|
+
v-show="userData.user_course.length > 0"
|
|
126
|
+
class="courses ml-3"
|
|
127
|
+
v-for="(cou, index) in userData.user_course"
|
|
128
|
+
:key="`course-${index}`"
|
|
129
|
+
>
|
|
130
|
+
<p class="sub-title">{{ cou.institution }}</p>
|
|
131
|
+
<p class="info-text mb-3">
|
|
132
|
+
{{ cou.name }} - {{ cou.end_year }}
|
|
133
|
+
{{ getTime(false, cou) }}
|
|
134
|
+
</p>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
118
137
|
</template>
|
|
119
138
|
|
|
120
139
|
<script>
|
|
121
140
|
import getPrefixes from '~/util/getPrefixes.js';
|
|
122
141
|
|
|
123
142
|
export default {
|
|
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
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
143
|
+
name: 'user-cv-middle',
|
|
144
|
+
props: {
|
|
145
|
+
userData: Object,
|
|
146
|
+
tools: {
|
|
147
|
+
type: Array,
|
|
148
|
+
default: () => []
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
watch: {
|
|
152
|
+
userData() {
|
|
153
|
+
this.userData.user_experience = this.filterByDate(
|
|
154
|
+
this.userData.user_experience
|
|
155
|
+
);
|
|
156
|
+
this.userData.user_course = this.filterByDate(
|
|
157
|
+
this.userData.user_course,
|
|
158
|
+
'old'
|
|
159
|
+
);
|
|
160
|
+
this.userData.user_education = this.filterByDate(
|
|
161
|
+
this.userData.user_education,
|
|
162
|
+
'old'
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
methods: {
|
|
167
|
+
filterByDate(data, by = 'new') {
|
|
168
|
+
let sortedArray = data.sort((a, b) => {
|
|
169
|
+
a = [
|
|
170
|
+
a.start_month,
|
|
171
|
+
a.start_year,
|
|
172
|
+
a.end_month | 12,
|
|
173
|
+
a.end_year | 9999
|
|
174
|
+
];
|
|
175
|
+
|
|
176
|
+
b = [
|
|
177
|
+
b.start_month,
|
|
178
|
+
b.start_year,
|
|
179
|
+
b.end_month | 12,
|
|
180
|
+
b.end_year | 9999
|
|
181
|
+
];
|
|
182
|
+
|
|
183
|
+
// Primeiro filtro -> chaves: 0 e 1 -> Filtro por data de inicio
|
|
184
|
+
// Segundo filtro -> chaves: 2 e 3 -> Filtro por data de termino (subir não concluídos para primeiros)
|
|
185
|
+
|
|
186
|
+
let byStart;
|
|
187
|
+
let byEnd;
|
|
188
|
+
|
|
189
|
+
switch (by) {
|
|
190
|
+
case 'old':
|
|
191
|
+
byStart =
|
|
192
|
+
new Date(a[1], a[0], 1).getTime() -
|
|
193
|
+
new Date(b[1], b[0], 1).getTime();
|
|
194
|
+
byEnd =
|
|
195
|
+
new Date(b[3], b[2], 1).getTime() -
|
|
196
|
+
new Date(a[3], a[2], 1).getTime();
|
|
197
|
+
break;
|
|
198
|
+
|
|
199
|
+
default:
|
|
200
|
+
byStart =
|
|
201
|
+
new Date(b[1], b[0], 1).getTime() -
|
|
202
|
+
new Date(a[1], a[0], 1).getTime();
|
|
203
|
+
byEnd =
|
|
204
|
+
new Date(b[3], b[2], 1).getTime() -
|
|
205
|
+
new Date(a[3], a[2], 1).getTime();
|
|
206
|
+
break;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
return byStart - byEnd;
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
return sortedArray;
|
|
213
|
+
},
|
|
214
|
+
toggleReadMore(event, id) {
|
|
215
|
+
const element = document.getElementById(id);
|
|
216
|
+
element.classList.toggle('readmore');
|
|
217
|
+
event.target.innerText == 'Ler mais'
|
|
218
|
+
? (event.target.innerText = 'Esconder')
|
|
219
|
+
: (event.target.innerText = 'Ler mais');
|
|
220
|
+
},
|
|
221
|
+
getTime(
|
|
222
|
+
isExperience,
|
|
223
|
+
{ start_year = null, end_year = null, start_month, end_month },
|
|
224
|
+
textHappening = 'Cursando'
|
|
225
|
+
) {
|
|
226
|
+
const isHappening = !end_month && !end_year;
|
|
227
|
+
|
|
228
|
+
if (isHappening) {
|
|
229
|
+
return isExperience === true ? 'Atualmente' : textHappening;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
const dateInitial = this.$moment(
|
|
233
|
+
['1', start_month.toString(), start_year.toString()],
|
|
234
|
+
'DD/MM/YYYY'
|
|
235
|
+
);
|
|
236
|
+
const dateDone = this.$moment(
|
|
237
|
+
['1', end_month.toString(), end_year.toString()],
|
|
238
|
+
'DD/MM/YYYY'
|
|
239
|
+
);
|
|
240
|
+
const diffDuration = this.$moment.duration(
|
|
241
|
+
dateDone.diff(dateInitial)
|
|
242
|
+
);
|
|
243
|
+
const years = diffDuration.years();
|
|
244
|
+
const months = diffDuration.months();
|
|
245
|
+
|
|
246
|
+
if (years) {
|
|
247
|
+
return years > 1 ? `(${years} anos)` : `(${years} ano)`;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
return months > 1
|
|
251
|
+
? `(${months} meses)`
|
|
252
|
+
: months == 1
|
|
253
|
+
? `(${months} mês)`
|
|
254
|
+
: '';
|
|
255
|
+
},
|
|
256
|
+
languageLevel(level) {
|
|
257
|
+
switch (parseInt(level)) {
|
|
258
|
+
case 1:
|
|
259
|
+
return 'Iniciante';
|
|
260
|
+
case 2:
|
|
261
|
+
return 'Elementar';
|
|
262
|
+
case 3:
|
|
263
|
+
return 'Pré-intermediário';
|
|
264
|
+
case 4:
|
|
265
|
+
return 'Intermediário';
|
|
266
|
+
case 5:
|
|
267
|
+
return 'Intermediário Superior';
|
|
268
|
+
case 6:
|
|
269
|
+
return 'Avançado';
|
|
270
|
+
case 7:
|
|
271
|
+
return 'Fluente';
|
|
272
|
+
default:
|
|
273
|
+
return '';
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
treatPhone(phone) {
|
|
277
|
+
if (phone) {
|
|
278
|
+
if (phone == '0' || phone.length < 9 || !phone) {
|
|
279
|
+
return 'não cadastrado';
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
return phone;
|
|
284
|
+
},
|
|
285
|
+
treatCellphone(cellphone) {
|
|
286
|
+
if (cellphone) {
|
|
287
|
+
if (cellphone == '0' || cellphone.length < 11 || !cellphone) {
|
|
288
|
+
return 'não cadastrado';
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
return cellphone;
|
|
293
|
+
},
|
|
294
|
+
handleGetPrefixes(name = '') {
|
|
295
|
+
return getPrefixes(name);
|
|
296
|
+
},
|
|
297
|
+
treatEndDate(end_month, end_year) {
|
|
298
|
+
if (end_month && end_year) {
|
|
299
|
+
return `${end_month}/${end_year}`;
|
|
300
|
+
}
|
|
301
|
+
return '';
|
|
302
|
+
},
|
|
303
|
+
wordIsLesserThan(word, value = 300) {
|
|
304
|
+
return word && word.length < value;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
272
307
|
};
|
|
273
308
|
</script>
|
|
274
309
|
|
|
@@ -296,7 +331,7 @@ export default {
|
|
|
296
331
|
border: none;
|
|
297
332
|
margin-top: 15px;
|
|
298
333
|
|
|
299
|
-
background: #
|
|
334
|
+
background: #1da1f1;
|
|
300
335
|
border-radius: 16px;
|
|
301
336
|
color: #fff;
|
|
302
337
|
|
|
@@ -343,4 +378,11 @@ export default {
|
|
|
343
378
|
color: #62778c;
|
|
344
379
|
}
|
|
345
380
|
}
|
|
381
|
+
|
|
382
|
+
.no-info {
|
|
383
|
+
p {
|
|
384
|
+
font-size: 0.875rem;
|
|
385
|
+
color: #62778c;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
346
388
|
</style>
|