Merge pull request #685 from expsa/fix_api_web

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

View File

@ -134,8 +134,15 @@ class LeaveController(http.Controller):
li = []
if balance:
for s in balance:
value = {'id': s.id, 'name': s.holiday_status_id.name or "", 'total': s.leave_balance,
'remain': s.remaining_leaves, 'taken': s.leaves_taken, }
value = {
"id": s.id,
"name": s.holiday_status_id.name or "",
# "total": s.leave_balance,
# "remain": s.remaining_leaves,
"remain": s.leave_balance,
"total": s.remaining_leaves,
"taken": s.leaves_taken,
}
li.append(value)
leaves = []
if holidays: