From a2b705603c377e60bad06fc2c7952b30db9bc770 Mon Sep 17 00:00:00 2001 From: Horilla Date: Wed, 14 Aug 2024 22:18:46 +0530 Subject: [PATCH] [FIX] DASHBOARD: Fixed dashboard birthday design --- employee/static/dashboard/getBirthday.js | 24 ++++++++++++------------ employee/views.py | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/employee/static/dashboard/getBirthday.js b/employee/static/dashboard/getBirthday.js index bcc2a4ba9..a31231689 100644 --- a/employee/static/dashboard/getBirthday.js +++ b/employee/static/dashboard/getBirthday.js @@ -4,7 +4,7 @@ function upcomingBirthdays(response) { birthdays = response.birthdays; for (let index = 0; index < birthdays.length; index++) { activeDotClass = ""; - const element = birthdays[index]; + let element = birthdays[index]; if (index == 0) { activeDotClass = "oh-dashboard__events-nav-item--active"; } @@ -15,17 +15,17 @@ function upcomingBirthdays(response) { container.append(`
-
- -
-
+
+ +
+
Birthday ${element.name} ${element.dob}, ${element.daysUntilBirthday} diff --git a/employee/views.py b/employee/views.py index 50bd6d29d..7dd9a9275 100755 --- a/employee/views.py +++ b/employee/views.py @@ -2900,7 +2900,7 @@ def get_employees_birthday(_): else: days_till_birthday = f"In {days_till_birthday} Days" try: - path = emp.employee_profile.url + path = emp.get_avatar() except: path = f"https://ui-avatars.com/api/?\ name={emp.employee_first_name}+{emp.employee_last_name}&background=random"