浏览代码

bug fix

master
Daniel 10 个月前
父节点
当前提交
ed45192016
共有 2 个文件被更改,包括 5 次插入1 次删除
  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 查看文件

@@ -39,7 +39,10 @@ export class TripFormComponent extends AbstractDataFormComponent<TripJsonld> {
) { ) {
super( super(
tripForm, tripForm,
(data: TripJsonld) => this.tripService.tripsPost(data),
(data: TripJsonld) => {
data.completed = false;
return this.tripService.tripsPost(data);
},
(id: string | number, data: TripJsonld) => (id: string | number, data: TripJsonld) =>
this.tripService.tripsIdPatch( this.tripService.tripsIdPatch(
id.toString(), id.toString(),


+ 1
- 0
httpdocs/src/Entity/Trip.php 查看文件

@@ -66,6 +66,7 @@ class Trip
$this->endLocation = $endLocation; $this->endLocation = $endLocation;
$this->startDate = $startDate; $this->startDate = $startDate;
$this->endDate = $endDate; $this->endDate = $endDate;
$this->completed = false;
$this->createdAt = new DateTimeImmutable(); $this->createdAt = new DateTimeImmutable();
$this->tripLocations = new ArrayCollection(); $this->tripLocations = new ArrayCollection();
$this->userTrips = new ArrayCollection(); $this->userTrips = new ArrayCollection();


正在加载...
取消
保存