-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from Daniel-Alvarenga/main
Vaga view
- Loading branch information
Showing
15 changed files
with
330 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
main { | ||
@include flex(row, flex-start, start); | ||
height: calc(100vh - 80px); | ||
background-color: $primary-color-dark; | ||
.content { | ||
height: calc(100vh - 80px); | ||
width: 100%; | ||
background-color: $primary-color-dark; | ||
@include flex(column, flex-start, start); | ||
padding: 20px 100px; | ||
|
||
.vaga-header { | ||
h3 { | ||
@include font-inter(700); | ||
font-size: 2rem; | ||
color: $font-color-dark; | ||
} | ||
|
||
.status { | ||
@include font-inter(300); | ||
font-size: 1rem; | ||
color: $font-color-dark-2; | ||
} | ||
} | ||
|
||
.vaga-info { | ||
margin-top: 20px; | ||
|
||
h2 { | ||
@include font-inter(700); | ||
font-size: 1.5rem; | ||
color: $secondary-color-orange; | ||
margin-bottom: 10px; | ||
} | ||
|
||
.requisitos, .beneficios { | ||
list-style: none; | ||
padding: 0; | ||
margin: 0; | ||
|
||
li { | ||
margin-bottom: 5px; | ||
|
||
p { | ||
@include font-inter(300); | ||
font-size: 1rem; | ||
color: $font-color-dark-2; | ||
} | ||
} | ||
} | ||
|
||
.vaga-details, .vaga-remuneracao { | ||
margin-top: 20px; | ||
|
||
p { | ||
@include font-inter(300); | ||
font-size: 1rem; | ||
color: $font-color-dark-2; | ||
|
||
strong { | ||
font-weight: 700; | ||
} | ||
} | ||
} | ||
|
||
.descricao { | ||
margin-top: 20px; | ||
margin-bottom: 20px; | ||
|
||
p { | ||
@include font-inter(300); | ||
font-size: 1rem; | ||
color: $font-color-dark-2; | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
<template> | ||
<Header /> | ||
<div id="app"> | ||
<main> | ||
<AsideDashboard v-if="aluno.email" pageName="estagios"/> | ||
<div class="content"> | ||
<div class="vaga-header"> | ||
<h3 v-text="vaga.titulo"></h3> | ||
<router-link :to="'/empresa/' + vaga.empresa.cnpj">{{ vaga.empresa.name }}</router-link> | ||
<p class="status" v-text="situacao[vaga.status]"></p> | ||
</div> | ||
|
||
<section class="vaga-info"> | ||
<h2>Requisitos</h2> | ||
<ul class="requisitos"> | ||
<li v-for="(requisito, index) in parsedRequisitos" :key="index"> | ||
<p v-text="requisito"></p> | ||
</li> | ||
</ul> | ||
|
||
<div class="vaga-details"> | ||
<p><strong>Carga Horária:</strong> <span v-text="vaga.cargaHoraria"></span></p> | ||
<p><strong>Entrada:</strong> <span v-text="vaga.entrada"></span></p> | ||
<p><strong>Saída:</strong> <span v-text="vaga.saida"></span></p> | ||
</div> | ||
|
||
<section class="descricao"> | ||
<h2>Descrição</h2> | ||
<div class="vaga-remuneracao"> | ||
<p><strong>Remuneração:</strong> <span v-text="vaga.remuneracao"></span></p> | ||
</div> | ||
<p v-text="vaga.descricao"></p> | ||
</section> | ||
|
||
|
||
<h2>Benefícios</h2> | ||
<ul class="beneficios"> | ||
<li v-for="(beneficio, index) in parsedBeneficios" :key="index"> | ||
<p v-text="beneficio"></p> | ||
</li> | ||
</ul> | ||
</section> | ||
</div> | ||
</main> | ||
</div> | ||
<Footer /> | ||
</template> | ||
|
||
<script> | ||
import Header from '../../components/Header.vue'; | ||
import Footer from '../../components/Footer.vue'; | ||
import AsideDashboard from '../../components/aluno/AsideDashboard.vue'; | ||
import router from '../../router/index.js'; | ||
import Cookies from 'js-cookie'; | ||
import { getVaga } from '../../services/api/shared'; | ||
import { | ||
getMeAluno, | ||
} from '../../services/api/aluno'; | ||
export default { | ||
name: 'Vaga', | ||
components: { | ||
Header, | ||
AsideDashboard, | ||
Footer | ||
}, | ||
data() { | ||
return { | ||
vaga: { | ||
requisitos: '[]', | ||
beneficios: '[]' | ||
}, | ||
aluno: { | ||
email: '', | ||
token: '' | ||
}, | ||
situacao: { | ||
"DISPONIVEL": "Vaga disponível", | ||
"INDISPONIVEL": "Vaga indisponível" | ||
} | ||
}; | ||
}, | ||
computed: { | ||
parsedRequisitos() { | ||
return JSON.parse(this.vaga.requisitos); | ||
}, | ||
parsedBeneficios() { | ||
return JSON.parse(this.vaga.beneficios); | ||
} | ||
}, | ||
methods: { | ||
async getVaga() { | ||
try { | ||
const response = await getVaga({ id: this.$route.params.id }); | ||
if (response.status >= 200 && response.status < 300) { | ||
this.vaga = response.data.vaga; | ||
} else { | ||
console.error("Erro ao recuperar os dados da vaga:", response.message); | ||
} | ||
} catch (error) { | ||
console.error("Erro ao recuperar os dados da vaga:", error.message); | ||
} | ||
}, | ||
async testAluno(){ | ||
this.aluno.token = Cookies.get('token'); | ||
if(this.aluno.token){ | ||
const responseMail = await getMeAluno(this.aluno.token); | ||
if (responseMail.status >= 200 && responseMail.status < 300) { | ||
this.aluno.email = responseMail.data.email; | ||
} else{ | ||
console.log("Erro ao buscar aluno"); | ||
} | ||
} else { | ||
console.log("Token de aluno não encontrado"); | ||
} | ||
} | ||
}, | ||
async created() { | ||
await this.testAluno(); | ||
await this.getVaga(); | ||
} | ||
}; | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
@import "../../scss/pages/shared/vaga.scss"; | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.