Merge dev to main #1
@@ -14,28 +14,24 @@ export class DashboardController {
|
|||||||
@Get('kpis')
|
@Get('kpis')
|
||||||
@Roles('manager')
|
@Roles('manager')
|
||||||
async getKpis(@CurrentUser() user: CurrentUserPayload) {
|
async getKpis(@CurrentUser() user: CurrentUserPayload) {
|
||||||
const data = await this.dashboardService.getKpis(user.tenantId);
|
return this.dashboardService.getKpis(user.tenantId);
|
||||||
return { data };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Get('revenue-chart')
|
@Get('revenue-chart')
|
||||||
@Roles('manager')
|
@Roles('manager')
|
||||||
async getRevenueChart(@CurrentUser() user: CurrentUserPayload) {
|
async getRevenueChart(@CurrentUser() user: CurrentUserPayload) {
|
||||||
const data = await this.dashboardService.getRevenueChart(user.tenantId);
|
return this.dashboardService.getRevenueChart(user.tenantId);
|
||||||
return { data };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Get('activity')
|
@Get('activity')
|
||||||
@Roles('manager')
|
@Roles('manager')
|
||||||
async getActivity(@CurrentUser() user: CurrentUserPayload) {
|
async getActivity(@CurrentUser() user: CurrentUserPayload) {
|
||||||
const data = await this.dashboardService.getRecentActivity(user.tenantId);
|
return this.dashboardService.getRecentActivity(user.tenantId);
|
||||||
return { data };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Get('financial-summary')
|
@Get('financial-summary')
|
||||||
@Roles('manager')
|
@Roles('manager')
|
||||||
async getFinancialSummary(@CurrentUser() user: CurrentUserPayload) {
|
async getFinancialSummary(@CurrentUser() user: CurrentUserPayload) {
|
||||||
const data = await this.dashboardService.getFinancialSummary(user.tenantId);
|
return this.dashboardService.getFinancialSummary(user.tenantId);
|
||||||
return { data };
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user