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/#fix uux findings #1264

Merged
merged 6 commits into from
May 22, 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
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ _**For better traceability add the corresponding GitHub issue number in each cha

### Added
- #859 added autocomplete on subset of assets in notification creation/edit view

- #997 added publish assets state check to parts table
- #XXX added border to dashboard notifications table and view all count

### Changed
- #778 return empty PageResult when no contract agreement Ids are found instead of http 404 in /contacts API
Expand All @@ -27,6 +28,9 @@ _**For better traceability add the corresponding GitHub issue number in each cha
- #994 disable inputs of newly added bpn configurations
- #995 disable creation and editof notifications for admin role
- #991 make menu table headers unvisible to not block column and filters of tables
- #915 Updated user manual documentation (chapters and screenshots)
- #998 fixed bug where global search bar could search for BPN and adjusted placeholder label to reflect column names
- #913 Changed severity icons
- #978 Fixed edc policy creation with edc version 0.7.0

## [11.0.0 - 08.05.2024]
Expand Down
111 changes: 19 additions & 92 deletions docs/src/docs/user/user-manual.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,11 @@ Lists the five newest quality investigations and alerts to get an overview of th

=== Parts

Navigates to the own manufactured parts and batches list view.
Navigates to the parts and batches list view.

=== Other parts
=== Quality topics

Navigates to the supplier and customer parts and batches list view.

=== Inbox

Navigates to the inbox (sent/received) quality notifications.
Navigates to the inbox of (sent/received) quality notifications.


=== About
Expand Down Expand Up @@ -149,20 +145,21 @@ Supported languages:

== Parts

List view of the own manufactured (asBuilt) or planned (asPlanned) parts and batches.
You can adjust the view of tables by activating/deactivating the tables.
List view of the own manufactured (asBuilt) or planned (asPlanned) parts and batches as well as supplier/customer parts.
You can adjust the view of tables by clicking on the fullscreen icon to maximize or minimize the view to the half of the full width.

image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/parts-list-view.png[]

=== Parts table

A table view split into the different BOM lifecycle phases (AsBuilt / AsPlanned) of a part. By default, both tables are displayed.
Adjustment of the view of tables can be done by activating/deactivating the tables via the buttons „AS BUILT“ and „AS PLANNED“.
Adjustment of the view of tables can be done by activating/deactivating the fullscreen width of the tables.

Between the views, there is a slider to adjust the view to make either the left or the right table more visible.
Alternatively, you can use the view toggle to adjust the visibility of the tables.

Both tables can be sorted, filtered, and searched.

Pre-filtration buttons can be toggled to only show own/supplier/customer parts in the table.
The global search bar at the top returns part results from both tables.

Choosing the filter input field for any column and typing in any character will show filter suggestions.
Expand All @@ -183,14 +180,17 @@ Gives detailed information on the assets registered in the Digital Twin Registry
This includes data based on the aspect models of use case traceability: AsPlanned, SerialPart, Batch.
Parts that have a quality alert are highlighted yellow.

=== Parts selection -> Create quality alert
=== Create quality notification from parts

Select one or multiple child components/parts/batches that are built into your part.
Selection will enable you to create a quality alert (notification) to your customers. For this action, a button appears at the top right of the table as soon as an asset has been selected.
The quality alert will be added to a queue (queued & requested inbox) and not directly sent to the customers.
Selection will enable you to create a quality notification to customers (alert) or to suppliers (investigation) . For this action, click on the corresponding icon on the top left of a parts table.
The quality notification will be added to a queue (quality notifications) and not directly sent to the customer/supplier.
It is also possible to create a quality notification without the selection of parts.

Once the quality alert is created you will get a pop-up and can directly navigate to the inbox for further action.

Parts which exist in a quality notification will be highlighted as a yellow colored row in the parts table.

=== Parts selection -> Publish assets

Select one or multiple parts that are in the AsBuilt lifecycle. A button will appear on the right of the lifecycle view selection:
Expand Down Expand Up @@ -245,7 +245,7 @@ If you want to discard your changes, press the "ESC" - button, click anywhere el

The settings will be stored in the local storage of the browser and will be persisted until they get deleted.

=== Part details
=== Own Part details

To open the detail view, click on the three dots icon of the desired item and select "View details".
More detailed information on the asset is listed as well as a part tree that visually shows the parts relations.
Expand Down Expand Up @@ -298,82 +298,9 @@ By clicking on the "publish" icon, you can publish the currently opened part fro
a tooltip will provide information explaining the reason. You can trigger the tooltip by hovering above the button



== Other parts

List view of the supplied/delivered parts and batches (Supplier parts / Customer parts).
You can adjust the view of tables by activating/deactivating the tables.

image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/other-parts-list-view.png[]

=== Other parts table

A table view split into the different BOM lifecycle phases (AsBuilt / AsPlanned) of a part. By default, both tables are displayed.
Adjustment of the view of tables can be done by activating/deactivating the tables via the buttons „AS BUILT“ and „AS PLANNED“.

Between the views, there is a slider to adjust the view to make either the left or the right table more visible.
Alternatively, you can use the view toggle to adjust the visibility of the tables.

Additionally, it's possible to switch between tabs above each of the table views to display either supplier or customer parts.

Both tables can be sorted, filtered and searched. The global search bar at the top returns other part results from both tables.

Choosing the filter input field for any column and typing in any character will show filter suggestions.

image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/other-parts-autosuggestion-filtering.png[]

=== AsBuilt lifecycle

List view of other parts with AsBuilt lifecycle.
Gives detailed information on the assets registered in the Digital Twin Registry of Catena-X for all connected companies.
This includes data based on the aspect models of use case traceability: AsBuilt,
SerialPart, Batch.
Parts that have a quality notification are highlighted yellow.

=== AsPlanned lifecycle

List view of other parts with AsPlanned lifecycle.
Gives detailed information on the assets registered in the Digital Twin Registry of Catena-X for all connected companies.
This includes data based on the aspect models of use case traceability: AsPlanned,
SerialPart, Batch.
Parts that have a quality notification are highlighted yellow.

=== Table column settings

On the right upper site of a table there is a settings icon in which you can set the table columns to a desired view.
With a click on it a dialog opens where you can change the settings of the corresponding table:

image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/table-settings-dialog.png[]

Hide/show table columns by clicking on the checkbox or the column name.
It is possible to hide/show all columns by clicking on the "All" - checkbox.

The reset icon resets the table columns to its default view.

Reorder the table columns by selecting a list item (click on the right of the column name).
By selecting the column, you can reorder it with the up and down arrow icons to move it in the front or back of other columns.

Apply your changes by clicking on the "Save" - button.
If you want to discard your changes, press the "ESC" - button, click anywhere else except in the dialog or close it explicitly with the close icon on the upper right of the dialog.

The settings will be stored in the local storage of the browser and will be persisted until they get deleted.

=== Supplier parts

List view of supplied parts and batches.
Supplier parts that have a quality investigation are highlighted yellow.

==== Supplier parts select / Quality investigation

Select one or multiple supplier parts.
Selection will enable you to create a quality investigation (notification) to your supplier.
The quality investigation will be added to a queue (queued & requested inbox) and not directly be sent to the supplier.

Once the quality investigation is created you will get a pop-up and can directly navigate to the inbox for further action.

=== Supplier part details

To open the detail view, click on the three dots icon of the desired item and select "View details".
To open the detail view, click on the three dots icon of the desired item from the parts table and select "View details".
More detailed information on the asset is listed.

image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main/docs/src/images/arc42/user-guide/supplier-parts-list-detailed-view.png[]
Expand Down Expand Up @@ -406,17 +333,17 @@ image::https://raw.githubusercontent.com/eclipse-tractusx/traceability-foss/main
==== Overview

General production information.
Information on the quality status of the supplier part/batch.
Information on the quality status of the customer part/batch.

==== Manufacturer data

Detailed information on the IDs for the supplier part/batch.
Detailed information on the IDs for the customer part/batch.

==== Customer data

Information about the identifiers at the customer for the respective part/batch.

== Inbox
== Quality notifications

Inbox for received/sent quality notifications.

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/images/arc42/user-guide/admin_contract_view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/images/arc42/user-guide/admin_upload_file.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/images/arc42/user-guide/investigation-detail-view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/images/arc42/user-guide/investigations-list-view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/images/arc42/user-guide/navigation-overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/images/arc42/user-guide/parts-list-detailed-view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/images/arc42/user-guide/parts-list-view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/images/arc42/user-guide/publish_assets_button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion frontend/src/app/modules/core/known-route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const getNotificationInboxRoute = (
link: urlType,
queryParams: notificationStatusGroup
? {
tabIndex: '0',
tabIndex: notificationStatusGroup === NotificationStatusGroup.RECEIVED ? '1' : '0',
}
: undefined,
});
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<mat-expansion-panel-header>
<h3 class="flex items-center">
<mat-icon>find_in_page</mat-icon>
{{ 'pageTitle.alerts' | i18n }}
Top 5 {{ 'pageTitle.alerts' | i18n }}
</h3>
</mat-expansion-panel-header>
<mat-tab-group
Expand All @@ -99,13 +99,14 @@ <h3 class="flex items-center">

<app-button
[color]="'primary'"
[routerLink]="[alertLink]"
[queryParams]="alertParams"
[routerLink]="[notificationsLink]"
[queryParams]="queuedAndRequestedNotificationsTabParam"
[relativeTo]="null"
[isDisabled]="((investigationsMetricData[1]?.value | async) + (alertsMetricData[1]?.value | async)) < 1"
>
<div class="flex justify-between items-center">
<mat-icon class="mr-2">remove_red_eye</mat-icon>
{{ 'commonAlert.viewAll' | i18n }}
{{ 'commonAlert.viewAll' | i18n }} {{ '(' + ((investigationsMetricData[1]?.value | async) + (alertsMetricData[1]?.value | async)) + ')' }}
</div>
</app-button>
</div>
Expand Down Expand Up @@ -141,13 +142,14 @@ <h3 class="flex items-center">

<app-button
[color]="'primary'"
[routerLink]="[alertLink]"
[queryParams]="alertParams"
[routerLink]="[notificationsLink]"
[queryParams]="receivedNotificationsTabParam"
[relativeTo]="null"
[isDisabled]="((investigationsMetricData[0]?.value | async) + (alertsMetricData[0]?.value | async)) < 1"
>
<div class="flex justify-between items-center">
<mat-icon class="mr-2">remove_red_eye</mat-icon>
{{ 'commonAlert.viewAll' | i18n }}
{{ 'commonAlert.viewAll' | i18n }} {{ '(' + ((investigationsMetricData[0]?.value | async) + (alertsMetricData[0]?.value | async)) + ')' }}
</div>
</app-button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ export class DashboardComponent implements OnInit, OnDestroy {
public readonly investigationLink: string;
public readonly investigationParams: Record<string, string>;

public readonly alertLink: string;
public readonly alertParams: Record<string, string>;
public readonly notificationsLink: string;
public readonly queuedAndRequestedNotificationsTabParam: Record<string, string>;
public readonly receivedNotificationsTabParam: Record<string, string>;

public partsMetricData: MetricData[];
public otherPartsMetricData: MetricData[];
Expand All @@ -67,8 +68,9 @@ export class DashboardComponent implements OnInit, OnDestroy {
queryParams: alertQueryParams,
} = getRoute(NOTIFICATION_BASE_ROUTE, NotificationStatusGroup.QUEUED_AND_REQUESTED);

this.alertLink = alertLink;
this.alertParams = alertQueryParams;
this.notificationsLink = alertLink;
this.queuedAndRequestedNotificationsTabParam = alertQueryParams;
this.receivedNotificationsTabParam = getRoute(NOTIFICATION_BASE_ROUTE, NotificationStatusGroup.RECEIVED).queryParams;

this.partsMetricData = [
{
Expand All @@ -90,12 +92,12 @@ export class DashboardComponent implements OnInit, OnDestroy {
this.investigationsMetricData = [
{
metricName: 'amountReceived',
value: this.dashboardStats$.pipe(map(dashboardStats => dashboardStats.data.receivedActiveInvestigations)),
value: this.dashboardStats$.pipe(map(dashboardStats => dashboardStats?.data?.receivedActiveInvestigations)),
metricUnit: 'investigations',
},
{
metricName: 'amountCreated',
value: this.dashboardStats$.pipe(map(dashboardStats => dashboardStats.data.sentActiveInvestigations)),
value: this.dashboardStats$.pipe(map(dashboardStats => dashboardStats?.data?.sentActiveInvestigations)),
metricUnit: 'investigations',
},
];
Expand All @@ -104,12 +106,12 @@ export class DashboardComponent implements OnInit, OnDestroy {
this.alertsMetricData = [
{
metricName: 'amountReceived',
value: this.dashboardStats$.pipe(map(dashboardStats => dashboardStats.data.receivedActiveAlerts)),
value: this.dashboardStats$.pipe(map(dashboardStats => dashboardStats?.data?.receivedActiveAlerts)),
metricUnit: 'alerts',
},
{
metricName: 'amountCreated',
value: this.dashboardStats$.pipe(map(dashboardStats => dashboardStats.data.sentActiveAlerts)),
value: this.dashboardStats$.pipe(map(dashboardStats => dashboardStats?.data?.sentActiveAlerts)),
metricUnit: 'alerts',
},
];
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/app/modules/page/parts/model/parts.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ export interface AssetAsBuiltFilter {
idShort?: string,
name?: string,
manufacturerName?: string,
businessPartner?: string,
partId?: string,
manufacturerPartId?: string,
customerPartId?: string,
Expand All @@ -166,6 +167,7 @@ export interface AssetAsPlannedFilter {
idShort?: string,
name?: string,
manufacturer?: string,
businessPartner?: string,
manufacturerPartId?: string,
classification?: string,
semanticDataModel?: string[],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,11 @@
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

import { ComponentFixture, TestBed } from '@angular/core/testing';
import { Severity } from '@shared/model/severity.model';
import { SharedModule } from '@shared/shared.module';
import { screen } from '@testing-library/angular';
import { renderComponent } from '@tests/test-render.utils';

import { NotificationTypeComponent } from './notification-type.component';

describe('SeverityComponent', () => {
const renderSeverity = (severity: Severity) => {
return renderComponent(`<app-severity [severity]='severity'>Test</app-severity>`, {
Expand All @@ -35,12 +32,12 @@ describe('SeverityComponent', () => {

it('should render correct Minor icon', async () => {
await renderSeverity(Severity.MINOR);
expect(screen.getByText('info')).toBeInTheDocument();
expect(screen.getByText('error_outline')).toBeInTheDocument();
});

it('should render correct Major icon', async () => {
await renderSeverity(Severity.MAJOR);
expect(screen.getByText('warning')).toBeInTheDocument();
expect(screen.getByText('error')).toBeInTheDocument();
});

it('should render correct Critical icon', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,19 +79,19 @@


<div class="action-button-tile"
matTooltip="{{(isAllowedToPublish() ? 'requestNotification.modifyNotAllowed' : 'routing.unauthorized') | i18n}}"
matTooltip="{{(isAllowedToPublish() ? (atLeastOneSelected() ? 'routing.illegalAssetStateToPublish' :'requestNotification.modifyNotAllowed') : 'routing.unauthorized') | i18n}}"
matTooltipClass="table--header--tooltip"
matTooltipPosition="above"
[class.mdc-tooltip--multiline]="true"
[matTooltipShowDelay]="500"
[matTooltipDisabled]="isAllowedToPublish() && atLeastOneSelected()">
[matTooltipDisabled]="isAllowedToPublish() && atLeastOneSelected() && !isIllegalSelectionToPublish()">
<app-button
iconName="published_with_changes"
class="action-button-tile"
matTooltip="{{'actions.publishAssets'| i18n}}"
[matTooltipShowDelay]="500"
matTooltipPosition="above"
[isDisabled]="!isAllowedToPublish() || !atLeastOneSelected()"
[isDisabled]="!isAllowedToPublish() || !atLeastOneSelected() || isIllegalSelectionToPublish()"
(click)="publishIconClicked()"
(keydown)="handleKeyDownPublishIconClicked($event)"
></app-button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import { TableSettingsService } from '@core/user/table-settings.service';
import { UserService } from '@core/user/user.service';
import { MainAspectType } from '@page/parts/model/mainAspectType.enum';
import { Owner } from '@page/parts/model/owner.enum';
import { Part } from '@page/parts/model/parts.model';
import { ImportState, Part } from '@page/parts/model/parts.model';
import { MultiSelectAutocompleteComponent } from '@shared/components/multi-select-autocomplete/multi-select-autocomplete.component';
import { TableType } from '@shared/components/multi-select-autocomplete/table-type.model';
import { PartsTableConfigUtils } from '@shared/components/parts-table/parts-table-config.utils';
Expand Down Expand Up @@ -185,6 +185,12 @@ export class PartsTableComponent implements OnInit {
return this.roleService.hasAccess([ 'admin' ]);
}

isIllegalSelectionToPublish(): boolean {
return this.selection.selected.some((part: Part) => {
return part?.importState !== ImportState.TRANSIENT && part?.importState !== ImportState.ERROR;
});
}

handleKeyDownPublishIconClicked(event: KeyboardEvent): void{
if (event.key === 'Enter') {
this.publishIconClicked();
Expand Down
Loading