From fa2d93174ae2a6e58284db5c0352abbef5632cdb Mon Sep 17 00:00:00 2001 From: philipp lang Date: Wed, 12 Jun 2024 00:47:25 +0200 Subject: [PATCH] Add mobile phone nami type --- app/Form/Enums/NamiType.php | 2 ++ tests/Feature/Form/FormRegisterActionTest.php | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/app/Form/Enums/NamiType.php b/app/Form/Enums/NamiType.php index a2a84c91..9c00390c 100644 --- a/app/Form/Enums/NamiType.php +++ b/app/Form/Enums/NamiType.php @@ -20,6 +20,7 @@ enum NamiType: string case ZIP = 'PLZ'; case LOCATION = 'Ort'; case GENDER = 'Geschlecht'; + case MOBILEPHONE = 'Handynummer'; case AGE = 'Alter (zum Zeitpunkt der Anmeldung)'; case AGEEVENT = 'Alter (zum Zeitpunkt der Veranstaltung)'; @@ -49,6 +50,7 @@ enum NamiType: string static::GENDER => $member->gender?->name, static::AGE => $member->birthday->diffInYears(now()), static::AGEEVENT => $member->birthday->diffInYears($form->from), + static::MOBILEPHONE => $member->mobile_phone, }; } diff --git a/tests/Feature/Form/FormRegisterActionTest.php b/tests/Feature/Form/FormRegisterActionTest.php index b81e6016..fdd5ebee 100644 --- a/tests/Feature/Form/FormRegisterActionTest.php +++ b/tests/Feature/Form/FormRegisterActionTest.php @@ -512,6 +512,12 @@ class FormRegisterActionTest extends FormTestCase NamiType::AGEEVENT, '32' ]; + + yield [ + ['mobile_phone' => '+49 7776666'], + NamiType::MOBILEPHONE, + '+49 7776666' + ]; } /**