fix(api): add missing isSurvey() and isSewa() methods to Booking model

This commit is contained in:
micko samawa 2026-06-29 07:56:36 +07:00
parent 743a75baff
commit 1aaa15a38e
1 changed files with 17 additions and 0 deletions

View File

@ -287,6 +287,23 @@ public function getPaymentStatusLabelAttribute(): string
};
}
/**
* Cek apakah booking ini adalah pengajuan survei
*/
public function isSurvey(): bool
{
return $this->jenis_pengajuan === 'survei';
}
/**
* Cek apakah booking ini adalah pengajuan sewa
* Data lama yang belum memiliki jenis tetap dianggap sebagai sewa.
*/
public function isSewa(): bool
{
return !$this->isSurvey();
}
// ========== ACTIONS ==========
/**