Files
citrus/scratch/view_report.php

40 lines
1.5 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
$data = json_decode(file_get_contents(__DIR__ . '/approval_report.json'), true);
echo "=== STAJYER DEFTEN ONAY VE ANALİZ RAPORU ===\n";
echo "Toplam Yeni Onaylanan Kayıt Sayısı: " . $data['approved_total'] . "\n\n";
$congratulated = [];
$retroactiveList = [];
$noEntriesList = [];
foreach ($data['interns'] as $i) {
if ($i['filled_entries'] == 0) {
$noEntriesList[] = $i;
continue;
}
if ($i['retroactive_count'] == 0) {
$congratulated[] = $i;
} else {
$retroactiveList[] = $i;
}
}
echo "--- GÜNÜ GÜNÜNE DOLDURANLAR (TEBRİK EDİLENLER) ---\n";
foreach ($congratulated as $i) {
echo "• " . $i['name'] . " (" . $i['email'] . ") - Toplam " . $i['filled_entries'] . " gün doldurdu. Hepsi zamanında! (Yeni Onay: " . $i['newly_approved'] . ")\n";
}
echo "\n--- GERİYE DÖNÜK DOLDURANLAR (RAPORLANANLAR) ---\n";
foreach ($retroactiveList as $i) {
echo "• " . $i['name'] . " (" . $i['email'] . ")\n";
echo " - Toplam Doldurulan: " . $i['filled_entries'] . " gün (Yeni Onay: " . $i['newly_approved'] . ")\n";
echo " - Günü Gününe: " . $i['on_time_count'] . " gün (" . (count($i['on_time_days']) ? implode(', ', $i['on_time_days']) . ". günler" : "Yok") . ")\n";
echo " - Geriye Dönük: " . $i['retroactive_count'] . " gün (" . implode(', ', $i['retroactive_days']) . ". günler)\n";
}
echo "\n--- DEFTEN DOLDURMAYANLAR / KAYDI BULUNMAYANLAR ---\n";
foreach ($noEntriesList as $i) {
echo "• " . $i['name'] . " (" . $i['email'] . ") - 0 Kayıt\n";
}