Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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
Collaborator

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
Collaborator

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
Collaborator

@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
@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

3 participants