mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-11-03 20:48:07 +00:00 
			
		
		
		
	* fix: Display rolewise primary sidebar * Fix issues with roles * Fix active style * Fix accessible menu * Fix key missing * Changes menu icon size Co-authored-by: Nithin David <1277421+nithindavid@users.noreply.github.com>
		
			
				
	
	
		
			41 lines
		
	
	
		
			867 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			867 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
<template>
 | 
						|
  <div class="notifications-link">
 | 
						|
    <primary-nav-item
 | 
						|
      name="NOTIFICATIONS"
 | 
						|
      icon="alert"
 | 
						|
      :to="`/app/accounts/${accountId}/notifications`"
 | 
						|
      :count="unreadCount"
 | 
						|
    />
 | 
						|
  </div>
 | 
						|
</template>
 | 
						|
<script>
 | 
						|
import { mapGetters } from 'vuex';
 | 
						|
import PrimaryNavItem from './PrimaryNavItem';
 | 
						|
 | 
						|
export default {
 | 
						|
  components: { PrimaryNavItem },
 | 
						|
  computed: {
 | 
						|
    ...mapGetters({
 | 
						|
      accountId: 'getCurrentAccountId',
 | 
						|
      notificationMetadata: 'notifications/getMeta',
 | 
						|
    }),
 | 
						|
    unreadCount() {
 | 
						|
      if (!this.notificationMetadata.unreadCount) {
 | 
						|
        return '';
 | 
						|
      }
 | 
						|
 | 
						|
      return this.notificationMetadata.unreadCount < 100
 | 
						|
        ? `${this.notificationMetadata.unreadCount}`
 | 
						|
        : '99+';
 | 
						|
    },
 | 
						|
  },
 | 
						|
  methods: {},
 | 
						|
};
 | 
						|
</script>
 | 
						|
 | 
						|
<style scoped lang="scss">
 | 
						|
.notifications-link {
 | 
						|
  margin-bottom: var(--space-small);
 | 
						|
}
 | 
						|
</style>
 |