Widgets

Custom Gantt

1.2.0

Custom GANTT

Anwendungscode

let list := (select Mitarbeiter);
let data := {
		uniqueId: "Projekt Gantt",
		ganttSettings: {
			showScrollbar: true,
			dragAction: false,
			currentZoomLevel: Zoom,
			baseZoomLevel: 2.5,
		},
		timeSettings: {
			unit: "hours",
			amount: 0.5,
			startTime: 6,
			duration: 12
		},
		barSettings: {
			height: "40px",
			borderRadius: "10px"
		},
  		dateSettings: {
			highlights: [{
					title: "Feiertag",
					date: date(2024, 1, 1),
					backgroundColor: "",
					color: "#fff"
				}, {
					title: "Heute",
					date: today(),
					backgroundColor: "#e9595c10",
					color: "#fff"
				}, {
					title: "Samstag",
					weekday: 6,
					backgroundColor: "",
					color: "#fff"
				}, {
					title: "Sonntag",
					weekday: 7,
					backgroundColor: "",
					color: "#fff"
				}]
		},

		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)