Commit 93a3b9aa authored by hasan khaddour's avatar hasan khaddour

fix contribution queries ,

add missing cqrs
parent 944b8ce2
......@@ -5,6 +5,8 @@ namespace PSManagement.Application.Customers.Common
{
public class ContactInfoDTO
{
public int Id { get; set; }
public String ContactValue { get; set; }
public String ContactType { get; set; }
......
......@@ -24,4 +24,8 @@
<ProjectReference Include="..\PSManagement.SharedKernel\PSManagement.SharedKernel.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Steps\EventsHandlers\" />
</ItemGroup>
</Project>
using PSManagement.Application.Employees.Common;
using PSManagement.Domain.Employees.Entities;
namespace PSManagement.Application.Projects.Common
{
public class EmployeeContributionDTO {
public int ContributionRatio { get; set; }
public EmployeeDTO Employee { get; set; }
public EmployeeContributionDTO(int contributionRatio, EmployeeDTO employee)
{
ContributionRatio = contributionRatio;
Employee = employee;
}
}
}
using Ardalis.Result;
using PSManagement.SharedKernel.CQRS.Command;
using System.Linq;
namespace PSManagement.Application.Projects.UseCases.Commands.RemoveAttachment
{
public record RemoveAttachmentCommand(
int ProjectId,
int AttachmentId
) : ILoggableCommand<Result>;
}
using Ardalis.Result;
using PSManagement.Domain.Projects;
using PSManagement.Domain.Projects.DomainErrors;
using PSManagement.Domain.Projects.Entities;
using PSManagement.Domain.Projects.Repositories;
using PSManagement.SharedKernel.CQRS.Command;
using PSManagement.SharedKernel.Interfaces;
using PSManagement.SharedKernel.Repositories;
using PSManagement.SharedKernel.Specification;
using System.Threading;
using System.Threading.Tasks;
namespace PSManagement.Application.Projects.UseCases.Commands.RemoveAttachment
{
public class RemoveAttachmentCommandHandler : ICommandHandler<RemoveAttachmentCommand, Result>
{
private readonly IRepository<Attachment> _attachmentRepository;
private readonly IProjectsRepository _projectsRepository;
private readonly IUnitOfWork _unitOfWork;
private readonly BaseSpecification<Project> _specification;
public RemoveAttachmentCommandHandler(
IProjectsRepository projectsRepository,
IUnitOfWork unitOfWork,
IRepository<Attachment> attachmentRepository)
{
_specification = new ProjectSpecification();
_projectsRepository = projectsRepository;
_unitOfWork = unitOfWork;
_attachmentRepository = attachmentRepository;
}
public async Task<Result> Handle(RemoveAttachmentCommand request, CancellationToken cancellationToken)
{
_specification.AddInclude(e => e.Attachments);
Project project = await _projectsRepository.GetByIdAsync(request.ProjectId, _specification);
if (project is null)
{
return Result.Invalid(ProjectsErrors.InvalidEntryError);
}
else
{
if (!project.HasAttachment(request.AttachmentId))
{
return Result.Invalid(ProjectsErrors.AttachmentUnExist);
}
project.DropAttachment(request.AttachmentId);
await _unitOfWork.SaveChangesAsync();
return Result.Success();
}
}
}
}
using Ardalis.Result;
using PSManagement.Application.Projects.Common;
using PSManagement.SharedKernel.CQRS.Command;
using PSManagement.SharedKernel.CQRS.Query;
using System;
using System.Collections.Generic;
using System.Text;
namespace PSManagement.Application.Projects.UseCases.Queries.GetCompletionContribution
{
public record GetCompletionContributionQuery(
int ProjectId) : IQuery<Result<IEnumerable<EmployeeContributionDTO>>>;
}
using Ardalis.Result;
using AutoMapper;
using PSManagement.Application.Employees.Common;
using PSManagement.Application.Projects.Common;
using PSManagement.Domain.Projects;
using PSManagement.Domain.Projects.DomainErrors;
using PSManagement.Domain.Projects.Entities;
using PSManagement.Domain.Projects.Repositories;
using PSManagement.Domain.Steps.Repositories;
using PSManagement.Domain.Tracking;
using PSManagement.Domain.Tracking.Specification;
using PSManagement.SharedKernel.CQRS.Query;
using PSManagement.SharedKernel.Interfaces;
using PSManagement.SharedKernel.Specification;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
namespace PSManagement.Application.Projects.UseCases.Queries.GetCompletionContribution
{
public class GetCompletionContributionQueryHandler : IQueryHandler<GetCompletionContributionQuery, Result<IEnumerable<EmployeeContributionDTO>>>
{
private readonly IProjectsRepository _projectsRepository;
private readonly BaseSpecification<Project> _projectSpecification;
private readonly BaseSpecification<Track> _trackSpecification;
private readonly ITracksRepository _tracksRepository;
private readonly IMapper _mapper;
public GetCompletionContributionQueryHandler(
IProjectsRepository projectsRepository,
ITracksRepository tracksRepository,
IMapper mapper )
{
_projectSpecification = new ProjectSpecification();
_trackSpecification = new TrackSpecification();
_projectsRepository = projectsRepository;
_tracksRepository = tracksRepository;
_mapper = mapper;
}
public async Task<Result<IEnumerable<EmployeeContributionDTO>>> Handle(GetCompletionContributionQuery request, CancellationToken cancellationToken)
{
_trackSpecification.AddInclude(e => e.EmployeeTracks);
_trackSpecification.AddInclude("EmployeeTracks.Employee");
_trackSpecification.Criteria = e => e.ProjectId == request.ProjectId;
Project project = await _projectsRepository.GetByIdAsync(request.ProjectId, _projectSpecification);
if (project is null)
{
return Result.Invalid(ProjectsErrors.InvalidEntryError);
}
else
{
if (project.ProjectCompletion is null)
{
return Result.Invalid(ProjectsErrors.UnCompletedError);
}
var tracks = await _tracksRepository.ListAsync(_trackSpecification);
// Dictionary to accumulate contributions by employee
var contributionsByEmployee = new Dictionary<int, EmployeeContributionDTO>();
foreach (Track track in tracks)
{
foreach (EmployeeTrack employeeTrack in track.EmployeeTracks)
{
var employeeId = employeeTrack.Employee.Id; // Assuming Employee has an Id property
var contributionRatio = employeeTrack.EmployeeWork.ContributingRatio;
// If employee already has contributions, sum them up
if (contributionsByEmployee.ContainsKey(employeeId))
{
contributionsByEmployee[employeeId].ContributionRatio += contributionRatio;
}
else
{
// Otherwise, add a new entry for the employee
contributionsByEmployee[employeeId] = new EmployeeContributionDTO(contributionRatio, _mapper.Map<EmployeeDTO>(employeeTrack.Employee));
}
}
}
// Convert the dictionary values to a list for the final result
var contributions = contributionsByEmployee.Values.ToList();
//var tracks = await _tracksRepository.ListAsync(_trackSpecification);
//var contributions = new List<EmployeeContributionDTO>();
//foreach (Track track in tracks) {
// foreach (EmployeeTrack employeeTrack in track.EmployeeTracks) {
// // need to fix
// contributions.Add(
// new (employeeTrack.EmployeeWork.ContributingRatio,employeeTrack.Employee));
// }
//}
return Result.Success(contributions.AsEnumerable());
}
}
}
}
using Ardalis.Result;
using PSManagement.Domain.Projects.ValueObjects;
using PSManagement.SharedKernel.CQRS.Command;
namespace PSManagement.Application.Steps.UseCases.Commands.UpdateStepInformaion
{
public record UpdateStepInformationCommand(
int StepId,
StepInfo StepInfo
) : ICommand<Result>;
}
using Ardalis.Result;
using PSManagement.Domain.Projects.DomainErrors;
using PSManagement.Domain.Projects.Entities;
using PSManagement.Domain.Projects.Repositories;
using PSManagement.SharedKernel.CQRS.Command;
using System.Threading;
using System.Threading.Tasks;
namespace PSManagement.Application.Steps.UseCases.Commands.UpdateStepInformaion
{
public class UpdateStepInformationCommandHandler : ICommandHandler<UpdateStepInformationCommand, Result>
{
private readonly IStepsRepository _stepsRepository;
public UpdateStepInformationCommandHandler(IStepsRepository stepsRepository)
{
_stepsRepository = stepsRepository;
}
public async Task<Result> Handle(UpdateStepInformationCommand request, CancellationToken cancellationToken)
{
Step step = await _stepsRepository.GetByIdAsync(request.StepId);
if (step is null)
{
return Result.Invalid(StepsErrors.InvalidEntryError);
}
else
{
step.ChangeInfo(request.StepInfo);
await _stepsRepository.UpdateAsync(step);
return Result.Success();
}
}
}
}
using Ardalis.Result;
using PSManagement.Application.Tracks.Common;
using PSManagement.SharedKernel.CQRS.Query;
using System.Collections.Generic;
namespace PSManagement.Application.Tracks.UseCaes.Queries.GetTracksByFilter
{
public record GetTracksByFilterQuery(
int? PageNumber,
int? PageSize
) : IQuery<Result<IEnumerable<TrackDTO>>>;
}
using Ardalis.Result;
using AutoMapper;
using PSManagement.Application.Tracks.Common;
using PSManagement.Domain.Projects.Repositories;
using PSManagement.Domain.Steps.Repositories;
using PSManagement.Domain.Tracking;
using PSManagement.Domain.Tracking.Specification;
using PSManagement.SharedKernel.CQRS.Query;
using PSManagement.SharedKernel.Specification;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace PSManagement.Application.Tracks.UseCaes.Queries.GetTracksByFilter
{
public class GetTracksByFilterQueryHandler : IQueryHandler<GetTracksByFilterQuery, Result<IEnumerable<TrackDTO>>>
{
private readonly IProjectsRepository _projectsRepository;
private readonly ITracksRepository _tracksRepository;
private readonly IMapper _mapper;
private readonly BaseSpecification<Track> _specification;
public GetTracksByFilterQueryHandler(
IMapper mapper,
IProjectsRepository projectsRepository,
ITracksRepository tracksRepository)
{
_mapper = mapper;
_projectsRepository = projectsRepository;
_specification = new TrackSpecification();
_tracksRepository = tracksRepository;
}
public async Task<Result<IEnumerable<TrackDTO>>> Handle(GetTracksByFilterQuery request, CancellationToken cancellationToken)
{
_specification.ApplyOptionalPagination(request.PageSize, request.PageNumber);
var tracks = await _tracksRepository.ListAsync(_specification);
return Result.Success(_mapper.Map<IEnumerable<TrackDTO>>(tracks));
}
}
}
......@@ -15,5 +15,4 @@ namespace PSManagement.Application.Tracks.UseCaes.Queries.GetTracksByProject
) : IQuery<Result<IEnumerable<TrackDTO>>>;
}
......@@ -3,6 +3,8 @@
namespace PSManagement.Contracts.Customers.Responses
{
public class ContactInfoResponse {
public int Id { get; set; }
public String ContactType { get; set; }
public String ContactValue { get; set; }
}
......
......@@ -8,4 +8,5 @@ namespace PSManagement.Contracts.Projects.Requests
String AttachmentDescription,
String AttachmentName,
IFormFile File);
}
namespace PSManagement.Contracts.Projects.Requests
{
public record RemoveAttachmentRequest(
int ProjectId,
int AttachmentId
);
}
using PSManagement.Domain.Projects.ValueObjects;
using System;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PSManagement.Contracts.Projects.Response
{
public record CreateProjectResponse(
int ProjectId,
ProposalInfo ProposalInfo,
ProjectInfo ProjectInfo,
Aggreement ProjectAggrement,
int TeamLeaderId,
int ProjectManagerId,
int ExecuterId
);
}
namespace PSManagement.Contracts.Projects.Response
{
public record EmployeeContributionReponse(
int ContributionRatio,
EmployeeResponse Employee
);
}
using PSManagement.Domain.Projects.ValueObjects;
namespace PSManagement.Contracts.Steps.Requests
{
public record ChangeStepInfoRequest(
int StepId,
StepInfo StepInfo);
}
\ No newline at end of file
namespace PSManagement.Contracts.Steps.Requests
{
public record ChangeStepWeightRequest(
int StepId,
int Weight
);
int StepId,
int Weight
);
}
\ No newline at end of file
namespace PSManagement.Contracts.Tracks.Requests
{
public record GetTracksByFilterRequest(
int? PageNumber,
int? PageSize
);
}
......@@ -13,7 +13,9 @@ namespace PSManagement.Domain.Projects.DomainErrors
public static DomainError InvalidEntryError { get; } = new ("ProjectError.InvalidEntry.", "Invalid Project Data");
public static DomainError ParticipantExistError { get; } = new("ProjectError.Participant.Exist.", "the Project already have the given particpant Data");
public static DomainError ParticipantUnExistError { get; } = new("ProjectError.Participant.UnExist.", "the Project doesnt have the given particpant Data");
public static DomainError InvalidStepWeight { get; } = new("ProjectError.Step.InvaildWeight", "theStep Weigths has invalid sum");
public static DomainError InvalidStepWeight { get; } = new("ProjectError.Step.InvaildWeight", "the Step Weigths has invalid sum");
public static DomainError AttachmentUnExist { get; } = new("ProjectError.Attachemnt.UnExits", "the Attachment un exist");
public static DomainError UnCompletedError { get; } = new("ProjectError.Project.Uncompleted", "the Project un complted");
public static DomainError StateTracnsitionError (string from, string to) => new("ProjectError.StateTransitionError","you cannot change the project state from " +from +" to "+to);
......
......@@ -135,6 +135,18 @@ namespace PSManagement.Domain.Projects.Entities
}
public void DropAttachment(int attachmentId)
{
var attachment = Attachments.Where(e => e.Id == attachmentId).FirstOrDefault();
Attachments.Remove(attachment);
}
public bool HasAttachment(int attachmentId)
{
return Attachments.Where(e => e.Id == attachmentId).FirstOrDefault() is null;
}
public void AddParticipation(int participantId, int projectId, string role, int partialTimeRatio)
{
this.EmployeeParticipates.Add(new (participantId,projectId,role, partialTimeRatio));
......
......@@ -4,6 +4,7 @@ using PSManagement.Domain.Tracking;
using PSManagement.Domain.Tracking.Entities;
using PSManagement.SharedKernel.Aggregate;
using PSManagement.SharedKernel.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
......@@ -38,6 +39,15 @@ namespace PSManagement.Domain.Projects.Entities
}
#endregion Constructors
public void ChangeInfo(StepInfo stepInfo)
{
this.StepInfo = new (stepInfo.StepName,stepInfo.Description,stepInfo.StartDate,stepInfo.Duration,stepInfo.NumberOfWorker);
}
}
}
......@@ -119,7 +119,7 @@ namespace PSManagement.Presentation.Controllers.Customers
}
[HttpDelete("RemoveContactInfo")]
[HttpPost("RemoveContactInfo")]
public async Task<IActionResult> DeleteContactInfo(RemoveContactInfoRequest request)
{
var command = _mapper.Map<RemoveContactInfoCommand>(request);
......
......@@ -25,6 +25,8 @@ using PSManagement.Application.Projects.UseCases.Commands.CancelProject;
using PSManagement.Application.Projects.UseCases.Commands.ChangeProjectManager;
using PSManagement.Presentation.Controllers.ApiBase;
using PSManagement.Application.Projects.UseCases.Queries.GetParticipationChangeHistory;
using PSManagement.Application.Projects.UseCases.Queries.GetCompletionContribution;
using PSManagement.Application.Projects.UseCases.Commands.RemoveAttachment;
namespace PSManagement.Presentation.Controllers.Projects
{
......@@ -32,10 +34,15 @@ namespace PSManagement.Presentation.Controllers.Projects
[ApiController]
public class ProjectsController : APIController
{
#region Dependency
private readonly IMediator _sender;
private readonly IMapper _mapper;
private readonly ICurrentUserProvider _currentUserProvider;
#endregion Dependency
#region Construtor
public ProjectsController(
IMapper mapper,
IMediator sender,
......@@ -47,7 +54,9 @@ namespace PSManagement.Presentation.Controllers.Projects
_currentUserProvider = currentUserProvider;
}
#endregion Construtor
#region Queries
[HttpGet]
public async Task<IActionResult> Get([FromQuery] ListAllProjectsRequest request)
{
......@@ -58,6 +67,19 @@ namespace PSManagement.Presentation.Controllers.Projects
return HandleResult(result);
}
[HttpGet("{id}")]
public async Task<IActionResult> Get(int id)
{
var query = new GetProjectByIdQuery(id);
var result = await _sender.Send(query);
return HandleResult(_mapper.Map<Result<ProjectResponse>>(result));
}
[HttpGet("ParticipationChangeHistory/{id}")]
public async Task<IActionResult> GetPartiipationChangesHistory(int id )
{
......@@ -79,6 +101,8 @@ namespace PSManagement.Presentation.Controllers.Projects
return HandleResult(_mapper.Map<Result<IEnumerable<ProjectDetailsResponse>>>(result));
}
[HttpGet("ByProjectManager")]
public async Task<IActionResult> GetByPojectManager([FromQuery] GetProjectsByProjectManagerRequest request)
{
......@@ -88,17 +112,9 @@ namespace PSManagement.Presentation.Controllers.Projects
return HandleResult(_mapper.Map<Result<IEnumerable<ProjectDetailsResponse>>>(result));
}
[HttpGet("GetParticipants/{id}")]
public async Task<IActionResult> GetParticipants(int id)
{
GetProjectParticipantsQuery query = new(id);
var result = await _sender.Send(query);
return HandleResult(_mapper.Map<Result<IEnumerable<EmployeeParticipateResponse>>>(result));
}
#endregion Queries
#region Project Management
[HttpPut("ChangeTeamLeader")]
public async Task<IActionResult> PuttChangeTeamLeader(ChangeProjectTeamLeaderRequest request)
......@@ -120,6 +136,10 @@ namespace PSManagement.Presentation.Controllers.Projects
return HandleResult(result);
}
#endregion Project Management
#region Step Management
[HttpPost("AddProjectStep")]
public async Task<IActionResult> PostAddParticipant(AddProjectStepRequest request)
......@@ -131,29 +151,11 @@ namespace PSManagement.Presentation.Controllers.Projects
return HandleResult(result);
}
[HttpPost("RemoveParticipant")]
public async Task<IActionResult> PostRemoveParticipant(RemoveParticipantRequest request)
{
var query = _mapper.Map<RemoveParticipantCommand>(request);
var result = await _sender.Send(query);
return HandleResult(result);
}
[HttpPost("AddParticipant")]
public async Task<IActionResult> PostAddParticipant(AddParticipantRequest request)
{
var query = _mapper.Map<AddParticipantCommand>(request);
#endregion Step Management
var result = await _sender.Send(query);
return HandleResult(result);
}
#region project state operations
#region Project State Operations
[HttpPost("ApproveProject")]
public async Task<IActionResult> PostApproveProjectRequest(ApproveProjectRequest request)
......@@ -205,28 +207,66 @@ namespace PSManagement.Presentation.Controllers.Projects
}
#endregion project state operations
[HttpPost("ChangeParticipation")]
public async Task<IActionResult> PostChangePArticipation(ChangeEmployeeParticipationRequest request)
#endregion Project State Operations
#region Participation Management
[HttpGet("CompletionContributions/{id}")]
public async Task<IActionResult> GetCompletionContribution(int id)
{
var query = _mapper.Map<ChangeEmployeeParticipationCommand>(request);
var query = new GetCompletionContributionQuery(id);
var result = await _sender.Send(query);
return HandleResult(_mapper.Map<Result<IEnumerable<EmployeeContributionReponse>>>(result));
}
[HttpGet("GetParticipants/{id}")]
public async Task<IActionResult> GetParticipants(int id)
{
GetProjectParticipantsQuery query = new(id);
var result = await _sender.Send(query);
return HandleResult(_mapper.Map<Result<IEnumerable<EmployeeParticipateResponse>>>(result));
}
[HttpPost("RemoveParticipant")]
public async Task<IActionResult> PostRemoveParticipant(RemoveParticipantRequest request)
{
var query = _mapper.Map<RemoveParticipantCommand>(request);
var result = await _sender.Send(query);
return HandleResult(result);
}
[HttpPost("AddParticipant")]
public async Task<IActionResult> PostAddParticipant(AddParticipantRequest request)
{
var query = _mapper.Map<AddParticipantCommand>(request);
[HttpGet("{id}")]
public async Task<IActionResult> Get(int id)
var result = await _sender.Send(query);
return HandleResult(result);
}
[HttpPost("ChangeParticipation")]
public async Task<IActionResult> PostChangePArticipation(ChangeEmployeeParticipationRequest request)
{
var query = new GetProjectByIdQuery(id);
var query = _mapper.Map<ChangeEmployeeParticipationCommand>(request);
var result = await _sender.Send(query);
return HandleResult(_mapper.Map<Result<ProjectResponse>>(result));
return HandleResult(result);
}
#endregion Participation Management
#region Propose
[HttpPost]
public async Task<IActionResult> Post([FromBody] CreateProjectRequest request)
......@@ -252,6 +292,10 @@ namespace PSManagement.Presentation.Controllers.Projects
}
#endregion Propose
#region Attachments Management
[HttpPost("AddAttachment")]
public async Task<IActionResult> PostAddAttachment([FromForm] AddAttachmentRequest request)
{
......@@ -260,6 +304,16 @@ namespace PSManagement.Presentation.Controllers.Projects
return HandleResult(result);
}
[HttpPost("RemoveAttachment")]
public async Task<IActionResult> PostRemoveAttachment( RemoveAttachmentRequest request)
{
var command = _mapper.Map<RemoveAttachmentCommand>(request);
var result = await _sender.Send(command);
return HandleResult(result);
}
[HttpGet("Attachments")]
public async Task<IActionResult> GetAttachments([FromQuery] GetProjectAttachmentsRequest request)
{
......@@ -269,6 +323,6 @@ namespace PSManagement.Presentation.Controllers.Projects
return HandleResult(_mapper.Map<Result<IEnumerable<AttachmentReponse>>>(result));
}
#endregion Attachments Management
}
}
......@@ -17,20 +17,27 @@ using System.Linq;
using System.Threading.Tasks;
using PSManagement.Contracts.Tracks.Response;
using PSManagement.Presentation.Controllers.ApiBase;
using PSManagement.Application.Steps.UseCases.Commands.UpdateStepInformaion;
namespace PSManagement.Presentation.Controllers.Steps
{
[Route("api/[controller]")]
public class StepsController : APIController
{
#region Dependency
private readonly IMapper _mapper;
private readonly IMediator _sender;
#endregion Dependency
#region Constructors
public StepsController(IMediator sender, IMapper mapper)
{
_sender = sender;
_mapper = mapper;
}
#endregion Constructors
#region Queries
[HttpGet("{id}")]
public async Task<IActionResult> Get(int id)
......@@ -52,6 +59,10 @@ namespace PSManagement.Presentation.Controllers.Steps
return HandleResult(result);
}
#endregion Queries
#region Update
[HttpPut("ChangeStepWeight/{id}")]
public async Task<IActionResult> PutChangeStepWeight(ChangeStepWeightRequest request, [FromRoute] int id)
{
......@@ -61,18 +72,18 @@ namespace PSManagement.Presentation.Controllers.Steps
}
var query = _mapper.Map<ChangeStepWeightCommand>(request); ;
var result = _mapper.Map<Result>(await _sender.Send(query));
var result = await _sender.Send(query);
return HandleResult(result);
}
[HttpGet("StepTrackHistory")]
public async Task<IActionResult> Get([FromQuery] GetStepTrackHistoryRequest request)
[HttpPut("UpdateStepInfo/{id}")]
public async Task<IActionResult> PutChangeStepInfo(ChangeStepInfoRequest request )
{
var query = _mapper.Map<GetStepTrackHistoryQuery>(request);
var result = _mapper.Map<Result<IEnumerable<StepTrackResponse>>>(await _sender.Send(query));
var query = _mapper.Map<UpdateStepInformationCommand>(request); ;
var result = _mapper.Map<Result>(await _sender.Send(query));
return HandleResult(result);
}
......@@ -87,6 +98,23 @@ namespace PSManagement.Presentation.Controllers.Steps
return HandleResult(result);
}
#endregion Update
#region Track History
[HttpGet("StepTrackHistory")]
public async Task<IActionResult> Get([FromQuery] GetStepTrackHistoryRequest request)
{
var query = _mapper.Map<GetStepTrackHistoryQuery>(request);
var result = _mapper.Map<Result<IEnumerable<StepTrackResponse>>>(await _sender.Send(query));
return HandleResult(result);
}
#endregion Track History
#region Delete
[HttpDelete("{id}")]
public async Task<IActionResult> Delete([FromRoute] int id)
{
......@@ -96,5 +124,6 @@ namespace PSManagement.Presentation.Controllers.Steps
return HandleResult(result);
}
#endregion Delete
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment