feat: add method to retrieve task sections assigned to a user and enhance permission code structure
This commit is contained in:
@@ -28,4 +28,11 @@ public class TaskSectionRepository:RepositoryBase<Guid,TaskSection>,ITaskSection
|
||||
.Include(x => x.AdditionalTimes)
|
||||
.FirstOrDefaultAsync(x => x.Id == id, cancellationToken);
|
||||
}
|
||||
|
||||
public async Task<List<TaskSection>> GetAssignedToUserAsync(long userId)
|
||||
{
|
||||
return await _context.TaskSections
|
||||
.Where(x => x.CurrentAssignedUserId == userId)
|
||||
.ToListAsync();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user