<script setup lang="ts">
import { useRouter } from "vue-router";

import Form from "@/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue";

const router = useRouter();

/** บันทึกข้อมูลเเละ route กลับหน้าหลัก */
const onSubmit = async () => {
  router.push(`/discipline/disciplinary`);
};
</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>
