From 69ff49d0cf38ef2cf06112adfcae7d8a59fb4ad8 Mon Sep 17 00:00:00 2001 From: raviks789 <33730024+raviks789@users.noreply.github.com> Date: Wed, 27 Sep 2023 17:37:53 +0200 Subject: [PATCH] WIP --- library/Notifications/Widget/Schedule.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/library/Notifications/Widget/Schedule.php b/library/Notifications/Widget/Schedule.php index 13bbed38c..c0df3ad55 100644 --- a/library/Notifications/Widget/Schedule.php +++ b/library/Notifications/Widget/Schedule.php @@ -44,7 +44,10 @@ protected function assembleCalendar(Calendar $calendar): void ['schedule' => $this->schedule->id] )); - $members = $this->schedule->member->with(['timeperiod', 'contact', 'contactgroup']); + $members = $this->schedule->member + ->with(['timeperiod', 'contact', 'contactgroup']) + ->orderBy(['schedule_id', 'timeperiod_id']); + foreach ($members as $member) { if ($member->contact_id !== null) { $attendee = new Attendee($member->contact->full_name);