December 16th, 2025 - V.6

This commit is contained in:
Flatlogic Bot 2025-12-17 02:14:57 +00:00
parent 21d55d1a3c
commit cdae3463b5
15 changed files with 348 additions and 114 deletions

38
_sidebar.php Normal file
View File

@ -0,0 +1,38 @@
<?php
function render_nav_link($href, $icon, $label, $active_page) {
$active = ($href == $active_page) ? 'bg-gray-200 text-gray-900 font-semibold' : 'hover:bg-gray-200 text-gray-700';
echo "<a href=\"$href\" class=\"flex items-center py-2.5 px-4 rounded transition duration-200 $active\">";
echo "<i data-lucide=\"$icon\" class=\"w-5 h-5 mr-3\"></i>$label";
echo "</a>";
}
$current_page = basename($_SERVER['PHP_SELF']);
?>
<div class="w-64 bg-white shadow-md">
<div class="p-6">
<a href="app.php">
<img src="assets/pasted-20251120-051320-b2b0cdfa.png" alt="FinMox Logo" style="height: 32px;">
</a>
</div>
<nav class="mt-6">
<?php
render_nav_link('dashboard.php', 'layout-dashboard', 'Dashboard', $current_page);
render_nav_link('candidates.php', 'users', 'Candidates', $current_page);
render_nav_link('hr_cases.php', 'briefcase', 'HR Cases', $current_page);
render_nav_link('onboarding.php', 'clipboard-list', 'Onboarding', $current_page);
render_nav_link('employee_view.php', 'user-square', 'Employee View', $current_page);
render_nav_link('weekly_summary.php', 'bar-chart-2', 'Weekly Summary', $current_page);
render_nav_link('workflows.php', 'bot', 'Automation', $current_page);
render_nav_link('chat.php', 'sparkles', 'AI Copilot', $current_page);
render_nav_link('integrations.php', 'plug', 'Integrations', $current_page);
render_nav_link('settings.php', 'settings', 'Settings', $current_page);
?>
<a href="logout.php" class="flex items-center py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">
<i data-lucide="log-out" class="w-5 h-5 mr-3"></i>Logout
</a>
</nav>
</div>
<script src="https://unpkg.com/lucide@latest"></script>
<script>
lucide.createIcons();
</script>

17
app.php
View File

@ -35,22 +35,7 @@ $open_cases = 12;
</head>
<body class="bg-gray-100">
<div class="flex h-screen bg-gray-200">
<!-- Sidebar -->
<div class="w-64 bg-white shadow-md">
<div class="p-6">
<a href="app.php">
<img src="assets/pasted-20251120-051320-b2b0cdfa.png" alt="FinMox Logo" style="height: 32px;">
</a>
</div>
<nav class="mt-6">
<a href="dashboard.php" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">Dashboard</a>
<a href="chat.php" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">AI Copilot</a>
<a href="workflows.php" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">Workflows</a>
<a href="roles.php" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">Roles</a>
<a href="settings.php" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">Settings</a>
<a href="logout.php" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">Logout</a>
</nav>
</div>
<?php include '_sidebar.php'; ?>
<!-- Main content -->
<div class="flex-1 flex flex-col overflow-hidden">

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

29
candidates.php Normal file
View File

@ -0,0 +1,29 @@
<?php
session_start();
if (!isset($_SESSION['user_id'])) {
header('Location: login.php');
exit;
}
require_once 'db/config.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Candidates - FinMox</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-gray-100">
<div class="flex h-screen bg-gray-200">
<?php include '_sidebar.php'; ?>
<!-- Main content -->
<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">
<h1 class="text-3xl font-bold text-gray-900">Candidates</h1>
</div>
</main>
</div>
</body>
</html>

163
chat.php
View File

@ -59,35 +59,12 @@ require_once 'db/config.php';
color: #1F2937;
border: 1px solid #e5e7eb;
}
#chat-input-wrapper {
position: relative;
}
#send-btn {
position: absolute;
right: 8px;
top: 50%;
transform: translateY(-50%);
}
</style>
</head>
<body class="bg-gray-100">
<div class="flex h-screen bg-gray-200">
<!-- Sidebar -->
<div class="w-64 bg-white shadow-md flex-shrink-0">
<div class="p-6">
<a href="app.php">
<img src="assets/pasted-20251120-051320-b2b0cdfa.png" alt="FinMox Logo" style="height: 32px;">
</a>
</div>
<nav class="mt-6">
<a href="dashboard.php" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">Dashboard</a>
<a href="chat.php" class="block py-2.5 px-4 rounded transition duration-200 bg-gray-200 text-gray-900 font-semibold">AI Copilot</a>
<a href="workflows.php" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">Workflows</a>
<a href="roles.php" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">Roles</a>
<a href="settings.php" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">Settings</a>
<a href="logout.php" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">Logout</a>
</nav>
</div>
<?php include '_sidebar.php'; ?>
<!-- Main content -->
<main class="flex-1 flex flex-col overflow-hidden">
@ -140,12 +117,28 @@ require_once 'db/config.php';
<div class="typing-indicator text-sm text-gray-500 mb-2 hidden" id="typing-indicator">
AI is thinking...
</div>
<div id="chat-input-wrapper" class="relative">
<input type="text" id="chat-input" class="w-full border-gray-300 rounded-lg p-3 pr-12 text-sm focus:ring-blue-500 focus:border-blue-500" placeholder="Ask about metrics, candidates, or company policies...">
<button id="send-btn" class="bg-blue-600 text-white rounded-md p-2 hover:bg-blue-700">
<div id="chat-input-wrapper" class="flex items-center w-full bg-gray-50 border border-gray-200 rounded-lg p-2">
<div class="flex items-center gap-1">
<button id="plus-circle-btn" class="text-gray-500 hover:text-gray-700 p-2 rounded-full hover:bg-gray-200">
<i data-lucide="plus-circle" class="w-5 h-5"></i>
</button>
<button id="mic-btn" class="text-gray-500 hover:text-gray-700 p-2 rounded-full hover:bg-gray-200">
<i data-lucide="mic" class="w-5 h-5"></i>
</button>
<button id="image-btn" class="text-gray-500 hover:text-gray-700 p-2 rounded-full hover:bg-gray-200">
<i data-lucide="image" class="w-5 h-5"></i>
</button>
<button id="settings-btn" class="text-gray-500 hover:text-gray-700 p-2 rounded-full hover:bg-gray-200">
<i data-lucide="settings-2" class="w-5 h-5"></i>
</button>
</div>
<input type="text" id="chat-input" class="flex-grow bg-transparent border-none mx-2 p-2 text-sm focus:ring-0" placeholder="Ask me anything...">
<button id="send-btn" class="bg-blue-600 text-white rounded-lg p-2 hover:bg-blue-700">
<i data-lucide="send" class="w-5 h-5"></i>
</button>
</div>
<input type="file" id="file-input" class="hidden">
<input type="file" id="image-input" class="hidden" accept="image/*">
</div>
</div>
<!-- Right Tools Sidebar -->
@ -196,6 +189,30 @@ require_once 'db/config.php';
</main>
</div>
<!-- Settings Modal -->
<div id="settings-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
<div class="bg-white rounded-lg shadow-xl p-6 w-full max-w-md">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-bold text-gray-800">Settings</h3>
<button id="close-settings-modal" class="text-gray-500 hover:text-gray-800">
<i data-lucide="x" class="w-5 h-5"></i>
</button>
</div>
<div>
<p class="text-gray-600 mb-4">The following features are planned and will be available soon:</p>
<ul class="list-disc list-inside space-y-2 text-gray-700">
<li>User Profile Management</li>
<li>Notification Preferences</li>
<li>API Key Configuration (OpenAI, Google, etc.)</li>
<li>Theme Customization (Light/Dark Mode)</li>
<li>Data Export Options</li>
</ul>
</div>
</div>
</div>
<!-- Notification Container -->
<div id="notification-container" class="fixed bottom-5 right-5 flex flex-col items-end gap-2 z-50"></div>
<script>
lucide.createIcons();
@ -204,12 +221,49 @@ require_once 'db/config.php';
const sendBtn = document.getElementById('send-btn');
const typingIndicator = document.getElementById('typing-indicator');
const welcomeScreen = document.getElementById('welcome-screen');
const refreshChat = document.getElementById('refresh-chat');
const plusBtn = document.getElementById('plus-circle-btn');
const micBtn = document.getElementById('mic-btn');
const imageBtn = document.getElementById('image-btn');
const settingsBtn = document.getElementById('settings-btn');
const fileInput = document.getElementById('file-input');
const imageInput = document.getElementById('image-input');
const settingsModal = document.getElementById('settings-modal');
const closeSettingsModal = document.getElementById('close-settings-modal');
let welcomeMessageCleared = false;
function addMessage(sender, content) {
// Functions
const showNotification = (message) => {
const container = document.getElementById('notification-container');
const notification = document.createElement('div');
notification.className = 'bg-gray-800 text-white text-sm font-medium px-4 py-2 rounded-lg shadow-lg transform transition-all duration-300 ease-in-out';
notification.textContent = message;
notification.style.transform = 'translateX(100%)';
notification.style.opacity = '0';
container.appendChild(notification);
setTimeout(() => {
notification.style.transform = 'translateX(0)';
notification.style.opacity = '1';
}, 10);
setTimeout(() => {
notification.style.transform = 'translateX(100%)';
notification.style.opacity = '0';
setTimeout(() => {
if (container.contains(notification)) {
container.removeChild(notification);
}
}, 300);
}, 3000);
};
const addMessage = (sender, content, isHtml = false) => {
if (welcomeScreen && !welcomeMessageCleared) {
welcomeScreen.style.display = 'none';
chatMessages.innerHTML = ''; // Clear any lingering welcome message content if needed
chatMessages.innerHTML = '';
welcomeMessageCleared = true;
}
@ -220,10 +274,13 @@ require_once 'db/config.php';
bubble.classList.add('p-3', 'rounded-lg', 'message-bubble');
const contentContainer = document.createElement('div');
if (isHtml) {
contentContainer.innerHTML = content;
} else {
contentContainer.textContent = content;
}
bubble.appendChild(contentContainer);
if (sender === 'user') {
messageWrapper.classList.add('justify-end');
bubble.classList.add('user-message');
@ -235,9 +292,9 @@ require_once 'db/config.php';
messageWrapper.appendChild(bubble);
chatMessages.appendChild(messageWrapper);
chatMessages.scrollTop = chatMessages.scrollHeight;
}
};
async function sendMessage(messageOverride) {
const sendMessage = async (messageOverride) => {
const message = messageOverride || userInput.value.trim();
if (!message) return;
@ -270,6 +327,7 @@ require_once 'db/config.php';
}
}
// Event Listeners
sendBtn.addEventListener('click', () => sendMessage());
userInput.addEventListener('keypress', (e) => {
if (e.key === 'Enter') {
@ -278,6 +336,11 @@ require_once 'db/config.php';
}
});
refreshChat.addEventListener('click', (e) => {
e.preventDefault();
window.location.reload();
});
document.querySelectorAll('.suggestion-card').forEach(card => {
card.addEventListener('click', (e) => {
e.preventDefault();
@ -293,6 +356,40 @@ require_once 'db/config.php';
});
});
plusBtn.addEventListener('click', () => fileInput.click());
micBtn.addEventListener('click', () => showNotification('Voice input is not yet implemented.'));
imageBtn.addEventListener('click', () => imageInput.click());
settingsBtn.addEventListener('click', () => settingsModal.classList.remove('hidden'));
closeSettingsModal.addEventListener('click', () => settingsModal.classList.add('hidden'));
fileInput.addEventListener('change', (e) => {
const file = e.target.files[0];
if (file) {
addMessage('user', `Attached file: ${file.name}`);
// Handle file upload here
}
});
imageInput.addEventListener('change', (e) => {
const file = e.target.files[0];
if (file && file.type.startsWith('image/')) {
const reader = new FileReader();
reader.onload = (event) => {
const img = document.createElement('img');
img.src = event.target.result;
img.className = 'mt-2 rounded-lg max-w-xs';
const messageContent = `Attached image: ${file.name}<br>`;
addMessage('user', messageContent + img.outerHTML, true);
};
reader.readAsDataURL(file);
} else if (file) {
addMessage('user', `Attached file: ${file.name}`);
showNotification('This does not seem to be an image file.');
}
});
</script>
</body>
</html>

View File

@ -40,22 +40,7 @@ $open_cases = 12;
</head>
<body class="bg-gray-100">
<div class="flex h-screen bg-gray-200">
<!-- Sidebar -->
<div class="w-64 bg-white shadow-md">
<div class="p-6">
<a href="app.php">
<img src="assets/pasted-20251120-051320-b2b0cdfa.png" alt="FinMox Logo" style="height: 32px;">
</a>
</div>
<nav class="mt-6">
<a href="dashboard.php" class="block py-2.5 px-4 rounded transition duration-200 bg-gray-200 text-gray-900 font-semibold">Dashboard</a>
<a href="chat.php" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">Chat</a>
<a href="workflows.php" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">Workflows</a>
<a href="roles.php" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">Roles</a>
<a href="settings.php" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">Settings</a>
<a href="logout.php" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">Logout</a>
</nav>
</div>
<?php include '_sidebar.php'; ?>
<!-- Main content -->
<main class="flex-1 overflow-x-hidden overflow-y-auto bg-[#fafafa]">

29
employee_view.php Normal file
View File

@ -0,0 +1,29 @@
<?php
session_start();
if (!isset($_SESSION['user_id'])) {
header('Location: login.php');
exit;
}
require_once 'db/config.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Employee View - FinMox</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-gray-100">
<div class="flex h-screen bg-gray-200">
<?php include '_sidebar.php'; ?>
<!-- Main content -->
<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">
<h1 class="text-3xl font-bold text-gray-900">Employee View</h1>
</div>
</main>
</div>
</body>
</html>

29
hr_cases.php Normal file
View File

@ -0,0 +1,29 @@
<?php
session_start();
if (!isset($_SESSION['user_id'])) {
header('Location: login.php');
exit;
}
require_once 'db/config.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HR Cases - FinMox</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-gray-100">
<div class="flex h-screen bg-gray-200">
<?php include '_sidebar.php'; ?>
<!-- Main content -->
<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">
<h1 class="text-3xl font-bold text-gray-900">HR Cases</h1>
</div>
</main>
</div>
</body>
</html>

29
integrations.php Normal file
View File

@ -0,0 +1,29 @@
<?php
session_start();
if (!isset($_SESSION['user_id'])) {
header('Location: login.php');
exit;
}
require_once 'db/config.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Integrations - FinMox</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-gray-100">
<div class="flex h-screen bg-gray-200">
<?php include '_sidebar.php'; ?>
<!-- Main content -->
<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">
<h1 class="text-3xl font-bold text-gray-900">Integrations</h1>
</div>
</main>
</div>
</body>
</html>

29
onboarding.php Normal file
View File

@ -0,0 +1,29 @@
<?php
session_start();
if (!isset($_SESSION['user_id'])) {
header('Location: login.php');
exit;
}
require_once 'db/config.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Onboarding - FinMox</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-gray-100">
<div class="flex h-screen bg-gray-200">
<?php include '_sidebar.php'; ?>
<!-- Main content -->
<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">
<h1 class="text-3xl font-bold text-gray-900">Onboarding</h1>
</div>
</main>
</div>
</body>
</html>

View File

@ -57,22 +57,7 @@ $roles = $stmt->fetchAll();
</head>
<body class="bg-gray-100">
<div class="flex h-screen bg-gray-200">
<!-- Sidebar -->
<div class="w-64 bg-white shadow-md">
<div class="p-6">
<a href="app.php">
<img src="assets/pasted-20251120-051320-b2b0cdfa.png" alt="FinMox Logo" style="height: 32px;">
</a>
</div>
<nav class="mt-6">
<a href="dashboard.php" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">Dashboard</a>
<a href="chat.php" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">Chat</a>
<a href="workflows.php" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">Workflows</a>
<a href="roles.php" class="block py-2.5 px-4 rounded transition duration-200 bg-gray-200 text-gray-900 font-semibold">Roles</a>
<a href="settings.php" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">Settings</a>
<a href="logout.php" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">Logout</a>
</nav>
</div>
<?php include '_sidebar.php'; ?>
<!-- Main content -->
<div class="flex-1 flex flex-col overflow-hidden">

View File

@ -38,22 +38,7 @@ $users = [
</head>
<body class="bg-gray-100">
<div class="flex h-screen bg-gray-200">
<!-- Sidebar -->
<div class="w-64 bg-white shadow-md">
<div class="p-6">
<a href="app.php">
<img src="assets/pasted-20251120-051320-b2b0cdfa.png" alt="FinMox Logo" style="height: 32px;">
</a>
</div>
<nav class="mt-6">
<a href="dashboard.php" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">Dashboard</a>
<a href="chat.php" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">Chat</a>
<a href="workflows.php" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">Workflows</a>
<a href="roles.php" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">Roles</a>
<a href="settings.php" class="block py-2.5 px-4 rounded transition duration-200 bg-gray-200 text-gray-900 font-semibold">Settings</a>
<a href="logout.php" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">Logout</a>
</nav>
</div>
<?php include '_sidebar.php'; ?>
<!-- Main content -->
<div class="flex-1 flex flex-col overflow-hidden">

29
weekly_summary.php Normal file
View File

@ -0,0 +1,29 @@
<?php
session_start();
if (!isset($_SESSION['user_id'])) {
header('Location: login.php');
exit;
}
require_once 'db/config.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Weekly Summary - FinMox</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-gray-100">
<div class="flex h-screen bg-gray-200">
<?php include '_sidebar.php'; ?>
<!-- Main content -->
<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">
<h1 class="text-3xl font-bold text-gray-900">Weekly Summary</h1>
</div>
</main>
</div>
</body>
</html>

View File

@ -123,22 +123,7 @@ $workflows = $stmt->fetchAll();
</head>
<body class="bg-gray-100">
<div class="flex h-screen bg-gray-200">
<!-- Sidebar -->
<div class="w-64 bg-white shadow-md">
<div class="p-6">
<a href="app.php">
<img src="assets/pasted-20251120-051320-b2b0cdfa.png" alt="FinMox Logo" style="height: 32px;">
</a>
</div>
<nav class="mt-6">
<a href="dashboard.php" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">Dashboard</a>
<a href="chat.php" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">Chat</a>
<a href="workflows.php" class="block py-2.5 px-4 rounded transition duration-200 bg-gray-200 text-gray-900 font-semibold">Workflows</a>
<a href="roles.php" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">Roles</a>
<a href="settings.php" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">Settings</a>
<a href="logout.php" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-200 text-gray-700">Logout</a>
</nav>
</div>
<?php include '_sidebar.php'; ?>
<!-- Main content -->
<div class="flex-1 flex flex-col overflow-hidden">