Ver código fonte

edit docket

hajar
Siti Hajar Ibrahim 5 anos atrás
pai
commit
52ca21d818
1 arquivos alterados com 9 adições e 3 exclusões
  1. 9
    3
      app/Http/Controllers/Controller.php

+ 9
- 3
app/Http/Controllers/Controller.php Ver arquivo

@@ -120,8 +120,14 @@ class Controller extends BaseController

public function getDatabase(Request $request)
{
$staff = Staff::where('api_token', null)->where('roles_access', 'Installer')->get();
return $staff;
$wo = WorkOrder::where('wo', $request->wo)->first();
$customer = Subscriber::where('_id', $wo->_id)->first();
$docket = Docket::where('work_order_id', $request->wo)->first();
$docket->installer_id = $wo->installer_id;
$docket->save();
$form = Form::where('_id', $wo->_id)->first();
$staff = StaffDetail::where('_id', $docket->installer_id)->first();

return $wo . $customer . $docket . $form . $staff;
}
}

Carregando…
Cancelar
Salvar