diff --git a/.gitignore b/.gitignore
index 9e25c26..2cdeb35 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,7 @@
/public/bundles/
/var/
/vendor/
+/theme/
###< symfony/framework-bundle ###
###> phpunit/phpunit ###
diff --git a/README.md b/README.md
index 4e50825..908e632 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,3 @@
-# cp-pro
+# CM Tracker
+This program is a modern CM Pro and operates as a case management tool that integrates with KidTracks. It also operates on a shared data model so that case workers, case managers/staff supervisors, therapists, and admins all operate on the same data and everything is done through the system.
diff --git a/composer.json b/composer.json
index 93c6c7b..efd931c 100644
--- a/composer.json
+++ b/composer.json
@@ -45,6 +45,7 @@
"symfony/web-link": "7.1.*",
"symfony/yaml": "7.1.*",
"twig/extra-bundle": "^2.12|^3.0",
+ "twig/intl-extra": "^3.15",
"twig/twig": "^2.12|^3.0"
},
"config": {
diff --git a/src/Entity/Company.php b/src/Entity/Company.php
index ffcf2c6..204cc51 100644
--- a/src/Entity/Company.php
+++ b/src/Entity/Company.php
@@ -199,4 +199,16 @@ class Company
return $this;
}
+
+ public function __toString(): string
+ {
+ $url = ($this->url ? "
$this->url" : '');
+ return <<<"HTML"
+ $this->name
+ $this->address
+ $this->city, $this->state $this->zip
+ $this->phone
+ $url
+ HTML;
+ }
}
diff --git a/src/Entity/User.php b/src/Entity/User.php
index 9a72eae..16de4c7 100644
--- a/src/Entity/User.php
+++ b/src/Entity/User.php
@@ -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;
+ }
}
diff --git a/src/Repository/UserRepository.php b/src/Repository/UserRepository.php
index 4f2804e..ddc90cd 100644
--- a/src/Repository/UserRepository.php
+++ b/src/Repository/UserRepository.php
@@ -33,6 +33,16 @@ class UserRepository extends ServiceEntityRepository implements PasswordUpgrader
$this->getEntityManager()->flush();
}
+ public function getCaseManagers(): array
+ {
+ return $this->createQueryBuilder('u')
+ ->andWhere('u.job = :job')
+ ->setParameter('job', 'CASE_MANAGER')
+ ->getQuery()
+ ->getResult()
+ ;
+ }
+
// /**
// * @return User[] Returns an array of User objects
// */