@burh/nuxt-core 1.0.292 → 1.0.294
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.
|
@@ -59,16 +59,16 @@
|
|
|
59
59
|
</div>
|
|
60
60
|
<!-- CONTATO -->
|
|
61
61
|
<h5 class="font-weight-bold mt-4 ml-3">Contatos</h5>
|
|
62
|
-
<div class="ml-3">
|
|
62
|
+
<div class="ml-3 info-text">
|
|
63
63
|
<span v-if="userData.email != null">Email: {{userData.email}}</span><br>
|
|
64
|
-
<span v-if="userData.user_contact.cellphone != null">Celular: {{userData.user_contact.cellphone}}</span><br>
|
|
65
|
-
<span v-if="userData.user_contact.phone != null">Telefone: {{userData.user_contact.phone}}</span>
|
|
64
|
+
<span v-if="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.phone != null && userData.user_contact.phone.length > 1">Telefone: {{phoneMask(userData.user_contact.phone)}}</span>
|
|
66
66
|
</div>
|
|
67
67
|
|
|
68
68
|
<!-- EDUCAÇÃO -->
|
|
69
69
|
<h5 class="font-weight-bold mt-4 ml-3">Educação</h5>
|
|
70
70
|
<div
|
|
71
|
-
class="
|
|
71
|
+
class=" ml-3"
|
|
72
72
|
v-show="userData.user_education.length > 0"
|
|
73
73
|
v-for="(edu, index) in userData.user_education"
|
|
74
74
|
:key="index"
|
|
@@ -187,9 +187,11 @@
|
|
|
187
187
|
|
|
188
188
|
<script>
|
|
189
189
|
import getPrefixes from '~/util/getPrefixes.js';
|
|
190
|
+
import { mask } from 'vue-the-mask';
|
|
190
191
|
|
|
191
192
|
export default {
|
|
192
193
|
name: 'user-cv-middle',
|
|
194
|
+
directives: { mask },
|
|
193
195
|
props: {
|
|
194
196
|
userData: Object,
|
|
195
197
|
tools: {
|
|
@@ -253,6 +255,22 @@ export default {
|
|
|
253
255
|
}
|
|
254
256
|
},
|
|
255
257
|
methods: {
|
|
258
|
+
phoneMask(v) {
|
|
259
|
+
|
|
260
|
+
let r = v.replace(/\D/g, '');
|
|
261
|
+
r = r.replace(/^0/, '');
|
|
262
|
+
|
|
263
|
+
if (r.length > 11) {
|
|
264
|
+
r = r.replace(/^(\d\d)(\d{5})(\d{4}).*/, '($1) $2-$3');
|
|
265
|
+
} else if (r.length > 7) {
|
|
266
|
+
r = r.replace(/^(\d\d)(\d{5})(\d{0,4}).*/, '($1) $2-$3');
|
|
267
|
+
} else if (r.length > 2) {
|
|
268
|
+
r = r.replace(/^(\d\d)(\d{0,5})/, '($1) $2');
|
|
269
|
+
} else if (v.trim() !== '') {
|
|
270
|
+
r = r.replace(/^(\d*)/, '($1');
|
|
271
|
+
}
|
|
272
|
+
return r;
|
|
273
|
+
},
|
|
256
274
|
highlightText(search, text) {
|
|
257
275
|
if (search.length < 2) return text;
|
|
258
276
|
|