Skip to content

Commit

Permalink
Merge pull request mosip#785 from MadhuMosip/release-0.9.x
Browse files Browse the repository at this point in the history
MOSIP-37782 deleted copy_cm.sh and copy_secrets.sh from deploy and added  error component
  • Loading branch information
ckm007 authored Nov 25, 2024
2 parents a69ce00 + be1425e commit f35274c
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 46 deletions.
24 changes: 0 additions & 24 deletions deploy/copy_cm.sh

This file was deleted.

22 changes: 0 additions & 22 deletions deploy/copy_secrets.sh

This file was deleted.

13 changes: 13 additions & 0 deletions resident-ui/src/app/feature/error/error-routing.module.ts
Original file line number Diff line number Diff line change
@@ -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 { }
14 changes: 14 additions & 0 deletions resident-ui/src/app/feature/error/error.module.ts
Original file line number Diff line number Diff line change
@@ -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 { }
12 changes: 12 additions & 0 deletions resident-ui/src/app/feature/error/error/error.component.css
Original file line number Diff line number Diff line change
@@ -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;
}
3 changes: 3 additions & 0 deletions resident-ui/src/app/feature/error/error/error.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div class="main-container" *ngIf="longJson">
<p class="text">{{longJson.sessionExpired}}, {{longJson.clickHere2}} <span class="navigate-link" (click)="login()">{{longJson.clickHere}}</span> {{longJson.login}}</p>
</div>
31 changes: 31 additions & 0 deletions resident-ui/src/app/feature/error/error/error.component.ts
Original file line number Diff line number Diff line change
@@ -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);
}
}

0 comments on commit f35274c

Please sign in to comment.