<template>
    <div class="col-xs-12 col-sm-12 col-md-11">
      <div class="toptitle col-12 row items-center">
        <q-btn
          icon="mdi-arrow-left"
          unelevated
          round
          dense
          flat
          color="primary"
          class="q-mr-sm"
          @click="router.push(`/coin/allocate/list-allocate`)"
        />
        <div>เพิ่มรายการโควต้าจำนวนเหรียญตรา</div>
      </div>
      <div class="col-12">
        <q-card bordered>
          <div class="col-12 row q-col-gutter-md q-pa-md">
            <div class="col-xs-12 col-sm-12 row">
              <q-separator />
              <div class="col-12 row q-pa-sm q-col-gutter-sm">
                <q-input class="col-2" dense outlined v-model="year" label="ปี" />
                <q-input
                  class="col-8"
                  dense
                  outlined
                  v-model="typeInsig"
                  label="ประเภทเหรียนตรา"
                />
                <q-input
                  class="col-2"
                  dense
                  outlined
                  v-model="total"
                  label="จำนวน"
                />
              </div>
            </div>
          </div>
          <q-separator />
          <q-separator />
          <div class="row col-12 q-pa-sm">
            <q-space />
            <q-btn
              unelevated
              dense
              class="q-px-md items-center"
              color="light-blue-10"
              label="บันทึก"
              @click="router.go(-1)"
            />
          </div>
        </q-card>
      </div>
    </div>
  </template>
  <script setup lang="ts">
  import type { QTableProps } from "quasar";
  import { ref } from "vue";
  import { useQuasar } from "quasar";
  import { useRouter } from "vue-router";
  import { useCounterMixin } from "@/stores/mixin";
  
  const mixin = useCounterMixin();
  const { date2Thai } = mixin;
  const router = useRouter();
  const $q = useQuasar();
  const dateStart = ref<any>(new Date());
  const dateEnd = ref<any>(new Date());
  
  const total = ref<any>("");
  const typeInsig = ref<string>("");
  const year = ref<string>("");
  const datelast = ref<string>("");
  
  const routeName = router.currentRoute.value.name;
  </script>
  