-
Notifications
You must be signed in to change notification settings - Fork 13
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
LABX-379 Fix time calculation #171
base: develop
Are you sure you want to change the base?
LABX-379 Fix time calculation #171
Conversation
this.workedTimeRender = this.workedTimeRender.bind(this) | ||
this.progressIcon = this.progressIcon.bind(this) | ||
this.handleComplete = this.handleComplete.bind(this) | ||
this.handlePausePlayClick = this.handlePausePlayClick.bind(this) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of bind(this) use arrow function method
/> | ||
) | ||
} | ||
|
||
oneSecondInterv () { | ||
const { job } = this.props | ||
const pausedFor = get(job, "pausedFor") * 1000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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`} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
http://test.laborx.io/worker-to-do.html
no 'total pause time' in mock up
There are problems with the travis, it loads the wrong version for verification |
No description provided.