show insights explorer count on data management page
This commit is contained in:
@@ -101,6 +101,13 @@ func (a *DataManagementsApi) DataStatisticsHandler(c *core.WebContext) (any, *er
|
||||
return nil, errs.ErrOperationFailed
|
||||
}
|
||||
|
||||
totalInsightsExplorerCount, err := a.insightsExploreres.GetTotalInsightsExplorersCountByUid(c, uid)
|
||||
|
||||
if err != nil {
|
||||
log.Errorf(c, "[data_managements.DataStatisticsHandler] failed to get total insights explorer count for user \"uid:%d\", because %s", uid, err.Error())
|
||||
return nil, errs.ErrOperationFailed
|
||||
}
|
||||
|
||||
totalTransactionTemplateCount, err := a.templates.GetTotalNormalTemplateCountByUid(c, uid)
|
||||
|
||||
if err != nil {
|
||||
@@ -121,6 +128,7 @@ func (a *DataManagementsApi) DataStatisticsHandler(c *core.WebContext) (any, *er
|
||||
TotalTransactionTagCount: totalTransactionTagCount,
|
||||
TotalTransactionCount: totalTransactionCount,
|
||||
TotalTransactionPictureCount: totalTransactionPictureCount,
|
||||
TotalInsightsExplorerCount: totalInsightsExplorerCount,
|
||||
TotalTransactionTemplateCount: totalTransactionTemplateCount,
|
||||
TotalScheduledTransactionCount: totalScheduledTransactionCount,
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ type DataStatisticsResponse struct {
|
||||
TotalTransactionTagCount int64 `json:"totalTransactionTagCount,string"`
|
||||
TotalTransactionCount int64 `json:"totalTransactionCount,string"`
|
||||
TotalTransactionPictureCount int64 `json:"totalTransactionPictureCount,string"`
|
||||
TotalInsightsExplorerCount int64 `json:"totalInsightsExplorerCount,string"`
|
||||
TotalTransactionTemplateCount int64 `json:"totalTransactionTemplateCount,string"`
|
||||
TotalScheduledTransactionCount int64 `json:"totalScheduledTransactionCount,string"`
|
||||
}
|
||||
|
||||
@@ -30,6 +30,17 @@ var (
|
||||
}
|
||||
)
|
||||
|
||||
// GetTotalInsightsExplorersCountByUid returns total insights explorers count of user
|
||||
func (s *InsightsExplorerService) GetTotalInsightsExplorersCountByUid(c core.Context, uid int64) (int64, error) {
|
||||
if uid <= 0 {
|
||||
return 0, errs.ErrUserIdInvalid
|
||||
}
|
||||
|
||||
count, err := s.UserDataDB(uid).NewSession(c).Where("uid=? AND deleted=?", uid, false).Count(&models.InsightsExplorer{})
|
||||
|
||||
return count, err
|
||||
}
|
||||
|
||||
// GetAllInsightsExplorerNamesByUid returns all insights explorer models of user without data
|
||||
func (s *InsightsExplorerService) GetAllInsightsExplorerNamesByUid(c core.Context, uid int64) ([]*models.InsightsExplorer, error) {
|
||||
if uid <= 0 {
|
||||
|
||||
@@ -1709,6 +1709,7 @@
|
||||
"Transaction Details": "Transaktionsdetails",
|
||||
"Statistics & Analysis": "Statistiken & Analysen",
|
||||
"Insights Explorer": "Insights Explorer",
|
||||
"Insights Explorers": "Insights Explorers",
|
||||
"Query": "Query",
|
||||
"Data Table": "Data Table",
|
||||
"Chart": "Chart",
|
||||
|
||||
@@ -1709,6 +1709,7 @@
|
||||
"Transaction Details": "Transaction Details",
|
||||
"Statistics & Analysis": "Statistics & Analysis",
|
||||
"Insights Explorer": "Insights Explorer",
|
||||
"Insights Explorers": "Insights Explorers",
|
||||
"Query": "Query",
|
||||
"Data Table": "Data Table",
|
||||
"Chart": "Chart",
|
||||
|
||||
@@ -1709,6 +1709,7 @@
|
||||
"Transaction Details": "Detalles",
|
||||
"Statistics & Analysis": "Estadísticas y Análisis",
|
||||
"Insights Explorer": "Insights Explorer",
|
||||
"Insights Explorers": "Insights Explorers",
|
||||
"Query": "Query",
|
||||
"Data Table": "Data Table",
|
||||
"Chart": "Chart",
|
||||
|
||||
@@ -1709,6 +1709,7 @@
|
||||
"Transaction Details": "Détails de la transaction",
|
||||
"Statistics & Analysis": "Statistiques et analyse",
|
||||
"Insights Explorer": "Insights Explorer",
|
||||
"Insights Explorers": "Insights Explorers",
|
||||
"Query": "Query",
|
||||
"Data Table": "Data Table",
|
||||
"Chart": "Chart",
|
||||
|
||||
@@ -1709,6 +1709,7 @@
|
||||
"Transaction Details": "Dettagli transazione",
|
||||
"Statistics & Analysis": "Statistiche e analisi",
|
||||
"Insights Explorer": "Insights Explorer",
|
||||
"Insights Explorers": "Insights Explorers",
|
||||
"Query": "Query",
|
||||
"Data Table": "Data Table",
|
||||
"Chart": "Chart",
|
||||
|
||||
@@ -1709,6 +1709,7 @@
|
||||
"Transaction Details": "取引の詳細",
|
||||
"Statistics & Analysis": "統計と分析",
|
||||
"Insights Explorer": "Insights Explorer",
|
||||
"Insights Explorers": "Insights Explorers",
|
||||
"Query": "Query",
|
||||
"Data Table": "Data Table",
|
||||
"Chart": "Chart",
|
||||
|
||||
@@ -1709,6 +1709,7 @@
|
||||
"Transaction Details": "ವಹಿವಾಟಿನ ವಿವರಗಳು",
|
||||
"Statistics & Analysis": "ಸಂಖ್ಯಾಶಾಸ್ತ್ರ ಮತ್ತು ವಿಶ್ಲೇಷಣೆ",
|
||||
"Insights Explorer": "Insights Explorer",
|
||||
"Insights Explorers": "Insights Explorers",
|
||||
"Query": "Query",
|
||||
"Data Table": "Data Table",
|
||||
"Chart": "Chart",
|
||||
|
||||
@@ -1709,6 +1709,7 @@
|
||||
"Transaction Details": "거래 세부사항",
|
||||
"Statistics & Analysis": "통계 및 분석",
|
||||
"Insights Explorer": "Insights Explorer",
|
||||
"Insights Explorers": "Insights Explorers",
|
||||
"Query": "Query",
|
||||
"Data Table": "Data Table",
|
||||
"Chart": "Chart",
|
||||
|
||||
@@ -1709,6 +1709,7 @@
|
||||
"Transaction Details": "Transactiedetails",
|
||||
"Statistics & Analysis": "Statistieken & Analyse",
|
||||
"Insights Explorer": "Insights Explorer",
|
||||
"Insights Explorers": "Insights Explorers",
|
||||
"Query": "Query",
|
||||
"Data Table": "Data Table",
|
||||
"Chart": "Chart",
|
||||
|
||||
@@ -1709,6 +1709,7 @@
|
||||
"Transaction Details": "Detalhes da Transação",
|
||||
"Statistics & Analysis": "Estatísticas e Análise",
|
||||
"Insights Explorer": "Insights Explorer",
|
||||
"Insights Explorers": "Insights Explorers",
|
||||
"Query": "Query",
|
||||
"Data Table": "Data Table",
|
||||
"Chart": "Chart",
|
||||
|
||||
@@ -1709,6 +1709,7 @@
|
||||
"Transaction Details": "Детали транзакции",
|
||||
"Statistics & Analysis": "Статистика и анализ",
|
||||
"Insights Explorer": "Insights Explorer",
|
||||
"Insights Explorers": "Insights Explorers",
|
||||
"Query": "Query",
|
||||
"Data Table": "Data Table",
|
||||
"Chart": "Chart",
|
||||
|
||||
@@ -1709,6 +1709,7 @@
|
||||
"Transaction Details": "Podrobnosti transakcije",
|
||||
"Statistics & Analysis": "Statistika in analiza",
|
||||
"Insights Explorer": "Vpogledi in raziskovanje",
|
||||
"Insights Explorers": "Insights Explorers",
|
||||
"Query": "Poizvedba",
|
||||
"Data Table": "Podatkovna tabela",
|
||||
"Chart": "Grafikon",
|
||||
|
||||
@@ -1709,6 +1709,7 @@
|
||||
"Transaction Details": "รายละเอียดธุรกรรม",
|
||||
"Statistics & Analysis": "สถิติ & การวิเคราะห์",
|
||||
"Insights Explorer": "Insights Explorer",
|
||||
"Insights Explorers": "Insights Explorers",
|
||||
"Query": "Query",
|
||||
"Data Table": "Data Table",
|
||||
"Chart": "Chart",
|
||||
|
||||
@@ -1709,6 +1709,7 @@
|
||||
"Transaction Details": "İşlem Detayları",
|
||||
"Statistics & Analysis": "İstatistik & Analiz",
|
||||
"Insights Explorer": "Insights Explorer",
|
||||
"Insights Explorers": "Insights Explorers",
|
||||
"Query": "Query",
|
||||
"Data Table": "Data Table",
|
||||
"Chart": "Chart",
|
||||
|
||||
@@ -1709,6 +1709,7 @@
|
||||
"Transaction Details": "Деталі по транзакціях",
|
||||
"Statistics & Analysis": "Статистика та аналіз",
|
||||
"Insights Explorer": "Insights Explorer",
|
||||
"Insights Explorers": "Insights Explorers",
|
||||
"Query": "Query",
|
||||
"Data Table": "Data Table",
|
||||
"Chart": "Chart",
|
||||
|
||||
@@ -1709,6 +1709,7 @@
|
||||
"Transaction Details": "Chi tiết giao dịch",
|
||||
"Statistics & Analysis": "Thống kê & Phân tích",
|
||||
"Insights Explorer": "Insights Explorer",
|
||||
"Insights Explorers": "Insights Explorers",
|
||||
"Query": "Query",
|
||||
"Data Table": "Data Table",
|
||||
"Chart": "Chart",
|
||||
|
||||
@@ -1709,6 +1709,7 @@
|
||||
"Transaction Details": "交易详情",
|
||||
"Statistics & Analysis": "统计分析",
|
||||
"Insights Explorer": "洞察探索",
|
||||
"Insights Explorers": "洞察探索",
|
||||
"Query": "查询",
|
||||
"Data Table": "数据表格",
|
||||
"Chart": "图表",
|
||||
|
||||
@@ -1709,6 +1709,7 @@
|
||||
"Transaction Details": "交易詳情",
|
||||
"Statistics & Analysis": "統計分析",
|
||||
"Insights Explorer": "洞察探索",
|
||||
"Insights Explorers": "洞察探索",
|
||||
"Query": "查詢",
|
||||
"Data Table": "資料表格",
|
||||
"Chart": "圖表",
|
||||
|
||||
@@ -24,6 +24,7 @@ export interface DataStatisticsResponse {
|
||||
readonly totalTransactionTagCount: string;
|
||||
readonly totalTransactionCount: string;
|
||||
readonly totalTransactionPictureCount: string;
|
||||
readonly totalInsightsExplorerCount: string;
|
||||
readonly totalTransactionTemplateCount: string;
|
||||
readonly totalScheduledTransactionCount: string;
|
||||
}
|
||||
@@ -34,6 +35,7 @@ export interface DisplayDataStatistics {
|
||||
readonly totalTransactionTagCount: string;
|
||||
readonly totalTransactionCount: string;
|
||||
readonly totalTransactionPictureCount: string;
|
||||
readonly totalInsightsExplorerCount: string;
|
||||
readonly totalTransactionTemplateCount: string;
|
||||
readonly totalScheduledTransactionCount: string;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ export function useDataManagementPageBase() {
|
||||
totalTransactionCategoryCount: formatNumberToLocalizedNumerals(parseInt(dataStatistics.value.totalTransactionCategoryCount)),
|
||||
totalTransactionTagCount: formatNumberToLocalizedNumerals(parseInt(dataStatistics.value.totalTransactionTagCount)),
|
||||
totalTransactionPictureCount: formatNumberToLocalizedNumerals(parseInt(dataStatistics.value.totalTransactionPictureCount)),
|
||||
totalInsightsExplorerCount: formatNumberToLocalizedNumerals(parseInt(dataStatistics.value.totalInsightsExplorerCount)),
|
||||
totalTransactionTemplateCount: formatNumberToLocalizedNumerals(parseInt(dataStatistics.value.totalTransactionTemplateCount)),
|
||||
totalScheduledTransactionCount: formatNumberToLocalizedNumerals(parseInt(dataStatistics.value.totalScheduledTransactionCount))
|
||||
};
|
||||
|
||||
@@ -25,6 +25,18 @@
|
||||
icon: mdiListBoxOutline,
|
||||
color: 'info-darken-1'
|
||||
},
|
||||
{
|
||||
title: 'Transaction Pictures',
|
||||
count: displayDataStatistics ? displayDataStatistics.totalTransactionPictureCount : '-',
|
||||
icon: mdiImage,
|
||||
color: 'error-darken-1'
|
||||
},
|
||||
{
|
||||
title: 'Insights Explorers',
|
||||
count: displayDataStatistics ? displayDataStatistics.totalInsightsExplorerCount : '-',
|
||||
icon: mdiCompassOutline,
|
||||
color: 'warning'
|
||||
},
|
||||
{
|
||||
title: 'Accounts',
|
||||
count: displayDataStatistics ? displayDataStatistics.totalAccountCount : '-',
|
||||
@@ -43,12 +55,6 @@
|
||||
icon: mdiTagOutline,
|
||||
color: 'grey'
|
||||
},
|
||||
{
|
||||
title: 'Transaction Pictures',
|
||||
count: displayDataStatistics ? displayDataStatistics.totalTransactionPictureCount : '-',
|
||||
icon: mdiImage,
|
||||
color: 'error-darken-1'
|
||||
},
|
||||
{
|
||||
title: 'Transaction Templates',
|
||||
count: displayDataStatistics ? displayDataStatistics.totalTransactionTemplateCount : '-',
|
||||
@@ -182,10 +188,11 @@ import {
|
||||
mdiRefresh,
|
||||
mdiListBoxOutline,
|
||||
mdiCreditCardOutline,
|
||||
mdiImage,
|
||||
mdiCompassOutline,
|
||||
mdiViewDashboardOutline,
|
||||
mdiTagOutline,
|
||||
mdiClipboardTextOutline,
|
||||
mdiImage,
|
||||
mdiClipboardTextClockOutline,
|
||||
mdiAlert
|
||||
} from '@mdi/js';
|
||||
|
||||
@@ -4,20 +4,22 @@
|
||||
|
||||
<f7-list strong inset dividers class="margin-vertical skeleton-text" v-if="loading">
|
||||
<f7-list-item title="Transactions" after="Count"></f7-list-item>
|
||||
<f7-list-item title="Transaction Pictures" after="Count"></f7-list-item>
|
||||
<f7-list-item title="Insights Explorers" after="Count"></f7-list-item>
|
||||
<f7-list-item title="Accounts" after="Count"></f7-list-item>
|
||||
<f7-list-item title="Transaction Categories" after="Count"></f7-list-item>
|
||||
<f7-list-item title="Transaction Tags" after="Count"></f7-list-item>
|
||||
<f7-list-item title="Transaction Pictures" after="Count"></f7-list-item>
|
||||
<f7-list-item title="Transaction Templates" after="Count"></f7-list-item>
|
||||
<f7-list-item title="Scheduled Transactions" after="Count"></f7-list-item>
|
||||
</f7-list>
|
||||
|
||||
<f7-list strong inset dividers class="margin-vertical" v-else-if="!loading">
|
||||
<f7-list-item :title="tt('Transactions')" :after="displayDataStatistics ? displayDataStatistics.totalTransactionCount : '-'"></f7-list-item>
|
||||
<f7-list-item :title="tt('Transaction Pictures')" :after="displayDataStatistics ? displayDataStatistics.totalTransactionPictureCount : '-'"></f7-list-item>
|
||||
<f7-list-item :title="tt('Insights Explorers')" :after="displayDataStatistics ? displayDataStatistics.totalInsightsExplorerCount : '-'"></f7-list-item>
|
||||
<f7-list-item :title="tt('Accounts')" :after="displayDataStatistics ? displayDataStatistics.totalAccountCount : '-'"></f7-list-item>
|
||||
<f7-list-item :title="tt('Transaction Categories')" :after="displayDataStatistics ? displayDataStatistics.totalTransactionCategoryCount : '-'"></f7-list-item>
|
||||
<f7-list-item :title="tt('Transaction Tags')" :after="displayDataStatistics ? displayDataStatistics.totalTransactionTagCount : '-'"></f7-list-item>
|
||||
<f7-list-item :title="tt('Transaction Pictures')" :after="displayDataStatistics ? displayDataStatistics.totalTransactionPictureCount : '-'"></f7-list-item>
|
||||
<f7-list-item :title="tt('Transaction Templates')" :after="displayDataStatistics ? displayDataStatistics.totalTransactionTemplateCount : '-'"></f7-list-item>
|
||||
<f7-list-item :title="tt('Scheduled Transactions')" :after="displayDataStatistics ? displayDataStatistics.totalScheduledTransactionCount : '-'"></f7-list-item>
|
||||
</f7-list>
|
||||
|
||||
Reference in New Issue
Block a user