A: Add AddressList tab to ContactDetail.tsx
This commit is contained in:
@@ -10,6 +10,7 @@ import { EmptyState } from '@/components/ui/EmptyState';
|
|||||||
import { Skeleton } from '@/components/ui/Skeleton';
|
import { Skeleton } from '@/components/ui/Skeleton';
|
||||||
import { Avatar } from '@/components/ui/Avatar';
|
import { Avatar } from '@/components/ui/Avatar';
|
||||||
import { TagPicker } from '@/components/tags/TagPicker';
|
import { TagPicker } from '@/components/tags/TagPicker';
|
||||||
|
import { AddressList } from '@/components/AddressList';
|
||||||
|
|
||||||
export function ContactDetailPage() {
|
export function ContactDetailPage() {
|
||||||
const { id } = useParams<{ id: string }>();
|
const { id } = useParams<{ id: string }>();
|
||||||
@@ -101,6 +102,14 @@ export function ContactDetailPage() {
|
|||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const addressesTab: TabItem = {
|
||||||
|
key: 'addresses',
|
||||||
|
label: t('address.title'),
|
||||||
|
content: (
|
||||||
|
<AddressList entityType="contact" entityId={contact.id} />
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
const tagsTab: TabItem = {
|
const tagsTab: TabItem = {
|
||||||
key: 'tags',
|
key: 'tags',
|
||||||
label: t('tags.title'),
|
label: t('tags.title'),
|
||||||
@@ -135,7 +144,7 @@ export function ContactDetailPage() {
|
|||||||
{t('common.edit')}
|
{t('common.edit')}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<Tabs tabs={[overviewTab, companiesTab, tagsTab, filesTab, activityTab]} defaultKey="overview" />
|
<Tabs tabs={[overviewTab, companiesTab, addressesTab, tagsTab, filesTab, activityTab]} defaultKey="overview" />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user