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

Feature/display billable hours #347

Open
wants to merge 22 commits into
base: develop
Choose a base branch
from

Conversation

timl07
Copy link
Contributor

@timl07 timl07 commented Sep 8, 2024

Checklist

  • I'm using the correct PHP Version (8.1 for current, 7.4 for legacy).
  • I've added comments to any new methods I've created or where else relevant.
  • I've replaced magic method usage on DbService classes with the getInstance() static method.
  • I've written any documentation for new features or where else relevant in the docs repo.

Description

Changelog

refs:
issues:

Other Information

Docs pull request:

Copy link
Contributor

Choose a reason for hiding this comment

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

would it be possible to have getTotalTimeByTimeType return a map of timetypes to total minutes, as opposed to formatted hour/minute strings? this would make the maths of adding things up a lot easier in getTotalTimeByBillable, make things a bit more readable?

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 move all the style="..."s and the <style> block into SCSS, for consistency?

$time_totals = $this->getTotalTimeByTimeType($task_id);
$time_totals_in_seconds = [];
foreach ($time_totals as $time_total) {
$time_totals_in_seconds[] = strtotime("1970-01-01 $time_total UTC");
Copy link
Contributor

Choose a reason for hiding this comment

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

is there any other way to do this? DateTime perhaps? https://www.php.net/manual/en/class.datetime.php

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