Add view for showing contact details.

This commit is contained in:
Eli Ribble 2026-05-18 23:37:59 +00:00
parent 66c0da1bbe
commit cfe166c0f2
No known key found for this signature in database
3 changed files with 57 additions and 6 deletions

View file

@ -4,10 +4,11 @@
<ReviewContactColumnList
:contacts="contacts"
:loading="storeResource.contact.loadingAll()"
@selection-change="handleSelectionChange"
/>
</template>
<template #center>
<ReviewContactColumnDetail />
<ReviewContactColumnDetail :contact="selectedContact" />
</template>
<template #right>
<ReviewContactColumnAction />
@ -15,6 +16,7 @@
</ThreeColumn>
</template>
<script setup lang="ts">
import { ref } from "vue";
import { computedAsync } from "@vueuse/core";
import ThreeColumn from "@/components/layout/ThreeColumn.vue";
@ -22,9 +24,14 @@ import ReviewContactColumnAction from "@/components/ReviewContactColumnAction.vu
import ReviewContactColumnDetail from "@/components/ReviewContactColumnDetail.vue";
import ReviewContactColumnList from "@/components/ReviewContactColumnList.vue";
import { useStoreResource } from "@/store/resource";
import { Contact } from "@/type/api";
const storeResource = useStoreResource();
const contacts = computedAsync(() => {
return storeResource.contact.byAll();
});
const selectedContact = ref<Contact | undefined>(undefined);
const handleSelectionChange = (selection: Contact | undefined) => {
selectedContact.value = selection;
};
</script>