Skip to content

Commit

Permalink
Merge pull request #399 from catenax-ng/main
Browse files Browse the repository at this point in the history
chore: minor improvements
  • Loading branch information
ds-mmaul authored Dec 18, 2023
2 parents 8dbf956 + 38ba90a commit 83da237
Show file tree
Hide file tree
Showing 69 changed files with 5,167 additions and 4,813 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### Added
### Changed
- Restricted datefield on investigation creation to be only clickable and not editable
- Removed duplication of request notification component and combined it into a reusable component
- bump aquasecurity/trivy-action from 0.14.0 to 0.16.0
- bump actions/setup-python from 4 to 5
- bump mikefarah/yq from 4.40.2 to 4.40.5
- bump actions/setup-java from 3 to 4
- bump org.apache.maven.plugins:maven-jxr-plugin from 3.3.0 to 3.3.1
- bump org.apache.maven.plugins:maven-checkstyle-plugin from 3.3.0 to 3.3.1
- bump schedlock.version from 5.9.1 to 5.10.0
- fixed bug where filter was reset when sorting filtered notifications
- redesigned notification status confirmation modal
- bump irs version from 6.9.1 to 6.12.0


## [10.0.0 - 12.12.2024]
### Added
Expand Down
2 changes: 1 addition & 1 deletion charts/traceability-foss/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ dependencies:
condition: pgadmin4.enabled
- name: irs-helm
repository: https://eclipse-tractusx.github.io/item-relationship-service
version: 6.9.1
version: 6.12.0
condition: irs-helm.enabled
- name: tractusx-connector
repository: https://eclipse-tractusx.github.io/tractusx-edc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,13 @@ <h1>{{ 'dataLoading.error' | i18n }}</h1>
</ng-template>

<app-sidenav-wrapper [isOpen]="isAlertOpen$ | async" (sidenavAction)="isAlertOpen$.next($event)">
<app-request-alert
<app-notification-request
*ngIf="isAlertOpen$ | async"
[notificationType]="NotificationType.ALERT"
[selectedItems]="selectedItems$ | async"
(deselectPart)="removeItemFromSelection($event)"
(restorePart)="addItemToSelection($event)"
(clearSelected)="clearSelected()"
(submitted)="isAlertOpen$.next(false)"
></app-request-alert>
></app-notification-request>
</app-sidenav-wrapper>
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { Part } from '@page/parts/model/parts.model';
import { NotificationCommonModalComponent } from '@shared/components/notification-common-modal/notification-common-modal.component';
import { CreateHeaderFromColumns, TableConfig, TableEventConfig } from '@shared/components/table/table.model';
import { ToastService } from '@shared/components/toasts/toast.service';
import { Notification } from '@shared/model/notification.model';
import {Notification, NotificationType} from '@shared/model/notification.model';
import { TranslationContext } from '@shared/model/translation-context.model';
import { View } from '@shared/model/view.model';
import { StaticIdService } from '@shared/service/staticId.service';
Expand Down Expand Up @@ -204,4 +204,5 @@ export class AlertDetailComponent implements AfterViewInit, OnDestroy {
}

protected readonly TranslationContext = TranslationContext;
protected readonly NotificationType = NotificationType;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,27 @@
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

import {ChangeDetectorRef, Component, ViewChild} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router';
import {ALERT_BASE_ROUTE, getRoute} from '@core/known-route';
import {AlertDetailFacade} from '@page/alerts/core/alert-detail.facade';
import {AlertHelperService} from '@page/alerts/core/alert-helper.service';
import {AlertsFacade} from '@page/alerts/core/alerts.facade';
import {NotificationMenuActionsAssembler} from '@shared/assembler/notificationMenuActions.assembler';
import { ChangeDetectorRef, Component, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { ALERT_BASE_ROUTE, getRoute } from '@core/known-route';
import { AlertDetailFacade } from '@page/alerts/core/alert-detail.facade';
import { AlertHelperService } from '@page/alerts/core/alert-helper.service';
import { AlertsFacade } from '@page/alerts/core/alerts.facade';
import { NotificationMenuActionsAssembler } from '@shared/assembler/notificationMenuActions.assembler';
import { NotificationChannel } from '@shared/components/multi-select-autocomplete/table-type.model';
import { NotificationCommonModalComponent } from '@shared/components/notification-common-modal/notification-common-modal.component';
import { TableSortingUtil } from '@shared/components/table/table-sorting.util';
import { MenuActionConfig, TableEventConfig, TableHeaderSort } from '@shared/components/table/table.model';
import { createDeeplinkNotificationFilter } from '@shared/helper/notification-helper';
import { NotificationTabInformation } from '@shared/model/notification-tab-information';
import {
NotificationCommonModalComponent
} from '@shared/components/notification-common-modal/notification-common-modal.component';
import {TableSortingUtil} from '@shared/components/table/table-sorting.util';
import {MenuActionConfig, TableEventConfig, TableHeaderSort} from '@shared/components/table/table.model';
import {createDeeplinkNotificationFilter} from '@shared/helper/notification-helper';
import {NotificationTabInformation} from '@shared/model/notification-tab-information';
import {Notification, NotificationStatusGroup, NotificationType} from '@shared/model/notification.model';
import {TranslationContext} from '@shared/model/translation-context.model';
import {Subscription} from 'rxjs';
import {NotificationChannel} from "@shared/components/multi-select-autocomplete/table-type.model";
Notification,
NotificationFilter,
NotificationStatusGroup,
NotificationType,
} from '@shared/model/notification.model';
import { TranslationContext } from '@shared/model/translation-context.model';
import { Subscription } from 'rxjs';

@Component({
selector: 'app-alerts',
Expand All @@ -56,6 +59,9 @@ export class AlertsComponent {

private paramSubscription: Subscription;

receivedFilter: NotificationFilter;
requestedFilter: NotificationFilter;

private pagination: TableEventConfig = { page: 0, pageSize: 50, sorting: [ 'createdDate', 'desc' ] };

constructor(
Expand Down Expand Up @@ -84,8 +90,8 @@ export class AlertsComponent {
let deeplinkNotificationFilter = createDeeplinkNotificationFilter(params);
this.pagination.page = params?.pageNumber ? params.pageNumber : 0;
this.pagination.page = params?.pageNumber;
this.alertsFacade.setReceivedAlerts(this.pagination.page, this.pagination.pageSize, this.alertReceivedSortList, deeplinkNotificationFilter?.receivedFilter);
this.alertsFacade.setQueuedAndRequestedAlerts(this.pagination.page, this.pagination.pageSize, this.alertQueuedAndRequestedSortList, deeplinkNotificationFilter?.sentFilter);
this.alertsFacade.setReceivedAlerts(this.pagination.page, this.pagination.pageSize, this.alertReceivedSortList, deeplinkNotificationFilter?.receivedFilter, this.receivedFilter);
this.alertsFacade.setQueuedAndRequestedAlerts(this.pagination.page, this.pagination.pageSize, this.alertQueuedAndRequestedSortList, deeplinkNotificationFilter?.sentFilter, this.requestedFilter);
});
}

Expand All @@ -105,13 +111,13 @@ export class AlertsComponent {
public onReceivedTableConfigChange(pagination: TableEventConfig) {
this.pagination = pagination;
this.setTableSortingList(pagination.sorting, NotificationStatusGroup.RECEIVED);
this.alertsFacade.setReceivedAlerts(this.pagination.page, this.pagination.pageSize, this.alertReceivedSortList);
this.alertsFacade.setReceivedAlerts(this.pagination.page, this.pagination.pageSize, this.alertReceivedSortList, null, this.receivedFilter);
}

public onQueuedAndRequestedTableConfigChange(pagination: TableEventConfig) {
this.pagination = pagination;
this.setTableSortingList(pagination.sorting, NotificationStatusGroup.QUEUED_AND_REQUESTED);
this.alertsFacade.setQueuedAndRequestedAlerts(this.pagination.page, this.pagination.pageSize, this.alertQueuedAndRequestedSortList);
this.alertsFacade.setQueuedAndRequestedAlerts(this.pagination.page, this.pagination.pageSize, this.alertQueuedAndRequestedSortList, null, this.requestedFilter);
}

public openDetailPage(notification: Notification): void {
Expand All @@ -137,9 +143,14 @@ export class AlertsComponent {

filterNotifications(filterContext: any) {
if(filterContext.channel === NotificationChannel.RECEIVER) {
this.alertsFacade.setReceivedAlerts(this.pagination.page, this.pagination.pageSize, this.alertReceivedSortList,null, filterContext.filter);
this.receivedFilter = filterContext.filter;
} else {
this.requestedFilter = filterContext.filter;
}
if(filterContext.channel === NotificationChannel.RECEIVER) {
this.alertsFacade.setReceivedAlerts(this.pagination.page, this.pagination.pageSize, this.alertReceivedSortList,null, this.receivedFilter);
} else {
this.alertsFacade.setQueuedAndRequestedAlerts(this.pagination.page, this.pagination.pageSize, this.alertQueuedAndRequestedSortList, null, filterContext.filter);
this.alertsFacade.setQueuedAndRequestedAlerts(this.pagination.page, this.pagination.pageSize, this.alertQueuedAndRequestedSortList, null, this.requestedFilter);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -230,12 +230,13 @@ <h1>{{ 'dataLoading.error' | i18n }}</h1>
</ng-template>

<app-sidenav-wrapper [isOpen]="isInvestigationOpen$ | async" (sidenavAction)="isInvestigationOpen$.next($event)">
<app-request-investigation
<app-notification-request
*ngIf="isInvestigationOpen$ | async"
[notificationType]="NotificationType.INVESTIGATION"
[selectedItems]="selectedItems$ | async"
(deselectPart)="removeItemFromSelection($event)"
(restorePart)="addItemToSelection($event)"
(clearSelected)="clearSelected()"
(submitted)="isInvestigationOpen$.next(false)"
></app-request-investigation>
></app-notification-request>
</app-sidenav-wrapper>
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { Part } from '@page/parts/model/parts.model';
import { NotificationCommonModalComponent } from '@shared/components/notification-common-modal/notification-common-modal.component';
import { CreateHeaderFromColumns, TableConfig, TableEventConfig } from '@shared/components/table/table.model';
import { ToastService } from '@shared/components/toasts/toast.service';
import { Notification } from '@shared/model/notification.model';
import { Notification, NotificationType } from '@shared/model/notification.model';
import { TranslationContext } from '@shared/model/translation-context.model';
import { View } from '@shared/model/view.model';
import { StaticIdService } from '@shared/service/staticId.service';
Expand Down Expand Up @@ -207,4 +207,5 @@ export class InvestigationDetailComponent implements AfterViewInit, OnDestroy {
}

protected readonly TranslationContext = TranslationContext;
protected readonly NotificationType = NotificationType;
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,27 @@
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

import {ChangeDetectorRef, Component, ViewChild} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router';
import {getRoute, INVESTIGATION_BASE_ROUTE} from '@core/known-route';
import {InvestigationDetailFacade} from '@page/investigations/core/investigation-detail.facade';
import {InvestigationHelperService} from '@page/investigations/core/investigation-helper.service';
import {NotificationMenuActionsAssembler} from '@shared/assembler/notificationMenuActions.assembler';
import { ChangeDetectorRef, Component, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { getRoute, INVESTIGATION_BASE_ROUTE } from '@core/known-route';
import { InvestigationDetailFacade } from '@page/investigations/core/investigation-detail.facade';
import { InvestigationHelperService } from '@page/investigations/core/investigation-helper.service';
import { NotificationMenuActionsAssembler } from '@shared/assembler/notificationMenuActions.assembler';
import { NotificationChannel } from '@shared/components/multi-select-autocomplete/table-type.model';
import { NotificationCommonModalComponent } from '@shared/components/notification-common-modal/notification-common-modal.component';
import { TableSortingUtil } from '@shared/components/table/table-sorting.util';
import { MenuActionConfig, TableEventConfig, TableHeaderSort } from '@shared/components/table/table.model';
import { createDeeplinkNotificationFilter } from '@shared/helper/notification-helper';
import { NotificationTabInformation } from '@shared/model/notification-tab-information';
import {
NotificationCommonModalComponent
} from '@shared/components/notification-common-modal/notification-common-modal.component';
import {TableSortingUtil} from '@shared/components/table/table-sorting.util';
import {MenuActionConfig, TableEventConfig, TableHeaderSort} from '@shared/components/table/table.model';
import {createDeeplinkNotificationFilter} from '@shared/helper/notification-helper';
import {NotificationTabInformation} from '@shared/model/notification-tab-information';
import {Notification, NotificationStatusGroup, NotificationType} from '@shared/model/notification.model';
import {TranslationContext} from '@shared/model/translation-context.model';
import {Subscription} from 'rxjs';
import {InvestigationsFacade} from '../core/investigations.facade';
import {NotificationChannel} from "@shared/components/multi-select-autocomplete/table-type.model";
Notification,
NotificationFilter,
NotificationStatusGroup,
NotificationType,
} from '@shared/model/notification.model';
import { TranslationContext } from '@shared/model/translation-context.model';
import { Subscription } from 'rxjs';
import { InvestigationsFacade } from '../core/investigations.facade';

@Component({
selector: 'app-investigations',
Expand All @@ -58,6 +61,9 @@ export class InvestigationsComponent {

private paramSubscription: Subscription;

receivedFilter: NotificationFilter;
requestedFilter: NotificationFilter;

private pagination: TableEventConfig = { page: 0, pageSize: 50, sorting: [ 'createdDate', 'desc' ] };

constructor(
Expand All @@ -84,8 +90,8 @@ export class InvestigationsComponent {
this.paramSubscription = this.route.queryParams.subscribe(params => {
this.pagination.page = params?.pageNumber ? params.pageNumber : 0;
let deeplinkNotificationFilter = createDeeplinkNotificationFilter(params);
this.investigationsFacade.setReceivedInvestigation(this.pagination.page, this.pagination.pageSize, this.investigationReceivedSortList, deeplinkNotificationFilter?.receivedFilter /*Filter */);
this.investigationsFacade.setQueuedAndRequestedInvestigations(this.pagination.page, this.pagination.pageSize, this.investigationQueuedAndRequestedSortList, deeplinkNotificationFilter?.sentFilter);
this.investigationsFacade.setReceivedInvestigation(this.pagination.page, this.pagination.pageSize, this.investigationReceivedSortList, deeplinkNotificationFilter?.receivedFilter, this.receivedFilter /*Filter */);
this.investigationsFacade.setQueuedAndRequestedInvestigations(this.pagination.page, this.pagination.pageSize, this.investigationQueuedAndRequestedSortList, deeplinkNotificationFilter?.sentFilter, this.requestedFilter);
});
}

Expand All @@ -102,13 +108,13 @@ export class InvestigationsComponent {
public onReceivedTableConfigChanged(pagination: TableEventConfig) {
this.pagination = pagination;
this.setTableSortingList(pagination.sorting, NotificationStatusGroup.RECEIVED);
this.investigationsFacade.setReceivedInvestigation(this.pagination.page, this.pagination.pageSize, this.investigationReceivedSortList);
this.investigationsFacade.setReceivedInvestigation(this.pagination.page, this.pagination.pageSize, this.investigationReceivedSortList, null, this.receivedFilter );
}

public onQueuedAndRequestedTableConfigChanged(pagination: TableEventConfig) {
this.pagination = pagination;
this.setTableSortingList(pagination.sorting, NotificationStatusGroup.QUEUED_AND_REQUESTED);
this.investigationsFacade.setQueuedAndRequestedInvestigations(this.pagination.page, this.pagination.pageSize, this.investigationQueuedAndRequestedSortList);
this.investigationsFacade.setQueuedAndRequestedInvestigations(this.pagination.page, this.pagination.pageSize, this.investigationQueuedAndRequestedSortList, null, this.requestedFilter);
}

public openDetailPage(notification: Notification): void {
Expand All @@ -134,10 +140,16 @@ export class InvestigationsComponent {

filterNotifications(filterContext: any) {
if(filterContext.channel === NotificationChannel.RECEIVER) {
this.investigationsFacade.setReceivedInvestigation(this.pagination.page, this.pagination.pageSize, this.investigationReceivedSortList, null, filterContext.filter /*Filter */);
this.receivedFilter = filterContext.filter;
} else {
this.requestedFilter = filterContext.filter;
}

if(filterContext.channel === NotificationChannel.RECEIVER) {
this.investigationsFacade.setReceivedInvestigation(this.pagination.page, this.pagination.pageSize, this.investigationReceivedSortList, null, this.receivedFilter /*Filter */);

} else {
this.investigationsFacade.setQueuedAndRequestedInvestigations(this.pagination.page, this.pagination.pageSize, this.investigationQueuedAndRequestedSortList, null, filterContext.filter);
this.investigationsFacade.setQueuedAndRequestedInvestigations(this.pagination.page, this.pagination.pageSize, this.investigationQueuedAndRequestedSortList, null, this.requestedFilter);

}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,14 @@
</ng-template>

<app-sidenav-wrapper [isOpen]="isInvestigationOpen$ | async" (sidenavAction)="isInvestigationOpen$.next($event)">
<app-request-investigation
<app-notification-request
*ngIf="isInvestigationOpen$ | async"
[notificationType]="NotificationType.INVESTIGATION"
[selectedItems]="currentSelectedItems$ | async"
(deselectPart)="deselectPartTrigger$.next([$event])"
(restorePart)="addPartTrigger$.next($event)"
(clearSelected)="deselectPartTrigger$.next(currentSelectedItems$.value)"
(submitted)="isInvestigationOpen$.next(false)"
></app-request-investigation>
></app-notification-request>
</app-sidenav-wrapper>

Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import { View } from '@shared/model/view.model';
import { PartDetailsFacade } from '@shared/modules/part-details/core/partDetails.facade';
import { StaticIdService } from '@shared/service/staticId.service';
import { BehaviorSubject, Observable, Subject } from 'rxjs';
import {NotificationType} from "@shared/model/notification.model";

@Component({
selector: 'app-supplier-parts',
Expand Down Expand Up @@ -131,4 +132,5 @@ export class SupplierPartsComponent implements OnInit, OnDestroy {

protected readonly MainAspectType = MainAspectType;
protected readonly TableType = TableType;
protected readonly NotificationType = NotificationType;
}
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,15 @@
<app-part-detail></app-part-detail>

<app-sidenav-wrapper [isOpen]="isAlertOpen$ | async" (sidenavAction)="isAlertOpen$.next($event)">
<app-request-alert
<app-notification-request
*ngIf="isAlertOpen$ | async"
[selectedItems]="currentSelectedItems$ | async"
[notificationType]="NotificationType.ALERT"
(deselectPart)="deselectPartTrigger$.next([$event])"
(restorePart)="addPartTrigger$.next($event)"
(clearSelected)="deselectPartTrigger$.next(currentSelectedItems$.value)"
(submitted)="isAlertOpen$.next(false)"
></app-request-alert>
></app-notification-request>
</app-sidenav-wrapper>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { PartDetailsFacade } from '@shared/modules/part-details/core/partDetails
import { BomLifecycleSettingsService, UserSettingView } from '@shared/service/bom-lifecycle-settings.service';
import { StaticIdService } from '@shared/service/staticId.service';
import { BehaviorSubject, Observable, Subject } from 'rxjs';
import {NotificationType} from "@shared/model/notification.model";


@Component({
Expand Down Expand Up @@ -225,4 +226,5 @@ export class PartsComponent implements OnInit, OnDestroy, AfterViewInit {
protected readonly UserSettingView = UserSettingView;
protected readonly TableType = TableType;
protected readonly MainAspectType = MainAspectType;
protected readonly NotificationType = NotificationType;
}
Loading

0 comments on commit 83da237

Please sign in to comment.