feat: add add-code component (#310)

This commit is contained in:
Chirag Gupta
2018-10-25 21:47:21 +05:30
committed by Abhay Chawla
parent 04ff1abcc4
commit dffce8a5e0
8 changed files with 145 additions and 6 deletions
@@ -0,0 +1,32 @@
<div class="container">
<mat-card>
<form [formGroup]="codeForm" (ngSubmit)="submit()">
<mat-card-content>
<div fxLayout="column">
<mat-form-field>
<mat-label>Code Name</mat-label>
<input matInput required formControlName="name">
<mat-error *ngIf="codeForm.controls.name.hasError('required')">
Code Name is <strong>required</strong>
</mat-error>
</mat-form-field>
</div>
</mat-card-content>
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
<button type="button" mat-raised-button [routerLink]="['../']">Cancel</button>
<button mat-raised-button color="primary" [disabled]="!codeForm.valid">Submit</button>
</mat-card-actions>
</form>
</mat-card>
</div>