Merge pull request #682 from expsa/fix_api_web

[IMP] repalce file data api
This commit is contained in:
AbuzarExp 2024-08-13 12:04:00 +03:00 committed by GitHub
commit 72c22684ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 2 deletions

View File

@ -407,8 +407,15 @@ class LeaveController(http.Controller):
li = []
if balance:
for s in balance:
value = {'id': s.id, 'name': s.name or "", 'total': s.leave_balance,
'remain': s.remaining_leaves, 'taken': s.leaves_taken, }
value = {
"id": s.id,
"name": s.name or "",
# "total": s.leave_balance, repacel this in new relase
# "remain": s.remaining_leaves, repacel this in new relase
"remain": s.leave_balance,
"total": s.remaining_leaves,
"taken": s.leaves_taken,
}
li.append(value)
data = {'system_leaves': li, }
return http_helper.response(message="Data Found", data=data)