RED-3366: File updates filter only for current user
This commit is contained in:
parent
ea1fb34fa7
commit
44aa8249ab
@ -190,7 +190,7 @@ export class ConfigService {
|
||||
if (file.hasSuggestions) {
|
||||
allDistinctNeedsWork.add('suggestion');
|
||||
}
|
||||
if (file.hasUpdates) {
|
||||
if (file.hasUpdates && file.assignee === this._userService.currentUser.id && !file.isApproved) {
|
||||
allDistinctNeedsWork.add('updated');
|
||||
}
|
||||
if (file.hasImages) {
|
||||
@ -277,7 +277,7 @@ export class ConfigService {
|
||||
icon: 'red:needs-work',
|
||||
filterTemplate: needsWorkFilterTemplate,
|
||||
filters: needsWorkFilters.sort(RedactionFilterSorter.byKey),
|
||||
checker: annotationFilterChecker,
|
||||
checker: (file: File, filter: INestedFilter) => annotationFilterChecker(file, filter, this._userService.currentUser.id),
|
||||
matchAll: true,
|
||||
});
|
||||
|
||||
|
||||
@ -44,7 +44,7 @@ export function handleFilterDelta(oldFilters: INestedFilter[], newFilters: INest
|
||||
});
|
||||
}
|
||||
|
||||
export const annotationFilterChecker = (file: File, filter: INestedFilter) => {
|
||||
export const annotationFilterChecker = (file: File, filter: INestedFilter, currentUserId: string) => {
|
||||
switch (filter.id) {
|
||||
case 'analysis': {
|
||||
return file.analysisRequired;
|
||||
@ -62,7 +62,7 @@ export const annotationFilterChecker = (file: File, filter: INestedFilter) => {
|
||||
return file.hasNone;
|
||||
}
|
||||
case 'updated': {
|
||||
return file.hasUpdates;
|
||||
return file.hasUpdates && file.assignee === currentUserId && !file.isApproved;
|
||||
}
|
||||
case 'image': {
|
||||
return file.hasImages;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user