diff --git a/app/Http/Controllers/ExecutionProjectController.php b/app/Http/Controllers/ExecutionProjectController.php index 8b9a10c0..4bc19f2d 100755 --- a/app/Http/Controllers/ExecutionProjectController.php +++ b/app/Http/Controllers/ExecutionProjectController.php @@ -538,6 +538,7 @@ public function enterWorkstation() public function receiveExecutionProject($ProjectId) { + $DatasProject = CompanyProject::find($ProjectId); $equipmentsTypes = EquipmentType::all(); @@ -581,7 +582,6 @@ public function receiveExecutionProject($ProjectId) }); }); - // $allEquipmentsFullyCompleted será true se todos os equipamentos tiverem todos seus históricos com status 2 //Deve verificar se todos os equipamentos ja foram concluidos e se for o caso, deve alterar para Obra concluido, autorizar os relatorios e dessasociar todos os equipamento da Obra atual. if ($allEquipmentsFullyCompleted) { diff --git a/app/Http/Controllers/ProjectoDatacontroller.php b/app/Http/Controllers/ProjectoDatacontroller.php index fee3d982..d9efca35 100755 --- a/app/Http/Controllers/ProjectoDatacontroller.php +++ b/app/Http/Controllers/ProjectoDatacontroller.php @@ -9,11 +9,16 @@ use App\Models\EquipmentAssociationAmbit; use App\Models\EquipmentComment; use App\Models\EquipmentWorkHistory; +use App\Models\ReceiveImagesControlEquipmentWorkstation; use App\Models\TasksAssociationAmbits; use App\Models\Unit; use App\Models\workstationsTaskAnswers; use Illuminate\Http\Request; use Illuminate\Support\Facades\DB; +use App\Services\PdfWrapper; +use Illuminate\Support\Facades\Storage; + + use Yajra\DataTables\Facades\DataTables; @@ -36,6 +41,109 @@ class ProjectoDatacontroller extends Controller { + public function createPDFforcompletedEquipment($equipmentId) + { + $detailsEquipmentWorkHistory = EquipmentWorkHistory::where('equipment_id', $equipmentId)->first(); + $detailsEquipment = Equipment::where('equipment_id', $equipmentId)->first(); + $receiveDetailsProject = CompanyProject::where('company_projects_id', $detailsEquipmentWorkHistory->company_projects_id)->first(); + $receiveAmbit = EquipmentAssociationAmbit::where('equipmentWorkHistorys_id', $detailsEquipmentWorkHistory->equipmentWorkHistorys_id)->first(); + + // dd($receiveDetailsProject->plant->company->company_logo); + + // Recebe apenas as tarefas já feitas + $completedTasksHistory = ControlEquipmentWorkstation::with('workstationsTaskAnswers', 'receiveImages') + ->where('equipmentWorkHistorys_id', $detailsEquipmentWorkHistory->equipmentWorkHistorys_id) + ->whereNotNull('entry_date') + ->whereNotNull('departure_date') + ->has('workstationsTaskAnswers') + ->orderBy('elemental_tasks_id', 'asc') + ->get(); + + + // Cria uma coleção para armazenar todas as tarefas, concluídas e não concluídas + $receiveAllTasksHistiory = collect(); + $taskImages = []; + + foreach ($completedTasksHistory as $taskHistory) { + $taskHistory->cardTypeStyle = 'gray'; + $taskHistory->typeStatusHistory = 'historic'; + + $workstationTaskAnswer = $taskHistory->workstationsTaskAnswers->first(); + + if ($workstationTaskAnswer && $workstationTaskAnswer->answer_json) { + $answersArray = json_decode($workstationTaskAnswer->answer_json, true); + $formattedAnswers = []; + foreach ($answersArray as $item) { + if (isset($item['question']) && isset($item['value'])) { + $formattedAnswers[$item['question']] = $item['value']; + } + } + $taskHistory->formatted_answers = $formattedAnswers; + } else { + $taskHistory->formatted_answers = []; + } + + if ($taskHistory->receiveImages) { + $imagePaths = $taskHistory->receiveImages->image_paths; + $taskImages[$taskHistory->control_equipment_workstation_id] = is_array($imagePaths) ? $imagePaths : json_decode($imagePaths, true); + } else { + $taskImages[$taskHistory->control_equipment_workstation_id] = []; + } + + $receiveAllTasksHistiory->push($taskHistory); + } + + // Agrupa as tarefas concluídas por elemental_tasks_id e seleciona a mais recente por departure_date + $receiveAllTasksHistiory = $receiveAllTasksHistiory->groupBy(function ($item) { + return $item->elemental_tasks_id; + })->map(function ($group) { + return $group->sortByDesc('departure_date')->first(); + }); + + + // // Define os caminhos das logos + // $defaultLogoPath = '/img/ispt/4.0/Ispt4.0_Símbolo_Fundo_Azul-Marinho@2x-100.jpg'; + + // // Verifica se a logo do projeto está definida e não está vazia + // $projectLogoPath = !empty($receiveDetailsProject->plant->company->project_logo) ? $receiveDetailsProject->plant->company->project_logo : $defaultLogoPath; + + // // Verifica se a logo da empresa está definida e não está vazia + // $companyLogoPath = !empty($receiveDetailsProject->plant->company->company_logo) ? $receiveDetailsProject->plant->company->company_logo : $defaultLogoPath; + + + // Define os caminhos das logos + $defaultLogoPath = '/img/ispt/4.0/Ispt4.0_Símbolo_Fundo_Azul-Marinho@2x-100.jpg'; + + // Verifica se a logo do projeto está definida e não está vazia + $projectLogoPath = !empty($receiveDetailsProject->plant->company->project_logo) ? $receiveDetailsProject->plant->company->project_logo : $defaultLogoPath; + + // Verifica se a logo da empresa está definida e não está vazia + if (!empty($receiveDetailsProject->plant->company->company_logo)) { + $companyLogoPath = '/companies_logo/' . $receiveDetailsProject->plant->company->company_logo; + } else { + $companyLogoPath = $defaultLogoPath; + } + + // Converte as imagens para base64 usando o serviço PdfWrapper + $pdfWrapper = new PdfWrapper(); + + // dd($receiveAllTasksHistiory); + + // Gera e retorna o PDF + return $pdfWrapper + ->loadView('projectsClients.pdf.testePdf', [ + 'tag' => $detailsEquipment->equipment_tag, + 'numeroPanini' => $detailsEquipmentWorkHistory->ispt_number, + 'nObra' => $receiveDetailsProject->project_company_name, + 'ambito' => $receiveAmbit->ambitsEquipment->ambits_description, + 'receiveAllTasksHistiory' => $receiveAllTasksHistiory, + 'taskImages' => $taskImages, + 'projectLogoPath' => $projectLogoPath, + 'companyLogoPath' => $companyLogoPath + ]) + ->stream('ispt40.pdf'); + } + public function viewProjectsList($orderProjectID) { @@ -43,7 +151,6 @@ public function viewProjectsList($orderProjectID) // $receiveProjectsForThisOrder = CompanyProject::with(['plant.user'])->where('order_project', $orderProjectID)->get(); // return view('projectsClients.viewProjectsList',compact('receiveProjectsForThisOrder','orderProjectID')); - $receiveProjectsForThisOrder = CompanyProject::with(['plant']) ->where('order_project', $orderProjectID) ->get(); @@ -193,12 +300,15 @@ public function showAmbitDetailsProjectHistory($equipmentStatus, $projectID, $eq ->orderBy('elemental_tasks_id', 'asc') ->get(); + + // Cria uma coleção para armazenar todas as tarefas, concluídas e não concluídas $receiveAllTasksHistiory = collect(); // Adiciona as tarefas concluídas à coleção principal foreach ($completedTasksHistory as $taskHistory) { $taskHistory->cardTypeStyle = 'gray'; // Adiciona o campo 'cardTypeStyle' + $taskHistory->typeStatusHistory = 'historic'; // Obtém o primeiro registro de workstationsTaskAnswers ou define como null se não existir $workstationTaskAnswer = $taskHistory->workstationsTaskAnswers->first(); @@ -222,6 +332,14 @@ public function showAmbitDetailsProjectHistory($equipmentStatus, $projectID, $eq $taskHistory->formatted_answers = []; } + if ($taskHistory->receiveImages) { + $imagePaths = $taskHistory->receiveImages->image_paths; + $taskHistory->image_paths = is_array($imagePaths) ? $imagePaths : json_decode($imagePaths, true); + } else { + $taskHistory->image_paths = []; + } + + if (!is_null($taskHistory->entry_date) && !is_null($taskHistory->departure_date)) { // Converte para instâncias de Carbon $entryDate = \Carbon\Carbon::parse($taskHistory->entry_date); @@ -254,33 +372,41 @@ public function showAmbitDetailsProjectHistory($equipmentStatus, $projectID, $eq $receiveAllTasksHistiory->push($taskHistory); } - // Agrupar tarefas por elemental_tasks_id e ordenar por departure_date - $tasksGrouped = $completedTasksHistory->groupBy('elemental_tasks_id')->map(function ($group) { - return $group->sortByDesc('departure_date'); + + + // Agrupa e ordena as tarefas concluídas por elemental_tasks_id e departure_date + $receiveAllTasksHistiory = $receiveAllTasksHistiory->groupBy(function ($item) { + return $item->elemental_tasks_id; + })->map(function ($group) { + $latest = $group->sortByDesc('departure_date')->first(); + $latest->statusHistory = 'yes'; + $history = $group->sortByDesc('departure_date')->slice(1)->map(function ($item) { + $item->statusHistory = 'no'; + return $item; + }); + + return [ + 'latest' => $latest, + 'history' => $history->values() + ]; }); - // Processar tarefas concluídas - foreach ($tasksGrouped as $elemental_tasks_id => $tasks) { - // A tarefa mais recente - $latestTask = $tasks->first(); - // Os históricos (excluindo a mais recente) - $historyTasks = $tasks->slice(1); - - $receiveAllTasksHistiory->push((object) [ - 'latest' => $latestTask, - 'history' => $historyTasks, - ]); - } + // ->map(function ($group) { + // return [ + // 'latest' => $group->sortByDesc('departure_date')->first(), + // 'history' => $group->sortByDesc('departure_date')->slice(1)->values() + // ]; + // }); // Adiciona as tarefas não concluídas à coleção principal $incompleteTasks = $equipmentTasksIds->diff($completedTasksHistory->pluck('elemental_tasks_id')); - foreach ($incompleteTasks as $taskId) { // Busca os dados da tarefa elementar $elementalTask = ElementalTasks::where('elemental_tasks_id', $taskId)->first(); - $receiveAllTasksHistiory->push((object) [ + // Adiciona à coleção principal usando o elemental_tasks_id como chave + $receiveAllTasksHistiory->put($taskId, [ 'latest' => (object) [ 'elemental_tasks_id' => $taskId, 'control_equipment_workstation_id' => 'N/A', @@ -294,11 +420,11 @@ public function showAmbitDetailsProjectHistory($equipmentStatus, $projectID, $eq 'elemental_tasks_description' => $elementalTask ? $elementalTask->elemental_tasks_description : null ] ], - 'history' => collect(), // Histórico vazio para tarefas não concluídas + 'history' => collect() // Histórico vazio para tarefas não concluídas ]); } - dd($receiveAllTasksHistiory); + // dd($receiveAllTasksHistiory); //recebe normalmente, porem os checkbox nao conseguem buscar valor, execepto o ultimo dado. @@ -464,7 +590,6 @@ public function projectDetails_11($projectID, $equipmentID) ->keyBy('elemental_tasks_id'); // Keying by elemental_tasks_id para fácil acesso - $filteredTasks = $filteredTasks->map(function ($task) use ($elementalTasksDetails, $DetailsTasks) { // Primeiro bloco: Adiciona detalhes da tarefa elemental if (isset($elementalTasksDetails[$task->elemental_tasks_id])) { @@ -504,8 +629,6 @@ public function projectDetails_11($projectID, $equipmentID) // dd($taskBeforeExecutionOrder); - - // $OrdemTasks = $DetailsTasks->pluck('elemental_tasks_id')->all(); // Array de IDs $OrdemTasks = $DetailsTasks->pluck('execution_order', 'elemental_tasks_id')->all(); diff --git a/app/Models/ControlEquipmentWorkstation.php b/app/Models/ControlEquipmentWorkstation.php index ca4c08b0..7065283d 100755 --- a/app/Models/ControlEquipmentWorkstation.php +++ b/app/Models/ControlEquipmentWorkstation.php @@ -40,6 +40,9 @@ public function workstationsTaskAnswers() { return $this->hasMany(workstationsTaskAnswers::class, 'control_equipment_workstation_id', 'control_equipment_workstation_id'); } - + public function receiveImages() + { + return $this->hasOne(ReceiveImagesControlEquipmentWorkstation::class, 'control_equipment_workstation_id', 'control_equipment_workstation_id'); + } } diff --git a/app/Models/Equipment.php b/app/Models/Equipment.php index ec855334..40d20a40 100755 --- a/app/Models/Equipment.php +++ b/app/Models/Equipment.php @@ -77,5 +77,7 @@ public function equipmentWorkHistory() { return $this->hasMany(EquipmentWorkHistory::class, 'equipment_id', 'equipment_id'); } + + } diff --git a/app/Services/PdfWrapper copy.php b/app/Services/PdfWrapper copy.php new file mode 100644 index 00000000..d0b5b89f --- /dev/null +++ b/app/Services/PdfWrapper copy.php @@ -0,0 +1,354 @@ +pdfGenerator = new Browsershot(); + $this->headerHtml = view('projectsClients.pdf._header')->render(); + $this->footerHtml = view('projectsClients.pdf._footer')->render(); + } + // Load view and render HTML + public function loadView(string $bladeFile, array $data = []): self + { + $this->html = view($bladeFile, $data)->render(); + return $this; + } + // Load raw HTML + public function loadHtml(string $html): self + { + $this->html = $html; + return $this; + } + // Load HTML from a URL + public function loadUrl(string $url): self + { + $this->html = file_get_contents(url($url)); + return $this; + } + // Generate the PDF using Browsershot + public function generate(): Browsershot + { + return $this->pdfGenerator + ->html($this->html) + ->format('A4') + ->margins(10, 20, 10, 20) + ->showBrowserHeaderAndFooter() + ->headerHtml($this->headerHtml) + ->footerHtml($this->footerHtml) + ->waitUntilNetworkIdle(); + } + // Save the PDF to the server in the public folder + public function save(string $path): void + { + $this->generate()->savePdf($path); + } + // Download the PDF with a specified filename + public function download(string $filename) + { + $pdf = $this->generate()->pdf(); + return new Response($pdf, 200, [ + 'Content-Type' => 'application/pdf', + 'Content-Disposition' => 'attachment; filename="' . $filename . '"', + 'Content-Length' => strlen($pdf) + ]); + } + // Stream the PDF in the browser + public function stream(string $filename) + { + $pdf = $this->generate()->pdf(); + return new Response($pdf, 200, [ + 'Content-Type' => 'application/pdf', + 'Content-Disposition' => 'inline; filename="' . $filename . '"' + ]); + } +} + + +// namespace App\Services; +// use Spatie\Browsershot\Browsershot; +// use Illuminate\Http\Response; +// class PdfWrapper +// { +// protected Browsershot $pdfGenerator; +// protected string $html; +// public function __construct() +// { +// $this->pdfGenerator = new Browsershot(); +// } +// // Load view and render HTML +// public function loadView(string $bladeFile, array $data = []): self +// { +// $this->html = view($bladeFile, $data)->render(); +// return $this; +// } +// // Load raw HTML +// public function loadHtml(string $html): self +// { +// $this->html = $html; +// return $this; +// } +// // Load HTML from a URL +// public function loadUrl(string $url): self +// { +// $this->html = file_get_contents(url($url)); +// return $this; +// } +// // Generate the PDF using Browsershot +// public function generate(): Browsershot +// { +// return $this->pdfGenerator +// ->html($this->html) +// ->format('A4') +// // ->margins(10, 10, 10, 10) +// ->scale(0.7) +// ->fullPage() +// ->setOption('printBackground',true) +// ->waitUntilNetworkIdle(); +// } +// // Save the PDF to the server in the public folder +// public function save(string $path): void +// { +// $this->generate()->savePdf($path); +// } +// // Download the PDF with a specified filename +// public function download(string $filename) +// { +// $pdf = $this->generate()->pdf(); +// return new Response($pdf, 200, [ +// 'Content-Type' => 'application/pdf', +// 'Content-Disposition' => 'attachment; filename="'.$filename.'"', +// 'Content-Length' => strlen($pdf) +// ]); +// } +// // Stream the PDF in the browser +// public function stream(string $filename) +// { +// $pdf = $this->generate()->pdf(); +// return new Response($pdf, 200, [ +// 'Content-Type' => 'application/pdf', +// 'Content-Disposition' => 'inline; filename="'.$filename.'"' +// ]); +// } +// } + + + +// namespace App\Services; + +// use Spatie\Browsershot\Browsershot; +// use Illuminate\Http\Response; +// use Illuminate\Support\Facades\File; + +// class PdfWrapper +// { +// protected Browsershot $pdfGenerator; +// protected string $html; + +// public function __construct() +// { +// $this->pdfGenerator = new Browsershot(); +// } + +// // Load view and render HTML +// public function loadView(string $bladeFile, array $data = []): self +// { +// // Convert image paths to base64 +// if (isset($data['imagePaths']) && is_array($data['imagePaths'])) { +// $data['imagesBase64'] = array_map(function($path) { +// return $this->getImageBase64($path); +// }, $data['imagePaths']); +// } + +// $this->html = view($bladeFile, $data)->render(); +// return $this; +// } + +// // Load raw HTML +// public function loadHtml(string $html): self +// { +// $this->html = $html; +// return $this; +// } + +// // Load HTML from a URL +// public function loadUrl(string $url): self +// { +// $this->html = file_get_contents(url($url)); +// return $this; +// } + +// // Generate the PDF using Browsershot +// public function generate(): Browsershot +// { +// return $this->pdfGenerator +// ->html($this->html) +// ->format('A4') +// ->scale(0.7) +// ->fullPage() +// ->setOption('printBackground', true) +// ->waitUntilNetworkIdle(); +// } + +// // Save the PDF to the server in the public folder +// public function save(string $path): void +// { +// $this->generate()->savePdf($path); +// } + +// // Download the PDF with a specified filename +// public function download(string $filename) +// { +// $pdf = $this->generate()->pdf(); +// return new Response($pdf, 200, [ +// 'Content-Type' => 'application/pdf', +// 'Content-Disposition' => 'attachment; filename="'.$filename.'"', +// 'Content-Length' => strlen($pdf) +// ]); +// } + +// // Stream the PDF in the browser +// public function stream(string $filename) +// { +// $pdf = $this->generate()->pdf(); +// return new Response($pdf, 200, [ +// 'Content-Type' => 'application/pdf', +// 'Content-Disposition' => 'inline; filename="'.$filename.'"' +// ]); +// } + +// // Function to convert image to base64 +// protected function getImageBase64($imagePath) +// { +// $path = public_path($imagePath); +// $type = pathinfo($path, PATHINFO_EXTENSION); +// $data = File::get($path); +// $base64 = 'data:image/' . $type . ';base64,' . base64_encode($data); + +// return $base64; +// } +// } + + + +// namespace App\Services; + +// use Spatie\Browsershot\Browsershot; +// use Illuminate\Http\Response; +// use Illuminate\Support\Facades\File; + +// class PdfWrapper +// { +// protected Browsershot $pdfGenerator; +// protected string $html; + +// public function __construct() +// { +// $this->pdfGenerator = new Browsershot(); +// } + +// // Load view and render HTML +// public function loadView(string $bladeFile, array $data = []): self +// { +// // Convert image paths to base64 +// if (isset($data['imagePaths']) && is_array($data['imagePaths'])) { +// $data['imagesBase64'] = array_map(function ($path) { +// return $this->getImageBase64($path); +// }, $data['imagePaths']); +// } + +// $this->html = view($bladeFile, $data)->render(); +// return $this; +// } + + + +// // Load raw HTML +// public function loadHtml(string $html): self +// { +// $this->html = $html; +// return $this; +// } + +// // Load HTML from a URL +// public function loadUrl(string $url): self +// { +// $this->html = file_get_contents(url($url)); +// return $this; +// } + +// // Generate the PDF using Browsershot +// public function generate(): Browsershot +// { +// return $this->pdfGenerator +// ->html($this->html) +// ->format('A4') +// ->scale(0.7) +// ->fullPage() +// ->setOption('printBackground', true) +// ->showBackground() +// ->waitUntilNetworkIdle() +// ->timeout(60000); +// } + +// // Save the PDF to the server in the public folder +// public function save(string $path): void +// { +// $this->generate()->savePdf($path); +// } + +// // Download the PDF with a specified filename +// public function download(string $filename) +// { +// $pdf = $this->generate()->pdf(); +// return new Response($pdf, 200, [ +// 'Content-Type' => 'application/pdf', +// 'Content-Disposition' => 'attachment; filename="' . $filename . '"', +// 'Content-Length' => strlen($pdf) +// ]); +// } + +// // Stream the PDF in the browser +// public function stream(string $filename) +// { +// $pdf = $this->generate()->pdf(); +// return new Response($pdf, 200, [ +// 'Content-Type' => 'application/pdf', +// 'Content-Disposition' => 'inline; filename="' . $filename . '"' +// ]); +// } + +// // Function to convert image to base64 +// protected function getImageBase64($imagePath) +// { +// $path = public_path($imagePath); +// if (!File::exists($path)) { +// return null; // Retorna null se o arquivo não existir +// } + +// $type = pathinfo($path, PATHINFO_EXTENSION); +// $data = File::get($path); +// $base64 = 'data:image/' . $type . ';base64,' . base64_encode($data); + +// return $base64; +// } + +// // Function to convert image paths in a collection to base64 +// public function convertImagePathsToBase64($collection) +// { +// foreach ($collection as $item) { +// if (isset($item->image_paths) && is_array($item->image_paths)) { +// $item->image_paths = array_map([$this, 'getImageBase64'], $item->image_paths); +// } +// } +// } +// } diff --git a/public/companies_logo/1718559169.jpg b/public/companies_logo/1718559169.jpg new file mode 100644 index 00000000..ce91928d Binary files /dev/null and b/public/companies_logo/1718559169.jpg differ diff --git a/public/receiveImagesControlEquipmentWorkstation/2004_3810/img1.png b/public/receiveImagesControlEquipmentWorkstation/2004_3810/img1.png new file mode 100644 index 00000000..132f14c3 Binary files /dev/null and b/public/receiveImagesControlEquipmentWorkstation/2004_3810/img1.png differ diff --git a/public/receiveImagesControlEquipmentWorkstation/2004_3810/img2.png b/public/receiveImagesControlEquipmentWorkstation/2004_3810/img2.png new file mode 100644 index 00000000..f51c2211 Binary files /dev/null and b/public/receiveImagesControlEquipmentWorkstation/2004_3810/img2.png differ diff --git a/public/receiveImagesControlEquipmentWorkstation/2004_3810/img3.png b/public/receiveImagesControlEquipmentWorkstation/2004_3810/img3.png new file mode 100644 index 00000000..61fec78a Binary files /dev/null and b/public/receiveImagesControlEquipmentWorkstation/2004_3810/img3.png differ diff --git a/public/receiveImagesControlEquipmentWorkstation/2005_3806/img1.png b/public/receiveImagesControlEquipmentWorkstation/2005_3806/img1.png new file mode 100644 index 00000000..c956b12b Binary files /dev/null and b/public/receiveImagesControlEquipmentWorkstation/2005_3806/img1.png differ diff --git a/public/receiveImagesControlEquipmentWorkstation/2005_3806/img2.png b/public/receiveImagesControlEquipmentWorkstation/2005_3806/img2.png new file mode 100644 index 00000000..aee9c6fe Binary files /dev/null and b/public/receiveImagesControlEquipmentWorkstation/2005_3806/img2.png differ diff --git a/public/receiveImagesControlEquipmentWorkstation/2005_3806/img3.png b/public/receiveImagesControlEquipmentWorkstation/2005_3806/img3.png new file mode 100644 index 00000000..d5089bac Binary files /dev/null and b/public/receiveImagesControlEquipmentWorkstation/2005_3806/img3.png differ diff --git a/public/receiveImagesControlEquipmentWorkstation/2006_3806/img1.png b/public/receiveImagesControlEquipmentWorkstation/2006_3806/img1.png new file mode 100644 index 00000000..64db0e70 Binary files /dev/null and b/public/receiveImagesControlEquipmentWorkstation/2006_3806/img1.png differ diff --git a/public/receiveImagesControlEquipmentWorkstation/2006_3806/img2.png b/public/receiveImagesControlEquipmentWorkstation/2006_3806/img2.png new file mode 100644 index 00000000..a42680d6 Binary files /dev/null and b/public/receiveImagesControlEquipmentWorkstation/2006_3806/img2.png differ diff --git a/public/receiveImagesControlEquipmentWorkstation/2006_3806/img3.png b/public/receiveImagesControlEquipmentWorkstation/2006_3806/img3.png new file mode 100644 index 00000000..63bde1bc Binary files /dev/null and b/public/receiveImagesControlEquipmentWorkstation/2006_3806/img3.png differ diff --git a/public/receiveImagesControlEquipmentWorkstation/2007_3810/img1.png b/public/receiveImagesControlEquipmentWorkstation/2007_3810/img1.png new file mode 100644 index 00000000..523ebaf7 Binary files /dev/null and b/public/receiveImagesControlEquipmentWorkstation/2007_3810/img1.png differ diff --git a/public/receiveImagesControlEquipmentWorkstation/2007_3810/img2.png b/public/receiveImagesControlEquipmentWorkstation/2007_3810/img2.png new file mode 100644 index 00000000..cb8e6789 Binary files /dev/null and b/public/receiveImagesControlEquipmentWorkstation/2007_3810/img2.png differ diff --git a/public/receiveImagesControlEquipmentWorkstation/2007_3810/img3.png b/public/receiveImagesControlEquipmentWorkstation/2007_3810/img3.png new file mode 100644 index 00000000..787dccc3 Binary files /dev/null and b/public/receiveImagesControlEquipmentWorkstation/2007_3810/img3.png differ diff --git a/resources/views/components/elemental-tasks.blade.php b/resources/views/components/elemental-tasks.blade.php new file mode 100644 index 00000000..ccbae650 --- /dev/null +++ b/resources/views/components/elemental-tasks.blade.php @@ -0,0 +1,513 @@ + + @if ($task_todo->elemental_tasks_id == 1) + +
+ +
+
+
+ {{ $task_todo->elementalTask->elemental_tasks_code }} - + {{ $task_todo->elementalTask->elemental_tasks_description }} +
+
+
+
+ @if ($task_todo->typeStatusHistory === 'historic') +

Data:{{ $task_todo->entry_date }} |

+

Tempo de execução: {{ $task_todo->runtime }}

+ @endif +
+
+ +
+
+
+ + +
+ +
+ + + +
+
+ formatted_answers['confirm_label_compliance']) && + $task_todo->formatted_answers['confirm_label_compliance'] == 'on') checked @endif + @if ($task_todo->cardTypeStyle == 'gray') disabled @endif required> + +
+
+ + +
+
+ +
+
+ +
+
+ + +
+
+ +
+
+ +
+
+ + +
+
+ +
+
+
+ formatted_answers['diameter']) && $task_todo->formatted_answers['diameter'] == 'Polegadas') checked @endif + @if ($task_todo->cardTypeStyle == 'gray') disabled @endif> + +
+
+ formatted_answers['diameter']) && $task_todo->formatted_answers['diameter'] == 'Milímetros') checked @endif + @if ($task_todo->cardTypeStyle == 'gray') disabled @endif> + +
+
+
+ + +
+
+ +
+
+ cardTypeStyle == 'gray') readonly @endif> x + + cardTypeStyle == 'gray') readonly @endif> +
+
+ + + +
+
+ +
+
+ cardTypeStyle == 'gray') readonly @endif> +
+
+ + + +
+
+ + +
+
+
+ formatted_answers['piping']) && $task_todo->formatted_answers['piping'] == 'TRUE') checked @endif + @if ($task_todo->cardTypeStyle == 'gray') disabled @endif> + +
+
+ formatted_answers['piping']) && $task_todo->formatted_answers['piping'] == 'FALSE') checked @endif + @if ($task_todo->cardTypeStyle == 'gray') disabled @endif> + +
+
+
+ + @if (!empty($task_todo->image_paths)) +
+ @foreach ($task_todo->image_paths as $image) +
+ Image +
+ @endforeach +
+ @endif + + + +
+ + @if ($task_todo->statusHistory === 'yes') + + @endif + + {{-- --}} + + + @if ($task_todo->cardTypeStyle != 'gray') + + @endif + + +
+ + + + {{-- @if (isset($imagesBase64) && is_array($imagesBase64)) +
+ @foreach ($imagesBase64 as $image) +
+ Image +
+ @endforeach +
+ @endif --}} + +
+ + @endif + + + {{-- + @if ($task_todo->elemental_tasks_id == 13) + +
+ +
+
+
+ {{ $task_todo->elementalTask->elemental_tasks_code }} - + {{ $task_todo->elementalTask->elemental_tasks_description }} +
+
+
+
+ @if ($task_todo->typeStatusHistory === 'historic') +

Data:{{ $task_todo->entry_date }} | +

+

Tempo de execução: {{ $task_todo->runtime }}

+ @endif +
+
+ +
+
+
+
+
+ @csrf +
+ + + +
+
+ + * +
+
+
+ cardTypeStyle == 'gray') readonly @endif required> +
+
+
+ + + +
+
+ +
+
+ cardTypeStyle == 'gray') readonly @endif required> +
+
+ + + +
+
+ +
+
+ cardTypeStyle == 'gray') readonly @endif required> +
+
+ + + +
+
+ +
+
+ +
+
+ + + +
+
+ +
+
+ +
+
+ + + +
+
+ +
+
+ cardTypeStyle == 'gray') readonly @endif> +
+
+ + + +
+
+ +
+
+ +
+
+ + + +
+
+ +
+
+ cardTypeStyle == 'gray') readonly @endif required> +
+
+ + + +
+
+ +
+
+ +
+
+ + +
+ + @if ($task_todo->statusHistory === 'yes') + + @endif + + + @if ($task_todo->cardTypeStyle != 'gray') + + @endif +
+
+
+ + @endif --}} + + + + @if ($task_todo->elemental_tasks_id == 15) + +
+ +
+
+
+ {{ $task_todo->elementalTask->elemental_tasks_code }} - + {{ $task_todo->elementalTask->elemental_tasks_description }} +
+
+
+
+

Data:{{ $task_todo->entry_date }} |

+

Tempo de execução: {{ $task_todo->runtime }}

+
+
+ +
+
+
+ +
+
+ @csrf + +
+ + + +
+
+ formatted_answers['confirm_label_compliance']) && + $task_todo->formatted_answers['confirm_label_compliance'] == 'on') checked @endif + @if ($task_todo->cardTypeStyle == 'gray') disabled @endif required> + +
+
+ + + +
+
+ +
+
+ +
+
+ + +
+ + + @if ($task_todo->cardTypeStyle != 'gray') + + @endif +
+ +
+ +
+ @endif diff --git a/resources/views/components/pdf-layout.blade.php b/resources/views/components/pdf-layout.blade.php index b4241f8f..a3c1812a 100644 --- a/resources/views/components/pdf-layout.blade.php +++ b/resources/views/components/pdf-layout.blade.php @@ -1,129 +1,156 @@ {{-- + - - - Document - - - - - - - -
- {{ $slot }} -
- - - - --}} - - - - - - - - {{-- --}} - - - + +
-
- @include('projectsClients.pdf._header', compact('tag', 'numeroPanini', 'nObra', 'ambito')) +
+ @include('projectsClients.pdf._header', compact('tag', 'numeroPanini', 'nObra', 'ambito', 'projectLogoPath', 'companyLogoPath'))
- {{ $slot }}
+ + + --}} + + + + + + + + + + + + + + + + +
+
+ @include( + 'projectsClients.pdf._header', + compact('tag', 'numeroPanini', 'nObra', 'ambito', 'projectLogoPath', 'companyLogoPath')) +
+ +
+ {{ $slot }} +
+ + {{-- --}} +
+ + + - - - - - diff --git a/resources/views/projectsClients/pdf/_footer.blade.php b/resources/views/projectsClients/pdf/_footer.blade.php index d323a85f..1608baa5 100644 --- a/resources/views/projectsClients/pdf/_footer.blade.php +++ b/resources/views/projectsClients/pdf/_footer.blade.php @@ -1,24 +1,14 @@