@burh/nuxt-core 1.0.54 → 1.0.56
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/burh-ds/Cards/TestCard.vue +11 -7
- package/components/burh-ds/Modals/AppConfigModal.vue +49 -4
- package/components/burh-ds/Modals/SendCourse.vue +2 -0
- package/components/burh-ds/Modals/SendTest.vue +11 -3
- package/components/burh-ds/Modals/UniversityAccessModal.vue +26 -25
- package/package.json +1 -1
|
@@ -6,43 +6,43 @@
|
|
|
6
6
|
class="fa fa-ellipsis-h custom"
|
|
7
7
|
aria-hidden="true"
|
|
8
8
|
/>
|
|
9
|
-
<li v-if="isDefault && !hasCourse" class="dropdown-item d-flex align-items-center w-100" @click="sendTest">
|
|
9
|
+
<li v-if="isDefault && !hasCourse && !hideItems.send" class="dropdown-item d-flex align-items-center w-100" @click="sendTest">
|
|
10
10
|
<i class="fa fa-paper-plane" aria-hidden="true" />
|
|
11
11
|
<span>
|
|
12
12
|
Enviar teste
|
|
13
13
|
</span>
|
|
14
14
|
</li>
|
|
15
|
-
<li v-if="isDefault" class="dropdown-item d-flex align-items-center w-100" @click="viewTest">
|
|
15
|
+
<li v-if="isDefault && !hideItems.view" class="dropdown-item d-flex align-items-center w-100" @click="viewTest">
|
|
16
16
|
<i class="fa fa-eye" aria-hidden="true" />
|
|
17
17
|
<span>
|
|
18
18
|
Visualizar teste
|
|
19
19
|
</span>
|
|
20
20
|
</li>
|
|
21
|
-
<li v-if="isDefault" class="dropdown-item d-flex align-items-center w-100" @click="viewAnsweredTests">
|
|
21
|
+
<li v-if="isDefault && !hideItems.answers" class="dropdown-item d-flex align-items-center w-100" @click="viewAnsweredTests">
|
|
22
22
|
<i class="fa fa-file" aria-hidden="true" />
|
|
23
23
|
<span>
|
|
24
24
|
Respostas recebidas
|
|
25
25
|
</span>
|
|
26
26
|
</li>
|
|
27
|
-
<li v-if="isDefault" class="dropdown-item d-flex align-items-center w-100" @click="exportExcel(id)">
|
|
27
|
+
<li v-if="isDefault && !hideItems.export" class="dropdown-item d-flex align-items-center w-100" @click="exportExcel(id)">
|
|
28
28
|
<i class="fa fa-arrow-circle-down" aria-hidden="true" />
|
|
29
29
|
<span>
|
|
30
30
|
Exportar Respostas
|
|
31
31
|
</span>
|
|
32
32
|
</li>
|
|
33
|
-
<li class="dropdown-item d-flex align-items-center w-100" @click="copyTest">
|
|
33
|
+
<li v-if="!hideItems.copy" class="dropdown-item d-flex align-items-center w-100" @click="copyTest">
|
|
34
34
|
<i class="fa fa-clone" aria-hidden="true" />
|
|
35
35
|
<span>
|
|
36
36
|
Fazer uma cópia
|
|
37
37
|
</span>
|
|
38
38
|
</li>
|
|
39
|
-
<li v-if="isDefault" class="dropdown-item d-flex align-items-center w-100" @click="openRenameEditor">
|
|
39
|
+
<li v-if="isDefault && !hideItems.rename" class="dropdown-item d-flex align-items-center w-100" @click="openRenameEditor">
|
|
40
40
|
<i class="fa fa-pen" aria-hidden="true" />
|
|
41
41
|
<span>
|
|
42
42
|
Renomear teste
|
|
43
43
|
</span>
|
|
44
44
|
</li>
|
|
45
|
-
<li v-if="isDefault" class="dropdown-item d-flex align-items-center w-100" @click="deleteTest(id)">
|
|
45
|
+
<li v-if="isDefault && !hideItems.delete" class="dropdown-item d-flex align-items-center w-100" @click="deleteTest(id)">
|
|
46
46
|
<i class="fa fa-trash" aria-hidden="true" />
|
|
47
47
|
<span>
|
|
48
48
|
Apagar teste
|
|
@@ -101,6 +101,10 @@ export default {
|
|
|
101
101
|
hasCourse: {
|
|
102
102
|
type: Boolean,
|
|
103
103
|
default: false,
|
|
104
|
+
},
|
|
105
|
+
hideItems: {
|
|
106
|
+
type: Object,
|
|
107
|
+
default: () => ({}),
|
|
104
108
|
}
|
|
105
109
|
},
|
|
106
110
|
methods: {
|
|
@@ -28,6 +28,26 @@
|
|
|
28
28
|
></textarea>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
|
+
<div class="col-12 mb-4 d-flex flex-column" v-if="!isCourse">
|
|
32
|
+
<label for="category" class="form-control-label">Categoria</label>
|
|
33
|
+
<el-select
|
|
34
|
+
class="select-danger"
|
|
35
|
+
id="category"
|
|
36
|
+
:disabled="testId != null ? true : false"
|
|
37
|
+
:empty="'Nenhuma categoria foi encontrada'"
|
|
38
|
+
v-model="configInfo.category"
|
|
39
|
+
:placeholder="''"
|
|
40
|
+
>
|
|
41
|
+
<el-option
|
|
42
|
+
v-for="category in categories"
|
|
43
|
+
:key="category.id"
|
|
44
|
+
:label="category.name"
|
|
45
|
+
:value="category.id"
|
|
46
|
+
>
|
|
47
|
+
</el-option>
|
|
48
|
+
</el-select>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
31
51
|
<div class="col-12 mb-4" v-if="isCourse">
|
|
32
52
|
<base-input
|
|
33
53
|
v-mask="['##:##:##']"
|
|
@@ -36,7 +56,7 @@
|
|
|
36
56
|
v-model="configInfo.workload"
|
|
37
57
|
></base-input>
|
|
38
58
|
</div>
|
|
39
|
-
|
|
59
|
+
|
|
40
60
|
<slot name="testes"></slot>
|
|
41
61
|
|
|
42
62
|
<div class="col-12 mb-4">
|
|
@@ -58,14 +78,20 @@
|
|
|
58
78
|
<div class="col-12 d-flex pb-4">
|
|
59
79
|
<base-button size="md" type="primary" role="button"
|
|
60
80
|
@click="sendConfig()"
|
|
61
|
-
class="ml-auto">{{configAppButton}}
|
|
81
|
+
class="ml-auto">{{configAppButton}}
|
|
82
|
+
</base-button>
|
|
62
83
|
</div>
|
|
63
84
|
</validation-observer>
|
|
64
85
|
</modal>
|
|
65
86
|
</template>
|
|
66
87
|
<script>
|
|
67
88
|
import { mask } from 'vue-the-mask';
|
|
89
|
+
import { Select, Option } from "element-ui";
|
|
68
90
|
export default {
|
|
91
|
+
components:{
|
|
92
|
+
[Select.name]: Select,
|
|
93
|
+
[Option.name]: Option,
|
|
94
|
+
},
|
|
69
95
|
directives: { mask },
|
|
70
96
|
data(){
|
|
71
97
|
return{
|
|
@@ -73,7 +99,8 @@ export default {
|
|
|
73
99
|
title: this.titleValue,
|
|
74
100
|
textarea: this.textAreaValue,
|
|
75
101
|
selectedTime: '',
|
|
76
|
-
workload: this.workloadValue
|
|
102
|
+
workload: this.workloadValue,
|
|
103
|
+
category: this.testCategories
|
|
77
104
|
},
|
|
78
105
|
currentSelectedButton: String,
|
|
79
106
|
value: '',
|
|
@@ -109,6 +136,10 @@ export default {
|
|
|
109
136
|
type: Number,
|
|
110
137
|
default: 6
|
|
111
138
|
},
|
|
139
|
+
testId:{
|
|
140
|
+
type: Number,
|
|
141
|
+
default: null
|
|
142
|
+
},
|
|
112
143
|
buttons:{
|
|
113
144
|
type: Array,
|
|
114
145
|
default: () => [{ id: '1', time: '5 minutos', value:'00:05:00' }, { id: '2', time: '10 minutos', value:'00:10:00' }, { id: '3', time: '15 minutos', value:'00:15:00' },
|
|
@@ -157,6 +188,14 @@ export default {
|
|
|
157
188
|
type: String,
|
|
158
189
|
default: ''
|
|
159
190
|
},
|
|
191
|
+
testCategories:{
|
|
192
|
+
type: Number,
|
|
193
|
+
default: null
|
|
194
|
+
},
|
|
195
|
+
categories: {
|
|
196
|
+
type: Array,
|
|
197
|
+
default: () => []
|
|
198
|
+
}
|
|
160
199
|
},
|
|
161
200
|
watch:{
|
|
162
201
|
titleValue(newValue){
|
|
@@ -170,10 +209,14 @@ export default {
|
|
|
170
209
|
},
|
|
171
210
|
time(newValue){
|
|
172
211
|
this.configInfo.selectedTime = newValue;
|
|
173
|
-
}
|
|
212
|
+
},
|
|
213
|
+
testCategories(newValue){
|
|
214
|
+
this.configInfo.category = newValue;
|
|
215
|
+
},
|
|
174
216
|
},
|
|
175
217
|
mounted() {
|
|
176
218
|
this.loadTime();
|
|
219
|
+
console.log(this.time)
|
|
177
220
|
},
|
|
178
221
|
computed:{
|
|
179
222
|
openModal:{
|
|
@@ -209,7 +252,9 @@ export default {
|
|
|
209
252
|
title: this.configInfo.title,
|
|
210
253
|
textarea: this.configInfo.textarea,
|
|
211
254
|
selectedTime: this.configInfo.selectedTime,
|
|
255
|
+
category: this.configInfo.category
|
|
212
256
|
};
|
|
257
|
+
console.log(config)
|
|
213
258
|
}else if(this.isCourse){
|
|
214
259
|
config = {
|
|
215
260
|
title: this.configInfo.title,
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
:value="test.id"
|
|
47
47
|
:label="test.name"
|
|
48
48
|
:key="test.id"
|
|
49
|
-
:disabled="
|
|
49
|
+
:disabled="!categoryIsAllowedToSend(test.category_test_id)"
|
|
50
50
|
></el-option>
|
|
51
51
|
</el-select>
|
|
52
52
|
</div>
|
|
@@ -125,7 +125,11 @@ export default {
|
|
|
125
125
|
type: Boolean,
|
|
126
126
|
default: false
|
|
127
127
|
},
|
|
128
|
-
|
|
128
|
+
selectedTest: Number,
|
|
129
|
+
categoriesAllowedToSend: {
|
|
130
|
+
type: Object,
|
|
131
|
+
default: () => ({})
|
|
132
|
+
}
|
|
129
133
|
},
|
|
130
134
|
methods: {
|
|
131
135
|
closeModal(e) {
|
|
@@ -159,7 +163,11 @@ export default {
|
|
|
159
163
|
.filter(filterSlots)
|
|
160
164
|
.map(formatRequest);
|
|
161
165
|
this.$emit('send-test', testRequest);
|
|
162
|
-
|
|
166
|
+
},
|
|
167
|
+
categoryIsAllowedToSend(categoryId) {
|
|
168
|
+
const categoryIsAllowToSend = Object.values(this.categoriesAllowedToSend).find(id => id == categoryId);
|
|
169
|
+
return categoryIsAllowToSend ? true : false
|
|
170
|
+
}
|
|
163
171
|
},
|
|
164
172
|
watch: {
|
|
165
173
|
selectedTest(newValue) {
|
|
@@ -6,21 +6,32 @@
|
|
|
6
6
|
<h5 class="pl-3 modal-title">Acesso</h5>
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
|
-
<div class="col-12">
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
<div class="col-12 d-flex">
|
|
10
|
+
|
|
11
|
+
<div
|
|
12
|
+
tag="div"
|
|
13
|
+
class="d-block"
|
|
14
|
+
name="role"
|
|
15
|
+
>
|
|
16
|
+
<el-select
|
|
17
|
+
class="select-danger"
|
|
18
|
+
v-model="firstFieldValue"
|
|
19
|
+
:placeholder="''"
|
|
20
|
+
>
|
|
21
|
+
<el-option
|
|
22
|
+
v-for="role in roles"
|
|
23
|
+
:key="role.id"
|
|
24
|
+
:label="role.name"
|
|
25
|
+
:value="role.id"
|
|
26
|
+
>
|
|
27
|
+
</el-option>
|
|
28
|
+
</el-select>
|
|
29
|
+
</div>
|
|
19
30
|
|
|
20
|
-
<el-tooltip class="item" placement="top" :content="'Editar
|
|
21
|
-
<base-button size="md" type="link" class="text-primary mt-
|
|
22
|
-
@click="$emit('first-icon-click', {
|
|
23
|
-
<font-awesome-icon :icon="
|
|
31
|
+
<el-tooltip class="item" placement="top" :content="'Editar Cargo'">
|
|
32
|
+
<base-button size="md" type="link" class="text-primary mt-0 px-2 w-auto align-top"
|
|
33
|
+
@click="$emit('first-icon-click', { firstFieldText: firstFieldValue })">
|
|
34
|
+
<font-awesome-icon :icon="['fas', 'save']" class="mr-2" />
|
|
24
35
|
</base-button>
|
|
25
36
|
</el-tooltip>
|
|
26
37
|
</div>
|
|
@@ -59,7 +70,6 @@ export default {
|
|
|
59
70
|
firstFieldValue: this.propFirstFieldValue,
|
|
60
71
|
newSelecteds: [],
|
|
61
72
|
showModal: this.openModal,
|
|
62
|
-
firstField: this.propFirstField
|
|
63
73
|
}
|
|
64
74
|
},
|
|
65
75
|
props: {
|
|
@@ -67,13 +77,7 @@ export default {
|
|
|
67
77
|
type: String,
|
|
68
78
|
default: ''
|
|
69
79
|
},
|
|
70
|
-
|
|
71
|
-
type: Object,
|
|
72
|
-
default: () => ({
|
|
73
|
-
show: false,
|
|
74
|
-
disabled: false,
|
|
75
|
-
})
|
|
76
|
-
},
|
|
80
|
+
roles: null,
|
|
77
81
|
openModal: false,
|
|
78
82
|
selecteds: {
|
|
79
83
|
type: Array,
|
|
@@ -104,9 +108,6 @@ export default {
|
|
|
104
108
|
openModal(value) {
|
|
105
109
|
this.showModal = value;
|
|
106
110
|
},
|
|
107
|
-
propFirstField(value) {
|
|
108
|
-
this.firstField = value
|
|
109
|
-
},
|
|
110
111
|
propFirstFieldValue(value) {
|
|
111
112
|
this.firstFieldValue = value;
|
|
112
113
|
}
|