fix: make personal data editable in bookings as permitted by bpn
This commit is contained in:
1 parent
287ec30cf7
commit
145f7de781
2 files changed
+19
-47
No files matched your search
@@ -65,23 +65,20 @@ class EditFieldStateProvider extends AbstractFieldStateProvider
|
||||
$personalDataMutabilityCondition
|
||||
);
|
||||
|
||||
// Render all personal data fields as static text if first participant in non-internal agency OR BPN indicates not mutable
|
||||
// Using 'static_text' state (not 'hidden') so template renders values as static text
|
||||
$personalDataFields = [
|
||||
'firstName',
|
||||
'lastName',
|
||||
'dateOfBirth',
|
||||
'gender',
|
||||
'nationality',
|
||||
'email',
|
||||
'mobile',
|
||||
];
|
||||
foreach ($personalDataFields as $field) {
|
||||
// Core identity fields: static text if first participant in non-internal agency OR BPN indicates not mutable
|
||||
foreach (['firstName', 'lastName', 'dateOfBirth', 'gender', 'nationality'] as $field) {
|
||||
$this->fieldStateConditions[$field] = [
|
||||
'static_text' => $personalDataHiddenCondition,
|
||||
];
|
||||
}
|
||||
|
||||
// Contact fields: only the applicant (index 0) is read-only — participants can always update email/phone
|
||||
foreach (['email', 'mobile'] as $field) {
|
||||
$this->fieldStateConditions[$field] = [
|
||||
'static_text' => $firstParticipantReadOnlyCondition,
|
||||
];
|
||||
}
|
||||
|
||||
// Address fields - render as static text if first participant in non-internal agency OR participant not mutable
|
||||
$this->fieldStateConditions['address'] = [
|
||||
'static_text' => $personalDataHiddenCondition,
|
||||
|
||||
Reference in new issue
Block a user