diff --git a/public/assets/icons/arrow-down-icon.svg b/public/assets/icons/arrow-down-icon.svg new file mode 100644 index 0000000..bcb8640 --- /dev/null +++ b/public/assets/icons/arrow-down-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/assets/icons/chevron-right-icon.svg b/public/assets/icons/chevron-right-icon.svg new file mode 100644 index 0000000..ee9eac3 --- /dev/null +++ b/public/assets/icons/chevron-right-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/assets/icons/compose-icon.svg b/public/assets/icons/compose-icon.svg new file mode 100644 index 0000000..5d3863f --- /dev/null +++ b/public/assets/icons/compose-icon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/assets/icons/emoji-icon.svg b/public/assets/icons/emoji-icon.svg new file mode 100644 index 0000000..3f5c181 --- /dev/null +++ b/public/assets/icons/emoji-icon.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/public/assets/icons/gallery-icon.svg b/public/assets/icons/gallery-icon.svg new file mode 100644 index 0000000..8fccd97 --- /dev/null +++ b/public/assets/icons/gallery-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/assets/icons/gif-icon.svg b/public/assets/icons/gif-icon.svg new file mode 100644 index 0000000..6390458 --- /dev/null +++ b/public/assets/icons/gif-icon.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/public/assets/icons/search-icon.svg b/public/assets/icons/search-icon.svg new file mode 100644 index 0000000..70b69db --- /dev/null +++ b/public/assets/icons/search-icon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/assets/icons/settings-bell-icon.svg b/public/assets/icons/settings-bell-icon.svg new file mode 100644 index 0000000..892b013 --- /dev/null +++ b/public/assets/icons/settings-bell-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/assets/icons/settings-lock-icon.svg b/public/assets/icons/settings-lock-icon.svg new file mode 100644 index 0000000..05dfa28 --- /dev/null +++ b/public/assets/icons/settings-lock-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/assets/icons/settings-privacy-icon.svg b/public/assets/icons/settings-privacy-icon.svg new file mode 100644 index 0000000..9fdf7c9 --- /dev/null +++ b/public/assets/icons/settings-privacy-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/assets/icons/settings-profile-icon.svg b/public/assets/icons/settings-profile-icon.svg new file mode 100644 index 0000000..aff1b92 --- /dev/null +++ b/public/assets/icons/settings-profile-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/assets/icons/shield-verified-icon.svg b/public/assets/icons/shield-verified-icon.svg index 2c65278..97d6103 100644 --- a/public/assets/icons/shield-verified-icon.svg +++ b/public/assets/icons/shield-verified-icon.svg @@ -1,4 +1,3 @@ - - - + + diff --git a/public/assets/icons/star-outline-icon.svg b/public/assets/icons/star-outline-icon.svg new file mode 100644 index 0000000..e318905 --- /dev/null +++ b/public/assets/icons/star-outline-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/assets/icons/three-dots-icon.svg b/public/assets/icons/three-dots-icon.svg new file mode 100644 index 0000000..8629c4c --- /dev/null +++ b/public/assets/icons/three-dots-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/app/(agent)/agent/dashboard/component/ProfileCard.tsx b/src/app/(agent)/agent/dashboard/component/ProfileCard.tsx index 1d18c07..8191687 100644 --- a/src/app/(agent)/agent/dashboard/component/ProfileCard.tsx +++ b/src/app/(agent)/agent/dashboard/component/ProfileCard.tsx @@ -86,7 +86,10 @@ export function ProfileCard({ {/* Action Buttons */} - + Message - + + {/* Top row - Name, status, actions */} + + + + {name} + + + + {role} + + + {lastSeen} + + + + + + + + + + + + + {/* User profile row */} + + {/* Avatar */} + + + + + {isOnline && ( + + )} + + + {/* User info */} + + + + {name} + + + {pronouns && ( + + ({pronouns}) + + )} + + + {/* Expertise tags */} + {expertise.length > 0 && ( + + {expertise.map((tag, index) => ( + + + {tag} + + {index < expertise.length - 1 && ( + | + )} + + ))} + + )} + + + + ); +} diff --git a/src/app/(agent)/agent/message/component/ConversationItem.tsx b/src/app/(agent)/agent/message/component/ConversationItem.tsx new file mode 100644 index 0000000..54dd46d --- /dev/null +++ b/src/app/(agent)/agent/message/component/ConversationItem.tsx @@ -0,0 +1,65 @@ +'use client'; + +import Image from 'next/image'; + +interface ConversationItemProps { + id: string; + name: string; + avatar: string; + lastMessage: string; + date: string; + isOnline?: boolean; + isSelected?: boolean; + onClick?: () => void; +} + +export function ConversationItem({ + id, + name, + avatar, + lastMessage, + date, + isOnline = false, + isSelected = false, + onClick, +}: ConversationItemProps) { + return ( + + {/* Avatar with online indicator */} + + + + + {isOnline && ( + + )} + + + {/* Content */} + + + {name} + + + {lastMessage} + + + + {/* Date */} + + {date} + + + ); +} diff --git a/src/app/(agent)/agent/message/component/ConversationList.tsx b/src/app/(agent)/agent/message/component/ConversationList.tsx new file mode 100644 index 0000000..c281ab7 --- /dev/null +++ b/src/app/(agent)/agent/message/component/ConversationList.tsx @@ -0,0 +1,41 @@ +'use client'; + +import Image from 'next/image'; +import { ConversationItem } from './ConversationItem'; + +interface Conversation { + id: string; + name: string; + avatar: string; + lastMessage: string; + date: string; + isOnline?: boolean; +} + +interface ConversationListProps { + conversations: Conversation[]; + selectedId: string | null; + onSelect: (id: string) => void; +} + +export function ConversationList({ + conversations, + selectedId, + onSelect, +}: ConversationListProps) { + return ( + + {/* Scrollable conversation list */} + + {conversations.map((conversation) => ( + onSelect(conversation.id)} + /> + ))} + + + ); +} diff --git a/src/app/(agent)/agent/message/component/MessageInput.tsx b/src/app/(agent)/agent/message/component/MessageInput.tsx new file mode 100644 index 0000000..9cff087 --- /dev/null +++ b/src/app/(agent)/agent/message/component/MessageInput.tsx @@ -0,0 +1,98 @@ +'use client'; + +import Image from 'next/image'; +import { useState } from 'react'; + +interface MessageInputProps { + onSend?: (message: string) => void; +} + +export function MessageInput({ onSend }: MessageInputProps) { + const [message, setMessage] = useState(''); + + const handleSend = () => { + if (message.trim() && onSend) { + onSend(message.trim()); + setMessage(''); + } + }; + + const handleKeyDown = (e: React.KeyboardEvent) => { + if (e.key === 'Enter' && !e.shiftKey) { + e.preventDefault(); + handleSend(); + } + }; + + return ( + + {/* Text input area */} + + setMessage(e.target.value)} + onKeyDown={handleKeyDown} + placeholder="Write a Message........" + className="w-full min-h-[120px] resize-none font-serif font-normal text-[14px] leading-[19px] text-[#00293D] placeholder-[#00293D]/50 focus:outline-none" + /> + + + {/* Action bar */} + + {/* Attachment buttons */} + + + + + + + + + + + + + + + + {/* Send button and more options */} + + + Send + + + + + + + + ); +} diff --git a/src/app/(agent)/agent/message/component/index.ts b/src/app/(agent)/agent/message/component/index.ts new file mode 100644 index 0000000..9857ace --- /dev/null +++ b/src/app/(agent)/agent/message/component/index.ts @@ -0,0 +1,4 @@ +export { ConversationItem } from './ConversationItem'; +export { ConversationList } from './ConversationList'; +export { ChatHeader } from './ChatHeader'; +export { MessageInput } from './MessageInput'; diff --git a/src/app/(agent)/agent/message/page.tsx b/src/app/(agent)/agent/message/page.tsx new file mode 100644 index 0000000..a41f7da --- /dev/null +++ b/src/app/(agent)/agent/message/page.tsx @@ -0,0 +1,383 @@ +'use client'; + +import { useState } from 'react'; +import Image from 'next/image'; +import { ChatHeader, MessageInput } from './component'; + +// Custom scrollbar styles +const customScrollbarStyles = ` + .custom-scrollbar::-webkit-scrollbar { + width: 8px; + } + .custom-scrollbar::-webkit-scrollbar-track { + background: transparent; + } + .custom-scrollbar::-webkit-scrollbar-thumb { + background: rgba(0, 41, 61, 0.5); + border-radius: 10px; + } + .custom-scrollbar::-webkit-scrollbar-thumb:hover { + background: rgba(0, 41, 61, 0.7); + } +`; + +// Mock data for conversations +const conversations = [ + { + id: '1', + name: 'Pradeep Ram', + avatar: '/assets/icons/user-placeholder-icon.svg', + lastMessage: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', + date: 'Dec 4', + isOnline: true, + }, + { + id: '2', + name: 'Pradeep', + avatar: '/assets/icons/user-placeholder-icon.svg', + lastMessage: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', + date: 'Dec 4', + isOnline: true, + }, + { + id: '3', + name: 'Gokulraj', + avatar: '/assets/icons/user-placeholder-icon.svg', + lastMessage: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', + date: 'Dec 4', + isOnline: true, + }, + { + id: '4', + name: 'Suriya s', + avatar: '/assets/icons/user-placeholder-icon.svg', + lastMessage: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', + date: 'Dec 4', + isOnline: true, + }, + { + id: '5', + name: 'Sanjay', + avatar: '/assets/icons/user-placeholder-icon.svg', + lastMessage: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', + date: 'Dec 4', + isOnline: true, + }, + { + id: '6', + name: 'Pradeep Ram', + avatar: '/assets/icons/user-placeholder-icon.svg', + lastMessage: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', + date: 'Dec 4', + isOnline: false, + }, + { + id: '7', + name: 'Rahul Kumar', + avatar: '/assets/icons/user-placeholder-icon.svg', + lastMessage: 'Thanks for your help with the property listing!', + date: 'Dec 3', + isOnline: true, + }, + { + id: '8', + name: 'Anita Singh', + avatar: '/assets/icons/user-placeholder-icon.svg', + lastMessage: 'Can we schedule a viewing for tomorrow?', + date: 'Dec 3', + isOnline: false, + }, + { + id: '9', + name: 'Vikram Patel', + avatar: '/assets/icons/user-placeholder-icon.svg', + lastMessage: 'The documents have been submitted.', + date: 'Dec 2', + isOnline: true, + }, + { + id: '10', + name: 'Meera Sharma', + avatar: '/assets/icons/user-placeholder-icon.svg', + lastMessage: 'Looking forward to our meeting next week.', + date: 'Dec 2', + isOnline: false, + }, + { + id: '11', + name: 'Arjun Reddy', + avatar: '/assets/icons/user-placeholder-icon.svg', + lastMessage: 'Please send me the property details.', + date: 'Dec 1', + isOnline: true, + }, + { + id: '12', + name: 'Sneha Nair', + avatar: '/assets/icons/user-placeholder-icon.svg', + lastMessage: 'I have a few questions about the contract.', + date: 'Dec 1', + isOnline: false, + }, +]; + +// Mock data for selected user +const selectedUserData = { + name: 'Pradeep Ram', + role: 'Advisor', + lastSeen: '21h Ago', + avatar: '/assets/icons/user-placeholder-icon.svg', + isOnline: true, + pronouns: 'He/Him', + expertise: ['Sales', 'Analytics', 'Inspection', 'Residential', 'Commercial'], +}; + +// Mock messages data +const messages = [ + { + id: '1', + senderId: '1', + text: 'Hi! I saw your profile and I think you might be a great fit for what I\'m looking for.', + timestamp: '10:30 AM', + isOwn: false, + }, + { + id: '2', + senderId: 'me', + text: 'Hello! Thank you for reaching out. I\'d be happy to help. What kind of property are you looking for?', + timestamp: '10:32 AM', + isOwn: true, + }, + { + id: '3', + senderId: '1', + text: 'I\'m looking for a residential property in the downtown area. Preferably a 3-bedroom apartment with modern amenities.', + timestamp: '10:35 AM', + isOwn: false, + }, + { + id: '4', + senderId: 'me', + text: 'That sounds great! I have several listings that might interest you. Do you have a specific budget range in mind?', + timestamp: '10:38 AM', + isOwn: true, + }, + { + id: '5', + senderId: '1', + text: 'My budget is around $500,000 to $700,000. I\'m also interested in properties with good investment potential.', + timestamp: '10:40 AM', + isOwn: false, + }, + { + id: '6', + senderId: 'me', + text: 'Perfect! I have a few properties in that range. Would you like to schedule a viewing this weekend?', + timestamp: '10:42 AM', + isOwn: true, + }, + { + id: '7', + senderId: '1', + text: 'Yes, that would be great! Saturday afternoon works best for me.', + timestamp: '10:45 AM', + isOwn: false, + }, + { + id: '8', + senderId: 'me', + text: 'Saturday at 2 PM works for me. I\'ll send you the addresses and details of the properties we\'ll be visiting.', + timestamp: '10:48 AM', + isOwn: true, + }, + { + id: '9', + senderId: '1', + text: 'Sounds perfect! Looking forward to it. Thank you for your quick response.', + timestamp: '10:50 AM', + isOwn: false, + }, + { + id: '10', + senderId: 'me', + text: 'You\'re welcome! See you on Saturday. Feel free to reach out if you have any questions before then.', + timestamp: '10:52 AM', + isOwn: true, + }, +]; + +export default function MessagePage() { + const [selectedConversation, setSelectedConversation] = useState('1'); + const [searchQuery, setSearchQuery] = useState(''); + + const handleSendMessage = (message: string) => { + console.log('Sending message:', message); + // In production, this would send the message to the API + }; + + const filteredConversations = conversations.filter((conv) => + conv.name.toLowerCase().includes(searchQuery.toLowerCase()) + ); + + return ( + <> + + + {/* Header */} + + + Messaging + + + {/* Search bar */} + + + + setSearchQuery(e.target.value)} + placeholder="Search Message" + className="flex-1 font-serif font-normal text-[18px] leading-[24px] text-[#00293D] placeholder-[#00293D]/50 focus:outline-none" + /> + + + + {/* Header actions */} + + + + + + + + + + + {/* Main content */} + + {/* Left sidebar - Conversation list */} + + + {filteredConversations.map((conversation) => ( + setSelectedConversation(conversation.id)} + className={`flex items-start gap-3 p-4 border border-[#00293d]/10 rounded-[15px] cursor-pointer transition-colors ${ + selectedConversation === conversation.id ? 'bg-[#00293d]/5' : 'hover:bg-[#00293d]/5' + }`} + > + {/* Avatar with online indicator */} + + + + + {conversation.isOnline && ( + + )} + + + {/* Content */} + + + {conversation.name} + + + {conversation.lastMessage} + + + + {/* Date */} + + {conversation.date} + + + ))} + + + + {/* Right panel - Chat area */} + + {selectedConversation ? ( + <> + {/* Chat header */} + + + {/* Messages area */} + + + {messages.map((message) => ( + + + + {message.text} + + + {message.timestamp} + + + + ))} + + + {/* Scroll to bottom button */} + + + + + + + + {/* Message input */} + + > + ) : ( + + Select a conversation to start messaging + + )} + + + + > + ); +} diff --git a/src/app/(agent)/agent/settings/component/SettingsSidebar.tsx b/src/app/(agent)/agent/settings/component/SettingsSidebar.tsx new file mode 100644 index 0000000..88bbe80 --- /dev/null +++ b/src/app/(agent)/agent/settings/component/SettingsSidebar.tsx @@ -0,0 +1,133 @@ +'use client'; + +import Image from 'next/image'; +import Link from 'next/link'; +import { usePathname } from 'next/navigation'; + +interface NavItem { + label: string; + href: string; + icon: string; +} + +const navItems: NavItem[] = [ + { + label: 'Profile Settings', + href: '/agent/settings', + icon: '/assets/icons/settings-profile-icon.svg', + }, + { + label: 'Password Security', + href: '/agent/settings/password', + icon: '/assets/icons/settings-lock-icon.svg', + }, + { + label: 'Notifications', + href: '/agent/settings/notifications', + icon: '/assets/icons/settings-bell-icon.svg', + }, + { + label: 'Privacy', + href: '/agent/settings/privacy', + icon: '/assets/icons/settings-privacy-icon.svg', + }, +]; + +interface SettingsSidebarProps { + profileImage?: string; + name?: string; + title?: string; +} + +export function SettingsSidebar({ + profileImage = '/assets/icons/user-placeholder-icon.svg', + name = 'Brain Nooland', + title = 'Top Real Estate Agent', +}: SettingsSidebarProps) { + const pathname = usePathname(); + + return ( + + {/* Profile Section */} + + + + + + {name} + + + {title} + + + + {/* Divider */} + + + {/* Categories Section */} + + {/* Categories Header */} + + + Categories + + + + + {/* Navigation Items */} + + {navItems.map((item) => { + const isActive = pathname === item.href; + return ( + + + + + + {item.label} + + + ); + })} + + + + ); +} diff --git a/src/app/(agent)/agent/settings/component/index.ts b/src/app/(agent)/agent/settings/component/index.ts new file mode 100644 index 0000000..61f27d5 --- /dev/null +++ b/src/app/(agent)/agent/settings/component/index.ts @@ -0,0 +1 @@ +export { SettingsSidebar } from './SettingsSidebar'; diff --git a/src/app/(agent)/agent/settings/notifications/page.tsx b/src/app/(agent)/agent/settings/notifications/page.tsx new file mode 100644 index 0000000..f331c6c --- /dev/null +++ b/src/app/(agent)/agent/settings/notifications/page.tsx @@ -0,0 +1,206 @@ +'use client'; + +import { useState } from 'react'; +import { SettingsSidebar } from '../component/SettingsSidebar'; + +interface NotificationSetting { + id: string; + label: string; + description: string; + enabled: boolean; +} + +export default function NotificationsPage() { + const [emailNotifications, setEmailNotifications] = useState([ + { + id: 'new_leads', + label: 'New Leads', + description: 'Get notified when you receive new leads', + enabled: true, + }, + { + id: 'messages', + label: 'Messages', + description: 'Get notified when you receive new messages', + enabled: true, + }, + { + id: 'connection_requests', + label: 'Connection Requests', + description: 'Get notified about new connection requests', + enabled: true, + }, + { + id: 'property_updates', + label: 'Property Updates', + description: 'Get notified about property status changes', + enabled: false, + }, + { + id: 'marketing', + label: 'Marketing & Promotions', + description: 'Receive marketing emails and promotions', + enabled: false, + }, + ]); + + const [pushNotifications, setPushNotifications] = useState([ + { + id: 'push_messages', + label: 'Messages', + description: 'Push notifications for new messages', + enabled: true, + }, + { + id: 'push_leads', + label: 'New Leads', + description: 'Push notifications for new leads', + enabled: true, + }, + { + id: 'push_reminders', + label: 'Reminders', + description: 'Push notifications for scheduled reminders', + enabled: false, + }, + ]); + + const toggleEmailNotification = (id: string) => { + setEmailNotifications((prev) => + prev.map((item) => + item.id === id ? { ...item, enabled: !item.enabled } : item + ) + ); + }; + + const togglePushNotification = (id: string) => { + setPushNotifications((prev) => + prev.map((item) => + item.id === id ? { ...item, enabled: !item.enabled } : item + ) + ); + }; + + const handleSave = () => { + console.log('Saving notification settings:', { + emailNotifications, + pushNotifications, + }); + }; + + const ToggleSwitch = ({ + enabled, + onToggle, + }: { + enabled: boolean; + onToggle: () => void; + }) => ( + + + + ); + + return ( + + {/* Left Sidebar */} + + + {/* Main Content */} + + {/* Header Card */} + + + Notifications + + + + {/* Email Notifications */} + + + + Email Notifications + + + Manage your email notification preferences + + + + + {emailNotifications.map((item) => ( + + + + {item.label} + + + {item.description} + + + toggleEmailNotification(item.id)} + /> + + ))} + + + + {/* Push Notifications */} + + + + Push Notifications + + + Manage your push notification preferences + + + + + {pushNotifications.map((item) => ( + + + + {item.label} + + + {item.description} + + + togglePushNotification(item.id)} + /> + + ))} + + + + {/* Save Button */} + + + Save Changes + + + + + ); +} diff --git a/src/app/(agent)/agent/settings/page.tsx b/src/app/(agent)/agent/settings/page.tsx new file mode 100644 index 0000000..aba486f --- /dev/null +++ b/src/app/(agent)/agent/settings/page.tsx @@ -0,0 +1,172 @@ +'use client'; + +import { useState } from 'react'; +import Image from 'next/image'; +import { SettingsSidebar } from './component/SettingsSidebar'; + +export default function ProfileSettingsPage() { + const [formData, setFormData] = useState({ + firstName: 'Brain', + lastName: 'Nooland', + email: 'brain.nooland@email.com', + phone: '+1 (555) 123-4567', + title: 'Top Real Estate Agent', + location: 'Los Angeles, CA', + }); + + const handleChange = (field: string, value: string) => { + setFormData((prev) => ({ ...prev, [field]: value })); + }; + + const handleSave = () => { + console.log('Saving profile settings:', formData); + }; + + return ( + + {/* Left Sidebar */} + + + {/* Main Content */} + + {/* Header Card */} + + + Profile Settings + + + + {/* Profile Settings Form */} + + {/* Profile Photo Section */} + + + + + + + + + + + + Profile Photo + + + JPG, GIF or PNG. Max size 2MB + + + Upload New Photo + + + + + {/* Form Fields */} + + {/* Name Row */} + + + + First Name + + handleChange('firstName', e.target.value)} + className="w-full h-[40px] px-4 border border-[#00293D]/20 rounded-[15px] text-[14px] font-serif text-[#00293D] focus:outline-none focus:border-[#E58625]" + /> + + + + Last Name + + handleChange('lastName', e.target.value)} + className="w-full h-[40px] px-4 border border-[#00293D]/20 rounded-[15px] text-[14px] font-serif text-[#00293D] focus:outline-none focus:border-[#E58625]" + /> + + + + {/* Email */} + + + Email Address + + handleChange('email', e.target.value)} + className="w-full h-[40px] px-4 border border-[#00293D]/20 rounded-[15px] text-[14px] font-serif text-[#00293D] focus:outline-none focus:border-[#E58625]" + /> + + + {/* Phone */} + + + Phone Number + + handleChange('phone', e.target.value)} + className="w-full h-[40px] px-4 border border-[#00293D]/20 rounded-[15px] text-[14px] font-serif text-[#00293D] focus:outline-none focus:border-[#E58625]" + /> + + + {/* Title */} + + + Professional Title + + handleChange('title', e.target.value)} + className="w-full h-[40px] px-4 border border-[#00293D]/20 rounded-[15px] text-[14px] font-serif text-[#00293D] focus:outline-none focus:border-[#E58625]" + /> + + + {/* Location */} + + + Location + + handleChange('location', e.target.value)} + className="w-full h-[40px] px-4 border border-[#00293D]/20 rounded-[15px] text-[14px] font-serif text-[#00293D] focus:outline-none focus:border-[#E58625]" + /> + + + + {/* Save Button */} + + + Save Changes + + + + + + ); +} diff --git a/src/app/(agent)/agent/settings/password/page.tsx b/src/app/(agent)/agent/settings/password/page.tsx new file mode 100644 index 0000000..87d5d33 --- /dev/null +++ b/src/app/(agent)/agent/settings/password/page.tsx @@ -0,0 +1,165 @@ +'use client'; + +import { useState } from 'react'; +import { SettingsSidebar } from '../component/SettingsSidebar'; + +export default function PasswordSecurityPage() { + const [formData, setFormData] = useState({ + currentPassword: '', + newPassword: '', + confirmPassword: '', + }); + + const [showPasswords, setShowPasswords] = useState({ + current: false, + new: false, + confirm: false, + }); + + const handleChange = (field: string, value: string) => { + setFormData((prev) => ({ ...prev, [field]: value })); + }; + + const toggleShowPassword = (field: 'current' | 'new' | 'confirm') => { + setShowPasswords((prev) => ({ ...prev, [field]: !prev[field] })); + }; + + const handleSave = () => { + if (formData.newPassword !== formData.confirmPassword) { + alert('Passwords do not match'); + return; + } + console.log('Updating password'); + }; + + return ( + + {/* Left Sidebar */} + + + {/* Main Content */} + + {/* Header Card */} + + + Password Security + + + + {/* Password Form */} + + + + Change Password + + + Ensure your account is using a strong password to stay secure + + + + {/* Form Fields */} + + {/* Current Password */} + + + Current Password + + + handleChange('currentPassword', e.target.value)} + placeholder="Enter current password" + className="w-full h-[40px] px-4 pr-12 border border-[#00293D]/20 rounded-[15px] text-[14px] font-serif text-[#00293D] placeholder:text-[#00293D]/40 focus:outline-none focus:border-[#E58625]" + /> + toggleShowPassword('current')} + className="absolute right-4 top-1/2 -translate-y-1/2 text-[#00293D]/50 hover:text-[#00293D] cursor-pointer" + > + {showPasswords.current ? '🙈' : '👁️'} + + + + + {/* New Password */} + + + New Password + + + handleChange('newPassword', e.target.value)} + placeholder="Enter new password" + className="w-full h-[40px] px-4 pr-12 border border-[#00293D]/20 rounded-[15px] text-[14px] font-serif text-[#00293D] placeholder:text-[#00293D]/40 focus:outline-none focus:border-[#E58625]" + /> + toggleShowPassword('new')} + className="absolute right-4 top-1/2 -translate-y-1/2 text-[#00293D]/50 hover:text-[#00293D] cursor-pointer" + > + {showPasswords.new ? '🙈' : '👁️'} + + + + Minimum 8 characters with at least one uppercase, lowercase, and number + + + + {/* Confirm Password */} + + + Confirm New Password + + + handleChange('confirmPassword', e.target.value)} + placeholder="Confirm new password" + className="w-full h-[40px] px-4 pr-12 border border-[#00293D]/20 rounded-[15px] text-[14px] font-serif text-[#00293D] placeholder:text-[#00293D]/40 focus:outline-none focus:border-[#E58625]" + /> + toggleShowPassword('confirm')} + className="absolute right-4 top-1/2 -translate-y-1/2 text-[#00293D]/50 hover:text-[#00293D] cursor-pointer" + > + {showPasswords.confirm ? '🙈' : '👁️'} + + + + + + {/* Save Button */} + + + Update Password + + + + + {/* Two-Factor Authentication Section */} + + + + + Two-Factor Authentication + + + Add an extra layer of security to your account + + + + Enable 2FA + + + + + + ); +} diff --git a/src/app/(agent)/agent/settings/privacy/page.tsx b/src/app/(agent)/agent/settings/privacy/page.tsx new file mode 100644 index 0000000..b231110 --- /dev/null +++ b/src/app/(agent)/agent/settings/privacy/page.tsx @@ -0,0 +1,255 @@ +'use client'; + +import { useState } from 'react'; +import { SettingsSidebar } from '../component/SettingsSidebar'; + +interface PrivacySetting { + id: string; + label: string; + description: string; + value: string; + options: { value: string; label: string }[]; +} + +export default function PrivacyPage() { + const [privacySettings, setPrivacySettings] = useState([ + { + id: 'profile_visibility', + label: 'Profile Visibility', + description: 'Control who can see your profile', + value: 'public', + options: [ + { value: 'public', label: 'Public' }, + { value: 'connections', label: 'Connections Only' }, + { value: 'private', label: 'Private' }, + ], + }, + { + id: 'contact_info', + label: 'Contact Information', + description: 'Control who can see your contact details', + value: 'connections', + options: [ + { value: 'public', label: 'Public' }, + { value: 'connections', label: 'Connections Only' }, + { value: 'private', label: 'Hidden' }, + ], + }, + { + id: 'activity_status', + label: 'Activity Status', + description: 'Show when you are active on the platform', + value: 'public', + options: [ + { value: 'public', label: 'Everyone' }, + { value: 'connections', label: 'Connections Only' }, + { value: 'private', label: 'No One' }, + ], + }, + ]); + + const [dataSettings, setDataSettings] = useState({ + shareAnalytics: true, + personalizedAds: false, + thirdPartySharing: false, + }); + + const handlePrivacyChange = (id: string, value: string) => { + setPrivacySettings((prev) => + prev.map((item) => (item.id === id ? { ...item, value } : item)) + ); + }; + + const handleDataSettingChange = (key: keyof typeof dataSettings) => { + setDataSettings((prev) => ({ ...prev, [key]: !prev[key] })); + }; + + const handleSave = () => { + console.log('Saving privacy settings:', { privacySettings, dataSettings }); + }; + + const handleDeleteAccount = () => { + if (confirm('Are you sure you want to delete your account? This action cannot be undone.')) { + console.log('Deleting account'); + } + }; + + const ToggleSwitch = ({ + enabled, + onToggle, + }: { + enabled: boolean; + onToggle: () => void; + }) => ( + + + + ); + + return ( + + {/* Left Sidebar */} + + + {/* Main Content */} + + {/* Header Card */} + + + Privacy + + + + {/* Privacy Settings */} + + + + Privacy Settings + + + Control your privacy and visibility preferences + + + + + {privacySettings.map((item) => ( + + + + + {item.label} + + + {item.description} + + + handlePrivacyChange(item.id, e.target.value)} + className="h-[36px] px-4 border border-[#00293D]/20 rounded-[10px] text-[13px] font-serif text-[#00293D] focus:outline-none focus:border-[#E58625] bg-white cursor-pointer" + > + {item.options.map((option) => ( + + {option.label} + + ))} + + + + ))} + + + + {/* Data & Personalization */} + + + + Data & Personalization + + + Manage how your data is used + + + + + + + + Share Analytics + + + Help improve our service by sharing usage data + + + handleDataSettingChange('shareAnalytics')} + /> + + + + + + Personalized Ads + + + See ads tailored to your interests + + + handleDataSettingChange('personalizedAds')} + /> + + + + + + Third-Party Data Sharing + + + Allow sharing data with third-party partners + + + handleDataSettingChange('thirdPartySharing')} + /> + + + + + {/* Danger Zone */} + + + + Danger Zone + + + Irreversible and destructive actions + + + + + + + Delete Account + + + Permanently delete your account and all data + + + + Delete Account + + + + + {/* Save Button */} + + + Save Changes + + + + + ); +} diff --git a/src/components/layout/AgentHeader.tsx b/src/components/layout/AgentHeader.tsx index b1f2581..e0e34fc 100644 --- a/src/components/layout/AgentHeader.tsx +++ b/src/components/layout/AgentHeader.tsx @@ -47,31 +47,30 @@ export function AgentHeader({ userName, userEmail }: AgentHeaderProps) { {/* Right Side Icons */} - + {/* Notification Bell */} - + {/* Notification Dot */} - + {/* Profile Icon with Dropdown */} setShowProfileMenu(!showProfileMenu)} - className="w-6 h-6 rounded-full overflow-hidden hover:opacity-80 transition-opacity" + className="w-6 h-6 flex items-center justify-center hover:opacity-80 transition-opacity" >
+ {name} +
+ {lastMessage} +
+ {date} +
+ {conversation.name} +
+ {conversation.lastMessage} +
+ {conversation.date} +
+ {message.text} +
+ {message.timestamp} +
+ {title} +
+ Manage your email notification preferences +
+ {item.description} +
+ Manage your push notification preferences +
+ JPG, GIF or PNG. Max size 2MB +
+ Ensure your account is using a strong password to stay secure +
+ Minimum 8 characters with at least one uppercase, lowercase, and number +
+ Add an extra layer of security to your account +
+ Control your privacy and visibility preferences +
+ Manage how your data is used +
+ Help improve our service by sharing usage data +
+ See ads tailored to your interests +
+ Allow sharing data with third-party partners +
+ Irreversible and destructive actions +
+ Permanently delete your account and all data +