diff --git a/assets/js/main.js b/assets/js/main.js index 802412a..b9fda40 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -1,74 +1,31 @@ -// FinMox Flow main.js +document.addEventListener('DOMContentLoaded', function () { + const tabsContainer = document.querySelector('#human-in-loop-tabs'); + if (!tabsContainer) return; -document.addEventListener('DOMContentLoaded', function() { - const chatContainer = document.getElementById('chat-container'); - const chatToggle = document.getElementById('chat-toggle'); - const closeChat = document.getElementById('close-chat'); - const chatInput = document.getElementById('chat-input'); - const sendChat = document.getElementById('send-chat'); - const chatBody = document.getElementById('chat-body'); + const tabs = tabsContainer.querySelectorAll('.tab-button'); + const contents = tabsContainer.querySelectorAll('.tab-content'); - // Toggle chat window - if (chatToggle) { - chatToggle.addEventListener('click', function() { - chatContainer.style.display = (chatContainer.style.display === 'flex') ? 'none' : 'flex'; - }); - } + tabs.forEach(tab => { + tab.addEventListener('click', () => { + const target = tab.getAttribute('data-tab'); - // Close chat window - if (closeChat) { - closeChat.addEventListener('click', function() { - chatContainer.style.display = 'none'; - }); - } + // Deactivate all tabs and hide all content + tabs.forEach(t => { + t.classList.remove('active-tab', 'border-black', 'text-gray-900'); + t.classList.add('text-gray-500', 'border-transparent'); + }); + contents.forEach(c => { + c.classList.add('hidden'); + }); - // Send message - const sendMessage = () => { - const message = chatInput.value.trim(); - if (message === '') return; - - appendMessage(message, 'user'); - chatInput.value = ''; - - fetch('api/chat.php', { - method: 'POST', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify({ message: message }) - }) - .then(response => response.json()) - .then(data => { - if (data.reply) { - appendMessage(data.reply, 'ai'); - } else { - appendMessage('Sorry, something went wrong.', 'ai'); - } - }) - .catch(error => { - console.error('Error:', error); - appendMessage('Sorry, something went wrong.', 'ai'); - }); - }; - - if (sendChat) { - sendChat.addEventListener('click', sendMessage); - } - - if (chatInput) { - chatInput.addEventListener('keypress', function(e) { - if (e.key === 'Enter') { - sendMessage(); + // Activate the clicked tab and show its content + tab.classList.add('active-tab', 'border-black', 'text-gray-900'); + tab.classList.remove('text-gray-500', 'border-transparent'); + + const activeContent = tabsContainer.querySelector(`#${target}`); + if (activeContent) { + activeContent.classList.remove('hidden'); } }); - } - - // Append message to chat body - const appendMessage = (message, sender) => { - const messageElement = document.createElement('div'); - messageElement.classList.add('chat-message', `chat-message-${sender}`); - messageElement.textContent = message; - chatBody.appendChild(messageElement); - chatBody.scrollTop = chatBody.scrollHeight; // Scroll to bottom - }; -}); + }); +}); \ No newline at end of file diff --git a/assets/pasted-20251217-231721-0d7eeef8.png b/assets/pasted-20251217-231721-0d7eeef8.png new file mode 100644 index 0000000..7a2f716 Binary files /dev/null and b/assets/pasted-20251217-231721-0d7eeef8.png differ diff --git a/product.php b/product.php index f37d8af..6bd7adc 100644 --- a/product.php +++ b/product.php @@ -55,20 +55,29 @@

Human‑in‑the‑Loop Control

You review, approve, and decide — FinMox handles the busy work. No automated hiring decisions.

-
-
-

Automation

-

FinMox automates the repeatable workflow steps so your team stays focused on decision-making.

+ +
+ +
+ + +
-
-

AI Outputs

-

Human-reviewed outputs ensure quality and alignment with your company culture.

-
-
-

Security

-

Built for intentional hiring with security and privacy at the forefront.

+ + +
+
+

FinMox automates the repeatable workflow steps so your team stays focused on decision-making.

+
+ +
+ See How It Works →
@@ -86,5 +95,6 @@ +