Fixed: Star now showing in employee list
This commit is contained in:
parent
dd799a8e2f
commit
95e92fc2bd
brewman/routers
overlord/src/app/employee/employee-list
@ -137,11 +137,11 @@ async def show_list(db: Session = Depends(get_db), user: UserToken = Depends(get
|
|||||||
"points": item.points,
|
"points": item.points,
|
||||||
"isActive": item.is_active,
|
"isActive": item.is_active,
|
||||||
"costCentre": item.cost_centre.name,
|
"costCentre": item.cost_centre.name,
|
||||||
# "url": request.route_url("employees_id", id=item.id),
|
|
||||||
"joiningDate": item.joining_date.strftime("%d-%b-%Y"),
|
"joiningDate": item.joining_date.strftime("%d-%b-%Y"),
|
||||||
"leavingDate": ""
|
"leavingDate": ""
|
||||||
if item.is_active
|
if item.is_active
|
||||||
else item.leaving_date.strftime("%d-%b-%Y"),
|
else item.leaving_date.strftime("%d-%b-%Y"),
|
||||||
|
"isStarred": item.is_starred
|
||||||
}
|
}
|
||||||
for item in db.query(Employee)
|
for item in db.query(Employee)
|
||||||
.order_by(desc(Employee.is_active))
|
.order_by(desc(Employee.is_active))
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
.gold {
|
||||||
|
color: gold;
|
||||||
|
}
|
@ -29,7 +29,13 @@
|
|||||||
<!-- Name Column -->
|
<!-- Name Column -->
|
||||||
<ng-container matColumnDef="name">
|
<ng-container matColumnDef="name">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Name</mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Name</mat-header-cell>
|
||||||
<mat-cell *matCellDef="let row"><a [routerLink]="['/employees', row.id]">{{row.name}}</a></mat-cell>
|
<mat-cell *matCellDef="let row">
|
||||||
|
<a [routerLink]="['/employees', row.id]">
|
||||||
|
<mat-icon matSuffix *ngIf="row.isStarred" class="gold">star
|
||||||
|
</mat-icon>
|
||||||
|
{{row.name}}
|
||||||
|
</a>
|
||||||
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<!-- Designation Column -->
|
<!-- Designation Column -->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user