Skip to content
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

View public holiday and optional holiday cards on leave management #1753

Merged
merged 8 commits into from
Mar 22, 2024

Conversation

prasanthchaduvula
Copy link
Contributor

Closes #1735

What

  • Fixed the time tracking bug if leaves are not defined for the year.
  • Calculate optional holiday timeoff entries using the service.
  • Updated leave balance API with optional and national holiday timeoff entries.
  • View national and optional holiday cards on leave management and click on those cards to view the applied holidays respectively.

@nisusam
Copy link
Contributor

nisusam commented Mar 22, 2024

Can you please fix the specs @prasanthchaduvula ?

Comment on lines +16 to +29
json.optional_timeoff_entries optional_timeoff_entries do |timeoff_entry|
json.id timeoff_entry.id
json.duration timeoff_entry.duration
json.leave_date CompanyDateFormattingService.new(timeoff_entry.leave_date, company: current_company).process
json.holiday_info timeoff_entry.holiday_info if timeoff_entry.holiday_info.present?
json.type timeoff_entry.holiday_info.present? ? "holiday" : "leave"
end

json.national_timeoff_entries national_timeoff_entries do |timeoff_entry|
json.id timeoff_entry.id
json.duration timeoff_entry.duration
json.leave_date CompanyDateFormattingService.new(timeoff_entry.leave_date, company: current_company).process
json.holiday_info timeoff_entry.holiday_info if timeoff_entry.holiday_info.present?
json.type timeoff_entry.holiday_info.present? ? "holiday" : "leave"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we send timeoff_type as national or optional?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, as we need two different arrays on client side and if we make it into one array with timeoff_type as national or optional then we have to filter on client side.

Copy link
Contributor

@nisusam nisusam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the failing specs

@prasanthchaduvula prasanthchaduvula merged commit cbd8405 into develop Mar 22, 2024
1 check passed
@prasanthchaduvula prasanthchaduvula deleted the 1735-holidays-cards-on-leave-management branch March 22, 2024 15:31
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.

Show public holiday and optional holiday cards on leave management
2 participants