Update dashboard table reports (#1653)

Co-authored-by: Jose Alberto Hernandez <alberto@MacBook-Pro.local>
This commit is contained in:
José Alberto Hernández
2023-01-21 23:24:49 -06:00
committed by GitHub
co-authored by Jose Alberto Hernandez
parent e61f4f92e3
commit 9ed38f0f7b
24 changed files with 58 additions and 57 deletions
@@ -3,7 +3,7 @@
<mat-card-header class="header"> <mat-card-header class="header">
<h3 fxFlex="100%"> <h3 fxFlex="100%">
<fa-icon icon="money-bill"></fa-icon> <fa-icon icon="money-bill"></fa-icon>
&nbsp;&nbsp; Amount Disbursed &nbsp;&nbsp; Amount Pending / Disbursed
<div> <div>
<mat-form-field id="office" fxFlex="94%"> <mat-form-field id="office" fxFlex="94%">
<mat-label>Office</mat-label> <mat-label>Office</mat-label>
@@ -24,7 +24,7 @@
</div> </div>
<div *ngIf="showFallback" class="fallback" fxLayoutAlign="center center"> <div *ngIf="showFallback" class="fallback" fxLayoutAlign="center center">
<p>No Data</p> <p>No Data</p>
</div> </div>
</mat-card-content> </mat-card-content>
</mat-card> </mat-card>
@@ -28,7 +28,7 @@ export class AmountDisbursedPieComponent implements OnInit {
/** Substitute for resolver */ /** Substitute for resolver */
hideOutput = true; hideOutput = true;
/** Shows fallback element */ /** Shows fallback element */
showFallback = false; showFallback = true;
/** /**
* Fetches offices data from `resolve`. * Fetches offices data from `resolve`.
+2 -2
View File
@@ -26,7 +26,7 @@ export class HomeService {
const httpParams = new HttpParams() const httpParams = new HttpParams()
.set('R_officeId', officeId.toString()) .set('R_officeId', officeId.toString())
.set('genericResultSet', 'false'); .set('genericResultSet', 'false');
return this.http.get('/runreports/Demand_Vs_Collection', { params: httpParams }); return this.http.get('/runreports/Demand Vs Collection', { params: httpParams });
} }
/** /**
@@ -37,7 +37,7 @@ export class HomeService {
const httpParams = new HttpParams() const httpParams = new HttpParams()
.set('R_officeId', officeId.toString()) .set('R_officeId', officeId.toString())
.set('genericResultSet', 'false'); .set('genericResultSet', 'false');
return this.http.get('/runreports/Disbursal_Vs_Awaitingdisbursal', { params: httpParams }); return this.http.get('/runreports/Disbursal Vs Awaitingdisbursal', { params: httpParams });
} }
/** /**
@@ -68,6 +68,8 @@ export class LoanActionButtonResolver implements Resolve<Object> {
return this.loansService.getLoanApprovalTemplate(loanId); return this.loansService.getLoanApprovalTemplate(loanId);
} else if (loanActionButton === 'Add Loan Charge') { } else if (loanActionButton === 'Add Loan Charge') {
return this.loansService.getLoanChargeTemplateResource(loanId); return this.loansService.getLoanChargeTemplateResource(loanId);
} else if (loanActionButton === 'Foreclosure') {
return this.loansService.getLoanForeclosureActionTemplate(loanId);
} else { } else {
return undefined; return undefined;
} }
@@ -149,7 +149,6 @@ export class CreateGlimAccountComponent implements OnInit {
const memberSelected = this.selectedMembers.selectedMembers; const memberSelected = this.selectedMembers.selectedMembers;
this.totalLoanAmount(); this.totalLoanAmount();
for (let index = 0; index < memberSelected.length; index++) { for (let index = 0; index < memberSelected.length; index++) {
console.log(memberSelected);
requestData.push({ requestData.push({
requestId: index.toString(), requestId: index.toString(),
method : 'POST', method : 'POST',
@@ -167,7 +166,6 @@ export class CreateGlimAccountComponent implements OnInit {
for (let index = 0; index < memberSelected.length; index++) { for (let index = 0; index < memberSelected.length; index++) {
total += memberSelected[index].principal; total += memberSelected[index].principal;
} }
console.log(total);
this.totalLoan = total; this.totalLoan = total;
} }
@@ -176,7 +174,6 @@ export class CreateGlimAccountComponent implements OnInit {
*/ */
submit() { submit() {
const data = this.buildRequestData(); const data = this.buildRequestData();
console.log(data);
this.loansService.createGlimAccount(data).subscribe((response: any) => { this.loansService.createGlimAccount(data).subscribe((response: any) => {
this.router.navigate(['../../../'], { relativeTo: this.route }); this.router.navigate(['../../../'], { relativeTo: this.route });
}); });
@@ -46,7 +46,6 @@ export class DisburseToSavingsAccountComponent implements OnInit {
* Set Disbursement Loan form. * Set Disbursement Loan form.
*/ */
setDisbursementToSavingsForm() { setDisbursementToSavingsForm() {
console.log(this.dataObject);
this.disbursementForm = this.formBuilder.group({ this.disbursementForm = this.formBuilder.group({
'actualDisbursementDate': [new Date(), Validators.required], 'actualDisbursementDate': [new Date(), Validators.required],
'transactionAmount': [this.dataObject.amount, Validators.required], 'transactionAmount': [this.dataObject.amount, Validators.required],
@@ -21,17 +21,17 @@
<mat-form-field> <mat-form-field>
<mat-label>Principal</mat-label> <mat-label>Principal</mat-label>
<input matInput required formControlName="outstandingPrincipalPortion"> <input matInput formControlName="outstandingPrincipalPortion">
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
<mat-label>Interest</mat-label> <mat-label>Interest</mat-label>
<input matInput required formControlName="outstandingInterestPortion"> <input matInput formControlName="outstandingInterestPortion">
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
<mat-label>Fee Amount</mat-label> <mat-label>Fee Amount</mat-label>
<input matInput required formControlName="outstandingFeeChargesPortion"> <input matInput formControlName="outstandingFeeChargesPortion">
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
@@ -1,4 +1,4 @@
import { Component, OnInit } from '@angular/core'; import { Component, Input, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { LoansService } from 'app/loans/loans.service'; import { LoansService } from 'app/loans/loans.service';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
@@ -13,6 +13,8 @@ import { Dates } from 'app/core/utils/dates';
styleUrls: ['./foreclosure.component.scss'] styleUrls: ['./foreclosure.component.scss']
}) })
export class ForeclosureComponent implements OnInit { export class ForeclosureComponent implements OnInit {
@Input() dataObject: any;
loanId: any; loanId: any;
foreclosureForm: FormGroup; foreclosureForm: FormGroup;
/** Minimum Date allowed. */ /** Minimum Date allowed. */
@@ -20,7 +22,6 @@ export class ForeclosureComponent implements OnInit {
/** Maximum Date allowed. */ /** Maximum Date allowed. */
maxDate = new Date(); maxDate = new Date();
foreclosuredata: any; foreclosuredata: any;
paymentTypes: any;
/** /**
* @param {FormBuilder} formBuilder Form Builder. * @param {FormBuilder} formBuilder Form Builder.
@@ -46,14 +47,13 @@ export class ForeclosureComponent implements OnInit {
createforeclosureForm() { createforeclosureForm() {
this.foreclosureForm = this.formBuilder.group({ this.foreclosureForm = this.formBuilder.group({
'transactionDate': [new Date(), Validators.required], 'transactionDate': [this.dataObject.date && new Date(this.dataObject.date), Validators.required],
'outstandingPrincipalPortion': [{value: '', disabled: true}], 'outstandingPrincipalPortion': [{value: this.dataObject.principalPortion || 0, disabled: true}],
'outstandingInterestPortion': [{value: '', disabled: true}], 'outstandingInterestPortion': [{value: this.dataObject.interestPortion || 0, disabled: true}],
'outstandingFeeChargesPortion': [{value: '', disabled: true}], 'outstandingFeeChargesPortion': [{value: this.dataObject.feeChargesPortion || 0, disabled: true}],
'outstandingPenaltyChargesPortion': [{value: '', disabled: true}], 'outstandingPenaltyChargesPortion': [{value: this.dataObject.penaltyChargesPortion || 0, disabled: true}],
'transactionAmount': [{value: '', disabled: true}], 'transactionAmount': [{value: this.dataObject.amount, disabled: true}],
'interestAccruedAfterDeath': '', 'note': ['', Validators.required]
'note': ''
}); });
} }
@@ -82,26 +82,7 @@ export class ForeclosureComponent implements OnInit {
outstandingInterestPortion: this.foreclosuredata.interestPortion, outstandingInterestPortion: this.foreclosuredata.interestPortion,
outstandingFeeChargesPortion: this.foreclosuredata.feeChargesPortion, outstandingFeeChargesPortion: this.foreclosuredata.feeChargesPortion,
outstandingPenaltyChargesPortion: this.foreclosuredata.penaltyChargesPortion, outstandingPenaltyChargesPortion: this.foreclosuredata.penaltyChargesPortion,
foreClosureChargesPortion: this.foreclosuredata.foreClosureChargesPortion
}); });
if (this.foreclosuredata.unrecognizedIncomePortion) {
this.foreclosureForm.patchValue({
interestAccruedAfterDeath: this.foreclosuredata.unrecognizedIncomePortion
});
}
this.calculateTransactionAmount();
this.paymentTypes = this.foreclosuredata.paymentTypeOptions;
});
}
calculateTransactionAmount() {
let transactionAmount = 0;
transactionAmount += parseFloat(this.foreclosuredata.principalPortion);
transactionAmount += parseFloat(this.foreclosuredata.interestPortion);
transactionAmount += parseFloat(this.foreclosuredata.feeChargesPortion);
transactionAmount += parseFloat(this.foreclosuredata.penaltyChargesPortion);
this.foreclosureForm.patchValue({
transactionAmount: transactionAmount
}); });
} }
@@ -1,7 +1,7 @@
<mifosx-loans-account-close [dataObject]="actionButtonData" *ngIf="actions['Close']"></mifosx-loans-account-close> <mifosx-loans-account-close [dataObject]="actionButtonData" *ngIf="actions['Close']"></mifosx-loans-account-close>
<mifosx-undo-approval *ngIf="actions['Undo Approval']"></mifosx-undo-approval> <mifosx-undo-approval *ngIf="actions['Undo Approval']"></mifosx-undo-approval>
<mifosx-assign-loan-officer *ngIf="actions['Assign Loan Officer']" [dataObject]="actionButtonData" ></mifosx-assign-loan-officer> <mifosx-assign-loan-officer *ngIf="actions['Assign Loan Officer']" [dataObject]="actionButtonData" ></mifosx-assign-loan-officer>
<mifosx-foreclosure *ngIf="actions['Foreclosure']"></mifosx-foreclosure> <mifosx-foreclosure [dataObject]="actionButtonData" *ngIf="actions['Foreclosure']"></mifosx-foreclosure>
<mifosx-prepay-loan [dataObject]="actionButtonData" *ngIf="actions['Prepay Loan']"></mifosx-prepay-loan> <mifosx-prepay-loan [dataObject]="actionButtonData" *ngIf="actions['Prepay Loan']"></mifosx-prepay-loan>
<mifosx-make-repayment [dataObject]="actionButtonData" *ngIf="actions['Make Repayment']"></mifosx-make-repayment> <mifosx-make-repayment [dataObject]="actionButtonData" *ngIf="actions['Make Repayment']"></mifosx-make-repayment>
<mifosx-make-repayment [dataObject]="actionButtonData" *ngIf="actions['Goodwill Credit']"></mifosx-make-repayment> <mifosx-make-repayment [dataObject]="actionButtonData" *ngIf="actions['Goodwill Credit']"></mifosx-make-repayment>
@@ -79,7 +79,7 @@ export class WithdrawnByClientComponent implements OnInit {
}; };
this.loanService.loanActionButtons(this.loanId, 'withdrawnByApplicant', data) this.loanService.loanActionButtons(this.loanId, 'withdrawnByApplicant', data)
.subscribe((response: any) => { .subscribe((response: any) => {
this.router.navigate(['../../../general'], { relativeTo: this.route }); this.router.navigate(['../../general'], { relativeTo: this.route });
}); });
} }
@@ -79,7 +79,7 @@ export class WriteOffPageComponent implements OnInit {
const loanId = this.route.parent.snapshot.params['loanId']; const loanId = this.route.parent.snapshot.params['loanId'];
delete data.amount; delete data.amount;
this.loanService.submitLoanActionButton(loanId, data, 'writeoff').subscribe((response: any) => { this.loanService.submitLoanActionButton(loanId, data, 'writeoff').subscribe((response: any) => {
this.router.navigate(['../../../general'], {relativeTo: this.route}); this.router.navigate(['../../general'], {relativeTo: this.route});
}); });
} }
@@ -12,6 +12,7 @@ import { LoansAccountButtonConfiguration } from './loan-accounts-button-config';
/** Dialog Components */ /** Dialog Components */
import { ConfirmationDialogComponent } from '../../shared/confirmation-dialog/confirmation-dialog.component'; import { ConfirmationDialogComponent } from '../../shared/confirmation-dialog/confirmation-dialog.component';
import { DeleteDialogComponent } from 'app/shared/delete-dialog/delete-dialog.component'; import { DeleteDialogComponent } from 'app/shared/delete-dialog/delete-dialog.component';
import { LoanStatus } from '../models/loan-status.nodel';
@Component({ @Component({
selector: 'mifosx-loans-view', selector: 'mifosx-loans-view',
@@ -38,6 +39,8 @@ export class LoansViewComponent implements OnInit {
/** Disburse Transaction number */ /** Disburse Transaction number */
disburseTransactionNo = 0; disburseTransactionNo = 0;
loanStatus: LoanStatus;
constructor(private route: ActivatedRoute, constructor(private route: ActivatedRoute,
private router: Router, private router: Router,
public loansService: LoansService, public loansService: LoansService,
@@ -45,6 +48,8 @@ export class LoansViewComponent implements OnInit {
this.route.data.subscribe((data: { loanDetailsData: any, loanDatatables: any}) => { this.route.data.subscribe((data: { loanDetailsData: any, loanDatatables: any}) => {
this.loanDetailsData = data.loanDetailsData; this.loanDetailsData = data.loanDetailsData;
this.loanDatatables = data.loanDatatables; this.loanDatatables = data.loanDatatables;
this.loanStatus = this.loanDetailsData.status;
console.log(this.loanStatus);
}); });
this.loanId = this.route.snapshot.params['loanId']; this.loanId = this.route.snapshot.params['loanId'];
this.clientId = this.loanDetailsData.clientId; this.clientId = this.loanDetailsData.clientId;
@@ -1,8 +1,9 @@
import { Component, OnInit } from '@angular/core'; import { Component, Input, OnInit } from '@angular/core';
import { MatDialog } from '@angular/material/dialog'; import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { Dates } from 'app/core/utils/dates'; import { Dates } from 'app/core/utils/dates';
import { LoansService } from 'app/loans/loans.service'; import { LoansService } from 'app/loans/loans.service';
import { LoanStatus } from 'app/loans/models/loan-status.nodel';
import { SettingsService } from 'app/settings/settings.service'; import { SettingsService } from 'app/settings/settings.service';
import { ConfirmationDialogComponent } from 'app/shared/confirmation-dialog/confirmation-dialog.component'; import { ConfirmationDialogComponent } from 'app/shared/confirmation-dialog/confirmation-dialog.component';
@@ -12,6 +13,7 @@ import { ConfirmationDialogComponent } from 'app/shared/confirmation-dialog/conf
styleUrls: ['./reschedule-loan-tab.component.scss'] styleUrls: ['./reschedule-loan-tab.component.scss']
}) })
export class RescheduleLoanTabComponent implements OnInit { export class RescheduleLoanTabComponent implements OnInit {
@Input() loanStatus: LoanStatus;
loanRescheduleData: any; loanRescheduleData: any;
loanRescheduleDataColumns: string[] = ['id', 'rescheduleFromDate', 'reason', 'status', 'actions']; loanRescheduleDataColumns: string[] = ['id', 'rescheduleFromDate', 'reason', 'status', 'actions'];
+11
View File
@@ -5,6 +5,7 @@ import { HttpClient, HttpParams } from '@angular/common/http';
/** rxjs Imports */ /** rxjs Imports */
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { Dates } from 'app/core/utils/dates'; import { Dates } from 'app/core/utils/dates';
import { SettingsService } from 'app/settings/settings.service';
/** /**
* Loans service. * Loans service.
@@ -14,6 +15,7 @@ import { Dates } from 'app/core/utils/dates';
}) })
export class LoansService { export class LoansService {
constructor(private http: HttpClient, constructor(private http: HttpClient,
private settingsService: SettingsService,
private dateUtils: Dates) { } private dateUtils: Dates) { }
/** /**
* @param {string} loanId loanId of the loan. * @param {string} loanId loanId of the loan.
@@ -28,6 +30,15 @@ export class LoansService {
return this.http.get(`/loans/${loanId}/transactions/template`, { params: httpParams }); return this.http.get(`/loans/${loanId}/transactions/template`, { params: httpParams });
} }
getLoanForeclosureActionTemplate(loanId: string): Observable<any> {
const httpParams = new HttpParams()
.set('command', 'foreclosure')
.set('locale', this.settingsService.language.code)
.set('dateFormat', this.settingsService.dateFormat)
.set('transactionDate', this.dateUtils.formatDate(this.settingsService.businessDate, this.settingsService.dateFormat))
return this.http.get(`/loans/${loanId}/transactions/template`, { params: httpParams });
}
getLoanAccountResource(loanId: string, associations: string): Observable<any> { getLoanAccountResource(loanId: string, associations: string): Observable<any> {
const httpParams = new HttpParams().set('associations', associations); const httpParams = new HttpParams().set('associations', associations);
return this.http.get(`/loans/${loanId}`, { params: httpParams }); return this.http.get(`/loans/${loanId}`, { params: httpParams });
+14
View File
@@ -0,0 +1,14 @@
export interface LoanStatus {
id: number;
code: string;
value: string;
active: boolean;
closed: boolean;
closedObligationsMet: boolean;
closedRescheduled: boolean;
closedWrittenOff: boolean;
overpaid: boolean;
pendingApproval: boolean;
waitingForDisbursal: boolean;
}
@@ -13,7 +13,7 @@
<div *ngIf="bulkImport.formFields >= 1"> <div *ngIf="bulkImport.formFields >= 1">
<mat-form-field fxFlex> <mat-form-field fxFlex>
<mat-label>Office</mat-label> <mat-label>Office</mat-label>
<mat-select required formControlName="officeId"> <mat-select formControlName="officeId">
<mat-option *ngFor="let office of officeData" [value]="office.id"> <mat-option *ngFor="let office of officeData" [value]="office.id">
{{ office.name }} {{ office.name }}
</mat-option> </mat-option>
@@ -24,7 +24,7 @@
<div *ngIf="bulkImport.formFields >= 2"> <div *ngIf="bulkImport.formFields >= 2">
<mat-form-field fxFlex> <mat-form-field fxFlex>
<mat-label>Staff</mat-label> <mat-label>Staff</mat-label>
<mat-select required formControlName="staffId"> <mat-select formControlName="staffId">
<mat-option *ngFor="let staff of staffData" [value]="staff.id"> <mat-option *ngFor="let staff of staffData" [value]="staff.id">
{{ staff.displayName }} {{ staff.displayName }}
</mat-option> </mat-option>
@@ -89,7 +89,6 @@ export class BulkLoanReassignmnetComponent implements OnInit {
*/ */
getFromOfficers(officerId: any) { getFromOfficers(officerId: any) {
this.toLoanOfficers = this.fromLoanOfficers.filter((officer: any) => officer.id !== officerId ); this.toLoanOfficers = this.fromLoanOfficers.filter((officer: any) => officer.id !== officerId );
console.log(this.toLoanOfficers);
this.organizationSevice.getOfficerTemplate(officerId, this.officeTemplate.id).subscribe((response: any) => { this.organizationSevice.getOfficerTemplate(officerId, this.officeTemplate.id).subscribe((response: any) => {
this.officerTemplate = response; this.officerTemplate = response;
}); });
@@ -143,7 +143,6 @@ export class CreateGsimAccountComponent implements OnInit {
const requestData = []; const requestData = [];
const memberSelected = this.selectedMembers.selectedMembers; const memberSelected = this.selectedMembers.selectedMembers;
for (let index = 0; index < 1; index++) { for (let index = 0; index < 1; index++) {
console.log(index);
requestData.push( requestData.push(
this.setData( memberSelected[ index ] ), this.setData( memberSelected[ index ] ),
); );
@@ -39,7 +39,6 @@ export class GsimAccountComponent implements OnInit {
this.gsimOverviewData = data.gsimData[0].childGSIMAccounts; this.gsimOverviewData = data.gsimData[0].childGSIMAccounts;
this.savingAccountData = data.savingAccountData; this.savingAccountData = data.savingAccountData;
this.groupsData = data.groupsData; this.groupsData = data.groupsData;
console.log(data);
}); });
} }
@@ -52,8 +51,6 @@ export class GsimAccountComponent implements OnInit {
*/ */
setLoanClientChargeOverview() { setLoanClientChargeOverview() {
this.dataSource = new MatTableDataSource(this.gsimOverviewData); this.dataSource = new MatTableDataSource(this.gsimOverviewData);
console.log(this.dataSource);
console.log(this.gsimOverviewData);
// this.dataSource.paginator = this.paginator; // this.dataSource.paginator = this.paginator;
} }
@@ -46,7 +46,6 @@ export class ViewTransactionComponent {
this.route.data.subscribe((data: { savingsAccountTransaction: any }) => { this.route.data.subscribe((data: { savingsAccountTransaction: any }) => {
this.accountId = this.route.parent.snapshot.params['savingAccountId']; this.accountId = this.route.parent.snapshot.params['savingAccountId'];
this.transactionData = data.savingsAccountTransaction; this.transactionData = data.savingsAccountTransaction;
console.log(this.transactionData);
}); });
} }
@@ -35,7 +35,6 @@ export class ViewHistorySchedulerJobComponent implements OnInit {
private router: Router ) { private router: Router ) {
this.route.data.subscribe(( data: { jobsSchedulerHistory: any }) => { this.route.data.subscribe(( data: { jobsSchedulerHistory: any }) => {
this.jobHistoryData = data.jobsSchedulerHistory; this.jobHistoryData = data.jobsSchedulerHistory;
console.log(this.jobHistoryData);
}); });
} }
@@ -194,7 +194,6 @@ export class EditReportComponent implements OnInit {
* if successful redirects to view updated report. * if successful redirects to view updated report.
*/ */
submit() { submit() {
console.log(this.reportParametersData);
if (this.reportData.coreReport) { if (this.reportData.coreReport) {
this.reportForm.value.reportParameters = undefined; this.reportForm.value.reportParameters = undefined;
} else { } else {
@@ -191,7 +191,6 @@ export class EditSurveyComponent implements OnInit {
updateSequenceNumber() { updateSequenceNumber() {
for (let questionIndex = 0; questionIndex < this.questionDatas.length; questionIndex++) { for (let questionIndex = 0; questionIndex < this.questionDatas.length; questionIndex++) {
this.questionDatas.at(questionIndex).get('sequenceNo').setValue(questionIndex + 1); this.questionDatas.at(questionIndex).get('sequenceNo').setValue(questionIndex + 1);
console.log(this.questionDatas);
for (let responseIndex = 0; responseIndex < this.getResponseDatas(questionIndex).length; responseIndex++) { for (let responseIndex = 0; responseIndex < this.getResponseDatas(questionIndex).length; responseIndex++) {
this.getResponseDatas(questionIndex).at(responseIndex).get('sequenceNo').setValue(responseIndex + 1); this.getResponseDatas(questionIndex).at(responseIndex).get('sequenceNo').setValue(responseIndex + 1);
} }
@@ -109,7 +109,6 @@ export class LoanDisbursalComponent {
this.batchRequests.push(batchData); this.batchRequests.push(batchData);
}); });
this.tasksService.submitBatchData(this.batchRequests).subscribe((response: any) => { this.tasksService.submitBatchData(this.batchRequests).subscribe((response: any) => {
console.log(response);
response.forEach((responseEle: any) => { response.forEach((responseEle: any) => {
if (responseEle.statusCode = '200') { if (responseEle.statusCode = '200') {
approvedAccounts++; approvedAccounts++;