|
|
@@ -120,14 +120,8 @@ class Controller extends BaseController |
|
|
|
|
|
|
|
public function getDatabase(Request $request) |
|
|
|
{ |
|
|
|
$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; |
|
|
|
$staff = Staff::where('api_token', null)->where('roles_access', 'Installer')->get(); |
|
|
|
|
|
|
|
return $staff; |
|
|
|
} |
|
|
|
} |