Bewerbungsformular update

This commit is contained in:
Nils Bonorden committed 2025-10-24 15:05:16 +02:00
1 parent 20558065ad
commit bdb62a6ce2
13 files changed
+646 -171

No files matched your search

+20 -54
View File
@@ -1,59 +1,25 @@
@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>
<h1 class="h3 mb-3">Aktive Bewerbungen</h1>
@if($bewerbungen->isEmpty())
<div class="alert alert-info">Derzeit sind keine aktiven Bewerbungen sichtbar.</div>
@else
<div class="list-group">
@foreach($bewerbungen as $b)
<a class="list-group-item list-group-item-action" href="{{ route('bewerbung.show', $b) }}">
<strong>{{ $b->name }}</strong>
@if($b->start_at || $b->end_at)
<small class="text-muted d-block">
@if($b->start_at) Start: {{ $b->start_at->format('d.m.Y') }} @endif
@if($b->end_at) – Ende: {{ $b->end_at->format('d.m.Y') }} @endif
</small>
@endif
<small class="d-block">{{ Str::limit($b->text, 160) }}</small>
</a>
@endforeach
</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>
@endif
@endsection