diff --git a/src/app/Hospitals/login/login.component.ts b/src/app/Hospitals/login/login.component.ts
index ac073d3..208bf70 100644
--- a/src/app/Hospitals/login/login.component.ts
+++ b/src/app/Hospitals/login/login.component.ts
@@ -68,12 +68,16 @@ export class LoginComponent implements OnInit {
},
(Error) => {
this.err = Error.error.message;
- alert(this.err);
+ if(Error.error.status === 500){
+ this.err = "Incorrect Email Id or Password !";
+ }
+ alert(this.err);
+
Swal.fire({
icon: 'error',
title: 'Oops...',
- text: ('${this.err}'),
+ text: (`${this.err}`),
footer: 'Why do I have this issue?'
})
});
diff --git a/src/app/Patients/login-patient/login-patient.component.ts b/src/app/Patients/login-patient/login-patient.component.ts
index c7eb5b6..8aa29f2 100644
--- a/src/app/Patients/login-patient/login-patient.component.ts
+++ b/src/app/Patients/login-patient/login-patient.component.ts
@@ -18,6 +18,7 @@ export class LoginPatientComponent implements OnInit {
PLoginForm !: FormGroup;
id ! : number;
light ! : string;
+ err !: String;
fieldTextType: boolean = false;
constructor(private fb: FormBuilder, private patientServ : PatientService, private router : Router, private sharingService:SharingService) { }
@@ -71,8 +72,16 @@ export class LoginPatientComponent implements OnInit {
this.router.navigate(['patient-dashboard',this.id]);
},1000);
},
- (Error) =>{alert(Error.error.message)}
- );
+ (Error) =>{
+ this.err = "Incorrect Email Id or Password !";
+ alert(this.err);
+ Swal.fire({
+ icon: 'error',
+ title: 'Oops...',
+ text: (`${this.err}`),
+ footer: 'Why do I have this issue?'
+ })
+ });
this.PLoginForm.reset({
emailId: '',