diff --git a/config/sync/core.entity_view_display.node.vba_facility_service.default.yml b/config/sync/core.entity_view_display.node.vba_facility_service.default.yml index 6650e85328..ee960107c7 100644 --- a/config/sync/core.entity_view_display.node.vba_facility_service.default.yml +++ b/config/sync/core.entity_view_display.node.vba_facility_service.default.yml @@ -14,6 +14,7 @@ dependencies: module: - allow_only_one - entity_reference_revisions + - markup - user id: node.vba_facility_service.default targetEntityType: node @@ -52,6 +53,13 @@ content: third_party_settings: { } weight: 2 region: content + field_vba_fac_serv_appt_default: + type: markup + label: above + settings: { } + third_party_settings: { } + weight: 4 + region: content hidden: breadcrumbs: true content_moderation_control: true diff --git a/config/sync/core.entity_view_display.node.vha_facility_nonclinical_service.default.yml b/config/sync/core.entity_view_display.node.vha_facility_nonclinical_service.default.yml index 632b1c6ac0..19bc1c8290 100644 --- a/config/sync/core.entity_view_display.node.vha_facility_nonclinical_service.default.yml +++ b/config/sync/core.entity_view_display.node.vha_facility_nonclinical_service.default.yml @@ -14,6 +14,7 @@ dependencies: module: - allow_only_one - entity_reference_revisions + - markup - user id: node.vha_facility_nonclinical_service.default targetEntityType: node diff --git a/docroot/modules/custom/va_gov_post_api/src/Service/PostFacilityServiceVamc.php b/docroot/modules/custom/va_gov_post_api/src/Service/PostFacilityServiceVamc.php index 1728d204e4..82134b9fad 100644 --- a/docroot/modules/custom/va_gov_post_api/src/Service/PostFacilityServiceVamc.php +++ b/docroot/modules/custom/va_gov_post_api/src/Service/PostFacilityServiceVamc.php @@ -414,18 +414,18 @@ protected function chooseBestOfficeVisitOption(string $office_visits) { */ protected function setServiceLevelProperties(Paragraph $service_location) { // Set the office visits policy to non-default for the service. - $field_office_visits = $service_location->get('field_office_visits')->value; + $field_office_visits = $service_location->get('field_office_visits')->value ?? ''; $this->officeVisits = $this->chooseBestOfficeVisitOption($field_office_visits); // Set the appointment text values to the non-default for the service. - $field_appt_intro_text_type = $service_location->get('field_appt_intro_text_type')->value; + $field_appt_intro_text_type = $service_location->get('field_appt_intro_text_type')->value ?? ''; $this->apptIntroType = $this->getAppointmentLeadInType($field_appt_intro_text_type); $this->apptIntroText = (!empty($this->apptIntroText)) ? $this->apptIntroText : $this->stringNullify($service_location->get('field_appt_intro_text_custom')->value); // Get the phones from the first service location for appointments. - $field_appt_phone_type = $service_location->get('field_use_facility_phone_number')->value; + $field_appt_phone_type = $service_location->get('field_use_facility_phone_number')->value ?? ''; $this->apptPhones = (!empty($this->apptPhones)) ? $this->apptPhones : $this->getPhones((bool) $field_appt_phone_type, $service_location->get('field_other_phone_numbers')->referencedEntities()); @@ -434,7 +434,7 @@ protected function setServiceLevelProperties(Paragraph $service_location) { $this->isOnlineSchedulingAvail = ($this->isOnlineSchedulingAvail !== 'false' && !empty($this->isOnlineSchedulingAvail)) ? $this->isOnlineSchedulingAvail - : $this->getOnlineScheduling($service_location->get('field_online_scheduling_avail')->value); + : $this->getOnlineScheduling($service_location->get('field_online_scheduling_avail')->value ?? ''); } @@ -492,7 +492,7 @@ protected function getServiceLocations(): array { // currently sourced from the facility service node. $service_location->referral_required = $this->getReferralRequired(); $service_location->walk_ins_accepted = $location->get('field_office_visits')->value; - $service_location->online_scheduling_available = $this->getOnlineScheduling($location->get('field_online_scheduling_avail')->value); + $service_location->online_scheduling_available = $this->getOnlineScheduling($location->get('field_online_scheduling_avail')->value ?? ''); $service_locations[] = $service_location; }