fix issue #860 : ระบบทะเบียนประวัติ(ลูกจ้าง) เข้าแท็บเมนูข้อมูลข้าราชการ Error

This commit is contained in:
Bright 2024-12-12 17:44:57 +07:00
parent 942c88a961
commit 6768a265de
2 changed files with 2 additions and 1 deletions

View file

@ -92,7 +92,7 @@ export async function calculateGovAge(profileId: string, type: string) {
}
})
// const firstStartDate = new Date(records[0].date);
const firstStartDate = profile?.dateAppoint;
const firstStartDate = profile?.dateAppoint ? profile?.dateAppoint : new Date();
const firstEndDate = endDateFristRec ? new Date(endDateFristRec.dateGovernment) : new Date();
const {