Skip to content

Conversation

@Angeluz-07
Copy link
Contributor

fixes #464

@codecov
Copy link

codecov bot commented Jul 9, 2020

Codecov Report

Merging #468 into master will decrease coverage by 0.27%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #468      +/-   ##
==========================================
- Coverage   89.74%   89.46%   -0.28%     
==========================================
  Files          72       72              
  Lines        1316     1319       +3     
  Branches       89       90       +1     
==========================================
- Hits         1181     1180       -1     
- Misses        105      109       +4     
  Partials       30       30              
Impacted Files Coverage Δ
...ponents/details-fields/details-fields.component.ts 86.56% <100.00%> (ø)
...project-list-hover/project-list-hover.component.ts 86.84% <100.00%> (+1.12%) ⬆️
src/app/modules/time-clock/store/entry.effects.ts 46.83% <100.00%> (ø)
...modules/shared/components/clock/clock.component.ts 58.33% <0.00%> (-33.34%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 927eb32...d922cbb. Read the comment docs.

return new actions.CreateEntry({ project_id: action.idProjectSwitching, start_date: stopDateForEntry.toISOString() });
return new actions.CreateEntry({
project_id: action.idProjectSwitching,
start_date: stopDateForEntry.toISOString(),
Copy link
Contributor

Choose a reason for hiding this comment

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

I know this is not your change, but it seems something is wrong here:
start_date: stopDateForEntry.toISOString(),

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has to do with the logic of clocking out, when switching a project. The stopDate of the entry being clocked out is the startDate of the new time-entry.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep, I get what you mean. In that case I would change line 23 to this:
const newTimeEntryStartDate = stopDateForEntry.setSeconds(stopDateForEntry.getSeconds() + 1 );
and line 26 to:
start_date: newTimeEntryStartDate.toISOString(),

In that way, it is easier to read.

@Angeluz-07 Angeluz-07 merged commit e6f4748 into master Jul 13, 2020
@Angeluz-07 Angeluz-07 deleted the 464-add-timezone-offset-to-time-entry branch July 13, 2020 15:00
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.

Send timezone_offset when time_entries are being created/updated

4 participants