small refactor timeControl index
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
26c9e54663
commit
25684ec521
|
@ -1,7 +1,6 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import getBrowser from '../../helpers/puppeteer';
|
||||
|
||||
// missing full run validation
|
||||
describe('Worker time control path', () => {
|
||||
let browser;
|
||||
let page;
|
||||
|
|
|
@ -203,8 +203,6 @@ class Controller extends Section {
|
|||
}
|
||||
|
||||
set weekTotalHours(totalHours) {
|
||||
if (!totalHours) return this._weekTotalHours = this.formatHours(0);
|
||||
|
||||
this._weekTotalHours = this.formatHours(totalHours);
|
||||
}
|
||||
|
||||
|
@ -212,9 +210,7 @@ class Controller extends Section {
|
|||
return this._weekTotalHours;
|
||||
}
|
||||
|
||||
formatHours(timestamp) {
|
||||
timestamp = timestamp || 0;
|
||||
|
||||
formatHours(timestamp = 0) {
|
||||
let hour = Math.floor(timestamp / 3600);
|
||||
let min = Math.floor(timestamp / 60 - 60 * hour);
|
||||
|
||||
|
|
Loading…
Reference in New Issue