From 49b9e98230d6ec7c06faddba5fda5a030286d0ff Mon Sep 17 00:00:00 2001 From: Valentin Mihai Date: Tue, 12 Sep 2023 11:52:40 +0300 Subject: [PATCH] DM-422 - Remove remaining reason/legal basis fields --- apps/red-ui/src/app/models/file/annotation.wrapper.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/red-ui/src/app/models/file/annotation.wrapper.ts b/apps/red-ui/src/app/models/file/annotation.wrapper.ts index 2e9a6648a..91c88b5bc 100644 --- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts +++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts @@ -429,6 +429,10 @@ export class AnnotationWrapper implements IListable { } if (entry.reason) { + if (isDocumine && entry.reason.slice(-1) === '.') { + entry.reason = entry.reason.slice(0, -1); + } + content += entry.reason + '\n\n'; //remove leading and trailing commas and whitespaces content = content.replace(/(^[, ]*)|([, ]*$)/g, '');