Spaces:
Running
Running
User
fix: adjust overall structure, clean out unnecessary fields, adjust table columns and layouts on task list and issue list
ecb51fa | using Microsoft.AspNetCore.Authorization; | |
| using Microsoft.AspNetCore.Mvc; | |
| using System.Collections.Generic; | |
| using System.Threading.Tasks; | |
| using TaskTrackingSystem.Shared; | |
| using TaskTrackingSystem.Shared.Models.Dashboard; | |
| using TaskTrackingSystem.WebApi.Infrastructure; | |
| namespace TaskTrackingSystem.WebApi.Features.Dashboard | |
| { | |
| [] | |
| [] | |
| [] | |
| public class DashboardController : ControllerBase | |
| { | |
| private readonly DashboardService _dashboardService; | |
| public DashboardController(DashboardService dashboardService) | |
| { | |
| _dashboardService = dashboardService; | |
| } | |
| [] | |
| public async Task<ActionResult<Result<DashboardSummaryDto>>> GetSummary() | |
| { | |
| var result = await _dashboardService.GetSummaryAsync(User.GetRoleId(), User.GetUserId()); | |
| return StatusCode(result.StatusCode, result); | |
| } | |
| [] | |
| public async Task<ActionResult<Result<IEnumerable<TaskStatusOverviewDto>>>> GetTasksOverview() | |
| { | |
| var result = await _dashboardService.GetTasksOverviewAsync(User.GetRoleId(), User.GetUserId()); | |
| return StatusCode(result.StatusCode, result); | |
| } | |
| [] | |
| public async Task<ActionResult<Result<IEnumerable<ProjectProgressDto>>>> GetProjectProgress() | |
| { | |
| var result = await _dashboardService.GetProjectProgressAsync(User.GetRoleId(), User.GetUserId()); | |
| return StatusCode(result.StatusCode, result); | |
| } | |
| } | |
| } | |