2022-06-14 01:21:39 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Http\Request;
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
use App\Http\Controllers\Api\UserController;
|
2022-07-09 03:09:04 +00:00
|
|
|
use App\Http\Controllers\Api\EstandarController;
|
2022-07-27 05:42:33 +00:00
|
|
|
use App\Http\Controllers\Api\PlanController;
|
2022-08-02 04:44:21 +00:00
|
|
|
use App\Http\Controllers\Api\AccionesMejorasController;
|
|
|
|
use App\Http\Controllers\Api\CausasRaicesController;
|
|
|
|
use App\Http\Controllers\Api\FuentesController;
|
|
|
|
use App\Http\Controllers\Api\ObservacionesController;
|
|
|
|
use App\Http\Controllers\Api\ProblemasOportunidadesController;
|
|
|
|
use App\Http\Controllers\Api\RecursosController;
|
2022-08-05 06:25:59 +00:00
|
|
|
use App\Http\Controllers\Api\MetasController;
|
2022-08-09 05:04:46 +00:00
|
|
|
use App\Http\Controllers\Api\FuentesValoresController;
|
|
|
|
use App\Http\Controllers\Api\ResponsablesValoresController;
|
2022-08-13 02:27:34 +00:00
|
|
|
use App\Http\Controllers\Api\ResponsablesController;
|
|
|
|
use App\Http\Controllers\Api\EstadosValoresController;
|
2022-08-17 01:11:22 +00:00
|
|
|
use App\Http\Controllers\Api\EvidenciasController;
|
2022-08-18 00:17:47 +00:00
|
|
|
use App\Http\Controllers\Api\LoginController;
|
2022-10-11 05:29:23 +00:00
|
|
|
use App\Http\Controllers\Api\NarrativasController;
|
2022-06-14 01:21:39 +00:00
|
|
|
|
2022-11-05 16:53:41 +00:00
|
|
|
//Rutas de Auth
|
|
|
|
Route::post('login', [LoginController::class, 'login'])->name('login');
|
2022-08-18 00:17:47 +00:00
|
|
|
Route::get('login/{provider}', [LoginController::class, 'redirectToProvider']);
|
|
|
|
Route::get('login/{provider}/callback', [LoginController::class, 'handleProviderCallback']);
|
|
|
|
|
|
|
|
|
2022-08-09 05:04:46 +00:00
|
|
|
//Responsables Valores
|
2022-10-20 07:34:46 +00:00
|
|
|
Route::get('responsables', [ResponsablesValoresController::class, 'listResponsablesValores']);
|
2022-08-09 05:04:46 +00:00
|
|
|
//fuentes Valores
|
2022-10-20 07:34:46 +00:00
|
|
|
Route::get('fuentes', [FuentesValoresController::class, 'listFuentesValores']);
|
2022-08-17 01:11:22 +00:00
|
|
|
//Estados valores
|
2022-10-20 07:34:46 +00:00
|
|
|
Route::get('estados', [EstadosValoresController::class, 'listEstadosValores']);
|
2022-08-17 01:11:22 +00:00
|
|
|
//Estandares valores
|
2022-10-20 07:34:46 +00:00
|
|
|
Route::get('estandares', [EstandarController::class, 'listEstandarValores']);
|
2022-06-14 01:21:39 +00:00
|
|
|
|
2022-10-28 01:55:32 +00:00
|
|
|
|
|
|
|
|
2022-10-20 07:34:46 +00:00
|
|
|
Route::middleware("auth:sanctum")->group(function () {
|
2022-11-05 16:53:41 +00:00
|
|
|
//Rutas de Auth
|
|
|
|
Route::get('logout', [LoginController::class, 'logout']);
|
|
|
|
|
|
|
|
//Rutas de Gestion de usarios
|
2022-10-20 07:34:46 +00:00
|
|
|
Route::get('user-profile', [UserController::class, 'userProfile']);
|
2022-11-07 02:19:36 +00:00
|
|
|
Route::put('update', [UserController::class, 'updateRoleEstado']);
|
2022-10-20 07:34:46 +00:00
|
|
|
Route::post('register', [UserController::class, 'register']);
|
2022-11-05 16:53:41 +00:00
|
|
|
Route::get('user', [UserController::class, 'listUser']);
|
|
|
|
Route::get('enabled_users', [UserController::class, 'listUserHabilitados']);
|
2022-07-09 03:09:04 +00:00
|
|
|
|
|
|
|
//rutas estandar
|
2022-10-20 07:34:46 +00:00
|
|
|
Route::post('estandar', [EstandarController::class, 'createEstandar']);
|
|
|
|
Route::get('estandar', [EstandarController::class, 'listEstandar']);
|
2022-10-22 06:30:51 +00:00
|
|
|
Route::get('estandar/{id}', [EstandarController::class, 'showEstandar'])->where('id', '[0-9]+');
|
|
|
|
Route::put('estandar/{id}', [EstandarController::class, 'updateEstandar'])->where('id', '[0-9]+');
|
|
|
|
Route::delete('estandar/{id}', [EstandarController::class, 'deleteEstandar'])->where('id', '[0-9]+');
|
2022-07-09 03:09:04 +00:00
|
|
|
|
2022-07-27 05:42:33 +00:00
|
|
|
//rutas plan
|
2022-10-20 07:34:46 +00:00
|
|
|
Route::post('plan', [PlanController::class, 'createPlan']);
|
|
|
|
Route::get('plan', [PlanController::class, 'listPlan']);
|
2022-10-22 06:30:51 +00:00
|
|
|
Route::get('plan/{id}', [PlanController::class, 'showPlan'])->where('id', '[0-9]+');
|
|
|
|
Route::delete('plan/{id}', [PlanController::class, 'deletePlan'])->where('id', '[0-9]+');
|
|
|
|
Route::put('plan/{id}', [PlanController::class, 'update'])->where('id', '[0-9]+');
|
2022-10-20 07:34:46 +00:00
|
|
|
Route::get('plans/user', [PlanController::class, 'listPlanUser']);
|
2022-10-22 05:10:31 +00:00
|
|
|
Route::post('plan/asignar', [PlanController::class, 'assignPlan']);
|
2022-11-04 06:15:33 +00:00
|
|
|
Route::get('plan/export/{id}', [PlanController::class, 'exportPlan'])->where('id', '[0-9]+');
|
2022-08-22 20:50:45 +00:00
|
|
|
//Route::put('plan',[PlanController::class,'updatePlan']);
|
2022-08-02 04:44:21 +00:00
|
|
|
|
2022-10-28 01:55:32 +00:00
|
|
|
|
|
|
|
|
2022-08-02 04:44:21 +00:00
|
|
|
//rutas metas
|
2022-10-20 07:34:46 +00:00
|
|
|
Route::post('meta', [MetasController::class, 'create']);
|
|
|
|
Route::put('meta', [MetasController::class, 'update']);
|
2022-10-22 06:30:51 +00:00
|
|
|
Route::delete('meta/{id}', [MetasController::class, 'delete'])->where('id', '[0-9]+');
|
2022-08-02 04:44:21 +00:00
|
|
|
|
|
|
|
//rutas accionesmejoras
|
2022-10-20 07:34:46 +00:00
|
|
|
Route::post('accionmejora', [AccionesMejorasController::class, 'create']);
|
|
|
|
Route::put('accionmejora', [AccionesMejorasController::class, 'update']);
|
2022-10-22 06:30:51 +00:00
|
|
|
Route::delete('accionmejora/{id}', [AccionesMejorasController::class, 'delete'])->where('id', '[0-9]+');
|
2022-08-02 04:44:21 +00:00
|
|
|
|
|
|
|
//rutas fuentes
|
2022-10-20 07:34:46 +00:00
|
|
|
Route::post('fuente', [FuentesController::class, 'create']);
|
|
|
|
Route::put('fuente', [FuentesController::class, 'update']);
|
2022-10-22 06:30:51 +00:00
|
|
|
Route::delete('fuente/{id}', [FuentesController::class, 'delete'])->where('id', '[0-9]+');
|
2022-08-02 04:44:21 +00:00
|
|
|
|
|
|
|
//rutas observaciones
|
2022-10-20 07:34:46 +00:00
|
|
|
Route::post('observacion', [ObservacionesController::class, 'create']);
|
|
|
|
Route::put('observacion', [ObservacionesController::class, 'update']);
|
2022-10-22 06:30:51 +00:00
|
|
|
Route::delete('observacion/{id}', [ObservacionesController::class, 'delete'])->where('id', '[0-9]+');
|
2022-08-02 04:44:21 +00:00
|
|
|
|
|
|
|
//rutas problemas
|
2022-10-20 07:34:46 +00:00
|
|
|
Route::post('problema', [ProblemasOportunidadesController::class, 'create']);
|
|
|
|
Route::put('problema', [ProblemasOportunidadesController::class, 'update']);
|
2022-10-22 06:30:51 +00:00
|
|
|
Route::delete('problema/{id}', [ProblemasOportunidadesController::class, 'delete'])->where('id', '[0-9]+');
|
2022-07-27 05:42:33 +00:00
|
|
|
|
2022-08-02 04:44:21 +00:00
|
|
|
//rutas recursos
|
2022-10-20 07:34:46 +00:00
|
|
|
Route::post('recurso', [RecursosController::class, 'create']);
|
|
|
|
Route::put('recurso', [RecursosController::class, 'update']);
|
2022-10-22 06:30:51 +00:00
|
|
|
Route::delete('recurso/{id}', [RecursosController::class, 'delete'])->where('id', '[0-9]+');
|
2022-08-17 01:11:22 +00:00
|
|
|
|
2022-08-02 04:44:21 +00:00
|
|
|
//rutas casuasraiz
|
2022-10-20 07:34:46 +00:00
|
|
|
Route::post('causa', [CausasRaicesController::class, 'create']);
|
|
|
|
Route::put('causa', [CausasRaicesController::class, 'update']);
|
2022-10-22 06:30:51 +00:00
|
|
|
Route::delete('causa/{id}', [CausasRaicesController::class, 'delete'])->where('id', '[0-9]+');
|
2022-08-01 01:21:58 +00:00
|
|
|
|
2022-08-09 05:04:46 +00:00
|
|
|
//ruta responsables
|
2022-10-20 07:34:46 +00:00
|
|
|
Route::post('responsable', [ResponsablesController::class, 'create']);
|
|
|
|
Route::put('responsable', [ResponsablesController::class, 'update']);
|
2022-10-22 06:30:51 +00:00
|
|
|
Route::delete('responsable/{id}', [ResponsablesController::class, 'delete'])->where('id', '[0-9]+');
|
2022-10-20 07:34:46 +00:00
|
|
|
|
|
|
|
//ruta evidencias
|
|
|
|
Route::post('evidencia', [EvidenciasController::class, 'create']);
|
2022-10-22 06:30:51 +00:00
|
|
|
Route::get('evidencia/download/{id}', [EvidenciasController::class, 'download'])->where('id', '[0-9]+');
|
|
|
|
Route::get('evidencia/{id}', [EvidenciasController::class, 'show'])->where('id', '[0-9]+');
|
2022-10-20 07:34:46 +00:00
|
|
|
Route::put('evidencia', [EvidenciasController::class, 'update']);
|
2022-10-22 06:30:51 +00:00
|
|
|
Route::delete('evidencia/{id}', [EvidenciasController::class, 'delete'])->where('id', '[0-9]+');
|
2022-10-20 07:34:46 +00:00
|
|
|
|
|
|
|
//ruta narrativas
|
|
|
|
Route::post('narrativa', [NarrativasController::class, 'create']);
|
2022-10-22 06:30:51 +00:00
|
|
|
Route::get('narrativa/{id}', [NarrativasController::class, 'show'])->where('id', '[0-9]+');
|
2022-10-20 07:34:46 +00:00
|
|
|
Route::put('narrativa', [NarrativasController::class, 'update']);
|
2022-10-22 06:30:51 +00:00
|
|
|
Route::delete('narrativa/{id}', [NarrativasController::class, 'delete'])->where('id', '[0-9]+');
|
2022-10-20 07:34:46 +00:00
|
|
|
Route::get('narrativa', [NarrativasController::class, 'listNarrativas']);
|
2022-06-14 01:21:39 +00:00
|
|
|
});
|
|
|
|
|
2022-10-22 15:55:51 +00:00
|
|
|
/*Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
|
2022-06-14 01:21:39 +00:00
|
|
|
return $request->user();
|
2022-10-22 15:55:51 +00:00
|
|
|
});*/
|