LABX-379 Fix time calculation#171
Open
alanhanaev wants to merge 5 commits intoChrono-Tech:developfrom
Open
Conversation
added 2 commits
August 3, 2018 23:40
sargonpiraev
requested changes
Aug 10, 2018
| this.workedTimeRender = this.workedTimeRender.bind(this) | ||
| this.progressIcon = this.progressIcon.bind(this) | ||
| this.handleComplete = this.handleComplete.bind(this) | ||
| this.handlePausePlayClick = this.handlePausePlayClick.bind(this) |
Collaborator
There was a problem hiding this comment.
please remove all bind(this)
replace it with arrow function method
| componentDidMount () { | ||
| const { job } = this.props | ||
| if (job.state === JOB_STATE_STARTED) { | ||
| this.intervalRef = setInterval(this.oneSecondInterv.bind(this), 1000) |
Collaborator
There was a problem hiding this comment.
instead of bind(this) use arrow function method
|
|
||
| oneSecondInterv () { | ||
| const { job } = this.props | ||
| const pausedFor = get(job, "pausedFor") * 1000 |
Collaborator
There was a problem hiding this comment.
this usage of get function is redundunt
just use plain dot notation job.property
|
|
||
| if (job.paused && job.state === JOB_STATE_STARTED) { | ||
| const now = Date.now() | ||
| const pausedAt = get(job, "pausedAt").getTime() |
Collaborator
There was a problem hiding this comment.
this usage of get function is redundunt
just use plain dot notation job.property
| return ( | ||
| <p> | ||
| <span className={css.medium}> | ||
| {`${this.getDurationString(this.state.pausedTime)} total pause time`} |
Collaborator
There was a problem hiding this comment.
http://test.laborx.io/worker-to-do.html
no 'total pause time' in mock up
Contributor
Author
|
There are problems with the travis, it loads the wrong version for verification |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.