feat: Show teams on sidebar (#1754)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
Nithin David Thomas
2021-02-13 14:58:05 +05:30
committed by GitHub
parent 8d45849d0c
commit eaafc45f45
12 changed files with 110 additions and 4 deletions

View File

@@ -3,6 +3,7 @@
<chat-list
:conversation-inbox="inboxId"
:label="label"
:active-team="activeTeam"
@conversation-load="onConversationLoad"
>
<button class="search--button" @click="onSearch">
@@ -61,6 +62,10 @@ export default {
type: String,
default: '',
},
teamId: {
type: String,
default: '',
},
},
data() {
return {
@@ -81,6 +86,12 @@ export default {
}
return false;
},
activeTeam() {
if (this.teamId) {
return this.$store.getters['teams/getTeam'](this.teamId);
}
return {};
},
},
mounted() {

View File

@@ -64,5 +64,24 @@ export default {
label: route.params.label,
}),
},
{
path: frontendURL('accounts/:accountId/team/:teamId'),
name: 'team_conversations',
roles: ['administrator', 'agent'],
component: ConversationView,
props: route => ({ teamId: route.params.teamId }),
},
{
path: frontendURL(
'accounts/:accountId/team/:teamId/conversations/:conversationId'
),
name: 'conversations_through_team',
roles: ['administrator', 'agent'],
component: ConversationView,
props: route => ({
conversationId: route.params.conversationId,
teamId: route.params.teamId,
}),
},
],
};