diff --git a/src/modules/00_support/components/NewIssue.vue b/src/modules/00_support/components/NewIssue.vue index 1bb6ef2..ca9ade3 100644 --- a/src/modules/00_support/components/NewIssue.vue +++ b/src/modules/00_support/components/NewIssue.vue @@ -6,8 +6,9 @@ const store = useSupportStore(); const isOpen = ref(false); const title = ref(""); +const titleRef = ref(); const categoryId = ref(""); - +const categoryRef = ref(); const options = ref<{ label: string; value: string }[]>([]); onMounted(async () => { @@ -19,10 +20,21 @@ onMounted(async () => { })); } }); + +async function onSubmit() { + titleRef.value.validate(); + categoryRef.value.validate(); + if (titleRef.value.hasError || categoryRef.value.hasError) return ""; + await store.newIssue(title.value, categoryId.value); + isOpen.value = false; +}