Affichage de la voile principale sur la sélection
du piège
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<mat-label>Choose the jump type</mat-label>
|
||||
<input type="text" matInput [matAutocomplete]="autoJumpType" [(ngModel)]="selectedJumpType"
|
||||
name="selectedJumpType">
|
||||
<mat-autocomplete #autoJumpType="matAutocomplete" [displayWith]="displayFn">
|
||||
<mat-autocomplete #autoJumpType="matAutocomplete" [displayWith]="displayNameFn">
|
||||
<mat-option *ngFor="let jumpType of listOfJumpType" [value]="jumpType">
|
||||
{{jumpType.name}}
|
||||
</mat-option>
|
||||
@@ -24,7 +24,7 @@
|
||||
<mat-label>Choose the aircraft</mat-label>
|
||||
<input type="text" matInput [matAutocomplete]="autoAircraft" [(ngModel)]="selectedAircraft"
|
||||
name="selectedAircraft">
|
||||
<mat-autocomplete #autoAircraft="matAutocomplete" [displayWith]="displayFn">
|
||||
<mat-autocomplete #autoAircraft="matAutocomplete" [displayWith]="displayNameFn">
|
||||
<mat-option *ngFor="let aircraft of listOfAircraft" [value]="aircraft">
|
||||
{{aircraft.name}}
|
||||
</mat-option>
|
||||
@@ -39,7 +39,7 @@
|
||||
<mat-label>Choose the DZ</mat-label>
|
||||
<input type="text" matInput [matAutocomplete]="autoDropZone" [(ngModel)]="selectedDz"
|
||||
(ngModelChange)="onChangeDz($event)" name="selectedDz">
|
||||
<mat-autocomplete #autoDropZone="matAutocomplete" [displayWith]="displayFn">
|
||||
<mat-autocomplete #autoDropZone="matAutocomplete" [displayWith]="displayNameFn">
|
||||
<mat-option *ngFor="let dropZone of listOfFilteredDropZone" [value]="dropZone">
|
||||
{{dropZone.name}}
|
||||
<mat-icon aria-hidden="false" aria-label="Favorite" *ngIf="dropZone.isFavorite === true" color="primary">
|
||||
@@ -54,7 +54,7 @@
|
||||
<mat-form-field>
|
||||
<mat-label>Choose the used gear</mat-label>
|
||||
<input type="text" matInput [matAutocomplete]="autoGear" [(ngModel)]="selectedGear" name="selectedGear">
|
||||
<mat-autocomplete #autoGear="matAutocomplete" [displayWith]="displayFn">
|
||||
<mat-autocomplete #autoGear="matAutocomplete" [displayWith]="displayGearFn">
|
||||
<mat-option *ngFor="let gear of listOfGear" [value]="gear">
|
||||
{{gear.name}} ({{gear.mainCanopy}})
|
||||
</mat-option>
|
||||
|
||||
@@ -181,9 +181,12 @@ export class NewJumpComponent implements OnInit {
|
||||
this.isSpecial = false;
|
||||
}
|
||||
|
||||
public displayFn(data?: JumpTypeResp): string | undefined {
|
||||
public displayNameFn(data?: any): string | undefined {
|
||||
return data ? data.name : undefined;
|
||||
}
|
||||
public displayGearFn(data?: GearResp): string | undefined {
|
||||
return data ? `${data.name} (${data.mainCanopy})` : undefined;
|
||||
}
|
||||
|
||||
public onChangeDz(event: any) {
|
||||
let filterValue: string;
|
||||
|
||||
Reference in New Issue
Block a user