cfl / issues_tptd

0 stars 0 forks source link

Add status check to lease and agreement models - 0.5 days #24

Closed cflsdeboer closed 1 year ago

cflsdeboer commented 1 year ago

There is code like this:

$lease->approved_by== null && $lease->approved_at== null && $lease->submitted_at!= null

That should have calls like this:

$lease->isDraft();
$lease->isTendered();
$lease->isApproved();

This will hide the internal implementation of the state.

Create these methods on the both of the models and then change code to make use of them.