Merge branch 'syncfusion-upgrade' of https://dev.azure.com/asfinag/Tech-Supporting.ITSM/_git/Tech-Supporting.ITSM.ChangeKalender into syncfusion-upgrade
commit
fb7ee4f319
|
|
@ -474,13 +474,14 @@ export class NttGanttComponent implements OnInit {
|
|||
this.resources = this.allResources;
|
||||
for (const resource of this.resources) {
|
||||
for (const task of resource.tasks) {
|
||||
if (this.showDetails == false) {
|
||||
if (task.TaskID.includes("D2")) {
|
||||
this.data.push(task);
|
||||
}
|
||||
} else {
|
||||
this.data.push(task);
|
||||
}
|
||||
// if (this.showDetails == false) {
|
||||
// if (task.TaskID.includes("D2")) {
|
||||
// this.data.push(task);
|
||||
// }
|
||||
// } else {
|
||||
// this.data.push(task);
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -904,13 +905,59 @@ export class NttGanttComponent implements OnInit {
|
|||
*/
|
||||
|
||||
public queryTaskbarInfo(args: any) {
|
||||
console.log(args.milestoneColor);
|
||||
// console.log(args.data.taskData);
|
||||
|
||||
// console.log(args.data.taskData.resources[0]);
|
||||
// if (args.data.taskData.resources[0].state == 0) {
|
||||
// args.milestoneColor = "rgb(248, 50, 0)"; //red
|
||||
// console.log("red");
|
||||
// }
|
||||
// if (args.data.taskData.resources[0].state == 1) {
|
||||
// args.milestoneColor = "#f98700"; //orange
|
||||
// // console.log("orange");
|
||||
// }
|
||||
// if (args.data.taskData.resources[0].state == 3) {
|
||||
// args.milestoneColor = "#ffc006"; //light orange
|
||||
// // console.log("light orange");
|
||||
// }
|
||||
// if (args.data.taskData.resources[0].state == 6) {
|
||||
// args.milestoneColor = "#f4fa00"; //yellow
|
||||
// // console.log("yellow");
|
||||
// }
|
||||
// if (args.data.taskData.resources[0].state == 7) {
|
||||
// args.milestoneColor = "#ffff00"; //yellow
|
||||
// // // console.log("yellow");
|
||||
// }
|
||||
// if (args.data.taskData.resources[0].state == 9) {
|
||||
// args.milestoneColor = "#d3d3d3"; //yellow
|
||||
// // // console.log("yellow");
|
||||
// }
|
||||
// if (args.data.taskData.resources[0].state == 91) {
|
||||
// args.milestoneColor = "grey"; //yellow
|
||||
// // // console.log("yellow");
|
||||
// }
|
||||
// if (args.data.taskData.resources[0].state == 101) {
|
||||
// args.milestoneColor = "#008B45"; //lightgreen
|
||||
// // console.log("lightgreen");
|
||||
// }
|
||||
// if (args.data.taskData.resources[0].state == 10) {
|
||||
// args.milestoneColor = "#32CD32"; //lightgreen
|
||||
// // console.log("lightgreen");
|
||||
// }
|
||||
// if (args.data.taskData.resources[0].state == 11) {
|
||||
// args.milestoneColor = "#ffffff"; //white
|
||||
// // console.log("white");
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
if (args.taskbarType == 'Milestone' && args.data.taskData.TaskID.includes("D2")) {
|
||||
if (args.data.taskData.isFixed == false) {
|
||||
args.taskbarElement.children[1].classList.add('e-gantt-milestone-border1');
|
||||
args.taskbarElement.children[1].classList.add('e-gantt-milestone-borderMoveable');
|
||||
} else {
|
||||
args.taskbarElement.children[1].classList.remove('e-gantt-milestone-border1');
|
||||
args.taskbarElement.children[1].classList.add('e-gantt-milestone-border2');
|
||||
// args.taskbarElement.children[1].classList.remove('e-gantt-milestone-borderMoveable');
|
||||
args.taskbarElement.children[1].classList.add('e-gantt-milestone-borderFixed');
|
||||
}
|
||||
if (args.data.taskData.TaskID.includes("D2")) {
|
||||
// console.log(args.data.taskData.resources[0]);
|
||||
|
|
@ -926,8 +973,8 @@ export class NttGanttComponent implements OnInit {
|
|||
args.milestoneColor = "#ffc006"; //light orange
|
||||
// console.log("light orange");
|
||||
}
|
||||
if (args.data.taskData.resources[0].state >= 6) {
|
||||
args.milestoneColor = "#000000"; //yellow
|
||||
if (args.data.taskData.resources[0].state == 6) {
|
||||
args.milestoneColor = "#f4fa00"; //yellow
|
||||
// console.log("yellow");
|
||||
}
|
||||
if (args.data.taskData.resources[0].state == 7) {
|
||||
|
|
@ -961,12 +1008,12 @@ export class NttGanttComponent implements OnInit {
|
|||
// console.log("\nisRes: ", args.data.taskData.isRes);
|
||||
// console.log("\nisD2", args.data.taskData.TaskID.includes("D2"));
|
||||
// console.log("\nMilestone Color ready:",args.milestoneColor);
|
||||
console.log(args.milestoneColor);
|
||||
// console.log(args.milestoneColor);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (args.taskbarType == 'Milestone' && !args.data.taskData.TaskID.includes("D2")) {
|
||||
args.taskbarElement.children[1].classList.add('e-gantt-milestone-border3');
|
||||
args.taskbarElement.children[1].classList.add('e-gantt-milestone-borderDetails');
|
||||
if (this.showDetails == true) {
|
||||
if (args.data.taskData.TaskID.includes("D1") || args.data.taskData.TaskID.includes("D4") || args.data.taskData.TaskID.includes("D3")) {
|
||||
if (args.data.taskData.TaskID.includes("D1")) {
|
||||
|
|
@ -980,10 +1027,12 @@ export class NttGanttComponent implements OnInit {
|
|||
args.milestoneColor = "#bababa";
|
||||
}
|
||||
} else {
|
||||
// console.log(args);
|
||||
console.log(args);
|
||||
args.taskbarElement.innerHTML = null;
|
||||
args.taskbarElement.classlist = null;
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,47 +14,38 @@
|
|||
</html>
|
||||
|
||||
<style>
|
||||
/* .e-selectionbackground {
|
||||
.e-selectionbackground {
|
||||
background-color: #E0E0E0 !important;
|
||||
}
|
||||
.e-gantt .e-gantt-chart .e-active {
|
||||
background-color: #E0E0E0 !important;
|
||||
} */
|
||||
}
|
||||
|
||||
.e-gantt-milestone-border {
|
||||
|
||||
/* .e-gantt-milestone-border {
|
||||
border-radius: 50%;
|
||||
color: red;
|
||||
background-color: transparent !important;
|
||||
cursor: not-allowed;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.e-gantt-milestone-border1 {
|
||||
border-radius: 30%;
|
||||
color: red;
|
||||
background-color: #9e9e9b !important;
|
||||
.e-gantt-milestone-borderMoveable {
|
||||
border: 1.5px solid red !important;
|
||||
/* border-style: solid;
|
||||
color: red; */
|
||||
cursor: grab;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.e-gantt-milestone-border2 {
|
||||
border-radius: 30%;
|
||||
color: red;
|
||||
background-color: #9e9e9b !important;
|
||||
.e-gantt-milestone-borderFixed {
|
||||
border: 1.5px solid red !important;
|
||||
/* color: red; */
|
||||
cursor: not-allowed !important;
|
||||
}
|
||||
.e-gantt-milestone-borderDetails {
|
||||
border-radius: 35%;
|
||||
cursor: not-allowed !important;
|
||||
|
||||
|
||||
}
|
||||
.e-gantt-milestone-border3 {
|
||||
|
||||
background-color: transparent !important;
|
||||
cursor: not-allowed !important;
|
||||
|
||||
|
||||
} */
|
||||
|
||||
</style>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue