+1
-1
@@ -25,7 +25,7 @@
|
||||
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!closeLoanForm.valid">Submit</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!closeLoanForm.valid" *mifosxHasPermission="'CLOSE_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
|
||||
</mat-card-content>
|
||||
|
||||
+4
-2
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { LoansService } from 'app/loans/loans.service';
|
||||
@@ -12,6 +12,8 @@ import { DatePipe } from '@angular/common';
|
||||
})
|
||||
export class LoansAccountCloseComponent implements OnInit {
|
||||
|
||||
@Input() dataObject: any;
|
||||
|
||||
/** Close form. */
|
||||
closeLoanForm: FormGroup;
|
||||
/** Loan Id */
|
||||
@@ -47,7 +49,7 @@ export class LoansAccountCloseComponent implements OnInit {
|
||||
*/
|
||||
createCloseForm() {
|
||||
this.closeLoanForm = this.formBuilder.group({
|
||||
'transactionDate': [new Date(), Validators.required],
|
||||
'transactionDate': [new Date(this.dataObject.date) || new Date(), Validators.required],
|
||||
'note': []
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user