Display the shifts in the application based on the employee

This commit is contained in:
younes 2025-06-24 15:07:30 +01:00
parent f1cd109908
commit d5d0c0651d
2 changed files with 2 additions and 0 deletions

View File

@ -251,6 +251,7 @@ class AuthenticationController(http.Controller):
dic['token'] = token
dic['is_approve'] = 'group_division_manager' in dic.get('groups',[])
dic['has_two_periods'] = not employee.resource_calendar_id.is_full_day if employee.resource_calendar_id else False
http_helper.cleanup()
end_time_pc = time.perf_counter()
execution_time_pc = end_time_pc - start_time_pc

View File

@ -69,6 +69,7 @@ class Users(models.Model):
d["employe_id"] = employee.id if employee and employee.id else None
d["attendance_status"] = attendance_status if attendance_status else None
d['is_approve'] = 'group_division_manager' in d.get('groups',[])
d['has_two_periods'] = not employee.resource_calendar_id.is_full_day if employee.resource_calendar_id else False
res.append(d)
return res[0] if single else res