Merge branch 'develop' into dev-tee

This commit is contained in:
setthawutttty 2023-09-21 16:08:32 +07:00
commit 0f5879d250
2 changed files with 13 additions and 7 deletions

View file

@ -77,6 +77,7 @@ const fileUploadDoc = async (files: any) => {
const updateYear = async (e: number) => {
yearly.value = e;
await updateDateRange();
};
//
@ -104,11 +105,11 @@ const SaveData = async () => {
//
const updateDateRange = () => {
if (roundInsig.value.value == 1) {
dateStart.value = new Date(new Date().getFullYear(), 9, 1);
dateEnd.value = new Date(new Date().getFullYear() + 1, 3, 29);
dateStart.value = new Date(yearly.value, 9, 1);
dateEnd.value = new Date(yearly.value + 1, 3, 29);
} else if (roundInsig.value.value == 2) {
dateStart.value = new Date(new Date().getFullYear(), 3, 29);
dateEnd.value = new Date(new Date().getFullYear(), 4, 29);
dateStart.value = new Date(yearly.value + 1, 3, 29);
dateEnd.value = new Date(yearly.value + 1, 4, 29);
}
};
//

View file

@ -118,7 +118,10 @@ const fetchData = async () => {
});
};
// redirect
const clickEdit = (col: any) => {
interface Col {
period_id: string;
}
const clickEdit = (col: Col) => {
router.push(`/insignia/round-add/${col.period_id}`);
};
//
@ -172,10 +175,12 @@ const getRequest = async (id: string) => {
//
const filterKeyword = ref<string>("");
const filterRef = ref<any>(null);
const filterRef = ref<HTMLInputElement | null>(null);
const resetFilter = () => {
filterKeyword.value = "";
filterRef.value.focus();
if (filterRef.value) {
filterRef.value.focus();
}
};
const attrs = ref<any>(useAttrs());