Files
bandtoolv2/resources/views/bewerbung/index.blade.php
T
2025-10-17 10:22:41 +02:00

60 lines
2.2 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@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