From bf2def6c926b1c0eed55c1a549040355a817f491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Andr=C3=A9?= Date: Tue, 30 Mar 2021 09:28:14 +0200 Subject: [PATCH] Tests de correction sur l'ajout de saut --- .../src/app/new-jump/new-jump.component.html | 2 +- .../src/app/new-jump/new-jump.component.ts | 23 ++++++++++++------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/Front/skydivelogs-app/src/app/new-jump/new-jump.component.html b/Front/skydivelogs-app/src/app/new-jump/new-jump.component.html index 7710bb2..26f51909 100644 --- a/Front/skydivelogs-app/src/app/new-jump/new-jump.component.html +++ b/Front/skydivelogs-app/src/app/new-jump/new-jump.component.html @@ -45,7 +45,7 @@ favorite - diff --git a/Front/skydivelogs-app/src/app/new-jump/new-jump.component.ts b/Front/skydivelogs-app/src/app/new-jump/new-jump.component.ts index 0fb99b4..dec4603 100644 --- a/Front/skydivelogs-app/src/app/new-jump/new-jump.component.ts +++ b/Front/skydivelogs-app/src/app/new-jump/new-jump.component.ts @@ -155,16 +155,19 @@ export class NewJumpComponent implements OnInit { public onChangeDz(event: any) { let filterValue: string; - if (event.id !== undefined) { - filterValue = event.name.toLowerCase(); - } else { + // if (event.id !== undefined) { + // filterValue = event.name.toLowerCase(); + // } else { + // filterValue = event.toLowerCase(); + // } + if (event.id === undefined) { filterValue = event.toLowerCase(); - } - this.listOfFilteredDropZone = this.listOfDropZone; - this.listOfFilteredDropZone = this.listOfFilteredDropZone.filter((option) => - option.name.toLowerCase().includes(filterValue) - ); + this.listOfFilteredDropZone = this.listOfDropZone; + this.listOfFilteredDropZone = this.listOfFilteredDropZone.filter((option) => + option.name.toLowerCase().includes(filterValue) + ); + } } public onChangeBeginDate(event: any) { @@ -174,4 +177,8 @@ export class NewJumpComponent implements OnInit { public notLoadingToDisplay(): boolean { return !(this.pendingAddRequest || this.countDatasLoaded !== 4); } + + public resetDz() { + this.selectedDz = undefined; + } }