Add Special types requirement to contribution documents
This commit is contained in:
parent
aab004f1f1
commit
b0fd584397
|
@ -6,6 +6,7 @@ use App\Contribution\Contracts\HasContributionData;
|
|||
use App\Contribution\Data\MemberData;
|
||||
use App\Contribution\Traits\HasPdfBackground;
|
||||
use App\Country;
|
||||
use App\Form\Enums\SpecialType;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
|
@ -116,4 +117,15 @@ class BdkjHesse extends ContributionDocument
|
|||
'zipLocation' => 'required|string',
|
||||
];
|
||||
}
|
||||
|
||||
public static function requiredFormSpecialTypes(): array {
|
||||
return [
|
||||
SpecialType::FIRSTNAME,
|
||||
SpecialType::LASTNAME,
|
||||
SpecialType::BIRTHDAY,
|
||||
SpecialType::ZIP,
|
||||
SpecialType::LOCATION,
|
||||
SpecialType::GENDER,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ use App\Contribution\Data\MemberData;
|
|||
use App\Contribution\Traits\FormatsDates;
|
||||
use App\Contribution\Traits\HasPdfBackground;
|
||||
use App\Country;
|
||||
use App\Form\Enums\SpecialType;
|
||||
use App\Invoice\InvoiceSettings;
|
||||
use Illuminate\Support\Collection;
|
||||
use Carbon\Carbon;
|
||||
|
@ -74,4 +75,15 @@ class CityFrankfurtMainDocument extends ContributionDocument
|
|||
'zipLocation' => 'required|string',
|
||||
];
|
||||
}
|
||||
|
||||
public static function requiredFormSpecialTypes(): array {
|
||||
return [
|
||||
SpecialType::FIRSTNAME,
|
||||
SpecialType::LASTNAME,
|
||||
SpecialType::BIRTHDAY,
|
||||
SpecialType::ZIP,
|
||||
SpecialType::LOCATION,
|
||||
SpecialType::ADDRESS,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ use App\Contribution\Contracts\HasContributionData;
|
|||
use App\Contribution\Traits\FormatsDates;
|
||||
use App\Contribution\Traits\HasPdfBackground;
|
||||
use App\Country;
|
||||
use App\Form\Enums\SpecialType;
|
||||
use App\Member\Member;
|
||||
use Illuminate\Support\Collection;
|
||||
use Carbon\Carbon;
|
||||
|
@ -65,4 +66,16 @@ class CityRemscheidDocument extends ContributionDocument
|
|||
'country' => 'required|integer|exists:countries,id',
|
||||
];
|
||||
}
|
||||
|
||||
public static function requiredFormSpecialTypes(): array {
|
||||
return [
|
||||
SpecialType::FIRSTNAME,
|
||||
SpecialType::LASTNAME,
|
||||
SpecialType::ADDRESS,
|
||||
SpecialType::BIRTHDAY,
|
||||
SpecialType::ZIP,
|
||||
SpecialType::LOCATION,
|
||||
SpecialType::LEADER
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ namespace App\Contribution\Documents;
|
|||
|
||||
use App\Contribution\Contracts\HasContributionData;
|
||||
use App\Contribution\Data\MemberData;
|
||||
use App\Form\Enums\SpecialType;
|
||||
use App\Invoice\InvoiceSettings;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Support\Collection;
|
||||
|
@ -94,4 +95,15 @@ class CitySolingenDocument extends ContributionDocument
|
|||
'zipLocation' => 'required|string',
|
||||
];
|
||||
}
|
||||
|
||||
public static function requiredFormSpecialTypes(): array {
|
||||
return [
|
||||
SpecialType::FIRSTNAME,
|
||||
SpecialType::LASTNAME,
|
||||
SpecialType::BIRTHDAY,
|
||||
SpecialType::ZIP,
|
||||
SpecialType::LOCATION,
|
||||
SpecialType::ADDRESS,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
namespace App\Contribution\Documents;
|
||||
|
||||
use App\Contribution\Contracts\HasContributionData;
|
||||
use App\Form\Enums\SpecialType;
|
||||
use Zoomyboy\Tex\Document;
|
||||
use Zoomyboy\Tex\Template;
|
||||
|
||||
|
@ -14,6 +15,11 @@ abstract class ContributionDocument extends Document
|
|||
|
||||
abstract public static function fromPayload(HasContributionData $request): self;
|
||||
|
||||
/**
|
||||
* @return array<int, SpecialType>
|
||||
*/
|
||||
abstract public static function requiredFormSpecialTypes(): array;
|
||||
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
|
|
|
@ -7,6 +7,7 @@ use App\Contribution\Data\MemberData;
|
|||
use App\Contribution\Traits\FormatsDates;
|
||||
use App\Contribution\Traits\HasPdfBackground;
|
||||
use App\Country;
|
||||
use App\Form\Enums\SpecialType;
|
||||
use Illuminate\Support\Collection;
|
||||
use Carbon\Carbon;
|
||||
|
||||
|
@ -65,4 +66,15 @@ class RdpNrwDocument extends ContributionDocument
|
|||
'zipLocation' => 'required|string',
|
||||
];
|
||||
}
|
||||
|
||||
public static function requiredFormSpecialTypes(): array {
|
||||
return [
|
||||
SpecialType::FIRSTNAME,
|
||||
SpecialType::LASTNAME,
|
||||
SpecialType::BIRTHDAY,
|
||||
SpecialType::ZIP,
|
||||
SpecialType::LOCATION,
|
||||
SpecialType::GENDER,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ use App\Contribution\Data\MemberData;
|
|||
use App\Contribution\Traits\FormatsDates;
|
||||
use App\Contribution\Traits\HasPdfBackground;
|
||||
use App\Country;
|
||||
use App\Form\Enums\SpecialType;
|
||||
use Illuminate\Support\Collection;
|
||||
use Carbon\Carbon;
|
||||
|
||||
|
@ -60,4 +61,17 @@ class WuppertalDocument extends ContributionDocument
|
|||
'zipLocation' => 'required|string',
|
||||
];
|
||||
}
|
||||
|
||||
public static function requiredFormSpecialTypes(): array {
|
||||
return [
|
||||
SpecialType::FIRSTNAME,
|
||||
SpecialType::LASTNAME,
|
||||
SpecialType::ADDRESS,
|
||||
SpecialType::BIRTHDAY,
|
||||
SpecialType::ZIP,
|
||||
SpecialType::LOCATION,
|
||||
SpecialType::GENDER,
|
||||
SpecialType::LEADER,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue