Add view for showing contact details.
This commit is contained in:
parent
66c0da1bbe
commit
cfe166c0f2
3 changed files with 57 additions and 6 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue