subfolder
This commit is contained in:
parent
8c7e4332dd
commit
14c0054d7f
|
@ -12,6 +12,7 @@ type ExternalDataType = {
|
|||
type StateDataType = {
|
||||
partner?: string
|
||||
categories?: string[]
|
||||
inventory?: string
|
||||
element?: string
|
||||
element_id?: string
|
||||
}
|
||||
|
@ -19,6 +20,7 @@ const loading = ref(false)
|
|||
const state = reactive<StateDataType>({
|
||||
partner: undefined,
|
||||
categories: [],
|
||||
inventory: undefined,
|
||||
element: undefined,
|
||||
element_id: undefined
|
||||
})
|
||||
|
@ -34,9 +36,10 @@ const schema = object({
|
|||
type Schema = InferType<typeof schema>
|
||||
|
||||
async function onSubmit(event: FormSubmitEvent<Schema>) {
|
||||
console.log(event.data)
|
||||
const data = $fetch(`${apiBase}/element/`, { method: 'POST', body: JSON.stringify(event.data) })
|
||||
console.log(data)
|
||||
const data = await $fetch(`${apiBase}/element/`, { method: 'POST', body: JSON.stringify(event.data) })
|
||||
if(data.partner) {
|
||||
// navigateTo(`/organization/${data.partner.id}`)
|
||||
}
|
||||
}
|
||||
|
||||
const searchInExternal = (q: string) => {
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
<template>
|
||||
inv
|
||||
</template>
|
|
@ -0,0 +1,3 @@
|
|||
<template>
|
||||
partner
|
||||
</template>
|
Loading…
Reference in New Issue