@burh/nuxt-core 1.0.35 → 1.0.38
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/assets/sass/core/cards/_card.scss +1 -0
- package/components/argon-core/Cards/Card.vue +63 -63
- package/components/argon-core/Inputs/HtmlEditor.vue +8 -0
- package/components/burh-ds/Cards/TestCard.vue +66 -66
- package/components/burh-ds/Cards/TrainingCard.vue +98 -0
- package/components/burh-ds/Modals/AppConfigModal.vue +92 -43
- package/components/burh-ds/Modals/SendCourse.vue +197 -0
- package/components/burh-ds/Modals/SendTest.vue +181 -144
- package/components/burh-ds/Modals/UniversityAccessModal.vue +117 -0
- package/components/burh-ds/Tabs/TesteTab.vue +7 -1
- package/package.json +1 -1
|
@@ -1,72 +1,72 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
<div class="card"
|
|
3
|
+
:class="[
|
|
4
|
+
{'card-lift--hover': hover},
|
|
5
|
+
{'shadow': shadow},
|
|
6
|
+
{[`shadow-${shadowSize}`]: shadowSize},
|
|
7
|
+
{[`bg-gradient-${gradient}`]: gradient},
|
|
8
|
+
{[`bg-${type}`]: type}
|
|
9
|
+
]">
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
<slot name="image"></slot>
|
|
12
|
+
<div class="card-header" :class="headerClasses" v-if="$slots.header">
|
|
13
|
+
<slot name="header">
|
|
14
|
+
</slot>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="card-body" :class="bodyClasses" v-if="!noBody">
|
|
17
|
+
<slot></slot>
|
|
18
|
+
</div>
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
<slot v-if="noBody"></slot>
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
<div class="card-footer" :class="footerClasses" v-if="$slots.footer">
|
|
23
|
+
<slot name="footer"></slot>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
26
|
</template>
|
|
27
27
|
<script>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
28
|
+
export default {
|
|
29
|
+
name: 'card',
|
|
30
|
+
props: {
|
|
31
|
+
type: {
|
|
32
|
+
type: String,
|
|
33
|
+
description: 'Card type'
|
|
34
|
+
},
|
|
35
|
+
gradient: {
|
|
36
|
+
type: String,
|
|
37
|
+
description: 'Card background gradient type (warning,danger etc)'
|
|
38
|
+
},
|
|
39
|
+
hover: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
description: 'Whether card should move on hover'
|
|
42
|
+
},
|
|
43
|
+
shadow: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
description: 'Whether card has shadow'
|
|
46
|
+
},
|
|
47
|
+
shadowSize: {
|
|
48
|
+
type: String,
|
|
49
|
+
description: 'Card shadow size'
|
|
50
|
+
},
|
|
51
|
+
noBody: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
default: false,
|
|
54
|
+
description: 'Whether card should have wrapper body class'
|
|
55
|
+
},
|
|
56
|
+
bodyClasses: {
|
|
57
|
+
type: [String, Object, Array],
|
|
58
|
+
description: 'Card body css classes'
|
|
59
|
+
},
|
|
60
|
+
headerClasses: {
|
|
61
|
+
type: [String, Object, Array],
|
|
62
|
+
description: 'Card header css classes'
|
|
63
|
+
},
|
|
64
|
+
footerClasses: {
|
|
65
|
+
type: [String, Object, Array],
|
|
66
|
+
description: 'Card footer css classes'
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
70
|
</script>
|
|
71
71
|
<style>
|
|
72
72
|
</style>
|
|
@@ -1,54 +1,54 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="column">
|
|
3
3
|
<div class="card card-app" @click.prevent="$emit('test-click')">
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
4
|
+
<base-dropdown class="top-right custom" v-if="showMenu">
|
|
5
|
+
<i slot="title-container"
|
|
6
|
+
class="fa fa-ellipsis-h custom"
|
|
7
|
+
aria-hidden="true"
|
|
8
|
+
/>
|
|
9
|
+
<li v-if="isDefault" class="dropdown-item d-flex align-items-center w-100" @click="sendTest">
|
|
10
|
+
<i class="fa fa-paper-plane" aria-hidden="true" />
|
|
11
|
+
<span>
|
|
12
|
+
Enviar teste
|
|
13
|
+
</span>
|
|
14
|
+
</li>
|
|
15
|
+
<li v-if="isDefault" class="dropdown-item d-flex align-items-center w-100" @click="viewTest">
|
|
16
|
+
<i class="fa fa-eye" aria-hidden="true" />
|
|
17
|
+
<span>
|
|
18
|
+
Visualizar teste
|
|
19
|
+
</span>
|
|
20
|
+
</li>
|
|
21
|
+
<li v-if="isDefault" class="dropdown-item d-flex align-items-center w-100" @click="viewAnsweredTests">
|
|
22
|
+
<i class="fa fa-file" aria-hidden="true" />
|
|
23
|
+
<span>
|
|
24
|
+
Respostas recebidas
|
|
25
|
+
</span>
|
|
26
|
+
</li>
|
|
27
|
+
<li v-if="isDefault" class="dropdown-item d-flex align-items-center w-100" @click="exportExcel(id)">
|
|
28
|
+
<i class="fa fa-arrow-circle-down" aria-hidden="true" />
|
|
29
|
+
<span>
|
|
30
|
+
Exportar Respostas
|
|
31
|
+
</span>
|
|
32
|
+
</li>
|
|
33
|
+
<li class="dropdown-item d-flex align-items-center w-100" @click="copyTest">
|
|
34
|
+
<i class="fa fa-clone" aria-hidden="true" />
|
|
35
|
+
<span>
|
|
36
|
+
Fazer uma cópia
|
|
37
|
+
</span>
|
|
38
|
+
</li>
|
|
39
|
+
<li v-if="isDefault" class="dropdown-item d-flex align-items-center w-100" @click="openRenameEditor">
|
|
40
|
+
<i class="fa fa-pen" aria-hidden="true" />
|
|
41
|
+
<span>
|
|
42
|
+
Renomear teste
|
|
43
|
+
</span>
|
|
44
|
+
</li>
|
|
45
|
+
<li v-if="isDefault" class="dropdown-item d-flex align-items-center w-100" @click="deleteTest(id)">
|
|
46
|
+
<i class="fa fa-trash" aria-hidden="true" />
|
|
47
|
+
<span>
|
|
48
|
+
Apagar teste
|
|
49
|
+
</span>
|
|
50
|
+
</li>
|
|
51
|
+
</base-dropdown>
|
|
52
52
|
<img
|
|
53
53
|
v-if="icon === ''"
|
|
54
54
|
class="card__image"
|
|
@@ -62,13 +62,13 @@
|
|
|
62
62
|
/>
|
|
63
63
|
</div>
|
|
64
64
|
<input
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
class="w-100"
|
|
66
|
+
v-if="showNameEditor"
|
|
67
|
+
v-model="newName"
|
|
68
|
+
@keyup.enter="renameTest"
|
|
69
|
+
@blur="renameTest"
|
|
70
|
+
ref="teste"
|
|
71
|
+
/>
|
|
72
72
|
<span v-else class="card-title w-100 text-center">{{text}}</span>
|
|
73
73
|
</div>
|
|
74
74
|
</template>
|
|
@@ -94,10 +94,10 @@ export default {
|
|
|
94
94
|
default: false,
|
|
95
95
|
description: 'Defines if option menu is visible'
|
|
96
96
|
},
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
97
|
+
isDefault: {
|
|
98
|
+
type: Boolean,
|
|
99
|
+
default: false,
|
|
100
|
+
}
|
|
101
101
|
},
|
|
102
102
|
methods: {
|
|
103
103
|
sendTest(e) {
|
|
@@ -113,15 +113,15 @@ export default {
|
|
|
113
113
|
this.$emit('copy-test');
|
|
114
114
|
},
|
|
115
115
|
openRenameEditor() {
|
|
116
|
-
|
|
116
|
+
this.showNameEditor = true;
|
|
117
117
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
118
|
+
this.$nextTick()
|
|
119
|
+
.then(() => this.$refs.teste.focus()
|
|
120
|
+
);
|
|
121
|
+
},
|
|
122
|
+
focusInput() {
|
|
123
|
+
this.$refs.teste.$el.focus();
|
|
121
124
|
},
|
|
122
|
-
focusInput() {
|
|
123
|
-
this.$refs.teste.$el.focus();
|
|
124
|
-
},
|
|
125
125
|
renameTest() {
|
|
126
126
|
const rename = {
|
|
127
127
|
id: this.id,
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<card class="card-app card-app--training" :class="icon ? 'card--icon' : '' " @click.native="$emit('course-click')">
|
|
3
|
+
<base-dropdown class="top-right custom" v-if="showMenu">
|
|
4
|
+
<i slot="title-container"
|
|
5
|
+
class="fa fa-ellipsis-h custom"
|
|
6
|
+
aria-hidden="true"
|
|
7
|
+
/>
|
|
8
|
+
<li v-for="actions in dropdownActions" class="dropdown-item d-flex align-items-center w-100" @click="$emit(actions.action)" :key="actions.name">
|
|
9
|
+
<i :class="actions.icon ? actions.icon : 'fa fa-paper-plane'" aria-hidden="true" />
|
|
10
|
+
<span>
|
|
11
|
+
{{actions.name}}
|
|
12
|
+
</span>
|
|
13
|
+
</li>
|
|
14
|
+
<li v-if="defaultAction" class="dropdown-item d-flex align-items-center w-100" @click="$emit(defaultAction.action)">
|
|
15
|
+
<i :class="defaultAction.icon ? defaultAction.icon : 'fa fa-clone'" aria-hidden="true" />
|
|
16
|
+
<span>
|
|
17
|
+
{{defaultAction.name}}
|
|
18
|
+
</span>
|
|
19
|
+
</li>
|
|
20
|
+
</base-dropdown>
|
|
21
|
+
<img v-if="image" slot="image" class="card-img-top" :src="image" alt="Card image cap">
|
|
22
|
+
|
|
23
|
+
<i v-if="icon" slot="image" :class="icon" class="card-img-top card__icon"/>
|
|
24
|
+
<!-- title -->
|
|
25
|
+
<h3 class="h6 title mb-2">{{title}}</h3>
|
|
26
|
+
<!-- descrição -->
|
|
27
|
+
<p v-if="description" class="card-title mb-2">{{description}}</p>
|
|
28
|
+
<!-- another information -->
|
|
29
|
+
<p v-if="info" class="card-title"><small class="text-muted">{{info}}</small></p>
|
|
30
|
+
</card>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script>
|
|
34
|
+
export default {
|
|
35
|
+
name: 'training-card',
|
|
36
|
+
data(){
|
|
37
|
+
return{
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
props: {
|
|
41
|
+
id: Number,
|
|
42
|
+
icon: String,
|
|
43
|
+
link: String,
|
|
44
|
+
image: String,
|
|
45
|
+
title: String,
|
|
46
|
+
description: String,
|
|
47
|
+
info: String,
|
|
48
|
+
showMenu: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: false,
|
|
51
|
+
description: 'Defines if option menu is visible'
|
|
52
|
+
},
|
|
53
|
+
dropdownActions: null,
|
|
54
|
+
defaultAction: null
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
</script>
|
|
58
|
+
|
|
59
|
+
<style lang="scss">
|
|
60
|
+
.title{
|
|
61
|
+
margin-bottom: 0px !important;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.card {
|
|
65
|
+
position: relative;
|
|
66
|
+
&:hover {
|
|
67
|
+
.custom {
|
|
68
|
+
display: block;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.custom {
|
|
74
|
+
color: #ffffff;
|
|
75
|
+
background-color: #8192a6;
|
|
76
|
+
border-radius: 15%;
|
|
77
|
+
font-size: 1.25rem;
|
|
78
|
+
padding: .25rem .5rem;
|
|
79
|
+
display: none;
|
|
80
|
+
&:hover {
|
|
81
|
+
cursor: pointer;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.top-right {
|
|
86
|
+
right: .5rem;
|
|
87
|
+
position: absolute;
|
|
88
|
+
top: .5rem;
|
|
89
|
+
z-index: 100;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.fa-plus::before {
|
|
93
|
+
content: "\f067";
|
|
94
|
+
position: relative;
|
|
95
|
+
top: 25%;
|
|
96
|
+
transform: translateY(-50%);
|
|
97
|
+
}
|
|
98
|
+
</style>
|
|
@@ -4,28 +4,37 @@
|
|
|
4
4
|
<div class="pl-3"><h2 class="display-4">{{title}}</h2></div>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
<validation-observer ref="appConfigModal" tag="div">
|
|
8
|
+
<validation-provider tag="div" class="col-12" :vid="`name`"
|
|
9
|
+
name="name" rules="required" v-slot="{ errors }">
|
|
10
10
|
<base-input
|
|
11
|
-
|
|
12
|
-
placeholder="
|
|
11
|
+
:label="name"
|
|
12
|
+
:placeholder="inputPlaceholders.firstInput"
|
|
13
13
|
required
|
|
14
14
|
v-model="configInfo.title"
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
:error="errors[0]"
|
|
16
|
+
:valid="errors.length ? true : false"
|
|
17
17
|
>
|
|
18
18
|
</base-input>
|
|
19
|
-
|
|
19
|
+
</validation-provider>
|
|
20
20
|
|
|
21
21
|
<div class="col-12 mb-4">
|
|
22
22
|
<label for="description" class="form-control-label">{{textAreaTitle}}</label>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
<textarea
|
|
24
|
+
id="description"
|
|
25
|
+
class="form-control"
|
|
26
|
+
:placeholder="inputPlaceholders.secondInput"
|
|
27
|
+
v-model="configInfo.textarea"
|
|
28
|
+
></textarea>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<div class="col-12 mb-4" v-if="isCourse">
|
|
32
|
+
<base-input
|
|
33
|
+
v-mask="['##:##:##']"
|
|
34
|
+
:label="'Carga horária'"
|
|
35
|
+
:placeholder="inputPlaceholders.thirdInput"
|
|
36
|
+
v-model="configInfo.workload"
|
|
37
|
+
></base-input>
|
|
29
38
|
</div>
|
|
30
39
|
|
|
31
40
|
<div class="col-12 mb-4">
|
|
@@ -49,11 +58,10 @@
|
|
|
49
58
|
@click="sendConfig()"
|
|
50
59
|
class="ml-auto">{{configAppButton}}</base-button>
|
|
51
60
|
</div>
|
|
52
|
-
|
|
61
|
+
</validation-observer>
|
|
53
62
|
</modal>
|
|
54
63
|
</template>
|
|
55
64
|
<script>
|
|
56
|
-
import swal from 'sweetalert2';
|
|
57
65
|
import { mask } from 'vue-the-mask';
|
|
58
66
|
export default {
|
|
59
67
|
directives: { mask },
|
|
@@ -63,6 +71,7 @@ export default {
|
|
|
63
71
|
title: this.titleValue,
|
|
64
72
|
textarea: this.textAreaValue,
|
|
65
73
|
selectedTime: '',
|
|
74
|
+
workload: this.workloadValue
|
|
66
75
|
},
|
|
67
76
|
currentSelectedButton: String,
|
|
68
77
|
value: '',
|
|
@@ -72,15 +81,32 @@ export default {
|
|
|
72
81
|
prop: 'show'
|
|
73
82
|
},
|
|
74
83
|
props:{
|
|
75
|
-
|
|
84
|
+
isCourse: {
|
|
85
|
+
type: Boolean,
|
|
86
|
+
default: false
|
|
87
|
+
},
|
|
88
|
+
inputPlaceholders:{
|
|
89
|
+
type: Object,
|
|
90
|
+
default:() => (
|
|
91
|
+
{
|
|
92
|
+
firstInput: 'Insira o nome do teste',
|
|
93
|
+
secondInput: 'Insira a descrição do teste',
|
|
94
|
+
thirdInput: 'Insira a carga horária do curso'
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
},
|
|
98
|
+
show: {
|
|
99
|
+
type: Boolean,
|
|
100
|
+
default: false
|
|
101
|
+
},
|
|
76
102
|
name:{
|
|
77
103
|
type: String,
|
|
78
104
|
default: 'Nome'
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
105
|
+
},
|
|
106
|
+
defaultButtonSelected: {
|
|
107
|
+
type: Number,
|
|
108
|
+
default: 6
|
|
109
|
+
},
|
|
84
110
|
buttons:{
|
|
85
111
|
type: Array,
|
|
86
112
|
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' },
|
|
@@ -93,6 +119,11 @@ export default {
|
|
|
93
119
|
default: 'Criar Teste',
|
|
94
120
|
description: 'Titulo do Modal'
|
|
95
121
|
},
|
|
122
|
+
workloadTitle:{
|
|
123
|
+
type: String,
|
|
124
|
+
default: 'Carga horária',
|
|
125
|
+
description: 'Carga horária do curso, apenas se o modal for usado para a pagina de cursos'
|
|
126
|
+
},
|
|
96
127
|
textAreaTitle:{
|
|
97
128
|
type: String,
|
|
98
129
|
default: 'Descrição',
|
|
@@ -107,20 +138,24 @@ export default {
|
|
|
107
138
|
type: String,
|
|
108
139
|
default: 'Salvar',
|
|
109
140
|
description: 'Botão de envio'
|
|
110
|
-
|
|
141
|
+
},
|
|
111
142
|
titleValue: {
|
|
112
|
-
|
|
113
|
-
|
|
143
|
+
type: String,
|
|
144
|
+
default: ''
|
|
114
145
|
},
|
|
115
146
|
textAreaValue: {
|
|
116
|
-
|
|
117
|
-
|
|
147
|
+
type: String,
|
|
148
|
+
default: ''
|
|
149
|
+
},
|
|
150
|
+
workloadValue: {
|
|
151
|
+
type: String,
|
|
152
|
+
default: '00:00:00'
|
|
118
153
|
},
|
|
119
154
|
time: {
|
|
120
|
-
|
|
121
|
-
|
|
155
|
+
type: String,
|
|
156
|
+
default: ''
|
|
122
157
|
},
|
|
123
|
-
|
|
158
|
+
},
|
|
124
159
|
mounted() {
|
|
125
160
|
this.loadTime();
|
|
126
161
|
},
|
|
@@ -132,15 +167,15 @@ export default {
|
|
|
132
167
|
},
|
|
133
168
|
methods:{
|
|
134
169
|
loadTime() {
|
|
135
|
-
let time = this.buttons.find(e => e.value
|
|
170
|
+
let time = this.buttons.find(e => e.value === this.time);
|
|
136
171
|
if(time != null){
|
|
137
|
-
this.currentSelectedButton = time.id
|
|
138
|
-
this.configInfo.selectedTime = this.time
|
|
172
|
+
this.currentSelectedButton = time.id;
|
|
173
|
+
this.configInfo.selectedTime = this.time;
|
|
139
174
|
} else {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
this.configInfo.selectedTime = time.value
|
|
143
|
-
|
|
175
|
+
time = this.buttons.find(e => e.id == this.defaultButtonSelected);
|
|
176
|
+
this.currentSelectedButton = time.id;
|
|
177
|
+
this.configInfo.selectedTime = time.value;
|
|
178
|
+
}
|
|
144
179
|
},
|
|
145
180
|
timeSelection(buttonId){
|
|
146
181
|
let btn = document.getElementById('button-' + buttonId);
|
|
@@ -148,12 +183,26 @@ export default {
|
|
|
148
183
|
this.currentSelectedButton=buttonId;
|
|
149
184
|
},
|
|
150
185
|
async sendConfig() {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
186
|
+
const pass = await this.$refs.appConfigModal.validate();
|
|
187
|
+
if(!pass) {
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
let config;
|
|
191
|
+
if(!this.isCourse){
|
|
192
|
+
config = {
|
|
193
|
+
title: this.configInfo.title,
|
|
194
|
+
textarea: this.configInfo.textarea,
|
|
195
|
+
selectedTime: this.configInfo.selectedTime,
|
|
196
|
+
};
|
|
197
|
+
}else if(this.isCourse){
|
|
198
|
+
config = {
|
|
199
|
+
title: this.configInfo.title,
|
|
200
|
+
textarea: this.configInfo.textarea,
|
|
201
|
+
selectedTime: this.configInfo.selectedTime,
|
|
202
|
+
workload: this.configInfo.workload
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
this.$emit('send-config-info', config);
|
|
157
206
|
this.openModal=false;
|
|
158
207
|
},
|
|
159
208
|
},
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<modal :show="isModalOpen" v-on:close="closeModal" size="xl" class="modal">
|
|
3
|
+
<template slot="header">
|
|
4
|
+
<h2 class="display-4 px-4">
|
|
5
|
+
Insira os e-mail que deseja enviar o treinamento
|
|
6
|
+
</h2>
|
|
7
|
+
</template>
|
|
8
|
+
<div class="row px-4">
|
|
9
|
+
<div class="col-4">
|
|
10
|
+
<label for="name">Nome Completo</label>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="col-8">
|
|
13
|
+
<label for="email">E-mail</label>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
<validation-observer ref="sendCourse">
|
|
17
|
+
<div class="row px-4" v-for="(slot, idx) in slots" :key="idx">
|
|
18
|
+
<validation-provider
|
|
19
|
+
tag="div"
|
|
20
|
+
class="col-4"
|
|
21
|
+
:vid="`send-name-${idx}`"
|
|
22
|
+
name="Nome"
|
|
23
|
+
rules="required|regex:\w+\s+\w+"
|
|
24
|
+
v-slot="{ errors }"
|
|
25
|
+
>
|
|
26
|
+
<base-input
|
|
27
|
+
v-model="slot.name"
|
|
28
|
+
:error="errors[0]"
|
|
29
|
+
:valid="errors.length ? true : false"
|
|
30
|
+
/>
|
|
31
|
+
</validation-provider>
|
|
32
|
+
|
|
33
|
+
<validation-provider
|
|
34
|
+
tag="div"
|
|
35
|
+
class="col-7"
|
|
36
|
+
:vid="`send-email-${idx}`"
|
|
37
|
+
name="Email"
|
|
38
|
+
rules="required|email"
|
|
39
|
+
v-slot="{ errors }"
|
|
40
|
+
>
|
|
41
|
+
<base-input
|
|
42
|
+
v-model="slot.email"
|
|
43
|
+
:error="errors[0]"
|
|
44
|
+
:valid="errors.length ? true : false"
|
|
45
|
+
/>
|
|
46
|
+
</validation-provider>
|
|
47
|
+
<div class="col-1">
|
|
48
|
+
<i
|
|
49
|
+
v-if="idx !== slots.length - 1"
|
|
50
|
+
class="fa fa-trash pointer"
|
|
51
|
+
@click="removeSlot(slot.email)"
|
|
52
|
+
></i>
|
|
53
|
+
<i v-else class="fa fa-plus pointer" @click="addSlot"></i>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</validation-observer>
|
|
57
|
+
|
|
58
|
+
<hr />
|
|
59
|
+
|
|
60
|
+
<div class="row px-4">
|
|
61
|
+
<div class="col-12">
|
|
62
|
+
<label for="courses">Acesso aos Treinamentos</label>
|
|
63
|
+
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
<div class="row px-4">
|
|
67
|
+
<div class="col-12">
|
|
68
|
+
<el-select
|
|
69
|
+
v-model="coursesToSend"
|
|
70
|
+
multiple
|
|
71
|
+
style="width: 100%;"
|
|
72
|
+
placeholder="Treinamentos"
|
|
73
|
+
name="courses">
|
|
74
|
+
<el-option
|
|
75
|
+
v-for="item in courses"
|
|
76
|
+
:key="item.id"
|
|
77
|
+
:label="item.name"
|
|
78
|
+
:value="item.id">
|
|
79
|
+
</el-option>
|
|
80
|
+
</el-select>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
<div class="row">
|
|
85
|
+
<base-button class="mx-auto" type="primary" @click="sendTest"
|
|
86
|
+
>Enviar</base-button
|
|
87
|
+
>
|
|
88
|
+
</div>
|
|
89
|
+
</modal>
|
|
90
|
+
</template>
|
|
91
|
+
|
|
92
|
+
<script>
|
|
93
|
+
import { Select, Option } from 'element-ui';
|
|
94
|
+
|
|
95
|
+
export default {
|
|
96
|
+
name: 'send-course',
|
|
97
|
+
components: {
|
|
98
|
+
[Select.name]: Select,
|
|
99
|
+
[Option.name]: Option
|
|
100
|
+
},
|
|
101
|
+
props: {
|
|
102
|
+
isModalOpen: {
|
|
103
|
+
type: Boolean,
|
|
104
|
+
default: false
|
|
105
|
+
},
|
|
106
|
+
selectedCourse: Number,
|
|
107
|
+
|
|
108
|
+
courses: Array,
|
|
109
|
+
},
|
|
110
|
+
methods: {
|
|
111
|
+
closeModal(e) {
|
|
112
|
+
this.$emit('closemodal', e);
|
|
113
|
+
},
|
|
114
|
+
|
|
115
|
+
removeSlot(email) {
|
|
116
|
+
this.slots = this.slots.filter(slot => slot.email !== email);
|
|
117
|
+
},
|
|
118
|
+
|
|
119
|
+
addSlot() {
|
|
120
|
+
const newSlot = {
|
|
121
|
+
name: '',
|
|
122
|
+
email: '',
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
this.slots = [...this.slots, newSlot];
|
|
126
|
+
},
|
|
127
|
+
|
|
128
|
+
async sendTest() {
|
|
129
|
+
const pass = await this.$refs.sendCourse.validate();
|
|
130
|
+
|
|
131
|
+
if (!pass) {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
const filterSlots = slot => slot.email !== '';
|
|
136
|
+
|
|
137
|
+
const formatRequest = () => {
|
|
138
|
+
let formattedCourses = this.coursesToSend.map(course => ({
|
|
139
|
+
course_id: course
|
|
140
|
+
}));
|
|
141
|
+
|
|
142
|
+
let formattedSlots = this.slots.filter(filterSlots).map(slot => ({
|
|
143
|
+
name: slot.name.substring(slot.name.indexOf(' '), 0),
|
|
144
|
+
last_name: slot.name.substring(slot.name.indexOf(' ')+1),
|
|
145
|
+
email: slot.email,
|
|
146
|
+
courses: formattedCourses
|
|
147
|
+
}));
|
|
148
|
+
|
|
149
|
+
return {
|
|
150
|
+
...formattedSlots,
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
let params = {
|
|
155
|
+
users: formatRequest()
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
this.$emit('send-course', params);
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
watch: {
|
|
162
|
+
selectedCourse(newValue) {
|
|
163
|
+
this.coursesToSend = newValue ? [newValue] : [];
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
data() {
|
|
167
|
+
return {
|
|
168
|
+
slots: [
|
|
169
|
+
{
|
|
170
|
+
name: '',
|
|
171
|
+
email: ''
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
|
|
175
|
+
coursesToSend: []
|
|
176
|
+
};
|
|
177
|
+
},
|
|
178
|
+
};
|
|
179
|
+
</script>
|
|
180
|
+
<style lang="scss" scoped>
|
|
181
|
+
.send-test-modal {
|
|
182
|
+
position: fixed;
|
|
183
|
+
overflow-y: scroll;
|
|
184
|
+
overflow-x: hidden;
|
|
185
|
+
width: 60%;
|
|
186
|
+
height: 50%;
|
|
187
|
+
background-color: #ffffff;
|
|
188
|
+
z-index: 999 !important;
|
|
189
|
+
top: 20% !important;
|
|
190
|
+
left: 20% !important;
|
|
191
|
+
box-sizing: border-box;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.pointer {
|
|
195
|
+
cursor: pointer;
|
|
196
|
+
}
|
|
197
|
+
</style>
|
|
@@ -1,163 +1,200 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<modal :show="isModalOpen" v-on:close="closeModal" size=
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
<modal :show="isModalOpen" v-on:close="closeModal" size="xl" class="modal">
|
|
3
|
+
<template slot="header">
|
|
4
|
+
<h2 class="display-4 px-4">
|
|
5
|
+
Insira os e-mail que deseja enviar o teste
|
|
6
|
+
</h2>
|
|
7
|
+
</template>
|
|
8
|
+
<div class="row px-4 justify-content-start">
|
|
9
|
+
<div class="col-4">
|
|
10
|
+
<label for="teste">Selecione a vaga</label>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="col-4">
|
|
13
|
+
<label for="teste">Selecione o teste</label>
|
|
14
|
+
</div>
|
|
9
15
|
</div>
|
|
10
|
-
|
|
11
|
-
|
|
16
|
+
<div class="row px-4 justify-content-start">
|
|
17
|
+
<div class="col-4">
|
|
18
|
+
<el-select
|
|
19
|
+
filterable
|
|
20
|
+
no-match-text="Nenhuma vaga encontrada"
|
|
21
|
+
no-data-text="Nenhuma vaga encontrada"
|
|
22
|
+
placeholder="Escolha a vaga"
|
|
23
|
+
v-model="jobid"
|
|
24
|
+
>
|
|
25
|
+
<el-option
|
|
26
|
+
v-for="job in allJobs"
|
|
27
|
+
class="select-danger"
|
|
28
|
+
:value="job.id"
|
|
29
|
+
:label="job.name"
|
|
30
|
+
:key="job.id"
|
|
31
|
+
></el-option>
|
|
32
|
+
</el-select>
|
|
33
|
+
<span></span>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="col-4">
|
|
36
|
+
<el-select
|
|
37
|
+
filterable
|
|
38
|
+
no-match-text="Nenhuma teste encontrado"
|
|
39
|
+
no-data-text="Nenhum teste encontrado"
|
|
40
|
+
placeholder="Escolha o teste"
|
|
41
|
+
v-model="testid"
|
|
42
|
+
>
|
|
43
|
+
<el-option
|
|
44
|
+
v-for="test in allTests"
|
|
45
|
+
class="select-danger"
|
|
46
|
+
:value="test.id"
|
|
47
|
+
:label="test.name"
|
|
48
|
+
:key="test.id"
|
|
49
|
+
></el-option>
|
|
50
|
+
</el-select>
|
|
51
|
+
</div>
|
|
12
52
|
</div>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
:value="job.id"
|
|
22
|
-
:label="job.name"
|
|
23
|
-
:key="job.id">
|
|
24
|
-
</el-option>
|
|
25
|
-
</el-select>
|
|
26
|
-
<span></span>
|
|
27
|
-
</div>
|
|
28
|
-
<div class="col-4">
|
|
29
|
-
<el-select
|
|
30
|
-
placeholder="Escolha o teste"
|
|
31
|
-
v-model="testid">
|
|
32
|
-
<el-option v-for="test in allTests"
|
|
33
|
-
class="select-danger"
|
|
34
|
-
:value="test.id"
|
|
35
|
-
:label="test.name"
|
|
36
|
-
:key="test.id">
|
|
37
|
-
</el-option>
|
|
38
|
-
</el-select>
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
<hr>
|
|
42
|
-
<div class="row px-4">
|
|
43
|
-
<div class="col-4">
|
|
44
|
-
<label for="name">Nome(opcional)</label>
|
|
53
|
+
<hr />
|
|
54
|
+
<div class="row px-4">
|
|
55
|
+
<div class="col-4">
|
|
56
|
+
<label for="name">Nome(opcional)</label>
|
|
57
|
+
</div>
|
|
58
|
+
<div class="col-8">
|
|
59
|
+
<label for="email">E-mail</label>
|
|
60
|
+
</div>
|
|
45
61
|
</div>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
62
|
+
<validation-observer ref="sendTest">
|
|
63
|
+
<div class="row px-4" v-for="(slot, idx) in slots" :key="idx">
|
|
64
|
+
<validation-provider
|
|
65
|
+
tag="div"
|
|
66
|
+
class="col-4"
|
|
67
|
+
:vid="`send-name-${idx}`"
|
|
68
|
+
name="Nome"
|
|
69
|
+
rules="required"
|
|
70
|
+
v-slot="{ errors }"
|
|
71
|
+
>
|
|
72
|
+
<base-input
|
|
73
|
+
v-model="slot.name"
|
|
74
|
+
:error="errors[0]"
|
|
75
|
+
:valid="errors.length ? true : false"
|
|
76
|
+
/>
|
|
77
|
+
</validation-provider>
|
|
61
78
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
79
|
+
<validation-provider
|
|
80
|
+
tag="div"
|
|
81
|
+
class="col-7"
|
|
82
|
+
:vid="`send-email-${idx}`"
|
|
83
|
+
name="Email"
|
|
84
|
+
rules="required|email"
|
|
85
|
+
v-slot="{ errors }"
|
|
86
|
+
>
|
|
87
|
+
<base-input
|
|
88
|
+
v-model="slot.email"
|
|
89
|
+
:error="errors[0]"
|
|
90
|
+
:valid="errors.length ? true : false"
|
|
91
|
+
/>
|
|
92
|
+
</validation-provider>
|
|
93
|
+
<div class="col-1">
|
|
94
|
+
<i
|
|
95
|
+
v-if="idx !== slots.length - 1"
|
|
96
|
+
class="fa fa-trash pointer"
|
|
97
|
+
@click="removeSlot(slot.id)"
|
|
98
|
+
></i>
|
|
99
|
+
<i v-else class="fa fa-plus pointer" @click="addSlot"></i>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
</validation-observer>
|
|
103
|
+
<div class="row">
|
|
104
|
+
<base-button class="mx-auto" type="primary" @click="sendTest"
|
|
105
|
+
>Enviar teste</base-button
|
|
106
|
+
>
|
|
107
|
+
</div>
|
|
108
|
+
</modal>
|
|
78
109
|
</template>
|
|
79
110
|
|
|
80
111
|
<script>
|
|
81
|
-
import { Select, Option } from
|
|
112
|
+
import { Select, Option } from 'element-ui';
|
|
82
113
|
|
|
83
114
|
export default {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
115
|
+
name: 'send-test',
|
|
116
|
+
components: {
|
|
117
|
+
[Select.name]: Select,
|
|
118
|
+
[Option.name]: Option
|
|
119
|
+
},
|
|
89
120
|
props: {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
121
|
+
allTests: Array,
|
|
122
|
+
allJobs: Array,
|
|
123
|
+
isModalOpen: {
|
|
124
|
+
type: Boolean,
|
|
125
|
+
default: false
|
|
126
|
+
},
|
|
127
|
+
selectedTest: Number
|
|
128
|
+
},
|
|
129
|
+
methods: {
|
|
130
|
+
closeModal(e) {
|
|
131
|
+
this.$emit('closemodal', e);
|
|
132
|
+
},
|
|
133
|
+
removeSlot(id) {
|
|
134
|
+
this.slots = this.slots.filter(slot => slot.id !== id);
|
|
135
|
+
},
|
|
136
|
+
addSlot() {
|
|
137
|
+
const newSlot = {
|
|
138
|
+
id: new Date().getTime(),
|
|
139
|
+
name: '',
|
|
140
|
+
email: '',
|
|
141
|
+
selected: 8
|
|
142
|
+
};
|
|
112
143
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
144
|
+
this.slots = [...this.slots, newSlot];
|
|
145
|
+
},
|
|
146
|
+
async sendTest() {
|
|
147
|
+
const pass = await this.$refs.sendTest.validate();
|
|
148
|
+
if (!pass) {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
const filterSlots = slot => slot.email !== '';
|
|
152
|
+
const formatRequest = slot => ({
|
|
153
|
+
...slot,
|
|
154
|
+
jobid: this.jobid,
|
|
155
|
+
testid: this.testid
|
|
156
|
+
});
|
|
157
|
+
const testRequest = this.slots
|
|
158
|
+
.filter(filterSlots)
|
|
159
|
+
.map(formatRequest);
|
|
160
|
+
this.$emit('send-test', testRequest);
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
watch: {
|
|
164
|
+
selectedTest(newValue) {
|
|
165
|
+
this.testid = newValue;
|
|
166
|
+
}
|
|
167
|
+
},
|
|
131
168
|
data() {
|
|
132
169
|
return {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}
|
|
170
|
+
jobid: null,
|
|
171
|
+
testid: this.selectedTest,
|
|
172
|
+
slots: [
|
|
173
|
+
{
|
|
174
|
+
id: 'first',
|
|
175
|
+
name: '',
|
|
176
|
+
email: ''
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
};
|
|
180
|
+
}
|
|
144
181
|
};
|
|
145
182
|
</script>
|
|
146
183
|
<style lang="scss" scoped>
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
184
|
+
.send-test-modal {
|
|
185
|
+
position: fixed;
|
|
186
|
+
overflow-y: scroll;
|
|
187
|
+
overflow-x: hidden;
|
|
188
|
+
width: 60%;
|
|
189
|
+
height: 50%;
|
|
190
|
+
background-color: #ffffff;
|
|
191
|
+
z-index: 999 !important;
|
|
192
|
+
top: 20% !important;
|
|
193
|
+
left: 20% !important;
|
|
194
|
+
box-sizing: border-box;
|
|
195
|
+
}
|
|
159
196
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
197
|
+
.pointer {
|
|
198
|
+
cursor: pointer;
|
|
199
|
+
}
|
|
163
200
|
</style>
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<modal :show.sync="showModal"
|
|
3
|
+
modalContentClasses="container-fluid" headerClasses="row px-4 pt-5" bodyClasses="row px-4"
|
|
4
|
+
v-on:close="closeModal()">
|
|
5
|
+
<template slot="header">
|
|
6
|
+
<h5 class="pl-3 modal-title">Acesso</h5>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<div class="col-12">
|
|
10
|
+
<validation-provider tag="div" :vid="'email'" class="d-inline-block mr-2"
|
|
11
|
+
name="Nome da Etapa" rules="required|email" v-slot="{ errors }">
|
|
12
|
+
<base-input class=""
|
|
13
|
+
v-model="firstFieldValue"
|
|
14
|
+
label="email" type="text"
|
|
15
|
+
:error="errors[0]"
|
|
16
|
+
:valid="errors.length ? true : false"
|
|
17
|
+
:disabled="firstField.show ? undefined : 'disabled'"/>
|
|
18
|
+
</validation-provider>
|
|
19
|
+
|
|
20
|
+
<el-tooltip class="item" placement="top" :content="'Editar Email'">
|
|
21
|
+
<base-button size="md" type="link" class="text-primary mt-4 px-2 w-auto align-top" v-if="!firstField.disabled"
|
|
22
|
+
@click="$emit('first-icon-click', { status: firstField.show, firstFieldText: firstFieldValue })">
|
|
23
|
+
<font-awesome-icon :icon="firstField.show ? ['fas', 'save'] : ['fas', 'pen']" class="mr-2" />
|
|
24
|
+
</base-button>
|
|
25
|
+
</el-tooltip>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<label for="trainings" class="col-12 form-control-label">Acesso aos Treinamentos</label>
|
|
29
|
+
<el-select v-model="newSelecteds"
|
|
30
|
+
id="trainings"
|
|
31
|
+
class="d-block col-12"
|
|
32
|
+
multiple
|
|
33
|
+
filterable
|
|
34
|
+
placeholder="Selecionar">
|
|
35
|
+
<el-option
|
|
36
|
+
v-for="item in itemsToSelect"
|
|
37
|
+
:key="`course-to-select-${item.id}`"
|
|
38
|
+
:value="item.id"
|
|
39
|
+
:label="item.name">
|
|
40
|
+
</el-option>
|
|
41
|
+
</el-select>
|
|
42
|
+
|
|
43
|
+
<div class="col-12">
|
|
44
|
+
<a @click.prevent="$emit('first-element-click')" class="btn btn-link text-danger cursor-pointer pl-0">Remover Aluno</a>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
</modal>
|
|
48
|
+
</template>
|
|
49
|
+
<script>
|
|
50
|
+
import swal from 'sweetalert2';
|
|
51
|
+
import { Select, Option } from 'element-ui'
|
|
52
|
+
export default {
|
|
53
|
+
components: {
|
|
54
|
+
[Select.name]: Select,
|
|
55
|
+
[Option.name]: Option,
|
|
56
|
+
},
|
|
57
|
+
data() {
|
|
58
|
+
return {
|
|
59
|
+
firstFieldValue: this.propFirstFieldValue,
|
|
60
|
+
newSelecteds: [],
|
|
61
|
+
showModal: this.openModal,
|
|
62
|
+
firstField: this.propFirstField
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
props: {
|
|
66
|
+
propFirstFieldValue: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: ''
|
|
69
|
+
},
|
|
70
|
+
propFirstField: {
|
|
71
|
+
type: Object,
|
|
72
|
+
default: () => ({
|
|
73
|
+
show: false,
|
|
74
|
+
disabled: false,
|
|
75
|
+
})
|
|
76
|
+
},
|
|
77
|
+
openModal: false,
|
|
78
|
+
selecteds: {
|
|
79
|
+
type: Array,
|
|
80
|
+
default: () => []
|
|
81
|
+
},
|
|
82
|
+
itemsToSelect: {
|
|
83
|
+
type: Array,
|
|
84
|
+
default: () => []
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
methods:{
|
|
88
|
+
closeModal(){
|
|
89
|
+
this.$emit('close-modal')
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
watch: {
|
|
93
|
+
selecteds(newValue) {
|
|
94
|
+
this.newSelecteds = newValue;
|
|
95
|
+
},
|
|
96
|
+
newSelecteds(newValue) {
|
|
97
|
+
if (this.selecteds != newValue) {
|
|
98
|
+
this.$emit('change-selecteds', {
|
|
99
|
+
oldSelecteds: this.selecteds,
|
|
100
|
+
newSelecteds: newValue,
|
|
101
|
+
})
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
openModal(value) {
|
|
105
|
+
this.showModal = value;
|
|
106
|
+
},
|
|
107
|
+
propFirstField(value) {
|
|
108
|
+
this.firstField = value
|
|
109
|
+
},
|
|
110
|
+
propFirstFieldValue(value) {
|
|
111
|
+
this.firstFieldValue = value;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
</script>
|
|
116
|
+
<style lang="scss">
|
|
117
|
+
</style>
|
|
@@ -52,7 +52,7 @@ export default {
|
|
|
52
52
|
|
|
53
53
|
.tab {
|
|
54
54
|
position: relative;
|
|
55
|
-
padding: .75rem
|
|
55
|
+
padding: .75rem 2rem;
|
|
56
56
|
margin: 0 1rem;
|
|
57
57
|
|
|
58
58
|
&:hover {
|
|
@@ -76,6 +76,12 @@ export default {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
@media screen and (min-width: 992px){
|
|
80
|
+
.tab{
|
|
81
|
+
padding: .75 2rem;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
79
85
|
.tab--active {
|
|
80
86
|
.tab__title {
|
|
81
87
|
color:$primary;
|