@burh/nuxt-core 1.0.291 → 1.0.292

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.
Files changed (31) hide show
  1. package/assets/sass/burh-ds/atoms/_buttons.scss +219 -219
  2. package/assets/sass/burh-ds/content/_interface-spa.scss +306 -306
  3. package/assets/sass/burh-ds/content/_main-content.scss +25 -25
  4. package/assets/sass/burh-ds/variables/_colors.scss +350 -350
  5. package/components/argon-core/BaseDropdown.vue +114 -114
  6. package/components/argon-core/BaseProgress.vue +121 -121
  7. package/components/argon-core/Modal.vue +184 -184
  8. package/components/burh-ds/Cards/FeatureBusinessCard.vue +74 -74
  9. package/components/burh-ds/Cards/PerformanceCard.vue +81 -81
  10. package/components/burh-ds/Cards/RecruitmentCard.vue +214 -214
  11. package/components/burh-ds/Collapse/DefaultCollapse.vue +70 -70
  12. package/components/burh-ds/Curriculum/UserCurriculum/UserCvMiddle.vue +497 -496
  13. package/components/burh-ds/Curriculum/UserCurriculum/index.vue +245 -245
  14. package/components/burh-ds/Dropdown/JobStatusDropdown.vue +145 -145
  15. package/components/burh-ds/Headings/AppHeader.vue +162 -162
  16. package/components/burh-ds/Inputs/SearchInput.vue +64 -64
  17. package/components/burh-ds/Lists/VagasSimple.vue +404 -404
  18. package/components/burh-ds/Loadings/LoadingFullPage.vue +68 -68
  19. package/components/burh-ds/Loads/LoadingBar.vue +83 -83
  20. package/components/burh-ds/Modals/MobileModal.vue +65 -65
  21. package/components/burh-ds/Modals/NewUserModal.vue +87 -87
  22. package/components/burh-ds/Modals/SharedModal.vue +270 -270
  23. package/components/burh-ds/Skeleton/BaseCardUniversity.vue +79 -79
  24. package/components/burh-ds/Skeleton/BaseCardUser.vue +84 -84
  25. package/components/burh-ds/Skeleton/Cards.vue +86 -86
  26. package/components/burh-ds/Skeleton/Home.vue +100 -100
  27. package/components/burh-ds/Skeleton/RecruitmentCard.vue +169 -169
  28. package/components/burh-ds/Skeleton/SkeletonAnimate.vue +96 -96
  29. package/components/layouts/burh-ds/footer/ProductsFooter.vue +330 -330
  30. package/nuxt.config.js +206 -206
  31. package/package.json +1 -1
@@ -1,496 +1,497 @@
1
- <template>
2
- <div class="bg-white content-middle">
3
- <!-- FERRAMENTAS -->
4
- <div class="tools mt-3">
5
- <button
6
- @click="
7
- isLocked && tool.event !== 'share'
8
- ? $emit('open-contact')
9
- : $emit(tool.event)
10
- "
11
- class="ml-3 burh-color"
12
- :class="{
13
- 'disabled-button': isLocked && tool.event !== 'share'
14
- }"
15
- v-for="(tool, index) in tools"
16
- :key="index"
17
- >
18
- <i
19
- v-show="isLocked && tool.event !== 'share'"
20
- class="fas fa-lock mr-1"
21
- ></i>
22
- {{ tool.name }}
23
- </button>
24
- </div>
25
-
26
- <!-- SOBRE -->
27
- <div class="about content-block mt-5 ml-3 mr-3">
28
- <h5 class="font-weight-bold">Sobre</h5>
29
- <p
30
- id="USER_ABOUT"
31
- class="mb-0"
32
- :class="
33
- !wordIsLesserThan(
34
- userData.user_complementary_information.about
35
- ) && 'readmore'
36
- "
37
- v-html="
38
- highlightText(
39
- search,
40
- userData.user_complementary_information.about
41
- )
42
- "
43
- ></p>
44
- <a
45
- href="#"
46
- aria-label="expandir conteudo"
47
- v-show="
48
- userData.user_complementary_information.about &&
49
- !wordIsLesserThan(
50
- userData.user_complementary_information.about
51
- )
52
- "
53
- @click.prevent.stop="toggleReadMore($event, 'USER_ABOUT')"
54
- >Ler mais</a
55
- >
56
-
57
- <p v-show="!userData.user_complementary_information.about" class="">
58
- Nenhuma informação adicionada
59
- </p>
60
- </div>
61
-
62
- <!-- EDUCAÇÃO -->
63
- <h5 class="font-weight-bold mt-4 ml-3">Educação</h5>
64
- <div class="no-info ml-3" v-show="userData.user_education.length === 0">
65
- <p>
66
- Nenhuma informação adicionada
67
- </p>
68
- </div>
69
- <div
70
- class="education ml-3"
71
- v-show="userData.user_education.length > 0"
72
- v-for="(edu, index) in userData.user_education"
73
- :key="index"
74
- >
75
- <p
76
- class="sub-title"
77
- v-html="highlightText(search, edu.formation)"
78
- ></p>
79
- <p class="info-text">{{ edu.institution }}</p>
80
- <span class="info-text">
81
- {{ edu.start_month }}/{{ edu.start_year }} -
82
- {{ treatEndDate(edu.end_month, edu.end_year) }}
83
- {{ getTime(false, edu) }}
84
- {{
85
- edu.user_education_period
86
- ? '-' + edu.user_education_period.name
87
- : ''
88
- }} </span
89
- ><br />
90
- <span
91
- class="info-text"
92
- v-html="
93
- highlightText(
94
- search,
95
- edu.formation_level_id | formationLevel
96
- )
97
- "
98
- ></span>
99
- </div>
100
-
101
- <!-- EXPERIÊNCIAS -->
102
- <h5 class="font-weight-bold mt-4 ml-3">Experiência</h5>
103
- <div
104
- class="no-info ml-3"
105
- v-show="userData.user_experience.length === 0"
106
- >
107
- <p>
108
- Nenhuma informação adicionada
109
- </p>
110
- </div>
111
- <div
112
- v-show="userData.user_experience.length > 0"
113
- class="experience ml-3 mr-3"
114
- v-for="(exp, index) in userData.user_experience"
115
- :key="`experience-${index}`"
116
- >
117
- <p
118
- class="sub-title"
119
- v-html="highlightText(search, exp.job_title)"
120
- ></p>
121
- <p
122
- class="info-text"
123
- v-html="
124
- highlightText(search, `${exp.company}, ${exp.location}`)
125
- "
126
- ></p>
127
- <span class="info-text">
128
- {{ exp.start_month }}/{{ exp.start_year }} -
129
- {{ treatEndDate(exp.end_month, exp.end_year) }}
130
- {{ getTime(true, exp) }}
131
- </span>
132
-
133
- <p
134
- :id="`USER_EXPERIENCE-${index}`"
135
- class="description mt-4 mb-0"
136
- :class="!wordIsLesserThan(exp.description) && 'readmore'"
137
- v-html="highlightText(search, exp.description)"
138
- ></p>
139
-
140
- <a
141
- href="#"
142
- aria-label="expandir conteudo"
143
- v-show="!wordIsLesserThan(exp.description)"
144
- @click.prevent.stop="
145
- toggleReadMore($event, `USER_EXPERIENCE-${index}`)
146
- "
147
- >Ler mais</a
148
- ><br /><br />
149
- </div>
150
-
151
- <!-- CURSOS -->
152
- <h5 class="font-weight-bold mt-1 ml-3">Cursos Complementares</h5>
153
- <div class="no-info ml-3" v-show="userData.user_course.length === 0">
154
- <p>
155
- Nenhuma informação adicionada
156
- </p>
157
- </div>
158
- <div
159
- v-show="userData.user_course.length > 0"
160
- class="courses ml-3"
161
- v-for="(cou, index) in userData.user_course"
162
- :key="`course-${index}`"
163
- >
164
- <p
165
- class="sub-title"
166
- v-html="highlightText(search, cou.institution)"
167
- ></p>
168
- <p
169
- class="info-text mb-3"
170
- v-html="
171
- highlightText(
172
- search,
173
- `${cou.name} - ${cou.end_year || ''} ${getTime(
174
- false,
175
- cou
176
- )}`
177
- )
178
- "
179
- >
180
- {{ cou.name }} - {{ cou.end_year }}
181
- {{ getTime(false, cou) }}
182
- </p>
183
- </div>
184
- </div>
185
- </template>
186
-
187
- <script>
188
- import getPrefixes from '~/util/getPrefixes.js';
189
-
190
- export default {
191
- name: 'user-cv-middle',
192
- props: {
193
- userData: Object,
194
- tools: {
195
- type: Array,
196
- default: () => []
197
- },
198
- search: {
199
- type: String,
200
- default: ''
201
- }
202
- },
203
- filters: {
204
- formationLevel(id) {
205
- const typeFormation = {
206
- 1: 'Ensino Médio',
207
- 2: 'Ensino Técnico',
208
- 3: 'Graduação',
209
- 4: 'Pós-Graduação',
210
- 5: 'Mestrado',
211
- 6: 'Doutorado'
212
- };
213
-
214
- return typeFormation[id] || '-';
215
- }
216
- },
217
- data() {
218
- return {
219
- isLocked: !this.companyHasProduct(
220
- this.$store.state.loja.showableProducts['INTERACAO_USUARIO']
221
- )
222
- };
223
- },
224
- mounted() {
225
- this.userData.user_experience = this.filterByDate(
226
- this.userData.user_experience,
227
- 'old'
228
- );
229
- this.userData.user_education = this.filterByDate(
230
- this.userData.user_education,
231
- 'old'
232
- );
233
- this.userData.user_course = this.filterByDate(
234
- this.userData.user_course,
235
- 'old'
236
- );
237
- },
238
- watch: {
239
- userData() {
240
- this.userData.user_experience = this.filterByDate(
241
- this.userData.user_experience,
242
- 'old'
243
- );
244
- this.userData.user_education = this.filterByDate(
245
- this.userData.user_education,
246
- 'old'
247
- );
248
- this.userData.user_course = this.filterByDate(
249
- this.userData.user_course,
250
- 'old'
251
- );
252
- }
253
- },
254
- methods: {
255
- highlightText(search, text) {
256
- if (search.length < 2) return text;
257
-
258
- const regex = new RegExp(search.toLowerCase(), 'gmi');
259
- return String(text || '').replace(
260
- regex,
261
- `<span class="search-highlight">${search}</span>`
262
- );
263
- },
264
- filterByDate(data, by = 'new') {
265
- let sortedArray = data.sort((a, b) => {
266
- a = [
267
- a.start_month,
268
- a.start_year,
269
- a.end_month || 12,
270
- a.end_year || 9999
271
- ];
272
-
273
- b = [
274
- b.start_month,
275
- b.start_year,
276
- b.end_month || 12,
277
- b.end_year || 9999
278
- ];
279
-
280
- // Primeiro filtro -> chaves: 0 e 1 -> Filtro por data de inicio
281
- // Segundo filtro -> chaves: 2 e 3 -> Filtro por data de termino (subir não concluídos para primeiros)
282
-
283
- let byStart;
284
- let byEnd;
285
-
286
- switch (by) {
287
- case 'old':
288
- byStart =
289
- new Date(a[1], a[0], 1).getTime() -
290
- new Date(b[1], b[0], 1).getTime();
291
- byEnd =
292
- new Date(b[3], b[2], 1).getTime() -
293
- new Date(a[3], a[2], 1).getTime();
294
- break;
295
-
296
- default:
297
- byStart =
298
- new Date(b[1], b[0], 1).getTime() -
299
- new Date(a[1], a[0], 1).getTime();
300
- byEnd =
301
- new Date(b[3], b[2], 1).getTime() -
302
- new Date(a[3], a[2], 1).getTime();
303
- break;
304
- }
305
-
306
- return byEnd - byStart;
307
- });
308
-
309
- return sortedArray;
310
- },
311
- toggleReadMore(event, id) {
312
- const element = document.getElementById(id);
313
- element.classList.toggle('readmore');
314
- event.target.innerText == 'Ler mais'
315
- ? (event.target.innerText = 'Esconder')
316
- : (event.target.innerText = 'Ler mais');
317
- },
318
- getTime(
319
- isExperience,
320
- { start_year = null, end_year = null, start_month, end_month },
321
- textHappening = 'Cursando'
322
- ) {
323
- const isHappening = !end_month && !end_year;
324
-
325
- if (isHappening) {
326
- return isExperience === true ? 'Atualmente' : textHappening;
327
- }
328
-
329
- const dateInitial = this.$moment(
330
- ['1', start_month.toString(), start_year.toString()],
331
- 'DD/MM/YYYY'
332
- );
333
- const dateDone = this.$moment(
334
- ['1', end_month.toString(), end_year.toString()],
335
- 'DD/MM/YYYY'
336
- );
337
- const diffDuration = this.$moment.duration(
338
- dateDone.diff(dateInitial)
339
- );
340
- const years = diffDuration.years();
341
- const months = diffDuration.months();
342
-
343
- if (years) {
344
- return years > 1 ? `(${years} anos)` : `(${years} ano)`;
345
- }
346
-
347
- return months > 1
348
- ? `(${months} meses)`
349
- : months == 1
350
- ? `(${months} mês)`
351
- : '';
352
- },
353
- languageLevel(level) {
354
- switch (parseInt(level)) {
355
- case 1:
356
- return 'Iniciante';
357
- case 2:
358
- return 'Elementar';
359
- case 3:
360
- return 'Pré-intermediário';
361
- case 4:
362
- return 'Intermediário';
363
- case 5:
364
- return 'Intermediário Superior';
365
- case 6:
366
- return 'Avançado';
367
- case 7:
368
- return 'Fluente';
369
- default:
370
- return '';
371
- }
372
- },
373
- treatPhone(phone) {
374
- if (phone) {
375
- if (phone == '0' || phone.length < 9 || !phone) {
376
- return 'não cadastrado';
377
- }
378
- }
379
-
380
- return phone;
381
- },
382
- treatCellphone(cellphone) {
383
- if (cellphone) {
384
- if (cellphone == '0' || cellphone.length < 11 || !cellphone) {
385
- return 'não cadastrado';
386
- }
387
- }
388
-
389
- return cellphone;
390
- },
391
- handleGetPrefixes(name = '') {
392
- return getPrefixes(name);
393
- },
394
- treatEndDate(end_month, end_year) {
395
- if (end_month && end_year) {
396
- return `${end_month}/${end_year}`;
397
- }
398
- return '';
399
- },
400
- wordIsLesserThan(word, value = 300) {
401
- return word && word.length < value;
402
- }
403
- }
404
- };
405
- </script>
406
-
407
- <style lang="scss" scoped>
408
- @import '@burh/nuxt-core/assets/sass/burh-ds/variables/_colors.scss';
409
-
410
- /deep/ .search-highlight {
411
- background: rgb(255, 252, 61);
412
- color: #000;
413
- }
414
-
415
- .content-middle {
416
- width: 50%;
417
- border-right: 1px solid #ececec5c;
418
- word-break: break-word !important;
419
- }
420
-
421
- .readmore {
422
- overflow: hidden;
423
- text-overflow: ellipsis;
424
- display: -webkit-box;
425
- -webkit-line-clamp: 3;
426
- -webkit-box-orient: vertical;
427
- }
428
-
429
- .tools {
430
- flex-wrap: wrap;
431
- button {
432
- width: 117px;
433
- height: 29px;
434
- border: none;
435
- margin-top: 15px;
436
-
437
- background: #4460F4;
438
- border-radius: 16px;
439
- color: #fff;
440
-
441
- font-size: 12px;
442
- font-weight: 600;
443
- outline: 0;
444
- }
445
- }
446
-
447
- .education {
448
- margin-top: 15px;
449
- }
450
-
451
- .experience {
452
- .description {
453
- font-size: 14px;
454
- color: #62778c;
455
- }
456
-
457
- a {
458
- margin-bottom: 1px;
459
- }
460
- }
461
-
462
- .sub-title {
463
- margin-bottom: 1px;
464
-
465
- font-weight: 600;
466
- font-size: 14px;
467
- line-height: 21px;
468
- color: #62778c;
469
- text-transform: uppercase;
470
- }
471
-
472
- .info-text {
473
- margin-bottom: 1px;
474
-
475
- font-size: 14px;
476
- color: #8da2b5;
477
- }
478
-
479
- .content-block {
480
- p {
481
- font-size: 14px;
482
- color: #62778c;
483
- }
484
- }
485
-
486
- .no-info {
487
- p {
488
- font-size: 0.875rem;
489
- color: #62778c;
490
- }
491
- }
492
-
493
- .disabled-button {
494
- opacity: 0.5;
495
- }
496
- </style>
1
+ <template>
2
+ <div class="bg-white content-middle">
3
+ <!-- FERRAMENTAS -->
4
+ <div class="tools mt-3">
5
+ <button
6
+ @click="
7
+ isLocked && tool.event !== 'share'
8
+ ? $emit('open-contact')
9
+ : $emit(tool.event)
10
+ "
11
+ class="ml-3 burh-color"
12
+ :class="{
13
+ 'disabled-button': isLocked && tool.event !== 'share'
14
+ }"
15
+ v-for="(tool, index) in tools"
16
+ :key="index"
17
+ >
18
+ <i
19
+ v-show="isLocked && tool.event !== 'share'"
20
+ class="fas fa-lock mr-1"
21
+ ></i>
22
+ {{ tool.name }}
23
+ </button>
24
+ </div>
25
+ <!-- SOBRE -->
26
+ <div class="about content-block mt-5 ml-3 mr-3">
27
+ <h5 class="font-weight-bold">Sobre</h5>
28
+ <p
29
+ id="USER_ABOUT"
30
+ class="mb-0"
31
+ :class="
32
+ !wordIsLesserThan(
33
+ userData.user_complementary_information.about
34
+ ) && 'readmore'
35
+ "
36
+ v-html="
37
+ highlightText(
38
+ search,
39
+ userData.user_complementary_information.about
40
+ )
41
+ "
42
+ ></p>
43
+ <a
44
+ href="#"
45
+ aria-label="expandir conteudo"
46
+ v-show="
47
+ userData.user_complementary_information.about &&
48
+ !wordIsLesserThan(
49
+ userData.user_complementary_information.about
50
+ )
51
+ "
52
+ @click.prevent.stop="toggleReadMore($event, 'USER_ABOUT')"
53
+ >Ler mais</a
54
+ >
55
+
56
+ <p v-show="!userData.user_complementary_information.about" class="">
57
+ Nenhuma informação adicionada
58
+ </p>
59
+ </div>
60
+ <!-- CONTATO -->
61
+ <h5 class="font-weight-bold mt-4 ml-3">Contatos</h5>
62
+ <div class="ml-3">
63
+ <span v-if="userData.email != null">Email: {{userData.email}}</span><br>
64
+ <span v-if="userData.user_contact.cellphone != null">Celular: {{userData.user_contact.cellphone}}</span><br>
65
+ <span v-if="userData.user_contact.phone != null">Telefone: {{userData.user_contact.phone}}</span>
66
+ </div>
67
+
68
+ <!-- EDUCAÇÃO -->
69
+ <h5 class="font-weight-bold mt-4 ml-3">Educação</h5>
70
+ <div
71
+ class="education ml-3"
72
+ v-show="userData.user_education.length > 0"
73
+ v-for="(edu, index) in userData.user_education"
74
+ :key="index"
75
+ >
76
+ <p
77
+ class="sub-title"
78
+ v-html="highlightText(search, edu.formation)"
79
+ ></p>
80
+ <p class="info-text">{{ edu.institution }}</p>
81
+ <span class="info-text">
82
+ {{ edu.start_month }}/{{ edu.start_year }} -
83
+ {{ treatEndDate(edu.end_month, edu.end_year) }}
84
+ {{ getTime(false, edu) }}
85
+ {{
86
+ edu.user_education_period
87
+ ? '-' + edu.user_education_period.name
88
+ : ''
89
+ }} </span
90
+ ><br />
91
+ <span
92
+ class="info-text"
93
+ v-html="
94
+ highlightText(
95
+ search,
96
+ edu.formation_level_id | formationLevel
97
+ )
98
+ "
99
+ ></span>
100
+ </div>
101
+
102
+ <!-- EXPERIÊNCIAS -->
103
+ <h5 class="font-weight-bold mt-4 ml-3">Experiência</h5>
104
+ <div
105
+ class="no-info ml-3"
106
+ v-show="userData.user_experience.length === 0"
107
+ >
108
+ <p>
109
+ Nenhuma informação adicionada
110
+ </p>
111
+ </div>
112
+ <div
113
+ v-show="userData.user_experience.length > 0"
114
+ class="experience ml-3 mr-3"
115
+ v-for="(exp, index) in userData.user_experience"
116
+ :key="`experience-${index}`"
117
+ >
118
+ <p
119
+ class="sub-title"
120
+ v-html="highlightText(search, exp.job_title)"
121
+ ></p>
122
+ <p
123
+ class="info-text"
124
+ v-html="
125
+ highlightText(search, `${exp.company}, ${exp.location}`)
126
+ "
127
+ ></p>
128
+ <span class="info-text">
129
+ {{ exp.start_month }}/{{ exp.start_year }} -
130
+ {{ treatEndDate(exp.end_month, exp.end_year) }}
131
+ {{ getTime(true, exp) }}
132
+ </span>
133
+
134
+ <p
135
+ :id="`USER_EXPERIENCE-${index}`"
136
+ class="description mt-4 mb-0"
137
+ :class="!wordIsLesserThan(exp.description) && 'readmore'"
138
+ v-html="highlightText(search, exp.description)"
139
+ ></p>
140
+
141
+ <a
142
+ href="#"
143
+ aria-label="expandir conteudo"
144
+ v-show="!wordIsLesserThan(exp.description)"
145
+ @click.prevent.stop="
146
+ toggleReadMore($event, `USER_EXPERIENCE-${index}`)
147
+ "
148
+ >Ler mais</a
149
+ ><br /><br />
150
+ </div>
151
+
152
+ <!-- CURSOS -->
153
+ <h5 class="font-weight-bold mt-1 ml-3">Cursos Complementares</h5>
154
+ <div class="no-info ml-3" v-show="userData.user_course.length === 0">
155
+ <p>
156
+ Nenhuma informação adicionada
157
+ </p>
158
+ </div>
159
+ <div
160
+ v-show="userData.user_course.length > 0"
161
+ class="courses ml-3"
162
+ v-for="(cou, index) in userData.user_course"
163
+ :key="`course-${index}`"
164
+ >
165
+ <p
166
+ class="sub-title"
167
+ v-html="highlightText(search, cou.institution)"
168
+ ></p>
169
+ <p
170
+ class="info-text mb-3"
171
+ v-html="
172
+ highlightText(
173
+ search,
174
+ `${cou.name} - ${cou.end_year || ''} ${getTime(
175
+ false,
176
+ cou
177
+ )}`
178
+ )
179
+ "
180
+ >
181
+ {{ cou.name }} - {{ cou.end_year }}
182
+ {{ getTime(false, cou) }}
183
+ </p>
184
+ </div>
185
+ </div>
186
+ </template>
187
+
188
+ <script>
189
+ import getPrefixes from '~/util/getPrefixes.js';
190
+
191
+ export default {
192
+ name: 'user-cv-middle',
193
+ props: {
194
+ userData: Object,
195
+ tools: {
196
+ type: Array,
197
+ default: () => []
198
+ },
199
+ search: {
200
+ type: String,
201
+ default: ''
202
+ }
203
+ },
204
+ filters: {
205
+ formationLevel(id) {
206
+ const typeFormation = {
207
+ 1: 'Ensino Médio',
208
+ 2: 'Ensino Técnico',
209
+ 3: 'Graduação',
210
+ 4: 'Pós-Graduação',
211
+ 5: 'Mestrado',
212
+ 6: 'Doutorado'
213
+ };
214
+
215
+ return typeFormation[id] || '-';
216
+ }
217
+ },
218
+ data() {
219
+ return {
220
+ isLocked: !this.companyHasProduct(
221
+ this.$store.state.loja.showableProducts['INTERACAO_USUARIO']
222
+ )
223
+ };
224
+ },
225
+ mounted() {
226
+ this.userData.user_experience = this.filterByDate(
227
+ this.userData.user_experience,
228
+ 'old'
229
+ );
230
+ this.userData.user_education = this.filterByDate(
231
+ this.userData.user_education,
232
+ 'old'
233
+ );
234
+ this.userData.user_course = this.filterByDate(
235
+ this.userData.user_course,
236
+ 'old'
237
+ );
238
+ },
239
+ watch: {
240
+ userData() {
241
+ this.userData.user_experience = this.filterByDate(
242
+ this.userData.user_experience,
243
+ 'old'
244
+ );
245
+ this.userData.user_education = this.filterByDate(
246
+ this.userData.user_education,
247
+ 'old'
248
+ );
249
+ this.userData.user_course = this.filterByDate(
250
+ this.userData.user_course,
251
+ 'old'
252
+ );
253
+ }
254
+ },
255
+ methods: {
256
+ highlightText(search, text) {
257
+ if (search.length < 2) return text;
258
+
259
+ const regex = new RegExp(search.toLowerCase(), 'gmi');
260
+ return String(text || '').replace(
261
+ regex,
262
+ `<span class="search-highlight">${search}</span>`
263
+ );
264
+ },
265
+ filterByDate(data, by = 'new') {
266
+ let sortedArray = data.sort((a, b) => {
267
+ a = [
268
+ a.start_month,
269
+ a.start_year,
270
+ a.end_month || 12,
271
+ a.end_year || 9999
272
+ ];
273
+
274
+ b = [
275
+ b.start_month,
276
+ b.start_year,
277
+ b.end_month || 12,
278
+ b.end_year || 9999
279
+ ];
280
+
281
+ // Primeiro filtro -> chaves: 0 e 1 -> Filtro por data de inicio
282
+ // Segundo filtro -> chaves: 2 e 3 -> Filtro por data de termino (subir não concluídos para primeiros)
283
+
284
+ let byStart;
285
+ let byEnd;
286
+
287
+ switch (by) {
288
+ case 'old':
289
+ byStart =
290
+ new Date(a[1], a[0], 1).getTime() -
291
+ new Date(b[1], b[0], 1).getTime();
292
+ byEnd =
293
+ new Date(b[3], b[2], 1).getTime() -
294
+ new Date(a[3], a[2], 1).getTime();
295
+ break;
296
+
297
+ default:
298
+ byStart =
299
+ new Date(b[1], b[0], 1).getTime() -
300
+ new Date(a[1], a[0], 1).getTime();
301
+ byEnd =
302
+ new Date(b[3], b[2], 1).getTime() -
303
+ new Date(a[3], a[2], 1).getTime();
304
+ break;
305
+ }
306
+
307
+ return byEnd - byStart;
308
+ });
309
+
310
+ return sortedArray;
311
+ },
312
+ toggleReadMore(event, id) {
313
+ const element = document.getElementById(id);
314
+ element.classList.toggle('readmore');
315
+ event.target.innerText == 'Ler mais'
316
+ ? (event.target.innerText = 'Esconder')
317
+ : (event.target.innerText = 'Ler mais');
318
+ },
319
+ getTime(
320
+ isExperience,
321
+ { start_year = null, end_year = null, start_month, end_month },
322
+ textHappening = 'Cursando'
323
+ ) {
324
+ const isHappening = !end_month && !end_year;
325
+
326
+ if (isHappening) {
327
+ return isExperience === true ? 'Atualmente' : textHappening;
328
+ }
329
+
330
+ const dateInitial = this.$moment(
331
+ ['1', start_month.toString(), start_year.toString()],
332
+ 'DD/MM/YYYY'
333
+ );
334
+ const dateDone = this.$moment(
335
+ ['1', end_month.toString(), end_year.toString()],
336
+ 'DD/MM/YYYY'
337
+ );
338
+ const diffDuration = this.$moment.duration(
339
+ dateDone.diff(dateInitial)
340
+ );
341
+ const years = diffDuration.years();
342
+ const months = diffDuration.months();
343
+
344
+ if (years) {
345
+ return years > 1 ? `(${years} anos)` : `(${years} ano)`;
346
+ }
347
+
348
+ return months > 1
349
+ ? `(${months} meses)`
350
+ : months == 1
351
+ ? `(${months} mês)`
352
+ : '';
353
+ },
354
+ languageLevel(level) {
355
+ switch (parseInt(level)) {
356
+ case 1:
357
+ return 'Iniciante';
358
+ case 2:
359
+ return 'Elementar';
360
+ case 3:
361
+ return 'Pré-intermediário';
362
+ case 4:
363
+ return 'Intermediário';
364
+ case 5:
365
+ return 'Intermediário Superior';
366
+ case 6:
367
+ return 'Avançado';
368
+ case 7:
369
+ return 'Fluente';
370
+ default:
371
+ return '';
372
+ }
373
+ },
374
+ treatPhone(phone) {
375
+ if (phone) {
376
+ if (phone == '0' || phone.length < 9 || !phone) {
377
+ return 'não cadastrado';
378
+ }
379
+ }
380
+
381
+ return phone;
382
+ },
383
+ treatCellphone(cellphone) {
384
+ if (cellphone) {
385
+ if (cellphone == '0' || cellphone.length < 11 || !cellphone) {
386
+ return 'não cadastrado';
387
+ }
388
+ }
389
+
390
+ return cellphone;
391
+ },
392
+ handleGetPrefixes(name = '') {
393
+ return getPrefixes(name);
394
+ },
395
+ treatEndDate(end_month, end_year) {
396
+ if (end_month && end_year) {
397
+ return `${end_month}/${end_year}`;
398
+ }
399
+ return '';
400
+ },
401
+ wordIsLesserThan(word, value = 300) {
402
+ return word && word.length < value;
403
+ }
404
+ }
405
+ };
406
+ </script>
407
+
408
+ <style lang="scss" scoped>
409
+ @import '@burh/nuxt-core/assets/sass/burh-ds/variables/_colors.scss';
410
+
411
+ /deep/ .search-highlight {
412
+ background: rgb(255, 252, 61);
413
+ color: #000;
414
+ }
415
+
416
+ .content-middle {
417
+ width: 50%;
418
+ border-right: 1px solid #ececec5c;
419
+ word-break: break-word !important;
420
+ }
421
+
422
+ .readmore {
423
+ overflow: hidden;
424
+ text-overflow: ellipsis;
425
+ display: -webkit-box;
426
+ -webkit-line-clamp: 3;
427
+ -webkit-box-orient: vertical;
428
+ }
429
+
430
+ .tools {
431
+ flex-wrap: wrap;
432
+ button {
433
+ width: 117px;
434
+ height: 29px;
435
+ border: none;
436
+ margin-top: 15px;
437
+
438
+ background: #4460F4;
439
+ border-radius: 16px;
440
+ color: #fff;
441
+
442
+ font-size: 12px;
443
+ font-weight: 600;
444
+ outline: 0;
445
+ }
446
+ }
447
+
448
+ .education {
449
+ margin-top: 15px;
450
+ }
451
+
452
+ .experience {
453
+ .description {
454
+ font-size: 14px;
455
+ color: #62778c;
456
+ }
457
+
458
+ a {
459
+ margin-bottom: 1px;
460
+ }
461
+ }
462
+
463
+ .sub-title {
464
+ margin-bottom: 1px;
465
+
466
+ font-weight: 600;
467
+ font-size: 14px;
468
+ line-height: 21px;
469
+ color: #62778c;
470
+ text-transform: uppercase;
471
+ }
472
+
473
+ .info-text {
474
+ margin-bottom: 1px;
475
+
476
+ font-size: 14px;
477
+ color: #8da2b5;
478
+ }
479
+
480
+ .content-block {
481
+ p {
482
+ font-size: 14px;
483
+ color: #62778c;
484
+ }
485
+ }
486
+
487
+ .no-info {
488
+ p {
489
+ font-size: 0.875rem;
490
+ color: #62778c;
491
+ }
492
+ }
493
+
494
+ .disabled-button {
495
+ opacity: 0.5;
496
+ }
497
+ </style>