ต่อ api บุคคลที่สามารถติดต่อได้

This commit is contained in:
Kittapath 2023-10-06 01:29:23 +07:00
parent 57d80e33cb
commit 468f27f74b
6 changed files with 254 additions and 183 deletions

View file

@ -41,13 +41,13 @@
<q-separator class="q-my-lg bg-gray" size="5px" />
<div class="q-px-sm">
<Contact :status="status" />
<Contact :status="status" :prefixOptions="prefixOptions" v-model:form="formContact" />
</div>
<q-separator class="q-my-lg bg-gray" size="5px" />
<div class="q-px-sm">
<!-- <div class="q-px-sm">
<Document :status="status" />
</div>
</div> -->
</template>
<script setup lang="ts">
import { ref, onMounted, watch } from 'vue'
@ -86,13 +86,18 @@ const props = defineProps({
formOccupation: {
type: Object,
required: true
},
formContact: {
type: Object,
required: true
}
})
const emit = defineEmits([
'update:formInformation',
'update:formAddress',
'update:formEducation',
'update:formOccupation'
'update:formOccupation',
'update:formContact'
])
const $q = useQuasar()
@ -108,6 +113,7 @@ const formInformation = ref<any>({})
const formAddress = ref<any>({})
const formEducation = ref<any>({})
const formOccupation = ref<any>({})
const formContact = ref<any>({})
watch(formInformation, async (count: Object, prevCount: Object) => {
emit('update:formInformation', count)
@ -125,6 +131,10 @@ watch(formOccupation, async (count: Object, prevCount: Object) => {
emit('update:formOccupation', count)
})
watch(formContact, async (count: Object, prevCount: Object) => {
emit('update:formContact', count)
})
onMounted(async () => {
await fetchPerson()
})