Skip to content

Commit 8a02921

Browse files
Merge pull request VitorCarvalho67#29 from Daniel-Alvarenga/main
Add Search Users Page
2 parents a0cbfc8 + 27d5030 commit 8a02921

File tree

13 files changed

+376
-37
lines changed

13 files changed

+376
-37
lines changed

client/package-lock.json

+8-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/src/components/aluno/AsideDashboard.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</router-link>
1616
</li>
1717
<li :class="getClassForPage('pesquisa')">
18-
<router-link to="">
18+
<router-link to="/buscar">
1919
<img :src="icons.search">
2020
<p v-if="showPs">Pesquisa</p>
2121
</router-link>

client/src/router/routes/shared.js

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import Home from '../../views/shared/Home.vue';
22
import NotFound from '../../views/shared/NotFound.vue';
33
import PublicPerfilAluno from '../../views/shared/PerfilAluno.vue';
44
import PublicPerfilProfessor from '../../views/shared/PerfilProfessor.vue';
5+
import Pesquisa from '../../views/shared/Pesquisa.vue';
56
import { isAuthSomebody } from '../guards/guards';
67

78
export const sharedRoutes = [
@@ -28,6 +29,11 @@ export const sharedRoutes = [
2829
name: "PublicPerfilProfessor",
2930
component: PublicPerfilProfessor
3031
},
32+
{
33+
path: '/buscar',
34+
name: 'Pesquisa',
35+
component: Pesquisa
36+
},
3137
{
3238
path: '/:pathMatch(.*)*',
3339
name: 'NotFound',

client/src/scss/pages/aluno/_rede.scss

+1-17
Original file line numberDiff line numberDiff line change
@@ -84,22 +84,6 @@ main {
8484
border-radius: 10px;
8585
color: $secondary-color-dark;
8686
border: solid 1px $primary-color-orange;
87-
transition: 0.1s linear;
88-
@include line;
89-
@include flex-center;
90-
@include m-screen(1120px) {
91-
padding: 8px 18px;
92-
}
93-
94-
// &:after {
95-
// height: 0;
96-
// }
97-
98-
// &:hover {
99-
// background-color: transparent;
100-
// border: solid 1px $primary-color-orange;
101-
// color: $primary-color-orange;
102-
// }
10387
}
10488
}
10589

@@ -112,4 +96,4 @@ main {
11296
}
11397
}
11498
}
115-
}
99+
}
+156
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
#app{
2+
height: 100vh;
3+
4+
main {
5+
@include flex(row, flex-start, start);
6+
width: 100vw;
7+
height: 100vh;
8+
min-height: calc(100vh - 80px);
9+
border-bottom: 1px solid #0000008f;
10+
background-color: $primary-color-dark;
11+
position: relative;
12+
13+
.content {
14+
@include flex(column, flex-start, start);
15+
width: calc(100% - 300px);
16+
height: 100%;
17+
18+
@include m-screen(1200px) {
19+
width: 100%;
20+
}
21+
22+
.search {
23+
@include flex(row, center, start);
24+
height: 50px;
25+
width: 62%;
26+
padding: 20px 30px 20px 80px;
27+
28+
.box{
29+
@include flex(row, cen, start);
30+
height: 50px;
31+
border-radius: 25px;
32+
width: calc(100% - 40px);
33+
background-color: $secondary-color-dark;
34+
35+
input {
36+
color: $font-color-dark-2;
37+
width: 94%;
38+
height: 100%;
39+
padding-inline: 15px;
40+
outline: none;
41+
background: transparent;
42+
border: none;
43+
font-size: medium
44+
}
45+
46+
button {
47+
@include flex-center;
48+
height: 100%;
49+
background-color: transparent;
50+
border: none;
51+
52+
img {
53+
height: 55%;
54+
object-fit: cover;
55+
opacity: 0.8;
56+
filter: invert(100%)
57+
}
58+
}
59+
}
60+
}
61+
62+
>.box {
63+
@include flex(column, flex-start, start);
64+
padding: 50px 0px 0px 100px;
65+
width: 70%;
66+
height: 100%;
67+
68+
@include m-screen(1400px) {
69+
@include flex(column, center, center);
70+
padding: 50px 0px 0px 0px;
71+
width: 100%;
72+
}
73+
74+
.resultado {
75+
@include flex(column, flex-end, start);
76+
color: $secondary-color-orange;
77+
margin-right: 10px;
78+
margin-bottom: 10px;
79+
height: 100%;
80+
font-size: small;
81+
font-weight: 200;
82+
@include font-inter(600);
83+
}
84+
85+
86+
.user {
87+
@include flex(column, flex-start, start);
88+
width: 80%;
89+
height: 90px;
90+
margin-bottom: 10px;
91+
92+
@include m-screen(1400px) {
93+
width: 70%;
94+
}
95+
96+
@include m-screen(800px) {
97+
width: 90%;
98+
}
99+
100+
a {
101+
@include flex(row, flex-start, start);
102+
width: 100%;
103+
height: 100%;
104+
background-color: $secondary-color-dark;
105+
padding: 15px;
106+
border-radius: 5px;
107+
text-decoration: none;
108+
color: $font-color-dark;
109+
110+
img {
111+
height: 60px;
112+
width: 60px;
113+
object-fit: cover;
114+
border-radius: 50%;
115+
margin-right: 20px;
116+
}
117+
118+
.infoAluno {
119+
@include flex(row, space-between, start);
120+
width: calc(100% - 60px);
121+
height: 100%;
122+
123+
.who {
124+
color: $primary-color-orange;
125+
margin-right: 10px;
126+
margin-bottom: 10px;
127+
}
128+
129+
.contentAluno {
130+
@include flex(column, flex-start, start);
131+
}
132+
133+
.box-button{
134+
height: 100%;
135+
@include flex(column, center, center);
136+
137+
button{
138+
background-color: $primary-color-orange;
139+
padding: 10px 20px;
140+
border-radius: 10px;
141+
color: $secondary-color-dark;
142+
border: solid 1px $primary-color-orange;
143+
}
144+
}
145+
146+
}
147+
148+
p {
149+
@include font-inter(600);
150+
}
151+
}
152+
}
153+
}
154+
}
155+
}
156+
}

client/src/services/api/admin.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const loginAdmin = async(userAdmin) => {
1818
const response = await api.post('admin/login', userAdmin);
1919
return response;
2020
} catch (error) {
21-
return error.data;
21+
return error.response.data;
2222
}
2323
}
2424

client/src/services/api/shared.js

+11-1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,14 @@ export const getBanner = async (info) => {
3131
} catch (error) {
3232
return error.response.data;
3333
}
34-
}
34+
}
35+
36+
export const getUsers = async () => {
37+
try {
38+
const response = await api.get('shared/users');
39+
console.log(response.data.alunos);
40+
return response;
41+
} catch (error) {
42+
return error.response.data;
43+
}
44+
}

client/src/views/shared/PerfilAluno.vue

+3-5
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@ export default {
119119
this.calcularIdade(this.aluno.nascimento);
120120
this.aluno.nome = response.data.nome;
121121
} else {
122-
router.push({path: "/notfound"});
122+
// router.push({path: "/notfound"});
123123
}
124124
} catch (error) {
125-
router.push({path: "/notfound"});
125+
// router.push({path: "/notfound"});
126126
}
127127
128128
try {
@@ -138,15 +138,13 @@ export default {
138138
139139
if (response.status >= 200 && response.status < 300) {
140140
this.aluno.imageUrl = response.data.url;
141-
} else {
142-
// router.push({path: "/notfound"});
143141
}
144142
145143
if (responseBanner.status >= 200 && responseBanner.status < 300) {
146144
this.aluno.bannerUrl = responseBanner.data.url;
147145
}
148146
} catch (error) {
149-
// router.push({path: "/notfound"});
147+
router.push({path: "/notfound"});
150148
}
151149
},
152150
calcularIdade(nascimento) {

0 commit comments

Comments
 (0)