refactor: loans module (#1237)

This commit is contained in:
Muskan Khedia
2020-08-30 19:50:58 +05:30
committed by GitHub
parent d357263c3e
commit 3c858e308c
83 changed files with 1480 additions and 1369 deletions
@@ -1,44 +1,50 @@
<div class="container">
<form [formGroup]="collateralForm" (ngSubmit)="submit()">
<mat-card>
<mat-card-content>
<form [formGroup]="collateralForm" (ngSubmit)="submit()">
<div fxLayout="column">
<mat-card-content>
<mat-form-field>
<mat-label>Collateral Type</mat-label>
<mat-select required formControlName="collateralTypeId">
<mat-option *ngFor="let collateral of dataObject.allowedCollateralTypes" [value]="collateral.id"> {{ collateral.name }}</mat-option>
</mat-select>
<mat-error *ngIf="collateralForm.controls.collateralTypeId.hasError('required')">
Collateral type <strong>required</strong>
</mat-error>
</mat-form-field>
<div fxLayout="column">
<mat-form-field>
<mat-label>Value</mat-label>
<input matInput required formControlName="value">
<mat-error *ngIf="collateralForm.controls.value.hasError('required')">
Value is <strong>required</strong>
</mat-error>
</mat-form-field>
<mat-form-field>
<mat-label>Collateral Type</mat-label>
<mat-select required formControlName="collateralTypeId">
<mat-option *ngFor="let collateral of dataObject.allowedCollateralTypes" [value]="collateral.id">
{{ collateral.name }}</mat-option>
</mat-select>
<mat-error *ngIf="collateralForm.controls.collateralTypeId.hasError('required')">
Collateral type <strong>required</strong>
</mat-error>
</mat-form-field>
<mat-form-field>
<mat-label>Description</mat-label>
<textarea matInput formControlName="description"></textarea>
</mat-form-field>
<mat-form-field>
<mat-label>Value</mat-label>
<input matInput required formControlName="value">
<mat-error *ngIf="collateralForm.controls.value.hasError('required')">
Value is <strong>required</strong>
</mat-error>
</mat-form-field>
</div>
<mat-form-field>
<mat-label>Description</mat-label>
<textarea matInput formControlName="description"></textarea>
</mat-form-field>
<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]="!collateralForm.valid" *mifosxHasPermission="'CREATE_COLLATERAL'">Submit</button>
</mat-card-actions>
</mat-card-content>
</div>
<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]="!collateralForm.valid"
*mifosxHasPermission="'CREATE_COLLATERAL'">Submit</button>
</mat-card-actions>
</mat-card-content>
</form>
</mat-card>
</form>
</div>