const { useEffect, useMemo, useState } = React; function LoginPage() { const [showPassword, setShowPassword] = useState(false); const [activeSlide, setActiveSlide] = useState(0); const [errorMessage, setErrorMessage] = useState(''); const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const [rememberEmail, setRememberEmail] = useState(false); const [touched, setTouched] = useState({ email: false, password: false }); const [isSubmitting, setIsSubmitting] = useState(false); const slides = [ { title: 'Organize every task clearly.', text: 'Plan, assign, and monitor work in one centralized task management system.' }, { title: 'Track progress with confidence.', text: 'Stay updated on schedules, reports, inspections, and team responsibilities.' }, { title: 'Improve coordination across teams.', text: 'Build a smoother workflow with better visibility, accountability, and communication.' } ]; const isValidEmail = useMemo(() => { return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email); }, [email]); const emailError = touched.email && email !== '' && !isValidEmail ? 'Please enter a valid email address.' : ''; const passwordError = touched.password && password === '' ? 'Password is required.' : ''; const canSubmit = isValidEmail && password.length > 0 && !isSubmitting; useEffect(() => { const params = new URLSearchParams(window.location.search); const error = params.get('error'); if (error === 'invalid') { setErrorMessage('Invalid email or password.'); } if (error === 'missing') { setErrorMessage('Please enter both email and password.'); } const savedEmail = localStorage.getItem('prism_saved_email'); if (savedEmail) { setEmail(savedEmail); setRememberEmail(true); } }, []); useEffect(() => { const timer = setInterval(() => { setActiveSlide((current) => (current + 1) % slides.length); }, 4500); return () => clearInterval(timer); }, [slides.length]); function handleSubmit(event) { setTouched({ email: true, password: true }); if (!isValidEmail || password.length === 0) { event.preventDefault(); setErrorMessage('Please check your email and password.'); return; } if (rememberEmail) { localStorage.setItem('prism_saved_email', email); } else { localStorage.removeItem('prism_saved_email'); } setErrorMessage(''); setIsSubmitting(true); } return (
PRISM
PLANNING, REPORTING, INSPECTION, SCHEDULING, and MONITORING
Precision in planning, power in monitoring.

Task Management System

Manage assignments, monitor progress, and keep your team aligned through a smarter workflow.

  • Task Tracking
  • Scheduling
  • Reporting
  • Inspection Monitoring
  • Team Coordination
{slides.map((slide, index) => (

{slide.title}

{slide.text}

))}
{slides.map((_, index) => ( ))}
PSI Logo Psy Systems and Innovations, OPC
{errorMessage && (
{errorMessage}
)}
{ setEmail(e.target.value); if (errorMessage) setErrorMessage(''); }} onBlur={() => setTouched((prev) => ({ ...prev, email: true }))} required /> {email && ( )}
{emailError &&
{emailError}
}
{ setPassword(e.target.value); if (errorMessage) setErrorMessage(''); }} onBlur={() => setTouched((prev) => ({ ...prev, password: true }))} required />
{passwordError &&
{passwordError}
}
); } const rootElement = document.getElementById('login-root'); if (rootElement) { const root = ReactDOM.createRoot(rootElement); root.render(); }