@burh/nuxt-core 1.0.199 → 1.0.201
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,33 +1,72 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
<modal
|
|
3
|
+
:show.sync="openModal"
|
|
4
|
+
v-on:close="closeModal()"
|
|
5
|
+
class="modal modal-docs"
|
|
6
|
+
modalContentClasses="container-fluid"
|
|
7
|
+
headerClasses="row px-4 pt-5"
|
|
8
|
+
bodyClasses="px-4"
|
|
9
|
+
>
|
|
10
|
+
<template slot="header">
|
|
4
11
|
<div class="d-flex mx-auto flex-column pl-4">
|
|
5
12
|
<i class="display-1 fas fa-file mx-auto primary"></i>
|
|
6
|
-
|
|
13
|
+
<h2 class="display-4 mx-auto">Avaliações</h2>
|
|
7
14
|
</div>
|
|
8
|
-
|
|
15
|
+
</template>
|
|
9
16
|
|
|
10
17
|
<ul class="list-group list-group-flush" data-toggle="checklist">
|
|
11
|
-
<li
|
|
12
|
-
|
|
18
|
+
<li
|
|
19
|
+
class="list-group-item px-0"
|
|
20
|
+
v-for="item in modalData.slice(
|
|
21
|
+
(currentPage - 1) * pageSize,
|
|
22
|
+
currentPage * pageSize
|
|
23
|
+
)"
|
|
13
24
|
:key="item.id"
|
|
14
25
|
>
|
|
15
|
-
<div
|
|
26
|
+
<div
|
|
27
|
+
v-if="item.test"
|
|
28
|
+
class="checklist-item checklist-item-info"
|
|
29
|
+
>
|
|
16
30
|
<div class="checklist-info">
|
|
17
|
-
<h5 class="checklist-title mb-0 mr-4">
|
|
18
|
-
|
|
31
|
+
<h5 class="checklist-title mb-0 mr-4">
|
|
32
|
+
{{ item.test.name }} -
|
|
33
|
+
<small>{{
|
|
34
|
+
$moment(item.created_at).format(
|
|
35
|
+
'DD/MM/YYYY H:mm'
|
|
36
|
+
)
|
|
37
|
+
}}</small>
|
|
38
|
+
</h5>
|
|
39
|
+
<badge
|
|
40
|
+
v-if="item.finished_at"
|
|
41
|
+
:type="
|
|
42
|
+
item.avarage < courseInfo.course.minimun_score
|
|
43
|
+
? 'danger'
|
|
44
|
+
: 'secondary'
|
|
45
|
+
"
|
|
46
|
+
>Nota: {{ item.avarage }}</badge
|
|
47
|
+
>
|
|
19
48
|
</div>
|
|
20
49
|
<div>
|
|
21
|
-
<el-tooltip v-if="item.started_at && item.finished_at === null" :content="'Teste em andamento'" placement="top" class="px-4">
|
|
50
|
+
<!-- <el-tooltip v-if="item.started_at && item.finished_at === null" :content="'Teste em andamento'" placement="top" class="px-4">
|
|
22
51
|
<i class="fas fa-clock"></i>
|
|
23
|
-
</el-tooltip>
|
|
24
|
-
<el-tooltip
|
|
52
|
+
</el-tooltip> -->
|
|
53
|
+
<el-tooltip
|
|
54
|
+
v-if="item.started_at === null"
|
|
55
|
+
:content="'Teste enviado'"
|
|
56
|
+
placement="top"
|
|
57
|
+
class="px-4"
|
|
58
|
+
>
|
|
25
59
|
<i class="fas fa-info-circle"></i>
|
|
26
60
|
</el-tooltip>
|
|
27
|
-
<el-tooltip
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
61
|
+
<el-tooltip
|
|
62
|
+
v-if="item.finished_at !== null"
|
|
63
|
+
:content="'Reenviar teste'"
|
|
64
|
+
placement="top"
|
|
65
|
+
class="px-4"
|
|
66
|
+
>
|
|
67
|
+
<i
|
|
68
|
+
class="fas fa-external-link-alt cursor-pointer"
|
|
69
|
+
@click="redoTest(item.id)"
|
|
31
70
|
>
|
|
32
71
|
</i>
|
|
33
72
|
</el-tooltip>
|
|
@@ -36,87 +75,93 @@
|
|
|
36
75
|
</li>
|
|
37
76
|
</ul>
|
|
38
77
|
<div class="card-footer py-4 d-flex">
|
|
39
|
-
<base-pagination
|
|
78
|
+
<base-pagination
|
|
79
|
+
class="mx-auto"
|
|
80
|
+
v-model="currentPage"
|
|
81
|
+
:perPage="3"
|
|
82
|
+
:total="modalData.length"
|
|
83
|
+
></base-pagination>
|
|
40
84
|
</div>
|
|
41
|
-
|
|
42
|
-
</modal>
|
|
85
|
+
</modal>
|
|
43
86
|
</template>
|
|
44
87
|
<script>
|
|
45
88
|
import swal from 'sweetalert2';
|
|
46
89
|
import { mask } from 'vue-the-mask';
|
|
47
|
-
import { Checkbox, CheckboxGroup } from 'element-ui'
|
|
90
|
+
import { Checkbox, CheckboxGroup } from 'element-ui';
|
|
48
91
|
export default {
|
|
49
92
|
name: 'tests-modal',
|
|
50
93
|
directives: { mask },
|
|
51
94
|
components: {
|
|
52
|
-
|
|
53
|
-
|
|
95
|
+
[Checkbox.name]: Checkbox,
|
|
96
|
+
[CheckboxGroup.name]: CheckboxGroup
|
|
54
97
|
},
|
|
55
|
-
data(){
|
|
56
|
-
return{
|
|
98
|
+
data() {
|
|
99
|
+
return {
|
|
57
100
|
filtrarPorTexto: '',
|
|
58
101
|
currentPage: 1,
|
|
59
102
|
pageSize: 3,
|
|
60
103
|
downloadItems: [],
|
|
61
104
|
checkList: []
|
|
62
|
-
}
|
|
105
|
+
};
|
|
63
106
|
},
|
|
64
|
-
props:{
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
},
|
|
69
|
-
model:{
|
|
70
|
-
prop: 'show'
|
|
107
|
+
props: {
|
|
108
|
+
modalData: null,
|
|
109
|
+
show: false,
|
|
110
|
+
courseInfo: null
|
|
71
111
|
},
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
get(){return this.show;},
|
|
75
|
-
set(show){this.$emit('input', show);}
|
|
76
|
-
}
|
|
112
|
+
model: {
|
|
113
|
+
prop: 'show'
|
|
77
114
|
},
|
|
78
|
-
|
|
79
|
-
|
|
115
|
+
computed: {
|
|
116
|
+
openModal: {
|
|
117
|
+
get() {
|
|
118
|
+
return this.show;
|
|
119
|
+
},
|
|
120
|
+
set(show) {
|
|
121
|
+
this.$emit('input', show);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
80
124
|
},
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
125
|
+
mounted() {},
|
|
126
|
+
methods: {
|
|
127
|
+
goToTest(testId) {
|
|
128
|
+
this.$emit('go-to-test', testId);
|
|
84
129
|
},
|
|
85
|
-
closeModal(){
|
|
86
|
-
this.downloadItems = []
|
|
87
|
-
this.checkList = []
|
|
88
|
-
this.$emit('close-modal')
|
|
130
|
+
closeModal() {
|
|
131
|
+
this.downloadItems = [];
|
|
132
|
+
this.checkList = [];
|
|
133
|
+
this.$emit('close-modal');
|
|
89
134
|
},
|
|
90
|
-
async redoTest(testId){
|
|
91
|
-
let test_id = this.courseInfo.tests.find(e => e.id === testId)
|
|
92
|
-
|
|
135
|
+
async redoTest(testId) {
|
|
136
|
+
let test_id = this.courseInfo.tests.find(e => e.id === testId);
|
|
137
|
+
|
|
93
138
|
let payload = {
|
|
94
139
|
company_id: this.courseInfo.course.company_id,
|
|
95
|
-
users:[
|
|
140
|
+
users: [
|
|
96
141
|
{
|
|
97
142
|
user_id: this.courseInfo.user_id,
|
|
98
143
|
test_id: test_id.test.id,
|
|
99
144
|
course_id: this.courseInfo.course.id
|
|
100
145
|
}
|
|
101
146
|
]
|
|
102
|
-
}
|
|
147
|
+
};
|
|
103
148
|
this.$emit('send-test', payload);
|
|
104
|
-
this.$emit('close-modal')
|
|
149
|
+
this.$emit('close-modal');
|
|
105
150
|
}
|
|
106
151
|
}
|
|
107
|
-
}
|
|
152
|
+
};
|
|
108
153
|
</script>
|
|
109
154
|
<style lang="scss">
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
.el-checkbox__label{
|
|
119
|
-
display: none !important;
|
|
120
|
-
}
|
|
155
|
+
.modal-docs {
|
|
156
|
+
.modal-header .close {
|
|
157
|
+
padding: 1.25rem;
|
|
158
|
+
margin: -1rem -1rem -1rem !important;
|
|
159
|
+
}
|
|
160
|
+
.modal-footer {
|
|
161
|
+
padding-top: 0 !important;
|
|
121
162
|
}
|
|
122
|
-
|
|
163
|
+
.el-checkbox__label {
|
|
164
|
+
display: none !important;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
</style>
|