Widgets

Custom Gantt

1.2.0

Custom GANTT

Anwendungscode

let list := (select Mitarbeiter);
let data := {
		uniqueId: "Projekt Gantt",
		zoomLevel: number('Zoom Level'),
		ganttSettings: {
			showScrollbar: true,
			dragAction: false
		},
		timeSettings: {
			unit: "hours",
			startTime: 4,
			duration: 'Stunden pro Tag'
		},
		barSettings: {
			height: "40px",
			borderRadius: "10px"
		},
		sidebarSettings: {
			width: "400px",
			title: "Einsatzplanung",
			clickActions: [{
					title: "Heute",
					date: today()
				}, {
					title: "Q1",
					date: date(2024, 1, 1)
				}, {
					title: "Q2",
					date: date(2024, 4, 1)
				}, {
					title: "Q3",
					date: date(2024, 7, 1)
				}, {
					title: "Q4",
					date: date(2024, 10, 1)
				}, {
					title: "Christmas",
					date: date(2024, 12, 24)
				}]
		},
		years: if Jahre != null then selectedYears else [2023] end,
		items: list.[{
				recordId: Nr,
				title: Name,
				backgroundColor: "#ddd",
				height: "100px",
				barSettings: {
					height: "20px",
					borderRadius: "50px"
				},
				clickAction:true, 
				timeEntries: [{
						title: Name,
						recordId: Nr,
						startDate: min('Zuweisung Mitarbeiter'.Startdatum),
						endDate: max('Zuweisung Mitarbeiter'.Enddatum),
						clickAction: true
					}],
				items: let id := Nr;
				[{
						recordId: Nr,
						title: "Aufgaben",
						barSettings: {
							height: "20px",
							borderRadius: "4px"
						},
						timeEntries: 'Zuweisung Mitarbeiter'.[{
								recordId: Nr,
								title: Aufgabe.Bezeichnung,
								startDate: Startdatum,
								endDate: Enddatum,
								startTime: Startzeit,
								endTime: Endzeit,
								clickAction: true
							}]
					}]
			}]
	};
arcCustomGantt(data)