Skip to content

Commit

Permalink
Merge pull request #1161 from eclipse-tractusx/chore/#984-add-validat…
Browse files Browse the repository at this point in the history
…ion-to-notification-hover

chore(contracts): deactivated notification multi actions and fixed bug in notification creation
  • Loading branch information
ds-mwesener authored Jul 4, 2024
2 parents 8ad1aa8 + 1c6334e commit ca8c1e7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<mat-divider class="mx-0.25" [vertical]="true"></mat-divider>
<div class="ml-0.5"
*ngIf="tableHeaderMenuEnabled"
matTooltip="{{'table.more' | i18n}}"
matTooltip="{{'table.multiActionsNotImplemented' | i18n}}"
matTooltipClass="table--header--tooltip"
matTooltipPosition="above"
[class.mdc-tooltip--multiline]="true"
Expand All @@ -77,6 +77,7 @@
<app-button
[iconName]="'more_horiz'"
[matMenuTriggerFor]="actionMenu"
[isDisabled]="true"
>
</app-button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export class NotificationService {

public createNotification(affectedPartIds: string[], description: string, severity: Severity, bpn: string, type: string, title: string, dateString: DateTimeString,
): Observable<string> {
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 };

Expand Down Expand Up @@ -137,7 +137,8 @@ export class NotificationService {

public editNotification(notificationId: string, title: string, receiverBpn: string, severity: string, targetDate: string, description: string, affectedPartIds: string[]): Observable<void> {
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 };
Expand Down
1 change: 1 addition & 0 deletions frontend/src/assets/locales/de/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions frontend/src/assets/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit ca8c1e7

Please sign in to comment.