คำสั่ง รายชื่อผู้ถูกพักราชการ
This commit is contained in:
parent
b3576ec6cf
commit
df7c3f2961
4 changed files with 163 additions and 209 deletions
|
|
@ -463,7 +463,7 @@ watch(
|
||||||
<!-- dialog สร้างคำสั่ง -->
|
<!-- dialog สร้างคำสั่ง -->
|
||||||
<DialogCreateCommand
|
<DialogCreateCommand
|
||||||
v-model:modal="modalCommand"
|
v-model:modal="modalCommand"
|
||||||
:command-type-code="'C-PM-01'"
|
:command-type-code="commandType"
|
||||||
:persons-id="selected.map((r) => r.id)"
|
:persons-id="selected.map((r) => r.id)"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -1,34 +1,43 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed, onMounted } from "vue";
|
import { ref, computed, watch } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useCommandMainStore } from "@/modules/18_command/store/Main";
|
||||||
|
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type { OpType } from "@/modules/05_placement/interface/response/Main";
|
import type { dataType } from "@/modules/11_discipline/interface/response/Suspend";
|
||||||
|
import type { ListCommand } from "@/modules/18_command/interface/index/Main";
|
||||||
|
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCommand.vue";
|
||||||
|
|
||||||
/** use */
|
/** use */
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const selected = ref<any>([]);
|
const storeCommand = useCommandMainStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const {
|
const { dialogConfirm } = mixin;
|
||||||
showLoader,
|
|
||||||
messageError,
|
const modal = defineModel<boolean>("modal", { required: true });
|
||||||
dialogConfirm,
|
const modalCommand = ref<boolean>(false); // ตัวแปร popup สร้างคำสั่ง
|
||||||
hideLoader,
|
|
||||||
dialogMessageNotify,
|
const rows = ref<dataType[]>([]);
|
||||||
} = mixin;
|
const selected = ref<dataType[]>([]);
|
||||||
const emit = defineEmits([
|
|
||||||
"update:filterKeyword2",
|
const commandType = ref<string>(""); //ตัวแปรเก็บคำสั่งที่เลือก
|
||||||
"update:selected",
|
const commandOp = ref<ListCommand[]>([]);
|
||||||
"returnPerson",
|
const listCommand = ref<ListCommand[]>([]); // เก็บคำสั่งทั้งหมด
|
||||||
]);
|
|
||||||
|
const filterKeyword = ref<string>("");
|
||||||
|
/** props*/
|
||||||
|
const props = defineProps<{
|
||||||
|
rows: dataType[];
|
||||||
|
}>();
|
||||||
|
|
||||||
/** คอลัมน์ */
|
/** คอลัมน์ */
|
||||||
const columns2 = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "no",
|
name: "no",
|
||||||
align: "center",
|
align: "center",
|
||||||
|
|
@ -86,7 +95,7 @@ const columns2 = ref<QTableProps["columns"]>([
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/** คอลัมน์ที่แสดง */
|
/** คอลัมน์ที่แสดง */
|
||||||
const visibleColumns2 = ref<string[]>([
|
const visibleColumns = ref<string[]>([
|
||||||
"no",
|
"no",
|
||||||
"name",
|
"name",
|
||||||
"position",
|
"position",
|
||||||
|
|
@ -96,184 +105,153 @@ const visibleColumns2 = ref<string[]>([
|
||||||
"status",
|
"status",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/** props*/
|
function closeModal() {
|
||||||
const props = defineProps({
|
modal.value = false;
|
||||||
modal: Boolean,
|
commandType.value = "";
|
||||||
closeModal: Function,
|
filterKeyword.value = "";
|
||||||
getData: Function,
|
|
||||||
rows2: Array,
|
|
||||||
filterKeyword2: String,
|
|
||||||
});
|
|
||||||
|
|
||||||
const checkSelected = computed(() => {
|
|
||||||
if (selected.value.length === 0) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const type = ref<string>("");
|
|
||||||
//----(ดึงข้อมูลประเภทคำสั่ง)------//
|
|
||||||
const optionsType = ref<[]>([]);
|
|
||||||
|
|
||||||
//popup ยืนยันส่งัว
|
|
||||||
function saveOrder() {
|
|
||||||
if (type.value === "") {
|
|
||||||
dialogMessageNotify($q, "กรุณาเลือกประเภทคำสั่ง");
|
|
||||||
} else {
|
|
||||||
dialogConfirm(
|
|
||||||
$q,
|
|
||||||
async () => {
|
|
||||||
await emit("returnPerson", selected.value, type.value);
|
|
||||||
props.closeModal?.();
|
|
||||||
type.value = "";
|
|
||||||
selected.value = [];
|
|
||||||
},
|
|
||||||
`ยืนยันการส่งไปออกคำสั่ง`,
|
|
||||||
`ต้องการยืนยันการส่งไปออกคำสั่งหรือไม่`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ส่งค่ากลับไปหน้าหลัก
|
* ฟิลเตอร์ คำสั่ง
|
||||||
* @param value ค่าที่รับจาก input
|
* @param val ค่าจาก Input
|
||||||
|
* @param update Funtion quasar
|
||||||
*/
|
*/
|
||||||
function updateInput(value: any) {
|
function filterSelector(val: string, update: Function) {
|
||||||
emit("update:filterKeyword2", value);
|
update(() => {
|
||||||
|
commandType.value = val ? "" : commandType.value;
|
||||||
|
commandOp.value = listCommand.value.filter(
|
||||||
|
(v: any) => v.name.indexOf(val) > -1
|
||||||
|
);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//รีเซ็ตค่าในช่องค้นหา
|
/** ฟังก์ชั่นยืนยันและส่งคนไปสร้างคำสั่ง */
|
||||||
function Reset() {
|
function saveOrder() {
|
||||||
emit("update:filterKeyword2", "");
|
dialogConfirm(
|
||||||
|
$q,
|
||||||
|
async () => {
|
||||||
|
modalCommand.value = true;
|
||||||
|
modal.value = false;
|
||||||
|
},
|
||||||
|
"ยืนยันส่งไปออกคำสั่ง",
|
||||||
|
"ต้องการยืนยันส่งไปออกคำสั่งใช่หรือไม่?"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function fecthTypeOption() {
|
/**
|
||||||
showLoader();
|
* เมื่อ props.modal เป็น true
|
||||||
await http
|
* กำหนดให้ selected เป็นค่าว่างและกำหนด filter ประเภทตำแหน่งตามประเภทการสอบ
|
||||||
.get(config.API.typeOrder())
|
*/
|
||||||
.then((res) => {
|
watch(
|
||||||
optionsType.value = res.data.result.filter(
|
() => modal.value,
|
||||||
(e: OpType) =>
|
async () => {
|
||||||
e.commandCode === "C-PM-25" || e.commandCode === "C-PM-26"
|
if (modal.value === true) {
|
||||||
|
rows.value = props.rows ? props.rows : [];
|
||||||
|
selected.value = [];
|
||||||
|
const data = await storeCommand.getCommandTypes();
|
||||||
|
listCommand.value = data.filter(
|
||||||
|
(v: any) => v.code == "C-PM-25" || v.code == "C-PM-26"
|
||||||
);
|
);
|
||||||
})
|
}
|
||||||
.catch((e) => {
|
}
|
||||||
messageError($q, e);
|
);
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
fecthTypeOption();
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<q-dialog v-model="props.modal">
|
<q-dialog v-model="modal">
|
||||||
<q-card style="width: 1200px; max-width: 80vw">
|
<q-card style="width: 1200px; max-width: 80vw">
|
||||||
<DialogHeader tittle="ส่งไปออกคำสั่ง" :close="closeModal" />
|
<DialogHeader tittle="ส่งไปออกคำสั่ง" :close="closeModal" />
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-section class="q-pa-md">
|
<q-card-section class="q-pa-md">
|
||||||
<div class="row">
|
<div class="row q-mb-sm">
|
||||||
<div class="col-5">
|
<q-select
|
||||||
<q-toolbar style="padding: 0">
|
v-model="commandType"
|
||||||
<q-select
|
dense
|
||||||
outlined
|
outlined
|
||||||
dense
|
label="ประเภทคำสั่ง"
|
||||||
v-model="type"
|
:options="commandOp"
|
||||||
:options="optionsType"
|
option-label="name"
|
||||||
label="ประเภทคำสั่ง"
|
option-value="code"
|
||||||
style="width: 400px; max-width: auto"
|
emit-value
|
||||||
emit-value
|
map-options
|
||||||
map-options
|
use-input
|
||||||
option-label="name"
|
style="width: 350px; max-width: auto"
|
||||||
option-value="id"
|
@update:model-value="selected = []"
|
||||||
use-input
|
@filter="(inputValue:any,
|
||||||
><template v-slot:no-option>
|
doneFn:Function) => filterSelector(inputValue, doneFn
|
||||||
<q-item>
|
) "
|
||||||
<q-item-section class="text-grey">
|
>
|
||||||
ไม่มีข้อมูล
|
<template v-slot:no-option>
|
||||||
</q-item-section>
|
<q-item>
|
||||||
</q-item>
|
<q-item-section class="text-grey"> ไม่มีข้อมูล </q-item-section>
|
||||||
</template>
|
</q-item>
|
||||||
</q-select>
|
</template></q-select
|
||||||
</q-toolbar>
|
>
|
||||||
</div>
|
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
||||||
<div class="col-5">
|
<q-input
|
||||||
<q-toolbar style="padding: 0">
|
borderless
|
||||||
<q-input
|
outlined
|
||||||
borderless
|
dense
|
||||||
outlined
|
debounce="300"
|
||||||
dense
|
v-model="filterKeyword"
|
||||||
debounce="300"
|
placeholder="ค้นหา"
|
||||||
:model-value="filterKeyword2"
|
style="width: 200px; max-width: auto"
|
||||||
@update:model-value="updateInput"
|
>
|
||||||
placeholder="ค้นหา"
|
<template v-slot:append>
|
||||||
style="width: 850px; max-width: auto"
|
<q-icon v-if="filterKeyword == ''" name="search" />
|
||||||
>
|
<q-icon
|
||||||
<template v-slot:append>
|
v-if="filterKeyword !== ''"
|
||||||
<q-icon v-if="filterKeyword2 == ''" name="search" />
|
name="clear"
|
||||||
<q-icon
|
class="cursor-pointer"
|
||||||
v-if="filterKeyword2 !== ''"
|
@click="filterKeyword = ''"
|
||||||
name="clear"
|
|
||||||
class="cursor-pointer"
|
|
||||||
@click="Reset"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
|
|
||||||
<q-select
|
|
||||||
v-model="visibleColumns2"
|
|
||||||
multiple
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
options-dense
|
|
||||||
:display-value="$q.lang.table.columns"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
:options="columns2"
|
|
||||||
option-value="name"
|
|
||||||
options-cover
|
|
||||||
style="min-width: 150px"
|
|
||||||
class="gt-xs q-ml-sm"
|
|
||||||
/>
|
/>
|
||||||
</q-toolbar>
|
</template>
|
||||||
</div>
|
</q-input>
|
||||||
|
|
||||||
|
<q-select
|
||||||
|
v-model="visibleColumns"
|
||||||
|
multiple
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
options-dense
|
||||||
|
:display-value="$q.lang.table.columns"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
:options="columns"
|
||||||
|
option-value="name"
|
||||||
|
options-cover
|
||||||
|
style="min-width: 150px"
|
||||||
|
class="gt-xs q-ml-sm"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<d-table
|
<d-table
|
||||||
:columns="columns2"
|
:columns="columns"
|
||||||
:rows="rows2"
|
:rows="rows"
|
||||||
:filter="filterKeyword2"
|
:filter="filterKeyword"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
:visible-columns="visibleColumns2"
|
:visible-columns="visibleColumns"
|
||||||
selection="multiple"
|
selection="multiple"
|
||||||
v-model:selected="selected"
|
v-model:selected="selected"
|
||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header-selection="scope">
|
||||||
<q-tr :props="props">
|
<q-checkbox
|
||||||
<q-th auto-width> </q-th>
|
keep-color
|
||||||
<q-th
|
color="primary"
|
||||||
v-for="col in props.cols"
|
dense
|
||||||
:key="col.name"
|
:disable="commandType"
|
||||||
:props="props"
|
v-model="scope.selected"
|
||||||
style="color: #000000; font-weight: 500"
|
/>
|
||||||
>
|
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
|
||||||
</q-th>
|
|
||||||
</q-tr>
|
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props">
|
||||||
<q-td>
|
<q-td>
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
keep-color
|
keep-color
|
||||||
color="primary"
|
color="primary"
|
||||||
dense
|
dense
|
||||||
|
:disable="commandType"
|
||||||
v-model="props.selected"
|
v-model="props.selected"
|
||||||
/>
|
/>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
@ -281,8 +259,8 @@ onMounted(() => {
|
||||||
<div v-if="col.name == 'no'">
|
<div v-if="col.name == 'no'">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div v-else>
|
||||||
{{ col.value }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
|
|
@ -294,10 +272,17 @@ onMounted(() => {
|
||||||
<q-btn
|
<q-btn
|
||||||
label="ส่งไปออกคำสั่ง"
|
label="ส่งไปออกคำสั่ง"
|
||||||
@click="saveOrder"
|
@click="saveOrder"
|
||||||
:disable="checkSelected"
|
:disable="selected.length === 0"
|
||||||
color="public"
|
color="public"
|
||||||
/>
|
/>
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
|
|
||||||
|
<!-- dialog สร้างคำสั่ง -->
|
||||||
|
<DialogCreateCommand
|
||||||
|
v-model:modal="modalCommand"
|
||||||
|
:command-type-code="commandType"
|
||||||
|
:persons-id="selected.map((r:dataType) => r.id)"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import config from "@/app.config";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useDisciplineSuspendStore } from "@/modules/11_discipline/store/SuspendStore";
|
import { useDisciplineSuspendStore } from "@/modules/11_discipline/store/SuspendStore";
|
||||||
|
|
||||||
import type { dataType } from "@/modules/11_discipline/interface/response/suspend";
|
import type { dataType } from "@/modules/11_discipline/interface/response/Suspend";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
|
|
||||||
import DialogSendToCommand from "@/modules/11_discipline/components/7_ListSuspend/DialogSendToCommand.vue";
|
import DialogSendToCommand from "@/modules/11_discipline/components/7_ListSuspend/DialogSendToCommand.vue";
|
||||||
|
|
@ -38,7 +38,6 @@ const visibleColumns = ref<string[]>([
|
||||||
|
|
||||||
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
||||||
const filterKeyword = ref<string>("");
|
const filterKeyword = ref<string>("");
|
||||||
const filterKeyword2 = ref<string>("");
|
|
||||||
const filterRef = ref<any>(null);
|
const filterRef = ref<any>(null);
|
||||||
|
|
||||||
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
||||||
|
|
@ -124,7 +123,6 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const openModal = () => (modal.value = true);
|
const openModal = () => (modal.value = true);
|
||||||
const closeModal = () => (modal.value = false);
|
|
||||||
|
|
||||||
const currentPage = ref<number>(1);
|
const currentPage = ref<number>(1);
|
||||||
const maxPage = ref<number>(1);
|
const maxPage = ref<number>(1);
|
||||||
|
|
@ -144,7 +142,6 @@ const pagination = ref({
|
||||||
|
|
||||||
function resetFilter() {
|
function resetFilter() {
|
||||||
filterKeyword.value = "";
|
filterKeyword.value = "";
|
||||||
filterKeyword2.value = "";
|
|
||||||
filterRef.value.focus();
|
filterRef.value.focus();
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
|
|
@ -163,6 +160,7 @@ function openModalOrder() {
|
||||||
r.organization
|
r.organization
|
||||||
);
|
);
|
||||||
rows2.value = dataMap;
|
rows2.value = dataMap;
|
||||||
|
console.log("🚀 ~ openModalOrder ~ rows2.value:", rows2.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ดึงข้อมูลหน้าหลัก */
|
/** ดึงข้อมูลหน้าหลัก */
|
||||||
|
|
@ -176,41 +174,18 @@ async function getList() {
|
||||||
filterKeyword.value
|
filterKeyword.value
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
|
maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
|
||||||
const data = res.data.result.data;
|
const data = await res.data.result.data;
|
||||||
totalList.value = res.data.result.total;
|
totalList.value = res.data.result.total;
|
||||||
dataStore.getData(data);
|
await dataStore.getData(data);
|
||||||
|
hideLoader();
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ยืนยัน ส่งไปออกคำสั่ง
|
|
||||||
* @param data ข้อมูลรายบุคคล
|
|
||||||
*/
|
|
||||||
function onSubmit(data: dataType[], type: string) {
|
|
||||||
const dataMapId = data.map((item: dataType) => item.id);
|
|
||||||
showLoader();
|
|
||||||
http
|
|
||||||
.put(`${config.API.suspendReport()}/${type}`, {
|
|
||||||
id: dataMapId,
|
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.finally(() => {});
|
||||||
success($q, `ส่งข้อมูลไปออกคำสั่งสำเร็จ`);
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
|
||||||
getList();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function filterFn() {
|
function filterFn() {
|
||||||
|
|
@ -235,8 +210,8 @@ watch(
|
||||||
);
|
);
|
||||||
|
|
||||||
/** เรียกใช้งานเมื่อเริ่มหน้าเว็ป */
|
/** เรียกใช้งานเมื่อเริ่มหน้าเว็ป */
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
getList();
|
await getList();
|
||||||
dataStore.columns = columns.value;
|
dataStore.columns = columns.value;
|
||||||
dataStore.visibleColumns = visibleColumns.value;
|
dataStore.visibleColumns = visibleColumns.value;
|
||||||
});
|
});
|
||||||
|
|
@ -398,12 +373,6 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
||||||
<DialogSendToCommand
|
<DialogSendToCommand v-model:modal="modal" :rows="rows2" />
|
||||||
v-model:modal="modal"
|
|
||||||
:closeModal="closeModal"
|
|
||||||
:rows2="rows2"
|
|
||||||
v-model:filterKeyword2="filterKeyword2"
|
|
||||||
@returnPerson="onSubmit"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import type {
|
||||||
listData,
|
listData,
|
||||||
dataType,
|
dataType,
|
||||||
DataOption,
|
DataOption,
|
||||||
} from "@/modules/11_discipline/interface/response/suspend";
|
} from "@/modules/11_discipline/interface/response/Suspend";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
|
|
||||||
export const useDisciplineSuspendStore = defineStore(
|
export const useDisciplineSuspendStore = defineStore(
|
||||||
|
|
@ -30,7 +30,7 @@ export const useDisciplineSuspendStore = defineStore(
|
||||||
* จัดเรียงข้อมูลจาก API
|
* จัดเรียงข้อมูลจาก API
|
||||||
* @param data ข้อมูลจาก API
|
* @param data ข้อมูลจาก API
|
||||||
*/
|
*/
|
||||||
function getData(data: listData[]) {
|
async function getData(data: listData[]) {
|
||||||
const dataList: dataType[] = data.map((item: listData) => ({
|
const dataList: dataType[] = data.map((item: listData) => ({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
citizenId: item.citizenId,
|
citizenId: item.citizenId,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue