update Angular to v20 #4

Merged
sandre merged 18 commits from feature/update-to-angular-v20 into master 2026-01-22 13:21:54 +00:00
4 changed files with 58 additions and 54 deletions
Showing only changes of commit 7698754db2 - Show all commits

View File

@@ -46,7 +46,7 @@
aria-label="Clear" aria-label="Clear"
(click)="selectedJumpType = undefined" (click)="selectedJumpType = undefined"
> >
<mat-icon>close</mat-icon> <mat-icon svgIcon="close"></mat-icon>
</button> </button>
} }
</mat-form-field> </mat-form-field>
@@ -78,7 +78,7 @@
aria-label="Clear" aria-label="Clear"
(click)="selectedAircraft = undefined" (click)="selectedAircraft = undefined"
> >
<mat-icon>close</mat-icon> <mat-icon svgIcon="close"></mat-icon>
</button> </button>
} }
</mat-form-field> </mat-form-field>
@@ -104,9 +104,9 @@
aria-hidden="false" aria-hidden="false"
aria-label="Favorite" aria-label="Favorite"
color="primary" color="primary"
svgIcon="favorite"
> >
favorite</mat-icon </mat-icon>
>
} }
</mat-option> </mat-option>
} }
@@ -118,7 +118,7 @@
aria-label="Clear" aria-label="Clear"
(click)="resetDz()" (click)="resetDz()"
> >
<mat-icon>close</mat-icon> <mat-icon svgIcon="close"></mat-icon>
</button> </button>
} }
</mat-form-field> </mat-form-field>
@@ -148,7 +148,7 @@
aria-label="Clear" aria-label="Clear"
(click)="selectedGear = undefined" (click)="selectedGear = undefined"
> >
<mat-icon>close</mat-icon> <mat-icon svgIcon="close"></mat-icon>
</button> </button>
} }
</mat-form-field> </mat-form-field>
@@ -202,7 +202,7 @@
aria-label="Clear" aria-label="Clear"
(click)="exitAltitude = undefined" (click)="exitAltitude = undefined"
> >
<mat-icon>close</mat-icon> <mat-icon svgIcon="close"></mat-icon>
</button> </button>
} }
</mat-form-field> </mat-form-field>
@@ -221,7 +221,7 @@
aria-label="Clear" aria-label="Clear"
(click)="deployAltitude = undefined" (click)="deployAltitude = undefined"
> >
<mat-icon>close</mat-icon> <mat-icon svgIcon="close"></mat-icon>
</button> </button>
} }
</mat-form-field> </mat-form-field>
@@ -240,7 +240,7 @@
aria-label="Clear" aria-label="Clear"
(click)="countOfJumps = undefined" (click)="countOfJumps = undefined"
> >
<mat-icon>close</mat-icon> <mat-icon svgIcon="close"></mat-icon>
</button> </button>
} }
</mat-form-field> </mat-form-field>
@@ -259,12 +259,12 @@
aria-label="Clear" aria-label="Clear"
(click)="comments = undefined" (click)="comments = undefined"
> >
<mat-icon>close</mat-icon> <mat-icon svgIcon="close"></mat-icon>
</button> </button>
} }
</mat-form-field> </mat-form-field>
<br /> <br />
@if (isValidatedForm()) { @if (this.isValidatedForm()) {
<button mat-raised-button color="accent"> <button mat-raised-button color="accent">
{{ "NewJump_Submit" | translate }} {{ "NewJump_Submit" | translate }}
</button> </button>

View File

@@ -125,34 +125,36 @@ export class NewJumpComponent implements OnInit {
} }
onFormSubmit() { onFormSubmit() {
this.pendingAddRequest = true; if (this.isValidatedForm()) {
this.pendingAddRequest = true;
this.serviceJump this.serviceJump
.addListOfJump( .addListOfJump(
this.selectedJumpType.id, this.selectedJumpType.id,
this.selectedAircraft.id, this.selectedAircraft.id,
this.selectedDz.id, this.selectedDz.id,
this.selectedGear.id, this.selectedGear.id,
this.withCutaway === undefined ? false : this.withCutaway, this.withCutaway === undefined ? false : this.withCutaway,
this.beginDate, this.beginDate,
this.endDate, this.endDate,
this.exitAltitude, this.exitAltitude,
this.deployAltitude, this.deployAltitude,
this.countOfJumps, this.countOfJumps,
this.comments, this.comments,
this.isSpecial === undefined ? false : this.isSpecial, this.isSpecial === undefined ? false : this.isSpecial,
) )
.subscribe(() => { .subscribe(() => {
this.statsService.resetStats(); this.statsService.resetStats();
this.comments = undefined; this.comments = undefined;
this.withCutaway = false; this.withCutaway = false;
this.isSpecial = 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 {

View File

@@ -141,7 +141,7 @@
} }
</mat-form-field> </mat-form-field>
<br /> <br />
@if (isValidatedForm()) { @if (this.isValidatedForm()) {
<button mat-raised-button color="accent"> <button mat-raised-button color="accent">
{{ "NewTunnelFlight_Submit" | translate }} {{ "NewTunnelFlight_Submit" | translate }}
</button> </button>

View File

@@ -107,24 +107,26 @@ export class NewTunnelFlightComponent implements OnInit {
} }
public onFormSubmit() { public onFormSubmit() {
this.pendingAddRequest = true; if (this.isValidatedForm()) {
this.pendingAddRequest = true;
this.serviceTunnelFlight this.serviceTunnelFlight
.addFlight( .addFlight(
this.selectedTunnel.id, this.selectedTunnel.id,
this.selectedJumpType.id, this.selectedJumpType.id,
this.flightDate, this.flightDate,
this.minutesOfFlight, this.minutesOfFlight,
this.comments, this.comments,
) )
.subscribe(() => { .subscribe(() => {
this.comments = undefined; 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 {