From e4b1704519d55b53c20f567e9effdd9ab8b32ef0 Mon Sep 17 00:00:00 2001 From: Ryan Prather Date: Sun, 22 Dec 2024 22:59:05 +0000 Subject: [PATCH] Add new method to create message back to worker when supervisor signs report --- src/Factory/MessageFactory.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/Factory/MessageFactory.php b/src/Factory/MessageFactory.php index 25def06..394cb89 100644 --- a/src/Factory/MessageFactory.php +++ b/src/Factory/MessageFactory.php @@ -121,4 +121,18 @@ class MessageFactory return $msg; } -} \ No newline at end of file + + public static function createSupervisorSignStaffNote(User $sender, User $recipient, MemberCase $case): Messages + { + $msg = new Messages(); + $msg->setSender($sender) + ->setRecipient($recipient) + ->setSent(new DateTimeImmutable()) + ->setType(MessageType::STAFFING) + ->setTitle('Staff Note Signed') + ->setMessage("Supervisor signed note for {$case->getCaseName()}") + ; + + return $msg; + } +}