<script setup lang="ts">
import Form from "@/modules/11_discipline/components/2_InvestigateFacts/Form.vue";
import { useRouter } from "vue-router";

const router = useRouter();

/** บันทึกข้อมูลเเละ route กลับหน้าหลัก */
async function onSubmit() {
  router.push(`/discipline/investigatefacts`);
}
</script>

<template>
  <div class="col-xs-12 col-sm-12 col-md-11">
    <div class="toptitle text-dark col-12 row items-center">
      <q-btn
        for="#backMaininvestigate"
        icon="mdi-arrow-left"
        unelevated
        round
        dense
        flat
        color="primary"
        class="q-mr-sm"
        @click="router.go(-1)"
      />
      เพิ่มรายการสืบสวนข้อเท็จจริง
    </div>

    <q-card bordered><Form :on-submit="onSubmit" /></q-card>
  </div>
</template>
