From 58ae406b36f5ec55982a021cbeebc47036bc9124 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=9Cmit=20Tun=C3=A7?=
Date: Tue, 16 Jun 2026 17:14:54 +0300
Subject: [PATCH] feat: replace custom gantt chart implementation with
DevExtreme widget
---
.../Widgets/InternGanttChartWidget.php | 2 +
.../intern-gantt-chart-widget.blade.php | 336 ++++++------------
2 files changed, 118 insertions(+), 220 deletions(-)
diff --git a/app/Filament/Admin/Resources/InternApplications/Widgets/InternGanttChartWidget.php b/app/Filament/Admin/Resources/InternApplications/Widgets/InternGanttChartWidget.php
index 9f16844..a91cd94 100644
--- a/app/Filament/Admin/Resources/InternApplications/Widgets/InternGanttChartWidget.php
+++ b/app/Filament/Admin/Resources/InternApplications/Widgets/InternGanttChartWidget.php
@@ -161,6 +161,8 @@ class InternGanttChartWidget extends Widget
'grid_end' => $gridEnd,
'hex_color' => $hexColor,
'is_stripes' => $isStripes,
+ 'raw_start' => $intern->internship_start_date,
+ 'raw_end' => $intern->internship_end_date,
];
});
diff --git a/resources/views/filament/admin/resources/intern-applications/widgets/intern-gantt-chart-widget.blade.php b/resources/views/filament/admin/resources/intern-applications/widgets/intern-gantt-chart-widget.blade.php
index e933077..31b0f56 100644
--- a/resources/views/filament/admin/resources/intern-applications/widgets/intern-gantt-chart-widget.blade.php
+++ b/resources/views/filament/admin/resources/intern-applications/widgets/intern-gantt-chart-widget.blade.php
@@ -1,157 +1,26 @@
-@php
-$monthNames = ['Oca', 'Şub', 'Mar', 'Nis', 'May', 'Haz', 'Tem', 'Ağu', 'Eyl', 'Eki', 'Kas', 'Ara'];
-$currentMonth = (int) date('n');
-@endphp
-
+
+
+
+
@@ -161,7 +30,7 @@ $currentMonth = (int) date('n');
Stajyer Gantt Şeması ve Takvimi
- Stajı Onaylananlar
+ DevExtreme Görünümü
@@ -178,83 +47,110 @@ $currentMonth = (int) date('n');
@else
-
-
-
Kırmızı kesikli dikey sütun günün ayını göstermektedir.
+ jQuery(this.$refs.ganttContainer).dxGantt({
+ tasks: {
+ dataSource: formattedData,
+ },
+ editing: {
+ enabled: false,
+ },
+ validation: {
+ autoUpdateParentTasks: true,
+ },
+ toolbar: {
+ items: [
+ 'collapseAll',
+ 'expandAll',
+ 'separator',
+ 'zoomIn',
+ 'zoomOut',
+ ],
+ },
+ columns: [{
+ dataField: 'title',
+ caption: 'Stajyer Adı',
+ width: 250,
+ }, {
+ dataField: 'start',
+ caption: 'Başlangıç Tarihi',
+ dataType: 'date',
+ format: 'dd.MM.yyyy',
+ width: 120,
+ }, {
+ dataField: 'end',
+ caption: 'Bitiş Tarihi',
+ dataType: 'date',
+ format: 'dd.MM.yyyy',
+ width: 120,
+ }],
+ scaleType: 'weeks',
+ taskListWidth: 490,
+ });
+ } else {
+ throw new Error('DevExpress Gantt component jQuery plugin is not defined after loading scripts.');
+ }
+ } catch (e) {
+ console.error(e);
+ this.showError(e.message);
+ }
+ }
+ }"
+ class="dx-viewport demo-container"
+ >
+
@endif