Revolutionizing Industries with Drone Technology
At Fadaka, we are transforming industries across Africa with advanced drone technology, powered by Artificial Intelligence and precision engineering. Our drones are designed for a wide range of applications, including security surveillance, delivery services, mapping, and high-quality filming.
Discover the key advantages of our drone solutions:
- Security Surveillance: Real-time monitoring with advanced sensors and AI analytics for enhanced safety.
- Delivery Services: Efficient, automated solutions for logistics and timely deliveries.
- Mapping & Filming: High-resolution aerial imaging for mapping, inspections, and cinematic projects.
- Precision Engineering: Robust construction and smart technology integration for optimal performance.
Unlock new possibilities by integrating drone solutions into your business. Whether you're looking to enhance security, streamline logistics, or capture stunning aerial footage, Fadaka provides cutting-edge drone technology to meet your needs.
// Chat Functions
function toggleChat() {
const chatContainer = document.getElementById('chat-container');
chatContainer.style.display = chatContainer.style.display === 'none' ? 'flex' : 'none';
if (chatContainer.style.display === 'flex') {
document.getElementById('chat-input').focus();
}
}
function loadChatHistory() {
const user = firebase.auth().currentUser;
if (!user) return;
firebase.firestore().collection('users').doc(user.uid).collection('chatMessages')
.orderBy('timestamp', 'asc')
.get()
.then((querySnapshot) => {
chatMessages = [];
if (!querySnapshot.empty) {
querySnapshot.forEach((doc) => {
chatMessages.push(doc.data());
});
// Display chat messages
const chatMessagesDiv = document.getElementById('chat-messages');
chatMessagesDiv.innerHTML = '';
// Add welcome message
const welcomeMessage = document.createElement('div');
welcomeMessage.className = 'chat-message admin';
welcomeMessage.textContent = 'Hello! How can I help you today?';
chatMessagesDiv.appendChild(welcomeMessage);
// Add user messages
chatMessages.forEach((message) => {
const messageDiv = document.createElement('div');
messageDiv.className = `chat-message ${message.sender}`;
messageDiv.textContent = message.text;
chatMessagesDiv.appendChild(messageDiv);
});
// Scroll to bottom
chatMessagesDiv.scrollTop = chatMessagesDiv.scrollHeight;
}
})
.catch((error) => {
console.error("Error loading chat history:", error);
});
}
function handleChatKeyPress(event) {
if (event.key === 'Enter') {
sendChatMessage();
event.preventDefault();
}
}
function sendChatMessage() {
const input = document.getElementById('chat-input');
const message = input.value.trim();
if (!message) return;
// Clear input
input.value = '';
// Add user message to chat
addChatMessage('user', message);
// Simulate admin response after a delay
setTimeout(() => {
let response = "Thank you for your message. A support agent will get back to you soon.";
// Simple keyword responses
if (message.toLowerCase().includes('hello') || message.toLowerCase().includes('hi')) {
response = "Hello! How can I assist you today?";
} else if (message.toLowerCase().includes('help')) {
response = "I'd be happy to help. Please let me know what specific assistance you need with our services.";
} else if (message.toLowerCase().includes('iot') || message.toLowerCase().includes('device')) {
response = "For IoT device support, please check our IoT section or provide more details about your specific device issue.";
} else if (message.toLowerCase().includes('security') || message.toLowerCase().includes('alert')) {
response = "Security is our top priority. If you're experiencing security issues, please provide more details or check your security alerts section.";
}
addChatMessage('admin', response);
}, 1000);
}
function addChatMessage(sender, text) {
const user = firebase.auth().currentUser;
// Create message object
const message = {
sender: sender,
text: text,
timestamp: new Date()
};
// Add to UI
const chatMessages = document.getElementById('chat-messages');
const messageDiv = document.createElement('div');
messageDiv.className = `chat-message ${sender}`;
messageDiv.textContent = text;
chatMessages.appendChild(messageDiv);
// Scroll to bottom
chatMessages.scrollTop = chatMessages.scrollHeight;
// Store in Firestore if user is logged in
if (user) {
firebase.firestore().collection('users').doc(user.uid).collection('chatMessages').add(message)
.catch((error) => {
console.error("Error adding chat message:", error);
});
}
// If this is a user message, add activity
if (sender === 'user') {
addActivity('chat', 'You sent a message to support');
}
}