From 303b7fbeacf8ea04d6550c18b41ca01bb87b218c Mon Sep 17 00:00:00 2001 From: Chaitrali R Date: Wed, 9 Aug 2023 16:21:53 +0530 Subject: [PATCH 1/2] Form error changes --- donor-registry/src/app/forms/forms.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/donor-registry/src/app/forms/forms.component.ts b/donor-registry/src/app/forms/forms.component.ts index 74f18649..4ad09518 100644 --- a/donor-registry/src/app/forms/forms.component.ts +++ b/donor-registry/src/app/forms/forms.component.ts @@ -2433,7 +2433,7 @@ export class FormsComponent implements OnInit { }, (err) => { - if(err.code == "2" && err.preventThirdParty == "true") + if(err.code == "2" && err.preventThirdParty == true) { checkESignStatus = false; this.toastMsg.error("Error", err.errors); @@ -2588,7 +2588,7 @@ export class FormsComponent implements OnInit { console.log(res) }, (err) => { - if(err.code == "2" && err.preventThirdParty == "true") + if(err.code == "2" && err.preventThirdParty == true) { checkESignStatus = false; this.toastMsg.error("Error", err.errors); From df3b6831783c01482a30d62f2a487234ad913c1f Mon Sep 17 00:00:00 2001 From: Pratiksha khandagale Date: Wed, 9 Aug 2023 16:28:25 +0530 Subject: [PATCH 2/2] Update forms.component.ts --- .../src/app/forms/forms.component.ts | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/donor-registry/src/app/forms/forms.component.ts b/donor-registry/src/app/forms/forms.component.ts index c47ac766..926789db 100644 --- a/donor-registry/src/app/forms/forms.component.ts +++ b/donor-registry/src/app/forms/forms.component.ts @@ -2430,18 +2430,18 @@ export class FormsComponent implements OnInit { checkESignStatus = false; console.log(res) - }, (err) => { - if (err.code == "2") { - checkESignStatus = false; - this.toastMsg.error("Error", err.errors); - } else if (err.code == "3") { - if (err.preventThirdParty == true) { - checkESignStatus = false; - this.toastMsg.error("Error", err.message); - } - } - console.log(err); - }); + }, ({ error: err }) => { + if (err?.code === "2") { + checkESignStatus = false; + this.toastMsg.error("Error", err?.errors); + } else if (err.code === "3") { + if (err?.preventThirdParty === true) { + checkESignStatus = false; + this.toastMsg.error("Error", err?.message); + } + } + console.log(err); + }); } catch (e) { console.log(e) } @@ -2584,18 +2584,18 @@ export class FormsComponent implements OnInit { checkESignStatus = false; console.log(res) - }, (err) => { - if (err.code == "2") { - checkESignStatus = false; - this.toastMsg.error("Error", err.errors); - } else if (err.code == "3") { - if (err.preventThirdParty == true) { - checkESignStatus = false; - this.toastMsg.error("Error", err.message); - } - } - console.log(err) - }); + }, ({ error: err }) => { + if (err?.code === "2") { + checkESignStatus = false; + this.toastMsg.error("Error", err?.errors); + } else if (err.code === "3") { + if (err?.preventThirdParty === true) { + checkESignStatus = false; + this.toastMsg.error("Error", err?.message); + } + } + console.log(err); + }); } catch (e) { console.log(e) }