
<?php

use App\Http\Controllers\AgendaController;
use App\Http\Controllers\PlanesController;
use App\Http\Controllers\RoleController;
use App\Http\Controllers\WinController;
use Illuminate\Support\Facades\Route;



Route::prefix('agendas')->group(function () {
    Route::post('/agenreg2', [AgendaController::class, 'store2']);
Route::get('/agenda-dato', [AgendaController::class, 'datos']);   
 Route::post('/agenda-update', [AgendaController::class, 'update']);
});





Route::prefix('winro')->group(function () {

Route::post('/ventareg', [WinController::class, 'store'])->name('winventas.reg');

    Route::get('/regventasperus', [WinController::class, 'ventaregperufibra']);
    Route::get('/regventaswin', [WinController::class, 'winregistrovista']);
    Route::post('/winventas/filtrar', [WinController::class, 'selectwinventafiltro'])->name('winventas.filtrar');
    Route::get('/mventas', [WinController::class, 'selectwinventabyvendedor']);
    Route::get('/ventas2', [WinController::class, 'selectwinventabyuser']);
    Route::get('/selectvemtawinid', [WinController::class, 'selectwinventabyid']);
    Route::get('/selectplanclienteid', [WinController::class, 'selectplanclienteopcionesid']);
   
    Route::put('/actualizar/{id}', [WinController::class, 'updateval']);
});


Route::prefix('planes')->group(function () {
Route::get('/servicios', [PlanesController::class, 'getServicios'])->name('plan.ofer');
Route::get('/velocidades/{id}', [PlanesController::class, 'getVelocidades'])->name('plan.vel');
Route::get('/tv/{id}', [PlanesController::class, 'getOpcionesTV'])->name('plan.tb');
Route::get('/fijo/{id}', [PlanesController::class, 'getFijo'])->name('plan.tv');
});



Route::get('/roles/data', [RoleController::class, 'data'])->name('roles.data');
Route::resource('roles', RoleController::class)->except(['show', 'create']);