feat: implement quick approval dashboard for intern reports with filtered views and modal navigation
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
$json = file_get_contents(__DIR__ . '/intern_data.json');
|
||||
$interns = json_decode($json, true);
|
||||
|
||||
foreach ($interns as $intern) {
|
||||
echo "========================================\n";
|
||||
echo "NAME: " . $intern['name'] . "\n";
|
||||
echo "Email: " . $intern['email'] . "\n";
|
||||
echo "GitHub Repo: " . ($intern['github_repo'] ?: 'NONE') . "\n";
|
||||
echo "Start: " . $intern['internship_start_date'] . " | End: " . $intern['internship_end_date'] . "\n";
|
||||
echo "Total Journal Entries: " . count($intern['journal_entries']) . "\n";
|
||||
|
||||
// Group journal entries by week or get recent ones
|
||||
// Let's filter entries for "this week" (2026-07-10 to 2026-07-17)
|
||||
$this_week_entries = [];
|
||||
foreach ($intern['journal_entries'] as $entry) {
|
||||
if ($entry['date'] >= '2026-07-10' && $entry['date'] <= '2026-07-17') {
|
||||
$this_week_entries[] = $entry;
|
||||
}
|
||||
}
|
||||
|
||||
echo "This Week's Entries (" . count($this_week_entries) . "):\n";
|
||||
foreach ($this_week_entries as $entry) {
|
||||
echo " - Date: " . $entry['date'] . " | Day: " . $entry['day_number'] . " | Retroactive: " . ($entry['is_retroactive'] ? 'YES' : 'NO') . "\n";
|
||||
// Show first 200 chars of content
|
||||
$text = trim(strip_tags($entry['content']));
|
||||
$text = str_replace(["\r", "\n", "\t"], ' ', $text);
|
||||
$text = preg_replace('/\s+/', ' ', $text);
|
||||
echo " Content: " . mb_substr($text, 0, 150) . "...\n";
|
||||
}
|
||||
|
||||
// Also list all entries briefly to understand overall progress
|
||||
echo "All Entries dates: ";
|
||||
$dates = [];
|
||||
foreach ($intern['journal_entries'] as $entry) {
|
||||
$dates[] = $entry['date'] . ($entry['is_retroactive'] ? '(R)' : '');
|
||||
}
|
||||
echo implode(', ', $dates) . "\n";
|
||||
}
|
||||
Reference in New Issue
Block a user