Skip to content

Commit 46d98a8

Browse files
Create first table area for admin
1 parent f2cff13 commit 46d98a8

File tree

10 files changed

+1251
-1360
lines changed

10 files changed

+1251
-1360
lines changed

client/src/components/admin/AsideDashboard.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
</li>
5050
<ul class="tables">
5151
<li>
52-
<router-link to="/admin/register/coordenador">
52+
<router-link to="/admin/table/coordenador">
5353
<p v-if="showPs">Coordenadores</p>
5454
</router-link>
5555
</li>

client/src/router/routes/admin.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import RegisterCoordenador from '../../views/admin/RegisterCoordenador.vue';
55
import RegisterCurso from '../../views/admin/RegisterCurso.vue';
66
import RegisterFuncionario from '../../views/admin/RegisterFuncionario.vue';
77
import RegisterTurma from '../../views/admin/RegisterTurma.vue';
8+
import TableCoordenadores from '../../views/admin/TableCoordenador.vue';
89

910
import {
1011
isAuthAdmin
@@ -61,5 +62,10 @@ export const adminRoutes = [
6162
name: 'RegisterFuncionario',
6263
component: RegisterFuncionario,
6364

64-
}
65+
},
66+
{
67+
path: '/admin/table/coordenador',
68+
name: 'TableCoordenadores',
69+
component: TableCoordenadores,
70+
},
6571
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
main {
2+
height: calc(100vh - 80px);
3+
background-color: $primary-color-dark;
4+
@include flex-center;
5+
}
6+
7+
.path {
8+
width: 100%;
9+
@include flex(row, flex-start, center);
10+
11+
font-size: 0.9rem;
12+
@include font-inter(300);
13+
margin-bottom: 20px;
14+
> p {
15+
@include flex(column, center, center);
16+
@include font-inter(400);
17+
18+
&:after {
19+
width: 100%;
20+
height: 3px;
21+
margin-top: 3px;
22+
background-color: $secondary-color-orange;
23+
}
24+
25+
&:hover::after {
26+
animation: none;
27+
}
28+
}
29+
30+
img {
31+
@include flex(column, center, center);
32+
width: 15px;
33+
transform: rotate(180deg);
34+
filter: invert(100%);
35+
margin-inline: 20px;
36+
}
37+
}
38+
39+
.table {
40+
display: flex;
41+
flex-direction: column;
42+
width: 100%;
43+
44+
.table-header {
45+
border-left: 3px solid $secondary-color-orange;
46+
font-size: 1rem;
47+
@include font-inter(600);
48+
color: $font-color-dark;
49+
}
50+
51+
.table-row {
52+
display: flex;
53+
flex-direction: row;
54+
55+
}
56+
57+
.table-cell {
58+
flex: 1;
59+
padding: 8px;
60+
border-right: 1px solid #ddd;
61+
62+
&:last-child {
63+
border-right: none;
64+
}
65+
}
66+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<template>
2+
<Header />
3+
<div id="app">
4+
<main>
5+
<AsideDashboard pageName='home' />
6+
<div class="content">
7+
<div class="path">
8+
<p>Dashboard</p>
9+
<img :src="anguloIcon" alt="">
10+
<p>Tabelas</p>
11+
<img :src="anguloIcon" alt="">
12+
<p>Coordenadores</p>
13+
</div>
14+
<div class="table">
15+
<div class="table-header">
16+
<div class="table-row">
17+
<div class="table-cell">Nome dos coordenadores Registrados</div>
18+
</div>
19+
</div>
20+
<div class="table-body">
21+
<div class="table-row" v-for="coordenador in coordenadores" :key="coordenador.id">
22+
<div class="table-cell">{{ coordenador.name }}</div>
23+
</div>
24+
</div>
25+
</div>
26+
</div>
27+
</main>
28+
</div>
29+
</template>
30+
31+
32+
<script>
33+
import Header from '../../components/Header.vue';
34+
import AsideDashboard from '../../components/admin/AsideDashboard.vue';
35+
import anguloIcon from '../../assets/icons/angulo.png';
36+
37+
import { mixinAdmin } from '../../util/authMixins.js';
38+
import { getCoordenadores } from '../../services/api/admin';
39+
40+
export default {
41+
name: 'TableCoordenadores',
42+
components: {
43+
Header,
44+
AsideDashboard,
45+
},
46+
data() {
47+
return {
48+
anguloIcon,
49+
coordenadores: []
50+
}
51+
},
52+
methods: {
53+
async fetchCoordenadores() {
54+
const data = await getCoordenadores(this.admin.token);
55+
console.log('Received coordenadores data:', data.data);
56+
this.coordenadores = data.data;
57+
}
58+
},
59+
mixins: [mixinAdmin],
60+
async created() {
61+
this.getToken();
62+
await this.fetchCoordenadores();
63+
}
64+
}
65+
</script>
66+
67+
<style lang="scss" scoped>
68+
@import "../../scss/pages/admin/_tableCoordenador.scss";
69+
70+
#app {
71+
display: flex;
72+
flex-direction: column;
73+
min-height: calc(100vh - 80px);
74+
75+
main {
76+
display: flex;
77+
overflow: hidden;
78+
79+
.content {
80+
flex: 1;
81+
padding: 20px;
82+
overflow-y: auto;
83+
height: 100%;
84+
85+
@media (max-width: 1000px) {
86+
width: calc(100% - 100px);
87+
}
88+
}
89+
}
90+
}
91+
</style>

client/src/views/admin/TableCurso.vue

Whitespace-only changes.

client/src/views/admin/TableFuncionario.vue

Whitespace-only changes.

client/src/views/admin/TableTurma.vue

Whitespace-only changes.

client/src/views/admin/Tableprofessor.vue

Whitespace-only changes.

server/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"minio": "^8.0.0",
3434
"multer": "1.4.5-lts.1",
3535
"nodemailer": "^6.9.13",
36+
"pdf-parse": "^1.1.1",
3637
"socket.io": "^4.7.5"
3738
}
3839
}

0 commit comments

Comments
 (0)