feat: implement custom responsive gantt chart UI for intern applications widget

This commit is contained in:
Ümit Tunç
2026-06-16 15:28:20 +03:00
parent 6be7f4442a
commit 794f9556de
2 changed files with 240 additions and 93 deletions
@@ -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,
];
});