From ed4519201631e63c0a0f4aad2fd9f41cce4b7753 Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 30 Apr 2025 15:03:48 +0200 Subject: [PATCH] bug fix --- angular/src/app/_views/trip/trip-form/trip-form.component.ts | 5 ++++- httpdocs/src/Entity/Trip.php | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/angular/src/app/_views/trip/trip-form/trip-form.component.ts b/angular/src/app/_views/trip/trip-form/trip-form.component.ts index 706a9d3..11e2b2d 100644 --- a/angular/src/app/_views/trip/trip-form/trip-form.component.ts +++ b/angular/src/app/_views/trip/trip-form/trip-form.component.ts @@ -39,7 +39,10 @@ export class TripFormComponent extends AbstractDataFormComponent { ) { super( tripForm, - (data: TripJsonld) => this.tripService.tripsPost(data), + (data: TripJsonld) => { + data.completed = false; + return this.tripService.tripsPost(data); + }, (id: string | number, data: TripJsonld) => this.tripService.tripsIdPatch( id.toString(), diff --git a/httpdocs/src/Entity/Trip.php b/httpdocs/src/Entity/Trip.php index b882100..7781991 100644 --- a/httpdocs/src/Entity/Trip.php +++ b/httpdocs/src/Entity/Trip.php @@ -66,6 +66,7 @@ class Trip $this->endLocation = $endLocation; $this->startDate = $startDate; $this->endDate = $endDate; + $this->completed = false; $this->createdAt = new DateTimeImmutable(); $this->tripLocations = new ArrayCollection(); $this->userTrips = new ArrayCollection();