Add mobile phone nami type
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details

This commit is contained in:
philipp lang 2024-06-12 00:47:25 +02:00
parent cb3cc087d6
commit fa2d93174a
2 changed files with 8 additions and 0 deletions

View File

@ -20,6 +20,7 @@ enum NamiType: string
case ZIP = 'PLZ'; case ZIP = 'PLZ';
case LOCATION = 'Ort'; case LOCATION = 'Ort';
case GENDER = 'Geschlecht'; case GENDER = 'Geschlecht';
case MOBILEPHONE = 'Handynummer';
case AGE = 'Alter (zum Zeitpunkt der Anmeldung)'; case AGE = 'Alter (zum Zeitpunkt der Anmeldung)';
case AGEEVENT = 'Alter (zum Zeitpunkt der Veranstaltung)'; case AGEEVENT = 'Alter (zum Zeitpunkt der Veranstaltung)';
@ -49,6 +50,7 @@ enum NamiType: string
static::GENDER => $member->gender?->name, static::GENDER => $member->gender?->name,
static::AGE => $member->birthday->diffInYears(now()), static::AGE => $member->birthday->diffInYears(now()),
static::AGEEVENT => $member->birthday->diffInYears($form->from), static::AGEEVENT => $member->birthday->diffInYears($form->from),
static::MOBILEPHONE => $member->mobile_phone,
}; };
} }

View File

@ -512,6 +512,12 @@ class FormRegisterActionTest extends FormTestCase
NamiType::AGEEVENT, NamiType::AGEEVENT,
'32' '32'
]; ];
yield [
['mobile_phone' => '+49 7776666'],
NamiType::MOBILEPHONE,
'+49 7776666'
];
} }
/** /**