[UPDT] BASE: Method to get subordinates of reporting manager
This commit is contained in:
@@ -858,6 +858,17 @@ def get_next_month_same_date(date_obj):
|
|||||||
return date(day=day, month=month, year=year)
|
return date(day=day, month=month, year=year)
|
||||||
|
|
||||||
|
|
||||||
|
def get_subordinates(request):
|
||||||
|
"""
|
||||||
|
This method is used to filter out subordinates queryset element.
|
||||||
|
"""
|
||||||
|
user = request.user.employee_get
|
||||||
|
subordinates = Employee.objects.filter(
|
||||||
|
employee_work_info__reporting_manager_id=user
|
||||||
|
)
|
||||||
|
return subordinates
|
||||||
|
|
||||||
|
|
||||||
def format_date(date_str):
|
def format_date(date_str):
|
||||||
# List of possible date formats to try
|
# List of possible date formats to try
|
||||||
|
|
||||||
|
|||||||
@@ -150,6 +150,7 @@ sidebar_urls = [
|
|||||||
"check-in-check-out-setting",
|
"check-in-check-out-setting",
|
||||||
"user-accessibility",
|
"user-accessibility",
|
||||||
"asset-batch-view",
|
"asset-batch-view",
|
||||||
|
"task-all",
|
||||||
]
|
]
|
||||||
remove_urls = [
|
remove_urls = [
|
||||||
"feedback-detailed-view",
|
"feedback-detailed-view",
|
||||||
|
|||||||
Reference in New Issue
Block a user