Skip to content

Commit

Permalink
Add Empresa Aluno messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-Alvarenga committed Nov 23, 2024
1 parent 529dd6b commit 883db34
Show file tree
Hide file tree
Showing 38 changed files with 1,972 additions and 65 deletions.
22 changes: 17 additions & 5 deletions client/src/components/empresa/AsideDashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,27 @@
<div>
<ul>
<li :class="getClassForPage('home')">
<router-link to="/funcionario">
<router-link to="/empresa">
<img :src="icons.home">
<p v-if="showPs">Home</p>
</router-link>
</li>
<li>
<router-link to="/funcionario/xxxxxxxxx">
<img :src="icons.form">
<p v-if="showPs">xxxxxxxx</p>
<li :class="getClassForPage('message')">
<router-link to="/empresa/mensagens">
<img :src="icons.send" />
<p v-if="showPs">Mensagens</p>
</router-link>
</li>
<li :class="getClassForPage('estagios')">
<router-link to="/empresa/vagas">
<img :src="icons.job" />
<p v-if="showPs">Estágios</p>
</router-link>
</li>
<li :class="getClassForPage('rankings')">
<router-link to="/empresa/ranking">
<img :src="icons.ranking" />
<p v-if="showPs">Rankings</p>
</router-link>
</li>
</ul>
Expand Down
4 changes: 2 additions & 2 deletions client/src/router/routes/aluno.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export const alunoRoutes = [
name: "PerfilColega",
component: PublicPerfilAluno,
beforeEnter: async (to, from, next) => {
(await isAuthAluno()) ? next() : next("/login");
(await isAuthAluno()) ? next() : next(`/aluno/profile/${to.params.rm}`);
}
},
{
Expand All @@ -149,7 +149,7 @@ export const alunoRoutes = [
name: "Ranking",
component: Ranking,
beforeEnter: async (to, from, next) => {
(await isAuthAluno()) ? next() : next("/login");
(await isAuthAluno()) ? next() : next("/ranking");
}
}
];
41 changes: 39 additions & 2 deletions client/src/router/routes/empresa.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ import RecoveryEmpresa from '../../views/empresa/Recovery.vue';
import RegisterEmpresa from '../../views/empresa/Register.vue';
import ValidateEmpresa from '../../views/empresa/Validate.vue';
import ValidateRecoveryEmpresa from '../../views/empresa/ValidateRecovery.vue';
import Ranking from '../../views/empresa/Ranking.vue';
import Messages from '../../views/empresa/Mensagens.vue';
import PublicPerfilAluno from '../../views/empresa/Aluno.vue';
import ChatEmpresa from '../../views/empresa/Mensagem.vue'

import {
isRegisteringEmpresa,
isRecoveringEmpresa,
isAuthEmpresa
isAuthEmpresa,
isAuthAluno
} from '../guards/guards.js';


Expand Down Expand Up @@ -52,5 +57,37 @@ export const empresaRoutes = [
beforeEnter: async (to, from, next) => {
(await isRecoveringEmpresa()) ? next() : next("/empresa/recovery");
}
}
},
{
path: '/empresa/ranking',
name: 'RankingEmpresa',
component: Ranking,
beforeEnter: async (to, from, next) => {
(await isAuthEmpresa()) ? next() : next("/empresa/login");
}
},
{
path: "/empresa/mensagens",
name: "MensagensEmpresa",
component: Messages,
beforeEnter: async (to, from, next) => {
(await isAuthEmpresa()) ? next() : next("/empresa/login");
}
},
{
path: "/empresa/aluno/profile/:rm",
name: "EmpresaPerfilAluno",
component: PublicPerfilAluno,
beforeEnter: async (to, from, next) => {
(await isAuthEmpresa()) ? next() : next(`/aluno/profile/${to.params.rm}`);
}
},
{
path: "/empresa/mensagens/:identifier/:email",
name: "MensagemEmpresa",
component: ChatEmpresa,
beforeEnter: async (to, from, next) => {
(await isAuthEmpresa()) ? next() : next("/empresa/login");
}
},
]
Loading

0 comments on commit 883db34

Please sign in to comment.