Skip to content

Commit

Permalink
Merge pull request #1907 from PublicisSapient/qa-master
Browse files Browse the repository at this point in the history
Qa master
  • Loading branch information
rapkalya authored Feb 12, 2025
2 parents c262c24 + de62c53 commit 17d338a
Show file tree
Hide file tree
Showing 124 changed files with 6,134 additions and 1,952 deletions.
379 changes: 162 additions & 217 deletions .github/workflows/Github_CI_Master.yaml

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions UI/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@
"optimization": false,
"outputHashing": "all",
"sourceMap": true,
"namedChunks": false,
"aot": true,
"namedChunks": true,
"aot": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
"vendorChunk": true,
"buildOptimizer": false
},
"supervisor": {
"fileReplacements": [
Expand Down Expand Up @@ -118,11 +118,11 @@
"optimization": false,
"outputHashing": "all",
"sourceMap": true,
"namedChunks": false,
"aot": true,
"namedChunks": true,
"aot": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
"vendorChunk": true,
"buildOptimizer": false
},
"local": {
"optimization": false,
Expand Down
3 changes: 3 additions & 0 deletions UI/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"ng": "ng",
"start": "node --max_old_space_size=8048 ./node_modules/@angular/cli/bin/ng serve --configuration=local --proxy-config proxy.conf.json",
"build": "ng build --configuration=docker --aot --output-hashing=all",
"build:production": "ng build --configuration=production --aot --output-hashing=all",
"build:dev": "ng build --configuration=dev --aot --output-hashing=all",
"build:qa": "ng build --configuration=qa --aot --output-hashing=all",
"test": "node --max_old_space_size=8048 ./node_modules/@angular/cli/bin/ng test --code-coverage",
"lint": "ng lint dashboard",
"e2e": "ng e2e",
Expand Down
75 changes: 42 additions & 33 deletions UI/src/app/component/export-excel/export-excel.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ export class ExportExcelComponent implements OnInit {
markerInfo = [];
forzenColumns = ['issue id'];
exportExcelRawVariable;
// Define blank values to handle
blankValues = ['', null, undefined, '-', 'NA','N/A','Undefined'];

constructor(
private excelService: ExcelService,
Expand Down Expand Up @@ -225,44 +227,13 @@ export class ExportExcelComponent implements OnInit {
}

generateColumnFilterData() {
// Define blank values to handle
const blankValues = ['', null, undefined, '-', 'NA','N/A','Undefined'];
// this.excludeColumnFilter = ['Linked Defect','Linked Stories'].map(item => item.toLowerCase());
// this.includeColumnFilter = ['Issue Id','Story ID','Defect ID','Link Story ID','Build URL','Epic ID','Created Defect ID','Merge Request URL','Ticket issue ID'].map(item => item.toLowerCase());
if (this.modalDetails['tableValues'].length > 0) {
// Update tableValues to replace blank values with '(Blanks)'
this.modalDetails['tableValues'] = this.modalDetails['tableValues'].map(row => {
let updatedRow = { ...row }; // Create a copy of the row
Object.keys(updatedRow).forEach(colName => {
if(updatedRow[colName]?.hasOwnProperty('hyperlink')){
updatedRow = {...updatedRow,text:updatedRow[colName]?.text||''}
}
if (typeof updatedRow[colName] === 'string') {
updatedRow[colName] = updatedRow[colName].trim();
}
if(Array.isArray(updatedRow[colName]) && typeof updatedRow[colName] !=='object'){
updatedRow[colName] = (updatedRow[colName] as any[]).join(',')
}
if (blankValues.includes(updatedRow[colName])) {
updatedRow[colName] = '';
}
});
return updatedRow;
});
this.modalDetails['tableValues'] = this.modalDetails['tableValues'].map(row => this.refinedGridData(row));

// Generate column filter data
this.modalDetails['tableHeadings'].forEach(colName => {
this.tableColumnData[colName] = [...new Set(this.modalDetails['tableValues'].map(item => item[colName]))].map(colData => {
if(colData === undefined){ return;}
if (this.typeOf(colData) && colData?.hasOwnProperty('hyperlink')) {
// if (!this.excludeColumnFilter.includes(colName.toLowerCase()) && !this.includeColumnFilter.includes(colName.toLowerCase())) {
// this.excludeColumnFilter.push(colName)
// }
return { name:blankValues.includes(colData.text)?'(Blanks)':colData.text, value: colData };
} else {
return { name: blankValues.includes(colData)?'(Blanks)':colData, value: colData };
}
});
this.tableColumnData[colName] = [...new Set(this.modalDetails['tableValues'].map(item => item[colName]))].map(colData => this.getGridHeaderFilters(colData));
this.tableColumnData[colName] =this.tableColumnData[colName].filter(x=>x!==undefined);
this.tableColumnForm[colName] = [];
});
Expand Down Expand Up @@ -393,4 +364,42 @@ export class ExportExcelComponent implements OnInit {
}
}

getGridHeaderFilters(colData){
if(colData === undefined){ return;}
if(Array.isArray(colData)){
let tempText=[];
colData.map((item) => {
if (this.typeOf(item) && item?.hasOwnProperty('hyperlink')) {
tempText.push(item.text)
}
})
return { name: this.blankValues.includes((tempText).join(','))?'(Blanks)':(tempText).join(','), value: colData };
}
else if (this.typeOf(colData) && colData?.hasOwnProperty('hyperlink')) {
return { name:this.blankValues.includes(colData.text)?'(Blanks)':colData.text, value: colData };
} else {
return { name: this.blankValues.includes(colData)?'(Blanks)':colData, value: colData };
}
}

refinedGridData(row){
// replace blank values with '(Blanks)'
let updatedRow = { ...row };
Object.keys(updatedRow).forEach(colName => {
if(updatedRow[colName]?.hasOwnProperty('hyperlink')){
updatedRow = {...updatedRow,text:updatedRow[colName]?.text||''}
}
if (typeof updatedRow[colName] === 'string') {
updatedRow[colName] = updatedRow[colName].trim();
}
if(Array.isArray(updatedRow[colName]) && typeof updatedRow[colName] !=='object'){
updatedRow[colName] = (updatedRow[colName] as any[]).join(',')
}
if (this.blankValues.includes(updatedRow[colName])) {
updatedRow[colName] = '';
}
});
return updatedRow;
}

}
Loading

0 comments on commit 17d338a

Please sign in to comment.