12 lines
737 B
C#
12 lines
737 B
C#
namespace Brizco.Core.EntityServices.Handlers.ShiftPlans;
|
|
|
|
public class CreateShiftPlanCoreCommandHandler(IMediator mediator) : IRequestHandler<CreateShiftPlanCoreCommand, bool>
|
|
{
|
|
public async Task<bool> Handle(CreateShiftPlanCoreCommand request, CancellationToken cancellationToken)
|
|
{
|
|
var shiftPlan = await mediator.Send(new CreateShiftPlanCommand(request.PlanDate, request.ShiftId, request.RoutineId, request.SupervisionUserId, request.UserAndPositionIds), cancellationToken);
|
|
await mediator.Send(new CreateShiftPlanNotificationsCommand(shiftPlan.Id, true), cancellationToken);
|
|
await mediator.Send(new CreateActivitiesByShiftPlanCommand(shiftPlan.Id), cancellationToken);
|
|
return true;
|
|
}
|
|
} |