public OutputBase DeleteLeaveRequest(DeleteLeaveRequestInput input) { var request = _leaveRequestRepository.Get(input.LeaveRequestId); if (request.EmployeeId != GetCurrentUserId() && !IsGranted(AppPermissions.Pages_Leave_LeaveRequest_DeleteAny)) { return(new OutputBase { Message = "You cannot delete a request that is not yours", Success = false }); } _leaveRequestRepository.Delete(request); return(new OutputBase { Message = "Request deleted", Success = true }); }
public List <LeaveRequest> Get() { return(iLeaveRequestRepository.Get()); }