@burh/nuxt-core 1.0.243 → 1.0.245
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.
- package/components/argon-core/Inputs/DropzoneFileUpload.vue +0 -1
- package/components/burh-ds/Cards/RecruitmentUserCard.vue +7 -2
- package/components/burh-ds/Curriculum/UserCurriculum/UserCvLeftSide.vue +437 -436
- package/components/burh-ds/Curriculum/UserCurriculum/UserCvRightSide.vue +581 -355
- package/components/burh-ds/Curriculum/UserCurriculum/index.vue +19 -5
- package/components/burh-ds/Modals/DropzoneModal.vue +101 -96
- package/package.json +1 -1
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
<el-dialog
|
|
3
3
|
:visible.sync="isActive"
|
|
4
4
|
width="80%"
|
|
5
|
-
custom-class="position-relative"
|
|
5
|
+
:custom-class="`position-relative user__preview__container ${isLoading ? 'loading' : ''}`"
|
|
6
6
|
@close="$emit('close')"
|
|
7
7
|
class="test-radius"
|
|
8
8
|
>
|
|
9
9
|
<template>
|
|
10
10
|
<div class="row d-flex justify-content-between mx-0 user-pdf">
|
|
11
|
-
<img v-show="coverPhoto" :src="coverPhoto" alt="" />
|
|
11
|
+
<img v-if="!isLoading" v-show="coverPhoto" :src="coverPhoto" alt="" />
|
|
12
12
|
<div v-show="!coverPhoto" class="no-cover-photo"></div>
|
|
13
13
|
<slot name="content"></slot>
|
|
14
14
|
</div>
|
|
@@ -72,7 +72,8 @@ export default {
|
|
|
72
72
|
showTools: false,
|
|
73
73
|
coverPhoto: this.cover,
|
|
74
74
|
hasPrevUser: false,
|
|
75
|
-
hasNextUser: false
|
|
75
|
+
hasNextUser: false,
|
|
76
|
+
isLoading: false,
|
|
76
77
|
};
|
|
77
78
|
},
|
|
78
79
|
watch: {
|
|
@@ -91,12 +92,12 @@ export default {
|
|
|
91
92
|
},
|
|
92
93
|
methods: {
|
|
93
94
|
preUser() {
|
|
94
|
-
if (this.currentUserIndex <= 0) return;
|
|
95
|
+
if (this.currentUserIndex <= 0 || this.isLoading) return;
|
|
95
96
|
|
|
96
97
|
this.$emit('prev-user');
|
|
97
98
|
},
|
|
98
99
|
nextUser() {
|
|
99
|
-
if (this.currentUserIndex >= (this.maxUsers - 1)) return;
|
|
100
|
+
if (this.currentUserIndex >= (this.maxUsers - 1) || this.isLoading) return;
|
|
100
101
|
|
|
101
102
|
this.$emit('next-user');
|
|
102
103
|
},
|
|
@@ -112,6 +113,8 @@ export default {
|
|
|
112
113
|
}
|
|
113
114
|
},
|
|
114
115
|
handleArrowsActive() {
|
|
116
|
+
this.isLoading = true;
|
|
117
|
+
|
|
115
118
|
if (this.currentUserIndex <= 0) {
|
|
116
119
|
this.hasPrevUser = false;
|
|
117
120
|
this.hasNextUser = true;
|
|
@@ -125,6 +128,8 @@ export default {
|
|
|
125
128
|
if (this.currentUserIndex === (this.maxUsers - 1)) {
|
|
126
129
|
this.hasNextUser = false;
|
|
127
130
|
}
|
|
131
|
+
|
|
132
|
+
setTimeout(() => this.isLoading = false, 1000);
|
|
128
133
|
}
|
|
129
134
|
},
|
|
130
135
|
beforeMount() {
|
|
@@ -170,6 +175,7 @@ export default {
|
|
|
170
175
|
width: 100%;
|
|
171
176
|
height: 100vh;
|
|
172
177
|
z-index: -1;
|
|
178
|
+
pointer-events: none;
|
|
173
179
|
> button {
|
|
174
180
|
width: 42px;
|
|
175
181
|
height: 42px;
|
|
@@ -180,6 +186,7 @@ export default {
|
|
|
180
186
|
background: transparent;
|
|
181
187
|
font-size: 2rem;
|
|
182
188
|
color: $primary;
|
|
189
|
+
pointer-events: all;
|
|
183
190
|
}
|
|
184
191
|
}
|
|
185
192
|
|
|
@@ -228,4 +235,11 @@ export default {
|
|
|
228
235
|
height: 150px;
|
|
229
236
|
}
|
|
230
237
|
}
|
|
238
|
+
|
|
239
|
+
/deep/ .user__preview__container {
|
|
240
|
+
transition: opacity 0.2s;
|
|
241
|
+
&.loading {
|
|
242
|
+
opacity: 0;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
231
245
|
</style>
|
|
@@ -1,111 +1,116 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
<modal
|
|
3
|
+
:show.sync="openModal"
|
|
4
|
+
v-on:close="$emit('close-modal-video')"
|
|
5
|
+
modalContentClasses="container-fluid"
|
|
6
|
+
class="modal"
|
|
7
|
+
>
|
|
8
|
+
<template slot="header">
|
|
9
|
+
<div class="">
|
|
10
|
+
<h2 class="display-4">{{modalTitle}}</h2>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
<dropzone-file-upload
|
|
15
|
+
v-if="image == null"
|
|
16
|
+
v-on:error="showError"
|
|
17
|
+
ref="Mydropzone"
|
|
18
|
+
:options="dropzoneOptions"
|
|
19
|
+
v-model="fileToUpload"
|
|
20
|
+
class=""
|
|
21
|
+
:multiple="multiple"
|
|
22
|
+
/>
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
<div class="row mb-4" v-if="image != null">
|
|
25
|
+
<img class="col-12" :src="image" alt="Cover" />
|
|
26
|
+
</div>
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
28
|
+
<template slot="footer">
|
|
29
|
+
<base-button type="link" @click="removeImage"
|
|
30
|
+
>Remover
|
|
31
|
+
</base-button>
|
|
32
|
+
<base-button
|
|
33
|
+
type="primary"
|
|
34
|
+
class="ml-auto"
|
|
35
|
+
role="button"
|
|
36
|
+
@click="saveImage"
|
|
37
|
+
>Salvar
|
|
38
|
+
</base-button>
|
|
39
|
+
</template>
|
|
40
|
+
</modal>
|
|
40
41
|
</template>
|
|
41
42
|
<script>
|
|
42
43
|
import DropzoneFileUpload from '@burh/nuxt-core/components/argon-core/Inputs/DropzoneFileUpload.vue';
|
|
43
44
|
import swal from 'sweetalert2';
|
|
44
45
|
|
|
45
46
|
export default {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
47
|
+
name: 'dropzone-modal',
|
|
48
|
+
components: {
|
|
49
|
+
DropzoneFileUpload
|
|
50
|
+
},
|
|
51
|
+
props: {
|
|
52
|
+
show: false,
|
|
53
|
+
image: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: null
|
|
56
|
+
},
|
|
57
|
+
modalTitle: String,
|
|
58
|
+
multiple: Boolean
|
|
59
|
+
},
|
|
60
|
+
data() {
|
|
61
|
+
return {
|
|
62
|
+
fileToUpload: null,
|
|
63
|
+
dropzoneOptions: {
|
|
64
|
+
maxFiles: 1,
|
|
65
|
+
maxFilesize: 0.2, // ESTÁ DEFINIDO TAMANHO MÁXIMO DE 20 KB NA FOTO
|
|
66
|
+
dictFileTooBig:
|
|
63
67
|
'A imagem que você tentou inserir é maior que 200KB',
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
68
|
+
dictDefaultMessage: 'Clique ou arraste seu arquivo aqui',
|
|
69
|
+
acceptedFiles: 'image/*',
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
},
|
|
73
|
+
model: {
|
|
74
|
+
prop: 'show'
|
|
75
|
+
},
|
|
76
|
+
computed: {
|
|
77
|
+
openModal: {
|
|
78
|
+
get() {
|
|
79
|
+
return this.show;
|
|
80
|
+
},
|
|
81
|
+
set(show) {
|
|
82
|
+
this.$emit('input', show);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
methods: {
|
|
87
|
+
showError(file, message) {
|
|
88
|
+
return swal.fire({
|
|
89
|
+
title: 'Erro',
|
|
90
|
+
text: message,
|
|
91
|
+
type: 'error',
|
|
92
|
+
buttonsStyling: false,
|
|
93
|
+
confirmButtonText: 'Ok, fechar!',
|
|
94
|
+
confirmButtonClass: 'btn btn-primary btn-fill'
|
|
95
|
+
});
|
|
96
|
+
},
|
|
97
|
+
removeImage() {
|
|
98
|
+
if (!this.image) {
|
|
99
|
+
this.$refs.Mydropzone.removeAllFiles();
|
|
100
|
+
}
|
|
101
|
+
this.$emit('remove-image');
|
|
102
|
+
},
|
|
103
|
+
async saveImage() {
|
|
104
|
+
if (this.fileToUpload != null) {
|
|
105
|
+
let image = this.fileToUpload;
|
|
106
|
+
if (image[0].size <= 200000) {
|
|
107
|
+
this.$emit('save-img', image);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
105
110
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
111
|
+
this.$emit('close-modal-video');
|
|
112
|
+
}
|
|
113
|
+
}
|
|
109
114
|
};
|
|
110
115
|
</script>
|
|
111
116
|
<style lang="scss" scoped>
|