@nnachev
Here is Blog that shows detailed explaination of usage
https://blog.logrocket.com/gantt-chart-javascript-frappe-gantt/
in blade file you just have to add empty <svg id="gantt"></svg> and reset all things go from js.
Dont forget to add <script src="frappe-gantt.min.js" />
Jan 4, 2024
7
Level 1
[SOLVED] How to use Frappe-Gantt in Laravel blade template
I tried to implement Frappe-Gantt in my Laravel project but I can't load the module in my custom page blade template. Can anybody help me with that?
Level 1
@hupp Thank you for the help. I had the syntax wrong for importing CSS and JS files in the Blade template. When I change my Blade by following syntax Frappe-Gantt was loaded correctly.
<x-filament-panels::page>
<head>
<link href="{{ asset('css/frappe-gantt.min.css') }}" rel="stylesheet">
<script type="text/javascript" src="{{ asset('js/frappe-gantt.min.js') }}"></script>
</head>
<div id="test">Test Gant</div>
<div>
<svg id="gantt">
</svg>
</div>
<script type="text/javascript" src="{{ asset('js/gantt-script.js') }}"></script>
</x-filament-panels::page>
The correct syntax to load CSS and JS in my case is:
<link href="{{ asset('css/frappe-gantt.min.css') }}" rel="stylesheet">
<script type="text/javascript" src="{{ asset('js/frappe-gantt.min.js') }}"></script>
<script type="text/javascript" src="{{ asset('js/gantt-script.js') }}"></script>
Loaded CSS and JavaScript files are stored in public folder.
Please or to participate in this conversation.