Merged PR 1459: Fix NotificationChannel Display in AHF

Fix NotificationChannel Display in AHF

Related work items: #3719
This commit is contained in:
Lorenz Hilpert
2022-12-16 14:26:32 +00:00
committed by Andreas Schickinger
parent 0274b2af3b
commit 8718dd8231
3 changed files with 7 additions and 8 deletions

View File

@@ -97,7 +97,7 @@
<div class="detail" data-detail-id="Benachrichtigung">
<div class="label">Benachrichtigung</div>
<div class="value">{{ (notificationsChannel$ | async | notificationsChannel) || '-' }}</div>
<div class="value">{{ ((notificationsChannel$ | async)?.selected | notificationsChannel) || '-' }}</div>
</div>
<div

View File

@@ -13,16 +13,14 @@ export class NotificationsChannelPipe implements PipeTransform {
[16, 'Brief'],
]);
transform(value: NotificationChannel = 0): any {
transform(value: NotificationChannel = 0): string {
const result: string[] = [];
const channelKeys = Array.from(NotificationsChannelPipe.channels.keys());
channelKeys.forEach((key) => {
if (value & key) {
result.push(NotificationsChannelPipe.channels.get(key));
for (const [channel, name] of NotificationsChannelPipe.channels) {
if (value & channel) {
result.push(name);
}
});
}
return result.join(' | ');
}

View File

@@ -13,6 +13,7 @@
"importHelpers": false,
"allowSyntheticDefaultImports": true,
"target": "es5",
"downlevelIteration": true,
"typeRoots": [
"node_modules/@types"
],