chore: add business logic
This commit is contained in:
@@ -46,24 +46,12 @@ export class DashboardService {
|
||||
const invoicesCount = await this.getInvoicesCount();
|
||||
const unreadTickets = await this.unreadTickets();
|
||||
const adsCount = await this.getAdsCount();
|
||||
const planRevenueAverage = await this.getPlanRevenueAverage();
|
||||
const plansSalesCount = await this.getPlansSalesCount();
|
||||
const subscriptionGrowthRate = await this.getSubscriptionGrowthRate();
|
||||
const plansSalesCountByMonthsInYear = await this.getPlansSalesCountByMonthsInYear();
|
||||
const plansSalesCountByDaysInMonth = await this.getPlansSalesCountByDaysInMonth();
|
||||
const plansSalesCountByDaysInWeek = await this.getPlansSalesCountByDaysInWeek();
|
||||
return {
|
||||
danakServicesCount,
|
||||
customersCount,
|
||||
invoicesCount,
|
||||
unreadTickets,
|
||||
adsCount,
|
||||
planRevenueAverage,
|
||||
plansSalesCount,
|
||||
subscriptionGrowthRate,
|
||||
plansSalesCountByMonthsInYear,
|
||||
plansSalesCountByDaysInMonth,
|
||||
plansSalesCountByDaysInWeek,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -103,44 +91,4 @@ export class DashboardService {
|
||||
}
|
||||
|
||||
//************************************ */
|
||||
|
||||
private async getPlanRevenueAverage() {
|
||||
const planRevenueCount = await this.subscriptionsService.getPlanRevenueAverage();
|
||||
return planRevenueCount;
|
||||
}
|
||||
|
||||
//************************************ */
|
||||
|
||||
private async getPlansSalesCount() {
|
||||
const plansSalesCount = await this.subscriptionsService.getPlansSalesCount();
|
||||
return plansSalesCount;
|
||||
}
|
||||
|
||||
//************************************ */
|
||||
|
||||
private async getSubscriptionGrowthRate() {
|
||||
const subscriptionGrowthRate = await this.subscriptionsService.getSubscriptionGrowthRate();
|
||||
return subscriptionGrowthRate;
|
||||
}
|
||||
|
||||
//************************************ */
|
||||
|
||||
private async getPlansSalesCountByMonthsInYear() {
|
||||
const plansSalesCountByMonthsInYear = await this.subscriptionsService.getPlansSalesCountByMonthsInYear();
|
||||
return plansSalesCountByMonthsInYear;
|
||||
}
|
||||
|
||||
//************************************ */
|
||||
|
||||
private async getPlansSalesCountByDaysInMonth() {
|
||||
const plansSalesCountByDaysInMonth = await this.subscriptionsService.getPlansSalesCountByDaysInMonth();
|
||||
return plansSalesCountByDaysInMonth;
|
||||
}
|
||||
|
||||
//************************************ */
|
||||
|
||||
private async getPlansSalesCountByDaysInWeek() {
|
||||
const plansSalesCountByDaysInWeek = await this.subscriptionsService.getPlansSalesCountByDaysInWeek();
|
||||
return plansSalesCountByDaysInWeek;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user