@nixweb/nixloc-ui 0.0.239 → 0.0.241
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/package.json
CHANGED
|
@@ -48,10 +48,12 @@ export default {
|
|
|
48
48
|
color: black !important;
|
|
49
49
|
border-color: #e9e9e9 !important;
|
|
50
50
|
outline: none !important;
|
|
51
|
+
border-radius: 20px !important;
|
|
52
|
+
margin-left: 10px !important;
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
.selected {
|
|
54
|
-
background-color:
|
|
56
|
+
background-color: transparent !important;
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
.badge-button {
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div v-if="multiSelected">
|
|
4
|
-
<div class="side-by-side icon-filter" @click="show = true">
|
|
5
|
-
<i class="fa-solid fa-circle-plus "></i>
|
|
6
|
-
<span class="title-users" v-if="currentValueFilter.length == 0"> Todos usuários</span>
|
|
7
|
-
</div>
|
|
8
|
-
<div class="side-by-side" v-for="user in currentValueFilter">
|
|
9
|
-
<img class="img-current" :src="baseUrl + user.photo" alt="">
|
|
10
|
-
<div class="side-by-side icon-close" @click="remove(user)">
|
|
11
|
-
<i class="fa-solid fa-do-not-enter"></i>
|
|
12
|
-
</div>
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
<div v-else class="div-current" @click="show = true">
|
|
16
|
-
<img class="img-current" :src="baseUrl + currentValue.photo" alt="">
|
|
17
|
-
</div>
|
|
18
|
-
<div v-if="show" class="main-select" @mouseleave="show = false">
|
|
19
|
-
<div v-for="item in data">
|
|
20
|
-
<div class="div-frame" @click="select(item)">
|
|
21
|
-
<b-row>
|
|
22
|
-
<b-col sm="3">
|
|
23
|
-
<img class="img-card" :src="baseUrl + item.photo" alt="">
|
|
24
|
-
</b-col>
|
|
25
|
-
<b-col sm="9">
|
|
26
|
-
<div class="title-name">{{ item.name }}</div>
|
|
27
|
-
</b-col>
|
|
28
|
-
</b-row>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
</template>
|
|
34
|
-
<script>
|
|
35
|
-
|
|
36
|
-
import { mapActions } from "vuex";
|
|
37
|
-
|
|
38
|
-
export default {
|
|
39
|
-
name: "Select",
|
|
40
|
-
props: {
|
|
41
|
-
genericId: String,
|
|
42
|
-
responsibleUser: Object,
|
|
43
|
-
multiSelected: {
|
|
44
|
-
type: Boolean,
|
|
45
|
-
default: false,
|
|
46
|
-
},
|
|
47
|
-
title: String,
|
|
48
|
-
urlGet: String,
|
|
49
|
-
urlUpdate: String,
|
|
50
|
-
value: Array
|
|
51
|
-
},
|
|
52
|
-
components: {
|
|
53
|
-
|
|
54
|
-
},
|
|
55
|
-
data() {
|
|
56
|
-
return {
|
|
57
|
-
baseUrl: "https://espaco.blob.core.windows.net/nixloc-photo-user/",
|
|
58
|
-
currentValue: {},
|
|
59
|
-
currentValueFilter: [],
|
|
60
|
-
data: [],
|
|
61
|
-
show: false,
|
|
62
|
-
baseParams: {
|
|
63
|
-
search: "",
|
|
64
|
-
currentPage: 1,
|
|
65
|
-
totalPerPage: 20,
|
|
66
|
-
},
|
|
67
|
-
};
|
|
68
|
-
},
|
|
69
|
-
mounted() {
|
|
70
|
-
this.getAll();
|
|
71
|
-
},
|
|
72
|
-
methods: {
|
|
73
|
-
...mapActions("generic", ["getApi", "putApi"]),
|
|
74
|
-
getAll() {
|
|
75
|
-
let obj = { ...this.baseParams };
|
|
76
|
-
let params = { url: this.urlGet, obj: obj };
|
|
77
|
-
this.loading = true;
|
|
78
|
-
this.getApi(params).then((response) => {
|
|
79
|
-
this.data = response.content.data;
|
|
80
|
-
});
|
|
81
|
-
},
|
|
82
|
-
updateResponsibleUser() {
|
|
83
|
-
let params = {
|
|
84
|
-
url: this.urlUpdate,
|
|
85
|
-
obj: { id: this.genericId, userId: this.currentValue.id },
|
|
86
|
-
notNotifyToast: true
|
|
87
|
-
};
|
|
88
|
-
this.putApi(params).then((response) => { });
|
|
89
|
-
},
|
|
90
|
-
select(item) {
|
|
91
|
-
if (!this.multiSelected) {
|
|
92
|
-
this.currentValue = item;
|
|
93
|
-
} else {
|
|
94
|
-
const exists = this.currentValueFilter.some(x => x.id === item.id);
|
|
95
|
-
if (!exists)
|
|
96
|
-
this.currentValueFilter.push(item);
|
|
97
|
-
this.$emit("input", this.currentValueFilter);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
if (this.genericId)
|
|
101
|
-
this.updateResponsibleUser();
|
|
102
|
-
|
|
103
|
-
this.show = false;
|
|
104
|
-
},
|
|
105
|
-
remove(item) {
|
|
106
|
-
this.currentValueFilter = this.currentValueFilter.filter(x => x.id !== item.id);
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
watch: {
|
|
110
|
-
responsibleUser: {
|
|
111
|
-
handler(responsibleUser) {
|
|
112
|
-
this.currentValue = responsibleUser;
|
|
113
|
-
},
|
|
114
|
-
deep: true,
|
|
115
|
-
},
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
</script>
|
|
119
|
-
|
|
120
|
-
<style scoped>
|
|
121
|
-
.main-select {
|
|
122
|
-
position: fixed;
|
|
123
|
-
margin-left: 20px;
|
|
124
|
-
min-width: 250px;
|
|
125
|
-
background-color: white !important;
|
|
126
|
-
padding: 15px;
|
|
127
|
-
border: 1px solid #E8EAED;
|
|
128
|
-
border-radius: 10px;
|
|
129
|
-
cursor: pointer;
|
|
130
|
-
z-index: 1000 !important;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.div-frame:hover {
|
|
134
|
-
background-color: #F8F9FA !important;
|
|
135
|
-
border-radius: 10px;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.div-current {
|
|
139
|
-
cursor: pointer;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.title-name {
|
|
143
|
-
margin-top: 13px;
|
|
144
|
-
font-size: 13px;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.title-users {
|
|
148
|
-
font-size: 14px;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.img-card {
|
|
152
|
-
width: 35px;
|
|
153
|
-
height: 35px;
|
|
154
|
-
margin: 5px;
|
|
155
|
-
border-radius: 50px;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.img-current {
|
|
159
|
-
width: 30px;
|
|
160
|
-
height: 30px;
|
|
161
|
-
border-radius: 50px;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.icon-filter {
|
|
165
|
-
font-size: 15px;
|
|
166
|
-
cursor: pointer;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.icon-close {
|
|
170
|
-
color: red;
|
|
171
|
-
font-size: 13px;
|
|
172
|
-
cursor: pointer;
|
|
173
|
-
}
|
|
174
|
-
</style>
|
|
175
|
-
|