error handling
parent
6d4fced7b4
commit
3ab0712d23
|
|
@ -469,7 +469,6 @@ export class DataService {
|
|||
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[])=>{
|
||||
|
|
|
|||
|
|
@ -772,7 +772,7 @@ export class NttGanttComponent implements OnInit {
|
|||
public queryTaskbarInfo(args: any) {
|
||||
if (args.taskbarType == 'Milestone' && args.data.taskData.TaskID.includes("D2"))
|
||||
{
|
||||
console.log(args.taskbarElement.children[1].style.add);
|
||||
// console.log(args.taskbarElement.children[1].style.add);
|
||||
args.taskbarElement.children[1].classList.add('e-gantt-milestone-border1');
|
||||
// console.log(args.taskbarElement.children[1]);
|
||||
// args.taskbarElement.children[1].children[0].classList.add('e-gantt-milestone-border');
|
||||
|
|
@ -840,12 +840,21 @@ export class NttGanttComponent implements OnInit {
|
|||
const found = this.allResources.find((resource) => {
|
||||
return resource.resourceId == args.data.taskData.resources[0].resourceId;
|
||||
});
|
||||
this.dataService.updateDatePerChange(found);
|
||||
this.plantimeComponent.fetchPlanTimes();
|
||||
let elem = document.querySelector(
|
||||
'#'+'ganttDefaultSum'+ 'GanttChart > div.e-chart-root-container > div'
|
||||
);
|
||||
elem.scrollLeft = this.planTimeScrollLeft;
|
||||
this.dataService.updateDatePerChange(found).then((res: any)=>{
|
||||
if(res.ok == false){
|
||||
this._snackBar.open("Änderung fehlegeschlagen, bitte erneut versuchen", 'Schließen', {duration: 10000,horizontalPosition: this.horizontalPosition, verticalPosition: this.verticalPosition, panelClass: ['red-snackbar']});
|
||||
}else{
|
||||
console.log(res);
|
||||
this._snackBar.open("Änderung erfolgreich, Neues Datum: "+res.d2.slice(0,-14), 'Schließen', {duration: 3000, horizontalPosition: this.horizontalPosition, verticalPosition: this.verticalPosition, panelClass: ['green-snackbar']});
|
||||
this.plantimeComponent.fetchPlanTimes();
|
||||
let elem = document.querySelector(
|
||||
'#'+'ganttDefaultSum'+ 'GanttChart > div.e-chart-root-container > div'
|
||||
);
|
||||
elem.scrollLeft = this.planTimeScrollLeft;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -991,6 +1000,14 @@ export class NttGanttComponent implements OnInit {
|
|||
* @param args event arguments from the syncfusion gantt chart.
|
||||
*/
|
||||
public actionBegin(args: any) {
|
||||
if(args.requestType == 'taskbarediting'){
|
||||
if(args.taskBarEditAction == 'MilestoneDrag'){
|
||||
if(!args.data.TaskID.includes("D2")){
|
||||
args.cancel = true;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(args.dialogModel){
|
||||
args.cancel = true;
|
||||
if(args.rowData.taskData.resources[0].state == 0){
|
||||
|
|
@ -999,7 +1016,6 @@ export class NttGanttComponent implements OnInit {
|
|||
window.open("https://itsm-dev.asfinag.at/arsys/forms/itsm-app-dev/SHR%3ALandingConsole/Default+Administrator+View/?mode=search&F304255500=CHG:Infrastructure Change&F1000000076=FormOpenNoAppList&F303647600=SearchTicketWithQual&F304255610='1000000182' =\""+args.rowData.taskData.resources[0].changeNr+"\"", "_blank");
|
||||
}
|
||||
}else{
|
||||
console.log(args.target.firstChild.innerText);
|
||||
if(args.requestType=='sorting'){
|
||||
let colName = "";
|
||||
let mode = "asc";
|
||||
|
|
|
|||
Loading…
Reference in New Issue