diff --git a/src/modules/09_leave/components/07_LeaveHistory/DialogForm.vue b/src/modules/09_leave/components/07_LeaveHistory/DialogForm.vue
index 19d468cec..b33009b20 100644
--- a/src/modules/09_leave/components/07_LeaveHistory/DialogForm.vue
+++ b/src/modules/09_leave/components/07_LeaveHistory/DialogForm.vue
@@ -265,7 +265,6 @@ watch(modal, async (val) => {
await Promise.all([
filterLeaveTypeData(),
isStatusEdit.value && defineDataLeaveBeginning(rowData.value),
- console.log(rowData.value),
]);
} finally {
hideLoader();
@@ -463,6 +462,7 @@ watch(modal, async (val) => {
outlined
label="จำนวนสิทธิ์การลา"
hide-bottom-space
+ :rules="[(val: string) => !val || /^\d+(\.\d*)?$/.test(val) || 'กรุณากรอกเฉพาะตัวเลข']"
/>
@@ -473,8 +473,7 @@ watch(modal, async (val) => {
outlined
label="ที่ใช้ไป (วัน)"
hide-bottom-space
- mask="#"
- reverse-fill-mask
+ :rules="[(val: string) => !val || /^\d+(\.\d*)?$/.test(val) || 'กรุณากรอกเฉพาะตัวเลข']"
/>
@@ -498,8 +497,7 @@ watch(modal, async (val) => {
outlined
label="ยกมา (วัน)"
hide-bottom-space
- mask="#"
- reverse-fill-mask
+ :rules="[(val: string) => !val || /^\d+(\.\d*)?$/.test(val) || 'กรุณากรอกเฉพาะตัวเลข']"
/>
diff --git a/src/modules/09_leave/interface/request/changeRound.ts b/src/modules/09_leave/interface/request/changeRound.ts
index ed8c9347a..7dfc20841 100644
--- a/src/modules/09_leave/interface/request/changeRound.ts
+++ b/src/modules/09_leave/interface/request/changeRound.ts
@@ -4,6 +4,8 @@ interface DataPost {
lastName: string;
page: number;
pageSize: number;
+ selectedNodeId: string | null;
+ selectedNode: string;
}
interface DataOption {
diff --git a/src/modules/09_leave/interface/request/work.ts b/src/modules/09_leave/interface/request/work.ts
index e69de29bb..c448c9fc9 100644
--- a/src/modules/09_leave/interface/request/work.ts
+++ b/src/modules/09_leave/interface/request/work.ts
@@ -0,0 +1,6 @@
+interface FormDataProcess {
+ startDate: Date | null;
+ endDate: Date | null;
+}
+
+export type { FormDataProcess };
diff --git a/src/modules/09_leave/interface/response/work.ts b/src/modules/09_leave/interface/response/work.ts
index 41df27b5f..af055b794 100644
--- a/src/modules/09_leave/interface/response/work.ts
+++ b/src/modules/09_leave/interface/response/work.ts
@@ -85,4 +85,24 @@ interface FormDetail {
checkInLocationName: string;
checkOutLocationName: string;
}
-export type { TableRows, DataResLog, DataResTime, TableRowsTime, FormDetail };
+
+interface DataProcess {
+ id: string;
+ createdFullName: string;
+ createdAt: Date | null;
+ status: string;
+ startDate: Date | null;
+ endDate: Date | null;
+ processingDate: Date | null;
+ completedDate: Date | null;
+ errorMessage: string | null;
+}
+
+export type {
+ TableRows,
+ DataResLog,
+ DataResTime,
+ TableRowsTime,
+ FormDetail,
+ DataProcess,
+};
diff --git a/src/modules/09_leave/stores/ChangeRoundStore.ts b/src/modules/09_leave/stores/ChangeRoundStore.ts
index eda800a4f..8914ebd4f 100644
--- a/src/modules/09_leave/stores/ChangeRoundStore.ts
+++ b/src/modules/09_leave/stores/ChangeRoundStore.ts
@@ -125,7 +125,7 @@ export const useChangeRoundDataStore = defineStore(
async function fetchDataForCardId(dataDetail: any, type?: string) {
if (dataDetail) {
- showLoader();
+ // showLoader();
const url =
type && type == "emp"
? config.API.leaveSearchEMP()
@@ -138,6 +138,8 @@ export const useChangeRoundDataStore = defineStore(
page: dataDetail.page, //หน้า
pageSize: dataDetail.pageSize || 10, //จำนวนแถวต่อหน้า
keyword: dataDetail.keyword || "", //keyword ค้นหา
+ selectedNodeId: dataDetail.selectedNodeId, //id ต้นไม้ที่เลือก
+ selectedNode: dataDetail.selectedNode, //ระดับต้นไม้ที่เลือก
})
.then((res) => {
const apiData = res.data.result.data;
@@ -148,6 +150,7 @@ export const useChangeRoundDataStore = defineStore(
if (apiData.length > 0) {
checkCilck.value = false;
rows.value = apiData.map((e: any) => ({
+ ...e,
profileId: e.profileId,
cardId: e.citizenId,
fullName: e.fullName,
@@ -167,7 +170,7 @@ export const useChangeRoundDataStore = defineStore(
console.log(e);
})
.finally(() => {
- hideLoader();
+ // hideLoader();
});
}
}
diff --git a/src/modules/09_leave/views/02_WorkingMain.vue b/src/modules/09_leave/views/02_WorkingMain.vue
index 99387a4bb..fed615baf 100644
--- a/src/modules/09_leave/views/02_WorkingMain.vue
+++ b/src/modules/09_leave/views/02_WorkingMain.vue
@@ -1,15 +1,26 @@
@@ -30,6 +41,12 @@ const { tabs } = toRefs(stores);
>
+
+
@@ -42,6 +59,9 @@ const { tabs } = toRefs(stores);
+
+
+
diff --git a/src/modules/09_leave/views/03_ChangeRoundMain.vue b/src/modules/09_leave/views/03_ChangeRoundMain.vue
index fdb7433d5..5bbb76fc5 100644
--- a/src/modules/09_leave/views/03_ChangeRoundMain.vue
+++ b/src/modules/09_leave/views/03_ChangeRoundMain.vue
@@ -1,5 +1,5 @@