prepare( 'SELECT id, title, status, priority, due_date FROM tasks WHERE assignee_id = ? ORDER BY due_date ASC' ); $stmt->execute([$employee_id]); $tasks = $stmt->fetchAll(PDO::FETCH_ASSOC); } catch (Exception $e) { // In a real app, you'd log this error. For now, we'll just display a message. $error_message = "Error fetching tasks: " . $e->getMessage(); } // --- Helper function for styling --- function get_priority_border_class($priority) { switch (strtolower($priority)) { case 'high': return 'border-high'; case 'medium': return 'border-medium'; case 'low': return 'border-low'; default: return 'border-secondary'; } } function get_status_badge_class($status) { switch (strtolower($status)) { case 'done': return 'bg-success'; case 'in progress': return 'bg-primary'; case 'blocked': return 'bg-warning text-dark'; case 'not started': return 'bg-secondary'; default: return 'bg-light text-dark'; } } ?> My Tasks - Task Tracker '; echo ''; } // --- End Flatlogic Meta Tags --- ?>

My Tasks

All caught up!

You have no pending tasks.

Due: