From 7407e81cf1f9b7608ea474d9eb196f05b6a2e9b7 Mon Sep 17 00:00:00 2001 From: Rafael B <RafaelAPB@users.noreply.github.com> Date: Sat, 20 Jan 2018 20:39:50 +0000 Subject: [PATCH] Front-end enhancements --- .../gce-hash-code-next.component.css | 14 +- .../gce-hash-code-next.component.html | 25 +-- .../gce-hash-code/gce-hash-code.component.css | 4 +- .../gce-hash-code.component.html | 142 +++++++------- .../gce-hash-code/gce-hash-code.component.ts | 11 +- .../src/app/general/home/home.component.css | 1 + .../src/app/general/home/home.component.html | 20 +- .../login-student/login-student.component.ts | 1 - .../src/app/general/login/login.component.css | 2 +- .../app/general/login/login.component.html | 79 ++++---- .../src/app/general/login/login.component.ts | 18 +- .../app/general/navbar/navbar.component.ts | 1 - .../general/register/register.component.css | 2 +- .../general/register/register.component.html | 38 ++-- .../general/register/register.component.ts | 13 +- .../work-in-progress.component.html | 6 +- ...student-dashboard-proposals.component.html | 182 ++++++++++-------- .../student-profile.component.css | 2 +- .../student-profile.component.html | 7 +- 19 files changed, 305 insertions(+), 263 deletions(-) diff --git a/angular-src/src/app/general/gce-hash-code-next/gce-hash-code-next.component.css b/angular-src/src/app/general/gce-hash-code-next/gce-hash-code-next.component.css index 3e1f791..b986413 100644 --- a/angular-src/src/app/general/gce-hash-code-next/gce-hash-code-next.component.css +++ b/angular-src/src/app/general/gce-hash-code-next/gce-hash-code-next.component.css @@ -1,11 +1,17 @@ -#bg{ - background:url("http://groups.ist.utl.pt/gce-neiist/assets/img/ghc.jpg") no-repeat 0px 0px; - background-size:cover; +.bg{ + background:url("http://groups.ist.utl.pt/gce-neiist/assets/img/ghc.jpg") no-repeat 0px 0px; + background-size:cover; } .container{ padding: 1em 15em 2em 15em; - opacity: 0.9; + opacity: 0.85; +} + +.middlePage { + width: 70%; + height: 100%; + margin: auto; } .banner-info{ diff --git a/angular-src/src/app/general/gce-hash-code-next/gce-hash-code-next.component.html b/angular-src/src/app/general/gce-hash-code-next/gce-hash-code-next.component.html index 256f00a..ada3534 100644 --- a/angular-src/src/app/general/gce-hash-code-next/gce-hash-code-next.component.html +++ b/angular-src/src/app/general/gce-hash-code-next/gce-hash-code-next.component.html @@ -1,14 +1,17 @@ -<div id = "bg" class="container"> - <div id="fb-root"></div> - <div class="banner"> - <div class="container"> - <div class="banner-info text-center"> - <h1>Obrigado! A tua equipa está pré-inscrita!</h1> - <p>Para a equipa fazer a inscrição,<p style="color:#008744"> todos os elementos necessitam</p><p> de completar os passos <a href="https://goo.gl/hpmiVu">seguintes</a></p>. - <p>Nota que as inscrições para o nosso Hub irão abrir dia 28 de janeiro. Segue a nossa página do Facebook com regularidade para - ficares a par das últimas novidades!</p> - <iframe src="https://www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Fgce.neiist%2F&width=141&layout=button_count&action=like&size=large&show_faces=true&share=true&height=46&appId=2016815968536967" width="141" height="46" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></iframe> +<div class="bg"> + <div class="container middlePage"> + <div class="row"> + <div class="col-md-12"> + <div id="fb-root"></div> + + <div class="banner-info text-center"> + <h1>Obrigado! A tua equipa está pré-inscrita!</h1> + <p>Para a equipa fazer a inscrição,<p style="color:#008744"> todos os elementos necessitam</p><p> de completar os passos <a href="https://goo.gl/hpmiVu">seguintes</a></p>. + <p>Nota que as inscrições para o nosso Hub irão abrir dia 28 de janeiro. Segue a nossa página do Facebook com regularidade para + ficares a par das últimas novidades!</p> + <iframe src="https://www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Fgce.neiist%2F&width=141&layout=button_count&action=like&size=large&show_faces=true&share=true&height=46&appId=2016815968536967" width="141" height="46" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></iframe> + </div> + </div> </div> - </div> </div> </div> \ No newline at end of file diff --git a/angular-src/src/app/general/gce-hash-code/gce-hash-code.component.css b/angular-src/src/app/general/gce-hash-code/gce-hash-code.component.css index 94633de..16edffc 100644 --- a/angular-src/src/app/general/gce-hash-code/gce-hash-code.component.css +++ b/angular-src/src/app/general/gce-hash-code/gce-hash-code.component.css @@ -3,8 +3,8 @@ background-size:cover; } .middlePage { - width: 60em; - height: 110em; + width: 70%; + height: 100%; margin: auto; } .num { diff --git a/angular-src/src/app/general/gce-hash-code/gce-hash-code.component.html b/angular-src/src/app/general/gce-hash-code/gce-hash-code.component.html index 3781110..1845599 100644 --- a/angular-src/src/app/general/gce-hash-code/gce-hash-code.component.html +++ b/angular-src/src/app/general/gce-hash-code/gce-hash-code.component.html @@ -1,13 +1,18 @@ <div class="bg"> <div class="container middlePage"> - <div class="row"> + + + <div class="row"> <div class="col-md-12"> <div class="centered panel panel-red"> <div class="panel-heading">Google Hash-Code</div> </div> </div> </div> - <div class="row"> + + + + <div class="row"> <div class="col-md-12"> <div class="panel panel-yellow"> <div class="centered panel-heading">Procedimentos</div> @@ -57,6 +62,7 @@ <h3 class="centered">Programa</h3> </p> <h3 class="centered">Pré-inscrição</h3> + <p>É de salientar que as inscrições serão fechadas antes de 1 de fevereiro, caso cheguemos ao limite da nossa capacidade</p> <table class="table table-hover"> @@ -77,109 +83,109 @@ <h3 class="centered">Pré-inscrição</h3> </tr> </tbody> </table> - <p>É de salientar que as inscrições serão fechadas antes de 1 de fevereiro, caso cheguemos ao limite da nossa capacidade</p> </div> </div> </div> </div> - <div class="row"> + <div class="row"> <div class="col-md-12"> <div class="centered panel-heading"> </div> </div> </div> - <div class="row"> - <div class="col-sm-6"> - </div> - <div class="sol-sm-6"> + + + <div class="row"> + <div class="col-md-12"> <div class="nav-tab-holder text-right"> <ul class="nav nav-tabs row" role="tablist"> <a id="pre-ins" aria-controls="home" role="tab" data-toggle="tab">PRÉ-INSCRIÇÃO</a> </ul> </div> </div> - - </div> + <div class="row"> + <div class="col-md-12"> + <div class="tab-content"> + <div role="tabpanel" class="tab-pane active" id="home"> + <div class="row"> - <div class="tab-content"> - <div role="tabpanel" class="tab-pane active" id="home"> - <div class="row"> - - <div id = "contentorProposta" class="col-xl-10" style="background-color: blue; "> - - <article role="login"> - <form (submit)="addPreSign()" class="signup"> - <flash-messages></flash-messages> + <div id = "contentorProposta" class="col-xl-10" style="background-color: blue; "> - <div class="form-group"> - <input [(ngModel)]="teamName" class="form-control" placeholder="Nome da equipa" name="TC"> - </div> + <article role="login"> + <form (submit)="addPreSign()" class="signup"> + <flash-messages></flash-messages> - <div class="form-group"> - <input [(ngModel)]="teamCaptain" class="form-control" placeholder="Nome do Team Captain" name="TCo"> - </div> + <div class="form-group"> + <input [(ngModel)]="teamName" class="form-control" placeholder="Nome da equipa" name="TC"> + </div> - <div class="form-group"> - <input [(ngModel)]="teamContactEmail" class="form-control" placeholder="E-mail do Team Captain" name="CoE"> - </div> + <div class="form-group"> + <input [(ngModel)]="teamCaptain" class="form-control" placeholder="Nome do Team Captain" name="TCo"> + </div> - <div class="form-group"> - <input [(ngModel)]="teamContactPhone" class="form-control optional" placeholder="*OPCIONAL* Contacto telefónico do Team Captain" name="Co"> - </div> + <div class="form-group"> + <input [(ngModel)]="teamContactEmail" class="form-control" placeholder="E-mail do Team Captain" name="CoE"> + </div> - <div id = "numeroParticipantes" class="btn-group" dropdown> - <button dropdownToggle type="button" class="btn btn-primary dropdown-toggle"> - Número de membros da equipa<span class="caret"></span> - </button> - <ul *dropdownMenu class="dropdown-menu" role="menu"> - <li role="menuitem"><a class="dropdown-item" (click) = "setNumber($event,'2')">2 membros</a></li> - <li role="menuitem"><a class="dropdown-item" (click) = "setNumber($event,'3')">3 membros</a></li> - <li role="menuitem"><a class="dropdown-item" (click) = "setNumber($event,'4')">4 membros</a></li> - </ul> - </div> + <div class="form-group"> + <input [(ngModel)]="teamContactPhone" class="form-control optional" placeholder="*OPCIONAL* Contacto telefónico do Team Captain" name="Co"> + </div> - <p>O contacto telefónico permitem-nos contactar-te para confirmação da presença da tua equipa. Se estiveres na lista de espera, utilizaremos estes contactos para - te alertar quando existir uma vaga.</p><br> + <div id = "numeroParticipantes" class="btn-group" dropdown> + <button dropdownToggle type="button" class="btn btn-primary dropdown-toggle"> + Número de membros da equipa<span class="caret"></span> + </button> + <ul *dropdownMenu class="dropdown-menu" role="menu"> + <li role="menuitem"><a class="dropdown-item" (click) = "setNumber($event,'2')">2 membros</a></li> + <li role="menuitem"><a class="dropdown-item" (click) = "setNumber($event,'3')">3 membros</a></li> + <li role="menuitem"><a class="dropdown-item" (click) = "setNumber($event,'4')">4 membros</a></li> + </ul> + </div> - <p>Se ainda não tiveres membros de equipa, não te pré-inscrevas já. Em vez disso, coloca um post no <a href="https://www.facebook.com/events/212879605945560/">nosso evento</a>, de modo a arranjares equipa.</p> + <p>O contacto telefónico permitem-nos contactar-te para confirmação da presença da tua equipa. Se estiveres na lista de espera, utilizaremos estes contactos para + te alertar quando existir uma vaga.</p><br> - <br><br> - <div class="checkbox"> - <label> - <input type="checkbox" (click)="clicked($event)"> <b>Declaro que tomei conhecimento que a pré-inscrição só garante lugar na lista de espera.</b> - </label> - </div> + <p>Se ainda não tiveres membros de equipa, não te pré-inscrevas já. Em vez disso, coloca um post no <a href="https://www.facebook.com/events/212879605945560/">nosso evento</a>, de modo a arranjares equipa.</p> - <div class="checkbox"> - <label> - <input type="checkbox" (click)="clickedc($event)"><b>Subscrever a newsletter do GCE</b>, para obter novidades sobre a plataforma e eventos semelhantes. - </label> - </div> - <flash-messages></flash-messages> - <div class="form-group"> - <input type="submit" class="btn btn-primary btn-block" value="Pré-inscrição,nailed it!"> - </div> + <br><br> + <div class="checkbox"> + <label> + <input type="checkbox" (click)="clicked($event)"> <b>Declaro que tomei conhecimento que a pré-inscrição só garante lugar na lista de espera.</b> + </label> + </div> + <div class="checkbox"> + <label> + <input type="checkbox" (click)="clickedc($event)"><b>Subscrever a newsletter do GCE</b>, para obter novidades sobre a plataforma e eventos semelhantes. + </label> + </div> + <flash-messages></flash-messages> + <div class="form-group"> + <input type="submit" class="btn btn-primary btn-block" value="Pré-inscrição,nailed it!"> + </div> - </form> - </article> - </div> + </form> + </article> + </div> - </div> - <!-- end of row --> - </div> - <!-- end of home --> + </div> + <!-- end of row --> + </div> + <!-- end of home --> - </div> -</div> + </div> + </div> + </div> + </div> +</div> \ No newline at end of file diff --git a/angular-src/src/app/general/gce-hash-code/gce-hash-code.component.ts b/angular-src/src/app/general/gce-hash-code/gce-hash-code.component.ts index f14fdcd..8488669 100644 --- a/angular-src/src/app/general/gce-hash-code/gce-hash-code.component.ts +++ b/angular-src/src/app/general/gce-hash-code/gce-hash-code.component.ts @@ -4,15 +4,15 @@ import {FlashMessagesService} from 'angular2-flash-messages'; import {Router} from '@angular/router'; import {StudentService} from "../../services/student.service"; import { Subscription } from 'rxjs/Subscription'; -import {window} from "rxjs/operator/window"; -import { AuthService} from "../../services/auth.service"; +import { OnDestroy } from '@angular/core'; +import { ChangeDetectorRef} from '@angular/core'; @Component({ selector: 'app-gce-hash-code', templateUrl: './gce-hash-code.component.html', styleUrls: ['./gce-hash-code.component.css'] }) -export class GceHashCodeComponent implements OnInit { +export class GceHashCodeComponent implements OnInit,OnDestroy { teamCaptain: string; teamContactPhone: string; teamContactEmail: string; @@ -34,17 +34,20 @@ export class GceHashCodeComponent implements OnInit { private flashMessage: FlashMessagesService, private studentService: StudentService, private router: Router, - private authService: AuthService + private cd: ChangeDetectorRef ) {} ngOnInit() { } ngOnDestroy(): void { + this.cd.detach(); this.subscriptions.forEach((subscription: Subscription) => { subscription.unsubscribe(); }); + + } clicked(event) { diff --git a/angular-src/src/app/general/home/home.component.css b/angular-src/src/app/general/home/home.component.css index 387ffa4..4b4b27d 100644 --- a/angular-src/src/app/general/home/home.component.css +++ b/angular-src/src/app/general/home/home.component.css @@ -79,6 +79,7 @@ .bigFont { font-size:10px; + padding: 10px 10px 10px 10px; } .white { diff --git a/angular-src/src/app/general/home/home.component.html b/angular-src/src/app/general/home/home.component.html index 5c6efa8..115f915 100644 --- a/angular-src/src/app/general/home/home.component.html +++ b/angular-src/src/app/general/home/home.component.html @@ -80,8 +80,9 @@ <h3><a href="#">Serviços de inovação</a></h3> <p> De momento, o GCE está a ser uma ponte entre empresas e alunos do IST.</p> <div class="portfolio-top-left-grids"> <div class="portfolio-top-left-grid"> - <div class="portfolio-top-left-grid-left"> <i class="fa fa-handshake-o missao1" aria-hidden="true"></i> + <div class="portfolio-top-left-grid-left"> + </div> <div class="portfolio-top-left-grid-right"> <h5>Reforçar laços</h5> @@ -90,8 +91,9 @@ <h5>Reforçar laços</h5> <div class="clearfix"> </div> </div> <div class="portfolio-top-left-grid"> - <div class="portfolio-top-left-grid-left"> <i class="fa fa-bolt missao2" aria-hidden="true"></i> + <div class="portfolio-top-left-grid-left"> + </div> <div class="portfolio-top-left-grid-right"> <h5>Promover o Empreendedorismo</h5> @@ -101,8 +103,9 @@ <h5>Promover o Empreendedorismo</h5> <div class="clearfix"> </div> </div> <div class="portfolio-top-left-grid"> - <div class="portfolio-top-left-grid-left"> <i class="fa fa-road missao3" aria-hidden="true"></i> + <div class="portfolio-top-left-grid-left"> + </div> <div class="portfolio-top-left-grid-right"> <h5>Ser a estrada que conecta empresas, alunos e professores.</h5> @@ -188,7 +191,6 @@ <h4>Recolha de dados</h4> <app-info></app-info> - <app-gce-hash-code></app-gce-hash-code> <!--- portfolio ----> <!---- about ----> <!---start-about----> @@ -276,7 +278,7 @@ <h5>"If you aren't willing to work for it, don't complain about not having it"</ <div class="tm-head-grid wow fadeInRight" data-wow-delay="0.4s"> <img class = "img-team" src="https://groups.ist.utl.pt/gce-neiist/assets/img/team/dr.jpg" alt=""> <h4>Daniel Ramos</h4> - <h5>"Hello there, still wondering about a life changing quote"</h5> + <h5>"Wondering about a life-changing quote"</h5> <ul class="top-social-icons"> <a href="https://www.linkedin.com/in/daniel-r-8a285312a/"><i class="fa fa-linkedin" aria-hidden="true"></i></a> <a href="https://github.com/danieltrt"><i class="fa fa-github" aria-hidden="true"></i></a> @@ -300,7 +302,7 @@ <h5>"Trying to live life to its fullest while learning with every bump in the ro <div class="tm-head-grid wow fadeInUp" data-wow-delay="0.4s"> <img class = "img-team" src="https://groups.ist.utl.pt/gce-neiist/assets/img/gce.png" alt=""> <h4>Francisco Santos</h4> - <h5>"Hello there, still wondering about a life changing quote"</h5> + <h5>"Wondering about a life-changing quote"</h5> <ul class="top-social-icons"> <a href=""><i class="fa fa-linkedin" aria-hidden="true"></i></a> <div class="clear"></div> @@ -320,9 +322,9 @@ <h5>"Opportunity does not knock, it presents itself when you beat down the door. </div> <div class="wrap"> <div class="tm-head-grids"> <div class="tm-head-grid wow fadeInLeft" data-wow-delay="0.4s"> - <img class = "img-team" src="https://groups.ist.utl.pt/gce-neiist/assets/img/gce.png" alt=""> + <img class = "img-team" src="https://groups.ist.utl.pt/gce-neiist/assets/img/team/i.png" alt=""> <h4>Inês Sequeira</h4> - <h5>"Hello there, still wondering about a life changing quote"</h5> + <h5>"Wondering about a life-changing quote"</h5> <ul class="top-social-icons"> <a href="https://github.com/inesseq"><i class="fa fa-github" aria-hidden="true"></i></a> <a href="https://www.linkedin.com/in/in%C3%AAs-sequeira-a2b6b2a6/"><i class="fa fa-linkedin" aria-hidden="true"></i></a> @@ -367,7 +369,7 @@ <h5>"Meaningful things will allow you to enjoy life to its fullest."</h5> <div class="tm-head-grid wow fadeInUp" data-wow-delay="0.2s"> <img class = "img-team" src="https://groups.ist.utl.pt/gce-neiist/assets/img/team/rafa.jpg" alt=""> <h4><a href="https://web.ist.utl.pt/rafael.belchior/">Rafael Belchior</a></h4> - <h5>"If you are reading this, cheers! Trying to give my small contribution to society, by sharing knowledge."</h5> + <h5>"I don't walk, I run!"</h5> <ul class="top-social-icons"> <a href="https://www.linkedin.com/in/rafaelpbelchior/"><i class="fa fa-linkedin" aria-hidden="true"></i></a> <a href="https://github.com/RafaelAPB/"><i class="fa fa-github" aria-hidden="true"></i></a> diff --git a/angular-src/src/app/general/login/login-student/login-student.component.ts b/angular-src/src/app/general/login/login-student/login-student.component.ts index d19530e..6ec7868 100644 --- a/angular-src/src/app/general/login/login-student/login-student.component.ts +++ b/angular-src/src/app/general/login/login-student/login-student.component.ts @@ -20,7 +20,6 @@ export class LoginStudentComponent implements OnInit { this.authService.registerStudent(token).subscribe( response => { if (response.succeeded){ this.authService.storeData(response.response_data.user, response.response_data.token); - this.flashMessage.show("Ao fazeres login, estás a concordar com a nossa Política de Privacidade.", {cssClass: 'alert-info', timeout: 10000}); this.router.navigate(['dashboardStudent']); } else { this.flashMessage.show("Erro interno. Por favor contacte a administração. Obrigado.", {cssClass: 'alert-danger', timeout: 5000});} diff --git a/angular-src/src/app/general/login/login.component.css b/angular-src/src/app/general/login/login.component.css index 59b060b..d13261a 100644 --- a/angular-src/src/app/general/login/login.component.css +++ b/angular-src/src/app/general/login/login.component.css @@ -1,5 +1,5 @@ .middlePage { - width: 60em; + width: 70%; height: 46em; margin: auto; } diff --git a/angular-src/src/app/general/login/login.component.html b/angular-src/src/app/general/login/login.component.html index 8cc3f26..9cc4e2b 100644 --- a/angular-src/src/app/general/login/login.component.html +++ b/angular-src/src/app/general/login/login.component.html @@ -1,47 +1,48 @@ -<div class="middlePage"> - <div class="page-header"> - <h1 class="centered logo">Login</h1> - </div> - - <div class="panel panel-primary"> - <div class="panel-heading"> - <h3 class="panel-title"></h3> - </div> - <div class="panel-body"> - - <div class="row"> +<div class="container middlePage"> + <div class="row"> + <div class="page-header"> + <h1 class="centered logo">Login</h1> + </div> - <div align="center" class="col-md-5" > - <h2>Aluno</h2> - <div> - <a [href]="studentPath" class="btn btn-primary btn-lg"> - <i class="fa fa-graduation-cap"></i> Login com FenixEdu - </a> - </div> - <h2>Professor</h2> - <a class="disabled btn btn-primary"> - <i class="fa fa-graduation-cap"></i> Brevemente (FenixEdu) - </a> + <div class="panel panel-primary"> + <div class="panel-heading"> + <h3 class="panel-title">Ao fazeres login, estás a concordar com a nossa Política de Privacidade.</h3> </div> + <div class="panel-body"> + + <div class="row"> + + <div align="center" class="col-md-5" > + <h2>Aluno</h2> + <div> + <a [href]="studentPath" class="btn btn-primary btn-lg"> + <i class="fa fa-graduation-cap"></i> Login com FenixEdu + </a> + </div> + <h2>Professor</h2> + <a class="disabled btn btn-primary"> + <i class="fa fa-graduation-cap"></i> Brevemente (FenixEdu) + </a> + </div> + + <div class="col-md-7" style="border-left:1px solid #ccc;height:160px"> + <form (submit)="onLoginSubmit()" class="form-horizontal"> + <fieldset> + <h2>Empresas</h2> + <input type="email" name="username" [(ngModel)]="username" placeholder="Introduza o e-mail" class="form-control input-md"> + <div class="spacing"></div> + <input name="password" type="password" name="textinput" [(ngModel)]="password" placeholder="Introduza a password" class="form-control"> + <div class="spacing"></div> + <button id="singlebutton" name="singlebutton" class="btn btn-primary btn-sm pull-right">Login</button> + + + </fieldset> + </form> + </div> - <div class="col-md-7" style="border-left:1px solid #ccc;height:160px"> - <form (submit)="onLoginSubmit()" class="form-horizontal"> - <fieldset> - <h2>Empresas</h2> - <input type="email" name="username" [(ngModel)]="username" placeholder="Introduza o e-mail" class="form-control input-md"> - <div class="spacing"></div> - <input name="password" type="password" name="textinput" [(ngModel)]="password" placeholder="Introduza a password" class="form-control"> - <div class="spacing"></div> - <button id="singlebutton" name="singlebutton" class="btn btn-primary btn-sm pull-right">Login</button> - + </div> - </fieldset> - </form> </div> - </div> - </div> - </div> - </div> diff --git a/angular-src/src/app/general/login/login.component.ts b/angular-src/src/app/general/login/login.component.ts index a810c23..bda516c 100644 --- a/angular-src/src/app/general/login/login.component.ts +++ b/angular-src/src/app/general/login/login.component.ts @@ -1,17 +1,19 @@ import { Component, OnInit } from '@angular/core'; import { AuthService } from "../../services/auth.service"; import { Router, ActivatedRoute, Params} from "@angular/router"; -import {FlashMessagesService} from "angular2-flash-messages"; -import {ValidateService} from "../../services/validate.service"; +import { FlashMessagesService} from "angular2-flash-messages"; +import { ValidateService} from "../../services/validate.service"; import { secrets } from '../../../../.env'; import { Subscription } from 'rxjs/Subscription'; +import { ChangeDetectorRef} from '@angular/core'; +import { OnDestroy } from '@angular/core'; @Component({ selector: 'app-login', templateUrl: './login.component.html', styleUrls: ['./login.component.css'] }) -export class LoginComponent implements OnInit { +export class LoginComponent implements OnInit, OnDestroy { username: string; password: string; studentPath: string; @@ -20,7 +22,8 @@ export class LoginComponent implements OnInit { private subscriptions: Array<Subscription> = []; constructor(private authService: AuthService, private router: Router,private activatedRoute: ActivatedRoute, - private flashMessage: FlashMessagesService, private validateService: ValidateService + private flashMessage: FlashMessagesService, private validateService: ValidateService, + private cd: ChangeDetectorRef ) { @@ -37,11 +40,13 @@ export class LoginComponent implements OnInit { ngOnInit() { } - public ngOnDestroy(): void { + + ngOnDestroy() { + this.cd.detach(); this.subscriptions.forEach((subscription: Subscription) => { subscription.unsubscribe(); - }); + }); } onLoginSubmit() { @@ -67,7 +72,6 @@ export class LoginComponent implements OnInit { //TODO: Add Autorization header, or remove route protection on user //The student is treated at student-register.component this.subscriptions.push(this.authService.authUser(user).subscribe( response => { - console.log(response); if (response.succeeded) { this.authService.storeData(response.response_data.user, response.response_data.token); this.flashMessage.show(response.message, {cssClass: 'alert-info', timeout: 3000}); diff --git a/angular-src/src/app/general/navbar/navbar.component.ts b/angular-src/src/app/general/navbar/navbar.component.ts index 1d0a616..9ece861 100644 --- a/angular-src/src/app/general/navbar/navbar.component.ts +++ b/angular-src/src/app/general/navbar/navbar.component.ts @@ -38,7 +38,6 @@ export class NavbarComponent implements OnInit { onLogoutClick() { this.authService.logOut(); - this.flashMessage.show("Logged out", {cssClass: 'alert-info', timeout: 2000}); this.router.navigate(['/']); return false; } diff --git a/angular-src/src/app/general/register/register.component.css b/angular-src/src/app/general/register/register.component.css index a372da6..b989357 100644 --- a/angular-src/src/app/general/register/register.component.css +++ b/angular-src/src/app/general/register/register.component.css @@ -1,5 +1,5 @@ .middlePage { - width: 60em; + width: 70%; height: 46em; margin: auto; } diff --git a/angular-src/src/app/general/register/register.component.html b/angular-src/src/app/general/register/register.component.html index 9abebbe..4e8c93f 100644 --- a/angular-src/src/app/general/register/register.component.html +++ b/angular-src/src/app/general/register/register.component.html @@ -1,21 +1,23 @@ -<div class="middlePage"> -<div class="page-header"> - <h1 class="centered logo">Registo</h1> - </div> +<div class="container middlePage"> + <div class="row"> + <div class="page-header"> + <h1 class="centered logo">Registo</h1> + </div> - <div class="container-fluid"> - <div class="row"> - <div class="centered col-md"> - <button (click)="clickStudent()" class="buttons_column btn btn-primary btn-lg"> - <i class="fa fa-graduation-cap"></i> Estudante - </button> - <button (click)="clickStudent()" class="disabled buttons_column btn btn-primary btn-lg"> - <i class="fa fa-graduation-cap"></i> Professor - </button> - <button (click)="clickCompany()" class="disabled buttons_column btn btn-primary btn-lg"> - <i class="fa fa-building"></i> Empresa - </button> - </div> - </div> + <div class="container-fluid"> + <div class="row"> + <div class="centered col-md"> + <button (click)="clickStudent()" class="buttons_column btn btn-primary btn-lg"> + <i class="fa fa-graduation-cap"></i> Estudante + </button> + <button (click)="clickStudent()" class="disabled buttons_column btn btn-primary btn-lg"> + <i class="fa fa-graduation-cap"></i> Professor + </button> + <button (click)="clickCompany()" class="disabled buttons_column btn btn-primary btn-lg"> + <i class="fa fa-building"></i> Empresa + </button> + </div> + </div> + </div> </div> </div> diff --git a/angular-src/src/app/general/register/register.component.ts b/angular-src/src/app/general/register/register.component.ts index 2c372fe..522bb07 100644 --- a/angular-src/src/app/general/register/register.component.ts +++ b/angular-src/src/app/general/register/register.component.ts @@ -1,21 +1,28 @@ import { Component, OnInit } from '@angular/core'; import { Router } from "@angular/router"; -import {FlashMessagesService} from "angular2-flash-messages"; +import { FlashMessagesService} from "angular2-flash-messages"; +import { ChangeDetectorRef} from '@angular/core'; +import { OnDestroy } from '@angular/core'; @Component({ selector: 'app-register', templateUrl: './register.component.html', styleUrls: ['./register.component.css'] }) -export class RegisterComponent implements OnInit { +export class RegisterComponent implements OnInit, OnDestroy { constructor(private router: Router, - private flashMessage: FlashMessagesService) { + private flashMessage: FlashMessagesService, + private cd: ChangeDetectorRef) { } ngOnInit() { } + ngOnDestroy() { + this.cd.detach(); + } + clickStudent() { this.flashMessage.show('Não é necessário fazer inscrição. Faz Login através do Fénix.', {cssClass: 'alert-info', timeout: 5000}); this.router.navigate(['login'], ); diff --git a/angular-src/src/app/general/work-in-progress/work-in-progress.component.html b/angular-src/src/app/general/work-in-progress/work-in-progress.component.html index 255f25a..92396fa 100644 --- a/angular-src/src/app/general/work-in-progress/work-in-progress.component.html +++ b/angular-src/src/app/general/work-in-progress/work-in-progress.component.html @@ -1,7 +1,6 @@ -<div class="middlePage"> <div class="container"> <div class="row"> - <div class="col-md-10"> + <div class="col-md-12"> <div class="panel panel-danger"> <div class="panel-heading">Em construção!</div> <div class="panel-body"> @@ -12,7 +11,7 @@ </div> <br> <div class="row"> - <div class="col-md-10"> + <div class="col-md-12"> <div class="panel panel-warning"> <div class="panel-heading">Precisamos de opiniões!</div> <div class="panel-body"> @@ -24,4 +23,3 @@ </div> </div> </div> -</div> diff --git a/angular-src/src/app/user-student/student-dashboard-proposals/student-dashboard-proposals.component.html b/angular-src/src/app/user-student/student-dashboard-proposals/student-dashboard-proposals.component.html index b8c253f..0bc6a16 100644 --- a/angular-src/src/app/user-student/student-dashboard-proposals/student-dashboard-proposals.component.html +++ b/angular-src/src/app/user-student/student-dashboard-proposals/student-dashboard-proposals.component.html @@ -1,99 +1,111 @@ -<div class="row"> - <div class="col-md-12"> - <div class="centered panel panel-info"> - <div class="panel-heading">Propostas</div> - <div class="panel-body"> - <div *ngIf="proposals"><p>De momento não estamos a divulgar propostas</p></div> - <div *ngIf="!proposals"> - <table class="table table-striped"> - <thead> - <tr> - <th>ID</th> - <th>Empresa</th> - <th>Data começo</th> - <th>Data fim</th> - <th>Salário</th> - <th>Vagas</th> - <th>Descrição</th> - <th>Link</th> - <th>Qualificações necessárias</th> - <th>Observações</th> - - <th>Apply</th> - </tr> - </thead> - <tbody> - <tr *ngFor="let proposal of proposals"> - <td>{{ proposal.proposalIndex}}</td> - <td>{{ proposal.company }}</td> - <td>{{ proposal.date_beginning }}</td> - <td>{{ proposal.date_end }}</td> - <td>{{ proposal.salary }}</td> - <td class="arrumadoEmColuna">{{ proposal.vacancies }}</td> - <td class="arrumadoEmColuna">{{ proposal.description }}</td> - <td class="arrumadoEmColuna">{{ proposal.link }}</td> - <td class="arrumadoEmColuna"> {{ proposal.requirements }}</td> - <td class="arrumadoEmColuna">{{ proposal.observations }}</td> - <td> - <button type="button" class="btn btn-info btn-sm" - data-target="#template" - (click)="setProposal(proposal._id,proposal.company);openModal(template)"> - Apply - </button> - </td> - </tr> - </tbody> - </table> - </div> +<div class="container"> + <div class="col-lg-6"></div> + <div class="col-lg-4"> + + <button type="button" [routerLink]="['/hashcode']" class="btn btn-warning bigFont" aria-label="Left Align"> + <i class="fa fa-google"> Hash Code</i> + </button> + - </div> </div> - </div> -</div> + <br><br> + <div class="row"> + + <div class="col-md-12"> + <div class="centered panel panel-info"> + <div class="panel-heading">Propostas</div> + <div class="panel-body"> + <div *ngIf="proposals"><p>De momento não estamos a divulgar propostas</p></div> + <div *ngIf="!proposals"> + <table class="table table-striped"> + <thead> + <tr> + <th>ID</th> + <th>Empresa</th> + <th>Data começo</th> + <th>Data fim</th> + <th>Salário</th> + <th>Vagas</th> + <th>Descrição</th> + <th>Link</th> + <th>Qualificações necessárias</th> + <th>Observações</th> + <th>Apply</th> + </tr> + </thead> + <tbody> + <tr *ngFor="let proposal of proposals"> + <td>{{ proposal.proposalIndex}}</td> + <td>{{ proposal.company }}</td> + <td>{{ proposal.date_beginning }}</td> + <td>{{ proposal.date_end }}</td> + <td>{{ proposal.salary }}</td> + <td class="arrumadoEmColuna">{{ proposal.vacancies }}</td> + <td class="arrumadoEmColuna">{{ proposal.description }}</td> + <td class="arrumadoEmColuna">{{ proposal.link }}</td> + <td class="arrumadoEmColuna"> {{ proposal.requirements }}</td> + <td class="arrumadoEmColuna">{{ proposal.observations }}</td> + <td> + <button type="button" class="btn btn-info btn-sm" + data-target="#template" + (click)="setProposal(proposal._id,proposal.company);openModal(template)"> + Apply + </button> + </td> + </tr> + </tbody> + </table> + </div> -<div class="row"> - <div class="col-md-12"> - <div class="centered panel panel-success"> - <div class="panel-heading">As Minhas Candidaturas</div> - <div class="panel-body"> - <div *ngIf="applications"><p>Não te candidataste a nenhuma proposta</p></div> - <div *ngIf="!applications"> - <table id="proposalTable" class="table table-striped"> - <thead> - <tr> - <th>Proposal</th> - <th>Creation Date</th> - <th>Status</th> - <th>Delete</th> - </tr> - </thead> - <tbody> - <tr *ngFor="let application of applications"> - <td>{{ application.proposal }}</td> - <td>{{ application.creationDate }}</td> - <td>{{ application.status }}</td> - <td> - <button type="button" class="btn btn-danger" #pop="bs-popover" - [popover]="delete" popoverTitle="Are you sure?" - (click)="setToDeleteApplication(application._id)"> - Delete application - </button> - - </td> - - </tr> - </tbody> - </table> </div> + </div> + </div> + </div> + + + <div class="row"> + <div class="col-md-12"> + <div class="centered panel panel-success"> + <div class="panel-heading">As Minhas Candidaturas</div> + <div class="panel-body"> + <div *ngIf="applications"><p>Não te candidataste a nenhuma proposta</p></div> + <div *ngIf="!applications"> + <table id="proposalTable" class="table table-striped"> + <thead> + <tr> + <th>Proposal</th> + <th>Creation Date</th> + <th>Status</th> + <th>Delete</th> + </tr> + </thead> + <tbody> + <tr *ngFor="let application of applications"> + <td>{{ application.proposal }}</td> + <td>{{ application.creationDate }}</td> + <td>{{ application.status }}</td> + <td> + <button type="button" class="btn btn-danger" #pop="bs-popover" + [popover]="delete" popoverTitle="Are you sure?" + (click)="setToDeleteApplication(application._id)"> + Delete application + </button> + + </td> + + </tr> + </tbody> + </table> + </div> + </div> + </div> </div> </div> - </div> </div> - <ng-template #template> <div class="modal-header"> <h4 class="modal-title pull-left" id="myModalLabel">Edit Proposal</h4> diff --git a/angular-src/src/app/user-student/student-profile/student-profile.component.css b/angular-src/src/app/user-student/student-profile/student-profile.component.css index 19c9a3f..2ddc5a4 100644 --- a/angular-src/src/app/user-student/student-profile/student-profile.component.css +++ b/angular-src/src/app/user-student/student-profile/student-profile.component.css @@ -1,5 +1,5 @@ .middlePage { - width: 60em; + width: 100%; height: 65em; margin: auto; } diff --git a/angular-src/src/app/user-student/student-profile/student-profile.component.html b/angular-src/src/app/user-student/student-profile/student-profile.component.html index 440cb84..6f4e546 100644 --- a/angular-src/src/app/user-student/student-profile/student-profile.component.html +++ b/angular-src/src/app/user-student/student-profile/student-profile.component.html @@ -1,8 +1,8 @@ <app-work-in-progress></app-work-in-progress> -<div class="middlePage"> - <div class="container"> + <div class="container middlePage"> <div class="row"> - <div class="col-md-10"> + <div class="col-md-12"> + <div class="panel panel-info"> <div class="panel-heading">1) Dados recolhidos</div> <div class="panel-body"> @@ -105,5 +105,4 @@ --> <br> <br> - </div> </div>