chore: Add route for contact details page (#2168)

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
Nithin David Thomas
2021-04-28 10:01:11 +05:30
committed by GitHub
parent 8ea35802b4
commit 6ea1e0d047
3 changed files with 48 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ export const getSidebarItems = accountId => ({
'inbox_conversation',
'conversation_through_inbox',
'contacts_dashboard',
'contacts_dashboard_manage',
'notifications_dashboard',
'settings_account_reports',
'profile_settings',

View File

@@ -0,0 +1,37 @@
<template>
<div class="contact-manage-view row"></div>
</template>
<script>
import { mapGetters } from 'vuex';
export default {
components: {},
props: {
contactId: {
type: [String, Number],
default: 0,
},
},
data() {
return {};
},
computed: {
...mapGetters({
uiFlags: 'contacts/getUIFlags',
}),
showEmptySearchResult() {
const hasEmptyResults = !!this.searchQuery && this.records.length === 0;
return hasEmptyResults;
},
},
mounted() {},
methods: {},
};
</script>
<style lang="scss" scoped>
.contact-manage-view {
width: 100%;
}
</style>

View File

@@ -1,5 +1,6 @@
/* eslint arrow-body-style: 0 */
import ContactsView from './components/ContactsView';
import ContactManageView from './pages/ContactManageView';
import { frontendURL } from '../../../helper/URLHelper';
export const routes = [
@@ -9,4 +10,13 @@ export const routes = [
roles: ['administrator', 'agent'],
component: ContactsView,
},
{
path: frontendURL('accounts/:accountId/contacts/:contactId'),
name: 'contacts_dashboard_manage',
roles: ['administrator', 'agent'],
component: ContactManageView,
props: route => {
return { contactId: route.params.contactId };
},
},
];