Daniel 10 mesi fa
parent
commit
ed45192016
2 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  1. +4
    -1
      angular/src/app/_views/trip/trip-form/trip-form.component.ts
  2. +1
    -0
      httpdocs/src/Entity/Trip.php

+ 4
- 1
angular/src/app/_views/trip/trip-form/trip-form.component.ts Vedi File

@@ -39,7 +39,10 @@ export class TripFormComponent extends AbstractDataFormComponent<TripJsonld> {
) {
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(),


+ 1
- 0
httpdocs/src/Entity/Trip.php Vedi File

@@ -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();


Caricamento…
Annulla
Salva