Admin: fix notification counters for approvals
This commit is contained in:
parent
e7bb78712a
commit
8dcd64f168
2 changed files with 3 additions and 2 deletions
|
@ -7,7 +7,8 @@ const getNotifTotals = state => {
|
|||
const notifications = state.getIn(['notifications', 'unread'], 0);
|
||||
const chats = state.get('chats').reduce((acc, curr) => acc + Math.min(curr.get('unread', 0), 1), 0);
|
||||
const reports = state.getIn(['admin', 'open_report_count'], 0);
|
||||
return notifications + chats + reports;
|
||||
const approvals = state.getIn(['admin', 'awaitingApproval']).count();
|
||||
return notifications + chats + reports + approvals;
|
||||
};
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
|
|
|
@ -37,7 +37,7 @@ class AdminNav extends React.PureComponent {
|
|||
<IconWithCounter icon='gavel' count={reportsCount} fixedWidth />
|
||||
<FormattedMessage id='admin_nav.reports' defaultMessage='Reports' />
|
||||
</a>
|
||||
{instance.get('approval_required') && (
|
||||
{instance.get('approval_required') || approvalCount > 0 && (
|
||||
<NavLink className='promo-panel-item' to='/admin/approval'>
|
||||
<IconWithCounter icon='user' count={approvalCount} fixedWidth />
|
||||
<FormattedMessage id='admin_nav.awaiting_approval' defaultMessage='Awaiting Approval' />
|
||||
|
|
Loading…
Reference in a new issue