8000 Optional holiday lapses by prasanthchaduvula · Pull Request #1727 · saeloun/miru-web · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 10 commits into from
Mar 20, 2024
Merged

Optional holiday lapses #1727

merged 10 commits into from
Mar 20, 2024

Conversation

prasanthchaduvula
Copy link
Contributor

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".

leave_date: start_of_quarter..end_of_quarter,
user:).count
when :per_year
total_optional_entries = optional_timeoff_entries.where(user:).count
Copy link
Collaborator

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

Copy link
Contributor Author

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.

@prasanthchaduvula prasanthchaduvula merged commit d7f57fb into develop Mar 20, 2024
@prasanthchaduvula prasanthchaduvula deleted the optional-holidays-lapses branch March 20, 2024 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0