File tree Expand file tree Collapse file tree
src/app/component/circular-heatmap Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ export class CircularHeatmapComponent implements OnInit {
8383 if ( lvlOfCurrentTask == l + 1 ) {
8484 totalTasks += 1
8585 var nameOfTask :string = allTaskInThisSubDimension [ k ]
86- var Status :boolean = true // this.YamlObject['dimension'][x]['subdimension']['level-'+(l+1)][i ]['isImplemented']
86+ var Status :boolean = this . YamlObject [ allDimensionNames [ i ] ] [ allSubDimensionInThisDimension [ j ] ] [ allTaskInThisSubDimension [ k ] ] [ 'isImplemented' ]
8787 if ( Status ) {
8888 totalImplemented += 1
8989 }
@@ -131,13 +131,17 @@ export class CircularHeatmapComponent implements OnInit {
131131 cnt += 1
132132 }
133133 }
134- for ( var i = 0 ; i < this . YamlObject [ 'dimension' ] . length ; i ++ ) {
135- if ( this . YamlObject [ 'dimension' ] [ i ] [ 'subdimension' ] [ 'name' ] === this . cardHeader ) {
136- var lvlString = this . cardSubheader . toLowerCase ( ) . replace ( " " , "-" )
137- this . YamlObject [ 'dimension' ] [ i ] [ 'subdimension' ] [ lvlString ] [ taskIndex ] [ "isImplemented" ] = this . ALL_CARD_DATA [ index ] [ "Task" ] [ i ] [ "ifTaskDone" ]
138- break
134+ var allDimensionNames = Object . keys ( this . YamlObject )
135+ for ( var i = 0 ; i < allDimensionNames . length ; i ++ ) {
136+ var allSubDimensionInThisDimension = Object . keys ( this . YamlObject [ allDimensionNames [ i ] ] )
137+ for ( var j = 0 ; j < allSubDimensionInThisDimension . length ; j ++ ) {
138+ if ( allSubDimensionInThisDimension [ j ] == this . cardHeader ) {
139+ var taskName = this . ALL_CARD_DATA [ index ] [ "Task" ] [ taskIndex ] [ "taskName" ]
140+ console . log ( taskName )
141+ this . YamlObject [ allDimensionNames [ i ] ] [ allSubDimensionInThisDimension [ j ] ] [ taskName ] [ "isImplemented" ] = this . ALL_CARD_DATA [ index ] [ "Task" ] [ taskIndex ] [ "ifTaskDone" ]
142+ break
143+ }
139144 }
140-
141145 }
142146 this . ALL_CARD_DATA [ index ] [ 'Done%' ] = cnt / this . ALL_CARD_DATA [ index ] [ "Task" ] . length
143147 //console.log(this.data[index]['Done%'],cnt)
You can’t perform that action at this time.
0 commit comments