Skip to content

Commit

Permalink
MOSIP-32390: duplication fix
Browse files Browse the repository at this point in the history
Signed-off-by: SwethaKrish4 <[email protected]>
  • Loading branch information
SwethaKrish4 committed Apr 15, 2024
1 parent ad69297 commit 0a25058
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/app/core/components/dialog/dialog.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ export class DialogComponent implements OnInit {
const subs = this.dataService.submitReportForReview(submitRequest).subscribe(
(res: any) => {
const msg = "Unable to submit report for review. Try Again!";
this.getReportResponse(res, msg, true);
this.handleReportErrResponse(res, msg, true);
},
(errors) => {
Utils.showErrorMessage(this.resourceBundleJson, errors, this.dialog);
Expand All @@ -434,7 +434,7 @@ export class DialogComponent implements OnInit {
const subs = this.dataService.approvePartnerReport(this.input.partnerId, approveRequest).subscribe(
(res: any) => {
const msg = "Unable to approve report. Try Again!";
this.getReportResponse(res, msg, false);
this.handleReportErrResponse(res, msg, false);
},
(errors) => {
Utils.showErrorMessage(this.resourceBundleJson, errors, this.dialog);
Expand All @@ -457,7 +457,7 @@ export class DialogComponent implements OnInit {
const subs = this.dataService.rejectPartnerReport(this.input.partnerId, rejectRequest).subscribe(
(res: any) => {
const msg = "Unable to reject report. Try Again!";
this.getReportResponse(res, msg, false);
this.handleReportErrResponse(res, msg, false);
},
(errors) => {
Utils.showErrorMessage(this.resourceBundleJson, errors, this.dialog);
Expand All @@ -466,7 +466,7 @@ export class DialogComponent implements OnInit {
this.subscriptions.push(subs);
}

getReportResponse(res: any, msg: string, isSubmitForReview: boolean) {
handleReportErrResponse(res: any, msg: string, isSubmitForReview: boolean) {
this.dataLoaded = true;
if (res) {
if (res.errors && res.errors.length > 0) {
Expand Down

0 comments on commit 0a25058

Please sign in to comment.