fix serialized dates from API (#1888)
This commit is contained in:
@@ -332,7 +332,7 @@ class Activity implements EntityWithMetaFields
|
||||
public function addTeam(Team $team)
|
||||
{
|
||||
if ($this->teams->contains($team)) {
|
||||
return $this;
|
||||
return;
|
||||
}
|
||||
|
||||
$this->teams->add($team);
|
||||
|
||||
@@ -599,7 +599,7 @@ class Customer implements EntityWithMetaFields
|
||||
public function addTeam(Team $team)
|
||||
{
|
||||
if ($this->teams->contains($team)) {
|
||||
return $this;
|
||||
return;
|
||||
}
|
||||
|
||||
$this->teams->add($team);
|
||||
|
||||
@@ -118,6 +118,9 @@ class Project implements EntityWithMetaFields
|
||||
* @Serializer\Expose()
|
||||
* @Serializer\Groups({"Project_Entity"})
|
||||
* @Serializer\Type(name="DateTime")
|
||||
* @Serializer\Accessor(getter="getOrderDate")
|
||||
*
|
||||
* Attention: Accessor MUST be used, otherwise date will be serialized in UTC.
|
||||
*
|
||||
* @Exporter\Expose(label="label.orderDate", type="datetime")
|
||||
*
|
||||
@@ -130,6 +133,9 @@ class Project implements EntityWithMetaFields
|
||||
* @Serializer\Expose()
|
||||
* @Serializer\Groups({"Project"})
|
||||
* @Serializer\Type(name="DateTime")
|
||||
* @Serializer\Accessor(getter="getStart")
|
||||
*
|
||||
* Attention: Accessor MUST be used, otherwise date will be serialized in UTC.
|
||||
*
|
||||
* @Exporter\Expose(label="label.project_start", type="datetime")
|
||||
*
|
||||
@@ -142,6 +148,9 @@ class Project implements EntityWithMetaFields
|
||||
* @Serializer\Expose()
|
||||
* @Serializer\Groups({"Project"})
|
||||
* @Serializer\Type(name="DateTime")
|
||||
* @Serializer\Accessor(getter="getEnd")
|
||||
*
|
||||
* Attention: Accessor MUST be used, otherwise date will be serialized in UTC.
|
||||
*
|
||||
* @Exporter\Expose(label="label.project_end", type="datetime")
|
||||
*
|
||||
|
||||
@@ -114,6 +114,9 @@ class Timesheet implements EntityWithMetaFields, ExportItemInterface
|
||||
* @Serializer\Expose()
|
||||
* @Serializer\Groups({"Default"})
|
||||
* @Serializer\Type(name="DateTime")
|
||||
* @Serializer\Accessor(getter="getBegin")
|
||||
*
|
||||
* Attention: Accessor MUST be used, otherwise date will be serialized in UTC.
|
||||
*
|
||||
* @ORM\Column(name="start_time", type="datetime", nullable=false)
|
||||
* @Assert\NotNull()
|
||||
@@ -125,6 +128,9 @@ class Timesheet implements EntityWithMetaFields, ExportItemInterface
|
||||
* @Serializer\Expose()
|
||||
* @Serializer\Groups({"Default"})
|
||||
* @Serializer\Type(name="DateTime")
|
||||
* @Serializer\Accessor(getter="getEnd")
|
||||
*
|
||||
* Attention: Accessor MUST be used, otherwise date will be serialized in UTC.
|
||||
*
|
||||
* @ORM\Column(name="end_time", type="datetime", nullable=true)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user