Authentication: - Laravel Fortify + Sanctum with Inertia views - RBAC middleware (admin, project_owner, team_member, viewer) - Retro terminal-styled login/register/forgot-password pages Metro Map (core UI): - D3.js zoomable SVG canvas with metro line rendering - Station nodes with glow-on-hover, status coloring, tooltips - Breadcrumb navigation for multi-level drill-down - Node preview panel with zoom-in action - C64-style CLI bar with blinking cursor at bottom Backend services: - ProjectService (CRUD, phase transitions, park/stop, audit logging) - ThemaService (CRUD with audit) - MapDataService (strategy map L1, project map L2) - Thin controllers: MapController, ProjectController, ThemaController - 32 routes total (auth + app + API) Style foundation: - Retro-futurism theme: VT323, Press Start 2P, IBM Plex Mono fonts - Dark palette with cyan/orange/green/purple neon accents - Comprehensive seed data (4 themes, 12 projects, commitments, deps) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
53 lines
1.4 KiB
PHP
53 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Models\Thema;
|
|
use App\Services\ThemaService;
|
|
use Illuminate\Http\Request;
|
|
use Inertia\Inertia;
|
|
|
|
class ThemaController extends Controller
|
|
{
|
|
public function __construct(
|
|
private ThemaService $themaService
|
|
) {}
|
|
|
|
public function index()
|
|
{
|
|
return Inertia::render('Thema/Index', [
|
|
'themas' => $this->themaService->getAll(),
|
|
]);
|
|
}
|
|
|
|
public function store(Request $request)
|
|
{
|
|
$validated = $request->validate([
|
|
'naam' => 'required|string|max:255',
|
|
'beschrijving' => 'nullable|string',
|
|
'prioriteit' => 'nullable|string',
|
|
'periode_start' => 'nullable|date',
|
|
'periode_eind' => 'nullable|date|after:periode_start',
|
|
]);
|
|
|
|
$this->themaService->create($validated);
|
|
|
|
return back()->with('success', 'Thema aangemaakt.');
|
|
}
|
|
|
|
public function update(Request $request, Thema $thema)
|
|
{
|
|
$validated = $request->validate([
|
|
'naam' => 'sometimes|string|max:255',
|
|
'beschrijving' => 'nullable|string',
|
|
'prioriteit' => 'nullable|string',
|
|
'periode_start' => 'nullable|date',
|
|
'periode_eind' => 'nullable|date',
|
|
]);
|
|
|
|
$this->themaService->update($thema, $validated);
|
|
|
|
return back()->with('success', 'Thema bijgewerkt.');
|
|
}
|
|
}
|