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) {
|
if (file.hasSuggestions) {
|
||||||
allDistinctNeedsWork.add('suggestion');
|
allDistinctNeedsWork.add('suggestion');
|
||||||
}
|
}
|
||||||
if (file.hasUpdates) {
|
if (file.hasUpdates && file.assignee === this._userService.currentUser.id && !file.isApproved) {
|
||||||
allDistinctNeedsWork.add('updated');
|
allDistinctNeedsWork.add('updated');
|
||||||
}
|
}
|
||||||
if (file.hasImages) {
|
if (file.hasImages) {
|
||||||
@ -277,7 +277,7 @@ export class ConfigService {
|
|||||||
icon: 'red:needs-work',
|
icon: 'red:needs-work',
|
||||||
filterTemplate: needsWorkFilterTemplate,
|
filterTemplate: needsWorkFilterTemplate,
|
||||||
filters: needsWorkFilters.sort(RedactionFilterSorter.byKey),
|
filters: needsWorkFilters.sort(RedactionFilterSorter.byKey),
|
||||||
checker: annotationFilterChecker,
|
checker: (file: File, filter: INestedFilter) => annotationFilterChecker(file, filter, this._userService.currentUser.id),
|
||||||
matchAll: true,
|
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) {
|
switch (filter.id) {
|
||||||
case 'analysis': {
|
case 'analysis': {
|
||||||
return file.analysisRequired;
|
return file.analysisRequired;
|
||||||
@ -62,7 +62,7 @@ export const annotationFilterChecker = (file: File, filter: INestedFilter) => {
|
|||||||
return file.hasNone;
|
return file.hasNone;
|
||||||
}
|
}
|
||||||
case 'updated': {
|
case 'updated': {
|
||||||
return file.hasUpdates;
|
return file.hasUpdates && file.assignee === currentUserId && !file.isApproved;
|
||||||
}
|
}
|
||||||
case 'image': {
|
case 'image': {
|
||||||
return file.hasImages;
|
return file.hasImages;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user