@burh/nuxt-core 1.0.28 → 1.0.29
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.
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
}
|
|
18
18
|
]"></i>
|
|
19
19
|
|
|
20
|
-
<base-button role="button" @click="$emit('btn-first-click')" size="sm" :type="firstButtonType"
|
|
20
|
+
<base-button v-if="firstButtonText" role="button" @click="$emit('btn-first-click')" size="sm" :type="firstButtonType"
|
|
21
21
|
class="ml-2">{{firstButtonText}}</base-button>
|
|
22
22
|
</div>
|
|
23
23
|
|
|
@@ -45,10 +45,7 @@ export default {
|
|
|
45
45
|
type: String,
|
|
46
46
|
default: 'primary'
|
|
47
47
|
},
|
|
48
|
-
firstButtonText:
|
|
49
|
-
type: String,
|
|
50
|
-
default: 'Enviar Teste'
|
|
51
|
-
},
|
|
48
|
+
firstButtonText: String,
|
|
52
49
|
},
|
|
53
50
|
};
|
|
54
51
|
</script>
|
|
@@ -1,14 +1,29 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="row">
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
|
|
4
|
+
<validation-provider tag="div" class="col-5" :vid="`first-input-${id}`"
|
|
5
|
+
:name="firstInput.label" :rules="firstInput.rules" v-slot="{ errors }">
|
|
6
|
+
<base-input
|
|
7
|
+
type="text"
|
|
8
|
+
v-model="firstField"
|
|
9
|
+
v-on:input="$emit('first-input', $event);"
|
|
10
|
+
:error="errors[0]"
|
|
11
|
+
:valid="errors.length ? true : false"
|
|
12
|
+
:label="firstInput.label"/>
|
|
13
|
+
</validation-provider>
|
|
14
|
+
|
|
15
|
+
<validation-provider tag="div" class="col-6" :vid="`second-input-${id}`"
|
|
16
|
+
:name="secondInput.label" :rules="secondInput.rules" v-slot="{ errors }">
|
|
17
|
+
<base-input
|
|
18
|
+
type="text"
|
|
19
|
+
v-model="secondField"
|
|
20
|
+
v-on:input="$emit('second-input', $event);"
|
|
21
|
+
:error="errors[0]"
|
|
22
|
+
:valid="errors.length ? true : false"
|
|
23
|
+
:label="secondInput.label"/>
|
|
24
|
+
</validation-provider>
|
|
25
|
+
|
|
26
|
+
<span class="col-1 pt-4 mt-3 cursor-pointer" @click="$emit(icon.event)">
|
|
12
27
|
<font-awesome-icon :icon="icon.type" :aria-label="'Icone de funcionalidade'" />
|
|
13
28
|
</span>
|
|
14
29
|
</div>
|
|
@@ -17,10 +32,15 @@
|
|
|
17
32
|
<script>
|
|
18
33
|
export default {
|
|
19
34
|
props: {
|
|
35
|
+
id: {
|
|
36
|
+
type: String | Number,
|
|
37
|
+
default: 0
|
|
38
|
+
},
|
|
20
39
|
firstInput: {
|
|
21
40
|
type: Object,
|
|
22
41
|
default: () => ({
|
|
23
42
|
label: 'Nome',
|
|
43
|
+
rules: { required: true }
|
|
24
44
|
}),
|
|
25
45
|
description: 'properties of first input in format JSON'
|
|
26
46
|
},
|
|
@@ -28,6 +48,10 @@ export default {
|
|
|
28
48
|
type: Object,
|
|
29
49
|
default: () => ({
|
|
30
50
|
label: 'Email',
|
|
51
|
+
rules: {
|
|
52
|
+
required: true,
|
|
53
|
+
email: true
|
|
54
|
+
}
|
|
31
55
|
}),
|
|
32
56
|
description: 'properties of second input in format JSON'
|
|
33
57
|
},
|
|
@@ -39,7 +63,13 @@ export default {
|
|
|
39
63
|
}),
|
|
40
64
|
description: 'properties of icon in format JSON'
|
|
41
65
|
}
|
|
42
|
-
}
|
|
66
|
+
},
|
|
67
|
+
data() {
|
|
68
|
+
return {
|
|
69
|
+
firstField: '',
|
|
70
|
+
secondField: ''
|
|
71
|
+
}
|
|
72
|
+
},
|
|
43
73
|
}
|
|
44
74
|
</script>
|
|
45
75
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<font-awesome-icon :icon="icon" :aria-label="iconAria" />
|
|
8
8
|
</span>
|
|
9
9
|
<div class="d-inline-block">
|
|
10
|
-
<component :is="titleTag" class="text-muted
|
|
10
|
+
<component :is="titleTag" class="text-muted">{{title}}</component>
|
|
11
11
|
<p>{{subtitle}}</p>
|
|
12
12
|
</div>
|
|
13
13
|
</div>
|
|
@@ -21,8 +21,8 @@ export default {
|
|
|
21
21
|
default: () => ['fas', 'paper-plane']
|
|
22
22
|
},
|
|
23
23
|
iconClass: {
|
|
24
|
-
type:
|
|
25
|
-
default:
|
|
24
|
+
type: String,
|
|
25
|
+
default: ''
|
|
26
26
|
},
|
|
27
27
|
iconAria: {
|
|
28
28
|
type: String,
|
|
@@ -34,13 +34,16 @@ export default {
|
|
|
34
34
|
},
|
|
35
35
|
titleTag: {
|
|
36
36
|
type: String,
|
|
37
|
-
default: '
|
|
37
|
+
default: 'h5',
|
|
38
38
|
},
|
|
39
39
|
subtitle: {
|
|
40
40
|
type: String,
|
|
41
41
|
default: 'Subtitulo',
|
|
42
42
|
},
|
|
43
|
-
iconSize:
|
|
43
|
+
iconSize: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: '',
|
|
46
|
+
},
|
|
44
47
|
}
|
|
45
48
|
}
|
|
46
49
|
</script>
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<modal :show.sync="openModal" v-on:close="closeModal()" class="modal modal-docs">
|
|
3
|
+
<template slot="header">
|
|
4
|
+
<div class="d-flex mx-auto flex-column">
|
|
5
|
+
<i class="display-1 fas fa-file mx-auto primary"></i>
|
|
6
|
+
<h2 class="display-4 mx-auto">Documentos</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.envelopeDocuments.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">{{item.name}}</h5>
|
|
18
|
+
</div>
|
|
19
|
+
<div>
|
|
20
|
+
<el-checkbox-group v-model="checkList">
|
|
21
|
+
<el-checkbox
|
|
22
|
+
class="my-auto"
|
|
23
|
+
:type="'info'"
|
|
24
|
+
:label="item.documentId"
|
|
25
|
+
v-on:change="onSelectionChange(item)"
|
|
26
|
+
>
|
|
27
|
+
</el-checkbox>
|
|
28
|
+
</el-checkbox-group>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</li>
|
|
32
|
+
</ul>
|
|
33
|
+
<div class="card-footer py-4 d-flex">
|
|
34
|
+
<base-pagination class="mx-auto" v-model="currentPage" :perPage="3" :total=modalData.envelopeDocuments.length></base-pagination>
|
|
35
|
+
</div>
|
|
36
|
+
<template slot="footer">
|
|
37
|
+
<base-button size="sm" class="mr-auto" outline type="primary" @click="$emit('close-modal')">Fechar</base-button>
|
|
38
|
+
<base-button size="sm" @click="$emit('download-doc', modalData, downloadItems)" type="primary">Download</base-button>
|
|
39
|
+
</template>
|
|
40
|
+
|
|
41
|
+
</modal>
|
|
42
|
+
</template>
|
|
43
|
+
<script>
|
|
44
|
+
import swal from 'sweetalert2';
|
|
45
|
+
import { mask } from 'vue-the-mask';
|
|
46
|
+
import { Checkbox, CheckboxGroup } from 'element-ui'
|
|
47
|
+
export default {
|
|
48
|
+
directives: { mask },
|
|
49
|
+
components: {
|
|
50
|
+
[Checkbox.name]: Checkbox,
|
|
51
|
+
[CheckboxGroup.name]: CheckboxGroup,
|
|
52
|
+
},
|
|
53
|
+
data(){
|
|
54
|
+
return{
|
|
55
|
+
filtrarPorTexto: '',
|
|
56
|
+
currentPage: 1,
|
|
57
|
+
pageSize: 3,
|
|
58
|
+
downloadItems: [],
|
|
59
|
+
checkList: []
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
props:{
|
|
63
|
+
modalData: null,
|
|
64
|
+
show: false,
|
|
65
|
+
},
|
|
66
|
+
model:{
|
|
67
|
+
prop: 'show'
|
|
68
|
+
},
|
|
69
|
+
computed:{
|
|
70
|
+
openModal:{
|
|
71
|
+
get(){return this.show;},
|
|
72
|
+
set(show){this.$emit('input', show);}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
methods:{
|
|
76
|
+
onSelectionChange(selectedItem){
|
|
77
|
+
if(this.downloadItems.length != 0){
|
|
78
|
+
this.downloadItems.filter((item, index)=>{
|
|
79
|
+
if(item.documentId === selectedItem.documentId){
|
|
80
|
+
this.downloadItems.splice(index, 1)
|
|
81
|
+
}else if(index === this.downloadItems.length - 1){
|
|
82
|
+
this.downloadItems.push(selectedItem)
|
|
83
|
+
}
|
|
84
|
+
})
|
|
85
|
+
}else{
|
|
86
|
+
this.downloadItems.push(selectedItem)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
},
|
|
90
|
+
closeModal(){
|
|
91
|
+
this.downloadItems = []
|
|
92
|
+
this.checkList = []
|
|
93
|
+
this.$emit('close-modal')
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
</script>
|
|
98
|
+
<style lang="scss">
|
|
99
|
+
.modal-docs{
|
|
100
|
+
.modal-header .close {
|
|
101
|
+
padding: 1.25rem;
|
|
102
|
+
margin: -1rem -1rem -1rem !important;
|
|
103
|
+
}
|
|
104
|
+
.modal-footer{
|
|
105
|
+
padding-top: 0 !important
|
|
106
|
+
}
|
|
107
|
+
.el-checkbox__label{
|
|
108
|
+
display: none !important;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
</style>
|