Merge branch 'develop' into devTee

This commit is contained in:
setthawutttty 2023-12-26 11:24:25 +07:00
commit 5d6c63f242

View file

@ -47,7 +47,7 @@ const dateMonth = ref<DataDateMonthObject>({
});
const year = ref<number>(new Date().getFullYear());
const dateStart = ref<Date>(new Date(year.value, 9, 1));
const dateEnd = ref<Date>(new Date(year.value, 8, 30));
const dateEnd = ref<Date>(new Date(year.value + 1, 8, 30));
const employeeClass = ref<string>("employee");
const yearType = ref<string>("FULL");
const filterType = ref<string>("daily");
@ -155,8 +155,7 @@ async function fetchLeaveday(
showLoader();
const body = {
type: year,
year: 2024,
type: year === "FULL" ? "FULL" : "HAFT",
startDate: dateToISO(startDate),
endDate: dateToISO(endDate),
};
@ -274,13 +273,13 @@ async function genReportXLSX(data: any) {
async function updateLeaveday() {
if (yearType.value === "FULL") {
dateStart.value = new Date(year.value, 9, 1);
dateEnd.value = new Date(year.value, 8, 30);
dateEnd.value = new Date(year.value + 1, 8, 30);
} else if (yearType.value === "FIRSTHAFT") {
dateStart.value = new Date(year.value, 9, 1);
dateEnd.value = new Date(year.value, 2, 31);
dateEnd.value = new Date(year.value + 1, 2, 31);
} else if (yearType.value === "SECONDHAFT") {
dateStart.value = new Date(year.value, 3, 1);
dateEnd.value = new Date(year.value, 8, 30);
dateStart.value = new Date(year.value + 1, 2, 31);
dateEnd.value = new Date(year.value + 1, 8, 30);
}
fetchLeaveday(