diff --git a/src/modules/13_salary/components/SalaryLists/TabMain.vue b/src/modules/13_salary/components/SalaryLists/TabMain.vue index 28b8eb96c..4f2d8d190 100644 --- a/src/modules/13_salary/components/SalaryLists/TabMain.vue +++ b/src/modules/13_salary/components/SalaryLists/TabMain.vue @@ -310,15 +310,15 @@ function fetchDataPeriodNew() { function onClickDownload(data: DataOption) { showLoader(); - if (data.id === "gov-06") { + if (data.id === "go1" || data.id === "go2") { const formData = { type: "HAFT", startDate: - props?.roundFilter?.shortCode === "APR" + data.id === "go1" ? `${props?.roundFilter?.year - 1}-10-01` : `${props?.roundFilter?.year}-04-01`, endDate: - props?.roundFilter?.shortCode === "APR" + data.id === "go1" ? `${props?.roundFilter?.year}-03-31` : `${props?.roundFilter?.year}-09-30`, }; diff --git a/src/modules/13_salary/store/SalaryListsStore.ts b/src/modules/13_salary/store/SalaryListsStore.ts index 37b84124c..51bb461db 100644 --- a/src/modules/13_salary/store/SalaryListsStore.ts +++ b/src/modules/13_salary/store/SalaryListsStore.ts @@ -82,7 +82,7 @@ export const useSalaryListSDataStore = defineStore("salaryListStore", () => { name: "แบบ 2 กท รอบเมษายน", }, { - id: "gov-06", + id: "go1", name: "แบบ 3 กท บัญชีแสดงวันลาครึ่งปี ขรก.", }, { @@ -118,7 +118,7 @@ export const useSalaryListSDataStore = defineStore("salaryListStore", () => { name: "แบบ 2 กท รอบตุลาคม", }, { - id: "gov-06", + id: "go2", name: "แบบ 3 กท บัญชีแสดงวันลาครึ่งปี ขรก. ", }, {