fix bug retire year
This commit is contained in:
parent
8f53521403
commit
93ea11a84b
1 changed files with 6 additions and 5 deletions
|
|
@ -14,7 +14,7 @@ import config from "@/app.config";
|
|||
import type { QTableProps } from "quasar";
|
||||
import type { resMain } from "@/modules/06_retirement/interface/response/Main";
|
||||
|
||||
import popupAdd from "@/modules/06_retirement/components/01_retirement/DialogAddListRetirement.vue";
|
||||
import DialogAddListRetirement from "@/modules/06_retirement/components/01_retirement/DialogAddListRetirement.vue";
|
||||
|
||||
const $q = useQuasar(); //ใช้ noti quasar
|
||||
const router = useRouter();
|
||||
|
|
@ -88,7 +88,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
]);
|
||||
|
||||
// ข้อมูลตาราง (จำลอง)
|
||||
const currentYear = calculateFiscalYear(new Date());
|
||||
const currentYear = ref<number | null>(calculateFiscalYear(new Date()));
|
||||
const rows = ref<resMain[]>([]);
|
||||
const rowsData = ref<resMain[]>([]);
|
||||
|
||||
|
|
@ -185,13 +185,14 @@ function onSearch() {
|
|||
}
|
||||
|
||||
watch(type, () => {
|
||||
fetchRetirement(type.value, currentYear);
|
||||
fetchRetirement(type.value, fiscalyear.value);
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
await fetchRetirement(type.value, currentYear);
|
||||
await fetchRetirement(type.value, fiscalyear.value);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="toptitle text-dark col-12 row items-center">
|
||||
ประกาศเกษียณอายุราชการ
|
||||
|
|
@ -261,7 +262,7 @@ onMounted(async () => {
|
|||
fiscalyear === currentYear
|
||||
"
|
||||
>
|
||||
<popupAdd
|
||||
<DialogAddListRetirement
|
||||
:type="useStoreRetire.type"
|
||||
:year="fiscalyear"
|
||||
:rows="rows"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue