From e21e818ac6fbc68e7ff8d16617945b0fd1c0a239 Mon Sep 17 00:00:00 2001 From: Arwed Molitor Date: Tue, 12 Mar 2024 14:04:34 +0100 Subject: [PATCH] Improve contribution BDKJ Hesse --- app/Contribution/Documents/BdkjHesse.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Contribution/Documents/BdkjHesse.php b/app/Contribution/Documents/BdkjHesse.php index 36185f83..5f813733 100644 --- a/app/Contribution/Documents/BdkjHesse.php +++ b/app/Contribution/Documents/BdkjHesse.php @@ -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