fix(api): add missing isSurvey() and isSewa() methods to Booking model
This commit is contained in:
parent
743a75baff
commit
1aaa15a38e
|
|
@ -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 ==========
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue