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

v1.GetTimeOffsMapped(): function to get time-offs with accurate times #49

Merged
merged 1 commit into from Mar 26, 2024

Conversation

lyind
Copy link
Contributor

@lyind lyind commented Mar 17, 2024

Towards https://github.com/giantswarm/giantswarm/issues/30269

Summary

This PR adds a function v1.GetTimeOffsMapped() which adds a level on top of the v1.GetTimeOffs() API, maps the embedded half-day/daycount fields to times and filters the TimeOff objects by the given certain time range.

This is added as a utility function, because the logic to parse v1.TimeOff objects "half-day" related fields isn't straight-forward.

@lyind lyind self-assigned this Mar 17, 2024
@lyind lyind requested a review from a team as a code owner March 17, 2024 22:23
@lyind lyind requested a review from mproffitt March 17, 2024 22:23
@lyind lyind marked this pull request as draft March 17, 2024 22:59
@lyind
Copy link
Contributor Author

lyind commented Mar 17, 2024

Draft: I may put the filtering into a separate v1.GetTimeOffsMapped() function, mainly to avoid a circular import.

@lyind lyind changed the title util.FilterTimeOffs(): function to filter timeOffs v1.GetTimeOffsMapped(): function to get time-offs with accurate times Mar 21, 2024
@lyind lyind marked this pull request as ready for review March 25, 2024 17:03
@lyind lyind marked this pull request as draft March 25, 2024 17:08
@lyind lyind marked this pull request as ready for review March 25, 2024 17:13
@lyind lyind merged commit f3021da into main Mar 26, 2024
2 checks passed
@lyind lyind deleted the filter-timeoffs branch March 26, 2024 10:08
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.

None yet

1 participant