@burh/nuxt-core 1.0.63 → 1.0.64

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