@burh/nuxt-core 1.0.383 → 1.0.384

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,10 +1,10 @@
1
- {
2
- "editor.rulers": [120, 140],
3
- "editor.formatOnSave": false,
4
-
5
- "eslint.packageManager": "yarn",
6
-
7
- "editor.codeActionsOnSave": {
8
- "source.fixAll.eslint": true,
9
- }
10
- }
1
+ {
2
+ "editor.rulers": [120, 140],
3
+ "editor.formatOnSave": false,
4
+
5
+ "eslint.packageManager": "yarn",
6
+
7
+ "editor.codeActionsOnSave": {
8
+ "source.fixAll.eslint": true,
9
+ }
10
+ }
@@ -33,7 +33,20 @@
33
33
  <span class="recruitment__card__content__date">Publicada {{fromNow(job.published_at)}}</span>
34
34
  <h2 class="recruitment__card__content__title">
35
35
  {{ job.title }}
36
- <i v-if="job.handicapped" class="fas fa-wheelchair pcd"></i>
36
+ <el-tooltip v-if="job.handicapped" placement="top" content="PCD">
37
+ <i class="fas fa-wheelchair pcd"></i>
38
+ </el-tooltip>
39
+ <el-tooltip v-if="job.is_private" placement="top" content="Privada">
40
+ <i v-if="job.is_private" class="fas fa-lock pcd"></i>
41
+ </el-tooltip>
42
+
43
+ <el-tooltip v-if="job.is_internal" placement="top" content="Interna">
44
+ <i v-if="job.is_internal" class="fas fa-building pcd"></i>
45
+ </el-tooltip>
46
+
47
+ <el-tooltip v-if="job.is_urgency" placement="top" content="Urgente">
48
+ <i v-if="job.is_urgency" class="fas fa-clock pcd"></i>
49
+ </el-tooltip>
37
50
  </h2>
38
51
  <span class="recruitment__card__content__id">{{ job.id }}</span>
39
52
 
@@ -41,6 +54,7 @@
41
54
  <p class="recruitment__card__info__text"><span>{{ job.info.applieds }}</span>Inscritos</p>
42
55
  <p class="recruitment__card__info__text"><span>{{ job.info.positions }}</span>Posição</p>
43
56
  <p class="recruitment__card__info__text"><span>{{ job.info.hireds }}</span>Contratados</p>
57
+ <p class="recruitment__card__info__text"><span>{{ job.info.reproveds }}</span>Reprovados</p>
44
58
  </div>
45
59
  </section>
46
60
 
@@ -37,9 +37,10 @@
37
37
  <span v-if="userData.user_address">
38
38
  <i class="fas fa-map-marker-alt"></i>
39
39
  {{ userData.user_address.city_name }} -
40
- {{ userData.user_address.region_code }}
41
- </span>
42
- <br />
40
+ {{ userData.user_address.region_code }} <br>
41
+ {{ userData.user_address.neighborhood }}
42
+ </span><br />
43
+
43
44
  <span
44
45
  v-if="
45
46
  userData.user_complementary_information.wage_pretension > 1
@@ -227,7 +228,7 @@
227
228
  <script>
228
229
  import getPrefixes from '~/util/getPrefixes.js';
229
230
  import VueQrcode from '@chenfengyuan/vue-qrcode';
230
- import swal from 'sweetalert2';
231
+ // import swal from 'sweetalert2';
231
232
 
232
233
  export default {
233
234
  name: 'user-cv-left-side',
@@ -1,511 +1,511 @@
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 info-text">
63
- <span v-if="userData.email != null">Email: {{userData.email}}</span><br>
64
- <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>
65
- <span v-if="userData.user_contact && userData.user_contact.phone != null && userData.user_contact.phone.length > 1">Telefone: {{phoneMask(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=" 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
- >
94
- {{edu.formation_level_id | formationLevel}}
95
- </span>
96
- </div>
97
-
98
- <!-- EXPERIÊNCIAS -->
99
- <h5 class="font-weight-bold mt-4 ml-3">Experiência</h5>
100
- <div
101
- class="no-info ml-3"
102
- v-show="userData.user_experience.length === 0"
103
- >
104
- <p>
105
- Nenhuma informação adicionada
106
- </p>
107
- </div>
108
- <div
109
- v-show="userData.user_experience.length > 0"
110
- class="experience ml-3 mr-3"
111
- v-for="(exp, index) in userData.user_experience"
112
- :key="`experience-${index}`"
113
- >
114
- <p
115
- class="sub-title"
116
- v-html="highlightText(search, exp.job_title)"
117
- ></p>
118
- <p
119
- class="info-text"
120
- v-html="
121
- highlightText(search, `${exp.company}, ${exp.location}`)
122
- "
123
- ></p>
124
- <span class="info-text">
125
- {{ exp.start_month }}/{{ exp.start_year }} -
126
- {{ treatEndDate(exp.end_month, exp.end_year) }}
127
- {{ getTime(true, exp) }}
128
- </span>
129
-
130
- <p
131
- :id="`USER_EXPERIENCE-${index}`"
132
- class="description mt-4 mb-0"
133
- :class="!wordIsLesserThan(exp.description) && 'readmore'"
134
- v-html="highlightText(search, exp.description)"
135
- ></p>
136
-
137
- <a
138
- href="#"
139
- aria-label="expandir conteudo"
140
- v-show="!wordIsLesserThan(exp.description)"
141
- @click.prevent.stop="
142
- toggleReadMore($event, `USER_EXPERIENCE-${index}`)
143
- "
144
- >Ler mais</a
145
- ><br /><br />
146
- </div>
147
-
148
- <!-- CURSOS -->
149
- <h5 class="font-weight-bold mt-1 ml-3">Cursos Complementares</h5>
150
- <div class="no-info ml-3" v-show="userData.user_course.length === 0">
151
- <p>
152
- Nenhuma informação adicionada
153
- </p>
154
- </div>
155
- <div
156
- v-show="userData.user_course.length > 0"
157
- class="courses ml-3"
158
- v-for="(cou, index) in userData.user_course"
159
- :key="`course-${index}`"
160
- >
161
- <p
162
- class="sub-title"
163
- v-html="highlightText(search, cou.institution)"
164
- ></p>
165
- <p
166
- class="info-text mb-3"
167
- v-html="
168
- highlightText(
169
- search,
170
- `${cou.name} - ${cou.end_year || ''} ${getTime(
171
- false,
172
- cou
173
- )}`
174
- )
175
- "
176
- >
177
- {{ cou.name }} - {{ cou.end_year }}
178
- {{ getTime(false, cou) }}
179
- </p>
180
- </div>
181
- </div>
182
- </template>
183
-
184
- <script>
185
- import getPrefixes from '~/util/getPrefixes.js';
186
- import { mask } from 'vue-the-mask';
187
-
188
- export default {
189
- name: 'user-cv-middle',
190
- directives: { mask },
191
- props: {
192
- userData: Object,
193
- tools: {
194
- type: Array,
195
- default: () => []
196
- },
197
- search: {
198
- type: String,
199
- default: ''
200
- }
201
- },
202
- filters: {
203
- formationLevel(id) {
204
- const typeFormation = {
205
- 1: 'Ensino Médio',
206
- 2: 'Ensino Técnico',
207
- 3: 'Graduação',
208
- 4: 'Pós-Graduação',
209
- 5: 'Mestrado',
210
- 6: 'Doutorado'
211
- };
212
-
213
- return typeFormation[id] || '-';
214
- }
215
- },
216
- data() {
217
- return {
218
- isLocked: !this.companyHasProduct(
219
- this.$store.state.loja && this.$store.state.loja.showableProducts && this.$store.state.loja.showableProducts['INTERACAO_USUARIO'] || false
220
- )
221
- };
222
- },
223
- mounted() {
224
- this.userData.user_experience = this.filterByDate(
225
- this.userData.user_experience,
226
- 'old'
227
- );
228
- this.userData.user_education = this.filterByDate(
229
- this.userData.user_education,
230
- 'old'
231
- );
232
- this.userData.user_course = this.filterByDate(
233
- this.userData.user_course,
234
- 'old'
235
- );
236
- },
237
- watch: {
238
- userData() {
239
- this.userData.user_experience = this.filterByDate(
240
- this.userData.user_experience,
241
- 'old'
242
- );
243
- this.userData.user_education = this.filterByDate(
244
- this.userData.user_education,
245
- 'old'
246
- );
247
- this.userData.user_course = this.filterByDate(
248
- this.userData.user_course,
249
- 'old'
250
- );
251
- }
252
- },
253
- methods: {
254
- phoneMask(v) {
255
-
256
- let r = v.replace(/\D/g, '');
257
- r = r.replace(/^0/, '');
258
-
259
- if (r.length > 11) {
260
- r = r.replace(/^(\d\d)(\d{5})(\d{4}).*/, '($1) $2-$3');
261
- } else if (r.length > 7) {
262
- r = r.replace(/^(\d\d)(\d{5})(\d{0,4}).*/, '($1) $2-$3');
263
- } else if (r.length > 2) {
264
- r = r.replace(/^(\d\d)(\d{0,5})/, '($1) $2');
265
- } else if (v.trim() !== '') {
266
- r = r.replace(/^(\d*)/, '($1');
267
- }
268
- return r;
269
- },
270
- highlightText(search, text) {
271
- if (search.length < 2) return text;
272
-
273
- const regex = new RegExp(search.toLowerCase(), 'gmi');
274
- return String(text || '').replace(
275
- regex,
276
- `<span class="search-highlight">${search}</span>`
277
- );
278
- },
279
- filterByDate(data, by = 'new') {
280
- let sortedArray = data.sort((a, b) => {
281
- a = [
282
- a.start_month,
283
- a.start_year,
284
- a.end_month || 12,
285
- a.end_year || 9999
286
- ];
287
-
288
- b = [
289
- b.start_month,
290
- b.start_year,
291
- b.end_month || 12,
292
- b.end_year || 9999
293
- ];
294
-
295
- // Primeiro filtro -> chaves: 0 e 1 -> Filtro por data de inicio
296
- // Segundo filtro -> chaves: 2 e 3 -> Filtro por data de termino (subir não concluídos para primeiros)
297
-
298
- let byStart;
299
- let byEnd;
300
-
301
- switch (by) {
302
- case 'old':
303
- byStart =
304
- new Date(a[1], a[0], 1).getTime() -
305
- new Date(b[1], b[0], 1).getTime();
306
- byEnd =
307
- new Date(b[3], b[2], 1).getTime() -
308
- new Date(a[3], a[2], 1).getTime();
309
- break;
310
-
311
- default:
312
- byStart =
313
- new Date(b[1], b[0], 1).getTime() -
314
- new Date(a[1], a[0], 1).getTime();
315
- byEnd =
316
- new Date(b[3], b[2], 1).getTime() -
317
- new Date(a[3], a[2], 1).getTime();
318
- break;
319
- }
320
-
321
- return byEnd - byStart;
322
- });
323
-
324
- return sortedArray;
325
- },
326
- toggleReadMore(event, id) {
327
- const element = document.getElementById(id);
328
- element.classList.toggle('readmore');
329
- event.target.innerText == 'Ler mais'
330
- ? (event.target.innerText = 'Esconder')
331
- : (event.target.innerText = 'Ler mais');
332
- },
333
- getTime(
334
- isExperience,
335
- { start_year = null, end_year = null, start_month, end_month },
336
- textHappening = 'Cursando'
337
- ) {
338
- const isHappening = !end_month && !end_year;
339
-
340
- if (isHappening) {
341
- return isExperience === true ? 'Atualmente' : textHappening;
342
- }
343
-
344
- const dateInitial = this.$moment(
345
- ['1', start_month.toString(), start_year.toString()],
346
- 'DD/MM/YYYY'
347
- );
348
- const dateDone = this.$moment(
349
- ['1', end_month.toString(), end_year.toString()],
350
- 'DD/MM/YYYY'
351
- );
352
- const diffDuration = this.$moment.duration(
353
- dateDone.diff(dateInitial)
354
- );
355
- const years = diffDuration.years();
356
- const months = diffDuration.months();
357
-
358
- if (years) {
359
- return years > 1 ? `(${years} anos)` : `(${years} ano)`;
360
- }
361
-
362
- return months > 1
363
- ? `(${months} meses)`
364
- : months == 1
365
- ? `(${months} mês)`
366
- : '';
367
- },
368
- languageLevel(level) {
369
- switch (parseInt(level)) {
370
- case 1:
371
- return 'Iniciante';
372
- case 2:
373
- return 'Elementar';
374
- case 3:
375
- return 'Pré-intermediário';
376
- case 4:
377
- return 'Intermediário';
378
- case 5:
379
- return 'Intermediário Superior';
380
- case 6:
381
- return 'Avançado';
382
- case 7:
383
- return 'Fluente';
384
- default:
385
- return '';
386
- }
387
- },
388
- treatPhone(phone) {
389
- if (phone) {
390
- if (phone == '0' || phone.length < 9 || !phone) {
391
- return 'não cadastrado';
392
- }
393
- }
394
-
395
- return phone;
396
- },
397
- treatCellphone(cellphone) {
398
- if (cellphone) {
399
- if (cellphone == '0' || cellphone.length < 11 || !cellphone) {
400
- return 'não cadastrado';
401
- }
402
- }
403
-
404
- return cellphone;
405
- },
406
- handleGetPrefixes(name = '') {
407
- return getPrefixes(name);
408
- },
409
- treatEndDate(end_month, end_year) {
410
- if (end_month && end_year) {
411
- return `${end_month}/${end_year}`;
412
- }
413
- return '';
414
- },
415
- wordIsLesserThan(word, value = 300) {
416
- return word && word.length < value;
417
- }
418
- }
419
- };
420
- </script>
421
-
422
- <style lang="scss" scoped>
423
- @import '@burh/nuxt-core/assets/sass/burh-ds/variables/_colors.scss';
424
-
425
- /deep/ .search-highlight {
426
- background: rgb(255, 252, 61);
427
- color: #000;
428
- }
429
-
430
- .content-middle {
431
- width: 50%;
432
- border-right: 1px solid #ececec5c;
433
- word-break: break-word !important;
434
- }
435
-
436
- .readmore {
437
- overflow: hidden;
438
- text-overflow: ellipsis;
439
- display: -webkit-box;
440
- -webkit-line-clamp: 3;
441
- -webkit-box-orient: vertical;
442
- }
443
-
444
- .tools {
445
- flex-wrap: wrap;
446
- button {
447
- width: 117px;
448
- height: 29px;
449
- border: none;
450
- margin-top: 15px;
451
-
452
- background: #5865F2;
453
- border-radius: 16px;
454
- color: #fff;
455
-
456
- font-size: 12px;
457
- font-weight: 600;
458
- outline: 0;
459
- }
460
- }
461
-
462
- .education {
463
- margin-top: 15px;
464
- }
465
-
466
- .experience {
467
- .description {
468
- font-size: 14px;
469
- color: #62778c;
470
- }
471
-
472
- a {
473
- margin-bottom: 1px;
474
- }
475
- }
476
-
477
- .sub-title {
478
- margin-bottom: 1px;
479
-
480
- font-weight: 600;
481
- font-size: 14px;
482
- line-height: 21px;
483
- color: #62778c;
484
- text-transform: uppercase;
485
- }
486
-
487
- .info-text {
488
- margin-bottom: 1px;
489
-
490
- font-size: 14px;
491
- color: #8da2b5;
492
- }
493
-
494
- .content-block {
495
- p {
496
- font-size: 14px;
497
- color: #62778c;
498
- }
499
- }
500
-
501
- .no-info {
502
- p {
503
- font-size: 0.875rem;
504
- color: #62778c;
505
- }
506
- }
507
-
508
- .disabled-button {
509
- opacity: 0.5;
510
- }
511
- </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 info-text">
63
+ <span v-if="userData.email != null">Email: {{userData.email}}</span><br>
64
+ <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>
65
+ <span v-if="userData.user_contact && userData.user_contact.phone != null && userData.user_contact.phone.length > 1">Telefone: {{phoneMask(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=" 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
+ >
94
+ {{edu.formation_level_id | formationLevel}}
95
+ </span>
96
+ </div>
97
+
98
+ <!-- EXPERIÊNCIAS -->
99
+ <h5 class="font-weight-bold mt-4 ml-3">Experiência</h5>
100
+ <div
101
+ class="no-info ml-3"
102
+ v-show="userData.user_experience.length === 0"
103
+ >
104
+ <p>
105
+ Nenhuma informação adicionada
106
+ </p>
107
+ </div>
108
+ <div
109
+ v-show="userData.user_experience.length > 0"
110
+ class="experience ml-3 mr-3"
111
+ v-for="(exp, index) in userData.user_experience"
112
+ :key="`experience-${index}`"
113
+ >
114
+ <p
115
+ class="sub-title"
116
+ v-html="highlightText(search, exp.job_title)"
117
+ ></p>
118
+ <p
119
+ class="info-text"
120
+ v-html="
121
+ highlightText(search, `${exp.company}, ${exp.location}`)
122
+ "
123
+ ></p>
124
+ <span class="info-text">
125
+ {{ exp.start_month }}/{{ exp.start_year }} -
126
+ {{ treatEndDate(exp.end_month, exp.end_year) }}
127
+ {{ getTime(true, exp) }}
128
+ </span>
129
+
130
+ <p
131
+ :id="`USER_EXPERIENCE-${index}`"
132
+ class="description mt-4 mb-0"
133
+ :class="!wordIsLesserThan(exp.description) && 'readmore'"
134
+ v-html="highlightText(search, exp.description)"
135
+ ></p>
136
+
137
+ <a
138
+ href="#"
139
+ aria-label="expandir conteudo"
140
+ v-show="!wordIsLesserThan(exp.description)"
141
+ @click.prevent.stop="
142
+ toggleReadMore($event, `USER_EXPERIENCE-${index}`)
143
+ "
144
+ >Ler mais</a
145
+ ><br /><br />
146
+ </div>
147
+
148
+ <!-- CURSOS -->
149
+ <h5 class="font-weight-bold mt-1 ml-3">Cursos Complementares</h5>
150
+ <div class="no-info ml-3" v-show="userData.user_course.length === 0">
151
+ <p>
152
+ Nenhuma informação adicionada
153
+ </p>
154
+ </div>
155
+ <div
156
+ v-show="userData.user_course.length > 0"
157
+ class="courses ml-3"
158
+ v-for="(cou, index) in userData.user_course"
159
+ :key="`course-${index}`"
160
+ >
161
+ <p
162
+ class="sub-title"
163
+ v-html="highlightText(search, cou.institution)"
164
+ ></p>
165
+ <p
166
+ class="info-text mb-3"
167
+ v-html="
168
+ highlightText(
169
+ search,
170
+ `${cou.name} - ${cou.end_year || ''} ${getTime(
171
+ false,
172
+ cou
173
+ )}`
174
+ )
175
+ "
176
+ >
177
+ {{ cou.name }} - {{ cou.end_year }}
178
+ {{ getTime(false, cou) }}
179
+ </p>
180
+ </div>
181
+ </div>
182
+ </template>
183
+
184
+ <script>
185
+ import getPrefixes from '~/util/getPrefixes.js';
186
+ import { mask } from 'vue-the-mask';
187
+
188
+ export default {
189
+ name: 'user-cv-middle',
190
+ directives: { mask },
191
+ props: {
192
+ userData: Object,
193
+ tools: {
194
+ type: Array,
195
+ default: () => []
196
+ },
197
+ search: {
198
+ type: String,
199
+ default: ''
200
+ }
201
+ },
202
+ filters: {
203
+ formationLevel(id) {
204
+ const typeFormation = {
205
+ 1: 'Ensino Médio',
206
+ 2: 'Ensino Técnico',
207
+ 3: 'Graduação',
208
+ 4: 'Pós-Graduação',
209
+ 5: 'Mestrado',
210
+ 6: 'Doutorado'
211
+ };
212
+
213
+ return typeFormation[id] || '-';
214
+ }
215
+ },
216
+ data() {
217
+ return {
218
+ isLocked: !this.companyHasProduct(
219
+ this.$store.state.loja && this.$store.state.loja.showableProducts && this.$store.state.loja.showableProducts['INTERACAO_USUARIO'] || false
220
+ )
221
+ };
222
+ },
223
+ mounted() {
224
+ this.userData.user_experience = this.filterByDate(
225
+ this.userData.user_experience,
226
+ 'old'
227
+ );
228
+ this.userData.user_education = this.filterByDate(
229
+ this.userData.user_education,
230
+ 'old'
231
+ );
232
+ this.userData.user_course = this.filterByDate(
233
+ this.userData.user_course,
234
+ 'old'
235
+ );
236
+ },
237
+ watch: {
238
+ userData() {
239
+ this.userData.user_experience = this.filterByDate(
240
+ this.userData.user_experience,
241
+ 'old'
242
+ );
243
+ this.userData.user_education = this.filterByDate(
244
+ this.userData.user_education,
245
+ 'old'
246
+ );
247
+ this.userData.user_course = this.filterByDate(
248
+ this.userData.user_course,
249
+ 'old'
250
+ );
251
+ }
252
+ },
253
+ methods: {
254
+ phoneMask(v) {
255
+
256
+ let r = v.replace(/\D/g, '');
257
+ r = r.replace(/^0/, '');
258
+
259
+ if (r.length > 11) {
260
+ r = r.replace(/^(\d\d)(\d{5})(\d{4}).*/, '($1) $2-$3');
261
+ } else if (r.length > 7) {
262
+ r = r.replace(/^(\d\d)(\d{5})(\d{0,4}).*/, '($1) $2-$3');
263
+ } else if (r.length > 2) {
264
+ r = r.replace(/^(\d\d)(\d{0,5})/, '($1) $2');
265
+ } else if (v.trim() !== '') {
266
+ r = r.replace(/^(\d*)/, '($1');
267
+ }
268
+ return r;
269
+ },
270
+ highlightText(search, text) {
271
+ if (search.length < 2) return text;
272
+
273
+ const regex = new RegExp(search.toLowerCase(), 'gmi');
274
+ return String(text || '').replace(
275
+ regex,
276
+ `<span class="search-highlight">${search}</span>`
277
+ );
278
+ },
279
+ filterByDate(data, by = 'new') {
280
+ let sortedArray = data.sort((a, b) => {
281
+ a = [
282
+ a.start_month,
283
+ a.start_year,
284
+ a.end_month || 12,
285
+ a.end_year || 9999
286
+ ];
287
+
288
+ b = [
289
+ b.start_month,
290
+ b.start_year,
291
+ b.end_month || 12,
292
+ b.end_year || 9999
293
+ ];
294
+
295
+ // Primeiro filtro -> chaves: 0 e 1 -> Filtro por data de inicio
296
+ // Segundo filtro -> chaves: 2 e 3 -> Filtro por data de termino (subir não concluídos para primeiros)
297
+
298
+ let byStart;
299
+ let byEnd;
300
+
301
+ switch (by) {
302
+ case 'old':
303
+ byStart =
304
+ new Date(a[1], a[0], 1).getTime() -
305
+ new Date(b[1], b[0], 1).getTime();
306
+ byEnd =
307
+ new Date(b[3], b[2], 1).getTime() -
308
+ new Date(a[3], a[2], 1).getTime();
309
+ break;
310
+
311
+ default:
312
+ byStart =
313
+ new Date(b[1], b[0], 1).getTime() -
314
+ new Date(a[1], a[0], 1).getTime();
315
+ byEnd =
316
+ new Date(b[3], b[2], 1).getTime() -
317
+ new Date(a[3], a[2], 1).getTime();
318
+ break;
319
+ }
320
+
321
+ return byEnd - byStart;
322
+ });
323
+
324
+ return sortedArray;
325
+ },
326
+ toggleReadMore(event, id) {
327
+ const element = document.getElementById(id);
328
+ element.classList.toggle('readmore');
329
+ event.target.innerText == 'Ler mais'
330
+ ? (event.target.innerText = 'Esconder')
331
+ : (event.target.innerText = 'Ler mais');
332
+ },
333
+ getTime(
334
+ isExperience,
335
+ { start_year = null, end_year = null, start_month, end_month },
336
+ textHappening = 'Cursando'
337
+ ) {
338
+ const isHappening = !end_month && !end_year;
339
+
340
+ if (isHappening) {
341
+ return isExperience === true ? 'Atualmente' : textHappening;
342
+ }
343
+
344
+ const dateInitial = this.$moment(
345
+ ['1', start_month.toString(), start_year.toString()],
346
+ 'DD/MM/YYYY'
347
+ );
348
+ const dateDone = this.$moment(
349
+ ['1', end_month.toString(), end_year.toString()],
350
+ 'DD/MM/YYYY'
351
+ );
352
+ const diffDuration = this.$moment.duration(
353
+ dateDone.diff(dateInitial)
354
+ );
355
+ const years = diffDuration.years();
356
+ const months = diffDuration.months();
357
+
358
+ if (years) {
359
+ return years > 1 ? `(${years} anos)` : `(${years} ano)`;
360
+ }
361
+
362
+ return months > 1
363
+ ? `(${months} meses)`
364
+ : months == 1
365
+ ? `(${months} mês)`
366
+ : '';
367
+ },
368
+ languageLevel(level) {
369
+ switch (parseInt(level)) {
370
+ case 1:
371
+ return 'Iniciante';
372
+ case 2:
373
+ return 'Elementar';
374
+ case 3:
375
+ return 'Pré-intermediário';
376
+ case 4:
377
+ return 'Intermediário';
378
+ case 5:
379
+ return 'Intermediário Superior';
380
+ case 6:
381
+ return 'Avançado';
382
+ case 7:
383
+ return 'Fluente';
384
+ default:
385
+ return '';
386
+ }
387
+ },
388
+ treatPhone(phone) {
389
+ if (phone) {
390
+ if (phone == '0' || phone.length < 9 || !phone) {
391
+ return 'não cadastrado';
392
+ }
393
+ }
394
+
395
+ return phone;
396
+ },
397
+ treatCellphone(cellphone) {
398
+ if (cellphone) {
399
+ if (cellphone == '0' || cellphone.length < 11 || !cellphone) {
400
+ return 'não cadastrado';
401
+ }
402
+ }
403
+
404
+ return cellphone;
405
+ },
406
+ handleGetPrefixes(name = '') {
407
+ return getPrefixes(name);
408
+ },
409
+ treatEndDate(end_month, end_year) {
410
+ if (end_month && end_year) {
411
+ return `${end_month}/${end_year}`;
412
+ }
413
+ return '';
414
+ },
415
+ wordIsLesserThan(word, value = 300) {
416
+ return word && word.length < value;
417
+ }
418
+ }
419
+ };
420
+ </script>
421
+
422
+ <style lang="scss" scoped>
423
+ @import '@burh/nuxt-core/assets/sass/burh-ds/variables/_colors.scss';
424
+
425
+ /deep/ .search-highlight {
426
+ background: rgb(255, 252, 61);
427
+ color: #000;
428
+ }
429
+
430
+ .content-middle {
431
+ width: 50%;
432
+ border-right: 1px solid #ececec5c;
433
+ word-break: break-word !important;
434
+ }
435
+
436
+ .readmore {
437
+ overflow: hidden;
438
+ text-overflow: ellipsis;
439
+ display: -webkit-box;
440
+ -webkit-line-clamp: 3;
441
+ -webkit-box-orient: vertical;
442
+ }
443
+
444
+ .tools {
445
+ flex-wrap: wrap;
446
+ button {
447
+ width: 117px;
448
+ height: 29px;
449
+ border: none;
450
+ margin-top: 15px;
451
+
452
+ background: #5865F2;
453
+ border-radius: 16px;
454
+ color: #fff;
455
+
456
+ font-size: 12px;
457
+ font-weight: 600;
458
+ outline: 0;
459
+ }
460
+ }
461
+
462
+ .education {
463
+ margin-top: 15px;
464
+ }
465
+
466
+ .experience {
467
+ .description {
468
+ font-size: 14px;
469
+ color: #62778c;
470
+ }
471
+
472
+ a {
473
+ margin-bottom: 1px;
474
+ }
475
+ }
476
+
477
+ .sub-title {
478
+ margin-bottom: 1px;
479
+
480
+ font-weight: 600;
481
+ font-size: 14px;
482
+ line-height: 21px;
483
+ color: #62778c;
484
+ text-transform: uppercase;
485
+ }
486
+
487
+ .info-text {
488
+ margin-bottom: 1px;
489
+
490
+ font-size: 14px;
491
+ color: #8da2b5;
492
+ }
493
+
494
+ .content-block {
495
+ p {
496
+ font-size: 14px;
497
+ color: #62778c;
498
+ }
499
+ }
500
+
501
+ .no-info {
502
+ p {
503
+ font-size: 0.875rem;
504
+ color: #62778c;
505
+ }
506
+ }
507
+
508
+ .disabled-button {
509
+ opacity: 0.5;
510
+ }
511
+ </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burh/nuxt-core",
3
- "version": "1.0.383",
3
+ "version": "1.0.384",
4
4
  "description": "Design System and Components.",
5
5
  "author": "Burh",
6
6
  "scripts": {