Skip to content

Commit

Permalink
svg files and compliance variable renamed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimple committed Feb 8, 2019
1 parent 9103a9b commit 139370d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -351,14 +351,13 @@ export class ComplianceDashboardComponent implements OnInit, OnDestroy {
innerArr = {};
for (let col = 0; col < getCols.length; col++) {
if (getCols[col] && getCols[col].toLowerCase() === 'compliance') {
if (getData[row][getCols[col]] && getData[row][getCols[col]].toLowerCase() === 'compliant') {
if (getData[row][getCols[col]] && getData[row][getCols[col]].toLowerCase() === 'full_compliance') {
cellObj = {

'link': '',
'properties':
{
'color': '#000',
'font-family': 'ex2-medium',
'justify-content': 'center'

},
Expand All @@ -375,14 +374,13 @@ export class ComplianceDashboardComponent implements OnInit, OnDestroy {
'valText': 1
};

} else if (getData[row][getCols[col]] && getData[row][getCols[col]].toLowerCase() === 'high') {
} else if (getData[row][getCols[col]] && getData[row][getCols[col]].toLowerCase() === 'good_compliance') {
cellObj = {

'link': '',
'properties':
{
'color': '#000',
'font-family': 'ex2-medium',
'justify-content': 'center'
},
'textProp':
Expand All @@ -392,7 +390,7 @@ export class ComplianceDashboardComponent implements OnInit, OnDestroy {
'colName': getCols[col],
'imgProp': { 'height': '1.2em' },
'hasPreImg': true,
'imgLink': '../assets/icons/high.svg',
'imgLink': '../assets/icons/good-compliance.svg',
'text': 'Not Compliant',
'valText': 3
};
Expand All @@ -403,7 +401,6 @@ export class ComplianceDashboardComponent implements OnInit, OnDestroy {
'properties':
{
'color': '#000',
'font-family': 'ex2-medium',
'justify-content': 'center'
},
'textProp':
Expand All @@ -413,7 +410,7 @@ export class ComplianceDashboardComponent implements OnInit, OnDestroy {
'colName': getCols[col],
'imgProp': { 'height': '1.2em' },
'hasPreImg': true,
'imgLink': '../assets/icons/medium.svg',
'imgLink': '../assets/icons/bad-compliance.svg',
'text': 'Not Compliant',
'valText': 2
};
Expand Down Expand Up @@ -441,7 +438,6 @@ export class ComplianceDashboardComponent implements OnInit, OnDestroy {
'properties':
{
'color': '#000',
'font-family': 'ex2-medium',
'text-transform' : 'capitalize'
},
'colName': getCols[col],
Expand All @@ -456,7 +452,6 @@ export class ComplianceDashboardComponent implements OnInit, OnDestroy {
'properties':
{
'color': '#000',
'font-family': 'ex2-medium',
'text-transform' : 'capitalize'
},
'colName': getCols[col],
Expand All @@ -471,7 +466,6 @@ export class ComplianceDashboardComponent implements OnInit, OnDestroy {
'properties':
{
'color': '#000',
'font-family': 'ex2-medium',
'text-transform' : 'capitalize'
},
'colName': getCols[col],
Expand All @@ -486,7 +480,6 @@ export class ComplianceDashboardComponent implements OnInit, OnDestroy {
'properties':
{
'color': '#000',
'font-family': 'ex2-medium',
'text-transform' : 'capitalize'
},
'colName': getCols[col],
Expand All @@ -504,7 +497,6 @@ export class ComplianceDashboardComponent implements OnInit, OnDestroy {
'properties':
{
'color': '#000',
'font-family': 'ex2-medium',
'font-size': '1.04em'
},
'colName': getCols[col],
Expand All @@ -519,8 +511,7 @@ export class ComplianceDashboardComponent implements OnInit, OnDestroy {
'link': '',
'properties':
{
'color': '#000',
'font-family': 'ex2-medium',
'color': '#000'
},
'colName': getCols[col],
'hasPreImg': false,
Expand Down Expand Up @@ -566,11 +557,11 @@ export class ComplianceDashboardComponent implements OnInit, OnDestroy {
addCompliance(data) {
for ( let i = 0; i < data.length; i++ ) {
if (data[i]['Compliance %'] === 100 ) {
data[i].compliance = 'compliant';
data[i].compliance = 'full_compliance';
} else if ( data[i]['Compliance %'] < 100 && data[i]['Compliance %'] > 49 ) {
data[i].compliance = 'low';
data[i].compliance = 'bad_compliance';
} else {
data[i].compliance = 'high';
data[i].compliance = 'good_compliance';
}
}
return data;
Expand Down
File renamed without changes
File renamed without changes

0 comments on commit 139370d

Please sign in to comment.