Fairoj : Link PD Disabled for COMPLETED AND QC COMPLETED status
This commit is contained in:
parent
10ac3230b7
commit
b1b9d6e431
@ -1,4 +1,4 @@
|
|||||||
<div class="relative">
|
<!-- <div class="relative">
|
||||||
<div class="form-bg">
|
<div class="form-bg">
|
||||||
<div class="relative error-wrapper">
|
<div class="relative error-wrapper">
|
||||||
<h1>
|
<h1>
|
||||||
@ -14,4 +14,27 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div> -->
|
||||||
|
|
||||||
|
<div class="relative">
|
||||||
|
<div class="form-bg">
|
||||||
|
|
||||||
|
|
||||||
|
<h3 class="page-title"><img src="assets/images/PD.jpeg" style="height: 50px;;"> <span> PD Genie </span>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="relative error-wrapper">
|
||||||
|
<h1>
|
||||||
|
Oops!</h1>
|
||||||
|
<span class="error-text">{{errorMsgObject.title}}</span>
|
||||||
|
<h2>
|
||||||
|
{{errorMsgObject.subtitle}}</h2>
|
||||||
|
<div class="error-details">
|
||||||
|
<p>{{errorMsgObject.message}}</p>
|
||||||
|
</div>
|
||||||
|
<div class="error-actions" *ngIf="errorMsgObject.is_homebtn">
|
||||||
|
<button class="mat-blue" mat-raised-button (click)="takeMeToHome()">Take me to Home</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
.form-bg {
|
||||||
|
//background-image:url('http://www.ssa.sineedge.com/beta/assets/images/login.jpg') !important;
|
||||||
|
//background-image: url(../../../assets/images/login_o.jpg);
|
||||||
|
//background-color: #F44336;
|
||||||
|
background: url(../../../assets/images/bg.png) repeat-x 0 0 #ffffff;
|
||||||
|
height: 100vh !important;
|
||||||
|
background-position: center !important;
|
||||||
|
// min-height: calc(90vh + 90px) !important;
|
||||||
|
}
|
||||||
@ -1,4 +1,6 @@
|
|||||||
import { Component, OnInit,ViewEncapsulation } from '@angular/core';
|
import { Component, OnInit,ViewEncapsulation } from '@angular/core';
|
||||||
|
import { Router } from '@angular/router';
|
||||||
|
import { LoaderService } from 'app/shared/loaderService/loader.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ms-error-404',
|
selector: 'ms-error-404',
|
||||||
@ -7,11 +9,24 @@ import { Component, OnInit,ViewEncapsulation } from '@angular/core';
|
|||||||
encapsulation: ViewEncapsulation.None
|
encapsulation: ViewEncapsulation.None
|
||||||
})
|
})
|
||||||
export class ErrorOneComponent implements OnInit {
|
export class ErrorOneComponent implements OnInit {
|
||||||
|
errorMsgObject: any;
|
||||||
|
|
||||||
constructor() {}
|
constructor(private router:Router, private loaderService:LoaderService) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
// this.errorMsgObject ={
|
||||||
|
// title:"404",
|
||||||
|
// subtitle:'Not Found',
|
||||||
|
// message:'The requested URL is not found on the server',
|
||||||
|
// is_homebtn:false
|
||||||
|
// }
|
||||||
|
this.errorMsgObject = this.loaderService.errorMsg
|
||||||
|
|
||||||
|
console.log(this.errorMsgObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
takeMeToHome() {
|
||||||
|
this.router.navigate(['/home']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -23,6 +23,7 @@ import { EmployerInfoComponent } from '../pd-questions/employer-info/employer-in
|
|||||||
import { InputDialogComponent } from '../input-dialog/input-dialog.component';
|
import { InputDialogComponent } from '../input-dialog/input-dialog.component';
|
||||||
import { PdCompleteStatusDialogueComponent } from '../pd-complete-status-dialogue/pd-complete-status-dialogue.component';
|
import { PdCompleteStatusDialogueComponent } from '../pd-complete-status-dialogue/pd-complete-status-dialogue.component';
|
||||||
import { CognitoService } from 'app/AwsService/cognito.service';
|
import { CognitoService } from 'app/AwsService/cognito.service';
|
||||||
|
import { LoaderService } from 'app/shared/loaderService/loader.service';
|
||||||
|
|
||||||
const currentdate = new Date().toJSON().slice(0,19);
|
const currentdate = new Date().toJSON().slice(0,19);
|
||||||
@Component({
|
@Component({
|
||||||
@ -104,7 +105,8 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
masterRandomString: any;
|
masterRandomString: any;
|
||||||
is_from_link: boolean = false;
|
is_from_link: boolean = false;
|
||||||
constructor(notifier: NotifierService, private dialog: MatDialog, private _fb: FormBuilder, private changeRef:ChangeDetectorRef,
|
constructor(notifier: NotifierService, private dialog: MatDialog, private _fb: FormBuilder, private changeRef:ChangeDetectorRef,
|
||||||
private _pd: PdTrigerService, private route: ActivatedRoute, private router: Router, private ListPdComponent: ListPdComponent,private cognitoService:CognitoService) {
|
private _pd: PdTrigerService, private route: ActivatedRoute, private router: Router, private ListPdComponent: ListPdComponent,private cognitoService:CognitoService,
|
||||||
|
private loaderService:LoaderService) {
|
||||||
this.notifier = notifier;
|
this.notifier = notifier;
|
||||||
this.enableStartPD = false;
|
this.enableStartPD = false;
|
||||||
this.roleAccessDetails=this._pd.getRoleAccessDetails();
|
this.roleAccessDetails=this._pd.getRoleAccessDetails();
|
||||||
@ -137,7 +139,9 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
console.log("view pd ",this.viewID)
|
console.log("view pd ",this.viewID)
|
||||||
if(this.viewID == 'undefined'){
|
if(this.viewID == 'undefined'){
|
||||||
this.router.navigate(['/error'])
|
let msgObj ={title:'',subtitle: 'Invalid Link',is_homebtn:false,message:'The requested url is Invalid. Please contact info@pdgenie.com'}
|
||||||
|
this.loaderService.setErrorMsg({title:msgObj.title,subtitle:msgObj.subtitle,is_homebtn:false,message:msgObj.message})
|
||||||
|
this.router.navigate(['/error'],{replaceUrl:true})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -154,6 +158,12 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
let masterData: any = data.records.pd_master_details;
|
let masterData: any = data.records.pd_master_details;
|
||||||
this.pdMasterData.push(masterData[0]);
|
this.pdMasterData.push(masterData[0]);
|
||||||
|
console.log("sdffff",this.is_from_link,this.pdMasterData[0].pd_status)
|
||||||
|
if(this.is_from_link &&( this.pdMasterData[0].vendor_status == 'COMPLETED' || this.pdMasterData[0].vendor_status == 'QC_COMPLETED')) {
|
||||||
|
let msgObj ={title:'',subtitle: 'Invalid Link',is_homebtn:false,message:'The requested url is Invalid. Please contact info@pdgenie.com'}
|
||||||
|
this.loaderService.setErrorMsg({title:msgObj.title,subtitle:msgObj.subtitle,is_homebtn:false,message:msgObj.message})
|
||||||
|
this.router.navigate(['/error'],{replaceUrl:true})
|
||||||
|
}
|
||||||
this.mandatoryFieldsValidations = masterData[1].mandatory_fields;
|
this.mandatoryFieldsValidations = masterData[1].mandatory_fields;
|
||||||
this.pd_QC_Rating = Number(this.pdMasterData.qc_rating);
|
this.pd_QC_Rating = Number(this.pdMasterData.qc_rating);
|
||||||
this.pdApplicantData = data.records.applicants_details;
|
this.pdApplicantData = data.records.applicants_details;
|
||||||
|
|||||||
@ -5,6 +5,12 @@ import { ProgressSpineerDialogComponent } from '../progress-spineer-dialog/progr
|
|||||||
export interface LoaderState {
|
export interface LoaderState {
|
||||||
show: boolean;
|
show: boolean;
|
||||||
}
|
}
|
||||||
|
export interface errorMsgInterface {
|
||||||
|
title:string;
|
||||||
|
subtitle:string;
|
||||||
|
message:string;
|
||||||
|
is_homebtn:boolean
|
||||||
|
}
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
@ -12,7 +18,18 @@ export class LoaderService {
|
|||||||
private loaderSubject = new Subject<LoaderState>();
|
private loaderSubject = new Subject<LoaderState>();
|
||||||
loaderState = this.loaderSubject.asObservable();
|
loaderState = this.loaderSubject.asObservable();
|
||||||
spinnerdialogRef: MatDialogRef<ProgressSpineerDialogComponent>;
|
spinnerdialogRef: MatDialogRef<ProgressSpineerDialogComponent>;
|
||||||
constructor(private dialog:MatDialog) { }
|
errorMsg:errorMsgInterface;
|
||||||
|
constructor(private dialog:MatDialog) {
|
||||||
|
this.errorMsg ={
|
||||||
|
title:"404",
|
||||||
|
subtitle:'Not Found',
|
||||||
|
message:'The requested URL is not found on the server',
|
||||||
|
is_homebtn:false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
setErrorMsg(obj:errorMsgInterface) {
|
||||||
|
this.errorMsg = obj
|
||||||
|
}
|
||||||
show() {
|
show() {
|
||||||
this.loaderSubject.next(<LoaderState>{ show: true });
|
this.loaderSubject.next(<LoaderState>{ show: true });
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user