build: Replace Codelyzer and TSLint with Angular ESLint
Migrate from the deprecated TSLint to Angluar ESLint. Also fix current linting issues in the code, in particular: - Use strict equals operators (=== and !==) - Remove empty lifecycle methods (mostly ngOnInit) - Output bindings including aliases should not be named as standard dom events (submit) - Async pipe results should not be negated
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="50%">{{"labels.inputs.Repayments" | translate}}</span>
|
||||
<span fxFlex="50%">{{loanDetails.numberOfRepayments}} every {{loanDetails.repaymentEvery}} {{loanDetails.repaymentFrequencyType.value | translateKey:'catalogs' }}
|
||||
<span *ngIf="loanDetails.repaymentFrequencyType?.id == 2 && loanDetails.repaymentFrequencyNthDayType?.id != 0 && loanDetails.repaymentFrequencyDayOfWeekType?.id != 0" class="m-l-10">
|
||||
<span *ngIf="loanDetails.repaymentFrequencyType?.id === 2 && loanDetails.repaymentFrequencyNthDayType?.id !== 0 && loanDetails.repaymentFrequencyDayOfWeekType?.id !== 0" class="m-l-10">
|
||||
<span *ngIf="loanDetails.repaymentFrequencyDayOfWeekType">
|
||||
<span class="m-l-10">{{"labels.commons.on" | translate}}</span>{{loanDetails.repaymentFrequencyNthDayType?.value}}
|
||||
<span class="m-l-10">{{loanDetails.repaymentFrequencyDayOfWeekType?.value | translateKey:'catalogs' }}</span>
|
||||
@@ -166,7 +166,7 @@
|
||||
<span fxFlex="50%"> {{loanDetails.interestRecalculationData.calendarData.humanReadable}} </span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill *ngIf="loanDetails.isInterestRecalculationEnabled && loanDetails.interestRecalculationData.interestRecalculationCompoundingType.id !=0">
|
||||
<div fxFlexFill *ngIf="loanDetails.isInterestRecalculationEnabled && loanDetails.interestRecalculationData.interestRecalculationCompoundingType.id !== 0">
|
||||
<span fxFlex="50%"> {{"labels.inputs.Frequency for compounding" | translate}}</span>
|
||||
<span fxFlex="50%"> {{loanDetails.interestRecalculationData.compoundingCalendarData.humanReadable}} </span>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
@@ -6,7 +6,7 @@ import { ActivatedRoute } from '@angular/router';
|
||||
templateUrl: './account-details.component.html',
|
||||
styleUrls: ['./account-details.component.scss']
|
||||
})
|
||||
export class AccountDetailsComponent implements OnInit {
|
||||
export class AccountDetailsComponent {
|
||||
|
||||
loanDetails: any;
|
||||
dataObject: {
|
||||
@@ -20,7 +20,4 @@ export class AccountDetailsComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -79,12 +79,12 @@
|
||||
</button>
|
||||
</span>
|
||||
<button class="account-action-button" mat-raised-button color="accent" matTooltip="{{ 'tooltips.Adjust Charge' | translate}}"
|
||||
*ngIf="!charge.paid && status=='Active'"
|
||||
*ngIf="!charge.paid && status==='Active'"
|
||||
(click)="routeEdit($event); adjustCharge(charge.id)">
|
||||
<i class="fa fa-pencil"></i>
|
||||
</button>
|
||||
<button class="account-action-button" mat-raised-button color="primary" matTooltip="{{ 'tooltips.Pay Charge' | translate}}"
|
||||
*ngIf="charge.chargePayable && !charge.paid && status=='Active'"
|
||||
*ngIf="charge.chargePayable && !charge.paid && status==='Active'"
|
||||
(click)="routeEdit($event); payCharge(charge.id)">
|
||||
<i class="fa fa-dollar"></i>
|
||||
</button>
|
||||
|
||||
+2
-6
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, Input, OnDestroy } from '@angular/core';
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, UntypedFormControl } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
@@ -17,7 +17,7 @@ import { Currency } from 'app/shared/models/general.model';
|
||||
templateUrl: './make-repayment.component.html',
|
||||
styleUrls: ['./make-repayment.component.scss']
|
||||
})
|
||||
export class MakeRepaymentComponent implements OnInit, OnDestroy {
|
||||
export class MakeRepaymentComponent implements OnInit {
|
||||
|
||||
@Input() dataObject: any;
|
||||
/** Loan Id */
|
||||
@@ -63,10 +63,6 @@ export class MakeRepaymentComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the create close form.
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, Input, OnDestroy } from '@angular/core';
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, UntypedFormControl } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
@@ -18,7 +18,7 @@ import { Currency } from 'app/shared/models/general.model';
|
||||
templateUrl: './prepay-loan.component.html',
|
||||
styleUrls: ['./prepay-loan.component.scss']
|
||||
})
|
||||
export class PrepayLoanComponent implements OnInit, OnDestroy {
|
||||
export class PrepayLoanComponent implements OnInit {
|
||||
|
||||
@Input() dataObject: any;
|
||||
/** Loan Id */
|
||||
@@ -71,9 +71,6 @@ export class PrepayLoanComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the prepay loan form.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -161,7 +161,7 @@
|
||||
<fa-icon icon="eye" class="m-r-10"></fa-icon>
|
||||
</button>
|
||||
<button mat-raised-button class="account-action-button" color="primary"
|
||||
*ngIf="guarantor.status && guarantor.guarantorType.id == 3 && guarantor.id">
|
||||
*ngIf="guarantor.status && guarantor.guarantorType.id === 3 && guarantor.id">
|
||||
<fa-icon icon="edit" class="m-r-10"></fa-icon>
|
||||
</button>
|
||||
<span *ngIf="guarantor.status">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
/** Custom Services */
|
||||
@@ -15,7 +15,7 @@ import { SettingsService } from 'app/settings/settings.service';
|
||||
templateUrl: './loan-documents-tab.component.html',
|
||||
styleUrls: ['./loan-documents-tab.component.scss']
|
||||
})
|
||||
export class LoanDocumentsTabComponent implements OnInit {
|
||||
export class LoanDocumentsTabComponent {
|
||||
|
||||
/** Stores the resolved loan documents data */
|
||||
entityDocuments: any;
|
||||
@@ -37,8 +37,6 @@ export class LoanDocumentsTabComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() { }
|
||||
|
||||
getLoanDocumentsData(data: any) {
|
||||
data.forEach((ele: any) => {
|
||||
ele.docUrl = this.settingsService.serverUrl + '/loans/' + ele.parentEntityId + '/documents/' + ele.id + '/attachment?tenantIdentifier=' + environment.fineractPlatformTenantId;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<span class="m-r-10">{{'labels.text.' + entityType | translate}} {{"labels.inputs.name" | translate}} :</span> {{loanDetailsData.clientName ||
|
||||
loanDetailsData.groupName}}<span class="m-l-5">({{loanDetailsData.clientAccountNo}})</span><br />
|
||||
</span>
|
||||
<div *ngIf="loanDisplayArrearsDelinquency != 1">
|
||||
<div *ngIf="loanDisplayArrearsDelinquency !== 1">
|
||||
<table class="account-overview">
|
||||
<tbody>
|
||||
<tr *ngIf="loanDetailsData.delinquencyRange">
|
||||
@@ -43,7 +43,7 @@
|
||||
<td>{{loanDetailsData?.delinquent.pastDueDays | formatNumber }}</td>
|
||||
</tr>
|
||||
<tr *ngIf="loanDetailsData.delinquent && loanDetailsData.delinquent.delinquentDays > 0
|
||||
&& loanDetailsData.delinquent.pastDueDays != loanDetailsData.delinquent.delinquentDays">
|
||||
&& loanDetailsData.delinquent.pastDueDays !== loanDetailsData.delinquent.delinquentDays">
|
||||
<td>{{"labels.inputs.Delinquent Days" | translate}} :</td>
|
||||
<td>{{loanDetailsData?.delinquent.delinquentDays | formatNumber }}</td>
|
||||
</tr>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
/** Custom Components */
|
||||
@@ -12,7 +12,7 @@ import { AuthenticationService } from '../../../core/authentication/authenticati
|
||||
templateUrl: './notes-tab.component.html',
|
||||
styleUrls: ['./notes-tab.component.scss']
|
||||
})
|
||||
export class NotesTabComponent implements OnInit {
|
||||
export class NotesTabComponent {
|
||||
|
||||
entityId: string;
|
||||
username: string;
|
||||
@@ -29,8 +29,6 @@ export class NotesTabComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() { }
|
||||
|
||||
addNote(noteContent: any) {
|
||||
this.loansService.createLoanNote(this.entityId, noteContent).subscribe((response: any) => {
|
||||
this.entityNotes.push({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
@@ -13,7 +13,7 @@ import { ConfirmationDialogComponent } from 'app/shared/confirmation-dialog/conf
|
||||
templateUrl: './reschedule-loan-tab.component.html',
|
||||
styleUrls: ['./reschedule-loan-tab.component.scss']
|
||||
})
|
||||
export class RescheduleLoanTabComponent implements OnInit {
|
||||
export class RescheduleLoanTabComponent {
|
||||
@Input() loanStatus: LoanStatus;
|
||||
|
||||
loanRescheduleData: any;
|
||||
@@ -33,9 +33,6 @@ export class RescheduleLoanTabComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
manageRequest(request: any, command: string): void {
|
||||
const approveLoanRescheduleDialogRef = this.dialog.open(ConfirmationDialogComponent, {
|
||||
data: { heading: `${command}` + this.translateService.instant('labels.heading.Loan Reschedule'), dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want') + `${command}` + this.translateService.instant('labels.dialogContext.the Loan Reschedule') + `${request.id}` }
|
||||
|
||||
+2
-2
@@ -23,8 +23,8 @@
|
||||
<ng-container matColumnDef="beneficiary">
|
||||
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Beneficiary" | translate}} </th>
|
||||
<td mat-cell *matCellDef="let instruction">
|
||||
<span *ngIf="instruction.fromClient.id != instruction.toClient.id"> {{instruction.toClient.displayName}} </span>
|
||||
<span *ngIf="instruction.fromClient.id == instruction.toClient.id">{{"labels.inputs.Own Account" | translate}}</span>
|
||||
<span *ngIf="instruction.fromClient.id !== instruction.toClient.id"> {{instruction.toClient.displayName}} </span>
|
||||
<span *ngIf="instruction.fromClient.id === instruction.toClient.id">{{"labels.inputs.Own Account" | translate}}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user