This commit is contained in:
Nils Bonorden committed 2025-10-17 10:22:41 +02:00
1 parent 3db040e243
commit 9a3187f9b6
11 files changed
+332 -114

No files matched your search

+59
View File
@@ -0,0 +1,59 @@
@extends('template')
@section('title', 'Bewerbungen')
@section('content')
<div class="container mt-4">
<div class="d-flex justify-content-between align-items-center mb-3">
<h1 class="h3">Bewerbungen</h1>
<a href="{{ route('bewerbungen.create') }}" class="btn btn-primary">Neu</a>
</div>
@if(session('success'))
<div class="alert alert-success">{{ session('success') }}</div>
@endif
<table class="table table-striped align-middle">
<thead>
<tr>
<th>#</th>
<th>Name</th>
<th>Aktiv</th>
<th>Zeitraum</th>
<th>Erstellt</th>
<th class="text-end">Aktionen</th>
</tr>
</thead>
<tbody>
@forelse($bewerbungen as $b)
<tr>
<td>{{ $b->id }}</td>
<td>{{ $b->name }}</td>
<td>
<span class="badge {{ $b->active ? 'bg-success' : 'bg-secondary' }}">
{{ $b->active ? 'Ja' : 'Nein' }}
</span>
</td>
<td>
@if($b->start_at) {{ $b->start_at->format('d.m.Y H:i') }} @endif
@if($b->end_at) – {{ $b->end_at->format('d.m.Y H:i') }} @endif
</td>
<td>{{ optional($b->created_at)->format('d.m.Y H:i') }}</td>
<td class="text-end">
<a href="{{ route('bewerbungen.show', $b) }}" class="btn btn-sm btn-outline-secondary">Anzeigen</a>
<a href="{{ route('bewerbungen.edit', $b) }}" class="btn btn-sm btn-outline-primary">Bearbeiten</a>
<form action="{{ route('bewerbungen.destroy', $b) }}" method="POST" class="d-inline" onsubmit="return confirm('Wirklich löschen?');">
@csrf
@method('DELETE')
<button class="btn btn-sm btn-outline-danger">Löschen</button>
</form>
</td>
</tr>
@empty
<tr><td colspan="6">Keine Bewerbungen vorhanden.</td></tr>
@endforelse
</tbody>
</table>
{{ $bewerbungen->links() }}
</div>
@endsection