/* Scordemy v5 — Our Faculty & Subject Mentors Directory */ (() => { const D = window.SC || {}; const { useState, useEffect } = React; const { Ic, Crumb, useUI } = window; /** * Faculty Member Card Component */ function FacultyCard({ f }) { const defaultImg = (window.SCORDEMY_WORDPRESS_CONFIG ? window.SCORDEMY_WORDPRESS_CONFIG.themeUrl : '') + '/assets/v3/m/' + f.slug + '.jpg'; const [imgSrc, setImgSrc] = useState(f.image || defaultImg); return (
{f.name} { if (imgSrc !== defaultImg) setImgSrc(defaultImg); }} /> {f.featured && Lead Faculty}
{Array.isArray(f.categories) && f.categories.length > 0 ? f.categories[0] : 'Subject Mentor'}

{f.name}

{f.designation}

{f.qualifications || 'Certified Subject Mentor'}
{f.experience || 'Experienced Educator'}
{Array.isArray(f.subjects) && f.subjects.length > 0 && (
Focus:
{f.subjects.slice(0, 3).map((sub, idx) => ( {sub} ))} {f.subjects.length > 3 && ( +{f.subjects.length - 3} )}
)}

{f.biography ? (f.biography.length > 130 ? f.biography.substring(0, 130) + '...' : f.biography) : ''}

View Profile
); } /** * Main Faculty Directory Page */ function FacultyPage() { const { openTalk } = useUI ? useUI() : {}; const [facultyList, setFacultyList] = useState([]); const [stats, setStats] = useState(null); const [categories, setCategories] = useState([]); const [activeCategory, setActiveCategory] = useState(''); const [searchQ, setSearchQ] = useState(''); const [loading, setLoading] = useState(true); const loadData = () => { if (window.ScordemyAPI && window.ScordemyAPI.Faculty) { setLoading(true); window.ScordemyAPI.Faculty.getFacultyList({ category: activeCategory, search: searchQ }).then(res => { if (res && res.success) { setFacultyList(res.faculty || []); setStats(res.stats || null); if (Array.isArray(res.categories) && res.categories.length > 0) { setCategories(res.categories); } } setLoading(false); }).catch(err => { console.error('[FacultyPage] Error loading faculty:', err); setLoading(false); }); } }; useEffect(() => { loadData(); }, [activeCategory]); const handleSearchSubmit = (e) => { if (e) e.preventDefault(); loadData(); }; // Client-side quick filter const sq = searchQ.trim().toLowerCase(); const filteredList = facultyList.filter(f => { if (!sq) return true; const haystack = (f.name + ' ' + f.designation + ' ' + (f.subject || '') + ' ' + (f.qualifications || '')).toLowerCase(); return haystack.includes(sq); }); return (
{/* Page Hero */}
ACADEMIC EXCELLENCE & GUIDANCE

Learn from Educators Who Understand Your Goals

APSC interview-appeared mentors, civil service evaluators, and state record-holding educators dedicated to preparing you for Assam competitive examinations.

{/* Live KPI Statistics Banner */}
{stats ? stats.total_faculty : facultyList.length || 10} Expert Educators
{stats ? stats.subjects_covered : '25+'} Specialized Subjects
5 Lakh+ Aspirants Guided
100% Assam-Centric Pedagogy
{/* Filter & Search Bar */}
{categories.map((cat, idx) => ( ))}
setSearchQ(e.target.value)} />
{/* Faculty Grid */}
{loading ? (

Loading verified faculty profiles from WordPress...

) : filteredList.length > 0 ? (
{filteredList.map(f => ( ))}
) : (

No faculty members match your criteria

Try clearing your search query or switching categories.

)}
{/* Counselling CTA */}

Want personalized guidance for your exam?

Schedule a 1-on-1 discussion with a senior academic mentor to identify your syllabus strengths and study timeline.

); } /** * Faculty Detail Profile Page */ function FacultyDetailPage({ slug }) { const { openTalk } = useUI ? useUI() : {}; const [faculty, setFaculty] = useState(null); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); useEffect(() => { if (!slug) return; setLoading(true); if (window.ScordemyAPI && window.ScordemyAPI.Faculty) { window.ScordemyAPI.Faculty.getFacultyBySlug(slug).then(res => { if (res && res.success && res.faculty) { setFaculty(res.faculty); } else { setError('Faculty profile not found'); } setLoading(false); }).catch(err => { setError('Failed to load profile'); setLoading(false); }); } }, [slug]); if (loading) { return (

Loading educator profile...

); } if (error || !faculty) { return (

Faculty Profile Not Found

The profile you requested is not currently available.

Back to Faculty Directory
); } const defaultImg = (window.SCORDEMY_WORDPRESS_CONFIG ? window.SCORDEMY_WORDPRESS_CONFIG.themeUrl : '') + '/assets/v3/m/' + faculty.slug + '.jpg'; return (
{/* Left Column: Portrait & Credentials */}
{faculty.name} { e.currentTarget.src = defaultImg; }} />

{faculty.name}

{faculty.designation}

Verified Faculty {faculty.featured && Academic Lead}
Experience {faculty.experience}
Qualifications {faculty.qualifications}
← Back to All Faculty
{/* Right Column: Bio, Methodology & Batches */}

About {faculty.name}

{faculty.biography ? ( faculty.biography.split('\n\n').map((para, i) =>

{para}

) ) : (

Dedicated competitive educator with proven track record in Assam government exams.

)}

Subject Specializations & Curriculum Focus

{Array.isArray(faculty.subjects) && faculty.subjects.map((sub, idx) => ( {sub} ))}
{Array.isArray(faculty.categories) && faculty.categories.length > 0 && (

Exam Categories

{faculty.categories.map((cat, idx) => ( {cat} ))}
)} {Array.isArray(faculty.courses) && faculty.courses.length > 0 && (

Batches & Courses Taught

{faculty.courses.map((c, idx) => (

{c.name}

{c.price === 0 ? 'Free Course' : '₹' + c.price}
View Batch
))}
)}
); } // Export to window Object.assign(window, { FacultyCard, FacultyPage, FacultyDetailPage }); })();