Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ export class CircularHeatmapComponent implements OnInit {
.append('svg')
.attr('width', '60%') // 70% forces the heatmap down
.attr('height', 'auto')
.attr('viewBox', '0 0 1150 1150')
.attr('viewBox', '0 0 1150 1150')
.append('g')
.attr(
'transform',
Expand Down
2 changes: 1 addition & 1 deletion src/app/component/mapping/mapping.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@
</ng-container>
</td>
<td *ngFor="let key of allTeams">
<ng-container>
<ng-container *ngIf="item.teamImplementation">
{{ item.teamImplementation[key] }}
</ng-container>
</td>
Expand Down
144 changes: 82 additions & 62 deletions src/app/component/mapping/mapping.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,18 @@ export class MappingComponent implements OnInit {
]
);
for (let a = 0; a < activityInCurrentSubDimension.length; a++) {
if (a == 0) {
this.allTeams = Object.keys(
if (!this.allTeams || this.allTeams.length == 0) {
if (
this.YamlObject[this.allDimensionNames[i]][
subdimensionsInCurrentDimension[j]
][activityInCurrentSubDimension[a]]['teamsImplemented']
);
) {
this.allTeams = Object.keys(
this.YamlObject[this.allDimensionNames[i]][
subdimensionsInCurrentDimension[j]
][activityInCurrentSubDimension[a]]['teamsImplemented']
);
}
}
this.setValueandAppendToDatasetSortedbyActivity(
this.allDimensionNames[i],
Expand Down Expand Up @@ -247,26 +253,31 @@ export class MappingComponent implements OnInit {
ISO22: ISO22Array,
samm2: '',
};
if (SAMMArray.length == 0) {
this.allMappingDataSortedBySAMM.push(this.temporaryMappingElement);
if (this.YamlObject[dim][subDim][activity]['isImplemented']) {
this.performedMappingDataSortedBySAMM.push(
this.temporaryMappingElement
);
} else {
this.plannedMappingDataSortedBySAMM.push(this.temporaryMappingElement);

if (SAMMArray) {
if (SAMMArray.length == 0) {
this.allMappingDataSortedBySAMM.push(this.temporaryMappingElement);
if (this.YamlObject[dim][subDim][activity]['isImplemented']) {
this.performedMappingDataSortedBySAMM.push(
this.temporaryMappingElement
);
} else {
this.plannedMappingDataSortedBySAMM.push(
this.temporaryMappingElement
);
}
}
}
for (var i = 0; i < SAMMArray.length; i++) {
const newTempElement = JSON.parse(
JSON.stringify(this.temporaryMappingElement)
);
newTempElement['samm2'] = SAMMArray[i];
this.allMappingDataSortedBySAMM.push(newTempElement);
if (this.YamlObject[dim][subDim][activity]['isImplemented']) {
this.performedMappingDataSortedBySAMM.push(newTempElement);
} else {
this.plannedMappingDataSortedBySAMM.push(newTempElement);
for (var i = 0; i < SAMMArray.length; i++) {
const newTempElement = JSON.parse(
JSON.stringify(this.temporaryMappingElement)
);
newTempElement['samm2'] = SAMMArray[i];
this.allMappingDataSortedBySAMM.push(newTempElement);
if (this.YamlObject[dim][subDim][activity]['isImplemented']) {
this.performedMappingDataSortedBySAMM.push(newTempElement);
} else {
this.plannedMappingDataSortedBySAMM.push(newTempElement);
}
}
}
//sorting by descending order
Expand Down Expand Up @@ -372,27 +383,31 @@ export class MappingComponent implements OnInit {
};

console.log(this.temporaryMappingElement);
if (ISOArray.length == 0) {
this.allMappingDataSortedByISO17.push(this.temporaryMappingElement);
if (this.YamlObject[dim][subDim][activity]['isImplemented']) {
this.performedMappingDataSortedByISO17.push(
this.temporaryMappingElement
);
} else {
this.plannedMappingDataSortedByISO17.push(this.temporaryMappingElement);
if (ISOArray) {
if (ISOArray.length == 0) {
this.allMappingDataSortedByISO17.push(this.temporaryMappingElement);
if (this.YamlObject[dim][subDim][activity]['isImplemented']) {
this.performedMappingDataSortedByISO17.push(
this.temporaryMappingElement
);
} else {
this.plannedMappingDataSortedByISO17.push(
this.temporaryMappingElement
);
}
}
}
for (var i = 0; i < ISOArray.length; i++) {
const newTempElement = JSON.parse(
JSON.stringify(this.temporaryMappingElement)
);
newTempElement['ISO17'] = ISOArray[i];
//console.log(newTempElement);
this.allMappingDataSortedByISO17.push(newTempElement);
if (this.YamlObject[dim][subDim][activity]['isImplemented']) {
this.performedMappingDataSortedByISO17.push(newTempElement);
} else {
this.plannedMappingDataSortedByISO17.push(newTempElement);
for (var i = 0; i < ISOArray.length; i++) {
const newTempElement = JSON.parse(
JSON.stringify(this.temporaryMappingElement)
);
newTempElement['ISO17'] = ISOArray[i];
//console.log(newTempElement);
this.allMappingDataSortedByISO17.push(newTempElement);
if (this.YamlObject[dim][subDim][activity]['isImplemented']) {
this.performedMappingDataSortedByISO17.push(newTempElement);
} else {
this.plannedMappingDataSortedByISO17.push(newTempElement);
}
}
}
//sorting by descending order
Expand Down Expand Up @@ -429,27 +444,32 @@ export class MappingComponent implements OnInit {
ISO22: '',
samm2: SAMMArray,
};
if (ISO22Array.length == 0) {
this.allMappingDataSortedByISO22.push(this.temporaryMappingElement);
if (this.YamlObject[dim][subDim][activity]['isImplemented']) {
this.performedMappingDataSortedByISO22.push(
this.temporaryMappingElement
);
} else {
this.plannedMappingDataSortedByISO22.push(this.temporaryMappingElement);

if (ISO22Array) {
if (ISO22Array.length == 0) {
this.allMappingDataSortedByISO22.push(this.temporaryMappingElement);
if (this.YamlObject[dim][subDim][activity]['isImplemented']) {
this.performedMappingDataSortedByISO22.push(
this.temporaryMappingElement
);
} else {
this.plannedMappingDataSortedByISO22.push(
this.temporaryMappingElement
);
}
}
}
for (var i = 0; i < ISO22Array.length; i++) {
const newTempElement = JSON.parse(
JSON.stringify(this.temporaryMappingElement)
);
newTempElement['ISO22'] = ISO22Array[i];
//console.log(newTempElement);
this.allMappingDataSortedByISO22.push(newTempElement);
if (this.YamlObject[dim][subDim][activity]['isImplemented']) {
this.performedMappingDataSortedByISO22.push(newTempElement);
} else {
this.plannedMappingDataSortedByISO22.push(newTempElement);
for (var i = 0; i < ISO22Array.length; i++) {
const newTempElement = JSON.parse(
JSON.stringify(this.temporaryMappingElement)
);
newTempElement['ISO22'] = ISO22Array[i];
//console.log(newTempElement);
this.allMappingDataSortedByISO22.push(newTempElement);
if (this.YamlObject[dim][subDim][activity]['isImplemented']) {
this.performedMappingDataSortedByISO22.push(newTempElement);
} else {
this.plannedMappingDataSortedByISO22.push(newTempElement);
}
}
}
//sorting by descending order
Expand Down
Loading