/
ManageLayout.vue
74 lines (68 loc) 路 1.52 KB
/
ManageLayout.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<template>
<div class="wrap">
<div class="left">
<contact-panel v-if="!uiFlags.isFetchingItem" :contact="contact" />
</div>
<div class="center"></div>
<div class="right">
<contact-notes :contact-id="Number(contactId)" />
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import ContactPanel from './ContactPanel';
import ContactNotes from 'dashboard/modules/notes/NotesOnContactPage';
export default {
components: {
ContactPanel,
ContactNotes,
},
props: {
contactId: {
type: [String, Number],
required: true,
},
},
computed: {
...mapGetters({
uiFlags: 'contacts/getUIFlags',
}),
showEmptySearchResult() {
const hasEmptyResults = !!this.searchQuery && this.records.length === 0;
return hasEmptyResults;
},
contact() {
return this.$store.getters['contacts/getContact'](this.contactId);
},
},
mounted() {
this.fetchContactDetails();
},
methods: {
fetchContactDetails() {
const { contactId: id } = this;
this.$store.dispatch('contacts/show', { id });
},
},
};
</script>
<style lang="scss" scoped>
@import '~dashboard/assets/scss/mixins';
.wrap {
@include three-column-grid(27.2rem);
min-height: 0;
background: var(--color-background-light);
border-top: 1px solid var(--color-border);
}
.left {
overflow: auto;
}
.center {
border-right: 1px solid var(--color-border);
border-left: 1px solid var(--color-border);
}
.right {
padding: var(--space-normal);
}
</style>