-
-
-
- All Active Appointments
-
+ {/* Content */}
+
+
+
+ {/* Filters Section */}
+
+ {/* Date Filter */}
+
+
+
+ {showDateDropdown && (
+
+
+
+
+
+
+
+
Custom Range
+
setCustomDateRange(prev => ({ ...prev, start: e.target.value }))}
+ className="w-full px-2 py-1 text-xs bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-700 rounded mb-2 text-zinc-900 dark:text-white"
+ placeholder="Start date"
+ />
+
setCustomDateRange(prev => ({ ...prev, end: e.target.value }))}
+ className="w-full px-2 py-1 text-xs bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-700 rounded mb-2 text-zinc-900 dark:text-white"
+ placeholder="End date"
+ />
+
+
+
+ )}
+
+
+ {/* Status Filter */}
+
+
+
+ {showStatusDropdown && (
+
+ {availableStatuses.map(status => (
+
+ ))}
+
+ )}
+
+
+ {/* Clear Filters */}
+ {(dateFilter !== 'all' || statusFilter.length > 0) && (
+
+ )}
+
+ {/* Results Count */}
+
+ Showing {filteredMeetings.length} of {meetings.length} appointments
+
-
-
-
-
- | Agent |
- Customer |
- Property |
- Date & Time |
- Status |
- Actions |
-
-
-
- {filteredMeetings.length === 0 ? (
-
- |
- No appointments found matching the selected filters.
- |
-
- ) : (
- filteredMeetings.map((meeting) => (
-
-
-
-
- {meeting.agentId}
-
- Agent {meeting.agentId}
-
- |
- {meeting.customerName} |
- {meeting.propertyId} |
-
-
- {meeting.date}
- {meeting.time}
-
- |
-
-
- {meeting.status}
-
- |
-
-
-
-
-
+
+
+
+
+ All Active Appointments
+
+
- {openDropdownId === meeting.id && (
-
-
-
-
-
-
- )}
-
-
+
+
+
+
+ | Agent |
+ Customer |
+ Property |
+ Date & Time |
+ Status |
+ Actions |
+
+
+
+ {filteredMeetings.length === 0 ? (
+
+ |
+ No appointments found matching the selected filters.
|
- ))
- )}
-
-
-
+ ) : (
+ filteredMeetings.map((meeting) => (
+ |
+
+
+
+ {meeting.agentId}
+
+ Agent {meeting.agentId}
+
+ |
+ {meeting.customerName} |
+ {meeting.propertyId} |
+
+
+ {meeting.date}
+ {meeting.time}
+
+ |
+
+
+ {meeting.status}
+
+ |
+
+
+
+
+
+
+ {openDropdownId === meeting.id && (
+
+
+
+
+
+
+ )}
+
+
+ |
+
+ ))
+ )}
+
+
+
+
);
diff --git a/src/pages/AiAssistantPage.jsx b/src/pages/AiAssistantPage.jsx
new file mode 100644
index 0000000..95450bb
--- /dev/null
+++ b/src/pages/AiAssistantPage.jsx
@@ -0,0 +1,24 @@
+import React from 'react';
+import Chatbot from '../components/Chatbot';
+
+const AiAssistantPage = () => {
+ return (
+
+ );
+};
+
+export default AiAssistantPage;
diff --git a/src/pages/Landing.jsx b/src/pages/Landing.jsx
index 8422f06..ee1d87d 100644
--- a/src/pages/Landing.jsx
+++ b/src/pages/Landing.jsx
@@ -2,14 +2,13 @@ import React, { useEffect, useRef, useState } from 'react';
import Chatbot from '../components/Chatbot';
import { useAuth } from '../context/AuthContext';
import { useTheme } from '../context/ThemeContext';
-import { ArrowRight, CheckCircle2, Home, Star, ShieldCheck, Clock, Award, TrendingDown, Users, MapPin, Phone, Mail, Instagram, Twitter, Youtube, Sun, Moon, LogOut, LayoutDashboard, User, Menu, X, ChevronDown } from 'lucide-react';
+import { ArrowRight, CheckCircle2, Home, Star, ShieldCheck, Clock, Award, TrendingDown, Users, MapPin, Phone, Mail, Instagram, Twitter, Youtube, Sun, Moon, LogOut, LayoutDashboard, User, Menu, X, ChevronDown, Zap, Briefcase, Map, Tag } from 'lucide-react';
import { Link } from 'react-router-dom';
import { SpotlightCard } from '../components/SpotlightCard';
import { ComparisonSlider } from '../components/ComparisonSlider';
import Services from '../components/Services';
import IntelligenceMap from '../components/IntelligenceMap';
-import { motion, AnimatePresence } from 'framer-motion';
import gsap from 'gsap';
import { ScrollTrigger } from 'gsap/ScrollTrigger';
import Logo from '../assets/images/LynkedUp_Pro_F_logo_Y.png';
@@ -132,6 +131,20 @@ const Landing = () => {
}
};
+ // Helper to determine dashboard path based on role
+ const getDashboardPath = (role) => {
+ switch (role) {
+ case 'OWNER': return '/owner/snapshot';
+ case 'ADMIN': return '/admin/dashboard';
+ case 'CONTRACTOR': return '/contractor/dashboard';
+ case 'SUBCONTRACTOR': return '/subcontractor/dashboard';
+ case 'VENDOR': return '/vendor/dashboard';
+ case 'FIELD_AGENT': return '/emp/fa/dashboard';
+ case 'CUSTOMER': return '/portal/profile';
+ default: return '/login';
+ }
+ };
+
return (
@@ -207,7 +220,7 @@ const Landing = () => {
) : (
{user.role === 'CUSTOMER' ? 'My Profile' : 'Dashboard'}
@@ -226,16 +239,10 @@ const Landing = () => {
{/* Mobile Menu Toggle */}
-
@@ -243,109 +250,128 @@ const Landing = () => {
- {/* ── Mobile Full-Screen Overlay ── */}
-
- {isMobileMenuOpen && (
- setIsMobileMenuOpen(false)}
+ aria-hidden="true"
+ />
+ )}
+
+ {/* ── Mobile Sidebar — slides from left, mirrors Layout.jsx pattern ── */}
+
- )}
-
+ Get Started
+
+
setIsMobileMenuOpen(false)}
+ className="block w-full text-center py-3 rounded-xl text-sm font-bold border border-zinc-200 dark:border-white/10 text-zinc-700 dark:text-zinc-300 hover:bg-zinc-50 dark:hover:bg-white/5 transition-colors"
+ >
+ Sign In
+
+ >
+ ) : (
+ <>
+
setIsMobileMenuOpen(false)}
+ className="block w-full text-center py-3 rounded-xl text-sm font-bold bg-blue-500 text-white hover:bg-blue-600 transition-colors shadow-sm shadow-blue-500/25"
+ >
+ {user.role === 'CUSTOMER' ? 'My Profile' : 'Dashboard'}
+
+
setIsMobileMenuOpen(false)}
+ className="block w-full text-center py-3 rounded-xl text-sm font-bold border border-red-200 dark:border-red-500/20 text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/10 transition-colors"
+ >
+ Sign Out
+
+ >
+ )}
+
+
{/* ============================================ */}
{/* HERO SECTION — "The Overhead View" */}
@@ -409,13 +435,15 @@ const Landing = () => {
{/* B2B: Contractors */}
-
- Start Free Trial
+ See The Process
-
+
{/* Discount banner — Veterans, Seniors, Active Duty */}
diff --git a/src/pages/Login.jsx b/src/pages/Login.jsx
index 58ab28b..6367797 100644
--- a/src/pages/Login.jsx
+++ b/src/pages/Login.jsx
@@ -1,7 +1,7 @@
import React, { useState, useRef } from 'react';
import { useNavigate } from 'react-router-dom';
import { useAuth } from '../context/AuthContext';
-import { User, Briefcase, Lock, ArrowRight, AlertCircle, Home } from 'lucide-react';
+import { User, Briefcase, Lock, ArrowRight, AlertCircle, Eye, EyeOff } from 'lucide-react';
import { SpotlightCard } from '../components/SpotlightCard';
import Logo from '../assets/images/LynkedUp_Pro_F_logo_Y.png';
@@ -53,9 +53,10 @@ const RainbowButton = ({ children, onClick, type = "button", className = "" }) =
};
const Login = () => {
- const [isEmployee, setIsEmployee] = useState(false);
+ const [loginType, setLoginType] = useState('customer'); // 'customer', 'employee', 'owner', 'contractor', 'subcontractor'
const [identifier, setIdentifier] = useState('');
const [password, setPassword] = useState('');
+ const [showPassword, setShowPassword] = useState(false);
const [error, setError] = useState('');
const { login } = useAuth();
@@ -70,15 +71,28 @@ const Login = () => {
return;
}
- const type = isEmployee ? 'employee' : 'customer';
- const result = login(identifier, password, type);
+ const result = login(identifier, password, loginType);
if (result.success) {
// Role-based Redirect
- if (result.role === 'CUSTOMER') {
- navigate('/');
- } else {
- navigate('/emp/fa/dashboard');
+ switch (result.role) {
+ case 'CUSTOMER':
+ navigate('/');
+ break;
+ case 'OWNER':
+ navigate('/owner/snapshot');
+ break;
+ case 'CONTRACTOR':
+ navigate('/contractor/dashboard');
+ break;
+ case 'VENDOR':
+ navigate('/vendor/dashboard');
+ break;
+ case 'SUBCONTRACTOR':
+ navigate('/subcontractor/dashboard');
+ break;
+ default:
+ navigate('/emp/fa/dashboard'); // Default for Employee/Admin
}
} else {
setError(result.message);
@@ -87,17 +101,33 @@ const Login = () => {
const fillDemo = (role) => {
if (role === 'customer') {
- setIsEmployee(false);
+ setLoginType('customer');
setIdentifier('alice');
setPassword('password');
} else if (role === 'agent') {
- setIsEmployee(true);
+ setLoginType('employee');
setIdentifier('FA001');
setPassword('password');
} else if (role === 'admin') {
- setIsEmployee(true);
+ setLoginType('employee');
setIdentifier('ADM01');
setPassword('password');
+ } else if (role === 'owner') {
+ setLoginType('owner');
+ setIdentifier('justin');
+ setPassword('password');
+ } else if (role === 'contractor') {
+ setLoginType('contractor');
+ setIdentifier('mike');
+ setPassword('password');
+ } else if (role === 'vendor') {
+ setLoginType('vendor');
+ setIdentifier('abc_supply');
+ setPassword('password');
+ } else if (role === 'subcontractor') {
+ setLoginType('subcontractor');
+ setIdentifier('carlos');
+ setPassword('password');
}
};
@@ -110,96 +140,139 @@ const Login = () => {