build: Use prettier for typescript
Stop ignoring .ts files in prettier and fix existing issues.
This commit is contained in:
@@ -6,17 +6,20 @@ import { MatDialog } from '@angular/material/dialog';
|
||||
/** Custom Components */
|
||||
import { DeleteDialogComponent } from '../../shared/delete-dialog/delete-dialog.component';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'mifosx-view-collateral',
|
||||
templateUrl: './view-collateral.component.html',
|
||||
styleUrls: ['./view-collateral.component.scss']
|
||||
})
|
||||
export class ViewCollateralComponent {
|
||||
|
||||
clientCollateralData: any;
|
||||
|
||||
collateralColumns: string[] = ['ID', 'Last Repayment', 'Remaining Amount', 'Last Repayment Date'];
|
||||
collateralColumns: string[] = [
|
||||
'ID',
|
||||
'Last Repayment',
|
||||
'Remaining Amount',
|
||||
'Last Repayment Date'
|
||||
];
|
||||
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
@@ -24,7 +27,7 @@ export class ViewCollateralComponent {
|
||||
private router: Router,
|
||||
private dialog: MatDialog
|
||||
) {
|
||||
this.route.data.subscribe((data: {clientCollateralData: any}) => {
|
||||
this.route.data.subscribe((data: { clientCollateralData: any }) => {
|
||||
this.clientCollateralData = data.clientCollateralData;
|
||||
});
|
||||
}
|
||||
@@ -32,18 +35,18 @@ export class ViewCollateralComponent {
|
||||
/**
|
||||
* Deletes the Collateral and redirects to CLients Page.
|
||||
*/
|
||||
deleteCollateral() {
|
||||
deleteCollateral() {
|
||||
const deleteCollateralDialogRef = this.dialog.open(DeleteDialogComponent, {
|
||||
data: { deleteContext: `collateral ${this.clientCollateralData.id}` }
|
||||
});
|
||||
deleteCollateralDialogRef.afterClosed().subscribe((response: any) => {
|
||||
if (response.delete) {
|
||||
this.collateralsService.deleteCollateral(this.clientCollateralData.clientId, this.clientCollateralData.id)
|
||||
this.collateralsService
|
||||
.deleteCollateral(this.clientCollateralData.clientId, this.clientCollateralData.id)
|
||||
.subscribe(() => {
|
||||
this.router.navigate(['../../'], { relativeTo: this.route });
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user