From 94bef93857c8cbe45f44b0423b1033aa5046b32f Mon Sep 17 00:00:00 2001 From: Limber Mamani <154026979+LimberHope@users.noreply.github.com> Date: Tue, 10 Dec 2024 10:34:38 -0400 Subject: [PATCH] [TM-1564] change logic (#605) --- app/Jobs/SendDailyDigestNotificationsJob.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Jobs/SendDailyDigestNotificationsJob.php b/app/Jobs/SendDailyDigestNotificationsJob.php index 9fc198189..123031aeb 100644 --- a/app/Jobs/SendDailyDigestNotificationsJob.php +++ b/app/Jobs/SendDailyDigestNotificationsJob.php @@ -42,7 +42,7 @@ public function handle(): void $usersGroupedByLocale = $users->groupBy('locale'); $taskDueAt = Carbon::parse($this->task->due_at); - if (! $this->verifyIfReportsAreApproved($this->task) && Carbon::now()->diffInDays($taskDueAt) == 7) { + if (! $this->verifyIfReportsAreApproved($this->task) && Carbon::now()->diffInDays($taskDueAt) <= 7) { foreach ($usersGroupedByLocale as $locale => $users) { $groupedLocale['locale'] = $locale; Mail::to($users->pluck('email_address')->toArray())->queue(new TaskDigestMail($groupedLocale, $this->task));