@burh/nuxt-core 1.0.206 → 1.0.207

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,145 +1,188 @@
1
1
  <template>
2
- <div class="bg-white content-left">
3
- <div class="profile w-100 text-center">
4
- <div class="avatar">
5
- <img
6
- v-if="userData.urlAvatar"
7
- :src="userData.urlAvatar"
8
- :alt="userData.name"
9
- />
10
- <div v-else class="no-image">
11
- {{ userData.name }}
12
- </div>
13
- </div>
14
-
15
- <h5 class="mb-0 text-wrap" :class="{ 'mt-5': !userData.urlAvatar }">
16
- {{ userData.name }} {{ userData.last_name }}
17
- </h5>
18
-
19
- <p class="user-info" v-if="userData.user_experience.length > 0">
20
- {{ userData.user_experience[0].job_title }} em
21
- {{ userData.user_experience[0].company }}
22
- </p>
23
-
24
- <span v-if="userData.user_address">
25
- <i class="fas fa-map-marker-alt"></i>
26
- {{ userData.user_address.city_name }} -
27
- {{ userData.user_address.region_code }}
28
- </span>
29
- </div>
30
-
31
- <div
32
- v-show="userData.user_skill.length > 0"
33
- class="skills title-block ml-4"
34
- >
35
- <h6 class="mb-0">Habilidades</h6>
36
- <div class="line"></div>
37
-
38
- <p
39
- v-for="(skill, index) in userData.user_skill"
40
- :key="`skill-${index}`"
41
- class="ml-1 mt-1 mb-0 text-capitalize"
42
- >
43
- {{ skill.skill_word }}
44
- </p>
45
- </div>
46
-
47
- <div
48
- v-show="userData.user_language.length > 0"
49
- class="languages title-block mt-3 ml-4"
50
- >
51
- <h6 class="mb-0">Idiomas</h6>
52
- <div class="line"></div>
53
-
54
- <p
55
- class="mb-1 text-capitalize"
56
- v-for="(lan, index) in userData.user_language"
57
- :key="index"
58
- >
59
- {{ lan.language[0].name }} {{ languageLevel(lan.level) }}
60
- </p>
61
- </div>
62
-
63
- <div
64
- v-show="userData.user_desired_job.length > 0"
65
- class="desidered title-block mt-3 ml-4"
66
- >
67
- <h6 class="mb-0">Cargos desejados</h6>
68
- <div class="line"></div>
69
-
70
- <p
71
- v-for="(des, index) in userData.user_desired_job"
72
- :key="`skill-${index}`"
73
- class="ml-1 mt-1 mb-0 text-capitalize"
74
- >
75
- {{ des.occupation }}
76
- </p>
77
- </div>
78
-
79
- <div class="socials text-center mt-5">
80
- <a
81
- :href="baseUrl + '/' + userData.slug.slug"
82
- class="text-center"
83
- target="_blank"
84
- rel="noopener noreferrer"
85
- >
86
- <img
87
- class="no-social"
88
- src="../../../../assets/images/burhCv.svg"
89
- alt="Burh"
90
- />
91
- </a>
92
- <a
93
- v-show="userData.user_complementary_information.facebook_url"
94
- :href="userData.user_complementary_information.facebook_url"
95
- target="_blank"
96
- class="ml-2"
97
- rel="noopener noreferrer"
98
- >
99
- <img
100
- class="no-social"
101
- src="../../../../assets/images/facebookCv.svg"
102
- alt="Facebook"
103
- />
104
- </a>
105
- <a
106
- v-show="userData.user_complementary_information.linkedin_url"
107
- :href="userData.user_complementary_information.linkedin_url"
108
- target="_blank"
109
- class="ml-2"
110
- rel="noopener noreferrer"
111
- >
112
- <img
113
- class="no-social"
114
- src="../../../../assets/images/linkedinCv.svg"
115
- alt="Linkdin"
116
- />
117
- </a>
118
- <a
119
- v-show="userData.user_complementary_information.website"
120
- :href="userData.user_complementary_information.website"
121
- class="text-center ml-2"
122
- target="_blank"
123
- rel="noopener noreferrer"
124
- >
125
- <img
126
- class="no-social"
127
- src="../../../../assets/images/webCv.svg"
128
- alt="Web"
129
- />
130
- </a>
131
- </div>
132
-
133
- <div class="burh-code text-center mt-4">
134
- <vue-qrcode
135
- :value="baseUrl + '/' + userData.slug.slug"
136
- :options="{ width: 98, height: 98 }"
137
- class="border qr-code"
138
- ></vue-qrcode>
139
- <p class="mb-0">Código BURH</p>
140
- <span class="qr-id">{{ userData.id }}</span>
141
- </div>
142
- </div>
2
+ <div class="bg-white content-left">
3
+ <div class="profile w-100 text-center">
4
+ <div class="avatar">
5
+ <img
6
+ v-if="userData.urlAvatar"
7
+ :src="userData.urlAvatar"
8
+ :alt="userData.name"
9
+ />
10
+ <div v-else class="no-image">
11
+ {{ userData.name }}
12
+ </div>
13
+ </div>
14
+
15
+ <h5 class="mb-0 text-wrap" :class="{ 'mt-5': !userData.urlAvatar }">
16
+ {{ userData.name }} {{ userData.last_name }}
17
+ </h5>
18
+
19
+ <p class="user-info" v-if="userData.user_experience.length > 0">
20
+ {{ userData.user_experience[0].job_title }} em
21
+ {{ userData.user_experience[0].company }}
22
+ </p>
23
+
24
+ <span v-if="userData.user_address">
25
+ <i class="fas fa-map-marker-alt"></i>
26
+ {{ userData.user_address.city_name }} -
27
+ {{ userData.user_address.region_code }}
28
+ </span>
29
+ </div>
30
+
31
+ <div
32
+ v-show="userData.user_skill.length > 0"
33
+ class="skills title-block ml-4"
34
+ >
35
+ <h6 class="mb-0">Habilidades</h6>
36
+ <div class="line"></div>
37
+
38
+ <p
39
+ v-for="(skill, index) in userData.user_skill"
40
+ :key="`skill-${index}`"
41
+ class="ml-1 mt-1 mb-0 text-capitalize"
42
+ >
43
+ {{ skill.skill_word }}
44
+ </p>
45
+ </div>
46
+
47
+ <div
48
+ v-show="userData.user_language.length > 0"
49
+ class="languages title-block mt-3 ml-4"
50
+ >
51
+ <h6 class="mb-0">Idiomas</h6>
52
+ <div class="line"></div>
53
+
54
+ <p
55
+ class="mb-1 text-capitalize"
56
+ v-for="(lan, index) in userData.user_language"
57
+ :key="index"
58
+ >
59
+ {{ lan.language[0].name }} {{ languageLevel(lan.level) }}
60
+ </p>
61
+ </div>
62
+
63
+ <div
64
+ v-show="userData.user_desired_job.length > 0"
65
+ class="desidered title-block mt-3 ml-4"
66
+ >
67
+ <h6 class="mb-0">Cargos desejados</h6>
68
+ <div class="line"></div>
69
+
70
+ <p
71
+ v-for="(des, index) in userData.user_desired_job"
72
+ :key="`skill-${index}`"
73
+ class="ml-1 mt-1 mb-0 text-capitalize"
74
+ >
75
+ {{ des.occupation }}
76
+ </p>
77
+ </div>
78
+
79
+ <div
80
+ class="deficiency title-block mt-3 ml-4"
81
+ v-if="userData.user_deficiency"
82
+ >
83
+ <div class="d-flex align-items-center">
84
+ <i class="fas fa-wheelchair"></i>
85
+ <h6 class="mb-0 ml-2">Deficiência</h6>
86
+ </div>
87
+ <div class="line"></div>
88
+ <p>
89
+ {{ userData.user_deficiency.deficiency_id | allDeficiencies }} -
90
+ {{ userData.user_deficiency.cid }}
91
+ </p>
92
+
93
+ <p v-show="userData.user_deficiency.appliance">
94
+ Acessório: {{ userData.user_deficiency.appliance }}
95
+ </p>
96
+
97
+ <p v-show="userData.user_deficiency.apparatus">
98
+ Necessidade: {{ userData.user_deficiency.apparatus }}
99
+ </p>
100
+
101
+ <p v-show="userData.user_deficiency.course">
102
+ Curso: {{ userData.user_deficiency.course }}
103
+ </p>
104
+
105
+ <p v-show="userData.user_deficiency.note">
106
+ Anotações: {{ userData.user_deficiency.note }}
107
+ </p>
108
+
109
+ <p v-show="userData.user_deficiency.transport === 1">
110
+ Utiliza transporte coletivo
111
+ </p>
112
+
113
+ <p v-show="userData.user_deficiency.vehicle === 1">
114
+ Possuí veículo adaptado
115
+ </p>
116
+
117
+ <p v-show="userData.user_deficiency.escort === 1">
118
+ Precisa de acompanhante
119
+ </p>
120
+ </div>
121
+
122
+ <div class="socials text-center mt-5">
123
+ <a
124
+ :href="baseUrl + '/' + userData.slug.slug"
125
+ class="text-center"
126
+ target="_blank"
127
+ rel="noopener noreferrer"
128
+ >
129
+ <img
130
+ class="no-social"
131
+ src="../../../../assets/images/burhCv.svg"
132
+ alt="Burh"
133
+ />
134
+ </a>
135
+ <a
136
+ v-show="userData.user_complementary_information.facebook_url"
137
+ :href="userData.user_complementary_information.facebook_url"
138
+ target="_blank"
139
+ class="ml-2"
140
+ rel="noopener noreferrer"
141
+ >
142
+ <img
143
+ class="no-social"
144
+ src="../../../../assets/images/facebookCv.svg"
145
+ alt="Facebook"
146
+ />
147
+ </a>
148
+ <a
149
+ v-show="userData.user_complementary_information.linkedin_url"
150
+ :href="userData.user_complementary_information.linkedin_url"
151
+ target="_blank"
152
+ class="ml-2"
153
+ rel="noopener noreferrer"
154
+ >
155
+ <img
156
+ class="no-social"
157
+ src="../../../../assets/images/linkedinCv.svg"
158
+ alt="Linkdin"
159
+ />
160
+ </a>
161
+ <a
162
+ v-show="userData.user_complementary_information.website"
163
+ :href="userData.user_complementary_information.website"
164
+ class="text-center ml-2"
165
+ target="_blank"
166
+ rel="noopener noreferrer"
167
+ >
168
+ <img
169
+ class="no-social"
170
+ src="../../../../assets/images/webCv.svg"
171
+ alt="Web"
172
+ />
173
+ </a>
174
+ </div>
175
+
176
+ <div class="burh-code text-center mt-4">
177
+ <vue-qrcode
178
+ :value="baseUrl + '/' + userData.slug.slug"
179
+ :options="{ width: 98, height: 98 }"
180
+ class="border qr-code"
181
+ ></vue-qrcode>
182
+ <p class="mb-0">Código BURH</p>
183
+ <span class="qr-id">{{ userData.id }}</span>
184
+ </div>
185
+ </div>
143
186
  </template>
144
187
 
145
188
  <script>
@@ -147,100 +190,111 @@ import getPrefixes from '~/util/getPrefixes.js';
147
190
  import VueQrcode from '@chenfengyuan/vue-qrcode';
148
191
 
149
192
  export default {
150
- name: 'user-cv-left-side',
151
- components: {
152
- VueQrcode
153
- },
154
- props: {
155
- userData: Object,
156
- baseUrl: String
157
- },
158
- mounted(){
159
- console.log(this.userData);
160
- },
161
- methods: {
162
- getTime(
163
- { start_year = null, end_year = null, start_month, end_month },
164
- textHappening = 'Cursando'
165
- ) {
166
- const isHappening = !end_month && !end_year;
167
-
168
- if (isHappening) {
169
- return textHappening;
170
- }
171
-
172
- const dateInitial = this.$moment(
173
- ['1', start_month.toString(), start_year.toString()],
174
- 'DD/MM/YYYY'
175
- );
176
- const dateDone = this.$moment(
177
- ['1', end_month.toString(), end_year.toString()],
178
- 'DD/MM/YYYY'
179
- );
180
- const diffDuration = this.$moment.duration(
181
- dateDone.diff(dateInitial)
182
- );
183
- const years = diffDuration.years();
184
- const months = diffDuration.months();
185
-
186
- if (years) {
187
- return years > 1 ? `(${years} anos)` : `(${years} ano)`;
188
- }
189
-
190
- return months > 1
191
- ? `(${months} meses)`
192
- : months == 1
193
- ? `(${months} mês)`
194
- : '';
195
- },
196
- languageLevel(level) {
197
- switch (parseInt(level)) {
198
- case 1:
199
- return 'Iniciante';
200
- case 2:
201
- return 'Elementar';
202
- case 3:
203
- return 'Pré-intermediário';
204
- case 4:
205
- return 'Intermediário';
206
- case 5:
207
- return 'Intermediário Superior';
208
- case 6:
209
- return 'Avançado';
210
- case 7:
211
- return 'Fluente';
212
- default:
213
- return '';
214
- }
215
- },
216
- treatPhone(phone) {
217
- if (phone) {
218
- if (phone == '0' || phone.length < 9 || !phone) {
219
- return 'não cadastrado';
220
- }
221
- }
222
-
223
- return phone;
224
- },
225
- treatCellphone(cellphone) {
226
- if (cellphone) {
227
- if (cellphone == '0' || cellphone.length < 11 || !cellphone) {
228
- return 'não cadastrado';
229
- }
230
- }
231
-
232
- return cellphone;
233
- },
234
- handleGetPrefixes(name = '') {
235
- return getPrefixes(name);
236
- },
237
- treatEndDate(end_month, end_year) {
238
- if (end_month && end_year) {
239
- return `${end_month}/${end_year}`;
240
- }
241
- return '';
242
- }
243
- }
193
+ name: 'user-cv-left-side',
194
+ components: {
195
+ VueQrcode
196
+ },
197
+ props: {
198
+ userData: Object,
199
+ baseUrl: String
200
+ },
201
+ methods: {
202
+ getTime(
203
+ { start_year = null, end_year = null, start_month, end_month },
204
+ textHappening = 'Cursando'
205
+ ) {
206
+ const isHappening = !end_month && !end_year;
207
+
208
+ if (isHappening) {
209
+ return textHappening;
210
+ }
211
+
212
+ const dateInitial = this.$moment(
213
+ ['1', start_month.toString(), start_year.toString()],
214
+ 'DD/MM/YYYY'
215
+ );
216
+ const dateDone = this.$moment(
217
+ ['1', end_month.toString(), end_year.toString()],
218
+ 'DD/MM/YYYY'
219
+ );
220
+ const diffDuration = this.$moment.duration(
221
+ dateDone.diff(dateInitial)
222
+ );
223
+ const years = diffDuration.years();
224
+ const months = diffDuration.months();
225
+
226
+ if (years) {
227
+ return years > 1 ? `(${years} anos)` : `(${years} ano)`;
228
+ }
229
+
230
+ return months > 1
231
+ ? `(${months} meses)`
232
+ : months == 1
233
+ ? `(${months} mês)`
234
+ : '';
235
+ },
236
+ languageLevel(level) {
237
+ switch (parseInt(level)) {
238
+ case 1:
239
+ return 'Iniciante';
240
+ case 2:
241
+ return 'Elementar';
242
+ case 3:
243
+ return 'Pré-intermediário';
244
+ case 4:
245
+ return 'Intermediário';
246
+ case 5:
247
+ return 'Intermediário Superior';
248
+ case 6:
249
+ return 'Avançado';
250
+ case 7:
251
+ return 'Fluente';
252
+ default:
253
+ return '';
254
+ }
255
+ },
256
+ treatPhone(phone) {
257
+ if (phone) {
258
+ if (phone == '0' || phone.length < 9 || !phone) {
259
+ return 'não cadastrado';
260
+ }
261
+ }
262
+
263
+ return phone;
264
+ },
265
+ treatCellphone(cellphone) {
266
+ if (cellphone) {
267
+ if (cellphone == '0' || cellphone.length < 11 || !cellphone) {
268
+ return 'não cadastrado';
269
+ }
270
+ }
271
+
272
+ return cellphone;
273
+ },
274
+ handleGetPrefixes(name = '') {
275
+ return getPrefixes(name);
276
+ },
277
+ treatEndDate(end_month, end_year) {
278
+ if (end_month && end_year) {
279
+ return `${end_month}/${end_year}`;
280
+ }
281
+ return '';
282
+ }
283
+ },
284
+ filters: {
285
+ allDeficiencies(id) {
286
+ const typeDeficiency = {
287
+ 1: 'Deficiência Física',
288
+ 2: 'Deficiência Visual',
289
+ 3: 'Deficiência Mental',
290
+ 4: 'Deficiência Auditiva',
291
+ 5: 'Deficiência Fonológica',
292
+ 6: 'Deficiência Múltipla'
293
+ };
294
+
295
+ return typeDeficiency[id] || '-';
296
+ }
297
+ }
244
298
  };
245
299
  </script>
246
300
 
@@ -248,7 +302,7 @@ export default {
248
302
  @import '@burh/nuxt-core/assets/sass/burh-ds/variables/_colors.scss';
249
303
 
250
304
  .qr-id {
251
- color: #32325d!important;;
305
+ color: #32325d !important;
252
306
  }
253
307
 
254
308
  .bg-light--darken {
@@ -288,7 +342,7 @@ export default {
288
342
  font-size: 13px;
289
343
  font-weight: 400;
290
344
  color: #62778c;
291
- line-height: .85rem;
345
+ line-height: 0.85rem;
292
346
  margin-bottom: 2rem;
293
347
  }
294
348
 
@@ -302,6 +356,19 @@ export default {
302
356
  margin-top: 2.3rem;
303
357
  margin-bottom: 2.3rem;
304
358
  }
359
+
360
+ .desidered {
361
+ margin-bottom: 2.3rem;
362
+ }
363
+
364
+ .deficiency {
365
+ p {
366
+ margin-top: 0.25rem;
367
+ margin-bottom: 0;
368
+ text-transform: capitalize;
369
+ }
370
+ }
371
+
305
372
  .languages {
306
373
  margin-bottom: 2.3rem;
307
374
  }
@@ -311,7 +378,7 @@ export default {
311
378
  width: 235px;
312
379
  height: 0px;
313
380
  border: 1px solid #ececec5c;
314
- margin-bottom: .75rem;
381
+ margin-bottom: 0.75rem;
315
382
  }
316
383
 
317
384
  p {
@@ -354,7 +421,7 @@ export default {
354
421
  width: 25%;
355
422
  height: auto;
356
423
  padding: 0 20px;
357
- word-break: break-word !important;
358
- color: #62778c!important;
424
+ word-break: break-word !important;
425
+ color: #62778c !important;
359
426
  }
360
427
  </style>
@@ -1,309 +1,326 @@
1
1
  <template>
2
- <div class="bg-white content-middle">
3
- <!-- FERRAMENTAS -->
4
- <div class="tools mt-3">
5
- <button
6
- @click="$emit(tool.event)"
7
- class="ml-3 burh-color"
8
- v-for="(tool, index) in tools"
9
- :key="index"
10
- >
11
- {{ tool.name }}
12
- </button>
13
- </div>
14
-
15
- <!-- SOBRE -->
16
- <div class="about content-block mt-5 ml-3 mr-3">
17
- <h5 class="font-weight-bold">Sobre</h5>
18
- <p
19
- id="USER_ABOUT"
20
- class="mb-0"
21
- :class="
22
- !wordIsLesserThan(
23
- userData.user_complementary_information.about
24
- ) && 'readmore'
25
- "
26
- >
27
- {{ userData.user_complementary_information.about }}
28
- </p>
29
- <a
30
- href="#"
31
- aria-label="expandir conteudo"
32
- v-show="
33
- userData.user_complementary_information.about &&
34
- !wordIsLesserThan(
35
- userData.user_complementary_information.about
36
- )
37
- "
38
- @click.prevent.stop="toggleReadMore($event, 'USER_ABOUT')"
39
- >Ler mais</a
40
- >
41
-
42
- <p v-show="!userData.user_complementary_information.about" class="">
43
- Nenhuma informação adicionada
44
- </p>
45
- </div>
46
-
47
- <!-- EDUCAÇÃO -->
48
- <h5 class="font-weight-bold mt-4 ml-3">Educação</h5>
49
- <div class="no-info ml-3" v-show="userData.user_education.length === 0">
50
- <p>
51
- Nenhuma informação adicionada
52
- </p>
53
- </div>
54
- <div
55
- class="education ml-3"
56
- v-show="userData.user_education.length > 0"
57
- v-for="(edu, index) in userData.user_education"
58
- :key="index"
59
- >
60
- <p class="sub-title">{{ edu.formation }}</p>
61
- <p class="info-text">{{ edu.institution }}</p>
62
- <span class="info-text">
63
- {{ edu.start_month }}/{{ edu.start_year }} -
64
- {{ treatEndDate(edu.end_month, edu.end_year) }}
65
- {{ getTime(false, edu) }}
66
- {{
67
- edu.user_education_period
68
- ? '-' + edu.user_education_period.name
69
- : ''
70
- }}
71
- </span>
72
- </div>
73
-
74
- <!-- EXPERIÊNCIAS -->
75
- <h5 class="font-weight-bold mt-4 ml-3">Experiência</h5>
76
- <div
77
- class="no-info ml-3"
78
- v-show="userData.user_experience.length === 0"
79
- >
80
- <p>
81
- Nenhuma informação adicionada
82
- </p>
83
- </div>
84
- <div
85
- v-show="userData.user_experience.length > 0"
86
- class="experience ml-3 mr-3"
87
- v-for="(exp, index) in userData.user_experience"
88
- :key="`experience-${index}`"
89
- >
90
- <p class="sub-title">{{ exp.job_title }}</p>
91
- <p class="info-text">{{ exp.company }}, {{ exp.location }}</p>
92
- <span class="info-text">
93
- {{ exp.start_month }}/{{ exp.start_year }} -
94
- {{ treatEndDate(exp.end_month, exp.end_year) }}
95
- {{ getTime(true, exp) }}
96
- </span>
97
-
98
- <p
99
- :id="`USER_EXPERIENCE-${index}`"
100
- class="description mt-4 mb-0"
101
- :class="!wordIsLesserThan(exp.description) && 'readmore'"
102
- >
103
- {{ exp.description }}
104
- </p>
105
-
106
- <a
107
- href="#"
108
- aria-label="expandir conteudo"
109
- v-show="!wordIsLesserThan(exp.description)"
110
- @click.prevent.stop="
111
- toggleReadMore($event, `USER_EXPERIENCE-${index}`)
112
- "
113
- >Ler mais</a
114
- ><br /><br />
115
- </div>
116
-
117
- <!-- CURSOS -->
118
- <h5 class="font-weight-bold mt-1 ml-3">Cursos Complementares</h5>
119
- <div class="no-info ml-3" v-show="userData.user_course.length === 0">
120
- <p>
121
- Nenhuma informação adicionada
122
- </p>
123
- </div>
124
- <div
125
- v-show="userData.user_course.length > 0"
126
- class="courses ml-3"
127
- v-for="(cou, index) in userData.user_course"
128
- :key="`course-${index}`"
129
- >
130
- <p class="sub-title">{{ cou.institution }}</p>
131
- <p class="info-text mb-3">
132
- {{ cou.name }} - {{ cou.end_year }}
133
- {{ getTime(false, cou) }}
134
- </p>
135
- </div>
136
- </div>
2
+ <div class="bg-white content-middle">
3
+ <!-- FERRAMENTAS -->
4
+ <div class="tools mt-3">
5
+ <button
6
+ @click="$emit(tool.event)"
7
+ class="ml-3 burh-color"
8
+ v-for="(tool, index) in tools"
9
+ :key="index"
10
+ >
11
+ {{ tool.name }}
12
+ </button>
13
+ </div>
14
+
15
+ <!-- SOBRE -->
16
+ <div class="about content-block mt-5 ml-3 mr-3">
17
+ <h5 class="font-weight-bold">Sobre</h5>
18
+ <p
19
+ id="USER_ABOUT"
20
+ class="mb-0"
21
+ :class="
22
+ !wordIsLesserThan(
23
+ userData.user_complementary_information.about
24
+ ) && 'readmore'
25
+ "
26
+ >
27
+ {{ userData.user_complementary_information.about }}
28
+ </p>
29
+ <a
30
+ href="#"
31
+ aria-label="expandir conteudo"
32
+ v-show="
33
+ userData.user_complementary_information.about &&
34
+ !wordIsLesserThan(
35
+ userData.user_complementary_information.about
36
+ )
37
+ "
38
+ @click.prevent.stop="toggleReadMore($event, 'USER_ABOUT')"
39
+ >Ler mais</a
40
+ >
41
+
42
+ <p v-show="!userData.user_complementary_information.about" class="">
43
+ Nenhuma informação adicionada
44
+ </p>
45
+ </div>
46
+
47
+ <!-- EDUCAÇÃO -->
48
+ <h5 class="font-weight-bold mt-4 ml-3">Educação</h5>
49
+ <div class="no-info ml-3" v-show="userData.user_education.length === 0">
50
+ <p>
51
+ Nenhuma informação adicionada
52
+ </p>
53
+ </div>
54
+ <div
55
+ class="education ml-3"
56
+ v-show="userData.user_education.length > 0"
57
+ v-for="(edu, index) in userData.user_education"
58
+ :key="index"
59
+ >
60
+ <p class="sub-title">{{ edu.formation }}</p>
61
+ <p class="info-text">{{ edu.institution }}</p>
62
+ <span class="info-text">
63
+ {{ edu.start_month }}/{{ edu.start_year }} -
64
+ {{ treatEndDate(edu.end_month, edu.end_year) }}
65
+ {{ getTime(false, edu) }}
66
+ {{
67
+ edu.user_education_period
68
+ ? '-' + edu.user_education_period.name
69
+ : ''
70
+ }} </span
71
+ ><br />
72
+ <span class="info-text">{{
73
+ edu.formation_level_id | formationLevel
74
+ }}</span>
75
+ </div>
76
+
77
+ <!-- EXPERIÊNCIAS -->
78
+ <h5 class="font-weight-bold mt-4 ml-3">Experiência</h5>
79
+ <div
80
+ class="no-info ml-3"
81
+ v-show="userData.user_experience.length === 0"
82
+ >
83
+ <p>
84
+ Nenhuma informação adicionada
85
+ </p>
86
+ </div>
87
+ <div
88
+ v-show="userData.user_experience.length > 0"
89
+ class="experience ml-3 mr-3"
90
+ v-for="(exp, index) in userData.user_experience"
91
+ :key="`experience-${index}`"
92
+ >
93
+ <p class="sub-title">{{ exp.job_title }}</p>
94
+ <p class="info-text">{{ exp.company }}, {{ exp.location }}</p>
95
+ <span class="info-text">
96
+ {{ exp.start_month }}/{{ exp.start_year }} -
97
+ {{ treatEndDate(exp.end_month, exp.end_year) }}
98
+ {{ getTime(true, exp) }}
99
+ </span>
100
+
101
+ <p
102
+ :id="`USER_EXPERIENCE-${index}`"
103
+ class="description mt-4 mb-0"
104
+ :class="!wordIsLesserThan(exp.description) && 'readmore'"
105
+ >
106
+ {{ exp.description }}
107
+ </p>
108
+
109
+ <a
110
+ href="#"
111
+ aria-label="expandir conteudo"
112
+ v-show="!wordIsLesserThan(exp.description)"
113
+ @click.prevent.stop="
114
+ toggleReadMore($event, `USER_EXPERIENCE-${index}`)
115
+ "
116
+ >Ler mais</a
117
+ ><br /><br />
118
+ </div>
119
+
120
+ <!-- CURSOS -->
121
+ <h5 class="font-weight-bold mt-1 ml-3">Cursos Complementares</h5>
122
+ <div class="no-info ml-3" v-show="userData.user_course.length === 0">
123
+ <p>
124
+ Nenhuma informação adicionada
125
+ </p>
126
+ </div>
127
+ <div
128
+ v-show="userData.user_course.length > 0"
129
+ class="courses ml-3"
130
+ v-for="(cou, index) in userData.user_course"
131
+ :key="`course-${index}`"
132
+ >
133
+ <p class="sub-title">{{ cou.institution }}</p>
134
+ <p class="info-text mb-3">
135
+ {{ cou.name }} - {{ cou.end_year }}
136
+ {{ getTime(false, cou) }}
137
+ </p>
138
+ </div>
139
+ </div>
137
140
  </template>
138
141
 
139
142
  <script>
140
143
  import getPrefixes from '~/util/getPrefixes.js';
141
144
 
142
145
  export default {
143
- name: 'user-cv-middle',
144
- props: {
145
- userData: Object,
146
- tools: {
147
- type: Array,
148
- default: () => []
149
- }
150
- },
151
- watch: {
152
- userData() {
153
- this.userData.user_experience = this.filterByDate(
154
- this.userData.user_experience
155
- );
156
- this.userData.user_course = this.filterByDate(
157
- this.userData.user_course,
158
- 'old'
159
- );
160
- this.userData.user_education = this.filterByDate(
161
- this.userData.user_education,
162
- 'old'
163
- );
164
- }
165
- },
166
- methods: {
167
- filterByDate(data, by = 'new') {
168
- let sortedArray = data.sort((a, b) => {
169
- a = [
170
- a.start_month,
171
- a.start_year,
172
- a.end_month | 12,
173
- a.end_year | 9999
174
- ];
175
-
176
- b = [
177
- b.start_month,
178
- b.start_year,
179
- b.end_month | 12,
180
- b.end_year | 9999
181
- ];
182
-
183
- // Primeiro filtro -> chaves: 0 e 1 -> Filtro por data de inicio
184
- // Segundo filtro -> chaves: 2 e 3 -> Filtro por data de termino (subir não concluídos para primeiros)
185
-
186
- let byStart;
187
- let byEnd;
188
-
189
- switch (by) {
190
- case 'old':
191
- byStart =
146
+ name: 'user-cv-middle',
147
+ props: {
148
+ userData: Object,
149
+ tools: {
150
+ type: Array,
151
+ default: () => []
152
+ }
153
+ },
154
+ filters: {
155
+ formationLevel(id) {
156
+ const typeFormation = {
157
+ 1: 'Ensino Médio',
158
+ 2: 'Ensino Técnico',
159
+ 3: 'Graduação',
160
+ 4: 'Pós-Graduação',
161
+ 5: 'Mestrado',
162
+ 6: 'Doutorado'
163
+ };
164
+
165
+ return typeFormation[id] || '-';
166
+ }
167
+ },
168
+ watch: {
169
+ userData() {
170
+ this.userData.user_experience = this.filterByDate(
171
+ this.userData.user_experience
172
+ );
173
+ this.userData.user_course = this.filterByDate(
174
+ this.userData.user_course,
175
+ 'old'
176
+ );
177
+ this.userData.user_education = this.filterByDate(
178
+ this.userData.user_education,
179
+ 'old'
180
+ );
181
+ }
182
+ },
183
+ methods: {
184
+ filterByDate(data, by = 'new') {
185
+ let sortedArray = data.sort((a, b) => {
186
+ a = [
187
+ a.start_month,
188
+ a.start_year,
189
+ a.end_month | 12,
190
+ a.end_year | 9999
191
+ ];
192
+
193
+ b = [
194
+ b.start_month,
195
+ b.start_year,
196
+ b.end_month | 12,
197
+ b.end_year | 9999
198
+ ];
199
+
200
+ // Primeiro filtro -> chaves: 0 e 1 -> Filtro por data de inicio
201
+ // Segundo filtro -> chaves: 2 e 3 -> Filtro por data de termino (subir não concluídos para primeiros)
202
+
203
+ let byStart;
204
+ let byEnd;
205
+
206
+ switch (by) {
207
+ case 'old':
208
+ byStart =
192
209
  new Date(a[1], a[0], 1).getTime() -
193
210
  new Date(b[1], b[0], 1).getTime();
194
- byEnd =
211
+ byEnd =
195
212
  new Date(b[3], b[2], 1).getTime() -
196
213
  new Date(a[3], a[2], 1).getTime();
197
- break;
214
+ break;
198
215
 
199
- default:
200
- byStart =
216
+ default:
217
+ byStart =
201
218
  new Date(b[1], b[0], 1).getTime() -
202
219
  new Date(a[1], a[0], 1).getTime();
203
- byEnd =
220
+ byEnd =
204
221
  new Date(b[3], b[2], 1).getTime() -
205
222
  new Date(a[3], a[2], 1).getTime();
206
- break;
207
- }
208
-
209
- return byStart - byEnd;
210
- });
211
-
212
- return sortedArray;
213
- },
214
- toggleReadMore(event, id) {
215
- const element = document.getElementById(id);
216
- element.classList.toggle('readmore');
217
- event.target.innerText == 'Ler mais'
218
- ? (event.target.innerText = 'Esconder')
219
- : (event.target.innerText = 'Ler mais');
220
- },
221
- getTime(
222
- isExperience,
223
- { start_year = null, end_year = null, start_month, end_month },
224
- textHappening = 'Cursando'
225
- ) {
226
- const isHappening = !end_month && !end_year;
227
-
228
- if (isHappening) {
229
- return isExperience === true ? 'Atualmente' : textHappening;
230
- }
231
-
232
- const dateInitial = this.$moment(
233
- ['1', start_month.toString(), start_year.toString()],
234
- 'DD/MM/YYYY'
235
- );
236
- const dateDone = this.$moment(
237
- ['1', end_month.toString(), end_year.toString()],
238
- 'DD/MM/YYYY'
239
- );
240
- const diffDuration = this.$moment.duration(
241
- dateDone.diff(dateInitial)
242
- );
243
- const years = diffDuration.years();
244
- const months = diffDuration.months();
245
-
246
- if (years) {
247
- return years > 1 ? `(${years} anos)` : `(${years} ano)`;
248
- }
249
-
250
- return months > 1
251
- ? `(${months} meses)`
252
- : months == 1
253
- ? `(${months} mês)`
254
- : '';
255
- },
256
- languageLevel(level) {
257
- switch (parseInt(level)) {
258
- case 1:
259
- return 'Iniciante';
260
- case 2:
261
- return 'Elementar';
262
- case 3:
263
- return 'Pré-intermediário';
264
- case 4:
265
- return 'Intermediário';
266
- case 5:
267
- return 'Intermediário Superior';
268
- case 6:
269
- return 'Avançado';
270
- case 7:
271
- return 'Fluente';
272
- default:
273
- return '';
274
- }
275
- },
276
- treatPhone(phone) {
277
- if (phone) {
278
- if (phone == '0' || phone.length < 9 || !phone) {
279
- return 'não cadastrado';
280
- }
281
- }
282
-
283
- return phone;
284
- },
285
- treatCellphone(cellphone) {
286
- if (cellphone) {
287
- if (cellphone == '0' || cellphone.length < 11 || !cellphone) {
288
- return 'não cadastrado';
289
- }
290
- }
291
-
292
- return cellphone;
293
- },
294
- handleGetPrefixes(name = '') {
295
- return getPrefixes(name);
296
- },
297
- treatEndDate(end_month, end_year) {
298
- if (end_month && end_year) {
299
- return `${end_month}/${end_year}`;
300
- }
301
- return '';
302
- },
303
- wordIsLesserThan(word, value = 300) {
304
- return word && word.length < value;
305
- }
306
- }
223
+ break;
224
+ }
225
+
226
+ return byStart - byEnd;
227
+ });
228
+
229
+ return sortedArray;
230
+ },
231
+ toggleReadMore(event, id) {
232
+ const element = document.getElementById(id);
233
+ element.classList.toggle('readmore');
234
+ event.target.innerText == 'Ler mais'
235
+ ? (event.target.innerText = 'Esconder')
236
+ : (event.target.innerText = 'Ler mais');
237
+ },
238
+ getTime(
239
+ isExperience,
240
+ { start_year = null, end_year = null, start_month, end_month },
241
+ textHappening = 'Cursando'
242
+ ) {
243
+ const isHappening = !end_month && !end_year;
244
+
245
+ if (isHappening) {
246
+ return isExperience === true ? 'Atualmente' : textHappening;
247
+ }
248
+
249
+ const dateInitial = this.$moment(
250
+ ['1', start_month.toString(), start_year.toString()],
251
+ 'DD/MM/YYYY'
252
+ );
253
+ const dateDone = this.$moment(
254
+ ['1', end_month.toString(), end_year.toString()],
255
+ 'DD/MM/YYYY'
256
+ );
257
+ const diffDuration = this.$moment.duration(
258
+ dateDone.diff(dateInitial)
259
+ );
260
+ const years = diffDuration.years();
261
+ const months = diffDuration.months();
262
+
263
+ if (years) {
264
+ return years > 1 ? `(${years} anos)` : `(${years} ano)`;
265
+ }
266
+
267
+ return months > 1
268
+ ? `(${months} meses)`
269
+ : months == 1
270
+ ? `(${months} mês)`
271
+ : '';
272
+ },
273
+ languageLevel(level) {
274
+ switch (parseInt(level)) {
275
+ case 1:
276
+ return 'Iniciante';
277
+ case 2:
278
+ return 'Elementar';
279
+ case 3:
280
+ return 'Pré-intermediário';
281
+ case 4:
282
+ return 'Intermediário';
283
+ case 5:
284
+ return 'Intermediário Superior';
285
+ case 6:
286
+ return 'Avançado';
287
+ case 7:
288
+ return 'Fluente';
289
+ default:
290
+ return '';
291
+ }
292
+ },
293
+ treatPhone(phone) {
294
+ if (phone) {
295
+ if (phone == '0' || phone.length < 9 || !phone) {
296
+ return 'não cadastrado';
297
+ }
298
+ }
299
+
300
+ return phone;
301
+ },
302
+ treatCellphone(cellphone) {
303
+ if (cellphone) {
304
+ if (cellphone == '0' || cellphone.length < 11 || !cellphone) {
305
+ return 'não cadastrado';
306
+ }
307
+ }
308
+
309
+ return cellphone;
310
+ },
311
+ handleGetPrefixes(name = '') {
312
+ return getPrefixes(name);
313
+ },
314
+ treatEndDate(end_month, end_year) {
315
+ if (end_month && end_year) {
316
+ return `${end_month}/${end_year}`;
317
+ }
318
+ return '';
319
+ },
320
+ wordIsLesserThan(word, value = 300) {
321
+ return word && word.length < value;
322
+ }
323
+ }
307
324
  };
308
325
  </script>
309
326
 
@@ -195,6 +195,7 @@ export default {
195
195
  .filter(filterSlots)
196
196
  .map(formatRequest);
197
197
  this.$emit('send-test', testRequest);
198
+ this.$emit('closemodal');
198
199
  },
199
200
  categoryIsAllowedToSend(categoryId) {
200
201
  const categoryIsAllowToSend = Object.values(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burh/nuxt-core",
3
- "version": "1.0.206",
3
+ "version": "1.0.207",
4
4
  "description": "Design System and Components.",
5
5
  "author": "Burh",
6
6
  "scripts": {