diff --git a/resident-ui/src/app/feature/error/error-routing.module.ts b/resident-ui/src/app/feature/error/error-routing.module.ts new file mode 100644 index 00000000..0cc9533f --- /dev/null +++ b/resident-ui/src/app/feature/error/error-routing.module.ts @@ -0,0 +1,13 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; +import {ErrorComponent} from './error/error.component' + +const routes: Routes = [ + {path:'', component:ErrorComponent} +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class ErrorRoutingModule { } \ No newline at end of file diff --git a/resident-ui/src/app/feature/error/error.module.ts b/resident-ui/src/app/feature/error/error.module.ts new file mode 100644 index 00000000..5cd87454 --- /dev/null +++ b/resident-ui/src/app/feature/error/error.module.ts @@ -0,0 +1,14 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { ErrorRoutingModule } from './error-routing.module'; +import { ErrorComponent } from './error/error.component'; + +@NgModule({ + declarations: [ErrorComponent], + imports: [ + CommonModule, + ErrorRoutingModule + ] +}) +export class ErrorModule { } \ No newline at end of file diff --git a/resident-ui/src/app/feature/error/error/error.component.css b/resident-ui/src/app/feature/error/error/error.component.css new file mode 100644 index 00000000..b3dc6d29 --- /dev/null +++ b/resident-ui/src/app/feature/error/error/error.component.css @@ -0,0 +1,12 @@ +.main-container{ + height: 85%; + display: flex; + align-items: center; + justify-content: center; + text-align: center; +} +.text{ + background-color: rgb(254 226 226); + color: rgb(185 28 28); + padding: 1rem; +} \ No newline at end of file diff --git a/resident-ui/src/app/feature/error/error/error.component.html b/resident-ui/src/app/feature/error/error/error.component.html new file mode 100644 index 00000000..f679f48c --- /dev/null +++ b/resident-ui/src/app/feature/error/error/error.component.html @@ -0,0 +1,3 @@ +
+

{{longJson.sessionExpired}}, {{longJson.clickHere2}} {{longJson.clickHere}} {{longJson.login}}

+
\ No newline at end of file diff --git a/resident-ui/src/app/feature/error/error/error.component.ts b/resident-ui/src/app/feature/error/error/error.component.ts new file mode 100644 index 00000000..a5dca50f --- /dev/null +++ b/resident-ui/src/app/feature/error/error/error.component.ts @@ -0,0 +1,31 @@ +import { Component, OnInit } from '@angular/core'; +import { LoginRedirectService } from 'src/app/core/services/loginredirect.service'; +import { TranslateService } from '@ngx-translate/core'; + +@Component({ + selector: 'app-error', + templateUrl: './error.component.html', + styleUrls: ['./error.component.css'] +}) +export class ErrorComponent implements OnInit { + redirectUrl:string; + longJson:any; + constructor( + private redirectService: LoginRedirectService, + private translateService: TranslateService + ) { } + + ngOnInit() { + this.translateService + .getTranslation(localStorage.getItem("langCode")) + .subscribe(response => { + this.longJson = response.genericmessage; + console.log(this.longJson) + }); + let urlData = window.location.href.split('#', ) + this.redirectUrl = urlData[0] + "/#/" + "uinservices/dashboard" + } + login(){ + this.redirectService.redirect(this.redirectUrl); + } +} \ No newline at end of file