diff --git a/composer.lock b/composer.lock index 621f4817..a9938c5c 100644 --- a/composer.lock +++ b/composer.lock @@ -15498,16 +15498,16 @@ }, { "name": "unocha/ocha_key_figures", - "version": "2.1.8", + "version": "2.1.9", "source": { "type": "git", "url": "https://github.com/UN-OCHA/ocha_key_figures.git", - "reference": "300a8a55ce875cf59aafdc9eeb58324be7dfdfc2" + "reference": "ab3d78f0c86f655b156ebde57f8cae37533ea4d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/UN-OCHA/ocha_key_figures/zipball/300a8a55ce875cf59aafdc9eeb58324be7dfdfc2", - "reference": "300a8a55ce875cf59aafdc9eeb58324be7dfdfc2", + "url": "https://api.github.com/repos/UN-OCHA/ocha_key_figures/zipball/ab3d78f0c86f655b156ebde57f8cae37533ea4d0", + "reference": "ab3d78f0c86f655b156ebde57f8cae37533ea4d0", "shasum": "" }, "require": { @@ -15521,9 +15521,9 @@ "description": "UNOCHA Key Figures", "support": { "issues": "https://github.com/UN-OCHA/ocha_key_figures/issues", - "source": "https://github.com/UN-OCHA/ocha_key_figures/tree/2.1.8" + "source": "https://github.com/UN-OCHA/ocha_key_figures/tree/2.1.9" }, - "time": "2023-08-31T09:38:22+00:00" + "time": "2024-01-12T10:52:33+00:00" }, { "name": "unocha/ocha_monitoring", diff --git a/html/modules/custom/unocha_donors/src/Plugin/Field/FieldFormatter/Donors.php b/html/modules/custom/unocha_donors/src/Plugin/Field/FieldFormatter/Donors.php index 41879499..f68c1649 100644 --- a/html/modules/custom/unocha_donors/src/Plugin/Field/FieldFormatter/Donors.php +++ b/html/modules/custom/unocha_donors/src/Plugin/Field/FieldFormatter/Donors.php @@ -33,9 +33,11 @@ public function viewElements(FieldItemListInterface $items, $langcode) { $elements = []; foreach ($items as $delta => $item) { if ($field_type === 'key_figure') { - $data = $this->ochaKeyFiguresApiClient->getFigure( + $data = $this->ochaKeyFiguresApiClient->getFigureByFigureId( $item->getFigureProvider(), - $item->getFigureId() + $item->getFigureYear(), + $item->getFigureCountry(), + $item->getFigureId(), ); } else { diff --git a/html/themes/custom/common_design_subtheme/components/uno-figures/uno-figures.css b/html/themes/custom/common_design_subtheme/components/uno-figures/uno-figures.css index 245edeba..de913aaf 100644 --- a/html/themes/custom/common_design_subtheme/components/uno-figures/uno-figures.css +++ b/html/themes/custom/common_design_subtheme/components/uno-figures/uno-figures.css @@ -39,11 +39,20 @@ dt.uno-figure__label-wrapper { color: var(--brand-primary); font-size: 1.625rem; font-weight: bold; + display: flex; + flex-wrap: wrap; } dd.uno-figure__value { margin: 0; } +dd.uno-figure__value > .uno-figure__year { + font-size: 1rem; + font-weight: 400; + flex: 1 0 100%; + color: var(--brand-default-text-color); +} + @media screen and (min-width: 480px) { .uno-figure { display: flex; diff --git a/html/themes/custom/common_design_subtheme/templates/modules/ocha_key_figures/ocha-key-figures-figure.html.twig b/html/themes/custom/common_design_subtheme/templates/modules/ocha_key_figures/ocha-key-figures-figure.html.twig index 84866eff..112ed913 100644 --- a/html/themes/custom/common_design_subtheme/templates/modules/ocha_key_figures/ocha-key-figures-figure.html.twig +++ b/html/themes/custom/common_design_subtheme/templates/modules/ocha_key_figures/ocha-key-figures-figure.html.twig @@ -30,7 +30,10 @@ ({{ unit }}) {%- endif -%} - {{ value == 0 ? 0 : value }} + + {{ value == 0 ? 0 : value }} + {{ year }} + {% endif %}