<?php

use App\Http\Controllers\Employee\AgendaController;
use App\Http\Controllers\Employee\DashboardController;
use App\Http\Controllers\Employee\ServiceController;
use Illuminate\Support\Facades\Route;

Route::middleware(['auth', 'role:employee', 'company.active'])
    ->prefix('agenda')
    ->name('employee.')
    ->group(function () {
        Route::get('/dashboard', [DashboardController::class, 'index'])->name('dashboard');
        Route::get('/',          [AgendaController::class, 'index'])->name('agenda');
        Route::middleware(['plan.active', 'module:services'])->group(function () {
            Route::get('/servicios', [ServiceController::class, 'index'])->name('services.index');
            Route::put('/servicios', [ServiceController::class, 'update'])->name('services.update');
        });
    });
