Skip to content

Commit

Permalink
[TM-1564] change logic (#605)
Browse files Browse the repository at this point in the history
  • Loading branch information
LimberHope authored Dec 10, 2024
1 parent 9c5ad6c commit 94bef93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Jobs/SendDailyDigestNotificationsJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 94bef93

Please sign in to comment.