feat: add method to retrieve task sections assigned to a user and enhance permission code structure

This commit is contained in:
2025-12-15 14:06:07 +03:30
parent a1e85261a6
commit d9da2e97ab
2 changed files with 48 additions and 5 deletions

View File

@@ -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();
}
}