Updating filter methods in tables with yajra and structure, as well as adding responsiveness to tables
This commit is contained in:
parent
9112766a74
commit
5dca96d473
|
|
@ -34,10 +34,30 @@
|
|||
// use DataTables;
|
||||
|
||||
|
||||
class CreateProjectController extends Controller
|
||||
{
|
||||
public function deleteFurtherTasks(Request $request)
|
||||
{
|
||||
class CreateProjectController extends Controller {
|
||||
|
||||
public function receiveUnits($numberProject) {
|
||||
$PlantData = CompanyProject::where('company_projects_id', $numberProject)->first();
|
||||
|
||||
if(!$PlantData) {
|
||||
return response()->json([]);
|
||||
}
|
||||
|
||||
$receiveUnits = Unit::where('plant_id', $PlantData->plant_id)->get();
|
||||
|
||||
// Formatar a resposta para o formato esperado pelo JavaScript
|
||||
$formattedUnits = $receiveUnits->map(function ($unit) {
|
||||
return [
|
||||
'id' => $unit->receiveUnits, // Ajuste para o nome da sua coluna correta
|
||||
'name' => $unit->unit_name // Ajuste para o nome da sua coluna correta
|
||||
];
|
||||
});
|
||||
|
||||
return response()->json($formattedUnits);
|
||||
}
|
||||
|
||||
|
||||
public function deleteFurtherTasks(Request $request) {
|
||||
$receiveDataEquipment = Equipment::where('equipment_id', $request->equipmentID)->first();
|
||||
// Buscar os registros que correspondem ao equipmentID e que têm further_tasks_id nos selectedTasks
|
||||
$tasksToDelete = OrderEquipmentTasks::where('equipment_id', $request->equipmentID)
|
||||
|
|
@ -68,8 +88,7 @@ public function deleteFurtherTasks(Request $request)
|
|||
return redirect()->back()->with('success', 'Ordem de execução do equipamento: '.$receiveDataEquipment->equipment_tag.' Atulizada!');
|
||||
}
|
||||
|
||||
public function addFurtherTasks(Request $request)
|
||||
{
|
||||
public function addFurtherTasks(Request $request) {
|
||||
// Recebe e organiza os dados do equipameto recebido : ($request->equipmentID) e organiza em asc de acordo com a Ordem de execução
|
||||
$equipmentId = $request->equipmentID;
|
||||
$tasksToReorder = OrderEquipmentTasks::where('equipment_id', $equipmentId)
|
||||
|
|
@ -127,19 +146,11 @@ public function addFurtherTasks(Request $request)
|
|||
$newOrderEquipmentTask->inspection = 2;
|
||||
$newOrderEquipmentTask->save();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return redirect()->back()->with('success', 'Ordem de execução do equipamento: '.$receiveDataEquipment->equipment_tag.' Atulizada!');
|
||||
}
|
||||
|
||||
|
||||
public function receiveEquipmentToAssociateTasks(Request $request)
|
||||
{
|
||||
public function receiveEquipmentToAssociateTasks(Request $request) {
|
||||
// dd($request);
|
||||
|
||||
foreach($request->equipment as $equipment) {
|
||||
|
|
@ -153,8 +164,7 @@ public function receiveEquipmentToAssociateTasks(Request $request)
|
|||
return redirect()->back()->with('success', 'Equipametos associados a Obra com Sucesso !');
|
||||
}
|
||||
|
||||
public function receiveUnitsForExcelTemplate($numberProject)
|
||||
{
|
||||
public function receiveUnitsForExcelTemplate($numberProject) {
|
||||
$receveCompanyProject = CompanyProject::where('company_projects_id', $numberProject)->first();
|
||||
$recevePlant = Plant::where('plant_id', $receveCompanyProject->plant_id)->first();
|
||||
$receveUnits = Unit::where('plant_id', $recevePlant->plant_id)->get();
|
||||
|
|
@ -173,8 +183,7 @@ public function receiveUnitsForExcelTemplate($numberProject)
|
|||
return $this->createDownloadResponse($spreadsheet, 'Valves_Template.xlsx');
|
||||
}
|
||||
|
||||
protected function createDownloadResponse($spreadsheet, $filename)
|
||||
{
|
||||
protected function createDownloadResponse($spreadsheet, $filename) {
|
||||
// Create a writer object
|
||||
$writer = new Xlsx($spreadsheet);
|
||||
// Create a StreamedResponse with a callback
|
||||
|
|
@ -191,8 +200,7 @@ function () use ($writer) {
|
|||
return $response;
|
||||
}
|
||||
|
||||
public function finishCreatingProject($numberProject)
|
||||
{
|
||||
public function finishCreatingProject($numberProject) {
|
||||
// recebe atraves de sessao toda a vez quem entra no componente 'SelectElementalTasksInWonkstation' para selecionar as tarefas de cada Workstation
|
||||
$receiveAllFurtherTasks = session('receiveAllFurtherTasks');
|
||||
$receiveElementalTasks = session('receiveElementalTasks');
|
||||
|
|
@ -275,8 +283,7 @@ public function finishCreatingProject($numberProject)
|
|||
}
|
||||
}
|
||||
|
||||
public function deleteWorkstation($name)
|
||||
{
|
||||
public function deleteWorkstation($name) {
|
||||
$workstation = ConstructionWorkstation::where('name_workstations', $name)->first();
|
||||
$removeAcountUserWorkstation = User::where('user_name', $workstation->name_workstations)->first();
|
||||
|
||||
|
|
@ -320,8 +327,7 @@ public function deleteWorkstation($name)
|
|||
return back()->with('danger', 'Posto de Trabalho não encontrado!');
|
||||
}
|
||||
|
||||
public function removeProjectEquipment(Request $request)
|
||||
{
|
||||
public function removeProjectEquipment(Request $request) {
|
||||
|
||||
$equipment = Equipment::find($request->EquipmentID);
|
||||
|
||||
|
|
@ -335,8 +341,7 @@ public function removeProjectEquipment(Request $request)
|
|||
|
||||
return back()->with('success', 'Equipamento retirado da obra !');
|
||||
}
|
||||
public function EditEquipmentsProjects(Request $request)
|
||||
{
|
||||
public function EditEquipmentsProjects(Request $request) {
|
||||
// dd($request);
|
||||
// Localiza o equipment pelo numberProject
|
||||
$equipment = Equipment::find($request->equipmentId);
|
||||
|
|
@ -445,8 +450,7 @@ public function EditEquipmentsProjects(Request $request)
|
|||
->with('taskExecutionOrders', $taskExecutionOrders);
|
||||
}
|
||||
|
||||
public function showJson($id)
|
||||
{
|
||||
public function showJson($id) {
|
||||
$attributes = SpecificAttributesEquipmentType::where('equipment_id', $id)->get();
|
||||
$OrdemTasks = OrderEquipmentTasks::where('equipment_id', $id)->get();
|
||||
$allElementalTasks = ElementalTasks::all();
|
||||
|
|
@ -458,8 +462,7 @@ public function showJson($id)
|
|||
]);
|
||||
}
|
||||
|
||||
public function receveTasksWorkstationPlanning($WorkstationId)
|
||||
{
|
||||
public function receveTasksWorkstationPlanning($WorkstationId) {
|
||||
$workstationsAssociationTasks = WorkstationsAssociationTasks::where('id_workstations', $WorkstationId)->get();
|
||||
|
||||
return response()->json([
|
||||
|
|
@ -468,8 +471,7 @@ public function receveTasksWorkstationPlanning($WorkstationId)
|
|||
}
|
||||
|
||||
|
||||
public function createWorkStations(Request $request)
|
||||
{
|
||||
public function createWorkStations(Request $request) {
|
||||
// Pega o número de estações de trabalho do request
|
||||
$numberWorkstations = $request->numberWorkstations;
|
||||
|
||||
|
|
@ -518,8 +520,7 @@ public function createWorkStations(Request $request)
|
|||
|
||||
|
||||
// Funcao apenas para retornar os dados necessarios para a view criar uma Obra.
|
||||
public function createProjectForStep1()
|
||||
{
|
||||
public function createProjectForStep1() {
|
||||
$companies = User::where('type_users', 3)->get();
|
||||
// Apos terminar não vai ficar step 1
|
||||
return view('projectsClients/createProject', ['step' => 1], ['companies' => $companies]);
|
||||
|
|
@ -527,8 +528,7 @@ public function createProjectForStep1()
|
|||
|
||||
// Progress Bar
|
||||
//Devolve para a primeira para na Descrição do projecto apenas user com ID 3, quer dizer que apenas as "empresas"
|
||||
public function showStep1($company_projects_id)
|
||||
{
|
||||
public function showStep1($company_projects_id) {
|
||||
// $projects = CompanyProject::find($company_projects_id);
|
||||
|
||||
$projects = CompanyProject::with('user')->find($company_projects_id);
|
||||
|
|
@ -541,19 +541,16 @@ public function showStep1($company_projects_id)
|
|||
}
|
||||
|
||||
// Se forem alterados dados dos Detalhes da Obra, vai ser alterado
|
||||
public function EditprocessStep1(Request $request)
|
||||
{
|
||||
public function EditprocessStep1(Request $request) {
|
||||
}
|
||||
|
||||
public function removePendingEquipment($id)
|
||||
{
|
||||
public function removePendingEquipment($id) {
|
||||
$equipment = PendingEquipment::findOrFail($id);
|
||||
$equipment->delete();
|
||||
return back()->with('success', 'Equipamento pendente removido com sucesso!');
|
||||
}
|
||||
|
||||
public function CreateNewEquipmentFromPendingEquipment(Request $request, $id)
|
||||
{
|
||||
public function CreateNewEquipmentFromPendingEquipment(Request $request, $id) {
|
||||
$checkPendingEquipment = PendingEquipment::findOrFail($id);
|
||||
|
||||
$counter = 2;
|
||||
|
|
@ -592,8 +589,7 @@ public function CreateNewEquipmentFromPendingEquipment(Request $request, $id)
|
|||
}
|
||||
|
||||
|
||||
public function processStep1(Request $request)
|
||||
{
|
||||
public function processStep1(Request $request) {
|
||||
// Validação...
|
||||
$installationId = $request->input('installation_id');
|
||||
|
||||
|
|
@ -641,8 +637,7 @@ public function processStep1(Request $request)
|
|||
->with('success', 'Detalhes, Projecto criado com sucesso');
|
||||
}
|
||||
|
||||
public function showStep2($company_projects_id)
|
||||
{
|
||||
public function showStep2($company_projects_id) {
|
||||
// Verifique se a etapa 1 foi concluída
|
||||
|
||||
// if (!session('form_data.step1')) {
|
||||
|
|
@ -677,13 +672,18 @@ public function showStep2($company_projects_id)
|
|||
// $listEquipmentsProjects = Equipment::with(['unit', 'equipmentType', 'equipmentAssociationAmbit.ambitsEquipment'])
|
||||
// ->where('company_projects_id', $company_projects_id)
|
||||
// ->get();
|
||||
$listEquipmentsProjects = Equipment::with(['unit', 'equipmentType', 'equipmentAssociationAmbit.ambitsEquipment', 'specificAttributes' => function ($query) {
|
||||
$listEquipmentsProjects = Equipment::with([
|
||||
'unit',
|
||||
'equipmentType',
|
||||
'equipmentAssociationAmbit.ambitsEquipment',
|
||||
'specificAttributes' => function ($query) {
|
||||
$query->orderBy('specific_attributes_value', 'asc');
|
||||
}])
|
||||
}
|
||||
])
|
||||
->where('company_projects_id', $company_projects_id)
|
||||
->get();
|
||||
|
||||
|
||||
// dd($checkUnits);
|
||||
$pendingEquipments = PendingEquipment::where('pending_company_projects_id', $numberProject)->get();
|
||||
|
||||
if(!$pendingEquipments->isEmpty()) {
|
||||
|
|
@ -705,8 +705,7 @@ public function showStep2($company_projects_id)
|
|||
->with('receiveNumberProject', $project);
|
||||
}
|
||||
|
||||
public function createEquipmentManual(Request $request)
|
||||
{
|
||||
public function createEquipmentManual(Request $request) {
|
||||
// EquipmentAmbit
|
||||
// *** Recebe a Instalação(Plant), com base no número da Obra Criada
|
||||
$receivePlant = DB::table('plants')
|
||||
|
|
@ -820,14 +819,12 @@ public function createEquipmentManual(Request $request)
|
|||
->with('success', 'Equipamento criado com sucesso')
|
||||
->with('listEquipmentsProjects', $listEquipmentsProjects);
|
||||
}
|
||||
public function receiveIdEquipment(Equipment $equipment)
|
||||
{
|
||||
public function receiveIdEquipment(Equipment $equipment) {
|
||||
// return response()->json($equipment);
|
||||
return view('projectsClients/articulated_2', ['equipment' => $equipment]);
|
||||
}
|
||||
|
||||
public function processStep2(Request $request)
|
||||
{
|
||||
public function processStep2(Request $request) {
|
||||
// Valide e processe os dados do formulário
|
||||
$file = $request->file('documento');
|
||||
|
||||
|
|
@ -998,8 +995,7 @@ public function processStep2(Request $request)
|
|||
return redirect('/test3');
|
||||
}
|
||||
|
||||
public function showStep3($company_projects_id)
|
||||
{
|
||||
public function showStep3($company_projects_id) {
|
||||
$equipments = Equipment::where('company_projects_id', $company_projects_id)
|
||||
->get();
|
||||
|
||||
|
|
@ -1053,8 +1049,7 @@ public function showStep3($company_projects_id)
|
|||
->with('futherTasks', $futherTasks);
|
||||
}
|
||||
|
||||
public function workstationsAssociationTasks(Request $request)
|
||||
{
|
||||
public function workstationsAssociationTasks(Request $request) {
|
||||
// dd($request);
|
||||
|
||||
$workStation = ConstructionWorkstation::where('id_workstations', $request->idWorkStation)->first();
|
||||
|
|
@ -1110,8 +1105,7 @@ public function workstationsAssociationTasks(Request $request)
|
|||
return back()->with('success', 'Posto de trabalho : '.$workStation->name_workstations.' atualizado com sucesso!');
|
||||
}
|
||||
|
||||
public function processStep3(Request $request)
|
||||
{
|
||||
public function processStep3(Request $request) {
|
||||
// Valide e processe os dados do formulário
|
||||
// ...
|
||||
session(['form_data.step3' => $request->all()]);
|
||||
|
|
@ -1121,8 +1115,7 @@ public function processStep3(Request $request)
|
|||
// ...
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
public function index() {
|
||||
// $results = DB::table('equipaments')
|
||||
// ->join('specific_attributes_equipament_types', 'equipaments.equipment_ID', '=', 'specific_attributes_equipament_types.tb_equipament_id')
|
||||
// ->join('general_attributes_equipaments', 'specific_attributes_equipament_types.specific_Attributes_Equipment_Type_ID', '=', 'general_attributes_equipaments.general_Attributes_Equipment_ID')
|
||||
|
|
@ -1166,15 +1159,13 @@ public function index()
|
|||
}
|
||||
|
||||
|
||||
public function listCompanies()
|
||||
{
|
||||
public function listCompanies() {
|
||||
$companies = User::where('type_users', 3)->get();
|
||||
return view('projectsClients/createProject', ['companies' => $companies]);
|
||||
}
|
||||
|
||||
|
||||
public function createProject(Request $request)
|
||||
{
|
||||
public function createProject(Request $request) {
|
||||
|
||||
// Validação...
|
||||
$installationId = $request->input('installation_id');
|
||||
|
|
@ -1210,8 +1201,7 @@ public function createProject(Request $request)
|
|||
|
||||
}
|
||||
|
||||
public function storeProject(Request $request)
|
||||
{
|
||||
public function storeProject(Request $request) {
|
||||
if($request->input('company_id') == 'new') {
|
||||
$company = new CompanyProject; // Substitua "Company" pelo nome do seu modelo de empresas
|
||||
$company->name = $request->input('new_company_name');
|
||||
|
|
@ -1225,8 +1215,7 @@ public function storeProject(Request $request)
|
|||
// Agora, você pode usar $company_id ao criar o projeto
|
||||
}
|
||||
|
||||
public function getByUserNif(Request $request)
|
||||
{
|
||||
public function getByUserNif(Request $request) {
|
||||
|
||||
// dd(Plant::where('user_id', $request->input('user_id'))->get());
|
||||
|
||||
|
|
@ -1236,8 +1225,7 @@ public function getByUserNif(Request $request)
|
|||
return response()->json($installations);
|
||||
}
|
||||
|
||||
public function getAmbits($equipmentType)
|
||||
{
|
||||
public function getAmbits($equipmentType) {
|
||||
|
||||
$ambits = DB::table('ambits_equipments')
|
||||
->select('ambits_equipments.*')
|
||||
|
|
@ -1246,8 +1234,7 @@ public function getAmbits($equipmentType)
|
|||
return response()->json($ambits);
|
||||
}
|
||||
|
||||
public function getAttributes($id)
|
||||
{
|
||||
public function getAttributes($id) {
|
||||
$equipment = Equipment::with('specificAttributes')->find($id);
|
||||
return response()->json($equipment->specificAttributes);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,50 +9,71 @@
|
|||
use App\Models\Equipment;
|
||||
use App\Models\EquipmentComments;
|
||||
use App\Models\EquipmentType;
|
||||
use App\Models\OrderEquipmentTasks;
|
||||
use App\Models\SpecificAttributesEquipmentType;
|
||||
|
||||
use App\Models\ElementalTasks;
|
||||
|
||||
use Yajra\DataTables\Facades\DataTables;
|
||||
|
||||
class ExecutionProjectController extends Controller
|
||||
{
|
||||
|
||||
public function test11($equipmentID)
|
||||
{
|
||||
$dataEquipment =Equipment::find($equipmentID);
|
||||
|
||||
// dd($dataEquipment);
|
||||
|
||||
$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.articulated_2_ShowEquipment',compact('dataEquipment','OrdemTasks','OrdemTasksIds'));
|
||||
}
|
||||
|
||||
public function getDataEquipment(Request $request)
|
||||
{
|
||||
|
||||
// pode receber um request ou nao, depende de onde for chamado.
|
||||
$numberProject = $request->get('numberProject');
|
||||
|
||||
// Inicia a consulta
|
||||
$query = Equipment::with('equipmentType')
|
||||
$checkUnits = $request->get('checkUnits');
|
||||
$tipo_valvulasList = $request->get('tipo_valvulasList');
|
||||
|
||||
$receiveAllClients = $request->get('receiveAllClients');
|
||||
|
||||
$receiveAllPlants = $request->get('receiveAllPlants');
|
||||
|
||||
$receiveAllUnits = $request->get('receiveAllUnits');
|
||||
|
||||
$receiveEquipmentsType = $request->get('receiveEquipmentsType');
|
||||
|
||||
// Query padrão que todas as dataTables recebem, a partir dele fazemos os filt
|
||||
$query = Equipment::with('equipmentType', 'unit')
|
||||
->select(['equipment_id', 'equipment_tag', 'unit_id', 'equipment_type_id']);
|
||||
|
||||
// Adiciona a cláusula where se numberProject for fornecido
|
||||
// Consultas para a Criacao da Obra, Ambas vao ser diferentes, pois na creacao, recebes os equipamentos por obra, porem no portifolio vamos buscar todos.
|
||||
if ($numberProject) {
|
||||
$query->where('company_projects_id', $numberProject);
|
||||
|
||||
if ($checkUnits && $checkUnits !== '#') {
|
||||
$query->where('unit_id', $checkUnits);
|
||||
}
|
||||
|
||||
if ($tipo_valvulasList && $tipo_valvulasList !== '#') {
|
||||
$query->where('equipment_type_id', $tipo_valvulasList);
|
||||
}
|
||||
}
|
||||
|
||||
//Filtar equipamentos por um cliente especifico.
|
||||
if ($receiveAllClients && $receiveAllClients !== '#') {
|
||||
// Filtra os equipamentos cujas unidades estão associadas às plantas do usuário especificado
|
||||
$query->whereHas('unit.plant', function ($query) use ($receiveAllClients) {
|
||||
$query->where('user_id', $receiveAllClients);
|
||||
});
|
||||
}
|
||||
|
||||
//Filtar equipamentos por uma instalacao especifica.
|
||||
if ($receiveAllPlants && $receiveAllPlants !== '#') {
|
||||
$query->whereHas('unit', function ($query) use ($receiveAllPlants) {
|
||||
$query->where('plant_id', $receiveAllPlants);
|
||||
});
|
||||
}
|
||||
|
||||
if ($receiveAllUnits && $receiveAllUnits !== '#') {
|
||||
$query->where('unit_id', $receiveAllUnits);
|
||||
}
|
||||
if ($receiveEquipmentsType && $receiveEquipmentsType !== '#') {
|
||||
$query->where('equipment_type_id', $receiveEquipmentsType);
|
||||
}
|
||||
|
||||
// Executa a consulta e obtém os resultados
|
||||
$equipment = $query->get();
|
||||
|
||||
|
||||
// $equipment = Equipment::with('equipmentType') // Certifique-se de que o método 'equipmentType' existe no modelo 'Equipment'
|
||||
// ->select(['equipment_id', 'equipment_tag', 'unit_id', 'equipment_type_id'])
|
||||
// ->where('company_projects_id', $numberProject);
|
||||
|
||||
return DataTables::of($equipment)
|
||||
->addColumn('unit_name', function ($equipment) {
|
||||
// Retorna 'unit_name' do relacionamento 'unit'
|
||||
|
|
@ -62,11 +83,26 @@ public function getDataEquipment(Request $request)
|
|||
// Retorna 'equipment_type_name' do relacionamento 'equipmentType'
|
||||
return $equipment->equipmentType ? $equipment->equipmentType->equipment_type_name : 'N/A';
|
||||
})
|
||||
|
||||
->addColumn('action', function ($equipment) use ($numberProject) {
|
||||
// Lógica para a coluna de ação com o link correto
|
||||
// Verifica se $numberProject não é nulo
|
||||
if (!is_null($numberProject)) {
|
||||
// Se não for nulo, usa a rota 'test11'
|
||||
$actionBtn = '<a title="Detalhes do equipamento" href="' . route('test11', ['projectID' => $numberProject, 'equipmentID' => $equipment->equipment_id]) . '"><i class="fa-solid fa-eye text-primary"></i></a>';
|
||||
} else {
|
||||
// Se for nulo, usa a rota 'test22'
|
||||
$actionBtn = '<a title="Detalhes do equipamento" href="' . route('test22', ['equipmentID' => $equipment->equipment_id]) . '"><i class="fa-solid fa-eye text-primary"></i></a>';
|
||||
}
|
||||
return $actionBtn;
|
||||
})
|
||||
|
||||
// ->addColumn('action', function ($equipment) use ($numberProject) {
|
||||
// // Lógica para a coluna de ação com o link correto
|
||||
// $actionBtn = '<a title="Detalhes do equipamento" href="' . route('test11', ['equipmentID' => $equipment->equipment_id]) . '"><i class="fa-solid fa-eye text-primary"></i></a>';
|
||||
// return $actionBtn;
|
||||
// })
|
||||
|
||||
|
||||
->editColumn('unit_id', function ($equipment) {
|
||||
// Isto irá substituir 'unit_id' pelo 'unit_name' associado
|
||||
return $equipment->unit->unit_name ?? 'N/A';
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\AmbitsEquipment;
|
||||
use App\Models\Unit;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
|
|
@ -13,6 +14,9 @@
|
|||
use App\Models\CompanyProject;
|
||||
use App\Models\User;
|
||||
|
||||
use App\Models\OrderEquipmentTasks;
|
||||
use App\Models\SpecificAttributesEquipmentType;
|
||||
|
||||
|
||||
use App\Models\ConstructionWorkstation;
|
||||
use App\Models\EquipmentType;
|
||||
|
|
@ -20,13 +24,61 @@
|
|||
|
||||
class ProjectoDatacontroller extends Controller
|
||||
{
|
||||
public function receivePlants($clientId)
|
||||
{
|
||||
if ($clientId == 'all') {
|
||||
$allPlants = Plant::all();
|
||||
return response()->json($allPlants);
|
||||
|
||||
public function receiveUnitsManageAssets($receivePlantClientRelated){
|
||||
|
||||
$UnitsData = Unit::where('plant_id',$receivePlantClientRelated)->get();
|
||||
|
||||
$formattedData = $UnitsData->map(function ($item) {
|
||||
return [
|
||||
'id' => $item->unit_id,
|
||||
'name'=> $item->unit_name
|
||||
];
|
||||
});
|
||||
|
||||
return response()->json($formattedData);
|
||||
}
|
||||
dd($clientId);
|
||||
|
||||
public function receivePlants($receiveAllClients) {
|
||||
|
||||
$PlantData = Plant::where('user_id', $receiveAllClients)->get();
|
||||
// Criando um array para armazenar os dados formatados
|
||||
$formattedData = $PlantData->map(function ($item) {
|
||||
return [
|
||||
'id' => $item->plant_id,
|
||||
'name' => $item->plant_name
|
||||
];
|
||||
});
|
||||
// Retorna os dados em formato JSON
|
||||
return response()->json($formattedData);
|
||||
}
|
||||
|
||||
//Funcao que recebe a Acoes do dataTables das obrar em Planeamento.
|
||||
public function test11($projectID,$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.articulated_2_ShowEquipment',compact('dataEquipment','OrdemTasks','OrdemTasksIds'));
|
||||
}
|
||||
|
||||
|
||||
//Funcao que recebe a Acoes do dataTables do portifolio.
|
||||
public function test22($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'));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -90,7 +142,9 @@ public function ManageAssets()
|
|||
->join('users', 'plants.user_id', '=', 'users.user_id')
|
||||
->select('plants.*', 'units.unit_name', 'users.user_name as user_name')
|
||||
->get();
|
||||
|
||||
$equipments = Equipment::all();
|
||||
|
||||
// $equipaments = DB::table('equipaments')
|
||||
// ->join('factories','equipaments.factory_id', '=', 'factories.factories_id')
|
||||
// ->join('equipament_types', 'equipaments.equipament_type_id', '=' , 'equipament_types.equipament_type_id')
|
||||
|
|
@ -98,6 +152,7 @@ public function ManageAssets()
|
|||
// ->get();
|
||||
|
||||
$allEquipmentType = EquipmentType::all();
|
||||
|
||||
$allClients = User::where('type_users', 3)->get();
|
||||
|
||||
return view('Admin/DataManagement/manageassets', compact('units', 'equipments', 'allEquipmentType', 'allClients'));
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
</div>
|
||||
</div><!-- /.container-fluid -->
|
||||
</section>
|
||||
|
||||
<!-- /.content-header -->
|
||||
|
||||
<!-- Main content -->
|
||||
|
|
@ -41,12 +40,53 @@ class="btn btn-block bg-gradient-primary btn-lg">{{ __('messages.portfolio.chang
|
|||
<br>
|
||||
|
||||
<div class="card-light" id="cardAssetsTable">
|
||||
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">{{ __('messages.portfolio.change_buttons.asset_table') }}</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
|
||||
<div class="row text-center">
|
||||
<div class="form-group col-sm">
|
||||
<label>Cliente </label>
|
||||
<select id="receiveAllClients" name="receiveAllClients" class="form-control">
|
||||
<option value='#' selected>Mostrar Todos</option>
|
||||
@foreach ($allClients as $client)
|
||||
<option value="{{ $client->user_id }}">
|
||||
{{ $client->user_name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm" id="card-receivePlantClientRelated">
|
||||
<label>Instalações </label>
|
||||
<select id="receivePlantClientRelated" name="receivePlantClientRelated"
|
||||
class="form-control">
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-sm" id="card-receiveUnitsClientRelated">
|
||||
<div class="form-group">
|
||||
<label>Fábricas </label>
|
||||
<select id="receiveUnitsClientRelated" name="receiveUnitsClientRelated"
|
||||
class="form-control">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm">
|
||||
<label>Tipo de Equipamento </label>
|
||||
<select id="tipo_valvulasList" name="equipmentTypeId" class="form-control">
|
||||
<option value='#' selected>Mostrar Todos</option>
|
||||
@foreach ($allEquipmentType as $equipmentsType)
|
||||
<option value="{{ $equipmentsType->equipment_type_id }}">
|
||||
{{ $equipmentsType->equipment_type_name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- row text-center -->
|
||||
<table id="showProjectEquipment1" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
@ -59,15 +99,39 @@ class="btn btn-block bg-gradient-primary btn-lg">{{ __('messages.portfolio.chang
|
|||
</thead>
|
||||
</table>
|
||||
|
||||
<script>
|
||||
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
</div>
|
||||
{{-- ./cardAssetsTable --}}
|
||||
</div>
|
||||
{{-- ./col-md-12 --}}
|
||||
</div>
|
||||
{{-- ./justify-content-center --}}
|
||||
</section>
|
||||
{{-- ./content --}}
|
||||
@endsection
|
||||
|
||||
@section('scriptsTemplateAdmin')
|
||||
<script type="text/javascript">
|
||||
var dataTables;
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#showProjectEquipment1').DataTable({
|
||||
dataTables = $('#showProjectEquipment1').DataTable({
|
||||
responsive: true,
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
ajax: {
|
||||
url: '{{ route('getDataEquipment') }}',
|
||||
type: 'GET',
|
||||
data: function(d) {
|
||||
// Envia as variaveis de acordo com as opcoes selecionadas para o DataTables
|
||||
d.receiveAllClients = $('#receiveAllClients').val();
|
||||
d.receiveAllPlants = $('#receivePlantClientRelated').val();
|
||||
d.receiveAllUnits = $('#receiveUnitsClientRelated').val();
|
||||
d.receiveEquipmentsType = $('#tipo_valvulasList').val();
|
||||
}
|
||||
},
|
||||
columns: [{
|
||||
data: 'equipment_id',
|
||||
|
|
@ -94,132 +158,86 @@ class="btn btn-block bg-gradient-primary btn-lg">{{ __('messages.portfolio.chang
|
|||
],
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
</div>
|
||||
{{-- ./cardAssetsTable --}}
|
||||
|
||||
{{-- <div class="card card-primary" id="cardCreateAssets">
|
||||
|
||||
</div> --}}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@section('scriptsTemplateAdmin')
|
||||
<script>
|
||||
$(function() {
|
||||
$("#assetsTable").DataTable({
|
||||
"responsive": true,
|
||||
"lengthChange": false,
|
||||
"autoWidth": false,
|
||||
"buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
|
||||
}).buttons().container().appendTo('#assetsTable_wrapper .col-md-6:eq(0)');
|
||||
//De acordo com os valores deste campos, como anteriormente ja sao enviados para a DataTables para fazer as filtragens, agora atualizamos a Tabela com base no filtros feitos
|
||||
$('#receiveAllClients,#receivePlantClientRelated,#receiveUnitsClientRelated,#tipo_valvulasList').on('change',
|
||||
function() {
|
||||
dataTables.ajax.reload();
|
||||
});
|
||||
</script>
|
||||
|
||||
{{--
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
// $('#cardAssetsTable').hide();
|
||||
$('#cardCreateAssets').hide();
|
||||
// Esconde os cards inicialmente
|
||||
$('#card-receivePlantClientRelated').hide();
|
||||
$('#card-receiveUnitsClientRelated').hide();
|
||||
|
||||
$('#receiveAllClients').on('change', function() {
|
||||
var receiveAllClients = $(this).val();
|
||||
console.log(receiveAllClients);
|
||||
if (receiveAllClients) {
|
||||
|
||||
// Esconde ambos os cards ao mudar o cliente
|
||||
$('#card-receivePlantClientRelated').hide();
|
||||
$('#card-receiveUnitsClientRelated').hide();
|
||||
|
||||
//Se existir receiveAllClients e for diferente de '#'
|
||||
if (receiveAllClients && receiveAllClients !== '#') {
|
||||
$('#card-receivePlantClientRelated').show(); // Mostra o card de Plantas
|
||||
|
||||
// Faz a requisição AJAX para receber as plantas
|
||||
$.ajax({
|
||||
url: '/api/receivePlants/' + receiveAllClients,
|
||||
type: 'GET',
|
||||
success: function(data) {
|
||||
console.log(data);
|
||||
var select = $('#receivePlantClientRelated');
|
||||
select.empty(); // Limpa o select atual
|
||||
select.append($('<option>', {
|
||||
value: '#',
|
||||
text: 'Mostrar Todas'
|
||||
}));
|
||||
|
||||
// Preenche o select de Plantas
|
||||
$.each(data, function(index, item) {
|
||||
select.append($('<option>', {
|
||||
value: item.id,
|
||||
text: item.name
|
||||
}));
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
})
|
||||
})
|
||||
</script> --}}
|
||||
|
||||
{{-- Script para DataTables Yajra --}}
|
||||
{{-- <script>
|
||||
$(document).ready(function() {
|
||||
$('#assetsTable').DataTable({
|
||||
autoWidth: false,
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
ajax: {
|
||||
url: '/api/receiveAllEquipments/',
|
||||
// data: function(d) {
|
||||
// d.equipment_type_id = $('#tipo_valvulasList').val();
|
||||
// },
|
||||
},
|
||||
columns: [{
|
||||
data: 'equipment_tag',
|
||||
name: 'equipment_tag'
|
||||
},
|
||||
// {
|
||||
// data: 'equipment_type',
|
||||
// name: 'equipment_type'
|
||||
// },
|
||||
// {
|
||||
// data: 'Unit',
|
||||
// name: 'Unit'
|
||||
// },
|
||||
{
|
||||
data: 'equipment_description',
|
||||
name: 'equipment_description'
|
||||
},
|
||||
|
||||
],
|
||||
rowId: 'equipment_id'
|
||||
});
|
||||
})
|
||||
</script> --}}
|
||||
|
||||
$('#receivePlantClientRelated').on('change', function() {
|
||||
var receivePlantClientRelated = $(this).val();
|
||||
|
||||
if (receivePlantClientRelated && receivePlantClientRelated !== '#') {
|
||||
$('#card-receiveUnitsClientRelated').show(); // Mostra o card de Unidades
|
||||
|
||||
{{-- <script>
|
||||
$(function() {
|
||||
$('input[name="daterange"]').daterangepicker({
|
||||
opens: 'right'
|
||||
}, function(start, end, label) {
|
||||
console.log("A new date selection was made: " + start.format('YYYY-MM-DD') + ' to ' + end
|
||||
.format('YYYY-MM-DD'));
|
||||
// Faz a requisição AJAX para receber as unidades
|
||||
$.ajax({
|
||||
url: 'api/receiveUnitsManageAssets/' + receivePlantClientRelated,
|
||||
type: 'GET',
|
||||
success: function(data) {
|
||||
var select = $('#receiveUnitsClientRelated');
|
||||
select.empty();
|
||||
select.append($('<option>', {
|
||||
value: '#',
|
||||
text: 'Mostrar Todas'
|
||||
}));
|
||||
|
||||
// Preenche o select de Unidades
|
||||
$.each(data, function(index, item) {
|
||||
select.append($('<option>', {
|
||||
value: item.id,
|
||||
text: item.name
|
||||
}));
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$('#card-receiveUnitsClientRelated').hide(); // Esconde o card de Unidades
|
||||
}
|
||||
});
|
||||
});
|
||||
</script> --}}
|
||||
|
||||
{{-- <script>
|
||||
$(function() {
|
||||
$("#TableEquipments").DataTable({
|
||||
"responsive": true,
|
||||
"lengthChange": false,
|
||||
"autoWidth": false,
|
||||
"buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
|
||||
}).buttons().container().appendTo('#TableEquipments_wrapper .col-md-6:eq(0)');
|
||||
$("#example1").DataTable({
|
||||
"responsive": true,
|
||||
"lengthChange": false,
|
||||
"autoWidth": false,
|
||||
"buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
|
||||
}).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)');
|
||||
$("#example2").DataTable({
|
||||
"responsive": true,
|
||||
"lengthChange": false,
|
||||
"autoWidth": false,
|
||||
"buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
|
||||
}).buttons().container().appendTo('#example2_wrapper .col-md-6:eq(0)');
|
||||
$("#example3").DataTable({
|
||||
"responsive": true,
|
||||
"lengthChange": false,
|
||||
"autoWidth": false,
|
||||
"buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
|
||||
}).buttons().container().appendTo('#example3_wrapper .col-md-6:eq(0)');
|
||||
});
|
||||
</script> --}}
|
||||
</script>
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -1182,6 +1182,40 @@ class="btn btn-info">Baixar Template</a>
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row text-center">
|
||||
|
||||
<div class="col-sm" id="card-receiveUnitsClientRelated">
|
||||
<div class="form-group">
|
||||
<label>Fábricas </label>
|
||||
|
||||
<select class="form-control" id="receiveUnitsClientRelated1"
|
||||
name="receiveUnitsClientRelated">
|
||||
<option value='#' selected>Mostrar Todos</option>
|
||||
@foreach ($checkUnits as $checkUnit)
|
||||
<option value="{{ $checkUnit->unit_id }}">
|
||||
{{ $checkUnit->unit_name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm">
|
||||
<label>Tipo de Equipamento </label>
|
||||
<select id="tipo_valvulasList" name="equipmentTypeId" class="form-control">
|
||||
<option value='#' selected>Mostrar Todos</option>
|
||||
@foreach ($typeEquipments as $typeEquipment)
|
||||
<option value="{{ $typeEquipment->equipment_type_id }}">
|
||||
{{ $typeEquipment->equipment_type_name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- row text-center -->
|
||||
|
||||
<table id="showProjectEquipment" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
@ -1194,46 +1228,6 @@ class="btn btn-info">Baixar Template</a>
|
|||
</thead>
|
||||
</table>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var numberProject = $('#receiveNumberProject').val();
|
||||
|
||||
$('#showProjectEquipment').DataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
ajax: {
|
||||
url: '{{ route('getDataEquipment') }}',
|
||||
type: 'GET',
|
||||
data: {
|
||||
'numberProject': numberProject
|
||||
}
|
||||
},
|
||||
columns: [{
|
||||
data: 'equipment_id',
|
||||
name: 'equipment_id'
|
||||
},
|
||||
{
|
||||
data: 'equipment_tag',
|
||||
name: 'equipment_tag'
|
||||
},
|
||||
{
|
||||
data: 'unit_id',
|
||||
name: 'unit_id'
|
||||
},
|
||||
{
|
||||
data: 'equipment_type_id',
|
||||
name: 'equipment_type_id'
|
||||
},
|
||||
{
|
||||
data: 'action',
|
||||
name: 'action',
|
||||
orderable: false,
|
||||
searchable: false
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
|
@ -1425,6 +1419,120 @@ class="btn btn-primary float-right">Seguinte</a>
|
|||
@endforeach
|
||||
@endif
|
||||
|
||||
|
||||
<script>
|
||||
var dataTable;
|
||||
$(document).ready(function() {
|
||||
|
||||
dataTable = $('#showProjectEquipment').DataTable({
|
||||
responsive: true,
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
ajax: {
|
||||
url: '{{ route('getDataEquipment') }}',
|
||||
type: 'GET',
|
||||
data: function(d) {
|
||||
d.numberProject = $('#receiveNumberProject').val();
|
||||
d.checkUnits = $('#receiveUnitsClientRelated1').val();
|
||||
d.tipo_valvulasList = $('#tipo_valvulasList').val();
|
||||
}
|
||||
},
|
||||
columns: [{
|
||||
data: 'equipment_id',
|
||||
name: 'equipment_id'
|
||||
},
|
||||
{
|
||||
data: 'equipment_tag',
|
||||
name: 'equipment_tag'
|
||||
},
|
||||
{
|
||||
data: 'unit_id',
|
||||
name: 'unit_id'
|
||||
},
|
||||
{
|
||||
data: 'equipment_type_id',
|
||||
name: 'equipment_type_id'
|
||||
},
|
||||
{
|
||||
data: 'action',
|
||||
name: 'action',
|
||||
orderable: false,
|
||||
searchable: false
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
$('#receiveUnitsClientRelated1, #receiveNumberProject, #tipo_valvulasList').on('change', function() {
|
||||
dataTable.ajax.reload();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
{{-- <script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
// $('#card-receiveUnitsClientRelated').hide();
|
||||
|
||||
// Evento de mudança para o campo onde numberProject é selecionado
|
||||
$('#receiveNumberProject').on('change', function() {
|
||||
|
||||
var numberProject = $(this).val();
|
||||
|
||||
if (numberProject) {
|
||||
$.ajax({
|
||||
url: '/api/receiveUnits/' + numberProject,
|
||||
type: 'GET',
|
||||
success: function(data) {
|
||||
// Supondo que 'data' é um array de objetos com 'id' e 'name'
|
||||
var options = "<option value='#' selected>Mostrar Todos</option>";
|
||||
$.each(data, function(index, item) {
|
||||
options += "<option value='" + item.id + "'>" + item
|
||||
.name + "</option>";
|
||||
});
|
||||
|
||||
$('#receiveUnitsClientRelated').html(options);
|
||||
},
|
||||
error: function() {
|
||||
// Tratamento de erro
|
||||
console.log('Erro ao carregar dados');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script> --}}
|
||||
|
||||
|
||||
{{-- Nao vai precisar de scritp, pois este filtro nao vai precisar ser altera. --}}
|
||||
{{-- <script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#receiveNumberProject').on('change', function() {
|
||||
var numberProject = $(this).val();
|
||||
|
||||
if (numberProject) {
|
||||
$.ajax({
|
||||
url: '/api/receiveUnits/' + numberProject,
|
||||
type: 'GET',
|
||||
success: function(data) {
|
||||
console.log(data);
|
||||
var options = "<option value='#' selected>Mostrar Todos</option>";
|
||||
$.each(data, function(index, item) {
|
||||
options += "<option value='" + item.id + "'>" + item
|
||||
.name + "</option>";
|
||||
});
|
||||
|
||||
$('#receiveUnitsClientRelated').html(options);
|
||||
},
|
||||
error: function() {
|
||||
console.log('Erro ao carregar dados');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script> --}}
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#equipmentType_id_list').on('change', function() {
|
||||
|
|
|
|||
1249
resources/views/projectsClients/testRoute.blade.php
Normal file
1249
resources/views/projectsClients/testRoute.blade.php
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -37,7 +37,10 @@
|
|||
|
||||
Route::get('cancelElementalTaskForEquipment/{equipmentID}', [WorkstationsJobsController::class, 'cancelElementalTaskForEquipment'])->name('cancelElementalTaskForEquipment');
|
||||
|
||||
Route::get('test2/{equipmentID}/{projectID?}',[ExecutionProjectController::class,'test11'])->name('test11');
|
||||
|
||||
// Nao gosto que esteja neste controller, verificar mais tarde
|
||||
Route::get('test2/{projectID}/{equipmentID}', [ProjectoDatacontroller::class, 'test11'])->name('test11');
|
||||
Route::get('manageAssets/{equipmentID}', [ProjectoDatacontroller::class, 'test22'])->name('test22');
|
||||
|
||||
|
||||
Route::get('getDataEquipment', [ExecutionProjectController::class, 'getDataEquipment'])->name('getDataEquipment');
|
||||
|
|
@ -204,3 +207,12 @@
|
|||
Route::get('/api/equipment/{id}', [CreateProjectController::class, 'showJson']);
|
||||
Route::get('/api/installations/', [CreateProjectController::class, 'getByUserNif']);
|
||||
Route::get('/api/ambits/{equipmentType}', [CreateProjectController::class, 'getAmbits']);
|
||||
|
||||
|
||||
// Route::get('/api/receiveUnits', [CreateProjectController::class, 'receiveUnits']);
|
||||
//Rota Api diretamente para a cracao da Obra
|
||||
Route::get('/api/receiveUnits/{numberProject}', [CreateProjectController::class, 'receiveUnits']);
|
||||
|
||||
Route::get('api/receivePlants/{receiveAllClients}', [ProjectoDatacontroller::class, 'receivePlants']);
|
||||
|
||||
Route::get('api/receiveUnitsManageAssets/{receivePlantClientRelated}',[ProjectoDatacontroller::class, 'receiveUnitsManageAssets']);
|
||||
Loading…
Reference in New Issue
Block a user