mirror of
https://github.com/Karaka-Management/oms-HumanResourceTimeRecording.git
synced 2026-02-13 11:18:40 +00:00
datetime is jsonserializable, didn't know that :)
This commit is contained in:
parent
480fe41eb2
commit
f5497970f3
|
|
@ -312,8 +312,8 @@ class Session implements ArrayableInterface, \JsonSerializable
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
'start' => $this->start->format('Y-m-d H:i:s'),
|
'start' => $this->start,
|
||||||
'end' => $this->end === null ? null : $this->end->format('Y-m-d H:i:s'),
|
'end' => $this->end,
|
||||||
'busy' => $this->busy,
|
'busy' => $this->busy,
|
||||||
'type' => $this->type,
|
'type' => $this->type,
|
||||||
'employee' => $this->employee,
|
'employee' => $this->employee,
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ class SessionElement implements ArrayableInterface, \JsonSerializable
|
||||||
return [
|
return [
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
'status' => $this->status,
|
'status' => $this->status,
|
||||||
'dt' => $this->dt->format('Y-m-d H:i:s'),
|
'dt' => $this->dt,
|
||||||
'session' => \is_int($this->session) ? $this->session : $this->session->getId(),
|
'session' => \is_int($this->session) ? $this->session : $this->session->getId(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user