File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed
src/app/loans/loans-view/loan-account-actions/loan-reaging Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 7070 < input matInput formControlName ="note " />
7171 </ mat-form-field >
7272 < div class ="flex-fill ">
73- < span
74- class ="expandcollapsebutton m-l-10 m-t-5 m-b-5 flex-75 "
75- (click) ="addTransactionAmount = !addTransactionAmount "
76- >
73+ < span class ="expandcollapsebutton m-l-10 m-t-5 m-b-5 flex-75 " (click) ="displayTransactionAmount() ">
7774 < mat-slide-toggle >
7875 < div >
7976 < span class ="m-l-10 "> {{ 'labels.inputs.Transaction Amount' | translate }}</ span >
8784 [isRequired] ="false "
8885 [inputFormControl] ="reagingLoanForm.controls.transactionAmount "
8986 [inputLabel] ="'Transaction Amount' "
90- [minVal] ="0.01 "
87+ [minVal] ="loanTransactionData.amount "
9188 [maxVal] ="loanTransactionData.amount "
9289 >
9390 </ mifosx-input-amount >
Original file line number Diff line number Diff line change @@ -88,7 +88,10 @@ export class LoanReagingComponent implements OnInit {
8888 ] ,
8989 transactionAmount : [
9090 ,
91- [ Validators . max ( this . loanTransactionData . amount ) ]
91+ [
92+ Validators . min ( this . loanTransactionData . amount ) ,
93+ Validators . max ( this . loanTransactionData . amount )
94+ ]
9295 ] ,
9396 note : '' ,
9497 externalId : '' ,
@@ -145,6 +148,13 @@ export class LoanReagingComponent implements OnInit {
145148 } ) ;
146149 }
147150
151+ displayTransactionAmount ( ) : void {
152+ this . addTransactionAmount = ! this . addTransactionAmount ;
153+ this . reagingLoanForm . patchValue ( {
154+ transactionAmount : null
155+ } ) ;
156+ }
157+
148158 submit ( ) : void {
149159 const data = this . prepareReagingData ( ) ;
150160 if ( data [ 'transactionAmount' ] === null ) {
You can’t perform that action at this time.
0 commit comments