78 lines
3.4 KiB
HTML
78 lines
3.4 KiB
HTML
<div class="container">
|
|
<mat-card>
|
|
<form [formGroup]="clientCollateralForm" (ngSubmit)="submit()">
|
|
<mat-card-content>
|
|
<div class="layout-column">
|
|
<mat-form-field>
|
|
<mat-label>{{ 'labels.inputs.Collateral' | translate }}</mat-label>
|
|
<mat-select required formControlName="collateralId">
|
|
<mat-option *ngFor="let clientCollateral of clientCollateralOptions" [value]="clientCollateral.id">
|
|
{{ clientCollateral.name }}
|
|
</mat-option>
|
|
</mat-select>
|
|
<mat-error *ngIf="clientCollateralForm.controls.collateralId.hasError('required')">
|
|
{{ 'labels.inputs.Collateral' | translate }} {{ 'labels.commons.is' | translate }}
|
|
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
|
</mat-error>
|
|
</mat-form-field>
|
|
|
|
<div *ngIf="collateralDetails" class="layout-column">
|
|
<mat-form-field>
|
|
<mat-label>{{ 'labels.inputs.name' | translate }}</mat-label>
|
|
<input matInput required formControlName="name" />
|
|
</mat-form-field>
|
|
|
|
<mat-form-field>
|
|
<mat-label>{{ 'labels.inputs.Type/Quality' | translate }}</mat-label>
|
|
<input matInput required formControlName="quality" />
|
|
</mat-form-field>
|
|
|
|
<mat-form-field>
|
|
<mat-label>{{ 'labels.inputs.Unit Type' | translate }}</mat-label>
|
|
<input matInput required formControlName="unitType" />
|
|
</mat-form-field>
|
|
|
|
<mat-form-field>
|
|
<mat-label>{{ 'labels.inputs.Base Price' | translate }}</mat-label>
|
|
<input matInput required formControlName="basePrice" />
|
|
</mat-form-field>
|
|
|
|
<mat-form-field>
|
|
<mat-label>{{ 'labels.inputs.Percentage To Base' | translate }}</mat-label>
|
|
<input matInput required formControlName="pctToBase" />
|
|
</mat-form-field>
|
|
|
|
<mat-form-field>
|
|
<mat-label>{{ 'labels.inputs.Quantity' | translate }}</mat-label>
|
|
<input matInput required formControlName="quantity" />
|
|
<mat-error *ngIf="clientCollateralForm.controls.quantity.hasError('required')">
|
|
{{ 'labels.inputs.Quantity' | translate }} {{ 'labels.commons.is' | translate }}
|
|
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
|
</mat-error>
|
|
</mat-form-field>
|
|
|
|
<mat-form-field>
|
|
<mat-label>{{ 'labels.inputs.Total' | translate }}</mat-label>
|
|
<input matInput required formControlName="totalValue" />
|
|
</mat-form-field>
|
|
|
|
<mat-form-field>
|
|
<mat-label>{{ 'labels.inputs.Total Collateral Value' | translate }}</mat-label>
|
|
<input matInput required formControlName="totalCollateralValue" />
|
|
</mat-form-field>
|
|
</div>
|
|
</div>
|
|
</mat-card-content>
|
|
|
|
<mat-card-actions class="layout-row layout-xs-column layout-align-center gap-5px">
|
|
<button type="button" mat-raised-button [routerLink]="['../../']">
|
|
{{ 'labels.buttons.Cancel' | translate }}
|
|
</button>
|
|
<button mat-raised-button color="primary" [disabled]="!clientCollateralForm.valid">
|
|
{{ 'labels.buttons.Submit' | translate }}
|
|
</button>
|
|
</mat-card-actions>
|
|
</form>
|
|
</mat-card>
|
|
</div>
|