update layout elemental tasks and create pdfs
This commit is contained in:
parent
e99e26a93c
commit
7d2f37174e
|
|
@ -36,7 +36,6 @@ protected function schedule(Schedule $schedule): void
|
|||
'entry_date' => null,
|
||||
]);
|
||||
|
||||
// Adicione outras tarefas necessárias aqui
|
||||
})->everyMinute();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\AssociationCompanyUser;
|
||||
|
|
@ -8,6 +9,10 @@
|
|||
use App\Models\ProjectExcelLog;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
use PhpOffice\PhpSpreadsheet\IOFactory;
|
||||
|
||||
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
|
||||
|
|
@ -1469,11 +1474,27 @@ function normalize($value)
|
|||
$newEquipament->equipment_brand = $datas['brand'];
|
||||
$newEquipament->equipment_model = $datas['model'];
|
||||
$newEquipament->company_projects_id = $company_projects_id;
|
||||
|
||||
$newEquipament->save();
|
||||
|
||||
|
||||
$countEquipment++;
|
||||
|
||||
//Deve adicionar tambem os outros atributos espesificos para o equipameto.
|
||||
//Criar 'specific_attributes_equipament_types' de acordo com o escrito, na linha do excel
|
||||
$generalAttributes = GeneralAttributesEquipment::all();
|
||||
|
||||
foreach ($generalAttributes as $generalAttribute) {
|
||||
// Verifica se a chave existe em $datas
|
||||
if (isset($datas[$generalAttribute->general_attributes_equipment_description])) {
|
||||
$specificAttribute = new SpecificAttributesEquipmentType;
|
||||
$specificAttribute->equipment_id = $newEquipament->equipment_id;
|
||||
$specificAttribute->equipment_type_id = $newEquipament->equipment_type_id;
|
||||
$specificAttribute->general_attributes_equipment_id = $generalAttribute->general_attributes_equipment_id;
|
||||
$specificAttribute->specific_attributes_value = $datas[$generalAttribute->general_attributes_equipment_description];
|
||||
|
||||
$specificAttribute->save();
|
||||
}
|
||||
}
|
||||
|
||||
//Criar o equipment Work History
|
||||
$newEquipmentWorkHistory = new EquipmentWorkHistory;
|
||||
|
|
@ -1482,7 +1503,6 @@ function normalize($value)
|
|||
$newEquipmentWorkHistory->company_projects_id = $company_projects_id;
|
||||
$newEquipmentWorkHistory->equipment_status_project = 0;
|
||||
|
||||
//Se o projecto atual for uma adicao de equipamentos extras, vai ter o order_project como 5, sendo assim todos os equipamentos adicionados vai ser equipamentos extras
|
||||
if ($detailsCompanyProject->order_project == 5) {
|
||||
$newEquipmentWorkHistory->extra_equipment = 1;
|
||||
} else {
|
||||
|
|
@ -1514,15 +1534,14 @@ function normalize($value)
|
|||
$JoinsEquipmentsWithTasks->execution_order = $execution_order++;
|
||||
$JoinsEquipmentsWithTasks->equipmentWorkHistorys_id = $newEquipmentWorkHistory->equipmentWorkHistorys_id;
|
||||
$JoinsEquipmentsWithTasks->elemental_tasks_id = $TasksAssociationAmbit->elemental_tasks_id;
|
||||
|
||||
$JoinsEquipmentsWithTasks->save();
|
||||
}
|
||||
|
||||
// Cria um array agrupado
|
||||
$groupedArrayForPendingEquipments = [$documentType, [$timestamp, $equipmentPendingLogs]];
|
||||
// Armazenar $groupedArrayForPendingEquipments na sessão
|
||||
//------- Porem agora nao deve ser guardado em uma sessao em sim em uma tabela da Db ate terminar(concluir) a Obra
|
||||
session(['groupedArrayForPendingEquipments' => $groupedArrayForPendingEquipments]);
|
||||
// $pendingEquipments = PendingEquipment::where('pending_company_projects_id', $request->numberProject)->get();
|
||||
|
||||
$equipmentPendingLogs[] = [
|
||||
'typePendingLog' => 3,
|
||||
|
|
@ -1531,7 +1550,6 @@ function normalize($value)
|
|||
];
|
||||
continue;
|
||||
}
|
||||
|
||||
// Se a linha não for duplicada nem no Excel nem na base de dados,
|
||||
// a linha é considerada para a criação de um novo equipamento.
|
||||
// Sua lógica para criar um novo equipamento pode ser inserida aqui.
|
||||
|
|
@ -1557,7 +1575,7 @@ function normalize($value)
|
|||
|
||||
return redirect()->route('articulated_2', ['projectID' => $request->numberProject])
|
||||
->with('success', 'Equipamentos criados com sucesso !');
|
||||
//Se nao existir arquivo ou nao for compativel
|
||||
//Se nao existir arquivo ou nao for compativel
|
||||
} elseif ($detailsCompanyProject->order_project == 5) {
|
||||
return redirect()->route('changeFromExecutionToPlanning', ['projectID' => $request->numberProject])
|
||||
->with('danger', 'Arquivo ignorado , por nao ser compativel com a template 4.0');
|
||||
|
|
|
|||
|
|
@ -779,19 +779,18 @@ public function receiveDetailsEquipmentsProject(Request $request)
|
|||
//Para a tabela com status = pending' deve ir equipamentos com status = 1 pois estao pendentes para Aprovar
|
||||
// Para os restantes equipamentos vao para a tabela que lista os equipamentos da Obra,porem apenas os equipmentos com status = 0
|
||||
//Equipamentos concluidos e aprovados,vao ter o status = 2 e servir apenas para visualizar
|
||||
|
||||
// $status = $tableType === 'pending' ? 1 : 0;
|
||||
// $query->where('equipment_status_project', $status);
|
||||
|
||||
|
||||
// Definir o status com base no tipo de tabela
|
||||
if ($tableType === 'pending') {
|
||||
$status = 1; // Equipamentos pendentes para aprovação
|
||||
$statuses = [1, 4]; // Equipamentos pendentes para aprovação
|
||||
$query->whereIn('equipment_status_project', $statuses);
|
||||
} else if ($tableType === 'completed') {
|
||||
$status = 2; // Equipamentos concluídos e aprovados
|
||||
$query->where('equipment_status_project', $status);
|
||||
} else {
|
||||
$status = 0; // Outros equipamentos em andamento (normal)
|
||||
$query->where('equipment_status_project', $status);
|
||||
}
|
||||
$query->where('equipment_status_project', $status);
|
||||
});
|
||||
|
||||
$query = $initialQuery->get(); // Obtém a coleção de equipamentos com base nos critérios
|
||||
|
|
@ -828,51 +827,4 @@ public function receiveDetailsEquipmentsProject(Request $request)
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// public function receiveEquipmentsExecutionProject($receiveNumberProject)
|
||||
// {
|
||||
// // Recebe os dados vindos da funcao 'data' criada na view
|
||||
// $equipment_type_id = request('equipment_type_id');
|
||||
// $ambits_id = request('ambits_id');
|
||||
|
||||
// //Recebe sempre apenas os equipamentos relacionados a obra
|
||||
// $model = Equipment::where('company_projects_id', $receiveNumberProject);
|
||||
|
||||
// // Caso 'equipment_type_id' seja '#', mostra todos os equipamentos
|
||||
// if ($equipment_type_id == '#') {
|
||||
// $model = Equipment::query()->with(['equipmentType', 'unit', 'equipmentAssociationAmbit.ambitsEquipment']);
|
||||
// }
|
||||
// // Caso 'equipment_type_id' não seja '#', filtra os equipamentos por tipo e Âmbito (caso 'ambits_id' não seja '#')
|
||||
// else {
|
||||
// $equipment_type_id = intval($equipment_type_id);
|
||||
// $model = Equipment::where('equipments.equipment_type_id', $equipment_type_id)
|
||||
// ->join('equipment_association_ambits', 'equipments.equipment_id', '=', 'equipment_association_ambits.equipment_id')
|
||||
// ->with(['equipmentType', 'unit', 'equipmentAssociationAmbit.ambitsEquipment']);
|
||||
|
||||
// if ($ambits_id != '#') {
|
||||
// $ambits_id = intval($ambits_id);
|
||||
// $model->where('equipment_association_ambits.ambits_id', $ambits_id);
|
||||
// }
|
||||
// }
|
||||
|
||||
// return DataTables::of($model)
|
||||
// ->addColumn('equipment_type', function ($row) {
|
||||
// return $row->equipmentType->equipment_type_name;
|
||||
// })
|
||||
// ->addColumn('Ambits', function ($row) {
|
||||
// return $row->equipmentAssociationAmbit->ambitsEquipment->ambits_description;
|
||||
// })
|
||||
// ->addColumn('order_tasks', function ($row) {
|
||||
// return $row->orderEquipmentTasks->map(function ($task) {
|
||||
// return $task->elementalTask->elemental_tasks_code;
|
||||
// })->implode('-');
|
||||
// })
|
||||
// ->addColumn('current_task', function ($row) {
|
||||
// return $row->controlEquipmentWorkstation->map(function ($task) {
|
||||
// return $task->elementalTask->elemental_tasks_code;
|
||||
// })->implode('-');
|
||||
// })
|
||||
// ->toJson();
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
|
@ -148,14 +148,15 @@ public function checkProjectIsptNumber(Request $request, $projectId = null)
|
|||
|
||||
public function showAmbitDetailsProjectHistory($equipmentStatus, $projectID, $equipmentID)
|
||||
{
|
||||
|
||||
$detailsProject = CompanyProject::where('company_projects_id', $projectID)->first();
|
||||
$detailsCliente = Plant::where('plant_id', $detailsProject->plant_id)->first();
|
||||
$detailsProject->user_id = $detailsCliente->user_id;
|
||||
|
||||
|
||||
$detailsEquipmentWorkProject = EquipmentWorkHistory::where('equipment_id', $equipmentID)
|
||||
->where('company_projects_id', $projectID)->first();
|
||||
|
||||
//Recebe os comentarios do equipamento
|
||||
$receiveComments = EquipmentComment::with(['user'])
|
||||
->where('equipmentWorkHistorys_id', $detailsEquipmentWorkProject->equipmentWorkHistorys_id)
|
||||
->where('company_projects_id', $detailsProject->company_projects_id)
|
||||
|
|
@ -172,26 +173,19 @@ public function showAmbitDetailsProjectHistory($equipmentStatus, $projectID, $eq
|
|||
// OBS : Porem deveria confirma se a tarefa foi mesmo concluida.
|
||||
// $receiveAllTasksHistiory = ControlEquipmentWorkstation::where('equipmentWorkHistorys_id', $detailsEquipmentWorkProject->equipmentWorkHistorys_id)->get();
|
||||
|
||||
$receiveAllTasksEquipmentInHistory = OrderEquipmentTasks::where('equipmentWorkHistorys_id', $detailsEquipmentWorkProject->equipmentWorkHistorys_id)->get();
|
||||
|
||||
|
||||
$receiveAmbit = EquipmentAssociationAmbit::where('equipmentWorkHistorys_id', $detailsEquipmentWorkProject->equipmentWorkHistorys_id)->first();
|
||||
// $tasksAssociatedWithAmbit = TasksAssociationAmbits::where('ambits_equipment_id', $receiveAmbit->ambits_id)->get();
|
||||
|
||||
$tasksAssociatedWithAmbit = TasksAssociationAmbits::with('elementalTask')
|
||||
->where('ambits_equipment_id', $receiveAmbit->ambits_id)
|
||||
// Busca todas as tarefas do equipamento na ordem de execução
|
||||
$receiveAllTasksEquipmentInHistory = OrderEquipmentTasks::where('equipmentWorkHistorys_id', $detailsEquipmentWorkProject->equipmentWorkHistorys_id)
|
||||
->orderBy('execution_order', 'asc')
|
||||
->get();
|
||||
|
||||
foreach ($tasksAssociatedWithAmbit as $taskAssociation) {
|
||||
if ($taskAssociation->elementalTask) {
|
||||
// Adiciona diretamente ao objeto TasksAssociationAmbits
|
||||
$taskAssociation->elemental_task_description = $taskAssociation->elementalTask->elemental_tasks_description;
|
||||
} else {
|
||||
// Defina como null ou algum valor padrão se não houver tarefa elementar associada
|
||||
$taskAssociation->elemental_task_description = null;
|
||||
}
|
||||
}
|
||||
$receiveAllTasksHistiory = ControlEquipmentWorkstation::with('workstationsTaskAnswers')
|
||||
// Em seguida, obtenha todos os IDs de tarefas elementares de $receiveAllTasksEquipmentInHistory
|
||||
$equipmentTasksIds = $receiveAllTasksEquipmentInHistory->pluck('elemental_tasks_id')->filter()->unique();
|
||||
|
||||
// Recebe apenas as tarefas já feitas
|
||||
$completedTasksHistory = ControlEquipmentWorkstation::with('workstationsTaskAnswers')
|
||||
->where('equipmentWorkHistorys_id', $detailsEquipmentWorkProject->equipmentWorkHistorys_id)
|
||||
->whereNotNull('entry_date') // Verifica se 'entry_date' não é null
|
||||
->whereNotNull('departure_date') // Verifica se 'departure_date' não é null
|
||||
|
|
@ -199,7 +193,11 @@ public function showAmbitDetailsProjectHistory($equipmentStatus, $projectID, $eq
|
|||
->orderBy('elemental_tasks_id', 'asc')
|
||||
->get();
|
||||
|
||||
foreach ($receiveAllTasksHistiory as $taskHistory) {
|
||||
// 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'
|
||||
|
||||
// Obtém o primeiro registro de workstationsTaskAnswers ou define como null se não existir
|
||||
|
|
@ -251,18 +249,60 @@ public function showAmbitDetailsProjectHistory($equipmentStatus, $projectID, $eq
|
|||
} else {
|
||||
$taskHistory->runtime = 'N/A'; // Ou qualquer valor padrão que você prefira
|
||||
}
|
||||
|
||||
// Adiciona o taskHistory à coleção principal
|
||||
$receiveAllTasksHistiory->push($taskHistory);
|
||||
}
|
||||
|
||||
// Nao esta a receber itens
|
||||
// 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');
|
||||
});
|
||||
|
||||
// dd($allWorkstationsTaskAnswers);
|
||||
// Agora cada objeto dentro de $tasksAssociatedWithAmbit tem uma propriedade 'elemental_task_description'.
|
||||
// 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);
|
||||
|
||||
//buscar Tarfas e tempo de execussao pelo control, assim como suas respostas.
|
||||
// dd($receiveAmbit);
|
||||
$receiveAllTasksHistiory->push((object) [
|
||||
'latest' => $latestTask,
|
||||
'history' => $historyTasks,
|
||||
]);
|
||||
}
|
||||
|
||||
// Adiciona as tarefas não concluídas à coleção principal
|
||||
$incompleteTasks = $equipmentTasksIds->diff($completedTasksHistory->pluck('elemental_tasks_id'));
|
||||
|
||||
|
||||
return view('projectsClients.showAmbitDetailProjectHistory', compact('receiveComments', 'equipmentStatus', 'detailsProject', 'receiveAmbit', 'receiveAllTasksHistiory', 'detalsEquipment','detailsEquipmentWorkProject'));
|
||||
foreach ($incompleteTasks as $taskId) {
|
||||
// Busca os dados da tarefa elementar
|
||||
$elementalTask = ElementalTasks::where('elemental_tasks_id', $taskId)->first();
|
||||
|
||||
$receiveAllTasksHistiory->push((object) [
|
||||
'latest' => (object) [
|
||||
'elemental_tasks_id' => $taskId,
|
||||
'control_equipment_workstation_id' => 'N/A',
|
||||
'cardType' => 'blue',
|
||||
'cardTypeStyle' => 'blue',
|
||||
'formatted_answers' => [],
|
||||
'entry_date' => 'N/A',
|
||||
'runtime' => 'N/A',
|
||||
'elementalTask' => (object) [
|
||||
'elemental_tasks_code' => $elementalTask ? $elementalTask->elemental_tasks_code : null,
|
||||
'elemental_tasks_description' => $elementalTask ? $elementalTask->elemental_tasks_description : null
|
||||
]
|
||||
],
|
||||
'history' => collect(), // Histórico vazio para tarefas não concluídas
|
||||
]);
|
||||
}
|
||||
|
||||
dd($receiveAllTasksHistiory);
|
||||
|
||||
//recebe normalmente, porem os checkbox nao conseguem buscar valor, execepto o ultimo dado.
|
||||
|
||||
return view('projectsClients.showAmbitDetailProjectHistory', compact('receiveComments', 'equipmentStatus', 'detailsProject', 'receiveAmbit', 'receiveAllTasksHistiory', 'detalsEquipment', 'detailsEquipmentWorkProject'));
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -427,7 +467,7 @@ public function projectDetails_11($projectID, $equipmentID)
|
|||
|
||||
$filteredTasks = $filteredTasks->map(function ($task) use ($elementalTasksDetails, $DetailsTasks) {
|
||||
// Primeiro bloco: Adiciona detalhes da tarefa elemental
|
||||
if (isset ($elementalTasksDetails[$task->elemental_tasks_id])) {
|
||||
if (isset($elementalTasksDetails[$task->elemental_tasks_id])) {
|
||||
$elementalTaskDetail = $elementalTasksDetails[$task->elemental_tasks_id];
|
||||
$task->elemental_tasks_code = $elementalTaskDetail->elemental_tasks_code;
|
||||
$task->elemental_tasks_description = $elementalTaskDetail->elemental_tasks_description;
|
||||
|
|
@ -450,8 +490,6 @@ public function projectDetails_11($projectID, $equipmentID)
|
|||
return $task;
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Para buscar a tarefa com execution_order = 3
|
||||
$taskBeforeExecutionOrder = OrderEquipmentTasks::where('equipmentWorkHistorys_id', $receiveEquipmentWorkHistorys->equipmentWorkHistorys_id)
|
||||
->where('execution_order', 3)
|
||||
|
|
@ -483,9 +521,10 @@ public function projectDetails_11($projectID, $equipmentID)
|
|||
foreach ($specificAttributes as $attribute) {
|
||||
$specificAttributesArray[$attribute->general_attributes_equipment_id] = $attribute->specific_attributes_value;
|
||||
}
|
||||
// vou te achar cabrao.
|
||||
//filteredTasks', 'OrdemTasks', 'DetailsTasks' campos vazios para ISV.
|
||||
|
||||
return view('projectsClients.articulated_2_ShowEquipment', compact( 'detailsProject', 'dataEquipment', 'filteredTasks', 'OrdemTasks', 'DetailsTasks','specificAttributesArray','receiveEquipmentWorkHistorys'));
|
||||
|
||||
return view('projectsClients.articulated_2_ShowEquipment', compact('detailsProject', 'dataEquipment', 'filteredTasks', 'OrdemTasks', 'DetailsTasks', 'specificAttributesArray', 'receiveEquipmentWorkHistorys'));
|
||||
}
|
||||
|
||||
//Funcao que recebe a Acoes do dataTables do portifolio.
|
||||
|
|
@ -720,21 +759,24 @@ public function receiveWorkstationProject($receiveNumberProject)
|
|||
|
||||
public function changeEquipmentStatusOnProject(Request $request)
|
||||
{
|
||||
|
||||
$receivedetailsUser = auth()->user();
|
||||
|
||||
$detailsEquipmentWorkHistory = EquipmentWorkHistory::
|
||||
where('equipment_id', $request->equipmentID)
|
||||
$detailsEquipmentWorkHistory = EquipmentWorkHistory::where('equipment_id', $request->equipmentID)
|
||||
->where('company_projects_id', $request->projectID)
|
||||
->where('equipment_status_project', 1)
|
||||
->whereIn('equipment_status_project', [1, 4])
|
||||
->first();
|
||||
|
||||
if ($request->choiseAdminForEquipment == 'approve') {
|
||||
//Se for aprovado, libera o equipamento para relatorio.
|
||||
$detailsEquipmentWorkHistory->equipment_status_project = 2;
|
||||
$detailsEquipmentWorkHistory->save();
|
||||
} else {
|
||||
// Se nao for aprovado, o equipamento fica para revisão
|
||||
$detailsEquipmentWorkHistory->equipment_status_project = 4;
|
||||
|
||||
}
|
||||
|
||||
$detailsEquipmentWorkHistory->save();
|
||||
|
||||
//Sempre vai criar o comentario, a diferenca a se o equipamento tem status : 2 o comanterio vai para o relatorio,se nao vai para os comentarios da Ws.
|
||||
$createCommet = new EquipmentComment;
|
||||
$createCommet->equipmentWorkHistorys_id = $detailsEquipmentWorkHistory->equipmentWorkHistorys_id;
|
||||
|
|
@ -744,12 +786,18 @@ public function changeEquipmentStatusOnProject(Request $request)
|
|||
$createCommet->comment = $request->comment;
|
||||
$createCommet->save();
|
||||
|
||||
return redirect()->route('ExecutionProject', ['projectID' => $request->projectID])
|
||||
->with('success', 'Equipamento aprovado, liberado para relatório.');
|
||||
if ($detailsEquipmentWorkHistory->equipment_status_project == 2) {
|
||||
return redirect()->route('ExecutionProject', ['projectID' => $request->projectID])
|
||||
->with('success', 'Equipamento aprovado, liberado para relatório.');
|
||||
} else {
|
||||
return redirect()->route('ExecutionProject', ['projectID' => $request->projectID])
|
||||
->with('success', 'Equipamento Não aprovado, Enviado para revisar.');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function createComment(Request $request){
|
||||
public function createComment(Request $request)
|
||||
{
|
||||
|
||||
auth()->user();
|
||||
$newComment = new EquipmentComment;
|
||||
|
|
@ -763,7 +811,8 @@ public function createComment(Request $request){
|
|||
return back();
|
||||
}
|
||||
|
||||
public function equipmentTaskDetailsPdf(){
|
||||
public function equipmentTaskDetailsPdf()
|
||||
{
|
||||
return view('projectsClients.pdf.equipmentTaskDetailsPdf');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -80,45 +80,42 @@ public function receiveQuestionsEquipment($equipmentID)
|
|||
}
|
||||
|
||||
|
||||
// public function closeSession(Request $request, $controlEquipmentId)
|
||||
// {
|
||||
// $controlEquipment = ControlEquipmentWorkstation::find($controlEquipmentId);
|
||||
// if ($controlEquipment) {
|
||||
// $controlEquipment->status = 0; // Marca a sessão como inativa
|
||||
// $controlEquipment->save();
|
||||
|
||||
// return response()->json(['success' => true, 'message' => 'Sessão fechada com sucesso.']);
|
||||
// }
|
||||
|
||||
// return response()->json(['success' => false, 'message' => 'Equipamento não encontrado.']);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
public function receiveAnswersEquipment(Request $request, $control_equipment_workstation_id)
|
||||
{
|
||||
// dd($request);
|
||||
//No request recebemos ID(NUmero da tarela elementar) , esta variavel vai receber este ID apos selerar o id da string
|
||||
$elementalTaskID = 0;
|
||||
|
||||
// $elementalTaskID = 0;
|
||||
// Deve receber as perguntas e respostas para a tarefa selecionada
|
||||
$requestData = $request->all();
|
||||
|
||||
// Verifica se há pelo menos um campo que começa com 'ID'
|
||||
$hasIDKey = false;
|
||||
foreach ($requestData as $key => $value) {
|
||||
// Verifica se a chave começa com 'ID'
|
||||
if (preg_match('/ID(\d+)/', $key, $matches)) {
|
||||
// $matches[1] conterá o número após 'ID'
|
||||
$hasIDKey = true;
|
||||
$elementalTaskID = intval($matches[1]);
|
||||
break; // Sai do loop após encontrar o primeiro match
|
||||
}
|
||||
}
|
||||
|
||||
//Ele deve criar a associação entre id atual do control + perguntas e respostas
|
||||
$receiveAnswersElementalTasks = new workstationsTaskAnswers;
|
||||
|
||||
// Se não encontrou nenhuma chave 'ID', redireciona de volta com uma mensagem de erro
|
||||
if (!$hasIDKey) {
|
||||
return redirect()->back()->with('danger', 'A última tarefa não foi salva. Respostas incorretas ou irregulares.');
|
||||
}
|
||||
|
||||
// Ele deve criar a associação entre id atual do control + perguntas e respostas
|
||||
$receiveAnswersElementalTasks = new WorkstationsTaskAnswers;
|
||||
$receiveAnswersElementalTasks->control_equipment_workstation_id = $control_equipment_workstation_id;
|
||||
|
||||
// Inicializando o array que vai armazenar os objetos JSON
|
||||
$answersArray = []; // Array para armazenar as respostas
|
||||
|
||||
// Iterar sobre o array externo
|
||||
foreach ($request->all() as $idKey => $subArray) {
|
||||
foreach ($requestData as $idKey => $subArray) {
|
||||
// Verificar se a chave atual é uma das chaves de ID (ID1, ID2, etc.)
|
||||
if (strpos($idKey, 'ID') === 0 && is_array($subArray)) {
|
||||
// Iterar sobre o array interno
|
||||
|
|
@ -151,6 +148,7 @@ public function receiveAnswersEquipment(Request $request, $control_equipment_wor
|
|||
|
||||
// Busca a Ws com base no id recebido da tabela Control.
|
||||
$receiveDataControlWs = ControlEquipmentWorkstation::find($control_equipment_workstation_id);
|
||||
|
||||
$receiveDataControlWs->elemental_tasks_id = $elementalTaskID;
|
||||
$receiveDataControlWs->departure_date = now();
|
||||
|
||||
|
|
@ -171,32 +169,6 @@ public function receiveAnswersEquipment(Request $request, $control_equipment_wor
|
|||
$receiveDataControlWs->save();
|
||||
$receiveAnswersElementalTasks->save();
|
||||
|
||||
// dd($recebeDataControlWs);
|
||||
|
||||
// $imagesBase64 = json_decode($request->capturedImages);
|
||||
// $imagePaths = [];
|
||||
|
||||
// // Assume $receiveDataControlWs já está definido/obtido em algum lugar do seu código
|
||||
// $folderName = $receiveDataControlWs->control_equipment_workstation_id . '_' . $receiveDataControlWs->equipmentWorkHistorys_id;
|
||||
|
||||
// // Cria a pasta se não existir
|
||||
// $path = 'receiveImagesControlEquipmentWorkstation/' . $folderName;
|
||||
// Storage::disk('public')->makeDirectory($path);
|
||||
|
||||
// foreach ($imagesBase64 as $index => $imageBase64) {
|
||||
// list($type, $imageBase64) = explode(';', $imageBase64);
|
||||
// list(, $imageBase64) = explode(',', $imageBase64);
|
||||
// $imageData = base64_decode($imageBase64);
|
||||
|
||||
// // Define um nome de arquivo baseado no índice
|
||||
// $fileName = $path . '/img' . ($index + 1) . '.png';
|
||||
|
||||
// // Salva a imagem
|
||||
// Storage::disk('public')->put($fileName, $imageData);
|
||||
|
||||
// // Armazena o caminho da imagem no array
|
||||
// $imagePaths[] = $fileName;
|
||||
// }
|
||||
if ($request->capturedImages) {
|
||||
$imagesBase64 = json_decode($request->capturedImages);
|
||||
$imagePaths = [];
|
||||
|
|
@ -237,20 +209,6 @@ public function receiveAnswersEquipment(Request $request, $control_equipment_wor
|
|||
$model->save();
|
||||
}
|
||||
|
||||
|
||||
// return response()->json(['success' => true]);
|
||||
|
||||
|
||||
|
||||
// Agora que guardamos os dados anteriores, vamos criar a nova linha na tabela Control Equipment ID para que o equipamento continue
|
||||
// $newControlEquipment = new ControlEquipmentWorkstation;
|
||||
// $newControlEquipment->equipmentWorkHistorys_id = $recebeDataControlWs->equipmentWorkHistorys_id;
|
||||
// $newControlEquipment->last_active_at = now();
|
||||
// $newControlEquipment->status = 0;
|
||||
// $newControlEquipment->save();
|
||||
|
||||
// dd($newControlEquipment);
|
||||
|
||||
// Vamos buscar os dados da tarefa elementar comcluida para mandar uma mensagem ao Front e indicar que esta completada
|
||||
$receiveDataElementalTask = ElementalTasks::find($receiveDataControlWs->elemental_tasks_id, 'elemental_tasks_id')->first();
|
||||
|
||||
|
|
@ -273,11 +231,16 @@ public function getEquipmentData($equipment_id, $component_tag)
|
|||
|
||||
$tagType = explode('@', $component_tag)[1]; // Isola o tipo da tag após o '@'
|
||||
|
||||
// Recebe o id do Historico do equipamento, em sua obra atual
|
||||
|
||||
// Busca os dados do equipamento
|
||||
$receiveEquipmentWorkHistory = EquipmentWorkHistory::where('equipment_id', $receiveDataEquipment->equipment_id)
|
||||
->where('company_projects_id', $receiveDataEquipment->company_projects_id)
|
||||
->first();
|
||||
|
||||
if ($receiveEquipmentWorkHistory && $receiveEquipmentWorkHistory->equipment_status_project == 2) {
|
||||
return redirect()->back()->with('danger', 'O equipamento já está concluído');
|
||||
}
|
||||
|
||||
$equipmentInUse = ControlEquipmentWorkstation::where('equipmentWorkHistorys_id', $receiveEquipmentWorkHistory->equipmentWorkHistorys_id)
|
||||
->whereNull('departure_date') // A data de saída deve ser nula, indicando que a tarefa ainda está ativa
|
||||
->whereNotNull('id_workstations') // Deve ter um posto de trabalho associado
|
||||
|
|
@ -444,7 +407,7 @@ public function getEquipmentData($equipment_id, $component_tag)
|
|||
->whereNotNull('departure_date')
|
||||
->orderByDesc('departure_date') // Ordena por departure_date de forma decrescente
|
||||
->first();
|
||||
|
||||
|
||||
if ($controlEquipment) {
|
||||
// Se encontrar, atribuir control_equipment_workstation_id
|
||||
$task->control_equipment_workstation_id = $controlEquipment->control_equipment_workstation_id;
|
||||
|
|
@ -538,8 +501,6 @@ public function getEquipmentData($equipment_id, $component_tag)
|
|||
return $comment;
|
||||
});
|
||||
|
||||
// dd($recebeTasksForEquipment);
|
||||
|
||||
|
||||
return view('workstations.workstations', [
|
||||
// Deve receber o atual COntrol ID ? tudo a vez que atualizar ??
|
||||
|
|
|
|||
|
|
@ -24,127 +24,7 @@ public function compose(View $view)
|
|||
$receiveDataEmail = User::where('email', $userEmail)->first();
|
||||
$receiveDataWs = ConstructionWorkstation::where('name_workstations', $receiveDataEmail->user_name)->first();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Busca todos os equipamentos associados a um determinado projeto.
|
||||
// $receiveAllEquipmentOfProject = Equipment::where('company_projects_id', $receiveDataWs->company_projects_id)
|
||||
// ->whereDoesntHave('equipmentWorkHistory.controlEquipmentWorkstation', function ($query) use ($excludedEquipmentsQuery) {
|
||||
// //Quarto filtro : Com base na variavel $excludedEquipmentsQuery que serve para excluir equipamentos PSV, quando tem o @Corpo e @Obturador sendo feito em simultanio.
|
||||
// $query->whereIn('equipmentWorkHistorys_id', $excludedEquipmentsQuery);
|
||||
// // Primeiro filtro: Equipamentos sem ocorrência em ControlEquipmentWorkstation
|
||||
// $query->whereDoesntHave('equipmentWorkHistory.controlEquipmentWorkstation');
|
||||
// // Segundo filtro: Equipamentos que ja tiverem um controlEquipmentWorkstation_ID criado uma dos Ws o fechou sem concluir por um metodo nao convencional e o script do servidor limpou o controlEquipmentWorkstation_ID
|
||||
// $query->orWhereHas('equipmentWorkHistory.controlEquipmentWorkstation', function ($subQuery) {
|
||||
// $subQuery->whereNull('id_workstations')
|
||||
// ->whereNull('elemental_tasks_id')
|
||||
// ->whereNull('departure_date')
|
||||
// ->where('status', 0);
|
||||
// });
|
||||
// // Terceiro filtro: Equipamentos com todas as colunas sao prenchidas como deve ser, signifca que e uma tarefa concluida(finalizada) e agora vai criar um novo dado na controlEquipmentWorkstation para a proxima tarefa.
|
||||
// $query->orWhereHas('equipmentWorkHistory.controlEquipmentWorkstation', function ($subQuery) {
|
||||
// $subQuery->whereNotNull('id_workstations')
|
||||
// ->where(function ($innerQuery) {
|
||||
// $innerQuery->whereNotNull('elemental_tasks_id')
|
||||
// ->whereNotNull('departure_date')
|
||||
// ->where('status', 1);
|
||||
// });
|
||||
// });
|
||||
// })
|
||||
// // Adiciona condição para PSV (equipment_type_id = 3)
|
||||
// ->orWhere(function ($query) use ($receiveDataWs) {
|
||||
// // Verifica no sistema se for uma 'PSV' , mesmo apos entrar como @Corpo, ou pelo @Obutador deve deixar o outro disponivel.
|
||||
// $query->whereHas('equipmentType', function ($typeQuery) {
|
||||
// $typeQuery->where('equipment_type_id', 3);
|
||||
// })
|
||||
// ->whereHas('equipmentWorkHistory.controlEquipmentWorkstation', function ($subQuery) {
|
||||
// $subQuery->where('status', 1)
|
||||
// ->whereNull('departure_date')
|
||||
// ->where(function ($taskQuery) {
|
||||
// $taskQuery->where('elemental_tasks_id', 9)
|
||||
// ->orWhereNull('elemental_tasks_id');
|
||||
// });
|
||||
// });
|
||||
// })
|
||||
// ->with([
|
||||
// 'equipmentWorkHistory' => function ($query) use ($receiveDataWs) {
|
||||
// $query->where('company_projects_id', $receiveDataWs->company_projects_id)
|
||||
// ->select('equipment_id', 'equipmentWorkHistorys_id');
|
||||
// }
|
||||
// ])
|
||||
// ->get()
|
||||
// ->map(function ($equipment) {
|
||||
// if (!$equipment->equipmentWorkHistory->isEmpty()) {
|
||||
// $equipmentWorkHistory = $equipment->equipmentWorkHistory->first();
|
||||
// $equipment->equipmentWorkHistoryId = $equipmentWorkHistory->equipmentWorkHistorys_id;
|
||||
// } else {
|
||||
// $equipment->equipmentWorkHistoryId = null;
|
||||
// }
|
||||
// return $equipment;
|
||||
// });
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// foreach ($receiveAllEquipmentOfProject as $equipment) {
|
||||
// // Agora 'equipmentWorkHistoryId' contém um único ID, então não usamos 'pluck'
|
||||
// $workHistoryId = $equipment->equipmentWorkHistoryId; // Obter ID do histórico de trabalho diretamente
|
||||
|
||||
// // Verifica se existe um workHistoryId antes de prosseguir
|
||||
// if (is_null($workHistoryId)) {
|
||||
// continue; // Se não houver histórico de trabalho, continua para o próximo equipamento
|
||||
// }
|
||||
|
||||
// $taskIds = OrderEquipmentTasks::where('equipmentWorkHistorys_id', $workHistoryId)
|
||||
// ->pluck('elemental_tasks_id'); // Obter IDs de tarefas elementares baseado em um único workHistoryId
|
||||
|
||||
// if ($taskIds->isEmpty()) {
|
||||
// continue; // Se não houver tarefas, continua para o próximo equipamento
|
||||
// }
|
||||
|
||||
// //ESTE Code ve quantas vezes ja foi realizada cada tarefa do equipamento atual, saber o code a baixo ver se falta muito ou ja esta quase a acaber
|
||||
// $workstationTaskCounts = ControlEquipmentWorkstation::whereIn('elemental_tasks_id', $taskIds)
|
||||
// ->select('elemental_tasks_id', DB::raw('count(*) as total'))
|
||||
// ->groupBy('elemental_tasks_id')
|
||||
// ->pluck('total', 'elemental_tasks_id'); // Contagem de tarefas nas estações de trabalho
|
||||
|
||||
// // Verificar se todas as tarefas foram concluídas pelo menos uma vez
|
||||
// $allTasksCompleted = $taskIds->every(function ($taskId) use ($workstationTaskCounts) {
|
||||
// return isset ($workstationTaskCounts[$taskId]) && $workstationTaskCounts[$taskId] >= 1;
|
||||
// });
|
||||
|
||||
// if ($allTasksCompleted && $workstationTaskCounts->count() >= $taskIds->count()) {
|
||||
// $completedEquipments->push($equipment); // Adicionar equipamento à lista de concluídos
|
||||
// }
|
||||
// }
|
||||
|
||||
// // Remover equipamentos concluídos da coleção original
|
||||
// $receiveAllEquipmentOfProject = $receiveAllEquipmentOfProject->reject(function ($equipment) use ($completedEquipments) {
|
||||
// return $completedEquipments->contains($equipment);
|
||||
// });
|
||||
|
||||
// $equipmentIds = $receiveAllEquipmentOfProject->pluck('equipment_id');
|
||||
|
||||
// $receiveQrcodeEquipmentsProject = QrcodesAssociatedEquipment::whereIn('equipment_id', $equipmentIds)->get();
|
||||
|
||||
// //VAMOS filtrar os valores recebidos e terar todas as correspondencias de Flange, ja nao e uma tag que nao vai entrar no percurso do Equipamento.
|
||||
// $filteredQrcodeEquipments = $receiveQrcodeEquipmentsProject->reject(function ($item) {
|
||||
// return strpos($item->component_tag, '@Flange') !== false;
|
||||
// });
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Busca todos os equipamentos associados a um determinado projeto.
|
||||
|
||||
// Este código identifica equipmentWorkHistorys_id que estão simultaneamente envolvidos em duas tarefas
|
||||
// (uma identificada por elemental_tasks_id = 9 e elemental_tasks_id = NULL), quando o departure_date é null) ou seja, ainda em progresso...
|
||||
|
|
@ -170,7 +50,7 @@ public function compose(View $view)
|
|||
->whereNull('entry_date')
|
||||
->where('status', 0);
|
||||
})
|
||||
// Condicao 2 : Se os dados encontrados do equipamento tiverem com o departure_date principalmente diferente de NUll, signica que o ultima dado deste equipamento fez e concluiu uma de suas tarefas e agora precisa criar um dado novo.
|
||||
// Condicao 2 : Se os dados encontrados do equipamento tiverem com o departure_date principalmente diferente de NUll, signica que o ultimo dado deste equipamento fez e concluiu uma de suas tarefas e agora precisa criar um dado novo.
|
||||
->orWhereHas('equipmentWorkHistory.controlEquipmentWorkstation', function ($subQuery) {
|
||||
$subQuery->whereNotNull('id_workstations')
|
||||
->where(function ($innerQuery) {
|
||||
|
|
@ -194,12 +74,15 @@ public function compose(View $view)
|
|||
return $equipment;
|
||||
});
|
||||
|
||||
$equipmentToReview = collect(); // Coleção para armazenar equipamentos para revisão
|
||||
|
||||
$completedEquipments = collect(); // Coleção para armazenar equipamentos concluídos
|
||||
|
||||
// Inicializa um array para armazenar o status de cada equipamento
|
||||
$equipmentStatus = [];
|
||||
|
||||
foreach ($receiveAllEquipmentOfProject as $equipment) {
|
||||
|
||||
// Agora 'equipmentWorkHistoryId' contém um único ID, então não usamos 'pluck'
|
||||
$workHistoryId = $equipment->equipmentWorkHistoryId; // Obter ID do histórico de trabalho diretamente
|
||||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ public function compose(View $view)
|
|||
->where('status', 0);
|
||||
});
|
||||
})
|
||||
->with('equipmentWorkHistory') // Carrega o relacionamento equipmentWorkHistory
|
||||
->with('equipmentWorkHistory') // Carrega o relacionamento equipmentWorkHistory a coleção de cada equipamento
|
||||
->get()
|
||||
->map(function ($equipment) {
|
||||
if (!$equipment->equipmentWorkHistory->isEmpty()) {
|
||||
|
|
@ -94,6 +94,8 @@ public function compose(View $view)
|
|||
return $equipment;
|
||||
});
|
||||
|
||||
$equipmentToReview = collect(); // Coleção para armazenar equipamentos para revisão
|
||||
|
||||
$completedEquipments = collect(); // Coleção para armazenar equipamentos concluídos
|
||||
|
||||
// Inicializa um array para armazenar o status de cada equipamento
|
||||
|
|
@ -151,10 +153,38 @@ public function compose(View $view)
|
|||
}
|
||||
}
|
||||
|
||||
$workstationTaskCounts = ControlEquipmentWorkstation::whereIn('elemental_tasks_id', $taskIds)
|
||||
->select('elemental_tasks_id', DB::raw('count(*) as total'))
|
||||
->groupBy('elemental_tasks_id')
|
||||
->pluck('total', 'elemental_tasks_id'); // Contagem de tarefas nas estações de trabalho
|
||||
|
||||
// $workstationTaskCounts = ControlEquipmentWorkstation::whereIn('elemental_tasks_id', $taskIds)
|
||||
// ->select('elemental_tasks_id', DB::raw('count(*) as total'))
|
||||
// ->groupBy('elemental_tasks_id')
|
||||
// ->pluck('total', 'elemental_tasks_id'); // Contagem de tarefas nas estações de trabalho
|
||||
|
||||
|
||||
// Vai verificar diretamente na base de dados , busca todos os dados do equipmentWorkHistorys_id, nesta obra e verificar com base na colecao recebida, se entre todos os seus valores, tem pelo menos um elemental_tasks_id, presente na variavel $taskIds
|
||||
// $taskCountsInControlRecords = ControlEquipmentWorkstation::where('equipmentWorkHistorys_id', $workHistoryId)
|
||||
// ->whereNotNull('departure_date')
|
||||
// ->whereIn('elemental_tasks_id', $taskIds)
|
||||
// ->groupBy('elemental_tasks_id')
|
||||
// ->select('elemental_tasks_id', DB::raw('COUNT(*) as count'))
|
||||
// ->pluck('count', 'elemental_tasks_id');
|
||||
|
||||
// // Verifica se todas as tarefas foram concluídas pelo menos uma vez
|
||||
// $allTasksCompleted = $taskIds->every(function ($taskId) use ($taskCountsInControlRecords) {
|
||||
// return isset ($taskCountsInControlRecords[$taskId]) && $taskCountsInControlRecords[$taskId] > 0;
|
||||
// });
|
||||
|
||||
// //$allTasksCompleted vai ter TRUE, apenas quando se verificar todos as tarefas foram feitas no equipamento.
|
||||
// if ($allTasksCompleted) {
|
||||
// $changeEquipmentStatus = EquipmentWorkHistory::where('equipmentWorkHistorys_id', $equipment->equipmentWorkHistoryId)->first();
|
||||
|
||||
// if ($changeEquipmentStatus->equipment_status_project == 2) {
|
||||
// $completedEquipments->push($equipment);
|
||||
// $changeEquipmentStatus->equipment_status_project = 1;
|
||||
// $changeEquipmentStatus->save();
|
||||
// } elseif ($changeEquipmentStatus->equipment_status_project == 4) {
|
||||
// $equipmentToReview->push($equipment);
|
||||
// }
|
||||
// }
|
||||
|
||||
// Vai verificar diretamente na base de dados , busca todos os dados do equipmentWorkHistorys_id, nesta obra e verificar com base na colecao recebida, se entre todos os seus valores, tem pelo menos um elemental_tasks_id, presente na variavel $taskIds
|
||||
$taskCountsInControlRecords = ControlEquipmentWorkstation::where('equipmentWorkHistorys_id', $workHistoryId)
|
||||
|
|
@ -166,24 +196,49 @@ public function compose(View $view)
|
|||
|
||||
// Verifica se todas as tarefas foram concluídas pelo menos uma vez
|
||||
$allTasksCompleted = $taskIds->every(function ($taskId) use ($taskCountsInControlRecords) {
|
||||
return isset ($taskCountsInControlRecords[$taskId]) && $taskCountsInControlRecords[$taskId] > 0;
|
||||
return isset($taskCountsInControlRecords[$taskId]) && $taskCountsInControlRecords[$taskId] > 0;
|
||||
});
|
||||
|
||||
//$allTasksCompleted vai ter TRUE, apenas quando se verificar todos as tarefas foram feitas no equipamento.
|
||||
// $allTasksCompleted vai ter TRUE, apenas quando se verificar todos as tarefas foram feitas no equipamento.
|
||||
if ($allTasksCompleted) {
|
||||
$completedEquipments->push($equipment);
|
||||
$changeEquipmentStatus = EquipmentWorkHistory::where('equipmentWorkHistorys_id', $equipment->equipmentWorkHistoryId)->first();
|
||||
|
||||
//Se o equipamento for verificado como concluido, altera o seu status na Obra, para o mesmo ser indicado como um equipamento pendente a aplovacao de Admin.
|
||||
$changeEquipmentStatus = EquipmentWorkHistory::where('equipmentWorkHistorys_id',$equipment->equipmentWorkHistoryId)->first();
|
||||
$changeEquipmentStatus->equipment_status_project = 1;
|
||||
$changeEquipmentStatus->save();
|
||||
if ($changeEquipmentStatus->equipment_status_project == 0) {
|
||||
$changeEquipmentStatus->equipment_status_project = 1;
|
||||
$changeEquipmentStatus->save();
|
||||
} elseif ($changeEquipmentStatus->equipment_status_project == 2) {
|
||||
$completedEquipments->push($equipment);
|
||||
} elseif ($changeEquipmentStatus->equipment_status_project == 4) {
|
||||
$equipmentToReview->push($equipment);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Remover equipamentos concluídos da coleção original
|
||||
$receiveAllEquipmentOfProject = $receiveAllEquipmentOfProject->reject(function ($equipment) use ($completedEquipments) {
|
||||
return $completedEquipments->contains($equipment);
|
||||
});
|
||||
|
||||
|
||||
// Remover equipamentos a serem revisados da coleção original
|
||||
$receiveAllEquipmentOfProject = $receiveAllEquipmentOfProject->reject(function ($equipment) use ($equipmentToReview) {
|
||||
return $equipmentToReview->contains($equipment);
|
||||
});
|
||||
|
||||
// if ($allTasksCompleted) {
|
||||
// $completedEquipments->push($equipment);
|
||||
|
||||
// //Se o equipamento for verificado como concluido, altera o seu status na Obra, para o mesmo ser indicado como um equipamento pendente a aplovacao de Admin.
|
||||
// $changeEquipmentStatus = EquipmentWorkHistory::where('equipmentWorkHistorys_id',$equipment->equipmentWorkHistoryId)->first();
|
||||
// $changeEquipmentStatus->equipment_status_project = 1;
|
||||
// $changeEquipmentStatus->save();
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
// Remover equipamentos concluídos da coleção original
|
||||
$receiveAllEquipmentOfProject = $receiveAllEquipmentOfProject->reject(function ($equipment) use ($completedEquipments) {
|
||||
return $completedEquipments->contains($equipment);
|
||||
});
|
||||
// $receiveAllEquipmentOfProject = $receiveAllEquipmentOfProject->reject(function ($equipment) use ($completedEquipments) {
|
||||
// return $completedEquipments->contains($equipment);
|
||||
// });
|
||||
|
||||
$equipmentIds = array_keys($equipmentStatus);
|
||||
|
||||
|
|
@ -224,13 +279,13 @@ public function compose(View $view)
|
|||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
//Returning values of the queries to workstations layout
|
||||
$view->with([
|
||||
'receiveAllEquipmentOfProject' => $receiveAllEquipmentOfProject,
|
||||
// foi alterado para a variavel 'filteredQrcodeEquipments' pois nao tem a necessidade do utilizador selecionar 'Flange'(AINDA NAO !)
|
||||
'receiveQrcodeEquipmentsProject' => $filteredQrcodeEquipments,
|
||||
'completedEquipments' => $completedEquipments,
|
||||
'equipmentToReview' => $equipmentToReview,
|
||||
'receiveDataWs' => $receiveDataWs,
|
||||
]);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,75 +1,310 @@
|
|||
<?php
|
||||
|
||||
// namespace App\Services;
|
||||
// use Spatie\Browsershot\Browsershot;
|
||||
// use Illuminate\Http\Response;
|
||||
// class PdfWrapper
|
||||
// {
|
||||
// protected Browsershot $pdfGenerator;
|
||||
// protected string $html;
|
||||
// protected string $headerHtml;
|
||||
// protected string $footerHtml;
|
||||
// public function __construct()
|
||||
// {
|
||||
// $this->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 {
|
||||
|
||||
class PdfWrapper
|
||||
{
|
||||
protected Browsershot $pdfGenerator;
|
||||
|
||||
protected string $html;
|
||||
|
||||
protected string $headerHtml;
|
||||
|
||||
protected string $footerHtml;
|
||||
|
||||
public function __construct() {
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->pdfGenerator = new Browsershot();
|
||||
|
||||
$this->headerHtml = view('projectsClients.pdf._header')->render();
|
||||
|
||||
$this->footerHtml = view('projectsClients.pdf._footer')->render();
|
||||
|
||||
}
|
||||
|
||||
//Load views
|
||||
public function loadView(string $bladeFile, array $data = []): self {
|
||||
|
||||
$this -> html = view($bladeFile, $data)->render();
|
||||
// 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 HTML
|
||||
public function loadHtml(string $html): self {
|
||||
|
||||
$this -> html = $html;
|
||||
|
||||
// Load raw HTML
|
||||
public function loadHtml(string $html): self
|
||||
{
|
||||
$this->html = $html;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function loadUrl(string $url): self {
|
||||
|
||||
$this -> html = url($url);
|
||||
|
||||
// Load HTML from a URL
|
||||
public function loadUrl(string $url): self
|
||||
{
|
||||
$this->html = file_get_contents(url($url));
|
||||
return $this;
|
||||
}
|
||||
|
||||
//Function to generate PDFs
|
||||
public function generate(): Browsershot {
|
||||
|
||||
// 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();
|
||||
->html($this->html)
|
||||
->format('A4')
|
||||
->scale(0.7)
|
||||
->fullPage()
|
||||
->setOption('printBackground', true)
|
||||
->showBackground()
|
||||
->waitUntilNetworkIdle();
|
||||
}
|
||||
|
||||
//Function to save to server in public folder
|
||||
public function save(string $path): void {
|
||||
// Save the PDF to the server in the public folder
|
||||
public function save(string $path): void
|
||||
{
|
||||
$this->generate()->savePdf($path);
|
||||
}
|
||||
|
||||
//Function to save the PDF to client with specific filename
|
||||
public function download(string $filename) {
|
||||
|
||||
|
||||
// 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.'"',
|
||||
|
|
@ -77,14 +312,24 @@ public function download(string $filename) {
|
|||
]);
|
||||
}
|
||||
|
||||
//Function to view PDF in browser
|
||||
public function stream(string $filename) {
|
||||
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 100 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 95 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 99 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 134 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 124 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 131 KiB |
|
|
@ -50,6 +50,7 @@
|
|||
|
||||
<!-- Navbar -->
|
||||
<nav class="main-header navbar navbar-expand navbar-white navbar-light" style="background-color: #00B0EA">
|
||||
|
||||
<!-- Left navbar links -->
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
|
|
@ -62,6 +63,15 @@
|
|||
<span class="badge badge-info navbar-badge">{{ count($receiveAllEquipmentOfProject) }}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link">
|
||||
<i class="fa-solid fa-rotate-left" style="color:#1f2d3d"></i>
|
||||
<span class="badge badge-success navbar-badge"
|
||||
style="background-color: orange;">{{ count($equipmentToReview) }} </span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link">
|
||||
<i class="fas fa-check" style="color:#1f2d3d"></i>
|
||||
|
|
@ -94,7 +104,7 @@
|
|||
<i class="fas fa-sign-out-alt text-danger"></i>
|
||||
<span>Terminar sessão</span>
|
||||
</a>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</li>
|
||||
|
|
@ -126,6 +136,8 @@ class="brand-image img-circle elevation-3" style="opacity: .8">
|
|||
|
||||
<!-- SidebarSearch Form -->
|
||||
<div class="form-inline">
|
||||
<h4 style="color: white">Selecionar Válvula:</h4>
|
||||
|
||||
<div class="input-group" data-widget="sidebar-search">
|
||||
<input id="qrtextleft" class="form-control form-control-sidebar text-white" type="search"
|
||||
placeholder="Procurar" aria-label="Search">
|
||||
|
|
@ -138,6 +150,9 @@ class="brand-image img-circle elevation-3" style="opacity: .8">
|
|||
</div>
|
||||
|
||||
<!-- Sidebar Menu -->
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<nav class="mt-2">
|
||||
{{-- <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" >
|
||||
|
||||
|
|
@ -164,12 +179,13 @@ class="brand-image img-circle elevation-3" style="opacity: .8">
|
|||
</ul> --}}
|
||||
<ul class="nav nav-pills nav-sidebar flex-column searchable" data-widget="treeview"
|
||||
role="menu" data-accordion="false">
|
||||
<h4 style="color:#fff">Tabela informativa :</h4>
|
||||
<li class="nav-item menu-closed">
|
||||
<a href="#" class="nav-link text-white" style="background-color: #007BFF;">
|
||||
<i class="nav-icon fas fa-play"></i>
|
||||
<p>
|
||||
<p>Por iniciar :
|
||||
{{ count($receiveAllEquipmentOfProject) }}
|
||||
a iniciar
|
||||
|
||||
<i class="right fas fa-angle-left"></i>
|
||||
</p>
|
||||
</a>
|
||||
|
|
@ -186,6 +202,30 @@ class="brand-image img-circle elevation-3" style="opacity: .8">
|
|||
</li>
|
||||
</ul>
|
||||
|
||||
<br>
|
||||
<ul class="nav nav-pills nav-sidebar flex-column searchable" data-widget="treeview"
|
||||
role="menu" data-accordion="false">
|
||||
<li class="nav-item menu-closed">
|
||||
<a href="#" class="nav-link text-white" style="background-color: orange;">
|
||||
<i class="fa-solid fa-rotate-left"></i>
|
||||
<p> Por rever :
|
||||
{{ count($equipmentToReview) }}
|
||||
<i class="right fas fa-angle-left"></i>
|
||||
</p>
|
||||
</a>
|
||||
<ul class="nav nav-treeview">
|
||||
@foreach ($equipmentToReview as $equipmentOfProject)
|
||||
<div class="row text-white">
|
||||
<div class="col-sm-2 pl-4"><i class="fas fa-tag nav-icon"></i></div>
|
||||
<div class="col-sm-10">
|
||||
<p>{{ $equipmentOfProject->equipment_tag }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav nav-pills nav-sidebar flex-column searchable" style="display: none;">
|
||||
|
||||
<!-- Add icons to the links using the .nav-icon class
|
||||
|
|
@ -193,8 +233,7 @@ class="brand-image img-circle elevation-3" style="opacity: .8">
|
|||
<li class="nav-item menu-closed">
|
||||
<a href="#" class="nav-link text-white" style="background-color: #007BFF;">
|
||||
<i class="nav-icon fas fa-play"></i>
|
||||
<p>
|
||||
{{ count($receiveQrcodeEquipmentsProject) }}
|
||||
<p> {{ count($receiveQrcodeEquipmentsProject) }}
|
||||
a iniciar QrCodes
|
||||
<i class="right fas fa-angle-left"></i>
|
||||
</p>
|
||||
|
|
@ -263,6 +302,8 @@ class="nav-link text-white">
|
|||
<!-- Control sidebar content goes here -->
|
||||
<div class="p-3 control-sidebar-content">
|
||||
|
||||
<h5 style="color:#fff;">Válvulas concluidas</h5>
|
||||
|
||||
<!-- SidebarSearch Form -->
|
||||
<div class="form-inline">
|
||||
<div class="input-group" data-widget="sidebar-search">
|
||||
|
|
@ -276,18 +317,20 @@ class="nav-link text-white">
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<br><br><br>
|
||||
<!-- Sidebar Menu -->
|
||||
<nav class="mt-2">
|
||||
<ul class="nav nav-pills nav-sidebar flex-column control-sidebar-treeview" role="menu"
|
||||
data-accordion="false">
|
||||
<!-- Add icons to the links using the .nav-icon class
|
||||
with font-awesome or any other icon font library -->
|
||||
<h4 style="color:#fff">Tabela informativa :</h4>
|
||||
<li class="nav-item menu-closed">
|
||||
<a href="#" class="nav-link text-white" style="background-color: #28a745;">
|
||||
<i class="nav-icon fas fa-check"></i>
|
||||
<p>
|
||||
<p> Total :
|
||||
{{ count($completedEquipments) }}
|
||||
válvulas concluídas
|
||||
{{-- válvulas concluídas --}}
|
||||
<i class="right fas fa-angle-left"></i>
|
||||
</p>
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<!DOCTYPE html>
|
||||
{{-- <!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
|
|
@ -7,13 +7,41 @@
|
|||
<title>Document</title>
|
||||
|
||||
<style>
|
||||
@page {
|
||||
size: A4;
|
||||
margin: 20mm;
|
||||
}
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.page-break {
|
||||
page-break-after: always;
|
||||
page-break-before: always;
|
||||
}
|
||||
header, footer {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
header {
|
||||
top: 0;
|
||||
}
|
||||
footer {
|
||||
bottom: 0;
|
||||
}
|
||||
.content {
|
||||
margin-top: 70px;
|
||||
margin-bottom: 70px;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div>
|
||||
{{ $slot }}
|
||||
|
|
@ -21,4 +49,81 @@
|
|||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</html> --}}
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
|
||||
{{-- <link rel="stylesheet" href="{{ url('https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css') }}"> --}}
|
||||
|
||||
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
@page {
|
||||
size: A4;
|
||||
margin-top: 10px;
|
||||
}
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.page-break {
|
||||
page-break-before: always;
|
||||
}
|
||||
header, footer {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
header {
|
||||
top: 0;
|
||||
bottom: 10mm;
|
||||
margin-bottom: 100px;
|
||||
|
||||
|
||||
}
|
||||
footer {
|
||||
bottom: 0;
|
||||
}
|
||||
.content {
|
||||
margin-top: 150px;
|
||||
margin-bottom: 70px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
/* margin: 0; */
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<header class="mb-3"> <!-- Certifique-se de adicionar margem abaixo do cabeçalho -->
|
||||
@include('projectsClients.pdf._header', compact('tag', 'numeroPanini', 'nObra', 'ambito'))
|
||||
</header>
|
||||
|
||||
<div class="content">
|
||||
<!-- Seu conteúdo principal aqui -->
|
||||
{{ $slot }}
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
@include('projectsClients.pdf._footer')
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -88,7 +88,6 @@
|
|||
|
||||
{{-- CV --}}
|
||||
@if ($dataEquipment->equipment_type_id == 1)
|
||||
|
||||
{{-- Visualizar --}}
|
||||
<div class="tab-pane fade show active " id="show-Equipment">
|
||||
|
||||
|
|
@ -319,7 +318,7 @@ class="form-control card_inputs" id="isolation"
|
|||
</div>
|
||||
</div>
|
||||
{{-- ./row --}}
|
||||
{{-- 3 Inputs per line : actuatorManufacturer, --}}
|
||||
{{-- 3 Inputs per line : actuatorManufacturer,ActuatorModel,actuatorSerialNumber --}}
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-4">
|
||||
<div class="input-group-prepend">
|
||||
|
|
@ -365,7 +364,7 @@ class="form-control card_inputs" id="actuatorSerialNumber"
|
|||
</div>
|
||||
</div>
|
||||
{{-- ./Row --}}
|
||||
{{-- 2 Inputs per line : actuatorManufacturer, --}}
|
||||
{{-- 2 Inputs per line : PositionerManufacturer,PositionerSerialNumber --}}
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-6">
|
||||
<div class="input-group-prepend">
|
||||
|
|
@ -438,7 +437,7 @@ class="form-control card_inputs" id="crane"
|
|||
</div>
|
||||
{{-- ./CV-card-visualizar --}}
|
||||
|
||||
{{--Ambito-CV-Visualizar --}}
|
||||
{{-- Ambito-CV-Visualizar --}}
|
||||
<div class="card card-info collapsed-card">
|
||||
|
||||
<div class="card-header clickable">
|
||||
|
|
@ -524,7 +523,8 @@ class="form-control card_inputs" id="crane"
|
|||
|
||||
<tr id="6">
|
||||
<td>TE4(2)</td>
|
||||
<td>Abertura da válvula, análise e controle dos componentes </td>
|
||||
<td>Abertura da válvula, análise e controle dos
|
||||
componentes </td>
|
||||
<td class="text-center">
|
||||
<input type="checkbox" name="ordemTasks[6]"
|
||||
value="on"
|
||||
|
|
@ -534,7 +534,7 @@ class="form-control card_inputs" id="crane"
|
|||
style="pointer-events: none;">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr id="8">
|
||||
<td>TE5</td>
|
||||
<td>Limpeza e lavagem dos componentes</td>
|
||||
|
|
@ -635,7 +635,7 @@ class="form-control card_inputs" id="crane"
|
|||
</div>
|
||||
{{-- ./card-body --}}
|
||||
</div>
|
||||
{{--./Ambito-CV-Visualizar --}}
|
||||
{{-- ./Ambito-CV-Visualizar --}}
|
||||
|
||||
</div>
|
||||
{{-- ./Visualizar --}}
|
||||
|
|
@ -653,7 +653,8 @@ class="form-control card_inputs" id="crane"
|
|||
<div class="card-body">
|
||||
<!-- Recebe o ID do equipamento -->
|
||||
|
||||
<input type="hidden" name="equipmentID" value="{{ $dataEquipment->equipment_id}}">
|
||||
<input type="hidden" name="equipmentID"
|
||||
value="{{ $dataEquipment->equipment_id }}">
|
||||
|
||||
{{-- 2 inputs per line :equipmentTag ,equipmentDescription --}}
|
||||
<div class="row">
|
||||
|
|
@ -1030,8 +1031,8 @@ class="form-control card_inputs"
|
|||
</div>
|
||||
{{-- ./CV-card-Editar --}}
|
||||
|
||||
{{--Ambito-CV-Editar --}}
|
||||
<div class="card card-info collapsed-card">
|
||||
{{-- Ambito-CV-Editar --}}
|
||||
<div class="card card-info collapsed-card">
|
||||
|
||||
<div class="card-header clickable">
|
||||
<h3 class="card-title">Âmbito :
|
||||
|
|
@ -1125,7 +1126,8 @@ class="form-control card_inputs"
|
|||
|
||||
<tr id="6">
|
||||
<td>TE4(2)</td>
|
||||
<td>Abertura da válvula, análise e controle dos componentes </td>
|
||||
<td>Abertura da válvula, análise e controle dos
|
||||
componentes </td>
|
||||
<td class="text-center">
|
||||
<input type="hidden" name="ordemTasks[6]"
|
||||
value="off">
|
||||
|
|
@ -1227,12 +1229,12 @@ class="form-control card_inputs"
|
|||
{{ old('ordemTasks[17]', isset($OrdemTasks[17]) && $OrdemTasks[17] == 'on' ? 'on' : '') == 'on' ? 'checked' : '' }}>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<button class="btn btn-outline-danger float-right mb-2 mr-2"
|
||||
type="submit">Atualizar</button>
|
||||
type="submit">Atualizar</button>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
|
@ -1244,11 +1246,10 @@ class="form-control card_inputs"
|
|||
</div>
|
||||
{{-- ./card-body --}}
|
||||
</div>
|
||||
{{--./Ambito-CV-Editar --}}
|
||||
{{-- ./Ambito-CV-Editar --}}
|
||||
|
||||
</div>
|
||||
{{-- Editar --}}
|
||||
|
||||
@endif
|
||||
|
||||
{{-- ISV --}}
|
||||
|
|
@ -1256,9 +1257,10 @@ class="form-control card_inputs"
|
|||
{{-- Visualizar --}}
|
||||
<div class="tab-pane fade show active " id="show-Equipment">
|
||||
|
||||
{{-- ISV-card-visualizar --}}
|
||||
<div id="isv_card" class="card card-primary specificAttributes-div">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">ISV</h3>
|
||||
<h3 class="card-title">ISV - Visualizar </h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
|
|
@ -1288,7 +1290,8 @@ class="form-control inputsIspt" id="equipmentTag"
|
|||
</span>
|
||||
<input type="text" name="equipmentDescription"
|
||||
value="{{ $dataEquipment->equipment_description }}"
|
||||
class="form-control card_inputs" id="equipmentDescription"
|
||||
class="form-control card_inputs"
|
||||
id="equipmentDescription"
|
||||
placeholder="Descrição Equipamento..."
|
||||
aria-label="Tag Equipment"
|
||||
aria-describedby="form-equipmentDescription" readonly>
|
||||
|
|
@ -1301,8 +1304,9 @@ class="form-control card_inputs" id="equipmentDescription"
|
|||
<div class="row">
|
||||
<div class="form-group col-sm-4">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="form-serialNumberEquipment"
|
||||
data-toggle="tooltip" title="Número de série">
|
||||
<span class="input-group-text"
|
||||
id="form-serialNumberEquipment" data-toggle="tooltip"
|
||||
title="Número de série">
|
||||
<i class="fa-solid fa-barcode"
|
||||
style="color: #00B0EA;"></i>
|
||||
</span>
|
||||
|
|
@ -1333,7 +1337,8 @@ class="form-control card_inputs"
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="form-equipmentModel"
|
||||
data-toggle="tooltip" title="Modelo Equipamento">
|
||||
<i class="fa-solid fa-cubes" style="color: #00B0EA;"></i>
|
||||
<i class="fa-solid fa-cubes"
|
||||
style="color: #00B0EA;"></i>
|
||||
</span>
|
||||
<input type="text" name="equipmentModel"
|
||||
class="form-control card_inputs"
|
||||
|
|
@ -1352,7 +1357,8 @@ class="form-control card_inputs"
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="form-dimension"
|
||||
data-toggle="tooltip" title="Dimensão">
|
||||
<i class="fa-solid fa-ruler " style="color: #00B0EA;"></i>
|
||||
<i class="fa-solid fa-ruler "
|
||||
style="color: #00B0EA;"></i>
|
||||
</span>
|
||||
<input type="text" name="attributes[8]"
|
||||
value="{{ $specificAttributesArray[8] ?? '' }}"
|
||||
|
|
@ -1528,6 +1534,185 @@ class="form-control card_inputs" id="crane"
|
|||
</div>
|
||||
<!-- /.card-body -->
|
||||
</div>
|
||||
{{-- ./ISV-card-visualizar --}}
|
||||
|
||||
{{-- Âmbito-ISV - Visualizar --}}
|
||||
<div class="card card-primary collapsed-card">
|
||||
|
||||
<div class="card-header clickable">
|
||||
<h3 class="card-title">Âmbito :
|
||||
{{ $receiveEquipmentWorkHistorys->equipmentAssociationAmbit->ambitsEquipment->ambits_description }}
|
||||
- Visualizar
|
||||
</h3>
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-tool collapse-button"
|
||||
data-card-widget="collapse"><i class="fas fa-plus"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
{{-- ./card-header --}}
|
||||
<div class="card-body">
|
||||
<div class="card ordemTasks-div">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Lista de Tarefas Elementares :
|
||||
{{ $receiveEquipmentWorkHistorys->equipmentAssociationAmbit->ambitsEquipment->ambits_description }}
|
||||
</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body p-0">
|
||||
|
||||
<table class="table table-sm ">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 10px">#</th>
|
||||
<th>Tarefas Elementares</th>
|
||||
<th class="text-center">Selecionar Tarefa
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr id="1">
|
||||
<td>TE1</td>
|
||||
<td>Desmontar da linha</td>
|
||||
<td class="text-center">
|
||||
<input type="checkbox" name="ordemTasks[1]"
|
||||
value="on"
|
||||
@if (isset($OrdemTasks[1]) && $OrdemTasks[1] == 'on') checked @endif
|
||||
onclick="return false;"
|
||||
onkeydown="return false;"
|
||||
style="pointer-events: none;">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="2">
|
||||
<td>TE2</td>
|
||||
<td>Descontaminar</td>
|
||||
<td class="text-center">
|
||||
<input type="checkbox" name="ordemTasks[2]"
|
||||
value="on"
|
||||
@if (isset($OrdemTasks[2]) && $OrdemTasks[2] == 'on') checked @endif
|
||||
onclick="return false;"
|
||||
onkeydown="return false;"
|
||||
style="pointer-events: none;">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="7">
|
||||
<td>TE4(3)</td>
|
||||
<td>Abertura da válvula, análise e controle dos componentes</td>
|
||||
<td class="text-center">
|
||||
<input type="checkbox" name="ordemTasks[7]"
|
||||
value="on"
|
||||
@if (isset($OrdemTasks[7]) && $OrdemTasks[7] == 'on') checked @endif
|
||||
onclick="return false;"
|
||||
onkeydown="return false;"
|
||||
style="pointer-events: none;">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="8">
|
||||
<td>TE5</td>
|
||||
<td>Limpeza e lavagem dos componentes</td>
|
||||
<td class="text-center">
|
||||
<input type="checkbox" name="ordemTasks[8]"
|
||||
value="on"
|
||||
@if (isset($OrdemTasks[8]) && $OrdemTasks[8] == 'on') checked @endif
|
||||
onclick="return false;"
|
||||
onkeydown="return false;"
|
||||
style="pointer-events: none;">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="12">
|
||||
<td>TE7(3)</td>
|
||||
<td>Fecho da válvula e substituição de componentes </td>
|
||||
<td class="text-center">
|
||||
<input type="checkbox" name="ordemTasks[12]"
|
||||
value="on"
|
||||
@if (isset($OrdemTasks[12]) && $OrdemTasks[12] == 'on') checked @endif
|
||||
onclick="return false;"
|
||||
onkeydown="return false;"
|
||||
style="pointer-events: none;">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="20">
|
||||
<td>TE14</td>
|
||||
<td>Ensaio</td>
|
||||
<td class="text-center">
|
||||
<input type="checkbox" name="ordemTasks[20]"
|
||||
value="on"
|
||||
@if (isset($OrdemTasks[20]) && $OrdemTasks[20] == 'on') checked @endif
|
||||
onclick="return false;"
|
||||
onkeydown="return false;"
|
||||
style="pointer-events: none;">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="14">
|
||||
<td>TE9</td>
|
||||
<td>Pintura</td>
|
||||
<td class="text-center">
|
||||
<input type="checkbox" name="ordemTasks[14]"
|
||||
value="on"
|
||||
@if (isset($OrdemTasks[14]) && $OrdemTasks[14] == 'on') checked @endif
|
||||
onclick="return false;"
|
||||
onkeydown="return false;"
|
||||
style="pointer-events: none;">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="15">
|
||||
<td>TE10</td>
|
||||
<td>Montagem na linha</td>
|
||||
<td class="text-center">
|
||||
<input type="checkbox" name="ordemTasks[15]"
|
||||
value="on"
|
||||
@if (isset($OrdemTasks[15]) && $OrdemTasks[15] == 'on') checked @endif
|
||||
onclick="return false;"
|
||||
onkeydown="return false;"
|
||||
style="pointer-events: none;">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="17">
|
||||
<td>TE11</td>
|
||||
<td>Inspeção Final</td>
|
||||
<td class="text-center">
|
||||
<input type="checkbox" name="ordemTasks[17]"
|
||||
value="on"
|
||||
@if (isset($OrdemTasks[17]) && $OrdemTasks[17] == 'on') checked @endif
|
||||
onclick="return false;"
|
||||
onkeydown="return false;"
|
||||
style="pointer-events: none;">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="21">
|
||||
<td>TE15</td>
|
||||
<td>Empancar (ISV)</td>
|
||||
<td class="text-center">
|
||||
<input type="checkbox" name="ordemTasks[21]"
|
||||
value="on"
|
||||
@if (isset($OrdemTasks[21]) && $OrdemTasks[21] == 'on') checked @endif
|
||||
onclick="return false;"
|
||||
onkeydown="return false;"
|
||||
style="pointer-events: none;">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
{{-- @livewire('articulado.additonal-task', ['equipment' => $dataEquipment], key($dataEquipment->equipment_id)) --}}
|
||||
|
||||
</div>
|
||||
{{-- ./description --}}
|
||||
</div>
|
||||
{{-- ./card-body --}}
|
||||
</div>
|
||||
{{-- ./Ambito ISV - Visualizar --}}
|
||||
|
||||
</div>
|
||||
{{-- Visualizar --}}
|
||||
|
|
@ -1535,6 +1720,7 @@ class="form-control card_inputs" id="crane"
|
|||
{{-- Editar --}}
|
||||
<div class="tab-pane fade pt-1" id="edit-equipment">
|
||||
|
||||
{{-- ISV-card-Editar --}}
|
||||
<div id="isv_card" class="card card-primary specificAttributes-div">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">ISV - Editar</h3>
|
||||
|
|
@ -1544,7 +1730,8 @@ class="form-control card_inputs" id="crane"
|
|||
@csrf
|
||||
<div class="card-body">
|
||||
|
||||
<input type="hidden" name="equipmentID" value="{{ $dataEquipment->equipment_id}}">
|
||||
<input type="hidden" name="equipmentID"
|
||||
value="{{ $dataEquipment->equipment_id }}">
|
||||
|
||||
{{-- 2 inputs per line :equipmentTag ,equipmentDescription --}}
|
||||
<div class="row">
|
||||
|
|
@ -1841,198 +2028,198 @@ class="form-control card_inputs"
|
|||
<!-- /.card-body -->
|
||||
</form>
|
||||
</div>
|
||||
{{-- ./ISV-card-Editar --}}
|
||||
|
||||
{{-- Âmbito-ISV - Editar --}}
|
||||
<div class="card card-primary collapsed-card">
|
||||
|
||||
<div class="card-header clickable">
|
||||
<h3 class="card-title">Âmbito :
|
||||
{{ $receiveEquipmentWorkHistorys->equipmentAssociationAmbit->ambitsEquipment->ambits_description }}
|
||||
- Editar
|
||||
</h3>
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-tool collapse-button"
|
||||
data-card-widget="collapse"><i class="fas fa-plus"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
{{-- ./card-header --}}
|
||||
<div class="card-body">
|
||||
<div class="card ordemTasks-div">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Lista de Tarefas Elementares :
|
||||
{{ $receiveEquipmentWorkHistorys->equipmentAssociationAmbit->ambitsEquipment->ambits_description }}
|
||||
</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body p-0">
|
||||
<form method="POST"
|
||||
action="{{ route('editEquipmentTasks', ['equipmentID' => $dataEquipment->equipment_id, 'projectId' => $detailsProject->company_projects_id]) }}">
|
||||
@csrf
|
||||
|
||||
<table class="table table-sm ">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 10px">#</th>
|
||||
<th>Tarefas Elementares</th>
|
||||
<th class="text-center">Selecionar Tarefa
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr id="1">
|
||||
<td>TE1</td>
|
||||
<td>Desmontar da linha</td>
|
||||
<td class="text-center">
|
||||
<input type="hidden" name="ordemTasks[1]"
|
||||
value="off">
|
||||
<!-- se não marcado, o valor será 'off' -->
|
||||
<input type="checkbox" name="ordemTasks[1]"
|
||||
value="on"
|
||||
{{ old('ordemTasks[1]', isset($OrdemTasks[1]) && $OrdemTasks[1] == 'on' ? 'on' : '') == 'on' ? 'checked' : '' }}>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="2">
|
||||
<td>TE2</td>
|
||||
<td>Descontaminar</td>
|
||||
<td class="text-center">
|
||||
<input type="hidden" name="ordemTasks[2]"
|
||||
value="off">
|
||||
<!-- se não marcado, o valor será 'off' -->
|
||||
<input type="checkbox" name="ordemTasks[2]"
|
||||
value="on"
|
||||
{{ old('ordemTasks[2]', isset($OrdemTasks[2]) && $OrdemTasks[2] == 'on' ? 'on' : '') == 'on' ? 'checked' : '' }}>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="7">
|
||||
<td>TE4(3)</td>
|
||||
<td>Abertura da válvula, análise e controle dos componentes</td>
|
||||
<td class="text-center">
|
||||
<input type="hidden" name="ordemTasks[7]"
|
||||
value="off">
|
||||
<!-- se não marcado, o valor será 'off' -->
|
||||
<input type="checkbox" name="ordemTasks[7]"
|
||||
value="on"
|
||||
{{ old('ordemTasks[7]', isset($OrdemTasks[7]) && $OrdemTasks[7] == 'on' ? 'on' : '') == 'on' ? 'checked' : '' }}>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="8">
|
||||
<td>TE5</td>
|
||||
<td>Limpeza e lavagem dos componentes</td>
|
||||
<td class="text-center">
|
||||
<input type="hidden" name="ordemTasks[8]"
|
||||
value="off">
|
||||
<!-- se não marcado, o valor será 'off' -->
|
||||
<input type="checkbox" name="ordemTasks[8]"
|
||||
value="on"
|
||||
{{ old('ordemTasks[8]', isset($OrdemTasks[8]) && $OrdemTasks[8] == 'on' ? 'on' : '') == 'on' ? 'checked' : '' }}>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="12">
|
||||
<td>TE7(3)</td>
|
||||
<td>Fecho da válvula e substituição de componentes </td>
|
||||
<td class="text-center">
|
||||
<input type="hidden" name="ordemTasks[12]"
|
||||
value="off">
|
||||
<!-- se não marcado, o valor será 'off' -->
|
||||
<input type="checkbox" name="ordemTasks[12]"
|
||||
value="on"
|
||||
{{ old('ordemTasks[12]', isset($OrdemTasks[12]) && $OrdemTasks[12] == 'on' ? 'on' : '') == 'on' ? 'checked' : '' }}>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="20">
|
||||
<td>TE14</td>
|
||||
<td>Ensaio</td>
|
||||
<td class="text-center">
|
||||
<input type="hidden" name="ordemTasks[20]"
|
||||
value="off">
|
||||
<!-- se não marcado, o valor será 'off' -->
|
||||
<input type="checkbox" name="ordemTasks[20]"
|
||||
value="on"
|
||||
{{ old('ordemTasks[20]', isset($OrdemTasks[20]) && $OrdemTasks[20] == 'on' ? 'on' : '') == 'on' ? 'checked' : '' }}>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="14">
|
||||
<td>TE9</td>
|
||||
<td>Pintura</td>
|
||||
<td class="text-center">
|
||||
<input type="hidden" name="ordemTasks[14]"
|
||||
value="off">
|
||||
<!-- se não marcado, o valor será 'off' -->
|
||||
<input type="checkbox" name="ordemTasks[14]"
|
||||
value="on"
|
||||
{{ old('ordemTasks[14]', isset($OrdemTasks[14]) && $OrdemTasks[14] == 'on' ? 'on' : '') == 'on' ? 'checked' : '' }}>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="15">
|
||||
<td>TE10</td>
|
||||
<td>Montagem na linha</td>
|
||||
<td class="text-center">
|
||||
<input type="hidden" name="ordemTasks[15]"
|
||||
value="off">
|
||||
<!-- se não marcado, o valor será 'off' -->
|
||||
<input type="checkbox" name="ordemTasks[15]"
|
||||
value="on"
|
||||
{{ old('ordemTasks[15]', isset($OrdemTasks[15]) && $OrdemTasks[15] == 'on' ? 'on' : '') == 'on' ? 'checked' : '' }}>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="17">
|
||||
<td>TE11</td>
|
||||
<td>Inspeção Final</td>
|
||||
<td class="text-center">
|
||||
<input type="hidden" name="ordemTasks[17]"
|
||||
value="off">
|
||||
<!-- se não marcado, o valor será 'off' -->
|
||||
<input type="checkbox" name="ordemTasks[17]"
|
||||
value="on"
|
||||
{{ old('ordemTasks[17]', isset($OrdemTasks[17]) && $OrdemTasks[17] == 'on' ? 'on' : '') == 'on' ? 'checked' : '' }}>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="21">
|
||||
<td>TE15</td>
|
||||
<td>Empancar (ISV)</td>
|
||||
<td class="text-center">
|
||||
<input type="hidden" name="ordemTasks[21]"
|
||||
value="off">
|
||||
<!-- se não marcado, o valor será 'off' -->
|
||||
<input type="checkbox" name="ordemTasks[21]"
|
||||
value="on"
|
||||
{{ old('ordemTasks[21]', isset($OrdemTasks[21]) && $OrdemTasks[21] == 'on' ? 'on' : '') == 'on' ? 'checked' : '' }}>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<button class="btn btn-outline-danger float-right mb-2 mr-2"
|
||||
type="submit">Atualizar</button>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
@livewire('articulado.additonal-task', ['equipment' => $dataEquipment], key($dataEquipment->equipment_id))
|
||||
|
||||
</div>
|
||||
{{-- ./description --}}
|
||||
</div>
|
||||
{{-- ./card-body --}}
|
||||
</div>
|
||||
{{-- ./Ambito ISV - Editar --}}
|
||||
|
||||
|
||||
</div>
|
||||
{{-- Editar --}}
|
||||
|
||||
{{-- Âmbito-ISV --}}
|
||||
<div class="card card-primary collapsed-card">
|
||||
|
||||
<div class="card-header clickable">
|
||||
<h3 class="card-title">Âmbito :
|
||||
{{ $receiveEquipmentWorkHistorys->equipmentAssociationAmbit->ambitsEquipment->ambits_description }}
|
||||
- Editar
|
||||
</h3>
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-tool collapse-button"
|
||||
data-card-widget="collapse"><i class="fas fa-plus"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
{{-- ./card-header --}}
|
||||
<div class="card-body">
|
||||
<div class="card ordemTasks-div">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Lista de Tarefas Elementares :
|
||||
{{ $receiveEquipmentWorkHistorys->equipmentAssociationAmbit->ambitsEquipment->ambits_description }}
|
||||
</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body p-0">
|
||||
|
||||
<table class="table table-sm ">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 10px">#</th>
|
||||
<th>Tarefas Elementares</th>
|
||||
<th class="text-center">Selecionar Tarefa
|
||||
</th>
|
||||
{{-- <th style="width: 40px">Inspecionar</th> --}}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>TE1</td>
|
||||
<td>Desmontar da linha</td>
|
||||
<td class="text-center">
|
||||
<input type="hidden" name="ordemTasks[18]"
|
||||
value="off">
|
||||
<<input type="checkbox" name="ordemTasks[18]"
|
||||
value="on"
|
||||
{{ array_key_exists(18, $OrdemTasks) ? 'checked' : '' }}>
|
||||
|
||||
</td>
|
||||
{{-- <td class="text-center">
|
||||
<input type="hidden" name="ordemTasks[18]" value="off">
|
||||
<input type="checkbox" name="ordemTasks[18]" value="on" {{ in_array(18, $OrdemTasks) ? 'checked' : '' }}>
|
||||
</td> --}}
|
||||
<!-- <td class="text-center">
|
||||
<input type="checkbox" name="">
|
||||
</td>-->
|
||||
</tr>
|
||||
<tr>
|
||||
<td>TE2</td>
|
||||
<td>Descontaminar</td>
|
||||
<td class="text-center">
|
||||
<input type="hidden" name="ordemTasks[2]"
|
||||
value="off">
|
||||
<input type="checkbox" name="ordemTasks[2]"
|
||||
value="on">
|
||||
</td>
|
||||
<!-- <td class="text-center">
|
||||
<input type="checkbox" name="">
|
||||
</td>-->
|
||||
</tr>
|
||||
<tr>
|
||||
<td>TE4(3)</td>
|
||||
<td>Abertura da válvula, análise e controle
|
||||
dos
|
||||
componentes</td>
|
||||
<td class="text-center">
|
||||
<input type="hidden" name="ordemTasks[7]"
|
||||
value="off">
|
||||
<input type="checkbox" name="ordemTasks[7]"
|
||||
value="on">
|
||||
</td>
|
||||
<!-- <td class="text-center">
|
||||
<input type="checkbox" name="">
|
||||
</td>-->
|
||||
</tr>
|
||||
<tr>
|
||||
<td>TE5</td>
|
||||
<td>Limpeza e lavagem dos componentes</td>
|
||||
<td class="text-center">
|
||||
<input type="hidden" name="ordemTasks[8]"
|
||||
value="off">
|
||||
<input type="checkbox" name="ordemTasks[8]"
|
||||
value="on">
|
||||
</td>
|
||||
<!-- <td class="text-center">
|
||||
<input type="checkbox" name="">
|
||||
</td>-->
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>TE7(3)</td>
|
||||
<td>Fecho da válvula e substituição de
|
||||
componentes </td>
|
||||
<td class="text-center">
|
||||
<input type="hidden" name="ordemTasks[12]"
|
||||
value="off">
|
||||
<input type="checkbox" name="ordemTasks[12]"
|
||||
value="on">
|
||||
</td>
|
||||
<!-- <td class="text-center">
|
||||
<input type="checkbox" name="">
|
||||
</td>-->
|
||||
</tr>
|
||||
<tr>
|
||||
<td>TE14</td>
|
||||
<td>Ensaio</td>
|
||||
<td class="text-center">
|
||||
<input type="hidden" name="ordemTasks[20]"
|
||||
value="off">
|
||||
<input type="checkbox" name="ordemTasks[20]"
|
||||
value="on">
|
||||
</td>
|
||||
<!-- <td class="text-center">
|
||||
<input type="checkbox" name="">
|
||||
</td>-->
|
||||
</tr>
|
||||
<tr>
|
||||
<td>TE9</td>
|
||||
<td>Pintura</td>
|
||||
<td class="text-center">
|
||||
<input type="hidden" name="ordemTasks[14]"
|
||||
value="off">
|
||||
<input type="checkbox" name="ordemTasks[14]"
|
||||
value="on">
|
||||
</td>
|
||||
<!-- <td class="text-center">
|
||||
<input type="checkbox" name="">
|
||||
</td>-->
|
||||
</tr>
|
||||
<tr>
|
||||
<td>TE10</td>
|
||||
<td>Montagem na linha</td>
|
||||
{{-- Apenas para ver se recebe um on ou off, o hidden serve para devolver valor se o checkbox não estiver a 'checked' --}}
|
||||
<td class="text-center">
|
||||
<input type="hidden" name="ordemTasks[15]"
|
||||
value="off">
|
||||
<input type="checkbox" name="ordemTasks[15]"
|
||||
value="on">
|
||||
</td>
|
||||
<!-- <td class="text-center">
|
||||
<input type="checkbox" name="">
|
||||
</td>-->
|
||||
</tr>
|
||||
<tr>
|
||||
<td>TE11</td>
|
||||
<td>Inspeção Final</td>
|
||||
<td class="text-center">
|
||||
<input type="hidden" name="ordemTasks[17]"
|
||||
value="off">
|
||||
<input type="checkbox" name="ordemTasks[17]"
|
||||
value="on">
|
||||
</td>
|
||||
<!-- <td class="text-center">
|
||||
<input type="checkbox" name="">
|
||||
</td>-->
|
||||
</tr>
|
||||
<tr>
|
||||
<td>TE15</td>
|
||||
<td>Empancar (ISV)</td>
|
||||
<td class="text-center">
|
||||
<input type="hidden" name="ordemTasks[21]"
|
||||
value="off">
|
||||
<input type="checkbox" name="ordemTasks[21]"
|
||||
value="on">
|
||||
</td>
|
||||
<!-- <td class="text-center">
|
||||
<input type="checkbox" name="">
|
||||
</td>-->
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
@livewire('articulado.additonal-task', ['equipment' => $dataEquipment], key($dataEquipment->equipment_id))
|
||||
|
||||
</div>
|
||||
{{-- ./description --}}
|
||||
</div>
|
||||
{{-- ./card-body --}}
|
||||
</div>
|
||||
{{-- Ambito ISV --}}
|
||||
|
||||
@endif
|
||||
|
||||
{{-- PSV --}}
|
||||
|
|
@ -2569,7 +2756,8 @@ class="form-control card_inputs" id="Crane"
|
|||
@csrf
|
||||
<div class="card-body">
|
||||
|
||||
<input type="hidden" name="equipmentID" value="{{ $dataEquipment->equipment_id}}">
|
||||
<input type="hidden" name="equipmentID"
|
||||
value="{{ $dataEquipment->equipment_id }}">
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
|
@ -3071,7 +3259,7 @@ class="form-control card_inputs" id="isolation"
|
|||
<tr id="24">
|
||||
<td>TE10.1</td>
|
||||
<td>Confirmação de ligação</td>
|
||||
<!-- Apenas para ver se recebe um on ou off, o hidden serve para devolver valor se o checkbox não estiver a 'checked' -->
|
||||
<!-- Apenas para ver se recebe um on ou off, o hidden serve para devolver valor se o checkbox não estiver a 'checked' -->
|
||||
<td class="text-center">
|
||||
<input type="hidden" name="ordemTasks[24]"
|
||||
value="off">
|
||||
|
|
|
|||
|
|
@ -1,3 +1,24 @@
|
|||
<div style="font-size: 14px">
|
||||
Footer content - <span class="pageNumber"></span> of <span class="totalPages"></span>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="container" >
|
||||
<div class="row">
|
||||
<div class="col-6 generated-at">
|
||||
Generated at: {{ \Carbon\Carbon::now()->addHour()->format('Y-m-d H:i:s') }}
|
||||
</div>
|
||||
|
||||
<div class="col-6 page-number">
|
||||
Page: 1
|
||||
|
||||
{{-- <script type="text/php">
|
||||
if (isset($pdf)) {
|
||||
$pdf->page_script(function($pageNumber, $pageCount, $pdf) {
|
||||
$text = "Page $pageNumber of $pageCount";
|
||||
$pdf->text(10, 820, $text);
|
||||
});
|
||||
}
|
||||
</script> --}}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,101 @@
|
|||
<div style="font-size: 14px">
|
||||
<img src="data:image/png;base64,{{base64_encode(file_get_contents('http://place-hold.it/100x100?text=ISPT4.0'))}}"
|
||||
</div>
|
||||
{{-- <div style="display: flex; align-items: center; font-size: 14px;">
|
||||
<!-- Logo -->
|
||||
<div style="flex: 0 0 auto; margin-right: 20px;">
|
||||
<img src="data:image/png;base64,{{ base64_encode(file_get_contents('http://place-hold.it/50x50?text=Logo+4.0')) }}" alt="Logo 4.0" style="width: 50px; height: 50px;">
|
||||
</div>
|
||||
|
||||
<!-- Relatório de Dados -->
|
||||
<div style="flex: 1; text-align: left;">
|
||||
<p style="margin: 0;"><strong>Tag:</strong> {{ $tag ?? 'N/A' }}</p>
|
||||
<p style="margin: 0;"><strong>Número Panini:</strong> {{ $numeroPanini ?? 'N/A' }}</p>
|
||||
<p style="margin: 0;"><strong>N. Obra:</strong> {{ $nObra ?? 'N/A' }}</p>
|
||||
<p style="margin: 0;"><strong>Âmbito:</strong> {{ $ambito ?? 'N/A' }}</p>
|
||||
</div>
|
||||
</div> --}}
|
||||
|
||||
|
||||
{{-- <div class="container">
|
||||
<!-- Logo -->
|
||||
<div class="row" style="background-color: blue;">
|
||||
<!-- Imagem no extremo esquerdo -->
|
||||
<div class="col-sm d-flex justify-content-start">
|
||||
<img src="data:image/png;base64,{{ base64_encode(file_get_contents('http://place-hold.it/50x50?text=Logo+4.0')) }}"
|
||||
alt="Logo 4.0" class="img-fluid">
|
||||
</div>
|
||||
|
||||
<!-- Imagem no extremo direito -->
|
||||
<div class="col-sm d-flex justify-content-end">
|
||||
<img src="data:image/png;base64,{{ base64_encode(file_get_contents('http://place-hold.it/50x50?text=Logo+4.0')) }}"
|
||||
alt="Logo 4.0" class="img-fluid">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Relatório de Dados -->
|
||||
<div style="border-style: groove;">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
<p class="mb-0" style="border-style: double;"><strong>Tag:</strong> {{ $tag ?? 'N/A' }}</p>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<p class="mb-0" style="border-style: double;"><strong>Número Panini:</strong> {{ $numeroPanini ?? 'N/A' }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
<p class="mb-0" style="border-style: double;"><strong>N. Obra:</strong> {{ $nObra ?? 'N/A' }}</p>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<p class="mb-0" style="border-style: double;"><strong>Âmbito:</strong> {{ $ambito ?? 'N/A' }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> --}}
|
||||
|
||||
<div class="container">
|
||||
<!-- Logo -->
|
||||
<div class="row" style="height: 70px;margin-bottom : 15px;">
|
||||
<!-- Imagem no extremo esquerdo -->
|
||||
<div class="col d-flex justify-content-start align-items-center" style="height: 100%;">
|
||||
<img src="data:image/png;base64,{{ base64_encode(file_get_contents('http://place-hold.it/50x50?text=Logo+4.0')) }}"
|
||||
alt="Logo 4.0" class="img-fluid">
|
||||
</div>
|
||||
|
||||
<!-- Imagem no extremo direito -->
|
||||
<div class="col d-flex justify-content-end align-items-center" style="height: 100%;">
|
||||
<img src="data:image/png;base64,{{ base64_encode(file_get_contents('http://place-hold.it/50x50?text=Logo+4.0')) }}"
|
||||
alt="Logo 4.0" class="img-fluid">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Relatório de Dados -->
|
||||
<div class="row" style="margin-left: 2px;" >
|
||||
|
||||
<div class="row">
|
||||
<!-- Defina uma altura fixa para a linha do relatório -->
|
||||
|
||||
<div class="col-sm">
|
||||
<p class="mb-0" style="border-style: double;"><strong>Tag:</strong> {{ $tag ?? 'N/A' }}</p>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<p class="mb-0" style="border-style: double;"><strong>Número Panini:</strong>
|
||||
{{ $numeroPanini ?? 'N/A' }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
<p class="mb-0" style="border-style: double;"><strong>N. Obra:</strong> {{ $nObra ?? 'N/A' }}</p>
|
||||
</div>
|
||||
<div class="col-sm" ">
|
||||
<p class="mb-0" style="border-style: double;"><strong>Âmbito:</strong> {{ $ambito ?? 'N/A' }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<x-pdf-layout>
|
||||
{{-- <x-pdf-layout>
|
||||
|
||||
<h1>{{ $card1 }}</h1>
|
||||
<p>
|
||||
|
|
@ -12,4 +12,419 @@
|
|||
<p>
|
||||
Lorem ipsum dolor sit amet consectetur adipisicing elit. Ipsum tenetur, asperiores cum laudantium tempore illum ducimus rem veniam officia. Dolorum quam sequi dolores earum architecto nemo temporibus, voluptatibus repudiandae tempora.
|
||||
</p>
|
||||
</x-pdf-layout>
|
||||
</x-pdf-layout> --}}
|
||||
|
||||
|
||||
{{--
|
||||
<x-pdf-layout :tag="$tag" :numeroPanini="$numeroPanini" :nObra="$nObra" :ambito="$ambito">
|
||||
<h1>{{ $card1 }}</h1>
|
||||
<p>
|
||||
ISPT4.0 Lorem ipsum dolor sit, amet consectetur adipisicing elit. Facere consequatur perferendis culpa vel magnam enim doloremque eveniet. Repudiandae quisquam earum, provident sapiente sint iure sequi delectus rerum, odit iste a?
|
||||
</p>
|
||||
|
||||
<div class="page-break"></div>
|
||||
|
||||
<h1>Card 2</h1>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet consectetur adipisicing elit. Ipsum tenetur, asperiores cum laudantium tempore illum ducimus rem veniam officia. Dolorum quam sequi dolores earum architecto nemo temporibus, voluptatibus repudiandae tempora.
|
||||
</p>
|
||||
</x-pdf-layout> --}}
|
||||
|
||||
<x-pdf-layout :tag="$tag" :numeroPanini="$numeroPanini" :nObra="$nObra" :ambito="$ambito">
|
||||
|
||||
<div class="card card-danger" style="border-style: double;">
|
||||
<!-- Card-header TE3 - Pré-teste-->
|
||||
<div class="card-header clickable" style="background-color: #09255C">
|
||||
<div class="d-flex justify-content-between align-items-center" style="width: 100%;">
|
||||
<h3 class="card-title mb-0" style="color: white">
|
||||
|
||||
PSV - Pré-teste</h3>
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-tool collapse-button" data-card-widget="collapse">
|
||||
<i class="fas fa-plus"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Card-header TE3 - Pré-teste-->
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
<div class="form-group"> <!-- Single form-group for all content -->
|
||||
|
||||
<div class="row">
|
||||
|
||||
<!-- First card column -->
|
||||
<div class="col-md">
|
||||
|
||||
<!-- Validar especificações técnicas -->
|
||||
<div class="row mb">
|
||||
|
||||
|
||||
<div class="icheck-primary">
|
||||
<input id="ID3[validate-technical-specifications]" type="checkbox"
|
||||
name="ID3[validate-technical-specifications-checkbox]" value="on" checked>
|
||||
|
||||
<label for="ID3[validate-technical-specifications]">
|
||||
Validar especificações técnicas
|
||||
<span style="color: red;">*</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ./ Validar especificações técnicas -->
|
||||
|
||||
<!-- Especificações técnicas -->
|
||||
|
||||
<!-- ./ Especificações técnicas -->
|
||||
|
||||
<!-- Data de pré-teste -->
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-4 d-flex align-items-center">
|
||||
<label>Data de calibração</label>
|
||||
<span style="color: red;">*</span></label>
|
||||
<span style="color: red;">*</span></label>
|
||||
</div>
|
||||
<div class="col-md-8 d-flex align-items-center">
|
||||
<div class="input-group date" id="reservationdate" data-target-input="nearest">
|
||||
<input name="ID3[pre_test_data-datetime]" type="datetime-local"
|
||||
class="form-control float-right">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ./ Data de pré-teste -->
|
||||
|
||||
<!-- API RP 576 -->
|
||||
<div class="row mb-3">
|
||||
<div class="col-md d-flex align-items-center">
|
||||
<label for="apirp576-select">Pré-teste efetuado de acordo
|
||||
com o API RP 576</label>
|
||||
</div>
|
||||
<div class="col-md">
|
||||
<select id="apirp576-select" name="ID3[apirp576-select]" class="form-control">
|
||||
<option value="yes">
|
||||
Sim</option>
|
||||
<option value="no">
|
||||
Não</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ./ API RP 576 -->
|
||||
|
||||
<!-- Pré-teste em bancada -->
|
||||
<div class="row mb-3">
|
||||
<div class="col-md d-flex align-items-center">
|
||||
<label for="bench-pretest-select">
|
||||
Foi efetuado o pré-teste em bancada <span style="color: red;">*</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<select id="bench-pretest-select" name="ID3[bench_pretest-select]" class="form-control">
|
||||
<option value="yes">
|
||||
Sim</option>
|
||||
<option value="no">
|
||||
Não</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ./ Pré-teste em bancada -->
|
||||
|
||||
<!-- Conforme recebida da unidade -->
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-9 d-flex align-items-center">
|
||||
<label for="unit-received-select">Conforme recebida da unidade</label>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<select id="unit-received-select" name="ID3[unit_received-select]" class="form-control">
|
||||
<option value="yes">
|
||||
Sim</option>
|
||||
<option value="no">
|
||||
Não</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ./ Conforme recebida da unidade -->
|
||||
|
||||
<!-- Após limpeza -->
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-9 d-flex align-items-center">
|
||||
<label for="after-cleaning-select">Após limpeza</label>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<select id="after-cleaning-select" name="ID3[after_cleaning-select]"
|
||||
class="form-control">
|
||||
<option value="yes">
|
||||
Sim</option>
|
||||
<option value="no">
|
||||
Não</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ./ Após limpeza -->
|
||||
|
||||
<!-- Apresenta fuga -->
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-9 d-flex align-items-center">
|
||||
<label for="shows-leak-select">Apresenta fuga</label>
|
||||
<i class="fas fa-info-circle ml-2" style="color: #9B9B9B;" data-toggle="tooltip"
|
||||
title="Considera-se com fuga no teste de 'POP', em bancada ou na instalação, quando o início da passagem é inferior a 90% relativamente ao 'set pressure', (95% para válvulas pilotadas). Para testes de inspeção visual considera-se com fuga se houver evidência de danos excessivos ou cortes nas faces de vedação"></i>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<select id="shows-leak-select" name="ID3[shows_leak-select]" class="form-control">
|
||||
<option value="yes">
|
||||
Sim</option>
|
||||
<option value="no">
|
||||
Não</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ./ Apresenta fuga -->
|
||||
</div>
|
||||
<!-- ./First card column -->
|
||||
|
||||
<!-- Second card column -->
|
||||
<div class="col-md">
|
||||
|
||||
<!-- Pressão a que se inicia a passagem (bar) -->
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-7">
|
||||
<label>Pressão a que se inicia a passagem (bar) <span
|
||||
style="color: red;">*</span></label>
|
||||
</div>
|
||||
<div class="col-md-5 d-flex align-items-center">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- ./ Pressão a que se inicia a passagem (bar) -->
|
||||
|
||||
<!-- Pressão a que volta a fechar "assentar" (bar) -->
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-7">
|
||||
<label>Pressão a que volta a fechar "assentar" (bar) <span
|
||||
style="color: red;">*</span></label>
|
||||
</div>
|
||||
<div class="col-md-5 d-flex align-items-center">
|
||||
<input id="pressure-flow-stops" name="ID3[pressure_flow_stops-number]" type="number"
|
||||
step="0.01" class="form-control" style="width: 100%;">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ./ Pressão a que volta a fechar "assentar" (bar) -->
|
||||
|
||||
<!-- Pressão de abertura POP (bar) -->
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-7">
|
||||
<label>Pressão de abertura POP (bar) <span style="color: red;">*</span></label>
|
||||
</div>
|
||||
<div class="col-md-5 d-flex align-items-center">
|
||||
<input id="POP_opening_pressure" name="ID3[POP_opening_pressure-number]"
|
||||
type="number" step="0.01" class="form-control" style="width: 100%;">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ./ Pressão de abertura POP (bar) -->
|
||||
|
||||
<!-- A válvula está colada -->
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-9 d-flex align-items-center">
|
||||
<label for="stuck-valve-select">
|
||||
A válvula está colada <span style="color: red;">*</span>
|
||||
</label>
|
||||
<i class="fas fa-info-circle ml-2" style="color: #9B9B9B;" data-toggle="tooltip"
|
||||
title="Considera-se válvula colada quando se eleva a pressão até 30% da Pressão de Teste e não abre"></i>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<select id="stuck_valve-select" name="ID3[stuck_valve-select]" class="form-control">
|
||||
<option value="yes">
|
||||
Sim</option>
|
||||
<option value="no">
|
||||
Não</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ./ A válvula está colada -->
|
||||
|
||||
<!-- Indicar se a válvula volta a assentar durante o teste -->
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-7 d-flex align-items-center">
|
||||
<label for="valve-reseats-select">
|
||||
Indicar se a válvula volta a assentar durante o teste
|
||||
<span style="color: red;">*</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<select id="valve_reseats-select" name="ID3[valve_reseats-select]"
|
||||
class="form-control">
|
||||
<option value="yes">
|
||||
Sim</option>
|
||||
<option value="no">
|
||||
Não</option>
|
||||
<option value="not applicable">
|
||||
Não aplicável</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ./ Indicar se a válvula volta a assentar durante o teste -->
|
||||
|
||||
<!-- Reparada -->
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-8 d-flex align-items-center">
|
||||
<label for="repaired-select">
|
||||
Reparada <span style="color: red;">*</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<select id="repaired-select" name="ID3[repaired-select]" class="form-control">
|
||||
<option value="yes">
|
||||
Sim</option>
|
||||
<option value="no">
|
||||
Não</option>
|
||||
<option value="new">
|
||||
Nova</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ./ Reparada -->
|
||||
|
||||
<!-- Resultado do pré-teste -->
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-8 d-flex align-items-center">
|
||||
<label for="pre-test-result-select">
|
||||
Resultado do pré-teste
|
||||
<span style="color: red;">*</span>
|
||||
</label>
|
||||
<i class="fas fa-info-circle ml-2" style="color: #9B9B9B;" data-toggle="tooltip"
|
||||
title="Considera-se que passou o teste de 'POP', em bancada ou na instalação, quando a abertura se dá num intervalo de 30% relativamente ao 'set pressure'. Para testes de inspeção visual considera-se que passou se não houver evidências de mola danificada, corrosão excessiva e/ou gripagem das peças móveis (haste/guia/obturador)."></i>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<select id="pre_test_result-select" name="ID3[pre_test_result-select]"
|
||||
class="form-control" X>
|
||||
<option value="passed" X>
|
||||
Passou</option>
|
||||
<option value="plunked">
|
||||
Chumbou</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ./ Resultado do pré-teste -->
|
||||
|
||||
<!-- Resumo -->
|
||||
<label>Resumo</label>
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 50%">Falha ao abrir</th>
|
||||
<th style="width: 50%">Falha de estanquicidade (Fuga)
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<!-- FTO -->
|
||||
<div class="icheck-primary d-inline mr-2">
|
||||
<input type="radio" class="toggle-radio" id="fto-lpv-fto"
|
||||
name="fto_lpv-select" checked>
|
||||
<label value="FTO" for="fto-lpv-fto">
|
||||
Preso ou Falha a Abrir (FTO)
|
||||
<span style="color: red;">*</span>
|
||||
</label>
|
||||
</div>
|
||||
<!-- ./ FTO -->
|
||||
</td>
|
||||
<td>
|
||||
<!-- LPV -->
|
||||
<div class="icheck-primary d-inline mr-2">
|
||||
<input type="radio" class="toggle-radio" id="fto-lpv-lpv"
|
||||
name="fto_lpv-select">
|
||||
<label value="FTO" for="fto-lpv-lpv">
|
||||
Fuga Superior à Permitida (LPV)
|
||||
<span style="color: red;">**</span>
|
||||
</label>
|
||||
</div>
|
||||
<!-- ./ LPV -->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<!-- VPO -->
|
||||
<div class="icheck-primary d-inline mr-2">
|
||||
<input type="radio" class="toggle-radio" id="vpo-spo-vpo"
|
||||
name="vpo_spo-select">
|
||||
<label value="VPO" for="vpo-spo-vpo">
|
||||
Válvula Parcialmente Aberta (VPO)
|
||||
<span style="color: red;">*</span>
|
||||
</label>
|
||||
</div>
|
||||
<!-- ./ VPO -->
|
||||
</td>
|
||||
<td>
|
||||
<!-- SPO -->
|
||||
<div class="icheck-primary d-inline mr-2">
|
||||
<input type="radio" class="toggle-radio" id="vpo-spo-spo"
|
||||
name="vpo_spo-select">
|
||||
<label value="SPO" for="vpo-spo-spo">
|
||||
Abre Antes da Pressão de Teste (SPO)
|
||||
<span style="color: red;">**</span>
|
||||
</label>
|
||||
</div>
|
||||
<!-- ./ SPO -->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<!-- OASP -->
|
||||
<div class="icheck-primary d-inline mr-2">
|
||||
<input type="radio" class="toggle-radio" id="oasp-vso-oasp"
|
||||
name="oasp_vso-select">
|
||||
<label value="OASP" for="oasp-vso-oasp">
|
||||
Abre Acima da Pressão de Teste (OASP)
|
||||
<span style="color: red;">*</span></label>
|
||||
|
||||
</div>
|
||||
<!-- ./ OASP -->
|
||||
</td>
|
||||
<td>
|
||||
<!-- VSO -->
|
||||
<div class="icheck-primary d-inline mr-2">
|
||||
<input type="radio" class="toggle-radio" id="oasp-vso-vso"
|
||||
name="oasp_vso-select">
|
||||
<label value="VSO" for="oasp-vso-vso">Válvula
|
||||
Colada
|
||||
(VSO)
|
||||
<span style="color: red;">**</span></label>
|
||||
</div>
|
||||
<!-- ./ VSO -->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- ./Resumo -->
|
||||
|
||||
</div>
|
||||
<!-- ./ Second card column -->
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div> <!-- End of single form-group -->
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br><br><br><br>
|
||||
|
||||
@if (isset($imagesBase64) && is_array($imagesBase64))
|
||||
<div class="row no-gutters">
|
||||
@foreach ($imagesBase64 as $image)
|
||||
<div class="col-4">
|
||||
<img src="{{ $image }}" alt="Image" class="pdf-image" style="border: 3px solid #00B0EA">
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</x-pdf-layout>
|
||||
|
|
|
|||
|
|
@ -740,7 +740,8 @@ class="btn btn-primary float-right">Guardar</button>
|
|||
<!-- Data de pré-teste -->
|
||||
<div class="row mb">
|
||||
<div class="col-md-3 d-flex align-items-center">
|
||||
<label>Data de pré-teste</label>
|
||||
<label>Data de calibração</label>
|
||||
<span style="color: red;">*</span></label>
|
||||
</div>
|
||||
<div class="col-md-9 d-flex align-items-center">
|
||||
<div class="input-group date" id="reservationdate"
|
||||
|
|
@ -1216,7 +1217,8 @@ class="btn btn-primary float-right">Guardar</button>
|
|||
<!-- Data de pré-teste -->
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-3 d-flex align-items-center">
|
||||
<label>Data de pré-teste</label>
|
||||
<label>Data de calibração</label>
|
||||
<span style="color: red;">*</span></label>
|
||||
</div>
|
||||
<div class="col-md-9 d-flex align-items-center">
|
||||
<div class="input-group date" id="reservationdate"
|
||||
|
|
@ -5088,7 +5090,8 @@ class="btn btn-primary float-right">Guardar</button>
|
|||
<!-- Data calibração -->
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-6">
|
||||
<label>Data de pré-teste</label>
|
||||
<label>Data de calibração</label>
|
||||
<span style="color: red;">*</span></label>
|
||||
</div>
|
||||
<div class="col-md-6 ">
|
||||
<div class="input-group date" id="reservationdate"
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -138,7 +138,8 @@
|
|||
<!-- Data de pré-teste -->
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-3 d-flex align-items-center">
|
||||
<label>Data de pré-teste</label>
|
||||
<label>Data de calibração</label>
|
||||
<span style="color: red;">*</span></label>
|
||||
</div>
|
||||
<div class="col-md-9 d-flex align-items-center">
|
||||
<div class="input-group date"
|
||||
|
|
@ -662,7 +663,8 @@
|
|||
<!-- Data de pré-teste -->
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-3 d-flex align-items-center">
|
||||
<label>Data de pré-teste</label>
|
||||
<label>Data de calibração</label>
|
||||
<span style="color: red;">*</span></label>
|
||||
</div>
|
||||
<div class="col-md-9 d-flex align-items-center">
|
||||
<div class="input-group date"
|
||||
|
|
@ -3620,6 +3622,7 @@
|
|||
<div class="row mb-3">
|
||||
<div class="col-md-3 d-flex align-items-center">
|
||||
<label>Data de calibração</label>
|
||||
<span style="color: red;">*</span></label>
|
||||
</div>
|
||||
<div class="col-md-9 d-flex align-items-center">
|
||||
<div class="input-group date" id="calibrationdate"
|
||||
|
|
|
|||
|
|
@ -683,7 +683,8 @@ class="btn btn-primary float-right">Guardar</button>
|
|||
<!-- Data de pré-teste -->
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-3 d-flex align-items-center">
|
||||
<label>Data de pré-teste</label>
|
||||
<label>Data de calibração</label>
|
||||
<span style="color: red;">*</span></label>
|
||||
</div>
|
||||
<div class="col-md-9 d-flex align-items-center">
|
||||
<div class="input-group date" id="reservationdate"
|
||||
|
|
@ -1088,7 +1089,8 @@ class="btn btn-primary float-right">Guardar</button>
|
|||
<!-- Data de pré-teste -->
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-3 d-flex align-items-center">
|
||||
<label>Data de pré-teste</label>
|
||||
<label>Data de calibração</label>
|
||||
<span style="color: red;">*</span></label>
|
||||
</div>
|
||||
<div class="col-md-9 d-flex align-items-center">
|
||||
<div class="input-group date" id="reservationdate"
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -33,6 +33,7 @@
|
|||
use App\Http\Controllers\WorkstationsJobsController;
|
||||
use App\Http\Controllers\LanguageController;
|
||||
use Spatie\Browsershot\Browsershot;
|
||||
|
||||
// use Illuminate\Http\Response;
|
||||
|
||||
|
||||
|
|
@ -85,21 +86,92 @@
|
|||
Route::get('getDataEquipment', [ExecutionProjectController::class, 'getDataEquipment'])->name('getDataEquipment');
|
||||
Route::get('getDetailsEquipmentQrcode', [ExecutionProjectController::class, 'getDetailsEquipmentQrcode'])->name('getDetailsEquipmentQrcode');
|
||||
|
||||
Route::get('teste', function () {
|
||||
|
||||
// return (new PdfWrapper)
|
||||
// ->loadView('projectsClients.pdf.testePdf', [
|
||||
// 'card1' => 'Teste cartão 1'
|
||||
// ])
|
||||
// ->download('ispt40.pdf');
|
||||
// Route::get('teste1', function () {
|
||||
|
||||
// return (new PdfWrapper)
|
||||
// ->loadView('projectsClients.pdf.testePdf', [
|
||||
// 'card1' => 'Teste cartão 1'
|
||||
// ])
|
||||
// ->download('ispt40.pdf');
|
||||
|
||||
// // return (new PdfWrapper)
|
||||
// // ->loadUrl('https://www.google.pt')
|
||||
// // ->download('ispt40.pdf');
|
||||
|
||||
// });
|
||||
|
||||
// Route::get('teste1', function () {
|
||||
// return (new App\Services\PdfWrapper)
|
||||
// ->loadView('projectsClients.pdf.testePdf', [
|
||||
// 'card1' => 'Teste cartão 1',
|
||||
// 'tag' => 'TAG123',
|
||||
// 'numeroPanini' => 'PANINI456',
|
||||
// 'nObra' => 'OBRA789',
|
||||
// 'ambito' => 'Some Ambito'
|
||||
// ])
|
||||
// ->stream('ispt40.pdf');
|
||||
// });
|
||||
|
||||
|
||||
// Route::get('teste1', function () {
|
||||
// $imagePaths = [
|
||||
// 'receiveImagesControlEquipmentWorkstation/1897_3781/img1.png',
|
||||
// 'receiveImagesControlEquipmentWorkstation/1897_3781/img2.png',
|
||||
// 'receiveImagesControlEquipmentWorkstation/1897_3781/img3.png'
|
||||
// ];
|
||||
|
||||
// return (new PdfWrapper)
|
||||
// ->loadView('projectsClients.pdf.testePdf', [
|
||||
// 'card1' => 'Teste cartão 1',
|
||||
// 'tag' => 'TAG123',
|
||||
// 'numeroPanini' => 'PANINI456',
|
||||
// 'nObra' => 'OBRA789',
|
||||
// 'ambito' => 'Some Ambito',
|
||||
// 'imagePaths' => $imagePaths // Passa os caminhos das imagens para a view
|
||||
// ])
|
||||
// ->stream('ispt40.pdf');
|
||||
// });
|
||||
|
||||
Route::get('teste1', function () {
|
||||
$imagePaths = [
|
||||
// 'receiveImagesControlEquipmentWorkstation/1897_3781/img1.png',
|
||||
// 'receiveImagesControlEquipmentWorkstation/1897_3781/img2.png',
|
||||
// 'receiveImagesControlEquipmentWorkstation/1897_3781/img3.png'
|
||||
|
||||
'receiveImagesControlEquipmentWorkstation/1926_3781/img1.png',
|
||||
'receiveImagesControlEquipmentWorkstation/1926_3781/img2.png',
|
||||
'receiveImagesControlEquipmentWorkstation/1926_3781/img3.png',
|
||||
|
||||
];
|
||||
|
||||
return (new PdfWrapper)
|
||||
->loadUrl('https://www.google.pt')
|
||||
->download('ispt40.pdf');
|
||||
|
||||
->loadView('projectsClients.pdf.testePdf', [
|
||||
'card1' => 'Teste cartão 1',
|
||||
'tag' => 'TAG123',
|
||||
'numeroPanini' => 'PANINI456',
|
||||
'nObra' => 'OBRA789',
|
||||
'ambito' => 'Some Ambito',
|
||||
'imagePaths' => $imagePaths // Passa os caminhos das imagens para a view
|
||||
])
|
||||
->stream('ispt40.pdf');
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
// Route::get('teste1', function () {
|
||||
|
||||
// return (new App\Services\PdfWrapper)
|
||||
// ->loadView('projectsClients.pdf.testePdf', [
|
||||
// 'card1' => 'Teste cartão 1'
|
||||
// ])
|
||||
// ->stream('ispt40.pdf');
|
||||
|
||||
// });
|
||||
|
||||
|
||||
|
||||
Route::post('deleteEquipmentInProject', [CreateProjectController::class, 'deleteEquipmentInProject'])->name('deleteEquipmentInProject');
|
||||
Route::post('changeAmbitEquipment', [CreateProjectController::class, 'changeAmbitEquipment'])->name('changeAmbitEquipment');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user