mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 19:48:08 +00:00
* feat: Revamps search to use new search API's * Fixes search result spacing * Fixes message result * Fixes issue with empty search results * Remove console errors * Remove console errors * Fix console errors, canned responses * Fixes message rendering on results * Highlights search term * Fixes html rendering for emails * FIxes email rendering issues * Removes extra spaces and line breaks --------- Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
48 lines
1.1 KiB
Vue
48 lines
1.1 KiB
Vue
<template>
|
|
<search-result-section
|
|
:title="$t('SEARCH.SECTION.CONVERSATIONS')"
|
|
:empty="!conversations.length"
|
|
:query="query"
|
|
>
|
|
<ul class="search-list">
|
|
<li v-for="conversation in conversations" :key="conversation.id">
|
|
<search-result-conversation-item
|
|
:id="conversation.id"
|
|
:name="conversation.contact.name"
|
|
:account-id="accountId"
|
|
:inbox="conversation.inbox"
|
|
:created-at="conversation.created_at"
|
|
/>
|
|
</li>
|
|
</ul>
|
|
</search-result-section>
|
|
</template>
|
|
|
|
<script>
|
|
import { mapGetters } from 'vuex';
|
|
import SearchResultSection from './SearchResultSection.vue';
|
|
import SearchResultConversationItem from './SearchResultConversationItem.vue';
|
|
|
|
export default {
|
|
components: {
|
|
SearchResultSection,
|
|
SearchResultConversationItem,
|
|
},
|
|
props: {
|
|
conversations: {
|
|
type: Array,
|
|
default: () => [],
|
|
},
|
|
query: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
},
|
|
computed: {
|
|
...mapGetters({
|
|
accountId: 'getCurrentAccountId',
|
|
}),
|
|
},
|
|
};
|
|
</script>
|