-
Notifications
You must be signed in to change notification settings - Fork 75
Optional holiday lapses #1727
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
Optional holiday lapses #1727
Conversation
leave_date: start_of_quarter..end_of_quarter, | ||
user:).count | ||
when :per_year | ||
total_optional_entries = optional_timeoff_entries.where(user:).count |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leave_date
should be filtered based on year
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are filtering optional_timeoff_entries from holidays and holidays are unique for each year. The entries are getting filtered based on the holiday year.
What
We can't apply for optional holiday more than the defined optional holidays. It will throw the following error message "You have exceeded the maximum number of permitted optional holidays". For example, if the admin defined one optional holiday for one quarter then the employee can apply for more than one optional holiday in the same quarter.
We can't apply for two holidays on the same day. It will throw the following error message "You are adding two holidays on the same day, please recheck".