Merge branch '162-phase-2-changes' into 'master'

Resolve "Phase 2 changes"

Closes #162

See merge request jankstudio/resq!176
This commit is contained in:
Kendrick Chan 2018-08-15 02:44:50 +00:00
commit d23010399d

View file

@ -929,7 +929,7 @@ class JobOrderController extends BaseController
return $this->render('job-order/form.html.twig', $params);
}
public function processingSubmit(Request $req, ValidatorInterface $validator, $id)
public function processingSubmit(Request $req, ValidatorInterface $validator, MQTTClient $mclient, $id)
{
$this->denyAccessUnlessGranted('jo_proc.list', null, 'No access.');
@ -1018,6 +1018,12 @@ class JobOrderController extends BaseController
// validated! save the entity
$em->flush();
// send event to mobile app
$payload = [
'event' => 'outlet_assign'
];
$mclient->sendEvent($obj, $payload);
// return successful response
return $this->json([
'success' => 'Changes have been saved!'