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

db: Add utility functions #775

Merged
merged 1 commit into from
Jan 17, 2024
Merged

db: Add utility functions #775

merged 1 commit into from
Jan 17, 2024

Conversation

dmtrek14
Copy link
Collaborator

  • Add functions to be used in calculation of yearly_expected_and_vacation for work summary

Each function is commented with purpose and any "gotchas" (such as needing to add a day in a date diff because one end isn't included). I decided to put the functions in their own folder because we are starting to get enough db infra to justify keeping track of these better. Eventually, I will also move the archiving function into this folder, as well. Having functions in their own files will allow us to more easily keep track of changes to them in source control.

Copy link
Member

@anarute anarute left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment on lines 40 to 41
* yearly_vacation_hours
* (capacity * 5 / company_fte_weekly::float)
Copy link
Member

Choose a reason for hiding this comment

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

Nit: I think the indentation is a bit off for these lines, it should be one tab more?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch - fixing!

- Add functions to be used in calculation of yearly_expected_and_vacation for work summary
@dmtrek14 dmtrek14 merged commit bccb653 into main Jan 17, 2024
2 checks passed
@dmtrek14 dmtrek14 deleted the summary-panel branch January 17, 2024 16:15
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.

2 participants