* 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:
committed by
GitHub
parent
ab6584d889
commit
aa4919562d
@@ -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.
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user