diff --git a/app/Filament/Admin/Resources/InternApplications/Widgets/InternGanttChartWidget.php b/app/Filament/Admin/Resources/InternApplications/Widgets/InternGanttChartWidget.php index 8ad4b5e..9f16844 100644 --- a/app/Filament/Admin/Resources/InternApplications/Widgets/InternGanttChartWidget.php +++ b/app/Filament/Admin/Resources/InternApplications/Widgets/InternGanttChartWidget.php @@ -132,6 +132,22 @@ class InternGanttChartWidget extends Widget $paletteIndex = $intern->id % count($palettes); $color = $palettes[$paletteIndex]; + $startMonth = (int) $start->format('n'); + $endMonth = (int) $end->format('n'); + $gridStart = $startMonth + 1; + $gridEnd = min(14, $endMonth + 2); + + // Background color map based on user's examples + $hexColors = [ + '#2ecaac', // Emerald Teal + '#54c6f9', // Sky Blue + '#ff6252', // Red Coral + '#f59e0b', // Amber + '#8b5cf6', // Violet + ]; + $hexColor = $hexColors[$intern->id % count($hexColors)]; + $isStripes = ($intern->id % 2 === 0); + return [ 'id' => $intern->id, 'name' => $intern->name, @@ -141,6 +157,10 @@ class InternGanttChartWidget extends Widget 'left' => $left, 'width' => $width, 'color' => $color, + 'grid_start' => $gridStart, + 'grid_end' => $gridEnd, + 'hex_color' => $hexColor, + 'is_stripes' => $isStripes, ]; }); 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 94b8c44..e933077 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,4 +1,159 @@ +@php +$monthNames = ['Oca', 'Şub', 'Mar', 'Nis', 'May', 'Haz', 'Tem', 'Ağu', 'Eyl', 'Eki', 'Kas', 'Ara']; +$currentMonth = (int) date('n'); +@endphp + + +
@@ -23,112 +178,84 @@

@else -
-
- -
- -
- Stajyer Bilgisi -
- -
- @foreach($months as $month) -
- {{ $month['name'] }} -
- @endforeach -
+
+
+ +
+
Stajyer Bilgisi
+ @foreach($monthNames as $name) + {{ $name }} + @endforeach
- -
- @foreach($interns as $intern) -
- -
- - {{ $intern['name'] }} + +
+ + @for($i = 1; $i <= 12; $i++) + + @endfor +
+ + + @foreach($interns as $intern) +
+
+ {{ $intern['name'] }} + {{ $intern['total_days'] }} İş Günü +
+
    +
  • + {{ $intern['start_date'] }} + + {{ $intern['end_date'] }} - - - - - {{ $intern['total_days'] }} Gün Staj - -
- -
- - @foreach($months as $month) -
- @endforeach - - - @if($todayPercent !== null) -
- @endif - - +
- - - {{ $intern['start_date'] }} - - - {{ $intern['end_date'] }} - - - - - @endforeach -
+ + +
+ @endforeach
- @if($todayPercent !== null) -
- - Kesikli kırmızı çizgi bugünün tarihini göstermektedir. -
- @endif +
+ + Kırmızı kesikli dikey sütun günün ayını göstermektedir. +
@endif