Year Removed from employee section detail page #612 (#621)

* Year removed from birthday due to privacu issue of each employee and for maintaining integrity of each employee

* year removed from employee detail page of employees section
This commit is contained in:
Muhammad Shariq Shafiq
2025-03-21 10:49:08 +05:00
committed by GitHub
parent ab6584d889
commit aa4919562d
2 changed files with 7 additions and 1 deletions

View File

@@ -406,6 +406,12 @@ class Employee(models.Model):
badge_id = (f"({self.badge_id})") if self.badge_id is not None else ""
return f"{self.employee_first_name} {last_name} {badge_id}"
def get_employee_dob(self) -> any:
if self.dob:
return self.dob.strftime("%d %b")
return None
def check_online(self):
"""
This method is used to check if the user is in the list of online users.

View File

@@ -15,7 +15,7 @@
<span>{% trans "Date of Birth" %}</span>
</span>
<span
class="oh-profile__info-value dateformat_changer">{{employee.dob|default:_("None")}}</span>
class="oh-profile__info-value dateformat_changer">{{employee.get_employee_dob|default:_("None")}}</span>
</li>
<li class="oh-profile__card-info-item">