Public Access
Bewerbungsformular update
This commit is contained in:
1 parent
20558065ad
commit
bdb62a6ce2
13 files changed
+646
-171
No files matched your search
@@ -0,0 +1,82 @@
|
||||
@extends('template')
|
||||
@section('title','Admin · Bewerbung #'.$application->id)
|
||||
@section('content')
|
||||
@if(session('success'))
|
||||
<div class="alert alert-success">{{ session('success') }}</div>
|
||||
@endif
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<h1 class="h4 mb-0">Bewerbung #{{ $application->id }}</h1>
|
||||
<a class="btn btn-outline-secondary btn-sm" href="{{ route('admin.bewerbungen.show', $application->bewerbung) }}">Zurück zur Runde</a>
|
||||
</div>
|
||||
|
||||
<div class="row g-3">
|
||||
<div class="col-lg-7">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Band</h5>
|
||||
<div class="mb-2"><strong>Name:</strong> {{ optional($application->band)->name }}</div>
|
||||
<div class="mb-2"><strong>E-Mail:</strong> {{ optional($application->band)->email }}</div>
|
||||
@if(optional($application->band)->phone)
|
||||
<div class="mb-2"><strong>Telefon:</strong> {{ $application->band->phone }}</div>
|
||||
@endif
|
||||
<div class="mb-2 d-flex flex-wrap gap-2">
|
||||
@if(optional($application->band)->website)<a href="{{ $application->band->website }}" target="_blank" class="btn btn-sm btn-outline-secondary">Website</a>@endif
|
||||
@if(optional($application->band)->spotify)<a href="{{ $application->band->spotify }}" target="_blank" class="btn btn-sm btn-outline-secondary">Spotify</a>@endif
|
||||
@if(optional($application->band)->instagram)<a href="{{ $application->band->instagram }}" target="_blank" class="btn btn-sm btn-outline-secondary">Instagram</a>@endif
|
||||
@if(optional($application->band)->youtube)<a href="{{ $application->band->youtube }}" target="_blank" class="btn btn-sm btn-outline-secondary">YouTube</a>@endif
|
||||
@if(optional($application->band)->tech_rider_path)<a href="{{ Storage::disk('public')->url($application->band->tech_rider_path) }}" target="_blank" class="btn btn-sm btn-outline-secondary">Tech Rider</a>@endif
|
||||
@if(optional($application->band)->stage_plan_path)<a href="{{ Storage::disk('public')->url($application->band->stage_plan_path) }}" target="_blank" class="btn btn-sm btn-outline-secondary">Stage Plan</a>@endif
|
||||
</div>
|
||||
@if(optional($application->band)->about)
|
||||
<div class="mt-3">
|
||||
<strong>Über die Band</strong>
|
||||
<p class="mb-0">{{ $application->band->about }}</p>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-5">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Bewerbung</h5>
|
||||
<div class="mb-2"><strong>Runde:</strong> {{ $application->bewerbung->name }}</div>
|
||||
<div class="mb-2"><strong>Eingang:</strong> {{ $application->created_at->format('d.m.Y H:i') }}</div>
|
||||
<div class="mb-2"><strong>Status:</strong> @include('components.status-badge', ['status' => $application->status])</div>
|
||||
|
||||
<form class="mt-2 d-flex gap-2" method="POST" action="{{ route('admin.applications.status', $application) }}">
|
||||
@csrf
|
||||
@method('PATCH')
|
||||
<select name="status" class="form-select form-select-sm" style="max-width: 240px;">
|
||||
@foreach(['submitted' => 'Eingereicht','in_review' => 'In Prüfung','accepted' => 'Zugesagt','rejected' => 'Abgesagt'] as $val => $label)
|
||||
<option value="{{ $val }}" @selected(old('status', $application->status) === $val)>{{ $label }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<button class="btn btn-sm btn-primary">Speichern</button>
|
||||
</form>
|
||||
|
||||
@if($errors->any())
|
||||
<div class="alert alert-danger mt-3">
|
||||
<ul class="mb-0">
|
||||
@foreach($errors->all() as $e)
|
||||
<li>{{ $e }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mt-3">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Nachricht</h5>
|
||||
<p class="mb-0" style="white-space: pre-wrap;">{{ $application->message }}</p>
|
||||
@if($application->demo_link)
|
||||
<p class="mt-2"><strong>Demo:</strong> <a href="{{ $application->demo_link }}" target="_blank">{{ $application->demo_link }}</a></p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,87 @@
|
||||
@extends('template')
|
||||
@section('title','Admin · Bewerbungsrunden')
|
||||
|
||||
@section('content')
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<h1 class="h4 mb-0">Bewerbungsrunden</h1>
|
||||
</div>
|
||||
|
||||
{{-- Live-Filter UI (Vue) --}}
|
||||
<div id="admin-bewerbungen-index" class="card mb-3">
|
||||
<div class="card-body">
|
||||
<div class="row g-2 align-items-center">
|
||||
<div class="col-md-6">
|
||||
<input type="search" class="form-control" placeholder="Suchen (Name/Zeitraum)..." v-model="q">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" id="activeOnly" v-model="activeOnly">
|
||||
<label class="form-check-label" for="activeOnly">Nur aktive anzeigen</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 text-md-end">
|
||||
<button class="btn btn-sm btn-outline-secondary" @click="clear">Zurücksetzen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover align-middle">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Zeitraum</th>
|
||||
<th>Aktiv</th>
|
||||
<th class="text-end">Bewerbungen</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<template v-if="filtered.length">
|
||||
<tr v-for="b in filtered" :key="b.id">
|
||||
<td class="fw-semibold">@{{ b.name }}</td>
|
||||
<td>@{{ b.period }}</td>
|
||||
<td>
|
||||
<span class="badge" :class="b.active ? 'text-bg-success' : 'text-bg-secondary'">
|
||||
@{{ b.active ? 'aktiv' : 'inaktiv' }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="text-end">@{{ b.applications_count }}</td>
|
||||
<td class="text-end">
|
||||
<a class="btn btn-sm btn-outline-primary" :href="b.url">Öffnen</a>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
<tr v-else><td colspan="5" class="text-muted">Keine Treffer.</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{-- Original Laravel-Pagination ist ausgeblendet, da die Liste clientseitig gefiltert wird. --}}
|
||||
{{-- {{ $bewerbungen->links() }} --}}
|
||||
|
||||
{{-- Serverdaten für Vue als JSON bereitstellen --}}
|
||||
<script type="application/json" id="admin-bewerbungen-index-data">
|
||||
@php
|
||||
echo json_encode([
|
||||
'items' => $bewerbungen->map(function($b){
|
||||
return [
|
||||
'id' => $b->id,
|
||||
'name' => $b->name,
|
||||
'period' => trim(($b->start_at ? $b->start_at->format('d.m.Y') : '') . ' – ' . ($b->end_at ? $b->end_at->format('d.m.Y') : '')),
|
||||
'active' => (bool)$b->active,
|
||||
'applications_count' => (int)($b->applications_count ?? 0),
|
||||
'url' => route('admin.bewerbungen.show', $b),
|
||||
];
|
||||
})->values(),
|
||||
], JSON_UNESCAPED_UNICODE);
|
||||
@endphp
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
{{-- Vue 3 CDN + App --}}
|
||||
<script src="https://unpkg.com/vue@3/dist/vue.global.prod.js"></script>
|
||||
<script src="/js/admin-live-filters.js"></script>
|
||||
@endpush
|
||||
@@ -0,0 +1,121 @@
|
||||
@extends('template')
|
||||
@section('title','Admin · Runde: ' . $bewerbung->name)
|
||||
|
||||
@section('content')
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<div>
|
||||
<h1 class="h4 mb-0">Runde: {{ $bewerbung->name }}</h1>
|
||||
<small class="text-muted">
|
||||
@if($bewerbung->start_at) Start: {{ $bewerbung->start_at->format('d.m.Y') }} @endif
|
||||
@if($bewerbung->end_at) · Ende: {{ $bewerbung->end_at->format('d.m.Y') }} @endif
|
||||
· Status: @if($bewerbung->active)<span class="badge text-bg-success">aktiv</span>@else<span class="badge text-bg-secondary">inaktiv</span>@endif
|
||||
</small>
|
||||
</div>
|
||||
<div class="d-flex gap-2">
|
||||
<a class="btn btn-outline-secondary btn-sm" href="{{ route('admin.bewerbungen.index') }}">Zurück</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Live-Filter UI --}}
|
||||
<div id="admin-bewerbungen-show" class="card mb-3">
|
||||
<div class="card-body">
|
||||
<div class="row g-2">
|
||||
<div class="col-lg-4">
|
||||
<input type="search" class="form-control" placeholder="Suchen (Band/E-Mail)..." v-model="q">
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<select class="form-select" v-model="status">
|
||||
<option value="">Alle Status</option>
|
||||
<option value="submitted">Eingereicht</option>
|
||||
<option value="in_review">In Prüfung</option>
|
||||
<option value="accepted">Zugesagt</option>
|
||||
<option value="rejected">Abgesagt</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
<input type="date" class="form-control" v-model="dateFrom" placeholder="von">
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
<input type="date" class="form-control" v-model="dateTo" placeholder="bis">
|
||||
</div>
|
||||
<div class="col-lg-1 text-lg-end">
|
||||
<button class="btn btn-outline-secondary w-100" @click="reset">Reset</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped align-middle">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Band</th>
|
||||
<th>E-Mail</th>
|
||||
<th>Status</th>
|
||||
<th>Datum</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<template v-if="filtered.length">
|
||||
<tr v-for="app in filtered" :key="app.id">
|
||||
<td>@{{ app.id }}</td>
|
||||
<td>@{{ app.band }}</td>
|
||||
<td>@{{ app.email }}</td>
|
||||
<td>
|
||||
<span class="badge"
|
||||
:class="{
|
||||
'text-bg-secondary': app.status==='submitted',
|
||||
'text-bg-warning': app.status==='in_review',
|
||||
'text-bg-success': app.status==='accepted',
|
||||
'text-bg-danger': app.status==='rejected'
|
||||
}">
|
||||
@{{ app.status_label }}
|
||||
</span>
|
||||
</td>
|
||||
<td>@{{ app.created_label }}</td>
|
||||
<td class="text-end">
|
||||
<a class="btn btn-sm btn-outline-primary" :href="app.url">Öffnen</a>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
<tr v-else><td colspan="6" class="text-muted">Keine Treffer.</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{-- Serverseitige Pagination ausgeblendet, da wir clientseitig filtern. --}}
|
||||
{{-- {{ $applications->links() }} --}}
|
||||
|
||||
{{-- Serverdaten als JSON --}}
|
||||
<script type="application/json" id="admin-bewerbungen-show-data">
|
||||
@php
|
||||
echo json_encode([
|
||||
'items' => $applications->map(function($app){
|
||||
return [
|
||||
'id' => $app->id,
|
||||
'band' => optional($app->band)->name,
|
||||
'email' => optional($app->band)->email,
|
||||
'status' => $app->status,
|
||||
'status_label' => match($app->status) {
|
||||
'submitted' => 'Eingereicht',
|
||||
'in_review' => 'In Prüfung',
|
||||
'accepted' => 'Zugesagt',
|
||||
'rejected' => 'Abgesagt',
|
||||
default => $app->status,
|
||||
},
|
||||
'created_at' => optional($app->created_at)?->toIso8601String(),
|
||||
'created_label' => optional($app->created_at)?->format('d.m.Y H:i'),
|
||||
'url' => route('admin.applications.show', $app),
|
||||
];
|
||||
})->values(),
|
||||
], JSON_UNESCAPED_UNICODE);
|
||||
@endphp
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="https://unpkg.com/vue@3/dist/vue.global.prod.js"></script>
|
||||
<script src="/js/admin-live-filters.js"></script>
|
||||
@endpush
|
||||
Reference in new issue
Block a user