initialSgFix

main
Manuel Tauber 2024-02-27 21:41:27 +01:00
parent a6ffb41ff1
commit 58ab58e051
1 changed files with 31 additions and 2 deletions

View File

@ -401,10 +401,12 @@ export class NttGanttComponent implements OnInit {
}else{
this.isUserPreset = false;
}
console.log("\nselectedPreset:")
console.log(res.selectedPreset);
this.presetGroups = res.presetGroups;
this.filters = this.selectedPreset.definition;
this.filterEnabled = true;
this.userPreferences = res.userPreferences;
this.showDetails = res.userPreferences.showDetails;
@ -414,6 +416,11 @@ export class NttGanttComponent implements OnInit {
this.dataService.fetchUserSupportGroup().then((res: any)=>{
this.userSupportGroup = res.name;
if(this.selectedPreset.name == "Systemdefault"){
this.filters = {filterElement: [{column: "SupportGroup", filter: "equals", criteria: [this.userSupportGroup]}]}
}else{
this.filters = this.selectedPreset.definition;
}
console.log(this.userSupportGroup);
this.refreshData();
this.states = this.dataService.getStates();
@ -502,6 +509,26 @@ export class NttGanttComponent implements OnInit {
* If no filter is applied the function sets a default supportGroup filter, so that the user gets only changes displayed, which are in his supportGroup.
*/
mapRequestJSON(){
// this.userSupportGroup = "IH - Ost 1 - Team Kaisermühlen";
// console.log(this.filters.filterElement[0].criteria[0]);
// let i = 0;
// let j = 0;
// for (let filterElement of this.filters.filterElement) {
// if(filterElement.column == "SupportGroup")
// for (let supportGoup of filterElement.criteria) {
// console.log(supportGoup);
// if(supportGoup == "SM - ITSM"){
// supportGoup = this.userSupportGroup;
// break;
// }
// j++;
// }
// i++;
// }
// console.log(i+"/"+j)
// console.log(this.filters.filterElement[i].criteria[j]);
// this.filters.filterElement[i][j].replace("SM - ITSM", this.userSupportGroup);
let request =
{
'sliceStart': this.sliceStart,
@ -512,6 +539,8 @@ export class NttGanttComponent implements OnInit {
        'mode': 'asc'
},
}
console.log("\nrequest")
console.log(request);
// request.filter = null;
return request;
}