Revize 7dcdd235
Přidáno uživatelem Vojtěch Bartička před asi 2 roky(ů)
Backend/Core/Services/UserService/UserServiceEF.cs | ||
---|---|---|
190 | 190 |
foreach (var user in users) |
191 | 191 |
{ |
192 | 192 |
var userInfo = _mapper.Map<UserInfo>(user); |
193 |
userInfo.AssignedDocumentsCount = _databaseContext.Annotations
|
|
193 |
var annotations = _databaseContext.Annotations
|
|
194 | 194 |
.Include(a => a.User) |
195 | 195 |
.Where(a => !(a is FinalAnnotation)) |
196 | 196 |
.Where(a => a.User == user) |
197 |
.Count(); |
|
197 |
.ToList(); |
|
198 |
userInfo.NewDocumentsCount = annotations.Where(a => a.State == EState.NEW).Count(); |
|
199 |
userInfo.InProgressDocumentsCount = annotations.Where(a => a.State == EState.IN_PROGRESS).Count(); |
|
200 |
userInfo.FinalizedDocumentsCount = annotations.Where(a => a.State == EState.DONE).Count(); |
|
198 | 201 |
userList.Users.Add(userInfo); |
199 | 202 |
} |
200 | 203 |
|
Také k dispozici: Unified diff
Added more info to UserInfo return DTO