mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-11-04 04:57:51 +00:00 
			
		
		
		
	* Feature: Ability to switch between multiple accounts * Fix rubocop * Fix assigned inboxes * fix auth json * Add account switcher in UI * fix ordering on administrate * Add switch accounts to sidebar * add account id * Fix schema.rb timestamp * Revert "add account id" This reverts commit 27570f50ef584cb9a5f69454f43f630b318c8807. * Add a check for account Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
		
			
				
	
	
		
			68 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			Vue
		
	
	
	
	
	
			
		
		
	
	
			68 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			Vue
		
	
	
	
	
	
<template>
 | 
						|
  <div class="columns full-height conv-empty-state">
 | 
						|
    <woot-loading-state
 | 
						|
      v-if="uiFlags.isFetching || loadingChatList"
 | 
						|
      :message="loadingIndicatorMessage"
 | 
						|
    />
 | 
						|
    <!-- Show empty state images if not loading -->
 | 
						|
    <div v-if="!uiFlags.isFetching && !loadingChatList" class="current-chat">
 | 
						|
      <!-- No inboxes attached -->
 | 
						|
      <div v-if="!inboxesList.length">
 | 
						|
        <img src="~dashboard/assets/images/inboxes.svg" alt="No Inboxes" />
 | 
						|
        <span v-if="isAdmin">
 | 
						|
          {{ $t('CONVERSATION.NO_INBOX_1') }}
 | 
						|
          <br />
 | 
						|
          <router-link :to="newInboxURL">
 | 
						|
            {{ $t('CONVERSATION.CLICK_HERE') }}
 | 
						|
          </router-link>
 | 
						|
          {{ $t('CONVERSATION.NO_INBOX_2') }}
 | 
						|
        </span>
 | 
						|
        <span v-if="!isAdmin">
 | 
						|
          {{ $t('CONVERSATION.NO_INBOX_AGENT') }}
 | 
						|
        </span>
 | 
						|
      </div>
 | 
						|
      <!-- No conversations available -->
 | 
						|
      <div v-else-if="!allConversations.length">
 | 
						|
        <img src="~dashboard/assets/images/chat.svg" alt="No Chat" />
 | 
						|
        <span>
 | 
						|
          {{ $t('CONVERSATION.NO_MESSAGE_1') }}
 | 
						|
          <br />
 | 
						|
        </span>
 | 
						|
      </div>
 | 
						|
      <!-- No conversation selected -->
 | 
						|
      <div v-else-if="allConversations.length && currentChat.id === null">
 | 
						|
        <img src="~dashboard/assets/images/chat.svg" alt="No Chat" />
 | 
						|
        <span>{{ $t('CONVERSATION.404') }}</span>
 | 
						|
      </div>
 | 
						|
    </div>
 | 
						|
  </div>
 | 
						|
</template>
 | 
						|
<script>
 | 
						|
import { mapGetters } from 'vuex';
 | 
						|
import adminMixin from '../../../mixins/isAdmin';
 | 
						|
import accountMixin from '../../../mixins/account';
 | 
						|
 | 
						|
export default {
 | 
						|
  mixins: [accountMixin, adminMixin],
 | 
						|
 | 
						|
  computed: {
 | 
						|
    ...mapGetters({
 | 
						|
      currentChat: 'getSelectedChat',
 | 
						|
      allConversations: 'getAllConversations',
 | 
						|
      inboxesList: 'inboxes/getInboxes',
 | 
						|
      uiFlags: 'inboxes/getUIFlags',
 | 
						|
      loadingChatList: 'getChatListLoadingStatus',
 | 
						|
    }),
 | 
						|
    loadingIndicatorMessage() {
 | 
						|
      if (this.uiFlags.isFetching) {
 | 
						|
        return this.$t('CONVERSATION.LOADING_INBOXES');
 | 
						|
      }
 | 
						|
      return this.$t('CONVERSATION.LOADING_CONVERSATIONS');
 | 
						|
    },
 | 
						|
    newInboxURL() {
 | 
						|
      return this.addAccountScoping('settings/inboxes/new');
 | 
						|
    },
 | 
						|
  },
 | 
						|
};
 | 
						|
</script>
 |