feat: implement custom responsive gantt chart UI for intern applications widget
This commit is contained in:
@@ -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,
|
||||
];
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user