@@ -36,6 +36,13 @@ import styles from './JobAnalytics.module.css';
3636import hasPermission from '../../../utils/permissions' ;
3737import { ENDPOINTS } from '../../../utils/URL' ;
3838
39+ const ROLE_OPTIONS = [
40+ 'Frontend Developer' ,
41+ 'Backend Developer' ,
42+ 'Data Analyst' ,
43+ 'Product Manager' ,
44+ 'UX Designer' ,
45+ ] ;
3946// ======================== CONFIG ========================
4047const CONFIG = {
4148 API : {
@@ -428,7 +435,7 @@ function JobAnalytics({ darkMode, role, hasPermission: hasPerm }) {
428435
429436 const [ dateRange , setDateRange ] = useState ( null ) ;
430437 const [ comparisonPeriod , setComparisonPeriod ] = useState ( 'previous-month' ) ;
431-
438+ const [ selectedRole , setSelectedRole ] = useState ( ROLE_OPTIONS [ 0 ] ) ;
432439 const { data : analyticsData , loading, error, refetch } = useAnalyticsData (
433440 dateRange ,
434441 comparisonPeriod ,
@@ -469,7 +476,7 @@ function JobAnalytics({ darkMode, role, hasPermission: hasPerm }) {
469476
470477 return (
471478 < div className = { styles . page } >
472- < header className = { styles . header } >
479+ { /* <header className={styles.header}>
473480 <h2 className={styles.title}>Job Analytics</h2>
474481 <button
475482 className={`${styles.btn} ${styles.btnPrimary}`}
@@ -479,6 +486,34 @@ function JobAnalytics({ darkMode, role, hasPermission: hasPerm }) {
479486 <RefreshCw className={loading ? styles.spin : ''} size={16} />
480487 <span>Refresh</span>
481488 </button>
489+ </header> */ }
490+ < header className = { styles . header } >
491+ < h2 className = { styles . title } > Job Analytics</ h2 >
492+
493+ < div className = { styles . headerActions } >
494+ { /* Role Dropdown */ }
495+ < select
496+ className = { `${ styles . input } ${ styles . select } ` }
497+ value = { selectedRole }
498+ onChange = { e => setSelectedRole ( e . target . value ) }
499+ >
500+ { ROLE_OPTIONS . map ( roleOption => (
501+ < option key = { roleOption } value = { roleOption } >
502+ { roleOption }
503+ </ option >
504+ ) ) }
505+ </ select >
506+
507+ { /* Refresh Button */ }
508+ < button
509+ className = { `${ styles . btn } ${ styles . btnPrimary } ` }
510+ onClick = { refetch }
511+ disabled = { loading }
512+ >
513+ < RefreshCw className = { loading ? styles . spin : '' } size = { 16 } />
514+ < span > Refresh</ span >
515+ </ button >
516+ </ div >
482517 </ header >
483518
484519 < DateRangeSelector
0 commit comments