From 862714596d184397d8776281061c8b8fa74523e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Andr=C3=A9?= Date: Mon, 17 Feb 2020 14:40:35 +0100 Subject: [PATCH] Affichage en version "tab" --- Front/skydivelogs-app/src/app/app.module.ts | 4 +- .../src/app/summary/summary.component.html | 262 +++++++++--------- .../src/app/summary/summary.component.ts | 22 +- 3 files changed, 143 insertions(+), 145 deletions(-) diff --git a/Front/skydivelogs-app/src/app/app.module.ts b/Front/skydivelogs-app/src/app/app.module.ts index 3d0af83..71b3b26 100644 --- a/Front/skydivelogs-app/src/app/app.module.ts +++ b/Front/skydivelogs-app/src/app/app.module.ts @@ -42,6 +42,7 @@ import { MatPaginatorModule } from '@angular/material/paginator'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { MatSelectModule } from '@angular/material/select'; import { MatTableModule } from '@angular/material/table'; +import { MatTabsModule } from '@angular/material/tabs'; import { RequestCache } from '../services/request-cache.service'; import { CachingInterceptor } from '../services/caching-interceptor.service'; @@ -94,7 +95,8 @@ const appRoutes: Routes = [ MatButtonModule, MatIconModule, MatAutocompleteModule, - MatProgressSpinnerModule + MatProgressSpinnerModule, + MatTabsModule ], exports: [HttpClientModule], providers: [ diff --git a/Front/skydivelogs-app/src/app/summary/summary.component.html b/Front/skydivelogs-app/src/app/summary/summary.component.html index c6b1afe..f2fea97 100644 --- a/Front/skydivelogs-app/src/app/summary/summary.component.html +++ b/Front/skydivelogs-app/src/app/summary/summary.component.html @@ -14,144 +14,140 @@ Date and location -
- - - - - - - - - -
{{element.label}}{{element.nb}}
- - - + + + + + + + + + + +
{{element.label}}{{element.nb}}
+ + + - - - - - - - - -
{{element.label}}{{element.nb}}
- - - -
+ + + + + + + + +
{{element.label}}{{element.nb}}
+ + + + -
- - - - - - - - - -
{{element.label}}{{element.nb}}
- - - + + + + + + + + + +
{{element.label}}{{element.nb}}
+ + + - - - - - - - - -
{{element.label}}{{element.nb}}
- - - -
+ + + + + + + + +
{{element.label}}{{element.nb}}
+ + + + -
- - - - - - - - - -
{{element.label}}{{element.nb}}
- - - -
+ + + + + + + + + +
{{element.label}}{{element.nb}}
+ + + +
-
- - - - - - - - - -
{{element.label}}{{element.nb}}
- - - -
+ + + + + + + + + +
{{element.label}}{{element.nb}}
+ + + +
-
- - - - - - - - - -
{{element.label}}{{element.nb}}
- - - -
+ + + + + + + + + +
{{element.label}}{{element.nb}}
+ + + +
-
- - - - - - - - - -
{{element.label}}{{element.nb}}
- - - -
+ + + + + + + + + +
{{element.label}}{{element.nb}}
+ + + +
-
- - - - - - - - - -
{{element.label}}{{element.nb}}
- - - -
+ + + + + + + + + +
{{element.label}}{{element.nb}}
+ + + +
+ diff --git a/Front/skydivelogs-app/src/app/summary/summary.component.ts b/Front/skydivelogs-app/src/app/summary/summary.component.ts index 448d175..7ddadc4 100644 --- a/Front/skydivelogs-app/src/app/summary/summary.component.ts +++ b/Front/skydivelogs-app/src/app/summary/summary.component.ts @@ -1,19 +1,19 @@ -import { Component, OnInit } from "@angular/core"; -import { MatTableDataSource } from "@angular/material/table"; -import { ServiceComm } from "../../services/service-comm.service"; -import { StatsService } from "../../services/stats.service"; +import { Component, OnInit } from '@angular/core'; +import { MatTableDataSource } from '@angular/material/table'; +import { ServiceComm } from '../../services/service-comm.service'; +import { StatsService } from '../../services/stats.service'; import { StatsByDzResp, StatsByAircraftResp, StatsByGearResp, StatsByJumpTypeResp, StatsByYearResp -} from "../../models/stats"; +} from '../../models/stats'; @Component({ - selector: "app-summary", - templateUrl: "./summary.component.html", - styleUrls: ["./summary.component.css"] + selector: 'app-summary', + templateUrl: './summary.component.html', + styleUrls: ['./summary.component.css'] }) export class SummaryComponent implements OnInit { public dsNbJumpByDz: MatTableDataSource; @@ -27,16 +27,16 @@ export class SummaryComponent implements OnInit { public dsJumpForLastMonthByJumpType: MatTableDataSource; private countDatasLoaded: number; - public displayedColumns: Array = ["label", "nb"]; + public displayedColumns: Array = ['label', 'nb']; constructor( private serviceApi: StatsService, private serviceComm: ServiceComm - ) {} + ) { } ngOnInit() { this.countDatasLoaded = 0; - this.serviceComm.UpdatedComponentTitle("Summary"); + this.serviceComm.UpdatedComponentTitle('Summary'); const statsResult = this.serviceApi.getStatsOfJumps();