diff --git a/api/src/services/db/loaService.ts b/api/src/services/db/loaService.ts index d6a9c40..b7131bf 100644 --- a/api/src/services/db/loaService.ts +++ b/api/src/services/db/loaService.ts @@ -69,7 +69,7 @@ export async function getUserActiveLOA(userId: number): Promise { FROM leave_of_absences WHERE member_id = ? AND closed IS NULL - AND UTC_TIMESTAMP() BETWEEN start_date AND end_date;` + AND UTC_TIMESTAMP() > start_date;` const LOAData = await pool.query(sql, [userId]); return LOAData; } diff --git a/ui/src/App.vue b/ui/src/App.vue index 7e208d0..82bfe12 100644 --- a/ui/src/App.vue +++ b/ui/src/App.vue @@ -36,8 +36,12 @@ const version = import.meta.env.VITE_APPLICATION_VERSION; -

You are on LOA until {{ formatDate(userStore.user?.LOAs?.[0].extended_till || - userStore.user?.LOAs?.[0].end_date) }}

+

+ LOA until {{ formatDate(userStore.user?.LOAs?.[0].extended_till || userStore.user?.LOAs?.[0].end_date) }} +

+

+ LOA expired on {{ formatDate(userStore.user?.LOAs?.[0].extended_till || userStore.user?.LOAs?.[0].end_date) }} +