Skip to content

Commit cc2d118

Browse files
feature: TRACEFOSS-1091 Rework notification detail page (#90)
* feature: TRACEFOSS-1091 Rework notification detail page * feature: TRACEFOSS-1091 Changes after the review
1 parent b869ff5 commit cc2d118

File tree

6 files changed

+26
-7
lines changed

6 files changed

+26
-7
lines changed

frontend/src/app/modules/shared/components/notification-overview/notification-overview.component.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
</div>
2727
<div *ngIf="showNotification">
2828
<span class="detail--text detail--text__bold">{{ 'table.column.description' | i18n }}</span>
29-
<span class="detail--text">{{ notification?.description }}</span>
29+
<div>
30+
<span class="detail--text detail--text__description">{{ notification?.description }}</span>
31+
</div>
3032
</div>
3133
<div>
3234
<span class="detail--text detail--text__bold">{{ 'table.column.status' | i18n }}</span>
@@ -41,13 +43,13 @@
4143
<div>
4244
<span class="detail--text detail--text__bold">{{ 'table.column.createdBy' | i18n }}</span>
4345
<span class="detail--text">
44-
<app-notification-user [user]="notification.createdBy"></app-notification-user>
46+
<app-notification-user [user]="notification.createdBy" mode="sup"></app-notification-user>
4547
</span>
4648
</div>
4749
<div>
4850
<span class="detail--text detail--text__bold">{{ 'table.column.sendTo' | i18n }}</span>
4951
<span class="detail--text">
50-
<app-notification-user [user]="notification.sendTo"></app-notification-user>
52+
<app-notification-user [user]="notification.sendTo" mode="sup"></app-notification-user>
5153
</span>
5254
</div>
5355

frontend/src/app/modules/shared/components/notification-overview/notification-overview.component.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,11 @@
4040
font-weight: bold;
4141
padding-right: 1rem;
4242
}
43+
44+
&__description {
45+
overflow: hidden;
46+
white-space: nowrap;
47+
text-overflow: ellipsis;
48+
max-width: 275px;
49+
}
4350
}

frontend/src/app/modules/shared/components/notification-user/notification-user.component.html

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,13 @@
1919
SPDX-License-Identifier: Apache-2.0
2020
-->
2121

22-
<strong style="font-weight: bold">{{ user.bpn }}</strong> <br />
23-
{{ user.name }}
22+
<ng-container *ngIf="mode == 'normal'">
23+
<strong style="font-weight: bold">{{ user.bpn }}</strong> <br />
24+
{{ user.name }}
25+
</ng-container>
26+
27+
<ng-container *ngIf="mode == 'sup'">
28+
<span
29+
>{{ user.bpn }} <sup>{{ user.name }}</sup></span
30+
>
31+
</ng-container>

frontend/src/app/modules/shared/components/notification-user/notification-user.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import { NotificationUserComponent } from './notification-user.component';
3030
describe('NotificationUserComponent', () => {
3131
const defaultNotification = Object.assign({ ...notificationTemplate });
3232
const renderUser = (user: NotificationUser = defaultNotification.createdBy) => {
33-
return renderComponent(`<app-notification-user [user]='user'></app-notification-user>`, {
33+
return renderComponent(`<app-notification-user [user]='user' mode="normal"></app-notification-user>`, {
3434
imports: [SharedModule],
3535
componentProperties: { user: user },
3636
});

frontend/src/app/modules/shared/components/notification-user/notification-user.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,6 @@ import { NotificationUser } from '@shared/model/notification.model';
2929
export class NotificationUserComponent {
3030
@Input()
3131
user: NotificationUser;
32+
@Input()
33+
mode: 'normal' | 'sup';
3234
}

frontend/src/app/modules/shared/modules/notification/notification-tab/notification-tab.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,6 @@
6262

6363
<ng-template #userTmp let-text="value">
6464
<p class="notification--table__description">
65-
<app-notification-user [user]="text"></app-notification-user>
65+
<app-notification-user [user]="text" mode="normal"></app-notification-user>
6666
</p>
6767
</ng-template>

0 commit comments

Comments
 (0)