File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -28,8 +28,21 @@ tasks.log()
2828 . then ( ( { frames, times} ) => {
2929 Object . keys ( frames ) . sort ( ) . forEach ( date => {
3030 if ( ! frames . hasOwnProperty ( date ) ) return ;
31+ let dayNote = "" ;
32+ let hpd = config . get ( 'hoursPerDay' ) ;
33+ if ( times [ date ] > hpd * 3600 * 2 )
34+ {
35+ dayNote = ` - worked over ${ hpd * 2 } hours` . red ;
36+ } else if ( times [ date ] > hpd * 3600 * 1.5 )
37+ {
38+ dayNote = ` - worked over ${ hpd * 1.5 } hours` . orange ;
39+ } else if ( times [ date ] > hpd * 3600 * 1.1 )
40+ {
41+ dayNote = ` - worked over ${ hpd * 1.1 } hours` . green ;
42+ }
43+
3144
32- console . log ( `${ moment ( date ) . format ( 'MMMM Do YYYY' ) } (${ toHumanReadable ( times [ date ] ) } )` . green ) ;
45+ console . log ( `${ moment ( date ) . format ( 'MMMM Do YYYY' ) } (${ toHumanReadable ( times [ date ] ) } )` . green + dayNote ) ;
3346 frames [ date ]
3447 . sort ( ( a , b ) => a . start . isBefore ( b . start ) ? - 1 : 1 )
3548 . forEach ( frame => {
You can’t perform that action at this time.
0 commit comments