Weiter geht´s

This commit is contained in:
DanielKirchmeier
2022-10-22 13:38:14 +02:00
parent 1e0d164422
commit 0d6ff7ea46
22 changed files with 387 additions and 192 deletions

View File

@@ -2,20 +2,6 @@
width: 100%;
}
.row-is-clicked {
color: red;
background: #472ddb;
font-weight: bold;
}
.mat-row.hovered {
background: rgb(228, 238, 255);
}
.mat-row.highlighted {
background: #d04b2d;
font-weight: bold;
}
.radiogruppe {
vertical-align: middle;
text-align: left;;
@@ -24,4 +10,4 @@
vertical-align: bottom;
margin-left: 8px;
margin-top: 10px;
}
}

View File

@@ -71,11 +71,11 @@
<div class="ergebnis col-6">
<table mat-table [dataSource]="ergdataSource" matSort (matSortChange)="ergannounceSortChange($event)" class="mat-elevation-z8">
<ng-container matColumnDef="firstname">
<th class="kopf col-3" mat-sort-header mat-header-cell *matHeaderCellDef> Vorname </th>
<th class="kopf col-2" mat-sort-header mat-header-cell *matHeaderCellDef> Vorname </th>
<td mat-cell *matCellDef="let pers"> {{pers.firstname}} </td>
</ng-container>
<ng-container matColumnDef="lastname">
<th class="kopf col-3" mat-sort-header mat-header-cell *matHeaderCellDef> Nachname </th>
<th class="kopf col-2" mat-sort-header mat-header-cell *matHeaderCellDef> Nachname </th>
<td mat-cell *matCellDef="let pers"> {{pers.lastname}} </td>
</ng-container>
<ng-container matColumnDef="date_of_exam">
@@ -83,12 +83,14 @@
<td mat-cell class="text-left" *matCellDef="let pers"> {{pers.date_of_exam | date:'d.M.y'}} </td>
</ng-container>
<ng-container matColumnDef="acquired">
<th class="kopf text-center col-4" mat-sort-header mat-header-cell *matHeaderCellDef>Bestanden </th>
<mat-radio-group class="radiogruppe" *matCellDef="let pers" [(ngModel)]="pers.acquired">
<mat-radio-button class="radioknopf" value="0">ja </mat-radio-button>
<mat-radio-button class="radioknopf" value="0">nein</mat-radio-button>
</mat-radio-group>
</ng-container>
<th class="kopf text-center col-6" mat-sort-header mat-header-cell *matHeaderCellDef>Bestanden </th>
<mat-slider class="notenslider" *matCellDef="let pers" [(ngModel)]="pers.acquired"
thumbLabel
[displayWith]="formatLabel"
tickInterval="1"
min="1"
max="5"></mat-slider>
</ng-container>
<tr mat-header-row *matHeaderRowDef="ergdisplayedColumns"></tr>
<tr mat-row
*matRowDef="let persrow; columns: ergdisplayedColumns;"

View File

@@ -32,6 +32,16 @@ export class PrergebnisComponent implements OnInit {
private _liveAnnouncer: LiveAnnouncer,
private _ergliveAnnouncer: LiveAnnouncer) { }
formatLabel(value: number | null) {
if (!value) {
return 0;
}
if (value >= 3) {
// da wäre schön, die Farbe zu ändern
}
return value;
}
public dataSource: any;
public ergdataSource: any;
@@ -111,7 +121,7 @@ export class PrergebnisComponent implements OnInit {
if(this.ergdataSource != undefined) {
this.ergdataSource.ergpaginator = this.ergpaginator;
this.ergdataSource.ergsort = this.ergsort;
console.log(this.ergdataSource);
console.log("ErgDatasource: " + this.ergdataSource);
}
else
console.log("Erg Datasource ist undefined in AfterViewInit");
@@ -119,7 +129,7 @@ export class PrergebnisComponent implements OnInit {
if(this.dataSource != undefined) {
this.dataSource.paginator = this.paginator;
this.dataSource.sort = this.sort;
console.log(this.dataSource);
console.log("Datasource: " + this.dataSource);
}
else
console.log("DataSource undefined in AfterViewInit");