Improve contribution BDKJ Hesse
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details

This commit is contained in:
Arwed Molitor 2024-03-12 14:04:34 +01:00
parent fecd461aef
commit e21e818ac6
1 changed files with 5 additions and 1 deletions

View File

@ -6,6 +6,7 @@ use App\Contribution\Data\MemberData;
use App\Country;
use Carbon\Carbon;
use Illuminate\Support\Collection;
use Illuminate\Support\Str;
use Zoomyboy\Tex\Engine;
use Zoomyboy\Tex\Template;
@ -20,6 +21,7 @@ class BdkjHesse extends ContributionDocument
public string $zipLocation,
public ?Country $country,
public Collection $members,
public string $eventName,
public ?string $filename = '',
public string $type = 'F',
) {
@ -46,6 +48,7 @@ class BdkjHesse extends ContributionDocument
zipLocation: $request['zipLocation'],
country: Country::where('id', $request['country'])->firstOrFail(),
members: MemberData::fromModels($request['members'])->chunk(20),
eventName: $request['eventName'],
);
}
@ -60,6 +63,7 @@ class BdkjHesse extends ContributionDocument
zipLocation: $request['zipLocation'],
country: Country::where('id', $request['country'])->firstOrFail(),
members: MemberData::fromApi($request['member_data'])->chunk(20),
eventName: $request['eventName'],
);
}
@ -112,7 +116,7 @@ class BdkjHesse extends ContributionDocument
public function basename(): string
{
return 'zuschuesse-bdkj-hessen';
return 'zuschuesse-bdkj-hessen' . Str::slug($this->eventName);
}
public function view(): string