diff --git a/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Projects/Queries/GetProjectsList/GetProjectsListQueryHandler.cs b/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Projects/Queries/GetProjectsList/GetProjectsListQueryHandler.cs index 5c4af255..9d184312 100644 --- a/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Projects/Queries/GetProjectsList/GetProjectsListQueryHandler.cs +++ b/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Projects/Queries/GetProjectsList/GetProjectsListQueryHandler.cs @@ -72,6 +72,7 @@ public class GetProjectsListQueryHandler : IBaseQueryHandler x.Percentage).ToList(); return result; } @@ -101,6 +102,7 @@ public class GetProjectsListQueryHandler : IBaseQueryHandler x.Percentage).ToList(); return result; } @@ -189,14 +191,14 @@ public class GetProjectsListQueryHandler : IBaseQueryHandler x.Percentage).ToList(); return result; } diff --git a/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Projects/Queries/GetProjectsList/GetTaskListDto.cs b/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Projects/Queries/GetProjectsList/GetTaskListDto.cs index 0661cdb1..c7cf11ae 100644 --- a/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Projects/Queries/GetProjectsList/GetTaskListDto.cs +++ b/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Projects/Queries/GetProjectsList/GetTaskListDto.cs @@ -9,8 +9,8 @@ public class GetTaskDto public int Percentage { get; init; } public ProjectHierarchyLevel Level { get; init; } public Guid? ParentId { get; init; } - public int TotalHours { get; set; } - public int Minutes { get; set; } + + public TimeSpan TotalTime { get; set; } // Task-specific fields public TimeSpan SpentTime { get; init; } diff --git a/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Projects/Queries/ProjectBoardList/ProjectBoardListQuery.cs b/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Projects/Queries/ProjectBoardList/ProjectBoardListQuery.cs index d550cdbe..c15ca74b 100644 --- a/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Projects/Queries/ProjectBoardList/ProjectBoardListQuery.cs +++ b/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Projects/Queries/ProjectBoardList/ProjectBoardListQuery.cs @@ -7,6 +7,6 @@ namespace GozareshgirProgramManager.Application.Modules.Projects.Queries.Project public record ProjectBoardListQuery: IBaseQuery> { public long? UserId { get; set; } - public string? SearchText { get; set; } + public string? ProjectName { get; set; } public TaskSectionStatus? Status { get; set; } } \ No newline at end of file diff --git a/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Projects/Queries/ProjectBoardList/ProjectBoardListQueryHandler.cs b/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Projects/Queries/ProjectBoardList/ProjectBoardListQueryHandler.cs index a5b171f4..8eb4861f 100644 --- a/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Projects/Queries/ProjectBoardList/ProjectBoardListQueryHandler.cs +++ b/ProgramManager/src/Application/GozareshgirProgramManager.Application/Modules/Projects/Queries/ProjectBoardList/ProjectBoardListQueryHandler.cs @@ -46,11 +46,11 @@ public class ProjectBoardListQueryHandler : IBaseQueryHandler x.CurrentAssignedUserId == request.UserId); } - if (!string.IsNullOrWhiteSpace(request.SearchText)) + if (!string.IsNullOrWhiteSpace(request.ProjectName)) { - queryable = queryable.Where(x=>x.Task.Name.Contains(request.SearchText) - || x.Task.Phase.Name.Contains(request.SearchText) - || x.Task.Phase.Project.Name.Contains(request.SearchText)); + queryable = queryable.Where(x=>x.Task.Name.Contains(request.ProjectName) + || x.Task.Phase.Name.Contains(request.ProjectName) + || x.Task.Phase.Project.Name.Contains(request.ProjectName)); } var data = await queryable.ToListAsync(cancellationToken); @@ -70,6 +70,9 @@ public class ProjectBoardListQueryHandler : IBaseQueryHandler x.CurrentAssignedUserId == currentUserId) .ThenByDescending(x=>x.Task.Priority) .ThenBy(x => GetStatusOrder(x.Status)) + .ThenBy(x=>x.Task.Phase.ProjectId) + .ThenBy(x=>x.Task.PhaseId) + .ThenBy(x=>x.TaskId) .Select(x => { // محاسبه یکبار برای هر Activity و Cache کردن نتیجه