Browse Source
Merge pull request #11233 from ArtemDzhereleiko/AD/bug-fix/notification-widget-prevent-action
Prevent action on preview/edit mode for notification widget
pull/11269/head
Igor Kulikov
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
15 additions and
9 deletions
-
ui-ngx/src/app/modules/home/components/widget/lib/cards/unread-notification-widget.component.ts
|
|
|
@ -203,23 +203,29 @@ export class UnreadNotificationWidgetComponent implements OnInit, OnDestroy { |
|
|
|
} |
|
|
|
|
|
|
|
markAsRead(id: string) { |
|
|
|
const cmd = NotificationSubscriber.createMarkAsReadCommand(this.notificationWsService, [id]); |
|
|
|
cmd.subscribe(); |
|
|
|
if (!this.ctx.isEdit && !this.ctx.isPreview) { |
|
|
|
const cmd = NotificationSubscriber.createMarkAsReadCommand(this.notificationWsService, [id]); |
|
|
|
cmd.subscribe(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
markAsAllRead($event: Event) { |
|
|
|
if ($event) { |
|
|
|
$event.stopPropagation(); |
|
|
|
if (!this.ctx.isEdit && !this.ctx.isPreview) { |
|
|
|
if ($event) { |
|
|
|
$event.stopPropagation(); |
|
|
|
} |
|
|
|
const cmd = NotificationSubscriber.createMarkAllAsReadCommand(this.notificationWsService); |
|
|
|
cmd.subscribe(); |
|
|
|
} |
|
|
|
const cmd = NotificationSubscriber.createMarkAllAsReadCommand(this.notificationWsService); |
|
|
|
cmd.subscribe(); |
|
|
|
} |
|
|
|
|
|
|
|
viewAll($event: Event) { |
|
|
|
if ($event) { |
|
|
|
$event.stopPropagation(); |
|
|
|
if (!this.ctx.isEdit && !this.ctx.isPreview) { |
|
|
|
if ($event) { |
|
|
|
$event.stopPropagation(); |
|
|
|
} |
|
|
|
this.router.navigateByUrl(this.router.parseUrl('/notification/inbox')).then(() => {}); |
|
|
|
} |
|
|
|
this.router.navigateByUrl(this.router.parseUrl('/notification/inbox')).then(() => {}); |
|
|
|
} |
|
|
|
|
|
|
|
trackById(index: number, item: NotificationRequest): string { |
|
|
|
|