Api/Brizco.Core/EntityServices/Handlers/ShiftPlans/UpdateShiftPlanCoreCommandH...

11 lines
622 B
C#

namespace Brizco.Core.EntityServices.Handlers.ShiftPlans;
public class UpdateShiftPlanCoreCommandHandler(IMediator mediator) : IRequestHandler<UpdateShiftPlanCoreCommand, bool>
{
public async Task<bool> Handle(UpdateShiftPlanCoreCommand request, CancellationToken cancellationToken)
{
await mediator.Send(new UpdateShiftPlanCommand(request.Id, request.PlanDate, request.ShiftId, request.RoutineId, request.SupervisionUserId, request.UserAndPositionIds), cancellationToken);
await mediator.Send(new UpdateActivitiesByShiftPlanCommand(request.Id), cancellationToken);
return true;
}
}