Hack to make services active when changed after ordering
This commit is contained in:
parent
3ff7bf1571
commit
bb44c1a216
@ -123,6 +123,7 @@ class ServiceController extends Controller
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Change the status of a service
|
* Change the status of a service
|
||||||
|
* @todo This needs to be optimized
|
||||||
*
|
*
|
||||||
* @note This route is protected by middleware @see ServicePolicy::progress()
|
* @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()
|
* 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 {
|
} else {
|
||||||
$o->order_status = $stage;
|
$o->order_status = $stage;
|
||||||
|
|
||||||
|
if ($stage == 'ACTIVE')
|
||||||
|
$o->active = TRUE;
|
||||||
|
|
||||||
$o->save();
|
$o->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user