ispt4.0_laravel/routes/web.php

304 lines
14 KiB
PHP
Executable File

<?php
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Mail;
use App\Http\Controllers\Auth\ResetPasswordController;
use App\Http\Controllers\Auth\RegisteredUserController;
use App\Http\Controllers\Auth\PasswordResetLinkController;
use Illuminate\Foundation\Auth\EmailVerificationRequest;
use App\Http\Controllers\CustomRegistrationController;
use App\Http\Controllers\CreateProjectController;
use App\Http\Controllers\ForgotPasswordController;
use App\Http\Controllers\FormController;
use App\Http\Controllers\NewPasswordController;
use App\Http\Controllers\userController;
use App\Http\Controllers\Pending_UserController;
use App\Http\Controllers\ProjectoDatacontroller;
use App\Http\Controllers\PreparedProjectController;
use App\Http\Controllers\ExecutionProjectController;
use App\Http\Controllers\WorkstationsJobsController;
route::get('testt', function () {
return view('test');
});
Route::get('te102', function(){
return view('workstations.TE10(2)');
});
Route::get('user-data', [PreparedProjectController::class, 'getData1'])->name('getData');
Route::get('preparedProject/{ProjectId}', [PreparedProjectController::class, 'PreparedProject'])->name('preparedProject');
Route::get('EditProjectForArticulated', [PreparedProjectController::class, 'editProjectForArticulated'])->name('EditProjectForArticulated');
Route::get('ExecutionProject/{ProjectId}', [ExecutionProjectController::class, 'receiveExecutionProject'])->name('ExecutionProject');
Route::get('/ReceiveEquipmentIdForShowModal/{EquipmentID}', [ExecutionProjectController::class, 'receiveEquipmentIdForShowModal'])->name('ReceiveEquipmentIdForShowModal ');
// Email
Route::get('/your-verification-route/{id}/{hash}', [UserController::class, 'yourVerificationMethod'])
->middleware(['auth', 'signed', 'throttle:6,1'])
->name('verification.verify');
Route::get('/receiveThisShit', function () {
return redirect()->route('test');
})->name('verification.notice');
Route::get('/testExcel', function () {
return view('createProjectExcel');
})->name('testExcel');
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "web" middleware group. Make something great!
|
*/
/*
|--------------------------------------------------------------------------
| User_Type (Super_Administrador)
|--------------------------------------------------------------------------
|*** Routes unique access to the Super_Administrator, due to its sensitive data.
|
|
*/
// Route::middleware(['auth', 'verified', 'checksuperadmin', 'checkAdmin'])->group(function () {
// Profile page
Route::get('usersProfiles/{id}', [userController::class, 'UserProfile'])->name('usersProfiles');
Route::post('enviar-formulario', [FormController::class, 'enviarEmail'])->name('enviar.formulario');
/*
|--------------------------------------------------------------------------
| CRUD - users
|--------------------------------------------------------------------------
|
| Definition routes to implement the CRUD model
|
*/
/*
|--------------------------------------------------------------------------
| Create Users with Super Admin, Admin
|--------------------------------------------------------------------------
|
|The creation of records can be done by both the admin and the superAdmin,
|however the Admin will not have access to the data of the SupersAdmins only.
|
*/
Route::controller(userController::class)
->group(function () {
Route::get('users/listUsers', 'listUsers')->name('users.list');
Route::get('users/listCompanies', 'listCompanies')->name('users.company');
Route::get('users/{id}', 'show')->name('users.Show');
Route::get('users/{id}/edit', 'edit')->name('users.edit');
Route::put('users/{user}', 'update')->name('users.update');
Route::delete('users/{user}', 'destroy')->name('users.destroy');
Route::post('editProfile/{id}', 'EditProfile')->name('editProfile');
});
Route::controller(CreateProjectController::class)
->group(function () {
// indication of progress bar to projects that are in 'Planning'
Route::get('test1/{id}', 'showStep1')->name('test1');
Route::get('test2/{id}', 'showStep2')->name('test2');
Route::get('test3/{id}', 'showStep3')->name('test3');
// Para adicionar uma tarefa Complementar
Route::post('addFurtherTasks', 'addFurtherTasks')->name('addFurtherTasks');
Route::post('deleteFurtherTasks', 'deleteFurtherTasks')->name('deleteFurtherTasks');
Route::get('createProject', 'createProjectForStep1')->name('createProject');
Route::post('receiveEquipmentToAssociateTasks', 'receiveEquipmentToAssociateTasks')->name('receiveEquipmentToAssociateTasks');
Route::get('finishCreatingProject/{numberProject}', 'finishCreatingProject')->name('finishCreatingProject');
Route::get('testDataTables', 'testDataTables')->name('testDataTables');
Route::get('workstationsAssociationTasks', 'workstationsAssociationTasks')->name('workstationsAssociationTasks');
Route::get('AddNomenclatureWorkstation', 'AddNomenclatureWorkstation')->name('AddNomenclatureWorkstation');
Route::get('removeProjectEquipment', 'removeProjectEquipment')->name('removeProjectEquipment');
Route::delete('deleteWorkstation/{name}', 'deleteWorkstation')->name('deleteWorkstation');
Route::post('EditEquipmentsProjects', 'EditEquipmentsProjects')->name('EditEquipmentsProjects');
Route::post('newProject1', 'processStep1')->name('processStep1');
Route::post('createWorkStations', 'createWorkStations')->name('createWorkStations');
Route::post('test1', 'EditprocessStep1')->name('EditprocessStep1');
Route::post('test2', 'processStep2')->name('processStep2');
Route::post('test2CreateEquipment', 'createEquipmentManual')->name('test2CreateEquipment');
Route::post('test3', 'processStep3');
Route::delete('removeEquipment/{id}', 'removePendingEquipment')->name('removeEquipment');
Route::post('CreateNewEquipmentFromPendingEquipment/{id}', 'CreateNewEquipmentFromPendingEquipment')->name('CreateNewEquipmentFromPendingEquipment');
Route::get('template1/{numberProject}', 'receiveUnitsForExcelTemplate')->name('download');
Route::post('create-equipament-project', 'createEquipamentProject')->name('createEquipamentProject');
Route::get('equipments/{id}/attributes', 'getAttributes');
});
/*
|--------------------------------------------------------------------------
| Create Users with Super Admin
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "web" middleware group. Make something great!
|
*/
Route::get('manageAssets', [ProjectoDatacontroller::class, 'ManageAssets'])->name('manageAssets');
Route::middleware(['auth', 'checkUserType'])->group(function () {
// Rotas protegidas que exigem verificação de e-mail
Route::get('/', [ProjectoDatacontroller::class, ('HomePage')])->name('home');
Route::get('enterWorkstation', [WorkstationsJobsController::class, 'index'])->name('enterWorkstation');
/*
|--------------------------------------------------------------------------
| Create Projects with Super Admin and Admin
|--------------------------------------------------------------------------
|
|Crud model for the application's projects, where both their creation and the indication of project statuses are handled.
|
*/
Route::get('/CreateUsers/{id}', [Pending_UserController::class, 'ShowFormUser'])->name('ShowPendingUser');
Route::post('formulario/receive', [Pending_UserController::class, 'store'])->name('criarUser');
Route::post('/register', [CustomRegistrationController::class, 'store'])->name('register');
/*
|--------------------------------------------------------------------------
| CRUD -Instalation
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "web" middleware group. Make something great!
|
*/
// Mostrar Instalação click
Route::get('units/{id}', [ProjectoDatacontroller::class, 'showUnit'])->name('showUnit');
});
Route::get('/CreateUsers', [Pending_UserController::class, 'ListPendingUsers'])->name('CreateUsers');
/*
|--------------------------------------------------------------------------
| Template Excel
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "web" middleware group. Make something great!
|
*/
Route::get('formulario', function () {
return view('email/FormAdmin');
})->name('formulario');
/*
|--------------------------------------------------------------------------
| Create Project
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "web" middleware group. Make something great!
|
*/
/*
|--------------------------------------------------------------------------
| CRUD -Equipaments
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "web" middleware group. Make something great!
|
*/
// *** All api routes have been moved to api.php ***
Route::get('/api/receiveEquipmentsExecutionProject/{receiveNumberProject}', [ExecutionProjectController::class, 'receiveEquipmentsExecutionProject'])->name('receiveEquipmentsExecutionProject');
Route::get('/api/receiveAllEquipments', [ProjectoDatacontroller::class, 'receiveAllEquipments']);
Route::get('/api/receiveEquipmentsProject/{receiveNumberProject}', [ProjectoDatacontroller::class, 'receiveEquipmentsProject']);
Route::get('/api/receiveWorkstationProject/{receiveNumberProject}', [ProjectoDatacontroller::class, 'receiveWorkstationProject']);
Route::get('/api/getEquipmentDetails/{receiveListEquipmentId}', [ProjectoDatacontroller::class, 'getEquipmentDetails']);
Route::get('/api/receiveAllInstallationEquipment/{receiveNumberProject}', [ProjectoDatacontroller::class, 'receiveAllInstallationEquipment']);
Route::get('/api/receveTasksWorkstationPlanning/{WorkstationId}', [CreateProjectController::class, 'receveTasksWorkstationPlanning']);
Route::get('/api/ambits/prepared{equipmentType}', [PreparedProjectController::class, 'getAmbits']);
Route::get('/api/equipment/{id}', [CreateProjectController::class, 'showJson']);
Route::get('/api/installations/', [CreateProjectController::class, 'getByUserNif']);
Route::get('/api/ambits/{equipmentType}', [CreateProjectController::class, 'getAmbits']);
// Route::controller(CreateProjectController::class)
// ->group(function () {
// Route::post('receiveEquipmentToAssociateTasks', [CreateProjectController::class, 'receiveEquipmentToAssociateTasks'])->name('receiveEquipmentToAssociateTasks');
// Route::get('finishCreatingProject/{numberProject}', [CreateProjectController::class, 'finishCreatingProject'])->name('finishCreatingProject');
// Route::get('testDataTables', [CreateProjectController::class, 'testDataTables'])->name('testDataTables');
// Route::get('workstationsAssociationTasks', [CreateProjectController::class, 'workstationsAssociationTasks'])->name('workstationsAssociationTasks');
// Route::get('AddNomenclatureWorkstation', [CreateProjectController::class, 'AddNomenclatureWorkstation'])->name('AddNomenclatureWorkstation');
// Route::get('removeProjectEquipment', [CreateProjectController::class, 'removeProjectEquipment'])->name('removeProjectEquipment');
// Route::delete('deleteWorkstation/{name}', [CreateProjectController::class, 'deleteWorkstation'])->name('deleteWorkstation');
// Route::post('/EditEquipmentsProjects', [CreateProjectController::class, 'EditEquipmentsProjects'])->name('EditEquipmentsProjects');
// Route::get('/createProject', [CreateProjectController::class, 'createProjectForStep1'])->name('createProject');
// Route::post('/newProject1', [CreateProjectController::class, 'processStep1'])->name('processStep1');
// Route::post('/createWorkStations', [CreateProjectController::class, 'createWorkStations'])->name('createWorkStations');
// Route::get('/test1/{id}', [CreateProjectController::class, 'showStep1'])->name('test1');
// Route::get('/test2/{id}', [CreateProjectController::class, 'showStep2'])->name('test2');
// Route::get('/test3/{id}', [CreateProjectController::class, 'showStep3'])->name('test3');
// Route::post('test1', [CreateProjectController::class, 'EditprocessStep1'])->name('EditprocessStep1');
// Route::post('/test2', [CreateProjectController::class, 'processStep2'])->name('processStep2');
// Route::post('/test2CreateEquipment', [CreateProjectController::class, 'createEquipmentManual'])->name('test2CreateEquipment');
// Route::post('/test3', [CreateProjectController::class, 'processStep3']);
// Route::delete('/removeEquipment/{id}', [CreateProjectController::class, 'removePendingEquipment'])->name('removeEquipment');
// Route::post('CreateNewEquipmentFromPendingEquipment/{id}', [CreateProjectController::class, 'CreateNewEquipmentFromPendingEquipment'])->name('CreateNewEquipmentFromPendingEquipment');
// Route::get('/template1/{numberProject}', [CreateProjectController::class, 'receiveUnitsForExcelTemplate'])->name('download');
// Route::post('/create-equipament-project', [CreateProjectController::class, 'createEquipamentProject'])->name('createEquipamentProject');
// Route::get('/equipments/{id}/attributes', 'getAttributes');
// });