Skip to content

Commit ba55846

Browse files
committed
Refactor DaftarKegiatan and DaftarReminder models to update status logic for improved clarity and accuracy
1 parent 0478d50 commit ba55846

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

app/Models/DaftarKegiatan.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ protected static function booted(): void
5858

5959
static::creating(function (DaftarKegiatan $daftar) {
6060
if ($daftar->jenis === 'Deadline') {
61-
$daftar->status = 'on progress';
61+
$daftar->status = empty($daftar->waktu_reminder) ? 'sent' : 'on progress';
6262
}
6363
});
6464

app/Models/DaftarReminder.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ protected static function booted(): void
3131
static::creating(function (DaftarReminder $daftar) {
3232
$daftar->status = 'on progress';
3333
});
34+
3435
}
3536

3637
public static function getRemindersForToday()

0 commit comments

Comments
 (0)