update WS 31/01
This commit is contained in:
parent
5ef4d8c95b
commit
02281f4892
|
|
@ -5,6 +5,8 @@
|
||||||
use App\Models\AmbitsEquipment;
|
use App\Models\AmbitsEquipment;
|
||||||
use App\Models\Equipment;
|
use App\Models\Equipment;
|
||||||
use App\Models\EquipmentAssociationAmbit;
|
use App\Models\EquipmentAssociationAmbit;
|
||||||
|
use App\Models\EquipmentWorkHistory;
|
||||||
|
use App\Models\SpecificAttributesEquipmentType;
|
||||||
use App\Models\Unit;
|
use App\Models\Unit;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|
@ -12,6 +14,7 @@
|
||||||
use App\Models\CompanyProject;
|
use App\Models\CompanyProject;
|
||||||
use App\Models\EquipmentType;
|
use App\Models\EquipmentType;
|
||||||
use App\Models\Plant;
|
use App\Models\Plant;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
|
||||||
use Yajra\DataTables\Facades\DataTables;
|
use Yajra\DataTables\Facades\DataTables;
|
||||||
|
|
||||||
|
|
@ -25,7 +28,7 @@ public function showReportingForAmbitsProject($ambitId, $projectId)
|
||||||
$dataAmbit = AmbitsEquipment::where('ambits_id', $ambitId)->first();
|
$dataAmbit = AmbitsEquipment::where('ambits_id', $ambitId)->first();
|
||||||
// $receiveDataEquipments = Equipment::where('company_projects_id', $projectId)->get();
|
// $receiveDataEquipments = Equipment::where('company_projects_id', $projectId)->get();
|
||||||
|
|
||||||
return view('userClient.showReportingAllEquipmentsForAmbitProject', compact('ambitId', 'projectId','dataAmbit'));
|
return view('userClient.showReportingAllEquipmentsForAmbitProject', compact('ambitId', 'projectId', 'dataAmbit'));
|
||||||
|
|
||||||
}
|
}
|
||||||
public function getEquipmentsOfAmbit(Request $request)
|
public function getEquipmentsOfAmbit(Request $request)
|
||||||
|
|
@ -34,16 +37,30 @@ public function getEquipmentsOfAmbit(Request $request)
|
||||||
$projectId = $request->get('projectId');
|
$projectId = $request->get('projectId');
|
||||||
$ambitId = $request->get('ambitId');
|
$ambitId = $request->get('ambitId');
|
||||||
|
|
||||||
|
// $dataAmbit = AmbitsEquipment::where('ambits_id', $ambitId)->first();
|
||||||
|
// $receiveDataEquipments = Equipment::where('company_projects_id', $projectId)->get();
|
||||||
|
// $filteredAssociations = EquipmentAssociationAmbit::where('ambits_id', $dataAmbit->ambits_id)
|
||||||
|
// ->whereIn('equipment_id', $receiveDataEquipments->pluck('equipment_id'))
|
||||||
|
// ->get();
|
||||||
|
// $query = Equipment::whereIn('equipment_id', $filteredAssociations->pluck('equipment_id'))->get();
|
||||||
|
|
||||||
$dataAmbit = AmbitsEquipment::where('ambits_id', $ambitId)->first();
|
$dataAmbit = AmbitsEquipment::where('ambits_id', $ambitId)->first();
|
||||||
|
|
||||||
$receiveDataEquipments = Equipment::where('company_projects_id', $projectId)->get();
|
$receiveDataEquipments = Equipment::where('equipments.company_projects_id', $projectId)
|
||||||
|
->join('equipment_work_historys', 'equipments.equipment_id', '=', 'equipment_work_historys.equipment_id')
|
||||||
|
->select('equipment_work_historys.equipmentWorkHistorys_id', 'equipment_work_historys.ispt_number') // Adicionei 'equipment_work_historys.ispt_number' aqui
|
||||||
|
->pluck('equipmentWorkHistorys_id');
|
||||||
|
|
||||||
$filteredAssociations = EquipmentAssociationAmbit::where('ambits_id', $dataAmbit->ambits_id)
|
$filteredAssociations = EquipmentAssociationAmbit::where('ambits_id', $dataAmbit->ambits_id)
|
||||||
->whereIn('equipment_id', $receiveDataEquipments->pluck('equipment_id'))
|
->whereIn('equipmentWorkHistorys_id', $receiveDataEquipments)
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
$query = Equipment::whereIn('equipment_id', $filteredAssociations->pluck('equipment_id'))->get();
|
$equipmentWorkHistoryIds = $filteredAssociations->pluck('equipmentWorkHistorys_id');
|
||||||
// $query = Equipment::select(['ispt_number', 'unit_id', 'equipment_tag'])->get();
|
|
||||||
|
$query = EquipmentWorkHistory::whereIn('equipmentWorkHistorys_id', $equipmentWorkHistoryIds)
|
||||||
|
->join('equipments', 'equipment_work_historys.equipment_id', '=', 'equipments.equipment_id')
|
||||||
|
->select('equipments.*', 'equipment_work_historys.ispt_number as ispt_number') // Adicionei 'equipment_work_historys.ispt_number as ispt_number' aqui
|
||||||
|
->get();
|
||||||
|
|
||||||
return DataTables::of($query)
|
return DataTables::of($query)
|
||||||
// Adicione aqui qualquer manipulação de dados ou colunas adicionais que você precise
|
// Adicione aqui qualquer manipulação de dados ou colunas adicionais que você precise
|
||||||
|
|
@ -56,21 +73,63 @@ public function showReportingForAmbitsProjectPdf($ambitId, $projectId)
|
||||||
// Obter o caminho da imagem do usuário ou uma imagem padrão
|
// Obter o caminho da imagem do usuário ou uma imagem padrão
|
||||||
$userLogoPath = Auth::user()->user_logo ? public_path('user_logos/' . Auth::user()->user_logo) : public_path('user_logos/logoISPT4.0.jpg');
|
$userLogoPath = Auth::user()->user_logo ? public_path('user_logos/' . Auth::user()->user_logo) : public_path('user_logos/logoISPT4.0.jpg');
|
||||||
|
|
||||||
|
// Pega a data e hora atual
|
||||||
|
$dataAtual = Carbon::now();
|
||||||
|
|
||||||
|
// Se quiser formatar a data, pode fazer assim:
|
||||||
|
$dataFormatada = $dataAtual->format('Y-m-d H:i:s');
|
||||||
|
|
||||||
$dataAmbit = AmbitsEquipment::where('ambits_id', $ambitId)->first();
|
$dataAmbit = AmbitsEquipment::where('ambits_id', $ambitId)->first();
|
||||||
|
|
||||||
$receiveDataEquipments = Equipment::where('company_projects_id', $projectId)->get();
|
$receiveDataEquipments = Equipment::where('equipments.company_projects_id', $projectId) // Adicionado 'equipments.' para remover a ambiguidade
|
||||||
|
->join('equipment_work_historys', 'equipments.equipment_id', '=', 'equipment_work_historys.equipment_id')
|
||||||
$filteredAssociations = EquipmentAssociationAmbit::where('ambits_id', $dataAmbit->ambits_id)
|
->select('equipment_work_historys.equipmentWorkHistorys_id', 'equipments.*') // Pegando o ID da tabela equipment_work_historys e todos os campos da tabela equipments
|
||||||
->whereIn('equipment_id', $receiveDataEquipments->pluck('equipment_id'))
|
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
$equipmentDetails = Equipment::whereIn('equipment_id', $filteredAssociations->pluck('equipment_id'))->get();
|
$filteredAssociations = EquipmentAssociationAmbit::where('ambits_id', $dataAmbit->ambits_id)
|
||||||
|
->whereIn('equipmentWorkHistorys_id', $receiveDataEquipments->pluck('equipmentWorkHistorys_id')) // Usando equipmentWorkHistorys_id em vez de equipment_id
|
||||||
|
->get();
|
||||||
|
|
||||||
|
$equipmentWorkHistoryIds = $filteredAssociations->pluck('equipmentWorkHistorys_id');
|
||||||
|
|
||||||
|
// Agora, em vez de buscar diretamente em Equipment, vamos pegar os detalhes via EquipmentWorkHistory
|
||||||
|
$equipmentDetails = EquipmentWorkHistory::whereIn('equipmentWorkHistorys_id', $equipmentWorkHistoryIds)
|
||||||
|
->join('equipments', 'equipment_work_historys.equipment_id', '=', 'equipments.equipment_id')
|
||||||
|
->select('equipments.*', 'equipment_work_historys.*') // Seleciona todos os campos das tabelas equipments e equipment_work_historys
|
||||||
|
->get();
|
||||||
|
|
||||||
|
// $equipmentDetails = EquipmentWorkHistory::whereIn('equipmentWorkHistorys_id', $equipmentWorkHistoryIds)
|
||||||
|
// ->join('equipments', 'equipment_work_historys.equipment_id', '=', 'equipments.equipment_id')
|
||||||
|
// ->leftJoin('specific_attributes_equipment_types', 'equipments.equipment_id', '=', 'specific_attributes_equipment_types.equipment_id') // Fazendo a junção com a tabela 'specific_attributes_equipment_types'
|
||||||
|
// ->select(
|
||||||
|
// 'equipments.*',
|
||||||
|
// 'equipment_work_historys.*',
|
||||||
|
// 'specific_attributes_equipment_types.general_attributes_equipment_id',
|
||||||
|
// 'specific_attributes_equipment_types.specific_attributes_value'
|
||||||
|
// )
|
||||||
|
// ->get()
|
||||||
|
// // Junta os dados obtidos na tabela : specific_attributes_equipment_types, e como os dados na colecao de cada equipamento.
|
||||||
|
// ->transform(function ($item) {
|
||||||
|
// // Aqui você transforma cada item da coleção, adicionando o novo par de chave-valor
|
||||||
|
// $item->specific_attributes = [
|
||||||
|
// $item->general_attributes_equipment_id => $item->specific_attributes_value
|
||||||
|
// ];
|
||||||
|
// // Remove as colunas desnecessárias para evitar duplicação
|
||||||
|
// unset($item->general_attributes_equipment_id, $item->specific_attributes_value);
|
||||||
|
// return $item;
|
||||||
|
// });
|
||||||
|
|
||||||
|
|
||||||
|
$detalsProject = CompanyProject::where('company_projects_id', $projectId)->first();
|
||||||
|
|
||||||
|
|
||||||
$pdf = PDF::loadView('userClient.pdfReportings.equipmentsForAmbitPdf', [
|
$pdf = PDF::loadView('userClient.pdfReportings.equipmentsForAmbitPdf', [
|
||||||
'equipmentDetails' => $equipmentDetails,
|
'equipmentDetails' => $equipmentDetails,
|
||||||
'userLogoPath' => $userLogoPath,
|
'userLogoPath' => $userLogoPath,
|
||||||
'dataAmbit' => $dataAmbit,
|
'dataAmbit' => $dataAmbit,
|
||||||
'projectId' => $projectId
|
'projectId' => $projectId,
|
||||||
|
'detalsProject' => $detalsProject,
|
||||||
|
'dataFormatada' => $dataFormatada
|
||||||
])->setPaper('a4', 'landscape');
|
])->setPaper('a4', 'landscape');
|
||||||
return $pdf->stream('relatorio_teste.pdf');
|
return $pdf->stream('relatorio_teste.pdf');
|
||||||
|
|
||||||
|
|
@ -130,15 +189,20 @@ public function getDataAmbitsOfProject(Request $request)
|
||||||
->addColumn('amountEquipment', function ($ambitsEquipment) use ($projectId) {
|
->addColumn('amountEquipment', function ($ambitsEquipment) use ($projectId) {
|
||||||
// Contar quantos equipamentos estão associados a este âmbito para o projeto específico
|
// Contar quantos equipamentos estão associados a este âmbito para o projeto específico
|
||||||
return EquipmentAssociationAmbit::where('ambits_id', $ambitsEquipment->ambits_id)
|
return EquipmentAssociationAmbit::where('ambits_id', $ambitsEquipment->ambits_id)
|
||||||
->whereHas('Equipment', function ($q) use ($projectId) {
|
// Primeiro, juntar-se com equipment_work_historys
|
||||||
$q->where('company_projects_id', $projectId);
|
->join('equipment_work_historys', 'equipment_association_ambits.equipmentWorkHistorys_id', '=', 'equipment_work_historys.equipmentWorkHistorys_id')
|
||||||
})->count();
|
// Depois, juntar-se com equipments
|
||||||
|
->join('equipments', 'equipment_work_historys.equipment_id', '=', 'equipments.equipment_id')
|
||||||
|
// Agora, podemos filtrar pela company_projects_id
|
||||||
|
->where('equipments.company_projects_id', $projectId)
|
||||||
|
->count();
|
||||||
})
|
})
|
||||||
->addColumn('action', function ($dataAmbitProject) use ($projectId) { // Incluindo $projectId no escopo da função anônima
|
->addColumn('action', function ($dataAmbitProject) use ($projectId) {
|
||||||
$actionBtn = '<a title="Detalhes do equipamento" href="' . route('showReportingForAmbitsProject', ['ambitId' => $dataAmbitProject->ambits_id, 'projectId' => $projectId]) . '"><i class="fa-solid fa-eye text-primary"></i></a>';
|
$actionBtn = '<a title="Detalhes do equipamento" href="' . route('showReportingForAmbitsProject', ['ambitId' => $dataAmbitProject->ambits_id, 'projectId' => $projectId]) . '"><i class="fa-solid fa-eye text-primary"></i></a>';
|
||||||
return $actionBtn;
|
return $actionBtn;
|
||||||
})
|
})
|
||||||
->make(true);
|
->make(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -153,9 +217,14 @@ public function getDataEquipmentsOfProject(Request $request)
|
||||||
{
|
{
|
||||||
$projectId = $request->get('projectId');
|
$projectId = $request->get('projectId');
|
||||||
|
|
||||||
$query = Equipment::join('equipment_association_ambits', 'equipments.equipment_id', '=', 'equipment_association_ambits.equipment_id')
|
$query = Equipment::join('equipment_work_historys', 'equipments.equipment_id', '=', 'equipment_work_historys.equipment_id')
|
||||||
|
// Juntar-se com equipment_association_ambits usando equipment_work_historys
|
||||||
|
->join('equipment_association_ambits', 'equipment_work_historys.equipmentWorkHistorys_id', '=', 'equipment_association_ambits.equipmentWorkHistorys_id')
|
||||||
|
// Juntar-se com ambits_equipments
|
||||||
->join('ambits_equipments', 'equipment_association_ambits.ambits_id', '=', 'ambits_equipments.ambits_id')
|
->join('ambits_equipments', 'equipment_association_ambits.ambits_id', '=', 'ambits_equipments.ambits_id')
|
||||||
|
// Filtrar por company_projects_id
|
||||||
->where('equipments.company_projects_id', $projectId)
|
->where('equipments.company_projects_id', $projectId)
|
||||||
|
// Selecionar os campos desejados
|
||||||
->select([
|
->select([
|
||||||
'equipments.equipment_id',
|
'equipments.equipment_id',
|
||||||
'equipments.unit_id',
|
'equipments.unit_id',
|
||||||
|
|
@ -166,6 +235,7 @@ public function getDataEquipmentsOfProject(Request $request)
|
||||||
|
|
||||||
$dataEquipentProject = $query->get();
|
$dataEquipentProject = $query->get();
|
||||||
|
|
||||||
|
|
||||||
// Retornar a resposta para o DataTables
|
// Retornar a resposta para o DataTables
|
||||||
return Datatables::of($dataEquipentProject)
|
return Datatables::of($dataEquipentProject)
|
||||||
|
|
||||||
|
|
@ -187,18 +257,19 @@ public function showDataDetailsProjectClient($projectID)
|
||||||
$receiveDataProject = CompanyProject::where('company_projects_id', $projectID)->first();
|
$receiveDataProject = CompanyProject::where('company_projects_id', $projectID)->first();
|
||||||
// Recebe todas as Fabricas relacionadas a intalacao do Projecto recebido.
|
// Recebe todas as Fabricas relacionadas a intalacao do Projecto recebido.
|
||||||
$receiveUnitsOfProject = Unit::where('plant_id', $receiveDataProject->plant_id)->get();
|
$receiveUnitsOfProject = Unit::where('plant_id', $receiveDataProject->plant_id)->get();
|
||||||
|
//Recebe todos os tipos de equipamentos
|
||||||
$receiveAllTypeEquipments = EquipmentType::all();
|
$receiveAllTypeEquipments = EquipmentType::all();
|
||||||
|
|
||||||
$receiveAllEquipmentsOfProject = Equipment::where('company_projects_id', $projectID)->get();
|
$receiveAllEquipmentsOfProject = EquipmentWorkHistory::where('company_projects_id', $projectID)->get();
|
||||||
|
|
||||||
// Primeiro, obtenha todos os 'equipment_id' como um array
|
// Obtendo todos os IDs de equipmentWorkHistorys
|
||||||
$equipmentIds = $receiveAllEquipmentsOfProject->pluck('equipment_id')->toArray();
|
$equipmentWorkHistoryIds = $receiveAllEquipmentsOfProject->pluck('equipmentWorkHistorys_id');
|
||||||
// Agora, use 'whereIn' com esse array de 'equipment_id'
|
|
||||||
$receiveAmbitsOfProject = EquipmentAssociationAmbit::whereIn('equipment_id', $equipmentIds)->get();
|
// para a variavel obter o valor esperado precisamos separar os id como na varaivel acima, ele nao funciona diretamente com a variavel receiveAllEquipmentsOfProject, pois e uma colecao !!
|
||||||
|
$receiveEquipmentAssociatedAmbit = EquipmentAssociationAmbit::whereIn('equipmentWorkHistorys_id', $equipmentWorkHistoryIds)->get();
|
||||||
|
|
||||||
// Recebe os todos os ambitos do projecto
|
// Recebe os todos os ambitos do projecto
|
||||||
$AmbitsId = $receiveAmbitsOfProject->pluck('ambits_id')->unique()->toArray();
|
$AmbitsId = $receiveEquipmentAssociatedAmbit->pluck('ambits_id')->unique()->toArray();
|
||||||
// Vamos passar os ids dos Ambitos para a view, para envialos para a Tabela Yajra. e carregar com base nos Ambitos
|
// Vamos passar os ids dos Ambitos para a view, para envialos para a Tabela Yajra. e carregar com base nos Ambitos
|
||||||
$AmbitsIdString = implode(",", $AmbitsId);
|
$AmbitsIdString = implode(",", $AmbitsId);
|
||||||
// Recebe os dados de cada Ambito
|
// Recebe os dados de cada Ambito
|
||||||
|
|
@ -211,16 +282,17 @@ public function showDataDetailsProjectClient($projectID)
|
||||||
public function getDataProjectsClient(Request $request)
|
public function getDataProjectsClient(Request $request)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Filtros ...
|
||||||
$allPlantsClient = $request->get('allPlantsClient');
|
$allPlantsClient = $request->get('allPlantsClient');
|
||||||
$receiveAllPlants = $request->get('receiveAllPlants');
|
$receiveAllPlants = $request->get('receiveAllPlants');
|
||||||
$receiveAllUnits = $request->get('receiveAllUnits');
|
$receiveAllUnits = $request->get('receiveAllUnits');
|
||||||
$receiveEquipmentsType = $request->get('receiveEquipmentsType');
|
$receiveEquipmentsType = $request->get('receiveEquipmentsType');
|
||||||
|
|
||||||
|
$clientID = $request->get('clientID');
|
||||||
|
|
||||||
//Criar Filtros para Atualizar os dados com base neles.
|
//Criar Filtros para Atualizar os dados com base neles.
|
||||||
|
|
||||||
|
$allPlantsClient = Plant::where('user_id', $clientID)->pluck('plant_id')->toArray();
|
||||||
$client = Auth::user()->user_id;
|
|
||||||
$allPlantsClient = Plant::where('user_id', $client)->pluck('plant_id')->toArray();
|
|
||||||
|
|
||||||
$query = CompanyProject::with('plant') // Assegure-se de que a relação está correta.
|
$query = CompanyProject::with('plant') // Assegure-se de que a relação está correta.
|
||||||
->whereIn('plant_id', $allPlantsClient)
|
->whereIn('plant_id', $allPlantsClient)
|
||||||
|
|
@ -280,13 +352,16 @@ public function receiveManageAssetsClient()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function reportingDataClient()
|
public function reportingDataClient($clientID = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
$client = Auth::user()->user_id;
|
// Se clientID não foi passado, usamos o ID do usuário autenticado
|
||||||
|
if (is_null($clientID)) {
|
||||||
|
$clientID = Auth::user()->user_id;
|
||||||
|
}
|
||||||
|
|
||||||
// Busca todas as Instalacoes com base no id do CLIENTE
|
// Busca todas as Instalacoes com base no id do CLIENTE
|
||||||
$allPlantsClient = Plant::where('user_id', $client)->get();
|
$allPlantsClient = Plant::where('user_id', $clientID)->get();
|
||||||
|
|
||||||
// Extrai os plant_id da coleção $recevePlantClient
|
// Extrai os plant_id da coleção $recevePlantClient
|
||||||
$plantsIds = $allPlantsClient->pluck('plant_id');
|
$plantsIds = $allPlantsClient->pluck('plant_id');
|
||||||
|
|
@ -299,7 +374,7 @@ public function reportingDataClient()
|
||||||
->orderBy('year', 'desc')
|
->orderBy('year', 'desc')
|
||||||
->pluck('year');
|
->pluck('year');
|
||||||
|
|
||||||
return view('userClient.reportingDataClient', compact('allPlantsClient', 'yearsProjects'));
|
return view('userClient.reportingDataClient', compact('clientID','allPlantsClient', 'yearsProjects'));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -460,7 +460,7 @@ public function EditEquipmentsProjects(Request $request)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retorna uma resposta
|
// Retorna uma resposta
|
||||||
return redirect()->route('test2', ['id' => $request->numberProject])
|
return redirect()->route('articulated_2', ['id' => $request->numberProject])
|
||||||
->with('success', 'Equipamento ' . $equipment->equipment_tag . ' Editado com Sucesso!!!')
|
->with('success', 'Equipamento ' . $equipment->equipment_tag . ' Editado com Sucesso!!!')
|
||||||
->with('taskExecutionOrders', $taskExecutionOrders);
|
->with('taskExecutionOrders', $taskExecutionOrders);
|
||||||
}
|
}
|
||||||
|
|
@ -531,7 +531,7 @@ public function createWorkStations(Request $request)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Redireciona para onde você quiser após a criação das workstations
|
// Redireciona para onde você quiser após a criação das workstations
|
||||||
return redirect()->route('test3', ['id' => $request->numberProject])
|
return redirect()->route('workStation_3', ['id' => $request->numberProject])
|
||||||
->with('success', $numberWorkstations . ' Postos de Trabalho criados !!!')
|
->with('success', $numberWorkstations . ' Postos de Trabalho criados !!!')
|
||||||
->with('listWorkstations', $listWorkstations);
|
->with('listWorkstations', $listWorkstations);
|
||||||
}
|
}
|
||||||
|
|
@ -654,10 +654,10 @@ public function processStep1(Request $request)
|
||||||
session(['form_data.step1' => $request->all()]);
|
session(['form_data.step1' => $request->all()]);
|
||||||
|
|
||||||
// // Redirecione o Utilizador para a próxima etapa
|
// // Redirecione o Utilizador para a próxima etapa
|
||||||
// return redirect('/test2')
|
// return redirect('/articulated_2')
|
||||||
// ->with('project', $project)
|
// ->with('project', $project)
|
||||||
// ->with('success', 'Dados guardados com sucesso');
|
// ->with('success', 'Dados guardados com sucesso');
|
||||||
return redirect()->route('test2', ['id' => $project->company_projects_id])
|
return redirect()->route('articulated_2', ['id' => $project->company_projects_id])
|
||||||
->with('success', 'Detalhes, Projecto criado com sucesso');
|
->with('success', 'Detalhes, Projecto criado com sucesso');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -751,7 +751,7 @@ public function createEquipmentManual(Request $request)
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if ($existingEquipment) {
|
if ($existingEquipment) {
|
||||||
return redirect()->route('test2', ['id' => $request->numberProject])
|
return redirect()->route('articulated_2', ['id' => $request->numberProject])
|
||||||
->with('danger', 'Equipamento ja Existe !!')
|
->with('danger', 'Equipamento ja Existe !!')
|
||||||
->with('listEquipmentsProjects', $listEquipmentsProjects);
|
->with('listEquipmentsProjects', $listEquipmentsProjects);
|
||||||
}
|
}
|
||||||
|
|
@ -850,7 +850,7 @@ public function createEquipmentManual(Request $request)
|
||||||
}
|
}
|
||||||
|
|
||||||
// O $request->numberProject e sempre necessario retornar para indicar a obra que se esta modificando...
|
// O $request->numberProject e sempre necessario retornar para indicar a obra que se esta modificando...
|
||||||
return redirect()->route('test2', ['id' => $request->numberProject])
|
return redirect()->route('articulated_2', ['id' => $request->numberProject])
|
||||||
->with('success', 'Equipamento criado com sucesso')
|
->with('success', 'Equipamento criado com sucesso')
|
||||||
->with('listEquipmentsProjects', $listEquipmentsProjects);
|
->with('listEquipmentsProjects', $listEquipmentsProjects);
|
||||||
}
|
}
|
||||||
|
|
@ -1050,13 +1050,13 @@ public function processStep2(Request $request)
|
||||||
|
|
||||||
// $pendingEquipments = session('pendingEquipments');
|
// $pendingEquipments = session('pendingEquipments');
|
||||||
if ($countPendingEquipments != 0) {
|
if ($countPendingEquipments != 0) {
|
||||||
// return redirect()->route('test2')->with('Danger', 'Equipamentos Pendentes')->with('listValves', $listValves)->with('pendingEquipments', $pendingEquipments);
|
// return redirect()->route('articulated_2')->with('Danger', 'Equipamentos Pendentes')->with('listValves', $listValves)->with('pendingEquipments', $pendingEquipments);
|
||||||
return redirect()->route('test2', ['id' => $request->numberProject])
|
return redirect()->route('articulated_2', ['id' => $request->numberProject])
|
||||||
->with('danger', 'Equipamentos Pendentes criados : ' . $countPendingEquipments)
|
->with('danger', 'Equipamentos Pendentes criados : ' . $countPendingEquipments)
|
||||||
->with('pendingEquipments', $pendingEquipments);
|
->with('pendingEquipments', $pendingEquipments);
|
||||||
// ->with('success', 'Equipamentos Criados :' . count($listValves))
|
// ->with('success', 'Equipamentos Criados :' . count($listValves))
|
||||||
}
|
}
|
||||||
return redirect()->route('test2', ['id' => $request->numberProject])
|
return redirect()->route('articulated_2', ['id' => $request->numberProject])
|
||||||
->with('success', 'Equipamentos Criados :' . $countNewEquipment);
|
->with('success', 'Equipamentos Criados :' . $countNewEquipment);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1065,7 +1065,7 @@ public function processStep2(Request $request)
|
||||||
session(['form_data.step2' => $request->all()]);
|
session(['form_data.step2' => $request->all()]);
|
||||||
|
|
||||||
// Redirecione o Utilizador para a próxima etapa
|
// Redirecione o Utilizador para a próxima etapa
|
||||||
return redirect('/test3');
|
return redirect('/workStation_3');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function showStep3($company_projects_id)
|
public function showStep3($company_projects_id)
|
||||||
|
|
@ -1230,7 +1230,7 @@ public function index()
|
||||||
}
|
}
|
||||||
$allPossibleAttributes = GeneralAttributesEquipment::all()->pluck('description')->toArray();
|
$allPossibleAttributes = GeneralAttributesEquipment::all()->pluck('description')->toArray();
|
||||||
|
|
||||||
return view('test2', ['equipments' => $equipments, 'allAttributes' => $allPossibleAttributes]);
|
return view('articulated_2', ['equipments' => $equipments, 'allAttributes' => $allPossibleAttributes]);
|
||||||
// Retorne a view com os dados
|
// Retorne a view com os dados
|
||||||
// return view('test', ['equipments' => $equipments]);
|
// return view('test', ['equipments' => $equipments]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -81,19 +81,22 @@ public function changeAmbitEquipment(Request $request)
|
||||||
|
|
||||||
public function deleteEquipmentInProject(Request $request)
|
public function deleteEquipmentInProject(Request $request)
|
||||||
{
|
{
|
||||||
$receiveEquipmentId = $request->equipmentId;
|
$receiveEquipment = Equipment::where('equipment_id', $request->equipmentId)->first();
|
||||||
$receiveEquipment = Equipment::where('equipment_id', $receiveEquipmentId)->first();
|
|
||||||
$receiveStatus = $request->deleteEquipmentProject;
|
$receiveStatus = $request->deleteEquipmentProject;
|
||||||
|
|
||||||
|
//Independente do tipo de select ele vai deletar o equipamento do Historico
|
||||||
|
EquipmentWorkHistory::where('equipment_id', $receiveEquipment->equipment_id)
|
||||||
|
->where('company_projects_id', $receiveEquipment->company_projects_id)
|
||||||
|
->delete();
|
||||||
|
|
||||||
|
// Deleta o equipamento por completo e retorna
|
||||||
if ($receiveStatus == 'complete') {
|
if ($receiveStatus == 'complete') {
|
||||||
EquipmentWorkHistory::where('equipment_id', $receiveEquipment->equipment_id)
|
|
||||||
->where('company_projects_id', $receiveEquipment->company_projects_id)
|
|
||||||
->delete();
|
|
||||||
$receiveEquipment->delete();
|
$receiveEquipment->delete();
|
||||||
|
|
||||||
return redirect()->back()
|
return redirect()->back()
|
||||||
->with('success', 'Equipamento: ' . $receiveEquipment->equipment_id . ' excluído com sucesso!');
|
->with('success', 'Equipamento: ' . $receiveEquipment->equipment_id . ' excluído com sucesso!');
|
||||||
} else {
|
} else {
|
||||||
|
// Deleta apaga a associacao do equipamento a Obra
|
||||||
$receiveEquipment->company_projects_id = null;
|
$receiveEquipment->company_projects_id = null;
|
||||||
$receiveEquipment->save();
|
$receiveEquipment->save();
|
||||||
|
|
||||||
|
|
@ -278,7 +281,7 @@ public function receiveEquipmentToAssociateTasks(Request $request)
|
||||||
//Criar associacao do equipamento ao Âmbito
|
//Criar associacao do equipamento ao Âmbito
|
||||||
$AssociationEquipmentAmbit = new EquipmentAssociationAmbit;
|
$AssociationEquipmentAmbit = new EquipmentAssociationAmbit;
|
||||||
$AssociationEquipmentAmbit->equipment_type_id = $equipment['equipment_type_id'];
|
$AssociationEquipmentAmbit->equipment_type_id = $equipment['equipment_type_id'];
|
||||||
$AssociationEquipmentAmbit->ambits_id = $equipment['ambit_id'];
|
$AssociationEquipmentAmbit->ambits_id = $equipment['ambit_id'];
|
||||||
$AssociationEquipmentAmbit->equipmentWorkHistorys_id = $createEquipmentWorkHistory->equipmentWorkHistorys_id;
|
$AssociationEquipmentAmbit->equipmentWorkHistorys_id = $createEquipmentWorkHistory->equipmentWorkHistorys_id;
|
||||||
$AssociationEquipmentAmbit->save();
|
$AssociationEquipmentAmbit->save();
|
||||||
|
|
||||||
|
|
@ -592,7 +595,7 @@ public function EditEquipmentsProjects(Request $request)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retorna uma resposta
|
// Retorna uma resposta
|
||||||
return redirect()->route('test2', ['id' => $request->numberProject])
|
return redirect()->route('articulated_2', ['id' => $request->numberProject])
|
||||||
->with('success', 'Equipamento ' . $equipment->equipment_tag . ' Editado com Sucesso!!!')
|
->with('success', 'Equipamento ' . $equipment->equipment_tag . ' Editado com Sucesso!!!')
|
||||||
->with('taskExecutionOrders', $taskExecutionOrders);
|
->with('taskExecutionOrders', $taskExecutionOrders);
|
||||||
}
|
}
|
||||||
|
|
@ -663,7 +666,7 @@ public function createWorkStations(Request $request)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Redireciona para onde você quiser após a criação das workstations
|
// Redireciona para onde você quiser após a criação das workstations
|
||||||
return redirect()->route('test3', ['id' => $request->numberProject])
|
return redirect()->route('workStation_3', ['id' => $request->numberProject])
|
||||||
->with('success', $numberWorkstations . ' Postos de Trabalho criados !!!')
|
->with('success', $numberWorkstations . ' Postos de Trabalho criados !!!')
|
||||||
->with('listWorkstations', $listWorkstations);
|
->with('listWorkstations', $listWorkstations);
|
||||||
}
|
}
|
||||||
|
|
@ -688,6 +691,14 @@ public function showStep1($company_projects_id)
|
||||||
|
|
||||||
$companies = User::where('type_users', 3)->get();
|
$companies = User::where('type_users', 3)->get();
|
||||||
|
|
||||||
|
$receiveDetailsPlant = Plant::where('plant_id', $projects->plant_id)->first();
|
||||||
|
|
||||||
|
$receiveDetailsUser = User::where('user_id', $receiveDetailsPlant->user_id)->first();
|
||||||
|
// $receiveDetailsUser->plantName = $receiveDetailsPlant->plant_name;
|
||||||
|
|
||||||
|
$projects->plantName = $receiveDetailsPlant->plant_name;
|
||||||
|
$projects->userName = $receiveDetailsUser->user_name;
|
||||||
|
|
||||||
return view('projectsClients/projectDetails_1', ['step' => 1], ['companies' => $companies])
|
return view('projectsClients/projectDetails_1', ['step' => 1], ['companies' => $companies])
|
||||||
->with('projects', $projects);
|
->with('projects', $projects);
|
||||||
}
|
}
|
||||||
|
|
@ -695,6 +706,56 @@ public function showStep1($company_projects_id)
|
||||||
// Se forem alterados dados dos Detalhes da Obra, vai ser alterado
|
// Se forem alterados dados dos Detalhes da Obra, vai ser alterado
|
||||||
public function EditprocessStep1(Request $request)
|
public function EditprocessStep1(Request $request)
|
||||||
{
|
{
|
||||||
|
dd($request);
|
||||||
|
// Validação...
|
||||||
|
$installationId = $request->input('installation_id');
|
||||||
|
|
||||||
|
if ($installationId <> null && $installationId == 'new_install') {
|
||||||
|
|
||||||
|
// Criar uma nova instalação...
|
||||||
|
$newInstallation = new Plant;
|
||||||
|
|
||||||
|
$newInstallation->plant_name = $request->input('new_company_name');
|
||||||
|
$newInstallation->plant_address = $request->input('new_company_address');
|
||||||
|
$newInstallation->user_id = $request->input('user_id');
|
||||||
|
|
||||||
|
$newInstallation->save();
|
||||||
|
|
||||||
|
// Use o id da nova instalação.
|
||||||
|
$installationId = $newInstallation->plant_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
$receiveDetailsPlant = Plant::where('plant_name', $request->plant_id_present)->first();
|
||||||
|
|
||||||
|
// $project = new CompanyProject;
|
||||||
|
$project = CompanyProject::where('company_projects_id', $request->projectId)->first();
|
||||||
|
|
||||||
|
$project->company_project_description = $request->input('description_project');
|
||||||
|
$project->project_ispt_number = $request->input('n_project_ispt');
|
||||||
|
$project->project_company_number = $request->input('project_company_number');
|
||||||
|
$project->project_ispt_responsible = $request->input('responsible_project_ispt');
|
||||||
|
$project->project_company_responsible = $request->input('responsible_project_company');
|
||||||
|
|
||||||
|
|
||||||
|
// Verifica se e igual a nulo , se for usa a data ja existente
|
||||||
|
if ($request->date_started === null) {
|
||||||
|
$project->date_started = $request->input('date_started_present');
|
||||||
|
} else
|
||||||
|
$project->date_started = $request->input('date_started');
|
||||||
|
|
||||||
|
$project->plant_id = $receiveDetailsPlant->plant_id;
|
||||||
|
$project->order_project = 1;
|
||||||
|
|
||||||
|
$project->save();
|
||||||
|
|
||||||
|
session(['form_data.step1' => $request->all()]);
|
||||||
|
|
||||||
|
// // Redirecione o Utilizador para a próxima etapa
|
||||||
|
// return redirect('/articulated_2')
|
||||||
|
// ->with('project', $project)
|
||||||
|
// ->with('success', 'Dados guardados com sucesso');
|
||||||
|
return redirect()->route('articulated_2', ['id' => $project->company_projects_id])
|
||||||
|
->with('success', 'Detalhes do Project atualizados!');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function removePendingEquipment($id)
|
public function removePendingEquipment($id)
|
||||||
|
|
@ -746,10 +807,12 @@ public function CreateNewEquipmentFromPendingEquipment(Request $request, $id)
|
||||||
|
|
||||||
public function processStep1(Request $request)
|
public function processStep1(Request $request)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
dd($request);
|
||||||
// Validação...
|
// Validação...
|
||||||
$installationId = $request->input('installation_id');
|
$installationId = $request->input('installation_id');
|
||||||
|
|
||||||
if ($installationId == 'new_install') {
|
if ($installationId <> null && $installationId == 'new_install') {
|
||||||
|
|
||||||
// Criar uma nova instalação...
|
// Criar uma nova instalação...
|
||||||
$newInstallation = new Plant;
|
$newInstallation = new Plant;
|
||||||
|
|
@ -764,7 +827,10 @@ public function processStep1(Request $request)
|
||||||
$installationId = $newInstallation->plant_id;
|
$installationId = $newInstallation->plant_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
$project = new CompanyProject;
|
$receiveDetailsPlant = Plant::where('plant_name', $request->plant_id_present)->first();
|
||||||
|
|
||||||
|
// $project = new CompanyProject;
|
||||||
|
$project = CompanyProject::where('company_projects_id', $request->projectId)->first();
|
||||||
|
|
||||||
$project->company_project_description = $request->input('description_project');
|
$project->company_project_description = $request->input('description_project');
|
||||||
$project->project_ispt_number = $request->input('n_project_ispt');
|
$project->project_ispt_number = $request->input('n_project_ispt');
|
||||||
|
|
@ -772,13 +838,14 @@ public function processStep1(Request $request)
|
||||||
$project->project_ispt_responsible = $request->input('responsible_project_ispt');
|
$project->project_ispt_responsible = $request->input('responsible_project_ispt');
|
||||||
$project->project_company_responsible = $request->input('responsible_project_company');
|
$project->project_company_responsible = $request->input('responsible_project_company');
|
||||||
|
|
||||||
|
|
||||||
// Verifica se e igual a nulo , se for usa a data ja existente
|
// Verifica se e igual a nulo , se for usa a data ja existente
|
||||||
if ($request->date_started === null) {
|
if ($request->date_started === null) {
|
||||||
$project->date_started = $request->input('date_started_present');
|
$project->date_started = $request->input('date_started_present');
|
||||||
} else
|
} else
|
||||||
$project->date_started = $request->input('date_started');
|
$project->date_started = $request->input('date_started');
|
||||||
|
|
||||||
$project->plant_id = $installationId;
|
$project->plant_id = $receiveDetailsPlant->plant_id;
|
||||||
$project->order_project = 1;
|
$project->order_project = 1;
|
||||||
|
|
||||||
$project->save();
|
$project->save();
|
||||||
|
|
@ -786,11 +853,11 @@ public function processStep1(Request $request)
|
||||||
session(['form_data.step1' => $request->all()]);
|
session(['form_data.step1' => $request->all()]);
|
||||||
|
|
||||||
// // Redirecione o Utilizador para a próxima etapa
|
// // Redirecione o Utilizador para a próxima etapa
|
||||||
// return redirect('/test2')
|
// return redirect('/articulated_2')
|
||||||
// ->with('project', $project)
|
// ->with('project', $project)
|
||||||
// ->with('success', 'Dados guardados com sucesso');
|
// ->with('success', 'Dados guardados com sucesso');
|
||||||
return redirect()->route('test2', ['id' => $project->company_projects_id])
|
return redirect()->route('articulated_2', ['id' => $project->company_projects_id])
|
||||||
->with('success', 'Detalhes, Projecto criado com sucesso');
|
->with('success', 'Detalhes do Project atualizados!');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function showStep2($company_projects_id)
|
public function showStep2($company_projects_id)
|
||||||
|
|
@ -888,7 +955,7 @@ public function createEquipmentManual(Request $request)
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if ($existingEquipment) {
|
if ($existingEquipment) {
|
||||||
return redirect()->route('test2', ['id' => $request->numberProject])
|
return redirect()->route('articulated_2', ['id' => $request->numberProject])
|
||||||
->with('danger', 'Equipamento ja Existe !!')
|
->with('danger', 'Equipamento ja Existe !!')
|
||||||
->with('listEquipmentsProjects', $listEquipmentsProjects);
|
->with('listEquipmentsProjects', $listEquipmentsProjects);
|
||||||
}
|
}
|
||||||
|
|
@ -928,8 +995,22 @@ public function createEquipmentManual(Request $request)
|
||||||
|
|
||||||
$newEquipmentWorkHistorys = new EquipmentWorkHistory;
|
$newEquipmentWorkHistorys = new EquipmentWorkHistory;
|
||||||
|
|
||||||
|
// Verifica se já existem registros com o mesmo 'equipment_id' e 'company_projects_id'
|
||||||
|
$existingRecords = EquipmentWorkHistory::where('company_projects_id', $request->numberProject)
|
||||||
|
->orderBy('ispt_number', 'desc') // Ordena de forma decrescente
|
||||||
|
->first(); // Pega o primeiro resultado, que seria o maior número
|
||||||
|
|
||||||
|
if ($existingRecords) {
|
||||||
|
// Se existirem registros, o próximo número será o maior número existente + 1
|
||||||
|
$isptNumber = $existingRecords->ispt_number + 1;
|
||||||
|
} else {
|
||||||
|
// Se não existirem registros, começa com 1
|
||||||
|
$isptNumber = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$newEquipmentWorkHistorys->equipment_id = $equipmentID;
|
$newEquipmentWorkHistorys->equipment_id = $equipmentID;
|
||||||
$newEquipmentWorkHistorys->ispt_number = 0;
|
$newEquipmentWorkHistorys->ispt_number = $isptNumber;
|
||||||
$newEquipmentWorkHistorys->company_projects_id = $request->numberProject;
|
$newEquipmentWorkHistorys->company_projects_id = $request->numberProject;
|
||||||
|
|
||||||
$newEquipmentWorkHistorys->save();
|
$newEquipmentWorkHistorys->save();
|
||||||
|
|
@ -987,7 +1068,7 @@ public function createEquipmentManual(Request $request)
|
||||||
}
|
}
|
||||||
|
|
||||||
// O $request->numberProject e sempre necessario retornar para indicar a obra que se esta modificando...
|
// O $request->numberProject e sempre necessario retornar para indicar a obra que se esta modificando...
|
||||||
return redirect()->route('test2', ['id' => $request->numberProject])
|
return redirect()->route('articulated_2', ['id' => $request->numberProject])
|
||||||
->with('success', 'Equipamento criado com sucesso')
|
->with('success', 'Equipamento criado com sucesso')
|
||||||
->with('listEquipmentsProjects', $listEquipmentsProjects);
|
->with('listEquipmentsProjects', $listEquipmentsProjects);
|
||||||
}
|
}
|
||||||
|
|
@ -1006,6 +1087,9 @@ public function processStep2(Request $request)
|
||||||
// Inicializa o contador para ispt_number
|
// Inicializa o contador para ispt_number
|
||||||
$isptNumber = 1;
|
$isptNumber = 1;
|
||||||
|
|
||||||
|
// Recebe o valor do campo 'chooseIfSelectOrCreateEquipments' do formulário
|
||||||
|
$chooseAction = $request->input('chooseIfSelectOrCreateEquipments');
|
||||||
|
|
||||||
// Certifique-se de que um arquivo foi enviado
|
// Certifique-se de que um arquivo foi enviado
|
||||||
if ($file) {
|
if ($file) {
|
||||||
//Busca o nome do arquivo xslx.
|
//Busca o nome do arquivo xslx.
|
||||||
|
|
@ -1020,7 +1104,7 @@ public function processStep2(Request $request)
|
||||||
// Retorna um array com todos os names preenchidos na primeira linha do template de Excel
|
// Retorna um array com todos os names preenchidos na primeira linha do template de Excel
|
||||||
$columnNames = $data[0];
|
$columnNames = $data[0];
|
||||||
$countPendingEquipments = 0;
|
$countPendingEquipments = 0;
|
||||||
$countNewEquipment = 0;
|
$countEquipment = 0;
|
||||||
|
|
||||||
// Recebo os nomes das colunas do execel dependendo da linguagem selecionada
|
// Recebo os nomes das colunas do execel dependendo da linguagem selecionada
|
||||||
$columnRealNames = $data[5];
|
$columnRealNames = $data[5];
|
||||||
|
|
@ -1038,7 +1122,6 @@ public function processStep2(Request $request)
|
||||||
// Se a coluna 'fábrica' estiver vazia, pule para a próxima linha
|
// Se a coluna 'fábrica' estiver vazia, pule para a próxima linha
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$emptyFields = [];
|
$emptyFields = [];
|
||||||
|
|
||||||
// Verifica se os 5 primeiros campos essenciais estão preenchidos
|
// Verifica se os 5 primeiros campos essenciais estão preenchidos
|
||||||
|
|
@ -1049,14 +1132,7 @@ public function processStep2(Request $request)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($emptyFields)) {
|
|
||||||
// Se houver campos vazios, adicione a linha e os campos vazios às linhas ignoradas
|
|
||||||
$ignoredLines[] = [
|
|
||||||
'line' => $i + 1,
|
|
||||||
'emptyFields' => $emptyFields
|
|
||||||
];
|
|
||||||
continue; // Pula para a próxima linha
|
|
||||||
}
|
|
||||||
|
|
||||||
// Em cada um das linhas horizontais do excel, vai se guardar a 'key' vinculada ao valor do campo preenchido ou seja a 'key' vai ter o mesmo nome de um dos dados da tabela 'general_attributes_equipaments' na coluna : general_attributes_equipment_description, assim sendo mais facil implementar na tabela : specific_attributes_equipament_types
|
// Em cada um das linhas horizontais do excel, vai se guardar a 'key' vinculada ao valor do campo preenchido ou seja a 'key' vai ter o mesmo nome de um dos dados da tabela 'general_attributes_equipaments' na coluna : general_attributes_equipment_description, assim sendo mais facil implementar na tabela : specific_attributes_equipament_types
|
||||||
$joinArrays = array_combine($columnNames, $dataLines);
|
$joinArrays = array_combine($columnNames, $dataLines);
|
||||||
|
|
@ -1077,179 +1153,275 @@ public function processStep2(Request $request)
|
||||||
->where('equipment_tag', $datas['equipment_tag'])
|
->where('equipment_tag', $datas['equipment_tag'])
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
if ($existingEquipment) {
|
//Nesta para vamos separar como tratar os equipamentos que existem, dependendo do tipo de select que o utilizador utilizou
|
||||||
|
|
||||||
$foundInExcel = false;
|
if ($chooseAction == 'selectEquipments') {
|
||||||
$rowExcelDuplicated = null;
|
|
||||||
|
|
||||||
// Verificar duplicatas no Excel
|
|
||||||
for ($j = 6; $j < $i; $j++) {
|
|
||||||
if ($data[$j][0] === $datas['unit'] && $data[$j][1] === $datas['equipment_tag'] && $data[$j][4] === $datas['equipment_description']) {
|
if ($existingEquipment) {
|
||||||
$foundInExcel = true;
|
|
||||||
$rowExcelDuplicated = $j;
|
$foundInExcel = false;
|
||||||
break;
|
$rowExcelDuplicated = null;
|
||||||
|
|
||||||
|
// Verificar duplicatas no Excel
|
||||||
|
for ($j = 6; $j < $i; $j++) {
|
||||||
|
if ($data[$j][0] === $datas['unit'] && $data[$j][1] === $datas['equipment_tag'] && $data[$j][4] === $datas['equipment_description']) {
|
||||||
|
$foundInExcel = true;
|
||||||
|
$rowExcelDuplicated = $j;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Associar o equipamento encontrado ao projeto
|
||||||
|
$existingEquipment->company_projects_id = $company_projects_id;
|
||||||
|
$existingEquipment->save();
|
||||||
|
|
||||||
|
$countEquipment++;
|
||||||
|
|
||||||
|
// Guardo os valores de 'id' e do 'tipo de equipamento' que nosso novo equipamento acabado de criar
|
||||||
|
$receveEquipment_ID = $existingEquipment->equipment_id;
|
||||||
|
$receveEquipament_type_ID = $existingEquipment->equipment_type_id;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Verifica se já existem registros com o mesmo 'equipment_id' e 'company_projects_id'
|
||||||
|
$existingRecords = EquipmentWorkHistory::where('company_projects_id', $company_projects_id)
|
||||||
|
->orderBy('ispt_number', 'desc') // Ordena de forma decrescente
|
||||||
|
->first(); // Pega o primeiro resultado, que seria o maior número
|
||||||
|
|
||||||
|
|
||||||
|
if ($existingRecords) {
|
||||||
|
// Se existirem registros, o próximo número será o maior número existente + 1
|
||||||
|
$isptNumber = $existingRecords->ispt_number + 1;
|
||||||
|
} else {
|
||||||
|
// Se não existirem registros, começa com 1
|
||||||
|
$isptNumber = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$newEquipmentWorkHistory = new EquipmentWorkHistory;
|
||||||
|
|
||||||
|
$newEquipmentWorkHistory->equipment_id = $receveEquipment_ID;
|
||||||
|
$newEquipmentWorkHistory->company_projects_id = $company_projects_id;
|
||||||
|
// Continua com o processo de salvar o novo registro
|
||||||
|
$newEquipmentWorkHistory->ispt_number = $isptNumber;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$newEquipmentWorkHistory->save();
|
||||||
|
|
||||||
|
// Recebe o Id do 'EquipmentWorkHistory' criado.
|
||||||
|
$recebeNewEquipmentWorkHistoryID = $newEquipmentWorkHistory->equipmentWorkHistorys_id;
|
||||||
|
|
||||||
|
$isptNumber++;
|
||||||
|
|
||||||
|
|
||||||
|
$ambit = AmbitsEquipment::where('ambits_description', $datas['ambit'])->first();
|
||||||
|
|
||||||
|
if ($ambit) {
|
||||||
|
$ambit_id = $ambit->ambits_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Criar associacao do equipamento ao Âmbito
|
||||||
|
$AssociationEquipmentAmbit = new EquipmentAssociationAmbit;
|
||||||
|
$AssociationEquipmentAmbit->equipment_type_id = $existingEquipment->equipment_type_id;
|
||||||
|
$AssociationEquipmentAmbit->ambits_id = $ambit_id;
|
||||||
|
$AssociationEquipmentAmbit->equipmentWorkHistorys_id = $newEquipmentWorkHistory->equipmentWorkHistorys_id;
|
||||||
|
|
||||||
|
$AssociationEquipmentAmbit->save();
|
||||||
|
|
||||||
|
//Recebe a tabela com as associoacoes entre Âmbitos e tarefas Elementares
|
||||||
|
$TasksAssociationAmbits = TasksAssociationAmbits::all()->where('ambits_equipment_id', $AssociationEquipmentAmbit->ambits_id);
|
||||||
|
|
||||||
|
foreach ($TasksAssociationAmbits as $TasksAssociationAmbit) {
|
||||||
|
$JoinsEquipmentsWithTasks = new OrderEquipmentTasks;
|
||||||
|
$JoinsEquipmentsWithTasks->equipmentWorkHistorys_id = $newEquipmentWorkHistory->equipmentWorkHistorys_id;
|
||||||
|
$JoinsEquipmentsWithTasks->elemental_tasks_id = $TasksAssociationAmbit->elemental_tasks_id;
|
||||||
|
$JoinsEquipmentsWithTasks->further_tasks_id = null;
|
||||||
|
$JoinsEquipmentsWithTasks->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Separa o nome do arquivo para obter o tipo de documento e a data-hora
|
||||||
|
$parts = explode('_', $originalFileName);
|
||||||
|
$documentType = $parts[2]; // 98
|
||||||
|
$timestamp = $parts[3]; // 2024-01-14_14-33
|
||||||
|
|
||||||
|
// Cria um array agrupado
|
||||||
|
$groupedArrayForPendingEquipments = [$documentType, [$timestamp, $equipmentPendingLogs]];
|
||||||
}
|
}
|
||||||
|
//Se nao existir deve retornar 'equipamentos nao encontrados, deve ser a mesma coisa que as linha ignoradas
|
||||||
// Se o equipamento existir, crie o novo equipamento na tabela pending_equipaments.
|
$ignoredLines[] = [
|
||||||
$pendingEquipament = new PendingEquipment;
|
'line' => $i + 1,
|
||||||
|
'emptyFields' => ['Nenhum equipamento foi localizado que cumpra os requisitos especificados nesta linha.']
|
||||||
// Defina os atributos do pendingEquipament conforme necessário.
|
|
||||||
$pendingEquipament->pending_equipment_unit_id = $checkFactory->unit_id;
|
|
||||||
$pendingEquipament->pending_equipment_type_id = $equipmentType->equipment_type_id;
|
|
||||||
$pendingEquipament->pending_equipment_tag = $datas['equipment_tag'];
|
|
||||||
$pendingEquipament->pending_equipment_description = $datas['equipment_description'];
|
|
||||||
$pendingEquipament->pending_equipment_serial_number = $datas['serial_number'];
|
|
||||||
$pendingEquipament->pending_equipment_brand = $datas['model'];
|
|
||||||
$pendingEquipament->pending_company_projects_id = $company_projects_id;
|
|
||||||
$pendingEquipament->save();
|
|
||||||
|
|
||||||
// Incremente o contador de PendingEquipments
|
|
||||||
$countPendingEquipments++;
|
|
||||||
|
|
||||||
// A variavel $pendenteLogs, na 'linhaExcel' vai recebe a linha do execel onde encontrou a duplicata em Array, vinda do primeiro $data, onde transforma toda o execel em array
|
|
||||||
// 'existingEquipmentId' vai ver qual o id do equipament que esta sendo duplicado.
|
|
||||||
//'duplicadoNoExcel' vai ser um boolean indicando que este valor duplicado veio da base de dados ou se foi de uma coluna anterior.
|
|
||||||
// linhaExcelDuplicada se o valor de duplicadoNoExcel for 'true' quer dizer que existe uma linha anterior com o mesmos dados, e essa variavel busco a o numero do array desta linha com base na variavel primeiro $data
|
|
||||||
$equipmentPendingLogs[] = [
|
|
||||||
'rowExecel' => $i + 1,
|
|
||||||
'pendingEquipmentId' => $pendingEquipament->pending_equipment_id,
|
|
||||||
'existingEquipmentId' => $existingEquipment->equipment_id,
|
|
||||||
'foundInExcel' => $foundInExcel,
|
|
||||||
'rowExcelDuplicated' => $rowExcelDuplicated
|
|
||||||
];
|
];
|
||||||
|
continue; // Pula para a próxima linha
|
||||||
// Continue com o próximo loop.
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$newEquipament = new Equipment;
|
|
||||||
|
|
||||||
$newEquipament->unit_id = $checkFactory->unit_id;
|
|
||||||
$newEquipament->equipment_type_id = $equipmentType->equipment_type_id;
|
|
||||||
$newEquipament->equipment_Description = $datas['equipment_description'];
|
|
||||||
$newEquipament->equipment_tag = $datas['equipment_tag'];
|
|
||||||
$newEquipament->equipment_serial_number = $datas['serial_number'];
|
|
||||||
$newEquipament->equipment_brand = $datas['brand'];
|
|
||||||
$newEquipament->equipment_model = $datas['model'];
|
|
||||||
$newEquipament->company_projects_id = $company_projects_id;
|
|
||||||
|
|
||||||
$newEquipament->save();
|
|
||||||
|
|
||||||
$countNewEquipment++;
|
|
||||||
|
|
||||||
// Guardo os valores de 'id' e do 'tipo de equipamento' que nosso novo equipamento acabado de criar
|
|
||||||
$receveEquipment_ID = $newEquipament->equipment_id;
|
|
||||||
$receveEquipament_type_ID = $newEquipament->equipment_type_id;
|
|
||||||
|
|
||||||
$newEquipmentWorkHistory = new EquipmentWorkHistory;
|
|
||||||
|
|
||||||
$newEquipmentWorkHistory->equipment_id = $receveEquipment_ID;
|
|
||||||
$newEquipmentWorkHistory->ispt_number = $isptNumber;
|
|
||||||
$newEquipmentWorkHistory->company_projects_id = $company_projects_id;
|
|
||||||
|
|
||||||
$newEquipmentWorkHistory->save();
|
|
||||||
|
|
||||||
// Recebe o Id do 'EquipmentWorkHistory' criado.
|
|
||||||
$recebeNewEquipmentWorkHistoryID = $newEquipmentWorkHistory->equipmentWorkHistorys_id;
|
|
||||||
|
|
||||||
$isptNumber++;
|
|
||||||
|
|
||||||
$ambit = AmbitsEquipment::where('ambits_description', $datas['ambit'])->first();
|
|
||||||
|
|
||||||
if ($ambit) {
|
|
||||||
$ambit_id = $ambit->ambits_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Criar associacao do equipamento ao Âmbito
|
|
||||||
$AssociationEquipmentAmbit = new EquipmentAssociationAmbit;
|
|
||||||
|
|
||||||
$AssociationEquipmentAmbit->equipment_type_id = $receveEquipament_type_ID;
|
|
||||||
$AssociationEquipmentAmbit->ambits_id = $ambit_id;
|
|
||||||
$AssociationEquipmentAmbit->equipmentWorkHistorys_id = $recebeNewEquipmentWorkHistoryID;
|
|
||||||
$AssociationEquipmentAmbit->save();
|
|
||||||
|
|
||||||
$execution_order = 1;
|
|
||||||
|
|
||||||
//Recebe a tabela com as associoacoes entre Âmbitos e tarefas Elementares
|
|
||||||
$TasksAssociationAmbits = TasksAssociationAmbits::all()->where('ambits_equipment_id', $AssociationEquipmentAmbit->ambits_id);
|
|
||||||
|
|
||||||
foreach ($TasksAssociationAmbits as $TasksAssociationAmbit) {
|
|
||||||
$JoinsEquipmentsWithTasks = new OrderEquipmentTasks;
|
|
||||||
|
|
||||||
$JoinsEquipmentsWithTasks->equipmentWorkHistorys_id = $recebeNewEquipmentWorkHistoryID;
|
|
||||||
$JoinsEquipmentsWithTasks->execution_order = $execution_order++;
|
|
||||||
$JoinsEquipmentsWithTasks->elemental_tasks_id = $TasksAssociationAmbit->elemental_tasks_id;
|
|
||||||
$JoinsEquipmentsWithTasks->further_tasks_id = null;
|
|
||||||
// 2 vai significar 'nao' e 1 'sim'
|
|
||||||
$JoinsEquipmentsWithTasks->inspection = 2;
|
|
||||||
$JoinsEquipmentsWithTasks->save();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$generalAttributes = GeneralAttributesEquipment::all();
|
} elseif ($chooseAction == 'createEquipments') {
|
||||||
|
|
||||||
foreach ($generalAttributes as $generalAttribute) {
|
if (!empty($emptyFields)) {
|
||||||
// Verifica se a chave existe em $datas, comparando com os dados da tabela : GeneralAttributesEquipment assim adicionando todos diferentes de NULL relacionados com o equipamento acabado de cria
|
// Se houver campos vazios, adicione a linha e os campos vazios às linhas ignoradas
|
||||||
if (isset($datas[$generalAttribute->general_attributes_equipment_description])) {
|
$ignoredLines[] = [
|
||||||
|
'line' => $i + 1,
|
||||||
$specificAttribute = new SpecificAttributesEquipmentType;
|
'emptyFields' => $emptyFields
|
||||||
$specificAttribute->equipment_id = $receveEquipment_ID;
|
];
|
||||||
$specificAttribute->equipment_type_id = $receveEquipament_type_ID;
|
continue; // Pula para a próxima linha
|
||||||
$specificAttribute->general_attributes_equipment_id = $generalAttribute->general_attributes_equipment_id;
|
|
||||||
// Atribui o valor da chave correspondente em $datas
|
|
||||||
$specificAttribute->specific_attributes_value = $datas[$generalAttribute->general_attributes_equipment_description];
|
|
||||||
|
|
||||||
$specificAttribute->save();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($existingEquipment) {
|
||||||
|
|
||||||
|
$foundInExcel = false;
|
||||||
|
$rowExcelDuplicated = null;
|
||||||
|
|
||||||
|
// Verificar duplicatas no Excel
|
||||||
|
for ($j = 6; $j < $i; $j++) {
|
||||||
|
if ($data[$j][0] === $datas['unit'] && $data[$j][1] === $datas['equipment_tag'] && $data[$j][4] === $datas['equipment_description']) {
|
||||||
|
$foundInExcel = true;
|
||||||
|
$rowExcelDuplicated = $j;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Se o equipamento existir, crie o novo equipamento na tabela pending_equipaments.
|
||||||
|
$pendingEquipament = new PendingEquipment;
|
||||||
|
|
||||||
|
// Defina os atributos do pendingEquipament conforme necessário.
|
||||||
|
$pendingEquipament->pending_equipment_unit_id = $checkFactory->unit_id;
|
||||||
|
$pendingEquipament->pending_equipment_type_id = $equipmentType->equipment_type_id;
|
||||||
|
$pendingEquipament->pending_equipment_tag = $datas['equipment_tag'];
|
||||||
|
$pendingEquipament->pending_equipment_description = $datas['equipment_description'];
|
||||||
|
$pendingEquipament->pending_equipment_serial_number = $datas['serial_number'];
|
||||||
|
$pendingEquipament->pending_equipment_brand = $datas['model'];
|
||||||
|
$pendingEquipament->pending_company_projects_id = $company_projects_id;
|
||||||
|
$pendingEquipament->save();
|
||||||
|
|
||||||
|
// Incremente o contador de PendingEquipments
|
||||||
|
$countPendingEquipments++;
|
||||||
|
|
||||||
|
// A variavel $pendenteLogs, na 'linhaExcel' vai recebe a linha do execel onde encontrou a duplicata em Array, vinda do primeiro $data, onde transforma toda o execel em array
|
||||||
|
// 'existingEquipmentId' vai ver qual o id do equipament que esta sendo duplicado.
|
||||||
|
//'duplicadoNoExcel' vai ser um boolean indicando que este valor duplicado veio da base de dados ou se foi de uma coluna anterior.
|
||||||
|
// linhaExcelDuplicada se o valor de duplicadoNoExcel for 'true' quer dizer que existe uma linha anterior com o mesmos dados, e essa variavel busco a o numero do array desta linha com base na variavel primeiro $data
|
||||||
|
$equipmentPendingLogs[] = [
|
||||||
|
'rowExecel' => $i + 1,
|
||||||
|
'pendingEquipmentId' => $pendingEquipament->pending_equipment_id,
|
||||||
|
'existingEquipmentId' => $existingEquipment->equipment_id,
|
||||||
|
'foundInExcel' => $foundInExcel,
|
||||||
|
'rowExcelDuplicated' => $rowExcelDuplicated
|
||||||
|
];
|
||||||
|
|
||||||
|
// Continue com o próximo loop.
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$newEquipament = new Equipment;
|
||||||
|
|
||||||
|
$newEquipament->unit_id = $checkFactory->unit_id;
|
||||||
|
$newEquipament->equipment_type_id = $equipmentType->equipment_type_id;
|
||||||
|
$newEquipament->equipment_Description = $datas['equipment_description'];
|
||||||
|
$newEquipament->equipment_tag = $datas['equipment_tag'];
|
||||||
|
$newEquipament->equipment_serial_number = $datas['serial_number'];
|
||||||
|
$newEquipament->equipment_brand = $datas['brand'];
|
||||||
|
$newEquipament->equipment_model = $datas['model'];
|
||||||
|
$newEquipament->company_projects_id = $company_projects_id;
|
||||||
|
|
||||||
|
$newEquipament->save();
|
||||||
|
|
||||||
|
$countEquipment++;
|
||||||
|
|
||||||
|
// Guardo os valores de 'id' e do 'tipo de equipamento' que nosso novo equipamento acabado de criar
|
||||||
|
$receveEquipment_ID = $newEquipament->equipment_id;
|
||||||
|
$receveEquipament_type_ID = $newEquipament->equipment_type_id;
|
||||||
|
|
||||||
|
|
||||||
|
// Verifica se já existem registros com o mesmo 'equipment_id' e 'company_projects_id'
|
||||||
|
$existingRecords = EquipmentWorkHistory::where('company_projects_id', $company_projects_id)
|
||||||
|
->orderBy('ispt_number', 'desc') // Ordena de forma decrescente
|
||||||
|
->first(); // Pega o primeiro resultado, que seria o maior número
|
||||||
|
|
||||||
|
|
||||||
|
if ($existingRecords) {
|
||||||
|
// Se existirem registros, o próximo número será o maior número existente + 1
|
||||||
|
$isptNumber = $existingRecords->ispt_number + 1;
|
||||||
|
} else {
|
||||||
|
// Se não existirem registros, começa com 1
|
||||||
|
$isptNumber = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$newEquipmentWorkHistory = new EquipmentWorkHistory;
|
||||||
|
|
||||||
|
$newEquipmentWorkHistory->equipment_id = $receveEquipment_ID;
|
||||||
|
$newEquipmentWorkHistory->ispt_number = $isptNumber;
|
||||||
|
$newEquipmentWorkHistory->company_projects_id = $company_projects_id;
|
||||||
|
|
||||||
|
$newEquipmentWorkHistory->save();
|
||||||
|
|
||||||
|
// Recebe o Id do 'EquipmentWorkHistory' criado.
|
||||||
|
$recebeNewEquipmentWorkHistoryID = $newEquipmentWorkHistory->equipmentWorkHistorys_id;
|
||||||
|
|
||||||
|
$isptNumber++;
|
||||||
|
|
||||||
|
$ambit = AmbitsEquipment::where('ambits_description', $datas['ambit'])->first();
|
||||||
|
|
||||||
|
if ($ambit) {
|
||||||
|
$ambit_id = $ambit->ambits_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Criar associacao do equipamento ao Âmbito
|
||||||
|
$AssociationEquipmentAmbit = new EquipmentAssociationAmbit;
|
||||||
|
$AssociationEquipmentAmbit->equipment_type_id = $newEquipament->equipment_type_id;
|
||||||
|
$AssociationEquipmentAmbit->ambits_id = $ambit_id;
|
||||||
|
$AssociationEquipmentAmbit->equipmentWorkHistorys_id = $newEquipmentWorkHistory->equipmentWorkHistorys_id;
|
||||||
|
|
||||||
|
$AssociationEquipmentAmbit->save();
|
||||||
|
|
||||||
|
//Recebe a tabela com as associoacoes entre Âmbitos e tarefas Elementares
|
||||||
|
$TasksAssociationAmbits = TasksAssociationAmbits::all()->where('ambits_equipment_id', $AssociationEquipmentAmbit->ambits_id);
|
||||||
|
|
||||||
|
foreach ($TasksAssociationAmbits as $TasksAssociationAmbit) {
|
||||||
|
$JoinsEquipmentsWithTasks = new OrderEquipmentTasks;
|
||||||
|
$JoinsEquipmentsWithTasks->equipmentWorkHistorys_id = $newEquipmentWorkHistory->equipmentWorkHistorys_id;
|
||||||
|
$JoinsEquipmentsWithTasks->elemental_tasks_id = $TasksAssociationAmbit->elemental_tasks_id;
|
||||||
|
$JoinsEquipmentsWithTasks->further_tasks_id = null;
|
||||||
|
$JoinsEquipmentsWithTasks->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Separa o nome do arquivo para obter o tipo de documento e a data-hora
|
||||||
|
$parts = explode('_', $originalFileName);
|
||||||
|
$documentType = $parts[2]; // 98
|
||||||
|
$timestamp = $parts[3]; // 2024-01-14_14-33
|
||||||
|
|
||||||
|
// Cria um array agrupado
|
||||||
|
$groupedArrayForPendingEquipments = [$documentType, [$timestamp, $equipmentPendingLogs]];
|
||||||
|
// Armazenar $groupedArrayForPendingEquipments na sessão
|
||||||
|
session(['groupedArrayForPendingEquipments' => $groupedArrayForPendingEquipments]);
|
||||||
|
$pendingEquipments = PendingEquipment::where('pending_company_projects_id', $request->numberProject)->get();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Separa o nome do arquivo para obter o tipo de documento e a data-hora
|
|
||||||
$parts = explode('_', $originalFileName);
|
|
||||||
$documentType = $parts[2]; // 98
|
|
||||||
$timestamp = $parts[3]; // 2024-01-14_14-33
|
|
||||||
|
|
||||||
// Cria um array agrupado
|
|
||||||
$groupedArrayForPendingEquipments = [$documentType, [$timestamp, $equipmentPendingLogs]];
|
|
||||||
|
|
||||||
// Armazenar $groupedArrayForPendingEquipments na sessão
|
|
||||||
session(['groupedArrayForPendingEquipments' => $groupedArrayForPendingEquipments]);
|
|
||||||
|
|
||||||
$pendingEquipments = PendingEquipment::where('pending_company_projects_id', $request->numberProject)->get();
|
|
||||||
|
|
||||||
// Verifica se foram criados equipamentos pendentes,e se nesses pendentes vieram do execel ou da base de dados, alem de indicar as linha nao preenchidas.
|
|
||||||
// if ($countPendingEquipments != 0 && !empty($pendenteLogs) && !empty($linhasIgnoradas)) {
|
|
||||||
// return redirect()->route('test2', ['id' => $request->numberProject])
|
|
||||||
// ->with('danger', 'Equipamentos Pendentes criados : ' . $countPendingEquipments)
|
|
||||||
// ->with('dangerPendenteLogs', ['linhasIgnoradas' => $linhasIgnoradas, 'pendenteLogs' => $pendenteLogs])
|
|
||||||
// ->with('pendingEquipments', $pendingEquipments);
|
|
||||||
// }
|
|
||||||
// return redirect()->route('test2', ['id' => $request->numberProject])
|
|
||||||
// ->with('success', 'Equipamentos Criados :' . $countNewEquipment);
|
|
||||||
|
|
||||||
if ($countPendingEquipments != 0 && !empty($equipmentPendingLogs)) {
|
if ($countPendingEquipments != 0 && !empty($equipmentPendingLogs)) {
|
||||||
// Se houver equipamentos pendentes, redirecione com essa informação e inclua os $linhasIgnoradas se não estiverem vazios
|
// Se houver equipamentos pendentes, redirecione com essa informação e inclua os $linhasIgnoradas se não estiverem vazios
|
||||||
return redirect()->route('test2', ['id' => $request->numberProject])
|
return redirect()->route('articulated_2', ['id' => $request->numberProject])
|
||||||
->with('danger', 'Equipamentos Pendentes criados: ' . $countPendingEquipments)
|
->with('danger', 'Equipamentos Pendentes criados: ' . $countPendingEquipments)
|
||||||
->with('dangerLogs', $ignoredLines)
|
->with('dangerLogs', $ignoredLines)
|
||||||
->with('equipmentPendingLogs', $equipmentPendingLogs)
|
->with('equipmentPendingLogs', $equipmentPendingLogs)
|
||||||
->with('pendingEquipments', $pendingEquipments);
|
->with('pendingEquipments', $pendingEquipments);
|
||||||
} else {
|
} else {
|
||||||
// Se não houver equipamentos pendentes, redirecione com uma mensagem de sucesso e inclua os $linhasIgnoradas se não estiverem vazios
|
// Se não houver equipamentos pendentes, redirecione com uma mensagem de sucesso e inclua os $linhasIgnoradas se não estiverem vazios
|
||||||
return redirect()->route('test2', ['id' => $request->numberProject])
|
return redirect()->route('articulated_2', ['id' => $request->numberProject])
|
||||||
->with('success', 'Equipamentos Criados: ' . $countNewEquipment)
|
->with('success', 'Equipamentos Criados: ' . $countEquipment)
|
||||||
->with('dangerLogs', $ignoredLines);
|
->with('dangerLogs', $ignoredLines);
|
||||||
}
|
}
|
||||||
|
// return redirect()->route('articulated_2', ['id' => $request->numberProject])
|
||||||
|
// ->with('success', 'Equipamentos Adicionados a Obra com sucesso: ' . $countEquipment);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Nao chega aqui ainda pois volta para a pagina com dados ja carregados.
|
//Nao chega aqui ainda pois volta para a pagina com dados ja carregados.
|
||||||
|
|
||||||
session(['form_data.step2' => $request->all()]);
|
session(['form_data.step2' => $request->all()]);
|
||||||
|
|
||||||
// Redirecione o Utilizador para a próxima etapa
|
// Redirecione o Utilizador para a próxima etapa
|
||||||
return redirect('/test3');
|
return redirect('/workStation_3');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function showStep3($company_projects_id)
|
public function showStep3($company_projects_id)
|
||||||
|
|
@ -1410,7 +1582,7 @@ public function index()
|
||||||
}
|
}
|
||||||
$allPossibleAttributes = GeneralAttributesEquipment::all()->pluck('description')->toArray();
|
$allPossibleAttributes = GeneralAttributesEquipment::all()->pluck('description')->toArray();
|
||||||
|
|
||||||
return view('test2', ['equipments' => $equipments, 'allAttributes' => $allPossibleAttributes]);
|
return view('articulated_2', ['equipments' => $equipments, 'allAttributes' => $allPossibleAttributes]);
|
||||||
// Retorne a view com os dados
|
// Retorne a view com os dados
|
||||||
// return view('test', ['equipments' => $equipments]);
|
// return view('test', ['equipments' => $equipments]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Models\EquipmentWorkHistory;
|
||||||
use App\Models\Plant;
|
use App\Models\Plant;
|
||||||
use App\Models\Unit;
|
use App\Models\Unit;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
|
@ -103,15 +104,23 @@ public function getDataEquipment(Request $request)
|
||||||
$receiveEquipmentsType = $request->get('receiveEquipmentsType');
|
$receiveEquipmentsType = $request->get('receiveEquipmentsType');
|
||||||
|
|
||||||
|
|
||||||
|
// $query = Equipment::with('equipmentType', 'unit')
|
||||||
$query = Equipment::with('equipmentType', 'unit')
|
// ->whereIn('unit_id', $unitsIds)
|
||||||
|
// ->select(['equipment_id', 'equipment_tag', 'unit_id', 'equipment_type_id', 'equipment_description']);
|
||||||
|
$query = Equipment::with([
|
||||||
|
'equipmentType',
|
||||||
|
'unit',
|
||||||
|
'equipmentWorkHistory' => function ($query) use ($numberProject) {
|
||||||
|
$query->where('company_projects_id', $numberProject)->orderBy('created_at', 'desc');
|
||||||
|
}
|
||||||
|
])
|
||||||
->whereIn('unit_id', $unitsIds)
|
->whereIn('unit_id', $unitsIds)
|
||||||
->select(['equipment_id', 'equipment_tag', 'unit_id', 'equipment_type_id']);
|
->select(['equipment_id', 'equipment_tag', 'unit_id', 'equipment_type_id', 'equipment_description']);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Query padrão que todas as dataTables recebem, a partir dele fazemos os filt
|
// Query padrão que todas as dataTables recebem, a partir dele fazemos os filt
|
||||||
$query = Equipment::with('equipmentType', 'unit')
|
$query = Equipment::with('equipmentType', 'unit')
|
||||||
->select(['equipment_id', 'equipment_tag', 'unit_id', 'equipment_type_id']);
|
->select(['equipment_id', 'equipment_tag', 'unit_id', 'equipment_type_id', 'equipment_description']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Consultas para a Criacao da Obra, Ambas vao ser diferentes, pois na creacao, recebes os equipamentos por obra, porem no portifolio vamos buscar todos.
|
// Consultas para a Criacao da Obra, Ambas vao ser diferentes, pois na creacao, recebes os equipamentos por obra, porem no portifolio vamos buscar todos.
|
||||||
|
|
@ -158,6 +167,13 @@ public function getDataEquipment(Request $request)
|
||||||
$equipment = $query->get();
|
$equipment = $query->get();
|
||||||
|
|
||||||
return DataTables::of($equipment)
|
return DataTables::of($equipment)
|
||||||
|
|
||||||
|
->addColumn('ispt_number', function ($equipment) {
|
||||||
|
// Assumindo que você quer o 'ispt_number' do primeiro 'EquipmentWorkHistory' que corresponde ao 'company_projects_id'
|
||||||
|
$equipmentWorkHistory = $equipment->equipmentWorkHistory->first();
|
||||||
|
return $equipmentWorkHistory ? $equipmentWorkHistory->ispt_number : 'N/A';
|
||||||
|
})
|
||||||
|
|
||||||
->addColumn('unit_name', function ($equipment) {
|
->addColumn('unit_name', function ($equipment) {
|
||||||
// Retorna 'unit_name' do relacionamento 'unit'
|
// Retorna 'unit_name' do relacionamento 'unit'
|
||||||
return $equipment->unit ? $equipment->unit->unit_name : 'N/A';
|
return $equipment->unit ? $equipment->unit->unit_name : 'N/A';
|
||||||
|
|
@ -167,6 +183,12 @@ public function getDataEquipment(Request $request)
|
||||||
return $equipment->equipmentType ? $equipment->equipmentType->equipment_type_name : 'N/A';
|
return $equipment->equipmentType ? $equipment->equipmentType->equipment_type_name : 'N/A';
|
||||||
})
|
})
|
||||||
|
|
||||||
|
->addColumn('ambit', function ($equipment) {
|
||||||
|
$firstEquipmentWorkHistory = $equipment->equipmentWorkHistory->first();
|
||||||
|
return $firstEquipmentWorkHistory->equipmentAssociationAmbit->ambitsEquipment->ambits_description;
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
->addColumn('action', function ($equipment) use ($numberProject) {
|
->addColumn('action', function ($equipment) use ($numberProject) {
|
||||||
$dropdownHtml = '<div class="d-flex justify-content-center dropdown">
|
$dropdownHtml = '<div class="d-flex justify-content-center dropdown">
|
||||||
<button data-toggle="dropdown" aria-expanded="false" class="actions-btn btn btn-light circle">
|
<button data-toggle="dropdown" aria-expanded="false" class="actions-btn btn btn-light circle">
|
||||||
|
|
@ -175,7 +197,7 @@ public function getDataEquipment(Request $request)
|
||||||
<div class="dropdown-menu dropdown-menu-light">';
|
<div class="dropdown-menu dropdown-menu-light">';
|
||||||
|
|
||||||
// Adiciona a primeira ação (Detalhes do equipamento)
|
// Adiciona a primeira ação (Detalhes do equipamento)
|
||||||
$detailsUrl = !is_null($numberProject) ? route('test11', ['projectID' => $numberProject, 'equipmentID' => $equipment->equipment_id]) : route('test22', ['equipmentID' => $equipment->equipment_id]);
|
$detailsUrl = !is_null($numberProject) ? route('projectDetails_11', ['projectID' => $numberProject, 'equipmentID' => $equipment->equipment_id]) : route('articulated_22', ['equipmentID' => $equipment->equipment_id]);
|
||||||
$dropdownHtml .= '<a href="' . $detailsUrl . '" class="dropdown-item text-primary">
|
$dropdownHtml .= '<a href="' . $detailsUrl . '" class="dropdown-item text-primary">
|
||||||
<i class="fa-solid fa-eye text-primary"></i>
|
<i class="fa-solid fa-eye text-primary"></i>
|
||||||
Detalhes
|
Detalhes
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,10 @@
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Models\AmbitsEquipment;
|
use App\Models\AmbitsEquipment;
|
||||||
|
use App\Models\ElementalTasks;
|
||||||
|
use App\Models\EquipmentAssociationAmbit;
|
||||||
use App\Models\EquipmentWorkHistory;
|
use App\Models\EquipmentWorkHistory;
|
||||||
|
use App\Models\TasksAssociationAmbits;
|
||||||
use App\Models\Unit;
|
use App\Models\Unit;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
@ -29,6 +32,116 @@
|
||||||
class ProjectoDatacontroller extends Controller
|
class ProjectoDatacontroller extends Controller
|
||||||
{
|
{
|
||||||
|
|
||||||
|
public function showAmbitDetailsProjectHistory($projectID, $equipmentID)
|
||||||
|
{
|
||||||
|
|
||||||
|
$detailsProject = CompanyProject::where('company_projects_id', $projectID)->first();
|
||||||
|
$detalsEquipmentWorkProject = EquipmentWorkHistory::where('equipment_id', $equipmentID)
|
||||||
|
->where('company_projects_id', $projectID)->first();
|
||||||
|
|
||||||
|
$receiveAmbit = EquipmentAssociationAmbit::where('equipmentWorkHistorys_id', $detalsEquipmentWorkProject->equipmentWorkHistorys_id)->first();
|
||||||
|
|
||||||
|
// $tasksAssociatedWithAmbit = TasksAssociationAmbits::where('ambits_equipment_id', $receiveAmbit->ambits_id)->get();
|
||||||
|
|
||||||
|
$tasksAssociatedWithAmbit = TasksAssociationAmbits::with('elementalTask')
|
||||||
|
->where('ambits_equipment_id', $receiveAmbit->ambits_id)
|
||||||
|
->get();
|
||||||
|
|
||||||
|
foreach ($tasksAssociatedWithAmbit as $taskAssociation) {
|
||||||
|
if ($taskAssociation->elementalTask) {
|
||||||
|
// Adiciona diretamente ao objeto TasksAssociationAmbits
|
||||||
|
$taskAssociation->elemental_task_description = $taskAssociation->elementalTask->elemental_tasks_description;
|
||||||
|
} else {
|
||||||
|
// Defina como null ou algum valor padrão se não houver tarefa elementar associada
|
||||||
|
$taskAssociation->elemental_task_description = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Agora cada objeto dentro de $tasksAssociatedWithAmbit tem uma propriedade 'elemental_task_description'.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//buscar Tarfas e tempo de execussao pelo control, assim como suas respostas.
|
||||||
|
|
||||||
|
return view('projectsClients.showAmbitDetailProjectHistory', compact('detailsProject','receiveAmbit'));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// public function showAllClientsForProjectReportsTable()
|
||||||
|
// {
|
||||||
|
|
||||||
|
// // Primeiro, buscamos todos os clientes com type_users = 3
|
||||||
|
// $allClients = User::where('type_users', 3)->get();
|
||||||
|
|
||||||
|
// // Inicializa um array para manter a contagem de projetos por cliente
|
||||||
|
// $clientProjectCounts = [];
|
||||||
|
|
||||||
|
// foreach ($allClients as $client) {
|
||||||
|
// // Para cada cliente, obtemos os plant_ids associados
|
||||||
|
// $plantIds = Plant::where('user_id', $client->user_id)->pluck('plant_id');
|
||||||
|
|
||||||
|
// // Agora, para cada plant_id, contamos os CompanyProjects associados com datas de início e fim não nulas
|
||||||
|
// $projectCount = CompanyProject::whereIn('plant_id', $plantIds)
|
||||||
|
// ->whereNotNull('date_started')
|
||||||
|
// ->whereNotNull('end_date')
|
||||||
|
// ->count();
|
||||||
|
|
||||||
|
// // Armazenamos a contagem no array com o user_id como chave
|
||||||
|
// $clientProjectCounts[$client->user_id] = $projectCount;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// return DataTables()
|
||||||
|
// ->addColumn('action', function ($detailsClient){
|
||||||
|
// $actionBtn = '<a title="Detalhes do equipamento" href="' . route('reportingDataClient', ['clientID' => $detailsClient->user_id]) . '"><i class="fa-solid fa-eye text-primary"></i></a>';
|
||||||
|
// return $actionBtn;
|
||||||
|
// });
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function showAllClientsForProjectReportsTable()
|
||||||
|
{
|
||||||
|
// Buscamos todos os clientes com type_users = 3
|
||||||
|
$allClientsQuery = User::where('type_users', 3);
|
||||||
|
|
||||||
|
// Retornamos o objeto DataTables
|
||||||
|
return DataTables::of($allClientsQuery)
|
||||||
|
|
||||||
|
->addColumn('client', function ($client) {
|
||||||
|
// Aqui você pode retornar o ID do cliente ou algum outro identificador
|
||||||
|
return $client->user_name;
|
||||||
|
})
|
||||||
|
->addColumn('amount_of_projects_completed', function ($client) {
|
||||||
|
// Para cada cliente, obtemos os plant_ids associados
|
||||||
|
$plantIds = Plant::where('user_id', $client->user_id)->pluck('plant_id');
|
||||||
|
|
||||||
|
// Contamos os CompanyProjects associados com datas de início e fim não nulas
|
||||||
|
$projectCount = CompanyProject::whereIn('plant_id', $plantIds)
|
||||||
|
->whereNotNull('date_started')
|
||||||
|
->whereNotNull('end_date')
|
||||||
|
->count();
|
||||||
|
|
||||||
|
// Retornamos a contagem
|
||||||
|
return $projectCount;
|
||||||
|
})
|
||||||
|
->addColumn('action', function ($client) {
|
||||||
|
// Geramos o botão de ação
|
||||||
|
$actionBtn = '<a title="Detalhes do equipamento" href="' . route('reportingDataClient', ['clientID' => $client->user_id]) . '"><i class="fa-solid fa-eye text-primary"></i></a>';
|
||||||
|
return $actionBtn;
|
||||||
|
})
|
||||||
|
->rawColumns(['action']) // Isso permite que o HTML seja renderizado
|
||||||
|
->make(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function showAllClientsForProjectReports()
|
||||||
|
{
|
||||||
|
return view('userClient.showAllClientsForProjectReports');
|
||||||
|
}
|
||||||
|
|
||||||
public function testRelatorio()
|
public function testRelatorio()
|
||||||
{
|
{
|
||||||
// Obter o caminho da imagem do usuário ou uma imagem padrão
|
// Obter o caminho da imagem do usuário ou uma imagem padrão
|
||||||
|
|
@ -72,7 +185,7 @@ public function receivePlants($receiveAllClients)
|
||||||
}
|
}
|
||||||
|
|
||||||
//Funcao que recebe a Acoes do dataTables das obrar em Planeamento.
|
//Funcao que recebe a Acoes do dataTables das obrar em Planeamento.
|
||||||
public function test11($projectID, $equipmentID)
|
public function projectDetails_11($projectID, $equipmentID)
|
||||||
{
|
{
|
||||||
|
|
||||||
$dataEquipment = Equipment::find($equipmentID);
|
$dataEquipment = Equipment::find($equipmentID);
|
||||||
|
|
@ -90,16 +203,37 @@ public function test11($projectID, $equipmentID)
|
||||||
|
|
||||||
|
|
||||||
//Funcao que recebe a Acoes do dataTables do portifolio.
|
//Funcao que recebe a Acoes do dataTables do portifolio.
|
||||||
public function test22($equipmentID)
|
public function articulated_22($equipmentID)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// $dataEquipment = Equipment::find($equipmentID);
|
||||||
|
// $detailsEquipmentWorkHistory = EquipmentWorkHistory::where('equipment_id',$equipmentID)->first();
|
||||||
|
// $attributes = SpecificAttributesEquipmentType::where('equipment_id',$equipmentID)->get(); // recebe todos os atributos espesificos do equipamento
|
||||||
|
// $OrdemTasks = OrderEquipmentTasks::where('equipmentWorkHistorys_id', $detailsEquipmentWorkHistory->equipmentWorkHistorys_id)->get(); // Todas as tarefas que o equipamento vai realizar :
|
||||||
|
// $OrdemTasksIds = $OrdemTasks->pluck('elemental_tasks_id')->all(); // Array de IDs
|
||||||
|
|
||||||
|
// $receiveAlldetailsEquipmentWorkHistory = EquipmentWorkHistory::where('equipment_id',$equipmentID)->get();
|
||||||
|
|
||||||
$dataEquipment = Equipment::find($equipmentID);
|
$dataEquipment = Equipment::find($equipmentID);
|
||||||
|
|
||||||
$attributes = SpecificAttributesEquipmentType::where('equipment_id', $equipmentID)->get(); // recebe todos os atributos espesificos do equipamento
|
|
||||||
$OrdemTasks = OrderEquipmentTasks::where('equipment_id', $equipmentID)->get(); // Todas as tarefas que o equipamento vai realizar :
|
|
||||||
$OrdemTasksIds = $OrdemTasks->pluck('elemental_tasks_id')->all(); // Array de IDs
|
|
||||||
|
|
||||||
return view('projectsClients.testRoute', compact('dataEquipment', 'OrdemTasks', 'OrdemTasksIds'));
|
$receiveAlldetailsEquipmentWorkHistory = EquipmentWorkHistory::with('equipmentAssociationAmbit')
|
||||||
|
->where('equipment_id', $equipmentID)
|
||||||
|
->get();
|
||||||
|
|
||||||
|
foreach ($receiveAlldetailsEquipmentWorkHistory as $equipmentWorkHistory) {
|
||||||
|
// Verifica se a relação equipmentAssociationAmbit existe
|
||||||
|
if ($equipmentWorkHistory->equipmentAssociationAmbit) {
|
||||||
|
// Adiciona o ambits_id diretamente ao objeto EquipmentWorkHistory
|
||||||
|
$equipmentWorkHistory->ambitDetals = $equipmentWorkHistory->equipmentAssociationAmbit->ambitsEquipment->ambits_description;
|
||||||
|
}
|
||||||
|
if ($equipmentWorkHistory->companyProject) {
|
||||||
|
$equipmentWorkHistory->nameCompanyProject = $equipmentWorkHistory->companyProject->company_project_description;
|
||||||
|
$equipmentWorkHistory->date_started = $equipmentWorkHistory->companyProject->date_started;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('projectsClients.testRoute', compact('dataEquipment', 'receiveAlldetailsEquipmentWorkHistory'));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -67,8 +67,9 @@ public function hasInspectionYes()
|
||||||
return $this->orderEquipmentTasks()->where('inspection', 'Sim')->exists();
|
return $this->orderEquipmentTasks()->where('inspection', 'Sim')->exists();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function EquipmentWorkHistory(){
|
public function equipmentWorkHistory()
|
||||||
return $this->hasMany(EquipmentWorkHistory::class, 'equipment_id','equipment_id');
|
{
|
||||||
|
return $this->hasMany(EquipmentWorkHistory::class, 'equipment_id', 'equipment_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ public function equipment()
|
||||||
}
|
}
|
||||||
public function companyProject()
|
public function companyProject()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Equipment::class, 'company_projects_id', 'company_projects_id');
|
return $this->belongsTo(CompanyProject::class, 'company_projects_id', 'company_projects_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function controlEquipmentWorkstation()
|
public function controlEquipmentWorkstation()
|
||||||
|
|
@ -29,4 +29,9 @@ public function controlEquipmentWorkstation()
|
||||||
return $this->hasMany(ControlEquipmentWorkstation::class, 'equipmentWorkHistorys_id', 'equipmentWorkHistorys_id');
|
return $this->hasMany(ControlEquipmentWorkstation::class, 'equipmentWorkHistorys_id', 'equipmentWorkHistorys_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function equipmentAssociationAmbit()
|
||||||
|
{
|
||||||
|
return $this->hasOne(EquipmentAssociationAmbit::class, 'equipmentWorkHistorys_id', 'equipmentWorkHistorys_id');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,4 +10,9 @@ class TasksAssociationAmbits extends Model
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
protected $table = 'tasks_association_ambits';
|
protected $table = 'tasks_association_ambits';
|
||||||
|
|
||||||
|
public function elementalTask()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(ElementalTasks::class, 'elemental_tasks_id', 'elemental_tasks_id');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -183,7 +183,7 @@
|
||||||
'systime', 't_cvf', 't_pdf', 't3d', 'tag_names',
|
'systime', 't_cvf', 't_pdf', 't3d', 'tag_names',
|
||||||
'tan', 'tanh', 'tek_color', 'temporary', 'terminal_size',
|
'tan', 'tanh', 'tek_color', 'temporary', 'terminal_size',
|
||||||
'tetra_clip', 'tetra_surface', 'tetra_volume', 'text', 'thin',
|
'tetra_clip', 'tetra_surface', 'tetra_volume', 'text', 'thin',
|
||||||
'thread', 'threed', 'tic', 'time_test2', 'timegen',
|
'thread', 'threed', 'tic', 'time_articulated_2', 'timegen',
|
||||||
'timer', 'timestamp', 'timestamptovalues', 'tm_test', 'toc',
|
'timer', 'timestamp', 'timestamptovalues', 'tm_test', 'toc',
|
||||||
'total', 'trace', 'transpose', 'tri_surf', 'triangulate',
|
'total', 'trace', 'transpose', 'tri_surf', 'triangulate',
|
||||||
'trigrid', 'triql', 'trired', 'trisol', 'truncate_lun',
|
'trigrid', 'triql', 'trired', 'trisol', 'truncate_lun',
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row mb-2">
|
<div class="row mb-2">
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<h1 class="text-light">Utilizador Pendente</h1>
|
<h1>Utilizador Pendente</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<ol class="breadcrumb float-sm-right">
|
<ol class="breadcrumb float-sm-right">
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="card-light">
|
<div class="card card-primary">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h3 class="card-title">Detalhes Utilizador Pendente</h3>
|
<h3 class="card-title">Detalhes Utilizador Pendente</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row mb-2">
|
<div class="row mb-2">
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<h1 class="text-light">{{__('messages.users_listUsers.top_view_part.companies')}}</h1>
|
<h1>{{__('messages.users_listUsers.top_view_part.companies')}}</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<ol class="breadcrumb float-sm-right">
|
<ol class="breadcrumb float-sm-right">
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="card-light">
|
<div class="card card-primary">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h3 class="card-title">{{__('messages.users_listUsers.top_view_part.companies_table')}}</h3>
|
<h3 class="card-title">{{__('messages.users_listUsers.top_view_part.companies_table')}}</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row mb-2">
|
<div class="row mb-2">
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<h1 class="text-light">{{__('messages.users_listUsers.top_view_part.companies')}}</h1>
|
<h1>{{__('messages.users_listUsers.top_view_part.companies')}}</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<ol class="breadcrumb float-sm-right">
|
<ol class="breadcrumb float-sm-right">
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="card-light">
|
<div class="card card-primary">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h3 class="card-title">{{__('messages.users_listUsers.top_view_part.users_table')}}</h3>
|
<h3 class="card-title">{{__('messages.users_listUsers.top_view_part.users_table')}}</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row mb-2">
|
<div class="row mb-2">
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<h1 class="text-light">{{ __('messages.portfolio.top_view_part.management_assets') }}</h1>
|
<h1>{{ __('messages.portfolio.top_view_part.management_assets') }}</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<ol class="breadcrumb float-sm-right">
|
<ol class="breadcrumb float-sm-right">
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<form>
|
{{-- <form>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-6" id="buttonCreateAssets">
|
<div class="col-sm-6" id="buttonCreateAssets">
|
||||||
<a href="#" type="button"
|
<a href="#" type="button"
|
||||||
|
|
@ -35,11 +35,10 @@ class="btn btn-block bg-primary btn-lg">{{ __('messages.portfolio.change_buttons
|
||||||
class="btn btn-block bg-primary btn-lg">{{ __('messages.portfolio.change_buttons.asset_table') }}</a>
|
class="btn btn-block bg-primary btn-lg">{{ __('messages.portfolio.change_buttons.asset_table') }}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form> --}}
|
||||||
|
|
||||||
<br>
|
|
||||||
|
|
||||||
<div class="card-light" id="cardAssetsTable">
|
<div class="card card-primary" id="cardAssetsTable">
|
||||||
|
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h3 class="card-title">{{ __('messages.portfolio.change_buttons.asset_table') }}</h3>
|
<h3 class="card-title">{{ __('messages.portfolio.change_buttons.asset_table') }}</h3>
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ class="info-box-number">{{ $CompanyProject->where('order_project', 1)->count() }
|
||||||
<h5 class="progress-description">{{ $project->company_project_description }}
|
<h5 class="progress-description">{{ $project->company_project_description }}
|
||||||
</h5>
|
</h5>
|
||||||
<div class="card-tools">
|
<div class="card-tools">
|
||||||
<a href="{{ route('test2', ['id' => $project->company_projects_id]) }}"
|
<a href="{{ route('articulated_2', ['id' => $project->company_projects_id]) }}"
|
||||||
class="btn btn-tool">
|
class="btn btn-tool">
|
||||||
<i class="fa-solid fa-eye" style="color:rgb(62, 62, 62)"></i>
|
<i class="fa-solid fa-eye" style="color:rgb(62, 62, 62)"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
||||||
|
|
@ -309,10 +309,10 @@ class="d-block">{{ Auth::user()->userType?->type_user }}</a>
|
||||||
|
|
||||||
{{-- Relatorios para os Admin, SuperAdmin --}}
|
{{-- Relatorios para os Admin, SuperAdmin --}}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="{{ route('testRelatorio') }}" class="nav-link">
|
<a href="{{ route('showAllClientsForProjectReports') }}" class="nav-link">
|
||||||
<i class="nav-icon fas fa-file"></i>
|
<i class="nav-icon fas fa-file"></i>
|
||||||
<p>
|
<p>
|
||||||
Relatórios Admir
|
Relatórios
|
||||||
</p>
|
</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row mb-2">
|
<div class="row mb-2">
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<h1 class="text-light">{{__('messages.pendingUsers.create_users')}}</h1>
|
<h1>{{__('messages.pendingUsers.create_users')}}</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<ol class="breadcrumb float-sm-right">
|
<ol class="breadcrumb float-sm-right">
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
|
|
||||||
|
|
||||||
<div class="card-light">
|
<div class="card card-primary">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h3 class="card-title mb-0">{{__('messages.pendingUsers.submit_form')}}</h3>
|
<h3 class="card-title mb-0">{{__('messages.pendingUsers.submit_form')}}</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -59,7 +59,7 @@
|
||||||
</div>
|
</div>
|
||||||
{{-- ./card-light --}}
|
{{-- ./card-light --}}
|
||||||
|
|
||||||
<div class="card-light">
|
<div class="card card-primary">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h2 class="card-title">{{__('messages.pendingUsers.pending_users')}}:</h2>
|
<h2 class="card-title">{{__('messages.pendingUsers.pending_users')}}:</h2>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@
|
||||||
}, 5000); // A mensagem desaparecerá após 5 segundos
|
}, 5000); // A mensagem desaparecerá após 5 segundos
|
||||||
</script>
|
</script>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@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;">
|
||||||
|
|
@ -40,7 +39,7 @@
|
||||||
<div class="card card-danger collapsed-card">
|
<div class="card card-danger collapsed-card">
|
||||||
|
|
||||||
<div class="card-header clickable">
|
<div class="card-header clickable">
|
||||||
<h3 class="card-title">Erros do Template</h3>
|
<h3 class="card-title" style="color:black">Erros do Template</h3>
|
||||||
<div class="card-tools">
|
<div class="card-tools">
|
||||||
<button type="button" class="btn btn-tool collapse-button" data-card-widget="collapse"><i
|
<button type="button" class="btn btn-tool collapse-button" data-card-widget="collapse"><i
|
||||||
class="fas fa-plus"></i></button>
|
class="fas fa-plus"></i></button>
|
||||||
|
|
@ -53,7 +52,7 @@ class="fas fa-plus"></i></button>
|
||||||
<div class="card card-danger">
|
<div class="card card-danger">
|
||||||
|
|
||||||
<div class="card-header clickable">
|
<div class="card-header clickable">
|
||||||
<h3 class="card-title">Linhas Ignoradas</h3>
|
<h3 class="card-title" style="color:black">Linhas Ignoradas</h3>
|
||||||
<div class="card-tools">
|
<div class="card-tools">
|
||||||
<button type="button" class="btn btn-tool collapse-button"
|
<button type="button" class="btn btn-tool collapse-button"
|
||||||
data-card-widget="collapse"><i class="fas fa-plus"></i></button>
|
data-card-widget="collapse"><i class="fas fa-plus"></i></button>
|
||||||
|
|
@ -65,8 +64,8 @@ class="fas fa-plus"></i></button>
|
||||||
<ul class="list-group scrollable-list">
|
<ul class="list-group scrollable-list">
|
||||||
@foreach (session('dangerLogs') as $ignoredLine)
|
@foreach (session('dangerLogs') as $ignoredLine)
|
||||||
<li class="list-group-item d-flex align-items-center" aria-current="true">
|
<li class="list-group-item d-flex align-items-center" aria-current="true">
|
||||||
<span class="line-text">Linha: {{ $ignoredLine['line'] }}</span>
|
<span class="line-text">Linha({{ $ignoredLine['line'] }})</span>
|
||||||
<span class="empty-fields"><b> - Campos Vazios:</b>
|
<span class="empty-fields"><b> - Campos :</b>
|
||||||
{{ implode(', ', $ignoredLine['emptyFields']) }}</span>
|
{{ implode(', ', $ignoredLine['emptyFields']) }}</span>
|
||||||
</li>
|
</li>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
@ -117,7 +116,7 @@ class="fas fa-plus"></i></button>
|
||||||
<div class="card card-success collapsed-card">
|
<div class="card card-success collapsed-card">
|
||||||
|
|
||||||
<div class="card-header clickable">
|
<div class="card-header clickable">
|
||||||
<h3 class="card-title">Criar Equipamentos Manualmente</h3>
|
<h3 class="card-title" style="color:black">Criar Equipamentos Manualmente</h3>
|
||||||
<div class="card-tools">
|
<div class="card-tools">
|
||||||
<button type="button" class="btn btn-tool collapse-button" data-card-widget="collapse"><i
|
<button type="button" class="btn btn-tool collapse-button" data-card-widget="collapse"><i
|
||||||
class="fas fa-plus"></i></button>
|
class="fas fa-plus"></i></button>
|
||||||
|
|
@ -126,7 +125,7 @@ class="fas fa-plus"></i></button>
|
||||||
|
|
||||||
<!-- /.card-header -->
|
<!-- /.card-header -->
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<form action="{{ route('test2CreateEquipment') }}" method="POST">
|
<form action="{{ route('articulated_2CreateEquipment') }}" method="POST">
|
||||||
@csrf
|
@csrf
|
||||||
{{-- Vai receber o valor do ID da obra e passar diretamente para o controller, esta em hidden pois não e necessario mostrar seu campo ao utilizador --}}
|
{{-- Vai receber o valor do ID da obra e passar diretamente para o controller, esta em hidden pois não e necessario mostrar seu campo ao utilizador --}}
|
||||||
<input type="hidden" name="numberProject" value="{{ $numberProject }}">
|
<input type="hidden" name="numberProject" value="{{ $numberProject }}">
|
||||||
|
|
@ -177,15 +176,13 @@ class="fas fa-plus"></i></button>
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-tagEquipment">
|
<span class="input-group-text" id="form-tagEquipment">
|
||||||
<i class="fa-sharp fa-solid fa-tag" style="color: #00B0EA;"></i>
|
<i class="fa-sharp fa-solid fa-tag" style="color: #00B0EA;" data-toggle="tooltip" title="Tag"></i>
|
||||||
|
<span style="color:red;"">*</span>
|
||||||
</span>
|
</span>
|
||||||
<div class="has-float-label">
|
<input type="text" name="tag"
|
||||||
<input type="text" name="tag"
|
class="form-control card_inputs" id="equipmentTag"
|
||||||
class="form-control card_inputs" id="equipmentTag"
|
placeholder="Tag..." aria-label="Tag Equipment"
|
||||||
placeholder="Tag..." aria-label="Tag Equipment"
|
aria-describedby="form-tagEquipment" required>
|
||||||
aria-describedby="form-tagEquipment" required>
|
|
||||||
<label>Tag <span class="required">*</span></label>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
|
|
@ -193,64 +190,53 @@ class="form-control card_inputs" id="equipmentTag"
|
||||||
<span class="input-group-text" id="form-equipmentDescription">
|
<span class="input-group-text" id="form-equipmentDescription">
|
||||||
{{-- <i class="fa fa-id-badge"></i> --}}
|
{{-- <i class="fa fa-id-badge"></i> --}}
|
||||||
<i class="fa-sharp fa-regular fa-newspaper"
|
<i class="fa-sharp fa-regular fa-newspaper"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;" data-toggle="tooltip" title="Descrição do equipamento"></i>
|
||||||
|
<span style="color:red;"">*</span>
|
||||||
</span>
|
</span>
|
||||||
<div class="has-float-label">
|
<input type="text" name="equipmentDescription"
|
||||||
<input type="text" name="equipmentDescription"
|
class="form-control card_inputs" id="equipmentDescription"
|
||||||
class="form-control card_inputs" id="equipmentDescription"
|
placeholder="Descrição Equipamento..."
|
||||||
placeholder="Descrição Equipamento..."
|
aria-label="Tag Equipment"
|
||||||
aria-label="Tag Equipment"
|
aria-describedby="form-equipmentDescription" required>
|
||||||
aria-describedby="form-equipmentDescription" required>
|
|
||||||
<label>Descrição Equipamento <span
|
|
||||||
class="required">*</span></label>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- ./row -->
|
||||||
|
|
||||||
{{-- 3 inputs per line :equipmentSerialNumber, equipmentBrand, equipmentModel --}}
|
{{-- 3 inputs per line :equipmentSerialNumber, equipmentBrand, equipmentModel --}}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-serialNumberEquipment">
|
<span class="input-group-text" id="form-serialNumberEquipment">
|
||||||
<i class="fa-solid fa-barcode" style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-barcode" style="color: #00B0EA;" data-toggle="tooltip" title="Número de série"></i>
|
||||||
</span>
|
</span>
|
||||||
<div class="has-float-label">
|
<input type="text" name="serialNumberEquipment"
|
||||||
<input type="text" name="serialNumberEquipment"
|
class="form-control card_inputs" id="equipmentSerialNumber"
|
||||||
class="form-control card_inputs" id="equipmentSerialNumber"
|
placeholder="Número de série"
|
||||||
placeholder="Número de série"
|
aria-label="Serial Number Equipment"
|
||||||
aria-label="Serial Number Equipment"
|
aria-describedby="form-serialNumberEquipment">
|
||||||
aria-describedby="form-serialNumberEquipment">
|
|
||||||
<label>Número de série </label>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-equipmentBrand">
|
<span class="input-group-text" id="form-equipmentBrand">
|
||||||
<i class="fa-solid fa-object-group" style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-object-group" style="color: #00B0EA;" data-toggle="tooltip" title="Marca"></i>
|
||||||
</span>
|
</span>
|
||||||
<div class="has-float-label">
|
|
||||||
<input type="text" name="equipmentBrand"
|
<input type="text" name="equipmentBrand"
|
||||||
class="form-control card_inputs" id="equipmentBrand"
|
class="form-control card_inputs" id="equipmentBrand"
|
||||||
placeholder="Marca" aria-label="Serial Number Equipment"
|
placeholder="Marca" aria-label="Serial Number Equipment"
|
||||||
aria-describedby="form-equipmentBrand">
|
aria-describedby="form-equipmentBrand">
|
||||||
<label>Marca</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-equipmentModel">
|
<span class="input-group-text" id="form-equipmentModel">
|
||||||
<i class="fa-solid fa-cubes" style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-cubes" style="color: #00B0EA;" data-toggle="tooltip" title="Modelo"></i>
|
||||||
</span>
|
</span>
|
||||||
<div class="has-float-label">
|
|
||||||
<input type="text" name="equipmentModel"
|
<input type="text" name="equipmentModel"
|
||||||
class="form-control card_inputs" id="equipmentModel"
|
class="form-control card_inputs" id="equipmentModel"
|
||||||
placeholder="Modelo" aria-label="Serial Number Equipment"
|
placeholder="Modelo" aria-label="Serial Number Equipment"
|
||||||
aria-describedby="form-equipmentModel">
|
aria-describedby="form-equipmentModel">
|
||||||
<label>Modelo</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -261,46 +247,37 @@ class="form-control card_inputs" id="equipmentModel"
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-dimension">
|
<span class="input-group-text" id="form-dimension">
|
||||||
<i class="fa-solid fa-ruler " style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-ruler " style="color: #00B0EA;" data-toggle="tooltip" title="Dimensão"></i>
|
||||||
</span>
|
</span>
|
||||||
<div class="has-float-label">
|
|
||||||
<input type="text" name="dimension"
|
<input type="text" name="dimension"
|
||||||
class="form-control card_inputs" id="dimension"
|
class="form-control card_inputs" id="dimension"
|
||||||
placeholder="Dimensão" aria-label="Serial Number Equipment"
|
placeholder="Dimensão" aria-label="Serial Number Equipment"
|
||||||
aria-describedby="form-dimension">
|
aria-describedby="form-dimension">
|
||||||
<label>Dimensão</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-rating">
|
<span class="input-group-text" id="form-rating">
|
||||||
<i class="fa-solid fa-ranking-star" style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-ranking-star" style="color: #00B0EA;" data-toggle="tooltip" title="Rating"></i>
|
||||||
</span>
|
</span>
|
||||||
<div class="has-float-label">
|
|
||||||
<input type="text" name="rating"
|
<input type="text" name="rating"
|
||||||
class="form-control card_inputs" id="rating"
|
class="form-control card_inputs" id="rating"
|
||||||
placeholder="Rating..." aria-label="Serial Number Equipment"
|
placeholder="Rating..." aria-label="Serial Number Equipment"
|
||||||
aria-describedby="form-rating">
|
aria-describedby="form-rating">
|
||||||
<label>Rating</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-dim_certa">
|
<span class="input-group-text" id="form-dim_certa">
|
||||||
<i class="fa-sharp fa-regular fa-square-poll-vertical"></i>
|
<i class="fa-solid fa-ruler-vertical" style="color: #00B0EA;" data-toggle="tooltip" title="Dim Certa"></i>
|
||||||
</span>
|
</span>
|
||||||
<div class="has-float-label">
|
|
||||||
<input type="text" name="dim_certa"
|
<input type="text" name="dim_certa"
|
||||||
class="form-control card_inputs" id="dim_certa"
|
class="form-control card_inputs" id="dim_certa"
|
||||||
placeholder="Dim certa..."
|
placeholder="Dim certa..."
|
||||||
aria-label="Serial Number Equipment"
|
aria-label="Serial Number Equipment"
|
||||||
aria-describedby="form-dim_certa">
|
aria-describedby="form-dim_certa">
|
||||||
<label>Dim certa</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -311,43 +288,34 @@ class="form-control card_inputs" id="dim_certa"
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-main_equipment">
|
<span class="input-group-text" id="form-main_equipment">
|
||||||
<i class="fa-solid fa-cubes" style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-sliders" style="color: #00B0EA;" data-toggle="tooltip" title="Main Equipment"></i>
|
||||||
</span>
|
</span>
|
||||||
<div class="has-float-label">
|
|
||||||
<input type="text" name="main_equipment"
|
<input type="text" name="main_equipment"
|
||||||
class="form-control card_inputs" id="main_equipment"
|
class="form-control card_inputs" id="main_equipment"
|
||||||
placeholder="Main Equipment" aria-label="Main Equipment"
|
placeholder="Main Equipment" aria-label="Main Equipment"
|
||||||
aria-describedby="form-main_equipment">
|
aria-describedby="form-main_equipment">
|
||||||
<label>Main Equipment</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-p&id">
|
<span class="input-group-text" id="form-p&id">
|
||||||
<i class="fa-solid fa-cubes" style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-map-location-dot" style="color: #00B0EA;" data-toggle="tooltip" title="P&ID"></i>
|
||||||
</span>
|
</span>
|
||||||
<div class="has-float-label">
|
|
||||||
<input type="text" name="p&id"
|
<input type="text" name="p&id"
|
||||||
class="form-control card_inputs" id="p&id"
|
class="form-control card_inputs" id="p&id"
|
||||||
placeholder="P&ID" aria-label="P & id"
|
placeholder="P&ID" aria-label="P&id"
|
||||||
aria-describedby="form-p&id">
|
aria-describedby="form-p&id">
|
||||||
<label>P&ID</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-sap_number">
|
<span class="input-group-text" id="form-sap_number">
|
||||||
<i class="fa-solid fa-cubes" style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-hashtag" style="color: #00B0EA;" data-toggle="tooltip" title="Número Sap"></i>
|
||||||
</span>
|
</span>
|
||||||
<div class="has-float-label">
|
|
||||||
<input type="text" name="sap_number"
|
<input type="text" name="sap_number"
|
||||||
class="form-control card_inputs" id="sap_number"
|
class="form-control card_inputs" id="sap_number"
|
||||||
placeholder="Nº SAP" aria-label="Numero Sap"
|
placeholder="Nº SAP" aria-label="Numero Sap"
|
||||||
aria-describedby="form-sap_number">
|
aria-describedby="form-sap_number">
|
||||||
<label>Nº SAP</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -358,44 +326,35 @@ class="form-control card_inputs" id="sap_number"
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-SP_(Bar)_Cold">
|
<span class="input-group-text" id="form-SP_(Bar)_Cold">
|
||||||
<i class="fa-solid fa-cubes" style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-signal" style="color: #00B0EA;" data-toggle="tooltip" title="SP (Bar) Cold"></i>
|
||||||
</span>
|
</span>
|
||||||
<div class="has-float-label">
|
<input type="text" name="sp_(Bar)_Cold"
|
||||||
<input type="text" name="SP_(Bar)_Cold"
|
|
||||||
class="form-control card_inputs" id="SP_(Bar)_Cold"
|
class="form-control card_inputs" id="SP_(Bar)_Cold"
|
||||||
placeholder="SP (Bar) Cold" aria-label="SP (Bar) Cold"
|
placeholder="SP (Bar) Cold" aria-label="SP (Bar) Cold"
|
||||||
aria-describedby="form-SP_(Bar)_Cold">
|
aria-describedby="form-SP_(Bar)_Cold">
|
||||||
<label>SP (Bar) Cold</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-Back_Presure_(Bar)">
|
<span class="input-group-text" id="form-Back_Presure_(Bar)">
|
||||||
<i class="fa-solid fa-cubes" style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-stopwatch" style="color: #00B0EA;" data-toggle="tooltip" title="Back_Presure_(Bar)"></i>
|
||||||
</span>
|
</span>
|
||||||
<div class="has-float-label">
|
<input type="text" name="back_Presure_(Bar)"
|
||||||
<input type="text" name="Back_Presure_(Bar)"
|
|
||||||
class="form-control card_inputs" id="Back_Presure_(Bar)"
|
class="form-control card_inputs" id="Back_Presure_(Bar)"
|
||||||
placeholder="Back Presure (Bar)"
|
placeholder="Back Presure (Bar)"
|
||||||
aria-label="Back Presure (Bar)"
|
aria-label="Back Presure (Bar)"
|
||||||
aria-describedby="form-Back_Presure_(Bar)">
|
aria-describedby="form-Back_Presure_(Bar)">
|
||||||
<label>Back Presure (Bar)</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-material">
|
<span class="input-group-text" id="form-material">
|
||||||
<i class="fa-solid fa-cubes" style="color: #00B0EA;"></i>
|
<i class="fa-brands fa-codepen" style="color: #00B0EA;" data-toggle="tooltip" title="Material"></i>
|
||||||
</span>
|
</span>
|
||||||
<div class="has-float-label">
|
|
||||||
<input type="text" name="material"
|
<input type="text" name="material"
|
||||||
class="form-control card_inputs" id="material"
|
class="form-control card_inputs" id="material"
|
||||||
placeholder="Material" aria-label="Material"
|
placeholder="Material" aria-label="Material"
|
||||||
aria-describedby="form-material">
|
aria-describedby="form-material">
|
||||||
<label>Material</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -406,29 +365,23 @@ class="form-control card_inputs" id="material"
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-manufacturer">
|
<span class="input-group-text" id="form-manufacturer">
|
||||||
<i class="fa-solid fa-cubes" style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-building" style="color: #00B0EA;" data-toggle="tooltip" title="Fabricante"></i>
|
||||||
</span>
|
</span>
|
||||||
<div class="has-float-label">
|
|
||||||
<input type="text" name="manufacturer"
|
<input type="text" name="manufacturer"
|
||||||
class="form-control card_inputs" id="manufacturer"
|
class="form-control card_inputs" id="manufacturer"
|
||||||
placeholder="Fabricante" aria-label="Fabricante"
|
placeholder="Fabricante" aria-label="Fabricante"
|
||||||
aria-describedby="form-manufacturer">
|
aria-describedby="form-manufacturer">
|
||||||
<label>Fabricante</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-isolation">
|
<span class="input-group-text" id="form-isolation">
|
||||||
<i class="fa-solid fa-cubes" style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-lock" style="color: #00B0EA;" data-toggle="tooltip" title="Isolamento"></i>
|
||||||
</span>
|
</span>
|
||||||
<div class="has-float-label">
|
|
||||||
<input type="text" name="isolation"
|
<input type="text" name="isolation"
|
||||||
class="form-control card_inputs" id="isolation"
|
class="form-control card_inputs" id="isolation"
|
||||||
placeholder="Isolamento" aria-label="Isolamento"
|
placeholder="Isolamento" aria-label="Isolamento"
|
||||||
aria-describedby="form-isolation">
|
aria-describedby="form-isolation">
|
||||||
<label>Isolamento</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -439,29 +392,23 @@ class="form-control card_inputs" id="isolation"
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text">
|
<span class="input-group-text">
|
||||||
<i class="fa-solid fa-cubes" style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-stairs" style="color: #00B0EA;" data-toggle="tooltip" title="Andaime"></i>
|
||||||
</span>
|
</span>
|
||||||
<div class="has-float-label">
|
|
||||||
<select class="form-control card_inputs" name="scaffold">
|
<select class="form-control card_inputs" name="scaffold">
|
||||||
<option value="Sim">Sim</option>
|
<option value="Sim">Sim</option>
|
||||||
<option value="Nao" selected>Nao</option>
|
<option value="Nao" selected>Nao</option>
|
||||||
</select>
|
</select>
|
||||||
<label>Andaime?</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text">
|
<span class="input-group-text">
|
||||||
<i class="fa-solid fa-cubes" style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-truck-arrow-right" style="color: #00B0EA;" data-toggle="tooltip" title="Grua"></i>
|
||||||
</span>
|
</span>
|
||||||
<div class="has-float-label">
|
|
||||||
<select class="form-control card_inputs" name="crane">
|
<select class="form-control card_inputs" name="crane">
|
||||||
<option value="Sim">Sim</option>
|
<option value="Sim">Sim</option>
|
||||||
<option value="Nao" selected>Nao</option>
|
<option value="Nao" selected>Nao</option>
|
||||||
</select>
|
</select>
|
||||||
<label>Grua?</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1117,7 +1064,7 @@ class="form-control card_inputs" id="PositionerSerialNumber"
|
||||||
<div class="card card-primary collapsed-card">
|
<div class="card card-primary collapsed-card">
|
||||||
|
|
||||||
<div class="card-header clickable">
|
<div class="card-header clickable">
|
||||||
<h3 class="card-title">Selecionar Equipamentos</h3>
|
<h3 class="card-title">Selecionar Equipamentos ja existentes</h3>
|
||||||
<div class="card-tools">
|
<div class="card-tools">
|
||||||
<button type="button" class="btn btn-tool collapse-button"
|
<button type="button" class="btn btn-tool collapse-button"
|
||||||
data-card-widget="collapse"><i class="fas fa-plus"></i></button>
|
data-card-widget="collapse"><i class="fas fa-plus"></i></button>
|
||||||
|
|
@ -1189,47 +1136,79 @@ class="form-control card_inputs" id="PositionerSerialNumber"
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{-- Importar Formulário --}}
|
|
||||||
<form action="{{ route('processStep2') }}" method="post" enctype="multipart/form-data">
|
|
||||||
|
|
||||||
@csrf
|
<h5 style="color: #09255C;">Criar Pelo Template:</h5>
|
||||||
<input type="hidden" name="numberProject" value="{{ $numberProject }}">
|
<div class="card">
|
||||||
<div class="row">
|
<div class="card-header" style="background-color: #EAF3F6;">
|
||||||
<div class="col-sm-4 d-flex justify-content-center">
|
<form action="{{ route('processStep2') }}" method="post" enctype="multipart/form-data">
|
||||||
<a href="{{ route('download', ['numberProject' => $numberProject]) }}"
|
@csrf
|
||||||
class="btn btn-info">Baixar Template</a>
|
<input type="hidden" name="numberProject" value="{{ $numberProject }}">
|
||||||
{{-- <a id="btn-download-template" href="{{ route('download1',['numberProject'=>$numberProject]) }}" class="btn btn-info">Baixar Template</a> --}}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-sm-4">
|
<div class="row align-items-center">
|
||||||
<div class="input-group">
|
<div class="col-2 col-md-2 col-lg-1">
|
||||||
<span class="input-group-text border rounded-left" id=""
|
<a href="{{ route('download', ['numberProject' => $numberProject]) }}"
|
||||||
style="border-right: none;">
|
class="input-group-text border rounded-left"
|
||||||
<i class="fa-solid fa-file-arrow-up" style="color: #00B0EA;"></i>
|
style="background-color: #ffffff; display: flex; align-items: center; justify-content: center;"
|
||||||
</span>
|
data-toggle="tooltip" title="Baixar Template">
|
||||||
<div class="custom-file border rounded-right" style="border-left: none;">
|
<i class="fa-solid fa-download" style="color: #09255C;"></i>
|
||||||
<input type="file" class="custom-file-input" id="exampleInputFile"
|
</a>
|
||||||
name="documento" accept=".xlsx, .xls">
|
</div>
|
||||||
<label class="custom-file-label" for="exampleInputFile">Importar
|
<div class="col-10 col-md col-lg">
|
||||||
Articulado</label>
|
<div class="input-group">
|
||||||
|
<span class="input-group-text border rounded-left"
|
||||||
|
style="background-color: #ffffff;" data-toggle="tooltip"
|
||||||
|
title="Seleciona a Funcao do Template">
|
||||||
|
<i class="fa-solid fa-list-check" style="color: #09255C;"></i>
|
||||||
|
</span>
|
||||||
|
<select class="form-control" style="border: 1px solid #09255C;"
|
||||||
|
name="chooseIfSelectOrCreateEquipments">
|
||||||
|
<option value="selectEquipments">Selecionar</option>
|
||||||
|
<option value="createEquipments" selected>Criar Novos</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-9 col-md col-lg">
|
||||||
|
<div class="input-group">
|
||||||
|
<span class="input-group-text border rounded-left"
|
||||||
|
style="background-color: #ffffff;" data-toggle="tooltip"
|
||||||
|
title="Seleciona o template que vai utilizar">
|
||||||
|
<i class="fa-solid fa-file-arrow-up" style="color: #09255C;"></i>
|
||||||
|
</span>
|
||||||
|
<div class="custom-file border rounded-right"
|
||||||
|
style="border-left: none; position: relative;">
|
||||||
|
<input type="file" class="custom-file-input" id="exampleInputFile"
|
||||||
|
name="documento" accept=".xlsx, .xls"
|
||||||
|
style="opacity: 0; position: absolute; z-index: -1;">
|
||||||
|
<label class="custom-file-label" for="exampleInputFile"
|
||||||
|
style="background-color: #ffffff; border: 1px solid #09255C; cursor: pointer; color: #09255C;">
|
||||||
|
Importar Articulado
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-3 col-md-1 col-lg-1">
|
||||||
|
<button type="submit" class="btn"
|
||||||
|
style="background-color: #09255C; color: #ffffff;">Enviar</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</form>
|
||||||
<div class="col-sm-4 d-flex justify-content-end">
|
|
||||||
<button type="submit" class="btn btn-primary">Enviar</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{{-- ./row --}}
|
<script>
|
||||||
</form>
|
$(function() {
|
||||||
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
{{-- Pendente --}}
|
{{-- Pendente --}}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
<a href='#' data-toggle='modal' data-target='#modal-pedingEquipments'>
|
<a href='#' data-toggle='modal' data-target='#modal-pedingEquipments'>
|
||||||
<br>
|
<br>
|
||||||
<button class="btn btn-danger">
|
<button class="btn btn-danger" style="color:black">
|
||||||
Pendentes :
|
Pendentes
|
||||||
@if (isset($pendingEquipments))
|
@if (isset($pendingEquipments))
|
||||||
({{ count($pendingEquipments) }})
|
({{ count($pendingEquipments) }})
|
||||||
@endif
|
@endif
|
||||||
|
|
@ -1272,38 +1251,38 @@ class="btn btn-info">Baixar Template</a>
|
||||||
</div>
|
</div>
|
||||||
<!-- row text-center -->
|
<!-- row text-center -->
|
||||||
|
|
||||||
|
|
||||||
<table id="showProjectEquipment" class="table table-bordered table-striped">
|
<table id="showProjectEquipment" class="table table-bordered table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>ID</th>
|
<th>NªIspt</th>
|
||||||
<th>Tag</th>
|
<th>Tag</th>
|
||||||
|
<th>Descrição</th>
|
||||||
|
<th>Ambito</th>
|
||||||
<th>Fabrica</th>
|
<th>Fabrica</th>
|
||||||
<th>Tipo</th>
|
<th>Tipo</th>
|
||||||
<th>Ações</th>
|
<th>Ações</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
|
<!-- ./Card-danger -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="card-footer">
|
<div class="card-footer">
|
||||||
<div class="float-right">
|
<div class="float-right">
|
||||||
{{-- <button type="submit" class="btn btn-primary">Guardar</button> --}}
|
{{-- <button type="submit" class="btn btn-primary">Guardar</button> --}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- /.card-body -->
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- ./Card card-Primary -->
|
<!-- ./Card card-Primary -->
|
||||||
|
|
||||||
<a style="margin: 10px" href="{{ route('test1', ['id' => $numberProject]) }}"
|
<a style="margin: 10px" href="{{ route('projectDetails_1', ['id' => $numberProject]) }}"
|
||||||
class="btn btn-primary float-left">Anterior</a>
|
class="btn btn-primary float-left">Detalhes obra</a>
|
||||||
<a style="margin: 10px" href="{{ route('test3', ['id' => $numberProject]) }}"
|
<a style="margin: 10px" href="{{ route('workStation_3', ['id' => $numberProject]) }}"
|
||||||
class="btn btn-primary float-right">Seguinte</a>
|
class="btn btn-primary float-right">Postos de Trabalho</a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{{-- ./container-fluid --}}
|
{{-- ./container-fluid --}}
|
||||||
|
|
@ -1357,18 +1336,18 @@ class="btn btn-primary float-right">Seguinte</a>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<form action="{{route('changeAmbitEquipment')}}" method="post">
|
<form action="{{ route('changeAmbitEquipment') }}" method="post">
|
||||||
@csrf
|
@csrf
|
||||||
<p>Seleciona o ambito para qual deseja ser trocado.</p>
|
<p>Seleciona o ambito para qual deseja ser trocado.</p>
|
||||||
<input type="hidden" class="equipmentType_id"
|
<input type="hidden" class="equipmentType_id"
|
||||||
value="{{ $equipment->equipment_type_id }}">
|
value="{{ $equipment->equipment_type_id }}">
|
||||||
<input type="hidden" name="equipmentID" value="{{ $equipment->equipment_id }}">
|
<input type="hidden" name="equipmentID" value="{{ $equipment->equipment_id }}">
|
||||||
<select class="form-control ambitsEquipments_list" name="receveAmbit" id="receveAmbit">
|
<select class="form-control ambitsEquipments_list" name="receveAmbit" id="receveAmbit">
|
||||||
</select>
|
</select>
|
||||||
<br>
|
<br>
|
||||||
<button data-dismiss="modal" class="btn btn-danger float-left ">Sair</button>
|
<button data-dismiss="modal" class="btn btn-danger float-left ">Sair</button>
|
||||||
<button class="btn btn-primary float-right" type="submit">Trocar</button>
|
<button class="btn btn-primary float-right" type="submit">Trocar</button>
|
||||||
|
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
@ -1604,17 +1583,21 @@ class="btn btn-primary float-right">Seguinte</a>
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
columns: [{
|
columns: [{
|
||||||
data: 'equipment_id',
|
data: 'ispt_number',
|
||||||
name: 'equipment_id'
|
name: 'ispt_number'
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// data: 'ispt_number',
|
|
||||||
// name: 'ispt_number'
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
data: 'equipment_tag',
|
data: 'equipment_tag',
|
||||||
name: 'equipment_tag'
|
name: 'equipment_tag'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
data: 'equipment_description',
|
||||||
|
name: 'equipment_description'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
data: 'ambit',
|
||||||
|
name: 'ambit'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
data: 'unit_id',
|
data: 'unit_id',
|
||||||
name: 'unit_id'
|
name: 'unit_id'
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@
|
||||||
@csrf
|
@csrf
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
<!-- Identificação do projecto -->
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
<label>{{ __('messages.createProject.project_identification') }}<b
|
<label>{{ __('messages.createProject.project_identification') }}<b
|
||||||
style="color:red">*</b></label>
|
style="color:red">*</b></label>
|
||||||
|
|
@ -47,6 +48,8 @@
|
||||||
placeholder="{{ __('messages.createProject.project_identification') }}…"
|
placeholder="{{ __('messages.createProject.project_identification') }}…"
|
||||||
required>
|
required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Número do Projeto ISPT -->
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
<label>{{ __('messages.createProject.ispt_project_number') }}<b
|
<label>{{ __('messages.createProject.ispt_project_number') }}<b
|
||||||
style="color:red">*</b></label>
|
style="color:red">*</b></label>
|
||||||
|
|
@ -57,6 +60,8 @@
|
||||||
</div> <!-- /Row -->
|
</div> <!-- /Row -->
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
|
<!-- Gestor de Projeto ISPT -->
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
<label>{{ __('messages.createProject.ispt_project_manager') }} <b
|
<label>{{ __('messages.createProject.ispt_project_manager') }} <b
|
||||||
style="color:red">*</b></label>
|
style="color:red">*</b></label>
|
||||||
|
|
@ -64,6 +69,8 @@
|
||||||
placeholder="{{ __('messages.createProject.ispt_project_manager') }}…"
|
placeholder="{{ __('messages.createProject.ispt_project_manager') }}…"
|
||||||
required>
|
required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Gestor de Projeto da Empresa -->
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
<label>{{ __('messages.createProject.compan_project_manager') }} <b
|
<label>{{ __('messages.createProject.compan_project_manager') }} <b
|
||||||
style="color:red">*</b></label>
|
style="color:red">*</b></label>
|
||||||
|
|
@ -75,21 +82,25 @@
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="form-group col-sm-6" id="companyField">
|
<!-- Empresa Contratante -->
|
||||||
|
<div class="form-group col-sm" id="companyField">
|
||||||
<label>{{ __('messages.createProject.select_company.contracting_company') }} <b
|
<label>{{ __('messages.createProject.select_company.contracting_company') }} <b
|
||||||
style="color:red">*</b></label>
|
style="color:red">*</b></label>
|
||||||
<select class="form-control" name="user_id" id="company_select" required>
|
<select class="form-control" name="user_id" id="company_select">
|
||||||
<option>{{ __('messages.createProject.select_plant.plant') }} ...</option>
|
<option>{{ __('messages.createProject.select_plant.plant') }} ...</option>
|
||||||
|
<option value="new_company">Criar Empresa ...</option>
|
||||||
@foreach ($companies as $company)
|
@foreach ($companies as $company)
|
||||||
<option value="{{ $company->user_id }}">{{ $company->user_name }}</option>
|
<option value="{{ $company->user_id }}">{{ $company->user_name }}</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-sm-6" id="installationField" hidden>
|
<!-- Instalação -->
|
||||||
|
<div class="form-group col-sm" id="installationField" hidden>
|
||||||
<label>{{ __('messages.createProject.select_plant.plant') }} <b
|
<label>{{ __('messages.createProject.select_plant.plant') }} <b
|
||||||
style="color:red">*</b></label>
|
style="color:red">*</b></label>
|
||||||
<select class="form-control" name="installation_id" id="installationSelect">
|
<select class="form-control" name="installation_id" id="installationSelect"
|
||||||
|
required>
|
||||||
|
|
||||||
<!-- As opções de instalação serão preenchidas dinamicamente -->
|
<!-- As opções de instalação serão preenchidas dinamicamente -->
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -97,16 +108,24 @@
|
||||||
|
|
||||||
</div> <!-- /Row -->
|
</div> <!-- /Row -->
|
||||||
|
|
||||||
|
{{-- Criar uma nova instalacao / Empresa --}}
|
||||||
<div class="row" id="new_company_div">
|
<div class="row" id="new_company_div">
|
||||||
|
{{-- Vai ser a criacao do Projecto --}}
|
||||||
|
<div class="form-group col-sm" id="new_company_input">
|
||||||
|
<label>Nova Empresa</label>
|
||||||
|
<input type="text" class="form-control" name="new_company"
|
||||||
|
placeholder="Nova Empresa…">
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-sm-6">
|
<!-- Selecionar ou criar instalacoes -->
|
||||||
|
<div class="form-group col-sm">
|
||||||
<label>{{ __('messages.createProject.select_plant.new_plant') }} :</label>
|
<label>{{ __('messages.createProject.select_plant.new_plant') }} :</label>
|
||||||
<input type="text" id="new_company_name" class="form-control"
|
<input type="text" id="new_company_name" class="form-control"
|
||||||
name="new_company_name"
|
name="new_company_name"
|
||||||
placeholder="{{ __('messages.createProject.select_plant.new_plant') }}…">
|
placeholder="{{ __('messages.createProject.select_plant.new_plant') }}…">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm">
|
||||||
<label>{{ __('messages.createProject.select_plant.plant_address') }}</label>
|
<label>{{ __('messages.createProject.select_plant.plant_address') }}</label>
|
||||||
<input type="text" class="form-control" name="new_company_address"
|
<input type="text" class="form-control" name="new_company_address"
|
||||||
placeholder="{{ __('messages.createProject.select_plant.plant_address') }}…">
|
placeholder="{{ __('messages.createProject.select_plant.plant_address') }}…">
|
||||||
|
|
@ -114,14 +133,9 @@
|
||||||
</div> <!-- /Row -->
|
</div> <!-- /Row -->
|
||||||
|
|
||||||
|
|
||||||
{{-- Verificar esta parte de Code diretamente no Projecto em HTML --}}
|
|
||||||
{{-- <div class="form-group" id="localization_installation_client">
|
|
||||||
<label>Morada Instalação</label>
|
|
||||||
<input type="text" class="form-control" placeholder="Localização" readonly>
|
|
||||||
</div> --}}
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
|
<!-- Número do Projeto da Empresa -->
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
<label>{{ __('messages.createProject.company_project_number') }}<b
|
<label>{{ __('messages.createProject.company_project_number') }}<b
|
||||||
style="color:red">*</b></label>
|
style="color:red">*</b></label>
|
||||||
|
|
@ -130,7 +144,7 @@
|
||||||
required>
|
required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Date -->
|
<!-- Data de Início do Projeto -->
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
<label>{{ __('messages.createProject.project_start_date') }} : <b
|
<label>{{ __('messages.createProject.project_start_date') }} : <b
|
||||||
style="color:red">*</b></label>
|
style="color:red">*</b></label>
|
||||||
|
|
@ -160,7 +174,7 @@ class="btn btn-primary">{{ __('messages.buttons.save') }}</button>
|
||||||
|
|
||||||
|
|
||||||
{{-- Verificar se realmente tem funcionalidade ir para a segunda parte a partir daqui, lembrando que se tirar do argumento vai dar erro, pois para a route :2 espera receber um ID --}}
|
{{-- Verificar se realmente tem funcionalidade ir para a segunda parte a partir daqui, lembrando que se tirar do argumento vai dar erro, pois para a route :2 espera receber um ID --}}
|
||||||
{{-- <a href="{{ route('test2') }}" class="btn btn-primary next float-right">Next</a> --}}
|
{{-- <a href="{{ route('articulated_2') }}" class="btn btn-primary next float-right">Next</a> --}}
|
||||||
|
|
||||||
{{-- /.card card-primary --}}
|
{{-- /.card card-primary --}}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
@ -168,10 +182,11 @@ class="btn btn-primary">{{ __('messages.buttons.save') }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
{{-- <script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
var installationsData; // Esta variável irá armazenar as informações das instalações
|
var installationsData; // Esta variável irá armazenar as informações das instalações
|
||||||
|
|
||||||
$('#company_select').change(function() {
|
$('#company_select').change(function() {
|
||||||
var user_id = $(this).val();
|
var user_id = $(this).val();
|
||||||
|
|
||||||
|
|
@ -207,16 +222,143 @@ class="btn btn-primary">{{ __('messages.buttons.save') }}</button>
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
// Adicione este código para lidar com a mudança na seleção da instalação
|
// Adicione este código para lidar com a mudança na seleção da instalação
|
||||||
|
// $('#installationSelect').change(function() {
|
||||||
|
|
||||||
|
// var selectedValue = $(this).val();
|
||||||
|
|
||||||
|
// if (this.value == 'new_install') {
|
||||||
|
// $('#new_company_div').show();
|
||||||
|
// $('#localization_installation_client').hide();
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// $('#new_company_div').hide();
|
||||||
|
// $('#localization_installation_client').show();
|
||||||
|
|
||||||
|
// if (this.value == '#') {
|
||||||
|
// $('#new_company_div').hide();
|
||||||
|
// $('#localization_installation_client').hide();
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // Verifique se installationsData está definido
|
||||||
|
// if (installationsData) {
|
||||||
|
// // Encontre a instalação selecionada nos dados da instalação
|
||||||
|
// var selectedInstallation = installationsData.find(function(installation) {
|
||||||
|
// return installation.plant_id == this.value;
|
||||||
|
// }.bind(this));
|
||||||
|
|
||||||
|
// if (selectedInstallation) {
|
||||||
|
// // Preencha o valor do campo de endereço com o endereço da instalação selecionada
|
||||||
|
// $('#localization_installation_client input').val(selectedInstallation
|
||||||
|
// .plant_address);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
$('#installationSelect').change(function() {
|
$('#installationSelect').change(function() {
|
||||||
if (this.value == 'new_install') {
|
var selectedValue = $(this).val();
|
||||||
|
|
||||||
|
// Esconde os campos por padrão
|
||||||
|
$('#new_company_div').hide();
|
||||||
|
$('#localization_installation_client').hide();
|
||||||
|
$('#new_company_input')
|
||||||
|
.show(); // Mostra por padrão, será escondido conforme condição abaixo
|
||||||
|
|
||||||
|
if (selectedValue == 'new_install') {
|
||||||
|
$('#new_company_div').show(); // Mostra a div com os inputs
|
||||||
|
$('#new_company_input').hide(); // Esconde o input para nova empresa
|
||||||
|
$('#localization_installation_client').hide(); // Esconde outro conteúdo
|
||||||
|
} else if (selectedValue != '#') {
|
||||||
|
$('#localization_installation_client')
|
||||||
|
.show(); // Mostra conteúdo relacionado a instalação existente
|
||||||
|
}
|
||||||
|
|
||||||
|
// Verifique se installationsData está definido
|
||||||
|
if (installationsData) {
|
||||||
|
// Encontre a instalação selecionada nos dados da instalação
|
||||||
|
var selectedInstallation = installationsData.find(function(installation) {
|
||||||
|
return installation.plant_id == selectedValue;
|
||||||
|
});
|
||||||
|
|
||||||
|
if (selectedInstallation) {
|
||||||
|
// Preencha o valor do campo de endereço com o endereço da instalação selecionada
|
||||||
|
$('#localization_installation_client input').val(selectedInstallation
|
||||||
|
.plant_address);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$('#localization_installation_client').hide();
|
||||||
|
$('#new_company_div').hide();
|
||||||
|
});
|
||||||
|
</script> --}}
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
// Esconde os elementos no carregamento da página
|
||||||
|
$('#localization_installation_client').hide();
|
||||||
|
$('#new_company_div').hide();
|
||||||
|
$('#installationField').attr('hidden', 'hidden');
|
||||||
|
|
||||||
|
$('#company_select').change(function() {
|
||||||
|
var user_id = $(this).val();
|
||||||
|
|
||||||
|
// Se a seleção é 'Criar Empresa ...'
|
||||||
|
if (user_id === 'new_company') {
|
||||||
$('#new_company_div').show();
|
$('#new_company_div').show();
|
||||||
|
$('#installationField').attr('hidden', 'hidden');
|
||||||
$('#localization_installation_client').hide();
|
$('#localization_installation_client').hide();
|
||||||
return;
|
return;
|
||||||
|
} else {
|
||||||
|
$('#new_company_div').hide();
|
||||||
}
|
}
|
||||||
$('#new_company_div').hide();
|
|
||||||
$('#localization_installation_client').show();
|
|
||||||
|
|
||||||
if (this.value == '#') {
|
// Se a seleção é o placeholder ou '#'
|
||||||
|
if (user_id == '#' || user_id === '') {
|
||||||
|
$('#installationField').attr('hidden', 'hidden');
|
||||||
|
$('#localization_installation_client').hide();
|
||||||
|
$('#new_company_div').hide();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$.get('/api/installations?user_id=' + user_id, function(data) {
|
||||||
|
var select = $('#installationSelect');
|
||||||
|
select.empty();
|
||||||
|
|
||||||
|
// Adicione as opções fixas aqui
|
||||||
|
select.append('<option value="#">Selecione uma instalação...</option>');
|
||||||
|
select.append(
|
||||||
|
'<option value="new_install">Criar uma nova Instalação ?</option>');
|
||||||
|
|
||||||
|
// Agora você pode adicionar suas opções dinâmicas.
|
||||||
|
$.each(data, function(index, installation) {
|
||||||
|
select.append('<option value="' + installation.plant_id + '">' +
|
||||||
|
installation.plant_name + '</option>');
|
||||||
|
});
|
||||||
|
|
||||||
|
// Armazene os dados em installationsData
|
||||||
|
installationsData = data;
|
||||||
|
|
||||||
|
$('#installationField').removeAttr('hidden');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#installationSelect').change(function() {
|
||||||
|
var selectedValue = $(this).val();
|
||||||
|
|
||||||
|
if (selectedValue == 'new_install') {
|
||||||
|
$('#new_company_div').show();
|
||||||
|
$('#localization_installation_client').hide();
|
||||||
|
$('#new_company_input').hide(); // Esconde o input para nova empresa
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
$('#new_company_div').hide();
|
||||||
|
$('#localization_installation_client').show();
|
||||||
|
$('#new_company_input').show(); // Mostra o input para nova empresa
|
||||||
|
}
|
||||||
|
|
||||||
|
if (selectedValue == '#' || selectedValue === '') {
|
||||||
$('#new_company_div').hide();
|
$('#new_company_div').hide();
|
||||||
$('#localization_installation_client').hide();
|
$('#localization_installation_client').hide();
|
||||||
return;
|
return;
|
||||||
|
|
@ -226,8 +368,8 @@ class="btn btn-primary">{{ __('messages.buttons.save') }}</button>
|
||||||
if (installationsData) {
|
if (installationsData) {
|
||||||
// Encontre a instalação selecionada nos dados da instalação
|
// Encontre a instalação selecionada nos dados da instalação
|
||||||
var selectedInstallation = installationsData.find(function(installation) {
|
var selectedInstallation = installationsData.find(function(installation) {
|
||||||
return installation.plant_id == this.value;
|
return installation.plant_id == selectedValue;
|
||||||
}.bind(this));
|
});
|
||||||
|
|
||||||
if (selectedInstallation) {
|
if (selectedInstallation) {
|
||||||
// Preencha o valor do campo de endereço com o endereço da instalação selecionada
|
// Preencha o valor do campo de endereço com o endereço da instalação selecionada
|
||||||
|
|
@ -236,9 +378,6 @@ class="btn btn-primary">{{ __('messages.buttons.save') }}</button>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#localization_installation_client').hide();
|
|
||||||
$('#new_company_div').hide();
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,9 @@
|
||||||
<form method="POST" action="{{ route('processStep1') }}" id="idDoFormulario">
|
<form method="POST" action="{{ route('processStep1') }}" id="idDoFormulario">
|
||||||
|
|
||||||
@csrf
|
@csrf
|
||||||
|
|
||||||
|
<input type="hidden" name="projectId" value="{{$projects->company_projects_id}}">
|
||||||
|
<input type="hidden" name="statusProject" value="edit">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
<label>Descrição da obra</label>
|
<label>Descrição da obra</label>
|
||||||
|
|
@ -61,20 +64,20 @@
|
||||||
|
|
||||||
<div class="form-group col-sm-6" id="companyField">
|
<div class="form-group col-sm-6" id="companyField">
|
||||||
<label>Empresa Obra</label>
|
<label>Empresa Obra</label>
|
||||||
{{-- <input type="text" name="user_id" class="form-control" value="{{$projects->user-}}" readonly> --}}
|
<input type="text" name="user_id" class="form-control" value="{{$projects->userName}}" readonly>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-sm-6" id="">
|
<div class="form-group col-sm-6" id="">
|
||||||
<label>Instalação Obra</label>
|
<label>Instalação Obra</label>
|
||||||
<input type="text" name="plant_id_present" class="form-control"
|
<input type="text" name="plant_id_present" class="form-control"
|
||||||
value="{{ $projects->plant_id }}" readonly>
|
value="{{ $projects->plantName }}" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
{{-- <div class="row">
|
||||||
|
|
||||||
<div class="form-group col-sm-6" id="companyField">
|
<div class="form-group col-sm-6" id="companyField">
|
||||||
<label>Empresa Nova </label>
|
<label>Empresa Nova </label>
|
||||||
|
|
@ -94,7 +97,7 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div> --}}
|
||||||
|
|
||||||
<div class="row" id="new_company_div">
|
<div class="row" id="new_company_div">
|
||||||
|
|
||||||
|
|
@ -135,7 +138,7 @@
|
||||||
<i class="far fa-calendar-alt"></i>
|
<i class="far fa-calendar-alt"></i>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text"
|
<input type="text" class="form-control "
|
||||||
value="{{ \Carbon\Carbon::parse($projects->date_started)->format('d/m/Y') }}"
|
value="{{ \Carbon\Carbon::parse($projects->date_started)->format('d/m/Y') }}"
|
||||||
readonly>
|
readonly>
|
||||||
<input type="hidden" name="date_started_present"
|
<input type="hidden" name="date_started_present"
|
||||||
|
|
@ -173,7 +176,7 @@ class="form-control float-right">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{-- /.card card-primary --}}
|
{{-- /.card card-primary --}}
|
||||||
<a href="{{ route('test2', ['id' => $projects]) }}" class="btn btn-primary next float-right">Seguinte</a>
|
<a href="{{ route('articulated_2', ['id' => $projects]) }}" class="btn btn-primary next float-right">Seguinte</a>
|
||||||
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
@extends('Templates/templateAdmin')
|
||||||
|
|
||||||
|
@section('Main-content')
|
||||||
|
<fieldset class="content">
|
||||||
|
<div class="container-fluid">
|
||||||
|
|
||||||
|
<div class="card card-primary">
|
||||||
|
<div class="card-header ">
|
||||||
|
<h3 class="float-left">{{ $detailsProject->company_project_description }}</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="card card-danger">
|
||||||
|
<div class="card-header d-flex justify-content-center align-items-center">
|
||||||
|
<h3 class="mb-0">Ambito</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
|
{{-- @foreach ($collection as $item) --}}
|
||||||
|
<div class="card success">
|
||||||
|
<div class="card-header">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm float-left">Tarefa Elementar</div>
|
||||||
|
<div class="col-sm float-right">Tempo/Finalizar Tarefa</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{-- @endforeach --}}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- ./card-body -->
|
||||||
|
</div>
|
||||||
|
<!-- ./card-danger -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- ./card-body -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- ./card card-primary -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
@endsection
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
<div class="card card-primary">
|
<div class="card card-primary">
|
||||||
<div class="card-header "> <!-- Flex container with spaced between items -->
|
<div class="card-header "> <!-- Flex container with spaced between items -->
|
||||||
<h3 class="float-left">Numero ispt</h3> <!-- This item will be on the left -->
|
<h3 class="float-left">Tag : </h3> <!-- This item will be on the left -->
|
||||||
<h3 class="float-right">{{ $dataEquipment->equipment_tag }}</h3> <!-- This item will be on the right -->
|
<h3 class="float-right">{{ $dataEquipment->equipment_tag }}</h3> <!-- This item will be on the right -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -54,8 +54,8 @@
|
||||||
<div class="form-group col">
|
<div class="form-group col">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-tagEquipment">
|
<span class="input-group-text" id="form-tagEquipment">
|
||||||
<i class="fa-sharp fa-solid fa-tag"
|
<i class="fa-sharp fa-solid fa-tag" style="color: #00B0EA;"
|
||||||
style="color: #00B0EA;"></i>
|
data-toggle="tooltip" title="TAG"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="tag"
|
<input type="text" name="tag"
|
||||||
value="{{ $dataEquipment->equipment_tag }}"
|
value="{{ $dataEquipment->equipment_tag }}"
|
||||||
|
|
@ -69,7 +69,7 @@ class="form-control" id="equipmentTag" placeholder="Tag..."
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-equipmentDescription">
|
<span class="input-group-text" id="form-equipmentDescription">
|
||||||
<i class="fa-sharp fa-regular fa-newspaper"
|
<i class="fa-sharp fa-regular fa-newspaper"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;" data-toggle="tooltip" title="Descrição"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="equipmentDescription"
|
<input type="text" name="equipmentDescription"
|
||||||
value="{{ $dataEquipment->equipment_description }}"
|
value="{{ $dataEquipment->equipment_description }}"
|
||||||
|
|
@ -88,7 +88,8 @@ class="form-control" id="equipmentDescription"
|
||||||
<div class="form-group col">
|
<div class="form-group col">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-serialNumberEquipment">
|
<span class="input-group-text" id="form-serialNumberEquipment">
|
||||||
<i class="fa-solid fa-barcode" style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-barcode"
|
||||||
|
style="color: #00B0EA;" 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="{{ $dataEquipment->equipment_serial_number }}"
|
||||||
|
|
@ -103,7 +104,7 @@ class="form-control card_inputs" id="equipmentSerialNumber"
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-equipmentBrand">
|
<span class="input-group-text" id="form-equipmentBrand">
|
||||||
<i class="fa-solid fa-object-group"
|
<i class="fa-solid fa-object-group"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;" data-toggle="tooltip" title="Marca"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="equipmentBrand"
|
<input type="text" name="equipmentBrand"
|
||||||
value="{{ $dataEquipment->equipment_brand }}"
|
value="{{ $dataEquipment->equipment_brand }}"
|
||||||
|
|
@ -116,7 +117,8 @@ class="form-control card_inputs" id="equipmentBrand"
|
||||||
<div class="form-group col">
|
<div class="form-group col">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-equipmentModel">
|
<span class="input-group-text" id="form-equipmentModel">
|
||||||
<i class="fa-solid fa-cubes" style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-cubes"
|
||||||
|
style="color: #00B0EA;" data-toggle="tooltip" title="Modelo"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="equipmentModel"
|
<input type="text" name="equipmentModel"
|
||||||
value="{{ $dataEquipment->equipment_model }}"
|
value="{{ $dataEquipment->equipment_model }}"
|
||||||
|
|
@ -134,7 +136,8 @@ class="form-control card_inputs" id="equipmentModel"
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-dimension">
|
<span class="input-group-text" id="form-dimension">
|
||||||
<i class="fa-solid fa-ruler " style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-ruler "
|
||||||
|
style="color: #00B0EA;" data-toggle="tooltip" title="Dimensão"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[8]"
|
<input type="text" name="attributes[8]"
|
||||||
class="form-control card_inputs" id="dimension"
|
class="form-control card_inputs" id="dimension"
|
||||||
|
|
@ -149,7 +152,7 @@ class="form-control card_inputs" id="dimension"
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-rating">
|
<span class="input-group-text" id="form-rating">
|
||||||
<i class="fa-solid fa-ranking-star"
|
<i class="fa-solid fa-ranking-star"
|
||||||
style="color: #00B0EA;"></i>
|
style="color: #00B0EA;"data-toggle="tooltip" title="Rating"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[17]"
|
<input type="text" name="attributes[17]"
|
||||||
class="form-control card_inputs" id="rating"
|
class="form-control card_inputs" id="rating"
|
||||||
|
|
@ -163,7 +166,8 @@ class="form-control card_inputs" id="rating"
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-dim_certa">
|
<span class="input-group-text" id="form-dim_certa">
|
||||||
<i class="fa-sharp fa-regular fa-square-poll-vertical"></i>
|
<i class="fa-solid fa-ruler-vertical"
|
||||||
|
style="color: #00B0EA;" data-toggle="tooltip" title="Dim certa"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[10]"
|
<input type="text" name="attributes[10]"
|
||||||
class="form-control card_inputs" id="dim_certa"
|
class="form-control card_inputs" id="dim_certa"
|
||||||
|
|
@ -181,7 +185,7 @@ class="form-control card_inputs" id="dim_certa"
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-main_equipment">
|
<span class="input-group-text" id="form-main_equipment">
|
||||||
<i class="fa-solid fa-cubes" style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-sliders" style="color: #00B0EA;" data-toggle="tooltip" title="Main Equipment"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[18]"
|
<input type="text" name="attributes[18]"
|
||||||
class="form-control card_inputs" id="main_equipment"
|
class="form-control card_inputs" id="main_equipment"
|
||||||
|
|
@ -193,7 +197,8 @@ class="form-control card_inputs" id="main_equipment"
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-p&id">
|
<span class="input-group-text" id="form-p&id">
|
||||||
<i class="fa-solid fa-cubes" style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-map-location-dot"
|
||||||
|
style="color: #00B0EA;" data-toggle="tooltip" title="P&ID"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[11]"
|
<input type="text" name="attributes[11]"
|
||||||
class="form-control card_inputs" id="p&id"
|
class="form-control card_inputs" id="p&id"
|
||||||
|
|
@ -205,7 +210,8 @@ class="form-control card_inputs" id="p&id"
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-sap_number">
|
<span class="input-group-text" id="form-sap_number">
|
||||||
<i class="fa-solid fa-cubes" style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-hashtag"
|
||||||
|
style="color: #00B0EA;" data-toggle="tooltip" title="Número Sap"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[12]"
|
<input type="text" name="attributes[12]"
|
||||||
class="form-control card_inputs" id="sap_number"
|
class="form-control card_inputs" id="sap_number"
|
||||||
|
|
@ -222,7 +228,8 @@ class="form-control card_inputs" id="sap_number"
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-SP_(Bar)_Cold">
|
<span class="input-group-text" id="form-SP_(Bar)_Cold">
|
||||||
<i class="fa-solid fa-cubes" style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-signal"
|
||||||
|
style="color: #00B0EA;" data-toggle="tooltip" title="SP(Bar)"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[19]"
|
<input type="text" name="attributes[19]"
|
||||||
class="form-control card_inputs" id="SP_(Bar)_Cold"
|
class="form-control card_inputs" id="SP_(Bar)_Cold"
|
||||||
|
|
@ -234,7 +241,8 @@ class="form-control card_inputs" id="SP_(Bar)_Cold"
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-Back_Presure_(Bar)">
|
<span class="input-group-text" id="form-Back_Presure_(Bar)">
|
||||||
<i class="fa-solid fa-cubes" style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-stopwatch"
|
||||||
|
style="color: #00B0EA;" data-toggle="tooltip" title="Back_Presure_(Bar)"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[20]"
|
<input type="text" name="attributes[20]"
|
||||||
class="form-control card_inputs" id="Back_Presure_(Bar)"
|
class="form-control card_inputs" id="Back_Presure_(Bar)"
|
||||||
|
|
@ -247,7 +255,8 @@ class="form-control card_inputs" id="Back_Presure_(Bar)"
|
||||||
<div class="form-group col-sm-4">
|
<div class="form-group col-sm-4">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-material">
|
<span class="input-group-text" id="form-material">
|
||||||
<i class="fa-solid fa-cubes" style="color: #00B0EA;"></i>
|
<i class="fa-brands fa-codepen"
|
||||||
|
style="color: #00B0EA;" data-toggle="tooltip" title="Material"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<input type="text" name="attributes[21]"
|
<input type="text" name="attributes[21]"
|
||||||
|
|
@ -265,7 +274,8 @@ class="form-control card_inputs" id="material"
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-manufacturer">
|
<span class="input-group-text" id="form-manufacturer">
|
||||||
<i class="fa-solid fa-cubes" style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-building"
|
||||||
|
style="color: #00B0EA;" data-toggle="tooltip" title="Fabricante" ></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[22]"
|
<input type="text" name="attributes[22]"
|
||||||
class="form-control card_inputs" id="manufacturer"
|
class="form-control card_inputs" id="manufacturer"
|
||||||
|
|
@ -277,7 +287,8 @@ class="form-control card_inputs" id="manufacturer"
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-isolation">
|
<span class="input-group-text" id="form-isolation">
|
||||||
<i class="fa-solid fa-cubes" style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-lock"
|
||||||
|
style="color: #00B0EA;" data-toggle="tooltip" title="Isolamento"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[13]"
|
<input type="text" name="attributes[13]"
|
||||||
class="form-control card_inputs" id="isolation"
|
class="form-control card_inputs" id="isolation"
|
||||||
|
|
@ -294,7 +305,8 @@ class="form-control card_inputs" id="isolation"
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text">
|
<span class="input-group-text">
|
||||||
<i class="fa-solid fa-cubes" style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-stairs"
|
||||||
|
style="color: #00B0EA;" data-toggle="tooltip" title="Andaime"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[23]"
|
<input type="text" name="attributes[23]"
|
||||||
class="form-control card_inputs" id="Scaffold"
|
class="form-control card_inputs" id="Scaffold"
|
||||||
|
|
@ -306,7 +318,8 @@ class="form-control card_inputs" id="Scaffold"
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text">
|
<span class="input-group-text">
|
||||||
<i class="fa-solid fa-cubes" style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-truck-arrow-right"
|
||||||
|
style="color: #00B0EA;" data-toggle="tooltip" title="Grua"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<input type="text" name="attributes[24]"
|
<input type="text" name="attributes[24]"
|
||||||
|
|
@ -318,12 +331,8 @@ class="form-control card_inputs" id="Crane"
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{-- ./row --}}
|
{{-- ./row --}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- /.card-body -->
|
<!-- /.card-body -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{{-- ./PSV-card --}}
|
{{-- ./PSV-card --}}
|
||||||
@endif
|
@endif
|
||||||
|
|
@ -1156,7 +1165,8 @@ class="form-control card_inputs" id="Back_Presure_(Bar)"
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-attributes[21]text"
|
<span class="input-group-attributes[21]text"
|
||||||
id="form-material">
|
id="form-material">
|
||||||
<i class="fa-solid fa-cubes" style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-cubes"
|
||||||
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name=""
|
<input type="text" name=""
|
||||||
class="form-control card_inputs" id="material"
|
class="form-control card_inputs" id="material"
|
||||||
|
|
@ -1173,7 +1183,8 @@ class="form-control card_inputs" id="material"
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-manufacturer">
|
<span class="input-group-text" id="form-manufacturer">
|
||||||
<i class="fa-solid fa-cubes" style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-cubes"
|
||||||
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[22]"
|
<input type="text" name="attributes[22]"
|
||||||
class="form-control card_inputs" id="manufacturer"
|
class="form-control card_inputs" id="manufacturer"
|
||||||
|
|
@ -1185,7 +1196,8 @@ class="form-control card_inputs" id="manufacturer"
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text" id="form-isolation">
|
<span class="input-group-text" id="form-isolation">
|
||||||
<i class="fa-solid fa-cubes" style="color: #00B0EA;"></i>
|
<i class="fa-solid fa-cubes"
|
||||||
|
style="color: #00B0EA;"></i>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" name="attributes[13]"
|
<input type="text" name="attributes[13]"
|
||||||
class="form-control card_inputs" id="isolation"
|
class="form-control card_inputs" id="isolation"
|
||||||
|
|
@ -1239,11 +1251,64 @@ class="btn btn-primary float-right">Guardar</a>
|
||||||
|
|
||||||
<div class="tab-pane fade pt-1" id="history-equipment">
|
<div class="tab-pane fade pt-1" id="history-equipment">
|
||||||
|
|
||||||
<div id="isv_card" class="card card-primary specificAttributes-div">
|
@foreach ($receiveAlldetailsEquipmentWorkHistory as $detailsEquipmentWorkHistory)
|
||||||
<h1>Teste de Histórico</h1>
|
|
||||||
</div>
|
{{-- ./PSV-card --}}
|
||||||
|
@if ($dataEquipment->equipment_type_id == 3)
|
||||||
|
<div id="psv_card" class="card card-secondary specificAttributes-div">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title">Histórico</h3>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header" style="background-color: #EAF3F6;">
|
||||||
|
|
||||||
|
<div class="row align-items-center">
|
||||||
|
|
||||||
|
<div class="col-sm ">
|
||||||
|
<h5 class="float-left"><b>{{$detailsEquipmentWorkHistory->nameCompanyProject}}</b>
|
||||||
|
</h5>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-sm">
|
||||||
|
<h5 class="float-right"><b>{{$detailsEquipmentWorkHistory->date_started}}</b>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row align-items-center">
|
||||||
|
|
||||||
|
<div class="col-sm ">
|
||||||
|
<p>{{$detailsEquipmentWorkHistory->ambitDetals}}</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm">
|
||||||
|
<p>Tempo/ Reparação</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm">
|
||||||
|
<a class="btn btn-success float-right" href="{{ route('showAmbitDetailsProjectHistory', ['projectID' => $detailsEquipmentWorkHistory->company_projects_id, 'equipmentID' => $dataEquipment->equipment_id ]) }}">Mais Detalhes</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- ./card-->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
<!-- Script para funcionar corretamente o tooltip, para qualquer tipo de aparelho de visualizacao -->
|
||||||
|
<script>
|
||||||
|
$(function() {
|
||||||
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
|
||||||
|
|
@ -230,7 +230,7 @@ class="fas fa-plus"></i>
|
||||||
{{-- ./card-body --}}
|
{{-- ./card-body --}}
|
||||||
</div>
|
</div>
|
||||||
<!-- ./Card card-primary -->
|
<!-- ./Card card-primary -->
|
||||||
<a href="{{ route('test2', ['id' => $numberProject]) }}"
|
<a href="{{ route('articulated_2', ['id' => $numberProject]) }}"
|
||||||
class="btn btn-primary previous float-left">Anterior</a>
|
class="btn btn-primary previous float-left">Anterior</a>
|
||||||
|
|
||||||
<form action="{{ route('finishCreatingProject', ['numberProject' => $numberProject]) }}">
|
<form action="{{ route('finishCreatingProject', ['numberProject' => $numberProject]) }}">
|
||||||
|
|
|
||||||
|
|
@ -86,17 +86,39 @@
|
||||||
} */
|
} */
|
||||||
|
|
||||||
|
|
||||||
.footer {
|
/* .footer {
|
||||||
width: 97%;
|
width: 97%;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
background-color: #09255C;
|
background-color: #09255C;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
} */
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
display: flex;
|
||||||
|
/* Utiliza o flexbox para o layout */
|
||||||
|
justify-content: space-between;
|
||||||
|
/* Distribui o espaço igualmente entre os elementos */
|
||||||
|
align-items: center;
|
||||||
|
/* Centraliza os elementos verticalmente */
|
||||||
|
width: auto;
|
||||||
|
/* Utiliza toda a largura disponível */
|
||||||
|
padding: 1rem;
|
||||||
|
/* Adiciona um padding para espaço interno */
|
||||||
|
background-color: #09255C;
|
||||||
|
/* Cor de fundo */
|
||||||
|
color: #fff;
|
||||||
|
/* Cor do texto */
|
||||||
}
|
}
|
||||||
|
|
||||||
.last-footer {
|
.footer-item:first-child {
|
||||||
color:#09255C;
|
margin-right: 30%
|
||||||
|
/* Alinha o primeiro item à esquerda */
|
||||||
|
}
|
||||||
|
.footer-item:last-child {
|
||||||
|
margin-left: 30%;
|
||||||
|
/* Alinha o último item à direita */
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
@ -104,95 +126,93 @@
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
{{-- <div class="margin-top">
|
@php $page = 1; @endphp
|
||||||
|
@php $count = 0; @endphp
|
||||||
<div class="navBar-box">
|
@foreach ($equipmentDetails as $equipmentDetail)
|
||||||
|
@if ($count % 25 == 0)
|
||||||
<div class="box">
|
@if ($count != 0)
|
||||||
<img class="header-img"
|
</table>
|
||||||
src="{{ public_path('/img/ispt/4.0/Ispt4.0_Símbolo_Fundo_Azul-Marinho@2x-100.jpg') }}"
|
{{-- <div class="footer last-footer" style="color:#fff">ISPT 4.0 - - Página {{ $page++ }}</div> --}}
|
||||||
alt="Logo Esquerdo">
|
<div class="footer">
|
||||||
</div>
|
<span class="footer-item">{{ $dataFormatada }}</span>
|
||||||
<div class="box box-text">{{ $dataAmbit->ambits_description }}</div>
|
<span class="footer-item">{{ $detalsProject->company_project_description }}</span>
|
||||||
<div class="box last-box">
|
<span class="footer-item">ISPT 4.0 - - Página {{ $page++ }}</span>
|
||||||
<img class="header-img" src="{{ $userLogoPath }}" alt="User Logo">
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<table class="navBar">
|
|
||||||
@php $count = 0; @endphp
|
|
||||||
@foreach ($equipmentDetails as $equipmentDetail)
|
|
||||||
@if ($count % 23 == 0)
|
|
||||||
@if ($count != 0)
|
|
||||||
</table>
|
|
||||||
<div style="page-break-after: always;"></div>
|
|
||||||
@endif
|
|
||||||
<table class="navBar">
|
|
||||||
<tr class="titles">
|
|
||||||
<th>Nº ISPT</th>
|
|
||||||
<th>Unidade</th>
|
|
||||||
<th>Tag Nº</th>
|
|
||||||
</tr>
|
|
||||||
@endif
|
@endif
|
||||||
<tr class="items">
|
<div class="navBar-box">
|
||||||
<td>{{ $equipmentDetail->equipment_id }}</td>
|
|
||||||
<td>{{ $equipmentDetail->unit_id }}</td>
|
|
||||||
<td>{{ $equipmentDetail->equipment_tag }}</td>
|
|
||||||
</tr>
|
|
||||||
@php $count++; @endphp
|
|
||||||
@endforeach
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
<div class="box">
|
||||||
|
<img class="header-img"
|
||||||
|
src="{{ public_path('/img/ispt/4.0/Ispt4.0_Símbolo_Fundo_Azul-Marinho@2x-100.jpg') }}"
|
||||||
|
alt="Logo Esquerdo">
|
||||||
|
</div>
|
||||||
|
<div class="box box-text">{{ $dataAmbit->ambits_description }}</div>
|
||||||
|
<div class="box last-box">
|
||||||
|
<img class="header-img" src="{{ $userLogoPath }}" alt="User Logo">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<table class="navBar">
|
||||||
|
<tr class="titles">
|
||||||
|
<th>Nº ISPT</th>
|
||||||
|
<th>Unidade</th>
|
||||||
|
<th>Tag Nº</th>
|
||||||
|
<th>Dim</th>
|
||||||
|
<th>#(Classe)</th>
|
||||||
|
<th>DN</th>
|
||||||
|
<th>P&ID</th>
|
||||||
|
<th>Observacoes</th>
|
||||||
|
<th>Andaime</th>
|
||||||
|
<th>Isolamento</th>
|
||||||
|
<th>Grua</th>
|
||||||
|
<th>Concluido</th>
|
||||||
|
</tr>
|
||||||
|
@endif
|
||||||
|
<tr class="items">
|
||||||
|
<td>{{ $equipmentDetail->equipment_id }}</td>
|
||||||
|
<td>{{ $equipmentDetail->unit_id }}</td>
|
||||||
|
<td>{{ $equipmentDetail->equipment_tag }}</td>
|
||||||
|
|
||||||
|
<td>{{ $equipmentDetail->equipment_tag }}</td>
|
||||||
|
<td>{{ $equipmentDetail->equipment_tag }}</td>
|
||||||
|
<td>{{ $equipmentDetail->equipment_tag }}</td>
|
||||||
|
<td>{{ $equipmentDetail->equipment_tag }}</td>
|
||||||
|
<td>{{ $equipmentDetail->equipment_tag }}</td>
|
||||||
|
<td>{{ $equipmentDetail->equipment_tag }}</td>
|
||||||
|
<td>{{ $equipmentDetail->equipment_tag }}</td>
|
||||||
|
<td>{{ $equipmentDetail->equipment_tag }}</td>
|
||||||
|
<td>{{ $equipmentDetail->equipment_tag }}</td>
|
||||||
|
</tr>
|
||||||
|
@php $count++; @endphp
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
{{-- Adicionando linhas em branco para completar a tabela até 25 linhas --}}
|
||||||
|
@while ($count % 23 != 0)
|
||||||
|
<tr class="items">
|
||||||
|
<td> </td> {{-- Espaço em branco --}}
|
||||||
|
<td> </td> {{-- Espaço em branco --}}
|
||||||
|
<td> </td> {{-- Espaço em branco --}}
|
||||||
|
|
||||||
|
<td> </td> {{-- Espaço em branco --}}
|
||||||
|
<td> </td> {{-- Espaço em branco --}}
|
||||||
|
<td> </td> {{-- Espaço em branco --}}
|
||||||
|
<td> </td> {{-- Espaço em branco --}}
|
||||||
|
<td> </td> {{-- Espaço em branco --}}
|
||||||
|
<td> </td> {{-- Espaço em branco --}}
|
||||||
|
<td> </td> {{-- Espaço em branco --}}
|
||||||
|
<td> </td> {{-- Espaço em branco --}}
|
||||||
|
<td> </td> {{-- Espaço em branco --}}
|
||||||
|
</tr>
|
||||||
|
@php $count++; @endphp
|
||||||
|
@endwhile
|
||||||
|
|
||||||
|
</table>
|
||||||
|
<div class="footer">
|
||||||
|
<span class="footer-item">{{ $dataFormatada }}</span>
|
||||||
|
<span class="footer-item">{{ $detalsProject->company_project_description }}</span>
|
||||||
|
<span class="footer-item">ISPT 4.0 - - Página {{ $page++ }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="footer">
|
</body>
|
||||||
<div>ISPT 4.0</div>
|
|
||||||
<div>Paginacao</div>
|
|
||||||
</div> --}}
|
|
||||||
|
|
||||||
<body>
|
|
||||||
@php $page = 1; @endphp
|
|
||||||
@php $count = 0; @endphp
|
|
||||||
@foreach ($equipmentDetails as $equipmentDetail)
|
|
||||||
@if ($count % 25 == 0)
|
|
||||||
@if ($count != 0)
|
|
||||||
</table>
|
|
||||||
<div class="footer">ISPT 4.0 - - Página {{ $page++ }}</div>
|
|
||||||
@endif
|
|
||||||
<div class="navBar-box">
|
|
||||||
|
|
||||||
<div class="box">
|
|
||||||
<img class="header-img"
|
|
||||||
src="{{ public_path('/img/ispt/4.0/Ispt4.0_Símbolo_Fundo_Azul-Marinho@2x-100.jpg') }}"
|
|
||||||
alt="Logo Esquerdo">
|
|
||||||
</div>
|
|
||||||
<div class="box box-text">{{ $dataAmbit->ambits_description }}</div>
|
|
||||||
<div class="box last-box">
|
|
||||||
<img class="header-img" src="{{ $userLogoPath }}" alt="User Logo">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<table class="navBar">
|
|
||||||
<tr class="titles">
|
|
||||||
<th>Nº ISPT</th>
|
|
||||||
<th>Unidade</th>
|
|
||||||
<th>Tag Nº</th>
|
|
||||||
</tr>
|
|
||||||
@endif
|
|
||||||
<tr class="items">
|
|
||||||
<td>{{ $equipmentDetail->equipment_id }}</td>
|
|
||||||
<td>{{ $equipmentDetail->unit_id }}</td>
|
|
||||||
<td>{{ $equipmentDetail->equipment_tag }}</td>
|
|
||||||
</tr>
|
|
||||||
@php $count++; @endphp
|
|
||||||
@endforeach
|
|
||||||
</table>
|
|
||||||
{{-- <div class="footer last-footer">ISPT 4.0 - - Ultima Página</div> --}}
|
|
||||||
<div class="footer last-footer">ISPT 4.0 - - Página {{ $page++ }}</div>
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,8 @@
|
||||||
<!--./card-header-->
|
<!--./card-header-->
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
|
||||||
|
<input type="hidden" id="clientID" name="clientID" value="{{$clientID}}">
|
||||||
|
|
||||||
<div class="row text-center">
|
<div class="row text-center">
|
||||||
|
|
||||||
<div class="col-sm" id="card-allPlantsClient">
|
<div class="col-sm" id="card-allPlantsClient">
|
||||||
|
|
@ -119,6 +121,7 @@
|
||||||
d.yearsProjects = $('#yearsProjects').val();
|
d.yearsProjects = $('#yearsProjects').val();
|
||||||
d.monthsProjects = $('#monthsProjects').val();
|
d.monthsProjects = $('#monthsProjects').val();
|
||||||
d.daysProjects = $('#daysProjects').val();
|
d.daysProjects = $('#daysProjects').val();
|
||||||
|
d.clientID = $('#clientID').val();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
columns: [{
|
columns: [{
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,92 @@
|
||||||
|
@extends('Templates/templateAdmin')
|
||||||
|
|
||||||
|
@section('Main-content')
|
||||||
|
<section class="content-header">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row mb-2">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<h1>Obras dos Clientes</h1>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<ol class="breadcrumb float-sm-right">
|
||||||
|
</li>
|
||||||
|
<li class="breadcrumb-item active"> Obras dos Clientes</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- Main content -->
|
||||||
|
<section class="content">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-md-12">
|
||||||
|
{{-- <input type="hidden" id="projectId" value="{{ $receiveDataProject->company_projects_id }}"> --}}
|
||||||
|
{{-- <input type="hidden" id="AmbitsIdString" value="{{ $AmbitsIdString }}"> --}}
|
||||||
|
|
||||||
|
<div class="card card-primary">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title">Clientes</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
|
|
||||||
|
<table id="showAllClientsForProjectReportsTable" class="table table-bordered table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Cliente</th>
|
||||||
|
<th>Qtd.Obras Concluidas</th>
|
||||||
|
<th>Visualizar</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!--card-body-->
|
||||||
|
</div>
|
||||||
|
<!-- card card-primary -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
@endsection
|
||||||
|
@section('scriptsTemplateAdmin')
|
||||||
|
<script type="text/javascript">
|
||||||
|
var dataTables;
|
||||||
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
dataTables = $('#showAllClientsForProjectReportsTable').DataTable({
|
||||||
|
responsive: true,
|
||||||
|
processing: true,
|
||||||
|
serverSide: true,
|
||||||
|
ajax: {
|
||||||
|
// Rota para obter os valores para o Yajra
|
||||||
|
url: '{{ route('showAllClientsForProjectReportsTable') }}',
|
||||||
|
type: 'GET',
|
||||||
|
data: function(d) {
|
||||||
|
// Busca diretamente o valor de um input tipo Hidden para buscar e enviar o valor do id do project atual
|
||||||
|
d.AmbitsIdString = $('#AmbitsIdString').val();
|
||||||
|
d.projectId = $('#projectId').val();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
columns: [{
|
||||||
|
data: 'client',
|
||||||
|
name: 'client'
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
data: 'amount_of_projects_completed',
|
||||||
|
name: 'amount_of_projects_completed'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
data: 'action',
|
||||||
|
name: 'action',
|
||||||
|
orderable: false,
|
||||||
|
searchable: false
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
@endsection
|
||||||
|
|
@ -25,7 +25,6 @@
|
||||||
<input type="hidden" id="projectId" value="{{ $receiveDataProject->company_projects_id }}">
|
<input type="hidden" id="projectId" value="{{ $receiveDataProject->company_projects_id }}">
|
||||||
<input type="hidden" id="AmbitsIdString" value="{{ $AmbitsIdString }}">
|
<input type="hidden" id="AmbitsIdString" value="{{ $AmbitsIdString }}">
|
||||||
|
|
||||||
|
|
||||||
<div class="card card-primary">
|
<div class="card card-primary">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h3 class="card-title">{{ $receiveDataProject->company_project_description }}</h3>
|
<h3 class="card-title">{{ $receiveDataProject->company_project_description }}</h3>
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -43,12 +43,18 @@
|
||||||
|
|
||||||
Route::get('testRelatorio', [ProjectoDatacontroller::class, 'testRelatorio'])->name('testRelatorio');
|
Route::get('testRelatorio', [ProjectoDatacontroller::class, 'testRelatorio'])->name('testRelatorio');
|
||||||
|
|
||||||
|
Route::get('showAllClientsForProjectReports', [ProjectoDatacontroller::class, 'showAllClientsForProjectReports'])->name('showAllClientsForProjectReports');
|
||||||
|
|
||||||
|
Route::get('showAllClientsForProjectReportsTable', [ProjectoDatacontroller::class, 'showAllClientsForProjectReportsTable'])->name('showAllClientsForProjectReportsTable');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Route::get('cancelElementalTaskForEquipment/{equipmentID}', [WorkstationsJobsController::class, 'cancelElementalTaskForEquipment'])->name('cancelElementalTaskForEquipment');
|
Route::get('cancelElementalTaskForEquipment/{equipmentID}', [WorkstationsJobsController::class, 'cancelElementalTaskForEquipment'])->name('cancelElementalTaskForEquipment');
|
||||||
|
|
||||||
// Nao gosto que esteja neste controller, verificar mais tarde
|
// Nao gosto que esteja neste controller, verificar mais tarde
|
||||||
Route::get('test2/{projectID}/{equipmentID}', [ProjectoDatacontroller::class, 'test11'])->name('test11');
|
Route::get('articulated_2/{projectID}/{equipmentID}', [ProjectoDatacontroller::class, 'projectDetails_11'])->name('projectDetails_11');
|
||||||
Route::get('manageAssets/{equipmentID}', [ProjectoDatacontroller::class, 'test22'])->name('test22');
|
Route::get('manageAssets/{equipmentID}', [ProjectoDatacontroller::class, 'articulated_22'])->name('articulated_22');
|
||||||
|
Route::get('showAmbitDetailsProjectHistory/{projectID}/{equipmentID}',[ProjectoDatacontroller::class, 'showAmbitDetailsProjectHistory'])->name('showAmbitDetailsProjectHistory');
|
||||||
|
|
||||||
|
|
||||||
Route::get('getDataEquipment', [ExecutionProjectController::class, 'getDataEquipment'])->name('getDataEquipment');
|
Route::get('getDataEquipment', [ExecutionProjectController::class, 'getDataEquipment'])->name('getDataEquipment');
|
||||||
|
|
@ -65,7 +71,7 @@
|
||||||
Route::get('showReportingForAmbitsProjectPdf/{ambitId}/{projectId}', [ClientController::class, 'showReportingForAmbitsProjectPdf'])->name('showReportingForAmbitsProjectPdf'); //ok
|
Route::get('showReportingForAmbitsProjectPdf/{ambitId}/{projectId}', [ClientController::class, 'showReportingForAmbitsProjectPdf'])->name('showReportingForAmbitsProjectPdf'); //ok
|
||||||
|
|
||||||
Route::get('getDataAllEquipmentsForAmbitOfProject', [ClientController::class, 'getDataAllEquipmentsForAmbitOfProject'])->name('getDataAllEquipmentsForAmbitOfProject');
|
Route::get('getDataAllEquipmentsForAmbitOfProject', [ClientController::class, 'getDataAllEquipmentsForAmbitOfProject'])->name('getDataAllEquipmentsForAmbitOfProject');
|
||||||
// Route::get('test/{id}',[ExecutionProjectController::class, 'test11'])->name('test11');
|
// Route::get('test/{id}',[ExecutionProjectController::class, 'projectDetails_11'])->name('projectDetails_11');
|
||||||
|
|
||||||
// Route::get('getEquipment', [ClientController::class, 'getEquipment'])->name('getEquipment');
|
// Route::get('getEquipment', [ClientController::class, 'getEquipment'])->name('getEquipment');
|
||||||
|
|
||||||
|
|
@ -126,7 +132,7 @@
|
||||||
// Dashboard
|
// Dashboard
|
||||||
Route::get('dashboardClient', [ClientController::class, 'receiveProjectsClient'])->name('dashboardClient');
|
Route::get('dashboardClient', [ClientController::class, 'receiveProjectsClient'])->name('dashboardClient');
|
||||||
// Relatorios
|
// Relatorios
|
||||||
Route::get('reportingDataClient', [ClientController::class, 'reportingDataClient'])->name('reportingDataClient');
|
Route::get('reportingDataClient/{clientID?}', [ClientController::class, 'reportingDataClient'])->name('reportingDataClient');
|
||||||
//Api
|
//Api
|
||||||
Route::get('/api/receiveMonths/{yearsProjects}', [ClientController::class, 'receiveMonths']);
|
Route::get('/api/receiveMonths/{yearsProjects}', [ClientController::class, 'receiveMonths']);
|
||||||
Route::get('/api/receiveDays/{yearProjects}/{monthProjects}', [ClientController::class, 'receiveDays']);
|
Route::get('/api/receiveDays/{yearProjects}/{monthProjects}', [ClientController::class, 'receiveDays']);
|
||||||
|
|
@ -186,10 +192,11 @@
|
||||||
Route::controller(CreateProjectController::class)
|
Route::controller(CreateProjectController::class)
|
||||||
->group(function () {
|
->group(function () {
|
||||||
|
|
||||||
|
|
||||||
// indication of progress bar to projects that are in 'Planning'
|
// indication of progress bar to projects that are in 'Planning'
|
||||||
Route::get('test1/{id}', 'showStep1')->name('test1');
|
Route::get('projectDetails_1/{id}', 'showStep1')->name('projectDetails_1');
|
||||||
Route::get('test2/{id}', 'showStep2')->name('test2');
|
Route::get('articulated_2/{id}', 'showStep2')->name('articulated_2');
|
||||||
Route::get('test3/{id}', 'showStep3')->name('test3');
|
Route::get('workStation_3/{id}', 'showStep3')->name('workStation_3');
|
||||||
|
|
||||||
// Para adicionar uma tarefa Complementar
|
// Para adicionar uma tarefa Complementar
|
||||||
Route::post('addFurtherTasks', 'addFurtherTasks')->name('addFurtherTasks');
|
Route::post('addFurtherTasks', 'addFurtherTasks')->name('addFurtherTasks');
|
||||||
|
|
@ -208,10 +215,10 @@
|
||||||
Route::post('newProject1', 'processStep1')->name('processStep1');
|
Route::post('newProject1', 'processStep1')->name('processStep1');
|
||||||
Route::post('createWorkStations', 'createWorkStations')->name('createWorkStations');
|
Route::post('createWorkStations', 'createWorkStations')->name('createWorkStations');
|
||||||
|
|
||||||
Route::post('test1', 'EditprocessStep1')->name('EditprocessStep1');
|
Route::post('projectDetails_1', 'EditprocessStep1')->name('EditprocessStep1');
|
||||||
Route::post('test2', 'processStep2')->name('processStep2');
|
Route::post('articulated_2', 'processStep2')->name('processStep2');
|
||||||
Route::post('test2CreateEquipment', 'createEquipmentManual')->name('test2CreateEquipment');
|
Route::post('articulated_2CreateEquipment', 'createEquipmentManual')->name('articulated_2CreateEquipment');
|
||||||
Route::post('test3', 'processStep3');
|
Route::post('workStation_3', 'processStep3');
|
||||||
Route::delete('removeEquipment/{id}', 'removePendingEquipment')->name('removeEquipment');
|
Route::delete('removeEquipment/{id}', 'removePendingEquipment')->name('removeEquipment');
|
||||||
Route::post('CreateNewEquipmentFromPendingEquipment/{id}', 'CreateNewEquipmentFromPendingEquipment')->name('CreateNewEquipmentFromPendingEquipment');
|
Route::post('CreateNewEquipmentFromPendingEquipment/{id}', 'CreateNewEquipmentFromPendingEquipment')->name('CreateNewEquipmentFromPendingEquipment');
|
||||||
Route::post('create-equipament-project', 'createEquipamentProject')->name('createEquipamentProject');
|
Route::post('create-equipament-project', 'createEquipamentProject')->name('createEquipamentProject');
|
||||||
|
|
|
||||||
|
|
@ -319,7 +319,7 @@ public function testBadRequestBody()
|
||||||
$response->getStatusCode();
|
$response->getStatusCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test304()
|
public function workStation_304()
|
||||||
{
|
{
|
||||||
$client = $this->getHttpClient(__FUNCTION__);
|
$client = $this->getHttpClient(__FUNCTION__);
|
||||||
$response = $client->request('GET', 'http://localhost:8057/304', [
|
$response = $client->request('GET', 'http://localhost:8057/304', [
|
||||||
|
|
|
||||||
|
|
@ -14,12 +14,12 @@
|
||||||
/**
|
/**
|
||||||
* ArrayConverter generates tree like structure from a message catalogue.
|
* ArrayConverter generates tree like structure from a message catalogue.
|
||||||
* e.g. this
|
* e.g. this
|
||||||
* 'foo.bar1' => 'test1',
|
* 'foo.bar1' => 'projectDetails_1',
|
||||||
* 'foo.bar2' => 'test2'
|
* 'foo.bar2' => 'articulated_2'
|
||||||
* converts to follows:
|
* converts to follows:
|
||||||
* foo:
|
* foo:
|
||||||
* bar1: test1
|
* bar1: projectDetails_1
|
||||||
* bar2: test2.
|
* bar2: articulated_2.
|
||||||
*
|
*
|
||||||
* @author Gennady Telegin <gtelegin@gmail.com>
|
* @author Gennady Telegin <gtelegin@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
@ -54,11 +54,11 @@ private static function &getElementByPath(array &$tree, array $parts)
|
||||||
foreach ($parts as $i => $part) {
|
foreach ($parts as $i => $part) {
|
||||||
if (isset($elem[$part]) && \is_string($elem[$part])) {
|
if (isset($elem[$part]) && \is_string($elem[$part])) {
|
||||||
/* Process next case:
|
/* Process next case:
|
||||||
* 'foo': 'test1',
|
* 'foo': 'projectDetails_1',
|
||||||
* 'foo.bar': 'test2'
|
* 'foo.bar': 'articulated_2'
|
||||||
*
|
*
|
||||||
* $tree['foo'] was string before we found array {bar: test2}.
|
* $tree['foo'] was string before we found array {bar: articulated_2}.
|
||||||
* Treat new element as string too, e.g. add $tree['foo.bar'] = 'test2';
|
* Treat new element as string too, e.g. add $tree['foo.bar'] = 'articulated_2';
|
||||||
*/
|
*/
|
||||||
$elem = &$elem[implode('.', \array_slice($parts, $i))];
|
$elem = &$elem[implode('.', \array_slice($parts, $i))];
|
||||||
break;
|
break;
|
||||||
|
|
@ -69,12 +69,12 @@ private static function &getElementByPath(array &$tree, array $parts)
|
||||||
|
|
||||||
if ($elem && \is_array($elem) && $parentOfElem) {
|
if ($elem && \is_array($elem) && $parentOfElem) {
|
||||||
/* Process next case:
|
/* Process next case:
|
||||||
* 'foo.bar': 'test1'
|
* 'foo.bar': 'projectDetails_1'
|
||||||
* 'foo': 'test2'
|
* 'foo': 'articulated_2'
|
||||||
*
|
*
|
||||||
* $tree['foo'] was array = {bar: 'test1'} before we found string constant `foo`.
|
* $tree['foo'] was array = {bar: 'projectDetails_1'} before we found string constant `foo`.
|
||||||
* Cancel treating $tree['foo'] as array and cancel back it expansion,
|
* Cancel treating $tree['foo'] as array and cancel back it expansion,
|
||||||
* e.g. make it $tree['foo.bar'] = 'test1' again.
|
* e.g. make it $tree['foo.bar'] = 'projectDetails_1' again.
|
||||||
*/
|
*/
|
||||||
self::cancelExpand($parentOfElem, $part, $elem);
|
self::cancelExpand($parentOfElem, $part, $elem);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user