Ajout dans la page "Summary" d'un onglet pour avoir les stats "ByYearByJumpType" (début)
This commit is contained in:
@@ -1,52 +1,61 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<label class="left160">{{ 'Summary_TotalJumps' | translate }}</label>
|
<label class="left160">{{ "Summary_TotalJumps" | translate }}</label>
|
||||||
<span>: {{ totalJumps }}</span>
|
<span>: {{ totalJumps }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<label class="left160">{{ 'Summary_TotalCutaways' | translate }}</label>
|
<label class="left160">{{ "Summary_TotalCutaways" | translate }}</label>
|
||||||
<span>: {{ totalCutaways }}</span>
|
<span>: {{ totalCutaways }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<label class="left160">{{ 'Summary_LastJump' | translate }}</label>
|
<label class="left160">{{ "Summary_LastJump" | translate }}</label>
|
||||||
<span>: {{ lastJump }}</span>
|
<span>: {{ lastJump }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="paragraph" style="margin-top: 20px;">
|
<div class="paragraph" style="margin-top: 20px">
|
||||||
<label class="left160">{{ 'Summary_Refresh' | translate }}</label>
|
<label class="left160">{{ "Summary_Refresh" | translate }}</label>
|
||||||
<mat-icon aria-hidden="false" aria-label="Force the refresh of the stats" style="cursor: pointer;"
|
<mat-icon
|
||||||
(click)='refreshStats()'>cached</mat-icon>
|
aria-hidden="false"
|
||||||
|
aria-label="Force the refresh of the stats"
|
||||||
|
style="cursor: pointer"
|
||||||
|
(click)="refreshStats()"
|
||||||
|
>cached</mat-icon
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<mat-tab-group mat-align-tabs="left" animationDuration="0ms"
|
<mat-tab-group
|
||||||
(selectedIndex)="0" (selectedTabChange)="onTabChanged($event);">
|
mat-align-tabs="left"
|
||||||
|
animationDuration="0ms"
|
||||||
|
(selectedIndex)="(0)"
|
||||||
|
(selectedTabChange)="onTabChanged($event)"
|
||||||
|
>
|
||||||
<mat-tab label="{{ 'Summary_LastMonth_Title' | translate }}">
|
<mat-tab label="{{ 'Summary_LastMonth_Title' | translate }}">
|
||||||
<ng-template matTabContent>
|
<ng-template matTabContent>
|
||||||
<div class="containerFlex">
|
<div class="containerFlex">
|
||||||
<fieldset class="contentFlex">
|
<fieldset class="contentFlex">
|
||||||
<legend>{{ 'Summary_LastMonth_ByDz' | translate }}</legend>
|
<legend>{{ "Summary_LastMonth_ByDz" | translate }}</legend>
|
||||||
<table mat-table [dataSource]="dsJumpForLastMonthByDz">
|
<table mat-table [dataSource]="dsJumpForLastMonthByDz">
|
||||||
<ng-container matColumnDef="label">
|
<ng-container matColumnDef="label">
|
||||||
<td mat-cell *matCellDef="let element">{{element.label}}</td>
|
<td mat-cell *matCellDef="let element">{{ element.label }}</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container matColumnDef="nb">
|
<ng-container matColumnDef="nb">
|
||||||
<td mat-cell *matCellDef="let element">{{element.nb}}</td>
|
<td mat-cell *matCellDef="let element">{{ element.nb }}</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
||||||
</table>
|
</table>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset class="contentFlex">
|
<fieldset class="contentFlex">
|
||||||
<legend>{{ 'Summary_LastMonth_ByJumpType' | translate }}</legend>
|
<legend>{{ "Summary_LastMonth_ByJumpType" | translate }}</legend>
|
||||||
<table mat-table [dataSource]="dsJumpForLastMonthByJumpType">
|
<table mat-table [dataSource]="dsJumpForLastMonthByJumpType">
|
||||||
<ng-container matColumnDef="label">
|
<ng-container matColumnDef="label">
|
||||||
<td mat-cell *matCellDef="let element">{{element.label}}</td>
|
<td mat-cell *matCellDef="let element">{{ element.label }}</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container matColumnDef="nb">
|
<ng-container matColumnDef="nb">
|
||||||
<td mat-cell *matCellDef="let element">{{element.nb}}</td>
|
<td mat-cell *matCellDef="let element">{{ element.nb }}</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
||||||
</table>
|
</table>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
@@ -57,27 +66,27 @@
|
|||||||
<ng-template matTabContent>
|
<ng-template matTabContent>
|
||||||
<div class="containerFlex">
|
<div class="containerFlex">
|
||||||
<fieldset class="contentFlex">
|
<fieldset class="contentFlex">
|
||||||
<legend>{{ 'Summary_LastYear_ByDz' | translate }}</legend>
|
<legend>{{ "Summary_LastYear_ByDz" | translate }}</legend>
|
||||||
<table mat-table [dataSource]="dsJumpForLastYearByDz">
|
<table mat-table [dataSource]="dsJumpForLastYearByDz">
|
||||||
<ng-container matColumnDef="label">
|
<ng-container matColumnDef="label">
|
||||||
<td mat-cell *matCellDef="let element">{{element.label}}</td>
|
<td mat-cell *matCellDef="let element">{{ element.label }}</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container matColumnDef="nb">
|
<ng-container matColumnDef="nb">
|
||||||
<td mat-cell *matCellDef="let element">{{element.nb}}</td>
|
<td mat-cell *matCellDef="let element">{{ element.nb }}</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
||||||
</table>
|
</table>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset class="contentFlex">
|
<fieldset class="contentFlex">
|
||||||
<legend>{{ 'Summary_LastYear_ByJumpType' | translate }}</legend>
|
<legend>{{ "Summary_LastYear_ByJumpType" | translate }}</legend>
|
||||||
<table mat-table [dataSource]="dsJumpForLastYearByJumpType">
|
<table mat-table [dataSource]="dsJumpForLastYearByJumpType">
|
||||||
<ng-container matColumnDef="label">
|
<ng-container matColumnDef="label">
|
||||||
<td mat-cell *matCellDef="let element">{{element.label}}</td>
|
<td mat-cell *matCellDef="let element">{{ element.label }}</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container matColumnDef="nb">
|
<ng-container matColumnDef="nb">
|
||||||
<td mat-cell *matCellDef="let element">{{element.nb}}</td>
|
<td mat-cell *matCellDef="let element">{{ element.nb }}</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
||||||
</table>
|
</table>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
@@ -88,12 +97,12 @@
|
|||||||
<ng-template matTabContent>
|
<ng-template matTabContent>
|
||||||
<table mat-table [dataSource]="dsNbJumpByDz">
|
<table mat-table [dataSource]="dsNbJumpByDz">
|
||||||
<ng-container matColumnDef="label">
|
<ng-container matColumnDef="label">
|
||||||
<td mat-cell *matCellDef="let element">{{element.label}}</td>
|
<td mat-cell *matCellDef="let element">{{ element.label }}</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container matColumnDef="nb">
|
<ng-container matColumnDef="nb">
|
||||||
<td mat-cell *matCellDef="let element">{{element.nb}}</td>
|
<td mat-cell *matCellDef="let element">{{ element.nb }}</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
||||||
</table>
|
</table>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
@@ -102,12 +111,12 @@
|
|||||||
<ng-template matTabContent>
|
<ng-template matTabContent>
|
||||||
<table mat-table [dataSource]="dsNbJumpByAircraft">
|
<table mat-table [dataSource]="dsNbJumpByAircraft">
|
||||||
<ng-container matColumnDef="label">
|
<ng-container matColumnDef="label">
|
||||||
<td mat-cell *matCellDef="let element">{{element.label}}</td>
|
<td mat-cell *matCellDef="let element">{{ element.label }}</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container matColumnDef="nb">
|
<ng-container matColumnDef="nb">
|
||||||
<td mat-cell *matCellDef="let element">{{element.nb}}</td>
|
<td mat-cell *matCellDef="let element">{{ element.nb }}</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
||||||
</table>
|
</table>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
@@ -116,12 +125,12 @@
|
|||||||
<ng-template matTabContent>
|
<ng-template matTabContent>
|
||||||
<table mat-table [dataSource]="dsNbJumpByGear">
|
<table mat-table [dataSource]="dsNbJumpByGear">
|
||||||
<ng-container matColumnDef="label">
|
<ng-container matColumnDef="label">
|
||||||
<td mat-cell *matCellDef="let element">{{element.label}}</td>
|
<td mat-cell *matCellDef="let element">{{ element.label }}</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container matColumnDef="nb">
|
<ng-container matColumnDef="nb">
|
||||||
<td mat-cell *matCellDef="let element">{{element.nb}}</td>
|
<td mat-cell *matCellDef="let element">{{ element.nb }}</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
||||||
</table>
|
</table>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
@@ -130,12 +139,12 @@
|
|||||||
<ng-template matTabContent>
|
<ng-template matTabContent>
|
||||||
<table mat-table [dataSource]="dsNbJumpByType">
|
<table mat-table [dataSource]="dsNbJumpByType">
|
||||||
<ng-container matColumnDef="label">
|
<ng-container matColumnDef="label">
|
||||||
<td mat-cell *matCellDef="let element">{{element.label}}</td>
|
<td mat-cell *matCellDef="let element">{{ element.label }}</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container matColumnDef="nb">
|
<ng-container matColumnDef="nb">
|
||||||
<td mat-cell *matCellDef="let element">{{element.nb}}</td>
|
<td mat-cell *matCellDef="let element">{{ element.nb }}</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
||||||
</table>
|
</table>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
@@ -144,12 +153,26 @@
|
|||||||
<ng-template matTabContent>
|
<ng-template matTabContent>
|
||||||
<table mat-table [dataSource]="dsNbJumpByYear">
|
<table mat-table [dataSource]="dsNbJumpByYear">
|
||||||
<ng-container matColumnDef="label">
|
<ng-container matColumnDef="label">
|
||||||
<td mat-cell *matCellDef="let element">{{element.label}}</td>
|
<td mat-cell *matCellDef="let element">{{ element.label }}</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container matColumnDef="nb">
|
<ng-container matColumnDef="nb">
|
||||||
<td mat-cell *matCellDef="let element">{{element.nb}}</td>
|
<td mat-cell *matCellDef="let element">{{ element.nb }}</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
||||||
|
</table>
|
||||||
|
</ng-template>
|
||||||
|
</mat-tab>
|
||||||
|
|
||||||
|
<mat-tab label="{{ 'Summary_ByYearByJumpType_Title' | translate }}">
|
||||||
|
<ng-template matTabContent>
|
||||||
|
<table mat-table [dataSource]="dsNbJumpByYearByJumpType">
|
||||||
|
<ng-container matColumnDef="label">
|
||||||
|
<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>
|
</table>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
|
|||||||
@@ -1,67 +1,77 @@
|
|||||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
import { Component, OnInit, ViewChild } from "@angular/core";
|
||||||
import { MatTableDataSource } from '@angular/material/table';
|
import { MatTableDataSource } from "@angular/material/table";
|
||||||
import { MatTabChangeEvent, MatTabGroup } from '@angular/material/tabs';
|
import { MatTabChangeEvent, MatTabGroup } from "@angular/material/tabs";
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from "@ngx-translate/core";
|
||||||
import { DatePipe } from '@angular/common';
|
import { DatePipe } from "@angular/common";
|
||||||
|
|
||||||
import { ServiceComm } from '../../services/service-comm.service';
|
import { ServiceComm } from "../../services/service-comm.service";
|
||||||
import { StatsService } from '../../services/stats.service';
|
import { StatsService } from "../../services/stats.service";
|
||||||
import { StatsByDzResp, StatsByAircraftResp, StatsByGearResp,
|
import {
|
||||||
StatsByJumpTypeResp, StatsByYearResp } from '../../models/stats';
|
StatsByDzResp,
|
||||||
|
StatsByAircraftResp,
|
||||||
|
StatsByGearResp,
|
||||||
|
StatsByJumpTypeResp,
|
||||||
|
StatsByYearResp,
|
||||||
|
} from "../../models/stats";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-summary',
|
selector: "app-summary",
|
||||||
templateUrl: './summary.component.html',
|
templateUrl: "./summary.component.html",
|
||||||
styleUrls: ['./summary.component.css']
|
styleUrls: ["./summary.component.css"],
|
||||||
})
|
})
|
||||||
|
|
||||||
export class SummaryComponent implements OnInit {
|
export class SummaryComponent implements OnInit {
|
||||||
public dsNbJumpByDz: MatTableDataSource<StatsByDzResp>;
|
public dsNbJumpByDz: MatTableDataSource<StatsByDzResp>;
|
||||||
public dsNbJumpByAircraft: MatTableDataSource<StatsByAircraftResp>;
|
public dsNbJumpByAircraft: MatTableDataSource<StatsByAircraftResp>;
|
||||||
public dsNbJumpByGear: MatTableDataSource<StatsByGearResp>;
|
public dsNbJumpByGear: MatTableDataSource<StatsByGearResp>;
|
||||||
public dsNbJumpByType: MatTableDataSource<StatsByJumpTypeResp>;
|
public dsNbJumpByType: MatTableDataSource<StatsByJumpTypeResp>;
|
||||||
public dsNbJumpByYear: MatTableDataSource<StatsByYearResp>;
|
public dsNbJumpByYear: MatTableDataSource<StatsByYearResp>;
|
||||||
|
public dsNbJumpByYearByJumpType: MatTableDataSource<StatsByYearResp>;
|
||||||
public dsJumpForLastYearByDz: MatTableDataSource<StatsByDzResp>;
|
public dsJumpForLastYearByDz: MatTableDataSource<StatsByDzResp>;
|
||||||
public dsJumpForLastYearByJumpType: MatTableDataSource<StatsByJumpTypeResp>;
|
public dsJumpForLastYearByJumpType: MatTableDataSource<StatsByJumpTypeResp>;
|
||||||
public dsJumpForLastMonthByDz: MatTableDataSource<StatsByDzResp>;
|
public dsJumpForLastMonthByDz: MatTableDataSource<StatsByDzResp>;
|
||||||
public dsJumpForLastMonthByJumpType: MatTableDataSource<StatsByJumpTypeResp>;
|
public dsJumpForLastMonthByJumpType: MatTableDataSource<StatsByJumpTypeResp>;
|
||||||
|
|
||||||
public displayedColumns: Array<string> = ['label', 'nb'];
|
public displayedColumns: Array<string> = ["label", "nb"];
|
||||||
|
|
||||||
public totalJumps: number;
|
public totalJumps: number;
|
||||||
public totalCutaways: number;
|
public totalCutaways: number;
|
||||||
public lastJump: string;
|
public lastJump: string;
|
||||||
@ViewChild(MatTabGroup) tabGroup: MatTabGroup;
|
@ViewChild(MatTabGroup) tabGroup: MatTabGroup;
|
||||||
|
|
||||||
constructor(private serviceApi: StatsService,
|
constructor(
|
||||||
private serviceComm: ServiceComm,
|
private serviceApi: StatsService,
|
||||||
private translateService: TranslateService) { }
|
private serviceComm: ServiceComm,
|
||||||
|
private translateService: TranslateService
|
||||||
|
) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.serviceComm.forceTranslateTitle.subscribe((data)=> {
|
this.serviceComm.forceTranslateTitle.subscribe((data) => {
|
||||||
if (data === true){
|
if (data === true) {
|
||||||
this.updateTitle();
|
this.updateTitle();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.updateTitle();
|
this.updateTitle();
|
||||||
|
|
||||||
this.serviceApi.getSimpleSummary()
|
this.serviceApi.getSimpleSummary().subscribe((data) => {
|
||||||
.subscribe(data => {
|
this.totalJumps = data.totalJumps;
|
||||||
this.totalJumps = data.totalJumps;
|
this.totalCutaways = data.totalCutaways;
|
||||||
this.totalCutaways = data.totalCutaways;
|
|
||||||
|
|
||||||
const datepipe: DatePipe = new DatePipe('en-US')
|
const datepipe: DatePipe = new DatePipe("en-US");
|
||||||
let formattedDate = datepipe.transform(data.lastJump.jumpDate, 'EEEE dd MMMM YYYY')
|
let formattedDate = datepipe.transform(
|
||||||
this.lastJump = formattedDate + ' (' + data.lastJump.dropZone.name + ')';
|
data.lastJump.jumpDate,
|
||||||
});
|
"EEEE dd MMMM YYYY"
|
||||||
|
);
|
||||||
|
this.lastJump = formattedDate + " (" + data.lastJump.dropZone.name + ")";
|
||||||
|
});
|
||||||
|
|
||||||
this.serviceApi.getStatsOfLastMonth()
|
this.serviceApi.getStatsOfLastMonth().subscribe((data) => {
|
||||||
.subscribe(data => {
|
data.byDz.sort((a, b) => b.nb - a.nb);
|
||||||
data.byDz.sort((a, b) => b.nb - a.nb );
|
this.dsJumpForLastMonthByDz = new MatTableDataSource(data.byDz);
|
||||||
this.dsJumpForLastMonthByDz = new MatTableDataSource(data.byDz);
|
data.byJumpType.sort((a, b) => b.nb - a.nb);
|
||||||
data.byJumpType.sort((a, b) => b.nb - a.nb );
|
this.dsJumpForLastMonthByJumpType = new MatTableDataSource(
|
||||||
this.dsJumpForLastMonthByJumpType = new MatTableDataSource(data.byJumpType);
|
data.byJumpType
|
||||||
});
|
);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public refreshStats() {
|
public refreshStats() {
|
||||||
@@ -72,64 +82,67 @@ export class SummaryComponent implements OnInit {
|
|||||||
public onTabChanged(event: MatTabChangeEvent) {
|
public onTabChanged(event: MatTabChangeEvent) {
|
||||||
switch (event.index) {
|
switch (event.index) {
|
||||||
case 0:
|
case 0:
|
||||||
this.serviceApi.getStatsOfLastMonth()
|
this.serviceApi.getStatsOfLastMonth().subscribe((data) => {
|
||||||
.subscribe(data => {
|
data.byDz.sort((a, b) => b.nb - a.nb);
|
||||||
data.byDz.sort((a, b) => b.nb - a.nb );
|
this.dsJumpForLastMonthByDz = new MatTableDataSource(data.byDz);
|
||||||
this.dsJumpForLastMonthByDz = new MatTableDataSource(data.byDz);
|
data.byJumpType.sort((a, b) => b.nb - a.nb);
|
||||||
data.byJumpType.sort((a, b) => b.nb - a.nb );
|
this.dsJumpForLastMonthByJumpType = new MatTableDataSource(
|
||||||
this.dsJumpForLastMonthByJumpType = new MatTableDataSource(data.byJumpType);
|
data.byJumpType
|
||||||
});
|
);
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
this.serviceApi.getStatsOfLastYear()
|
this.serviceApi.getStatsOfLastYear().subscribe((data) => {
|
||||||
.subscribe(data => {
|
data.byDz.sort((a, b) => b.nb - a.nb);
|
||||||
data.byDz.sort((a, b) => b.nb - a.nb );
|
this.dsJumpForLastYearByDz = new MatTableDataSource(data.byDz);
|
||||||
this.dsJumpForLastYearByDz = new MatTableDataSource(data.byDz);
|
data.byJumpType.sort((a, b) => b.nb - a.nb);
|
||||||
data.byJumpType.sort((a, b) => b.nb - a.nb );
|
this.dsJumpForLastYearByJumpType = new MatTableDataSource(
|
||||||
this.dsJumpForLastYearByJumpType = new MatTableDataSource(data.byJumpType);
|
data.byJumpType
|
||||||
});
|
);
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
this.serviceApi.getStatsByDz()
|
this.serviceApi.getStatsByDz().subscribe((data) => {
|
||||||
.subscribe(data => {
|
data.sort((a, b) => b.nb - a.nb);
|
||||||
data.sort((a, b) => b.nb - a.nb);
|
this.dsNbJumpByDz = new MatTableDataSource(data);
|
||||||
this.dsNbJumpByDz = new MatTableDataSource(data);
|
});
|
||||||
});
|
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
this.serviceApi.getStatsByAircraft()
|
this.serviceApi.getStatsByAircraft().subscribe((data) => {
|
||||||
.subscribe(data => {
|
data.sort((a, b) => b.nb - a.nb);
|
||||||
data.sort((a, b) => b.nb - a.nb);
|
this.dsNbJumpByAircraft = new MatTableDataSource(data);
|
||||||
this.dsNbJumpByAircraft = new MatTableDataSource(data);
|
});
|
||||||
});
|
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
this.serviceApi.getStatsByGear()
|
this.serviceApi.getStatsByGear().subscribe((data) => {
|
||||||
.subscribe(data => {
|
data.sort((a, b) => b.nb - a.nb);
|
||||||
data.sort((a, b) => b.nb - a.nb);
|
this.dsNbJumpByGear = new MatTableDataSource(data);
|
||||||
this.dsNbJumpByGear = new MatTableDataSource(data);
|
});
|
||||||
});
|
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
this.serviceApi.getStatsByJumpType()
|
this.serviceApi.getStatsByJumpType().subscribe((data) => {
|
||||||
.subscribe(data => {
|
data.sort((a, b) => b.nb - a.nb);
|
||||||
data.sort((a, b) => b.nb - a.nb);
|
this.dsNbJumpByType = new MatTableDataSource(data);
|
||||||
this.dsNbJumpByType = new MatTableDataSource(data);
|
});
|
||||||
});
|
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
this.serviceApi.getStatsByYear()
|
this.serviceApi.getStatsByYear().subscribe((data) => {
|
||||||
.subscribe(data => {
|
data.sort((a, b) => b.label.localeCompare(a.label));
|
||||||
data.sort((a, b) => b.label.localeCompare(a.label));
|
this.dsNbJumpByYear = new MatTableDataSource(data);
|
||||||
this.dsNbJumpByYear = new MatTableDataSource(data);
|
});
|
||||||
});
|
break;
|
||||||
|
case 7:
|
||||||
|
this.serviceApi.getStatsByYearByJumpType().subscribe((data) => {
|
||||||
|
data.sort((a, b) => b.label.localeCompare(a.label));
|
||||||
|
this.dsNbJumpByYearByJumpType = new MatTableDataSource(data);
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private updateTitle() {
|
private updateTitle() {
|
||||||
this.translateService.get("Summary_Title").subscribe(
|
this.translateService.get("Summary_Title").subscribe((data) => {
|
||||||
data => { this.serviceComm.updatedComponentTitle(data); }
|
this.serviceComm.updatedComponentTitle(data);
|
||||||
);
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,133 +1,134 @@
|
|||||||
{
|
{
|
||||||
"Login_Title" : "Login to the Skydive log",
|
"Login_Title": "Login to the Skydive log",
|
||||||
"Login_Tab_CreateUser" : "Create and login a user",
|
"Login_Tab_CreateUser": "Create and login a user",
|
||||||
"Login_Tab_WithUser" : "Login with a user",
|
"Login_Tab_WithUser": "Login with a user",
|
||||||
|
|
||||||
"LoginUser_BtnLogin" : "Login",
|
"LoginUser_BtnLogin": "Login",
|
||||||
"LoginUser_PasswordPattern" : "The pattern of the password ([A-Za-z0-9_-] {{ '{' }}8,15{{ '}' }})",
|
"LoginUser_PasswordPattern": "The pattern of the password ([A-Za-z0-9_-] {{ '{' }}8,15{{ '}' }})",
|
||||||
"LoginUser_PasswordRequired" : "Password is required",
|
"LoginUser_PasswordRequired": "Password is required",
|
||||||
"LoginUser_Password" : "Password",
|
"LoginUser_Password": "Password",
|
||||||
"LoginUser_Username" : "Username",
|
"LoginUser_Username": "Username",
|
||||||
"LoginUser_UsernamePattern" : "Username must have min 3 characters",
|
"LoginUser_UsernamePattern": "Username must have min 3 characters",
|
||||||
"LoginUser_UsernameRequired" : "Username is required",
|
"LoginUser_UsernameRequired": "Username is required",
|
||||||
|
|
||||||
"LoginCreateUser_Firstname" : "Firstname",
|
"LoginCreateUser_Firstname": "Firstname",
|
||||||
"LoginCreateUser_FirstnameRequired" : "Firstname is required",
|
"LoginCreateUser_FirstnameRequired": "Firstname is required",
|
||||||
"LoginCreateUser_FirstnamePattern" : "Firstname must have min 3 characters",
|
"LoginCreateUser_FirstnamePattern": "Firstname must have min 3 characters",
|
||||||
"LoginCreateUser_Lastname" : "Lastname",
|
"LoginCreateUser_Lastname": "Lastname",
|
||||||
"LoginCreateUser_LastnameRequired" : "Lastname is required",
|
"LoginCreateUser_LastnameRequired": "Lastname is required",
|
||||||
"LoginCreateUser_LastnamePattern" : "Lastname must have min 3 characters",
|
"LoginCreateUser_LastnamePattern": "Lastname must have min 3 characters",
|
||||||
"LoginCreateUser_Email" : "E-mail",
|
"LoginCreateUser_Email": "E-mail",
|
||||||
"LoginCreateUser_EmailRequired" : "E-mail is required",
|
"LoginCreateUser_EmailRequired": "E-mail is required",
|
||||||
"LoginCreateUser_EmailPattern" : "It's not a e-mail",
|
"LoginCreateUser_EmailPattern": "It's not a e-mail",
|
||||||
"LoginCreateUser_Username" : "Username",
|
"LoginCreateUser_Username": "Username",
|
||||||
"LoginCreateUser_UsernameRequired" : "Username is required",
|
"LoginCreateUser_UsernameRequired": "Username is required",
|
||||||
"LoginCreateUser_UsernamePattern" : "Username must have min 3 characters",
|
"LoginCreateUser_UsernamePattern": "Username must have min 3 characters",
|
||||||
"LoginCreateUser_Password" : "Password",
|
"LoginCreateUser_Password": "Password",
|
||||||
"LoginCreateUser_PasswordRequired" : "Password is required",
|
"LoginCreateUser_PasswordRequired": "Password is required",
|
||||||
"LoginCreateUser_PasswordPattern" : "The pattern of the password ([A-Za-z0-9_-|/]{{ '{' }}8,15{{ '}' }})",
|
"LoginCreateUser_PasswordPattern": "The pattern of the password ([A-Za-z0-9_-|/]{{ '{' }}8,15{{ '}' }})",
|
||||||
"LoginCreateUser_BtnLogin" : "Create user and login",
|
"LoginCreateUser_BtnLogin": "Create user and login",
|
||||||
|
|
||||||
"Default_Title" : "Home",
|
"Default_Title": "Home",
|
||||||
"ListDz_Title" : "List of DZs",
|
"ListDz_Title": "List of DZs",
|
||||||
"Summary_Title" : "Summary",
|
"Summary_Title": "Summary",
|
||||||
"NewJump_Title" : "New jumps",
|
"NewJump_Title": "New jumps",
|
||||||
"ListJumps_Title" : "List of jumps",
|
"ListJumps_Title": "List of jumps",
|
||||||
"ListJumpTypes_Title" : "List of jump types",
|
"ListJumpTypes_Title": "List of jump types",
|
||||||
"ListGears_Title" : "List of gears",
|
"ListGears_Title": "List of gears",
|
||||||
"ListAircrafts_Title" : "List of aircrafts",
|
"ListAircrafts_Title": "List of aircrafts",
|
||||||
"NewTunnelFlight_Title" : "New tunnel flights",
|
"NewTunnelFlight_Title": "New tunnel flights",
|
||||||
"ListTunnelFlight_Title" : "List of hours of tunnel",
|
"ListTunnelFlight_Title": "List of hours of tunnel",
|
||||||
|
|
||||||
"App_Footer" : "Web software to log your skydive jumps - v",
|
"App_Footer": "Web software to log your skydive jumps - v",
|
||||||
"App_Nav_Summary" : "Summary",
|
"App_Nav_Summary": "Summary",
|
||||||
"App_Nav_Jumps" : "List of jumps",
|
"App_Nav_Jumps": "List of jumps",
|
||||||
"App_Nav_NewJump" : "Add a new jump",
|
"App_Nav_NewJump": "Add a new jump",
|
||||||
"App_Nav_Dzs" : "List of DZs",
|
"App_Nav_Dzs": "List of DZs",
|
||||||
"App_Nav_Aircrafts" : "List of aircrafts",
|
"App_Nav_Aircrafts": "List of aircrafts",
|
||||||
"App_Nav_JumpTypes" : "List of jump types",
|
"App_Nav_JumpTypes": "List of jump types",
|
||||||
"App_Nav_Gears" : "List of gears",
|
"App_Nav_Gears": "List of gears",
|
||||||
"App_Nav_Logout" : "Logout",
|
"App_Nav_Logout": "Logout",
|
||||||
"App_Nav_NewTunnelFlight" : "Add tunnel time",
|
"App_Nav_NewTunnelFlight": "Add tunnel time",
|
||||||
"App_Nav_TunnelFlights": "The tunnel flights",
|
"App_Nav_TunnelFlights": "The tunnel flights",
|
||||||
|
|
||||||
"List_Aircrafts_Add" : "Add a aircraft",
|
"List_Aircrafts_Add": "Add a aircraft",
|
||||||
"List_Aircrafts_Header_Id" : "ID",
|
"List_Aircrafts_Header_Id": "ID",
|
||||||
"List_Aircrafts_Header_Name" : "Name",
|
"List_Aircrafts_Header_Name": "Name",
|
||||||
"List_Aircrafts_Header_Image" : "Image",
|
"List_Aircrafts_Header_Image": "Image",
|
||||||
|
|
||||||
"List_Gears_Add" : "Add a gear",
|
"List_Gears_Add": "Add a gear",
|
||||||
"List_Gears_Header_Id" : "ID",
|
"List_Gears_Header_Id": "ID",
|
||||||
"List_Gears_Header_Name" : "Name",
|
"List_Gears_Header_Name": "Name",
|
||||||
"List_Gears_Header_Manufacturer" : "Manufacturer",
|
"List_Gears_Header_Manufacturer": "Manufacturer",
|
||||||
"List_Gears_Header_CanopySize" : "Canopy size",
|
"List_Gears_Header_CanopySize": "Canopy size",
|
||||||
"List_Gears_Header_Aad" : "AAD system",
|
"List_Gears_Header_Aad": "AAD system",
|
||||||
"List_Gears_Header_Main" : "Main canopy",
|
"List_Gears_Header_Main": "Main canopy",
|
||||||
"List_Gears_Header_Reserve" : "Reserve canopy",
|
"List_Gears_Header_Reserve": "Reserve canopy",
|
||||||
|
|
||||||
"List_JumpType_Add" : "Add a jump type",
|
"List_JumpType_Add": "Add a jump type",
|
||||||
"List_JumpType_Header_Id" : "ID",
|
"List_JumpType_Header_Id": "ID",
|
||||||
"List_JumpType_Header_Name" : "Name",
|
"List_JumpType_Header_Name": "Name",
|
||||||
|
|
||||||
"List_Jump_Add" : "Add jumps",
|
"List_Jump_Add": "Add jumps",
|
||||||
"List_Jump_Header_Num" : "Num",
|
"List_Jump_Header_Num": "Num",
|
||||||
"List_Jump_Header_Date" : "Date",
|
"List_Jump_Header_Date": "Date",
|
||||||
"List_Jump_Header_JumpType" : "Jump Type",
|
"List_Jump_Header_JumpType": "Jump Type",
|
||||||
"List_Jump_Header_Aircraft" : "Aircraft",
|
"List_Jump_Header_Aircraft": "Aircraft",
|
||||||
"List_Jump_Header_Dz" : "Drop Zone",
|
"List_Jump_Header_Dz": "Drop Zone",
|
||||||
"List_Jump_Header_Gear" : "Gear",
|
"List_Jump_Header_Gear": "Gear",
|
||||||
|
|
||||||
"List_Dz_Add" : "Add a drop zone",
|
"List_Dz_Add": "Add a drop zone",
|
||||||
"List_Dz_Header_ID" : "ID",
|
"List_Dz_Header_ID": "ID",
|
||||||
"List_Dz_Header_Name" : "Name",
|
"List_Dz_Header_Name": "Name",
|
||||||
"List_Dz_Header_Address" : "Address",
|
"List_Dz_Header_Address": "Address",
|
||||||
"List_Dz_Header_Type" : "Type",
|
"List_Dz_Header_Type": "Type",
|
||||||
"List_Dz_Filter" : "Filter",
|
"List_Dz_Filter": "Filter",
|
||||||
"List_Dz_Filter_PlaceHolder" : "Filter on the name or address of center",
|
"List_Dz_Filter_PlaceHolder": "Filter on the name or address of center",
|
||||||
|
|
||||||
"Summary_TotalJumps" : "Total jumps",
|
"Summary_TotalJumps": "Total jumps",
|
||||||
"Summary_TotalCutaways" : "Total cutaways",
|
"Summary_TotalCutaways": "Total cutaways",
|
||||||
"Summary_LastJump" : "Last jump",
|
"Summary_LastJump": "Last jump",
|
||||||
"Summary_Refresh" : "Refresh",
|
"Summary_Refresh": "Refresh",
|
||||||
"Summary_LastMonth_Title" : "Jumps in the last month",
|
"Summary_LastMonth_Title": "Jumps in the last month",
|
||||||
"Summary_LastMonth_ByDz" : "By DZ",
|
"Summary_LastMonth_ByDz": "By DZ",
|
||||||
"Summary_LastMonth_ByJumpType" : "By jump type",
|
"Summary_LastMonth_ByJumpType": "By jump type",
|
||||||
"Summary_LastYear_Title" : "Jumps in the last year",
|
"Summary_LastYear_Title": "Jumps in the last year",
|
||||||
"Summary_LastYear_ByDz" : "By DZ",
|
"Summary_LastYear_ByDz": "By DZ",
|
||||||
"Summary_LastYear_ByJumpType" : "By jump type",
|
"Summary_LastYear_ByJumpType": "By jump type",
|
||||||
"Summary_ByDz_Title" : "By DZ",
|
"Summary_ByDz_Title": "By DZ",
|
||||||
"Summary_ByAircraft_Title" : "By aircraft",
|
"Summary_ByAircraft_Title": "By aircraft",
|
||||||
"Summary_ByGear_Title" : "By gear",
|
"Summary_ByGear_Title": "By gear",
|
||||||
"Summary_ByJumpType_Title" : "By jump type",
|
"Summary_ByJumpType_Title": "By jump type",
|
||||||
"Summary_ByYear_Title" : "By year",
|
"Summary_ByYear_Title": "By year",
|
||||||
|
"Summary_ByYearByJumpType_Title": "By year and by type",
|
||||||
|
|
||||||
"NewJump_GoToJump" : "View the jumps",
|
"NewJump_GoToJump": "View the jumps",
|
||||||
"NewJump_ResetForm" : "Reset form after adding",
|
"NewJump_ResetForm": "Reset form after adding",
|
||||||
"NewJump_ChooseJumpType" : "Choose the jump type",
|
"NewJump_ChooseJumpType": "Choose the jump type",
|
||||||
"NewJump_ChooseAircraft" : "Choose the aircraft",
|
"NewJump_ChooseAircraft": "Choose the aircraft",
|
||||||
"NewJump_ChooseDz" : "Choose the DZ",
|
"NewJump_ChooseDz": "Choose the DZ",
|
||||||
"NewJump_ChooseGear" : "Choose the used gear",
|
"NewJump_ChooseGear": "Choose the used gear",
|
||||||
"NewJump_Cutaway" : "With a cutaway ?",
|
"NewJump_Cutaway": "With a cutaway ?",
|
||||||
"NewJump_Special" : "Is a special jump ?",
|
"NewJump_Special": "Is a special jump ?",
|
||||||
"NewJump_ExitAlt" : "Exit altitude",
|
"NewJump_ExitAlt": "Exit altitude",
|
||||||
"NewJump_DeployAlt" : "Deploy altitude",
|
"NewJump_DeployAlt": "Deploy altitude",
|
||||||
"NewJump_Count" : "Count of jumps",
|
"NewJump_Count": "Count of jumps",
|
||||||
"NewJump_Comments" : "Comments",
|
"NewJump_Comments": "Comments",
|
||||||
"NewJump_Submit" : "Submit",
|
"NewJump_Submit": "Submit",
|
||||||
|
|
||||||
"NewTunnelFlight_ChooseTunnel": "Choose the tunnel",
|
"NewTunnelFlight_ChooseTunnel": "Choose the tunnel",
|
||||||
"NewTunnelFlight_Minutes": "Minutes of the flight",
|
"NewTunnelFlight_Minutes": "Minutes of the flight",
|
||||||
"NewTunnelFlight_Comments": "Comments",
|
"NewTunnelFlight_Comments": "Comments",
|
||||||
"NewTunnelFlight_Submit": "Submit",
|
"NewTunnelFlight_Submit": "Submit",
|
||||||
"NewTunnelFlight_Comments_Lbl": "Comments",
|
"NewTunnelFlight_Comments_Lbl": "Comments",
|
||||||
"NewTunnelFlight_Minutes_Lbl": "Time of flight (minutes)",
|
"NewTunnelFlight_Minutes_Lbl": "Time of flight (minutes)",
|
||||||
"NewTunnelFlight_Date_Lbl": "Date of flight",
|
"NewTunnelFlight_Date_Lbl": "Date of flight",
|
||||||
"NewTunnelFlight_GoToJump": "View the tunnel flights",
|
"NewTunnelFlight_GoToJump": "View the tunnel flights",
|
||||||
"NewTunnelFlight_ChooseJumpType": "Choose the jump type",
|
"NewTunnelFlight_ChooseJumpType": "Choose the jump type",
|
||||||
|
|
||||||
"ListTunnelFlight_CurrentYear": "On the current year",
|
"ListTunnelFlight_CurrentYear": "On the current year",
|
||||||
"ListTunnelFlight_12Months": "On 12 last months",
|
"ListTunnelFlight_12Months": "On 12 last months",
|
||||||
"ListTunnelFlight_Add" : "Add tunnel flights",
|
"ListTunnelFlight_Add": "Add tunnel flights",
|
||||||
"ListTunnelFlight_LoadTable" : "Load the tunnel flights",
|
"ListTunnelFlight_LoadTable": "Load the tunnel flights",
|
||||||
"ListTunnelFlight_AllFlights" : "All"
|
"ListTunnelFlight_AllFlights": "All"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,133 +1,134 @@
|
|||||||
{
|
{
|
||||||
"Login_Title" : "Connexion à Skydive log",
|
"Login_Title": "Connexion à Skydive log",
|
||||||
"Login_Tab_CreateUser" : "Créer et se connecter",
|
"Login_Tab_CreateUser": "Créer et se connecter",
|
||||||
"Login_Tab_WithUser" : "Se connecter",
|
"Login_Tab_WithUser": "Se connecter",
|
||||||
|
|
||||||
"LoginUser_BtnLogin" : "Connecter",
|
"LoginUser_BtnLogin": "Connecter",
|
||||||
"LoginUser_PasswordPattern" : "Le mot de passe doit contenir lettres minuscule/majuscule et entre 8 et 15 caractères.",
|
"LoginUser_PasswordPattern": "Le mot de passe doit contenir lettres minuscule/majuscule et entre 8 et 15 caractères.",
|
||||||
"LoginUser_PasswordRequired" : "Le mot de passe est obligatoire",
|
"LoginUser_PasswordRequired": "Le mot de passe est obligatoire",
|
||||||
"LoginUser_Password" : "Mot de passe",
|
"LoginUser_Password": "Mot de passe",
|
||||||
"LoginUser_Username" : "Identifiant",
|
"LoginUser_Username": "Identifiant",
|
||||||
"LoginUser_UsernamePattern" : "L'identifiant doit être minimum de 3 caractères",
|
"LoginUser_UsernamePattern": "L'identifiant doit être minimum de 3 caractères",
|
||||||
"LoginUser_UsernameRequired" : "L'identifiant est obligatoire",
|
"LoginUser_UsernameRequired": "L'identifiant est obligatoire",
|
||||||
|
|
||||||
"LoginCreateUser_Firstname" : "Prénom",
|
"LoginCreateUser_Firstname": "Prénom",
|
||||||
"LoginCreateUser_FirstnameRequired" : "Le prénom est obligatoire",
|
"LoginCreateUser_FirstnameRequired": "Le prénom est obligatoire",
|
||||||
"LoginCreateUser_FirstnamePattern" : "Le prénom doit être minimum de 3 caractères",
|
"LoginCreateUser_FirstnamePattern": "Le prénom doit être minimum de 3 caractères",
|
||||||
"LoginCreateUser_Lastname" : "Nom",
|
"LoginCreateUser_Lastname": "Nom",
|
||||||
"LoginCreateUser_LastnameRequired" : "Le nom est obligatoire",
|
"LoginCreateUser_LastnameRequired": "Le nom est obligatoire",
|
||||||
"LoginCreateUser_LastnamePattern" : "Le nom doit être minimum de 3 caractères",
|
"LoginCreateUser_LastnamePattern": "Le nom doit être minimum de 3 caractères",
|
||||||
"LoginCreateUser_Email" : "E-mail",
|
"LoginCreateUser_Email": "E-mail",
|
||||||
"LoginCreateUser_EmailRequired" : "E-mail est obligatoire",
|
"LoginCreateUser_EmailRequired": "E-mail est obligatoire",
|
||||||
"LoginCreateUser_EmailPattern" : "Ceci n'est pas un adresse mail",
|
"LoginCreateUser_EmailPattern": "Ceci n'est pas un adresse mail",
|
||||||
"LoginCreateUser_Username" : "Identifiant",
|
"LoginCreateUser_Username": "Identifiant",
|
||||||
"LoginCreateUser_UsernameRequired" : "L'identifiant est obligatoire",
|
"LoginCreateUser_UsernameRequired": "L'identifiant est obligatoire",
|
||||||
"LoginCreateUser_UsernamePattern" : "L'identifiant doit être minimum de 3 caractères",
|
"LoginCreateUser_UsernamePattern": "L'identifiant doit être minimum de 3 caractères",
|
||||||
"LoginCreateUser_Password" : "Mot de passe",
|
"LoginCreateUser_Password": "Mot de passe",
|
||||||
"LoginCreateUser_PasswordRequired" : "Le mot de passe est obligatoire",
|
"LoginCreateUser_PasswordRequired": "Le mot de passe est obligatoire",
|
||||||
"LoginCreateUser_PasswordPattern" : "Le mot de passe doit contenir lettres minuscule/majuscule et entre 8 et 15 caractères.",
|
"LoginCreateUser_PasswordPattern": "Le mot de passe doit contenir lettres minuscule/majuscule et entre 8 et 15 caractères.",
|
||||||
"LoginCreateUser_BtnLogin" : "Créer et se connecter",
|
"LoginCreateUser_BtnLogin": "Créer et se connecter",
|
||||||
|
|
||||||
"Default_Title" : "Accueil",
|
"Default_Title": "Accueil",
|
||||||
"ListDz_Title" : "Liste des centres de parachutisme",
|
"ListDz_Title": "Liste des centres de parachutisme",
|
||||||
"Summary_Title" : "Récapitulatif",
|
"Summary_Title": "Récapitulatif",
|
||||||
"NewJump_Title" : "Nouveaux sauts",
|
"NewJump_Title": "Nouveaux sauts",
|
||||||
"ListJumps_Title" : "Liste des sauts",
|
"ListJumps_Title": "Liste des sauts",
|
||||||
"ListJumpTypes_Title" : "Liste des types de saut",
|
"ListJumpTypes_Title": "Liste des types de saut",
|
||||||
"ListGears_Title" : "Liste des pièges",
|
"ListGears_Title": "Liste des pièges",
|
||||||
"ListAircrafts_Title" : "Liste des avions",
|
"ListAircrafts_Title": "Liste des avions",
|
||||||
"NewTunnelFlight_Title" : "Nouveaux créneaux de soufflerie",
|
"NewTunnelFlight_Title": "Nouveaux créneaux de soufflerie",
|
||||||
"ListTunnelFlight_Title" : "Heures de tunnel",
|
"ListTunnelFlight_Title": "Heures de tunnel",
|
||||||
|
|
||||||
"App_Footer" : "Application pour enregistrer ses sauts de parachutisme - v",
|
"App_Footer": "Application pour enregistrer ses sauts de parachutisme - v",
|
||||||
"App_Nav_Summary" : "Récapitulatif",
|
"App_Nav_Summary": "Récapitulatif",
|
||||||
"App_Nav_Jumps" : "Les sauts",
|
"App_Nav_Jumps": "Les sauts",
|
||||||
"App_Nav_NewJump" : "Ajouter un saut",
|
"App_Nav_NewJump": "Ajouter un saut",
|
||||||
"App_Nav_Dzs" : "Centre de parachutisme",
|
"App_Nav_Dzs": "Centre de parachutisme",
|
||||||
"App_Nav_Aircrafts" : "Avions",
|
"App_Nav_Aircrafts": "Avions",
|
||||||
"App_Nav_JumpTypes" : "Type de saut",
|
"App_Nav_JumpTypes": "Type de saut",
|
||||||
"App_Nav_Gears" : "Pièges",
|
"App_Nav_Gears": "Pièges",
|
||||||
"App_Nav_Logout" : "Se déconnecter",
|
"App_Nav_Logout": "Se déconnecter",
|
||||||
"App_Nav_NewTunnelFlight" : "Ajouter du temps en tunnel",
|
"App_Nav_NewTunnelFlight": "Ajouter du temps en tunnel",
|
||||||
"App_Nav_TunnelFlights": "Les vols en soufflerie",
|
"App_Nav_TunnelFlights": "Les vols en soufflerie",
|
||||||
|
|
||||||
"List_Aircrafts_Add" : "Ajouter un avion",
|
"List_Aircrafts_Add": "Ajouter un avion",
|
||||||
"List_Aircrafts_Header_Id" : "ID",
|
"List_Aircrafts_Header_Id": "ID",
|
||||||
"List_Aircrafts_Header_Name" : "Nom",
|
"List_Aircrafts_Header_Name": "Nom",
|
||||||
"List_Aircrafts_Header_Image" : "Image",
|
"List_Aircrafts_Header_Image": "Image",
|
||||||
|
|
||||||
"List_Gears_Add" : "Ajouter un piège",
|
"List_Gears_Add": "Ajouter un piège",
|
||||||
"List_Gears_Header_Id" : "ID",
|
"List_Gears_Header_Id": "ID",
|
||||||
"List_Gears_Header_Name" : "Nom",
|
"List_Gears_Header_Name": "Nom",
|
||||||
"List_Gears_Header_Manufacturer" : "Fabriquant",
|
"List_Gears_Header_Manufacturer": "Fabriquant",
|
||||||
"List_Gears_Header_CanopySize" : "Taille de voile",
|
"List_Gears_Header_CanopySize": "Taille de voile",
|
||||||
"List_Gears_Header_Aad" : "Système de sécurité",
|
"List_Gears_Header_Aad": "Système de sécurité",
|
||||||
"List_Gears_Header_Main" : "Principale",
|
"List_Gears_Header_Main": "Principale",
|
||||||
"List_Gears_Header_Reserve" : "Réserve",
|
"List_Gears_Header_Reserve": "Réserve",
|
||||||
|
|
||||||
"List_JumpType_Add" : "Ajouter un type de saut",
|
"List_JumpType_Add": "Ajouter un type de saut",
|
||||||
"List_JumpType_Header_Id" : "ID",
|
"List_JumpType_Header_Id": "ID",
|
||||||
"List_JumpType_Header_Name" : "Nom",
|
"List_JumpType_Header_Name": "Nom",
|
||||||
|
|
||||||
"List_Jump_Add" : "Ajouter des sauts",
|
"List_Jump_Add": "Ajouter des sauts",
|
||||||
"List_Jump_Header_Num" : "Numéro",
|
"List_Jump_Header_Num": "Numéro",
|
||||||
"List_Jump_Header_Date" : "Date",
|
"List_Jump_Header_Date": "Date",
|
||||||
"List_Jump_Header_JumpType" : "Type de saut",
|
"List_Jump_Header_JumpType": "Type de saut",
|
||||||
"List_Jump_Header_Aircraft" : "Avion",
|
"List_Jump_Header_Aircraft": "Avion",
|
||||||
"List_Jump_Header_Dz" : "Centre",
|
"List_Jump_Header_Dz": "Centre",
|
||||||
"List_Jump_Header_Gear" : "Piège",
|
"List_Jump_Header_Gear": "Piège",
|
||||||
|
|
||||||
"List_Dz_Add" : "Ajouter un centre de parachutisme",
|
"List_Dz_Add": "Ajouter un centre de parachutisme",
|
||||||
"List_Dz_Header_ID" : "ID",
|
"List_Dz_Header_ID": "ID",
|
||||||
"List_Dz_Header_Name" : "Nom",
|
"List_Dz_Header_Name": "Nom",
|
||||||
"List_Dz_Header_Address" : "Adresse",
|
"List_Dz_Header_Address": "Adresse",
|
||||||
"List_Dz_Header_Type" : "Type",
|
"List_Dz_Header_Type": "Type",
|
||||||
"List_Dz_Filter" : "Filtrer",
|
"List_Dz_Filter": "Filtrer",
|
||||||
"List_Dz_Filter_PlaceHolder" : "Filtrer sur le nom ou l'adresse du centre",
|
"List_Dz_Filter_PlaceHolder": "Filtrer sur le nom ou l'adresse du centre",
|
||||||
|
|
||||||
"Summary_TotalJumps" : "Nombre de sauts",
|
"Summary_TotalJumps": "Nombre de sauts",
|
||||||
"Summary_TotalCutaways" : "Nombre de libération",
|
"Summary_TotalCutaways": "Nombre de libération",
|
||||||
"Summary_LastJump" : "Le dernier saut",
|
"Summary_LastJump": "Le dernier saut",
|
||||||
"Summary_Refresh" : "Refresh",
|
"Summary_Refresh": "Refresh",
|
||||||
"Summary_LastMonth_Title" : "Les sauts du dernier mois",
|
"Summary_LastMonth_Title": "Les sauts du dernier mois",
|
||||||
"Summary_LastMonth_ByDz" : "Par centre",
|
"Summary_LastMonth_ByDz": "Par centre",
|
||||||
"Summary_LastMonth_ByJumpType" : "Par type de saut",
|
"Summary_LastMonth_ByJumpType": "Par type de saut",
|
||||||
"Summary_LastYear_Title" : "Les sauts de la dernière année",
|
"Summary_LastYear_Title": "Les sauts de la dernière année",
|
||||||
"Summary_LastYear_ByDz" : "Par centre",
|
"Summary_LastYear_ByDz": "Par centre",
|
||||||
"Summary_LastYear_ByJumpType" : "Par type de saut",
|
"Summary_LastYear_ByJumpType": "Par type de saut",
|
||||||
"Summary_ByDz_Title" : "Par centre",
|
"Summary_ByDz_Title": "Par centre",
|
||||||
"Summary_ByAircraft_Title" : "Par avion",
|
"Summary_ByAircraft_Title": "Par avion",
|
||||||
"Summary_ByGear_Title" : "Par piège",
|
"Summary_ByGear_Title": "Par piège",
|
||||||
"Summary_ByJumpType_Title" : "Par type de saut",
|
"Summary_ByJumpType_Title": "Par type de saut",
|
||||||
"Summary_ByYear_Title" : "Par an",
|
"Summary_ByYear_Title": "Par an",
|
||||||
|
"Summary_ByYear_Title": "Par an et par type",
|
||||||
|
|
||||||
"NewJump_GoToJump" : "Voir les sauts",
|
"NewJump_GoToJump": "Voir les sauts",
|
||||||
"NewJump_ResetForm" : "Reset du formulaire après l'ajout",
|
"NewJump_ResetForm": "Reset du formulaire après l'ajout",
|
||||||
"NewJump_ChooseJumpType" : "Choisir le type de saut",
|
"NewJump_ChooseJumpType": "Choisir le type de saut",
|
||||||
"NewJump_ChooseAircraft" : "Choisir l'avion largueur",
|
"NewJump_ChooseAircraft": "Choisir l'avion largueur",
|
||||||
"NewJump_ChooseDz" : "Choisir le centre",
|
"NewJump_ChooseDz": "Choisir le centre",
|
||||||
"NewJump_ChooseGear" : "Choisir le piège",
|
"NewJump_ChooseGear": "Choisir le piège",
|
||||||
"NewJump_Cutaway" : "Libération ?",
|
"NewJump_Cutaway": "Libération ?",
|
||||||
"NewJump_Special" : "Saut spécial ?",
|
"NewJump_Special": "Saut spécial ?",
|
||||||
"NewJump_ExitAlt" : "Altitude de sortie",
|
"NewJump_ExitAlt": "Altitude de sortie",
|
||||||
"NewJump_DeployAlt" : "Altitude d'ouverture",
|
"NewJump_DeployAlt": "Altitude d'ouverture",
|
||||||
"NewJump_Count" : "Nombre de sauts",
|
"NewJump_Count": "Nombre de sauts",
|
||||||
"NewJump_Comments" : "Commentaires",
|
"NewJump_Comments": "Commentaires",
|
||||||
"NewJump_Submit" : "Ajouter",
|
"NewJump_Submit": "Ajouter",
|
||||||
|
|
||||||
"NewTunnelFlight_ChooseTunnel": "Choisir le tunnel",
|
"NewTunnelFlight_ChooseTunnel": "Choisir le tunnel",
|
||||||
"NewTunnelFlight_Minutes": "Temps de vol(minutes)",
|
"NewTunnelFlight_Minutes": "Temps de vol(minutes)",
|
||||||
"NewTunnelFlight_Comments": "Commentaires",
|
"NewTunnelFlight_Comments": "Commentaires",
|
||||||
"NewTunnelFlight_Submit": "Ajouter",
|
"NewTunnelFlight_Submit": "Ajouter",
|
||||||
"NewTunnelFlight_Comments_Lbl": "Commentaires",
|
"NewTunnelFlight_Comments_Lbl": "Commentaires",
|
||||||
"NewTunnelFlight_Minutes_Lbl": "Temps de vol(minutes)",
|
"NewTunnelFlight_Minutes_Lbl": "Temps de vol(minutes)",
|
||||||
"NewTunnelFlight_Date_Lbl": "Date des vols",
|
"NewTunnelFlight_Date_Lbl": "Date des vols",
|
||||||
"NewTunnelFlight_GoToJump": "Voir les temps de vol en soufflerie",
|
"NewTunnelFlight_GoToJump": "Voir les temps de vol en soufflerie",
|
||||||
"NewTunnelFlight_ChooseJumpType": "Choisir le type de saut",
|
"NewTunnelFlight_ChooseJumpType": "Choisir le type de saut",
|
||||||
|
|
||||||
"ListTunnelFlight_CurrentYear": "Dans l'année en cours",
|
"ListTunnelFlight_CurrentYear": "Dans l'année en cours",
|
||||||
"ListTunnelFlight_12Months": "Sur 12 derniers mois",
|
"ListTunnelFlight_12Months": "Sur 12 derniers mois",
|
||||||
"ListTunnelFlight_Add" : "Ajouter du temps en soufflerie",
|
"ListTunnelFlight_Add": "Ajouter du temps en soufflerie",
|
||||||
"ListTunnelFlight_LoadTable" : "Charger les vols en tunnel",
|
"ListTunnelFlight_LoadTable": "Charger les vols en tunnel",
|
||||||
"ListTunnelFlight_AllFlights" : "Tous les vols"
|
"ListTunnelFlight_AllFlights": "Tous les vols"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,5 +12,6 @@ export enum CacheApiKey {
|
|||||||
StatsOfLastYear,
|
StatsOfLastYear,
|
||||||
StatsOfLastMonth,
|
StatsOfLastMonth,
|
||||||
StatsByYear,
|
StatsByYear,
|
||||||
Tunnel
|
Tunnel,
|
||||||
|
StatsByYearByJumpType,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,14 @@
|
|||||||
import { Observable } from 'rxjs';
|
import { Observable } from "rxjs";
|
||||||
import { Jump, JumpResp } from './jump';
|
import { Jump, JumpResp } from "./jump";
|
||||||
|
|
||||||
export class StatsResp {
|
export class StatsResp {
|
||||||
public simpleSummary: Observable<SimpleSummary>;
|
public simpleSummary: Observable<SimpleSummary>;
|
||||||
|
|
||||||
public statsByDz: Observable<Array<StatsByDzResp>>;
|
public statsByDz: Observable<Array<StatsByDzResp>>;
|
||||||
public statsByAircraft: Observable<Array<StatsByAircraftResp>>;
|
public statsByAircraft: Observable<Array<StatsByAircraftResp>>;
|
||||||
public statsByGear: Observable<Array<StatsByGearResp>>;
|
public statsByGear: Observable<Array<StatsByGearResp>>;
|
||||||
public statsByJumpType: Observable<Array<StatsByJumpTypeResp>>;
|
public statsByJumpType: Observable<Array<StatsByJumpTypeResp>>;
|
||||||
public statsByYear: Observable<Array<StatsByYearResp>>;
|
public statsByYear: Observable<Array<StatsByYearResp>>;
|
||||||
|
public statsByYearByJumpType: Observable<Array<StatsByYearByJumpTypeResp>>;
|
||||||
public statsForLastYear: Observable<StatsForLastYearResp>;
|
public statsForLastYear: Observable<StatsForLastYearResp>;
|
||||||
public statsForLastMonth: Observable<StatsForLastMonthResp>;
|
public statsForLastMonth: Observable<StatsForLastMonthResp>;
|
||||||
}
|
}
|
||||||
@@ -81,9 +80,21 @@ export class StatsByYearResp {
|
|||||||
public nb: number;
|
public nb: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class StatsByYearByJumpTypeResp {
|
||||||
|
constructor(data: any) {
|
||||||
|
Object.assign(this, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public label: string;
|
||||||
|
public label2: string;
|
||||||
|
public nb: number;
|
||||||
|
}
|
||||||
|
|
||||||
export class StatsForLastYearResp {
|
export class StatsForLastYearResp {
|
||||||
constructor(dataByDz: Array<StatsByDzResp>,
|
constructor(
|
||||||
dataByJumpType: Array<StatsByJumpTypeResp>) {
|
dataByDz: Array<StatsByDzResp>,
|
||||||
|
dataByJumpType: Array<StatsByJumpTypeResp>
|
||||||
|
) {
|
||||||
this.byDz = new Array<StatsByDzResp>();
|
this.byDz = new Array<StatsByDzResp>();
|
||||||
this.byJumpType = new Array<StatsByJumpTypeResp>();
|
this.byJumpType = new Array<StatsByJumpTypeResp>();
|
||||||
|
|
||||||
@@ -96,8 +107,10 @@ export class StatsForLastYearResp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class StatsForLastMonthResp {
|
export class StatsForLastMonthResp {
|
||||||
constructor(dataByDz: Array<StatsByDzResp>,
|
constructor(
|
||||||
dataByJumpType: Array<StatsByJumpTypeResp>) {
|
dataByDz: Array<StatsByDzResp>,
|
||||||
|
dataByJumpType: Array<StatsByJumpTypeResp>
|
||||||
|
) {
|
||||||
this.byDz = new Array<StatsByDzResp>();
|
this.byDz = new Array<StatsByDzResp>();
|
||||||
this.byJumpType = new Array<StatsByJumpTypeResp>();
|
this.byJumpType = new Array<StatsByJumpTypeResp>();
|
||||||
|
|
||||||
|
|||||||
@@ -1,28 +1,38 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from "@angular/core";
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from "@angular/common/http";
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from "rxjs";
|
||||||
import { map } from 'rxjs/operators';
|
import { map } from "rxjs/operators";
|
||||||
|
|
||||||
import { StatsByDzResp, StatsByAircraftResp, StatsByJumpTypeResp,
|
import {
|
||||||
StatsByGearResp, StatsByYearResp, StatsForLastMonthResp,
|
StatsByDzResp,
|
||||||
StatsForLastYearResp, SimpleSummary, SimpleSummaryResp } from '../models/stats';
|
StatsByAircraftResp,
|
||||||
|
StatsByJumpTypeResp,
|
||||||
|
StatsByGearResp,
|
||||||
|
StatsByYearResp,
|
||||||
|
StatsByYearByJumpTypeResp,
|
||||||
|
StatsForLastMonthResp,
|
||||||
|
StatsForLastYearResp,
|
||||||
|
SimpleSummary,
|
||||||
|
SimpleSummaryResp,
|
||||||
|
} from "../models/stats";
|
||||||
|
|
||||||
import { BaseService } from './base.service';
|
import { BaseService } from "./base.service";
|
||||||
import { DropzoneService } from "./dropzone.service";
|
import { DropzoneService } from "./dropzone.service";
|
||||||
import { AircraftService } from "./aircraft.service";
|
import { AircraftService } from "./aircraft.service";
|
||||||
import { JumpTypeService } from "./jump-type.service";
|
import { JumpTypeService } from "./jump-type.service";
|
||||||
import { GearService } from "./gear.service";
|
import { GearService } from "./gear.service";
|
||||||
import { CacheApiKey } from '../models/cache-api-key.enum';
|
import { CacheApiKey } from "../models/cache-api-key.enum";
|
||||||
import { Jump } from '../models/jump';
|
import { Jump } from "../models/jump";
|
||||||
|
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class StatsService extends BaseService {
|
export class StatsService extends BaseService {
|
||||||
constructor(private http: HttpClient,
|
constructor(
|
||||||
private dropzoneService: DropzoneService,
|
private http: HttpClient,
|
||||||
private aircraftService: AircraftService,
|
private dropzoneService: DropzoneService,
|
||||||
private jumpTypeService: JumpTypeService,
|
private aircraftService: AircraftService,
|
||||||
private gearService: GearService) {
|
private jumpTypeService: JumpTypeService,
|
||||||
|
private gearService: GearService
|
||||||
|
) {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -35,119 +45,208 @@ export class StatsService extends BaseService {
|
|||||||
this.serviceCacheApi.delete(CacheApiKey.StatsByYear);
|
this.serviceCacheApi.delete(CacheApiKey.StatsByYear);
|
||||||
this.serviceCacheApi.delete(CacheApiKey.StatsOfLastYear);
|
this.serviceCacheApi.delete(CacheApiKey.StatsOfLastYear);
|
||||||
this.serviceCacheApi.delete(CacheApiKey.StatsOfLastMonth);
|
this.serviceCacheApi.delete(CacheApiKey.StatsOfLastMonth);
|
||||||
|
this.serviceCacheApi.delete(CacheApiKey.StatsByYearByJumpType);
|
||||||
}
|
}
|
||||||
|
|
||||||
public resetStats() {
|
public resetStats() {
|
||||||
this.http.get(`${this.apiUrl}/Stats/Reset`, { headers: this.headers }).subscribe();
|
this.http
|
||||||
|
.get(`${this.apiUrl}/Stats/Reset`, { headers: this.headers })
|
||||||
|
.subscribe();
|
||||||
}
|
}
|
||||||
|
|
||||||
public getSimpleSummary(): Observable<SimpleSummary> {
|
public getSimpleSummary(): Observable<SimpleSummary> {
|
||||||
let callToApi = this.http.get<SimpleSummaryResp>(`${this.apiUrl}/Stats/Simple`, { headers: this.headers })
|
let callToApi = this.http
|
||||||
.pipe(map(response => {
|
.get<SimpleSummaryResp>(`${this.apiUrl}/Stats/Simple`, {
|
||||||
let tmp = new Jump(response.lastJump);
|
headers: this.headers,
|
||||||
this.dropzoneService.getById(response.lastJump.dropZoneId).subscribe((d)=> tmp.dropZone = d );
|
})
|
||||||
this.aircraftService.getById(response.lastJump.aircraftId).subscribe((d)=> tmp.aircraft = d );
|
.pipe(
|
||||||
this.jumpTypeService.getById(response.lastJump.jumpTypeId).subscribe((d)=> tmp.jumpType = d );
|
map((response) => {
|
||||||
this.gearService.getById(response.lastJump.gearId).subscribe((d)=> tmp.gear = d );
|
let tmp = new Jump(response.lastJump);
|
||||||
|
this.dropzoneService
|
||||||
|
.getById(response.lastJump.dropZoneId)
|
||||||
|
.subscribe((d) => (tmp.dropZone = d));
|
||||||
|
this.aircraftService
|
||||||
|
.getById(response.lastJump.aircraftId)
|
||||||
|
.subscribe((d) => (tmp.aircraft = d));
|
||||||
|
this.jumpTypeService
|
||||||
|
.getById(response.lastJump.jumpTypeId)
|
||||||
|
.subscribe((d) => (tmp.jumpType = d));
|
||||||
|
this.gearService
|
||||||
|
.getById(response.lastJump.gearId)
|
||||||
|
.subscribe((d) => (tmp.gear = d));
|
||||||
|
|
||||||
let stats = new SimpleSummary(response);
|
let stats = new SimpleSummary(response);
|
||||||
stats.lastJump = tmp;
|
stats.lastJump = tmp;
|
||||||
return stats;
|
return stats;
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
return this.serviceCacheApi.get<SimpleSummary>(CacheApiKey.SimpleSummary, callToApi);
|
return this.serviceCacheApi.get<SimpleSummary>(
|
||||||
|
CacheApiKey.SimpleSummary,
|
||||||
|
callToApi
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getStatsByDz(): Observable<Array<StatsByDzResp>> {
|
public getStatsByDz(): Observable<Array<StatsByDzResp>> {
|
||||||
let callToApi = this.http.get<Array<StatsByDzResp>>(`${this.apiUrl}/Stats/ByDz`, { headers: this.headers })
|
let callToApi = this.http
|
||||||
.pipe(
|
.get<Array<StatsByDzResp>>(`${this.apiUrl}/Stats/ByDz`, {
|
||||||
map(response => {
|
headers: this.headers,
|
||||||
const stats = response.map(data => new StatsByDzResp(data));
|
})
|
||||||
return stats;
|
.pipe(
|
||||||
})
|
map((response) => {
|
||||||
);
|
const stats = response.map((data) => new StatsByDzResp(data));
|
||||||
|
return stats;
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
return this.serviceCacheApi.get<Array<StatsByDzResp>>(CacheApiKey.StatsByDz, callToApi);
|
return this.serviceCacheApi.get<Array<StatsByDzResp>>(
|
||||||
|
CacheApiKey.StatsByDz,
|
||||||
|
callToApi
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getStatsByAircraft(): Observable<Array<StatsByAircraftResp>> {
|
public getStatsByAircraft(): Observable<Array<StatsByAircraftResp>> {
|
||||||
let callToApi = this.http.get<Array<StatsByAircraftResp>>(`${this.apiUrl}/Stats/ByAircraft`, { headers: this.headers })
|
let callToApi = this.http
|
||||||
.pipe(
|
.get<Array<StatsByAircraftResp>>(`${this.apiUrl}/Stats/ByAircraft`, {
|
||||||
map(response => {
|
headers: this.headers,
|
||||||
const stats = response.map(data => new StatsByAircraftResp(data));
|
})
|
||||||
return stats;
|
.pipe(
|
||||||
})
|
map((response) => {
|
||||||
);
|
const stats = response.map((data) => new StatsByAircraftResp(data));
|
||||||
|
return stats;
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
return this.serviceCacheApi.get<Array<StatsByAircraftResp>>(CacheApiKey.StatsByAircraft, callToApi);
|
return this.serviceCacheApi.get<Array<StatsByAircraftResp>>(
|
||||||
|
CacheApiKey.StatsByAircraft,
|
||||||
|
callToApi
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getStatsByJumpType(): Observable<Array<StatsByJumpTypeResp>> {
|
public getStatsByJumpType(): Observable<Array<StatsByJumpTypeResp>> {
|
||||||
let callToApi = this.http.get<Array<StatsByJumpTypeResp>>(`${this.apiUrl}/Stats/ByJumpType`,{ headers: this.headers })
|
let callToApi = this.http
|
||||||
.pipe(
|
.get<Array<StatsByJumpTypeResp>>(`${this.apiUrl}/Stats/ByJumpType`, {
|
||||||
map(response => {
|
headers: this.headers,
|
||||||
const stats = response.map(data => new StatsByJumpTypeResp(data));
|
})
|
||||||
return stats;
|
.pipe(
|
||||||
})
|
map((response) => {
|
||||||
);
|
const stats = response.map((data) => new StatsByJumpTypeResp(data));
|
||||||
|
return stats;
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
return this.serviceCacheApi.get<Array<StatsByJumpTypeResp>>(CacheApiKey.StatsByJumpType, callToApi);
|
return this.serviceCacheApi.get<Array<StatsByJumpTypeResp>>(
|
||||||
|
CacheApiKey.StatsByJumpType,
|
||||||
|
callToApi
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getStatsByGear(): Observable<Array<StatsByGearResp>> {
|
public getStatsByGear(): Observable<Array<StatsByGearResp>> {
|
||||||
let callToApi = this.http.get<Array<StatsByGearResp>>(`${this.apiUrl}/Stats/ByGear`, { headers: this.headers })
|
let callToApi = this.http
|
||||||
.pipe(
|
.get<Array<StatsByGearResp>>(`${this.apiUrl}/Stats/ByGear`, {
|
||||||
map(response => {
|
headers: this.headers,
|
||||||
const stats = response.map(data => new StatsByGearResp(data));
|
})
|
||||||
return stats;
|
.pipe(
|
||||||
})
|
map((response) => {
|
||||||
);
|
const stats = response.map((data) => new StatsByGearResp(data));
|
||||||
|
return stats;
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
return this.serviceCacheApi.get<Array<StatsByGearResp>>(CacheApiKey.StatsByGear, callToApi);
|
return this.serviceCacheApi.get<Array<StatsByGearResp>>(
|
||||||
|
CacheApiKey.StatsByGear,
|
||||||
|
callToApi
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getStatsByYear(): Observable<Array<StatsByYearResp>> {
|
public getStatsByYear(): Observable<Array<StatsByYearResp>> {
|
||||||
let callToApi = this.http.get<Array<StatsByYearResp>>(`${this.apiUrl}/Stats/ByYear`, { headers: this.headers })
|
let callToApi = this.http
|
||||||
.pipe(
|
.get<Array<StatsByYearResp>>(`${this.apiUrl}/Stats/ByYear`, {
|
||||||
map(response => {
|
headers: this.headers,
|
||||||
const stats = response.map(data => new StatsByYearResp(data));
|
})
|
||||||
return stats;
|
.pipe(
|
||||||
})
|
map((response) => {
|
||||||
);
|
const stats = response.map((data) => new StatsByYearResp(data));
|
||||||
|
return stats;
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
return this.serviceCacheApi.get<Array<StatsByYearResp>>(CacheApiKey.StatsByYear, callToApi);
|
return this.serviceCacheApi.get<Array<StatsByYearResp>>(
|
||||||
|
CacheApiKey.StatsByYear,
|
||||||
|
callToApi
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getStatsOfLastYear(): Observable<StatsForLastYearResp> {
|
public getStatsOfLastYear(): Observable<StatsForLastYearResp> {
|
||||||
let callToApi = this.http.get<StatsForLastYearResp>(`${this.apiUrl}/Stats/ForLastYear`, { headers: this.headers })
|
let callToApi = this.http
|
||||||
.pipe(
|
.get<StatsForLastYearResp>(`${this.apiUrl}/Stats/ForLastYear`, {
|
||||||
map(response => {
|
headers: this.headers,
|
||||||
const statsByDz = response.byDz.map(data => new StatsByDzResp(data));
|
})
|
||||||
const statsByJumpType = response.byJumpType.map(
|
.pipe(
|
||||||
data => new StatsByDzResp(data)
|
map((response) => {
|
||||||
);
|
const statsByDz = response.byDz.map(
|
||||||
|
(data) => new StatsByDzResp(data)
|
||||||
|
);
|
||||||
|
const statsByJumpType = response.byJumpType.map(
|
||||||
|
(data) => new StatsByDzResp(data)
|
||||||
|
);
|
||||||
|
|
||||||
return new StatsForLastYearResp(statsByDz, statsByJumpType);
|
return new StatsForLastYearResp(statsByDz, statsByJumpType);
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
return this.serviceCacheApi.get<StatsForLastYearResp>(CacheApiKey.StatsOfLastYear, callToApi);
|
return this.serviceCacheApi.get<StatsForLastYearResp>(
|
||||||
|
CacheApiKey.StatsOfLastYear,
|
||||||
|
callToApi
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getStatsOfLastMonth(): Observable<StatsForLastMonthResp> {
|
public getStatsOfLastMonth(): Observable<StatsForLastMonthResp> {
|
||||||
let callToApi = this.http.get<StatsForLastYearResp>(`${this.apiUrl}/Stats/ForLastMonth`, { headers: this.headers })
|
let callToApi = this.http
|
||||||
.pipe(
|
.get<StatsForLastYearResp>(`${this.apiUrl}/Stats/ForLastMonth`, {
|
||||||
map(response => {
|
headers: this.headers,
|
||||||
const statsByDz = response.byDz.map(data => new StatsByDzResp(data));
|
})
|
||||||
const statsByJumpType = response.byJumpType.map(
|
.pipe(
|
||||||
data => new StatsByDzResp(data)
|
map((response) => {
|
||||||
);
|
const statsByDz = response.byDz.map(
|
||||||
|
(data) => new StatsByDzResp(data)
|
||||||
|
);
|
||||||
|
const statsByJumpType = response.byJumpType.map(
|
||||||
|
(data) => new StatsByDzResp(data)
|
||||||
|
);
|
||||||
|
|
||||||
return new StatsForLastMonthResp(statsByDz, statsByJumpType);
|
return new StatsForLastMonthResp(statsByDz, statsByJumpType);
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
return this.serviceCacheApi.get<StatsForLastMonthResp>(CacheApiKey.StatsOfLastMonth, callToApi);
|
return this.serviceCacheApi.get<StatsForLastMonthResp>(
|
||||||
|
CacheApiKey.StatsOfLastMonth,
|
||||||
|
callToApi
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getStatsByYearByJumpType(): Observable<
|
||||||
|
Array<StatsByYearByJumpTypeResp>
|
||||||
|
> {
|
||||||
|
let callToApi = this.http
|
||||||
|
.get<Array<StatsByYearByJumpTypeResp>>(
|
||||||
|
`${this.apiUrl}/Stats/ByYearByJumpType`,
|
||||||
|
{
|
||||||
|
headers: this.headers,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.pipe(
|
||||||
|
map((response) => {
|
||||||
|
const stats = response.map(
|
||||||
|
(data) => new StatsByYearByJumpTypeResp(data)
|
||||||
|
);
|
||||||
|
return stats;
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
return this.serviceCacheApi.get<Array<StatsByYearByJumpTypeResp>>(
|
||||||
|
CacheApiKey.StatsByYear,
|
||||||
|
callToApi
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user