diff --git a/frontend/src/app/modules/shared/components/table/table.component.html b/frontend/src/app/modules/shared/components/table/table.component.html index 107c2b92a5..2e60fae8e0 100644 --- a/frontend/src/app/modules/shared/components/table/table.component.html +++ b/frontend/src/app/modules/shared/components/table/table.component.html @@ -68,7 +68,7 @@
diff --git a/frontend/src/app/modules/shared/service/notification.service.ts b/frontend/src/app/modules/shared/service/notification.service.ts index b809b7930d..2f58191468 100644 --- a/frontend/src/app/modules/shared/service/notification.service.ts +++ b/frontend/src/app/modules/shared/service/notification.service.ts @@ -81,7 +81,7 @@ export class NotificationService { public createNotification(affectedPartIds: string[], description: string, severity: Severity, bpn: string, type: string, title: string, dateString: DateTimeString, ): Observable { - const targetDate = null === dateString ? null : new Date(dateString).toISOString(); + const targetDate = dateString?.length > 0 ? new Date(dateString).toISOString() : null; const upperCaseType = type ? type.toUpperCase() : null; const body = { affectedPartIds, description, severity, receiverBpn: bpn, type: upperCaseType, title: title === "" ? null: title, targetDate }; @@ -137,7 +137,8 @@ export class NotificationService { public editNotification(notificationId: string, title: string, receiverBpn: string, severity: string, targetDate: string, description: string, affectedPartIds: string[]): Observable { const requestUrl = this.notificationUrl(); - if(targetDate) { + console.log(targetDate); + if (targetDate?.length > 0) { targetDate = new Date(targetDate).toISOString(); } const body = { title: title === "" ? null: title, receiverBpn: receiverBpn, severity, targetDate, description, affectedPartIds: affectedPartIds }; diff --git a/frontend/src/assets/locales/de/common.json b/frontend/src/assets/locales/de/common.json index bd1581ca4a..25f9c48769 100644 --- a/frontend/src/assets/locales/de/common.json +++ b/frontend/src/assets/locales/de/common.json @@ -124,6 +124,7 @@ "addParts" : "Teile hinzufügen", "viewDetails" : "Details anzeigen", "more" : "Mehr Aktionen", + "multiActionsNotImplemented" : "Funktionalität zum ausführen einer Aktion für mehrere Qualitätsthemen wurde bisher noch nicht implementiert.", "editNotification" : "Qualitätsthemen bearbeiten", "selectAtLeastOne" : "Erfordert mindestens eine Selektion in der Tabelle", "selectOnlyOne" : "Aktion erfordert eine einzige Selektion in der Tabelle", diff --git a/frontend/src/assets/locales/en/common.json b/frontend/src/assets/locales/en/common.json index fe00c83298..e6094cfbb1 100644 --- a/frontend/src/assets/locales/en/common.json +++ b/frontend/src/assets/locales/en/common.json @@ -121,6 +121,7 @@ "addParts" : "Add parts to quality topics", "viewDetails" : "View details", "more" : "More actions", + "multiActionsNotImplemented" : "Functionality for action on multiple notifications is not implemented yet.", "editNotification" : "Edit quality topics", "selectAtLeastOne" : "Requires at least one selection in the policies table", "selectOnlyOne" : "Action requires only one selection from the table",