Add project board detail endpoint & validation improvements

- Added GET /board/{id:guid} endpoint to ProjectController for detailed project board info.
- Enforced max length of 15 characters for project names in CreateProjectCommandValidator.
- Improved SetTimeProjectCommandHandler: skip zero/negative initial times, removed duplicate error message, and cleaned up formatting.
- Enhanced RollCallApplication to use employee-specific workshop shift settings when available.
This commit is contained in:
2025-12-16 17:09:28 +03:30
parent 9e5a494881
commit a11e54c333
4 changed files with 30 additions and 11 deletions

View File

@@ -1,4 +1,5 @@
using GozareshgirProgramManager.Application._Common.Models;
using System.Runtime.InteropServices;
using GozareshgirProgramManager.Application._Common.Models;
using GozareshgirProgramManager.Application.Modules.Projects.Commands.AssignProject;
using GozareshgirProgramManager.Application.Modules.Projects.Commands.ChangeStatusSection;
using GozareshgirProgramManager.Application.Modules.Projects.Commands.CreateProject;
@@ -8,6 +9,7 @@ using GozareshgirProgramManager.Application.Modules.Projects.Commands.SetTimePro
using GozareshgirProgramManager.Application.Modules.Projects.Commands.TransferSection;
using GozareshgirProgramManager.Application.Modules.Projects.Queries.GetProjectAssignDetails;
using GozareshgirProgramManager.Application.Modules.Projects.Queries.GetProjectsList;
using GozareshgirProgramManager.Application.Modules.Projects.Queries.ProjectBoardDetail;
using GozareshgirProgramManager.Application.Modules.Projects.Queries.ProjectBoardList;
using GozareshgirProgramManager.Application.Modules.Projects.Queries.ProjectSetTimeDetails;
using MediatR;
@@ -99,4 +101,11 @@ public class ProjectController : ProgramManagerBaseController
var res = await _mediator.Send(query);
return res;
}
[HttpGet("board/{id:guid}")]
public async Task<ActionResult<OperationResult<ProjectBoardDetailResponse>>> Test(Guid id)
{
var query = new ProjectBoardDetailQuery(id);
var res = await _mediator.Send(query);
return res;
}
}