diff --git a/app/Http/Controllers/ExecutionProjectController.php b/app/Http/Controllers/ExecutionProjectController.php index a477d336..b1ce347e 100755 --- a/app/Http/Controllers/ExecutionProjectController.php +++ b/app/Http/Controllers/ExecutionProjectController.php @@ -515,21 +515,25 @@ public function receiveExecutionProject($ProjectId) $receivePlant = Plant::where('plant_id', $DatasProject->plant_id)->first(); $receiveCompany = Company::where('company_id', $receivePlant->company_id)->first(); + // Busca na model User $filteredUsers = User::where('type_users', 5) ->whereRaw("SUBSTRING_INDEX(user_name, '-', -1) = ?", [$DatasProject->company_projects_id]) - ->whereRaw("SUBSTRING_INDEX(SUBSTRING_INDEX(email, '@', 1), '-', 1) = ?", [$DatasProject->project_company_name]) + ->whereRaw("SUBSTRING_INDEX(SUBSTRING_INDEX(email, '@', 1), '-', 1) = ?", [$DatasProject->company_projects_id]) ->get(); + // Adicionando a nova coluna realPassword $filteredUsers->map(function ($user) { $user->realPassword = explode('@', $user->email)[0]; return $user; }); + // Busca todos os workstations relevantes $allWorkstations = ConstructionWorkstation::whereIn('name_workstations', $filteredUsers->pluck('user_name'))->get()->keyBy('name_workstations'); + // dd($allWorkstations); // Adicionando a nomenclatura de workstation aos usuários filtrados $filteredUsers->map(function ($user) use ($allWorkstations) { if (isset ($allWorkstations[$user->user_name])) { diff --git a/app/Http/Controllers/ProjectoDatacontroller.php b/app/Http/Controllers/ProjectoDatacontroller.php index 862dd51f..f87bcfa6 100755 --- a/app/Http/Controllers/ProjectoDatacontroller.php +++ b/app/Http/Controllers/ProjectoDatacontroller.php @@ -763,4 +763,8 @@ public function createComment(Request $request){ return back(); } + public function equipmentTaskDetailsPdf(){ + return view('projectsClients.pdf.equipmentTaskDetailsPdf'); + } + } diff --git a/app/Http/Middleware/CheckUserType.php b/app/Http/Middleware/CheckUserType.php index 0ace13ca..962ec651 100755 --- a/app/Http/Middleware/CheckUserType.php +++ b/app/Http/Middleware/CheckUserType.php @@ -79,7 +79,7 @@ protected function getAllowedRoutesForUserType($userType) 'createCompany','ShowPendingUser','register','download','projectDetails_11','editEquipment','EditprocessStep1','createWorkStations','workstationsAssociationTasks','finishCreatingProject', 'preparedProject','EditProjectForArticulated','companyEdit','reportingDataClient','ExecutionProject', 'changeFromExecutionToPlanning','deleteWorkstation','deleteProject','showQrcodesInProject','showDataDetailsProjectClient', - 'getDataAmbitsOfProject', 'showReportingForAmbitsProject','getEquipmentsOfAmbit','getDataEquipmentsOfProject','removingElementalTasksFromProject', + 'getDataAmbitsOfProject', 'showReportingForAmbitsProject','getEquipmentsOfAmbit','getDataEquipmentsOfProject','removingElementalTasksFromProject','equipmentTaskDetailsPdf', ]; diff --git a/public/receiveImagesControlEquipmentWorkstation/2013_3686/img1.png b/public/receiveImagesControlEquipmentWorkstation/2013_3686/img1.png new file mode 100644 index 00000000..920ab238 Binary files /dev/null and b/public/receiveImagesControlEquipmentWorkstation/2013_3686/img1.png differ diff --git a/public/receiveImagesControlEquipmentWorkstation/2013_3686/img2.png b/public/receiveImagesControlEquipmentWorkstation/2013_3686/img2.png new file mode 100644 index 00000000..f3cea75b Binary files /dev/null and b/public/receiveImagesControlEquipmentWorkstation/2013_3686/img2.png differ diff --git a/public/receiveImagesControlEquipmentWorkstation/2013_3686/img3.png b/public/receiveImagesControlEquipmentWorkstation/2013_3686/img3.png new file mode 100644 index 00000000..9c55ca07 Binary files /dev/null and b/public/receiveImagesControlEquipmentWorkstation/2013_3686/img3.png differ diff --git a/resources/views/projectsClients/articulated_2.blade.php b/resources/views/projectsClients/articulated_2.blade.php index b5f7dc2e..d7f3bf3f 100755 --- a/resources/views/projectsClients/articulated_2.blade.php +++ b/resources/views/projectsClients/articulated_2.blade.php @@ -1547,7 +1547,9 @@ class="btn btn-primary float-right">Postos de Trabalho class="badge badge-info">(Número da copia)