-
Notifications
You must be signed in to change notification settings - Fork 7
/
QuickViewContactsCard.vue
103 lines (98 loc) · 2.25 KB
/
QuickViewContactsCard.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<template>
<QuickViewCardOverview
:title="t('datasets.quickView.contact')"
:sections="contactSections"
/>
</template>
<script setup lang="ts">
import { computed, defineProps, withDefaults } from 'vue';
import { useI18n } from 'vue-i18n';
import { getTextValue } from './QuickViewUtils';
import QuickViewCardOverview from './QuickViewCardOverview.vue';
const { t } = useI18n();
const props = withDefaults(
defineProps<{
companyName?: string;
givenName?: string;
surname?: string;
address?: string;
city?: string;
zipCode?: string;
countryName?: string;
email?: string;
phoneNumber?: string;
url?: string;
}>(),
{
companyName: '',
givenName: '',
surname: '',
address: '',
city: '',
zipCode: '',
countryName: '',
email: '',
phoneNumber: '',
url: '',
}
);
const contactSections = computed(() => {
return [
{
icon: 'IconDocument',
content: [
{
title: t('datasets.quickView.nameCompanyName'),
text: getTextValue(props.companyName),
},
{
title: t('datasets.quickView.firstName'),
text: getTextValue(props.givenName),
},
{
title: t('datasets.quickView.surname'),
text: getTextValue(props.surname),
},
],
},
{
icon: 'IconBuilding',
content: [
{
title: t('datasets.quickView.streetAndNumber'),
text: getTextValue(props.address),
},
{
title: t('datasets.quickView.city'),
text: getTextValue(props.city),
},
{
title: t('datasets.quickView.zip'),
text: getTextValue(props.zipCode),
},
{
title: t('datasets.quickView.country'),
text: getTextValue(props.countryName),
},
],
},
{
icon: 'IconPhonebook',
content: [
{
title: t('datasets.quickView.email'),
text: getTextValue(props.email),
},
{
title: t('datasets.quickView.phoneNumber'),
text: getTextValue(props.phoneNumber),
},
{
title: t('datasets.quickView.webUrl'),
text: getTextValue(props.url),
},
],
},
];
});
</script>