mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-09-02 08:09:19 +08:00
update subpanel insights for tooltips
This commit is contained in:
parent
e2d3c13727
commit
b2f4c19928
12 changed files with 11 additions and 46 deletions
|
@ -64,6 +64,7 @@ class SubPanelActivitiesNextDate extends SubpanelDataQueryHandler implements Sta
|
|||
}
|
||||
|
||||
$statistic = $this->buildStatistic($min);
|
||||
$this->addMetadata($statistic, ['tooltip_title_key' => 'LBL_ACTIVITIES_NEXT_DATE']);
|
||||
$this->close();
|
||||
|
||||
return $statistic;
|
||||
|
|
|
@ -70,6 +70,7 @@ class SubPanelCampaignsLastReceived extends SubpanelDataQueryHandler implements
|
|||
$finalDate = $dateFormatService->toDBDate($result);
|
||||
$statistic = $this->buildSingleValueResponse(self::KEY, 'date', ['value' => $finalDate]);
|
||||
|
||||
$this->addMetadata($statistic, ['tooltip_title_key' => 'LBL_CAMPAIGN_LAST_RECEIVED']);
|
||||
$this->close();
|
||||
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ class SubPanelCasesCount extends SubpanelDataQueryHandler implements StatisticsP
|
|||
$dbQuery = $this->joinQueryParts($parts);
|
||||
$result = $this->fetchRow($dbQuery);
|
||||
$statistic = $this->buildSingleValueResponse(self::KEY, 'int', $result);
|
||||
|
||||
$this->addMetadata($statistic, ['tooltip_title_key' => 'LBL_OPEN_CASES_COUNT']);
|
||||
$this->close();
|
||||
|
||||
return $statistic;
|
||||
|
|
|
@ -65,7 +65,7 @@ class SubPanelContractsRenewalDate extends SubpanelDataQueryHandler implements S
|
|||
}
|
||||
|
||||
$statistic = $this->buildSingleValueResponse(self::KEY, 'date', ['value' => $result['end_date']]);
|
||||
|
||||
$this->addMetadata($statistic, ['tooltip_title_key' => 'LBL_CONTRACT_RENEWAL']);
|
||||
$this->close();
|
||||
|
||||
return $statistic;
|
||||
|
|
|
@ -115,6 +115,7 @@ class SubPanelEventsLastDate extends SubpanelDataQueryHandler implements Statist
|
|||
} else {
|
||||
$statistic = $this->getEmptyResponse(self::KEY);
|
||||
}
|
||||
$this->addMetadata($statistic, ['tooltip_title_key' => 'LBL_EVENTS_LAST_DATE']);
|
||||
$this->close();
|
||||
|
||||
|
||||
|
|
|
@ -64,6 +64,7 @@ class SubPanelHistoryLastDate extends SubpanelDataQueryHandler implements Statis
|
|||
}
|
||||
|
||||
$statistic = $this->buildStatistic($max);
|
||||
$this->addMetadata($statistic, ['tooltip_title_key' => 'LBL_HISTORY_LAST_DATE']);
|
||||
$this->close();
|
||||
|
||||
return $statistic;
|
||||
|
|
|
@ -56,7 +56,7 @@ class SubPanelInvoicesTotal extends SubpanelDataQueryHandler implements Statisti
|
|||
}
|
||||
|
||||
$statistic = $this->buildSingleValueResponse(self::KEY, 'int', $result);
|
||||
|
||||
$this->addMetadata($statistic, ['tooltip_title_key' => 'LBL_INVOICES_OVERDUE']);
|
||||
$this->close();
|
||||
|
||||
return $statistic;
|
||||
|
|
|
@ -63,7 +63,7 @@ class SubPanelQuotesTotal extends SubpanelDataQueryHandler implements Statistics
|
|||
|
||||
$date = $result['expiration'];
|
||||
$statistic = $this->buildSingleValueResponse(self::KEY, 'date', ['value' => $date]);
|
||||
|
||||
$this->addMetadata($statistic, ['tooltip_title_key' => 'LBL_QUOTES_EXPIRY']);
|
||||
return $statistic;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ class SubPanelTasksHistoryCount extends SubpanelDataQueryHandler implements Stat
|
|||
$innerQuery = $this->joinQueryParts($parts);
|
||||
$notes = $this->fetchRow($innerQuery);
|
||||
$statistic = $this->buildSingleValueResponse(self::KEY, 'int', $notes);
|
||||
|
||||
$this->addMetadata($statistic, ['tooltip_title_key' => 'LBL_DEFAULT_TOTAL']);
|
||||
$this->close();
|
||||
|
||||
return $statistic;
|
||||
|
|
|
@ -41,7 +41,7 @@ class SubpanelDefault extends SubpanelDataQueryHandler implements StatisticsProv
|
|||
$dbQuery = $this->joinQueryParts($parts);
|
||||
$result = $this->fetchRow($dbQuery);
|
||||
$statistic = $this->buildSingleValueResponse(self::KEY, 'int', $result);
|
||||
|
||||
$this->addMetadata($statistic, ['tooltip_title_key' => 'LBL_DEFAULT_TOTAL']);
|
||||
$this->close();
|
||||
return $statistic;
|
||||
}
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Legacy\Statistics;
|
||||
|
||||
use App\Entity\Statistic;
|
||||
use App\Service\StatisticsProviderInterface;
|
||||
|
||||
class SubpanelEmpty implements StatisticsProviderInterface
|
||||
{
|
||||
public const KEY = 'empty';
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getKey(): string
|
||||
{
|
||||
return self::KEY;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getData(array $param): Statistic
|
||||
{
|
||||
|
||||
$statistic = new Statistic();
|
||||
$statistic->setId(self::KEY);
|
||||
$statistic->setData([
|
||||
'value' => '-'
|
||||
]);
|
||||
|
||||
$statistic->setMetadata([
|
||||
'type' => 'single-value-statistic',
|
||||
'dataType' => 'varchar',
|
||||
]);
|
||||
|
||||
return $statistic;
|
||||
}
|
||||
}
|
|
@ -47,7 +47,7 @@ class SubpanelOpportunitiesTotal extends SubpanelDataQueryHandler implements Sta
|
|||
$result = $this->fetchRow($dbQuery);
|
||||
|
||||
$statistic = $this->buildCurrencyResult($result);
|
||||
|
||||
$this->addMetadata($statistic, ['tooltip_title_key' => 'LBL_OPPORTUNITIES_TOTAL_SUM']);
|
||||
$this->close();
|
||||
|
||||
return $statistic;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue