@burh/nuxt-core 1.1.22 → 1.1.24

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,624 +1,621 @@
1
- <template>
2
- <div class="bg-white content-left">
3
- <div class="profile w-100 text-center">
4
- <div class="avatar">
5
- <image-with-fallback
6
- :src="userData.urlAvatar"
7
- :alt="userData.name"
8
- :fallbackText="userData.name"
9
- fallbackSize="1024"
10
- />
11
- </div>
12
-
13
- <slot name="compatibilityTag" />
14
-
15
- <h5
16
- class="mb-0 text-wrap"
17
- v-html="
18
- highlightText(
19
- search,
20
- `${userData.name} ${userData.last_name}`
21
- )
22
- "
23
- />
24
- <h6
25
- v-if="userData && userData.user_complementary_information && userData.user_complementary_information.birth && getAge() > 0 || false"
26
- >
27
- {{ getAge() }} {{ $t('user_cv.left_side.years_old') }}
28
- </h6>
29
-
30
- <p
31
- class="user-info"
32
- v-if="userData && userData.user_experience && userData.user_experience.length || 0"
33
- v-html="
34
- highlightText(
35
- search,
36
- `${userData.user_experience[0].job_title} em ${userData.user_experience[0].company}`
37
- )
38
- "
39
- ></p>
40
-
41
- <span v-if="userData.user_address">
42
- <i class="fas fa-map-marker-alt"></i>
43
- {{ userData.user_address.city_name }} -
44
- {{ userData.user_address.region_code }} <br>
45
- {{ userData.user_address.neighborhood }}
46
- </span><br />
47
-
48
- <span
49
- v-if="
50
- userData && userData.user_complementary_information && userData.user_complementary_information.wage_pretension && userData.user_complementary_information.wage_pretension > 1
51
- "
52
- >{{ $t('user_cv.left_side.salary_expectation') }}
53
- {{
54
- userData.user_complementary_information.wage_pretension
55
- | convertMoney
56
- }}</span
57
- >
58
- </div>
59
-
60
- <template
61
- v-if="hasAboutme && userData && userData.profile"
62
- >
63
- <div class="aboutme title-block mt-3 ml-4">
64
- <h6 class="mb-0">
65
- {{ $t('user_cv.left_side.disc_profile_title') }}
66
-
67
- <el-tooltip
68
- class="ml-1"
69
- placement="top"
70
- >
71
- <div slot="content" style="max-width: 250px">
72
- {{ $t('user_cv.left_side.disc_tooltip') }}
73
- </div>
74
-
75
- <i class="fas fa-info-circle"></i>
76
- </el-tooltip>
77
- </h6>
78
- <div class="line"></div>
79
-
80
- <div class="aboutme__resume">
81
- <profile
82
- :profile="userData.profile"
83
- :size="48"
84
- />
85
-
86
- <button
87
- @click="handleAboutmeDownloadClick"
88
- >
89
- <template
90
- v-if="!isAboutmeUnlocked"
91
- >
92
- {{ $t('user_cv.left_side.unlock_report') }}
93
- <i class="fas fa-unlock"></i>
94
- </template>
95
-
96
- <template v-else>
97
- {{ $t('user_cv.left_side.download_report') }}
98
- <i class="fas fa-file-download"></i>
99
- </template>
100
- </button>
101
- </div>
102
- </div>
103
- </template>
104
-
105
- <div
106
- class="deficiency title-block mt-3 ml-4"
107
- v-if="!!(userData.deficiency && userData.deficiency.id)"
108
- >
109
- <div class="d-flex align-items-center">
110
- <i class="fas fa-wheelchair"></i>
111
- <h6 class="mb-0 ml-2">{{ $t('user_cv.left_side.disability_title') }}</h6>
112
- </div>
113
- <div class="line"></div>
114
- <p>
115
- {{ userData && userData.deficiency && userData.deficiency && userData.deficiency.deficiency_id | allDeficiencies }}
116
-
117
- <template> - </template>
118
-
119
- {{ userData && userData.deficiency && userData.deficiency && userData.deficiency.cid | formatCid }}
120
- </p>
121
-
122
- <p v-if="!!(userData && userData.deficiency && userData.deficiency.appliance)">
123
- {{ $t('user_cv.left_side.accessory_label') }} {{ userData.deficiency.appliance }}
124
- </p>
125
-
126
- <p v-if="!!(userData && userData.deficiency && userData.deficiency.apparatus)">
127
- {{ $t('user_cv.left_side.necessity_label') }} {{ userData.deficiency.apparatus }}
128
- </p>
129
-
130
- <p v-if="!!(userData && userData.deficiency && userData.deficiency.course)">
131
- {{ $t('user_cv.left_side.course_label') }} {{ userData.deficiency.course }}
132
- </p>
133
-
134
- <p v-if="!!(userData && userData.deficiency && userData.deficiency.note)">
135
- {{ $t('user_cv.left_side.notes_label') }} {{ userData.deficiency.note }}
136
- </p>
137
-
138
- <p v-if="!!(userData && userData.deficiency && userData.deficiency.transport === 1)">
139
- {{ $t('user_cv.left_side.uses_public_transport') }}
140
- </p>
141
-
142
- <p v-if="!!(userData && userData.deficiency && userData.deficiency.vehicle === 1)">
143
- {{ $t('user_cv.left_side.has_adapted_vehicle') }}
144
- </p>
145
-
146
- <p v-if="!!(userData && userData.deficiency && userData.deficiency.escort === 1)">
147
- {{ $t('user_cv.left_side.needs_companion') }}
148
- </p>
149
- </div>
150
-
151
- <div
152
- v-show="userData && userData.user_desired_job && userData.user_desired_job.length || 0"
153
- class="desidered title-block mt-3 ml-4"
154
- >
155
- <h6 class="mb-0">{{ $t('user_cv.left_side.desired_positions') }}</h6>
156
- <div class="line"></div>
157
-
158
- <p
159
- v-for="(des, index) in userData.user_desired_job"
160
- :key="`skill-${index}`"
161
- class="ml-1 mt-1 mb-0 text-capitalize"
162
- v-html="highlightText(search, des.occupation)"
163
- ></p>
164
- </div>
165
-
166
- <div
167
- v-show="userData && userData.user_language && userData.user_language.length || 0"
168
- class="languages title-block mt-3 ml-4"
169
- >
170
- <h6 class="mb-0">{{ $t('user_cv.left_side.languages') }}</h6>
171
- <div class="line"></div>
172
-
173
- <p
174
- class="mb-1 text-capitalize"
175
- v-for="(lan, index) in userData.user_language"
176
- :key="index"
177
- v-html="
178
- highlightText(
179
- search,
180
- `${lan.language[0].name} ${languageLevel(lan.level)}`
181
- )
182
- "
183
- ></p>
184
- </div>
185
-
186
- <div
187
- v-show="userData&&userData.user_skill &&userData.user_skill.length > 0"
188
- class="skills title-block ml-4"
189
- >
190
- <h6 class="mb-0">{{ $t('user_cv.left_side.skills') }}</h6>
191
- <div class="line"></div>
192
-
193
- <p
194
- v-for="(skill, index) in userData.user_skill"
195
- :key="`skill-${index}`"
196
- class="ml-1 mt-1 mb-0 text-capitalize"
197
- v-html="highlightText(search, skill.skill_word)"
198
- ></p>
199
- </div>
200
-
201
- <div class="socials text-center mt-5">
202
- <a
203
- :href="baseUrl + '/' + userData.slug.slug"
204
- class="text-center"
205
- target="_blank"
206
- rel="noopener noreferrer"
207
- >
208
- <img
209
- class="no-social"
210
- src="../../../../assets/images/burhCv.svg"
211
- alt="Burh"
212
- />
213
- </a>
214
- <a
215
- v-if="userData && userData.user_complementary_information && userData.user_complementary_information.facebook_url || false"
216
- :href="userData.user_complementary_information.facebook_url"
217
- target="_blank"
218
- class="ml-2"
219
- rel="noopener noreferrer"
220
- >
221
- <img
222
- class="no-social"
223
- src="../../../../assets/images/facebookCv.svg"
224
- alt="Facebook"
225
- />
226
- </a>
227
- <a
228
- v-if="userData && userData.user_complementary_information && userData.user_complementary_information.linkedin_url || false"
229
- :href="userData.user_complementary_information.linkedin_url"
230
- target="_blank"
231
- class="ml-2"
232
- rel="noopener noreferrer"
233
- >
234
- <img
235
- class="no-social"
236
- src="../../../../assets/images/linkedinCv.svg"
237
- alt="Linkdin"
238
- />
239
- </a>
240
- <a
241
- v-if="userData && userData.user_complementary_information && userData.user_complementary_information.website || false"
242
- :href="userData.user_complementary_information.website"
243
- class="text-center ml-2"
244
- target="_blank"
245
- rel="noopener noreferrer"
246
- >
247
- <img
248
- class="no-social"
249
- src="../../../../assets/images/webCv.svg"
250
- alt="Web"
251
- />
252
- </a>
253
- </div>
254
-
255
- <div class="burh-code text-center mt-4">
256
- <vue-qrcode
257
- :value="baseUrl + '/' + userData.slug.slug"
258
- :options="{ width: 98, height: 98 }"
259
- class="border qr-code"
260
- ></vue-qrcode>
261
- <p class="mb-0">{{ $t('user_cv.left_side.burh_code') }}</p>
262
- <span class="qr-id">{{ userData.id }}</span
263
- ><br />
264
- <div class="teste-block">
265
- <span class="font-weight-normal mt-2 d-block" v-if="!isLocked"
266
- >{{ $t('user_cv.left_side.update_date') }}
267
- {{ $moment(userData.updated_at).format('DD/MM/YYYY H:mm') }}
268
- </span>
269
- </div>
270
- </div>
271
- </div>
272
- </template>
273
-
274
- <script>
275
- import getPrefixes from '~/util/getPrefixes.js';
276
- import VueQrcode from '@chenfengyuan/vue-qrcode';
277
- import moment from 'moment';
278
-
279
- import Profile from '../../Aboutme/Profile.vue';
280
-
281
- export default {
282
- name: 'user-cv-left-side',
283
- components: {
284
- VueQrcode,
285
- Profile
286
- },
287
- computed: {
288
- isAboutmeUnlocked() {
289
- const userData = this.userData || {};
290
- const isUnlocked = userData['is_aboutme_unlocked'] || false;
291
- return isUnlocked;
292
- },
293
- currentCompany() {
294
- return this.$store.state.company.currentCompany;
295
- }
296
- },
297
- props: {
298
- userData: {
299
- type: Object,
300
- required: true
301
- },
302
- baseUrl: String,
303
- search: {
304
- type: String,
305
- default: ''
306
- },
307
- hasAboutme: {
308
- type: Boolean,
309
- default: false
310
- }
311
- },
312
- data() {
313
- return {
314
- isLocked: !this.companyHasProduct(
315
- this.$store.state.loja && this.$store.state.loja.showableProducts && this.$store.state.loja.showableProducts['BUSCA_AVANCADA'] || false
316
- )
317
- };
318
- },
319
- methods: {
320
- handleAboutmeDownloadClick() {
321
- this.$emit('aboutme-download');
322
- },
323
- getAge(){
324
- const userAge = this.userData.user_complementary_information.birth;
325
- return moment().diff(userAge, 'years');
326
- },
327
- highlightText(search, text) {
328
- if (search.length < 2) return text;
329
-
330
- const regex = new RegExp(search.toLowerCase(), 'gmi');
331
- return String(text || '').replace(
332
- regex,
333
- `<span class="search-highlight">${search}</span>`
334
- );
335
- },
336
- getTime(
337
- { start_year = null, end_year = null, start_month, end_month },
338
- textHappening = null
339
- ) {
340
- const isHappening = !end_month && !end_year;
341
- const happeningText = textHappening || this.$t('user_cv.left_side.studying');
342
-
343
- if (isHappening) {
344
- return happeningText;
345
- }
346
-
347
- const dateInitial = this.$moment(
348
- ['1', start_month.toString(), start_year.toString()],
349
- 'DD/MM/YYYY'
350
- );
351
- const dateDone = this.$moment(
352
- ['1', end_month.toString(), end_year.toString()],
353
- 'DD/MM/YYYY'
354
- );
355
- const diffDuration = this.$moment.duration(
356
- dateDone.diff(dateInitial)
357
- );
358
- const years = diffDuration.years();
359
- const months = diffDuration.months();
360
-
361
- if (years) {
362
- return years > 1 ? `(${years} ${this.$t('user_cv.left_side.years_plural')})` : `(${years} ${this.$t('user_cv.left_side.year_singular')})`;
363
- }
364
-
365
- return months > 1
366
- ? `(${months} ${this.$t('user_cv.left_side.months_plural')})`
367
- : months == 1
368
- ? `(${months} ${this.$t('user_cv.left_side.month_singular')})`
369
- : '';
370
- },
371
- languageLevel(level) {
372
- switch (parseInt(level)) {
373
- case 1:
374
- return this.$t('user_cv.left_side.language_level_beginner');
375
- case 2:
376
- return this.$t('user_cv.left_side.language_level_elementary');
377
- case 3:
378
- return this.$t('user_cv.left_side.language_level_pre_intermediate');
379
- case 4:
380
- return this.$t('user_cv.left_side.language_level_intermediate');
381
- case 5:
382
- return this.$t('user_cv.left_side.language_level_upper_intermediate');
383
- case 6:
384
- return this.$t('user_cv.left_side.language_level_advanced');
385
- case 7:
386
- return this.$t('user_cv.left_side.language_level_fluent');
387
- default:
388
- return '';
389
- }
390
- },
391
- treatPhone(phone) {
392
- if (phone) {
393
- if (phone == '0' || phone.length < 9 || !phone) {
394
- return this.$t('user_cv.left_side.phone_not_registered');
395
- }
396
- }
397
-
398
- return phone;
399
- },
400
- treatCellphone(cellphone) {
401
- if (cellphone) {
402
- if (cellphone == '0' || cellphone.length < 11 || !cellphone) {
403
- return this.$t('user_cv.left_side.cellphone_not_registered');
404
- }
405
- }
406
-
407
- return cellphone;
408
- },
409
- handleGetPrefixes(name = '') {
410
- return getPrefixes(name);
411
- },
412
- treatEndDate(end_month, end_year) {
413
- if (end_month && end_year) {
414
- return `${end_month}/${end_year}`;
415
- }
416
- return '';
417
- }
418
- },
419
- filters: {
420
- allDeficiencies(idList) {
421
- const typeDeficiency = {
422
- 1: this.$t('user_cv.left_side.disability_physical'),
423
- 2: this.$t('user_cv.left_side.disability_visual'),
424
- 3: this.$t('user_cv.left_side.disability_mental'),
425
- 4: this.$t('user_cv.left_side.disability_auditory'),
426
- 5: this.$t('user_cv.left_side.disability_phonological'),
427
- 6: this.$t('user_cv.left_side.disability_multiple')
428
- };
429
-
430
- return idList && idList.length && idList.map(id => typeDeficiency[id] || null).filter(id => id).join(' | ') || '';
431
- },
432
- formatCid(cidList) {
433
- return cidList && cidList.length && cidList.filter(cid => cid).join(' | ') || '';
434
- },
435
- convertMoney(money) {
436
- let moneyAux = parseFloat(money);
437
- let m = moneyAux.toLocaleString('pt-BR', {
438
- style: 'currency',
439
- currency: 'BRL'
440
- });
441
- return m;
442
- }
443
- }
444
- };
445
- </script>
446
- <style lang="scss" scoped>
447
- @import '@burh/nuxt-core/assets/sass/burh-ds/variables/_colors.scss';
448
-
449
- /deep/ .search-highlight {
450
- background: rgb(255, 252, 61);
451
- color: #000;
452
- }
453
-
454
- .aboutme {
455
- display: flex;
456
- flex-direction: column;
457
- margin: 1rem 0;
458
-
459
- &__resume {
460
- display: flex;
461
- flex-direction: row;
462
- align-items: center;
463
- gap: 1rem;
464
-
465
- > button {
466
- padding: 0.25rem 0.5rem;
467
- border: 0;
468
- margin: 0;
469
- color: #5865f2;
470
- background: transparent;
471
- font-weight: 500;
472
- font-size: 0.875rem;
473
-
474
- transition: color 0.25s;
475
-
476
- &:hover {
477
- color: darken(#5865f2, 10);
478
- }
479
-
480
- i {
481
- margin-left: 0.5rem;
482
- }
483
- }
484
- }
485
- }
486
-
487
- .teste-block {
488
- display: inline !important;
489
- }
490
- .qr-id {
491
- color: #32325d !important;
492
- }
493
-
494
- .bg-light--darken {
495
- background-color: $gray-100 !important;
496
- }
497
-
498
- .profile {
499
- display: flex;
500
- flex-direction: column;
501
- align-items: center;
502
-
503
- .avatar {
504
- width: initial!important;
505
- height: initial!important;
506
- margin-top: -48px;
507
- background: transparent !important;
508
- img {
509
- width: 163px;
510
- height: 163px;
511
- border-radius: 50%;
512
- top: 75%;
513
- background: #adb5bd;
514
- border: 4px solid #fff;
515
- }
516
-
517
- .no-image {
518
- display: flex;
519
- justify-content: center;
520
- align-items: center;
521
-
522
- position: absolute;
523
- background-color: #adb5bd;
524
- width: 163px;
525
- height: 163px;
526
- top: 120;
527
- border-radius: 50%;
528
- margin-bottom: 20px;
529
- border: 4px solid #fff;
530
- }
531
- }
532
-
533
- .user-info {
534
- padding: 0 20px;
535
- margin-top: 5px;
536
- }
537
-
538
- p {
539
- font-size: 13px;
540
- font-weight: 400;
541
- color: #62778c;
542
- line-height: 0.85rem;
543
- margin-bottom: 2rem;
544
- }
545
-
546
- span {
547
- font-size: 14px;
548
- color: #8da2b5;
549
- }
550
- }
551
-
552
- .skills {
553
- margin-top: 2.3rem;
554
- margin-bottom: 2.3rem;
555
- }
556
-
557
- .desidered {
558
- margin-bottom: 2.3rem;
559
- }
560
-
561
- .deficiency {
562
- p {
563
- margin-top: 0.25rem;
564
- margin-bottom: 0;
565
- text-transform: capitalize;
566
- }
567
- }
568
-
569
- .languages {
570
- margin-bottom: 2.3rem;
571
- }
572
-
573
- .title-block {
574
- .line {
575
- width: 235px;
576
- height: 0px;
577
- border: 1px solid #ececec5c;
578
- margin-bottom: 0.75rem;
579
- }
580
-
581
- p {
582
- font-size: 13px;
583
- }
584
- }
585
-
586
- .burh-code {
587
- .qr-code {
588
- box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
589
- border-radius: 10px;
590
- }
591
-
592
- p {
593
- font-size: 8px;
594
- font-weight: bold;
595
- }
596
-
597
- span {
598
- font-size: 12px;
599
- font-weight: bold;
600
- }
601
- }
602
-
603
- .socials {
604
- .no-social {
605
- height: 1.39rem;
606
- }
607
- }
608
-
609
- .cv-left {
610
- word-break: initial;
611
- }
612
-
613
- .disable-none {
614
- user-select: none;
615
- }
616
-
617
- .content-left {
618
- width: 25%;
619
- height: auto;
620
- padding: 0 20px;
621
- word-break: break-word !important;
622
- color: #62778c !important;
623
- }
624
- </style>
1
+ <template>
2
+ <div class="bg-white content-left">
3
+ <div class="profile w-100 text-center">
4
+ <div class="avatar">
5
+ <image-with-fallback
6
+ :src="userData.urlAvatar"
7
+ :alt="userData.name"
8
+ :fallbackText="userData.name"
9
+ fallbackSize="1024"
10
+ />
11
+ </div>
12
+
13
+ <slot name="compatibilityTag" />
14
+
15
+ <h5
16
+ class="mb-0 text-wrap"
17
+ v-html="
18
+ highlightText(
19
+ search,
20
+ `${userData.name} ${userData.last_name}`
21
+ )
22
+ "
23
+ />
24
+ <h6
25
+ v-if="userData && userData.user_complementary_information && userData.user_complementary_information.birth && getAge() > 0 || false"
26
+ >
27
+ {{ getAge() }} {{ $t('user_cv.left_side.years_old') }}
28
+ </h6>
29
+
30
+ <p
31
+ class="user-info"
32
+ v-if="userData && userData.user_experience && userData.user_experience.length || 0"
33
+ v-html="
34
+ highlightText(
35
+ search,
36
+ `${userData.user_experience[0].job_title} em ${userData.user_experience[0].company}`
37
+ )
38
+ "
39
+ ></p>
40
+
41
+ <span v-if="userData.user_address">
42
+ <i class="fas fa-map-marker-alt"></i>
43
+ {{ userData.user_address.city_name }} -
44
+ {{ userData.user_address.region_code }} <br>
45
+ {{ userData.user_address.neighborhood }}
46
+ </span><br />
47
+
48
+ <span
49
+ v-if="
50
+ userData && userData.user_complementary_information && userData.user_complementary_information.wage_pretension && userData.user_complementary_information.wage_pretension > 1
51
+ "
52
+ >{{ $t('user_cv.left_side.salary_expectation') }}
53
+ {{
54
+ convertMoney(userData.user_complementary_information.wage_pretension)
55
+ }}</span
56
+ >
57
+ </div>
58
+
59
+ <template
60
+ v-if="hasAboutme && userData && userData.profile"
61
+ >
62
+ <div class="aboutme title-block mt-3 ml-4">
63
+ <h6 class="mb-0">
64
+ {{ $t('user_cv.left_side.disc_profile_title') }}
65
+
66
+ <el-tooltip
67
+ class="ml-1"
68
+ placement="top"
69
+ >
70
+ <div slot="content" style="max-width: 250px">
71
+ {{ $t('user_cv.left_side.disc_tooltip') }}
72
+ </div>
73
+
74
+ <i class="fas fa-info-circle"></i>
75
+ </el-tooltip>
76
+ </h6>
77
+ <div class="line"></div>
78
+
79
+ <div class="aboutme__resume">
80
+ <profile
81
+ :profile="userData.profile"
82
+ :size="48"
83
+ />
84
+
85
+ <button
86
+ @click="handleAboutmeDownloadClick"
87
+ >
88
+ <template
89
+ v-if="!isAboutmeUnlocked"
90
+ >
91
+ {{ $t('user_cv.left_side.unlock_report') }}
92
+ <i class="fas fa-unlock"></i>
93
+ </template>
94
+
95
+ <template v-else>
96
+ {{ $t('user_cv.left_side.download_report') }}
97
+ <i class="fas fa-file-download"></i>
98
+ </template>
99
+ </button>
100
+ </div>
101
+ </div>
102
+ </template>
103
+
104
+ <div
105
+ class="deficiency title-block mt-3 ml-4"
106
+ v-if="!!(userData.deficiency && userData.deficiency.id)"
107
+ >
108
+ <div class="d-flex align-items-center">
109
+ <i class="fas fa-wheelchair"></i>
110
+ <h6 class="mb-0 ml-2">{{ $t('user_cv.left_side.disability_title') }}</h6>
111
+ </div>
112
+ <div class="line"></div>
113
+ <p>
114
+ {{ allDeficiencies(userData && userData.deficiency && userData.deficiency && userData.deficiency.deficiency_id) }}
115
+
116
+ <template> - </template>
117
+
118
+ {{ formatCid(userData && userData.deficiency && userData.deficiency && userData.deficiency.cid) }}
119
+ </p>
120
+
121
+ <p v-if="!!(userData && userData.deficiency && userData.deficiency.appliance)">
122
+ {{ $t('user_cv.left_side.accessory_label') }} {{ userData.deficiency.appliance }}
123
+ </p>
124
+
125
+ <p v-if="!!(userData && userData.deficiency && userData.deficiency.apparatus)">
126
+ {{ $t('user_cv.left_side.necessity_label') }} {{ userData.deficiency.apparatus }}
127
+ </p>
128
+
129
+ <p v-if="!!(userData && userData.deficiency && userData.deficiency.course)">
130
+ {{ $t('user_cv.left_side.course_label') }} {{ userData.deficiency.course }}
131
+ </p>
132
+
133
+ <p v-if="!!(userData && userData.deficiency && userData.deficiency.note)">
134
+ {{ $t('user_cv.left_side.notes_label') }} {{ userData.deficiency.note }}
135
+ </p>
136
+
137
+ <p v-if="!!(userData && userData.deficiency && userData.deficiency.transport === 1)">
138
+ {{ $t('user_cv.left_side.uses_public_transport') }}
139
+ </p>
140
+
141
+ <p v-if="!!(userData && userData.deficiency && userData.deficiency.vehicle === 1)">
142
+ {{ $t('user_cv.left_side.has_adapted_vehicle') }}
143
+ </p>
144
+
145
+ <p v-if="!!(userData && userData.deficiency && userData.deficiency.escort === 1)">
146
+ {{ $t('user_cv.left_side.needs_companion') }}
147
+ </p>
148
+ </div>
149
+
150
+ <div
151
+ v-show="userData && userData.user_desired_job && userData.user_desired_job.length || 0"
152
+ class="desidered title-block mt-3 ml-4"
153
+ >
154
+ <h6 class="mb-0">{{ $t('user_cv.left_side.desired_positions') }}</h6>
155
+ <div class="line"></div>
156
+
157
+ <p
158
+ v-for="(des, index) in userData.user_desired_job"
159
+ :key="`skill-${index}`"
160
+ class="ml-1 mt-1 mb-0 text-capitalize"
161
+ v-html="highlightText(search, des.occupation)"
162
+ ></p>
163
+ </div>
164
+
165
+ <div
166
+ v-show="userData && userData.user_language && userData.user_language.length || 0"
167
+ class="languages title-block mt-3 ml-4"
168
+ >
169
+ <h6 class="mb-0">{{ $t('user_cv.left_side.languages') }}</h6>
170
+ <div class="line"></div>
171
+
172
+ <p
173
+ class="mb-1 text-capitalize"
174
+ v-for="(lan, index) in userData.user_language"
175
+ :key="index"
176
+ v-html="
177
+ highlightText(
178
+ search,
179
+ `${lan.language[0].name} ${languageLevel(lan.level)}`
180
+ )
181
+ "
182
+ ></p>
183
+ </div>
184
+
185
+ <div
186
+ v-show="userData&&userData.user_skill &&userData.user_skill.length > 0"
187
+ class="skills title-block ml-4"
188
+ >
189
+ <h6 class="mb-0">{{ $t('user_cv.left_side.skills') }}</h6>
190
+ <div class="line"></div>
191
+
192
+ <p
193
+ v-for="(skill, index) in userData.user_skill"
194
+ :key="`skill-${index}`"
195
+ class="ml-1 mt-1 mb-0 text-capitalize"
196
+ v-html="highlightText(search, skill.skill_word)"
197
+ ></p>
198
+ </div>
199
+
200
+ <div class="socials text-center mt-5">
201
+ <a
202
+ :href="baseUrl + '/' + userData.slug.slug"
203
+ class="text-center"
204
+ target="_blank"
205
+ rel="noopener noreferrer"
206
+ >
207
+ <img
208
+ class="no-social"
209
+ src="../../../../assets/images/burhCv.svg"
210
+ alt="Burh"
211
+ />
212
+ </a>
213
+ <a
214
+ v-if="userData && userData.user_complementary_information && userData.user_complementary_information.facebook_url || false"
215
+ :href="userData.user_complementary_information.facebook_url"
216
+ target="_blank"
217
+ class="ml-2"
218
+ rel="noopener noreferrer"
219
+ >
220
+ <img
221
+ class="no-social"
222
+ src="../../../../assets/images/facebookCv.svg"
223
+ alt="Facebook"
224
+ />
225
+ </a>
226
+ <a
227
+ v-if="userData && userData.user_complementary_information && userData.user_complementary_information.linkedin_url || false"
228
+ :href="userData.user_complementary_information.linkedin_url"
229
+ target="_blank"
230
+ class="ml-2"
231
+ rel="noopener noreferrer"
232
+ >
233
+ <img
234
+ class="no-social"
235
+ src="../../../../assets/images/linkedinCv.svg"
236
+ alt="Linkdin"
237
+ />
238
+ </a>
239
+ <a
240
+ v-if="userData && userData.user_complementary_information && userData.user_complementary_information.website || false"
241
+ :href="userData.user_complementary_information.website"
242
+ class="text-center ml-2"
243
+ target="_blank"
244
+ rel="noopener noreferrer"
245
+ >
246
+ <img
247
+ class="no-social"
248
+ src="../../../../assets/images/webCv.svg"
249
+ alt="Web"
250
+ />
251
+ </a>
252
+ </div>
253
+
254
+ <div class="burh-code text-center mt-4">
255
+ <vue-qrcode
256
+ :value="baseUrl + '/' + userData.slug.slug"
257
+ :options="{ width: 98, height: 98 }"
258
+ class="border qr-code"
259
+ ></vue-qrcode>
260
+ <p class="mb-0">{{ $t('user_cv.left_side.burh_code') }}</p>
261
+ <span class="qr-id">{{ userData.id }}</span
262
+ ><br />
263
+ <div class="teste-block">
264
+ <span class="font-weight-normal mt-2 d-block" v-if="!isLocked"
265
+ >{{ $t('user_cv.left_side.update_date') }}
266
+ {{ $moment(userData.updated_at).format('DD/MM/YYYY H:mm') }}
267
+ </span>
268
+ </div>
269
+ </div>
270
+ </div>
271
+ </template>
272
+
273
+ <script>
274
+ import getPrefixes from '~/util/getPrefixes.js';
275
+ import VueQrcode from '@chenfengyuan/vue-qrcode';
276
+ import moment from 'moment';
277
+
278
+ import Profile from '../../Aboutme/Profile.vue';
279
+
280
+ export default {
281
+ name: 'user-cv-left-side',
282
+ components: {
283
+ VueQrcode,
284
+ Profile
285
+ },
286
+ computed: {
287
+ isAboutmeUnlocked() {
288
+ const userData = this.userData || {};
289
+ const isUnlocked = userData['is_aboutme_unlocked'] || false;
290
+ return isUnlocked;
291
+ },
292
+ currentCompany() {
293
+ return this.$store.state.company.currentCompany;
294
+ }
295
+ },
296
+ props: {
297
+ userData: {
298
+ type: Object,
299
+ required: true
300
+ },
301
+ baseUrl: String,
302
+ search: {
303
+ type: String,
304
+ default: ''
305
+ },
306
+ hasAboutme: {
307
+ type: Boolean,
308
+ default: false
309
+ }
310
+ },
311
+ data() {
312
+ return {
313
+ isLocked: !this.companyHasProduct(
314
+ this.$store.state.loja && this.$store.state.loja.showableProducts && this.$store.state.loja.showableProducts['BUSCA_AVANCADA'] || false
315
+ )
316
+ };
317
+ },
318
+ methods: {
319
+ handleAboutmeDownloadClick() {
320
+ this.$emit('aboutme-download');
321
+ },
322
+ getAge(){
323
+ const userAge = this.userData.user_complementary_information.birth;
324
+ return moment().diff(userAge, 'years');
325
+ },
326
+ highlightText(search, text) {
327
+ if (search.length < 2) return text;
328
+
329
+ const regex = new RegExp(search.toLowerCase(), 'gmi');
330
+ return String(text || '').replace(
331
+ regex,
332
+ `<span class="search-highlight">${search}</span>`
333
+ );
334
+ },
335
+ getTime(
336
+ { start_year = null, end_year = null, start_month, end_month },
337
+ textHappening = null
338
+ ) {
339
+ const isHappening = !end_month && !end_year;
340
+ const happeningText = textHappening || this.$t('user_cv.left_side.studying');
341
+
342
+ if (isHappening) {
343
+ return happeningText;
344
+ }
345
+
346
+ const dateInitial = this.$moment(
347
+ ['1', start_month.toString(), start_year.toString()],
348
+ 'DD/MM/YYYY'
349
+ );
350
+ const dateDone = this.$moment(
351
+ ['1', end_month.toString(), end_year.toString()],
352
+ 'DD/MM/YYYY'
353
+ );
354
+ const diffDuration = this.$moment.duration(
355
+ dateDone.diff(dateInitial)
356
+ );
357
+ const years = diffDuration.years();
358
+ const months = diffDuration.months();
359
+
360
+ if (years) {
361
+ return years > 1 ? `(${years} ${this.$t('user_cv.left_side.years_plural')})` : `(${years} ${this.$t('user_cv.left_side.year_singular')})`;
362
+ }
363
+
364
+ return months > 1
365
+ ? `(${months} ${this.$t('user_cv.left_side.months_plural')})`
366
+ : months == 1
367
+ ? `(${months} ${this.$t('user_cv.left_side.month_singular')})`
368
+ : '';
369
+ },
370
+ languageLevel(level) {
371
+ switch (parseInt(level)) {
372
+ case 1:
373
+ return this.$t('user_cv.left_side.language_level_beginner');
374
+ case 2:
375
+ return this.$t('user_cv.left_side.language_level_elementary');
376
+ case 3:
377
+ return this.$t('user_cv.left_side.language_level_pre_intermediate');
378
+ case 4:
379
+ return this.$t('user_cv.left_side.language_level_intermediate');
380
+ case 5:
381
+ return this.$t('user_cv.left_side.language_level_upper_intermediate');
382
+ case 6:
383
+ return this.$t('user_cv.left_side.language_level_advanced');
384
+ case 7:
385
+ return this.$t('user_cv.left_side.language_level_fluent');
386
+ default:
387
+ return '';
388
+ }
389
+ },
390
+ treatPhone(phone) {
391
+ if (phone) {
392
+ if (phone == '0' || phone.length < 9 || !phone) {
393
+ return this.$t('user_cv.left_side.phone_not_registered');
394
+ }
395
+ }
396
+
397
+ return phone;
398
+ },
399
+ treatCellphone(cellphone) {
400
+ if (cellphone) {
401
+ if (cellphone == '0' || cellphone.length < 11 || !cellphone) {
402
+ return this.$t('user_cv.left_side.cellphone_not_registered');
403
+ }
404
+ }
405
+
406
+ return cellphone;
407
+ },
408
+ handleGetPrefixes(name = '') {
409
+ return getPrefixes(name);
410
+ },
411
+ treatEndDate(end_month, end_year) {
412
+ if (end_month && end_year) {
413
+ return `${end_month}/${end_year}`;
414
+ }
415
+ return '';
416
+ },
417
+ allDeficiencies(idList) {
418
+ const typeDeficiency = {
419
+ 1: this.$t('user_cv.left_side.disability_physical'),
420
+ 2: this.$t('user_cv.left_side.disability_visual'),
421
+ 3: this.$t('user_cv.left_side.disability_mental'),
422
+ 4: this.$t('user_cv.left_side.disability_auditory'),
423
+ 5: this.$t('user_cv.left_side.disability_phonological'),
424
+ 6: this.$t('user_cv.left_side.disability_multiple')
425
+ };
426
+
427
+ return idList && idList.length && idList.map(id => typeDeficiency[id] || null).filter(id => id).join(' | ') || '';
428
+ },
429
+ formatCid(cidList) {
430
+ return cidList && cidList.length && cidList.filter(cid => cid).join(' | ') || '';
431
+ },
432
+ convertMoney(money) {
433
+ let moneyAux = parseFloat(money);
434
+ let m = moneyAux.toLocaleString('pt-BR', {
435
+ style: 'currency',
436
+ currency: 'BRL'
437
+ });
438
+ return m;
439
+ }
440
+ },
441
+ };
442
+ </script>
443
+ <style lang="scss" scoped>
444
+ @import '@burh/nuxt-core/assets/sass/burh-ds/variables/_colors.scss';
445
+
446
+ /deep/ .search-highlight {
447
+ background: rgb(255, 252, 61);
448
+ color: #000;
449
+ }
450
+
451
+ .aboutme {
452
+ display: flex;
453
+ flex-direction: column;
454
+ margin: 1rem 0;
455
+
456
+ &__resume {
457
+ display: flex;
458
+ flex-direction: row;
459
+ align-items: center;
460
+ gap: 1rem;
461
+
462
+ > button {
463
+ padding: 0.25rem 0.5rem;
464
+ border: 0;
465
+ margin: 0;
466
+ color: #5865f2;
467
+ background: transparent;
468
+ font-weight: 500;
469
+ font-size: 0.875rem;
470
+
471
+ transition: color 0.25s;
472
+
473
+ &:hover {
474
+ color: darken(#5865f2, 10);
475
+ }
476
+
477
+ i {
478
+ margin-left: 0.5rem;
479
+ }
480
+ }
481
+ }
482
+ }
483
+
484
+ .teste-block {
485
+ display: inline !important;
486
+ }
487
+ .qr-id {
488
+ color: #32325d !important;
489
+ }
490
+
491
+ .bg-light--darken {
492
+ background-color: $gray-100 !important;
493
+ }
494
+
495
+ .profile {
496
+ display: flex;
497
+ flex-direction: column;
498
+ align-items: center;
499
+
500
+ .avatar {
501
+ width: initial!important;
502
+ height: initial!important;
503
+ margin-top: -48px;
504
+ background: transparent !important;
505
+ img {
506
+ width: 163px;
507
+ height: 163px;
508
+ border-radius: 50%;
509
+ top: 75%;
510
+ background: #adb5bd;
511
+ border: 4px solid #fff;
512
+ }
513
+
514
+ .no-image {
515
+ display: flex;
516
+ justify-content: center;
517
+ align-items: center;
518
+
519
+ position: absolute;
520
+ background-color: #adb5bd;
521
+ width: 163px;
522
+ height: 163px;
523
+ top: 120;
524
+ border-radius: 50%;
525
+ margin-bottom: 20px;
526
+ border: 4px solid #fff;
527
+ }
528
+ }
529
+
530
+ .user-info {
531
+ padding: 0 20px;
532
+ margin-top: 5px;
533
+ }
534
+
535
+ p {
536
+ font-size: 13px;
537
+ font-weight: 400;
538
+ color: #62778c;
539
+ line-height: 0.85rem;
540
+ margin-bottom: 2rem;
541
+ }
542
+
543
+ span {
544
+ font-size: 14px;
545
+ color: #8da2b5;
546
+ }
547
+ }
548
+
549
+ .skills {
550
+ margin-top: 2.3rem;
551
+ margin-bottom: 2.3rem;
552
+ }
553
+
554
+ .desidered {
555
+ margin-bottom: 2.3rem;
556
+ }
557
+
558
+ .deficiency {
559
+ p {
560
+ margin-top: 0.25rem;
561
+ margin-bottom: 0;
562
+ text-transform: capitalize;
563
+ }
564
+ }
565
+
566
+ .languages {
567
+ margin-bottom: 2.3rem;
568
+ }
569
+
570
+ .title-block {
571
+ .line {
572
+ width: 235px;
573
+ height: 0px;
574
+ border: 1px solid #ececec5c;
575
+ margin-bottom: 0.75rem;
576
+ }
577
+
578
+ p {
579
+ font-size: 13px;
580
+ }
581
+ }
582
+
583
+ .burh-code {
584
+ .qr-code {
585
+ box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
586
+ border-radius: 10px;
587
+ }
588
+
589
+ p {
590
+ font-size: 8px;
591
+ font-weight: bold;
592
+ }
593
+
594
+ span {
595
+ font-size: 12px;
596
+ font-weight: bold;
597
+ }
598
+ }
599
+
600
+ .socials {
601
+ .no-social {
602
+ height: 1.39rem;
603
+ }
604
+ }
605
+
606
+ .cv-left {
607
+ word-break: initial;
608
+ }
609
+
610
+ .disable-none {
611
+ user-select: none;
612
+ }
613
+
614
+ .content-left {
615
+ width: 25%;
616
+ height: auto;
617
+ padding: 0 20px;
618
+ word-break: break-word !important;
619
+ color: #62778c !important;
620
+ }
621
+ </style>