Refactoring code 09_leave

This commit is contained in:
STW_TTTY\stwtt 2024-09-18 17:26:53 +07:00
parent d20fdb0190
commit 94eb31fc26
27 changed files with 289 additions and 577 deletions

View file

@ -18,4 +18,32 @@ interface DataDateMonthObject {
month: number;
year: number;
}
export type { ListData, DataDateMonthObject };
interface DetailData {
id: string;
fullName: string;
createdAt: string;
checkDate: string;
checkInEdit: boolean;
checkOutEdit: boolean;
checkInTime: string;
checkOutTime: string;
checkInStatus: string;
checkOutStatus: string;
startTimeMorning: string;
endTimeMorning: string;
startTimeAfternoon: string;
endTimeAfternoon: string;
reason: string;
status: string;
description: string;
statusSort: number;
}
interface Pagination {
sortBy: string | null;
descending: boolean;
page: number;
rowsPerPage: number;
}
export type { ListData, DataDateMonthObject,DetailData,Pagination };

View file

@ -26,13 +26,25 @@ interface dataRowChangeRoundHistory {
reson: string | null;
}
interface historyShow {
round: number;
startTimeMorning: string;
leaveTimeAfternoon: string;
time: string;
effectiveDate: string | null;
reson: string | null;
effectiveDate: string;
reson: string;
}
interface DataInterface {
round: number;
startTimeMorning: string;
leaveTimeAfternoon: string;
effectiveDate: Date; // ใช้ Date แทน string หากต้องการแปลงเป็น Date object
remark: string;
}
export type {
changeShow,
dataRowChangeRound,
dataRowChangeRoundHistory,
historyShow,
DataInterface
};