Style dans la page de résumé
This commit is contained in:
@@ -57,7 +57,9 @@ export class ListOfDzsComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public setToFavorite(dropzone: DropZoneResp) {
|
public setToFavorite(dropzone: DropZoneResp) {
|
||||||
dropzone.isFavorite = this.serviceApi.SetFavoriteDropZone(dropzone);
|
dropzone.isFavorite = true;
|
||||||
|
this.serviceApi.SetFavoriteDropZone(dropzone);
|
||||||
|
|
||||||
const data = this.dataSourceTable.data;
|
const data = this.dataSourceTable.data;
|
||||||
data.sort((a, b) => (b.isFavorite ? 1 : 0) - (a.isFavorite ? 1 : 0));
|
data.sort((a, b) => (b.isFavorite ? 1 : 0) - (a.isFavorite ? 1 : 0));
|
||||||
this.dataSourceTable = new MatTableDataSource<DropZoneResp>(data);
|
this.dataSourceTable = new MatTableDataSource<DropZoneResp>(data);
|
||||||
@@ -65,7 +67,9 @@ export class ListOfDzsComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public removeToFavorite(dropzone: DropZoneResp) {
|
public removeToFavorite(dropzone: DropZoneResp) {
|
||||||
dropzone.isFavorite = !this.serviceApi.RemoveFavoriteDropZone(dropzone);
|
dropzone.isFavorite = false;
|
||||||
|
this.serviceApi.RemoveFavoriteDropZone(dropzone);
|
||||||
|
|
||||||
const data = this.dataSourceTable.data;
|
const data = this.dataSourceTable.data;
|
||||||
data.sort((a, b) => (b.isFavorite ? 1 : 0) - (a.isFavorite ? 1 : 0));
|
data.sort((a, b) => (b.isFavorite ? 1 : 0) - (a.isFavorite ? 1 : 0));
|
||||||
this.dataSourceTable = new MatTableDataSource<DropZoneResp>(data);
|
this.dataSourceTable = new MatTableDataSource<DropZoneResp>(data);
|
||||||
|
|||||||
@@ -36,3 +36,11 @@
|
|||||||
.mat-tab-group {
|
.mat-tab-group {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.containerFlex {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
.contentFlex {
|
||||||
|
flex: 45%;
|
||||||
|
}
|
||||||
@@ -16,45 +16,61 @@
|
|||||||
|
|
||||||
<mat-tab-group mat-align-tabs="left" animationDuration="0ms">
|
<mat-tab-group mat-align-tabs="left" animationDuration="0ms">
|
||||||
<mat-tab label="Jumps in the last month">
|
<mat-tab label="Jumps in the last month">
|
||||||
<table mat-table [dataSource]="dsJumpForLastMonthByDz">
|
<div class="containerFlex">
|
||||||
<ng-container matColumnDef="label">
|
<fieldset class="contentFlex">
|
||||||
<td mat-cell *matCellDef="let element">{{element.label}}</td>
|
<legend>By DZ</legend>
|
||||||
</ng-container>
|
<table mat-table [dataSource]="dsJumpForLastMonthByDz">
|
||||||
<ng-container matColumnDef="nb">
|
<ng-container matColumnDef="label">
|
||||||
<td mat-cell *matCellDef="let element">{{element.nb}}</td>
|
<td mat-cell *matCellDef="let element">{{element.label}}</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
<ng-container matColumnDef="nb">
|
||||||
</table>
|
<td mat-cell *matCellDef="let element">{{element.nb}}</td>
|
||||||
<table mat-table [dataSource]="dsJumpForLastMonthByJumpType">
|
</ng-container>
|
||||||
<ng-container matColumnDef="label">
|
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||||
<td mat-cell *matCellDef="let element">{{element.label}}</td>
|
</table>
|
||||||
</ng-container>
|
</fieldset>
|
||||||
<ng-container matColumnDef="nb">
|
<fieldset class="contentFlex">
|
||||||
<td mat-cell *matCellDef="let element">{{element.nb}}</td>
|
<legend>By jump type</legend>
|
||||||
</ng-container>
|
<table mat-table [dataSource]="dsJumpForLastMonthByJumpType">
|
||||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
<ng-container matColumnDef="label">
|
||||||
</table>
|
<td mat-cell *matCellDef="let element">{{element.label}}</td>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container matColumnDef="nb">
|
||||||
|
<td mat-cell *matCellDef="let element">{{element.nb}}</td>
|
||||||
|
</ng-container>
|
||||||
|
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
|
|
||||||
<mat-tab label="Jumps in the last year">
|
<mat-tab label="Jumps in the last year">
|
||||||
<table mat-table [dataSource]="dsJumpForLastYearByDz">
|
<div class="containerFlex">
|
||||||
<ng-container matColumnDef="label">
|
<fieldset class="contentFlex">
|
||||||
<td mat-cell *matCellDef="let element">{{element.label}}</td>
|
<legend>By DZ</legend>
|
||||||
</ng-container>
|
<table mat-table [dataSource]="dsJumpForLastYearByDz">
|
||||||
<ng-container matColumnDef="nb">
|
<ng-container matColumnDef="label">
|
||||||
<td mat-cell *matCellDef="let element">{{element.nb}}</td>
|
<td mat-cell *matCellDef="let element">{{element.label}}</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
<ng-container matColumnDef="nb">
|
||||||
</table>
|
<td mat-cell *matCellDef="let element">{{element.nb}}</td>
|
||||||
<table mat-table [dataSource]="dsJumpForLastYearByJumpType">
|
</ng-container>
|
||||||
<ng-container matColumnDef="label">
|
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||||
<td mat-cell *matCellDef="let element">{{element.label}}</td>
|
</table>
|
||||||
</ng-container>
|
</fieldset>
|
||||||
<ng-container matColumnDef="nb">
|
<fieldset class="contentFlex">
|
||||||
<td mat-cell *matCellDef="let element">{{element.nb}}</td>
|
<legend>By jump type</legend>
|
||||||
</ng-container>
|
<table mat-table [dataSource]="dsJumpForLastYearByJumpType">
|
||||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
<ng-container matColumnDef="label">
|
||||||
</table>
|
<td mat-cell *matCellDef="let element">{{element.label}}</td>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container matColumnDef="nb">
|
||||||
|
<td mat-cell *matCellDef="let element">{{element.nb}}</td>
|
||||||
|
</ng-container>
|
||||||
|
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
|
|
||||||
<mat-tab label="By DZ">
|
<mat-tab label="By DZ">
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<div class="content containerFlex">
|
<div class="content containerFlex">
|
||||||
|
|
||||||
<fieldset class="contentFlex">
|
<fieldset class="contentFlex">
|
||||||
<legend>Profile</legend>
|
<legend>Profile</legend>
|
||||||
<form [formGroup]="userForm" (ngSubmit)="onSubmit(userForm.value)">
|
<form [formGroup]="userForm" (ngSubmit)="onSubmit(userForm.value)">
|
||||||
|
|||||||
Reference in New Issue
Block a user