Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/composer/drupal/geofield_map-3.0.15
Browse files Browse the repository at this point in the history
  • Loading branch information
anantais authored Mar 6, 2024
2 parents e04e91c + 50e1b3a commit 2ba4af5
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 39 deletions.
76 changes: 38 additions & 38 deletions composer.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4518,17 +4518,17 @@
},
{
"name": "drupal/danse",
"version": "2.3.1",
"version": "2.3.2",
"source": {
"type": "git",
"url": "https://git.drupalcode.org/project/danse.git",
"reference": "2.3.1"
"reference": "2.3.2"
},
"dist": {
"type": "zip",
"url": "https://ftp.drupal.org/files/projects/danse-2.3.1.zip",
"reference": "2.3.1",
"shasum": "cf98e448b2564fdc61991b971548e67685c48c6f"
"url": "https://ftp.drupal.org/files/projects/danse-2.3.2.zip",
"reference": "2.3.2",
"shasum": "1d965fe316957aeba108acf5c69ad578d1b5a0f6"
},
"require": {
"drupal/core": "^10 || ^11",
Expand All @@ -4541,8 +4541,8 @@
"type": "drupal-module",
"extra": {
"drupal": {
"version": "2.3.1",
"datestamp": "1703759808",
"version": "2.3.2",
"datestamp": "1708518790",
"security-coverage": {
"status": "covered",
"message": "Covered by Drupal's security advisory policy"
Expand Down Expand Up @@ -5141,21 +5141,21 @@
},
{
"name": "drupal/eca",
"version": "1.1.4",
"version": "1.1.5",
"source": {
"type": "git",
"url": "https://git.drupalcode.org/project/eca.git",
"reference": "1.1.4"
"reference": "1.1.5"
},
"dist": {
"type": "zip",
"url": "https://ftp.drupal.org/files/projects/eca-1.1.4.zip",
"reference": "1.1.4",
"shasum": "fce478b8c6224997dc858bff1f8f57523c870de7"
"url": "https://ftp.drupal.org/files/projects/eca-1.1.5.zip",
"reference": "1.1.5",
"shasum": "56633aa7b6e263c5bcc0de1c40a81ef47e9f58a8"
},
"require": {
"dragonmantank/cron-expression": "^3.1",
"drupal/core": "^9.4 || ^10",
"drupal/core": "^9.5 || ^10",
"ext-dom": "*",
"ext-json": "*",
"mtownsend/xml-to-array": "^2.0",
Expand All @@ -5176,8 +5176,8 @@
"type": "drupal-module",
"extra": {
"drupal": {
"version": "1.1.4",
"datestamp": "1689338278",
"version": "1.1.5",
"datestamp": "1708702357",
"security-coverage": {
"status": "covered",
"message": "Covered by Drupal's security advisory policy"
Expand Down Expand Up @@ -5216,17 +5216,17 @@
},
{
"name": "drupal/eca_cm",
"version": "1.0.7",
"version": "1.0.8",
"source": {
"type": "git",
"url": "https://git.drupalcode.org/project/eca_cm.git",
"reference": "1.0.7"
"reference": "1.0.8"
},
"dist": {
"type": "zip",
"url": "https://ftp.drupal.org/files/projects/eca_cm-1.0.7.zip",
"reference": "1.0.7",
"shasum": "86d9866232c41fbd71573b88f42bcb270bfcd3dc"
"url": "https://ftp.drupal.org/files/projects/eca_cm-1.0.8.zip",
"reference": "1.0.8",
"shasum": "a971e8deaf73cbf5f69d9d7cb7740e2add5e8751"
},
"require": {
"drupal/core": "^9 || ^10",
Expand All @@ -5236,8 +5236,8 @@
"type": "drupal-module",
"extra": {
"drupal": {
"version": "1.0.7",
"datestamp": "1692266259",
"version": "1.0.8",
"datestamp": "1709670010",
"security-coverage": {
"status": "covered",
"message": "Covered by Drupal's security advisory policy"
Expand Down Expand Up @@ -5267,16 +5267,16 @@
},
{
"name": "drupal/eca_ui",
"version": "1.1.4",
"version": "1.1.5",
"require": {
"drupal/core": "^9 || ^10",
"drupal/eca": "*"
},
"type": "metapackage",
"extra": {
"drupal": {
"version": "1.1.4",
"datestamp": "1689338278",
"version": "1.1.5",
"datestamp": "1708702357",
"security-coverage": {
"status": "covered",
"message": "Covered by Drupal's security advisory policy"
Expand Down Expand Up @@ -11643,17 +11643,17 @@
},
{
"name": "drupal/raven",
"version": "5.0.7",
"version": "5.0.8",
"source": {
"type": "git",
"url": "https://git.drupalcode.org/project/raven.git",
"reference": "5.0.7"
"reference": "5.0.8"
},
"dist": {
"type": "zip",
"url": "https://ftp.drupal.org/files/projects/raven-5.0.7.zip",
"reference": "5.0.7",
"shasum": "42eb860dd5f0474541e2d5a81a3cb5ecdf514edb"
"url": "https://ftp.drupal.org/files/projects/raven-5.0.8.zip",
"reference": "5.0.8",
"shasum": "c038a2e35b6270846046bce67e509893cecad91b"
},
"require": {
"drupal/core": "^10.1",
Expand All @@ -11668,8 +11668,8 @@
"type": "drupal-module",
"extra": {
"drupal": {
"version": "5.0.7",
"datestamp": "1706562438",
"version": "5.0.8",
"datestamp": "1709412469",
"security-coverage": {
"status": "covered",
"message": "Covered by Drupal's security advisory policy"
Expand Down Expand Up @@ -21158,16 +21158,16 @@
},
{
"name": "sentry/sentry",
"version": "4.5.0",
"version": "4.6.0",
"source": {
"type": "git",
"url": "https://github.com/getsentry/sentry-php.git",
"reference": "a6e06f0b7a17e7f68e11297427da76bfe01a3ca3"
"reference": "30d98a460ab10f7b7032d76c62da5b1ce6c0765d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/getsentry/sentry-php/zipball/a6e06f0b7a17e7f68e11297427da76bfe01a3ca3",
"reference": "a6e06f0b7a17e7f68e11297427da76bfe01a3ca3",
"url": "https://api.github.com/repos/getsentry/sentry-php/zipball/30d98a460ab10f7b7032d76c62da5b1ce6c0765d",
"reference": "30d98a460ab10f7b7032d76c62da5b1ce6c0765d",
"shasum": ""
},
"require": {
Expand Down Expand Up @@ -21231,7 +21231,7 @@
],
"support": {
"issues": "https://github.com/getsentry/sentry-php/issues",
"source": "https://github.com/getsentry/sentry-php/tree/4.5.0"
"source": "https://github.com/getsentry/sentry-php/tree/4.6.0"
},
"funding": [
{
Expand All @@ -21243,7 +21243,7 @@
"type": "custom"
}
],
"time": "2024-01-29T16:16:10+00:00"
"time": "2024-02-13T11:32:56+00:00"
},
{
"name": "simplesamlphp/assert",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.field--name-field-clinical-health-services a.node--unpublished {
padding: unset;
}
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,49 @@ public function __construct(
*/
public function entityViewAlter(EntityViewAlterEvent $event):void {
$this->showUnspecifiedWhenSystemEhrNumberEmpty($event);
$this->alterAppendedSystemHealthServices($event);

}

/**
* Alters health service titles appended to VAMC system view page.
*
* @param \Drupal\core_event_dispatcher\Event\Entity\EntityViewAlterEvent $event
* The entity view alter service.
*/
public function alterAppendedSystemHealthServices(EntityViewAlterEvent $event):void {
$display = $event->getDisplay();
if (($display->getTargetBundle() === 'health_care_region_page') && ($display->getOriginalMode() === 'full')) {
$build = &$event->getBuild();
$services = $build['field_clinical_health_services'] ?? [];

$services_copy = [];
foreach ($services as $key => $service) {
// If there are services (because their keys are numeric).
if (is_numeric($key) && !empty($service['#options']['entity'])) {
// Copy build array.
$services_copy[] = $build['field_clinical_health_services'][$key];
unset($build['field_clinical_health_services'][$key]);
$service_node = $services_copy[$key]['#options']['entity'];
$moderationState = $service_node->get('moderation_state')->value;
// Identify archive and draft in temp array.
if ($moderationState === 'archived' || $moderationState === 'draft') {
$services_copy[$key]['#attributes'] = ['class' => 'node--unpublished'];
$services_copy[$key]['#title'] .= ' (' . ucfirst($moderationState) . ')';
}
}
}
// Sort temp array.
usort($services_copy, function ($x, $y) {
return strcasecmp($x['#title'], $y['#title']);
});
// Copy temporary array back to build array.
foreach ($services_copy as $key => $temp) {
$build['field_clinical_health_services'][$key] = $services_copy[$key];
}
$build['field_clinical_health_services']['#attached']['library'][] = 'va_gov_vamc/set_vamc_system_health_service';
}

}

/**
Expand Down
5 changes: 4 additions & 1 deletion docroot/modules/custom/va_gov_vamc/va_gov_vamc.libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ set_covid_term_text:
css/set_covid_term_text.css: {}
js:
js/set_covid_term_text.js: {}

set_vamc_system_health_service:
css:
component:
css/set_vamc_system_health_service.css: {}

0 comments on commit 2ba4af5

Please sign in to comment.