main
manueltauber 2023-06-20 13:18:29 +02:00
parent bb924bd10f
commit 9edb886ce7
2 changed files with 6 additions and 4 deletions

View File

@ -202,14 +202,16 @@ export class DataService {
public async fetchPlanTimes(filters: any, renderStartDate: Date, renderEndtDate: Date){
const promise = new Promise(resolve=>{
let obj = {filters : filters, renderStartDate : renderStartDate, renderEndDate: renderEndtDate };
let obj = {filter : filters.filter, renderStartDate : renderStartDate, renderEndDate: renderEndtDate };
let stringyfiedData = JSON.stringify(obj);
let dataJson = JSON.parse(stringyfiedData) as typeof stringyfiedData;
console.log(dataJson);
let res : any[] = [];
this.http.post('http://localhost:8080/api/fetchPlanTimes', dataJson)
.subscribe((response: any)=>{
console.log(response);
.subscribe((response: any[])=>{
response.forEach(week => {
res.push(week);
});
resolve(res);
})
})

View File

@ -274,7 +274,7 @@ public logg(args){
this.inputForTimeline = [this.splitterSettings, this.projectStartDate, this.projectEndDate];
});
});
this.dataService.fetchPlanTimes({'filterElement': this.filters}, this.projectStartDate, this.projectEndDate);