Import "TranslateModule"

This commit is contained in:
2026-01-14 10:56:01 +01:00
parent 7a667f10c3
commit c4cc91bb06
23 changed files with 653 additions and 569 deletions

View File

@@ -11,10 +11,10 @@ import { ConfigurationHelper } from "../services/configuration-helper";
import { ServiceCacheApi } from "../services/service-cache-api.service"; import { ServiceCacheApi } from "../services/service-cache-api.service";
@Component({ @Component({
selector: "app-root", selector: "app-root",
templateUrl: "./app.component.html", templateUrl: "./app.component.html",
styleUrls: ["./app.component.css"], styleUrls: ["./app.component.css"],
standalone: false imports: [],
}) })
export class AppComponent implements OnInit { export class AppComponent implements OnInit {
public title = "app"; public title = "app";
@@ -22,31 +22,31 @@ export class AppComponent implements OnInit {
public version: string; public version: string;
public selectedLanguageFlag: string; public selectedLanguageFlag: string;
constructor(private router: Router, constructor(
private authenticationService: AuthenticationService, private router: Router,
private serviceComm: ServiceComm, private authenticationService: AuthenticationService,
private serviceCacheApi : ServiceCacheApi, private serviceComm: ServiceComm,
private translateService: TranslateService) private serviceCacheApi: ServiceCacheApi,
{ private translateService: TranslateService
this.authenticationService.currentUser.subscribe(user => { ) {
this.authenticationService.currentUser.subscribe((user) => {
if (user) { if (user) {
this.currentUser = user; this.currentUser = user;
this.translateService.addLangs(['en', 'fr']); this.translateService.addLangs(["en", "fr"]);
this.translateService.use(user.language); this.translateService.use(user.language);
this.selectedLanguageFlag = user.language; this.selectedLanguageFlag = user.language;
} }
}); });
ConfigurationHelper.settings.subscribe(settings => ConfigurationHelper.settings.subscribe((settings) => {
{ if (settings != null) {
if (settings != null) { this.version = settings.version;
this.version = settings.version; }
}
}); });
} }
ngOnInit() { ngOnInit() {
this.serviceComm.componentTitle.subscribe(title => (this.title = title)); this.serviceComm.componentTitle.subscribe((title) => (this.title = title));
} }
public show() { public show() {

View File

@@ -1,7 +1,7 @@
import { Component, OnInit } from "@angular/core"; import { Component, OnInit } from "@angular/core";
import { Router, ActivatedRoute } from "@angular/router"; import { Router, ActivatedRoute } from "@angular/router";
import { FormBuilder, FormGroup, Validators } from "@angular/forms"; import { FormBuilder, FormGroup, Validators } from "@angular/forms";
import { TranslateService } from "@ngx-translate/core"; import { TranslateModule, TranslateService } from "@ngx-translate/core";
import { first } from "rxjs/operators"; import { first } from "rxjs/operators";
@@ -12,7 +12,7 @@ import { User } from "../../models/user";
selector: "app-create-user", selector: "app-create-user",
templateUrl: "./create-user.component.html", templateUrl: "./create-user.component.html",
styleUrls: ["./create-user.component.css"], styleUrls: ["./create-user.component.css"],
standalone: false, imports: [TranslateModule],
}) })
export class CreateUserComponent implements OnInit { export class CreateUserComponent implements OnInit {
createForm: FormGroup; createForm: FormGroup;

View File

@@ -1,5 +1,5 @@
import { Component, OnInit } from "@angular/core"; import { Component, OnInit } from "@angular/core";
import { TranslateService } from "@ngx-translate/core"; import { TranslateModule, TranslateService } from "@ngx-translate/core";
import { Observable, forkJoin } from "rxjs"; import { Observable, forkJoin } from "rxjs";
import { AircraftService } from "../../services/aircraft.service"; import { AircraftService } from "../../services/aircraft.service";
@@ -10,27 +10,31 @@ import { JumpTypeService } from "../../services/jump-type.service";
import { ServiceComm } from "../../services/service-comm.service"; import { ServiceComm } from "../../services/service-comm.service";
@Component({ @Component({
selector: "app-default", selector: "app-default",
templateUrl: "./default.component.html", templateUrl: "./default.component.html",
styleUrls: ["./default.component.css"], styleUrls: ["./default.component.css"],
standalone: false imports: [TranslateModule],
}) })
export class DefaultComponent implements OnInit { export class DefaultComponent implements OnInit {
constructor(private serviceComm: ServiceComm, constructor(
private translateService: TranslateService, private serviceComm: ServiceComm,
private authenticationService: AuthenticationService, private translateService: TranslateService,
private serviceApiAircraft : AircraftService, private authenticationService: AuthenticationService,
private serviceApiJumpType : JumpTypeService, private serviceApiAircraft: AircraftService,
private serviceApiDropzone : DropzoneService, private serviceApiJumpType: JumpTypeService,
private serviceApiGear : GearService) {} private serviceApiDropzone: DropzoneService,
private serviceApiGear: GearService
) {}
ngOnInit() { ngOnInit() {
this.authenticationService.alwaysLogin(); this.authenticationService.alwaysLogin();
this.putToCacheRefDatas().subscribe(() => { console.log("Push to cache the referentiel datas"); }); this.putToCacheRefDatas().subscribe(() => {
console.log("Push to cache the referentiel datas");
});
this.updateTitle(); this.updateTitle();
this.serviceComm.forceTranslateTitle.subscribe((data)=> { this.serviceComm.forceTranslateTitle.subscribe((data) => {
if (data === true){ if (data === true) {
this.updateTitle(); this.updateTitle();
} }
}); });
@@ -46,8 +50,8 @@ export class DefaultComponent implements OnInit {
} }
private updateTitle() { private updateTitle() {
this.translateService.get("Default_Title").subscribe( this.translateService.get("Default_Title").subscribe((data) => {
data => { this.serviceComm.updatedComponentTitle(data); } this.serviceComm.updatedComponentTitle(data);
); });
} }
} }

View File

@@ -1,24 +1,27 @@
import { Component, Inject, OnInit } from '@angular/core'; import { Component, Inject, OnInit } from "@angular/core";
import { MAT_DIALOG_DATA } from '@angular/material/dialog'; import { MAT_DIALOG_DATA } from "@angular/material/dialog";
import { AddAction } from '../../models/add-action.enum'; import { AddAction } from "../../models/add-action.enum";
import { JumpResp } from '../../models/jump'; import { JumpResp } from "../../models/jump";
import { JumpService } from '../../services/jump.service'; import { JumpService } from "../../services/jump.service";
import { ServiceComm } from '../../services/service-comm.service'; import { ServiceComm } from "../../services/service-comm.service";
import { TranslateModule } from "@ngx-translate/core";
@Component({ @Component({
selector: 'app-jump-infos', selector: "app-jump-infos",
templateUrl: './jump-infos.component.html', templateUrl: "./jump-infos.component.html",
styleUrls: ['./jump-infos.component.css'], styleUrls: ["./jump-infos.component.css"],
standalone: false imports: [TranslateModule],
}) })
export class JumpInfosComponent implements OnInit { export class JumpInfosComponent implements OnInit {
public editMode: boolean; public editMode: boolean;
public jump: JumpResp public jump: JumpResp;
constructor(@Inject(MAT_DIALOG_DATA) public data: any, constructor(
private serviceJump: JumpService, @Inject(MAT_DIALOG_DATA) public data: any,
private serviceComm: ServiceComm) { private serviceJump: JumpService,
private serviceComm: ServiceComm
) {
this.jump = new JumpResp(data.jump); this.jump = new JumpResp(data.jump);
this.editMode = data.editMode; this.editMode = data.editMode;
} }
@@ -26,12 +29,15 @@ export class JumpInfosComponent implements OnInit {
ngOnInit(): void {} ngOnInit(): void {}
public updateJump() { public updateJump() {
this.serviceJump.updateJump(this.jump.id, this.serviceJump
this.jump.isSpecial, .updateJump(
this.jump.withCutaway, this.jump.id,
this.jump.notes) this.jump.isSpecial,
.subscribe(() => { this.jump.withCutaway,
this.serviceComm.refreshData(AddAction.Jump); this.jump.notes
}); )
.subscribe(() => {
this.serviceComm.refreshData(AddAction.Jump);
});
} }
} }

View File

@@ -1,46 +1,49 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from "@angular/core";
import { MatPaginator } from '@angular/material/paginator'; import { MatPaginator } from "@angular/material/paginator";
import { MatTableDataSource } from '@angular/material/table'; import { MatTableDataSource } from "@angular/material/table";
import { MatDialog } from '@angular/material/dialog'; import { MatDialog } from "@angular/material/dialog";
import { TranslateService } from '@ngx-translate/core'; import { TranslateModule, TranslateService } from "@ngx-translate/core";
import { AircraftService } from '../../services/aircraft.service'; import { AircraftService } from "../../services/aircraft.service";
import { ServiceComm } from '../../services/service-comm.service'; import { ServiceComm } from "../../services/service-comm.service";
import { AuthenticationService } from '../../services/authentication.service'; import { AuthenticationService } from "../../services/authentication.service";
import { NewAircraftComponent } from '../new-aircraft/new-aircraft.component'; import { NewAircraftComponent } from "../new-aircraft/new-aircraft.component";
import { AddAction } from '../../models/add-action.enum'; import { AddAction } from "../../models/add-action.enum";
import { AircraftResp } from '../../models/aircraft'; import { AircraftResp } from "../../models/aircraft";
@Component({ @Component({
selector: 'app-list-of-aircrafts', selector: "app-list-of-aircrafts",
templateUrl: './list-of-aircrafts.component.html', templateUrl: "./list-of-aircrafts.component.html",
styleUrls: ['./list-of-aircrafts.component.css'], styleUrls: ["./list-of-aircrafts.component.css"],
standalone: false imports: [TranslateModule],
}) })
export class ListOfAircraftsComponent implements OnInit { export class ListOfAircraftsComponent implements OnInit {
public displayedColumns: Array<string> = ['name', 'imageData']; public displayedColumns: Array<string> = ["name", "imageData"];
public dataSourceTable: MatTableDataSource<AircraftResp>; public dataSourceTable: MatTableDataSource<AircraftResp>;
public resultsLength = 0; public resultsLength = 0;
public isUserAdmin: boolean; public isUserAdmin: boolean;
@ViewChild(MatPaginator, { static: true }) paginator: MatPaginator; @ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;
constructor(private serviceApi: AircraftService, constructor(
private serviceComm: ServiceComm, private serviceApi: AircraftService,
private authenticationService: AuthenticationService, private serviceComm: ServiceComm,
public dialog: MatDialog, private authenticationService: AuthenticationService,
private translateService: TranslateService) { public dialog: MatDialog,
this.isUserAdmin = this.authenticationService.currentUserValue.roles === "admin"; private translateService: TranslateService
) {
this.isUserAdmin =
this.authenticationService.currentUserValue.roles === "admin";
} }
ngOnInit() { ngOnInit() {
this.serviceComm.refreshRequest.subscribe(action => { this.serviceComm.refreshRequest.subscribe((action) => {
if (action === AddAction.Aircraft) { if (action === AddAction.Aircraft) {
this.dialog.closeAll(); this.dialog.closeAll();
this.getListOfAircrafts(); this.getListOfAircrafts();
} }
}); });
this.serviceComm.forceTranslateTitle.subscribe((data)=> { this.serviceComm.forceTranslateTitle.subscribe((data) => {
if (data === true){ if (data === true) {
this.updateTitle(); this.updateTitle();
} }
}); });
@@ -50,7 +53,7 @@ export class ListOfAircraftsComponent implements OnInit {
} }
private getListOfAircrafts() { private getListOfAircrafts() {
this.serviceApi.getListOfAircrafts().subscribe(data => { this.serviceApi.getListOfAircrafts().subscribe((data) => {
setTimeout(() => { setTimeout(() => {
data.sort((a, b) => a.name.localeCompare(b.name)); data.sort((a, b) => a.name.localeCompare(b.name));
this.dataSourceTable = new MatTableDataSource<AircraftResp>(data); this.dataSourceTable = new MatTableDataSource<AircraftResp>(data);
@@ -65,8 +68,8 @@ export class ListOfAircraftsComponent implements OnInit {
} }
private updateTitle() { private updateTitle() {
this.translateService.get("ListAircrafts_Title").subscribe( this.translateService.get("ListAircrafts_Title").subscribe((data) => {
data => { this.serviceComm.updatedComponentTitle(data); } this.serviceComm.updatedComponentTitle(data);
); });
} }
} }

View File

@@ -1,40 +1,43 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from "@angular/core";
import { MatPaginator } from '@angular/material/paginator'; import { MatPaginator } from "@angular/material/paginator";
import { MatTableDataSource } from '@angular/material/table'; import { MatTableDataSource } from "@angular/material/table";
import { MatDialog } from '@angular/material/dialog'; import { MatDialog } from "@angular/material/dialog";
import { TranslateService } from '@ngx-translate/core'; import { TranslateModule, TranslateService } from "@ngx-translate/core";
import { AddAction } from '../../models/add-action.enum'; import { AddAction } from "../../models/add-action.enum";
import { DropZoneResp } from '../../models/dropzone'; import { DropZoneResp } from "../../models/dropzone";
import { DropzoneService } from '../../services/dropzone.service'; import { DropzoneService } from "../../services/dropzone.service";
import { ServiceComm } from '../../services/service-comm.service'; import { ServiceComm } from "../../services/service-comm.service";
import { AuthenticationService } from '../../services/authentication.service'; import { AuthenticationService } from "../../services/authentication.service";
import { NewDropZoneComponent } from '../new-drop-zone/new-drop-zone.component'; import { NewDropZoneComponent } from "../new-drop-zone/new-drop-zone.component";
@Component({ @Component({
selector: 'app-list-of-dzs', selector: "app-list-of-dzs",
templateUrl: './list-of-dzs.component.html', templateUrl: "./list-of-dzs.component.html",
styleUrls: ['./list-of-dzs.component.css'], styleUrls: ["./list-of-dzs.component.css"],
standalone: false imports: [TranslateModule],
}) })
export class ListOfDzsComponent implements OnInit { export class ListOfDzsComponent implements OnInit {
public displayedColumns: Array<string> = [ public displayedColumns: Array<string> = [
'isfavorite', "isfavorite",
'name', "name",
'address', "address",
'type', "type",
]; ];
public dataSourceTable: MatTableDataSource<DropZoneResp>; public dataSourceTable: MatTableDataSource<DropZoneResp>;
public isUserAdmin: boolean; public isUserAdmin: boolean;
public resultsLength = 0; public resultsLength = 0;
@ViewChild(MatPaginator, { static: true }) paginator: MatPaginator; @ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;
constructor(private serviceApi: DropzoneService, constructor(
private serviceComm: ServiceComm, private serviceApi: DropzoneService,
private authenticationService: AuthenticationService, private serviceComm: ServiceComm,
public dialog: MatDialog, private authenticationService: AuthenticationService,
private translateService: TranslateService) { public dialog: MatDialog,
this.isUserAdmin = this.authenticationService.currentUserValue.roles === "admin"; private translateService: TranslateService
) {
this.isUserAdmin =
this.authenticationService.currentUserValue.roles === "admin";
} }
ngOnInit() { ngOnInit() {
@@ -44,8 +47,8 @@ export class ListOfDzsComponent implements OnInit {
this.getListOfDropZones(); this.getListOfDropZones();
} }
}); });
this.serviceComm.forceTranslateTitle.subscribe((data)=> { this.serviceComm.forceTranslateTitle.subscribe((data) => {
if (data === true){ if (data === true) {
this.updateTitle(); this.updateTitle();
} }
}); });
@@ -55,15 +58,18 @@ export class ListOfDzsComponent implements OnInit {
} }
private getListOfDropZones() { private getListOfDropZones() {
this.serviceApi.getListOfDropZones() this.serviceApi.getListOfDropZones().subscribe((data) => {
.subscribe((data) => { setTimeout(() => {
setTimeout(() => { data.sort(
data.sort((a, b) => (b.isFavorite ? 1 : 0) - (a.isFavorite ? 1 : 0) || a.name.localeCompare(b.name)); (a, b) =>
this.dataSourceTable = new MatTableDataSource<DropZoneResp>(data); (b.isFavorite ? 1 : 0) - (a.isFavorite ? 1 : 0) ||
this.dataSourceTable.paginator = this.paginator; a.name.localeCompare(b.name)
this.resultsLength = data.length; );
}, 500); this.dataSourceTable = new MatTableDataSource<DropZoneResp>(data);
}); this.dataSourceTable.paginator = this.paginator;
this.resultsLength = data.length;
}, 500);
});
} }
public setToFavorite(dropzone: DropZoneResp) { public setToFavorite(dropzone: DropZoneResp) {
@@ -88,8 +94,8 @@ export class ListOfDzsComponent implements OnInit {
openDialogToAdd() { openDialogToAdd() {
this.dialog.open(NewDropZoneComponent, { this.dialog.open(NewDropZoneComponent, {
height: '400px', height: "400px",
width: '600px', width: "600px",
}); });
} }
@@ -99,8 +105,8 @@ export class ListOfDzsComponent implements OnInit {
} }
private updateTitle() { private updateTitle() {
this.translateService.get("ListDz_Title").subscribe( this.translateService.get("ListDz_Title").subscribe((data) => {
data => { this.serviceComm.updatedComponentTitle(data); } this.serviceComm.updatedComponentTitle(data);
); });
} }
} }

View File

@@ -2,7 +2,7 @@ import { Component, OnInit, ViewChild } from "@angular/core";
import { MatPaginator } from "@angular/material/paginator"; import { MatPaginator } from "@angular/material/paginator";
import { MatTableDataSource } from "@angular/material/table"; import { MatTableDataSource } from "@angular/material/table";
import { MatDialog } from "@angular/material/dialog"; import { MatDialog } from "@angular/material/dialog";
import { TranslateService } from '@ngx-translate/core'; import { TranslateModule, TranslateService } from "@ngx-translate/core";
import { GearService } from "../../services/gear.service"; import { GearService } from "../../services/gear.service";
import { ServiceComm } from "../../services/service-comm.service"; import { ServiceComm } from "../../services/service-comm.service";
@@ -11,10 +11,10 @@ import { AddAction } from "../../models/add-action.enum";
import { NewGearComponent } from "../new-gear/new-gear.component"; import { NewGearComponent } from "../new-gear/new-gear.component";
@Component({ @Component({
selector: "app-list-of-gears", selector: "app-list-of-gears",
templateUrl: "./list-of-gears.component.html", templateUrl: "./list-of-gears.component.html",
styleUrls: ["./list-of-gears.component.css"], styleUrls: ["./list-of-gears.component.css"],
standalone: false imports: [TranslateModule],
}) })
export class ListOfGearsComponent implements OnInit { export class ListOfGearsComponent implements OnInit {
public displayedColumns: Array<string> = [ public displayedColumns: Array<string> = [
@@ -23,26 +23,28 @@ export class ListOfGearsComponent implements OnInit {
"maxSize", "maxSize",
"aad", "aad",
"mainCanopy", "mainCanopy",
"reserveCanopy" "reserveCanopy",
]; ];
public dataSourceTable: MatTableDataSource<GearResp>; public dataSourceTable: MatTableDataSource<GearResp>;
public resultsLength = 0; public resultsLength = 0;
@ViewChild(MatPaginator, { static: true }) paginator: MatPaginator; @ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;
constructor(private serviceApi: GearService, constructor(
private serviceComm: ServiceComm, private serviceApi: GearService,
public dialog: MatDialog, private serviceComm: ServiceComm,
private translateService: TranslateService) {} public dialog: MatDialog,
private translateService: TranslateService
) {}
ngOnInit() { ngOnInit() {
this.serviceComm.refreshRequest.subscribe(action => { this.serviceComm.refreshRequest.subscribe((action) => {
if (action === AddAction.Gear) { if (action === AddAction.Gear) {
this.dialog.closeAll(); this.dialog.closeAll();
this.getListOfGears(); this.getListOfGears();
} }
}); });
this.serviceComm.forceTranslateTitle.subscribe((data)=> { this.serviceComm.forceTranslateTitle.subscribe((data) => {
if (data === true){ if (data === true) {
this.updateTitle(); this.updateTitle();
} }
}); });
@@ -52,8 +54,7 @@ export class ListOfGearsComponent implements OnInit {
} }
getListOfGears() { getListOfGears() {
this.serviceApi.getListOfGears() this.serviceApi.getListOfGears().subscribe((data) => {
.subscribe(data => {
setTimeout(() => { setTimeout(() => {
data.sort((a, b) => b.id - a.id); data.sort((a, b) => b.id - a.id);
this.dataSourceTable = new MatTableDataSource<GearResp>(data); this.dataSourceTable = new MatTableDataSource<GearResp>(data);
@@ -66,13 +67,13 @@ export class ListOfGearsComponent implements OnInit {
openDialogToAdd() { openDialogToAdd() {
this.dialog.open(NewGearComponent, { this.dialog.open(NewGearComponent, {
height: "400px", height: "400px",
width: "600px" width: "600px",
}); });
} }
private updateTitle() { private updateTitle() {
this.translateService.get("ListGears_Title").subscribe( this.translateService.get("ListGears_Title").subscribe((data) => {
data => { this.serviceComm.updatedComponentTitle(data); } this.serviceComm.updatedComponentTitle(data);
); });
} }
} }

View File

@@ -1,30 +1,31 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from "@angular/core";
import { FormGroup, FormControl, Validators } from '@angular/forms'; import { FormGroup, FormControl, Validators } from "@angular/forms";
import { MatTableDataSource } from '@angular/material/table'; import { MatTableDataSource } from "@angular/material/table";
import { MatPaginator } from '@angular/material/paginator'; import { MatPaginator } from "@angular/material/paginator";
import { trigger,state, style } from '@angular/animations'; import { trigger, state, style } from "@angular/animations";
import { ImageService } from '../../services/image.service'; import { ImageService } from "../../services/image.service";
import { ServiceComm } from '../../services/service-comm.service'; import { ServiceComm } from "../../services/service-comm.service";
import { ImageResp } from '../../models/image'; import { ImageResp } from "../../models/image";
import { AddAction } from '../../models/add-action.enum'; import { AddAction } from "../../models/add-action.enum";
import { TranslateModule } from "@ngx-translate/core";
@Component({ @Component({
selector: 'app-list-of-images', selector: "app-list-of-images",
templateUrl: './list-of-images.component.html', templateUrl: "./list-of-images.component.html",
styleUrls: ['./list-of-images.component.css'], styleUrls: ["./list-of-images.component.css"],
animations: [ animations: [
trigger('rotatedState', [ trigger("rotatedState", [
state('default', style({ transform: 'rotate(0)' })), state("default", style({ transform: "rotate(0)" })),
state('rot90', style({ transform: 'rotate(-90deg)' })), state("rot90", style({ transform: "rotate(-90deg)" })),
state('rot180', style({ transform: 'rotate(-180deg)' })), state("rot180", style({ transform: "rotate(-180deg)" })),
state('rot270', style({ transform: 'rotate(-270deg)' })), state("rot270", style({ transform: "rotate(-270deg)" })),
]) ]),
], ],
standalone: false imports: [TranslateModule],
}) })
export class ListOfImagesComponent implements OnInit { export class ListOfImagesComponent implements OnInit {
public displayedColumns: Array<string> = ['comment', 'data']; public displayedColumns: Array<string> = ["comment", "data"];
public imgForm: FormGroup; public imgForm: FormGroup;
public imageError: string; public imageError: string;
private selectedFile: string; private selectedFile: string;
@@ -32,13 +33,13 @@ export class ListOfImagesComponent implements OnInit {
public showPopin: boolean; public showPopin: boolean;
public dataSourceTable: MatTableDataSource<ImageResp>; public dataSourceTable: MatTableDataSource<ImageResp>;
public resultsLength = 0; public resultsLength = 0;
public stateRotation: string = 'default'; public stateRotation: string = "default";
@ViewChild(MatPaginator, { static: true }) paginator: MatPaginator; @ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;
constructor( constructor(
private serviceApi: ImageService, private serviceApi: ImageService,
private serviceComm: ServiceComm private serviceComm: ServiceComm
) { } ) {}
ngOnInit(): void { ngOnInit(): void {
this.serviceComm.refreshRequest.subscribe((action) => { this.serviceComm.refreshRequest.subscribe((action) => {
@@ -49,33 +50,32 @@ export class ListOfImagesComponent implements OnInit {
this.getListOfImages(); this.getListOfImages();
this.imgForm = new FormGroup({ this.imgForm = new FormGroup({
comment: new FormControl('', Validators.required), comment: new FormControl("", Validators.required),
image: new FormControl('', Validators.required), image: new FormControl("", Validators.required),
}); });
} }
private getListOfImages() { private getListOfImages() {
this.serviceApi.getListOfImages() this.serviceApi.getListOfImages().subscribe((data) => {
.subscribe((data) => { setTimeout(() => {
setTimeout(() => { this.dataSourceTable = new MatTableDataSource<ImageResp>(data);
this.dataSourceTable = new MatTableDataSource<ImageResp>(data); this.dataSourceTable.paginator = this.paginator;
this.dataSourceTable.paginator = this.paginator; this.resultsLength = data.length;
this.resultsLength = data.length; }, 500);
}, 500); });
});
} }
public onFileChanged(fileInput: any) { public onFileChanged(fileInput: any) {
const file = fileInput.dataTransfer const file = fileInput.dataTransfer
? fileInput.dataTransfer.files[0] ? fileInput.dataTransfer.files[0]
: fileInput.target.files[0]; : fileInput.target.files[0];
const allowed_types = ['image/png', 'image/jpeg']; const allowed_types = ["image/png", "image/jpeg"];
const max_size = 20971520; const max_size = 20971520;
if (!allowed_types.includes(file.type)) { if (!allowed_types.includes(file.type)) {
this.imageError = 'Only Images are allowed ( JPG | PNG )'; this.imageError = "Only Images are allowed ( JPG | PNG )";
} else if (file.size > max_size) { } else if (file.size > max_size) {
this.imageError = 'Maximum size allowed is ' + max_size / 1000 + 'Mb'; this.imageError = "Maximum size allowed is " + max_size / 1000 + "Mb";
} else { } else {
const reader = new FileReader(); const reader = new FileReader();
reader.onload = this.checkAndExtractDataToBase64.bind(this); reader.onload = this.checkAndExtractDataToBase64.bind(this);
@@ -90,16 +90,16 @@ export class ListOfImagesComponent implements OnInit {
const image = new Image(); const image = new Image();
image.src = e.target.result; image.src = e.target.result;
image.onload = (rs) => { image.onload = (rs) => {
const img_height = rs.currentTarget['height']; const img_height = rs.currentTarget["height"];
const img_width = rs.currentTarget['width']; const img_width = rs.currentTarget["width"];
if (img_height > max_height && img_width > max_width) { if (img_height > max_height && img_width > max_width) {
this.imageError = this.imageError =
'Maximum dimentions allowed ' + max_height + '*' + max_width + 'px'; "Maximum dimentions allowed " + max_height + "*" + max_width + "px";
} else { } else {
const imgBase64Path = e.target.result; const imgBase64Path = e.target.result;
this.selectedFile = imgBase64Path; this.selectedFile = imgBase64Path;
this.imageError = 'OK'; this.imageError = "OK";
} }
}; };
} }
@@ -109,13 +109,14 @@ export class ListOfImagesComponent implements OnInit {
return; return;
} }
this.serviceApi.addImage(formData.comment, this.selectedFile) this.serviceApi
.subscribe( .addImage(formData.comment, this.selectedFile)
() => { this.getListOfImages(); } .subscribe(() => {
); this.getListOfImages();
});
} }
openModal(image: ImageResp){ openModal(image: ImageResp) {
this.popinImage = image.data; this.popinImage = image.data;
this.showPopin = true; this.showPopin = true;
} }
@@ -125,14 +126,14 @@ export class ListOfImagesComponent implements OnInit {
} }
rotate() { rotate() {
if (this.stateRotation === 'default') { if (this.stateRotation === "default") {
this.stateRotation = 'rot90'; this.stateRotation = "rot90";
} else if (this.stateRotation === 'rot90') { } else if (this.stateRotation === "rot90") {
this.stateRotation = 'rot180'; this.stateRotation = "rot180";
} else if (this.stateRotation === 'rot180') { } else if (this.stateRotation === "rot180") {
this.stateRotation = 'rot270'; this.stateRotation = "rot270";
} else { } else {
this.stateRotation = 'default'; this.stateRotation = "default";
} }
} }
} }

View File

@@ -2,20 +2,20 @@ import { Component, OnInit, ViewChild } from "@angular/core";
import { MatPaginator } from "@angular/material/paginator"; import { MatPaginator } from "@angular/material/paginator";
import { MatTableDataSource } from "@angular/material/table"; import { MatTableDataSource } from "@angular/material/table";
import { MatDialog } from "@angular/material/dialog"; import { MatDialog } from "@angular/material/dialog";
import { TranslateService } from '@ngx-translate/core'; import { TranslateModule, TranslateService } from "@ngx-translate/core";
import { AddAction } from "../../models/add-action.enum"; import { AddAction } from "../../models/add-action.enum";
import { JumpTypeResp } from "../../models/jumpType"; import { JumpTypeResp } from "../../models/jumpType";
import { JumpTypeService } from "../../services/jump-type.service"; import { JumpTypeService } from "../../services/jump-type.service";
import { ServiceComm } from "../../services/service-comm.service"; import { ServiceComm } from "../../services/service-comm.service";
import { AuthenticationService } from '../../services/authentication.service'; import { AuthenticationService } from "../../services/authentication.service";
import { NewJumpTypeComponent } from "../new-jump-type/new-jump-type.component"; import { NewJumpTypeComponent } from "../new-jump-type/new-jump-type.component";
@Component({ @Component({
selector: "app-list-of-jump-types", selector: "app-list-of-jump-types",
templateUrl: "./list-of-jump-types.component.html", templateUrl: "./list-of-jump-types.component.html",
styleUrls: ["./list-of-jump-types.component.css"], styleUrls: ["./list-of-jump-types.component.css"],
standalone: false imports: [TranslateModule],
}) })
export class ListOfJumpTypesComponent implements OnInit { export class ListOfJumpTypesComponent implements OnInit {
public displayedColumns: Array<string> = ["name"]; public displayedColumns: Array<string> = ["name"];
@@ -24,23 +24,26 @@ export class ListOfJumpTypesComponent implements OnInit {
public resultsLength = 0; public resultsLength = 0;
@ViewChild(MatPaginator, { static: true }) paginator: MatPaginator; @ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;
constructor(private serviceApi: JumpTypeService, constructor(
private serviceComm: ServiceComm, private serviceApi: JumpTypeService,
private authenticationService: AuthenticationService, private serviceComm: ServiceComm,
public dialog: MatDialog, private authenticationService: AuthenticationService,
private translateService: TranslateService) { public dialog: MatDialog,
this.isUserAdmin = this.authenticationService.currentUserValue.roles === "admin"; private translateService: TranslateService
) {
this.isUserAdmin =
this.authenticationService.currentUserValue.roles === "admin";
} }
ngOnInit() { ngOnInit() {
this.serviceComm.refreshRequest.subscribe(action => { this.serviceComm.refreshRequest.subscribe((action) => {
if (action === AddAction.JumpType) { if (action === AddAction.JumpType) {
this.dialog.closeAll(); this.dialog.closeAll();
this.getListOfJumpTypes(); this.getListOfJumpTypes();
} }
}); });
this.serviceComm.forceTranslateTitle.subscribe((data)=> { this.serviceComm.forceTranslateTitle.subscribe((data) => {
if (data === true){ if (data === true) {
this.updateTitle(); this.updateTitle();
} }
}); });
@@ -50,7 +53,7 @@ export class ListOfJumpTypesComponent implements OnInit {
} }
getListOfJumpTypes() { getListOfJumpTypes() {
this.serviceApi.getListOfJumpTypes().subscribe(data => { this.serviceApi.getListOfJumpTypes().subscribe((data) => {
setTimeout(() => { setTimeout(() => {
data.sort((a, b) => a.name.localeCompare(b.name)); data.sort((a, b) => a.name.localeCompare(b.name));
this.dataSourceTable = new MatTableDataSource<JumpTypeResp>(data); this.dataSourceTable = new MatTableDataSource<JumpTypeResp>(data);
@@ -65,8 +68,8 @@ export class ListOfJumpTypesComponent implements OnInit {
} }
private updateTitle() { private updateTitle() {
this.translateService.get("ListJumpTypes_Title").subscribe( this.translateService.get("ListJumpTypes_Title").subscribe((data) => {
data => { this.serviceComm.updatedComponentTitle(data); } this.serviceComm.updatedComponentTitle(data);
); });
} }
} }

View File

@@ -2,7 +2,7 @@ import { Component, OnInit, ViewChild } from "@angular/core";
import { MatPaginator, PageEvent } from "@angular/material/paginator"; import { MatPaginator, PageEvent } from "@angular/material/paginator";
import { MatTableDataSource } from "@angular/material/table"; import { MatTableDataSource } from "@angular/material/table";
import { MatDialog } from "@angular/material/dialog"; import { MatDialog } from "@angular/material/dialog";
import { TranslateService } from "@ngx-translate/core"; import { TranslateModule, TranslateService } from "@ngx-translate/core";
import { AddAction } from "../../models/add-action.enum"; import { AddAction } from "../../models/add-action.enum";
import { Jump } from "../../models/jump"; import { Jump } from "../../models/jump";
@@ -12,10 +12,10 @@ import { JumpInfosComponent } from "../jump-infos/jump-infos.component";
import { StatsService } from "../../services/stats.service"; import { StatsService } from "../../services/stats.service";
@Component({ @Component({
selector: "app-list-of-jumps", selector: "app-list-of-jumps",
templateUrl: "./list-of-jumps.component.html", templateUrl: "./list-of-jumps.component.html",
styleUrls: ["./list-of-jumps.component.css"], styleUrls: ["./list-of-jumps.component.css"],
standalone: false imports: [TranslateModule],
}) })
export class ListOfJumpsComponent implements OnInit { export class ListOfJumpsComponent implements OnInit {
public displayedColumns: Array<string> = [ public displayedColumns: Array<string> = [
@@ -31,11 +31,12 @@ export class ListOfJumpsComponent implements OnInit {
@ViewChild(MatPaginator, { static: true }) paginator: MatPaginator; @ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;
public isLoading: boolean = false; public isLoading: boolean = false;
constructor(private serviceApi: JumpService, constructor(
private serviceComm: ServiceComm, private serviceApi: JumpService,
public dialog: MatDialog, private serviceComm: ServiceComm,
private translateService: TranslateService, public dialog: MatDialog,
private statsService: StatsService private translateService: TranslateService,
private statsService: StatsService
) {} ) {}
ngAferViewInit(): void { ngAferViewInit(): void {
@@ -62,15 +63,16 @@ export class ListOfJumpsComponent implements OnInit {
getListOfJumps(pageSize: number = 20, pageIndex: number = 0) { getListOfJumps(pageSize: number = 20, pageIndex: number = 0) {
this.isLoading = true; this.isLoading = true;
this.serviceApi.getJumps(pageIndex * pageSize, pageIndex * pageSize + pageSize) this.serviceApi
.subscribe((data) => { .getJumps(pageIndex * pageSize, pageIndex * pageSize + pageSize)
this.dataSourceTable.data = data.rows; .subscribe((data) => {
setTimeout(() => { this.dataSourceTable.data = data.rows;
this.paginator.length = data.count; setTimeout(() => {
this.paginator.pageIndex = pageIndex; this.paginator.length = data.count;
this.isLoading = false; this.paginator.pageIndex = pageIndex;
}, 500); this.isLoading = false;
}); }, 500);
});
} }
openDialog(item: Jump, editMode: boolean) { openDialog(item: Jump, editMode: boolean) {

View File

@@ -38,6 +38,7 @@
</mat-nav-list> </mat-nav-list>
<div class="chart-container"> <div class="chart-container">
<!-- https://www.freecodecamp.org/news/how-to-make-bar-and-line-charts-using-chartjs-in-angular/ -->
<canvas <canvas
baseChart baseChart
[data]="barChartData" [data]="barChartData"

View File

@@ -1,9 +1,9 @@
import { Component, OnInit } from "@angular/core"; import { Component, OnInit } from "@angular/core";
import { formatDate } from "@angular/common"; import { formatDate } from "@angular/common";
import { TranslateService } from "@ngx-translate/core"; import { TranslateModule, TranslateService } from "@ngx-translate/core";
import { MatTableDataSource } from "@angular/material/table"; import { MatTableDataSource } from "@angular/material/table";
import { ChartConfiguration, ChartData, ChartType } from "chart.js"; import { ChartConfiguration, ChartData, ChartType } from "chart.js";
import { from, of, groupBy, mergeMap, reduce, map, Observable } from "rxjs"; import { from, groupBy, mergeMap, reduce, map } from "rxjs";
import { ServiceComm } from "../../services/service-comm.service"; import { ServiceComm } from "../../services/service-comm.service";
import { TunnelFlightService } from "../../services/tunnel-flight.service"; import { TunnelFlightService } from "../../services/tunnel-flight.service";
@@ -14,7 +14,7 @@ import { TunnelFlight, TunnelFlightByMonth } from "../../models/tunnel-flight";
selector: "app-list-of-tunnel-flights", selector: "app-list-of-tunnel-flights",
templateUrl: "./list-of-tunnel-flights.component.html", templateUrl: "./list-of-tunnel-flights.component.html",
styleUrls: ["./list-of-tunnel-flights.component.css"], styleUrls: ["./list-of-tunnel-flights.component.css"],
standalone: false, imports: [TranslateModule],
}) })
export class ListOfTunnelFlightsComponent implements OnInit { export class ListOfTunnelFlightsComponent implements OnInit {
public barChartLegend = true; public barChartLegend = true;

View File

@@ -6,12 +6,13 @@ import { MatInput } from "@angular/material/input";
import { first } from "rxjs/operators"; import { first } from "rxjs/operators";
import { AuthenticationService } from "../../services/authentication.service"; import { AuthenticationService } from "../../services/authentication.service";
import { TranslateModule } from "@ngx-translate/core";
@Component({ @Component({
selector: "app-login-user", selector: "app-login-user",
templateUrl: "./login-user.component.html", templateUrl: "./login-user.component.html",
styleUrls: ["./login-user.component.css"], styleUrls: ["./login-user.component.css"],
standalone: false, imports: [TranslateModule],
}) })
export class LoginUserComponent implements OnInit, AfterViewInit { export class LoginUserComponent implements OnInit, AfterViewInit {
loginForm: FormGroup; loginForm: FormGroup;

View File

@@ -1,18 +1,18 @@
import { Component, OnInit } from "@angular/core"; import { Component, OnInit } from "@angular/core";
import { TranslateService } from "@ngx-translate/core"; import { TranslateModule, TranslateService } from "@ngx-translate/core";
@Component({ @Component({
selector: "app-login", selector: "app-login",
templateUrl: "./login.component.html", templateUrl: "./login.component.html",
styleUrls: ["./login.component.css"], styleUrls: ["./login.component.css"],
standalone: false imports: [TranslateModule],
}) })
export class LoginComponent implements OnInit { export class LoginComponent implements OnInit {
public selectedLanguageFlag: string; public selectedLanguageFlag: string;
constructor(private translate: TranslateService) { constructor(private translate: TranslateService) {
translate.addLangs(['en', 'fr']); translate.addLangs(["en", "fr"]);
translate.setDefaultLang('en'); translate.setDefaultLang("en");
this.selectedLanguageFlag = "en"; this.selectedLanguageFlag = "en";
} }

View File

@@ -1,52 +1,58 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from "@angular/core";
import { FormControl, FormGroup, Validators } from '@angular/forms'; import { FormControl, FormGroup, Validators } from "@angular/forms";
import { AircraftService } from '../../services/aircraft.service'; import { AircraftService } from "../../services/aircraft.service";
import { ServiceComm } from '../../services/service-comm.service'; import { ServiceComm } from "../../services/service-comm.service";
import { AddAction } from '../../models/add-action.enum'; import { AddAction } from "../../models/add-action.enum";
import { TranslateModule } from "@ngx-translate/core";
@Component({ @Component({
selector: 'app-new-aircraft', selector: "app-new-aircraft",
templateUrl: './new-aircraft.component.html', templateUrl: "./new-aircraft.component.html",
styleUrls: ['./new-aircraft.component.css'], styleUrls: ["./new-aircraft.component.css"],
standalone: false imports: [TranslateModule],
}) })
export class NewAircraftComponent implements OnInit { export class NewAircraftComponent implements OnInit {
public addForm: FormGroup; public addForm: FormGroup;
public imageError: string; public imageError: string;
private selectedFile: string; private selectedFile: string;
constructor(private serviceComm: ServiceComm, constructor(
private serviceApi: AircraftService) { private serviceComm: ServiceComm,
private serviceApi: AircraftService
) {
this.addForm = new FormGroup( this.addForm = new FormGroup(
{ {
aircraftName: new FormControl('', Validators.required) aircraftName: new FormControl("", Validators.required),
}, },
{ updateOn: 'blur' } { updateOn: "blur" }
); );
} }
ngOnInit() { } ngOnInit() {}
onSubmit(formData) { onSubmit(formData) {
if (formData.invalid) { if (formData.invalid) {
return; return;
} }
this.serviceApi.addAircraft(formData.aircraftName, this.selectedFile) this.serviceApi
.subscribe(() => { .addAircraft(formData.aircraftName, this.selectedFile)
this.serviceComm.refreshData(AddAction.Aircraft); .subscribe(() => {
}); this.serviceComm.refreshData(AddAction.Aircraft);
});
} }
public onFileChanged(fileInput: any) { public onFileChanged(fileInput: any) {
const file = fileInput.dataTransfer ? fileInput.dataTransfer.files[0] : fileInput.target.files[0]; const file = fileInput.dataTransfer
const allowed_types = ['image/png', 'image/jpeg']; ? fileInput.dataTransfer.files[0]
: fileInput.target.files[0];
const allowed_types = ["image/png", "image/jpeg"];
const max_size = 20971520; const max_size = 20971520;
if (!allowed_types.includes(file.type)) { if (!allowed_types.includes(file.type)) {
this.imageError = 'Only Images are allowed ( JPG | PNG )'; this.imageError = "Only Images are allowed ( JPG | PNG )";
} else if (file.size > max_size) { } else if (file.size > max_size) {
this.imageError = 'Maximum size allowed is ' + max_size / 1000 + 'Mb'; this.imageError = "Maximum size allowed is " + max_size / 1000 + "Mb";
} else { } else {
const reader = new FileReader(); const reader = new FileReader();
reader.onload = this.checkAndExtractDataToBase64.bind(this); reader.onload = this.checkAndExtractDataToBase64.bind(this);
@@ -61,16 +67,16 @@ export class NewAircraftComponent implements OnInit {
const image = new Image(); const image = new Image();
image.src = e.target.result; image.src = e.target.result;
image.onload = (rs) => { image.onload = (rs) => {
const img_height = rs.currentTarget['height']; const img_height = rs.currentTarget["height"];
const img_width = rs.currentTarget['width']; const img_width = rs.currentTarget["width"];
if (img_height > max_height && img_width > max_width) { if (img_height > max_height && img_width > max_width) {
this.imageError = this.imageError =
'Maximum dimentions allowed ' + max_height + '*' + max_width + 'px'; "Maximum dimentions allowed " + max_height + "*" + max_width + "px";
} else { } else {
const imgBase64Path = e.target.result; const imgBase64Path = e.target.result;
this.selectedFile = imgBase64Path; this.selectedFile = imgBase64Path;
this.imageError = 'OK'; this.imageError = "OK";
} }
}; };
} }

View File

@@ -3,12 +3,13 @@ import { FormControl, FormGroup, Validators } from "@angular/forms";
import { AddAction } from "../../models/add-action.enum"; import { AddAction } from "../../models/add-action.enum";
import { ServiceComm } from "../../services/service-comm.service"; import { ServiceComm } from "../../services/service-comm.service";
import { DropzoneService } from "../../services/dropzone.service"; import { DropzoneService } from "../../services/dropzone.service";
import { TranslateModule } from "@ngx-translate/core";
@Component({ @Component({
selector: "app-new-drop-zone", selector: "app-new-drop-zone",
templateUrl: "./new-drop-zone.component.html", templateUrl: "./new-drop-zone.component.html",
styleUrls: ["./new-drop-zone.component.css"], styleUrls: ["./new-drop-zone.component.css"],
standalone: false imports: [TranslateModule],
}) })
export class NewDropZoneComponent implements OnInit { export class NewDropZoneComponent implements OnInit {
public addForm: FormGroup; public addForm: FormGroup;
@@ -22,16 +23,16 @@ export class NewDropZoneComponent implements OnInit {
dzName: new FormControl("", Validators.required), dzName: new FormControl("", Validators.required),
gps: new FormControl("x.x,y.y", [ gps: new FormControl("x.x,y.y", [
Validators.required, Validators.required,
Validators.pattern("d+.d+,d+.d+") Validators.pattern("d+.d+,d+.d+"),
]), ]),
address: new FormControl("", Validators.required), address: new FormControl("", Validators.required),
website: new FormControl("", Validators.required), website: new FormControl("", Validators.required),
contactMail: new FormControl("", [ contactMail: new FormControl("", [
Validators.required, Validators.required,
Validators.email Validators.email,
]), ]),
isDz: new FormControl(true), isDz: new FormControl(true),
isTunnel: new FormControl(false) isTunnel: new FormControl(false),
}, },
{ updateOn: "blur" } { updateOn: "blur" }
); );
@@ -50,16 +51,19 @@ export class NewDropZoneComponent implements OnInit {
dzType.push("tunnel"); dzType.push("tunnel");
} }
this.dropzoneService.addDropZone(splitGps[0], this.dropzoneService
splitGps[1], .addDropZone(
formData.dzName, splitGps[0],
formData.address, splitGps[1],
formData.website, formData.dzName,
formData.contactMail, formData.address,
dzType, formData.website,
false) formData.contactMail,
.subscribe(() => { dzType,
this.serviceComm.refreshData(AddAction.Dropzone); false
}); )
.subscribe(() => {
this.serviceComm.refreshData(AddAction.Dropzone);
});
} }
} }

View File

@@ -4,19 +4,21 @@ import { FormControl, FormGroup, Validators } from "@angular/forms";
import { ServiceComm } from "../../services/service-comm.service"; import { ServiceComm } from "../../services/service-comm.service";
import { GearService } from "../../services/gear.service"; import { GearService } from "../../services/gear.service";
import { AddAction } from "../../models/add-action.enum"; import { AddAction } from "../../models/add-action.enum";
import { TranslateModule } from "@ngx-translate/core";
@Component({ @Component({
selector: "app-new-gear", selector: "app-new-gear",
templateUrl: "./new-gear.component.html", templateUrl: "./new-gear.component.html",
styleUrls: ["./new-gear.component.css"], styleUrls: ["./new-gear.component.css"],
standalone: false imports: [TranslateModule],
}) })
export class NewGearComponent implements OnInit { export class NewGearComponent implements OnInit {
public addForm: FormGroup; public addForm: FormGroup;
constructor(private serviceComm: ServiceComm, constructor(
private serviceApi: GearService) private serviceComm: ServiceComm,
{ private serviceApi: GearService
) {
this.addForm = new FormGroup( this.addForm = new FormGroup(
{ {
name: new FormControl("", Validators.required), name: new FormControl("", Validators.required),
@@ -24,41 +26,44 @@ export class NewGearComponent implements OnInit {
minSize: new FormControl("", [ minSize: new FormControl("", [
Validators.required, Validators.required,
Validators.min(60), Validators.min(60),
Validators.max(320) Validators.max(320),
]), ]),
maxSize: new FormControl("", [ maxSize: new FormControl("", [
Validators.required, Validators.required,
Validators.min(60), Validators.min(60),
Validators.max(320) Validators.max(320),
]), ]),
aad: new FormControl("", Validators.required), aad: new FormControl("", Validators.required),
mainCanopy: new FormControl("", [ mainCanopy: new FormControl("", [
Validators.required, Validators.required,
Validators.min(60), Validators.min(60),
Validators.max(320) Validators.max(320),
]), ]),
reserveCanopy: new FormControl("", [ reserveCanopy: new FormControl("", [
Validators.required, Validators.required,
Validators.min(60), Validators.min(60),
Validators.max(320) Validators.max(320),
]) ]),
}, },
{ updateOn: "blur" } { updateOn: "blur" }
); );
} }
ngOnInit() { } ngOnInit() {}
onSubmit(formData) { onSubmit(formData) {
this.serviceApi.addGear(formData.name, this.serviceApi
formData.manufacturer, .addGear(
+formData.minSize, formData.name,
+formData.maxSize, formData.manufacturer,
formData.aad, +formData.minSize,
formData.mainCanopy, +formData.maxSize,
formData.reserveCanopy) formData.aad,
.subscribe(() => { formData.mainCanopy,
this.serviceComm.refreshData(AddAction.Gear); formData.reserveCanopy
}); )
.subscribe(() => {
this.serviceComm.refreshData(AddAction.Gear);
});
} }
} }

View File

@@ -3,32 +3,34 @@ import { FormControl, FormGroup, Validators } from "@angular/forms";
import { AddAction } from "../../models/add-action.enum"; import { AddAction } from "../../models/add-action.enum";
import { ServiceComm } from "../../services/service-comm.service"; import { ServiceComm } from "../../services/service-comm.service";
import { JumpTypeService } from "../../services/jump-type.service"; import { JumpTypeService } from "../../services/jump-type.service";
import { TranslateModule } from "@ngx-translate/core";
@Component({ @Component({
selector: "app-new-jump-type", selector: "app-new-jump-type",
templateUrl: "./new-jump-type.component.html", templateUrl: "./new-jump-type.component.html",
styleUrls: ["./new-jump-type.component.css"], styleUrls: ["./new-jump-type.component.css"],
standalone: false imports: [TranslateModule],
}) })
export class NewJumpTypeComponent implements OnInit { export class NewJumpTypeComponent implements OnInit {
public addForm: FormGroup; public addForm: FormGroup;
constructor(private serviceComm: ServiceComm, constructor(
private jumpTypeService: JumpTypeService) { private serviceComm: ServiceComm,
private jumpTypeService: JumpTypeService
) {
this.addForm = new FormGroup( this.addForm = new FormGroup(
{ {
jumptypeName: new FormControl("", Validators.required) jumptypeName: new FormControl("", Validators.required),
}, },
{ updateOn: "blur" } { updateOn: "blur" }
); );
} }
ngOnInit() { } ngOnInit() {}
onSubmit(formData) { onSubmit(formData) {
this.jumpTypeService.addJumpType(formData.jumptypeName) this.jumpTypeService.addJumpType(formData.jumptypeName).subscribe(() => {
.subscribe(() => { this.serviceComm.refreshData(AddAction.JumpType);
this.serviceComm.refreshData(AddAction.JumpType); });
});
} }
} }

View File

@@ -1,7 +1,11 @@
import { Component, OnInit } from "@angular/core"; import { Component, OnInit } from "@angular/core";
import { formatDate } from '@angular/common'; import { formatDate } from "@angular/common";
import { DateAdapter, MAT_DATE_FORMATS, NativeDateAdapter } from "@angular/material/core"; import {
import { TranslateService } from '@ngx-translate/core'; DateAdapter,
MAT_DATE_FORMATS,
NativeDateAdapter,
} from "@angular/material/core";
import { TranslateModule, TranslateService } from "@ngx-translate/core";
import { JumpTypeResp } from "../../models/jumpType"; import { JumpTypeResp } from "../../models/jumpType";
import { AircraftResp } from "../../models/aircraft"; import { AircraftResp } from "../../models/aircraft";
@@ -17,31 +21,30 @@ import { JumpTypeService } from "../../services/jump-type.service";
import { GearService } from "../../services/gear.service"; import { GearService } from "../../services/gear.service";
import { StatsService } from "../../services/stats.service"; import { StatsService } from "../../services/stats.service";
export const PICK_FORMATS = { export const PICK_FORMATS = {
parse: { dateInput: 'yy MM dd' }, parse: { dateInput: "yy MM dd" },
display: { display: {
dateInput: 'yyyy-MM-dd', dateInput: "yyyy-MM-dd",
monthYearLabel: 'yyyy MMM', monthYearLabel: "yyyy MMM",
dateA11yLabel: 'yyyy MM dd', dateA11yLabel: "yyyy MM dd",
monthYearA11yLabel: 'yyyy MMMM', monthYearA11yLabel: "yyyy MMMM",
} },
}; };
class PickDateAdapter extends NativeDateAdapter { class PickDateAdapter extends NativeDateAdapter {
format(date: Date, displayFormat: Object): string { override format(date: Date, displayFormat: Object): string {
return formatDate(date, displayFormat.toString(), "en"); return formatDate(date, displayFormat.toString(), "en");
} }
} }
@Component({ @Component({
selector: "app-new-jump", selector: "app-new-jump",
templateUrl: "./new-jump.component.html", templateUrl: "./new-jump.component.html",
styleUrls: ["./new-jump.component.css"], styleUrls: ["./new-jump.component.css"],
providers: [ providers: [
{ provide: DateAdapter, useClass: PickDateAdapter }, { provide: DateAdapter, useClass: PickDateAdapter },
{ provide: MAT_DATE_FORMATS, useValue: PICK_FORMATS } { provide: MAT_DATE_FORMATS, useValue: PICK_FORMATS },
], ],
standalone: false imports: [TranslateModule],
}) })
export class NewJumpComponent implements OnInit { export class NewJumpComponent implements OnInit {
public beginDate: Date; public beginDate: Date;
@@ -66,19 +69,21 @@ export class NewJumpComponent implements OnInit {
private listOfDropZone: Array<DropZoneResp>; private listOfDropZone: Array<DropZoneResp>;
public maxDate: Date; public maxDate: Date;
constructor(private serviceComm: ServiceComm, constructor(
private serviceJump: JumpService, private serviceComm: ServiceComm,
private serviceJumpType: JumpTypeService, private serviceJump: JumpService,
private serviceAircraft: AircraftService, private serviceJumpType: JumpTypeService,
private serviceDropzone: DropzoneService, private serviceAircraft: AircraftService,
private serviceGear: GearService, private serviceDropzone: DropzoneService,
private dateService: DateService, private serviceGear: GearService,
private translateService: TranslateService, private dateService: DateService,
private statsService : StatsService) {} private translateService: TranslateService,
private statsService: StatsService
) {}
ngOnInit() { ngOnInit() {
this.serviceComm.forceTranslateTitle.subscribe((data)=> { this.serviceComm.forceTranslateTitle.subscribe((data) => {
if (data === true){ if (data === true) {
this.updateTitle(); this.updateTitle();
} }
}); });
@@ -94,87 +99,92 @@ export class NewJumpComponent implements OnInit {
onFormSubmit() { onFormSubmit() {
this.pendingAddRequest = true; this.pendingAddRequest = true;
this.serviceJump.addListOfJump(this.selectedJumpType.id, this.serviceJump
this.selectedAircraft.id, .addListOfJump(
this.selectedDz.id, this.selectedJumpType.id,
this.selectedGear.id, this.selectedAircraft.id,
this.withCutaway === undefined ? false : this.withCutaway, this.selectedDz.id,
this.beginDate, this.selectedGear.id,
this.endDate, this.withCutaway === undefined ? false : this.withCutaway,
this.exitAltitude, this.beginDate,
this.deployAltitude, this.endDate,
this.countOfJumps, this.exitAltitude,
this.comments, this.deployAltitude,
this.isSpecial === undefined ? false : this.isSpecial) this.countOfJumps,
.subscribe(() => { this.comments,
this.statsService.resetStats(); this.isSpecial === undefined ? false : this.isSpecial
this.comments = undefined; )
this.withCutaway = false; .subscribe(() => {
this.isSpecial = false; this.statsService.resetStats();
this.comments = undefined;
this.withCutaway = false;
this.isSpecial = false;
if (this.resetForm === true) { if (this.resetForm === true) {
this.initForm(); this.initForm();
} }
this.pendingAddRequest = false; this.pendingAddRequest = false;
}); });
} }
public isValidatedForm(): boolean { public isValidatedForm(): boolean {
return (this.selectedDz !== undefined && return (
this.selectedDz.id !== undefined && this.selectedDz !== undefined &&
this.selectedGear !== undefined && this.selectedDz.id !== undefined &&
this.selectedGear.id !== undefined && this.selectedGear !== undefined &&
this.selectedAircraft !== undefined && this.selectedGear.id !== undefined &&
this.selectedAircraft.id !== undefined && this.selectedAircraft !== undefined &&
this.selectedJumpType !== undefined && this.selectedAircraft.id !== undefined &&
this.selectedJumpType.id !== undefined && this.selectedJumpType !== undefined &&
this.exitAltitude !== undefined && this.selectedJumpType.id !== undefined &&
typeof this.exitAltitude === "number" && this.exitAltitude !== undefined &&
this.deployAltitude !== undefined && typeof this.exitAltitude === "number" &&
typeof this.deployAltitude === "number" && this.deployAltitude !== undefined &&
this.countOfJumps !== undefined && typeof this.deployAltitude === "number" &&
typeof this.countOfJumps === "number"); this.countOfJumps !== undefined &&
typeof this.countOfJumps === "number"
);
} }
private getListOfJumpTypes() { private getListOfJumpTypes() {
this.serviceJumpType.getListOfJumpTypes() this.serviceJumpType.getListOfJumpTypes().subscribe((data) => {
.subscribe((data) => { data.sort((a, b) => a.name.localeCompare(b.name));
data.sort((a, b) => a.name.localeCompare(b.name)); this.listOfJumpType = data;
this.listOfJumpType = data; this.countDatasLoaded = 1;
this.countDatasLoaded = 1;
this.getListOfAircrafts(); this.getListOfAircrafts();
this.getListOfDropZones(); this.getListOfDropZones();
this.getListOfGears(); this.getListOfGears();
}); });
} }
private getListOfAircrafts() { private getListOfAircrafts() {
this.serviceAircraft.getListOfAircrafts(true) this.serviceAircraft.getListOfAircrafts(true).subscribe((data) => {
.subscribe((data) => { data.sort((a, b) => a.name.localeCompare(b.name));
data.sort((a, b) => a.name.localeCompare(b.name)); this.listOfAircraft = data;
this.listOfAircraft = data; this.countDatasLoaded++;
this.countDatasLoaded++; });
});
} }
private getListOfDropZones() { private getListOfDropZones() {
this.serviceDropzone.getListOfDropZones(true) this.serviceDropzone.getListOfDropZones(true).subscribe((data) => {
.subscribe((data) => { data.sort(
data.sort((a, b) => (b.isFavorite ? 1 : 0) - (a.isFavorite ? 1 : 0) || a.name.localeCompare(b.name)); (a, b) =>
this.listOfDropZone = data; (b.isFavorite ? 1 : 0) - (a.isFavorite ? 1 : 0) ||
this.listOfFilteredDropZone = data; a.name.localeCompare(b.name)
this.countDatasLoaded++; );
}); this.listOfDropZone = data;
this.listOfFilteredDropZone = data;
this.countDatasLoaded++;
});
} }
private getListOfGears() { private getListOfGears() {
this.serviceGear.getListOfGears() this.serviceGear.getListOfGears().subscribe((data) => {
.subscribe((data) => { data.sort((a, b) => b.id - a.id);
data.sort((a, b) => b.id - a.id); this.listOfGear = data;
this.listOfGear = data; this.countDatasLoaded++;
this.countDatasLoaded++; });
});
} }
private initForm() { private initForm() {
@@ -212,8 +222,8 @@ export class NewJumpComponent implements OnInit {
filterValue = event.toLowerCase(); filterValue = event.toLowerCase();
this.listOfFilteredDropZone = this.listOfDropZone; this.listOfFilteredDropZone = this.listOfDropZone;
this.listOfFilteredDropZone = this.listOfFilteredDropZone.filter((option) => this.listOfFilteredDropZone = this.listOfFilteredDropZone.filter(
option.name.toLowerCase().includes(filterValue) (option) => option.name.toLowerCase().includes(filterValue)
); );
} }
} }
@@ -228,12 +238,12 @@ export class NewJumpComponent implements OnInit {
public resetDz() { public resetDz() {
this.selectedDz = undefined; this.selectedDz = undefined;
this.onChangeDz(''); this.onChangeDz("");
} }
private updateTitle() { private updateTitle() {
this.translateService.get("NewJump_Title").subscribe( this.translateService.get("NewJump_Title").subscribe((data) => {
data => { this.serviceComm.updatedComponentTitle(data); } this.serviceComm.updatedComponentTitle(data);
); });
} }
} }

View File

@@ -1,41 +1,46 @@
import { Component, OnInit } from "@angular/core"; import { Component, OnInit } from "@angular/core";
import { formatDate } from '@angular/common'; import { formatDate } from "@angular/common";
import { DateAdapter, MAT_DATE_FORMATS, NativeDateAdapter } from "@angular/material/core"; import {
import { TranslateService } from '@ngx-translate/core'; DateAdapter,
MAT_DATE_FORMATS,
NativeDateAdapter,
} from "@angular/material/core";
import { TranslateModule, TranslateService } from "@ngx-translate/core";
import { TunnelResp } from "../../models/tunnel"; import { TunnelResp } from "../../models/tunnel";
import { JumpTypeResp } from "../../models/jumpType"; import { JumpTypeResp } from "../../models/jumpType";
import { TunnelService } from '../../services/tunnel.service'; import { TunnelService } from "../../services/tunnel.service";
import { ServiceComm } from '../../services/service-comm.service'; import { ServiceComm } from "../../services/service-comm.service";
import { TunnelFlightService } from "../../services/tunnel-flight.service"; import { TunnelFlightService } from "../../services/tunnel-flight.service";
import { JumpTypeService } from "../../services/jump-type.service"; import { JumpTypeService } from "../../services/jump-type.service";
import { DateService } from "../../services/date.service"; import { DateService } from "../../services/date.service";
import { MatAutocompleteModule } from "@angular/material/autocomplete";
export const PICK_FORMATS = { export const PICK_FORMATS = {
parse: { dateInput: 'yy MM dd' }, parse: { dateInput: "yy MM dd" },
display: { display: {
dateInput: 'yyyy-MM-dd', dateInput: "yyyy-MM-dd",
monthYearLabel: 'yyyy MMM', monthYearLabel: "yyyy MMM",
dateA11yLabel: 'yyyy MM dd', dateA11yLabel: "yyyy MM dd",
monthYearA11yLabel: 'yyyy MMMM', monthYearA11yLabel: "yyyy MMMM",
} },
}; };
class PickDateAdapter extends NativeDateAdapter { class PickDateAdapter extends NativeDateAdapter {
format(date: Date, displayFormat: Object): string { override format(date: Date, displayFormat: Object): string {
return formatDate(date, displayFormat.toString(), "en"); return formatDate(date, displayFormat.toString(), "en");
} }
} }
@Component({ @Component({
selector: 'app-new-tunnel-flight', selector: "app-new-tunnel-flight",
templateUrl: './new-tunnel-flight.component.html', templateUrl: "./new-tunnel-flight.component.html",
styleUrls: ['./new-tunnel-flight.component.css'], styleUrls: ["./new-tunnel-flight.component.css"],
providers: [ providers: [
{ provide: DateAdapter, useClass: PickDateAdapter }, { provide: DateAdapter, useClass: PickDateAdapter },
{ provide: MAT_DATE_FORMATS, useValue: PICK_FORMATS } { provide: MAT_DATE_FORMATS, useValue: PICK_FORMATS },
], ],
standalone: false imports: [MatAutocompleteModule, TranslateModule],
}) })
export class NewTunnelFlightComponent implements OnInit { export class NewTunnelFlightComponent implements OnInit {
public flightDate: Date; public flightDate: Date;
@@ -51,12 +56,14 @@ export class NewTunnelFlightComponent implements OnInit {
public listOfJumpType: Array<JumpTypeResp>; public listOfJumpType: Array<JumpTypeResp>;
public maxDate: Date; public maxDate: Date;
constructor(private serviceComm: ServiceComm, constructor(
private serviceTunnel: TunnelService, private serviceComm: ServiceComm,
private serviceTunnelFlight: TunnelFlightService, private serviceTunnel: TunnelService,
private serviceJumpType: JumpTypeService, private serviceTunnelFlight: TunnelFlightService,
private translateService: TranslateService, private serviceJumpType: JumpTypeService,
private dateService: DateService) { } private translateService: TranslateService,
private dateService: DateService
) {}
ngOnInit() { ngOnInit() {
this.serviceComm.forceTranslateTitle.subscribe((data) => { this.serviceComm.forceTranslateTitle.subscribe((data) => {
@@ -77,45 +84,48 @@ export class NewTunnelFlightComponent implements OnInit {
public onFormSubmit() { public onFormSubmit() {
this.pendingAddRequest = true; this.pendingAddRequest = true;
this.serviceTunnelFlight.addFlight(this.selectedTunnel.id, this.serviceTunnelFlight
this.selectedJumpType.id, .addFlight(
this.flightDate, this.selectedTunnel.id,
this.minutesOfFlight, this.selectedJumpType.id,
this.comments) this.flightDate,
.subscribe(() => { this.minutesOfFlight,
this.comments = undefined; this.comments
)
.subscribe(() => {
this.comments = undefined;
if (this.resetForm === true) { if (this.resetForm === true) {
this.initForm(); this.initForm();
} }
this.pendingAddRequest = false; this.pendingAddRequest = false;
}); });
} }
public isValidatedForm(): boolean { public isValidatedForm(): boolean {
return (this.selectedTunnel !== undefined && return (
this.selectedTunnel.id !== undefined && this.selectedTunnel !== undefined &&
this.minutesOfFlight !== undefined && this.selectedTunnel.id !== undefined &&
typeof this.minutesOfFlight === "number"); this.minutesOfFlight !== undefined &&
typeof this.minutesOfFlight === "number"
);
} }
private getListOfTunnels() { private getListOfTunnels() {
this.serviceTunnel.getListOfTunnels() this.serviceTunnel.getListOfTunnels().subscribe((data) => {
.subscribe((data) => { data.sort((a, b) => a.name.localeCompare(b.name));
data.sort((a, b) => a.name.localeCompare(b.name)); this.listOfTunnel = data;
this.listOfTunnel = data; this.listOfFilteredTunnel = data;
this.listOfFilteredTunnel = data; this.countDatasLoaded++;
this.countDatasLoaded++; });
});
} }
private getListOfJumpTypes() { private getListOfJumpTypes() {
this.serviceJumpType.getListOfJumpTypesForTunnel() this.serviceJumpType.getListOfJumpTypesForTunnel().subscribe((data) => {
.subscribe((data) => { data.sort((a, b) => a.name.localeCompare(b.name));
data.sort((a, b) => a.name.localeCompare(b.name)); this.listOfJumpType = data;
this.listOfJumpType = data; this.countDatasLoaded++;
this.countDatasLoaded++; });
});
} }
public notLoadingToDisplay(): boolean { public notLoadingToDisplay(): boolean {
@@ -123,9 +133,9 @@ export class NewTunnelFlightComponent implements OnInit {
} }
private updateTitle() { private updateTitle() {
this.translateService.get("NewTunnelFlight_Title").subscribe( this.translateService.get("NewTunnelFlight_Title").subscribe((data) => {
data => { this.serviceComm.updatedComponentTitle(data); } this.serviceComm.updatedComponentTitle(data);
); });
} }
private initForm() { private initForm() {
@@ -139,7 +149,7 @@ export class NewTunnelFlightComponent implements OnInit {
public resetTunnel() { public resetTunnel() {
this.selectedTunnel = undefined; this.selectedTunnel = undefined;
this.onChangeTunnel(''); this.onChangeTunnel("");
} }
public onChangeTunnel(event: any) { public onChangeTunnel(event: any) {

View File

@@ -1,9 +1,10 @@
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 { TranslateModule, TranslateService } from "@ngx-translate/core";
import { DatePipe } from "@angular/common"; import { DatePipe } from "@angular/common";
import { ChartConfiguration, ChartData, ChartType, Colors } from "chart.js"; import { ChartConfiguration, ChartData, ChartType } from "chart.js";
import { MatTabsModule } from "@angular/material/tabs";
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";
@@ -19,7 +20,7 @@ import {
selector: "app-summary", selector: "app-summary",
templateUrl: "./summary.component.html", templateUrl: "./summary.component.html",
styleUrls: ["./summary.component.css"], styleUrls: ["./summary.component.css"],
standalone: false, imports: [MatTabsModule, TranslateModule],
}) })
export class SummaryComponent implements OnInit { export class SummaryComponent implements OnInit {
public dsNbJumpByDz: MatTableDataSource<StatsByDzResp>; public dsNbJumpByDz: MatTableDataSource<StatsByDzResp>;
@@ -39,7 +40,7 @@ export class SummaryComponent implements OnInit {
]; ];
public barChartLegend = true; public barChartLegend = true;
public barChartPlugins = []; public barChartPlugins: any = [];
public barChartData: ChartData<"line">; public barChartData: ChartData<"line">;
public barChartOptions: ChartConfiguration["options"]; public barChartOptions: ChartConfiguration["options"];
public barChartType: ChartType; public barChartType: ChartType;
@@ -176,7 +177,15 @@ export class SummaryComponent implements OnInit {
} }
} }
const results = []; const results: {
label: string;
data: number[];
backgroundColor: string;
borderColor: string;
pointBackgroundColor: string;
fill: boolean;
pointRadius: number;
}[] = [];
tmpResults.forEach((value, key) => { tmpResults.forEach((value, key) => {
const color = this.jumpTypeToColor.get(key); const color = this.jumpTypeToColor.get(key);
let tmp = { let tmp = {

View File

@@ -40,7 +40,9 @@
</mat-form-field> </mat-form-field>
</p> </p>
<button type="submit" mat-raised-button color="accent">Update my profile</button> <button type="submit" mat-raised-button color="accent">
Update my profile
</button>
</form> </form>
</fieldset> </fieldset>

View File

@@ -1,18 +1,26 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from "@angular/core";
import { FormGroup, FormControl, Validators } from '@angular/forms'; import { FormGroup, FormControl, Validators } from "@angular/forms";
import { AuthenticationService } from '../../services/authentication.service'; import { AuthenticationService } from "../../services/authentication.service";
import { User } from '../../models/user'; import { User } from "../../models/user";
import { ListOfImagesComponent } from "../list-of-images/list-of-images.component";
import { MatLabel, MatFormFieldModule } from "@angular/material/form-field";
import { TranslateModule } from "@ngx-translate/core";
@Component({ @Component({
selector: 'app-user-profile', selector: "app-user-profile",
templateUrl: './user-profile.component.html', templateUrl: "./user-profile.component.html",
styleUrls: ['./user-profile.component.css'], styleUrls: ["./user-profile.component.css"],
standalone: false imports: [
ListOfImagesComponent,
MatLabel,
MatFormFieldModule,
TranslateModule,
],
}) })
export class UserProfileComponent implements OnInit { export class UserProfileComponent implements OnInit {
public userForm: FormGroup; public userForm: FormGroup;
constructor(private authenticationService: AuthenticationService) { } constructor(private authenticationService: AuthenticationService) {}
ngOnInit(): void { ngOnInit(): void {
const currentUser = this.authenticationService.currentUserValue; const currentUser = this.authenticationService.currentUserValue;
@@ -33,15 +41,15 @@ export class UserProfileComponent implements OnInit {
Validators.email, Validators.email,
]), ]),
currentPassword: new FormControl( currentPassword: new FormControl(
'', "",
Validators.pattern('^[A-Za-z0-9_-]{8,15}$') Validators.pattern("^[A-Za-z0-9_-]{8,15}$")
), ),
newPassword: new FormControl( newPassword: new FormControl(
'', "",
Validators.pattern('^[A-Za-z0-9_-]{8,15}$') Validators.pattern("^[A-Za-z0-9_-]{8,15}$")
), ),
}, },
{ updateOn: 'blur' } { updateOn: "blur" }
); );
} }
@@ -60,56 +68,56 @@ export class UserProfileComponent implements OnInit {
private calculTailleVoile() { private calculTailleVoile() {
let tailleVoile = new Map<string, Array<number>>(); let tailleVoile = new Map<string, Array<number>>();
tailleVoile.set("60", [ 175, 161, 147, 133, 124, 115, 107, 97, 89 ]); tailleVoile.set("60", [175, 161, 147, 133, 124, 115, 107, 97, 89]);
tailleVoile.set("61", [ 178, 163, 149, 135, 126, 116, 108, 98, 90 ]); tailleVoile.set("61", [178, 163, 149, 135, 126, 116, 108, 98, 90]);
tailleVoile.set("62", [ 180, 166, 151, 137, 127, 118, 109, 99, 91 ]); tailleVoile.set("62", [180, 166, 151, 137, 127, 118, 109, 99, 91]);
tailleVoile.set("63", [ 183, 168, 153, 138, 129, 119, 111, 100, 91 ]); tailleVoile.set("63", [183, 168, 153, 138, 129, 119, 111, 100, 91]);
tailleVoile.set("64", [ 185, 170, 155, 140, 130, 121, 112, 101, 92 ]); tailleVoile.set("64", [185, 170, 155, 140, 130, 121, 112, 101, 92]);
tailleVoile.set("65", [ 188, 173, 157, 142, 132, 122, 113, 102, 93 ]); tailleVoile.set("65", [188, 173, 157, 142, 132, 122, 113, 102, 93]);
tailleVoile.set("66", [ 190, 175, 159, 144, 134, 123, 114, 103, 94 ]); tailleVoile.set("66", [190, 175, 159, 144, 134, 123, 114, 103, 94]);
tailleVoile.set("67", [ 193, 177, 161, 146, 135, 125, 116, 104, 94 ]); tailleVoile.set("67", [193, 177, 161, 146, 135, 125, 116, 104, 94]);
tailleVoile.set("68", [ 195, 179, 164, 147, 137, 126, 117, 105, 95 ]); tailleVoile.set("68", [195, 179, 164, 147, 137, 126, 117, 105, 95]);
tailleVoile.set("69", [ 198, 182, 166, 149, 138, 128, 118, 106, 96 ]); tailleVoile.set("69", [198, 182, 166, 149, 138, 128, 118, 106, 96]);
tailleVoile.set("70", [ 200, 184, 168, 151, 140, 129, 119, 107, 96 ]); tailleVoile.set("70", [200, 184, 168, 151, 140, 129, 119, 107, 96]);
tailleVoile.set("71", [ 203, 186, 170, 153, 142, 130, 120, 107, 97 ]); tailleVoile.set("71", [203, 186, 170, 153, 142, 130, 120, 107, 97]);
tailleVoile.set("72", [ 205, 189, 172, 155, 143, 132, 121, 108, 98 ]); tailleVoile.set("72", [205, 189, 172, 155, 143, 132, 121, 108, 98]);
tailleVoile.set("73", [ 208, 191, 174, 156, 145, 133, 123, 109, 99 ]); tailleVoile.set("73", [208, 191, 174, 156, 145, 133, 123, 109, 99]);
tailleVoile.set("74", [ 210, 193, 176, 158, 146, 134, 124, 110, 99 ]); tailleVoile.set("74", [210, 193, 176, 158, 146, 134, 124, 110, 99]);
tailleVoile.set("75", [ 213, 196, 178, 160, 148, 136, 125, 111, 100 ]); tailleVoile.set("75", [213, 196, 178, 160, 148, 136, 125, 111, 100]);
tailleVoile.set("76", [ 215, 198, 180, 162, 150, 137, 126, 112, 101 ]); tailleVoile.set("76", [215, 198, 180, 162, 150, 137, 126, 112, 101]);
tailleVoile.set("77", [ 218, 200, 182, 163, 151, 139, 127, 113, 101 ]); tailleVoile.set("77", [218, 200, 182, 163, 151, 139, 127, 113, 101]);
tailleVoile.set("78", [ 220, 202, 184, 165, 153, 140, 128, 114, 102 ]); tailleVoile.set("78", [220, 202, 184, 165, 153, 140, 128, 114, 102]);
tailleVoile.set("79", [ 223, 205, 186, 167, 154, 141, 129, 115, 103 ]); tailleVoile.set("79", [223, 205, 186, 167, 154, 141, 129, 115, 103]);
tailleVoile.set("80", [ 225, 207, 188, 169, 156, 143, 131, 115, 103 ]); tailleVoile.set("80", [225, 207, 188, 169, 156, 143, 131, 115, 103]);
tailleVoile.set("81", [ 228, 209, 190, 170, 157, 144, 132, 116, 104 ]); tailleVoile.set("81", [228, 209, 190, 170, 157, 144, 132, 116, 104]);
tailleVoile.set("82", [ 230, 212, 192, 172, 159, 145, 133, 117, 104 ]); tailleVoile.set("82", [230, 212, 192, 172, 159, 145, 133, 117, 104]);
tailleVoile.set("83", [ 233, 214, 194, 174, 160, 146, 134, 118, 105 ]); tailleVoile.set("83", [233, 214, 194, 174, 160, 146, 134, 118, 105]);
tailleVoile.set("84", [ 235, 216, 196, 176, 162, 148, 135, 119, 106 ]); tailleVoile.set("84", [235, 216, 196, 176, 162, 148, 135, 119, 106]);
tailleVoile.set("85", [ 238, 219, 198, 177, 163, 149, 136, 120, 106 ]); tailleVoile.set("85", [238, 219, 198, 177, 163, 149, 136, 120, 106]);
tailleVoile.set("86", [ 240, 221, 201, 179, 165, 150, 137, 120, 107 ]); tailleVoile.set("86", [240, 221, 201, 179, 165, 150, 137, 120, 107]);
tailleVoile.set("87", [ 243, 223, 203, 181, 166, 152, 138, 121, 108 ]); tailleVoile.set("87", [243, 223, 203, 181, 166, 152, 138, 121, 108]);
tailleVoile.set("88", [ 245, 225, 205, 183, 168, 153, 139, 122, 108 ]); tailleVoile.set("88", [245, 225, 205, 183, 168, 153, 139, 122, 108]);
tailleVoile.set("89", [ 248, 228, 207, 184, 170, 154, 140, 123, 109 ]); tailleVoile.set("89", [248, 228, 207, 184, 170, 154, 140, 123, 109]);
tailleVoile.set("90", [ 250, 230, 209, 186, 171, 156, 141, 124, 109 ]); tailleVoile.set("90", [250, 230, 209, 186, 171, 156, 141, 124, 109]);
tailleVoile.set("91", [ 253, 232, 211, 188, 173, 157, 143, 124, 110 ]); tailleVoile.set("91", [253, 232, 211, 188, 173, 157, 143, 124, 110]);
tailleVoile.set("92", [ 255, 235, 213, 190, 174, 158, 144, 125, 110 ]); tailleVoile.set("92", [255, 235, 213, 190, 174, 158, 144, 125, 110]);
tailleVoile.set("93", [ 258, 237, 215, 191, 176, 159, 145, 126, 111 ]); tailleVoile.set("93", [258, 237, 215, 191, 176, 159, 145, 126, 111]);
tailleVoile.set("94", [ 260, 239, 217, 193, 177, 161, 146, 127, 112 ]); tailleVoile.set("94", [260, 239, 217, 193, 177, 161, 146, 127, 112]);
tailleVoile.set("95", [ 263, 242, 219, 195, 179, 162, 147, 128, 112 ]); tailleVoile.set("95", [263, 242, 219, 195, 179, 162, 147, 128, 112]);
tailleVoile.set("96", [ 265, 244, 221, 197, 180, 163, 148, 128, 113 ]); tailleVoile.set("96", [265, 244, 221, 197, 180, 163, 148, 128, 113]);
tailleVoile.set("97", [ 268, 246, 223, 198, 182, 164, 149, 129, 113 ]); tailleVoile.set("97", [268, 246, 223, 198, 182, 164, 149, 129, 113]);
tailleVoile.set("98", [ 270, 248, 225, 200, 183, 166, 150, 130, 114 ]); tailleVoile.set("98", [270, 248, 225, 200, 183, 166, 150, 130, 114]);
tailleVoile.set("99", [ 273, 251, 227, 202, 185, 167, 151, 131, 114 ]); tailleVoile.set("99", [273, 251, 227, 202, 185, 167, 151, 131, 114]);
tailleVoile.set("100", [ 275, 253, 229, 203, 186, 168, 152, 131, 115 ]); tailleVoile.set("100", [275, 253, 229, 203, 186, 168, 152, 131, 115]);
tailleVoile.set("101", [ 278, 255, 231, 205, 188, 169, 153, 132, 115 ]); tailleVoile.set("101", [278, 255, 231, 205, 188, 169, 153, 132, 115]);
tailleVoile.set("102", [ 280, 258, 233, 207, 189, 171, 154, 133, 116 ]); tailleVoile.set("102", [280, 258, 233, 207, 189, 171, 154, 133, 116]);
tailleVoile.set("103", [ 283, 260, 235, 209, 190, 172, 155, 134, 116 ]); tailleVoile.set("103", [283, 260, 235, 209, 190, 172, 155, 134, 116]);
tailleVoile.set("104", [ 285, 262, 237, 210, 192, 173, 156, 134, 117 ]); tailleVoile.set("104", [285, 262, 237, 210, 192, 173, 156, 134, 117]);
tailleVoile.set("105", [ 288, 265, 239, 212, 193, 174, 157, 135, 118 ]); tailleVoile.set("105", [288, 265, 239, 212, 193, 174, 157, 135, 118]);
tailleVoile.set("106", [ 290, 267, 241, 214, 195, 175, 158, 136, 118 ]); tailleVoile.set("106", [290, 267, 241, 214, 195, 175, 158, 136, 118]);
tailleVoile.set("107", [ 293, 269, 243, 215, 196, 177, 159, 136, 119 ]); tailleVoile.set("107", [293, 269, 243, 215, 196, 177, 159, 136, 119]);
tailleVoile.set("108", [ 295, 271, 245, 217, 198, 178, 160, 137, 119 ]); tailleVoile.set("108", [295, 271, 245, 217, 198, 178, 160, 137, 119]);
tailleVoile.set("109", [ 298, 274, 247, 219, 199, 179, 161, 138, 120 ]); tailleVoile.set("109", [298, 274, 247, 219, 199, 179, 161, 138, 120]);
tailleVoile.set("110", [ 300, 276, 249, 220, 201, 180, 162, 138, 120 ]); tailleVoile.set("110", [300, 276, 249, 220, 201, 180, 162, 138, 120]);
} }
} }