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:
Ralph Hopman
2024-11-08 09:37:08 +01:00
committed by Adam Saghy
parent e910679673
commit 9034ce2847
204 changed files with 2184 additions and 1173 deletions
@@ -95,12 +95,12 @@
* In shares case: Only for charge time type: SHARE_PURCHASE and SHARE_REDEEM and with charge calculation type as % amount only
-->
<mat-form-field fxFlex="48%"
*ngIf="(chargeForm.controls.chargeAppliesTo.value === 1 && (chargeForm.controls.chargeCalculationType.value === 2 || chargeForm.controls.chargeCalculationType.value === 3 || chargeForm.controls.chargeCalculationType.value === 4 || chargeForm.controls.chargeCalculationType.value==5)) || (chargeForm.controls.chargeAppliesTo.value === 2 && (chargeForm.controls.chargeTimeType.value === 16 || chargeForm.controls.chargeTimeType.value === 5)&&(chargeForm.controls.chargeCalculationType.value === 2)) || (chargeForm.controls.chargeAppliesTo.value === 4 && (chargeForm.controls.chargeTimeType.value==14 || chargeForm.controls.chargeTimeType.value==15) && chargeForm.controls.chargeCalculationType.value === 2)">
*ngIf="(chargeForm.controls.chargeAppliesTo.value === 1 && (chargeForm.controls.chargeCalculationType.value === 2 || chargeForm.controls.chargeCalculationType.value === 3 || chargeForm.controls.chargeCalculationType.value === 4 || chargeForm.controls.chargeCalculationType.value===5)) || (chargeForm.controls.chargeAppliesTo.value === 2 && (chargeForm.controls.chargeTimeType.value === 16 || chargeForm.controls.chargeTimeType.value === 5)&&(chargeForm.controls.chargeCalculationType.value === 2)) || (chargeForm.controls.chargeAppliesTo.value === 4 && (chargeForm.controls.chargeTimeType.value===14 || chargeForm.controls.chargeTimeType.value===15) && chargeForm.controls.chargeCalculationType.value === 2)">
<mat-label>{{"labels.inputs.Minimum Charge Cap" | translate}}</mat-label>
<input matInput autofocus formControlName="minCap">
</mat-form-field>
<mat-form-field fxFlex="48%"
*ngIf="(chargeForm.controls.chargeAppliesTo.value === 1 && (chargeForm.controls.chargeCalculationType.value === 2 || chargeForm.controls.chargeCalculationType.value === 3 || chargeForm.controls.chargeCalculationType.value === 4 || chargeForm.controls.chargeCalculationType.value==5)) || (chargeForm.controls.chargeAppliesTo.value === 2 && (chargeForm.controls.chargeTimeType.value === 16 || chargeForm.controls.chargeTimeType.value === 5)&&(chargeForm.controls.chargeCalculationType.value === 2)) || (chargeForm.controls.chargeAppliesTo.value === 4 && (chargeForm.controls.chargeTimeType.value==14 || chargeForm.controls.chargeTimeType.value==15) && chargeForm.controls.chargeCalculationType.value === 2)">
*ngIf="(chargeForm.controls.chargeAppliesTo.value === 1 && (chargeForm.controls.chargeCalculationType.value === 2 || chargeForm.controls.chargeCalculationType.value === 3 || chargeForm.controls.chargeCalculationType.value === 4 || chargeForm.controls.chargeCalculationType.value===5)) || (chargeForm.controls.chargeAppliesTo.value === 2 && (chargeForm.controls.chargeTimeType.value === 16 || chargeForm.controls.chargeTimeType.value === 5)&&(chargeForm.controls.chargeCalculationType.value === 2)) || (chargeForm.controls.chargeAppliesTo.value === 4 && (chargeForm.controls.chargeTimeType.value===14 || chargeForm.controls.chargeTimeType.value===15) && chargeForm.controls.chargeCalculationType.value === 2)">
<mat-label>{{"labels.inputs.Maximum Charge Cap" | translate}}</mat-label>
<input matInput autofocus formControlName="maxCap">
</mat-form-field>
@@ -105,20 +105,20 @@
{{ chargeData.active === true | yesNo }}
</div>
<div fxFlex="50%" class="mat-body-strong" *ngIf="chargeData.chargeTimeType.id == 9 && chargeData.feeFrequency">
<div fxFlex="50%" class="mat-body-strong" *ngIf="chargeData.chargeTimeType.id === 9 && chargeData.feeFrequency">
{{"labels.inputs.Add Fee Frequency" | translate}}
</div>
<div fxFlex="50%"
*ngIf="chargeData.chargeTimeType.id == 9 && chargeData.feeFrequency && chargeData.feeFrequency">
*ngIf="chargeData.chargeTimeType.id === 9 && chargeData.feeFrequency && chargeData.feeFrequency">
{{ chargeData.feeFrequency.value | translateKey:'catalogs' }}
</div>
<div fxFlex="50%" class="mat-body-strong" *ngIf="chargeData.chargeTimeType.id == 9 && chargeData.feeInterval">
<div fxFlex="50%" class="mat-body-strong" *ngIf="chargeData.chargeTimeType.id === 9 && chargeData.feeInterval">
{{"labels.inputs.Frequency Interval" | translate}}
</div>
<div fxFlex="50%" *ngIf="chargeData.chargeTimeType.id == 9 && chargeData.feeInterval">
<div fxFlex="50%" *ngIf="chargeData.chargeTimeType.id === 9 && chargeData.feeInterval">
{{ chargeData.feeInterval }}
</div>
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component, OnInit } from '@angular/core';
import { Component } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Router } from '@angular/router';
@@ -18,7 +18,7 @@ import { DeleteDialogComponent } from '../../../shared/delete-dialog/delete-dial
templateUrl: './view-charge.component.html',
styleUrls: ['./view-charge.component.scss']
})
export class ViewChargeComponent implements OnInit {
export class ViewChargeComponent {
/** Charge data. */
chargeData: any;
@@ -49,9 +49,6 @@ export class ViewChargeComponent implements OnInit {
});
}
ngOnInit() {
}
/**
* Deletes the charge and redirects to charges.
*/
@@ -96,7 +96,7 @@
[chartSlabsDisplayedColumns]="fixedDepositProductInterestRateChartStep.chartSlabsDisplayedColumns"
[accountingRuleData]="accountingRuleData"
[fixedDepositProduct]="fixedDepositProduct"
(submit)="submit()"
(submitEvent)="submit()"
>
</mifosx-fixed-deposit-product-preview-step>
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component, OnInit, ViewChild } from '@angular/core';
import { Component, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
/** Custom Components */
@@ -21,7 +21,7 @@ import { Accounting } from 'app/core/utils/accounting';
templateUrl: './create-fixed-deposit-product.component.html',
styleUrls: ['./create-fixed-deposit-product.component.scss']
})
export class CreateFixedDepositProductComponent implements OnInit {
export class CreateFixedDepositProductComponent {
@ViewChild(FixedDepositProductDetailsStepComponent, { static: true }) fixedDepositProductDetailsStep: FixedDepositProductDetailsStepComponent;
@ViewChild(FixedDepositProductCurrencyStepComponent, { static: true }) fixedDepositProductCurrencyStep: FixedDepositProductCurrencyStepComponent;
@@ -52,9 +52,6 @@ export class CreateFixedDepositProductComponent implements OnInit {
this.accountingRuleData = this.accounting.getAccountingRulesForSavings();
}
ngOnInit() {
}
get fixedDepositProductDetailsForm() {
return this.fixedDepositProductDetailsStep.fixedDepositProductDetailsForm;
}
@@ -102,7 +102,7 @@
[fixedDepositProductsTemplate]="fixedDepositProductsTemplate"
[chartSlabsDisplayedColumns]="fixedDepositProductInterestRateChartStep.chartSlabsDisplayedColumns"
[accountingRuleData]="accountingRuleData" [fixedDepositProduct]="fixedDepositProduct"
(submit)="submit()">
(submitEvent)="submit()">
</mifosx-fixed-deposit-product-preview-step>
</mat-step>
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component, OnInit, ViewChild } from '@angular/core';
import { Component, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
/** Custom Components */
@@ -21,7 +21,7 @@ import { Accounting } from 'app/core/utils/accounting';
templateUrl: './edit-fixed-deposit-product.component.html',
styleUrls: ['./edit-fixed-deposit-product.component.scss']
})
export class EditFixedDepositProductComponent implements OnInit {
export class EditFixedDepositProductComponent {
@ViewChild(FixedDepositProductDetailsStepComponent, { static: true }) fixedDepositProductDetailsStep: FixedDepositProductDetailsStepComponent;
@ViewChild(FixedDepositProductCurrencyStepComponent, { static: true }) fixedDepositProductCurrencyStep: FixedDepositProductCurrencyStepComponent;
@@ -52,9 +52,6 @@ export class EditFixedDepositProductComponent implements OnInit {
this.accountingRuleData = this.accounting.getAccountingRulesForSavings();
}
ngOnInit() {
}
get fixedDepositProductDetailsForm() {
return this.fixedDepositProductDetailsStep.fixedDepositProductDetailsForm;
}
@@ -460,7 +460,7 @@
<button mat-raised-button [routerLink]="['../']">
{{'labels.buttons.Cancel' | translate}}
</button>
<button mat-raised-button color="primary" (click)="submit.emit()">
<button mat-raised-button color="primary" (click)="submitEvent.emit()">
{{'labels.buttons.Submit' | translate}}
</button>
</div>
@@ -21,7 +21,7 @@ export class FixedDepositProductPreviewStepComponent implements OnInit, OnChange
@Input() chartSlabsDisplayedColumns: any[];
@Input() accountingRuleData: any;
@Input() fixedDepositProduct: any;
@Output() submit = new EventEmitter();
@Output() submitEvent = new EventEmitter();
chartSlabsIncentivesDisplayedColumns: string[] = ['incentives'];
incentivesDisplayedColumns: string[] = ['entityType', 'attributeName', 'conditionType', 'attributeValue', 'incentiveType', 'amount'];
@@ -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: './fixed-deposit-datatable-tab.component.html',
styleUrls: ['./fixed-deposit-datatable-tab.component.scss']
})
export class FixedDepositDatatableTabComponent implements OnInit {
export class FixedDepositDatatableTabComponent {
entityId: string;
entityDatatable: any;
multiRowDatatableFlag: boolean;
@@ -20,7 +20,4 @@ export class FixedDepositDatatableTabComponent implements OnInit {
});
}
ngOnInit(): void {
}
}
@@ -184,7 +184,7 @@
<div *ngIf="chartSlab.fromPeriod !== undefined">
{{ chartSlab.fromPeriod }} - {{ chartSlab.toPeriod }} {{ chartSlab.periodType.value }}
</div>
<div *ngIf="chartSlab.fromPeriod == undefined">
<div *ngIf="chartSlab.fromPeriod === undefined">
&nbsp;
</div>
</td>
@@ -197,7 +197,7 @@
{{ chartSlab.amountRangeFrom }} - {{ chartSlab.amountRangeTo }}
</div>
<div *ngIf="chartSlab.amountRangeFrom == undefined">
<div *ngIf="chartSlab.amountRangeFrom === undefined">
&nbsp;
</div>
</td>
@@ -1,4 +1,4 @@
import { Component, OnInit } from '@angular/core';
import { Component } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { trigger, state, transition, animate, style } from '@angular/animations';
@@ -14,7 +14,7 @@ import { trigger, state, transition, animate, style } from '@angular/animations'
])
]
})
export class FixedDepositGeneralTabComponent implements OnInit {
export class FixedDepositGeneralTabComponent {
/** Fixed Deposit Product data. */
fixedDepositProductData: any;
fixedDepositProductsTemplate: any;
@@ -37,7 +37,4 @@ export class FixedDepositGeneralTabComponent implements OnInit {
});
}
ngOnInit(): void {
}
}
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component, OnInit } from '@angular/core';
import { Component } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
/**
@@ -11,7 +11,7 @@ import { ActivatedRoute } from '@angular/router';
styleUrls: ['./view-fixed-deposit-product.component.scss']
})
export class ViewFixedDepositProductComponent implements OnInit {
export class ViewFixedDepositProductComponent {
fixedDepositDatatables: any = [];
@@ -26,7 +26,4 @@ export class ViewFixedDepositProductComponent implements OnInit {
});
}
ngOnInit() {
}
}
@@ -122,7 +122,7 @@
[loanProductsTemplate]="loanProductsTemplate"
[accountingRuleData]="accountingRuleData"
[loanProduct]="loanProduct"
(submit)="submit()"
(submitEvent)="submit()"
>
</mifosx-loan-product-preview-step>
@@ -122,7 +122,7 @@
[loanProductsTemplate]="loanProductAndTemplate"
[accountingRuleData]="accountingRuleData"
[loanProduct]="loanProduct"
(submit)="submit()"
(submitEvent)="submit()"
>
</mifosx-loan-product-preview-step>
@@ -18,7 +18,7 @@
<button mat-raised-button [routerLink]="['../']">
{{'labels.buttons.Cancel' | translate}}
</button>
<button mat-raised-button color="primary" (click)="submit.emit()">
<button mat-raised-button color="primary" (click)="submitEvent.emit()">
{{'labels.buttons.Submit' | translate}}
</button>
</div>
@@ -11,7 +11,7 @@ export class LoanProductPreviewStepComponent implements OnInit, OnChanges {
@Input() loanProductsTemplate: any;
@Input() accountingRuleData: any;
@Input() loanProduct: any;
@Output() submit = new EventEmitter();
@Output() submitEvent = new EventEmitter();
isAdvancedPaymentAllocation = false;
@@ -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: './datatable-tab.component.html',
styleUrls: ['./datatable-tab.component.scss']
})
export class DatatableTabComponent implements OnInit {
export class DatatableTabComponent {
entityId: string;
entityDatatable: any;
multiRowDatatableFlag: boolean;
@@ -20,7 +20,5 @@ export class DatatableTabComponent implements OnInit {
});
}
ngOnInit(): void {
}
}
@@ -1,4 +1,4 @@
import { Component, Input, OnInit } from '@angular/core';
import { Component, Input } from '@angular/core';
import { AdvancePaymentAllocationData, CreditAllocation, PaymentAllocation } from 'app/products/loan-products/loan-product-stepper/loan-product-payment-strategy-step/payment-allocation-model';
@Component({
@@ -6,7 +6,7 @@ import { AdvancePaymentAllocationData, CreditAllocation, PaymentAllocation } fro
templateUrl: './view-advance-paymeny-allocation.component.html',
styleUrls: ['./view-advance-paymeny-allocation.component.scss']
})
export class ViewAdvancePaymenyAllocationComponent implements OnInit {
export class ViewAdvancePaymenyAllocationComponent {
@Input() paymentAllocation: PaymentAllocation | null;
@Input() creditAllocation: CreditAllocation | null;
@@ -14,9 +14,6 @@ export class ViewAdvancePaymenyAllocationComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
transactionTypeValue(code: string): string {
if (this.advancePaymentAllocationData == null) {
return code;
@@ -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: './view-loan-product.component.html',
styleUrls: ['./view-loan-product.component.scss']
})
export class ViewLoanProductComponent implements OnInit {
export class ViewLoanProductComponent {
loanProductDatatables: any = [];
@@ -16,7 +16,4 @@ export class ViewLoanProductComponent implements OnInit {
});
}
ngOnInit() {
}
}
@@ -1,4 +1,4 @@
import { Component, OnInit } from '@angular/core';
import { Component } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Router } from '@angular/router';
import { ProductsService } from 'app/products/products.service';
@@ -9,7 +9,7 @@ import { DeleteDialogComponent } from 'app/shared/delete-dialog/delete-dialog.co
templateUrl: './view-bucket.component.html',
styleUrls: ['./view-bucket.component.scss']
})
export class ViewBucketComponent implements OnInit {
export class ViewBucketComponent {
/** Delinquency Bucket Data. */
delinquencyBucketData: any;
@@ -26,9 +26,6 @@ export class ViewBucketComponent implements OnInit {
});
}
ngOnInit(): void {
}
deleteDelinquencyBucket() {
const dialogRef = this.dialog.open(DeleteDialogComponent, {
data: { deleteContext: this.delinquencyBucketData.name }
@@ -1,4 +1,4 @@
import { Component, OnInit } from '@angular/core';
import { Component } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Router } from '@angular/router';
import { ProductsService } from 'app/products/products.service';
@@ -9,7 +9,7 @@ import { DeleteDialogComponent } from 'app/shared/delete-dialog/delete-dialog.co
templateUrl: './view-range.component.html',
styleUrls: ['./view-range.component.scss']
})
export class ViewRangeComponent implements OnInit {
export class ViewRangeComponent {
/** Delinquency Range Data. */
delinquencyRangeData: any;
@@ -23,9 +23,6 @@ export class ViewRangeComponent implements OnInit {
});
}
ngOnInit(): void {
}
deleteDelinquencyRange() {
const dialogRef = this.dialog.open(DeleteDialogComponent, {
data: { deleteContext: this.delinquencyRangeData.classification }
@@ -1,19 +1,16 @@
import { Component, OnInit } from '@angular/core';
import { Component } from '@angular/core';
@Component({
selector: 'mifosx-manage-delinquency-buckets',
templateUrl: './manage-delinquency-buckets.component.html',
styleUrls: ['./manage-delinquency-buckets.component.scss']
})
export class ManageDelinquencyBucketsComponent implements OnInit {
export class ManageDelinquencyBucketsComponent {
// Initialize an array of 2 boolean values, all set to false
arrowBooleans: boolean[] = new Array(2).fill(false);
constructor() { }
ngOnInit(): void {
}
/**
* Popover function
* @param arrowNumber - The index of the boolean value to toggle.
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component, OnInit } from '@angular/core';
import { Component } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
/**
@@ -10,7 +10,7 @@ import { ActivatedRoute } from '@angular/router';
templateUrl: './view-tax-component.component.html',
styleUrls: ['./view-tax-component.component.scss']
})
export class ViewTaxComponentComponent implements OnInit {
export class ViewTaxComponentComponent {
/** tax Component Data. */
taxComponentData: any;
@@ -25,7 +25,4 @@ export class ViewTaxComponentComponent implements OnInit {
});
}
ngOnInit() {
}
}
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component, OnInit } from '@angular/core';
import { Component } from '@angular/core';
/**
* Manage Tax Configurations component.
@@ -8,15 +8,12 @@ import { Component, OnInit } from '@angular/core';
selector: 'mifosx-manage-tax-configurations',
templateUrl: './manage-tax-configurations.component.html',
})
export class ManageTaxConfigurationsComponent implements OnInit {
export class ManageTaxConfigurationsComponent {
// Initialize an array of 2 boolean values, all set to false
arrowBooleans: boolean[] = new Array(2).fill(false);
constructor() { }
ngOnInit() {
}
/**
* Popover function
* @param arrowNumber - The index of the boolean value to toggle.
+2 -5
View File
@@ -1,5 +1,5 @@
/** Angular Imports */
import { AfterViewInit, Component, ElementRef, OnInit, TemplateRef, ViewChild } from '@angular/core';
import { AfterViewInit, Component, ElementRef, TemplateRef, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
/** Custom Services */
@@ -14,7 +14,7 @@ import { PopoverService } from '../configuration-wizard/popover/popover.service'
templateUrl: './products.component.html',
styleUrls: ['./products.component.scss']
})
export class ProductsComponent implements OnInit, AfterViewInit {
export class ProductsComponent implements AfterViewInit {
/* Reference of charges */
@ViewChild('charges') charges: ElementRef<any>;
@@ -52,9 +52,6 @@ export class ProductsComponent implements OnInit, AfterViewInit {
private configurationWizardService: ConfigurationWizardService,
private popoverService: PopoverService) { }
ngOnInit() {
}
/**
* To show popover.
*/
@@ -102,7 +102,7 @@
[recurringDepositProductsTemplate]="recurringDepositProductsTemplate"
[chartSlabsDisplayedColumns]="recurringDepositProductInterestRateChartStep.chartSlabsDisplayedColumns"
[accountingRuleData]="accountingRuleData" [recurringDepositProduct]="recurringDepositProduct"
(submit)="submit()">
(submitEvent)="submit()">
</mifosx-recurring-deposit-product-preview-step>
</mat-step>
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component, OnInit, ViewChild } from '@angular/core';
import { Component, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
/** Custom Components */
@@ -21,7 +21,7 @@ import { Accounting } from 'app/core/utils/accounting';
templateUrl: './create-recurring-deposit-product.component.html',
styleUrls: ['./create-recurring-deposit-product.component.scss']
})
export class CreateRecurringDepositProductComponent implements OnInit {
export class CreateRecurringDepositProductComponent {
@ViewChild(RecurringDepositProductDetailsStepComponent, { static: true }) recurringDepositProductDetailsStep: RecurringDepositProductDetailsStepComponent;
@ViewChild(RecurringDepositProductCurrencyStepComponent, { static: true }) recurringDepositProductCurrencyStep: RecurringDepositProductCurrencyStepComponent;
@@ -52,9 +52,6 @@ export class CreateRecurringDepositProductComponent implements OnInit {
this.accountingRuleData = this.accounting.getAccountingRulesForSavings();
}
ngOnInit() {
}
get recurringDepositProductDetailsForm() {
return this.recurringDepositProductDetailsStep.recurringDepositProductDetailsForm;
}
@@ -102,7 +102,7 @@
[recurringDepositProductsTemplate]="recurringDepositProductsTemplate"
[chartSlabsDisplayedColumns]="recurringDepositProductInterestRateChartStep.chartSlabsDisplayedColumns"
[accountingRuleData]="accountingRuleData" [recurringDepositProduct]="recurringDepositProduct"
(submit)="submit()">
(submitEvent)="submit()">
</mifosx-recurring-deposit-product-preview-step>
</mat-step>
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component, OnInit, ViewChild } from '@angular/core';
import { Component, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
/** Custom Components */
@@ -21,7 +21,7 @@ import { Accounting } from 'app/core/utils/accounting';
templateUrl: './edit-recurring-deposit-product.component.html',
styleUrls: ['./edit-recurring-deposit-product.component.scss']
})
export class EditRecurringDepositProductComponent implements OnInit {
export class EditRecurringDepositProductComponent {
@ViewChild(RecurringDepositProductDetailsStepComponent, { static: true }) recurringDepositProductDetailsStep: RecurringDepositProductDetailsStepComponent;
@ViewChild(RecurringDepositProductCurrencyStepComponent, { static: true }) recurringDepositProductCurrencyStep: RecurringDepositProductCurrencyStepComponent;
@@ -52,9 +52,6 @@ export class EditRecurringDepositProductComponent implements OnInit {
this.accountingRuleData = this.accounting.getAccountingRulesForSavings();
}
ngOnInit() {
}
get recurringDepositProductDetailsForm() {
return this.recurringDepositProductDetailsStep.recurringDepositProductDetailsForm;
}
@@ -425,7 +425,7 @@
<button mat-raised-button [routerLink]="['../']">
{{'labels.buttons.Cancel' | translate}}
</button>
<button mat-raised-button color="primary" (click)="submit.emit()">
<button mat-raised-button color="primary" (click)="submitEvent.emit()">
{{'labels.buttons.Submit' | translate}}
</button>
</div>
@@ -21,7 +21,7 @@ export class RecurringDepositProductPreviewStepComponent implements OnInit, OnCh
@Input() chartSlabsDisplayedColumns: any[];
@Input() accountingRuleData: any;
@Input() recurringDepositProduct: any;
@Output() submit = new EventEmitter();
@Output() submitEvent = new EventEmitter();
chartSlabsIncentivesDisplayedColumns: string[] = ['incentives'];
incentivesDisplayedColumns: string[] = ['entityType', 'attributeName', 'conditionType', 'attributeValue', 'incentiveType', 'amount'];
@@ -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: './recurring-deposit-datatable-tab.component.html',
styleUrls: ['./recurring-deposit-datatable-tab.component.scss']
})
export class RecurringDepositDatatableTabComponent implements OnInit {
export class RecurringDepositDatatableTabComponent {
entityId: string;
entityDatatable: any;
@@ -21,7 +21,4 @@ export class RecurringDepositDatatableTabComponent implements OnInit {
});
}
ngOnInit(): void {
}
}
@@ -178,7 +178,7 @@
<div *ngIf="chartSlab.fromPeriod !== undefined">
{{ chartSlab.fromPeriod }} - {{ chartSlab.toPeriod }} {{ chartSlab.periodType.value }}
</div>
<div *ngIf="chartSlab.fromPeriod == undefined">
<div *ngIf="chartSlab.fromPeriod === undefined">
&nbsp;
</div>
</td>
@@ -191,7 +191,7 @@
{{ chartSlab.amountRangeFrom }} - {{ chartSlab.amountRangeTo }}
</div>
<div *ngIf="chartSlab.amountRangeFrom == undefined">
<div *ngIf="chartSlab.amountRangeFrom === undefined">
&nbsp;
</div>
</td>
@@ -1,4 +1,4 @@
import { Component, OnInit } from '@angular/core';
import { Component } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { trigger, state, transition, animate, style } from '@angular/animations';
@@ -14,7 +14,7 @@ import { trigger, state, transition, animate, style } from '@angular/animations'
])
]
})
export class RecurringDepositGeneralTabComponent implements OnInit {
export class RecurringDepositGeneralTabComponent {
recurringDepositProduct: any;
recurringDepositProductTemplate: any;
@@ -33,7 +33,4 @@ export class RecurringDepositGeneralTabComponent implements OnInit {
});
}
ngOnInit(): void {
}
}
@@ -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: './view-recurring-deposit-product.component.html',
styleUrls: ['./view-recurring-deposit-product.component.scss']
})
export class ViewRecurringDepositProductComponent implements OnInit {
export class ViewRecurringDepositProductComponent {
recurringDepositDatatables: any = [];
@@ -21,7 +21,4 @@ export class ViewRecurringDepositProductComponent implements OnInit {
});
}
ngOnInit() {
}
}
@@ -89,7 +89,7 @@
[accountingRuleData]="accountingRuleData"
[savingProduct]="savingProduct"
[taskPermission]='"CREATE_SAVINGSPRODUCT"'
(submit)="submit()"
(submitEvent)="submit()"
>
</mifosx-saving-product-preview-step>
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component, OnInit, ViewChild } from '@angular/core';
import { Component, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
/** Custom Components */
@@ -20,7 +20,7 @@ import { Accounting } from 'app/core/utils/accounting';
templateUrl: './create-saving-product.component.html',
styleUrls: ['./create-saving-product.component.scss']
})
export class CreateSavingProductComponent implements OnInit {
export class CreateSavingProductComponent {
@ViewChild(SavingProductDetailsStepComponent, { static: true }) savingProductDetailsStep: SavingProductDetailsStepComponent;
@ViewChild(SavingProductCurrencyStepComponent, { static: true }) savingProductCurrencyStep: SavingProductCurrencyStepComponent;
@@ -50,9 +50,6 @@ export class CreateSavingProductComponent implements OnInit {
this.accountingRuleData = this.accounting.getAccountingRulesForSavings();
}
ngOnInit() {
}
get savingProductDetailsForm() {
return this.savingProductDetailsStep.savingProductDetailsForm;
}
@@ -89,7 +89,7 @@
[accountingRuleData]="accountingRuleData"
[savingProduct]="savingProduct"
[taskPermission]='"UPDATE_SAVINGSPRODUCT"'
(submit)="submit()"
(submitEvent)="submit()"
>
</mifosx-saving-product-preview-step>
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component, OnInit, ViewChild } from '@angular/core';
import { Component, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
/** Custom Components */
@@ -21,7 +21,7 @@ import { Accounting } from 'app/core/utils/accounting';
templateUrl: './edit-saving-product.component.html',
styleUrls: ['./edit-saving-product.component.scss']
})
export class EditSavingProductComponent implements OnInit {
export class EditSavingProductComponent {
@ViewChild(SavingProductDetailsStepComponent, { static: true }) savingProductDetailsStep: SavingProductDetailsStepComponent;
@ViewChild(SavingProductCurrencyStepComponent, { static: true }) savingProductCurrencyStep: SavingProductCurrencyStepComponent;
@@ -51,9 +51,6 @@ export class EditSavingProductComponent implements OnInit {
this.accountingRuleData = this.accounting.getAccountingRulesForSavings();
}
ngOnInit() {
}
get savingProductDetailsForm() {
return this.savingProductDetailsStep.savingProductDetailsForm;
}
@@ -296,7 +296,7 @@
<button mat-raised-button [routerLink]="['../']">
{{'labels.buttons.Cancel' | translate}}
</button>
<button mat-raised-button color="primary" (click)="submit.emit()" *mifosxHasPermission="taskPermission">
<button mat-raised-button color="primary" (click)="submitEvent.emit()" *mifosxHasPermission="taskPermission">
{{'labels.buttons.Submit' | translate}}
</button>
</div>
@@ -13,7 +13,7 @@ export class SavingProductPreviewStepComponent implements OnInit, OnChanges {
@Input() accountingRuleData: any;
@Input() savingProduct: any;
@Input() taskPermission: string;
@Output() submit = new EventEmitter();
@Output() submitEvent = new EventEmitter();
chargesDisplayedColumns: string[] = ['name', 'chargeCalculationType', 'amount', 'chargeTimeType'];
paymentFundSourceDisplayedColumns: string[] = ['paymentTypeId', 'fundSourceAccountId'];
@@ -6,7 +6,7 @@ import { ActivatedRoute } from '@angular/router';
templateUrl: './saving-product-datatable-tab.component.html',
styleUrls: ['./saving-product-datatable-tab.component.scss']
})
export class SavingProductDatatableTabComponent implements OnInit {
export class SavingProductDatatableTabComponent {
entityId: string;
entityDatatable: any;
multiRowDatatableFlag: boolean;
@@ -20,7 +20,4 @@ export class SavingProductDatatableTabComponent implements OnInit {
});
}
ngOnInit(): void {
}
}
@@ -1,4 +1,4 @@
import { Component, OnInit } from '@angular/core';
import { Component } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Accounting } from 'app/core/utils/accounting';
@@ -7,7 +7,7 @@ import { Accounting } from 'app/core/utils/accounting';
templateUrl: './saving-product-general-tab.component.html',
styleUrls: ['./saving-product-general-tab.component.scss']
})
export class SavingProductGeneralTabComponent implements OnInit {
export class SavingProductGeneralTabComponent {
savingProduct: any;
chargesDisplayedColumns: string[] = ['name', 'chargeCalculationType', 'amount', 'chargeTimeType'];
@@ -21,9 +21,6 @@ export class SavingProductGeneralTabComponent implements OnInit {
});
}
ngOnInit() {
}
isCashOrAccrualAccounting(): boolean {
return this.accounting.isCashOrAccrualAccounting(this.savingProduct.accountingRule);
}
@@ -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: './view-saving-product.component.html',
styleUrls: ['./view-saving-product.component.scss']
})
export class ViewSavingProductComponent implements OnInit {
export class ViewSavingProductComponent {
savingProductDatatables: any = [];
@@ -21,7 +21,4 @@ export class ViewSavingProductComponent implements OnInit {
});
}
ngOnInit() {
}
}
@@ -96,7 +96,7 @@
[accountingRuleData]="accountingRuleData"
[shareProduct]="shareProduct"
[taskPermission]='"CREATE_SHAREPRODUCT"'
(submit)="submit()"
(submitEvent)="submit()"
>
</mifosx-share-product-preview-step>
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component, OnInit, ViewChild } from '@angular/core';
import { Component, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
/** Custom Components */
@@ -21,7 +21,7 @@ import { Accounting } from 'app/core/utils/accounting';
templateUrl: './create-share-product.component.html',
styleUrls: ['./create-share-product.component.scss']
})
export class CreateShareProductComponent implements OnInit {
export class CreateShareProductComponent {
@ViewChild(ShareProductDetailsStepComponent, { static: true }) shareProductDetailsStep: ShareProductDetailsStepComponent;
@ViewChild(ShareProductCurrencyStepComponent, { static: true }) shareProductCurrencyStep: ShareProductCurrencyStepComponent;
@@ -52,9 +52,6 @@ export class CreateShareProductComponent implements OnInit {
this.accountingRuleData = this.accounting.getAccountingRulesForShares();
}
ngOnInit() {
}
get shareProductDetailsForm() {
return this.shareProductDetailsStep.shareProductDetailsForm;
}
@@ -96,7 +96,7 @@
[accountingRuleData]="accountingRuleData"
[shareProduct]="shareProduct"
[taskPermission]='"UPDATE_SHAREPRODUCT"'
(submit)="submit()"
(submitEvent)="submit()"
>
</mifosx-share-product-preview-step>
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component, OnInit, ViewChild } from '@angular/core';
import { Component, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
/** Custom Components */
@@ -21,7 +21,7 @@ import { Accounting } from 'app/core/utils/accounting';
templateUrl: './edit-share-product.component.html',
styleUrls: ['./edit-share-product.component.scss']
})
export class EditShareProductComponent implements OnInit {
export class EditShareProductComponent {
@ViewChild(ShareProductDetailsStepComponent, { static: true }) shareProductDetailsStep: ShareProductDetailsStepComponent;
@ViewChild(ShareProductCurrencyStepComponent, { static: true }) shareProductCurrencyStep: ShareProductCurrencyStepComponent;
@@ -52,9 +52,6 @@ export class EditShareProductComponent implements OnInit {
this.accountingRuleData = this.accounting.getAccountingRulesForShares();
}
ngOnInit() {
}
get shareProductDetailsForm() {
return this.shareProductDetailsStep.shareProductDetailsForm;
}
@@ -208,7 +208,7 @@
<button mat-raised-button [routerLink]="['../']">
{{'labels.buttons.Cancel' | translate}}
</button>
<button mat-raised-button color="primary" (click)="submit.emit()" *mifosxHasPermission="taskPermission">
<button mat-raised-button color="primary" (click)="submitEvent.emit()" *mifosxHasPermission="taskPermission">
{{'labels.buttons.Submit' | translate}}
</button>
</div>
@@ -1,24 +1,21 @@
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import { Component, Input, Output, EventEmitter } from '@angular/core';
@Component({
selector: 'mifosx-share-product-preview-step',
templateUrl: './share-product-preview-step.component.html',
styleUrls: ['./share-product-preview-step.component.scss']
})
export class ShareProductPreviewStepComponent implements OnInit {
export class ShareProductPreviewStepComponent {
@Input() shareProductsTemplate: any;
@Input() accountingRuleData: any;
@Input() shareProduct: any;
@Input() taskPermission: string;
@Output() submit = new EventEmitter();
@Output() submitEvent = new EventEmitter();
marketPriceDisplayedColumns: string[] = ['fromDate', 'shareValue'];
chargesDisplayedColumns: string[] = ['name', 'chargeCalculationType', 'amount', 'chargeTimeType'];
constructor() { }
ngOnInit() {
}
}
@@ -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: './share-product-datatable-tab.component.html',
styleUrls: ['./share-product-datatable-tab.component.scss']
})
export class ShareProductDatatableTabComponent implements OnInit {
export class ShareProductDatatableTabComponent {
entityId: string;
entityDatatable: any;
@@ -21,7 +21,4 @@ export class ShareProductDatatableTabComponent implements OnInit {
});
}
ngOnInit(): void {
}
}
@@ -1,4 +1,4 @@
import { Component, OnInit } from '@angular/core';
import { Component } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Accounting } from 'app/core/utils/accounting';
@@ -7,7 +7,7 @@ import { Accounting } from 'app/core/utils/accounting';
templateUrl: './share-product-general-tab.component.html',
styleUrls: ['./share-product-general-tab.component.scss']
})
export class ShareProductGeneralTabComponent implements OnInit {
export class ShareProductGeneralTabComponent {
shareProduct: any;
@@ -21,9 +21,6 @@ export class ShareProductGeneralTabComponent implements OnInit {
});
}
ngOnInit(): void {
}
getAccountingRuleName(value: string): string {
return this.accounting.getAccountRuleName(value.toUpperCase());
}
@@ -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: './view-share-product.component.html',
styleUrls: ['./view-share-product.component.scss']
})
export class ViewShareProductComponent implements OnInit {
export class ViewShareProductComponent {
shareProductDatatables: any = [];
@@ -19,7 +19,4 @@ export class ViewShareProductComponent implements OnInit {
});
}
ngOnInit() {
}
}