Skip to content

Commit e6690f1

Browse files
Merge pull request #114 from VitorCarvalho67/dev
Dev
2 parents 4408d66 + 58c7ac9 commit e6690f1

File tree

5 files changed

+268
-137
lines changed

5 files changed

+268
-137
lines changed

client/src/components/Header.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</ul>
1717
</div>
1818
</li>
19-
<li><router-link to="/home">Sobre Nós</router-link></li>
19+
<li><router-link to="/vagas">Estágios</router-link></li>
2020
<li><router-link to="/register">Cadastre-se Agora</router-link></li>
2121
<li class="hamburger">
2222
<button @click="showAside = true">

client/src/scss/pages/empresa/_dashboard.scss

Lines changed: 121 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,11 @@ main {
317317
@include m-screen(760px) {
318318
font-size: 0.9rem;
319319
}
320+
321+
a{
322+
text-decoration: none;
323+
color: $font-color-dark
324+
}
320325
}
321326
}
322327
}
@@ -332,12 +337,127 @@ main {
332337
margin-top: 60px;
333338
}
334339

340+
.vagas{
341+
width: 100%;
342+
}
343+
344+
.vaga {
345+
@include flex(column, flex-end, start);
346+
width: 70%;
347+
height: 140px;
348+
border-left: solid 5px $secondary-color-orange;
349+
margin-bottom: 10px;
350+
351+
@include m-screen(1000px) {
352+
height: auto;
353+
}
354+
355+
a {
356+
@include flex(row, space-between, start);
357+
width: 100%;
358+
height: 100%;
359+
background-color: $secondary-color-dark;
360+
padding: 15px;
361+
border-radius: 5px;
362+
text-decoration: none;
363+
color: $font-color-dark;
364+
365+
img {
366+
height: 60px;
367+
width: 60px;
368+
object-fit: cover;
369+
border-radius: 50%;
370+
margin-right: 20px;
371+
}
372+
373+
.infoVaga {
374+
@include flex(row, space-between, start);
375+
width: 100%;
376+
height: 100%;
377+
padding-right: 20px;
378+
379+
@include m-screen(1000px) {
380+
@include flex(row, space-between, center);
381+
}
382+
383+
@include m-screen(600px) {
384+
@include flex(column, space-between, start);
385+
}
386+
387+
.who {
388+
color: $primary-color-orange;
389+
margin-right: 10px;
390+
margin-bottom: 10px;
391+
}
392+
393+
.contentVaga {
394+
@include flex(column, flex-start, start);
395+
width: calc(100% - 120px);
396+
397+
@include m-screen(600px) {
398+
width: 100%;
399+
margin-bottom: 10px;
400+
}
401+
402+
.info {
403+
@include flex(row, start, start);
404+
width: 100%;
405+
406+
@include m-screen(1000px) {
407+
@include flex(column, start, start);
408+
margin-top: 5px;
409+
}
410+
411+
label {
412+
@include font-inter(300);
413+
color: $font-color-dark-2;
414+
min-width: 30%;
415+
}
416+
417+
p {
418+
@include font-inter(300);
419+
color: $font-color-dark;
420+
}
421+
}
422+
}
423+
424+
.box-button {
425+
height: 100%;
426+
@include flex(column, center, center);
427+
428+
@include m-screen(600px) {
429+
width: 100%;
430+
@include flex(column, center, end);
431+
}
432+
433+
button {
434+
padding: 10px 20px;
435+
border-radius: 10px;
436+
font-size: 1rem;
437+
border: solid 1px $secondary-color-orange;
438+
background-color: $secondary-color-dark;
439+
color: $secondary-color-orange;
440+
441+
&:hover {
442+
color: $secondary-color-dark;
443+
background-color: $secondary-color-orange;
444+
}
445+
}
446+
}
447+
}
448+
449+
p {
450+
@include font-inter(600);
451+
}
452+
}
453+
}
454+
335455
h2 {
336456
@include font-inter(700);
337457
font-size: 1.5rem;
338458
width: 100%;
339459
color: $secondary-color-orange;
340-
margin: 20px 0px 10px 0px;
460+
margin: 20px 0px 30px 0px;
341461
@include flex(row, space-between, center);
342462

343463
@include m-screen(760px) {

client/src/scss/pages/shared/_vagas.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
height: 100vh;
33

44
main {
5-
@include flex(row, flex-start, start);
5+
@include flex(row, center, start);
66
height: calc(100vh - 80px);
77
background-color: $primary-color-dark;
88

client/src/views/aluno/PerfilEmpresa.vue

Lines changed: 67 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,63 @@
1212
</div>
1313
<div class="capa">
1414
<div class="capaProfile">
15-
<img v-if="empresa.banner == 'default'" src="../../assets/imgs/defaultBanner.png"
16-
alt="Capa" />
15+
<img v-if="empresa.banner === 'default'" src="../../assets/imgs/defaultBanner.png" alt="Capa" />
1716
<img v-else :src="empresa.banner" alt="Capa" />
1817
</div>
1918
<div class="infoProfile">
20-
<img v-if="empresa.imagem == 'default'" src="../../assets/icons/artwork.png" />
19+
<img v-if="empresa.imagem === 'default'" src="../../assets/icons/artwork.png" />
2120
<img v-else :src="empresa.imagem" />
2221
<div class="info">
2322
<div class="box1">
2423
<h1 v-text="empresa.nome"></h1>
2524
</div>
25+
<div class="box2">
26+
<p v-text="empresa.email"></p>
27+
<p v-show="mode === 'view'">
28+
<a :href="empresa.site" target="_blank">{{ empresa.site }}</a>
29+
</p>
30+
</div>
2631
</div>
2732
</div>
2833
</div>
2934

3035
<section class="sobreMim">
31-
<h2>
32-
Sobre a Empresa
33-
</h2>
34-
<div>
35-
CNPJ: {{empresa.cnpj}}
36-
Email: {{empresa.email}}
37-
<p v-show="mode === 'view'">Site: <a :href="empresa.site" target="_blanck">{{empresa.site}}</a></p>
38-
</div>
36+
<h2>Nossos Estágios:</h2>
37+
<ul class="vagas">
38+
<li v-if="empresa.vagas && empresa.vagas.length < 1">
39+
<p>Nenhuma vaga cadastrada por esta empresa.</p>
40+
</li>
41+
<li class="vaga" v-for="(vaga, index) in empresa.vagas" :key="index">
42+
<router-link :to="'/vaga/' + vaga.id">
43+
<div class="infoVaga">
44+
<div class="contentVaga name">
45+
<p class="who">{{ vaga.titulo }}</p>
46+
47+
<div class="info">
48+
<label>Salário</label>
49+
<p v-text="vaga.remuneracao"></p>
50+
</div>
51+
<div class="info">
52+
<label>Carga horária</label>
53+
<p v-text="vaga.cargaHoraria"></p>
54+
</div>
55+
<div class="info">
56+
<label>Oferecida por</label>
57+
<p v-text="vaga.empresa"></p>
58+
</div>
59+
<div class="info">
60+
<label>Curso preferencial</label>
61+
<p v-text="vaga.curso"></p>
62+
</div>
63+
</div>
64+
<div class="box-button">
65+
<button>Ver vaga</button>
66+
</div>
67+
</div>
68+
</router-link>
69+
</li>
70+
71+
</ul>
3972
</section>
4073
</div>
4174
</main>
@@ -46,17 +79,7 @@
4679
import Header from '../../components/Header.vue';
4780
import Footer from '../../components/Footer.vue';
4881
import AsideDashboard from '../../components/aluno/AsideDashboard.vue';
49-
import router from '../../router/index.js'
50-
import { mixinEmpresa } from '../../util/authMixins.js';
51-
52-
import imgLapis from "../../assets/icons/lapis.png";
53-
import imgVerificar from "../../assets/icons/verificar.png";
54-
import imgCruz from "../../assets/icons/cruz.png";
55-
56-
import { getEmpresa } from '../../services/api/shared.js';
57-
58-
import Cookies from 'js-cookie';
59-
import { updateBanner, updateImage, updateSite } from '../../services/api/empresa.js';
82+
import { getEmpresa, getVagas } from '../../services/api/shared.js';
6083
6184
export default {
6285
name: 'PublicPerfilEmpresa',
@@ -78,68 +101,47 @@ export default {
78101
site: '',
79102
siteSubmit: '',
80103
token: '',
104+
vagas: [],
81105
},
82-
file: "",
83-
fileSelected: false,
84-
linkstatus: 0,
85106
mode: "view",
86-
modeImage: "view",
87-
modeBanner: "view",
88-
imgLapis,
89-
imgVerificar,
90-
imgCruz,
91-
extracurriculares: [],
92-
showAddForm: false,
93-
}
107+
};
94108
},
95109
methods: {
96-
async GetEmpresa(){
110+
async GetEmpresa() {
97111
try {
98112
const response = await getEmpresa(this.empresa.email);
99113
if (response.status >= 200 && response.status < 300) {
100114
this.empresa = response.data;
101-
102115
this.empresa.siteSubmit = response.data.site;
103116
117+
await this.loadVagasEmpresa();
104118
} else {
105-
console.error(
106-
"Erro ao carregar dados da empresa",
107-
response.message,
108-
);
119+
console.error("Erro ao carregar dados da empresa", response.message);
109120
}
110121
} catch (error) {
111-
console.error(
112-
"Erro ao carregar dados da empresa",
113-
error.message,
114-
);
122+
console.error("Erro ao carregar dados da empresa", error.message);
115123
}
116124
},
117-
previewProfileImage(event) {
118-
const file = event.target.files[0];
119-
if (!file) return;
120-
121-
const reader = new FileReader();
122-
reader.onload = (e) => {
123-
this.empresa.imagem = e.target.result;
124-
};
125-
reader.readAsDataURL(file);
126-
},
127-
previewBannerImage(event) {
128-
const file = event.target.files[0];
129-
if (!file) return;
130-
131-
const reader = new FileReader();
132-
reader.onload = (e) => {
133-
this.empresa.banner = e.target.result;
134-
};
135-
reader.readAsDataURL(file);
125+
async loadVagasEmpresa() {
126+
try {
127+
const response = await getVagas();
128+
if (response.status >= 200 && response.status < 300) {
129+
this.empresa.vagas = response.data.filter(
130+
(vaga) => vaga.empresa.toLowerCase() === this.empresa.nome.toLowerCase()
131+
);
132+
} else {
133+
console.error("Erro ao carregar vagas da empresa.");
134+
}
135+
} catch (error) {
136+
console.error("Erro ao carregar vagas da empresa.", error.message);
137+
}
136138
},
137139
},
138140
async created() {
139141
this.empresa.email = this.$route.params.email;
140-
await this.GetEmpresa(this.empresa.email);
142+
await this.GetEmpresa();
141143
}
142-
}
144+
};
143145
</script>
144146

145147
<style lang="scss" scoped>
@@ -157,7 +159,6 @@ export default {
157159
158160
.content {
159161
flex: 1;
160-
padding: 20px;
161162
overflow-y: auto;
162163
height: 100%;
163164
@@ -167,4 +168,4 @@ export default {
167168
}
168169
}
169170
}
170-
</style>
171+
</style>

0 commit comments

Comments
 (0)