Updating the layout of portfolios, elementary tasks and the main layout structure, both for workstations and the administration panel
|
|
@ -19,6 +19,9 @@
|
||||||
use App\Services\PdfWrapper;
|
use App\Services\PdfWrapper;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
|
||||||
|
use ZipArchive;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
use Yajra\DataTables\Facades\DataTables;
|
use Yajra\DataTables\Facades\DataTables;
|
||||||
|
|
@ -43,6 +46,336 @@
|
||||||
class ProjectoDatacontroller extends Controller
|
class ProjectoDatacontroller extends Controller
|
||||||
{
|
{
|
||||||
|
|
||||||
|
public function DownloadAllPdfsWork(Request $request)
|
||||||
|
{
|
||||||
|
// Recuperar todos os equipamentos relacionados ao projeto
|
||||||
|
$detailsEquipments = Equipment::where("company_projects_id", $request->projectID)->get();
|
||||||
|
|
||||||
|
$receiveDetailsProject = CompanyProject::where('company_projects_id', $request->projectID)->first();
|
||||||
|
$files = [];
|
||||||
|
|
||||||
|
foreach ($detailsEquipments as $detailsEquipment) {
|
||||||
|
|
||||||
|
// Obter o histórico de trabalho do equipamento atual
|
||||||
|
$detailsEquipmentWorkHistory = EquipmentWorkHistory::where('equipment_id', $detailsEquipment->equipment_id)->first();
|
||||||
|
|
||||||
|
// Obter o âmbito associado ao histórico de trabalho do equipamento atual
|
||||||
|
$receiveAmbit = EquipmentAssociationAmbit::where('equipmentWorkHistorys_id', $detailsEquipmentWorkHistory->equipmentWorkHistorys_id)->first();
|
||||||
|
|
||||||
|
// Inicializa o array para armazenar os atributos específicos
|
||||||
|
$specificAttributesArray = [];
|
||||||
|
|
||||||
|
$receiveSpecificAttributes = SpecificAttributesEquipmentType::where('equipment_id', $detailsEquipment->equipment_id)->get();
|
||||||
|
$receiveAmbit = EquipmentAssociationAmbit::where('equipmentWorkHistorys_id', $detailsEquipmentWorkHistory->equipmentWorkHistorys_id)->first();
|
||||||
|
$receiveDetailsProject = CompanyProject::where('company_projects_id', $detailsEquipmentWorkHistory->company_projects_id)->first();
|
||||||
|
|
||||||
|
// Corre a coleção e preenche o array 'specificAttributesArray'
|
||||||
|
foreach ($receiveSpecificAttributes as $attribute) {
|
||||||
|
// Verifica se a relação com 'generalAttributesEquipment' existe para evitar erro
|
||||||
|
if (isset($attribute->generalAttributesEquipment)) {
|
||||||
|
$key = $attribute->general_attributes_equipment_id;
|
||||||
|
$description = $attribute->generalAttributesEquipment->general_attributes_equipment_description;
|
||||||
|
$value = $attribute->specific_attributes_value;
|
||||||
|
|
||||||
|
// Adiciona ao array temporário com a estrutura chave => [description, value]
|
||||||
|
$specificAttributesArray[$key] = [
|
||||||
|
'description' => $description,
|
||||||
|
'value' => $value
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Atribui o array de 'SpecificAttributes' ao modelo usando o método 'setAttribute'
|
||||||
|
$detailsEquipment->setAttribute('specificAttributes', $specificAttributesArray);
|
||||||
|
|
||||||
|
// Recebe apenas as tarefas já feitas
|
||||||
|
$completedTasksHistory = ControlEquipmentWorkstation::with('workstationsTaskAnswers', 'receiveImages')
|
||||||
|
->where('equipmentWorkHistorys_id', $detailsEquipmentWorkHistory->equipmentWorkHistorys_id)
|
||||||
|
->whereNotNull('entry_date')
|
||||||
|
->whereNotNull('departure_date')
|
||||||
|
->has('workstationsTaskAnswers')
|
||||||
|
->orderBy('elemental_tasks_id', 'asc')
|
||||||
|
->get();
|
||||||
|
|
||||||
|
|
||||||
|
// Verifica se a coleção tem registros
|
||||||
|
if ($completedTasksHistory->isNotEmpty()) {
|
||||||
|
// Obter a data mais antiga (primeira tarefa feita)
|
||||||
|
$oldestDate = $completedTasksHistory->min('departure_date');
|
||||||
|
|
||||||
|
// Obter a data mais recente (última tarefa feita)
|
||||||
|
$latestDate = $completedTasksHistory->max('departure_date');
|
||||||
|
|
||||||
|
// Formata as datas apenas para mostrar o dia
|
||||||
|
$startDate = \Carbon\Carbon::parse($oldestDate)->format('Y-m-d');
|
||||||
|
$endDate = \Carbon\Carbon::parse($latestDate)->format('Y-m-d');
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
// Caso não haja dados, defina datas nulas
|
||||||
|
$startDate = null;
|
||||||
|
$endDate = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Apos receber todas as tarefas deve verificar qual o ambito atual e comparar em qual ambito foram feitas as tarefas, ai sim verificar oque foi feito no Ambito antigo e oque foi feito no atual.
|
||||||
|
// histórico de âmbitos por time_change_ambit do mais antigo ao mais recente
|
||||||
|
$receiveAmbitHistory = HistoryOfEquipmentAmbitsInTheProject::where('equipmentWorkHistorys_id', $detailsEquipmentWorkHistory->equipmentWorkHistorys_id)
|
||||||
|
->orderBy('time_change_ambit', 'desc')
|
||||||
|
->get();
|
||||||
|
|
||||||
|
|
||||||
|
// Identifica o último âmbito (o mais recente)
|
||||||
|
$latestAmbitHistory = $receiveAmbitHistory->last();
|
||||||
|
|
||||||
|
// Separa as tarefas do histórico por âmbitos diferentes
|
||||||
|
$tasksByAmbit = $completedTasksHistory->groupBy('history_of_equipment_ambits_id');
|
||||||
|
|
||||||
|
|
||||||
|
//coleção para armazenar todas as tarefas, concluídas e não concluídas
|
||||||
|
$receiveAllTasksHistiory = collect();
|
||||||
|
$taskImages = [];
|
||||||
|
|
||||||
|
// Contador para a ordem dos âmbitos
|
||||||
|
$ambitCounter = 1;
|
||||||
|
|
||||||
|
|
||||||
|
// Itera sobre cada âmbito anterior
|
||||||
|
foreach ($receiveAmbitHistory as $index => $ambitHistory) {
|
||||||
|
|
||||||
|
$ambitId = $ambitHistory->history_of_equipment_ambits_id;
|
||||||
|
|
||||||
|
|
||||||
|
// Verifica se há tarefas associadas a esse âmbito
|
||||||
|
if ($tasksByAmbit->has($ambitId)) {
|
||||||
|
$tasksForAmbit = $tasksByAmbit->get($ambitId);
|
||||||
|
|
||||||
|
// Loop para associar a ultima tarefa feita de acordo com o ambito relacionado com ela.
|
||||||
|
foreach ($tasksForAmbit as $taskHistory) {
|
||||||
|
if ($ambitId == $latestAmbitHistory->history_of_equipment_ambits_id) {
|
||||||
|
|
||||||
|
// Se a tarefa pertence ao último âmbito (mais recente)
|
||||||
|
$taskHistory->cardTypeStyle = 'gray';
|
||||||
|
$taskHistory->typeStatusHistory = 'historic';
|
||||||
|
} else {
|
||||||
|
|
||||||
|
// Se a tarefa pertence a âmbitos anteriores
|
||||||
|
$taskHistory->cardTypeStyle = 'blue';
|
||||||
|
$taskHistory->AmbitHistoryTimeChange = $ambitHistory->time_change_ambit;
|
||||||
|
$taskHistory->AmbitHistoryOrder = $ambitCounter; // Adiciona o contador
|
||||||
|
$taskHistory->typeStatusHistory = 'historic';
|
||||||
|
|
||||||
|
// Adiciona AmbitName dinamicamente
|
||||||
|
if ($ambitHistory->AmbitsEquipment) {
|
||||||
|
$taskHistory->AmbitName = $ambitHistory->AmbitsEquipment->ambits_description;
|
||||||
|
} else {
|
||||||
|
$taskHistory->AmbitName = 'N/A'; // Defina 'N/A' ou outro valor se não houver AmbitsEquipment
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Verifica se há um comentário associado e adiciona ao taskHistory
|
||||||
|
if ($taskHistory->taskEquipmentComment) {
|
||||||
|
$taskHistory->taskComment = $taskHistory->taskEquipmentComment->task_comment;
|
||||||
|
}
|
||||||
|
|
||||||
|
// else {
|
||||||
|
// $taskHistory->taskComment = 'N/A'; // Ou qualquer outro valor padrão caso não tenha comentário
|
||||||
|
// }
|
||||||
|
|
||||||
|
//recebe os dados do id da workstations_task_answers_id, control_equipment_workstation_id e as respostar : answer_json
|
||||||
|
$workstationTaskAnswer = $taskHistory->workstationsTaskAnswers->first();
|
||||||
|
|
||||||
|
if ($workstationTaskAnswer && $workstationTaskAnswer->answer_json) {
|
||||||
|
$answersArray = json_decode($workstationTaskAnswer->answer_json, true);
|
||||||
|
$formattedAnswers = [];
|
||||||
|
foreach ($answersArray as $item) {
|
||||||
|
if (isset($item['question']) && isset($item['value'])) {
|
||||||
|
$formattedAnswers[$item['question']] = $item['value'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$taskHistory->formatted_answers = $formattedAnswers;
|
||||||
|
} else {
|
||||||
|
$taskHistory->formatted_answers = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($taskHistory->receiveImages) {
|
||||||
|
$imagePaths = $taskHistory->receiveImages->image_paths;
|
||||||
|
$taskImages[$taskHistory->control_equipment_workstation_id] = is_array($imagePaths) ? $imagePaths : json_decode($imagePaths, true);
|
||||||
|
} else {
|
||||||
|
$taskImages[$taskHistory->control_equipment_workstation_id] = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
$receiveAllTasksHistiory->push($taskHistory);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Incrementa o contador para o próximo âmbito
|
||||||
|
$ambitCounter++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Agrupa as tarefas concluídas por elemental_tasks_id e seleciona a mais recente por departure_date
|
||||||
|
$receiveAllTasksHistiory = $receiveAllTasksHistiory->groupBy(function ($item) {
|
||||||
|
return $item->elemental_tasks_id;
|
||||||
|
})->map(function ($group) {
|
||||||
|
return $group->sortByDesc('departure_date')->first();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// Define os caminhos das logos- Simbolo ISPT_4.0
|
||||||
|
// $defaultLogoPath = '/img/ispt/4.0/Ispt4.0_Símbolo_Fundo_Azul-Marinho@2x-100.jpg';
|
||||||
|
|
||||||
|
$defaultLogoPath = '/img/ispt/4.0/Ispt4.0_Símbolo_Fundo_Azul-Marinho@2x-8.png';
|
||||||
|
|
||||||
|
$isptLogoPath = '/img/ispt/ispt.jpg';
|
||||||
|
|
||||||
|
// Verifica se a logo do projeto está definida e não está vazia
|
||||||
|
$projectLogoPath = !empty($receiveDetailsProject->plant->company->project_logo) ? $receiveDetailsProject->plant->company->project_logo : $defaultLogoPath;
|
||||||
|
|
||||||
|
// Verifica se a logo da empresa está definida e não está vazia
|
||||||
|
if (!empty($receiveDetailsProject->plant->company->company_logo)) {
|
||||||
|
$companyLogoPath = '/companies_logo/' . $receiveDetailsProject->plant->company->company_logo;
|
||||||
|
} else {
|
||||||
|
$companyLogoPath = $defaultLogoPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Cria uma coleção para armazenar os históricos de âmbitos
|
||||||
|
$ambitHistories = collect();
|
||||||
|
|
||||||
|
// Itera sobre a coleção original $receiveAllTasksHistiory
|
||||||
|
foreach ($receiveAllTasksHistiory as $taskHistory) {
|
||||||
|
|
||||||
|
// Verifica se os campos AmbitHistoryTimeChange e AmbitHistoryOrder estão presentes
|
||||||
|
if (isset($taskHistory->AmbitHistoryTimeChange) && isset($taskHistory->AmbitHistoryOrder)) {
|
||||||
|
|
||||||
|
// Extrai apenas a data da coluna AmbitHistoryTimeChange
|
||||||
|
$ambitDate = \Carbon\Carbon::parse($taskHistory->AmbitHistoryTimeChange)->format('Y-m-d');
|
||||||
|
|
||||||
|
// Cria uma nova entrada com os valores desejados
|
||||||
|
$ambitHistories->push([
|
||||||
|
'AmbitHistoryOrder' => $taskHistory->AmbitHistoryOrder,
|
||||||
|
'AmbitName' => isset($taskHistory->AmbitName) ? $taskHistory->AmbitName : 'N/A',
|
||||||
|
'AmbitHistoryTimeChange' => $ambitDate
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Apos receber todas as tarefas deve verificar qual o ambito atual e comparar em qual ambito foram feitas as tarefas, ai sim verificar oque foi feito no Ambito antigo e oque foi feito no atual.
|
||||||
|
// histórico de âmbitos por time_change_ambit do mais antigo ao mais recente
|
||||||
|
$receiveAmbitHistory = HistoryOfEquipmentAmbitsInTheProject::where('equipmentWorkHistorys_id', $detailsEquipmentWorkHistory->equipmentWorkHistorys_id)
|
||||||
|
->orderBy('time_change_ambit', 'desc')
|
||||||
|
->get();
|
||||||
|
|
||||||
|
// Gerar o PDF individualmente usando a classe PdfWrapper
|
||||||
|
$pdfWrapper = new PdfWrapper();
|
||||||
|
|
||||||
|
$pdf = $pdfWrapper->loadView('projectsClients.pdf.testePdf', [
|
||||||
|
// 'detailsEquipment' => $detailsEquipment,
|
||||||
|
// 'detailsEquipmentWorkHistory' => $detailsEquipmentWorkHistory, // Incluindo a variável no PDF
|
||||||
|
// 'receiveDetailsProject' => $receiveDetailsProject,
|
||||||
|
// // ambitHistories
|
||||||
|
|
||||||
|
// 'ambito' => $receiveAmbit->ambitsEquipment->ambits_description ?? 'N/A', // Incluindo o âmbito associado
|
||||||
|
// // receiveAllTasksHistiory
|
||||||
|
// // taskImages
|
||||||
|
|
||||||
|
// 'projectLogoPath' => $projectLogoPath,
|
||||||
|
// 'companyLogoPath' => $companyLogoPath,
|
||||||
|
// 'isptLogoPath' => $isptLogoPath
|
||||||
|
|
||||||
|
|
||||||
|
'detailsEquipment' => $detailsEquipment,
|
||||||
|
'detailsEquipmentWorkHistory' => $detailsEquipmentWorkHistory,
|
||||||
|
'receiveDetailsProject' => $receiveDetailsProject,
|
||||||
|
'ambitHistories' => $ambitHistories,
|
||||||
|
'dataControlEquipment' => 'null',
|
||||||
|
|
||||||
|
'ambito' => $receiveAmbit->ambitsEquipment->ambits_description,
|
||||||
|
'recebeTasksForEquipment' => $receiveAllTasksHistiory,
|
||||||
|
'taskImages' => $taskImages,
|
||||||
|
'projectLogoPath' => $projectLogoPath,
|
||||||
|
'companyLogoPath' => $companyLogoPath,
|
||||||
|
'isptLogoPath' => $isptLogoPath,
|
||||||
|
|
||||||
|
'oldestDate' => $startDate, // Data mais antiga
|
||||||
|
'latestDate' => $endDate // Data mais recente
|
||||||
|
]);
|
||||||
|
|
||||||
|
// Definir o caminho para salvar o PDF
|
||||||
|
$filePath = 'temp/pdfs/Tag_' . $detailsEquipment->equipment_tag . '.pdf';
|
||||||
|
|
||||||
|
// Salvar o PDF no armazenamento local usando stream() com false para pegar o conteúdo
|
||||||
|
Storage::put($filePath, $pdf->stream('', ['Attachment' => false]));
|
||||||
|
|
||||||
|
// Adicionar o caminho do PDF na lista de arquivos
|
||||||
|
$files[] = storage_path('app/' . $filePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Gerar o arquivo ZIP com todos os PDFs
|
||||||
|
$zipFilePath = $this->createZipWithPdfs($files, 'Relatorios Pdf Obra_' . $receiveDetailsProject->company_project_description . '.zip');
|
||||||
|
|
||||||
|
// Retornar o arquivo ZIP para download
|
||||||
|
return response()->download($zipFilePath)->deleteFileAfterSend(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// public function createZipWithPdfs($files, $zipFileName)
|
||||||
|
// {
|
||||||
|
// $zip = new ZipArchive;
|
||||||
|
// $zipDir = storage_path('app/temp/zips/');
|
||||||
|
// // Verifique se o diretório existe, caso contrário, crie-o
|
||||||
|
// if (!is_dir($zipDir)) {
|
||||||
|
// mkdir($zipDir, 0777, true); // Cria o diretório com permissões de escrita
|
||||||
|
// }
|
||||||
|
// $zipPath = $zipDir . $zipFileName;
|
||||||
|
// if ($zip->open($zipPath, ZipArchive::CREATE) === TRUE) {
|
||||||
|
// foreach ($files as $file) {
|
||||||
|
// $fileName = basename($file); // Pega o nome do arquivo
|
||||||
|
// $zip->addFile($file, $fileName); // Adiciona o arquivo PDF ao ZIP
|
||||||
|
// }
|
||||||
|
// $zip->close();
|
||||||
|
// } else {
|
||||||
|
// throw new \Exception("Não foi possível criar o arquivo ZIP.");
|
||||||
|
// }
|
||||||
|
// return $zipPath; // Caminho para o ZIP gerado
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
public function createZipWithPdfs($files, $zipFileName)
|
||||||
|
{
|
||||||
|
$zip = new ZipArchive;
|
||||||
|
|
||||||
|
// Definir o caminho do diretório para armazenar o ZIP temporário
|
||||||
|
$zipDir = storage_path('app/temp/zips/');
|
||||||
|
|
||||||
|
// Garantir que o diretório "temp/zips" exista ou crie-o com permissões adequadas
|
||||||
|
if (!Storage::exists('temp/zips')) {
|
||||||
|
Storage::makeDirectory('temp/zips', 0777, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Definir o caminho completo para o arquivo ZIP
|
||||||
|
$zipPath = $zipDir . $zipFileName;
|
||||||
|
|
||||||
|
// Tentar abrir o arquivo ZIP, se falhar, lançar exceção
|
||||||
|
if ($zip->open($zipPath, ZipArchive::CREATE) === TRUE) {
|
||||||
|
foreach ($files as $file) {
|
||||||
|
// Pega o nome do arquivo
|
||||||
|
$fileName = basename($file);
|
||||||
|
// Adiciona o arquivo PDF ao ZIP
|
||||||
|
$zip->addFile($file, $fileName);
|
||||||
|
}
|
||||||
|
// Finaliza o ZIP
|
||||||
|
$zip->close();
|
||||||
|
} else {
|
||||||
|
throw new \Exception("Não foi possível criar o arquivo ZIP.");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retornar o caminho para o ZIP gerado
|
||||||
|
return $zipPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function completedEquipmentInProject(Request $request)
|
public function completedEquipmentInProject(Request $request)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
@ -96,36 +429,25 @@ public function createPDFforcompletedEquipment($equipmentId)
|
||||||
|
|
||||||
// Inicializa o array para armazenar os atributos específicos
|
// Inicializa o array para armazenar os atributos específicos
|
||||||
$specificAttributesArray = [];
|
$specificAttributesArray = [];
|
||||||
|
|
||||||
$receiveSpecificAttributes = SpecificAttributesEquipmentType::where('equipment_id', $detailsEquipment->equipment_id)->get();
|
|
||||||
$receiveAmbit = EquipmentAssociationAmbit::where('equipmentWorkHistorys_id', $detailsEquipmentWorkHistory->equipmentWorkHistorys_id)->first();
|
|
||||||
$receiveDetailsProject = CompanyProject::where('company_projects_id', $detailsEquipmentWorkHistory->company_projects_id)->first();
|
|
||||||
|
|
||||||
// Corre a coleção e preenche o array 'specificAttributesArray'
|
|
||||||
foreach ($receiveSpecificAttributes as $attribute) {
|
|
||||||
// Verifica se a relação com 'generalAttributesEquipment' existe para evitar erro
|
|
||||||
if (isset($attribute->generalAttributesEquipment)) {
|
|
||||||
$key = $attribute->general_attributes_equipment_id;
|
|
||||||
$description = $attribute->generalAttributesEquipment->general_attributes_equipment_description;
|
|
||||||
$value = $attribute->specific_attributes_value;
|
|
||||||
|
|
||||||
// Adiciona ao array temporário com a estrutura chave => [description, value]
|
|
||||||
$specificAttributesArray[$key] = [
|
|
||||||
'description' => $description,
|
|
||||||
'value' => $value
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Atribui o array de 'SpecificAttributes' ao modelo usando o método 'setAttribute'
|
// Atribui o array de 'SpecificAttributes' ao modelo usando o método 'setAttribute'
|
||||||
$detailsEquipment->setAttribute('specificAttributes', $specificAttributesArray);
|
$detailsEquipment->setAttribute('specificAttributes', $specificAttributesArray);
|
||||||
|
|
||||||
// Recebe apenas as tarefas já feitas
|
// Dados do Projecto atual
|
||||||
$completedTasksHistory = ControlEquipmentWorkstation::with('workstationsTaskAnswers', 'receiveImages')
|
$receiveDetailsProject = CompanyProject::where('company_projects_id', $detailsEquipmentWorkHistory->company_projects_id)->first();
|
||||||
|
|
||||||
|
$receiveAmbit = EquipmentAssociationAmbit::where('equipmentWorkHistorys_id', $detailsEquipmentWorkHistory->equipmentWorkHistorys_id)->first();
|
||||||
|
|
||||||
|
// Busca todas as tarefas do equipamento na ordem de execução - junta com as ordem de execussao das tarefas = completedTasksHistory
|
||||||
|
$receiveAllTasksEquipmentInHistory = OrderEquipmentTasks::where('equipmentWorkHistorys_id', $detailsEquipmentWorkHistory->equipmentWorkHistorys_id)
|
||||||
|
->orderBy('execution_order', 'asc')
|
||||||
|
->get();
|
||||||
|
|
||||||
|
// Recebe apenas as tarefas já feitas - collection
|
||||||
|
$completedTasksHistory = ControlEquipmentWorkstation::with('workstationsTaskAnswers')
|
||||||
->where('equipmentWorkHistorys_id', $detailsEquipmentWorkHistory->equipmentWorkHistorys_id)
|
->where('equipmentWorkHistorys_id', $detailsEquipmentWorkHistory->equipmentWorkHistorys_id)
|
||||||
->whereNotNull('entry_date')
|
->whereNotNull('entry_date')
|
||||||
->whereNotNull('departure_date')
|
->whereNotNull('departure_date')
|
||||||
->has('workstationsTaskAnswers')
|
->has('workstationsTaskAnswers') // Garante que haja pelo menos uma 'workstationsTaskAnswers' relacionada
|
||||||
->orderBy('elemental_tasks_id', 'asc')
|
->orderBy('elemental_tasks_id', 'asc')
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
|
|
@ -149,113 +471,63 @@ public function createPDFforcompletedEquipment($equipmentId)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Apos receber todas as tarefas deve verificar qual o ambito atual e comparar em qual ambito foram feitas as tarefas, ai sim verificar oque foi feito no Ambito antigo e oque foi feito no atual.
|
foreach ($completedTasksHistory as $taskHistory) {
|
||||||
// histórico de âmbitos por time_change_ambit do mais antigo ao mais recente
|
$taskHistory->cardTypeStyle = '#8CC084'; // Adiciona o campo 'cardTypeStyle'
|
||||||
$receiveAmbitHistory = HistoryOfEquipmentAmbitsInTheProject::where('equipmentWorkHistorys_id', $detailsEquipmentWorkHistory->equipmentWorkHistorys_id)
|
// $taskHistory->typeStatusHistory = 'historic'; -> verificar onde seria mais necessario criar esse atributo de historico
|
||||||
->orderBy('time_change_ambit', 'desc')
|
|
||||||
->get();
|
|
||||||
|
|
||||||
|
// Verifica se há um comentário associado e adiciona ao taskHistory
|
||||||
// Identifica o último âmbito (o mais recente)
|
if ($taskHistory->taskEquipmentComment) {
|
||||||
$latestAmbitHistory = $receiveAmbitHistory->last();
|
$taskHistory->taskComment = $taskHistory->taskEquipmentComment->task_comment;
|
||||||
|
|
||||||
// Separa as tarefas do histórico por âmbitos diferentes
|
|
||||||
$tasksByAmbit = $completedTasksHistory->groupBy('history_of_equipment_ambits_id');
|
|
||||||
|
|
||||||
|
|
||||||
//coleção para armazenar todas as tarefas, concluídas e não concluídas
|
|
||||||
$receiveAllTasksHistiory = collect();
|
|
||||||
$taskImages = [];
|
|
||||||
|
|
||||||
// Contador para a ordem dos âmbitos
|
|
||||||
$ambitCounter = 1;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Itera sobre cada âmbito anterior
|
|
||||||
foreach ($receiveAmbitHistory as $index => $ambitHistory) {
|
|
||||||
|
|
||||||
$ambitId = $ambitHistory->history_of_equipment_ambits_id;
|
|
||||||
|
|
||||||
|
|
||||||
// Verifica se há tarefas associadas a esse âmbito
|
|
||||||
if ($tasksByAmbit->has($ambitId)) {
|
|
||||||
$tasksForAmbit = $tasksByAmbit->get($ambitId);
|
|
||||||
|
|
||||||
// Loop para associar a ultima tarefa feita de acordo com o ambito relacionado com ela.
|
|
||||||
foreach ($tasksForAmbit as $taskHistory) {
|
|
||||||
if ($ambitId == $latestAmbitHistory->history_of_equipment_ambits_id) {
|
|
||||||
|
|
||||||
// Se a tarefa pertence ao último âmbito (mais recente)
|
|
||||||
$taskHistory->cardTypeStyle = 'gray';
|
|
||||||
$taskHistory->typeStatusHistory = 'historic';
|
|
||||||
} else {
|
|
||||||
|
|
||||||
// Se a tarefa pertence a âmbitos anteriores
|
|
||||||
$taskHistory->cardTypeStyle = 'blue';
|
|
||||||
$taskHistory->AmbitHistoryTimeChange = $ambitHistory->time_change_ambit;
|
|
||||||
$taskHistory->AmbitHistoryOrder = $ambitCounter; // Adiciona o contador
|
|
||||||
$taskHistory->typeStatusHistory = 'historic';
|
|
||||||
|
|
||||||
// Adiciona AmbitName dinamicamente
|
|
||||||
if ($ambitHistory->AmbitsEquipment) {
|
|
||||||
$taskHistory->AmbitName = $ambitHistory->AmbitsEquipment->ambits_description;
|
|
||||||
} else {
|
|
||||||
$taskHistory->AmbitName = 'N/A'; // Defina 'N/A' ou outro valor se não houver AmbitsEquipment
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Verifica se há um comentário associado e adiciona ao taskHistory
|
|
||||||
if ($taskHistory->taskEquipmentComment) {
|
|
||||||
$taskHistory->taskComment = $taskHistory->taskEquipmentComment->task_comment;
|
|
||||||
}
|
|
||||||
|
|
||||||
// else {
|
|
||||||
// $taskHistory->taskComment = 'N/A'; // Ou qualquer outro valor padrão caso não tenha comentário
|
|
||||||
// }
|
|
||||||
|
|
||||||
//recebe os dados do id da workstations_task_answers_id, control_equipment_workstation_id e as respostar : answer_json
|
|
||||||
$workstationTaskAnswer = $taskHistory->workstationsTaskAnswers->first();
|
|
||||||
|
|
||||||
if ($workstationTaskAnswer && $workstationTaskAnswer->answer_json) {
|
|
||||||
$answersArray = json_decode($workstationTaskAnswer->answer_json, true);
|
|
||||||
$formattedAnswers = [];
|
|
||||||
foreach ($answersArray as $item) {
|
|
||||||
if (isset($item['question']) && isset($item['value'])) {
|
|
||||||
$formattedAnswers[$item['question']] = $item['value'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$taskHistory->formatted_answers = $formattedAnswers;
|
|
||||||
} else {
|
|
||||||
$taskHistory->formatted_answers = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($taskHistory->receiveImages) {
|
|
||||||
$imagePaths = $taskHistory->receiveImages->image_paths;
|
|
||||||
$taskImages[$taskHistory->control_equipment_workstation_id] = is_array($imagePaths) ? $imagePaths : json_decode($imagePaths, true);
|
|
||||||
} else {
|
|
||||||
$taskImages[$taskHistory->control_equipment_workstation_id] = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
$receiveAllTasksHistiory->push($taskHistory);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Incrementa o contador para o próximo âmbito
|
// Obtém o primeiro registro de workstationsTaskAnswers ou define como null se não existir
|
||||||
$ambitCounter++;
|
$workstationTaskAnswer = $taskHistory->workstationsTaskAnswers->first();
|
||||||
|
|
||||||
|
if ($workstationTaskAnswer && $workstationTaskAnswer->answer_json) {
|
||||||
|
// Decodifica o JSON para um array
|
||||||
|
$answersArray = json_decode($workstationTaskAnswer->answer_json, true);
|
||||||
|
|
||||||
|
// Cria um array associativo onde as chaves são as perguntas e os valores são as respostas
|
||||||
|
$formattedAnswers = [];
|
||||||
|
foreach ($answersArray as $item) {
|
||||||
|
if (isset($item['question']) && isset($item['value'])) {
|
||||||
|
$formattedAnswers[$item['question']] = $item['value'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Atribui o array formatado ao taskHistory
|
||||||
|
$taskHistory->formatted_answers = $formattedAnswers;
|
||||||
|
} else {
|
||||||
|
// Se não houver respostas, define formatted_answers como um array vazio ou null
|
||||||
|
$taskHistory->formatted_answers = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Calcula o tempo de execução se as datas de entrada e saída nao forem nulas
|
||||||
|
if (!is_null($taskHistory->entry_date) && !is_null($taskHistory->departure_date)) {
|
||||||
|
|
||||||
|
$entryDate = \Carbon\Carbon::parse($taskHistory->entry_date);
|
||||||
|
$departureDate = \Carbon\Carbon::parse($taskHistory->departure_date);
|
||||||
|
|
||||||
|
$diffInMinutes = $entryDate->diffInMinutes($departureDate);
|
||||||
|
$diffInHours = $entryDate->diffInHours($departureDate);
|
||||||
|
$diffInDays = $entryDate->diffInDays($departureDate);
|
||||||
|
|
||||||
|
if ($diffInMinutes < 60) {
|
||||||
|
$taskHistory->runtime = $diffInMinutes . ' minutos';
|
||||||
|
} elseif ($diffInHours < 24) {
|
||||||
|
$taskHistory->runtime = $diffInHours . ' horas';
|
||||||
|
} else {
|
||||||
|
$remainingHours = $diffInHours % 24;
|
||||||
|
$taskHistory->runtime = $diffInDays . ' dias ' . $remainingHours . ' horas';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$taskHistory->runtime = 'N/A';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Agrupa as tarefas concluídas por elemental_tasks_id e seleciona a mais recente por departure_date
|
|
||||||
$receiveAllTasksHistiory = $receiveAllTasksHistiory->groupBy(function ($item) {
|
|
||||||
return $item->elemental_tasks_id;
|
|
||||||
})->map(function ($group) {
|
|
||||||
return $group->sortByDesc('departure_date')->first();
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// Define os caminhos das logos- Simbolo ISPT_4.0
|
// Define os caminhos das logos- Simbolo ISPT_4.0
|
||||||
// $defaultLogoPath = '/img/ispt/4.0/Ispt4.0_Símbolo_Fundo_Azul-Marinho@2x-100.jpg';
|
|
||||||
|
|
||||||
$defaultLogoPath = '/img/ispt/4.0/Ispt4.0_Símbolo_Fundo_Azul-Marinho@2x-8.png';
|
$defaultLogoPath = '/img/ispt/4.0/Ispt4.0_Símbolo_Fundo_Azul-Marinho@2x-8.png';
|
||||||
|
|
||||||
$isptLogoPath = '/img/ispt/ispt.jpg';
|
$isptLogoPath = '/img/ispt/ispt.jpg';
|
||||||
|
|
@ -269,33 +541,11 @@ public function createPDFforcompletedEquipment($equipmentId)
|
||||||
} else {
|
} else {
|
||||||
$companyLogoPath = $defaultLogoPath;
|
$companyLogoPath = $defaultLogoPath;
|
||||||
}
|
}
|
||||||
|
// dd($completedTasksHistory);
|
||||||
// Cria uma coleção para armazenar os históricos de âmbitos
|
|
||||||
$ambitHistories = collect();
|
|
||||||
|
|
||||||
// Itera sobre a coleção original $receiveAllTasksHistiory
|
|
||||||
foreach ($receiveAllTasksHistiory as $taskHistory) {
|
|
||||||
|
|
||||||
// Verifica se os campos AmbitHistoryTimeChange e AmbitHistoryOrder estão presentes
|
|
||||||
if (isset($taskHistory->AmbitHistoryTimeChange) && isset($taskHistory->AmbitHistoryOrder)) {
|
|
||||||
|
|
||||||
// Extrai apenas a data da coluna AmbitHistoryTimeChange
|
|
||||||
$ambitDate = \Carbon\Carbon::parse($taskHistory->AmbitHistoryTimeChange)->format('Y-m-d');
|
|
||||||
|
|
||||||
// Cria uma nova entrada com os valores desejados
|
|
||||||
$ambitHistories->push([
|
|
||||||
'AmbitHistoryOrder' => $taskHistory->AmbitHistoryOrder,
|
|
||||||
'AmbitName' => isset($taskHistory->AmbitName) ? $taskHistory->AmbitName : 'N/A',
|
|
||||||
'AmbitHistoryTimeChange' => $ambitDate
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// dd($receiveDetailsProject);
|
|
||||||
//Deve devolver com Observacoes se existir.
|
|
||||||
|
|
||||||
//Precisamos receber o Tipo de equipamento e detalhes da Obra, alem do atributos especificos de acordo com o tipo de equipamento.
|
//Precisamos receber o Tipo de equipamento e detalhes da Obra, alem do atributos especificos de acordo com o tipo de equipamento.
|
||||||
// Converte as imagens para base64 usando o serviço PdfWrapper
|
// Converte as imagens para base64 usando o serviço PdfWrapper
|
||||||
|
|
||||||
$pdfWrapper = new PdfWrapper();
|
$pdfWrapper = new PdfWrapper();
|
||||||
|
|
||||||
// Gera e retorna o PDF
|
// Gera e retorna o PDF
|
||||||
|
|
@ -304,18 +554,20 @@ public function createPDFforcompletedEquipment($equipmentId)
|
||||||
// ->setIncludePath('$PATH:/usr/bin')
|
// ->setIncludePath('$PATH:/usr/bin')
|
||||||
->loadView('projectsClients.pdf.testePdf', [
|
->loadView('projectsClients.pdf.testePdf', [
|
||||||
|
|
||||||
// 'tag' => $detailsEquipment->equipment_tag,
|
|
||||||
// 'numeroPanini' => $detailsEquipmentWorkHistory->ispt_number,
|
|
||||||
// 'nObra' => $receiveDetailsProject->project_company_name,
|
|
||||||
|
|
||||||
'detailsEquipment' => $detailsEquipment,
|
'detailsEquipment' => $detailsEquipment,
|
||||||
'detailsEquipmentWorkHistory' => $detailsEquipmentWorkHistory,
|
'detailsEquipmentWorkHistory' => $detailsEquipmentWorkHistory,
|
||||||
'receiveDetailsProject' => $receiveDetailsProject,
|
'receiveDetailsProject' => $receiveDetailsProject,
|
||||||
'ambitHistories' => $ambitHistories,
|
// 'ambitHistories' => $ambitHistories,
|
||||||
|
|
||||||
|
'dataControlEquipment' => [
|
||||||
|
'typePageForViewElementalTasks' => 'pdf'
|
||||||
|
],
|
||||||
|
|
||||||
'ambito' => $receiveAmbit->ambitsEquipment->ambits_description,
|
'ambito' => $receiveAmbit->ambitsEquipment->ambits_description,
|
||||||
'receiveAllTasksHistiory' => $receiveAllTasksHistiory,
|
'recebeTasksForEquipment' => $completedTasksHistory,
|
||||||
'taskImages' => $taskImages,
|
// 'taskImages' => $taskImages,
|
||||||
|
'taskImages' => '[]',
|
||||||
|
|
||||||
'projectLogoPath' => $projectLogoPath,
|
'projectLogoPath' => $projectLogoPath,
|
||||||
'companyLogoPath' => $companyLogoPath,
|
'companyLogoPath' => $companyLogoPath,
|
||||||
'isptLogoPath' => $isptLogoPath,
|
'isptLogoPath' => $isptLogoPath,
|
||||||
|
|
@ -327,6 +579,7 @@ public function createPDFforcompletedEquipment($equipmentId)
|
||||||
->stream('ispt40.pdf');
|
->stream('ispt40.pdf');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function viewProjectsList($orderProjectID)
|
public function viewProjectsList($orderProjectID)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
@ -438,50 +691,55 @@ public function checkProjectIsptNumber(Request $request, $projectId = null)
|
||||||
|
|
||||||
public function showAmbitDetailsProjectHistory($equipmentStatus, $projectID, $equipmentID)
|
public function showAmbitDetailsProjectHistory($equipmentStatus, $projectID, $equipmentID)
|
||||||
{
|
{
|
||||||
|
// Dados do Projecto atual
|
||||||
$detailsProject = CompanyProject::where('company_projects_id', $projectID)->first();
|
$detailsProject = CompanyProject::where('company_projects_id', $projectID)->first();
|
||||||
$detailsCliente = Plant::where('plant_id', $detailsProject->plant_id)->first();
|
|
||||||
$detailsProject->user_id = $detailsCliente->user_id;
|
|
||||||
|
|
||||||
|
//Detalhes do equipmento em relacao a obra atual
|
||||||
$detailsEquipmentWorkProject = EquipmentWorkHistory::where('equipment_id', $equipmentID)
|
$detailsEquipmentWorkProject = EquipmentWorkHistory::where('equipment_id', $equipmentID)
|
||||||
->where('company_projects_id', $projectID)->first();
|
->where('company_projects_id', $projectID)->first();
|
||||||
|
|
||||||
//Recebe os comentarios do equipamento
|
//Recebe os comentarios do equipamento, assim por ter ligacao com a Model 'User', para cada valor recebido no get(), consegue criar um novo atributo a collection $comment->type_user
|
||||||
$receiveComments = EquipmentComment::with(['user'])
|
$receiveComments = EquipmentComment::with(['user'])
|
||||||
->where('equipmentWorkHistorys_id', $detailsEquipmentWorkProject->equipmentWorkHistorys_id)
|
->where('equipmentWorkHistorys_id', $detailsEquipmentWorkProject->equipmentWorkHistorys_id)
|
||||||
->where('company_projects_id', $detailsProject->company_projects_id)
|
->where('company_projects_id', $detailsProject->company_projects_id)
|
||||||
->get()
|
->get()
|
||||||
|
|
||||||
|
//Talvez nao seja necessario isto, pois a model EquipmentComment, ja tem relacao com a 'User'
|
||||||
->transform(function ($comment) {
|
->transform(function ($comment) {
|
||||||
// Adiciona uma nova propriedade ao objeto de comentário
|
// Adiciona uma nova propriedade ao objeto de comentário
|
||||||
$comment->type_users = $comment->user->type_users;
|
$comment->type_user = $comment->user->type_users;
|
||||||
return $comment;
|
return $comment;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//Recebe os dados padrao do Equipamento e o atribui uma nova coluna :typeOfPortfolioStructure , para indicar ser um dado de Historico.
|
||||||
$detalsEquipment = Equipment::where('equipment_id', $equipmentID)->first();
|
$detalsEquipment = Equipment::where('equipment_id', $equipmentID)->first();
|
||||||
|
$detalsEquipment->typeOfPortfolioStructure = 'History';
|
||||||
|
|
||||||
//recebe todos os dados referentes ao equipamento
|
//recebe todos os dados referentes ao equipamento
|
||||||
// OBS : Porem deveria confirma se a tarefa foi mesmo concluida.
|
// OBS : Porem deveria confirma se a tarefa foi mesmo concluida.
|
||||||
// $receiveAllTasksHistiory = ControlEquipmentWorkstation::where('equipmentWorkHistorys_id', $detailsEquipmentWorkProject->equipmentWorkHistorys_id)->get();
|
// $receiveAllTasksHistiory = ControlEquipmentWorkstation::where('equipmentWorkHistorys_id', $detailsEquipmentWorkProject->equipmentWorkHistorys_id)->get();
|
||||||
|
// $tasksAssociatedWithAmbit = TasksAssociationAmbits::where('ambits_equipment_id', $receiveAmbit->ambits_id)->get();
|
||||||
|
|
||||||
$receiveAmbit = EquipmentAssociationAmbit::where('equipmentWorkHistorys_id', $detailsEquipmentWorkProject->equipmentWorkHistorys_id)->first();
|
$receiveAmbit = EquipmentAssociationAmbit::where('equipmentWorkHistorys_id', $detailsEquipmentWorkProject->equipmentWorkHistorys_id)->first();
|
||||||
// $tasksAssociatedWithAmbit = TasksAssociationAmbits::where('ambits_equipment_id', $receiveAmbit->ambits_id)->get();
|
|
||||||
|
|
||||||
// Busca todas as tarefas do equipamento na ordem de execução
|
// Busca todas as tarefas do equipamento na ordem de execução
|
||||||
$receiveAllTasksEquipmentInHistory = OrderEquipmentTasks::where('equipmentWorkHistorys_id', $detailsEquipmentWorkProject->equipmentWorkHistorys_id)
|
$receiveAllTasksEquipmentInHistory = OrderEquipmentTasks::where('equipmentWorkHistorys_id', $detailsEquipmentWorkProject->equipmentWorkHistorys_id)
|
||||||
->orderBy('execution_order', 'asc')
|
->orderBy('execution_order', 'asc')
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
// Em seguida, obtenha todos os IDs de tarefas elementares de $receiveAllTasksEquipmentInHistory
|
// Recebe todos os IDs de tarefas elementares de $receiveAllTasksEquipmentInHistory em array
|
||||||
$equipmentTasksIds = $receiveAllTasksEquipmentInHistory->pluck('elemental_tasks_id')->filter()->unique();
|
$equipmentTasksIds = $receiveAllTasksEquipmentInHistory->pluck('elemental_tasks_id')->filter()->unique();
|
||||||
|
|
||||||
// Recebe apenas as tarefas já feitas
|
// Recebe todas as tarefas concluídas relacionadas à Workstation, ordenadas por 'elemental_tasks_id' e 'departure_date'
|
||||||
$completedTasksHistory = ControlEquipmentWorkstation::with('workstationsTaskAnswers')
|
$completedTasksHistory = ControlEquipmentWorkstation::with('workstationsTaskAnswers')
|
||||||
->where('equipmentWorkHistorys_id', $detailsEquipmentWorkProject->equipmentWorkHistorys_id)
|
->where('equipmentWorkHistorys_id', $detailsEquipmentWorkProject->equipmentWorkHistorys_id)
|
||||||
->whereNotNull('entry_date') // Verifica se 'entry_date' não é null
|
->whereNotNull('entry_date')
|
||||||
->whereNotNull('departure_date') // Verifica se 'departure_date' não é null
|
->whereNotNull('departure_date')
|
||||||
->has('workstationsTaskAnswers') // Garante que haja pelo menos uma 'workstationsTaskAnswers' relacionada
|
->has('workstationsTaskAnswers')
|
||||||
->orderBy('elemental_tasks_id', 'asc')
|
->orderBy('elemental_tasks_id', 'asc')
|
||||||
->get();
|
->orderBy('departure_date', 'desc') // Ordena por data mais recente primeiro
|
||||||
|
->get()
|
||||||
|
->unique('elemental_tasks_id'); // Garante a última ocorrência para cada 'elemental_tasks_id'
|
||||||
|
|
||||||
|
|
||||||
// Cria uma coleção para armazenar todas as tarefas, concluídas e não concluídas
|
// Cria uma coleção para armazenar todas as tarefas, concluídas e não concluídas
|
||||||
|
|
@ -489,16 +747,14 @@ public function showAmbitDetailsProjectHistory($equipmentStatus, $projectID, $eq
|
||||||
|
|
||||||
// Adiciona as tarefas concluídas à coleção principal
|
// Adiciona as tarefas concluídas à coleção principal
|
||||||
foreach ($completedTasksHistory as $taskHistory) {
|
foreach ($completedTasksHistory as $taskHistory) {
|
||||||
$taskHistory->cardTypeStyle = 'gray'; // Adiciona o campo 'cardTypeStyle'
|
$taskHistory->cardTypeStyle = '#8CC084'; // Adiciona o campo 'cardTypeStyle'
|
||||||
$taskHistory->typeStatusHistory = 'historic';
|
// $taskHistory->typeStatusHistory = 'historic'; -> verificar onde seria mais necessario criar esse atributo de historico
|
||||||
|
|
||||||
// Verifica se há um comentário associado e adiciona ao taskHistory
|
// Verifica se há um comentário associado e adiciona ao taskHistory
|
||||||
if ($taskHistory->taskEquipmentComment) {
|
if ($taskHistory->taskEquipmentComment) {
|
||||||
$taskHistory->taskComment = $taskHistory->taskEquipmentComment->task_comment;
|
$taskHistory->taskComment = $taskHistory->taskEquipmentComment->task_comment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Obtém o primeiro registro de workstationsTaskAnswers ou define como null se não existir
|
// Obtém o primeiro registro de workstationsTaskAnswers ou define como null se não existir
|
||||||
$workstationTaskAnswer = $taskHistory->workstationsTaskAnswers->first();
|
$workstationTaskAnswer = $taskHistory->workstationsTaskAnswers->first();
|
||||||
|
|
||||||
|
|
@ -521,61 +777,43 @@ public function showAmbitDetailsProjectHistory($equipmentStatus, $projectID, $eq
|
||||||
$taskHistory->formatted_answers = [];
|
$taskHistory->formatted_answers = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($taskHistory->receiveImages) {
|
// Calcula o tempo de execução se as datas de entrada e saída nao forem nulas
|
||||||
$imagePaths = $taskHistory->receiveImages->image_paths;
|
|
||||||
$taskHistory->image_paths = is_array($imagePaths) ? $imagePaths : json_decode($imagePaths, true);
|
|
||||||
} else {
|
|
||||||
$taskHistory->image_paths = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!is_null($taskHistory->entry_date) && !is_null($taskHistory->departure_date)) {
|
if (!is_null($taskHistory->entry_date) && !is_null($taskHistory->departure_date)) {
|
||||||
// Converte para instâncias de Carbon
|
|
||||||
$entryDate = \Carbon\Carbon::parse($taskHistory->entry_date);
|
$entryDate = \Carbon\Carbon::parse($taskHistory->entry_date);
|
||||||
$departureDate = \Carbon\Carbon::parse($taskHistory->departure_date);
|
$departureDate = \Carbon\Carbon::parse($taskHistory->departure_date);
|
||||||
|
|
||||||
// Calcula a diferença em minutos, horas e dias
|
|
||||||
$diffInMinutes = $entryDate->diffInMinutes($departureDate);
|
$diffInMinutes = $entryDate->diffInMinutes($departureDate);
|
||||||
$diffInHours = $entryDate->diffInHours($departureDate);
|
$diffInHours = $entryDate->diffInHours($departureDate);
|
||||||
$diffInDays = $entryDate->diffInDays($departureDate);
|
$diffInDays = $entryDate->diffInDays($departureDate);
|
||||||
|
|
||||||
// Se a diferença for menos de uma hora
|
|
||||||
if ($diffInMinutes < 60) {
|
if ($diffInMinutes < 60) {
|
||||||
$taskHistory->runtime = $diffInMinutes . ' minutos';
|
$taskHistory->runtime = $diffInMinutes . ' minutos';
|
||||||
}
|
} elseif ($diffInHours < 24) {
|
||||||
// Se a diferença for menos de 24 horas mas mais que uma hora
|
|
||||||
else if ($diffInHours < 24) {
|
|
||||||
$taskHistory->runtime = $diffInHours . ' horas';
|
$taskHistory->runtime = $diffInHours . ' horas';
|
||||||
}
|
} else {
|
||||||
// Se for mais de 24 horas
|
|
||||||
else {
|
|
||||||
// Calcula horas restantes após contar os dias
|
|
||||||
$remainingHours = $diffInHours % 24;
|
$remainingHours = $diffInHours % 24;
|
||||||
$taskHistory->runtime = $diffInDays . ' dias ' . $remainingHours . ' horas';
|
$taskHistory->runtime = $diffInDays . ' dias ' . $remainingHours . ' horas';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$taskHistory->runtime = 'N/A'; // valor padrão
|
$taskHistory->runtime = 'N/A';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adiciona o taskHistory à coleção principal
|
// Define a estrutura baseada na propriedade statusAmbit para 'latest' e 'history'
|
||||||
$receiveAllTasksHistiory->push($taskHistory);
|
$receiveAllTasksHistiory->push($taskHistory);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Agrupa e ordena as tarefas concluídas por elemental_tasks_id e departure_date
|
// Reorganiza a coleção por elemental_tasks_id, definindo a propriedade statusAmbit
|
||||||
$receiveAllTasksHistiory = $receiveAllTasksHistiory->groupBy(function ($item) {
|
$receiveAllTasksHistiory = $receiveAllTasksHistiory->groupBy('elemental_tasks_id')
|
||||||
return $item->elemental_tasks_id;
|
->map(function ($group) {
|
||||||
})->map(function ($group) {
|
return $group->map(function ($task) use ($group) {
|
||||||
$latest = $group->sortByDesc('departure_date')->first();
|
// Marcar a tarefa mais recente como 'latest' e as demais como 'history'
|
||||||
$latest->statusHistory = 'yes';
|
$task->statusAmbit = $task->departure_date === $group->first()->departure_date ? 'latest' : 'history';
|
||||||
$history = $group->sortByDesc('departure_date')->slice(1)->map(function ($item) {
|
return $task;
|
||||||
$item->statusHistory = 'no';
|
});
|
||||||
return $item;
|
})
|
||||||
});
|
->flatten(1); // Remove o agrupamento aninhado para que todos estejam em uma única coleção
|
||||||
|
|
||||||
return [
|
|
||||||
'latest' => $latest,
|
|
||||||
'history' => $history->values()
|
|
||||||
];
|
|
||||||
});
|
|
||||||
|
|
||||||
// Adiciona as tarefas não concluídas à coleção principal
|
// Adiciona as tarefas não concluídas à coleção principal
|
||||||
$incompleteTasks = $equipmentTasksIds->diff($completedTasksHistory->pluck('elemental_tasks_id'));
|
$incompleteTasks = $equipmentTasksIds->diff($completedTasksHistory->pluck('elemental_tasks_id'));
|
||||||
|
|
@ -584,28 +822,29 @@ public function showAmbitDetailsProjectHistory($equipmentStatus, $projectID, $eq
|
||||||
// Busca os dados da tarefa elementar
|
// Busca os dados da tarefa elementar
|
||||||
$elementalTask = ElementalTasks::where('elemental_tasks_id', $taskId)->first();
|
$elementalTask = ElementalTasks::where('elemental_tasks_id', $taskId)->first();
|
||||||
|
|
||||||
// Adiciona à coleção principal usando o elemental_tasks_id como chave
|
// Cria uma estrutura padrão para tarefas não concluídas
|
||||||
$receiveAllTasksHistiory->put($taskId, [
|
$receiveAllTasksHistiory->push((object) [
|
||||||
'latest' => (object) [
|
'elemental_tasks_id' => $taskId,
|
||||||
'elemental_tasks_id' => $taskId,
|
'control_equipment_workstation_id' => 'N/A',
|
||||||
'control_equipment_workstation_id' => 'N/A',
|
// 'cardType' => 'blue',
|
||||||
'cardType' => 'blue',
|
'cardTypeStyle' => 'gray',
|
||||||
'cardTypeStyle' => 'blue',
|
'formatted_answers' => [],
|
||||||
'formatted_answers' => [],
|
'entry_date' => 'N/A',
|
||||||
'entry_date' => 'N/A',
|
'runtime' => 'N/A',
|
||||||
'runtime' => 'N/A',
|
'statusAmbit' => 'incomplete', // Novo status para tarefas incompletas
|
||||||
'statusHistory' => 'N/A',
|
'typeStatusHistory' => 'N/A',
|
||||||
'typeStatusHistory' => 'N/A',
|
'elementalTask' => (object) [
|
||||||
'elementalTask' => (object) [
|
'elemental_tasks_code' => $elementalTask ? $elementalTask->elemental_tasks_code : null,
|
||||||
'elemental_tasks_code' => $elementalTask ? $elementalTask->elemental_tasks_code : null,
|
'elemental_tasks_description' => $elementalTask ? $elementalTask->elemental_tasks_description : null
|
||||||
'elemental_tasks_description' => $elementalTask ? $elementalTask->elemental_tasks_description : null
|
]
|
||||||
]
|
|
||||||
],
|
|
||||||
'history' => collect() // Histórico vazio para tarefas não concluídas
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return view('projectsClients.showAmbitDetailProjectHistory', compact('receiveComments', 'equipmentStatus', 'detailsProject', 'receiveAmbit', 'receiveAllTasksHistiory', 'detalsEquipment', 'detailsEquipmentWorkProject'));
|
$dataControlEquipment = ['typePageForViewElementalTasks' => 'historic'];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return view('projectsClients.showAmbitDetailProjectHistory', compact('receiveComments', 'equipmentStatus', 'detailsProject', 'receiveAmbit', 'receiveAllTasksHistiory', 'detalsEquipment', 'detailsEquipmentWorkProject', 'dataControlEquipment'));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -824,7 +1063,7 @@ public function projectDetails_11($projectID, $equipmentID)
|
||||||
// Cria um sistema de 1 a 3 , onde 1 e apenas 'ler', 2 apenas editar e 3 as 2 opcoes
|
// Cria um sistema de 1 a 3 , onde 1 e apenas 'ler', 2 apenas editar e 3 as 2 opcoes
|
||||||
$portfolioOnlyreadOrEditToo = 3;
|
$portfolioOnlyreadOrEditToo = 3;
|
||||||
//filteredTasks', 'OrdemTasks', 'DetailsTasks' campos vazios para ISV.
|
//filteredTasks', 'OrdemTasks', 'DetailsTasks' campos vazios para ISV.
|
||||||
return view('projectsClients.articulated_2_ShowEquipment', compact('detailsProject', 'dataEquipment', 'filteredTasks', 'OrdemTasks', 'DetailsTasks', 'specificAttributesArray', 'receiveEquipmentWorkHistorys','portfolioOnlyreadOrEditToo'));
|
return view('projectsClients.articulated_2_ShowEquipment', compact('detailsProject', 'dataEquipment', 'filteredTasks', 'OrdemTasks', 'DetailsTasks', 'specificAttributesArray', 'receiveEquipmentWorkHistorys', 'portfolioOnlyreadOrEditToo'));
|
||||||
}
|
}
|
||||||
|
|
||||||
//Funcao que recebe a Acoes do dataTables do portifolio.
|
//Funcao que recebe a Acoes do dataTables do portifolio.
|
||||||
|
|
@ -868,8 +1107,8 @@ public function articulated_22($equipmentID)
|
||||||
$specificAttributesArray[$attribute->general_attributes_equipment_id] = $attribute->specific_attributes_value;
|
$specificAttributesArray[$attribute->general_attributes_equipment_id] = $attribute->specific_attributes_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cria um sistema de 1 a 3 , onde 1 e apenas 'ler', 2 apenas editar e 3 as 2 opcoes
|
// Cria um sistema de 1 a 3 , onde 1 e apenas 'ler', 2 apenas editar e 3 as 2 opcoes
|
||||||
$portfolioOnlyreadOrEditToo = 3;
|
$portfolioOnlyreadOrEditToo = 3;
|
||||||
|
|
||||||
return view('projectsClients.testRoute', compact('dataEquipment', 'receiveAlldetailsEquipmentWorkHistory', 'specificAttributesArray', 'portfolioOnlyreadOrEditToo'));
|
return view('projectsClients.testRoute', compact('dataEquipment', 'receiveAlldetailsEquipmentWorkHistory', 'specificAttributesArray', 'portfolioOnlyreadOrEditToo'));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -165,6 +165,7 @@ public function receiveQuestionsEquipment($equipmentID)
|
||||||
}
|
}
|
||||||
public function receiveAnswersEquipment(Request $request, $control_equipment_workstation_id)
|
public function receiveAnswersEquipment(Request $request, $control_equipment_workstation_id)
|
||||||
{
|
{
|
||||||
|
|
||||||
//No request recebemos ID(NUmero da tarela elementar) , esta variavel vai receber este ID apos selerar o id da string
|
//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
|
// Deve receber as perguntas e respostas para a tarefa selecionada
|
||||||
|
|
@ -622,15 +623,23 @@ public function getEquipmentData($equipment_id, $component_tag)
|
||||||
|
|
||||||
$dataEquipment->istp_number = $receiveEquipmentWorkHistory->ispt_number;
|
$dataEquipment->istp_number = $receiveEquipmentWorkHistory->ispt_number;
|
||||||
$dataEquipment->equipment_ambit = $receiveAmbit->ambitsEquipment->ambits_description;
|
$dataEquipment->equipment_ambit = $receiveAmbit->ambitsEquipment->ambits_description;
|
||||||
|
$dataEquipment->typeOfPortfolioStructure = 'work';
|
||||||
|
|
||||||
// Cria um sistema de 1 a 3 , onde 1 e apenas 'ler', 2 apenas editar e 3 as 2 opcoes
|
// Cria um sistema de 1 a 3 , onde 1 e apenas 'ler', 2 apenas editar e 3 as 2 opcoes
|
||||||
$portfolioOnlyreadOrEditToo = 3;
|
$portfolioOnlyreadOrEditToo = 3;
|
||||||
|
|
||||||
|
$dataControlEquipment = [
|
||||||
|
'collection' => $receiveDataControlEquipment, // Sua coleção de dados
|
||||||
|
'typePageForViewElementalTasks' => 'workStation' // Seu array de valores específicos
|
||||||
|
];
|
||||||
|
|
||||||
|
// dd($receiveDataControlEquipment );
|
||||||
|
|
||||||
return view('workstations.workstations', [
|
return view('workstations.workstations', [
|
||||||
// Deve receber o atual COntrol ID ? tudo a vez que atualizar ??
|
// Deve receber o atual COntrol ID ? tudo a vez que atualizar ??
|
||||||
'receiveComments' => $receiveComments,
|
'receiveComments' => $receiveComments,
|
||||||
'dataControlEquipment' => $receiveDataControlEquipment,
|
'dataControlEquipment' => $dataControlEquipment,
|
||||||
'dataEquipment' => $dataEquipment,
|
'detalsEquipment' => $dataEquipment,
|
||||||
'specificAttributesArray' => $specificAttributesArray,
|
'specificAttributesArray' => $specificAttributesArray,
|
||||||
'recebeTasksForEquipment' => $recebeTasksForEquipment,
|
'recebeTasksForEquipment' => $recebeTasksForEquipment,
|
||||||
'receiveComponentTag' => $component_tag,
|
'receiveComponentTag' => $component_tag,
|
||||||
|
|
|
||||||
BIN
public/companies_logo/1728212257.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 96 KiB |
|
After Width: | Height: | Size: 111 KiB |
|
After Width: | Height: | Size: 111 KiB |
|
After Width: | Height: | Size: 111 KiB |
|
After Width: | Height: | Size: 102 KiB |
|
After Width: | Height: | Size: 103 KiB |
|
After Width: | Height: | Size: 103 KiB |
|
After Width: | Height: | Size: 108 KiB |
|
After Width: | Height: | Size: 107 KiB |
|
After Width: | Height: | Size: 120 KiB |
|
After Width: | Height: | Size: 121 KiB |
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
@if (session('success'))
|
@if (session('success'))
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
@if (session('success'))
|
@if (session('success'))
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
@if (session('success'))
|
@if (session('success'))
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
@if (session('success'))
|
@if (session('success'))
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
<!-- Content Wrapper. Contains page content -->
|
<!-- Content Wrapper. Contains page content -->
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
@if (session('success'))
|
@if (session('success'))
|
||||||
|
|
|
||||||
192
resources/views/Templates/AdminLayout/AdminLayout.blade.php
Normal file
|
|
@ -0,0 +1,192 @@
|
||||||
|
@extends('Templates/templateAdmin')
|
||||||
|
|
||||||
|
@section('Content-AdminLayout')
|
||||||
|
<!-- Navbar -->
|
||||||
|
<nav class="main-header navbar navbar-expand navbar-white navbar-light">
|
||||||
|
<!-- Left navbar links -->
|
||||||
|
<ul class="navbar-nav">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<!-- Right navbar links -->
|
||||||
|
<ul class="navbar-nav ml-auto align-items-center">
|
||||||
|
<li class="nav-item my-2">
|
||||||
|
<form id="language-form" action="{{ route('language.switch') }}" method="post" class="form-inline">
|
||||||
|
@csrf
|
||||||
|
<select class="custom-select" name="locale" onchange="this.form.submit()">
|
||||||
|
<option value="pt" {{ app()->getLocale() == 'pt' ? 'selected' : '' }}>Português
|
||||||
|
</option>
|
||||||
|
<option value="en" {{ app()->getLocale() == 'en' ? 'selected' : '' }}>English
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
</form>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" data-widget="fullscreen" href="#" role="button">
|
||||||
|
<i class="fas fa-expand-arrows-alt"></i>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
<!-- /.navbar -->
|
||||||
|
|
||||||
|
<!-- Main Sidebar Container -->
|
||||||
|
<aside class="main-sidebar sidebar-dark-primary elevation-4">
|
||||||
|
<!-- Brand Logo -->
|
||||||
|
<a href="#" class="brand-link" style="pointer-events: none;">
|
||||||
|
<img src="{{ asset('/img/ispt.jpg') }}" alt="AdminLTE Logo" class="brand-image img-circle elevation-3"
|
||||||
|
style="opacity: .8">
|
||||||
|
<span class="brand-text font-weight-light">ISPT 4.0</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<!-- Sidebar -->
|
||||||
|
<div class="sidebar">
|
||||||
|
<!-- Sidebar user panel (optional) -->
|
||||||
|
<div class="user-panel mt-3 pb-3 mb-3 d-flex">
|
||||||
|
{{-- Verifica se esta logado , se estiver , busca os dados do utilizador atual. --}}
|
||||||
|
@if (Auth::check())
|
||||||
|
<div class="image">
|
||||||
|
<img class="img-circle elevation-2 imgProfile editImg"
|
||||||
|
src="{{ asset('user_logos/' . (Auth::user()->user_logo ?? 'logoISPT4.0.jpg')) }}"
|
||||||
|
alt="User Logo">
|
||||||
|
</div>
|
||||||
|
<div class="info">
|
||||||
|
<a href="{{ route('usersProfiles', ['id' => Auth::user()->user_id]) }}"
|
||||||
|
class="d-block">{{ Auth::user()->userType?->type_user }}</a>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Sidebar Menu -->
|
||||||
|
<nav class="mt-2">
|
||||||
|
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu"
|
||||||
|
data-accordion="false">
|
||||||
|
|
||||||
|
|
||||||
|
{{-- Menu para Administradores e Super --}}
|
||||||
|
@if (Auth::user()->type_users == 1 || Auth::user()->type_users == 2)
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="{{ route('home') }}" class="nav-link active">
|
||||||
|
<i class="nav-icon fas fa-tachometer-alt"></i>
|
||||||
|
<p> {{ __('messages.dashboard.dashboard') }} </p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="{{ route('createProject') }}" class="nav-link">
|
||||||
|
<i class="nav-icon fas fa-helmet-safety"></i>
|
||||||
|
<p> {{ __('messages.createProject.create_project') }} </p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
{{-- Relatorios para os Admin, SuperAdmin --}}
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="{{ route('showAllClientsForProjectReports') }}" class="nav-link">
|
||||||
|
<i class="nav-icon fas fa-file"></i>
|
||||||
|
<p>
|
||||||
|
Relatórios
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="#" class="nav-link">
|
||||||
|
<i class="nav-icon fas fa-briefcase"></i>
|
||||||
|
<p> {{ __('messages.portfolio.top_view_part.portfolio') }}
|
||||||
|
<i class="fas fa-angle-left right"></i>
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
<ul class="nav nav-treeview">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="{{ route('manageAssets') }}" class="nav-link">
|
||||||
|
<i class="fa-solid fa-file-edit"></i>
|
||||||
|
<p> {{ __('messages.portfolio.top_view_part.management_assets') }}</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
{{-- Menu para Cliente --}}
|
||||||
|
@elseif (Auth::user()->type_users == 3)
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="{{ route('dashboardClient') }}" class="nav-link active">
|
||||||
|
<i class="nav-icon fas fa-tachometer-alt"></i>
|
||||||
|
<p> {{ __('messages.dashboard.dashboard') }} </p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="{{ route('reportingDataClient') }}" class="nav-link">
|
||||||
|
<i class="nav-icon fas fa-file"></i>
|
||||||
|
<p> Relatórios Cliente </p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="{{ route('manageAssetsClient') }}" class="nav-link">
|
||||||
|
<i class="nav-icon fa-solid fa-file-edit"></i>
|
||||||
|
<p> {{ __('messages.portfolio.top_view_part.management_assets') }}</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Apenas os Super Admins e Admin tem acesso a estas Rotas -->
|
||||||
|
@if (Auth::user()->type_users == 1 || Auth::user()->type_users == 2)
|
||||||
|
<!-- Single menu item -->
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="#" class="nav-link">
|
||||||
|
<i class="nav-icon fas fa-gear"></i>
|
||||||
|
<p> {{ __('messages.users_listUsers.top_view_part.administration') }}
|
||||||
|
<i class="fas fa-angle-left right"></i>
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
<ul class="nav nav-treeview">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="{{ route('users.list') }}" class="nav-link">
|
||||||
|
<i class="fa-solid fa-users"></i>
|
||||||
|
<p>{{ __('messages.users_listUsers.users') }}</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="{{ route('users.company') }}" class="nav-link">
|
||||||
|
<i class="fa-solid fa-house-user"></i>
|
||||||
|
<p>{{ __('messages.users_listUsers.companies') }}</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="{{ route('CreateUsers') }}" class="nav-link">
|
||||||
|
<i class="nav-icon fas fa-gear"></i>
|
||||||
|
<p>{{ __('messages.users_listUsers.create_users') }}</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
<br>
|
||||||
|
<form method="POST" action="{{ route('logout') }}">
|
||||||
|
@csrf
|
||||||
|
<button type="submit" class="btn btn-danger">Terminar sessão</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<!-- /.Single menu item -->
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<!-- /.sidebar-menu -->
|
||||||
|
</div>
|
||||||
|
<!-- /.sidebar -->
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
@yield('Main-content')
|
||||||
|
</div>
|
||||||
|
<!-- ./content-wrapper -->
|
||||||
|
|
||||||
|
<!-- Control Sidebar -->
|
||||||
|
{{-- <aside class="control-sidebar control-sidebar-dark">
|
||||||
|
<!-- Control sidebar content goes here -->
|
||||||
|
</aside> --}}
|
||||||
|
<!-- /.control-sidebar -->
|
||||||
|
@endsection
|
||||||
|
|
@ -0,0 +1,248 @@
|
||||||
|
@extends('Templates/templateAdmin')
|
||||||
|
|
||||||
|
@section('Content-WorkstationsLayout')
|
||||||
|
<!-- Navbar -->
|
||||||
|
<!-- Parte de cima da pagina (header)-->
|
||||||
|
<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">
|
||||||
|
<a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"
|
||||||
|
style="color:#1f2d3d"></i></a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link">
|
||||||
|
<i class="fas fa-play" style="color:#1f3d2f"></i>
|
||||||
|
<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-hourglass-start" style="color:#1f2d3d"></i>
|
||||||
|
<span class="badge badge-success navbar-badge"
|
||||||
|
style="background-color: #1b4cad;">{{ count($executionEquipment) }} </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>
|
||||||
|
<span class="badge badge-success navbar-badge"
|
||||||
|
style="background-color: #28a745">{{ count($completedEquipments) }} </span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<!-- Right navbar links -->
|
||||||
|
<ul class="navbar-nav ml-auto">
|
||||||
|
<li class="nav-item d-none d-sm-inline-block">
|
||||||
|
<!--<div class="nav-link">{{ Auth::user()->user_name }}</div>-->
|
||||||
|
<div class="nav-link" style="color:#1f2d3d">{{ $receiveDataWs->nomenclature_workstation }}
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<!-- User Dropdown Menu -->
|
||||||
|
<li class="nav-item dropdown">
|
||||||
|
|
||||||
|
|
||||||
|
<a class="nav-link" data-toggle="dropdown" href="#">
|
||||||
|
<img src="{{ URL::asset('assets/dist/img/ispt.jpg') }}" class="img-circle elevation-2" alt="User Image"
|
||||||
|
style="width:30px;height:30px;">
|
||||||
|
</a>
|
||||||
|
<div class="dropdown-menu dropdown-menu-right">
|
||||||
|
|
||||||
|
<div class="nav-link" style="color:#1f2d3d">{{ $receiveDataWs->nomenclature_workstation }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form id="logout-form" action="{{ route('logout') }}" method="POST">
|
||||||
|
@csrf
|
||||||
|
|
||||||
|
@method('POST')
|
||||||
|
<a class="dropdown-item" href="{{ route('logout') }}"
|
||||||
|
onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
|
||||||
|
<i class="fas fa-sign-out-alt text-danger"></i>
|
||||||
|
<span>Terminar sessão</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
<!-- /.navbar -->
|
||||||
|
|
||||||
|
<!-- Main Sidebar Container -->
|
||||||
|
<aside class="main-sidebar sidebar-dark-primary elevation-4" style="background-color: #09255C">
|
||||||
|
<!-- Brand Logo -->
|
||||||
|
<p class="brand-link">
|
||||||
|
<img src="{{ URL::asset('assets/dist/img/ispt40.jpg') }}" alt="Ispt4.0 Logo"
|
||||||
|
class="brand-image img-circle elevation-3" style="opacity: .8">
|
||||||
|
<span class="brand-text font-weight-light">{{ config('app.name') }}</span>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<!-- Sidebar -->
|
||||||
|
<div class="sidebar mt-4">
|
||||||
|
|
||||||
|
<!-- SidebarSearch Form -->
|
||||||
|
<div class="form-inline">
|
||||||
|
<div class="input-group" data-widget="sidebar-search">
|
||||||
|
<input id="qrtextleft" class="form-control form-control-sidebar text-white" type="search"
|
||||||
|
placeholder="Tag/Equipamento" aria-label="Search">
|
||||||
|
<div class="input-group-append">
|
||||||
|
<button class="btn btn-sidebar" onclick="triggerSearchFromInput()">
|
||||||
|
<i class="fas fa-search fa-fw text-white"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Sidebar Menu -->
|
||||||
|
<nav class="mt-5">
|
||||||
|
|
||||||
|
<ul class="nav nav-pills nav-sidebar flex-column searchable" data-widget="treeview" role="menu"
|
||||||
|
data-accordion="false">
|
||||||
|
|
||||||
|
<!-- Por iniciar -->
|
||||||
|
<li class="nav-item has-treeview menu-closed">
|
||||||
|
<a href="#" class="nav-link text-white" style="background-color: #007BFF;">
|
||||||
|
<i class="nav-icon fas fa-play"></i>
|
||||||
|
<p>
|
||||||
|
Por iniciar: {{ count($receiveAllEquipmentOfProject) }}
|
||||||
|
<i class="right fas fa-angle-left"></i>
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
<ul class="nav nav-treeview pl-3">
|
||||||
|
@foreach ($receiveAllEquipmentOfProject as $equipmentOfProject)
|
||||||
|
<div class="row text-white">
|
||||||
|
<div class="col d-flex align-items-center ml-3">
|
||||||
|
<i class="fas fa-tag mr-2"></i>
|
||||||
|
<p class="mb-0 text-truncate" style="flex-grow: 1;">
|
||||||
|
{{ $equipmentOfProject->equipment_tag }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<!-- Em execução -->
|
||||||
|
<li class="nav-item has-treeview menu-closed mt-1">
|
||||||
|
<a href="#" class="nav-link text-white" style="background-color: #1b4cad;">
|
||||||
|
{{-- <i class="fa-solid fa-rotate-left"></i> --}}
|
||||||
|
<i class="fa-solid fa-hourglass-start"></i>
|
||||||
|
<p>
|
||||||
|
Em execução : {{ count($executionEquipment) }}
|
||||||
|
<i class="right fas fa-angle-left"></i>
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
<ul class="nav nav-treeview">
|
||||||
|
@foreach ($executionEquipment as $equipmentOfProject)
|
||||||
|
<div class="row text-white">
|
||||||
|
<div class="col d-flex align-items-center ml-3">
|
||||||
|
<i class="fas fa-tag mr-2"></i>
|
||||||
|
<p class="mb-0 text-truncate" style="flex-grow: 1;">
|
||||||
|
{{ $equipmentOfProject->equipment_tag }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<!-- Por rever -->
|
||||||
|
<li class="nav-item has-treeview menu-closed mt-1">
|
||||||
|
<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 d-flex align-items-center ml-3">
|
||||||
|
<i class="fas fa-tag mr-2"></i>
|
||||||
|
<p class="mb-0 text-truncate" style="flex-grow: 1;">
|
||||||
|
{{ $equipmentOfProject->equipment_tag }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<!-- Concluidos -->
|
||||||
|
<li class="nav-item has-treeview menu-closed mt-1">
|
||||||
|
<a href="#" class="nav-link text-white" style="background-color: green;">
|
||||||
|
<i class="nav-icon fas fa-check"></i>
|
||||||
|
<p> Concluidos :
|
||||||
|
{{ count($completedEquipments) }}
|
||||||
|
<!-- válvulas concluídas -->
|
||||||
|
<i class="right fas fa-angle-left"></i>
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
<ul class="nav nav-treeview">
|
||||||
|
@foreach ($completedEquipments as $equipmentDone)
|
||||||
|
<div class="row text-white">
|
||||||
|
<div class="col d-flex align-items-center ml-3">
|
||||||
|
<i class="fas fa-tag mr-2"></i>
|
||||||
|
<p class="mb-0 text-truncate" style="flex-grow: 1;">
|
||||||
|
{{ $equipmentDone->equipment_tag }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<ul class="nav nav-pills nav-sidebar flex-column searchable" id="qrcode-equipment-list"
|
||||||
|
style="display: none;">
|
||||||
|
<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) }} a iniciar QrCodes
|
||||||
|
<i class="right fas fa-angle-left"></i>
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
<ul class="nav nav-treeview">
|
||||||
|
@foreach ($receiveQrcodeEquipmentsProject as $equipmentOfProject)
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="{{ route('getEquipmentData', ['equipment_id' => $equipmentOfProject->equipment_id, 'component_tag' => $equipmentOfProject->component_tag]) }}"
|
||||||
|
class="nav-link text-white">
|
||||||
|
<i class="fas fa-tag nav-icon"></i>
|
||||||
|
<p class="Tags">{{ $equipmentOfProject->component_tag }}</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
<!-- /.sidebar-menu -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- /.sidebar -->
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
@yield('Main-content')
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@endsection
|
||||||
770
resources/views/Templates/templateAdmin.blade copy.php
Executable file
|
|
@ -0,0 +1,770 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="{{ asset('assets/dist/css/adminlte.css') }}">
|
||||||
|
|
||||||
|
<link rel="stylesheet"
|
||||||
|
href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
|
||||||
|
|
||||||
|
<!-- Font Awesome -->
|
||||||
|
{{-- <link rel="stylesheet" href="{{ asset('assets/plugins/fontawesome-free/css/all.min.css') }}"> --}}
|
||||||
|
<!-- Font Awesome 6.1.1 -->
|
||||||
|
{{-- <link rel="stylesheet" href="{{ asset('plugins/fontawesome-611/css/all.min.css') }}"> --}}
|
||||||
|
<link rel="stylesheet" href="{{ asset('assets/plugins/fontawesome-6.4.2/css/all.css') }}">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Ionicons --><body class="hold-transition sidebar-mini layout-fixed">
|
||||||
|
<div class="wrapper">
|
||||||
|
|
||||||
|
<!-- Navbar -->
|
||||||
|
<!-- Parte de cima da pagina (header)-->
|
||||||
|
<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">
|
||||||
|
<a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"
|
||||||
|
style="color:#1f2d3d"></i></a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link">
|
||||||
|
<i class="fas fa-play" style="color:#1f3d2f"></i>
|
||||||
|
<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-hourglass-start" style="color:#1f2d3d"></i>
|
||||||
|
<span class="badge badge-success navbar-badge"
|
||||||
|
style="background-color: #1b4cad;">{{ count($executionEquipment) }} </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>
|
||||||
|
<span class="badge badge-success navbar-badge"
|
||||||
|
style="background-color: #28a745">{{ count($completedEquipments) }} </span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<!-- Right navbar links -->
|
||||||
|
<ul class="navbar-nav ml-auto">
|
||||||
|
<li class="nav-item d-none d-sm-inline-block">
|
||||||
|
<!--<div class="nav-link">{{ Auth::user()->user_name }}</div>-->
|
||||||
|
<div class="nav-link" style="color:#1f2d3d">{{ $receiveDataWs->nomenclature_workstation }}</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<!-- User Dropdown Menu -->
|
||||||
|
<li class="nav-item dropdown">
|
||||||
|
|
||||||
|
|
||||||
|
<a class="nav-link" data-toggle="dropdown" href="#">
|
||||||
|
<img src="{{ URL::asset('assets/dist/img/ispt.jpg') }}" class="img-circle elevation-2"
|
||||||
|
alt="User Image" style="width:30px;height:30px;">
|
||||||
|
</a>
|
||||||
|
<div class="dropdown-menu dropdown-menu-right">
|
||||||
|
|
||||||
|
<div class="nav-link" style="color:#1f2d3d">{{ $receiveDataWs->nomenclature_workstation }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form id="logout-form" action="{{ route('logout') }}" method="POST">
|
||||||
|
@csrf
|
||||||
|
|
||||||
|
@method('POST')
|
||||||
|
<a class="dropdown-item" href="{{ route('logout') }}"
|
||||||
|
onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
|
||||||
|
<i class="fas fa-sign-out-alt text-danger"></i>
|
||||||
|
<span>Terminar sessão</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
<!-- /.navbar -->
|
||||||
|
|
||||||
|
<!-- Main Sidebar Container -->
|
||||||
|
<aside class="main-sidebar sidebar-dark-primary elevation-4" style="background-color: #09255C">
|
||||||
|
<!-- Brand Logo -->
|
||||||
|
<p class="brand-link">
|
||||||
|
<img src="{{ URL::asset('assets/dist/img/ispt40.jpg') }}" alt="Ispt4.0 Logo"
|
||||||
|
class="brand-image img-circle elevation-3" style="opacity: .8">
|
||||||
|
<span class="brand-text font-weight-light">{{ config('app.name') }}</span>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<!-- Sidebar -->
|
||||||
|
<div class="sidebar mt-4">
|
||||||
|
|
||||||
|
<!-- SidebarSearch Form -->
|
||||||
|
<div class="form-inline">
|
||||||
|
<div class="input-group" data-widget="sidebar-search">
|
||||||
|
<input id="qrtextleft" class="form-control form-control-sidebar text-white" type="search"
|
||||||
|
placeholder="Tag/Equipamento" aria-label="Search">
|
||||||
|
<div class="input-group-append">
|
||||||
|
<button class="btn btn-sidebar" onclick="triggerSearchFromInput()">
|
||||||
|
<i class="fas fa-search fa-fw text-white"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Sidebar Menu -->
|
||||||
|
<nav class="mt-5">
|
||||||
|
|
||||||
|
<ul class="nav nav-pills nav-sidebar flex-column searchable" data-widget="treeview"
|
||||||
|
role="menu" data-accordion="false">
|
||||||
|
|
||||||
|
<!-- Por iniciar -->
|
||||||
|
<li class="nav-item has-treeview menu-closed">
|
||||||
|
<a href="#" class="nav-link text-white" style="background-color: #007BFF;">
|
||||||
|
<i class="nav-icon fas fa-play"></i>
|
||||||
|
<p>
|
||||||
|
Por iniciar: {{ count($receiveAllEquipmentOfProject) }}
|
||||||
|
<i class="right fas fa-angle-left"></i>
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
<ul class="nav nav-treeview pl-3">
|
||||||
|
@foreach ($receiveAllEquipmentOfProject as $equipmentOfProject)
|
||||||
|
<div class="row text-white">
|
||||||
|
<div class="col d-flex align-items-center ml-3">
|
||||||
|
<i class="fas fa-tag mr-2"></i>
|
||||||
|
<p class="mb-0 text-truncate" style="flex-grow: 1;">
|
||||||
|
{{ $equipmentOfProject->equipment_tag }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<!-- Em execução -->
|
||||||
|
<li class="nav-item has-treeview menu-closed mt-1">
|
||||||
|
<a href="#" class="nav-link text-white" style="background-color: #1b4cad;">
|
||||||
|
{{-- <i class="fa-solid fa-rotate-left"></i> --}}
|
||||||
|
<i class="fa-solid fa-hourglass-start"></i>
|
||||||
|
<p>
|
||||||
|
Em execução : {{ count($executionEquipment) }}
|
||||||
|
<i class="right fas fa-angle-left"></i>
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
<ul class="nav nav-treeview">
|
||||||
|
@foreach ($executionEquipment as $equipmentOfProject)
|
||||||
|
<div class="row text-white">
|
||||||
|
<div class="col d-flex align-items-center ml-3">
|
||||||
|
<i class="fas fa-tag mr-2"></i>
|
||||||
|
<p class="mb-0 text-truncate" style="flex-grow: 1;">
|
||||||
|
{{ $equipmentOfProject->equipment_tag }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<!-- Por rever -->
|
||||||
|
<li class="nav-item has-treeview menu-closed mt-1">
|
||||||
|
<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 d-flex align-items-center ml-3">
|
||||||
|
<i class="fas fa-tag mr-2"></i>
|
||||||
|
<p class="mb-0 text-truncate" style="flex-grow: 1;">
|
||||||
|
{{ $equipmentOfProject->equipment_tag }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<!-- Concluidos -->
|
||||||
|
<li class="nav-item has-treeview menu-closed mt-1">
|
||||||
|
<a href="#" class="nav-link text-white" style="background-color: green;">
|
||||||
|
<i class="nav-icon fas fa-check"></i>
|
||||||
|
<p> Concluidos :
|
||||||
|
{{ count($completedEquipments) }}
|
||||||
|
<!-- válvulas concluídas -->
|
||||||
|
<i class="right fas fa-angle-left"></i>
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
<ul class="nav nav-treeview">
|
||||||
|
@foreach ($completedEquipments as $equipmentDone)
|
||||||
|
<div class="row text-white">
|
||||||
|
<div class="col d-flex align-items-center ml-3">
|
||||||
|
<i class="fas fa-tag mr-2"></i>
|
||||||
|
<p class="mb-0 text-truncate" style="flex-grow: 1;">
|
||||||
|
{{ $equipmentDone->equipment_tag }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<ul class="nav nav-pills nav-sidebar flex-column searchable" id="qrcode-equipment-list"
|
||||||
|
style="display: none;">
|
||||||
|
<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) }} a iniciar QrCodes
|
||||||
|
<i class="right fas fa-angle-left"></i>
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
<ul class="nav nav-treeview">
|
||||||
|
@foreach ($receiveQrcodeEquipmentsProject as $equipmentOfProject)
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="{{ route('getEquipmentData', ['equipment_id' => $equipmentOfProject->equipment_id, 'component_tag' => $equipmentOfProject->component_tag]) }}"
|
||||||
|
class="nav-link text-white">
|
||||||
|
<i class="fas fa-tag nav-icon"></i>
|
||||||
|
<p class="Tags">{{ $equipmentOfProject->component_tag }}</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
<!-- /.sidebar-menu -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- /.sidebar -->
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
<!-- Content Wrapper. Contains page content -->
|
||||||
|
<div class="content-wrapper">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Main content -->
|
||||||
|
<section class="content">
|
||||||
|
@yield('content')
|
||||||
|
</section>
|
||||||
|
<!-- /.content -->
|
||||||
|
</div>
|
||||||
|
<!-- /.content-wrapper -->
|
||||||
|
<footer class="main-footer" style="background-color: #00B0EA">
|
||||||
|
<strong>Copyright © 2017-{{ date('Y') }} <a href="https://www.isptgroup.com" target="_blank">ISPT -
|
||||||
|
Industrial Services,
|
||||||
|
SA</a>.</strong>
|
||||||
|
Todos os direitos reservados.
|
||||||
|
<div class="float-right d-none d-sm-inline-block">
|
||||||
|
<b>Versão</b> {{ config('app.version') }}
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- ./wrapper -->
|
||||||
|
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
|
||||||
|
<!-- Tempusdominus Bootstrap 4 -->
|
||||||
|
<link rel="stylesheet"
|
||||||
|
href="{{ asset('assets/plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css') }}">
|
||||||
|
<!-- iCheck -->
|
||||||
|
<link rel="stylesheet" href="{{ asset('assets/plugins/icheck-bootstrap/icheck-bootstrap.min.css') }}">
|
||||||
|
<!-- JQVMap -->
|
||||||
|
<link rel="stylesheet" href="{{ asset('assets/plugins/jqvmap/jqvmap.min.css') }}">
|
||||||
|
<!-- Theme style -->
|
||||||
|
|
||||||
|
<!-- overlayScrollbars -->
|
||||||
|
<link rel="stylesheet" href="{{ asset('assets/plugins/overlayScrollbars/css/OverlayScrollbars.min.css') }}">
|
||||||
|
<!-- Daterange picker -->
|
||||||
|
<link rel="stylesheet" href="{{ asset('assets/plugins/daterangepicker/daterangepicker.css') }}">
|
||||||
|
<!-- summernote -->
|
||||||
|
<link rel="stylesheet" href="{{ asset('assets/plugins/summernote/summernote-bs4.min.css') }}">
|
||||||
|
<!-- jQuery UI -->
|
||||||
|
<link rel="stylesheet" href="{{ asset('assets/plugins/jquery-ui/jquery-ui.css') }}">
|
||||||
|
|
||||||
|
<!-- daterange picker -->
|
||||||
|
<link rel="stylesheet" href="{{ asset('assets/plugins/daterangepicker/daterangepicker.css') }}">
|
||||||
|
|
||||||
|
<!-- DataTables -->
|
||||||
|
<link rel="stylesheet" href="{{ asset('assets/plugins/datatables-bs4/css/dataTables.bootstrap4.min.css') }}">
|
||||||
|
|
||||||
|
<link rel="stylesheet"
|
||||||
|
href="{{ asset('assets/plugins/datatables-responsive/css/responsive.bootstrap4.min.css') }}">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="{{ asset('assets/plugins/datatables-buttons/css/buttons.bootstrap4.min.css') }}">
|
||||||
|
|
||||||
|
<!-- jQuery -->
|
||||||
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||||
|
<!-- DataTables CSS -->
|
||||||
|
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.11.3/css/dataTables.bootstrap4.min.css">
|
||||||
|
<!-- DataTables JavaScript -->
|
||||||
|
<script src="https://cdn.datatables.net/1.11.3/js/jquery.dataTables.min.js"></script>
|
||||||
|
<!-- DataTables Bootstrap 4 JavaScript -->
|
||||||
|
<script src="https://cdn.datatables.net/1.11.3/js/dataTables.bootstrap4.min.js"></script>
|
||||||
|
<!-- DataTables Buttons JavaScript -->
|
||||||
|
<script src="https://cdn.datatables.net/buttons/1.7.1/js/dataTables.buttons.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
{{-- Graficos para gestao com chart.js --}}
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||||
|
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-datalabels"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.scrollable-list {
|
||||||
|
max-height: 200px;
|
||||||
|
/* Ajuste a altura máxima conforme necessário */
|
||||||
|
overflow-y: auto;
|
||||||
|
/* Permite a rolagem vertical se o conteúdo exceder a altura máxima */
|
||||||
|
}
|
||||||
|
.scrollable-list-xl {
|
||||||
|
max-height: 600px;
|
||||||
|
/* Ajuste a altura máxima conforme necessário */
|
||||||
|
overflow-y: auto;
|
||||||
|
/* Permite a rolagem vertical se o conteúdo exceder a altura máxima */
|
||||||
|
}
|
||||||
|
|
||||||
|
.line-text {
|
||||||
|
margin-right: 10px;
|
||||||
|
/* ou o espaçamento que você preferir */
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-fields {
|
||||||
|
/* qualquer estilo adicional necessário */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#isptGroupLink:hover {
|
||||||
|
color: #EAF3F6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.spin {
|
||||||
|
animation: spin 1s infinite linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes spin {
|
||||||
|
from {
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ***************************** */
|
||||||
|
.accordion {
|
||||||
|
overflow-anchor: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion>.card {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion>.card:not(:last-of-type) {
|
||||||
|
border-bottom: 0;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion>.card:not(:first-of-type) {
|
||||||
|
border-top-left-radius: 0;
|
||||||
|
border-top-right-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accordion>.card>.card-header {
|
||||||
|
border-radius: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Nome de baixo do circulo */
|
||||||
|
.steps {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Nome dentro do circulo de ainda não de chegar o progress bar */
|
||||||
|
.step-button {
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: none;
|
||||||
|
background-color: var(--prm-gray);
|
||||||
|
transition: .4s;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
text-align: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.step-button[aria-expanded="true"] {
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
background-color: var(--prm-color);
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.done {
|
||||||
|
background-color: var(--prm-color);
|
||||||
|
color: #fff;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.step-item {
|
||||||
|
z-index: 10;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#progress {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
position: absolute;
|
||||||
|
width: 95%;
|
||||||
|
z-index: 5;
|
||||||
|
height: 10px;
|
||||||
|
margin-left: 18px;
|
||||||
|
margin-bottom: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* to customize progress bar */
|
||||||
|
#progress::-webkit-progress-value {
|
||||||
|
background-color: var(--prm-color);
|
||||||
|
transition: .5s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
#progress::-webkit-progress-bar {
|
||||||
|
background-color: var(--prm-gray);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#editImg {
|
||||||
|
width: 215px;
|
||||||
|
height: 215px;
|
||||||
|
object-fit: cover;
|
||||||
|
/* Isso fará com que a imagem cubra completamente a área sem distorcer */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="hold-transition sidebar-mini layout-fixed">
|
||||||
|
|
||||||
|
<!-- Wrapper -->
|
||||||
|
<div class="wrapper">
|
||||||
|
|
||||||
|
<!-- Preloader -->
|
||||||
|
|
||||||
|
<div class="preloader flex-column justify-content-center align-items-center">
|
||||||
|
<img class="animation__shake spin" src="{{ asset('img/logo4.0.jpg') }}" alt="AdminLTELogo" height="60"
|
||||||
|
width="60">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Navbar -->
|
||||||
|
<nav class="main-header navbar navbar-expand navbar-white navbar-light">
|
||||||
|
<!-- Left navbar links -->
|
||||||
|
<ul class="navbar-nav">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" data-widget="pushmenu" href="#" role="button"><i
|
||||||
|
class="fas fa-bars"></i></a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Right navbar links -->
|
||||||
|
<ul class="navbar-nav ml-auto align-items-center">
|
||||||
|
<li class="nav-item my-2">
|
||||||
|
<form id="language-form" action="{{ route('language.switch') }}" method="post"
|
||||||
|
class="form-inline">
|
||||||
|
@csrf
|
||||||
|
<select class="custom-select" name="locale" onchange="this.form.submit()">
|
||||||
|
<option value="pt" {{ app()->getLocale() == 'pt' ? 'selected' : '' }}>Português </option>
|
||||||
|
<option value="en" {{ app()->getLocale() == 'en' ? 'selected' : '' }}>English</option>
|
||||||
|
</select>
|
||||||
|
</form>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" data-widget="fullscreen" href="#" role="button">
|
||||||
|
<i class="fas fa-expand-arrows-alt"></i>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
<!-- /.navbar -->
|
||||||
|
|
||||||
|
<!-- Main Sidebar Container -->
|
||||||
|
<aside class="main-sidebar sidebar-dark-primary elevation-4">
|
||||||
|
<!-- Brand Logo -->
|
||||||
|
<a href="#" class="brand-link" style="pointer-events: none;">
|
||||||
|
<img src="{{ asset('/img/ispt.jpg') }}" alt="AdminLTE Logo" class="brand-image img-circle elevation-3"
|
||||||
|
style="opacity: .8">
|
||||||
|
<span class="brand-text font-weight-light">ISPT 4.0</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<!-- Sidebar -->
|
||||||
|
<div class="sidebar">
|
||||||
|
<!-- Sidebar user panel (optional) -->
|
||||||
|
<div class="user-panel mt-3 pb-3 mb-3 d-flex">
|
||||||
|
{{-- Verifica se esta logado , se estiver , busca os dados do utilizador atual. --}}
|
||||||
|
@if (Auth::check())
|
||||||
|
<div class="image">
|
||||||
|
<img class="img-circle elevation-2 imgProfile editImg"
|
||||||
|
src="{{ asset('user_logos/' . (Auth::user()->user_logo ?? 'logoISPT4.0.jpg')) }}"
|
||||||
|
alt="User Logo">
|
||||||
|
</div>
|
||||||
|
<div class="info">
|
||||||
|
<a href="{{ route('usersProfiles', ['id' => Auth::user()->user_id]) }}"
|
||||||
|
class="d-block">{{ Auth::user()->userType?->type_user }}</a>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Sidebar Menu -->
|
||||||
|
<nav class="mt-2">
|
||||||
|
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu"
|
||||||
|
data-accordion="false">
|
||||||
|
|
||||||
|
|
||||||
|
{{-- Menu para Administradores e Super --}}
|
||||||
|
@if (Auth::user()->type_users == 1 || Auth::user()->type_users == 2)
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="{{ route('home') }}" class="nav-link active">
|
||||||
|
<i class="nav-icon fas fa-tachometer-alt"></i>
|
||||||
|
<p> {{ __('messages.dashboard.dashboard') }} </p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="{{ route('createProject') }}" class="nav-link">
|
||||||
|
<i class="nav-icon fas fa-helmet-safety"></i>
|
||||||
|
<p> {{ __('messages.createProject.create_project') }} </p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
{{-- Relatorios para os Admin, SuperAdmin --}}
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="{{ route('showAllClientsForProjectReports') }}" class="nav-link">
|
||||||
|
<i class="nav-icon fas fa-file"></i>
|
||||||
|
<p>
|
||||||
|
Relatórios
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="#" class="nav-link">
|
||||||
|
<i class="nav-icon fas fa-briefcase"></i>
|
||||||
|
<p> {{ __('messages.portfolio.top_view_part.portfolio') }}
|
||||||
|
<i class="fas fa-angle-left right"></i>
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
<ul class="nav nav-treeview">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="{{ route('manageAssets') }}" class="nav-link">
|
||||||
|
<i class="fa-solid fa-file-edit"></i>
|
||||||
|
<p> {{ __('messages.portfolio.top_view_part.management_assets') }}</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
{{-- Menu para Cliente --}}
|
||||||
|
@elseif (Auth::user()->type_users == 3)
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="{{ route('dashboardClient') }}" class="nav-link active">
|
||||||
|
<i class="nav-icon fas fa-tachometer-alt"></i>
|
||||||
|
<p> {{ __('messages.dashboard.dashboard') }} </p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="{{ route('reportingDataClient') }}" class="nav-link">
|
||||||
|
<i class="nav-icon fas fa-file"></i>
|
||||||
|
<p> Relatórios Cliente </p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="{{ route('manageAssetsClient') }}" class="nav-link">
|
||||||
|
<i class="nav-icon fa-solid fa-file-edit"></i>
|
||||||
|
<p> {{ __('messages.portfolio.top_view_part.management_assets') }}</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Apenas os Super Admins e Admin tem acesso a estas Rotas -->
|
||||||
|
@if (Auth::user()->type_users == 1 || Auth::user()->type_users == 2)
|
||||||
|
<!-- Single menu item -->
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="#" class="nav-link">
|
||||||
|
<i class="nav-icon fas fa-gear"></i>
|
||||||
|
<p> {{ __('messages.users_listUsers.top_view_part.administration') }}
|
||||||
|
<i class="fas fa-angle-left right"></i>
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
<ul class="nav nav-treeview">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="{{ route('users.list') }}" class="nav-link">
|
||||||
|
<i class="fa-solid fa-users"></i>
|
||||||
|
<p>{{ __('messages.users_listUsers.users') }}</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="{{ route('users.company') }}" class="nav-link">
|
||||||
|
<i class="fa-solid fa-house-user"></i>
|
||||||
|
<p>{{ __('messages.users_listUsers.companies') }}</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="{{ route('CreateUsers') }}" class="nav-link">
|
||||||
|
<i class="nav-icon fas fa-gear"></i>
|
||||||
|
<p>{{ __('messages.users_listUsers.create_users') }}</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
<br>
|
||||||
|
<form method="POST" action="{{ route('logout') }}">
|
||||||
|
@csrf
|
||||||
|
<button type="submit" class="btn btn-danger">Terminar sessão</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<!-- /.Single menu item -->
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<!-- /.sidebar-menu -->
|
||||||
|
</div>
|
||||||
|
<!-- /.sidebar -->
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
@yield('Main-content')
|
||||||
|
{{-- <section class="content">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
./col-md-12
|
||||||
|
</div>
|
||||||
|
./row justify-content-center
|
||||||
|
</div>
|
||||||
|
./container-fluid
|
||||||
|
</section> --}}
|
||||||
|
{{-- ./content --}}
|
||||||
|
</div>
|
||||||
|
{{-- ./content-wrapper --}}
|
||||||
|
|
||||||
|
<!-- Control Sidebar -->
|
||||||
|
<aside class="control-sidebar control-sidebar-dark">
|
||||||
|
<!-- Control sidebar content goes here -->
|
||||||
|
</aside>
|
||||||
|
<!-- /.control-sidebar -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- ./ Wrapper -->
|
||||||
|
|
||||||
|
<footer class="main-footer">
|
||||||
|
<strong>Copyright © 2017-{{ date('Y') }} <a href="https://www.isptgroup.com" id="isptGroupLink">ISPT
|
||||||
|
-
|
||||||
|
Industrial Services, SA</a>.</strong>
|
||||||
|
Todos os direitos reservados.
|
||||||
|
<div class="float-right d-none d-sm-inline-block">
|
||||||
|
<b>Versão</b> {{ config('app.version') }}
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
@yield('scriptsTemplateAdmin')
|
||||||
|
{{-- Scripts-Plugins --}}
|
||||||
|
|
||||||
|
<script src="{{ asset('assets/dist/js/bootstrap.bundle.min.js') }}"></script>
|
||||||
|
|
||||||
|
<script src="{{ asset('assets/plugins/jquery/jquery.min.js') }}"></script>
|
||||||
|
<!-- jQuery UI 1.11.4 -->
|
||||||
|
<script src="{{ asset('assets/plugins/jquery-ui/jquery-ui.min.js') }}"></script>
|
||||||
|
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
|
||||||
|
<script>
|
||||||
|
$.widget.bridge('uibutton', $.ui.button)
|
||||||
|
</script>
|
||||||
|
<!-- Bootstrap 4 -->
|
||||||
|
<script src="{{ asset('assets/plugins/bootstrap/js/bootstrap.bundle.min.js') }}"></script>
|
||||||
|
<script src="{{ asset('assets/plugins/bootstrap/js/bootstrap.bundle.min.js') }}"></script>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ChartJS -->
|
||||||
|
<script src="{{ asset('assets/plugins/chart.js/Chart.min.js') }}"></script>
|
||||||
|
<!-- Sparkline -->
|
||||||
|
<script src="{{ asset('assets/plugins/sparklines/sparkline.js') }}"></script>
|
||||||
|
<!-- JQVMap -->
|
||||||
|
<script src="{{ asset('assets/plugins/jqvmap/jquery.vmap.min.js') }}"></script>
|
||||||
|
<script src="{{ asset('assets/plugins/jqvmap/maps/jquery.vmap.usa.js') }}"></script>
|
||||||
|
<!-- jQuery Knob Chart -->
|
||||||
|
<script src="{{ asset('assets/plugins/jquery-knob/jquery.knob.min.js') }}"></script>
|
||||||
|
<!-- daterangepicker -->
|
||||||
|
<script src="{{ asset('assets/plugins/moment/moment.min.js') }}"></script>
|
||||||
|
<script src="{{ asset('assets/plugins/daterangepicker/daterangepicker.js') }}"></script>
|
||||||
|
<!-- Tempusdominus Bootstrap 4 -->
|
||||||
|
<script src="{{ asset('assets/plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js') }}"></script>
|
||||||
|
<!-- Summernote -->
|
||||||
|
<script src="{{ asset('assets/plugins/summernote/summernote-bs4.min.js') }}"></script>
|
||||||
|
<!-- overlayScrollbars -->
|
||||||
|
<script src="{{ asset('assets/plugins/overlayScrollbars/js/jquery.overlayScrollbars.min.js') }}"></script>
|
||||||
|
<!-- AdminLTE App -->
|
||||||
|
<script src="{{ asset('assets/dist/js/adminlte.js') }}"></script>
|
||||||
|
<!-- AdminLTE for demo purposes -->
|
||||||
|
{{-- <script src="{{ asset('js/demo.js') }}"></script>
|
||||||
|
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
|
||||||
|
<script src="{{ asset('js/pages/dashboard.js') }}"></script> --}}
|
||||||
|
<!-- jQuery Script fadeIn fadeOut for the dropdown -->
|
||||||
|
<script src="{{ asset('assets/plugins/datatables/jquery.dataTables.min.js') }}"></script>
|
||||||
|
|
||||||
|
<script src="{{ asset('assets/plugins/datatables-bs4/js/dataTables.bootstrap4.min.js') }}"></script>
|
||||||
|
<script src="{{ asset('assets/plugins/datatables-responsive/js/dataTables.responsive.min.js') }}"></script>
|
||||||
|
<script src="{{ asset('assets/plugins/datatables-responsive/js/responsive.bootstrap4.min.js') }}"></script>
|
||||||
|
|
||||||
|
<script src="{{ asset('assets/plugins/datatables-buttons/js/dataTables.buttons.min.js') }}"></script>
|
||||||
|
<script src="{{ asset('assets/plugins/datatables-buttons/js/buttons.bootstrap4.min.js') }}"></script>
|
||||||
|
<script src="{{ asset('assets/plugins/jszip/jszip.min.js') }}"></script>
|
||||||
|
<script src="{{ asset('assets/plugins/pdfmake/pdfmake.min.js') }}"></script>
|
||||||
|
<script src="{{ asset('assets/plugins/pdfmake/vfs_fonts.js') }}"></script>
|
||||||
|
|
||||||
|
|
||||||
|
<script src="{{ asset('assets/plugins/datatables-buttons/js/buttons.html5.min.js') }}"></script>
|
||||||
|
<script src="{{ asset('assets/plugins/datatables-buttons/js/buttons.print.min.js') }}"></script>
|
||||||
|
<script src="{{ asset('assets/plugins/datatables-buttons/js/buttons.colVis.min.js') }}"></script>
|
||||||
|
|
||||||
|
</html>
|
||||||
|
|
@ -6,19 +6,17 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||||
|
|
||||||
|
<title>{{ config('app.name') }}</title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="{{ asset('assets/dist/css/adminlte.css') }}">
|
<link rel="stylesheet" href="{{ asset('assets/dist/css/adminlte.css') }}">
|
||||||
|
|
||||||
<link rel="stylesheet"
|
<link rel="stylesheet"
|
||||||
href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
|
href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
|
||||||
|
|
||||||
<!-- Font Awesome -->
|
<!-- Font Awesome -->
|
||||||
{{-- <link rel="stylesheet" href="{{ asset('assets/plugins/fontawesome-free/css/all.min.css') }}"> --}}
|
|
||||||
<!-- Font Awesome 6.1.1 -->
|
|
||||||
{{-- <link rel="stylesheet" href="{{ asset('plugins/fontawesome-611/css/all.min.css') }}"> --}}
|
|
||||||
<link rel="stylesheet" href="{{ asset('assets/plugins/fontawesome-6.4.2/css/all.css') }}">
|
<link rel="stylesheet" href="{{ asset('assets/plugins/fontawesome-6.4.2/css/all.css') }}">
|
||||||
|
|
||||||
|
<!-- Ionicons - 6.4.2 -->
|
||||||
<!-- Ionicons -->
|
|
||||||
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
|
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
|
||||||
<!-- Tempusdominus Bootstrap 4 -->
|
<!-- Tempusdominus Bootstrap 4 -->
|
||||||
<link rel="stylesheet"
|
<link rel="stylesheet"
|
||||||
|
|
@ -75,6 +73,7 @@
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
/* Permite a rolagem vertical se o conteúdo exceder a altura máxima */
|
/* Permite a rolagem vertical se o conteúdo exceder a altura máxima */
|
||||||
}
|
}
|
||||||
|
|
||||||
.scrollable-list-xl {
|
.scrollable-list-xl {
|
||||||
max-height: 600px;
|
max-height: 600px;
|
||||||
/* Ajuste a altura máxima conforme necessário */
|
/* Ajuste a altura máxima conforme necessário */
|
||||||
|
|
@ -216,219 +215,22 @@
|
||||||
<!-- Wrapper -->
|
<!-- Wrapper -->
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
|
|
||||||
<!-- Preloader -->
|
<!-- Preloader -->
|
||||||
|
<div class="preloader flex-column justify-content-center align-items-center">
|
||||||
<div class="preloader flex-column justify-content-center align-items-center">
|
|
||||||
<img class="animation__shake spin" src="{{ asset('img/logo4.0.jpg') }}" alt="AdminLTELogo" height="60"
|
<img class="animation__shake spin" src="{{ asset('img/logo4.0.jpg') }}" alt="AdminLTELogo" height="60"
|
||||||
width="60">
|
width="60">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Navbar -->
|
<!-- Se o utilizador - Tecnico se logar, quer dizer que deve exebir o WorkstationsLayout ,se nao exibe outro para Admins e Clientes -->
|
||||||
<nav class="main-header navbar navbar-expand navbar-white navbar-light">
|
{{-- @if (Auth::user()->type_users == 5) --}}
|
||||||
<!-- Left navbar links -->
|
|
||||||
<ul class="navbar-nav">
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" data-widget="pushmenu" href="#" role="button"><i
|
|
||||||
class="fas fa-bars"></i></a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
@yield('Content-WorkstationsLayout')
|
||||||
|
|
||||||
|
{{-- @else --}}
|
||||||
|
|
||||||
|
@yield('Content-AdminLayout')
|
||||||
|
|
||||||
<!-- Right navbar links -->
|
{{-- @endif --}}
|
||||||
<ul class="navbar-nav ml-auto align-items-center">
|
|
||||||
<li class="nav-item my-2">
|
|
||||||
<form id="language-form" action="{{ route('language.switch') }}" method="post"
|
|
||||||
class="form-inline">
|
|
||||||
@csrf
|
|
||||||
<select class="custom-select" name="locale" onchange="this.form.submit()">
|
|
||||||
<option value="pt" {{ app()->getLocale() == 'pt' ? 'selected' : '' }}>Português </option>
|
|
||||||
<option value="en" {{ app()->getLocale() == 'en' ? 'selected' : '' }}>English</option>
|
|
||||||
</select>
|
|
||||||
</form>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" data-widget="fullscreen" href="#" role="button">
|
|
||||||
<i class="fas fa-expand-arrows-alt"></i>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</nav>
|
|
||||||
<!-- /.navbar -->
|
|
||||||
|
|
||||||
<!-- Main Sidebar Container -->
|
|
||||||
<aside class="main-sidebar sidebar-dark-primary elevation-4">
|
|
||||||
<!-- Brand Logo -->
|
|
||||||
<a href="#" class="brand-link" style="pointer-events: none;">
|
|
||||||
<img src="{{ asset('/img/ispt.jpg') }}" alt="AdminLTE Logo" class="brand-image img-circle elevation-3"
|
|
||||||
style="opacity: .8">
|
|
||||||
<span class="brand-text font-weight-light">ISPT 4.0</span>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<!-- Sidebar -->
|
|
||||||
<div class="sidebar">
|
|
||||||
<!-- Sidebar user panel (optional) -->
|
|
||||||
<div class="user-panel mt-3 pb-3 mb-3 d-flex">
|
|
||||||
{{-- Verifica se esta logado , se estiver , busca os dados do utilizador atual. --}}
|
|
||||||
@if (Auth::check())
|
|
||||||
<div class="image">
|
|
||||||
<img class="img-circle elevation-2 imgProfile editImg"
|
|
||||||
src="{{ asset('user_logos/' . (Auth::user()->user_logo ?? 'logoISPT4.0.jpg')) }}"
|
|
||||||
alt="User Logo">
|
|
||||||
</div>
|
|
||||||
<div class="info">
|
|
||||||
<a href="{{ route('usersProfiles', ['id' => Auth::user()->user_id]) }}"
|
|
||||||
class="d-block">{{ Auth::user()->userType?->type_user }}</a>
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Sidebar Menu -->
|
|
||||||
<nav class="mt-2">
|
|
||||||
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu"
|
|
||||||
data-accordion="false">
|
|
||||||
|
|
||||||
|
|
||||||
{{-- Menu para Administradores e Super --}}
|
|
||||||
@if (Auth::user()->type_users == 1 || Auth::user()->type_users == 2)
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="{{ route('home') }}" class="nav-link active">
|
|
||||||
<i class="nav-icon fas fa-tachometer-alt"></i>
|
|
||||||
<p> {{ __('messages.dashboard.dashboard') }} </p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="{{ route('createProject') }}" class="nav-link">
|
|
||||||
<i class="nav-icon fas fa-helmet-safety"></i>
|
|
||||||
<p> {{ __('messages.createProject.create_project') }} </p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
{{-- Relatorios para os Admin, SuperAdmin --}}
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="{{ route('showAllClientsForProjectReports') }}" class="nav-link">
|
|
||||||
<i class="nav-icon fas fa-file"></i>
|
|
||||||
<p>
|
|
||||||
Relatórios
|
|
||||||
</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="#" class="nav-link">
|
|
||||||
<i class="nav-icon fas fa-briefcase"></i>
|
|
||||||
<p> {{ __('messages.portfolio.top_view_part.portfolio') }}
|
|
||||||
<i class="fas fa-angle-left right"></i>
|
|
||||||
</p>
|
|
||||||
</a>
|
|
||||||
<ul class="nav nav-treeview">
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="{{ route('manageAssets') }}" class="nav-link">
|
|
||||||
<i class="fa-solid fa-file-edit"></i>
|
|
||||||
<p> {{ __('messages.portfolio.top_view_part.management_assets') }}</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
{{-- Menu para Cliente --}}
|
|
||||||
@elseif (Auth::user()->type_users == 3)
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="{{ route('dashboardClient') }}" class="nav-link active">
|
|
||||||
<i class="nav-icon fas fa-tachometer-alt"></i>
|
|
||||||
<p> {{ __('messages.dashboard.dashboard') }} </p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="{{ route('reportingDataClient') }}" class="nav-link">
|
|
||||||
<i class="nav-icon fas fa-file"></i>
|
|
||||||
<p> Relatórios Cliente </p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="{{ route('manageAssetsClient') }}" class="nav-link">
|
|
||||||
<i class="nav-icon fa-solid fa-file-edit"></i>
|
|
||||||
<p> {{ __('messages.portfolio.top_view_part.management_assets') }}</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Apenas os Super Admins e Admin tem acesso a estas Rotas -->
|
|
||||||
@if (Auth::user()->type_users == 1 || Auth::user()->type_users == 2)
|
|
||||||
<!-- Single menu item -->
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="#" class="nav-link">
|
|
||||||
<i class="nav-icon fas fa-gear"></i>
|
|
||||||
<p> {{ __('messages.users_listUsers.top_view_part.administration') }}
|
|
||||||
<i class="fas fa-angle-left right"></i>
|
|
||||||
</p>
|
|
||||||
</a>
|
|
||||||
<ul class="nav nav-treeview">
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="{{ route('users.list') }}" class="nav-link">
|
|
||||||
<i class="fa-solid fa-users"></i>
|
|
||||||
<p>{{ __('messages.users_listUsers.users') }}</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="{{ route('users.company') }}" class="nav-link">
|
|
||||||
<i class="fa-solid fa-house-user"></i>
|
|
||||||
<p>{{ __('messages.users_listUsers.companies') }}</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="{{ route('CreateUsers') }}" class="nav-link">
|
|
||||||
<i class="nav-icon fas fa-gear"></i>
|
|
||||||
<p>{{ __('messages.users_listUsers.create_users') }}</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
@endif
|
|
||||||
<br>
|
|
||||||
<form method="POST" action="{{ route('logout') }}">
|
|
||||||
@csrf
|
|
||||||
<button type="submit" class="btn btn-danger">Terminar sessão</button>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<!-- /.Single menu item -->
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
<!-- /.sidebar-menu -->
|
|
||||||
</div>
|
|
||||||
<!-- /.sidebar -->
|
|
||||||
</aside>
|
|
||||||
|
|
||||||
<div class="content-wrapper">
|
|
||||||
@yield('Main-content')
|
|
||||||
{{-- <section class="content">
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<div class="col-md-12">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
./col-md-12
|
|
||||||
</div>
|
|
||||||
./row justify-content-center
|
|
||||||
</div>
|
|
||||||
./container-fluid
|
|
||||||
</section> --}}
|
|
||||||
{{-- ./content --}}
|
|
||||||
</div>
|
|
||||||
{{-- ./content-wrapper --}}
|
|
||||||
|
|
||||||
<!-- Control Sidebar -->
|
|
||||||
<aside class="control-sidebar control-sidebar-dark">
|
|
||||||
<!-- Control sidebar content goes here -->
|
|
||||||
</aside>
|
|
||||||
<!-- /.control-sidebar -->
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- ./ Wrapper -->
|
<!-- ./ Wrapper -->
|
||||||
|
|
@ -503,4 +305,21 @@ class="d-block">{{ Auth::user()->userType?->type_user }}</a>
|
||||||
<script src="{{ asset('assets/plugins/datatables-buttons/js/buttons.print.min.js') }}"></script>
|
<script src="{{ asset('assets/plugins/datatables-buttons/js/buttons.print.min.js') }}"></script>
|
||||||
<script src="{{ asset('assets/plugins/datatables-buttons/js/buttons.colVis.min.js') }}"></script>
|
<script src="{{ asset('assets/plugins/datatables-buttons/js/buttons.colVis.min.js') }}"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Script para abrir os card sem tem que click diretamente no icone -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('.clickable').on('click', function(e) {
|
||||||
|
// Verifica se o clique não foi no botão
|
||||||
|
if (!$(e.target).is('.collapse-button') && !$(e.target).is('.collapse-button *')) {
|
||||||
|
$(this).find('.collapse-button').trigger('click');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
740
resources/views/Templates/templateWorkstations.blade copy.php
Executable file
|
|
@ -0,0 +1,740 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<title>{{ config('app.name') }}</title>
|
||||||
|
|
||||||
|
<link rel="icon" type="image/x-icon" href="{{ URL::asset('assets/dist/img/favicon.ico') }}">
|
||||||
|
|
||||||
|
<!-- Google Font: Source Sans Pro -->
|
||||||
|
<link rel="stylesheet"
|
||||||
|
href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
|
||||||
|
|
||||||
|
<!-- Font Awesome -->
|
||||||
|
{{--
|
||||||
|
<link rel="stylesheet" href="{{ URL::asset('assets/plugins/fontawesome-free/css/all.min.css') }}"> --}}
|
||||||
|
<link rel="stylesheet" href="{{ asset('assets/plugins/fontawesome-6.4.2/css/all.css') }}">
|
||||||
|
|
||||||
|
<!-- Ionicons -->
|
||||||
|
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
|
||||||
|
<!-- Tempusdominus Bootstrap 4 -->
|
||||||
|
<link rel="stylesheet"
|
||||||
|
href="{{ URL::asset('assets/plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css') }}">
|
||||||
|
<!-- iCheck -->
|
||||||
|
<link rel="stylesheet" href="{{ URL::asset('assets/plugins/icheck-bootstrap/icheck-bootstrap.min.css') }}">
|
||||||
|
<!-- JQVMap -->
|
||||||
|
<link rel="stylesheet" href="{{ URL::asset('assets/plugins/jqvmap/jqvmap.min.css') }}">
|
||||||
|
<!-- Theme style -->
|
||||||
|
<link rel="stylesheet" href="{{ URL::asset('assets/dist/css/adminlte.min.css') }}">
|
||||||
|
<!-- overlayScrollbars -->
|
||||||
|
<link rel="stylesheet" href="{{ URL::asset('assets/plugins/overlayScrollbars/css/OverlayScrollbars.min.css') }}">
|
||||||
|
<!-- Daterange picker -->
|
||||||
|
<link rel="stylesheet" href="{{ URL::asset('assets/plugins/daterangepicker/daterangepicker.css') }}">
|
||||||
|
<!-- summernote -->
|
||||||
|
<link rel="stylesheet" href="{{ URL::asset('assets/plugins/summernote/summernote-bs4.min.css') }}">
|
||||||
|
|
||||||
|
<!-- Bootstrap CSS -->
|
||||||
|
{{--
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"> --}}
|
||||||
|
|
||||||
|
<!-- Bootstrap JS Bundle (inclui Popper) -->
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
[class*=sidebar-dark] .btn-sidebar2,
|
||||||
|
[class*=sidebar-dark] .form-control-sidebar2 {
|
||||||
|
background-color: #3f474e;
|
||||||
|
border: 1px solid #56606a;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Css para icon de validacao da TE7 */
|
||||||
|
.info-icon {
|
||||||
|
width: 25px;
|
||||||
|
height: 25px;
|
||||||
|
background-color: #dc3545;
|
||||||
|
/* Vermelho por padrão */
|
||||||
|
color: white;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 25px;
|
||||||
|
border-radius: 50%;
|
||||||
|
cursor: pointer;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-box {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
top: -35px;
|
||||||
|
/* Ajuste para posicionar acima do ícone */
|
||||||
|
left: 50%;
|
||||||
|
/* Alinhar ao centro do ícone */
|
||||||
|
transform: translateX(-50%);
|
||||||
|
padding: 10px;
|
||||||
|
background-color: #343a40;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 5px;
|
||||||
|
white-space: nowrap;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-box.green {
|
||||||
|
background-color: #28a745;
|
||||||
|
/* Verde */
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-box.red {
|
||||||
|
background-color: #dc3545;
|
||||||
|
/* Vermelho */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* /* Css para icon de validacao da TE7 */
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="hold-transition sidebar-mini layout-fixed">
|
||||||
|
<div class="wrapper">
|
||||||
|
|
||||||
|
<!-- Navbar -->
|
||||||
|
<!-- Parte de cima da pagina (header)-->
|
||||||
|
<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">
|
||||||
|
<a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"
|
||||||
|
style="color:#1f2d3d"></i></a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link">
|
||||||
|
<i class="fas fa-play" style="color:#1f3d2f"></i>
|
||||||
|
<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-hourglass-start" style="color:#1f2d3d"></i>
|
||||||
|
<span class="badge badge-success navbar-badge" style="background-color: #1b4cad;">{{
|
||||||
|
count($executionEquipment) }} </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>
|
||||||
|
<span class="badge badge-success navbar-badge" style="background-color: #28a745">{{
|
||||||
|
count($completedEquipments) }} </span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<!-- Right navbar links -->
|
||||||
|
<ul class="navbar-nav ml-auto">
|
||||||
|
<li class="nav-item d-none d-sm-inline-block">
|
||||||
|
<!--<div class="nav-link">{{ Auth::user()->user_name }}</div>-->
|
||||||
|
<div class="nav-link" style="color:#1f2d3d">{{ $receiveDataWs->nomenclature_workstation }}</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<!-- User Dropdown Menu -->
|
||||||
|
<li class="nav-item dropdown">
|
||||||
|
|
||||||
|
|
||||||
|
<a class="nav-link" data-toggle="dropdown" href="#">
|
||||||
|
<img src="{{ URL::asset('assets/dist/img/ispt.jpg') }}" class="img-circle elevation-2"
|
||||||
|
alt="User Image" style="width:30px;height:30px;">
|
||||||
|
</a>
|
||||||
|
<div class="dropdown-menu dropdown-menu-right">
|
||||||
|
|
||||||
|
<div class="nav-link" style="color:#1f2d3d">{{ $receiveDataWs->nomenclature_workstation }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form id="logout-form" action="{{ route('logout') }}" method="POST">
|
||||||
|
@csrf
|
||||||
|
|
||||||
|
@method('POST')
|
||||||
|
<a class="dropdown-item" href="{{ route('logout') }}"
|
||||||
|
onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
|
||||||
|
<i class="fas fa-sign-out-alt text-danger"></i>
|
||||||
|
<span>Terminar sessão</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
<!-- /.navbar -->
|
||||||
|
|
||||||
|
<!-- Main Sidebar Container -->
|
||||||
|
<aside class="main-sidebar sidebar-dark-primary elevation-4" style="background-color: #09255C">
|
||||||
|
<!-- Brand Logo -->
|
||||||
|
<p class="brand-link">
|
||||||
|
<img src="{{ URL::asset('assets/dist/img/ispt40.jpg') }}" alt="Ispt4.0 Logo"
|
||||||
|
class="brand-image img-circle elevation-3" style="opacity: .8">
|
||||||
|
<span class="brand-text font-weight-light">{{ config('app.name') }}</span>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<!-- Sidebar -->
|
||||||
|
<div class="sidebar mt-4">
|
||||||
|
|
||||||
|
<!-- SidebarSearch Form -->
|
||||||
|
<div class="form-inline">
|
||||||
|
<div class="input-group" data-widget="sidebar-search">
|
||||||
|
<input id="qrtextleft" class="form-control form-control-sidebar text-white" type="search"
|
||||||
|
placeholder="Tag/Equipamento" aria-label="Search">
|
||||||
|
<div class="input-group-append">
|
||||||
|
<button class="btn btn-sidebar" onclick="triggerSearchFromInput()">
|
||||||
|
<i class="fas fa-search fa-fw text-white"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Sidebar Menu -->
|
||||||
|
<nav class="mt-5">
|
||||||
|
|
||||||
|
<ul class="nav nav-pills nav-sidebar flex-column searchable" data-widget="treeview" role="menu"
|
||||||
|
data-accordion="false">
|
||||||
|
|
||||||
|
<!-- Por iniciar -->
|
||||||
|
<li class="nav-item has-treeview menu-closed">
|
||||||
|
<a href="#" class="nav-link text-white" style="background-color: #007BFF;">
|
||||||
|
<i class="nav-icon fas fa-play"></i>
|
||||||
|
<p>
|
||||||
|
Por iniciar: {{ count($receiveAllEquipmentOfProject) }}
|
||||||
|
<i class="right fas fa-angle-left"></i>
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
<ul class="nav nav-treeview pl-3">
|
||||||
|
@foreach ($receiveAllEquipmentOfProject as $equipmentOfProject)
|
||||||
|
<div class="row text-white">
|
||||||
|
<div class="col d-flex align-items-center ml-3">
|
||||||
|
<i class="fas fa-tag mr-2"></i>
|
||||||
|
<p class="mb-0 text-truncate" style="flex-grow: 1;">
|
||||||
|
{{ $equipmentOfProject->equipment_tag }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<!-- Em execução -->
|
||||||
|
<li class="nav-item has-treeview menu-closed mt-1">
|
||||||
|
<a href="#" class="nav-link text-white" style="background-color: #1b4cad;">
|
||||||
|
{{-- <i class="fa-solid fa-rotate-left"></i> --}}
|
||||||
|
<i class="fa-solid fa-hourglass-start"></i>
|
||||||
|
<p>
|
||||||
|
Em execução : {{ count($executionEquipment) }}
|
||||||
|
<i class="right fas fa-angle-left"></i>
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
<ul class="nav nav-treeview">
|
||||||
|
@foreach ($executionEquipment as $equipmentOfProject)
|
||||||
|
<div class="row text-white">
|
||||||
|
<div class="col d-flex align-items-center ml-3">
|
||||||
|
<i class="fas fa-tag mr-2"></i>
|
||||||
|
<p class="mb-0 text-truncate" style="flex-grow: 1;">
|
||||||
|
{{ $equipmentOfProject->equipment_tag }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<!-- Por rever -->
|
||||||
|
<li class="nav-item has-treeview menu-closed mt-1">
|
||||||
|
<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 d-flex align-items-center ml-3">
|
||||||
|
<i class="fas fa-tag mr-2"></i>
|
||||||
|
<p class="mb-0 text-truncate" style="flex-grow: 1;">
|
||||||
|
{{ $equipmentOfProject->equipment_tag }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<!-- Concluidos -->
|
||||||
|
<li class="nav-item has-treeview menu-closed mt-1">
|
||||||
|
<a href="#" class="nav-link text-white" style="background-color: green;">
|
||||||
|
<i class="nav-icon fas fa-check"></i>
|
||||||
|
<p> Concluidos :
|
||||||
|
{{ count($completedEquipments) }}
|
||||||
|
<!-- válvulas concluídas -->
|
||||||
|
<i class="right fas fa-angle-left"></i>
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
<ul class="nav nav-treeview">
|
||||||
|
@foreach ($completedEquipments as $equipmentDone)
|
||||||
|
<div class="row text-white">
|
||||||
|
<div class="col d-flex align-items-center ml-3">
|
||||||
|
<i class="fas fa-tag mr-2"></i>
|
||||||
|
<p class="mb-0 text-truncate" style="flex-grow: 1;">
|
||||||
|
{{ $equipmentDone->equipment_tag }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<ul class="nav nav-pills nav-sidebar flex-column searchable" id="qrcode-equipment-list"
|
||||||
|
style="display: none;">
|
||||||
|
<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) }} a iniciar QrCodes
|
||||||
|
<i class="right fas fa-angle-left"></i>
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
<ul class="nav nav-treeview">
|
||||||
|
@foreach ($receiveQrcodeEquipmentsProject as $equipmentOfProject)
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="{{ route('getEquipmentData', ['equipment_id' => $equipmentOfProject->equipment_id, 'component_tag' => $equipmentOfProject->component_tag]) }}"
|
||||||
|
class="nav-link text-white">
|
||||||
|
<i class="fas fa-tag nav-icon"></i>
|
||||||
|
<p class="Tags">{{ $equipmentOfProject->component_tag }}</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
<!-- /.sidebar-menu -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- /.sidebar -->
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
<!-- Content Wrapper. Contains page content -->
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<!-- Content Header (Page header) -->
|
||||||
|
{{-- <div class="content-header">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row mb-2">
|
||||||
|
<!-- Info box1 -->
|
||||||
|
<div class="col-sm-6">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- /.col -->
|
||||||
|
<div class="col-sm-6">
|
||||||
|
|
||||||
|
</div><!-- /.col -->
|
||||||
|
</div><!-- /.row -->
|
||||||
|
</div><!-- /.container-fluid -->
|
||||||
|
</div> --}}
|
||||||
|
<!-- /.content-header -->
|
||||||
|
|
||||||
|
<!-- Main content -->
|
||||||
|
<section class="content">
|
||||||
|
@yield('content')
|
||||||
|
</section>
|
||||||
|
<!-- /.content -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- /.content-wrapper -->
|
||||||
|
{{-- <footer class="main-footer" style="background-color: #00B0EA">
|
||||||
|
<strong>Copyright © 2017-{{ date('Y') }} <a href="https://www.isptgroup.com" target="_blank">ISPT -
|
||||||
|
Industrial Services,
|
||||||
|
SA</a>.</strong>
|
||||||
|
Todos os direitos reservados.
|
||||||
|
<div class="float-right d-none d-sm-inline-block">
|
||||||
|
<b>Versão</b> {{ config('app.version') }}
|
||||||
|
</div>
|
||||||
|
</footer> --}}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- ./wrapper -->
|
||||||
|
|
||||||
|
<!-- jQuery -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/jquery/jquery.min.js') }}"></script>
|
||||||
|
<!-- jQuery UI 1.11.4 -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/jquery-ui/jquery-ui.min.js') }}"></script>
|
||||||
|
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
|
||||||
|
<script>
|
||||||
|
$.widget.bridge('uibutton', $.ui.button)
|
||||||
|
</script>
|
||||||
|
<!-- Bootstrap 4 -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/bootstrap/js/bootstrap.bundle.min.js') }}"></script>
|
||||||
|
<!-- ChartJS -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/chart.js/Chart.min.js') }}"></script>
|
||||||
|
<!-- Sparkline -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/sparklines/sparkline.js') }}"></script>
|
||||||
|
<!-- JQVMap -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/jqvmap/jquery.vmap.min.js') }}"></script>
|
||||||
|
<script src="{{ URL::asset('assets/plugins/jqvmap/maps/jquery.vmap.usa.js') }}"></script>
|
||||||
|
<!-- jQuery Knob Chart -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/jquery-knob/jquery.knob.min.js') }}"></script>
|
||||||
|
<!-- daterangepicker -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/moment/moment.min.js') }}"></script>
|
||||||
|
<script src="{{ URL::asset('assets/plugins/daterangepicker/daterangepicker.js') }}"></script>
|
||||||
|
<!-- Tempusdominus Bootstrap 4 -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js') }}">
|
||||||
|
</script>
|
||||||
|
<!-- Summernote -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/summernote/summernote-bs4.min.js') }}"></script>
|
||||||
|
<!-- overlayScrollbars -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/overlayScrollbars/js/jquery.overlayScrollbars.min.js') }}"></script>
|
||||||
|
<!-- AdminLTE App -->
|
||||||
|
<script src="{{ URL::asset('assets/dist/js/adminlte.js') }}"></script>
|
||||||
|
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
|
||||||
|
<script src="{{ URL::asset('assets/dist/js/pages/dashboard.js') }}"></script>
|
||||||
|
<!-- HTML5 QRCode-->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/html5-qrcode/html5-qrcode.min.js') }}"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// Função para simular uma pesquisa manual ao escanear o QR Code
|
||||||
|
function simulateManualSearch(value) {
|
||||||
|
var searchInput = document.getElementById("qrtextleft"); // Campo de busca
|
||||||
|
searchInput.value = value; // Insere o valor do QR code no campo de busca
|
||||||
|
|
||||||
|
// Simula o evento de digitação no campo de busca para ativar o search
|
||||||
|
var event = new Event('input', {
|
||||||
|
bubbles: true,
|
||||||
|
cancelable: true,
|
||||||
|
});
|
||||||
|
searchInput.dispatchEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Função para realizar a busca e navegação (após a leitura do QR code ou busca manual)
|
||||||
|
function searchForValueAndNavigate(value, itemsSelector, containerSelector) {
|
||||||
|
var searchQuery = value.toLowerCase();
|
||||||
|
var found = false; // Variável para verificar se encontrou o item
|
||||||
|
|
||||||
|
$(itemsSelector).each(function () {
|
||||||
|
var itemText = $(this).text().toLowerCase();
|
||||||
|
if (itemText.includes(searchQuery)) {
|
||||||
|
found = true;
|
||||||
|
window.location.href = $(this).attr('href'); // Navegar para a URL correspondente
|
||||||
|
return false; // Sair do loop após encontrar a correspondência
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Se não encontrar correspondência, fecha os itens abertos
|
||||||
|
if (!found) {
|
||||||
|
$(containerSelector + ' .nav-item.menu-open').each(function () {
|
||||||
|
$(this).removeClass('menu-open').addClass('menu-closed');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Função de busca manual por input (usada no botão de busca)
|
||||||
|
function triggerSearchFromInput() {
|
||||||
|
let searchInput = document.getElementById("qrtextleft").value;
|
||||||
|
searchForValueAndNavigate(searchInput, '#qrcode-equipment-list li a', '#qrcode-equipment-list');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Configuração do QR Code Scanner
|
||||||
|
let scanner = new Html5Qrcode("reader");
|
||||||
|
let startScan = document.getElementById("startScan");
|
||||||
|
let reader = document.getElementById("reader");
|
||||||
|
|
||||||
|
startScan.addEventListener('click', function () {
|
||||||
|
// Esconde o botão de início e exibe o leitor de QR Code
|
||||||
|
startScan.style.display = "none";
|
||||||
|
reader.style.display = "block";
|
||||||
|
|
||||||
|
scanner.start({
|
||||||
|
facingMode: "environment"
|
||||||
|
}, {
|
||||||
|
fps: 20,
|
||||||
|
qrbox: {
|
||||||
|
width: 250,
|
||||||
|
height: 250
|
||||||
|
}
|
||||||
|
},
|
||||||
|
function (qrCodeMessage) {
|
||||||
|
// Ao escanear o QR Code, simula a pesquisa
|
||||||
|
scanner.stop().then(() => {
|
||||||
|
simulateManualSearch(
|
||||||
|
qrCodeMessage); // Preenche o campo de busca e simula a digitação
|
||||||
|
reader.style.display = "none";
|
||||||
|
startScan.style.display = "block";
|
||||||
|
|
||||||
|
// Aciona a navegação automática se encontrar o valor correspondente
|
||||||
|
searchForValueAndNavigate(qrCodeMessage, '#qrcode-equipment-list li a',
|
||||||
|
'#qrcode-equipment-list');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
function (errorMessage) {
|
||||||
|
// Em caso de erro no scan
|
||||||
|
console.log(errorMessage);
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Função para lidar com a pesquisa no campo de input e exibir resultados dinamicamente
|
||||||
|
function handleSearch(inputSelector, itemsSelector, containerSelector) {
|
||||||
|
$(inputSelector).on('keyup', function () {
|
||||||
|
var searchQuery = $(this).val().toLowerCase();
|
||||||
|
var found = false; // Variável para verificar se encontrou algum item
|
||||||
|
|
||||||
|
$(itemsSelector).each(function () {
|
||||||
|
var itemText = $(this).text().toLowerCase();
|
||||||
|
if (itemText.includes(searchQuery)) {
|
||||||
|
$(this).show();
|
||||||
|
found = true;
|
||||||
|
} else {
|
||||||
|
$(this).hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Altera a classe dos itens <li> quando o item é encontrado ou não
|
||||||
|
if (found) {
|
||||||
|
$(containerSelector + ' .nav-item.menu-closed').each(function () {
|
||||||
|
$(this).removeClass('menu-closed').addClass('menu-open');
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
$(containerSelector + ' .nav-item.menu-open').each(function () {
|
||||||
|
$(this).removeClass('menu-open').addClass('menu-closed');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Aplicando a funcionalidade de pesquisa ao campo de pesquisa principal
|
||||||
|
handleSearch('#qrtextleft', '.searchable .nav.nav-pills.nav-sidebar.flex-column li.tags', '.searchable');
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{{--
|
||||||
|
<script>
|
||||||
|
function simulateManualSearch(value) {
|
||||||
|
var searchInput = document.getElementById("qrtextleft"); // O campo de busca
|
||||||
|
searchInput.value = value; // Insere o valor do QR code no campo de busca
|
||||||
|
|
||||||
|
// Simula o evento de digitação no campo de busca para ativar o search
|
||||||
|
var event = new Event('input', {
|
||||||
|
bubbles: true,
|
||||||
|
cancelable: true,
|
||||||
|
});
|
||||||
|
searchInput.dispatchEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
let scanner = new Html5Qrcode("reader");
|
||||||
|
let startScan = document.getElementById("startScan");
|
||||||
|
let reader = document.getElementById("reader");
|
||||||
|
|
||||||
|
startScan.addEventListener('click', function () {
|
||||||
|
// Hide the startScan button and show the reader
|
||||||
|
startScan.style.display = "none";
|
||||||
|
reader.style.display = "block";
|
||||||
|
|
||||||
|
scanner.start({
|
||||||
|
facingMode: "environment"
|
||||||
|
}, {
|
||||||
|
fps: 20,
|
||||||
|
qrbox: {
|
||||||
|
width: 250,
|
||||||
|
height: 250
|
||||||
|
}
|
||||||
|
},
|
||||||
|
function (qrCodeMessage) {
|
||||||
|
// This is called when a QR Code is scanned
|
||||||
|
|
||||||
|
scanner.stop().then(() => {
|
||||||
|
// Simula a digitação manual com o valor do QR code
|
||||||
|
simulateManualSearch(qrCodeMessage);
|
||||||
|
|
||||||
|
reader.style.display = "none";
|
||||||
|
startScan.style.display = "block";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
function (errorMessage) {
|
||||||
|
// In case of errors
|
||||||
|
console.log(errorMessage);
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// Função para realizar a busca e navegação
|
||||||
|
function searchForValueAndNavigate(value, itemsSelector, containerSelector) {
|
||||||
|
var searchQuery = value.toLowerCase();
|
||||||
|
var found = false;
|
||||||
|
|
||||||
|
$(itemsSelector).each(function () {
|
||||||
|
var itemText = $(this).text().toLowerCase();
|
||||||
|
if (itemText.includes(searchQuery)) {
|
||||||
|
found = true;
|
||||||
|
window.location.href = $(this).attr('href'); // Navegar para a URL correspondente
|
||||||
|
return false; // Sair do loop após encontrar a correspondência
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Se não encontrar correspondência, fecha os itens abertos
|
||||||
|
if (!found) {
|
||||||
|
$(containerSelector + ' .nav-item.menu-open').each(function () {
|
||||||
|
$(this).removeClass('menu-open').addClass('menu-closed');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Função de busca manual por input
|
||||||
|
function triggerSearchFromInput() {
|
||||||
|
let searchInput = document.getElementById("searchInput").value;
|
||||||
|
searchForValueAndNavigate(searchInput, '#qrcode-equipment-list li a', '#qrcode-equipment-list');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Configuração do QR Code Scanner
|
||||||
|
let scanner = new Html5Qrcode("reader");
|
||||||
|
let startScan = document.getElementById("startScan");
|
||||||
|
let reader = document.getElementById("reader");
|
||||||
|
let qrtextleft = document.getElementById("qrtextleft");
|
||||||
|
|
||||||
|
startScan.addEventListener('click', function () {
|
||||||
|
// Esconder o botão de início e mostrar o leitor
|
||||||
|
startScan.style.display = "none";
|
||||||
|
reader.style.display = "block";
|
||||||
|
|
||||||
|
scanner.start({
|
||||||
|
facingMode: "environment"
|
||||||
|
}, {
|
||||||
|
fps: 20,
|
||||||
|
qrbox: {
|
||||||
|
width: 250,
|
||||||
|
height: 250
|
||||||
|
}
|
||||||
|
},
|
||||||
|
function (qrCodeMessage) {
|
||||||
|
// Ao escanear o QR Code
|
||||||
|
scanner.stop().then(() => {
|
||||||
|
qrtextleft.value = qrCodeMessage; // Preenche o campo com o valor escaneado
|
||||||
|
reader.style.display = "none";
|
||||||
|
startScan.style.display = "block";
|
||||||
|
|
||||||
|
// Aciona a busca automaticamente
|
||||||
|
searchForValueAndNavigate(qrCodeMessage, '#qrcode-equipment-list li a',
|
||||||
|
'#qrcode-equipment-list');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
function (errorMessage) {
|
||||||
|
// Em caso de erro no scan
|
||||||
|
console.log(errorMessage);
|
||||||
|
}
|
||||||
|
).catch(err => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).ready(function () {
|
||||||
|
$(document).on('click', '[data-widget="control-treeview"] .nav-link', function (event) {
|
||||||
|
event.preventDefault();
|
||||||
|
var checkElement = $(this).next();
|
||||||
|
|
||||||
|
if ((checkElement.is('.nav-treeview')) && (checkElement.is(':visible'))) {
|
||||||
|
checkElement.slideUp('normal', function () {
|
||||||
|
checkElement.removeClass('menu-open');
|
||||||
|
});
|
||||||
|
checkElement.parent("li").removeClass("menu-open");
|
||||||
|
} else if ((checkElement.is('.nav-treeview')) && (!checkElement.is(':visible'))) {
|
||||||
|
var parent = $(this).parents('ul').first();
|
||||||
|
var ul = parent.find('ul:visible').slideUp('normal');
|
||||||
|
ul.removeClass('menu-open');
|
||||||
|
var parent_li = $(this).parent("li");
|
||||||
|
|
||||||
|
checkElement.slideDown('normal', function () {
|
||||||
|
checkElement.addClass('menu-open');
|
||||||
|
parent.find('.menu-open').not(checkElement).removeClass('menu-open');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (checkElement.is('.nav-treeview')) {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function handleSearch(inputSelector, itemsSelector, containerSelector) {
|
||||||
|
console.log(inputSelector);
|
||||||
|
$(inputSelector).on('keyup', function () {
|
||||||
|
var searchQuery = $(this).val().toLowerCase();
|
||||||
|
var found = false; // Variable to track if any item is found
|
||||||
|
|
||||||
|
$(itemsSelector).each(function () {
|
||||||
|
var itemText = $(this).text().toLowerCase();
|
||||||
|
if (itemText.includes(searchQuery)) {
|
||||||
|
$(this).show();
|
||||||
|
found = true;
|
||||||
|
} else {
|
||||||
|
$(this).hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// If any item is found, change the class of <li> elements
|
||||||
|
if (found) {
|
||||||
|
$(containerSelector + ' .nav-item.menu-closed').each(function () {
|
||||||
|
$(this).removeClass('menu-closed').addClass('menu-open');
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
$(containerSelector + ' .nav-item.menu-open').each(function () {
|
||||||
|
$(this).removeClass('menu-open').addClass('menu-closed');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Nao me parece fazer nada, nao encontrei funcionalidade ainda, ja que a pesquisa ainda e feita, e a selacao tambem.
|
||||||
|
handleSearch('#qrtextleft', '.searchable .nav.nav-pills.nav-sidebar.flex-column li.tags', '.searchable');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Apply the search functionality for the main sidebar
|
||||||
|
// handleSearch('#qrtextleft', '.main-sidebar .nav.nav-pills.nav-sidebar.flex-column li', '.main-sidebar');
|
||||||
|
|
||||||
|
// Apply the search functionality for the control sidebar
|
||||||
|
// handleSearch('#qrtextright', '.control-sidebar .nav.nav-pills.nav-sidebar.flex-column li', '.control-sidebar');
|
||||||
|
</script> --}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
|
|
@ -3,18 +3,18 @@
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
<meta charset="utf-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>{{ config('app.name') }}</title>
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||||
|
|
||||||
<link rel="icon" type="image/x-icon" href="{{ URL::asset('assets/dist/img/favicon.ico') }}">
|
<title>{{ config('app.name') }}</title>
|
||||||
|
|
||||||
<!-- Google Font: Source Sans Pro -->
|
<!-- Google Font: Source Sans Pro -->
|
||||||
<link rel="stylesheet"
|
<link rel="stylesheet"
|
||||||
href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
|
href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
|
||||||
|
|
||||||
<!-- Font Awesome -->
|
<!-- Font Awesome -->
|
||||||
{{-- <link rel="stylesheet" href="{{ URL::asset('assets/plugins/fontawesome-free/css/all.min.css') }}"> --}}
|
|
||||||
<link rel="stylesheet" href="{{ asset('assets/plugins/fontawesome-6.4.2/css/all.css') }}">
|
<link rel="stylesheet" href="{{ asset('assets/plugins/fontawesome-6.4.2/css/all.css') }}">
|
||||||
|
|
||||||
<!-- Ionicons -->
|
<!-- Ionicons -->
|
||||||
|
|
@ -26,727 +26,75 @@
|
||||||
<link rel="stylesheet" href="{{ URL::asset('assets/plugins/icheck-bootstrap/icheck-bootstrap.min.css') }}">
|
<link rel="stylesheet" href="{{ URL::asset('assets/plugins/icheck-bootstrap/icheck-bootstrap.min.css') }}">
|
||||||
<!-- JQVMap -->
|
<!-- JQVMap -->
|
||||||
<link rel="stylesheet" href="{{ URL::asset('assets/plugins/jqvmap/jqvmap.min.css') }}">
|
<link rel="stylesheet" href="{{ URL::asset('assets/plugins/jqvmap/jqvmap.min.css') }}">
|
||||||
|
|
||||||
<!-- Theme style -->
|
<!-- Theme style -->
|
||||||
<link rel="stylesheet" href="{{ URL::asset('assets/dist/css/adminlte.min.css') }}">
|
<link rel="stylesheet" href="{{ URL::asset('assets/dist/css/adminlte.min.css') }}">
|
||||||
<!-- overlayScrollbars -->
|
<!-- overlayScrollbars -->
|
||||||
<link rel="stylesheet" href="{{ URL::asset('assets/plugins/overlayScrollbars/css/OverlayScrollbars.min.css') }}">
|
<link rel="stylesheet" href="{{ URL::asset('assets/plugins/overlayScrollbars/css/OverlayScrollbars.min.css') }}">
|
||||||
<!-- Daterange picker -->
|
<!-- Daterange picker -->
|
||||||
<link rel="stylesheet" href="{{ URL::asset('assets/plugins/daterangepicker/daterangepicker.css') }}">
|
<link rel="stylesheet" href="{{ URL::asset('assets/plugins/daterangepicker/daterangepicker.css') }}">
|
||||||
|
|
||||||
<!-- summernote -->
|
<!-- summernote -->
|
||||||
<link rel="stylesheet" href="{{ URL::asset('assets/plugins/summernote/summernote-bs4.min.css') }}">
|
<link rel="stylesheet" href="{{ URL::asset('assets/plugins/summernote/summernote-bs4.min.css') }}">
|
||||||
|
|
||||||
<!-- Bootstrap CSS -->
|
|
||||||
{{-- <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"> --}}
|
|
||||||
|
|
||||||
<!-- Bootstrap JS Bundle (inclui Popper) -->
|
<!-- Bootstrap JS Bundle (inclui Popper) -->
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
|
||||||
<style>
|
|
||||||
[class*=sidebar-dark] .btn-sidebar2,
|
|
||||||
[class*=sidebar-dark] .form-control-sidebar2 {
|
|
||||||
background-color: #3f474e;
|
|
||||||
border: 1px solid #56606a;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Css para icon de validacao da TE7 */
|
|
||||||
.info-icon {
|
|
||||||
width: 25px;
|
|
||||||
height: 25px;
|
|
||||||
background-color: #dc3545;
|
|
||||||
/* Vermelho por padrão */
|
|
||||||
color: white;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 25px;
|
|
||||||
border-radius: 50%;
|
|
||||||
cursor: pointer;
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-box {
|
|
||||||
display: none;
|
|
||||||
position: absolute;
|
|
||||||
top: -35px;
|
|
||||||
/* Ajuste para posicionar acima do ícone */
|
|
||||||
left: 50%;
|
|
||||||
/* Alinhar ao centro do ícone */
|
|
||||||
transform: translateX(-50%);
|
|
||||||
padding: 10px;
|
|
||||||
background-color: #343a40;
|
|
||||||
color: #fff;
|
|
||||||
border-radius: 5px;
|
|
||||||
white-space: nowrap;
|
|
||||||
z-index: 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-box.green {
|
|
||||||
background-color: #28a745;
|
|
||||||
/* Verde */
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-box.red {
|
|
||||||
background-color: #dc3545;
|
|
||||||
/* Vermelho */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* /* Css para icon de validacao da TE7 */
|
|
||||||
</style>
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="hold-transition sidebar-mini layout-fixed">
|
<body>
|
||||||
|
<!-- Wrapper -->
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
|
|
||||||
<!-- Navbar -->
|
|
||||||
<!-- Parte de cima da pagina (header)-->
|
|
||||||
<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">
|
|
||||||
<a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"
|
|
||||||
style="color:#1f2d3d"></i></a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link">
|
|
||||||
<i class="fas fa-play" style="color:#1f3d2f"></i>
|
|
||||||
<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-hourglass-start" style="color:#1f2d3d"></i>
|
|
||||||
<span class="badge badge-success navbar-badge"
|
|
||||||
style="background-color: #1b4cad;">{{ count($executionEquipment) }} </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>
|
|
||||||
<span class="badge badge-success navbar-badge"
|
|
||||||
style="background-color: #28a745">{{ count($completedEquipments) }} </span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<!-- Right navbar links -->
|
|
||||||
<ul class="navbar-nav ml-auto">
|
|
||||||
<li class="nav-item d-none d-sm-inline-block">
|
|
||||||
<!--<div class="nav-link">{{ Auth::user()->user_name }}</div>-->
|
|
||||||
<div class="nav-link" style="color:#1f2d3d">{{ $receiveDataWs->nomenclature_workstation }}</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<!-- User Dropdown Menu -->
|
|
||||||
<li class="nav-item dropdown">
|
|
||||||
|
|
||||||
|
|
||||||
<a class="nav-link" data-toggle="dropdown" href="#">
|
|
||||||
<img src="{{ URL::asset('assets/dist/img/ispt.jpg') }}" class="img-circle elevation-2"
|
|
||||||
alt="User Image" style="width:30px;height:30px;">
|
|
||||||
</a>
|
|
||||||
<div class="dropdown-menu dropdown-menu-right">
|
|
||||||
|
|
||||||
<div class="nav-link" style="color:#1f2d3d">{{ $receiveDataWs->nomenclature_workstation }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<form id="logout-form" action="{{ route('logout') }}" method="POST">
|
|
||||||
@csrf
|
|
||||||
|
|
||||||
@method('POST')
|
|
||||||
<a class="dropdown-item" href="{{ route('logout') }}"
|
|
||||||
onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
|
|
||||||
<i class="fas fa-sign-out-alt text-danger"></i>
|
|
||||||
<span>Terminar sessão</span>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</nav>
|
|
||||||
<!-- /.navbar -->
|
|
||||||
|
|
||||||
<!-- Main Sidebar Container -->
|
|
||||||
<aside class="main-sidebar sidebar-dark-primary elevation-4" style="background-color: #09255C">
|
|
||||||
<!-- Brand Logo -->
|
|
||||||
<p class="brand-link">
|
|
||||||
<img src="{{ URL::asset('assets/dist/img/ispt40.jpg') }}" alt="Ispt4.0 Logo"
|
|
||||||
class="brand-image img-circle elevation-3" style="opacity: .8">
|
|
||||||
<span class="brand-text font-weight-light">{{ config('app.name') }}</span>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<!-- Sidebar -->
|
|
||||||
<div class="sidebar mt-4">
|
|
||||||
|
|
||||||
<!-- SidebarSearch Form -->
|
|
||||||
<div class="form-inline">
|
|
||||||
<div class="input-group" data-widget="sidebar-search">
|
|
||||||
<input id="qrtextleft" class="form-control form-control-sidebar text-white" type="search"
|
|
||||||
placeholder="Tag/Equipamento" aria-label="Search">
|
|
||||||
<div class="input-group-append">
|
|
||||||
<button class="btn btn-sidebar" onclick="triggerSearchFromInput()">
|
|
||||||
<i class="fas fa-search fa-fw text-white"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Sidebar Menu -->
|
|
||||||
<nav class="mt-5">
|
|
||||||
|
|
||||||
<ul class="nav nav-pills nav-sidebar flex-column searchable" data-widget="treeview"
|
|
||||||
role="menu" data-accordion="false">
|
|
||||||
|
|
||||||
<!-- Por iniciar -->
|
|
||||||
<li class="nav-item has-treeview menu-closed">
|
|
||||||
<a href="#" class="nav-link text-white" style="background-color: #007BFF;">
|
|
||||||
<i class="nav-icon fas fa-play"></i>
|
|
||||||
<p>
|
|
||||||
Por iniciar: {{ count($receiveAllEquipmentOfProject) }}
|
|
||||||
<i class="right fas fa-angle-left"></i>
|
|
||||||
</p>
|
|
||||||
</a>
|
|
||||||
<ul class="nav nav-treeview pl-3">
|
|
||||||
@foreach ($receiveAllEquipmentOfProject as $equipmentOfProject)
|
|
||||||
<div class="row text-white">
|
|
||||||
<div class="col d-flex align-items-center ml-3">
|
|
||||||
<i class="fas fa-tag mr-2"></i>
|
|
||||||
<p class="mb-0 text-truncate" style="flex-grow: 1;">
|
|
||||||
{{ $equipmentOfProject->equipment_tag }}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endforeach
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<!-- Em execução -->
|
|
||||||
<li class="nav-item has-treeview menu-closed mt-1">
|
|
||||||
<a href="#" class="nav-link text-white" style="background-color: #1b4cad;">
|
|
||||||
{{-- <i class="fa-solid fa-rotate-left"></i> --}}
|
|
||||||
<i class="fa-solid fa-hourglass-start"></i>
|
|
||||||
<p>
|
|
||||||
Em execução : {{ count($executionEquipment) }}
|
|
||||||
<i class="right fas fa-angle-left"></i>
|
|
||||||
</p>
|
|
||||||
</a>
|
|
||||||
<ul class="nav nav-treeview">
|
|
||||||
@foreach ($executionEquipment as $equipmentOfProject)
|
|
||||||
<div class="row text-white">
|
|
||||||
<div class="col d-flex align-items-center ml-3">
|
|
||||||
<i class="fas fa-tag mr-2"></i>
|
|
||||||
<p class="mb-0 text-truncate" style="flex-grow: 1;">
|
|
||||||
{{ $equipmentOfProject->equipment_tag }}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endforeach
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<!-- Por rever -->
|
|
||||||
<li class="nav-item has-treeview menu-closed mt-1">
|
|
||||||
<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 d-flex align-items-center ml-3">
|
|
||||||
<i class="fas fa-tag mr-2"></i>
|
|
||||||
<p class="mb-0 text-truncate" style="flex-grow: 1;">
|
|
||||||
{{ $equipmentOfProject->equipment_tag }}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endforeach
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<!-- Concluidos -->
|
|
||||||
<li class="nav-item has-treeview menu-closed mt-1">
|
|
||||||
<a href="#" class="nav-link text-white" style="background-color: green;">
|
|
||||||
<i class="nav-icon fas fa-check"></i>
|
|
||||||
<p> Concluidos :
|
|
||||||
{{ count($completedEquipments) }}
|
|
||||||
<!-- válvulas concluídas -->
|
|
||||||
<i class="right fas fa-angle-left"></i>
|
|
||||||
</p>
|
|
||||||
</a>
|
|
||||||
<ul class="nav nav-treeview">
|
|
||||||
@foreach ($completedEquipments as $equipmentDone)
|
|
||||||
<div class="row text-white">
|
|
||||||
<div class="col d-flex align-items-center ml-3">
|
|
||||||
<i class="fas fa-tag mr-2"></i>
|
|
||||||
<p class="mb-0 text-truncate" style="flex-grow: 1;">
|
|
||||||
{{ $equipmentDone->equipment_tag }}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endforeach
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<ul class="nav nav-pills nav-sidebar flex-column searchable" id="qrcode-equipment-list"
|
|
||||||
style="display: none;">
|
|
||||||
<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) }} a iniciar QrCodes
|
|
||||||
<i class="right fas fa-angle-left"></i>
|
|
||||||
</p>
|
|
||||||
</a>
|
|
||||||
<ul class="nav nav-treeview">
|
|
||||||
@foreach ($receiveQrcodeEquipmentsProject as $equipmentOfProject)
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="{{ route('getEquipmentData', ['equipment_id' => $equipmentOfProject->equipment_id, 'component_tag' => $equipmentOfProject->component_tag]) }}"
|
|
||||||
class="nav-link text-white">
|
|
||||||
<i class="fas fa-tag nav-icon"></i>
|
|
||||||
<p class="Tags">{{ $equipmentOfProject->component_tag }}</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
@endforeach
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
</nav>
|
|
||||||
<!-- /.sidebar-menu -->
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<!-- /.sidebar -->
|
|
||||||
</aside>
|
|
||||||
|
|
||||||
<!-- Content Wrapper. Contains page content -->
|
|
||||||
<div class="content-wrapper">
|
|
||||||
<!-- Content Header (Page header) -->
|
|
||||||
<div class="content-header">
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row mb-2">
|
|
||||||
<!-- Info box1 -->
|
|
||||||
<div class="col-sm-6">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- /.col -->
|
|
||||||
<div class="col-sm-6">
|
|
||||||
|
|
||||||
</div><!-- /.col -->
|
|
||||||
</div><!-- /.row -->
|
|
||||||
</div><!-- /.container-fluid -->
|
|
||||||
</div>
|
|
||||||
<!-- /.content-header -->
|
|
||||||
|
|
||||||
<!-- Main content -->
|
|
||||||
<section class="content">
|
|
||||||
@yield('content')
|
|
||||||
</section>
|
|
||||||
<!-- /.content -->
|
|
||||||
</div>
|
|
||||||
<!-- /.content-wrapper -->
|
|
||||||
<footer class="main-footer" style="background-color: #00B0EA">
|
|
||||||
<strong>Copyright © 2017-{{ date('Y') }} <a href="https://www.isptgroup.com" target="_blank">ISPT -
|
|
||||||
Industrial Services,
|
|
||||||
SA</a>.</strong>
|
|
||||||
Todos os direitos reservados.
|
|
||||||
<div class="float-right d-none d-sm-inline-block">
|
|
||||||
<b>Versão</b> {{ config('app.version') }}
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
<!-- /.content-wrapper -->
|
|
||||||
{{-- <footer class="main-footer" style="background-color: #00B0EA">
|
|
||||||
<strong>Copyright © 2017-{{ date('Y') }} <a href="https://www.isptgroup.com" target="_blank">ISPT -
|
|
||||||
Industrial Services,
|
|
||||||
SA</a>.</strong>
|
|
||||||
Todos os direitos reservados.
|
|
||||||
<div class="float-right d-none d-sm-inline-block">
|
|
||||||
<b>Versão</b> {{ config('app.version') }}
|
|
||||||
</div>
|
|
||||||
</footer> --}}
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- ./wrapper -->
|
<!-- ./ Wrapper -->
|
||||||
|
|
||||||
<!-- jQuery -->
|
|
||||||
<script src="{{ URL::asset('assets/plugins/jquery/jquery.min.js') }}"></script>
|
|
||||||
<!-- jQuery UI 1.11.4 -->
|
|
||||||
<script src="{{ URL::asset('assets/plugins/jquery-ui/jquery-ui.min.js') }}"></script>
|
|
||||||
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
|
|
||||||
<script>
|
|
||||||
$.widget.bridge('uibutton', $.ui.button)
|
|
||||||
</script>
|
|
||||||
<!-- Bootstrap 4 -->
|
|
||||||
<script src="{{ URL::asset('assets/plugins/bootstrap/js/bootstrap.bundle.min.js') }}"></script>
|
|
||||||
<!-- ChartJS -->
|
|
||||||
<script src="{{ URL::asset('assets/plugins/chart.js/Chart.min.js') }}"></script>
|
|
||||||
<!-- Sparkline -->
|
|
||||||
<script src="{{ URL::asset('assets/plugins/sparklines/sparkline.js') }}"></script>
|
|
||||||
<!-- JQVMap -->
|
|
||||||
<script src="{{ URL::asset('assets/plugins/jqvmap/jquery.vmap.min.js') }}"></script>
|
|
||||||
<script src="{{ URL::asset('assets/plugins/jqvmap/maps/jquery.vmap.usa.js') }}"></script>
|
|
||||||
<!-- jQuery Knob Chart -->
|
|
||||||
<script src="{{ URL::asset('assets/plugins/jquery-knob/jquery.knob.min.js') }}"></script>
|
|
||||||
<!-- daterangepicker -->
|
|
||||||
<script src="{{ URL::asset('assets/plugins/moment/moment.min.js') }}"></script>
|
|
||||||
<script src="{{ URL::asset('assets/plugins/daterangepicker/daterangepicker.js') }}"></script>
|
|
||||||
<!-- Tempusdominus Bootstrap 4 -->
|
|
||||||
<script src="{{ URL::asset('assets/plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js') }}">
|
|
||||||
</script>
|
|
||||||
<!-- Summernote -->
|
|
||||||
<script src="{{ URL::asset('assets/plugins/summernote/summernote-bs4.min.js') }}"></script>
|
|
||||||
<!-- overlayScrollbars -->
|
|
||||||
<script src="{{ URL::asset('assets/plugins/overlayScrollbars/js/jquery.overlayScrollbars.min.js') }}"></script>
|
|
||||||
<!-- AdminLTE App -->
|
|
||||||
<script src="{{ URL::asset('assets/dist/js/adminlte.js') }}"></script>
|
|
||||||
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
|
|
||||||
<script src="{{ URL::asset('assets/dist/js/pages/dashboard.js') }}"></script>
|
|
||||||
<!-- HTML5 QRCode-->
|
|
||||||
<script src="{{ URL::asset('assets/plugins/html5-qrcode/html5-qrcode.min.js') }}"></script>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
// Função para simular uma pesquisa manual ao escanear o QR Code
|
|
||||||
function simulateManualSearch(value) {
|
|
||||||
var searchInput = document.getElementById("qrtextleft"); // Campo de busca
|
|
||||||
searchInput.value = value; // Insere o valor do QR code no campo de busca
|
|
||||||
|
|
||||||
// Simula o evento de digitação no campo de busca para ativar o search
|
|
||||||
var event = new Event('input', {
|
|
||||||
bubbles: true,
|
|
||||||
cancelable: true,
|
|
||||||
});
|
|
||||||
searchInput.dispatchEvent(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Função para realizar a busca e navegação (após a leitura do QR code ou busca manual)
|
|
||||||
function searchForValueAndNavigate(value, itemsSelector, containerSelector) {
|
|
||||||
var searchQuery = value.toLowerCase();
|
|
||||||
var found = false; // Variável para verificar se encontrou o item
|
|
||||||
|
|
||||||
$(itemsSelector).each(function() {
|
|
||||||
var itemText = $(this).text().toLowerCase();
|
|
||||||
if (itemText.includes(searchQuery)) {
|
|
||||||
found = true;
|
|
||||||
window.location.href = $(this).attr('href'); // Navegar para a URL correspondente
|
|
||||||
return false; // Sair do loop após encontrar a correspondência
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Se não encontrar correspondência, fecha os itens abertos
|
|
||||||
if (!found) {
|
|
||||||
$(containerSelector + ' .nav-item.menu-open').each(function() {
|
|
||||||
$(this).removeClass('menu-open').addClass('menu-closed');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Função de busca manual por input (usada no botão de busca)
|
|
||||||
function triggerSearchFromInput() {
|
|
||||||
let searchInput = document.getElementById("qrtextleft").value;
|
|
||||||
searchForValueAndNavigate(searchInput, '#qrcode-equipment-list li a', '#qrcode-equipment-list');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Configuração do QR Code Scanner
|
|
||||||
let scanner = new Html5Qrcode("reader");
|
|
||||||
let startScan = document.getElementById("startScan");
|
|
||||||
let reader = document.getElementById("reader");
|
|
||||||
|
|
||||||
startScan.addEventListener('click', function() {
|
|
||||||
// Esconde o botão de início e exibe o leitor de QR Code
|
|
||||||
startScan.style.display = "none";
|
|
||||||
reader.style.display = "block";
|
|
||||||
|
|
||||||
scanner.start({
|
|
||||||
facingMode: "environment"
|
|
||||||
}, {
|
|
||||||
fps: 20,
|
|
||||||
qrbox: {
|
|
||||||
width: 250,
|
|
||||||
height: 250
|
|
||||||
}
|
|
||||||
},
|
|
||||||
function(qrCodeMessage) {
|
|
||||||
// Ao escanear o QR Code, simula a pesquisa
|
|
||||||
scanner.stop().then(() => {
|
|
||||||
simulateManualSearch(
|
|
||||||
qrCodeMessage); // Preenche o campo de busca e simula a digitação
|
|
||||||
reader.style.display = "none";
|
|
||||||
startScan.style.display = "block";
|
|
||||||
|
|
||||||
// Aciona a navegação automática se encontrar o valor correspondente
|
|
||||||
searchForValueAndNavigate(qrCodeMessage, '#qrcode-equipment-list li a',
|
|
||||||
'#qrcode-equipment-list');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
function(errorMessage) {
|
|
||||||
// Em caso de erro no scan
|
|
||||||
console.log(errorMessage);
|
|
||||||
})
|
|
||||||
.catch(err => {
|
|
||||||
console.log(err);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// Função para lidar com a pesquisa no campo de input e exibir resultados dinamicamente
|
|
||||||
function handleSearch(inputSelector, itemsSelector, containerSelector) {
|
|
||||||
$(inputSelector).on('keyup', function() {
|
|
||||||
var searchQuery = $(this).val().toLowerCase();
|
|
||||||
var found = false; // Variável para verificar se encontrou algum item
|
|
||||||
|
|
||||||
$(itemsSelector).each(function() {
|
|
||||||
var itemText = $(this).text().toLowerCase();
|
|
||||||
if (itemText.includes(searchQuery)) {
|
|
||||||
$(this).show();
|
|
||||||
found = true;
|
|
||||||
} else {
|
|
||||||
$(this).hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Altera a classe dos itens <li> quando o item é encontrado ou não
|
|
||||||
if (found) {
|
|
||||||
$(containerSelector + ' .nav-item.menu-closed').each(function() {
|
|
||||||
$(this).removeClass('menu-closed').addClass('menu-open');
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
$(containerSelector + ' .nav-item.menu-open').each(function() {
|
|
||||||
$(this).removeClass('menu-open').addClass('menu-closed');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Aplicando a funcionalidade de pesquisa ao campo de pesquisa principal
|
|
||||||
handleSearch('#qrtextleft', '.searchable .nav.nav-pills.nav-sidebar.flex-column li.tags', '.searchable');
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{{-- <script>
|
|
||||||
function simulateManualSearch(value) {
|
|
||||||
var searchInput = document.getElementById("qrtextleft"); // O campo de busca
|
|
||||||
searchInput.value = value; // Insere o valor do QR code no campo de busca
|
|
||||||
|
|
||||||
// Simula o evento de digitação no campo de busca para ativar o search
|
|
||||||
var event = new Event('input', {
|
|
||||||
bubbles: true,
|
|
||||||
cancelable: true,
|
|
||||||
});
|
|
||||||
searchInput.dispatchEvent(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
let scanner = new Html5Qrcode("reader");
|
|
||||||
let startScan = document.getElementById("startScan");
|
|
||||||
let reader = document.getElementById("reader");
|
|
||||||
|
|
||||||
startScan.addEventListener('click', function() {
|
|
||||||
// Hide the startScan button and show the reader
|
|
||||||
startScan.style.display = "none";
|
|
||||||
reader.style.display = "block";
|
|
||||||
|
|
||||||
scanner.start({
|
|
||||||
facingMode: "environment"
|
|
||||||
}, {
|
|
||||||
fps: 20,
|
|
||||||
qrbox: {
|
|
||||||
width: 250,
|
|
||||||
height: 250
|
|
||||||
}
|
|
||||||
},
|
|
||||||
function(qrCodeMessage) {
|
|
||||||
// This is called when a QR Code is scanned
|
|
||||||
|
|
||||||
scanner.stop().then(() => {
|
|
||||||
// Simula a digitação manual com o valor do QR code
|
|
||||||
simulateManualSearch(qrCodeMessage);
|
|
||||||
|
|
||||||
reader.style.display = "none";
|
|
||||||
startScan.style.display = "block";
|
|
||||||
});
|
|
||||||
},
|
|
||||||
function(errorMessage) {
|
|
||||||
// In case of errors
|
|
||||||
console.log(errorMessage);
|
|
||||||
})
|
|
||||||
.catch(err => {
|
|
||||||
console.log(err);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
// Função para realizar a busca e navegação
|
|
||||||
function searchForValueAndNavigate(value, itemsSelector, containerSelector) {
|
|
||||||
var searchQuery = value.toLowerCase();
|
|
||||||
var found = false;
|
|
||||||
|
|
||||||
$(itemsSelector).each(function() {
|
|
||||||
var itemText = $(this).text().toLowerCase();
|
|
||||||
if (itemText.includes(searchQuery)) {
|
|
||||||
found = true;
|
|
||||||
window.location.href = $(this).attr('href'); // Navegar para a URL correspondente
|
|
||||||
return false; // Sair do loop após encontrar a correspondência
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Se não encontrar correspondência, fecha os itens abertos
|
|
||||||
if (!found) {
|
|
||||||
$(containerSelector + ' .nav-item.menu-open').each(function() {
|
|
||||||
$(this).removeClass('menu-open').addClass('menu-closed');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Função de busca manual por input
|
|
||||||
function triggerSearchFromInput() {
|
|
||||||
let searchInput = document.getElementById("searchInput").value;
|
|
||||||
searchForValueAndNavigate(searchInput, '#qrcode-equipment-list li a', '#qrcode-equipment-list');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Configuração do QR Code Scanner
|
|
||||||
let scanner = new Html5Qrcode("reader");
|
|
||||||
let startScan = document.getElementById("startScan");
|
|
||||||
let reader = document.getElementById("reader");
|
|
||||||
let qrtextleft = document.getElementById("qrtextleft");
|
|
||||||
|
|
||||||
startScan.addEventListener('click', function() {
|
|
||||||
// Esconder o botão de início e mostrar o leitor
|
|
||||||
startScan.style.display = "none";
|
|
||||||
reader.style.display = "block";
|
|
||||||
|
|
||||||
scanner.start({
|
|
||||||
facingMode: "environment"
|
|
||||||
}, {
|
|
||||||
fps: 20,
|
|
||||||
qrbox: {
|
|
||||||
width: 250,
|
|
||||||
height: 250
|
|
||||||
}
|
|
||||||
},
|
|
||||||
function(qrCodeMessage) {
|
|
||||||
// Ao escanear o QR Code
|
|
||||||
scanner.stop().then(() => {
|
|
||||||
qrtextleft.value = qrCodeMessage; // Preenche o campo com o valor escaneado
|
|
||||||
reader.style.display = "none";
|
|
||||||
startScan.style.display = "block";
|
|
||||||
|
|
||||||
// Aciona a busca automaticamente
|
|
||||||
searchForValueAndNavigate(qrCodeMessage, '#qrcode-equipment-list li a',
|
|
||||||
'#qrcode-equipment-list');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
function(errorMessage) {
|
|
||||||
// Em caso de erro no scan
|
|
||||||
console.log(errorMessage);
|
|
||||||
}
|
|
||||||
).catch(err => {
|
|
||||||
console.log(err);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
$(document).ready(function() {
|
|
||||||
$(document).on('click', '[data-widget="control-treeview"] .nav-link', function(event) {
|
|
||||||
event.preventDefault();
|
|
||||||
var checkElement = $(this).next();
|
|
||||||
|
|
||||||
if ((checkElement.is('.nav-treeview')) && (checkElement.is(':visible'))) {
|
|
||||||
checkElement.slideUp('normal', function() {
|
|
||||||
checkElement.removeClass('menu-open');
|
|
||||||
});
|
|
||||||
checkElement.parent("li").removeClass("menu-open");
|
|
||||||
} else if ((checkElement.is('.nav-treeview')) && (!checkElement.is(':visible'))) {
|
|
||||||
var parent = $(this).parents('ul').first();
|
|
||||||
var ul = parent.find('ul:visible').slideUp('normal');
|
|
||||||
ul.removeClass('menu-open');
|
|
||||||
var parent_li = $(this).parent("li");
|
|
||||||
|
|
||||||
checkElement.slideDown('normal', function() {
|
|
||||||
checkElement.addClass('menu-open');
|
|
||||||
parent.find('.menu-open').not(checkElement).removeClass('menu-open');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (checkElement.is('.nav-treeview')) {
|
|
||||||
event.preventDefault();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
function handleSearch(inputSelector, itemsSelector, containerSelector) {
|
|
||||||
console.log(inputSelector);
|
|
||||||
$(inputSelector).on('keyup', function() {
|
|
||||||
var searchQuery = $(this).val().toLowerCase();
|
|
||||||
var found = false; // Variable to track if any item is found
|
|
||||||
|
|
||||||
$(itemsSelector).each(function() {
|
|
||||||
var itemText = $(this).text().toLowerCase();
|
|
||||||
if (itemText.includes(searchQuery)) {
|
|
||||||
$(this).show();
|
|
||||||
found = true;
|
|
||||||
} else {
|
|
||||||
$(this).hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// If any item is found, change the class of <li> elements
|
|
||||||
if (found) {
|
|
||||||
$(containerSelector + ' .nav-item.menu-closed').each(function() {
|
|
||||||
$(this).removeClass('menu-closed').addClass('menu-open');
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
$(containerSelector + ' .nav-item.menu-open').each(function() {
|
|
||||||
$(this).removeClass('menu-open').addClass('menu-closed');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Nao me parece fazer nada, nao encontrei funcionalidade ainda, ja que a pesquisa ainda e feita, e a selacao tambem.
|
|
||||||
handleSearch('#qrtextleft', '.searchable .nav.nav-pills.nav-sidebar.flex-column li.tags', '.searchable');
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Apply the search functionality for the main sidebar
|
|
||||||
// handleSearch('#qrtextleft', '.main-sidebar .nav.nav-pills.nav-sidebar.flex-column li', '.main-sidebar');
|
|
||||||
|
|
||||||
// Apply the search functionality for the control sidebar
|
|
||||||
// handleSearch('#qrtextright', '.control-sidebar .nav.nav-pills.nav-sidebar.flex-column li', '.control-sidebar');
|
|
||||||
</script> --}}
|
|
||||||
|
|
||||||
|
<footer class="main-footer">
|
||||||
|
<strong>Copyright © 2017-{{ date('Y') }} <a href="https://www.isptgroup.com" id="isptGroupLink">ISPT
|
||||||
|
-
|
||||||
|
Industrial Services, SA</a>.</strong>
|
||||||
|
Todos os direitos reservados.
|
||||||
|
<div class="float-right d-none d-sm-inline-block">
|
||||||
|
<b>Versão</b> {{ config('app.version') }}
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
<!-- jQuery -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/jquery/jquery.min.js') }}"></script>
|
||||||
|
<!-- jQuery UI 1.11.4 -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/jquery-ui/jquery-ui.min.js') }}"></script>
|
||||||
|
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
|
||||||
|
<script>
|
||||||
|
$.widget.bridge('uibutton', $.ui.button)
|
||||||
|
</script>
|
||||||
|
<!-- Bootstrap 4 -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/bootstrap/js/bootstrap.bundle.min.js') }}"></script>
|
||||||
|
<!-- ChartJS -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/chart.js/Chart.min.js') }}"></script>
|
||||||
|
<!-- Sparkline -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/sparklines/sparkline.js') }}"></script>
|
||||||
|
<!-- JQVMap -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/jqvmap/jquery.vmap.min.js') }}"></script>
|
||||||
|
<script src="{{ URL::asset('assets/plugins/jqvmap/maps/jquery.vmap.usa.js') }}"></script>
|
||||||
|
<!-- jQuery Knob Chart -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/jquery-knob/jquery.knob.min.js') }}"></script>
|
||||||
|
<!-- daterangepicker -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/moment/moment.min.js') }}"></script>
|
||||||
|
<script src="{{ URL::asset('assets/plugins/daterangepicker/daterangepicker.js') }}"></script>
|
||||||
|
<!-- Tempusdominus Bootstrap 4 -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js') }}">
|
||||||
|
</script>
|
||||||
|
<!-- Summernote -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/summernote/summernote-bs4.min.js') }}"></script>
|
||||||
|
<!-- overlayScrollbars -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/overlayScrollbars/js/jquery.overlayScrollbars.min.js') }}"></script>
|
||||||
|
<!-- AdminLTE App -->
|
||||||
|
<script src="{{ URL::asset('assets/dist/js/adminlte.js') }}"></script>
|
||||||
|
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
|
||||||
|
<script src="{{ URL::asset('assets/dist/js/pages/dashboard.js') }}"></script>
|
||||||
|
<!-- HTML5 QRCode-->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/html5-qrcode/html5-qrcode.min.js') }}"></script>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<!-- CV -->
|
<!-- CV -->
|
||||||
@if ($dataEquipment->equipment_type_id == 1)
|
@if ($detalsEquipment->equipment_type_id == 1)
|
||||||
|
|
||||||
<!-- 'portfolioOnlyreadOrEditToo', cria um sistema de 1 a 3 , onde 1 e apenas 'ler', 2 apenas editar e 3 as 2 opcoes -->
|
<!-- 'portfolioOnlyreadOrEditToo', cria um sistema de 1 a 3 , onde 1 e apenas 'ler', 2 apenas editar e 3 as 2 opcoes -->
|
||||||
@if ($portfolioOnlyreadOrEditToo == 1 || $portfolioOnlyreadOrEditToo == 3)
|
@if ($portfolioOnlyreadOrEditToo == 1 || $portfolioOnlyreadOrEditToo == 3)
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
<i class="fa-sharp fa-solid fa-tag" style="color: #00B0EA;" data-toggle="tooltip"
|
<i class="fa-sharp fa-solid fa-tag" style="color: #00B0EA;" data-toggle="tooltip"
|
||||||
title="TAG"></i>
|
title="TAG"></i>
|
||||||
</label>
|
</label>
|
||||||
<input type="text" name="tag" value="{{ $dataEquipment->equipment_tag }}"
|
<input type="text" name="tag" value="{{ $detalsEquipment->equipment_tag }}"
|
||||||
class="form-control" id="equipmentTag" placeholder="Tag do Equipamento"
|
class="form-control" id="equipmentTag" placeholder="Tag do Equipamento"
|
||||||
aria-label="Tag do Equipamento" aria-describedby="form_tagEquipment" readonly>
|
aria-label="Tag do Equipamento" aria-describedby="form_tagEquipment" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -35,7 +35,7 @@ class="form-control" id="equipmentTag" placeholder="Tag do Equipamento"
|
||||||
data-toggle="tooltip" title="Descrição"></i>
|
data-toggle="tooltip" title="Descrição"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="equipmentDescription"
|
<input type="text" name="equipmentDescription"
|
||||||
value="{{ $dataEquipment->equipment_description }}" class="form-control"
|
value="{{ $detalsEquipment->equipment_description }}" class="form-control"
|
||||||
id="equipmentDescription" placeholder="Descrição Equipamento"
|
id="equipmentDescription" placeholder="Descrição Equipamento"
|
||||||
aria-label="Descrição Equipamento" aria-describedby="form_equipmentDescription"
|
aria-label="Descrição Equipamento" aria-describedby="form_equipmentDescription"
|
||||||
readonly>
|
readonly>
|
||||||
|
|
@ -55,7 +55,7 @@ class="form-control" id="equipmentTag" placeholder="Tag do Equipamento"
|
||||||
title="Número de série"></i>
|
title="Número de série"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="serialNumberEquipment"
|
<input type="text" name="serialNumberEquipment"
|
||||||
value="{{ $dataEquipment->equipment_serial_number }}"
|
value="{{ $detalsEquipment->equipment_serial_number }}"
|
||||||
class="form-control card_inputs" id="equipmentSerialNumber"
|
class="form-control card_inputs" id="equipmentSerialNumber"
|
||||||
placeholder="Número de série" aria-label="Serial Number Equipment"
|
placeholder="Número de série" aria-label="Serial Number Equipment"
|
||||||
aria-describedby="form-serialNumberEquipment" readonly>
|
aria-describedby="form-serialNumberEquipment" readonly>
|
||||||
|
|
@ -68,7 +68,7 @@ class="form-control card_inputs" id="equipmentSerialNumber"
|
||||||
title="Marca"></i>
|
title="Marca"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="equipmentBrand"
|
<input type="text" name="equipmentBrand"
|
||||||
value="{{ $dataEquipment->equipment_brand }}" class="form-control card_inputs"
|
value="{{ $detalsEquipment->equipment_brand }}" class="form-control card_inputs"
|
||||||
id="equipmentBrand" placeholder="Marca" aria-label="Serial Number Equipment"
|
id="equipmentBrand" placeholder="Marca" aria-label="Serial Number Equipment"
|
||||||
aria-describedby="form-equipmentBrand" readonly>
|
aria-describedby="form-equipmentBrand" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -80,7 +80,7 @@ class="form-control card_inputs" id="equipmentSerialNumber"
|
||||||
title="Modelo"></i>
|
title="Modelo"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="equipmentModel"
|
<input type="text" name="equipmentModel"
|
||||||
value="{{ $dataEquipment->equipment_model }}" class="form-control card_inputs"
|
value="{{ $detalsEquipment->equipment_model }}" class="form-control card_inputs"
|
||||||
id="equipmentModel" placeholder="Modelo" aria-label="Serial Number Equipment"
|
id="equipmentModel" placeholder="Modelo" aria-label="Serial Number Equipment"
|
||||||
aria-describedby="form-equipmentModel" readonly>
|
aria-describedby="form-equipmentModel" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -348,7 +348,7 @@ class="form-control card_inputs" id="equipmentSerialNumber"
|
||||||
<form action="{{ route('editEquipment') }}" method="post">
|
<form action="{{ route('editEquipment') }}" method="post">
|
||||||
@csrf
|
@csrf
|
||||||
|
|
||||||
<input type="hidden" name="equipmentID" value="{{ $dataEquipment->equipment_id }}">
|
<input type="hidden" name="equipmentID" value="{{ $detalsEquipment->equipment_id }}">
|
||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
|
||||||
|
|
@ -362,7 +362,7 @@ class="form-control card_inputs" id="equipmentSerialNumber"
|
||||||
<i class="fa-sharp fa-solid fa-tag" style="color: #00B0EA;"
|
<i class="fa-sharp fa-solid fa-tag" style="color: #00B0EA;"
|
||||||
data-toggle="tooltip" title="TAG"></i>
|
data-toggle="tooltip" title="TAG"></i>
|
||||||
</label>
|
</label>
|
||||||
<input type="text" name="tag" value="{{ $dataEquipment->equipment_tag }}"
|
<input type="text" name="tag" value="{{ $detalsEquipment->equipment_tag }}"
|
||||||
class="form-control" id="equipmentTag" placeholder="Tag do Equipamento"
|
class="form-control" id="equipmentTag" placeholder="Tag do Equipamento"
|
||||||
aria-label="Tag do Equipamento" aria-describedby="form_tagEquipment">
|
aria-label="Tag do Equipamento" aria-describedby="form_tagEquipment">
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -375,7 +375,7 @@ class="form-control" id="equipmentTag" placeholder="Tag do Equipamento"
|
||||||
data-toggle="tooltip" title="Descrição"></i>
|
data-toggle="tooltip" title="Descrição"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="equipmentDescription"
|
<input type="text" name="equipmentDescription"
|
||||||
value="{{ $dataEquipment->equipment_description }}" class="form-control"
|
value="{{ $detalsEquipment->equipment_description }}" class="form-control"
|
||||||
id="equipmentDescription" placeholder="Descrição Equipamento"
|
id="equipmentDescription" placeholder="Descrição Equipamento"
|
||||||
aria-label="Descrição Equipamento"
|
aria-label="Descrição Equipamento"
|
||||||
aria-describedby="form_equipmentDescription">
|
aria-describedby="form_equipmentDescription">
|
||||||
|
|
@ -395,7 +395,7 @@ class="form-control" id="equipmentTag" placeholder="Tag do Equipamento"
|
||||||
title="Número de série"></i>
|
title="Número de série"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="serialNumberEquipment"
|
<input type="text" name="serialNumberEquipment"
|
||||||
value="{{ $dataEquipment->equipment_serial_number }}"
|
value="{{ $detalsEquipment->equipment_serial_number }}"
|
||||||
class="form-control card_inputs" id="equipmentSerialNumber"
|
class="form-control card_inputs" id="equipmentSerialNumber"
|
||||||
placeholder="Número de série" aria-label="Serial Number Equipment"
|
placeholder="Número de série" aria-label="Serial Number Equipment"
|
||||||
aria-describedby="form-serialNumberEquipment">
|
aria-describedby="form-serialNumberEquipment">
|
||||||
|
|
@ -408,7 +408,7 @@ class="form-control card_inputs" id="equipmentSerialNumber"
|
||||||
data-toggle="tooltip" title="Marca"></i>
|
data-toggle="tooltip" title="Marca"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="equipmentBrand"
|
<input type="text" name="equipmentBrand"
|
||||||
value="{{ $dataEquipment->equipment_brand }}"
|
value="{{ $detalsEquipment->equipment_brand }}"
|
||||||
class="form-control card_inputs" id="equipmentBrand" placeholder="Marca"
|
class="form-control card_inputs" id="equipmentBrand" placeholder="Marca"
|
||||||
aria-label="Serial Number Equipment" aria-describedby="form-equipmentBrand">
|
aria-label="Serial Number Equipment" aria-describedby="form-equipmentBrand">
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -420,7 +420,7 @@ class="form-control card_inputs" id="equipmentBrand" placeholder="Marca"
|
||||||
title="Modelo"></i>
|
title="Modelo"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="equipmentModel"
|
<input type="text" name="equipmentModel"
|
||||||
value="{{ $dataEquipment->equipment_model }}"
|
value="{{ $detalsEquipment->equipment_model }}"
|
||||||
class="form-control card_inputs" id="equipmentModel" placeholder="Modelo"
|
class="form-control card_inputs" id="equipmentModel" placeholder="Modelo"
|
||||||
aria-label="Serial Number Equipment" aria-describedby="form-equipmentModel">
|
aria-label="Serial Number Equipment" aria-describedby="form-equipmentModel">
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -734,7 +734,7 @@ class="form-control card_inputs" id="positionerSerialNumber"
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<!-- ISV -->
|
<!-- ISV -->
|
||||||
@elseif ($dataEquipment->equipment_type_id == 2)
|
@elseif ($detalsEquipment->equipment_type_id == 2)
|
||||||
<!-- 'portfolioOnlyreadOrEditToo', cria um sistema de 1 a 3 , onde 1 e apenas 'ler', 2 apenas editar e 3 as 2 opcoes -->
|
<!-- 'portfolioOnlyreadOrEditToo', cria um sistema de 1 a 3 , onde 1 e apenas 'ler', 2 apenas editar e 3 as 2 opcoes -->
|
||||||
@if ($portfolioOnlyreadOrEditToo == 1 || $portfolioOnlyreadOrEditToo == 3)
|
@if ($portfolioOnlyreadOrEditToo == 1 || $portfolioOnlyreadOrEditToo == 3)
|
||||||
{{-- Visualizar --}}
|
{{-- Visualizar --}}
|
||||||
|
|
@ -757,7 +757,7 @@ class="form-control card_inputs" id="positionerSerialNumber"
|
||||||
<i class="fa-sharp fa-solid fa-tag" style="color: #00B0EA;" data-toggle="tooltip"
|
<i class="fa-sharp fa-solid fa-tag" style="color: #00B0EA;" data-toggle="tooltip"
|
||||||
title="TAG"></i>
|
title="TAG"></i>
|
||||||
</label>
|
</label>
|
||||||
<input type="text" name="tag" value="{{ $dataEquipment->equipment_tag }}"
|
<input type="text" name="tag" value="{{ $detalsEquipment->equipment_tag }}"
|
||||||
class="form-control" id="equipmentTag" placeholder="Tag do Equipamento"
|
class="form-control" id="equipmentTag" placeholder="Tag do Equipamento"
|
||||||
aria-label="Tag do Equipamento" aria-describedby="form_tagEquipment" readonly>
|
aria-label="Tag do Equipamento" aria-describedby="form_tagEquipment" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -770,7 +770,7 @@ class="form-control" id="equipmentTag" placeholder="Tag do Equipamento"
|
||||||
data-toggle="tooltip" title="Descrição"></i>
|
data-toggle="tooltip" title="Descrição"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="equipmentDescription"
|
<input type="text" name="equipmentDescription"
|
||||||
value="{{ $dataEquipment->equipment_description }}" class="form-control"
|
value="{{ $detalsEquipment->equipment_description }}" class="form-control"
|
||||||
id="equipmentDescription" placeholder="Descrição Equipamento"
|
id="equipmentDescription" placeholder="Descrição Equipamento"
|
||||||
aria-label="Descrição Equipamento" aria-describedby="form_equipmentDescription"
|
aria-label="Descrição Equipamento" aria-describedby="form_equipmentDescription"
|
||||||
readonly>
|
readonly>
|
||||||
|
|
@ -790,7 +790,7 @@ class="form-control" id="equipmentTag" placeholder="Tag do Equipamento"
|
||||||
title="Número de série"></i>
|
title="Número de série"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="serialNumberEquipment"
|
<input type="text" name="serialNumberEquipment"
|
||||||
value="{{ $dataEquipment->equipment_serial_number }}"
|
value="{{ $detalsEquipment->equipment_serial_number }}"
|
||||||
class="form-control card_inputs" id="equipmentSerialNumber"
|
class="form-control card_inputs" id="equipmentSerialNumber"
|
||||||
placeholder="Número de série" aria-label="Serial Number Equipment"
|
placeholder="Número de série" aria-label="Serial Number Equipment"
|
||||||
aria-describedby="form-serialNumberEquipment" readonly>
|
aria-describedby="form-serialNumberEquipment" readonly>
|
||||||
|
|
@ -803,7 +803,7 @@ class="form-control card_inputs" id="equipmentSerialNumber"
|
||||||
title="Marca"></i>
|
title="Marca"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="equipmentBrand"
|
<input type="text" name="equipmentBrand"
|
||||||
value="{{ $dataEquipment->equipment_brand }}" class="form-control card_inputs"
|
value="{{ $detalsEquipment->equipment_brand }}" class="form-control card_inputs"
|
||||||
id="equipmentBrand" placeholder="Marca" aria-label="Serial Number Equipment"
|
id="equipmentBrand" placeholder="Marca" aria-label="Serial Number Equipment"
|
||||||
aria-describedby="form-equipmentBrand" readonly>
|
aria-describedby="form-equipmentBrand" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -815,7 +815,7 @@ class="form-control card_inputs" id="equipmentSerialNumber"
|
||||||
title="Modelo"></i>
|
title="Modelo"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="equipmentModel"
|
<input type="text" name="equipmentModel"
|
||||||
value="{{ $dataEquipment->equipment_model }}" class="form-control card_inputs"
|
value="{{ $detalsEquipment->equipment_model }}" class="form-control card_inputs"
|
||||||
id="equipmentModel" placeholder="Modelo" aria-label="Serial Number Equipment"
|
id="equipmentModel" placeholder="Modelo" aria-label="Serial Number Equipment"
|
||||||
aria-describedby="form-equipmentModel" readonly>
|
aria-describedby="form-equipmentModel" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1165,7 +1165,7 @@ class="form-control card_inputs" id="decontamination"
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.card-body -->
|
<!-- /.card-body -->
|
||||||
{{-- @livewire('articulado.additonal-task', ['equipment' => $dataEquipment], key($dataEquipment->equipment_id)) --}}
|
{{-- @livewire('articulado.additonal-task', ['equipment' => $detalsEquipment], key($detalsEquipment->equipment_id)) --}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{{-- ./description --}}
|
{{-- ./description --}}
|
||||||
|
|
@ -1194,7 +1194,7 @@ class="form-control card_inputs" id="decontamination"
|
||||||
@csrf
|
@csrf
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
|
||||||
<input type="hidden" name="equipmentID" value="{{ $dataEquipment->equipment_id }}">
|
<input type="hidden" name="equipmentID" value="{{ $detalsEquipment->equipment_id }}">
|
||||||
|
|
||||||
<!-- 2 inputs per line: equipmentTag ,equipmentDescription -->
|
<!-- 2 inputs per line: equipmentTag ,equipmentDescription -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
@ -1205,7 +1205,7 @@ class="form-control card_inputs" id="decontamination"
|
||||||
data-toggle="tooltip" title="TAG"></i>
|
data-toggle="tooltip" title="TAG"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="tag"
|
<input type="text" name="tag"
|
||||||
value="{{ $dataEquipment->equipment_tag }}" class="form-control"
|
value="{{ $detalsEquipment->equipment_tag }}" class="form-control"
|
||||||
id="equipmentTag" placeholder="Tag..." aria-label="Tag do Equipamento"
|
id="equipmentTag" placeholder="Tag..." aria-label="Tag do Equipamento"
|
||||||
aria-describedby="form-tagEquipment">
|
aria-describedby="form-tagEquipment">
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1218,7 +1218,7 @@ class="form-control card_inputs" id="decontamination"
|
||||||
data-toggle="tooltip" title="Descrição"></i>
|
data-toggle="tooltip" title="Descrição"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="equipmentDescription"
|
<input type="text" name="equipmentDescription"
|
||||||
value="{{ $dataEquipment->equipment_description }}" class="form-control"
|
value="{{ $detalsEquipment->equipment_description }}" class="form-control"
|
||||||
id="equipmentDescription" placeholder="Descrição Equipamento..."
|
id="equipmentDescription" placeholder="Descrição Equipamento..."
|
||||||
aria-label="Tag Equipment" aria-describedby="form-equipmentDescription">
|
aria-label="Tag Equipment" aria-describedby="form-equipmentDescription">
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1237,7 +1237,7 @@ class="form-control card_inputs" id="decontamination"
|
||||||
data-toggle="tooltip" title="Número de série"></i>
|
data-toggle="tooltip" title="Número de série"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="serialNumberEquipment"
|
<input type="text" name="serialNumberEquipment"
|
||||||
value="{{ $dataEquipment->equipment_serial_number }}"
|
value="{{ $detalsEquipment->equipment_serial_number }}"
|
||||||
class="form-control card_inputs" id="equipmentSerialNumber"
|
class="form-control card_inputs" id="equipmentSerialNumber"
|
||||||
placeholder="Número de série" aria-label="Serial Number Equipment"
|
placeholder="Número de série" aria-label="Serial Number Equipment"
|
||||||
aria-describedby="form-serialNumberEquipment">
|
aria-describedby="form-serialNumberEquipment">
|
||||||
|
|
@ -1250,7 +1250,7 @@ class="form-control card_inputs" id="equipmentSerialNumber"
|
||||||
data-toggle="tooltip" title="Marca"></i>
|
data-toggle="tooltip" title="Marca"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="equipmentBrand"
|
<input type="text" name="equipmentBrand"
|
||||||
value="{{ $dataEquipment->equipment_brand }}"
|
value="{{ $detalsEquipment->equipment_brand }}"
|
||||||
class="form-control card_inputs" id="equipmentBrand" placeholder="Marca"
|
class="form-control card_inputs" id="equipmentBrand" placeholder="Marca"
|
||||||
aria-label="Serial Number Equipment" aria-describedby="form-equipmentBrand">
|
aria-label="Serial Number Equipment" aria-describedby="form-equipmentBrand">
|
||||||
{{-- <label>Marca</label> --}}
|
{{-- <label>Marca</label> --}}
|
||||||
|
|
@ -1263,7 +1263,7 @@ class="form-control card_inputs" id="equipmentBrand" placeholder="Marca"
|
||||||
title="Modelo"></i>
|
title="Modelo"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="equipmentModel"
|
<input type="text" name="equipmentModel"
|
||||||
value="{{ $dataEquipment->equipment_model }}"
|
value="{{ $detalsEquipment->equipment_model }}"
|
||||||
class="form-control card_inputs" id="equipmentModel" placeholder="Modelo"
|
class="form-control card_inputs" id="equipmentModel" placeholder="Modelo"
|
||||||
aria-label="Serial Number Equipment" aria-describedby="form-equipmentModel">
|
aria-label="Serial Number Equipment" aria-describedby="form-equipmentModel">
|
||||||
{{-- <label>Modelo</label> --}}
|
{{-- <label>Modelo</label> --}}
|
||||||
|
|
@ -1544,7 +1544,7 @@ class="fas fa-plus"></i></button>
|
||||||
<!-- /.card-header -->
|
<!-- /.card-header -->
|
||||||
<div class="card-body p-0">
|
<div class="card-body p-0">
|
||||||
<form method="POST"
|
<form method="POST"
|
||||||
action="{{ route('editEquipmentTasks', ['equipmentID' => $dataEquipment->equipment_id, 'projectId' => $detailsProject->company_projects_id]) }}">
|
action="{{ route('editEquipmentTasks', ['equipmentID' => $detalsEquipment->equipment_id, 'projectId' => $detailsProject->company_projects_id]) }}">
|
||||||
@csrf
|
@csrf
|
||||||
|
|
||||||
<table class="table table-sm ">
|
<table class="table table-sm ">
|
||||||
|
|
@ -1676,7 +1676,7 @@ class="fas fa-plus"></i></button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.card-body -->
|
<!-- /.card-body -->
|
||||||
@livewire('articulado.additonal-task', ['equipment' => $dataEquipment], key($dataEquipment->equipment_id))
|
@livewire('articulado.additonal-task', ['equipment' => $detalsEquipment], key($detalsEquipment->equipment_id))
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{{-- ./description --}}
|
{{-- ./description --}}
|
||||||
|
|
@ -1691,7 +1691,7 @@ class="fas fa-plus"></i></button>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<!-- PSV -->
|
<!-- PSV -->
|
||||||
@elseif ($dataEquipment->equipment_type_id == 3)
|
@elseif ($detalsEquipment->equipment_type_id == 3)
|
||||||
<!-- 'portfolioOnlyreadOrEditToo', cria um sistema de 1 a 3 , onde 1 e apenas 'ler', 2 apenas editar e 3 as 2 opcoes -->
|
<!-- 'portfolioOnlyreadOrEditToo', cria um sistema de 1 a 3 , onde 1 e apenas 'ler', 2 apenas editar e 3 as 2 opcoes -->
|
||||||
@if ($portfolioOnlyreadOrEditToo == 1 || $portfolioOnlyreadOrEditToo == 3)
|
@if ($portfolioOnlyreadOrEditToo == 1 || $portfolioOnlyreadOrEditToo == 3)
|
||||||
{{-- Visualizar --}}
|
{{-- Visualizar --}}
|
||||||
|
|
@ -1713,7 +1713,7 @@ class="fas fa-plus"></i></button>
|
||||||
<i class="fa-sharp fa-solid fa-tag" style="color: #00B0EA;"
|
<i class="fa-sharp fa-solid fa-tag" style="color: #00B0EA;"
|
||||||
data-toggle="tooltip" title="TAG"></i>
|
data-toggle="tooltip" title="TAG"></i>
|
||||||
</label>
|
</label>
|
||||||
<input type="text" name="tag" value="{{ $dataEquipment->equipment_tag }}"
|
<input type="text" name="tag" value="{{ $detalsEquipment->equipment_tag }}"
|
||||||
class="form-control" id="equipmentTag" placeholder="Tag do Equipamento"
|
class="form-control" id="equipmentTag" placeholder="Tag do Equipamento"
|
||||||
aria-label="Tag do Equipamento" aria-describedby="form_tagEquipment" readonly>
|
aria-label="Tag do Equipamento" aria-describedby="form_tagEquipment" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1726,7 +1726,7 @@ class="form-control" id="equipmentTag" placeholder="Tag do Equipamento"
|
||||||
data-toggle="tooltip" title="Descrição"></i>
|
data-toggle="tooltip" title="Descrição"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="equipmentDescription"
|
<input type="text" name="equipmentDescription"
|
||||||
value="{{ $dataEquipment->equipment_description }}" class="form-control"
|
value="{{ $detalsEquipment->equipment_description }}" class="form-control"
|
||||||
id="equipmentDescription" placeholder="Descrição Equipamento"
|
id="equipmentDescription" placeholder="Descrição Equipamento"
|
||||||
aria-label="Descrição Equipamento" aria-describedby="form_equipmentDescription"
|
aria-label="Descrição Equipamento" aria-describedby="form_equipmentDescription"
|
||||||
readonly>
|
readonly>
|
||||||
|
|
@ -1746,7 +1746,7 @@ class="form-control" id="equipmentTag" placeholder="Tag do Equipamento"
|
||||||
title="Número de série"></i>
|
title="Número de série"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="serialNumberEquipment"
|
<input type="text" name="serialNumberEquipment"
|
||||||
value="{{ $dataEquipment->equipment_serial_number }}"
|
value="{{ $detalsEquipment->equipment_serial_number }}"
|
||||||
class="form-control card_inputs" id="equipmentSerialNumber"
|
class="form-control card_inputs" id="equipmentSerialNumber"
|
||||||
placeholder="Número de série" aria-label="Serial Number Equipment"
|
placeholder="Número de série" aria-label="Serial Number Equipment"
|
||||||
aria-describedby="form-serialNumberEquipment" readonly>
|
aria-describedby="form-serialNumberEquipment" readonly>
|
||||||
|
|
@ -1759,7 +1759,7 @@ class="form-control card_inputs" id="equipmentSerialNumber"
|
||||||
data-toggle="tooltip" title="Marca"></i>
|
data-toggle="tooltip" title="Marca"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="equipmentBrand"
|
<input type="text" name="equipmentBrand"
|
||||||
value="{{ $dataEquipment->equipment_brand }}" class="form-control card_inputs"
|
value="{{ $detalsEquipment->equipment_brand }}" class="form-control card_inputs"
|
||||||
id="equipmentBrand" placeholder="Marca" aria-label="Serial Number Equipment"
|
id="equipmentBrand" placeholder="Marca" aria-label="Serial Number Equipment"
|
||||||
aria-describedby="form-equipmentBrand" readonly>
|
aria-describedby="form-equipmentBrand" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1771,7 +1771,7 @@ class="form-control card_inputs" id="equipmentSerialNumber"
|
||||||
title="Modelo"></i>
|
title="Modelo"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="equipmentModel"
|
<input type="text" name="equipmentModel"
|
||||||
value="{{ $dataEquipment->equipment_model }}" class="form-control card_inputs"
|
value="{{ $detalsEquipment->equipment_model }}" class="form-control card_inputs"
|
||||||
id="equipmentModel" placeholder="Modelo" aria-label="Serial Number Equipment"
|
id="equipmentModel" placeholder="Modelo" aria-label="Serial Number Equipment"
|
||||||
aria-describedby="form-equipmentModel" readonly>
|
aria-describedby="form-equipmentModel" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -2231,7 +2231,7 @@ class="form-control card_inputs" id="interlocks" placeholder="Bloqueios"
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.card-body -->
|
<!-- /.card-body -->
|
||||||
{{-- @livewire('articulado.additonal-task', ['equipment' => $dataEquipment], key($dataEquipment->equipment_id)) --}}
|
{{-- @livewire('articulado.additonal-task', ['equipment' => $detalsEquipment], key($detalsEquipment->equipment_id)) --}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{{-- ./description --}}
|
{{-- ./description --}}
|
||||||
|
|
@ -2259,7 +2259,7 @@ class="form-control card_inputs" id="interlocks" placeholder="Bloqueios"
|
||||||
@csrf
|
@csrf
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
|
||||||
<input type="hidden" name="equipmentID" value="{{ $dataEquipment->equipment_id }}">
|
<input type="hidden" name="equipmentID" value="{{ $detalsEquipment->equipment_id }}">
|
||||||
|
|
||||||
<!-- 2 inputs per line: equipmentTag ,equipmentDescription -->
|
<!-- 2 inputs per line: equipmentTag ,equipmentDescription -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
@ -2270,7 +2270,7 @@ class="form-control card_inputs" id="interlocks" placeholder="Bloqueios"
|
||||||
data-toggle="tooltip" title="TAG"></i>
|
data-toggle="tooltip" title="TAG"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="tag"
|
<input type="text" name="tag"
|
||||||
value="{{ $dataEquipment->equipment_tag }}" class="form-control"
|
value="{{ $detalsEquipment->equipment_tag }}" class="form-control"
|
||||||
id="equipmentTag" placeholder="Tag..." aria-label="Tag do Equipamento"
|
id="equipmentTag" placeholder="Tag..." aria-label="Tag do Equipamento"
|
||||||
aria-describedby="form-tagEquipment">
|
aria-describedby="form-tagEquipment">
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -2283,7 +2283,7 @@ class="form-control card_inputs" id="interlocks" placeholder="Bloqueios"
|
||||||
data-toggle="tooltip" title="Descrição"></i>
|
data-toggle="tooltip" title="Descrição"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="equipmentDescription"
|
<input type="text" name="equipmentDescription"
|
||||||
value="{{ $dataEquipment->equipment_description }}" class="form-control"
|
value="{{ $detalsEquipment->equipment_description }}" class="form-control"
|
||||||
id="equipmentDescription" placeholder="Descrição Equipamento..."
|
id="equipmentDescription" placeholder="Descrição Equipamento..."
|
||||||
aria-label="Tag Equipment" aria-describedby="form-equipmentDescription">
|
aria-label="Tag Equipment" aria-describedby="form-equipmentDescription">
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -2302,7 +2302,7 @@ class="form-control card_inputs" id="interlocks" placeholder="Bloqueios"
|
||||||
data-toggle="tooltip" title="Número de série"></i>
|
data-toggle="tooltip" title="Número de série"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="serialNumberEquipment"
|
<input type="text" name="serialNumberEquipment"
|
||||||
value="{{ $dataEquipment->equipment_serial_number }}"
|
value="{{ $detalsEquipment->equipment_serial_number }}"
|
||||||
class="form-control card_inputs" id="equipmentSerialNumber"
|
class="form-control card_inputs" id="equipmentSerialNumber"
|
||||||
placeholder="Número de série" aria-label="Serial Number Equipment"
|
placeholder="Número de série" aria-label="Serial Number Equipment"
|
||||||
aria-describedby="form-serialNumberEquipment">
|
aria-describedby="form-serialNumberEquipment">
|
||||||
|
|
@ -2315,7 +2315,7 @@ class="form-control card_inputs" id="equipmentSerialNumber"
|
||||||
data-toggle="tooltip" title="Marca"></i>
|
data-toggle="tooltip" title="Marca"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="equipmentBrand"
|
<input type="text" name="equipmentBrand"
|
||||||
value="{{ $dataEquipment->equipment_brand }}"
|
value="{{ $detalsEquipment->equipment_brand }}"
|
||||||
class="form-control card_inputs" id="equipmentBrand" placeholder="Marca"
|
class="form-control card_inputs" id="equipmentBrand" placeholder="Marca"
|
||||||
aria-label="Serial Number Equipment" aria-describedby="form-equipmentBrand">
|
aria-label="Serial Number Equipment" aria-describedby="form-equipmentBrand">
|
||||||
{{-- <label>Marca</label> --}}
|
{{-- <label>Marca</label> --}}
|
||||||
|
|
@ -2328,7 +2328,7 @@ class="form-control card_inputs" id="equipmentBrand" placeholder="Marca"
|
||||||
title="Modelo"></i>
|
title="Modelo"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="equipmentModel"
|
<input type="text" name="equipmentModel"
|
||||||
value="{{ $dataEquipment->equipment_model }}"
|
value="{{ $detalsEquipment->equipment_model }}"
|
||||||
class="form-control card_inputs" id="equipmentModel" placeholder="Modelo"
|
class="form-control card_inputs" id="equipmentModel" placeholder="Modelo"
|
||||||
aria-label="Serial Number Equipment" aria-describedby="form-equipmentModel">
|
aria-label="Serial Number Equipment" aria-describedby="form-equipmentModel">
|
||||||
{{-- <label>Modelo</label> --}}
|
{{-- <label>Modelo</label> --}}
|
||||||
|
|
@ -2694,7 +2694,7 @@ class="form-control card_inputs" id="material" placeholder="Material"
|
||||||
<div class="card-body p-0">
|
<div class="card-body p-0">
|
||||||
|
|
||||||
<form method="POST"
|
<form method="POST"
|
||||||
action="{{ route('editEquipmentTasks', ['equipmentID' => $dataEquipment->equipment_id, 'projectId' => $detailsProject->company_projects_id]) }}">
|
action="{{ route('editEquipmentTasks', ['equipmentID' => $detalsEquipment->equipment_id, 'projectId' => $detailsProject->company_projects_id]) }}">
|
||||||
@csrf
|
@csrf
|
||||||
<table class="table table-sm" id="TableTasksPSV-edit">
|
<table class="table table-sm" id="TableTasksPSV-edit">
|
||||||
<thead>
|
<thead>
|
||||||
|
|
@ -2842,7 +2842,7 @@ class="form-control card_inputs" id="material" placeholder="Material"
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- /.card-body -->
|
<!-- /.card-body -->
|
||||||
@livewire('articulado.additonal-task', ['equipment' => $dataEquipment], key($dataEquipment->equipment_id))
|
@livewire('articulado.additonal-task', ['equipment' => $detalsEquipment], key($detalsEquipment->equipment_id))
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{{-- ./description --}}
|
{{-- ./description --}}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
@if (session('status'))
|
@if (session('status'))
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
@if (session('success'))
|
@if (session('success'))
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="header-container-loop-pages">
|
<div class="header-container-loop-pages mb-5">
|
||||||
<!-- Logo -->
|
<!-- Logo -->
|
||||||
<!-- Imagem no extremo esquerdo -->
|
<!-- Imagem no extremo esquerdo -->
|
||||||
<div class="col d-flex justify-content-start align-items-center" style="height: 100%;">
|
<div class="col d-flex justify-content-start align-items-center" style="height: 100%;">
|
||||||
|
|
@ -12,25 +12,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Relatório de Dados -->
|
|
||||||
{{-- <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> --}}
|
|
||||||
|
|
||||||
<!-- Relatório de Dados -->
|
<!-- Relatório de Dados -->
|
||||||
<table class="info-table">
|
<table class="info-table">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
@extends('components.pdf-layout')
|
@extends('components.pdf-layout')
|
||||||
|
|
||||||
@php
|
@php
|
||||||
$totalPages = count($receiveAllTasksHistiory) + 1; // Add 1 for the first page
|
$totalPages = count($recebeTasksForEquipment) + 1; // Add 1 for the first page
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
@section('firstPage')
|
@section('firstPage')
|
||||||
|
|
@ -17,27 +17,27 @@
|
||||||
|
|
||||||
<!-- PSV -->
|
<!-- PSV -->
|
||||||
@if ($detailsEquipment->equipment_type_id == 3)
|
@if ($detailsEquipment->equipment_type_id == 3)
|
||||||
<h2>FICHA DE EQUIPAMENTO PSV <br>DE<br>{{ $detailsEquipment['specificAttributes'][5]['value'] ?? 'N/A' }}
|
<h2>FICHA DE EQUIPAMENTO PSV <br>DE<br>{{ $ambito ?? 'N/A' }}
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<!-- CV -->
|
<!-- CV -->
|
||||||
@elseif($detailsEquipment->equipment_type_id == 1)
|
@elseif($detailsEquipment->equipment_type_id == 1)
|
||||||
<h2>FICHA DE EQUIPAMENTO CV <br>DE<br>{{ $detailsEquipment['specificAttributes'][5]['value'] ?? 'N/A' }}
|
<h2>FICHA DE EQUIPAMENTO CV <br>DE<br>{{ $ambito ?? 'N/A' }}
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<!-- ISV -->
|
<!-- ISV -->
|
||||||
@else
|
@else
|
||||||
<h2>FICHA DE EQUIPAMENTO ISV <br>DE<br>{{ $detailsEquipment['specificAttributes'][5]['value'] ?? 'N/A' }}
|
<h2>FICHA DE EQUIPAMENTO ISV <br>DE<br>{{ $ambito ?? 'N/A' }}
|
||||||
</h2>
|
</h2>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<p> OBRA Nº:<b> {{ $receiveDetailsProject->project_ispt_number ?? 'N/A' }} </b>
|
<p> OBRA Nº:<b> {{ $receiveDetailsProject->project_ispt_number ?? 'N/A' }} </b>
|
||||||
<br>FICHA Nº: {{ $detailsEquipmentWorkHistory->ispt_number ?? 'N/A' }}
|
<br>FICHA Nº: {{ $detailsEquipmentWorkHistory->ispt_number ?? 'N/A' }}
|
||||||
<br>PAGINA : 1 de {{ $totalPages ?? 'N/A' }}
|
<br>PAGINA : 1 de {{ $totalPages ?? 'N/A' }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -45,12 +45,16 @@
|
||||||
<!-- Info Table -->
|
<!-- Info Table -->
|
||||||
<table class="info-table">
|
<table class="info-table">
|
||||||
<tr>
|
<tr>
|
||||||
<td> <b>Cliente:</b> <span>{{ $receiveDetailsProject->plant->company->company_name ?? 'N/A' }}</span></td>
|
<td> <b>Cliente:</b> <span>{{ $receiveDetailsProject->plant->company->company_name ?? 'N/A' }}</span>
|
||||||
<td> <b>Obra Cliente:</b> <span>{{ $receiveDetailsProject->company_project_description ?? 'N/A' }}</span></td>
|
</td>
|
||||||
|
<td> <b>Obra Cliente:</b>
|
||||||
|
<span>{{ $receiveDetailsProject->company_project_description ?? 'N/A' }}</span>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <b>Unidade:</b> <span>{{ $receiveDetailsProject->plant->plant_name ?? 'N/A' }}</span></td>
|
<td> <b>Unidade:</b> <span>{{ $receiveDetailsProject->plant->plant_name ?? 'N/A' }}</span></td>
|
||||||
<td> <b>Trabalhos Realizados de:</b> <span>{{ $oldestDate ?? 'N/A' }}</span> a <span>{{ $latestDate ?? 'N/A' }}</span>
|
<td> <b>Trabalhos Realizados de:</b> <span>{{ $oldestDate ?? 'N/A' }}</span> a
|
||||||
|
<span>{{ $latestDate ?? 'N/A' }}</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
@ -276,7 +280,7 @@
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<div class="footer-container">
|
<div class="footer-container">
|
||||||
@if ($ambitHistories && $ambitHistories->isNotEmpty())
|
{{-- @if ($ambitHistories && $ambitHistories->isNotEmpty())
|
||||||
<h4>Lista de Históricos de Âmbitos</h4>
|
<h4>Lista de Históricos de Âmbitos</h4>
|
||||||
<ul>
|
<ul>
|
||||||
@foreach ($ambitHistories as $history)
|
@foreach ($ambitHistories as $history)
|
||||||
|
|
@ -285,7 +289,7 @@
|
||||||
</li>
|
</li>
|
||||||
@endforeach
|
@endforeach
|
||||||
</ul>
|
</ul>
|
||||||
@endif
|
@endif --}}
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm generated-at">
|
<div class="col-sm generated-at">
|
||||||
|
|
@ -303,14 +307,22 @@
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('loopPages')
|
@section('loopPages')
|
||||||
|
|
||||||
@php
|
@php
|
||||||
$pageCounter = 2; // Start from page 2, assuming the first page is already handled
|
// Recupera as chaves do array associativo de $recebeTasksForEquipment, que serão usadas no loop
|
||||||
|
$taskKeys = $recebeTasksForEquipment->keys();
|
||||||
|
$totalPages = $taskKeys->count();
|
||||||
|
$pageCounter = 2;
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
@foreach ($receiveAllTasksHistiory as $task_todo)
|
@for ($i = 0; $i < $totalPages; $i++)
|
||||||
<div class="page-break"></div>
|
@php
|
||||||
|
$taskId = $taskKeys[$i];
|
||||||
|
$tasktodo = $recebeTasksForEquipment[$taskId];
|
||||||
|
@endphp
|
||||||
|
|
||||||
<div class="container-loop-pages">
|
<div class="container-loop-pages">
|
||||||
|
<div class="page-break"></div>
|
||||||
|
|
||||||
<header>
|
<header>
|
||||||
@include(
|
@include(
|
||||||
|
|
@ -321,25 +333,17 @@
|
||||||
'receiveDetailsProject',
|
'receiveDetailsProject',
|
||||||
'ambito',
|
'ambito',
|
||||||
'projectLogoPath',
|
'projectLogoPath',
|
||||||
'companyLogoPath'))
|
'companyLogoPath'
|
||||||
|
)
|
||||||
|
)
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="content-loop-pages">
|
<x-layouts.elementalTasksOfficialPDF
|
||||||
@include('components.elemental-tasks', ['task_todo' => $task_todo])
|
:tasktodo="$tasktodo"
|
||||||
|
:recebeTasksForEquipment="$recebeTasksForEquipment"
|
||||||
@if (isset($taskImages[$task_todo->control_equipment_workstation_id]) &&
|
:dataControlEquipment="$dataControlEquipment"
|
||||||
is_array($taskImages[$task_todo->control_equipment_workstation_id]))
|
:taskImages="$taskImages"
|
||||||
<div class="row no-gutters">
|
/>
|
||||||
@foreach ($taskImages[$task_todo->control_equipment_workstation_id] as $image)
|
|
||||||
<div class="col-4">
|
|
||||||
<img src="{{ public_path($image) }}" alt="Image" class="pdf-image"
|
|
||||||
style="border: 3px solid #00B0EA">
|
|
||||||
</div>
|
|
||||||
@endforeach
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<div class="footer-container">
|
<div class="footer-container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
@ -347,16 +351,16 @@
|
||||||
Criado em: {{ \Carbon\Carbon::now()->addHour()->format('Y-m-d H:i:s') }}
|
Criado em: {{ \Carbon\Carbon::now()->addHour()->format('Y-m-d H:i:s') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm generated-at" style="text-align: right;">
|
<div class="col-sm generated-at" style="text-align: right;">
|
||||||
Pagina : {{ $pageCounter }}
|
Página : {{ $pageCounter }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@php
|
@php
|
||||||
$pageCounter++; // Increment the page counter for each iteration
|
$pageCounter++; // Incrementa o contador de páginas para cada iteração
|
||||||
@endphp
|
@endphp
|
||||||
@endforeach
|
@endfor
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
|
|
@ -141,56 +141,13 @@ class="fas fa-plus"></i></button>
|
||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
|
||||||
|
<x-layouts.elementalTasksOfficial :recebeTasksForEquipment="$receiveAllTasksHistiory" :dataControlEquipment="$dataControlEquipment" />
|
||||||
|
|
||||||
@foreach ($receiveAllTasksHistiory as $elemental_tasks_id => $tasks)
|
|
||||||
@if (!empty($tasks['latest']))
|
|
||||||
@php
|
|
||||||
$task_todo = $tasks['latest'];
|
|
||||||
@endphp
|
|
||||||
|
|
||||||
@include('components.elemental-tasks', ['task_todo' => $task_todo])
|
|
||||||
@endif
|
|
||||||
@endforeach
|
|
||||||
|
|
||||||
|
|
||||||
{{-- ESTA modal recebe corretamento os historicos para cada tarefa ja executada, porem a questao e que da forma que esta atualmente se tirar de comentario, os valores do tipo radio simplemente não aparecem --}}
|
|
||||||
<!-- Modal -->
|
|
||||||
{{-- <div class="modal fade" id="taskModal" tabindex="-1" role="dialog" aria-labelledby="taskModalLabel"
|
|
||||||
aria-hidden="true">
|
|
||||||
<div class="modal-dialog modal-xl" role="document">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h5 class="modal-title" id="taskModalLabel">Histórico da Tarefa</h5>
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
||||||
<span aria-hidden="true">×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<!-- Conteúdo do histórico -->
|
|
||||||
@foreach ($receiveAllTasksHistiory as $elemental_tasks_id => $tasks)
|
|
||||||
@if (!empty($tasks['history']))
|
|
||||||
<div id="task-history-{{ $elemental_tasks_id }}" class="task-history"
|
|
||||||
style="display: none;">
|
|
||||||
@foreach ($tasks['history'] as $task)
|
|
||||||
@include('components.elemental-tasks', [
|
|
||||||
'task_todo' => $task,
|
|
||||||
])
|
|
||||||
@endforeach
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
@endforeach
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Fechar</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div> --}}
|
|
||||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal"
|
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal"
|
||||||
style="float: left;">
|
style="float: left;">
|
||||||
Concluir equipamento sem executar as tarefas
|
Concluir equipamento sem executar as tarefas
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- ./card-body -->
|
<!-- ./card-body -->
|
||||||
|
|
||||||
|
|
@ -246,37 +203,4 @@ class="fas fa-plus"></i></button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
$(document).ready(function() {
|
|
||||||
$('#taskModal').on('show.bs.modal', function(event) {
|
|
||||||
var button = $(event.relatedTarget); // Botão que acionou o modal
|
|
||||||
var taskId = button.data('elemental-task-id'); // Extrai informação dos atributos data-*
|
|
||||||
var modal = $(this);
|
|
||||||
|
|
||||||
// Define o ID da tarefa no modal
|
|
||||||
modal.find('.modal-body #modal-task-id').text('Elemental Task ID: ' + taskId);
|
|
||||||
|
|
||||||
// Exibe o histórico da tarefa correspondente
|
|
||||||
$('.task-history').hide(); // Esconde todos os históricos
|
|
||||||
$('#task-history-' + taskId).show(); // Mostra o histórico específico
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Script para abrir os card sem tem que click diretamente no icone -->
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(document).ready(function() {
|
|
||||||
$('.clickable').on('click', function(e) {
|
|
||||||
// Verifica se o clique não foi no botão
|
|
||||||
if (!$(e.target).is('.collapse-button') && !$(e.target).is('.collapse-button *')) {
|
|
||||||
$(this).find('.collapse-button').trigger('click');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
<br>
|
<br>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
@if (session('success'))
|
@if (session('success'))
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
<!-- Content Wrapper. Contains page content -->
|
<!-- Content Wrapper. Contains page content -->
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
|
|
@ -138,6 +138,13 @@
|
||||||
</div>
|
</div>
|
||||||
<!--card card-success collapsed-card-->
|
<!--card card-success collapsed-card-->
|
||||||
|
|
||||||
|
<form action="{{ route('DownloadAllPdfsWork') }}" method="post">
|
||||||
|
@csrf
|
||||||
|
|
||||||
|
<input type="hidden" name="projectID" value="{{$receiveDataProject->company_projects_id}}">
|
||||||
|
<button type="submit">Descarregar todos os Pdfs</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!--card-body-->
|
<!--card-body-->
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
<input type="hidden" id="ambitId" value="{{ $ambitId }}">
|
<input type="hidden" id="ambitId" value="{{ $ambitId }}">
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates/templateAdmin')
|
@extends('Templates/AdminLayout/AdminLayout')
|
||||||
|
|
||||||
@section('Main-content')
|
@section('Main-content')
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('Templates.templateWorkstations')
|
@extends('Templates/WorkstationsLayout/WorkstationsLayout')
|
||||||
|
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
|
||||||
|
|
@ -1,45 +1,7 @@
|
||||||
@extends('Templates.templateWorkstations')
|
@extends('Templates/WorkstationsLayout/WorkstationsLayout')
|
||||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
|
||||||
|
|
||||||
<!-- jQuery -->
|
@section('Main-content')
|
||||||
<script src="{{ URL::asset('assets/plugins/jquery/jquery.min.js') }}"></script>
|
|
||||||
<!-- jQuery UI 1.11.4 -->
|
|
||||||
<script src="{{ URL::asset('assets/plugins/jquery-ui/jquery-ui.min.js') }}"></script>
|
|
||||||
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
|
|
||||||
<script>
|
|
||||||
$.widget.bridge('uibutton', $.ui.button)
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{{-- <!-- Bootstrap 4 -->
|
|
||||||
<script src="{{ URL::asset('assets/plugins/bootstrap/js/bootstrap.bundle.min.js') }}"></script>
|
|
||||||
<!-- ChartJS -->
|
|
||||||
<script src="{{ URL::asset('assets/plugins/chart.js/Chart.min.js') }}"></script>
|
|
||||||
<!-- Sparkline -->
|
|
||||||
<script src="{{ URL::asset('assets/plugins/sparklines/sparkline.js') }}"></script>
|
|
||||||
<!-- JQVMap -->
|
|
||||||
<script src="{{ URL::asset('assets/plugins/jqvmap/jquery.vmap.min.js') }}"></script>
|
|
||||||
<script src="{{ URL::asset('assets/plugins/jqvmap/maps/jquery.vmap.usa.js') }}"></script>
|
|
||||||
<!-- jQuery Knob Chart -->
|
|
||||||
<script src="{{ URL::asset('assets/plugins/jquery-knob/jquery.knob.min.js') }}"></script>
|
|
||||||
<!-- daterangepicker -->
|
|
||||||
<script src="{{ URL::asset('assets/plugins/moment/moment.min.js') }}"></script>
|
|
||||||
<script src="{{ URL::asset('assets/plugins/daterangepicker/daterangepicker.js') }}"></script>
|
|
||||||
<!-- Tempusdominus Bootstrap 4 -->
|
|
||||||
<script src="{{ URL::asset('assets/plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js') }}">
|
|
||||||
</script>
|
|
||||||
<!-- Summernote -->
|
|
||||||
<script src="{{ URL::asset('assets/plugins/summernote/summernote-bs4.min.js') }}"></script>
|
|
||||||
<!-- overlayScrollbars -->
|
|
||||||
<script src="{{ URL::asset('assets/plugins/overlayScrollbars/js/jquery.overlayScrollbars.min.js') }}"></script>
|
|
||||||
<!-- AdminLTE App -->
|
|
||||||
<script src="{{ URL::asset('assets/dist/js/adminlte.js') }}"></script>
|
|
||||||
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
|
|
||||||
<script src="{{ URL::asset('assets/dist/js/pages/dashboard.js') }}"></script>
|
|
||||||
<!-- HTML5 QRCode-->
|
|
||||||
<script src="{{ URL::asset('assets/plugins/html5-qrcode/html5-qrcode.min.js') }}"></script> --}}
|
|
||||||
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
@if (session('danger'))
|
@if (session('danger'))
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="alert alert-danger" role="alert" id="alert-message-danger" style="transition: opacity 1s;">
|
<div class="alert alert-danger" role="alert" id="alert-message-danger" style="transition: opacity 1s;">
|
||||||
|
|
@ -55,12 +17,13 @@
|
||||||
</script>
|
</script>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<section class="content">
|
<section class="content mt-3">
|
||||||
|
|
||||||
<div class="row justify-content-center align-items-center">
|
<div class="row justify-content-center align-items-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
|
|
||||||
<div class="card card-info ">
|
<div class="card card-info">
|
||||||
|
|
||||||
<!-- Card-header principal card-->
|
<!-- Card-header principal card-->
|
||||||
<div class="card-header d-flex justify-content-between align-items-center flex-wrap">
|
<div class="card-header d-flex justify-content-between align-items-center flex-wrap">
|
||||||
<!-- Alinhado à esquerda -->
|
<!-- Alinhado à esquerda -->
|
||||||
|
|
@ -72,12 +35,12 @@
|
||||||
|
|
||||||
<!-- Centralizado -->
|
<!-- Centralizado -->
|
||||||
<div class="col-auto text-center flex-grow-1">
|
<div class="col-auto text-center flex-grow-1">
|
||||||
<h4 class="mb-0">Ispt.N :{{ $dataEquipment->istp_number }}</h4>
|
<h4 class="mb-0">Ispt.N :{{ $detalsEquipment->istp_number }}</h4>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Alinhado à direita -->
|
<!-- Alinhado à direita -->
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<h5 class="mb-0 text-right">Ambito :{{ $dataEquipment->equipment_ambit }}</h5>
|
<h5 class="mb-0 text-right">Ambito :{{ $detalsEquipment->equipment_ambit }}</h5>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Modal do Portifolio -->
|
<!-- Modal do Portifolio -->
|
||||||
|
|
@ -87,12 +50,13 @@
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header bg-light">
|
<div class="modal-header bg-light">
|
||||||
<h4 class="modal-title">Equipamento:</h4>
|
<h4 class="modal-title">Equipamento:</h4>
|
||||||
<h3>{{ $dataEquipment->equipment_tag }}</h3>
|
<h3>{{ $detalsEquipment->equipment_tag }}</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<input type="hidden" name="equipmentId" value="{{ $dataEquipment->equipment_id }}">
|
<input type="hidden" name="equipmentId"
|
||||||
|
value="{{ $detalsEquipment->equipment_id }}">
|
||||||
|
|
||||||
<!-- Bordered Tabs -->
|
<!-- Bordered Tabs -->
|
||||||
<ul class="nav nav-tabs nav-tabs-bordered" id="portfolioTabs" role="tablist">
|
<ul class="nav nav-tabs nav-tabs-bordered" id="portfolioTabs" role="tablist">
|
||||||
|
|
@ -115,7 +79,7 @@
|
||||||
|
|
||||||
|
|
||||||
<div class="tab-content pt-2" id="portfolioTabsContent">
|
<div class="tab-content pt-2" id="portfolioTabsContent">
|
||||||
<x-portfolio.portfolioAttributesForEquipments :dataEquipment="$dataEquipment"
|
<x-portfolio.portfolioAttributesForEquipments :detalsEquipment="$detalsEquipment"
|
||||||
:specificAttributesArray="$specificAttributesArray" :portfolioOnlyreadOrEditToo="$portfolioOnlyreadOrEditToo" />
|
:specificAttributesArray="$specificAttributesArray" :portfolioOnlyreadOrEditToo="$portfolioOnlyreadOrEditToo" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -171,9 +135,10 @@ class="chat-message {{ $receiveComment->type_users == 2 ? 'right' : 'left' }} mt
|
||||||
<form action="{{ route('createComment') }}" method="post">
|
<form action="{{ route('createComment') }}" method="post">
|
||||||
@csrf
|
@csrf
|
||||||
<input type="hidden" name="projectID"
|
<input type="hidden" name="projectID"
|
||||||
value="{{ $dataEquipment->company_projects_id }}">
|
value="{{ $detalsEquipment->company_projects_id }}">
|
||||||
<input type="hidden" name="equipmentID"
|
<input type="hidden" name="equipmentID"
|
||||||
value="{{ $dataControlEquipment->equipmentWorkHistorys_id }}">
|
value="{{ $dataControlEquipment['collection']->equipmentWorkHistorys_id }}">
|
||||||
|
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="comment" class="form-label">Comentário/Equipamento</label>
|
<label for="comment" class="form-label">Comentário/Equipamento</label>
|
||||||
|
|
@ -188,10 +153,9 @@ class="chat-message {{ $receiveComment->type_users == 2 ? 'right' : 'left' }} mt
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{-- @dd($dataControlEquipment) --}}
|
|
||||||
|
|
||||||
<form
|
<form
|
||||||
action="{{ route('cancelElementalTaskForEquipment', ['controlEquipmentID' => $dataControlEquipment->control_equipment_workstation_id]) }}"
|
action="{{ route('cancelElementalTaskForEquipment', ['controlEquipmentID' => $dataControlEquipment['collection']->control_equipment_workstation_id]) }}"
|
||||||
method="get">
|
method="get">
|
||||||
<div class="card-footer">
|
<div class="card-footer">
|
||||||
<button type="submit" data-action="cancel" class="btn btn-danger float-right"
|
<button type="submit" data-action="cancel" class="btn btn-danger float-right"
|
||||||
|
|
@ -199,579 +163,15 @@ class="chat-message {{ $receiveComment->type_users == 2 ? 'right' : 'left' }} mt
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<!-- Deve futuramente atualizar a estrutura, para funcionar com o $dataControlEquipment, pois se utilizar agora, desformata a estrutura -->
|
||||||
<x-layouts.elementalTasksOfficial :recebeTasksForEquipment="$recebeTasksForEquipment" :dataControlEquipment="$dataControlEquipment" />
|
<x-layouts.elementalTasksOfficial :recebeTasksForEquipment="$recebeTasksForEquipment" :dataControlEquipment="$dataControlEquipment" />
|
||||||
|
{{-- <x-layouts.elementalTasksOfficial :recebeTasksForEquipment="$recebeTasksForEquipment" :dataControlEquipment="$dataControlEquipment" /> --}}
|
||||||
|
|
||||||
</div><!-- card-body do card principal -->
|
</div><!-- card-body do card principal -->
|
||||||
</div> <!-- ./ Card card-indo principal-->
|
</div> <!-- ./ Card card-indo principal-->
|
||||||
|
|
||||||
</div> <!-- ./ col-12 -->
|
</div> <!-- ./ col-12 -->
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- Modal -->
|
|
||||||
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
|
||||||
aria-hidden="true">
|
|
||||||
<div class="modal-dialog modal-lg" role="document">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header bg-primary">
|
|
||||||
<h5 class="modal-title" id="exampleModalLabel">Conformidade da etiqueta</h5>
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
||||||
<span aria-hidden="true">×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body" style="overflow-y: auto; max-height: 400px;">
|
|
||||||
|
|
||||||
<div class="row justify-content-center align-items-center" style="height: 50vh">
|
|
||||||
<div class="col-12 col-lg-7">
|
|
||||||
<div class="card card-info">
|
|
||||||
<div class="card-header" style="background-color: #00B0EA">
|
|
||||||
<h3 class="card-title text-center">Escaneie a outra Tag para confimar a junção</h3>
|
|
||||||
</div>
|
|
||||||
<div id="startScanUnique" class="card-body text-center">
|
|
||||||
<div class="text-white p-3 mt-3 rounded" style="background-color: #00B0EA">
|
|
||||||
<i class="fas fa-qrcode fa-5x"></i>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="readerUnique" style="display: none;">
|
|
||||||
<div class="embed-responsive embed-responsive-1by1">
|
|
||||||
<video id="videoUnique" class="embed-responsive-item"></video>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="text-center mt-3"> <!-- Adiciona margem acima e centraliza os botões -->
|
|
||||||
<button id="stopQrcodeRead" class="btn btn-warning mb-2">Parar Leitura</button>
|
|
||||||
<!-- Adiciona margem abaixo do botão -->
|
|
||||||
<div> <!-- Usar div para quebrar linha -->
|
|
||||||
<button type="button" class="btn btn-danger" data-toggle="modal"
|
|
||||||
data-target="#exampleModalSmall" style="background-color: red">
|
|
||||||
Confirmar junção de etiquetas <b>Manualmente</b>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Fechar</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="modal fade" id="exampleModalSmall">
|
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h4 class="modal-title">Confirmar etiquetas Manualmente</h4>
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
||||||
<span aria-hidden="true">x</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<p>
|
|
||||||
Deseja realmente confirmar as etiquetas manualmente? Esta ação deve ser efetuada apenas se a
|
|
||||||
confirmação por QR code não for possível. Ao confirmar, está a validar que o <b>Corpo</b> e o
|
|
||||||
<b>Obturador</b> pertencem ao mesmo equipamento.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Fechar</button>
|
|
||||||
<button type="button" id="btnConfirmManual" class="btn btn-primary">Confirmar</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal fade" id="AddPhoneInElementalTaskModal" tabindex="-1" role="dialog"
|
|
||||||
aria-labelledby="exampleModalLabel" aria-hidden="true">
|
|
||||||
<div class="modal-dialog modal-lg" role="document">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header bg-primary">
|
|
||||||
<h5 class="modal-title text-white" id="exampleModalLabel">Adicionar Imagens</h5>
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
||||||
<span aria-hidden="true">×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<div class="container-fluid">
|
|
||||||
<!-- Botões de controle da câmera -->
|
|
||||||
<div class="row justify-content-center text-center mb-4">
|
|
||||||
<div class="col-md-4">
|
|
||||||
<button class="btn btn-success w-100" id="startCamera">Iniciar Câmera</button>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4">
|
|
||||||
<button class="btn btn-danger w-100" id="stopCamera">Parar Câmera</button>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4">
|
|
||||||
<button class="btn btn-primary w-100" id="capture" style="display: none">Capturar
|
|
||||||
Foto</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Vídeo e canvas -->
|
|
||||||
<div class="row justify-content-center text-center mb-4">
|
|
||||||
<video id="video" class="rounded border border-secondary" width="320" height="240"
|
|
||||||
autoplay></video>
|
|
||||||
</div>
|
|
||||||
<!-- Imagens capturadas -->
|
|
||||||
<div class="row" id="capturedImages" class="text-center">
|
|
||||||
<canvas id="canvas" width="320" height="240" class="d-none"></canvas>
|
|
||||||
<!-- As imagens capturadas serão inseridas aqui -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Fechar</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="modal" id="imageModal">
|
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<img id="modalImage" src="" style="width: 100%;"> <!-- Imagem será inserida aqui -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{-- Script para as Te7, verificar se as tarefas Te5 e Te6 ja foram finalizadas --}}
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(document).ready(function() {
|
|
||||||
var controlEquipmentWorkstationId = $('#controlEquipmentID_TE7').val();
|
|
||||||
|
|
||||||
|
|
||||||
// Fazer a requisição AJAX para a API
|
|
||||||
$.ajax({
|
|
||||||
url: '/api/verify-equipment-te7/' + controlEquipmentWorkstationId,
|
|
||||||
method: 'GET',
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json',
|
|
||||||
'X-CSRF-TOKEN': "{{ csrf_token() }}"
|
|
||||||
},
|
|
||||||
success: function(response) {
|
|
||||||
var infoIcon = $('#infoIcon');
|
|
||||||
var newTitle;
|
|
||||||
var newColor;
|
|
||||||
|
|
||||||
if (response.status === true) {
|
|
||||||
// Habilita o botão
|
|
||||||
$('#checkVerifyTe7').prop('disabled', false);
|
|
||||||
// Mensagem e cor para o status true
|
|
||||||
newTitle = 'Verificação de tarefas anteriores bem-sucedida! Pode salvar.';
|
|
||||||
newColor = '#28a745'; // Verde
|
|
||||||
} else {
|
|
||||||
// Mensagem e cor para o status false
|
|
||||||
newTitle = response.message || 'Erro na verificação.';
|
|
||||||
newColor = '#dc3545'; // Vermelho
|
|
||||||
}
|
|
||||||
|
|
||||||
// Atualizar o título do tooltip e a cor do ícone
|
|
||||||
infoIcon.attr('title', newTitle).tooltip('dispose').tooltip({
|
|
||||||
title: newTitle
|
|
||||||
}); // Atualizar o conteúdo do tooltip
|
|
||||||
infoIcon.css('background-color', newColor); // Atualizar a cor do ícone
|
|
||||||
},
|
|
||||||
error: function(xhr, status, error) {
|
|
||||||
// Em caso de erro na requisição, mostrar uma mensagem de erro
|
|
||||||
var infoIcon = $('#infoIcon');
|
|
||||||
infoIcon.attr('title', 'Erro ao comunicar com a API.').tooltip('dispose').tooltip({
|
|
||||||
title: 'Erro ao comunicar com a API.'
|
|
||||||
});
|
|
||||||
infoIcon.css('background-color', '#dc3545'); // Vermelho para erro
|
|
||||||
console.error('Erro na API:', error);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{{-- Script para monitorar a resposta da TE14 --}}
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(document).ready(function() {
|
|
||||||
// Função para definir todos os campos abaixo como desabilitados e definir valores como "N/A"
|
|
||||||
function disableFields() {
|
|
||||||
// Desabilitar campos de input e selects
|
|
||||||
$('#body-test-pressure, #seat-test-pressure, #leak-tightness-test').val('N/A').prop('readonly',
|
|
||||||
true);
|
|
||||||
$('#fluid_test-select, #test_result-select').val('n_a').prop('disabled', true);
|
|
||||||
$('textarea[name="ID20[observations-text]"]').val('N/A').prop('readonly', true);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Função para habilitar todos os campos abaixo e restaurar os valores originais
|
|
||||||
function enableFields() {
|
|
||||||
// Habilitar campos de input e selects
|
|
||||||
$('#body-test-pressure, #seat-test-pressure, #leak-tightness-test').val('').prop('readonly', false);
|
|
||||||
$('#fluid_test-select, #test_result-select').val('').prop('disabled', false);
|
|
||||||
$('textarea[name="ID20[observations-text]"]').val('').prop('readonly', false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Monitorar mudanças no select
|
|
||||||
$('#api-rp-598').change(function() {
|
|
||||||
var selectedValue = $(this).val();
|
|
||||||
|
|
||||||
if (selectedValue !== 'yes') {
|
|
||||||
disableFields();
|
|
||||||
} else {
|
|
||||||
enableFields();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Verificar o valor inicial ao carregar a página
|
|
||||||
if ($('#api-rp-598').val() !== 'yes') {
|
|
||||||
disableFields();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
$(document).ready(function() {
|
|
||||||
var equipmentId = "{{ $dataEquipment->equipment_id }}"; // Pega o ID do equipamento
|
|
||||||
var url = "/api/receiveQuestionsEquipment/" + equipmentId; // Constrói a URL
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
url: url,
|
|
||||||
type: "GET",
|
|
||||||
headers: {
|
|
||||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') // Adiciona o token CSRF
|
|
||||||
},
|
|
||||||
success: function(response) {
|
|
||||||
|
|
||||||
// Primeiro, desabilita todos os inputs e esconde as divs
|
|
||||||
$('#valve_repair-form6, #actuator_repair-form6, #repair_positioner-form6').hide();
|
|
||||||
$('#valve_repair-form11, #actuator_repair-form11, #repair_positioner-form11')
|
|
||||||
.hide();
|
|
||||||
|
|
||||||
let showValveRepair = false;
|
|
||||||
let showActuatorRepair = false;
|
|
||||||
let showRepairPositioner = false;
|
|
||||||
|
|
||||||
// Se a partir da resposta retornado for encontrado correspondencia,entao altera o valor a true
|
|
||||||
response.forEach(function(item) {
|
|
||||||
if (item.question == 'valve_repair') {
|
|
||||||
showValveRepair = true;
|
|
||||||
} else if (item.question == 'actuator_repair') {
|
|
||||||
showActuatorRepair = true;
|
|
||||||
} else if (item.question == 'repair_positioner') {
|
|
||||||
showRepairPositioner = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Mostra ou esconde as divs com base nas variáveis de controle
|
|
||||||
if (showValveRepair) {
|
|
||||||
$('#valve_repair-form6, #valve_repair-form11').show().find('input').prop(
|
|
||||||
'disabled', false);
|
|
||||||
}
|
|
||||||
if (showActuatorRepair) {
|
|
||||||
$('#actuator_repair-form6, #actuator_repair-form11').show().find('input').prop(
|
|
||||||
'disabled', false);
|
|
||||||
}
|
|
||||||
if (showRepairPositioner) {
|
|
||||||
$('#repair_positioner-form6, #repair_positioner-form11').show().find('input')
|
|
||||||
.prop('disabled', false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Se nao tiver nenhuma ocorencia sobre as varaveis, entao deixa a div agrupando todas em hide, que serve para ajudar na responsividade pois se as colunas ficassem apenas em hide a tarefa elementar ai ter um espaco vazio em sua visualizacao
|
|
||||||
if (!showValveRepair && !showActuatorRepair) {
|
|
||||||
$('#column_valveQuestions_and_actuator-form6').hide();
|
|
||||||
}
|
|
||||||
if (!showValveRepair && !showActuatorRepair && !showRepairPositioner) {
|
|
||||||
$('#column_valve_repair_and_actuator_repair_and_repair_positioner-form11')
|
|
||||||
.hide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
const video = document.getElementById('video');
|
|
||||||
const canvas = document.getElementById('canvas');
|
|
||||||
const startCameraButton = document.getElementById('startCamera');
|
|
||||||
const stopCameraButton = document.getElementById('stopCamera');
|
|
||||||
const captureButton = document.getElementById('capture');
|
|
||||||
const context = canvas.getContext('2d');
|
|
||||||
let stream = null;
|
|
||||||
|
|
||||||
let imagesCount = 0; // Contador para controlar o número de imagens capturadas
|
|
||||||
|
|
||||||
let images = []; // Armazena as imagens capturadas
|
|
||||||
|
|
||||||
|
|
||||||
// Iniciar a câmera
|
|
||||||
startCameraButton.addEventListener('click', function() {
|
|
||||||
if (navigator.mediaDevices.getUserMedia) {
|
|
||||||
navigator.mediaDevices.getUserMedia({
|
|
||||||
video: {
|
|
||||||
facingMode: "environment"
|
|
||||||
} // Usando a câmera traseira
|
|
||||||
})
|
|
||||||
.then(function(localStream) {
|
|
||||||
stream = localStream;
|
|
||||||
video.srcObject = stream;
|
|
||||||
})
|
|
||||||
.catch(function(error) {
|
|
||||||
console.log("Algo deu errado ao acessar a câmera!", error);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
captureButton.style.display = "block";
|
|
||||||
});
|
|
||||||
|
|
||||||
// Parar a câmera
|
|
||||||
stopCameraButton.addEventListener('click', function() {
|
|
||||||
if (stream) {
|
|
||||||
const tracks = stream.getTracks();
|
|
||||||
tracks.forEach(track => track.stop());
|
|
||||||
video.srcObject = null; // Limpa o vídeo
|
|
||||||
}
|
|
||||||
captureButton.style.display = "none";
|
|
||||||
});
|
|
||||||
|
|
||||||
// Capturar a foto
|
|
||||||
captureButton.addEventListener('click', function() {
|
|
||||||
if (images.length < 3) {
|
|
||||||
context.drawImage(video, 0, 0, 320, 240);
|
|
||||||
canvas.style.display = 'none';
|
|
||||||
const imageDataURL = canvas.toDataURL('image/png');
|
|
||||||
images.push(imageDataURL);
|
|
||||||
updateCapturedImagesDisplay();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
function updateCapturedImagesDisplay() {
|
|
||||||
const capturedImagesDiv = document.getElementById('capturedImages');
|
|
||||||
capturedImagesDiv.innerHTML = ''; // Limpa a exibição anterior
|
|
||||||
capturedImagesDiv.classList.add('d-flex', 'flex-wrap', 'justify-content-center', 'align-items-center');
|
|
||||||
|
|
||||||
images.forEach((image, index) => {
|
|
||||||
const imageContainer = document.createElement('div');
|
|
||||||
imageContainer.classList.add('position-relative', 'm-3'); // Aumentou a margem para 'm-3'
|
|
||||||
|
|
||||||
const imageElem = document.createElement('img');
|
|
||||||
imageElem.src = image;
|
|
||||||
imageElem.classList.add('rounded'); // Adiciona bordas arredondadas
|
|
||||||
imageElem.style.width = '100px'; // Define um tamanho fixo para a visualização
|
|
||||||
imageElem.setAttribute('data-index', index);
|
|
||||||
imageElem.onclick = function() {
|
|
||||||
showImageModal(image);
|
|
||||||
}; // Adiciona o evento para expandir
|
|
||||||
imageContainer.appendChild(imageElem);
|
|
||||||
|
|
||||||
const closeButton = document.createElement('button');
|
|
||||||
closeButton.innerHTML = 'X';
|
|
||||||
closeButton.classList.add('btn', 'btn-danger', 'btn-sm', 'position-absolute');
|
|
||||||
closeButton.style.borderRadius = '50%'; // Torna o botão circular
|
|
||||||
closeButton.style.right = '-10px'; // Ajusta a posição à direita para tornar o botão mais acessível
|
|
||||||
closeButton.style.top = '-10px'; // Ajusta a posição superior
|
|
||||||
closeButton.onclick = function() {
|
|
||||||
removeImage(index);
|
|
||||||
};
|
|
||||||
imageContainer.appendChild(closeButton);
|
|
||||||
|
|
||||||
capturedImagesDiv.appendChild(imageContainer);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function removeImage(index) {
|
|
||||||
images.splice(index, 1);
|
|
||||||
updateCapturedImagesDisplay();
|
|
||||||
}
|
|
||||||
|
|
||||||
function showImageModal(imageSrc) {
|
|
||||||
const modalImage = document.getElementById('modalImage');
|
|
||||||
modalImage.src = imageSrc;
|
|
||||||
$('#imageModal').modal('show'); // Usando jQuery para exibir a modal
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
document.querySelectorAll('form[id^="form"]').forEach(function(form) {
|
|
||||||
form.addEventListener('submit', function(e) {
|
|
||||||
e.preventDefault(); // Impede o envio padrão do formulário
|
|
||||||
|
|
||||||
// Encontra o input no formulário atual onde as imagens capturadas devem ser anexadas
|
|
||||||
const formId = this.getAttribute('id');
|
|
||||||
const capturedImagesInput = this.querySelector(`#capturedImagesInput-${formId}`);
|
|
||||||
|
|
||||||
// Aqui você precisa garantir que 'images' contém as imagens capturadas para o formulário atual
|
|
||||||
// Isso pode requerer uma lógica adicional para associar imagens capturadas a formulários específicos
|
|
||||||
capturedImagesInput.value = JSON.stringify(
|
|
||||||
images); // Converte o array de imagens em uma string JSON para o formulário atual
|
|
||||||
|
|
||||||
this.submit(); // Envia o formulário após ajustar os dados
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Script para abrir os card sem tem que click diretamente no icone -->
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(document).ready(function() {
|
|
||||||
$('.clickable').on('click', function(e) {
|
|
||||||
// Verifica se o clique não foi no botão
|
|
||||||
if (!$(e.target).is('.collapse-button') && !$(e.target).is('.collapse-button *')) {
|
|
||||||
$(this).find('.collapse-button').trigger('click');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{{-- Este script serve para ter a opcao de deselecionar o botao Radio caso tenho apertado incorretamente --}}
|
|
||||||
<script>
|
|
||||||
$(document).ready(function() {
|
|
||||||
// Armazenar o último botão de rádio clicado
|
|
||||||
let lastCheckedRadio = null;
|
|
||||||
|
|
||||||
// Evento de clique nos botões de rádio com a classe 'toggle-radio'
|
|
||||||
$('.toggle-radio').on('click', function(event) {
|
|
||||||
if (this === lastCheckedRadio) {
|
|
||||||
// Se clicar no mesmo botão de rádio que foi clicado anteriormente, desmarque
|
|
||||||
$(this).prop('checked', false);
|
|
||||||
lastCheckedRadio = null;
|
|
||||||
} else {
|
|
||||||
// Caso contrário, atualize lastCheckedRadio com o botão de rádio atual
|
|
||||||
lastCheckedRadio = this;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<!-- Adicione o JavaScript no final do body -->
|
|
||||||
<script>
|
|
||||||
$(function() {
|
|
||||||
$('[data-toggle="tooltip"]').tooltip();
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
{{-- <script type="text/javascript">
|
|
||||||
let formSubmitted = false;
|
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', (event) => {
|
|
||||||
const form = document.getElementById('idDoFormulario');
|
|
||||||
if (form) {
|
|
||||||
form.addEventListener('submit', function() {
|
|
||||||
formSubmitted = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
form.addEventListener('input', function() {
|
|
||||||
addBeforeUnload();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
console.error('Formulário não encontrado!');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
function addBeforeUnload() {
|
|
||||||
window.addEventListener('beforeunload', function(e) {
|
|
||||||
if (!formSubmitted) {
|
|
||||||
const message = 'Você tem alterações não salvas. Se você sair, perderá essas alterações.';
|
|
||||||
e.returnValue = message;
|
|
||||||
return message;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script> --}}
|
|
||||||
|
|
||||||
{{-- <script type="text/javascript">
|
|
||||||
let formSubmitted = false;
|
|
||||||
let formsChanged = false;
|
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', (event) => {
|
|
||||||
const forms = document.querySelectorAll('form');
|
|
||||||
if (forms.length > 0) {
|
|
||||||
forms.forEach(form => {
|
|
||||||
form.addEventListener('submit', function() {
|
|
||||||
formSubmitted = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
// Adiciona o evento de input a cada form para marcar formsChanged como true
|
|
||||||
form.addEventListener('input', function() {
|
|
||||||
formsChanged = true;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
console.error('Nenhum formulário encontrado!');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Adiciona o evento beforeunload para verificar se houve mudanças nos formulários
|
|
||||||
window.addEventListener('beforeunload', function(e) {
|
|
||||||
if (!formSubmitted && formsChanged) {
|
|
||||||
const message = 'Você tem alterações não salvas. Se você sair, perderá essas alterações.';
|
|
||||||
e.returnValue = message; // Necessário para alguns navegadores
|
|
||||||
return message; // Exibe a mensagem de confirmação
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script> --}}
|
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
let formSubmitted = false;
|
|
||||||
let formsChanged = false;
|
|
||||||
const controlEquipmentId = "{{ $dataControlEquipment->control_equipment_workstation_id }}";
|
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
|
||||||
|
|
||||||
//Script para verificar se em alguns dos form foi escrito algo em seu form
|
|
||||||
const forms = document.querySelectorAll('form');
|
|
||||||
if (forms.length > 0) {
|
|
||||||
forms.forEach(form => {
|
|
||||||
form.addEventListener('submit', function() {
|
|
||||||
formSubmitted = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
// Adiciona o evento de input a cada form para marcar formsChanged como true
|
|
||||||
form.addEventListener('input', function() {
|
|
||||||
formsChanged = true;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
console.error('Nenhum formulário encontrado!');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Envia o heartbeat a cada 30 segundos
|
|
||||||
setInterval(function() {
|
|
||||||
fetch("/api/updateSessionStatus/" + controlEquipmentId, {
|
|
||||||
method: 'POST',
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json',
|
|
||||||
'X-CSRF-TOKEN': "{{ csrf_token() }}"
|
|
||||||
},
|
|
||||||
body: JSON.stringify({
|
|
||||||
status: 1
|
|
||||||
}) // Status 1 indica sessão ativa
|
|
||||||
}).then(response => response.json())
|
|
||||||
.then(data => console.log('Heartbeat enviado', data))
|
|
||||||
.catch(error => console.error('Erro ao enviar heartbeat', error));
|
|
||||||
}, 10000);
|
|
||||||
|
|
||||||
// Adiciona o evento beforeunload para verificar se houve mudanças nos formulários
|
|
||||||
window.addEventListener('beforeunload', function(e) {
|
|
||||||
if (!formSubmitted && formsChanged) {
|
|
||||||
const message =
|
|
||||||
'Você tem alterações não salvas. Se você sair, perderá essas alterações.';
|
|
||||||
e.returnValue = message; // Necessário para alguns navegadores
|
|
||||||
return message; // Exibe a mensagem de confirmação
|
|
||||||
}
|
|
||||||
|
|
||||||
// Tenta enviar o beacon para fechar a sessão
|
|
||||||
navigator.sendBeacon(`/api/closeSession/${controlEquipmentId}`, JSON.stringify({
|
|
||||||
status: 0
|
|
||||||
}));
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|
|
||||||
781
resources/views/workstations/workstationsCopy.blade.php
Executable file
|
|
@ -0,0 +1,781 @@
|
||||||
|
@extends('Templates.templateWorkstations')
|
||||||
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||||
|
|
||||||
|
<!-- jQuery -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/jquery/jquery.min.js') }}"></script>
|
||||||
|
<!-- jQuery UI 1.11.4 -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/jquery-ui/jquery-ui.min.js') }}"></script>
|
||||||
|
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
|
||||||
|
<script>
|
||||||
|
$.widget.bridge('uibutton', $.ui.button)
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{{-- <!-- Bootstrap 4 -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/bootstrap/js/bootstrap.bundle.min.js') }}"></script>
|
||||||
|
<!-- ChartJS -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/chart.js/Chart.min.js') }}"></script>
|
||||||
|
<!-- Sparkline -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/sparklines/sparkline.js') }}"></script>
|
||||||
|
<!-- JQVMap -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/jqvmap/jquery.vmap.min.js') }}"></script>
|
||||||
|
<script src="{{ URL::asset('assets/plugins/jqvmap/maps/jquery.vmap.usa.js') }}"></script>
|
||||||
|
<!-- jQuery Knob Chart -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/jquery-knob/jquery.knob.min.js') }}"></script>
|
||||||
|
<!-- daterangepicker -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/moment/moment.min.js') }}"></script>
|
||||||
|
<script src="{{ URL::asset('assets/plugins/daterangepicker/daterangepicker.js') }}"></script>
|
||||||
|
<!-- Tempusdominus Bootstrap 4 -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js') }}">
|
||||||
|
</script>
|
||||||
|
<!-- Summernote -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/summernote/summernote-bs4.min.js') }}"></script>
|
||||||
|
<!-- overlayScrollbars -->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/overlayScrollbars/js/jquery.overlayScrollbars.min.js') }}"></script>
|
||||||
|
<!-- AdminLTE App -->
|
||||||
|
<script src="{{ URL::asset('assets/dist/js/adminlte.js') }}"></script>
|
||||||
|
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
|
||||||
|
<script src="{{ URL::asset('assets/dist/js/pages/dashboard.js') }}"></script>
|
||||||
|
<!-- HTML5 QRCode-->
|
||||||
|
<script src="{{ URL::asset('assets/plugins/html5-qrcode/html5-qrcode.min.js') }}"></script> --}}
|
||||||
|
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
@if (session('danger'))
|
||||||
|
<div class="content">
|
||||||
|
<div class="alert alert-danger" role="alert" id="alert-message-danger" style="transition: opacity 1s;">
|
||||||
|
{{ session('danger') }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
setTimeout(function() {
|
||||||
|
$('#alert-message-danger').fadeOut('slow', function() {
|
||||||
|
$(this).remove();
|
||||||
|
});
|
||||||
|
}, 5000); // A mensagem desaparecerá após 5 segundos
|
||||||
|
</script>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<section class="content">
|
||||||
|
|
||||||
|
<div class="row justify-content-center align-items-center">
|
||||||
|
<div class="col-12">
|
||||||
|
|
||||||
|
<div class="card card-info" style="border: 1px solid red">
|
||||||
|
<!-- Card-header principal card-->
|
||||||
|
<div class="card-header d-flex justify-content-between align-items-center flex-wrap">
|
||||||
|
<!-- Alinhado à esquerda -->
|
||||||
|
<div class="col-auto">
|
||||||
|
<a class="open-modal" data-toggle="modal" data-target="#modal-showEquipment">
|
||||||
|
<i class="fa-sharp fa-regular fa-newspaper"></i> Portfólio
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Centralizado -->
|
||||||
|
<div class="col-auto text-center flex-grow-1">
|
||||||
|
<h4 class="mb-0">Ispt.N :{{ $detalsEquipment->istp_number }}</h4>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Alinhado à direita -->
|
||||||
|
<div class="col-auto">
|
||||||
|
<h5 class="mb-0 text-right">Ambito :{{ $detalsEquipment->equipment_ambit }}</h5>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Modal do Portifolio -->
|
||||||
|
<div class="modal fade" id="modal-showEquipment">
|
||||||
|
<div class="modal-dialog modal-xl">
|
||||||
|
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header bg-light">
|
||||||
|
<h4 class="modal-title">Equipamento:</h4>
|
||||||
|
<h3>{{ $detalsEquipment->equipment_tag }}</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<input type="hidden" name="equipmentId" value="{{ $detalsEquipment->equipment_id }}">
|
||||||
|
|
||||||
|
<!-- Bordered Tabs -->
|
||||||
|
<ul class="nav nav-tabs nav-tabs-bordered" id="portfolioTabs" role="tablist">
|
||||||
|
<li class="nav-item">
|
||||||
|
<button class="nav-link active" id="view-tab" data-bs-toggle="tab"
|
||||||
|
data-bs-target="#show-Equipment" type="button" role="tab"
|
||||||
|
aria-controls="show-Equipment" aria-selected="true">
|
||||||
|
Visualizar
|
||||||
|
</button>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="nav-item">
|
||||||
|
<button class="nav-link" id="edit-tab" data-bs-toggle="tab"
|
||||||
|
data-bs-target="#edit-equipment" type="button" role="tab"
|
||||||
|
aria-controls="edit-equipment" aria-selected="false">
|
||||||
|
Editar
|
||||||
|
</button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="tab-content pt-2" id="portfolioTabsContent">
|
||||||
|
<x-portfolio.portfolioAttributesForEquipments :detalsEquipment="$detalsEquipment"
|
||||||
|
:specificAttributesArray="$specificAttributesArray" :portfolioOnlyreadOrEditToo="$portfolioOnlyreadOrEditToo" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div><!-- ./modal-body-->
|
||||||
|
|
||||||
|
</div><!-- ./modal-content-->
|
||||||
|
</div><!-- ./modal-dialog modal-xl-->
|
||||||
|
</div> <!-- ./modal-showEquipment-->
|
||||||
|
</div><!-- ./Card-header-->
|
||||||
|
|
||||||
|
<!-- Card corpo do equipamento para onde vai receber as Tarefas elementares -->
|
||||||
|
<div class="card-body">
|
||||||
|
|
||||||
|
<div class="card card-success collapsed-card">
|
||||||
|
<div class="card-header clickable">
|
||||||
|
<div class="d-flex justify-content-between align-items-center" style="width: 100%;">
|
||||||
|
<h3 class="card-title">Comentários sobre o Equipamento</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>
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
|
|
||||||
|
<div class="chat-container"
|
||||||
|
style="height: 250px; overflow-y: scroll; padding: 10px; background-color: #f9f9f9; border: 1px solid #ddd;">
|
||||||
|
|
||||||
|
<!-- Mensagens do Chat -->
|
||||||
|
@foreach ($receiveComments as $receiveComment)
|
||||||
|
<div
|
||||||
|
class="chat-message {{ $receiveComment->type_users == 2 ? 'right' : 'left' }} mt-1">
|
||||||
|
<div class="flex-shrink-1 bg-light rounded py-2 px-3 {{ $receiveComment->type_users == 2 ? 'mr-3' : 'ml-3' }}"
|
||||||
|
style="border: 1px solid #ccc; box-shadow: 0 2px 5px rgba(0,0,0,0.1);">
|
||||||
|
<div class="font-weight-bold mb-1">{{ $receiveComment->user->user_name }}
|
||||||
|
<b>({{ $receiveComment->user->userType->type_user }})</b>
|
||||||
|
</div>
|
||||||
|
<p style="color:black">{{ $receiveComment->comment }}</p>
|
||||||
|
<div class="text-muted small text-nowrap mt-2">
|
||||||
|
{{ $receiveComment->creation_date }} (
|
||||||
|
{{ \Carbon\Carbon::parse($receiveComment->creation_date)->diffForHumans() }})
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Área de envio de nova mensagem -->
|
||||||
|
<div class="mt-3">
|
||||||
|
<form action="{{ route('createComment') }}" method="post">
|
||||||
|
@csrf
|
||||||
|
<input type="hidden" name="projectID"
|
||||||
|
value="{{ $detalsEquipment->company_projects_id }}">
|
||||||
|
<input type="hidden" name="equipmentID"
|
||||||
|
value="{{ $dataControlEquipment['collection']->equipmentWorkHistorys_id }}">
|
||||||
|
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="comment" class="form-label">Comentário/Equipamento</label>
|
||||||
|
<textarea class="form-control" id="comment" name="comment" rows="3" required
|
||||||
|
placeholder="Digite aqui suas observações ou comentário..."></textarea>
|
||||||
|
</div>
|
||||||
|
<button class="btn btn-success float-right" type="submit">Enviar</button>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<form
|
||||||
|
action="{{ route('cancelElementalTaskForEquipment', ['controlEquipmentID' => $dataControlEquipment['collection']->control_equipment_workstation_id]) }}"
|
||||||
|
method="get">
|
||||||
|
<div class="card-footer">
|
||||||
|
<button type="submit" data-action="cancel" class="btn btn-danger float-right"
|
||||||
|
style="background-color: red">Finalizar Ações ao equipamento</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div class="card-info">Teste</div>
|
||||||
|
<div class="card-info">teste</div>
|
||||||
|
|
||||||
|
{{-- <x-layouts.elementalTasksOfficial :recebeTasksForEquipment="$recebeTasksForEquipment" :dataControlEquipment="$dataControlEquipment" /> --}}
|
||||||
|
|
||||||
|
</div><!-- card-body do card principal -->
|
||||||
|
</div> <!-- ./ Card card-indo principal-->
|
||||||
|
|
||||||
|
</div> <!-- ./ col-12 -->
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- Modal -->
|
||||||
|
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
||||||
|
aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header bg-primary">
|
||||||
|
<h5 class="modal-title" id="exampleModalLabel">Conformidade da etiqueta</h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body" style="overflow-y: auto; max-height: 400px;">
|
||||||
|
|
||||||
|
<div class="row justify-content-center align-items-center" style="height: 50vh">
|
||||||
|
<div class="col-12 col-lg-7">
|
||||||
|
<div class="card card-info">
|
||||||
|
<div class="card-header" style="background-color: #00B0EA">
|
||||||
|
<h3 class="card-title text-center">Escaneie a outra Tag para confimar a junção</h3>
|
||||||
|
</div>
|
||||||
|
<div id="startScanUnique" class="card-body text-center">
|
||||||
|
<div class="text-white p-3 mt-3 rounded" style="background-color: #00B0EA">
|
||||||
|
<i class="fas fa-qrcode fa-5x"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="readerUnique" style="display: none;">
|
||||||
|
<div class="embed-responsive embed-responsive-1by1">
|
||||||
|
<video id="videoUnique" class="embed-responsive-item"></video>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="text-center mt-3"> <!-- Adiciona margem acima e centraliza os botões -->
|
||||||
|
<button id="stopQrcodeRead" class="btn btn-warning mb-2">Parar Leitura</button>
|
||||||
|
<!-- Adiciona margem abaixo do botão -->
|
||||||
|
<div> <!-- Usar div para quebrar linha -->
|
||||||
|
<button type="button" class="btn btn-danger" data-toggle="modal"
|
||||||
|
data-target="#exampleModalSmall" style="background-color: red">
|
||||||
|
Confirmar junção de etiquetas <b>Manualmente</b>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Fechar</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="modal fade" id="exampleModalSmall">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title">Confirmar etiquetas Manualmente</h4>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">x</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<p>
|
||||||
|
Deseja realmente confirmar as etiquetas manualmente? Esta ação deve ser efetuada apenas se a
|
||||||
|
confirmação por QR code não for possível. Ao confirmar, está a validar que o <b>Corpo</b> e o
|
||||||
|
<b>Obturador</b> pertencem ao mesmo equipamento.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Fechar</button>
|
||||||
|
<button type="button" id="btnConfirmManual" class="btn btn-primary">Confirmar</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal fade" id="AddPhoneInElementalTaskModal" tabindex="-1" role="dialog"
|
||||||
|
aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header bg-primary">
|
||||||
|
<h5 class="modal-title text-white" id="exampleModalLabel">Adicionar Imagens</h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<!-- Botões de controle da câmera -->
|
||||||
|
<div class="row justify-content-center text-center mb-4">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<button class="btn btn-success w-100" id="startCamera">Iniciar Câmera</button>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<button class="btn btn-danger w-100" id="stopCamera">Parar Câmera</button>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<button class="btn btn-primary w-100" id="capture" style="display: none">Capturar
|
||||||
|
Foto</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Vídeo e canvas -->
|
||||||
|
<div class="row justify-content-center text-center mb-4">
|
||||||
|
<video id="video" class="rounded border border-secondary" width="320" height="240"
|
||||||
|
autoplay></video>
|
||||||
|
</div>
|
||||||
|
<!-- Imagens capturadas -->
|
||||||
|
<div class="row" id="capturedImages" class="text-center">
|
||||||
|
<canvas id="canvas" width="320" height="240" class="d-none"></canvas>
|
||||||
|
<!-- As imagens capturadas serão inseridas aqui -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Fechar</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="modal" id="imageModal">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<img id="modalImage" src="" style="width: 100%;"> <!-- Imagem será inserida aqui -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Script para as Te7, verificar se as tarefas Te5 e Te6 ja foram finalizadas --}}
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
|
var controlEquipmentWorkstationId = $('#controlEquipmentID_TE7').val();
|
||||||
|
|
||||||
|
|
||||||
|
// Fazer a requisição AJAX para a API
|
||||||
|
$.ajax({
|
||||||
|
url: '/api/verify-equipment-te7/' + controlEquipmentWorkstationId,
|
||||||
|
method: 'GET',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'X-CSRF-TOKEN': "{{ csrf_token() }}"
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
var infoIcon = $('#infoIcon');
|
||||||
|
var newTitle;
|
||||||
|
var newColor;
|
||||||
|
|
||||||
|
if (response.status === true) {
|
||||||
|
// Habilita o botão
|
||||||
|
$('#checkVerifyTe7').prop('disabled', false);
|
||||||
|
// Mensagem e cor para o status true
|
||||||
|
newTitle = 'Verificação de tarefas anteriores bem-sucedida! Pode salvar.';
|
||||||
|
newColor = '#28a745'; // Verde
|
||||||
|
} else {
|
||||||
|
// Mensagem e cor para o status false
|
||||||
|
newTitle = response.message || 'Erro na verificação.';
|
||||||
|
newColor = '#dc3545'; // Vermelho
|
||||||
|
}
|
||||||
|
|
||||||
|
// Atualizar o título do tooltip e a cor do ícone
|
||||||
|
infoIcon.attr('title', newTitle).tooltip('dispose').tooltip({
|
||||||
|
title: newTitle
|
||||||
|
}); // Atualizar o conteúdo do tooltip
|
||||||
|
infoIcon.css('background-color', newColor); // Atualizar a cor do ícone
|
||||||
|
},
|
||||||
|
error: function(xhr, status, error) {
|
||||||
|
// Em caso de erro na requisição, mostrar uma mensagem de erro
|
||||||
|
var infoIcon = $('#infoIcon');
|
||||||
|
infoIcon.attr('title', 'Erro ao comunicar com a API.').tooltip('dispose').tooltip({
|
||||||
|
title: 'Erro ao comunicar com a API.'
|
||||||
|
});
|
||||||
|
infoIcon.css('background-color', '#dc3545'); // Vermelho para erro
|
||||||
|
console.error('Erro na API:', error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{{-- Script para monitorar a resposta da TE14 --}}
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
|
// Função para definir todos os campos abaixo como desabilitados e definir valores como "N/A"
|
||||||
|
function disableFields() {
|
||||||
|
// Desabilitar campos de input e selects
|
||||||
|
$('#body-test-pressure, #seat-test-pressure, #leak-tightness-test').val('N/A').prop('readonly',
|
||||||
|
true);
|
||||||
|
$('#fluid_test-select, #test_result-select').val('n_a').prop('disabled', true);
|
||||||
|
$('textarea[name="ID20[observations-text]"]').val('N/A').prop('readonly', true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Função para habilitar todos os campos abaixo e restaurar os valores originais
|
||||||
|
function enableFields() {
|
||||||
|
// Habilitar campos de input e selects
|
||||||
|
$('#body-test-pressure, #seat-test-pressure, #leak-tightness-test').val('').prop('readonly', false);
|
||||||
|
$('#fluid_test-select, #test_result-select').val('').prop('disabled', false);
|
||||||
|
$('textarea[name="ID20[observations-text]"]').val('').prop('readonly', false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Monitorar mudanças no select
|
||||||
|
$('#api-rp-598').change(function() {
|
||||||
|
var selectedValue = $(this).val();
|
||||||
|
|
||||||
|
if (selectedValue !== 'yes') {
|
||||||
|
disableFields();
|
||||||
|
} else {
|
||||||
|
enableFields();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Verificar o valor inicial ao carregar a página
|
||||||
|
if ($('#api-rp-598').val() !== 'yes') {
|
||||||
|
disableFields();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
var equipmentId = "{{ $detalsEquipment->equipment_id }}"; // Pega o ID do equipamento
|
||||||
|
var url = "/api/receiveQuestionsEquipment/" + equipmentId; // Constrói a URL
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: url,
|
||||||
|
type: "GET",
|
||||||
|
headers: {
|
||||||
|
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') // Adiciona o token CSRF
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
|
||||||
|
// Primeiro, desabilita todos os inputs e esconde as divs
|
||||||
|
$('#valve_repair-form6, #actuator_repair-form6, #repair_positioner-form6').hide();
|
||||||
|
$('#valve_repair-form11, #actuator_repair-form11, #repair_positioner-form11')
|
||||||
|
.hide();
|
||||||
|
|
||||||
|
let showValveRepair = false;
|
||||||
|
let showActuatorRepair = false;
|
||||||
|
let showRepairPositioner = false;
|
||||||
|
|
||||||
|
// Se a partir da resposta retornado for encontrado correspondencia,entao altera o valor a true
|
||||||
|
response.forEach(function(item) {
|
||||||
|
if (item.question == 'valve_repair') {
|
||||||
|
showValveRepair = true;
|
||||||
|
} else if (item.question == 'actuator_repair') {
|
||||||
|
showActuatorRepair = true;
|
||||||
|
} else if (item.question == 'repair_positioner') {
|
||||||
|
showRepairPositioner = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Mostra ou esconde as divs com base nas variáveis de controle
|
||||||
|
if (showValveRepair) {
|
||||||
|
$('#valve_repair-form6, #valve_repair-form11').show().find('input').prop(
|
||||||
|
'disabled', false);
|
||||||
|
}
|
||||||
|
if (showActuatorRepair) {
|
||||||
|
$('#actuator_repair-form6, #actuator_repair-form11').show().find('input').prop(
|
||||||
|
'disabled', false);
|
||||||
|
}
|
||||||
|
if (showRepairPositioner) {
|
||||||
|
$('#repair_positioner-form6, #repair_positioner-form11').show().find('input')
|
||||||
|
.prop('disabled', false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Se nao tiver nenhuma ocorencia sobre as varaveis, entao deixa a div agrupando todas em hide, que serve para ajudar na responsividade pois se as colunas ficassem apenas em hide a tarefa elementar ai ter um espaco vazio em sua visualizacao
|
||||||
|
if (!showValveRepair && !showActuatorRepair) {
|
||||||
|
$('#column_valveQuestions_and_actuator-form6').hide();
|
||||||
|
}
|
||||||
|
if (!showValveRepair && !showActuatorRepair && !showRepairPositioner) {
|
||||||
|
$('#column_valve_repair_and_actuator_repair_and_repair_positioner-form11')
|
||||||
|
.hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const video = document.getElementById('video');
|
||||||
|
const canvas = document.getElementById('canvas');
|
||||||
|
const startCameraButton = document.getElementById('startCamera');
|
||||||
|
const stopCameraButton = document.getElementById('stopCamera');
|
||||||
|
const captureButton = document.getElementById('capture');
|
||||||
|
const context = canvas.getContext('2d');
|
||||||
|
let stream = null;
|
||||||
|
|
||||||
|
let imagesCount = 0; // Contador para controlar o número de imagens capturadas
|
||||||
|
|
||||||
|
let images = []; // Armazena as imagens capturadas
|
||||||
|
|
||||||
|
|
||||||
|
// Iniciar a câmera
|
||||||
|
startCameraButton.addEventListener('click', function() {
|
||||||
|
if (navigator.mediaDevices.getUserMedia) {
|
||||||
|
navigator.mediaDevices.getUserMedia({
|
||||||
|
video: {
|
||||||
|
facingMode: "environment"
|
||||||
|
} // Usando a câmera traseira
|
||||||
|
})
|
||||||
|
.then(function(localStream) {
|
||||||
|
stream = localStream;
|
||||||
|
video.srcObject = stream;
|
||||||
|
})
|
||||||
|
.catch(function(error) {
|
||||||
|
console.log("Algo deu errado ao acessar a câmera!", error);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
captureButton.style.display = "block";
|
||||||
|
});
|
||||||
|
|
||||||
|
// Parar a câmera
|
||||||
|
stopCameraButton.addEventListener('click', function() {
|
||||||
|
if (stream) {
|
||||||
|
const tracks = stream.getTracks();
|
||||||
|
tracks.forEach(track => track.stop());
|
||||||
|
video.srcObject = null; // Limpa o vídeo
|
||||||
|
}
|
||||||
|
captureButton.style.display = "none";
|
||||||
|
});
|
||||||
|
|
||||||
|
// Capturar a foto
|
||||||
|
captureButton.addEventListener('click', function() {
|
||||||
|
if (images.length < 3) {
|
||||||
|
context.drawImage(video, 0, 0, 320, 240);
|
||||||
|
canvas.style.display = 'none';
|
||||||
|
const imageDataURL = canvas.toDataURL('image/png');
|
||||||
|
images.push(imageDataURL);
|
||||||
|
updateCapturedImagesDisplay();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function updateCapturedImagesDisplay() {
|
||||||
|
const capturedImagesDiv = document.getElementById('capturedImages');
|
||||||
|
capturedImagesDiv.innerHTML = ''; // Limpa a exibição anterior
|
||||||
|
capturedImagesDiv.classList.add('d-flex', 'flex-wrap', 'justify-content-center', 'align-items-center');
|
||||||
|
|
||||||
|
images.forEach((image, index) => {
|
||||||
|
const imageContainer = document.createElement('div');
|
||||||
|
imageContainer.classList.add('position-relative', 'm-3'); // Aumentou a margem para 'm-3'
|
||||||
|
|
||||||
|
const imageElem = document.createElement('img');
|
||||||
|
imageElem.src = image;
|
||||||
|
imageElem.classList.add('rounded'); // Adiciona bordas arredondadas
|
||||||
|
imageElem.style.width = '100px'; // Define um tamanho fixo para a visualização
|
||||||
|
imageElem.setAttribute('data-index', index);
|
||||||
|
imageElem.onclick = function() {
|
||||||
|
showImageModal(image);
|
||||||
|
}; // Adiciona o evento para expandir
|
||||||
|
imageContainer.appendChild(imageElem);
|
||||||
|
|
||||||
|
const closeButton = document.createElement('button');
|
||||||
|
closeButton.innerHTML = 'X';
|
||||||
|
closeButton.classList.add('btn', 'btn-danger', 'btn-sm', 'position-absolute');
|
||||||
|
closeButton.style.borderRadius = '50%'; // Torna o botão circular
|
||||||
|
closeButton.style.right = '-10px'; // Ajusta a posição à direita para tornar o botão mais acessível
|
||||||
|
closeButton.style.top = '-10px'; // Ajusta a posição superior
|
||||||
|
closeButton.onclick = function() {
|
||||||
|
removeImage(index);
|
||||||
|
};
|
||||||
|
imageContainer.appendChild(closeButton);
|
||||||
|
|
||||||
|
capturedImagesDiv.appendChild(imageContainer);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function removeImage(index) {
|
||||||
|
images.splice(index, 1);
|
||||||
|
updateCapturedImagesDisplay();
|
||||||
|
}
|
||||||
|
|
||||||
|
function showImageModal(imageSrc) {
|
||||||
|
const modalImage = document.getElementById('modalImage');
|
||||||
|
modalImage.src = imageSrc;
|
||||||
|
$('#imageModal').modal('show'); // Usando jQuery para exibir a modal
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
document.querySelectorAll('form[id^="form"]').forEach(function(form) {
|
||||||
|
form.addEventListener('submit', function(e) {
|
||||||
|
e.preventDefault(); // Impede o envio padrão do formulário
|
||||||
|
|
||||||
|
// Encontra o input no formulário atual onde as imagens capturadas devem ser anexadas
|
||||||
|
const formId = this.getAttribute('id');
|
||||||
|
const capturedImagesInput = this.querySelector(`#capturedImagesInput-${formId}`);
|
||||||
|
|
||||||
|
// Aqui você precisa garantir que 'images' contém as imagens capturadas para o formulário atual
|
||||||
|
// Isso pode requerer uma lógica adicional para associar imagens capturadas a formulários específicos
|
||||||
|
capturedImagesInput.value = JSON.stringify(
|
||||||
|
images); // Converte o array de imagens em uma string JSON para o formulário atual
|
||||||
|
|
||||||
|
this.submit(); // Envia o formulário após ajustar os dados
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Script para abrir os card sem tem que click diretamente no icone -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('.clickable').on('click', function(e) {
|
||||||
|
// Verifica se o clique não foi no botão
|
||||||
|
if (!$(e.target).is('.collapse-button') && !$(e.target).is('.collapse-button *')) {
|
||||||
|
$(this).find('.collapse-button').trigger('click');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{{-- Este script serve para ter a opcao de deselecionar o botao Radio caso tenho apertado incorretamente --}}
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
// Armazenar o último botão de rádio clicado
|
||||||
|
let lastCheckedRadio = null;
|
||||||
|
|
||||||
|
// Evento de clique nos botões de rádio com a classe 'toggle-radio'
|
||||||
|
$('.toggle-radio').on('click', function(event) {
|
||||||
|
if (this === lastCheckedRadio) {
|
||||||
|
// Se clicar no mesmo botão de rádio que foi clicado anteriormente, desmarque
|
||||||
|
$(this).prop('checked', false);
|
||||||
|
lastCheckedRadio = null;
|
||||||
|
} else {
|
||||||
|
// Caso contrário, atualize lastCheckedRadio com o botão de rádio atual
|
||||||
|
lastCheckedRadio = this;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Adicione o JavaScript no final do body -->
|
||||||
|
<script>
|
||||||
|
$(function() {
|
||||||
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
{{-- <script type="text/javascript">
|
||||||
|
let formSubmitted = false;
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', (event) => {
|
||||||
|
const form = document.getElementById('idDoFormulario');
|
||||||
|
if (form) {
|
||||||
|
form.addEventListener('submit', function() {
|
||||||
|
formSubmitted = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
form.addEventListener('input', function() {
|
||||||
|
addBeforeUnload();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.error('Formulário não encontrado!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function addBeforeUnload() {
|
||||||
|
window.addEventListener('beforeunload', function(e) {
|
||||||
|
if (!formSubmitted) {
|
||||||
|
const message = 'Você tem alterações não salvas. Se você sair, perderá essas alterações.';
|
||||||
|
e.returnValue = message;
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script> --}}
|
||||||
|
|
||||||
|
{{-- <script type="text/javascript">
|
||||||
|
let formSubmitted = false;
|
||||||
|
let formsChanged = false;
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', (event) => {
|
||||||
|
const forms = document.querySelectorAll('form');
|
||||||
|
if (forms.length > 0) {
|
||||||
|
forms.forEach(form => {
|
||||||
|
form.addEventListener('submit', function() {
|
||||||
|
formSubmitted = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Adiciona o evento de input a cada form para marcar formsChanged como true
|
||||||
|
form.addEventListener('input', function() {
|
||||||
|
formsChanged = true;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.error('Nenhum formulário encontrado!');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Adiciona o evento beforeunload para verificar se houve mudanças nos formulários
|
||||||
|
window.addEventListener('beforeunload', function(e) {
|
||||||
|
if (!formSubmitted && formsChanged) {
|
||||||
|
const message = 'Você tem alterações não salvas. Se você sair, perderá essas alterações.';
|
||||||
|
e.returnValue = message; // Necessário para alguns navegadores
|
||||||
|
return message; // Exibe a mensagem de confirmação
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script> --}}
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
let formSubmitted = false;
|
||||||
|
let formsChanged = false;
|
||||||
|
const controlEquipmentId = "{{ $dataControlEquipment['collection']->control_equipment_workstation_id }}";
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
|
||||||
|
//Script para verificar se em alguns dos form foi escrito algo em seu form
|
||||||
|
const forms = document.querySelectorAll('form');
|
||||||
|
if (forms.length > 0) {
|
||||||
|
forms.forEach(form => {
|
||||||
|
form.addEventListener('submit', function() {
|
||||||
|
formSubmitted = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Adiciona o evento de input a cada form para marcar formsChanged como true
|
||||||
|
form.addEventListener('input', function() {
|
||||||
|
formsChanged = true;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.error('Nenhum formulário encontrado!');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Envia o heartbeat a cada 30 segundos
|
||||||
|
setInterval(function() {
|
||||||
|
fetch("/api/updateSessionStatus/" + controlEquipmentId, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'X-CSRF-TOKEN': "{{ csrf_token() }}"
|
||||||
|
},
|
||||||
|
body: JSON.stringify({
|
||||||
|
status: 1
|
||||||
|
}) // Status 1 indica sessão ativa
|
||||||
|
}).then(response => response.json())
|
||||||
|
.then(data => console.log('Heartbeat enviado', data))
|
||||||
|
.catch(error => console.error('Erro ao enviar heartbeat', error));
|
||||||
|
}, 10000);
|
||||||
|
|
||||||
|
// Adiciona o evento beforeunload para verificar se houve mudanças nos formulários
|
||||||
|
window.addEventListener('beforeunload', function(e) {
|
||||||
|
if (!formSubmitted && formsChanged) {
|
||||||
|
const message =
|
||||||
|
'Você tem alterações não salvas. Se você sair, perderá essas alterações.';
|
||||||
|
e.returnValue = message; // Necessário para alguns navegadores
|
||||||
|
return message; // Exibe a mensagem de confirmação
|
||||||
|
}
|
||||||
|
|
||||||
|
// Tenta enviar o beacon para fechar a sessão
|
||||||
|
navigator.sendBeacon(`/api/closeSession/${controlEquipmentId}`, JSON.stringify({
|
||||||
|
status: 0
|
||||||
|
}));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
@endsection
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use App\DataTables\UsersDataTable;
|
use App\DataTables\UsersDataTable;
|
||||||
use App\Http\Controllers\ClientController;
|
|
||||||
use App\Services\PdfWrapper;
|
use App\Services\PdfWrapper;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
|
@ -15,7 +14,7 @@
|
||||||
use App\Http\Controllers\Auth\PasswordResetLinkController;
|
use App\Http\Controllers\Auth\PasswordResetLinkController;
|
||||||
use Illuminate\Foundation\Auth\EmailVerificationRequest;
|
use Illuminate\Foundation\Auth\EmailVerificationRequest;
|
||||||
|
|
||||||
|
use App\Http\Controllers\ClientController;
|
||||||
use App\Http\Controllers\CustomRegistrationController;
|
use App\Http\Controllers\CustomRegistrationController;
|
||||||
use App\Http\Controllers\CreateProjectController;
|
use App\Http\Controllers\CreateProjectController;
|
||||||
|
|
||||||
|
|
@ -42,9 +41,6 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Route::get('viewProjectsList/{orderProjectID}', [ProjectoDatacontroller::class, 'viewProjectsList'])->name('viewProjectsList');
|
Route::get('viewProjectsList/{orderProjectID}', [ProjectoDatacontroller::class, 'viewProjectsList'])->name('viewProjectsList');
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -67,6 +63,9 @@
|
||||||
|
|
||||||
Route::get('showAllEquipmentsInProjectForQrCode/{projectId}', [PreparedProjectController::class, 'showAllEquipmentsInProjectForQrCode'])->name('showAllEquipmentsInProjectForQrCode');
|
Route::get('showAllEquipmentsInProjectForQrCode/{projectId}', [PreparedProjectController::class, 'showAllEquipmentsInProjectForQrCode'])->name('showAllEquipmentsInProjectForQrCode');
|
||||||
|
|
||||||
|
Route::post('DownloadAllPdfsWork',[ProjectoDatacontroller::class,'DownloadAllPdfsWork'])->name('DownloadAllPdfsWork');
|
||||||
|
|
||||||
|
|
||||||
Route::post('completedEquipmentInProject',[ProjectoDatacontroller::class,'completedEquipmentInProject'])->name('completedEquipmentInProject');
|
Route::post('completedEquipmentInProject',[ProjectoDatacontroller::class,'completedEquipmentInProject'])->name('completedEquipmentInProject');
|
||||||
|
|
||||||
Route::get('testRelatorio', [ProjectoDatacontroller::class, 'testRelatorio'])->name('testRelatorio');
|
Route::get('testRelatorio', [ProjectoDatacontroller::class, 'testRelatorio'])->name('testRelatorio');
|
||||||
|
|
@ -245,14 +244,13 @@
|
||||||
Route::post('receiveAnswersEquipment/{control_equipment_workstation_id}', [WorkstationsJobsController::class, 'receiveAnswersEquipment'])->name('receiveAnswersEquipment');
|
Route::post('receiveAnswersEquipment/{control_equipment_workstation_id}', [WorkstationsJobsController::class, 'receiveAnswersEquipment'])->name('receiveAnswersEquipment');
|
||||||
Route::post('sendTaskComment/{control_equipment_workstation_id}', [WorkstationsJobsController::class, 'sendTaskComment'])->name('sendTaskComment');
|
Route::post('sendTaskComment/{control_equipment_workstation_id}', [WorkstationsJobsController::class, 'sendTaskComment'])->name('sendTaskComment');
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::middleware(['checkUserType:testClient'])->group(function () {
|
Route::middleware(['checkUserType:testClient'])->group(function () {
|
||||||
// Dashboard
|
// Dashboard
|
||||||
Route::get('dashboardClient', [ClientController::class, 'receiveProjectsClient'])->name('dashboardClient');
|
Route::get('dashboardClient', [ClientController::class, 'receiveProjectsClient'])->name('dashboardClient');
|
||||||
// Relatorios
|
// Relatorios
|
||||||
Route::get('reportingDataClient/{clientID?}', [ClientController::class, 'reportingDataClient'])->name('reportingDataClient');
|
Route::get('reportingDataClient/{clientID?}', [ClientController::class, 'reportingDawtaClient'])->name('reportingDataClient');
|
||||||
|
|
||||||
//Api
|
//Api
|
||||||
Route::get('/api/receiveMonths/{yearsProjects}', [ClientController::class, 'receiveMonths']);
|
Route::get('/api/receiveMonths/{yearsProjects}', [ClientController::class, 'receiveMonths']);
|
||||||
|
|
|
||||||