December 16th, 2025 V.7

This commit is contained in:
Flatlogic Bot 2025-12-17 02:51:56 +00:00
parent cdae3463b5
commit 08b009ac18
4 changed files with 294 additions and 7 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

View File

@ -21,7 +21,104 @@ require_once 'db/config.php';
<!-- Main content --> <!-- Main content -->
<main class="flex-1 overflow-x-hidden overflow-y-auto bg-[#fafafa]"> <main class="flex-1 overflow-x-hidden overflow-y-auto bg-[#fafafa]">
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8 py-8"> <div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8 py-8">
<h1 class="text-3xl font-bold text-gray-900">Candidates</h1> <h1 class="text-3xl font-bold text-gray-900 mb-8">Candidates</h1>
<div class="flex space-x-8">
<!-- Sidebar -->
<aside class="w-1/4 bg-white border-r border-gray-200 p-6 rounded-lg">
<div class="space-y-6">
<!-- Candidate Photo -->
<div class="flex flex-col items-center">
<img class="w-24 h-24 rounded-full mb-4" src="https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=400&h=400&fit=crop" alt="Sarah Kim">
<h2 class="text-xl font-semibold text-center">Sarah Kim</h2>
<p class="text-gray-500 text-center">Senior Full Stack Engineer</p>
</div>
<!-- Status Dropdown -->
<div>
<label class="block text-gray-600 mb-2 text-sm">Status</label>
<select class="w-full border border-gray-300 rounded-md p-2 text-sm">
<option value="screening" selected>Screening</option>
<option value="applied">Applied</option>
<option value="interview">Interview</option>
<option value="offer">Offer</option>
<option value="hired">Hired</option>
<option value="rejected">Rejected</option>
</select>
</div>
<!-- Tags -->
<div>
<label class="block text-gray-600 mb-2 text-sm">Tags</label>
<div class="flex flex-wrap gap-2">
<span class="bg-blue-100 text-blue-600 px-2 py-1 rounded-full text-xs font-medium">Remote</span>
<span class="bg-blue-100 text-blue-600 px-2 py-1 rounded-full text-xs font-medium">Senior</span>
<span class="bg-blue-100 text-blue-600 px-2 py-1 rounded-full text-xs font-medium">Engineering</span>
</div>
</div>
<!-- Contact Info -->
<div class="space-y-3 pt-4 border-t border-gray-200">
<div class="flex items-center gap-3 text-gray-600">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-mail"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><polyline points="22,6 12,13 2,6"></polyline></svg>
<span class="text-sm">sarah.kim@example.com</span>
</div>
<div class="flex items-center gap-3 text-gray-600">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-phone"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>
<span class="text-sm">+1 234 567 890</span>
</div>
<div class="flex items-center gap-3 text-gray-600">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-map-pin"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path><circle cx="12" cy="10" r="3"></circle></svg>
<span class="text-sm">San Francisco, CA</span>
</div>
<div class="flex items-center gap-3 text-gray-600">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-linkedin"><path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"></path><rect x="2" y="9" width="4" height="12"></rect><circle cx="4" cy="4" r="2"></circle></svg>
<a href="#" class="text-sm text-blue-600 hover:underline">LinkedIn</a>
</div>
<div class="flex items-center gap-3 text-gray-600">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-github"><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path></svg>
<a href="#" class="text-sm text-blue-600 hover:underline">GitHub</a>
</div>
</div>
</div>
</aside>
<!-- Main content area -->
<div class="w-3/4">
<!-- Header -->
<div class="mb-4 md:mb-8">
<h1 class="text-gray-900 mb-1 md:mb-2 text-2xl font-bold">Candidate Profile</h1>
<p class="text-sm md:text-base text-gray-600"> Detailed view of candidate information and progress </p>
</div>
<!-- Candidate Overview -->
<div class="mb-4 md:mb-8">
<button class="flex items-center justify-between w-full mb-3 md:mb-0 md:pointer-events-none">
<h2 class="text-gray-900 hidden md:block text-xl font-bold">Candidate Overview</h2>
<h2 class="text-gray-900 md:hidden text-xl font-bold">Overview</h2>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-5 h-5 transition-transform md:hidden"><polyline points="6 9 12 15 18 9"></polyline></svg>
</button>
<div class="bg-white border border-gray-200 rounded-xl md:rounded-2xl p-4 md:p-6 shadow-sm mt-3 md:mt-0">
<div class="flex flex-col md:flex-row items-start gap-4 md:gap-6 mb-4 md:mb-6">
<div class="w-16 h-16 md:w-24 md:h-24 bg-gradient-to-br from-[#3A66FF] to-[#5B7FFF] rounded-xl md:rounded-2xl flex items-center justify-center flex-shrink-0">
<span class="text-white text-2xl md:text-4xl">SK</span>
</div>
<div class="flex-grow">
<h3 class="text-xl font-semibold text-gray-900">Sarah Kim</h3>
<p class="text-gray-500">Senior Full Stack Engineer</p>
<div class="flex items-center gap-4 mt-4">
<span class="text-gray-600 flex items-center gap-2">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-map-pin"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path><circle cx="12" cy="10" r="3"></circle></svg>
San Francisco, CA
</span>
</div>
</div>
</div>
<p class="text-gray-700">
This section is based on an incomplete code snippet. More details would appear here if the full code was available.
</p>
</div>
</div>
</div>
</div>
</div> </div>
</main> </main>
</div> </div>

View File

@ -5,6 +5,83 @@ if (!isset($_SESSION['user_id'])) {
exit; exit;
} }
require_once 'db/config.php'; require_once 'db/config.php';
$cases = [
[
'id' => 'HR-2024-1847',
'title' => 'Manager Conflict Resolution',
'status' => 'in-review',
'severity' => 'high',
'department' => 'Engineering',
'assignedTo' => 'Jennifer Smith',
'lastUpdate' => '2 hours ago',
'comments' => 8
],
[
'id' => 'HR-2024-1852',
'title' => 'Benefits Inquiry - Health Insurance',
'status' => 'open',
'severity' => 'low',
'department' => 'Sales',
'assignedTo' => 'Michael Torres',
'lastUpdate' => '4 hours ago',
'comments' => 3
],
[
'id' => 'HR-2024-1855',
'title' => 'Remote Work Policy Question',
'status' => 'open',
'severity' => 'medium',
'department' => 'Product',
'assignedTo' => 'Sarah Anderson',
'lastUpdate' => '1 day ago',
'comments' => 5
],
[
'id' => 'HR-2024-1860',
'title' => 'Performance Review Discussion',
'status' => 'in-review',
'severity' => 'medium',
'department' => 'Marketing',
'assignedTo' => 'Jennifer Smith',
'lastUpdate' => '1 day ago',
'comments' => 12
],
[
'id' => 'HR-2024-1863',
'title' => 'Workplace Accommodation Request',
'status' => 'open',
'severity' => 'high',
'department' => 'Engineering',
'assignedTo' => 'Michael Torres',
'lastUpdate' => '2 days ago',
'comments' => 6
]
];
function get_severity_badge($severity) {
switch (strtolower($severity)) {
case 'high':
return 'bg-red-100 text-red-800';
case 'medium':
return 'bg-yellow-100 text-yellow-800';
case 'low':
return 'bg-green-100 text-green-800';
default:
return 'bg-gray-100 text-gray-800';
}
}
function get_status_badge($status) {
switch (strtolower($status)) {
case 'in-review':
return 'bg-blue-100 text-blue-800';
case 'open':
return 'bg-gray-200 text-gray-800';
default:
return 'bg-gray-100 text-gray-800';
}
}
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
@ -18,12 +95,125 @@ require_once 'db/config.php';
<div class="flex h-screen bg-gray-200"> <div class="flex h-screen bg-gray-200">
<?php include '_sidebar.php'; ?> <?php include '_sidebar.php'; ?>
<!-- Main content --> <div class="flex-1 flex flex-col overflow-hidden">
<main class="flex-1 overflow-x-hidden overflow-y-auto bg-[#fafafa]"> <main class="flex-1 overflow-x-hidden overflow-y-auto bg-gray-100">
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8 py-8"> <div class="container mx-auto px-6 py-8">
<h1 class="text-3xl font-bold text-gray-900">HR Cases</h1> <div class="flex flex-col md:flex-row gap-6">
<!-- Left Column: Case Details -->
<div id="case-details-container" class="w-full md:w-1/2 lg:w-3/5">
<div class="bg-white rounded-2xl shadow-sm p-6">
<div class="flex justify-between items-start mb-4">
<div>
<h2 id="case-details-title" class="text-2xl font-bold text-gray-800">Case Details</h2>
<p id="case-details-id" class="text-sm text-gray-500"></p>
</div>
</div>
<div class="flex flex-col md:flex-row h-full bg-[#fafafa] overflow-hidden">
<div class="hidden md:block w-80 flex-shrink-0 overflow-y-auto p-6 border-r border-gray-200">
<div class="placeholder bg-gray-200 animate-pulse rounded-lg p-6 h-full">
<h3 class="font-bold text-lg text-gray-700 mb-4">Case Sidebar</h3>
</div>
</div>
<div class="flex-1 overflow-y-auto">
<div class="max-w-5xl mx-auto px-4 md:px-6 py-4 md:py-8">
<div class="placeholder bg-gray-200 animate-pulse rounded-lg p-6 h-48 mb-6">
<h3 class="font-bold text-lg text-gray-700 mb-4">Case Header</h3>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 md:gap-6">
<div class="placeholder bg-gray-200 animate-pulse rounded-lg p-6 h-96">
<h3 class="font-bold text-lg text-gray-700 mb-4">Timeline Section</h3>
</div>
<div class="placeholder bg-gray-200 animate-pulse rounded-lg p-6 h-96">
<h3 class="font-bold text-lg text-gray-700 mb-4">Comments Section</h3>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Right Column: Cases List -->
<div class="w-full md:w-1/2 lg:w-2/5">
<div class="bg-white rounded-2xl shadow-sm border-gray-200 p-6">
<div class="flex items-center justify-between mb-4">
<h3 class="flex items-center gap-2 font-bold text-xl text-gray-800">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-6 h-6 text-[#3A66FF]"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg>
HR Cases This Week
</h3>
<span class="bg-[#3A66FF]/10 text-[#3A66FF] hover:bg-[#3A66FF]/20 font-semibold text-sm px-2 py-1 rounded-md">
<?php echo count($cases); ?> active
</span>
</div>
<div class="space-y-3">
<?php foreach ($cases as $case): ?>
<a href="#" class="case-link block p-4 bg-gray-50 rounded-xl border border-gray-200 hover:border-[#3A66FF]/30 transition-colors cursor-pointer" data-case-id="<?php echo htmlspecialchars($case['id']); ?>">
<div class="flex items-start justify-between mb-3">
<div class="flex-1">
<div class="flex items-center gap-2 mb-1">
<p class="font-bold text-gray-900 hover:text-[#3A66FF] transition-colors"><?php echo htmlspecialchars($case['title']); ?></p>
</div>
<p class="text-xs text-gray-500"><?php echo htmlspecialchars($case['id']); ?></p>
</div>
<div class="flex items-center gap-2">
<span class="text-xs font-semibold px-2 py-1 rounded-full <?php echo get_severity_badge($case['severity']); ?>"><?php echo htmlspecialchars(ucfirst($case['severity'])); ?></span>
<span class="text-xs font-semibold px-2 py-1 rounded-md <?php echo get_status_badge($case['status']); ?>"><?php echo htmlspecialchars(str_replace('-', ' ', ucfirst($case['status']))); ?></span>
</div>
</div>
<div class="flex items-center justify-between text-sm text-gray-600">
<p>Assigned to: <span class="font-semibold text-gray-800"><?php echo htmlspecialchars($case['assignedTo']); ?></span></p>
<div class="flex items-center gap-4">
<div class="flex items-center gap-1 text-gray-500">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-4 h-4"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg>
<span><?php echo htmlspecialchars($case['lastUpdate']); ?></span>
</div>
<div class="flex items-center gap-1 text-gray-500">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-4 h-4"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg>
<span><?php echo htmlspecialchars($case['comments']); ?></span>
</div>
</div>
</div>
</a>
<?php endforeach; ?>
</div>
</div>
</div>
</div>
</div> </div>
</main> </main>
</div> </div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function () {
const caseLinks = document.querySelectorAll('.case-link');
const detailsContainer = document.getElementById('case-details-container');
const detailsId = document.getElementById('case-details-id');
const casesData = <?php echo json_encode($cases); ?>;
const casesMap = new Map(casesData.map(c => [c.id, c]));
// Show first case by default
const firstCaseId = casesData[0].id;
const firstCaseData = casesMap.get(firstCaseId);
document.getElementById('case-details-title').textContent = firstCaseData.title;
detailsId.textContent = firstCaseData.id;
caseLinks.forEach(link => {
link.addEventListener('click', function (e) {
e.preventDefault();
const caseId = this.dataset.caseId;
const caseData = casesMap.get(caseId);
if (caseData) {
document.getElementById('case-details-title').textContent = caseData.title;
detailsId.textContent = caseData.id;
}
});
});
});
</script>
</body> </body>
</html> </html>