diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index d84735f1ee6a4e7971bf3f7c4d54219eb61bac15..bf423dcb5564d9dbc11b49b836a2709628ea02b7 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -3,6 +3,7 @@ import { RouterModule, Routes } from '@angular/router'; import { AboutComponent } from './about/about.component'; import { HomeComponent } from './home/home.component'; +import { RedirectionComponent } from './redirection/redirection.component'; import { NotFoundComponent } from './not-found/not-found.component'; import { PublicationsComponent } from './publications/publications.component'; import { TeamComponent } from './team/team.component'; @@ -15,7 +16,7 @@ import { CaqComponent } from './caq/caq.component'; import { CaqResultComponent } from './caq-result/caq-result.component'; const routes: Routes = [ - { path: '', component: HomeComponent, canDeactivate: [HasErrorGuard] }, + { path: '', component: RedirectionComponent, canDeactivate: [HasErrorGuard] }, { path: 'pqr', component: PqrComponent, canDeactivate: [HasErrorGuard] }, { path: 'about', component: AboutComponent }, { path: 'quality', component: QualityComponent }, diff --git a/src/app/app.component.html b/src/app/app.component.html index b293fb9001dde30670c3ff46c81d55d555655e1c..86b98bd8ae06e9bdce770d0df35815551c02de4a 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,7 +1,7 @@ <block-ui> <nav class="navbar navbar-fixed-top hidden-print" [ngClass]="{ 'navbar-inverse': isInverseColor, 'navbar-default': !isInverseColor }"> - <app-news></app-news> + <!-- <app-news></app-news> --> <div class="container-fluid"> <div class="navbar-header"> @@ -19,7 +19,7 @@ </a> </div> - <div #navbarContent id="mainNavBar" class="collapse navbar-collapse" [collapse]="navBarIsCollapsed"> + <!-- <div #navbarContent id="mainNavBar" class="collapse navbar-collapse" [collapse]="navBarIsCollapsed"> <ul class="nav navbar-nav"></ul> <ul class="nav navbar-nav navbar-right"> @@ -74,7 +74,7 @@ <app-profile [isInverseColor]="isInverseColor"></app-profile> </div> </ul> - </div> + </div> --> </div> </nav> @@ -121,7 +121,7 @@ <img [src]="'assets/images/simcaq_logo_v2.svg'" alt="Logo SimCAQ"> </div> - <div class="footer-v2-itens"> + <!-- <div class="footer-v2-itens"> <div class="footer-meet"> <div class="footer-sub-title">Conheça</div> <div> @@ -152,10 +152,10 @@ <li><a class="cursor-pointer" (click)="startSimulation(financingFederatedEntitiesGroupByCityOrState)">Financiamento atual X necessário</a></li> - <!--li><a class="cursor-pointer" + li><a class="cursor-pointer" (click)="startSimulation(financingFederatedEntitiesByCitySphereAdm)">Quanto custa uma escola pública em condições de qualidade</a></li--> - <li>Quanto custa uma escola pública em condições de qualidade?</li> + <!-- <li>Quanto custa uma escola pública em condições de qualidade?</li> </ul> </div> <div> @@ -168,7 +168,7 @@ </div> </div> </div> - </div> + </div> --> <!-- <div class="col-md-6 col-lg-3"> <ul class="list-sub-footer"> diff --git a/src/app/app.component.scss b/src/app/app.component.scss index 8dd3a55cb4ccbefca2da5f2f653ea5a8dba39a5a..31fb4e5e9f0e9fa97674fcf8b058679f7a2529d9 100644 --- a/src/app/app.component.scss +++ b/src/app/app.component.scss @@ -59,7 +59,7 @@ $button-border: 2px solid $navbar-color; gap: 50px; /* width: 1366px;*/ - height: 267px; + height: 100px; /* Gray/50 */ diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 00370cb37ad18dfe7d60cf138130f3783a2c7f8a..d6204e814b092cebedb59302ad8072f27bd6b6c8 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -102,9 +102,9 @@ export class AppComponent extends BaseUnsubscribe implements OnInit { this.showFooter = true; // Close the navbar menu (mobile screen). - if (this.navbarContent.nativeElement.classList.contains('show')) { - this.navbarMenuToggle.nativeElement.click(); - } + // if (this.navbarContent.nativeElement.classList.contains('show')) { + // this.navbarMenuToggle.nativeElement.click(); + // } }); } diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 6024c31d588fa82c7bcd851feb1463dfd34e2db8..e5aea0f86d8b1cfe8cc637d000e988ff94482f28 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -14,6 +14,7 @@ import { AppHttpInterceptor } from './shared/services/http/interceptors/app-http import { AppErrorHandler } from './shared/services/error-handler/app-error-handler.service'; import { AppComponent } from './app.component'; import { HomeComponent } from './home/home.component'; +import { RedirectionComponent } from './redirection/redirection.component'; import { AppRoutingModule } from './app-routing.module'; import { LoginComponent } from './login/login.component'; import { NotFoundComponent } from './not-found/not-found.component'; @@ -44,6 +45,7 @@ registerLocaleData(localePt, 'pt'); declarations: [ AppComponent, HomeComponent, + RedirectionComponent, LoginComponent, NotFoundComponent, PublicationsComponent, diff --git a/src/app/redirection/redirection.component.html b/src/app/redirection/redirection.component.html new file mode 100644 index 0000000000000000000000000000000000000000..7ad315d960b837290b589c04ef01e002e3d71ce6 --- /dev/null +++ b/src/app/redirection/redirection.component.html @@ -0,0 +1,26 @@ +<meta http-equiv = "refresh" content = "10; url = https://simcaq.ufg.br" /> + +<div class="container"> + <div class="row"> + <div class="col-lg-12"> + <div class="redirection-container"> + <div class="redirection"> + <div class="redirection-title"> + <h1>O SIMCAQ não está mais sendo desenvolvido no C3SL/UFPR. </h1> + </div> + <div class="redirection-text"> + Ele está no seguinte endereço: <a href="https://simcaq.ufg.br">https://simcaq.ufg.br</a> + </div> + <div class="redirection-text"> + Você será redirecionado em {{this.counter}} segundos... + </div> + <div class="redirection-text"> + <p>Se você não for redirecionado automaticamente, clique no botão abaixo.</p> + </div> + <div class="redirection-button"> + <a href="https://simcaq.ufg.br" class="button">Ir direto para o link</a> + </div> + </div> + </div> + </div> + </div> diff --git a/src/app/redirection/redirection.component.scss b/src/app/redirection/redirection.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..cba994abca2c5ef2b51251c4a8365183dd5fef8e --- /dev/null +++ b/src/app/redirection/redirection.component.scss @@ -0,0 +1,25 @@ +.container { + margin-top: 20vh; + margin-bottom: 12%; + padding-left: 0; + padding-right: 0; + display: flex; + + .redirection-text { + font-size: 20px; + padding-top: 20px; + } + + .redirection-button { + padding-top: 20px; + + .button { + border: 1px solid #49697d; + background-color: #49697d; + border-radius: 4px; + color: #fff; + padding: 10px 20px; + font-size: 15px; + } + } +} diff --git a/src/app/redirection/redirection.component.spec.ts b/src/app/redirection/redirection.component.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..55a6bf6a2cb02805372f906bb435987ecd40fa4e --- /dev/null +++ b/src/app/redirection/redirection.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { RedirectionComponent } from './redirection.component'; + +describe('RedirectionComponent', () => { + let component: RedirectionComponent; + let fixture: ComponentFixture<RedirectionComponent>; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ RedirectionComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(RedirectionComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should be created', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/redirection/redirection.component.ts b/src/app/redirection/redirection.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..fda9ffeb02c20264bb1f844cf5d272ecff34a54a --- /dev/null +++ b/src/app/redirection/redirection.component.ts @@ -0,0 +1,48 @@ +import { Component, OnInit } from '@angular/core'; +import { Router } from '@angular/router'; +import { takeUntil, map } from 'rxjs/operators'; +import { Observable, timer } from 'rxjs'; +import { BsModalService, BsModalRef } from 'ngx-bootstrap/modal'; + +import { SimulationType } from '../simulator/simulator/entities/enums/simulation-type.enum'; +import { SimulatorService } from '../simulator/simulator/services/simulator.service'; +import { AuthService } from '../shared/services/auth/auth.service'; +import { BaseUnsubscribe } from '../shared/entities/base/base-unsubscribe'; + +@Component({ + selector: 'app-redirection', + templateUrl: './redirection.component.html', + styleUrls: ['./redirection.component.scss'] +}) +export class RedirectionComponent extends BaseUnsubscribe implements OnInit { + + financingSimulationIsEnable: boolean = false; + + readonly caq: SimulationType = SimulationType.caq; + readonly planning: SimulationType = SimulationType.planning; + readonly financing: SimulationType = SimulationType.financing; + + bsModalRef: BsModalRef; + + counter = 10; + + constructor(private simulatorService: SimulatorService, private authService: AuthService, private bsModalService: BsModalService, private router: Router) { + super(); + } + + ngOnInit(): void { + setInterval( () => this.numDecrement(this.counter), 1000); + } + + numDecrement(numRecieved : number) { + while(numRecieved > 0) { + this.counter = numRecieved - 1; + return numRecieved; + } + } + + startSimulation(simulationType: SimulationType): void { + this.simulatorService.startSimulation(simulationType); + } + +} diff --git a/src/app/shared/components/news/news.component.spec.ts b/src/app/shared/components/news/news.component.spec.ts index 700d90cce7787c75ffd9627165e3247df6c79bc0..d349d2b4eca59797127b195c1f0f5c7519ddbae3 100644 --- a/src/app/shared/components/news/news.component.spec.ts +++ b/src/app/shared/components/news/news.component.spec.ts @@ -1,25 +1,25 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +// import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { NewsComponent } from './news.component'; +// import { NewsComponent } from './news.component'; -describe('NewsComponent', () => { - let component: NewsComponent; - let fixture: ComponentFixture<NewsComponent>; +// describe('NewsComponent', () => { +// let component: NewsComponent; +// let fixture: ComponentFixture<NewsComponent>; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ NewsComponent ] - }) - .compileComponents(); - })); +// beforeEach(async(() => { +// TestBed.configureTestingModule({ +// declarations: [ NewsComponent ] +// }) +// .compileComponents(); +// })); - beforeEach(() => { - fixture = TestBed.createComponent(NewsComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); +// beforeEach(() => { +// fixture = TestBed.createComponent(NewsComponent); +// component = fixture.componentInstance; +// fixture.detectChanges(); +// }); - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); +// it('should create', () => { +// expect(component).toBeTruthy(); +// }); +// }); diff --git a/src/app/shared/components/news/news.component.ts b/src/app/shared/components/news/news.component.ts index acaa3d1dd79acb882feb52c5a6459bce477a2659..e1396707c946c58c18397a6e960bccd97a7b8022 100644 --- a/src/app/shared/components/news/news.component.ts +++ b/src/app/shared/components/news/news.component.ts @@ -1,22 +1,22 @@ -import { Component, OnInit } from '@angular/core'; +// import { Component, OnInit } from '@angular/core'; -@Component({ - selector: 'app-news', - templateUrl: './news.component.html', - styleUrls: ['./news.component.scss'] -}) -export class NewsComponent implements OnInit { +// @Component({ +// selector: 'app-news', +// templateUrl: './news.component.html', +// styleUrls: ['./news.component.scss'] +// }) +// export class NewsComponent implements OnInit { - paragraphs: Array<string> = new Array<string>( - 'Versão 3.0 - sujeita a aprimoramentos e correções decorrentes de pesquisas educacionais e computacionais.', - 'Os conteúdos e resultados do simulador são de exclusiva e inteira responsabilidade dos autores. Não exprime, necessariamente, o ponto de vista do Ministério de Educação (MEC).' - ); +// paragraphs: Array<string> = new Array<string>( +// 'Versão 3.0 - sujeita a aprimoramentos e correções decorrentes de pesquisas educacionais e computacionais.', +// 'Os conteúdos e resultados do simulador são de exclusiva e inteira responsabilidade dos autores. Não exprime, necessariamente, o ponto de vista do Ministério de Educação (MEC).' +// ); - fullText: string = this.paragraphs.join(' '); +// fullText: string = this.paragraphs.join(' '); - constructor() { } +// constructor() { } - ngOnInit() { - } +// ngOnInit() { +// } -} +// } diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 1132002086dba9fc87123b55ee885551f7a022f6..13bc1926151390ab5b9a046c8a2e6e76b24172ff 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -23,7 +23,7 @@ import { AlertComponent } from './components/modal/alert/alert.component'; import { ConfirmComponent } from './components/modal/confirm/confirm.component'; import { PqrInfoComponent } from '../simulator/shared/components/pqr-info/pqr-info.component'; import { ComponentHostDirective } from './directives/component-host.directive'; -import { NewsComponent } from './components/news/news.component'; +// import { NewsComponent } from './components/news/news.component'; import { FootnoteComponent } from './components/footnote/footnote.component'; import { DownloadComponent } from './components/download/download.component'; import { TutorialsComponent } from './components/modal/tutorials/tutorials.component'; @@ -58,7 +58,7 @@ import { TutorialsComponent } from './components/modal/tutorials/tutorials.compo ConfirmComponent, PqrInfoComponent, ComponentHostDirective, - NewsComponent, + // NewsComponent, FootnoteComponent, DownloadComponent, TutorialsComponent @@ -92,7 +92,7 @@ import { TutorialsComponent } from './components/modal/tutorials/tutorials.compo ConfirmComponent, PqrInfoComponent, ComponentHostDirective, - NewsComponent, + // NewsComponent, FootnoteComponent, DownloadComponent, TutorialsComponent