mirror of
https://github.com/Karaka-Management/oms-HumanResourceTimeRecording.git
synced 2026-01-25 10:08:43 +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 [
|
||||
'id' => $this->id,
|
||||
'start' => $this->start->format('Y-m-d H:i:s'),
|
||||
'end' => $this->end === null ? null : $this->end->format('Y-m-d H:i:s'),
|
||||
'start' => $this->start,
|
||||
'end' => $this->end,
|
||||
'busy' => $this->busy,
|
||||
'type' => $this->type,
|
||||
'employee' => $this->employee,
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ class SessionElement implements ArrayableInterface, \JsonSerializable
|
|||
return [
|
||||
'id' => $this->id,
|
||||
'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(),
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user