refactor: clients module (#1207)

See: #1196
This commit is contained in:
Karan Takalkar
2020-08-15 19:24:04 +05:30
committed by GitHub
parent 9861182b7d
commit c42e128b09
32 changed files with 473 additions and 249 deletions
@@ -1,34 +1,38 @@
<div class="tab-container mat-typography">
<div class="container mat-typography">
<form [formGroup]="transactionForm" (ngSubmit)="submit()">
<mat-card>
<div fxLayout="column">
<form [formGroup]="transactionForm" (ngSubmit)="submit()">
<mat-form-field>
<mat-label> Amount </mat-label>
<input matInput required autofocus formControlName="amount">
<mat-error *ngIf="transactionForm.controls.amount.hasError('required')">
Amount <strong>is required</strong>
</mat-error>
</mat-form-field>
<div fxLayout="column">
<mat-form-field>
<mat-label> Amount </mat-label>
<input matInput required autofocus formControlName="amount">
<mat-error *ngIf="transactionForm.controls.amount.hasError('required')">
Amount <strong>is required</strong>
</mat-error>
</mat-form-field>
<mat-form-field>
<mat-label> Transaction date </mat-label>
<input matInput [min]="minDate" [matDatepicker]="transactionDatePicker" required formControlName="transactionDate">
<mat-datepicker-toggle matSuffix [for]="transactionDatePicker"></mat-datepicker-toggle>
<mat-datepicker #transactionDatePicker></mat-datepicker>
<mat-error *ngIf="transactionForm.controls.transactionDate.hasError('required')">
Transaction date <strong>is required</strong>
</mat-error>
</mat-form-field>
</div>
<div fxLayout="row" fxLayoutAlign="center" fxLayoutGap="5px">
<button type="button" mat-raised-button [routerLink]="['../','general']">Cancel</button>
<button mat-raised-button color="primary" [disabled]="!transactionForm.valid">Submit</button>
</div>
</form>
<mat-form-field>
<mat-label> Transaction date </mat-label>
<input matInput [min]="minDate" [matDatepicker]="transactionDatePicker" required formControlName="transactionDate">
<mat-datepicker-toggle matSuffix [for]="transactionDatePicker"></mat-datepicker-toggle>
<mat-datepicker #transactionDatePicker></mat-datepicker>
<mat-error *ngIf="transactionForm.controls.transactionDate.hasError('required')">
Transaction date <strong>is required</strong>
</mat-error>
</mat-form-field>
</div>
<div fxLayout="row" fxLayoutAlign="center" fxLayoutGap="5px">
<button type="button" mat-raised-button [routerLink]="['../','general']">Cancel</button>
<button mat-raised-button color="primary" [disabled]="!transactionForm.valid">Submit</button>
</div>
</form>
</mat-card>
</div>