diff --git a/html/modules/custom/ghi_blocks/src/Plugin/ConfigurationContainerItem/PlanOverviewData.php b/html/modules/custom/ghi_blocks/src/Plugin/ConfigurationContainerItem/PlanOverviewData.php
index 00e5d75c5..90628ef26 100644
--- a/html/modules/custom/ghi_blocks/src/Plugin/ConfigurationContainerItem/PlanOverviewData.php
+++ b/html/modules/custom/ghi_blocks/src/Plugin/ConfigurationContainerItem/PlanOverviewData.php
@@ -227,7 +227,8 @@ public function getApiValue($type = NULL) {
public function getValueOperation(?array $type = NULL) {
$type = $type ?? $this->getType();
$custom_value = $this->getCustomValue();
- if (!empty($type['allow_sum']) && $custom_value) {
+ $sum = ($sum ?? $this->get('sum')) && !empty($type['allow_sum']);
+ if ($sum && $custom_value) {
return $this->t('Sum');
}
elseif ($custom_value) {
@@ -293,24 +294,28 @@ private function getTypes() {
'label' => $this->t('People in need'),
'value_description' => $this->t('Enter amount as full integer to override the value from the API.'),
'data_type' => 'integer',
+ 'allow_sum' => TRUE,
'theme' => 'hpc_amount',
],
'people_target' => [
'label' => $this->t('People targeted'),
'value_description' => $this->t('Enter amount as full integer to override the value from the API.'),
'data_type' => 'integer',
+ 'allow_sum' => TRUE,
'theme' => 'hpc_amount',
],
'people_expected_reach' => [
'label' => $this->t('People expected reach'),
'value_description' => $this->t('Enter amount as full integer to override the value from the API.'),
'data_type' => 'integer',
+ 'allow_sum' => TRUE,
'theme' => 'hpc_amount',
],
'people_reached' => [
'label' => $this->t('People latest reached'),
'value_description' => $this->t('Enter amount as full integer to override the value from the API.'),
'data_type' => 'integer',
+ 'allow_sum' => TRUE,
'theme' => 'hpc_amount',
],
'people_reached_percent' => [
@@ -334,7 +339,7 @@ private function getTypes() {
'theme' => 'hpc_currency',
],
'funding_progress' => [
- 'label' => $this->t('Funding coverage'),
+ 'label' => $this->t('Funding coverage (%)'),
'default_label' => $this->t('% Funded'),
'value_description' => $this->t('Enter a percentage value as a decimal between 0 and 100. Note that write-in values are ignored if you limit the data to include or exclude a global plan.'),
'data_type' => 'float',
@@ -343,6 +348,7 @@ private function getTypes() {
'countries_affected' => [
'label' => $this->t('Countries affected'),
'data_type' => 'integer',
+ 'allow_sum' => TRUE,
'theme' => 'hpc_amount',
],
];