Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(contracts): deactivated notification multi actions and fixed bug in notification creation #1161

Merged
merged 1 commit into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading