fixed legal basis issues with backend not exactly matching LB reason

This commit is contained in:
Timo 2021-07-23 14:46:51 +03:00
parent 17d9a97bce
commit de6b57d7cd

View File

@ -359,7 +359,7 @@ export class AnnotationWrapper {
private static _getShortContent(entry: RedactionLogEntryWrapper) {
if (entry.legalBasis) {
const lb = entry.legalBasisMapping?.find(lbm => lbm.reason === entry.legalBasis);
const lb = entry.legalBasisMapping?.find(lbm => lbm.reason.toLowerCase().includes(entry.legalBasis.toLowerCase()));
if (lb) return lb.name;
}