File

apps/recallassess/recallassess-api/src/api/client/dashboard/dashboard.controller.ts

Prefix

api/client/dashboard

Index

Methods

Methods

Async getAdminDashboardOverview
getAdminDashboardOverview(auth: CLAuthData)
Decorators :
@Get('admin/overview')
@HttpCode(HttpStatus.OK)
@ApiOperation({summary: 'Get admin dashboard overview'})
@ApiResponse({status: 200, description: 'Returns admin dashboard overview with recent activities and pending assessments', type: AdminDashboardOverviewDto})

Get admin dashboard overview (recent activities and pending assessments) GET /api/client/dashboard/admin/overview

Parameters :
Name Type Optional
auth CLAuthData No
Async getAdminDashboardProgress
getAdminDashboardProgress(auth: CLAuthData)
Decorators :
@Get('admin/progress')
@HttpCode(HttpStatus.OK)
@ApiOperation({summary: 'Get admin dashboard progress statistics'})
@ApiResponse({status: 200, description: 'Returns admin dashboard progress statistics', type: AdminDashboardProgressDto})

Get admin dashboard progress statistics GET /api/client/dashboard/admin/progress

Parameters :
Name Type Optional
auth CLAuthData No
Async getParticipantDashboard
getParticipantDashboard(auth: CLAuthData)
Decorators :
@Get()
@HttpCode(HttpStatus.OK)
@ApiOperation({summary: 'Get participant dashboard data'})
@ApiResponse({status: 200, description: 'Returns participant dashboard with stats, courses, and activities', type: ParticipantDashboardDto})

Get participant dashboard data GET /api/client/dashboard

Parameters :
Name Type Optional
auth CLAuthData No
import { Controller, Get, HttpCode, HttpStatus } from '@nestjs/common';
import { ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger';
import { CLAuthData, ClientAuth } from '../../shared/decorators/client-auth.decorator';
import {
  AdminDashboardOverviewDto,
  AdminDashboardProgressDto,
  ParticipantDashboardDto,
} from './dto';
import { CLDashboardService } from './dashboard.service';

@ApiTags('Client - Dashboard')
@Controller('api/client/dashboard')
export class CLDashboardController {
  constructor(private dashboardService: CLDashboardService) {}

  /**
   * Get participant dashboard data
   * GET /api/client/dashboard
   */
  @Get()
  @HttpCode(HttpStatus.OK)
  @ApiOperation({ summary: 'Get participant dashboard data' })
  @ApiResponse({
    status: 200,
    description: 'Returns participant dashboard with stats, courses, and activities',
    type: ParticipantDashboardDto,
  })
  async getParticipantDashboard(@ClientAuth() auth: CLAuthData): Promise<ParticipantDashboardDto> {
    return this.dashboardService.getParticipantDashboard(auth.participantId);
  }

  /**
   * Get admin dashboard overview (recent activities and pending assessments)
   * GET /api/client/dashboard/admin/overview
   */
  @Get('admin/overview')
  @HttpCode(HttpStatus.OK)
  @ApiOperation({ summary: 'Get admin dashboard overview' })
  @ApiResponse({
    status: 200,
    description: 'Returns admin dashboard overview with recent activities and pending assessments',
    type: AdminDashboardOverviewDto,
  })
  async getAdminDashboardOverview(
    @ClientAuth() auth: CLAuthData,
  ): Promise<AdminDashboardOverviewDto> {
    return this.dashboardService.getAdminDashboardOverview(auth.companyId);
  }

  /**
   * Get admin dashboard progress statistics
   * GET /api/client/dashboard/admin/progress
   */
  @Get('admin/progress')
  @HttpCode(HttpStatus.OK)
  @ApiOperation({ summary: 'Get admin dashboard progress statistics' })
  @ApiResponse({
    status: 200,
    description: 'Returns admin dashboard progress statistics',
    type: AdminDashboardProgressDto,
  })
  async getAdminDashboardProgress(
    @ClientAuth() auth: CLAuthData,
  ): Promise<AdminDashboardProgressDto> {
    return this.dashboardService.getAdminDashboardProgress(auth.companyId);
  }
}

results matching ""

    No results matching ""