From 14c0054d7f30dd4b393c6447ae0da1ea4796ce0d Mon Sep 17 00:00:00 2001 From: aarizona Date: Wed, 29 May 2024 17:52:09 +0300 Subject: [PATCH] subfolder --- front/pages/organization/new.vue | 9 ++++++--- front/pages/organization/p_[id]/i_[id].vue | 3 +++ front/pages/organization/p_[id]/index.vue | 3 +++ 3 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 front/pages/organization/p_[id]/i_[id].vue create mode 100644 front/pages/organization/p_[id]/index.vue diff --git a/front/pages/organization/new.vue b/front/pages/organization/new.vue index 3d2a5f0..355e455 100644 --- a/front/pages/organization/new.vue +++ b/front/pages/organization/new.vue @@ -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({ partner: undefined, categories: [], + inventory: undefined, element: undefined, element_id: undefined }) @@ -34,9 +36,10 @@ const schema = object({ type Schema = InferType async function onSubmit(event: FormSubmitEvent) { - 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) => { diff --git a/front/pages/organization/p_[id]/i_[id].vue b/front/pages/organization/p_[id]/i_[id].vue new file mode 100644 index 0000000..4f4c258 --- /dev/null +++ b/front/pages/organization/p_[id]/i_[id].vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/front/pages/organization/p_[id]/index.vue b/front/pages/organization/p_[id]/index.vue new file mode 100644 index 0000000..7913a32 --- /dev/null +++ b/front/pages/organization/p_[id]/index.vue @@ -0,0 +1,3 @@ + \ No newline at end of file