File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -175,6 +175,7 @@ const reporthelper = function () {
175175 results . forEach ( ( result ) => {
176176 // create Array(4) to hold totalSeconds for each week
177177 result . totalSeconds = [ 0 , 0 , 0 , 0 ] ;
178+ result . totalTangibleSeconds = [ 0 , 0 , 0 , 0 ] ;
178179
179180 if ( ! result . timeEntries || result . timeEntries . length === 0 ) return ;
180181 const isSingleWeekRequest = startWeekIndex === endWeekIndex ;
@@ -192,12 +193,20 @@ const reporthelper = function () {
192193 if ( index >= 0 && index < 4 ) {
193194 result . totalSeconds [ index ] =
194195 ( result . totalSeconds [ index ] || 0 ) + ( entry . totalSeconds || 0 ) ;
196+ if ( entry . isTangible ) {
197+ result . totalTangibleSeconds [ index ] =
198+ ( result . totalTangibleSeconds [ index ] || 0 ) + ( entry . totalSeconds || 0 ) ;
199+ }
195200 }
196201 } ) ;
197202
198203 result . totalSeconds = result . totalSeconds . map ( ( seconds ) =>
199204 seconds === 0 ? undefined : seconds ,
200205 ) ;
206+ result . totalTangibleSeconds = result . totalTangibleSeconds . map ( ( seconds ) =>
207+ seconds === 0 ? undefined : seconds ,
208+ ) ;
209+
201210 if ( result . endDate ) {
202211 result . finalWeekIndex = absoluteDifferenceInWeeks ( result . endDate , pstEnd ) ;
203212 } else {
You can’t perform that action at this time.
0 commit comments