feat: Integrate JS Gantt Chart library and update styles
- Added JS Gantt Chart library files including CSS and JS. - Updated existing Gantt chart styles for better visual representation. - Translated month and day names to Polish in the Gantt chart settings. - Implemented Gantt chart initialization in the main view with sample data. - Added a toggle switch for displaying tasks in the calendar. - Enhanced task edit form with a new checkbox for calendar visibility. - Improved the layout of the logged-in user template to include Gantt chart styles and scripts.
This commit is contained in:
11
libraries/JS-Gantt-Chart-master/sample-chart/index.html
Normal file
11
libraries/JS-Gantt-Chart-master/sample-chart/index.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="../gantt.css" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="chart"></div>
|
||||
<script src="../gantt.js"></script>
|
||||
<script src="initialize-gantt.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,70 @@
|
||||
let data = [
|
||||
{
|
||||
recordID: 1,
|
||||
row: "Row for ID #1",
|
||||
tooltip: "Tooltips here! Get your tooltips!",
|
||||
start: "Wed Jun 03 2020 14:21:55",
|
||||
end: "Wed Jun 03 2020 20:21:55",
|
||||
group: "This is a group with a new name",
|
||||
groupId: 5
|
||||
},
|
||||
{
|
||||
recordID: 2,
|
||||
row: "Row for ID #2",
|
||||
tooltip: "Tooltip for row 2",
|
||||
start: "Jun 03 2020 11:00:00",
|
||||
end: "Jun 03 2020 15:23:43",
|
||||
group: "empty",
|
||||
groupId: 1
|
||||
},
|
||||
{
|
||||
recordID: 1,
|
||||
row: "Row for ID #1",
|
||||
tooltip: "Tooltip unique to this item",
|
||||
start: "Wed Jun 03 2020 06:00:00",
|
||||
end: "Wed Jun 03 2020 10:00:00",
|
||||
group: "test",
|
||||
groupId: 2,
|
||||
subGroupId: 1,
|
||||
subGroup: "Subgroup #1"
|
||||
},
|
||||
{
|
||||
recordID: 5,
|
||||
row: "Now we have grouping",
|
||||
tooltip: "Tooltip after grouping",
|
||||
start: "Wed Jun 03 2020 06:00:00",
|
||||
end: "Wed Jun 03 2020 10:00:00",
|
||||
group: "test",
|
||||
groupId: 2,
|
||||
subGroupId: 1,
|
||||
subGroup: "Subgroup #1"
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
//This could be an API call to grab data
|
||||
function refreshFunction() {
|
||||
return data;
|
||||
}
|
||||
|
||||
//Parameters that the chart expects
|
||||
let params = {
|
||||
sidebarHeader: "Unused right now",
|
||||
noDataFoundMessage: "No data found",
|
||||
startTimeAlias: "start",
|
||||
endTimeAlias: "end",
|
||||
idAlias: "recordID",
|
||||
rowAlias: "row",
|
||||
linkAlias: null,
|
||||
tooltipAlias: "tooltip",
|
||||
groupBy: "groupId,subGroupId",
|
||||
groupByAlias: "group,subGroup",
|
||||
refreshFunction: refreshFunction
|
||||
}
|
||||
|
||||
//Create the chart.
|
||||
//On first render the chart will call its refreshData function on its own.
|
||||
let ganttChart = new Gantt("chart", params);
|
||||
|
||||
//To refresh the chart's data
|
||||
ganttChart.refreshData();
|
||||
Reference in New Issue
Block a user