Fixed Missing Tooltip Metadata Definitions for Statistics

This commit is contained in:
pankaj 2021-02-09 23:22:12 +00:00 committed by Dillon-Brown
parent e3f939fb68
commit 1235fdfed1
8 changed files with 12 additions and 7 deletions

View file

@ -59,7 +59,7 @@ class SubPanelActivitiesNextDate extends SubpanelDataQueryHandler implements Sta
if (empty($min)) {
$statistic = $this->getEmptyResponse(self::KEY);
$this->close();
$this->addMetadata($statistic, ['tooltip_title_key' => 'LBL_ACTIVITIES_NEXT_DATE']);
return $statistic;
}

View file

@ -64,6 +64,7 @@ class SubPanelCampaignsLastReceived extends SubpanelDataQueryHandler implements
if (empty($result)) {
$statistic = $this->getEmptyResponse(self::KEY);
$this->close();
$this->addMetadata($statistic, ['tooltip_title_key' => 'LBL_CAMPAIGN_LAST_RECEIVED']);
return $statistic;
}
$result = $result['last_received'];

View file

@ -60,7 +60,7 @@ class SubPanelContractsRenewalDate extends SubpanelDataQueryHandler implements S
if (empty($result)) {
$statistic = $this->getEmptyResponse(self::KEY);
$this->close();
$this->addMetadata($statistic, ['tooltip_title_key' => 'LBL_CONTRACT_RENEWAL']);
return $statistic;
}

View file

@ -100,7 +100,7 @@ class SubPanelEventsLastDate extends SubpanelDataQueryHandler implements Statist
if (empty($date)) {
$statistic = $this->getEmptyResponse(self::KEY);
$this->close();
$this->addMetadata($statistic, ['tooltip_title_key' => 'LBL_EVENTS_LAST_DATE']);
return $statistic;
}

View file

@ -59,7 +59,7 @@ class SubPanelHistoryLastDate extends SubpanelDataQueryHandler implements Statis
if (empty($max)) {
$statistic = $this->getEmptyResponse(self::KEY);
$this->close();
$this->addMetadata($statistic, ['tooltip_title_key' => 'LBL_HISTORY_LAST_DATE']);
return $statistic;
}

View file

@ -51,7 +51,7 @@ class SubPanelInvoicesTotal extends SubpanelDataQueryHandler implements Statisti
if (empty($result)) {
$statistic = $this->getEmptyResponse(self::KEY);
$this->close();
$this->addMetadata($statistic, ['tooltip_title_key' => 'LBL_INVOICES_OVERDUE']);
return $statistic;
}

View file

@ -57,7 +57,7 @@ class SubPanelQuotesTotal extends SubpanelDataQueryHandler implements Statistics
$empty = $app_strings['LBL_NONE_OUTSTANDING'];
$statistic = $this->buildSingleValueResponse(self::KEY, 'string', ['value' => $empty]);
$this->close();
$this->addMetadata($statistic, ['tooltip_title_key' => 'LBL_QUOTES_EXPIRY']);
return $statistic;
}

View file

@ -124,7 +124,7 @@ class SubPanelDefinitionHandler extends LegacyHandler implements SubPanelDefinit
$tabs[$key]['legacyModule'] = $tab['module'];
$tabs[$key]['headerModule'] = $headerModule;
$tabs[$key]['top_buttons'] = $this->mapButtons($subpanel, $tab);
if (empty($tabs[$key]['insightWidget'])) {
$tabs[$key]['insightWidget'] = [
'type' => 'statistics',
@ -142,6 +142,8 @@ class SubPanelDefinitionHandler extends LegacyHandler implements SubPanelDefinit
'cols' => [
[
'labelKey' => $tabs[$key]['title_key'],
'class' => 'sub-panel-banner-button-title text-truncate',
'bold' => true,
]
]
],
@ -149,6 +151,8 @@ class SubPanelDefinitionHandler extends LegacyHandler implements SubPanelDefinit
'cols' => [
[
'statistic' => $tabs[$key]['module'],
'class' => 'sub-panel-banner-button-stats',
'bold' => true,
],
]
],