Compare commits

...

2 Commits

Author SHA1 Message Date
philipp lang abc792d5b7 Lint
continuous-integration/drone/push Build is passing Details
2025-11-12 01:48:56 +01:00
philipp lang 2f2c5c660b Fix stubs 2025-11-12 01:27:25 +01:00
2 changed files with 10 additions and 7 deletions

View File

@ -31,7 +31,11 @@ class CreateExcelDocumentAction
private function allSheet(Collection $participants): TableDocumentData
{
$document = TableDocumentData::from(['title' => 'Anmeldungen für ' . $this->form->name, 'sheets' => []]);
$headers = $this->form->getFields()->map(fn ($field) => $field->name)->push('Abgemeldet am')->prepend('ID')->toArray();
$headers = [
'ID',
...$this->form->getFields()->names(),
'Abgemeldet am',
];
[$activeParticipants, $cancelledParticipants] = $participants->partition(fn ($participant) => $participant->cancelled_at === null);
$document->addSheet(SheetData::from([
@ -68,10 +72,11 @@ class CreateExcelDocumentAction
/** @return array<string, mixed> */
public function rowFor(Participant $participant): array {
return $this->form->getFields()->map(fn ($field) => $participant->getFields()->find($field)->presentRaw())
->put('Abgemeldet am', $participant->cancelled_at?->format('d.m.Y H:i:s') ?: '')
->prepend('ID', $participant->id)
->toArray();
return [
'ID' => $participant->id,
...$this->form->getFields()->map(fn ($field) => $participant->getFields()->find($field)->presentRaw()),
'Abgemeldet am' => $participant->cancelled_at?->format('d.m.Y H:i:s') ?: '',
];
}
private function tempPath(): string

View File

@ -1,7 +1,5 @@
<?php
namespace Illuminate\Testing;
namespace Spatie\LaravelSettings;
/**