Open Nayer-Sobhy opened 4 months ago
To resolve this issue, we should include a field called blocked
in the balance object response
. This field will indicate the blocked balance, providing the admin with the actual status of the user's balance. Additionally, we should implement a check on this field when users apply for a new vacation to ensure they address any pending requests first.
When the user applies for a vacation and it is still pending, the system does not remove/ block them from the balance. So if the user applied for another vacation or the admin checked the balance, it will show the balance without deducting the applied and not yet approved vacation. So can the system detect the pending vacation and block it from the balance till it's approved so it gets deducted or rejected then it's added again to the balance