allow incident update to update component status, bug fix #2767

This commit is contained in:
Knight Tan
2017-10-22 16:27:06 +08:00
committed by James Brooks
parent eade2aa650
commit ab01609bb5
2 changed files with 42 additions and 0 deletions

View File

@@ -348,6 +348,10 @@ class IncidentController extends Controller
->withErrors($e->getMessageBag());
}
if ($incident->incident->component) {
$incident->incident->component->update(['status' => Binput::get('component_status')]);
}
return cachet_redirect('dashboard.incidents')
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.incidents.updates.success')));
}