diff --git a/imports/plugins/core/orders/client/components/ordersList.js b/imports/plugins/core/orders/client/components/ordersList.js index cbf0f3dd398..e78c8391d2c 100644 --- a/imports/plugins/core/orders/client/components/ordersList.js +++ b/imports/plugins/core/orders/client/components/ordersList.js @@ -52,7 +52,9 @@ class OrdersList extends Component { }); return ( - + ); } diff --git a/imports/plugins/included/notifications/client/components/notificationDropdown.js b/imports/plugins/included/notifications/client/components/notificationDropdown.js index 26ba46090d5..0c8045c4ed9 100644 --- a/imports/plugins/included/notifications/client/components/notificationDropdown.js +++ b/imports/plugins/included/notifications/client/components/notificationDropdown.js @@ -10,6 +10,7 @@ class NotificationDropdown extends Component { this.handleNoNotifications = this.handleNoNotifications.bind(this); this.renderDropdownHead = this.renderDropdownHead.bind(this); this.handleClick = this.handleClick.bind(this); + this.handleClickViewAll = this.handleClickViewAll.bind(this); } handleNoNotifications(notifyArr) { @@ -42,6 +43,11 @@ class NotificationDropdown extends Component { return markOneAsRead(notify._id); } + handleClickViewAll() { + const url = this.prefix + "/notifications"; + Reaction.Router.go(url); + } + renderDropdownHead() { const { notificationList, unread, markAllAsRead } = this.props; return ( @@ -56,7 +62,6 @@ class NotificationDropdown extends Component { render() { const { notificationList } = this.props; - const prefix = this.prefix + "/notifications"; return (
{ this.renderDropdownHead() } @@ -86,7 +91,7 @@ class NotificationDropdown extends Component { })}
- View All + View All
); diff --git a/imports/plugins/included/notifications/client/components/notificationRoute.js b/imports/plugins/included/notifications/client/components/notificationRoute.js index 9048b80fbe9..e358a944b93 100644 --- a/imports/plugins/included/notifications/client/components/notificationRoute.js +++ b/imports/plugins/included/notifications/client/components/notificationRoute.js @@ -1,6 +1,7 @@ import React, { Component } from "react"; import PropTypes from "prop-types"; import moment from "moment"; +import { Reaction } from "/client/api"; class NotificationRoute extends Component { @@ -28,6 +29,16 @@ class NotificationRoute extends Component { } handleClick(notify) { + if (notify.type === "forAdmin") { + const actionViewData = Reaction.Apps({ + name: "reaction-orders", + provides: "dashboard" + }); + Reaction.showActionView(actionViewData); + } else { + Reaction.Router.go(notify.url); + } + const { markOneAsRead } = this.props; return markOneAsRead(notify._id); } @@ -57,7 +68,7 @@ class NotificationRoute extends Component { const i18n = `notifications.messages.${notify.type}`; return (
  • - { + { this.handleClick(notify); }} >