Fix existing cancel workflow
This commit is contained in:
parent
dd76fda274
commit
a52c20993b
@ -40,6 +40,21 @@ class ServiceController extends Controller
|
||||
return $o->save();
|
||||
}
|
||||
|
||||
private function action_cancel_pending_enter(Service $o): bool
|
||||
{
|
||||
$o->order_status = 'CANCEL-PENDING';
|
||||
|
||||
return $o->save();
|
||||
}
|
||||
|
||||
private function action_cancelled(Service $o): bool
|
||||
{
|
||||
$o->order_status = 'CANCELLED';
|
||||
$o->active = FALSE;
|
||||
|
||||
return $o->save();
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancel a request to change a service
|
||||
*
|
||||
|
@ -263,6 +263,10 @@ class Service extends Model implements IDs
|
||||
'exit_method'=>'action_cancel_pending_exit',
|
||||
'title'=>'Cancel Pending',
|
||||
],
|
||||
'CANCELLED'=> [
|
||||
'title'=>'Service Cancelled',
|
||||
'enter_method'=>'action_cancelled',
|
||||
],
|
||||
// Service to be Upgraded
|
||||
'CHANGE-CANCEL' => [
|
||||
'next'=>[
|
||||
@ -280,7 +284,7 @@ class Service extends Model implements IDs
|
||||
'enter_method'=>'action_request_enter_redirect',
|
||||
'title'=>'Change Service',
|
||||
],
|
||||
|
||||
// Service is waiting on a supplier to activate a change
|
||||
'CHANGE-PENDING' => [
|
||||
'next'=>[
|
||||
'ACTIVE'=>['wholesaler'],
|
||||
|
Loading…
Reference in New Issue
Block a user