124 lines
6.9 KiB
PHP
124 lines
6.9 KiB
PHP
<?php
|
|
$signatureUrl = function (?string $file): ?string {
|
|
if (!$file || !is_file(storage_path('img_storage/mitgliedsantrag/' . $file))) {
|
|
return null;
|
|
}
|
|
|
|
return '/img_storage/mitgliedsantrag/' . rawurlencode($file);
|
|
};
|
|
|
|
$signature1 = $signatureUrl($application->unterschrift_1);
|
|
$signature2 = $signatureUrl($application->unterschrift_2);
|
|
?>
|
|
|
|
<div class="container text-light mt-5">
|
|
<div class="row justify-content-center">
|
|
<div class="col-lg-11">
|
|
<div class="d-flex justify-content-between align-items-center mb-3">
|
|
<div>
|
|
<h1 class="mb-0">Antrag</h1>
|
|
<p class="text-muted mb-0">
|
|
<?= e(trim($application->vorname . ' ' . $application->nachname)) ?>
|
|
· Eingang:
|
|
<?= e($application->created_at ? date('d.m.Y H:i', strtotime($application->created_at)) : '') ?>
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<a href="/admin/antraege" class="btn btn-sm btn-outline-light">Zurück</a>
|
|
<button type="button" class="btn btn-sm btn-outline-light" onclick="window.print();">Drucken</button>
|
|
<?php if (empty($application->accepted_at)): ?>
|
|
<form action="/admin/antraege/<?= e($application->id) ?>/accept"
|
|
method="POST"
|
|
style="display:inline;"
|
|
onsubmit="return confirm('Diesen Antrag annehmen und den Benutzer zum Mitglied machen?');">
|
|
<?= csrf_field() ?>
|
|
<button type="submit" class="btn btn-sm btn-success">Annehmen</button>
|
|
</form>
|
|
<?php endif; ?>
|
|
<form action="/admin/antraege/<?= e($application->id) ?>/delete"
|
|
method="POST"
|
|
style="display:inline;"
|
|
onsubmit="return confirm('Diesen Antrag wirklich löschen? Die Unterschriften werden ebenfalls entfernt.');">
|
|
<?= csrf_field() ?>
|
|
<button type="submit" class="btn btn-sm btn-danger">Löschen</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card text-dark">
|
|
<div class="card-body">
|
|
<?php if (!empty($application->accepted_at)): ?>
|
|
<div class="alert alert-success" role="alert">
|
|
<strong>Angenommen</strong>
|
|
am <?= e(date('d.m.Y H:i', strtotime($application->accepted_at))) ?>
|
|
von <?= e($acceptedBy ? $acceptedBy->name : 'Unbekannt') ?>.
|
|
</div>
|
|
<?php else: ?>
|
|
<div class="alert alert-warning" role="alert">
|
|
Dieser Antrag wurde noch nicht angenommen.
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<h5 class="border-bottom border-danger pb-1 mb-3">Persönliche Angaben</h5>
|
|
|
|
<div class="table-responsive">
|
|
<table class="table table-sm table-bordered mb-4">
|
|
<tbody>
|
|
<tr><th style="width:220px;">Nachname</th><td><?= e($application->nachname) ?></td></tr>
|
|
<tr><th>Vorname</th><td><?= e($application->vorname) ?></td></tr>
|
|
<tr><th>Straße, Nr.</th><td><?= e($application->strasse) ?></td></tr>
|
|
<tr><th>PLZ, Ort</th><td><?= e($application->plz_ort) ?></td></tr>
|
|
<tr><th>Telefon / Mobile</th><td><?= e($application->telefon) ?></td></tr>
|
|
<tr><th>E-Mail</th><td><?= e($application->email) ?></td></tr>
|
|
<tr><th>Geburtsdatum</th><td><?= e(german_date($application->geburtsdatum)) ?></td></tr>
|
|
<tr><th>Motorrad</th><td><?= e($application->motorrad) ?></td></tr>
|
|
<tr><th>Aufnahme ab</th><td><?= e(german_date($application->aufnahme_ab)) ?></td></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<h5 class="border-bottom border-danger pb-1 mb-3">Unterschrift Mitgliedsantrag</h5>
|
|
|
|
<p class="mb-1"><strong>Ort / Datum:</strong> <?= e($application->ort_datum_1) ?></p>
|
|
|
|
<?php if ($signature1 !== null): ?>
|
|
<a href="<?= e($signature1) ?>" data-lightbox="antrag-<?= e($application->id) ?>" data-title="Unterschrift Mitgliedsantrag">
|
|
<img src="<?= e($signature1) ?>" alt="Unterschrift Mitgliedsantrag" class="signature-image">
|
|
</a>
|
|
<?php else: ?>
|
|
<p class="text-danger">Keine Unterschrift gespeichert.</p>
|
|
<?php endif; ?>
|
|
|
|
<h5 class="border-bottom border-danger pb-1 mb-3 mt-4">SEPA-Lastschriftmandat</h5>
|
|
|
|
<div class="table-responsive">
|
|
<table class="table table-sm table-bordered mb-4">
|
|
<tbody>
|
|
<tr><th style="width:220px;">Mandatsreferenz</th><td><?= e($application->mandatsreferenz) ?></td></tr>
|
|
<tr><th>Gläubiger-ID</th><td><?= e($application->glaeubiger_id) ?></td></tr>
|
|
<tr><th>Kontoinhaber</th><td><?= e($application->kontoinhaber) ?></td></tr>
|
|
<tr><th>Kreditinstitut</th><td><?= e($application->kreditinstitut) ?></td></tr>
|
|
<tr><th>BIC</th><td><?= e($application->bic) ?></td></tr>
|
|
<tr><th>IBAN</th><td><?= e($application->iban) ?></td></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<p class="mb-1"><strong>Ort / Datum:</strong> <?= e($application->ort_datum_2) ?></p>
|
|
|
|
<?php if ($signature2 !== null): ?>
|
|
<a href="<?= e($signature2) ?>" data-lightbox="antrag-<?= e($application->id) ?>" data-title="Unterschrift SEPA-Lastschriftmandat">
|
|
<img src="<?= e($signature2) ?>" alt="Unterschrift SEPA-Lastschriftmandat" class="signature-image">
|
|
</a>
|
|
<?php else: ?>
|
|
<p class="text-danger">Keine Unterschrift gespeichert.</p>
|
|
<?php endif; ?>
|
|
|
|
<p class="text-muted small mt-4 mb-0">
|
|
Antrags-ID: <?= e($application->id) ?> · Die Unterschriften sind ausschließlich für Admins sichtbar.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|