feat: Added unchecked room highlighting. Resolves #11
This commit is contained in:
@@ -252,7 +252,7 @@ export class AdminCommService {
|
||||
return this.http.post<Status>(environment.apiEndpoint+`/admin/clean/attendence/${room}`, attendence, {withCredentials: true})
|
||||
},
|
||||
getSummary: () => {
|
||||
return this.http.get<{room: string, hours: string[], notes: string}[]>(environment.apiEndpoint+`/admin/clean/attendenceSummary`, {withCredentials: true})
|
||||
return this.http.get<{room: string, hours: string[], notes: string, auto: boolean}[]>(environment.apiEndpoint+`/admin/clean/attendenceSummary`, {withCredentials: true})
|
||||
},
|
||||
deleteRoom: (room: string) => {
|
||||
return this.http.delete<Status>(environment.apiEndpoint+`/admin/clean/attendence/${room}`, {withCredentials: true})
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</div>
|
||||
<div matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef>Usuń</th>
|
||||
<td mat-cell *matCellDef="let item"><button mat-mini-fab color="warn" (click)="delete(item.room)"><mat-icon>delete</mat-icon></button></td>
|
||||
<td mat-cell *matCellDef="let item"><button mat-mini-fab color="warn" (click)="delete(item.room)" *ngIf="!item.auto"><mat-icon>delete</mat-icon></button></td>
|
||||
</div>
|
||||
<tr mat-header-row *matHeaderRowDef="collumns"></tr>
|
||||
<tr mat-row *matRowDef="let rowData; columns: collumns"></tr>
|
||||
|
||||
@@ -11,7 +11,7 @@ import { AdminCommService } from '../../admin-comm.service';
|
||||
})
|
||||
export class AttendenceSummaryComponent implements OnInit {
|
||||
|
||||
data: MatTableDataSource<{room: string, hours: string[], notes: string}> = new MatTableDataSource<{room: string, hours: string[], notes: string}>();
|
||||
data: MatTableDataSource<{room: string, hours: string[], notes: string, auto: boolean}> = new MatTableDataSource<{room: string, hours: string[], notes: string, auto: boolean}>();
|
||||
collumns = ['room', 'hours', 'actions']
|
||||
|
||||
constructor (private toolbar: ToolbarService, private router: Router, private route: ActivatedRoute, private ac: AdminCommService) {
|
||||
|
||||
@@ -49,8 +49,8 @@ export class GradesComponent implements OnInit, OnDestroy {
|
||||
if (!this.filter(this.date)) this.date.isoWeekday(8);
|
||||
this.toolbar.comp = this
|
||||
this.toolbar.menu = [
|
||||
{ title: "Pokoje do sprawdzenia", check: true, fn: "attendenceSummary", icon: "overview"},
|
||||
{ title: "Podsumowanie", check: true, fn: "summary", icon: "analytics" },
|
||||
{ title: "Obecność", check: true, fn: "attendenceSummary", icon: "overview"}
|
||||
]
|
||||
this.form.valueChanges.subscribe((v) => {
|
||||
this.calculate()
|
||||
|
||||
Reference in New Issue
Block a user