File tree Expand file tree Collapse file tree
apps/codebility/app/home/admin-controls/client-tracker Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -304,7 +304,14 @@ export default function ClientTrackerContent() {
304304 </ TableRow >
305305 ) : (
306306 stats
307- . sort ( ( a , b ) => b . current_week_count - a . current_week_count )
307+ . sort ( ( a , b ) => {
308+ // Primary sort: Total all time count (descending)
309+ if ( b . total_count !== a . total_count ) {
310+ return b . total_count - a . total_count ;
311+ }
312+ // Secondary sort: Current week count (descending)
313+ return b . current_week_count - a . current_week_count ;
314+ } )
308315 . map ( ( admin ) => (
309316 < TableRow key = { admin . admin_id } className = "hover:bg-gray-50 dark:hover:bg-gray-800/50" >
310317 < TableCell className = "font-medium text-gray-900 dark:text-gray-100" >
@@ -347,7 +354,7 @@ export default function ClientTrackerContent() {
347354
348355 { /* History Dialog */ }
349356 < Dialog open = { historyDialogOpen } onOpenChange = { setHistoryDialogOpen } >
350- < DialogContent className = "sm:max-w-[700px] max-h-[80vh] overflow-y-auto" >
357+ < DialogContent className = "sm:max-w-[700px] max-h-[80vh] overflow-y-auto overflow-x-hidden " >
351358 < DialogHeader >
352359 < DialogTitle >
353360 Outreach History - { selectedAdmin ?. first_name } { selectedAdmin ?. last_name }
@@ -396,13 +403,13 @@ export default function ClientTrackerContent() {
396403 </ div >
397404
398405 { record . client_email && (
399- < p className = "text-sm text-gray-600 dark:text-gray-400 mb-1" >
406+ < p className = "text-sm text-gray-600 dark:text-gray-400 mb-1 break-all " >
400407 📧 { record . client_email }
401408 </ p >
402409 ) }
403410
404411 { record . job_link && (
405- < p className = "text-sm text-gray-600 dark:text-gray-400 mb-1" >
412+ < p className = "text-sm text-gray-600 dark:text-gray-400 mb-1 break-all " >
406413 🔗 < a
407414 href = { record . job_link }
408415 target = "_blank"
Original file line number Diff line number Diff line change @@ -54,12 +54,13 @@ export async function getAdminOutreachStats(): Promise<{
5454 // Get current week start
5555 const weekStart = getCurrentWeekStart ( ) . toISOString ( ) . split ( 'T' ) [ 0 ] ;
5656
57- // Get all admins
57+ // Get all admins (excluding inactive ones)
5858 const { data : admins , error : adminsError } = await supabase
5959 . from ( 'codev' )
6060 . select ( 'id, first_name, last_name, email_address' )
6161 . eq ( 'role_id' , 1 )
6262 . eq ( 'application_status' , 'passed' )
63+ . neq ( 'internal_status' , 'INACTIVE' )
6364 . order ( 'first_name' ) ;
6465
6566 if ( adminsError ) {
You can’t perform that action at this time.
0 commit comments