-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Time Off App - Denied Time off still subtracts from total #131
Comments
Seems as though I posted too soon - I kept messing around with it and appear to have figured something out that seems to be working. I added an "if" statement. I'm not sure if this is going to cause other issues that I haven't ran into yet, but updated code is below... and after some quick testing, it doens't seem to be updating the time off balance any longer if a request is rejected.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
As an "approver" when you "Decline" someone's request, the totals are still being updated to reflect the denied request as if it were approved, subtracting from the "AllottedTimeOff" Total.
To Reproduce
Expected behavior
A clear and concise description of what you expected to happen.
Additional context
The code used to update the balances is as follows. It doesn't seem to differentiate between "Approved, Denied" in any way. I am not sure how to modify it to do such a thing.
Patch( TimeOffBalances, LookUp( TimeOffBalances, Employee.Email = selectedItem.'Created By'.Email && TimeOffType.Value = selectedItem.TimeOffType.Value ), { RequestedTimeOff: LookUp( TimeOffBalances, Employee.Email = selectedItem.'Created By'.Email && TimeOffType.Value = selectedItem.TimeOffType.Value ).RequestedTimeOff + selectedItem.Days } );
The text was updated successfully, but these errors were encountered: