|
1 | 1 | <mat-card>
|
2 | 2 | <mat-card-header>
|
3 |
| - <p class="lead pb-3" *ngIf="!updateClicked;else updateEmp"> |
| 3 | + <p class="lead pb-3" *ngIf="!updateClicked; else updateEmp"> |
4 | 4 | Add New Employee
|
5 | 5 | </p>
|
6 | 6 | <ng-template #updateEmp>
|
7 |
| - <p class="lead pb-3" > |
8 |
| - Update Employee |
9 |
| - </p> |
| 7 | + <p class="lead pb-3">Update Employee</p> |
10 | 8 | </ng-template>
|
11 | 9 | </mat-card-header>
|
12 | 10 | <mat-card-content>
|
|
16 | 14 | <div class="col-12 col-md-5">
|
17 | 15 | <mat-form-field appearance="outline">
|
18 | 16 | <mat-label>Employee Name</mat-label>
|
19 |
| - <input matInput type="text" formControlName="EmployeeName" placeholder="Employee Name"/> |
| 17 | + <input |
| 18 | + matInput |
| 19 | + type="text" |
| 20 | + formControlName="EmployeeName" |
| 21 | + placeholder="Employee Name" |
| 22 | + /> |
20 | 23 | </mat-form-field>
|
21 | 24 | </div>
|
22 | 25 | <div class="col-12 col-md-5">
|
23 | 26 | <mat-form-field appearance="outline">
|
24 | 27 | <mat-label>Department</mat-label>
|
25 | 28 | <mat-select formControlName="DepartmentId">
|
26 |
| - <mat-option *ngFor="let dept of DepartmentsList" [value]="dept.DepartmentId"> |
27 |
| - {{dept.DepartmentName}} |
| 29 | + <mat-option |
| 30 | + *ngFor="let dept of DepartmentsList" |
| 31 | + [value]="dept.DepartmentId" |
| 32 | + > |
| 33 | + {{ dept.DepartmentName }} |
28 | 34 | </mat-option>
|
29 | 35 | </mat-select>
|
30 | 36 | </mat-form-field>
|
31 | 37 | </div>
|
32 | 38 | <div class="col-12 col-md-5">
|
33 | 39 | <mat-form-field appearance="fill">
|
34 | 40 | <mat-label>Date of Joining</mat-label>
|
35 |
| - <input matInput [matDatepicker]="picker" formControlName="DateOfJoining" placeholder="Date of Joining"> |
36 |
| - <mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle> |
| 41 | + <input |
| 42 | + matInput |
| 43 | + [matDatepicker]="picker" |
| 44 | + formControlName="DateOfJoining" |
| 45 | + placeholder="Date of Joining" |
| 46 | + /> |
| 47 | + <mat-datepicker-toggle |
| 48 | + matSuffix |
| 49 | + [for]="picker" |
| 50 | + ></mat-datepicker-toggle> |
37 | 51 | <mat-datepicker #picker></mat-datepicker>
|
38 | 52 | </mat-form-field>
|
39 | 53 | </div>
|
|
46 | 60 | </div>
|
47 | 61 | </div>
|
48 | 62 |
|
49 |
| - <button mat-raised-button type="submit" *ngIf="!updateClicked" color="primary"> |
| 63 | + <button |
| 64 | + mat-raised-button |
| 65 | + type="submit" |
| 66 | + *ngIf="!updateClicked" |
| 67 | + color="primary" |
| 68 | + > |
50 | 69 | Add
|
51 | 70 | </button>
|
52 | 71 |
|
53 |
| - <button type="button" mat-raised-button (click)="updateEmployee(addEmployeeForm.value)" *ngIf="updateClicked" color="accent" > |
| 72 | + <button |
| 73 | + type="button" |
| 74 | + mat-raised-button |
| 75 | + (click)="updateEmployee(addEmployeeForm.value)" |
| 76 | + *ngIf="updateClicked" |
| 77 | + color="accent" |
| 78 | + > |
54 | 79 | Update
|
55 | 80 | </button>
|
56 |
| - <button type="button" mat-raised-button color="warn" (click)="CloseDialog()">Close</button> |
| 81 | + <button |
| 82 | + type="button" |
| 83 | + mat-raised-button |
| 84 | + color="warn" |
| 85 | + (click)="CloseDialog()" |
| 86 | + > |
| 87 | + Close |
| 88 | + </button> |
57 | 89 | </form>
|
58 | 90 | </mat-card-content>
|
59 | 91 | </mat-card>
|
0 commit comments