User/Company updates
This commit is contained in:
@ -199,4 +199,16 @@ class Company
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function __toString(): string
|
||||
{
|
||||
$url = ($this->url ? "<br/><a href='$this->url' target='_blank'>$this->url</a>" : '');
|
||||
return <<<"HTML"
|
||||
$this->name<br/>
|
||||
$this->address<br/>
|
||||
$this->city, $this->state $this->zip<br/>
|
||||
<a href='tel:{$this->phone}'>$this->phone</a>
|
||||
$url
|
||||
HTML;
|
||||
}
|
||||
}
|
||||
|
@ -71,6 +71,9 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
|
||||
#[ORM\Column(enumType: CaseLevel::class)]
|
||||
private ?CaseLevel $level = null;
|
||||
|
||||
#[ORM\ManyToOne(inversedBy: 'supervisor')]
|
||||
private ?Supervision $supervisor = null;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->userCases = new ArrayCollection();
|
||||
@ -264,4 +267,46 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function retrieveUnreadNotifications(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
'id' => 1,
|
||||
'title' => 'Welcome',
|
||||
'from' => 'Admin',
|
||||
'type' => 'info',
|
||||
'message' => 'Welcome to the dashboard.',
|
||||
'timestamp' => new \DateTime('2024-11-12 10:00:00'),
|
||||
],
|
||||
[
|
||||
'id' => 2,
|
||||
'title' => 'New Case',
|
||||
'from' => 'Admin',
|
||||
'type' => 'info',
|
||||
'message' => 'You have a new case.',
|
||||
'timestamp' => new \DateTime('2024-11-13 10:19:56'),
|
||||
],
|
||||
[
|
||||
'id' => 3,
|
||||
'title' => 'New Message',
|
||||
'from' => 'Admin',
|
||||
'type' => 'warning',
|
||||
'message' => 'You have a new message.',
|
||||
'timestamp' => new \DateTime('2024-11-16 11:13:25'),
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSupervisor(): ?Supervision
|
||||
{
|
||||
return $this->supervisor;
|
||||
}
|
||||
|
||||
public function setSupervisor(?Supervision $supervisor): static
|
||||
{
|
||||
$this->supervisor = $supervisor;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user