2021-05-10 11:41:08 +00:00
|
|
|
<template>
|
|
|
|
<div class="wrap">
|
2021-05-13 10:10:36 +00:00
|
|
|
<div class="left">
|
|
|
|
<contact-panel v-if="!uiFlags.isFetchingItem" :contact="contact" />
|
|
|
|
</div>
|
2021-05-10 11:41:08 +00:00
|
|
|
<div class="center"></div>
|
2021-06-14 04:19:17 +00:00
|
|
|
<div class="right">
|
|
|
|
<contact-notes :contact-id="Number(contactId)" />
|
|
|
|
</div>
|
2021-05-10 11:41:08 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { mapGetters } from 'vuex';
|
2021-05-13 10:10:36 +00:00
|
|
|
import ContactPanel from './ContactPanel';
|
2021-06-14 04:19:17 +00:00
|
|
|
import ContactNotes from 'dashboard/modules/notes/NotesOnContactPage';
|
2021-05-10 11:41:08 +00:00
|
|
|
|
|
|
|
export default {
|
2021-05-13 10:10:36 +00:00
|
|
|
components: {
|
|
|
|
ContactPanel,
|
2021-06-14 04:19:17 +00:00
|
|
|
ContactNotes,
|
2021-05-13 10:10:36 +00:00
|
|
|
},
|
2021-05-10 11:41:08 +00:00
|
|
|
props: {
|
|
|
|
contactId: {
|
|
|
|
type: [String, Number],
|
2021-06-14 04:19:17 +00:00
|
|
|
required: true,
|
2021-05-10 11:41:08 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
...mapGetters({
|
|
|
|
uiFlags: 'contacts/getUIFlags',
|
|
|
|
}),
|
|
|
|
showEmptySearchResult() {
|
|
|
|
const hasEmptyResults = !!this.searchQuery && this.records.length === 0;
|
|
|
|
return hasEmptyResults;
|
|
|
|
},
|
2021-05-13 10:10:36 +00:00
|
|
|
contact() {
|
|
|
|
return this.$store.getters['contacts/getContact'](this.contactId);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mounted() {
|
2021-06-14 04:19:17 +00:00
|
|
|
this.fetchContactDetails();
|
2021-05-13 10:10:36 +00:00
|
|
|
},
|
|
|
|
methods: {
|
2021-06-14 04:19:17 +00:00
|
|
|
fetchContactDetails() {
|
|
|
|
const { contactId: id } = this;
|
|
|
|
this.$store.dispatch('contacts/show', { id });
|
2021-05-13 10:10:36 +00:00
|
|
|
},
|
2021-05-10 11:41:08 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
@import '~dashboard/assets/scss/mixins';
|
|
|
|
|
|
|
|
.wrap {
|
|
|
|
@include three-column-grid(27.2rem);
|
2021-05-21 13:52:47 +00:00
|
|
|
min-height: 0;
|
|
|
|
|
|
|
|
background: var(--color-background-light);
|
2021-05-10 11:41:08 +00:00
|
|
|
border-top: 1px solid var(--color-border);
|
|
|
|
}
|
2021-05-21 13:52:47 +00:00
|
|
|
.left {
|
|
|
|
overflow: auto;
|
|
|
|
}
|
2021-05-10 11:41:08 +00:00
|
|
|
.center {
|
|
|
|
border-right: 1px solid var(--color-border);
|
|
|
|
border-left: 1px solid var(--color-border);
|
|
|
|
}
|
2021-06-14 04:19:17 +00:00
|
|
|
|
|
|
|
.right {
|
|
|
|
padding: var(--space-normal);
|
|
|
|
}
|
2021-05-10 11:41:08 +00:00
|
|
|
</style>
|