Merge pull request #3625 from expsa/kch_dev_odex25_mobile

Display the shifts in the application based on the employee
This commit is contained in:
kchyounes19 2025-06-24 15:08:59 +01:00 committed by GitHub
commit 5a0244214b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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