55 < div class ="left triangle "> </ div >
66 < div class ="right triangle "> </ div >
77 </ div >
8+
89 < mat-card *ngIf ="!isLoading " class ="transfer-card ">
910 < mat-card-content >
1011 <!-- Source Account Details Section -->
@@ -53,7 +54,7 @@ <h3 class="section-title transfer-heading">{{ 'labels.heading.Transferred To' |
5354 < mat-label > {{ 'labels.inputs.Phone Number' | translate }}</ mat-label >
5455 < input
5556 matInput
56- [disabled ] ="interbankTransferForm "
57+ [readonly ] ="interbankTransferForm "
5758 type ="tel "
5859 #input
5960 [(ngModel)] ="phoneAccount "
@@ -66,28 +67,27 @@ <h3 class="section-title transfer-heading">{{ 'labels.heading.Transferred To' |
6667 </ mat-form-field >
6768 </ div >
6869
70+ <!--interbank -->
6971 < mat-card-actions *ngIf ="!interbankTransferForm " class ="action-buttons ">
70- < button type ="button " mat-raised-button [routerLink] ="['../..'] " class ="cancel-button ">
71- {{ 'labels.buttons.Cancel' | translate }}
72- </ button >
73- < button
74- mat-raised-button
75- color ="primary "
76- [disabled] ="phoneAccount.length !== 10 "
77- (click) ="searchAccountByNumber() "
78- *mifosxHasPermission ="'CREATE_ACCOUNTTRANSFER' "
79- id ="search-button "
80- class ="primary-button "
81- >
82- {{ 'labels.buttons.Search' | translate }}
83- </ button >
72+ < ng-container *mifosxHasPermission ="'CREATE_ACCOUNTTRANSFER' ">
73+ < button
74+ mat-raised-button
75+ color ="primary "
76+ [disabled] ="phoneAccount.length !== 10 "
77+ (click) ="searchAccountByNumber() "
78+ id ="search-button "
79+ class ="primary-button "
80+ >
81+ {{ 'labels.buttons.Search' | translate }}
82+ </ button >
83+ </ ng-container >
8484 </ mat-card-actions >
8585 </ div >
8686
8787 < mat-divider *ngIf ="!interbank "> </ mat-divider >
8888
89- <!-- Transfer Form Section -->
90- < form *ngIf ="!interbank " [formGroup] ="makeAccountTransferForm " class ="transfer-form " (ngSubmit) =" submit() ">
89+ <!-- Transfer Form Section (Normal) -->
90+ < form *ngIf ="!interbank && makeAccountTransferForm " [formGroup] ="makeAccountTransferForm " class ="transfer-form ">
9191 < h3 class ="section-title transfer-heading "> {{ 'labels.heading.Transfer Details' | translate }}</ h3 >
9292
9393 < div class ="form-grid ">
@@ -180,6 +180,8 @@ <h3 class="section-title transfer-heading">{{ 'labels.heading.Transfer Details'
180180 formControlName ="transferAmount "
181181 placeholder ="Enter amount "
182182 title ="Transfer amount "
183+ min ="0.01 "
184+ step ="0.01 "
183185 />
184186 < mat-error *ngIf ="makeAccountTransferForm.controls.transferAmount.hasError('required') ">
185187 {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }}
@@ -207,20 +209,135 @@ <h3 class="section-title transfer-heading">{{ 'labels.heading.Transfer Details'
207209 </ mat-error >
208210 </ mat-form-field >
209211 </ div >
210- < mat-card-actions class ="layout-row layout-xs-column layout-align-center gap-5px ">
211- < button type ="button " mat-raised-button [routerLink] ="['../../transactions'] ">
212- {{ 'labels.buttons.Cancel' | translate }}
213- </ button >
214- < button mat-raised-button color ="primary " [disabled] ="!makeAccountTransferForm.valid ">
215- {{ 'labels.buttons.Submit' | translate }}
216- </ button >
217- </ mat-card-actions >
218212 </ form >
219- < mifosx-make-account-interbank-transfers
220- *ngIf ="interbank && interbankTransferForm "
221- [makeAccountTransferForm] ="makeAccountTransferForm "
222- [balance] ="balance "
223- > </ mifosx-make-account-interbank-transfers >
213+
214+ <!-- Interbank Transfer Form Section -->
215+ < form
216+ *ngIf ="interbank && interbankTransferForm && makeAccountTransferForm "
217+ [formGroup] ="makeAccountTransferForm "
218+ class ="transfer-form "
219+ >
220+ < h3 class ="section-title transfer-heading "> {{ 'labels.heading.Transfer Details' | translate }}</ h3 >
221+
222+ < div class ="form-grid ">
223+ < mat-form-field class ="form-field " (click) ="transferDatePicker.open() ">
224+ < mat-label > {{ 'labels.inputs.Transaction Date' | translate }}</ mat-label >
225+ < input
226+ matInput
227+ [min] ="minDate "
228+ [max] ="maxDate "
229+ [matDatepicker] ="transferDatePicker "
230+ required
231+ formControlName ="transferDate "
232+ placeholder ="Select date "
233+ title ="Transaction Date "
234+ />
235+ < mat-datepicker-toggle matSuffix [for] ="transferDatePicker "> </ mat-datepicker-toggle >
236+ < mat-datepicker #transferDatePicker > </ mat-datepicker >
237+ < mat-error *ngIf ="makeAccountTransferForm.controls.transferDate.hasError('required') ">
238+ {{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }}
239+ < strong > {{ 'labels.commons.required' | translate }}</ strong >
240+ </ mat-error >
241+ </ mat-form-field >
242+
243+ < mat-form-field class ="form-field ">
244+ < mat-label > {{ 'labels.inputs.Bank' | translate }}</ mat-label >
245+ < input matInput formControlName ="toBank " [readonly] ="true " placeholder ="Bank " title ="Bank " />
246+ </ mat-form-field >
247+
248+ < mat-form-field class ="form-field ">
249+ < mat-label > {{ 'labels.inputs.Client' | translate }}</ mat-label >
250+ < input matInput formControlName ="toClientId " [readonly] ="true " placeholder ="Client " title ="Client " />
251+ </ mat-form-field >
252+
253+ < mat-form-field class ="form-field ">
254+ < mat-label > {{ 'labels.inputs.Account Type' | translate }}</ mat-label >
255+ < input
256+ matInput
257+ formControlName ="toAccountType "
258+ [readonly] ="true "
259+ placeholder ="Account Type "
260+ title ="Account Type "
261+ />
262+ </ mat-form-field >
263+
264+ < mat-form-field class ="form-field ">
265+ < mat-label > {{ 'labels.inputs.Account' | translate }}</ mat-label >
266+ < input matInput formControlName ="toAccountId " [readonly] ="true " placeholder ="Account " title ="Account " />
267+ </ mat-form-field >
268+
269+ < mat-form-field class ="form-field ">
270+ < mat-label > {{ 'labels.inputs.Amount' | translate }}</ mat-label >
271+ < input
272+ type ="number "
273+ matInput
274+ required
275+ formControlName ="transferAmount "
276+ placeholder ="Enter amount "
277+ title ="Transfer amount "
278+ min ="0.01 "
279+ step ="0.01 "
280+ />
281+ < mat-error *ngIf ="makeAccountTransferForm.controls.transferAmount.hasError('required') ">
282+ {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }}
283+ < strong > {{ 'labels.commons.required' | translate }}</ strong >
284+ </ mat-error >
285+ < mat-error *ngIf ="makeAccountTransferForm.controls.transferAmount.hasError('min') ">
286+ {{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.mustBeAtLeast' | translate }} 0.01
287+ </ mat-error >
288+ < mat-error *ngIf ="makeAccountTransferForm.get('transferAmount')?.hasError('amountExceedsBalance') ">
289+ < fa-icon icon ="exclamation-triangle " size ="md "> </ fa-icon >
290+ {{ 'errors.validation.msg.savingsproduct.insufficient.balance' | translate: { balance } }}
291+ </ mat-error >
292+ </ mat-form-field >
293+
294+ < mat-form-field class ="form-field description-field ">
295+ < mat-label > {{ 'labels.inputs.Description' | translate }}</ mat-label >
296+ < textarea
297+ matInput
298+ formControlName ="transferDescription "
299+ cdkTextareaAutosize
300+ cdkAutosizeMinRows ="2 "
301+ placeholder ="Enter transfer description "
302+ title ="Transfer description "
303+ > </ textarea >
304+ < mat-error *ngIf ="makeAccountTransferForm.controls.transferDescription.hasError('required') ">
305+ {{ 'labels.inputs.Transfer Description' | translate }} {{ 'labels.commons.is' | translate }}
306+ < strong > {{ 'labels.commons.required' | translate }}</ strong >
307+ </ mat-error >
308+ </ mat-form-field >
309+ </ div >
310+ </ form >
224311 </ mat-card-content >
312+
313+ < mat-card-actions *ngIf ="!isLoading && makeAccountTransferForm " class ="action-buttons ">
314+ < button type ="button " mat-raised-button [routerLink] ="['../..'] " class ="cancel-button ">
315+ {{ 'labels.buttons.Cancel' | translate }}
316+ </ button >
317+
318+ < ng-container *mifosxHasPermission ="'CREATE_ACCOUNTTRANSFER' ">
319+ < button
320+ *ngIf ="interbank && interbankTransferForm "
321+ mat-raised-button
322+ color ="primary "
323+ [disabled] ="!makeAccountTransferForm.valid "
324+ (click) ="submit() "
325+ class ="primary-button "
326+ >
327+ {{ 'labels.buttons.Submit' | translate }}
328+ </ button >
329+
330+ < button
331+ *ngIf ="!interbank "
332+ mat-raised-button
333+ color ="primary "
334+ [disabled] ="!makeAccountTransferForm.valid "
335+ (click) ="submit() "
336+ class ="primary-button "
337+ >
338+ {{ 'labels.buttons.Submit' | translate }}
339+ </ button >
340+ </ ng-container >
341+ </ mat-card-actions >
225342 </ mat-card >
226343</ div >
0 commit comments