Hack to make services active when changed after ordering

This commit is contained in:
Deon George 2022-07-25 23:50:46 +10:00
parent 3ff7bf1571
commit bb44c1a216

View File

@ -123,6 +123,7 @@ class ServiceController extends Controller
/**
* Change the status of a service
* @todo This needs to be optimized
*
* @note This route is protected by middleware @see ServicePolicy::progress()
* It is assumed that the next stage is valid for the services current stage - validated in ServicePolicy::progress()
@ -172,6 +173,10 @@ class ServiceController extends Controller
} else {
$o->order_status = $stage;
if ($stage == 'ACTIVE')
$o->active = TRUE;
$o->save();
}