Refactoring code module 05_placement

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-09-19 15:02:44 +07:00
parent 202fbf27b6
commit 4678ead38e
75 changed files with 3110 additions and 10795 deletions

View file

@ -1,32 +1,30 @@
<script setup lang="ts">
import { onMounted, ref } from "vue";
import { useRouter, useRoute } from "vue-router";
import { tokenParsed } from "@/plugins/auth";
import { useQuasar } from "quasar";
import { tokenParsed } from "@/plugins/auth";
import { useRouter, useRoute } from "vue-router";
import { useCounterMixin } from "@/stores/mixin";
import { usePlacementDataStore } from "@/modules/05_placement/store";
import http from "@/plugins/http";
import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
import { useQuasar } from "quasar";
import { usePlacementDataStore } from "@/modules/05_placement/store";
import CardTop from "@/modules/05_placement/components/PersonalList/StatCard.vue";
import AddTablePosition from "@/modules/05_placement/components/PersonalList/Table.vue";
const DataStore = usePlacementDataStore();
let roleAdmin = ref<boolean>(false);
const $q = useQuasar;
const mixin = useCounterMixin();
const { messageError, showLoader, hideLoader } = mixin;
const $q = useQuasar();
const router = useRouter();
const route = useRoute();
const mixin = useCounterMixin();
const DataStore = usePlacementDataStore();
const { messageError, showLoader, hideLoader } = mixin;
const examId = route.params.examId;
const year = ref<string>("");
const round = ref<string>("");
const title = ref<string>("");
const examData = ref<any>();
const roleAdmin = ref<boolean>(false);
const stat = ref<any>({
total: 0,
unContain: 0,
@ -35,7 +33,9 @@ const stat = ref<any>({
disclaim: 0,
});
/** เรียกข้อมูล Stat */
/**
* เรยกขอม Stat
*/
async function getStat() {
const examIdString = Array.isArray(examId) ? examId[0] : examId;
await http
@ -56,7 +56,9 @@ async function getStat() {
});
}
/** get รายละเอียด ของการสอบ */
/**
* get รายละเอยด ของการสอบ
*/
async function fetchPlacementData() {
showLoader();
await http