Fix: Employee was not saving because of isStarred, added that functionality to employee

This commit is contained in:
tanshu
2018-07-14 10:52:39 +05:30
parent 9f4eb334d7
commit 29b81cbd21
5 changed files with 20 additions and 7 deletions

View File

@ -0,0 +1,7 @@
.gold {
color: gold;
}
.pointer {
cursor: pointer;
}

View File

@ -1,6 +1,9 @@
<mat-card>
<mat-card-title-group>
<mat-card-title>Employee</mat-card-title>
<mat-icon matSuffix (click)="item.isStarred = !item.isStarred" class="pointer" [class.gold]="item.isStarred">
{{ item.isStarred ? 'star' : 'star_border' }}
</mat-icon>
</mat-card-title-group>
<mat-card-content>
<form [formGroup]="form" fxLayout="column">

View File

@ -4,6 +4,7 @@ export class Employee {
id: string;
code: number;
name: string;
isStarred: boolean;
isActive: boolean;
designation: string;
salary: number;