@burh/nuxt-core 1.0.445 → 1.0.447

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,600 +1,593 @@
1
- <template>
2
- <div class="bg-white content-middle">
3
- <!-- FERRAMENTAS -->
4
- <div class="tools mt-3">
5
- <button
6
- v-for="(tool, index) in tools"
7
- :key="index"
8
- class="ml-3 burh-color"
9
- :class="{
10
- 'disabled-button': isLocked && !unlockedButtons.includes(tool.event)
11
- }"
12
- @click="
13
- isLocked && !unlockedButtons.includes(tool.event)
14
- ? $emit('open-contact')
15
- : tool.event !== 'moveTo' && $emit(tool.event)
16
- "
17
- >
18
- <template v-if="tool.event !== 'moveTo'">
19
- <i
20
- v-show="isLocked && tool.event !== 'share'"
21
- class="fas fa-lock mr-1"
22
- ></i>
23
- {{ tool.name }}
24
- </template>
25
- <template v-else-if="tool.event === 'moveTo'">
26
- <el-dropdown trigger="click" class="dropdown__content">
27
- <span class="title__content icon">
28
- {{tool.name}}
29
- <i class="fas fa-angle-down"></i>
30
- </span>
31
- <el-dropdown-menu slot="dropdown">
32
- <el-dropdown-item
33
- v-for="(tab, index) in moveToItems"
34
- :key="index"
35
- @click.native="$emit(tool.event, tab)"
36
- >
37
- <i class="fas fa-clipboard-list"></i>
38
- {{ tab.title }}
39
- </el-dropdown-item>
40
- </el-dropdown-menu>
41
- </el-dropdown>
42
- </template>
43
- </button>
44
- </div>
45
- <!-- SOBRE -->
46
- <div class="about content-block mt-5 ml-3 mr-3">
47
- <h5 class="font-weight-bold">Sobre</h5>
48
- <p
49
- v-if="userData && userData.user_complementary_information && userData.user_complementary_information.about || false"
50
- id="USER_ABOUT"
51
- class="mb-0"
52
- :class="
53
- !wordIsLesserThan(
54
- userData.user_complementary_information.about
55
- ) && 'readmore'
56
- "
57
- v-html="
58
- highlightText(
59
- search,
60
- userData.user_complementary_information.about
61
- )
62
- "
63
- ></p>
64
- <a
65
- href="#"
66
- aria-label="expandir conteudo"
67
- v-if="
68
- userData && userData.user_complementary_information && userData.user_complementary_information.about &&
69
- !wordIsLesserThan(
70
- userData.user_complementary_information.about
71
- ) || false
72
- "
73
- @click.prevent.stop="toggleReadMore($event, 'USER_ABOUT')"
74
- >Ler mais</a
75
- >
76
-
77
- <p v-if="userData && userData.user_complementary_information && userData.user_complementary_information.about || false" class="">
78
- Nenhuma informação adicionada
79
- </p>
80
- </div>
81
- <!-- CONTATO -->
82
- <h5 class="font-weight-bold mt-4 ml-3">Contatos</h5>
83
- <div class="ml-3 info-text">
84
- <span v-if="userData.email != null">Email: {{userData.email}}</span><br>
85
- <span v-if="userData.user_contact && userData.user_contact.cellphone != null && userData.user_contact.cellphone.length > 1 ">Celular: {{phoneMask(userData.user_contact.cellphone)}}</span><br>
86
- <span v-if="userData.user_contact && userData.user_contact.phone != null && userData.user_contact.phone.length > 1">Telefone: {{phoneMask(userData.user_contact.phone)}}</span>
87
- </div>
88
-
89
- <!-- EDUCAÇÃO -->
90
- <h5 class="font-weight-bold mt-4 ml-3">Educação</h5>
91
- <div
92
- class=" ml-3"
93
- v-show="userData.user_education.length > 0"
94
- v-for="(edu, index) in userData.user_education"
95
- :key="index"
96
- >
97
- <p
98
- class="sub-title"
99
- v-html="highlightText(search, edu.formation)"
100
- ></p>
101
- <p class="info-text">{{ edu.institution }}</p>
102
- <span class="info-text">
103
- {{ edu.start_month }}/{{ edu.start_year }} -
104
- {{ treatEndDate(edu.end_month, edu.end_year) }}
105
- {{ getTime(false, edu) }}
106
- {{
107
- edu.user_education_period
108
- ? '-' + edu.user_education_period.name
109
- : ''
110
- }} </span
111
- ><br />
112
- <span
113
- class="info-text"
114
- >
115
- {{edu.formation_level_id | formationLevel}}
116
- </span>
117
- </div>
118
-
119
- <!-- EXPERIÊNCIAS -->
120
- <h5 class="font-weight-bold mt-4 ml-3">Experiência</h5>
121
- <div
122
- class="no-info ml-3"
123
- v-show="userData.user_experience.length === 0"
124
- >
125
- <p>
126
- Nenhuma informação adicionada
127
- </p>
128
- </div>
129
- <div
130
- v-show="userData.user_experience.length > 0"
131
- class="experience ml-3 mr-3"
132
- v-for="(exp, index) in userData.user_experience"
133
- :key="`experience-${index}`"
134
- >
135
- <p
136
- class="sub-title"
137
- v-html="highlightText(search, exp.job_title)"
138
- ></p>
139
- <p
140
- class="info-text"
141
- v-html="
142
- highlightText(search, `${exp.company}, ${exp.location}`)
143
- "
144
- ></p>
145
- <span class="info-text">
146
- {{ exp.start_month }}/{{ exp.start_year }} -
147
- {{ treatEndDate(exp.end_month, exp.end_year) }}
148
- {{ getTime(true, exp) }}
149
- </span>
150
-
151
- <p
152
- :id="`USER_EXPERIENCE-${index}`"
153
- class="description mt-4 mb-0"
154
- :class="!wordIsLesserThan(exp.description) && 'readmore'"
155
- v-html="highlightText(search, exp.description)"
156
- ></p>
157
-
158
- <a
159
- href="#"
160
- aria-label="expandir conteudo"
161
- v-show="!wordIsLesserThan(exp.description)"
162
- @click.prevent.stop="
163
- toggleReadMore($event, `USER_EXPERIENCE-${index}`)
164
- "
165
- >Ler mais</a
166
- ><br /><br />
167
- </div>
168
-
169
- <!-- CURSOS -->
170
- <h5 class="font-weight-bold mt-1 ml-3">Cursos Complementares</h5>
171
- <div class="no-info ml-3" v-show="userData.user_course.length === 0">
172
- <p>
173
- Nenhuma informação adicionada
174
- </p>
175
- </div>
176
- <div
177
- v-show="userData.user_course.length > 0"
178
- class="courses ml-3"
179
- v-for="(cou, index) in userData.user_course"
180
- :key="`course-${index}`"
181
- >
182
- <p
183
- class="sub-title"
184
- v-html="highlightText(search, cou.institution)"
185
- ></p>
186
- <p
187
- class="info-text mb-3"
188
- v-html="
189
- highlightText(
190
- search,
191
- `${cou.name} - ${cou.end_year || ''} ${getTime(
192
- false,
193
- cou
194
- )}`
195
- )
196
- "
197
- >
198
- {{ cou.name }} - {{ cou.end_year }}
199
- {{ getTime(false, cou) }}
200
- </p>
201
- </div>
202
- </div>
203
- </template>
204
-
205
- <script>
206
- import getPrefixes from '~/util/getPrefixes.js';
207
- import { mask } from 'vue-the-mask';
208
- import { Dropdown, DropdownMenu, DropdownItem } from 'element-ui';
209
-
210
- export default {
211
- name: 'user-cv-middle',
212
- directives: { mask },
213
- props: {
214
- userData: Object,
215
- tools: {
216
- type: Array,
217
- default: () => []
218
- },
219
- search: {
220
- type: String,
221
- default: ''
222
- },
223
- moveToItems: {
224
- type: Array,
225
- default: () => [
226
- {
227
- id: 1,
228
- name: 'applieds',
229
- title: 'Inscritos'
230
- },
231
- {
232
- id: 3,
233
- name: 'selecteds',
234
- title: 'Selecionados'
235
- },
236
- {
237
- id: 5,
238
- name: 'hireds',
239
- title: 'Contratados'
240
- },
241
- {
242
- id: 4,
243
- name: 'other',
244
- title: 'Reprovado'
245
- }
246
- ]
247
- }
248
- },
249
- filters: {
250
- formationLevel(id) {
251
- const typeFormation = {
252
- 1: 'Ensino Médio',
253
- 2: 'Ensino Técnico',
254
- 3: 'Graduação',
255
- 4: 'Pós-Graduação',
256
- 5: 'Mestrado',
257
- 6: 'Doutorado',
258
- 8: 'Ensino Fundamental'
259
- };
260
-
261
- return typeFormation[id] || '-';
262
- }
263
- },
264
- components: {
265
- ElDropdown: Dropdown,
266
- ElDropdownMenu: DropdownMenu,
267
- ElDropdownItem: DropdownItem
268
- },
269
- data() {
270
- return {
271
- isLocked: !this.companyHasProduct(
272
- this.$store.state.loja && this.$store.state.loja.showableProducts && this.$store.state.loja.showableProducts['INTERACAO_USUARIO'] || false
273
- ),
274
- unlockedButtons: ['share', 'moveTo']
275
- };
276
- },
277
- mounted() {
278
- this.userData.user_experience = this.filterByDate(
279
- this.userData.user_experience,
280
- 'old'
281
- );
282
- this.userData.user_education = this.filterByDate(
283
- this.userData.user_education,
284
- 'old'
285
- );
286
- this.userData.user_course = this.filterByDate(
287
- this.userData.user_course,
288
- 'old'
289
- );
290
- },
291
- watch: {
292
- userData() {
293
- this.userData.user_experience = this.filterByDate(
294
- this.userData.user_experience,
295
- 'old'
296
- );
297
- this.userData.user_education = this.filterByDate(
298
- this.userData.user_education,
299
- 'old'
300
- );
301
- this.userData.user_course = this.filterByDate(
302
- this.userData.user_course,
303
- 'old'
304
- );
305
- }
306
- },
307
- methods: {
308
- phoneMask(v) {
309
-
310
- let r = v.replace(/\D/g, '');
311
- r = r.replace(/^0/, '');
312
-
313
- if (r.length > 11) {
314
- r = r.replace(/^(\d\d)(\d{5})(\d{4}).*/, '($1) $2-$3');
315
- } else if (r.length > 7) {
316
- r = r.replace(/^(\d\d)(\d{5})(\d{0,4}).*/, '($1) $2-$3');
317
- } else if (r.length > 2) {
318
- r = r.replace(/^(\d\d)(\d{0,5})/, '($1) $2');
319
- } else if (v.trim() !== '') {
320
- r = r.replace(/^(\d*)/, '($1');
321
- }
322
- return r;
323
- },
324
- highlightText(search, text) {
325
- if (search.length < 2) return text;
326
-
327
- const regex = new RegExp(search.toLowerCase(), 'gmi');
328
- return String(text || '').replace(
329
- regex,
330
- `<span class="search-highlight">${search}</span>`
331
- );
332
- },
333
- filterByDate(data, by = 'new') {
334
- let sortedArray = data.sort((a, b) => {
335
- a = [
336
- a.start_month,
337
- a.start_year,
338
- a.end_month || 12,
339
- a.end_year || 9999
340
- ];
341
-
342
- b = [
343
- b.start_month,
344
- b.start_year,
345
- b.end_month || 12,
346
- b.end_year || 9999
347
- ];
348
-
349
- // Primeiro filtro -> chaves: 0 e 1 -> Filtro por data de inicio
350
- // Segundo filtro -> chaves: 2 e 3 -> Filtro por data de termino (subir não concluídos para primeiros)
351
-
352
- let byStart;
353
- let byEnd;
354
-
355
- switch (by) {
356
- case 'old':
357
- byStart =
358
- new Date(a[1], a[0], 1).getTime() -
359
- new Date(b[1], b[0], 1).getTime();
360
- byEnd =
361
- new Date(b[3], b[2], 1).getTime() -
362
- new Date(a[3], a[2], 1).getTime();
363
- break;
364
-
365
- default:
366
- byStart =
367
- new Date(b[1], b[0], 1).getTime() -
368
- new Date(a[1], a[0], 1).getTime();
369
- byEnd =
370
- new Date(b[3], b[2], 1).getTime() -
371
- new Date(a[3], a[2], 1).getTime();
372
- break;
373
- }
374
-
375
- return byEnd - byStart;
376
- });
377
-
378
- return sortedArray;
379
- },
380
- toggleReadMore(event, id) {
381
- const element = document.getElementById(id);
382
- element.classList.toggle('readmore');
383
- event.target.innerText == 'Ler mais'
384
- ? (event.target.innerText = 'Esconder')
385
- : (event.target.innerText = 'Ler mais');
386
- },
387
- getTime(
388
- isExperience,
389
- { start_year = null, end_year = null, start_month, end_month },
390
- textHappening = 'Cursando'
391
- ) {
392
- const isHappening = !end_month && !end_year;
393
-
394
- if (isHappening) {
395
- return isExperience === true ? 'Atualmente' : textHappening;
396
- }
397
-
398
- const dateInitial = this.$moment(
399
- ['1', start_month.toString(), start_year.toString()],
400
- 'DD/MM/YYYY'
401
- );
402
- const dateDone = this.$moment(
403
- ['1', end_month.toString(), end_year.toString()],
404
- 'DD/MM/YYYY'
405
- );
406
- const diffDuration = this.$moment.duration(
407
- dateDone.diff(dateInitial)
408
- );
409
- const years = diffDuration.years();
410
- const months = diffDuration.months();
411
-
412
- if (years) {
413
- return years > 1 ? `(${years} anos)` : `(${years} ano)`;
414
- }
415
-
416
- return months > 1
417
- ? `(${months} meses)`
418
- : months == 1
419
- ? `(${months} mês)`
420
- : '';
421
- },
422
- languageLevel(level) {
423
- switch (parseInt(level)) {
424
- case 1:
425
- return 'Iniciante';
426
- case 2:
427
- return 'Elementar';
428
- case 3:
429
- return 'Pré-intermediário';
430
- case 4:
431
- return 'Intermediário';
432
- case 5:
433
- return 'Intermediário Superior';
434
- case 6:
435
- return 'Avançado';
436
- case 7:
437
- return 'Fluente';
438
- default:
439
- return '';
440
- }
441
- },
442
- treatPhone(phone) {
443
- if (phone) {
444
- if (phone == '0' || phone.length < 9 || !phone) {
445
- return 'não cadastrado';
446
- }
447
- }
448
-
449
- return phone;
450
- },
451
- treatCellphone(cellphone) {
452
- if (cellphone) {
453
- if (cellphone == '0' || cellphone.length < 11 || !cellphone) {
454
- return 'não cadastrado';
455
- }
456
- }
457
-
458
- return cellphone;
459
- },
460
- handleGetPrefixes(name = '') {
461
- return getPrefixes(name);
462
- },
463
- treatEndDate(end_month, end_year) {
464
- if (end_month && end_year) {
465
- return `${end_month}/${end_year}`;
466
- }
467
- return '';
468
- },
469
- wordIsLesserThan(word, value = 300) {
470
- return word && word.length < value;
471
- }
472
- }
473
- };
474
- </script>
475
-
476
- <style lang="scss" scoped>
477
- @import '@burh/nuxt-core/assets/sass/burh-ds/variables/_colors.scss';
478
-
479
- /deep/ .dropdown__content {
480
- &, .title__content {
481
- width: 100%;
482
- height: 100%;
483
- display: grid;
484
- place-items: center;
485
- }
486
- .title__content.icon {
487
- grid-template-columns: 1fr 10px;
488
- flex-direction: row;
489
- align-items: center;
490
- justify-content: space-between;
491
- color: #fff;
492
- font-weight: 600;
493
- font-size: 12px;
494
- margin: 0!important;
495
- i {
496
- font-size: 1rem;
497
- margin-left: 10px;
498
- }
499
- }
500
- }
501
-
502
- /deep/ .search-highlight {
503
- background: rgb(255, 252, 61);
504
- color: #000;
505
- }
506
-
507
- .content-middle {
508
- width: 50%;
509
- border-right: 1px solid #ececec5c;
510
- word-break: break-word !important;
511
- }
512
-
513
- .readmore {
514
- overflow: hidden;
515
- text-overflow: ellipsis;
516
- display: -webkit-box;
517
- -webkit-line-clamp: 3;
518
- -webkit-box-orient: vertical;
519
- }
520
-
521
- .tools {
522
- flex-wrap: wrap;
523
- display: grid;
524
- align-items: center;
525
- justify-content: space-between;
526
- grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
527
- gap: 10px;
528
- padding-right: 20px;
529
- button {
530
- display: flex;
531
- align-items: center;
532
- justify-content: center;
533
-
534
- margin-left: 0!important;
535
-
536
- height: 29px;
537
- border: none;
538
-
539
- background: #5865F2;
540
- border-radius: 16px;
541
- color: #fff;
542
-
543
- font-size: 12px;
544
- font-weight: 600;
545
- outline: 0;
546
-
547
- padding: 0 20px;
548
- }
549
- }
550
-
551
- .education {
552
- margin-top: 15px;
553
- }
554
-
555
- .experience {
556
- .description {
557
- font-size: 14px;
558
- color: #62778c;
559
- }
560
-
561
- a {
562
- margin-bottom: 1px;
563
- }
564
- }
565
-
566
- .sub-title {
567
- margin-bottom: 1px;
568
-
569
- font-weight: 600;
570
- font-size: 14px;
571
- line-height: 21px;
572
- color: #62778c;
573
- text-transform: uppercase;
574
- }
575
-
576
- .info-text {
577
- margin-bottom: 1px;
578
-
579
- font-size: 14px;
580
- color: #8da2b5;
581
- }
582
-
583
- .content-block {
584
- p {
585
- font-size: 14px;
586
- color: #62778c;
587
- }
588
- }
589
-
590
- .no-info {
591
- p {
592
- font-size: 0.875rem;
593
- color: #62778c;
594
- }
595
- }
596
-
597
- .disabled-button {
598
- opacity: 0.5;
599
- }
600
- </style>
1
+ <template>
2
+ <div class="bg-white content-middle">
3
+ <!-- FERRAMENTAS -->
4
+ <div class="tools mt-3">
5
+ <button
6
+ v-for="(tool, index) in tools"
7
+ :key="index"
8
+ class="ml-3 burh-color"
9
+ @click="
10
+ isLocked && !unlockedButtons.includes(tool.event)
11
+ ? $emit('open-contact')
12
+ : tool.event !== 'moveTo' && $emit(tool.event)
13
+ "
14
+ >
15
+ <template v-if="tool.event !== 'moveTo'">
16
+ <i
17
+ v-show="isLocked && tool.event !== 'share'"
18
+ class="fas fa-lock mr-1"
19
+ ></i>
20
+ {{ tool.name }}
21
+ </template>
22
+ <template v-else-if="tool.event === 'moveTo'">
23
+ <el-dropdown trigger="click" class="dropdown__content">
24
+ <span class="title__content icon">
25
+ {{tool.name}}
26
+ <i class="fas fa-angle-down"></i>
27
+ </span>
28
+ <el-dropdown-menu slot="dropdown">
29
+ <el-dropdown-item
30
+ v-for="(tab, index) in moveToItems"
31
+ :key="index"
32
+ @click.native="$emit(tool.event, tab)"
33
+ >
34
+ <i class="fas fa-clipboard-list"></i>
35
+ {{ tab.title }}
36
+ </el-dropdown-item>
37
+ </el-dropdown-menu>
38
+ </el-dropdown>
39
+ </template>
40
+ </button>
41
+ </div>
42
+ <!-- SOBRE -->
43
+ <div class="about content-block mt-5 ml-3 mr-3">
44
+ <h5 class="font-weight-bold">Sobre</h5>
45
+ <p
46
+ v-if="userData && userData.user_complementary_information && userData.user_complementary_information.about || false"
47
+ id="USER_ABOUT"
48
+ class="mb-0"
49
+ :class="
50
+ !wordIsLesserThan(
51
+ userData.user_complementary_information.about
52
+ ) && 'readmore'
53
+ "
54
+ v-html="
55
+ highlightText(
56
+ search,
57
+ userData.user_complementary_information.about
58
+ )
59
+ "
60
+ ></p>
61
+ <a
62
+ href="#"
63
+ aria-label="expandir conteudo"
64
+ v-if="
65
+ userData && userData.user_complementary_information && userData.user_complementary_information.about &&
66
+ !wordIsLesserThan(
67
+ userData.user_complementary_information.about
68
+ ) || false
69
+ "
70
+ @click.prevent.stop="toggleReadMore($event, 'USER_ABOUT')"
71
+ >Ler mais</a
72
+ >
73
+
74
+ <p v-if="userData && userData.user_complementary_information && userData.user_complementary_information.about || false" class="">
75
+ Nenhuma informação adicionada
76
+ </p>
77
+ </div>
78
+ <!-- CONTATO -->
79
+ <h5 class="font-weight-bold mt-4 ml-3">Contatos</h5>
80
+ <div class="ml-3 info-text">
81
+ <span v-if="userData.email != null">Email: {{userData.email}}</span><br>
82
+ <span v-if="userData.user_contact && userData.user_contact.cellphone != null && userData.user_contact.cellphone.length > 1 ">Celular: {{phoneMask(userData.user_contact.cellphone)}}</span><br>
83
+ <span v-if="userData.user_contact && userData.user_contact.phone != null && userData.user_contact.phone.length > 1">Telefone: {{phoneMask(userData.user_contact.phone)}}</span>
84
+ </div>
85
+
86
+ <!-- EDUCAÇÃO -->
87
+ <h5 class="font-weight-bold mt-4 ml-3">Educação</h5>
88
+ <div
89
+ class=" ml-3"
90
+ v-show="userData.user_education.length > 0"
91
+ v-for="(edu, index) in userData.user_education"
92
+ :key="index"
93
+ >
94
+ <p
95
+ class="sub-title"
96
+ v-html="highlightText(search, edu.formation)"
97
+ ></p>
98
+ <p class="info-text">{{ edu.institution }}</p>
99
+ <span class="info-text">
100
+ {{ edu.start_month }}/{{ edu.start_year }} -
101
+ {{ treatEndDate(edu.end_month, edu.end_year) }}
102
+ {{ getTime(false, edu) }}
103
+ {{
104
+ edu.user_education_period
105
+ ? '-' + edu.user_education_period.name
106
+ : ''
107
+ }} </span
108
+ ><br />
109
+ <span
110
+ class="info-text"
111
+ >
112
+ {{edu.formation_level_id | formationLevel}}
113
+ </span>
114
+ </div>
115
+
116
+ <!-- EXPERIÊNCIAS -->
117
+ <h5 class="font-weight-bold mt-4 ml-3">Experiência</h5>
118
+ <div
119
+ class="no-info ml-3"
120
+ v-show="userData.user_experience.length === 0"
121
+ >
122
+ <p>
123
+ Nenhuma informação adicionada
124
+ </p>
125
+ </div>
126
+ <div
127
+ v-show="userData.user_experience.length > 0"
128
+ class="experience ml-3 mr-3"
129
+ v-for="(exp, index) in userData.user_experience"
130
+ :key="`experience-${index}`"
131
+ >
132
+ <p
133
+ class="sub-title"
134
+ v-html="highlightText(search, exp.job_title)"
135
+ ></p>
136
+ <p
137
+ class="info-text"
138
+ v-html="
139
+ highlightText(search, `${exp.company}, ${exp.location}`)
140
+ "
141
+ ></p>
142
+ <span class="info-text">
143
+ {{ exp.start_month }}/{{ exp.start_year }} -
144
+ {{ treatEndDate(exp.end_month, exp.end_year) }}
145
+ {{ getTime(true, exp) }}
146
+ </span>
147
+
148
+ <p
149
+ :id="`USER_EXPERIENCE-${index}`"
150
+ class="description mt-4 mb-0"
151
+ :class="!wordIsLesserThan(exp.description) && 'readmore'"
152
+ v-html="highlightText(search, exp.description)"
153
+ ></p>
154
+
155
+ <a
156
+ href="#"
157
+ aria-label="expandir conteudo"
158
+ v-show="!wordIsLesserThan(exp.description)"
159
+ @click.prevent.stop="
160
+ toggleReadMore($event, `USER_EXPERIENCE-${index}`)
161
+ "
162
+ >Ler mais</a
163
+ ><br /><br />
164
+ </div>
165
+
166
+ <!-- CURSOS -->
167
+ <h5 class="font-weight-bold mt-1 ml-3">Cursos Complementares</h5>
168
+ <div class="no-info ml-3" v-show="userData.user_course.length === 0">
169
+ <p>
170
+ Nenhuma informação adicionada
171
+ </p>
172
+ </div>
173
+ <div
174
+ v-show="userData.user_course.length > 0"
175
+ class="courses ml-3"
176
+ v-for="(cou, index) in userData.user_course"
177
+ :key="`course-${index}`"
178
+ >
179
+ <p
180
+ class="sub-title"
181
+ v-html="highlightText(search, cou.institution)"
182
+ ></p>
183
+ <p
184
+ class="info-text mb-3"
185
+ v-html="
186
+ highlightText(
187
+ search,
188
+ `${cou.name} - ${cou.end_year || ''} ${getTime(
189
+ false,
190
+ cou
191
+ )}`
192
+ )
193
+ "
194
+ >
195
+ {{ cou.name }} - {{ cou.end_year }}
196
+ {{ getTime(false, cou) }}
197
+ </p>
198
+ </div>
199
+ </div>
200
+ </template>
201
+
202
+ <script>
203
+ import getPrefixes from '~/util/getPrefixes.js';
204
+ import { mask } from 'vue-the-mask';
205
+ import { Dropdown, DropdownMenu, DropdownItem } from 'element-ui';
206
+
207
+ export default {
208
+ name: 'user-cv-middle',
209
+ directives: { mask },
210
+ props: {
211
+ userData: Object,
212
+ tools: {
213
+ type: Array,
214
+ default: () => []
215
+ },
216
+ search: {
217
+ type: String,
218
+ default: ''
219
+ },
220
+ moveToItems: {
221
+ type: Array,
222
+ default: () => [
223
+ {
224
+ id: 1,
225
+ name: 'applieds',
226
+ title: 'Inscritos'
227
+ },
228
+ {
229
+ id: 3,
230
+ name: 'selecteds',
231
+ title: 'Selecionados'
232
+ },
233
+ {
234
+ id: 5,
235
+ name: 'hireds',
236
+ title: 'Contratados'
237
+ },
238
+ {
239
+ id: 4,
240
+ name: 'other',
241
+ title: 'Reprovado'
242
+ }
243
+ ]
244
+ }
245
+ },
246
+ filters: {
247
+ formationLevel(id) {
248
+ const typeFormation = {
249
+ 1: 'Ensino Médio',
250
+ 2: 'Ensino Técnico',
251
+ 3: 'Graduação',
252
+ 4: 'Pós-Graduação',
253
+ 5: 'Mestrado',
254
+ 6: 'Doutorado',
255
+ 8: 'Ensino Fundamental'
256
+ };
257
+
258
+ return typeFormation[id] || '-';
259
+ }
260
+ },
261
+ components: {
262
+ ElDropdown: Dropdown,
263
+ ElDropdownMenu: DropdownMenu,
264
+ ElDropdownItem: DropdownItem
265
+ },
266
+ data() {
267
+ return {
268
+ isLocked: !this.companyHasProduct(
269
+ this.$store.state.loja && this.$store.state.loja.showableProducts && this.$store.state.loja.showableProducts['INTERACAO_USUARIO'] || false
270
+ ),
271
+ unlockedButtons: ['share', 'moveTo']
272
+ };
273
+ },
274
+ mounted() {
275
+ this.userData.user_experience = this.filterByDate(
276
+ this.userData.user_experience,
277
+ 'old'
278
+ );
279
+ this.userData.user_education = this.filterByDate(
280
+ this.userData.user_education,
281
+ 'old'
282
+ );
283
+ this.userData.user_course = this.filterByDate(
284
+ this.userData.user_course,
285
+ 'old'
286
+ );
287
+ },
288
+ watch: {
289
+ userData() {
290
+ this.userData.user_experience = this.filterByDate(
291
+ this.userData.user_experience,
292
+ 'old'
293
+ );
294
+ this.userData.user_education = this.filterByDate(
295
+ this.userData.user_education,
296
+ 'old'
297
+ );
298
+ this.userData.user_course = this.filterByDate(
299
+ this.userData.user_course,
300
+ 'old'
301
+ );
302
+ }
303
+ },
304
+ methods: {
305
+ phoneMask(v) {
306
+
307
+ let r = v.replace(/\D/g, '');
308
+ r = r.replace(/^0/, '');
309
+
310
+ if (r.length > 11) {
311
+ r = r.replace(/^(\d\d)(\d{5})(\d{4}).*/, '($1) $2-$3');
312
+ } else if (r.length > 7) {
313
+ r = r.replace(/^(\d\d)(\d{5})(\d{0,4}).*/, '($1) $2-$3');
314
+ } else if (r.length > 2) {
315
+ r = r.replace(/^(\d\d)(\d{0,5})/, '($1) $2');
316
+ } else if (v.trim() !== '') {
317
+ r = r.replace(/^(\d*)/, '($1');
318
+ }
319
+ return r;
320
+ },
321
+ highlightText(search, text) {
322
+ if (search.length < 2) return text;
323
+
324
+ const regex = new RegExp(search.toLowerCase(), 'gmi');
325
+ return String(text || '').replace(
326
+ regex,
327
+ `<span class="search-highlight">${search}</span>`
328
+ );
329
+ },
330
+ filterByDate(data, by = 'new') {
331
+ let sortedArray = data.sort((a, b) => {
332
+ a = [
333
+ a.start_month,
334
+ a.start_year,
335
+ a.end_month || 12,
336
+ a.end_year || 9999
337
+ ];
338
+
339
+ b = [
340
+ b.start_month,
341
+ b.start_year,
342
+ b.end_month || 12,
343
+ b.end_year || 9999
344
+ ];
345
+
346
+ // Primeiro filtro -> chaves: 0 e 1 -> Filtro por data de inicio
347
+ // Segundo filtro -> chaves: 2 e 3 -> Filtro por data de termino (subir não concluídos para primeiros)
348
+
349
+ let byStart;
350
+ let byEnd;
351
+
352
+ switch (by) {
353
+ case 'old':
354
+ byStart =
355
+ new Date(a[1], a[0], 1).getTime() -
356
+ new Date(b[1], b[0], 1).getTime();
357
+ byEnd =
358
+ new Date(b[3], b[2], 1).getTime() -
359
+ new Date(a[3], a[2], 1).getTime();
360
+ break;
361
+
362
+ default:
363
+ byStart =
364
+ new Date(b[1], b[0], 1).getTime() -
365
+ new Date(a[1], a[0], 1).getTime();
366
+ byEnd =
367
+ new Date(b[3], b[2], 1).getTime() -
368
+ new Date(a[3], a[2], 1).getTime();
369
+ break;
370
+ }
371
+
372
+ return byEnd - byStart;
373
+ });
374
+
375
+ return sortedArray;
376
+ },
377
+ toggleReadMore(event, id) {
378
+ const element = document.getElementById(id);
379
+ element.classList.toggle('readmore');
380
+ event.target.innerText == 'Ler mais'
381
+ ? (event.target.innerText = 'Esconder')
382
+ : (event.target.innerText = 'Ler mais');
383
+ },
384
+ getTime(
385
+ isExperience,
386
+ { start_year = null, end_year = null, start_month, end_month },
387
+ textHappening = 'Cursando'
388
+ ) {
389
+ const isHappening = !end_month && !end_year;
390
+
391
+ if (isHappening) {
392
+ return isExperience === true ? 'Atualmente' : textHappening;
393
+ }
394
+
395
+ const dateInitial = this.$moment(
396
+ ['1', start_month.toString(), start_year.toString()],
397
+ 'DD/MM/YYYY'
398
+ );
399
+ const dateDone = this.$moment(
400
+ ['1', end_month.toString(), end_year.toString()],
401
+ 'DD/MM/YYYY'
402
+ );
403
+ const diffDuration = this.$moment.duration(
404
+ dateDone.diff(dateInitial)
405
+ );
406
+ const years = diffDuration.years();
407
+ const months = diffDuration.months();
408
+
409
+ if (years) {
410
+ return years > 1 ? `(${years} anos)` : `(${years} ano)`;
411
+ }
412
+
413
+ return months > 1
414
+ ? `(${months} meses)`
415
+ : months == 1
416
+ ? `(${months} mês)`
417
+ : '';
418
+ },
419
+ languageLevel(level) {
420
+ switch (parseInt(level)) {
421
+ case 1:
422
+ return 'Iniciante';
423
+ case 2:
424
+ return 'Elementar';
425
+ case 3:
426
+ return 'Pré-intermediário';
427
+ case 4:
428
+ return 'Intermediário';
429
+ case 5:
430
+ return 'Intermediário Superior';
431
+ case 6:
432
+ return 'Avançado';
433
+ case 7:
434
+ return 'Fluente';
435
+ default:
436
+ return '';
437
+ }
438
+ },
439
+ treatPhone(phone) {
440
+ if (phone) {
441
+ if (phone == '0' || phone.length < 9 || !phone) {
442
+ return 'não cadastrado';
443
+ }
444
+ }
445
+
446
+ return phone;
447
+ },
448
+ treatCellphone(cellphone) {
449
+ if (cellphone) {
450
+ if (cellphone == '0' || cellphone.length < 11 || !cellphone) {
451
+ return 'não cadastrado';
452
+ }
453
+ }
454
+
455
+ return cellphone;
456
+ },
457
+ handleGetPrefixes(name = '') {
458
+ return getPrefixes(name);
459
+ },
460
+ treatEndDate(end_month, end_year) {
461
+ if (end_month && end_year) {
462
+ return `${end_month}/${end_year}`;
463
+ }
464
+ return '';
465
+ },
466
+ wordIsLesserThan(word, value = 300) {
467
+ return word && word.length < value;
468
+ }
469
+ }
470
+ };
471
+ </script>
472
+
473
+ <style lang="scss" scoped>
474
+ @import '@burh/nuxt-core/assets/sass/burh-ds/variables/_colors.scss';
475
+
476
+ /deep/ .dropdown__content {
477
+ &, .title__content {
478
+ width: 100%;
479
+ height: 100%;
480
+ display: grid;
481
+ place-items: center;
482
+ }
483
+ .title__content.icon {
484
+ grid-template-columns: 1fr 10px;
485
+ flex-direction: row;
486
+ align-items: center;
487
+ justify-content: space-between;
488
+ color: #fff;
489
+ font-weight: 600;
490
+ font-size: 12px;
491
+ margin: 0!important;
492
+ i {
493
+ font-size: 1rem;
494
+ margin-left: 10px;
495
+ }
496
+ }
497
+ }
498
+
499
+ /deep/ .search-highlight {
500
+ background: rgb(255, 252, 61);
501
+ color: #000;
502
+ }
503
+
504
+ .content-middle {
505
+ width: 50%;
506
+ border-right: 1px solid #ececec5c;
507
+ word-break: break-word !important;
508
+ }
509
+
510
+ .readmore {
511
+ overflow: hidden;
512
+ text-overflow: ellipsis;
513
+ display: -webkit-box;
514
+ -webkit-line-clamp: 3;
515
+ -webkit-box-orient: vertical;
516
+ }
517
+
518
+ .tools {
519
+ flex-wrap: wrap;
520
+ display: grid;
521
+ align-items: center;
522
+ justify-content: space-between;
523
+ grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
524
+ gap: 10px;
525
+ padding-right: 20px;
526
+ button {
527
+ display: flex;
528
+ align-items: center;
529
+ justify-content: center;
530
+
531
+ margin-left: 0!important;
532
+
533
+ height: 29px;
534
+ border: none;
535
+
536
+ background: #5865F2;
537
+ border-radius: 16px;
538
+ color: #fff;
539
+
540
+ font-size: 0.75rem;
541
+ font-weight: 600;
542
+ outline: 0;
543
+
544
+ padding: 0 20px;
545
+ }
546
+ }
547
+
548
+ .education {
549
+ margin-top: 15px;
550
+ }
551
+
552
+ .experience {
553
+ .description {
554
+ font-size: 14px;
555
+ color: #62778c;
556
+ }
557
+
558
+ a {
559
+ margin-bottom: 1px;
560
+ }
561
+ }
562
+
563
+ .sub-title {
564
+ margin-bottom: 1px;
565
+
566
+ font-weight: 600;
567
+ font-size: 14px;
568
+ line-height: 21px;
569
+ color: #62778c;
570
+ text-transform: uppercase;
571
+ }
572
+
573
+ .info-text {
574
+ margin-bottom: 1px;
575
+
576
+ font-size: 14px;
577
+ color: #8da2b5;
578
+ }
579
+
580
+ .content-block {
581
+ p {
582
+ font-size: 14px;
583
+ color: #62778c;
584
+ }
585
+ }
586
+
587
+ .no-info {
588
+ p {
589
+ font-size: 0.875rem;
590
+ color: #62778c;
591
+ }
592
+ }
593
+ </style>
@@ -8,7 +8,7 @@
8
8
  >
9
9
  <template>
10
10
  <div class="row d-flex justify-content-between mx-0 user-pdf">
11
- <img v-if="!isLoading && coverPhoto" :src="coverPhoto" alt="" class="img__color" onerror="this.src = ''" />
11
+ <img v-if="!isLoading && coverPhoto" :src="coverPhoto" alt="" class="img__color" @error="() => coverPhoto = null" />
12
12
  <div v-else class="no-cover-photo"></div>
13
13
  <slot name="content"></slot>
14
14
  </div>
@@ -10,9 +10,9 @@
10
10
 
11
11
  <div class="plan__modal">
12
12
  <section class="plan__information">
13
- <div class="plan__information--img" draggable="false">
13
+ <!-- <div class="plan__information--img" draggable="false">
14
14
  <img src="/img/lis.png" alt="Customer Success" draggable="false">
15
- </div>
15
+ </div> -->
16
16
  <h4>
17
17
  Você vai amar o Plano Empresas. <br />
18
18
  Dê um Upgrade no seu R&S
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burh/nuxt-core",
3
- "version": "1.0.445",
3
+ "version": "1.0.447",
4
4
  "description": "Design System and Components.",
5
5
  "author": "Burh",
6
6
  "scripts": {