From 4aaff26282e42e0bf92d7a6371b7d1709bbed927 Mon Sep 17 00:00:00 2001 From: Valentin Mihai Date: Wed, 16 Mar 2022 15:11:28 +0200 Subject: [PATCH] RED-3572 -> Reason starts with comma --- apps/red-ui/src/app/models/file/annotation.wrapper.ts | 3 +++ 1 file changed, 3 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 8dbd3ec73..ddb59bc96 100644 --- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts +++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts @@ -328,6 +328,9 @@ export class AnnotationWrapper { if (entry.reason) { content += entry.reason + '\n\n'; + //remove leading and trailing commas and whitespaces + content = content.replace(/^[, ]*|[, ]*$/g, ''); + content = content.substring(0, 1).toUpperCase() + content.substring(1); } if (annotationWrapper.legalBasis) {