diff --git a/app/(app)/dashboard/card/CardAvatars.tsx b/app/(app)/dashboard/card/CardAvatars.tsx
index 3f113af..9f0b7d6 100644
--- a/app/(app)/dashboard/card/CardAvatars.tsx
+++ b/app/(app)/dashboard/card/CardAvatars.tsx
@@ -24,7 +24,7 @@ interface UserAvatarProps {
}
/**
- * Renders a single user avatar circle with optional crown badge.
+ * Renders a single user avatar circle with online status and optional crown badge.
*
* @param {UserAvatarProps} props - The component props.
* @returns {JSX.Element} The rendered user avatar component.
@@ -33,6 +33,7 @@ function UserAvatar({ user, title, isCreator }: UserAvatarProps) {
const fullName = `${user.firstName} ${user.lastName}`;
const initials = getInitials(user.firstName, user.lastName);
const bgColor = user.color;
+ const isOnline = user.isOnline;
return (
+ {isOnline && (
+
+ )}
+
{isCreator && (
} [updatingTaskIds] - A set of task IDs currently undergoing updates.
* @property {(taskId: string, targetStatus: TaskStatus) => void} [onTaskMove] - Callback triggered when a task is moved to a new status column.
* @property {(taskId: string) => void} [onTaskDelete] - Callback triggered when a task deletion is requested.
*/
-export interface ColumnProps {
- id: TaskStatus;
- title: string;
- color: string;
+export interface ColumnProps extends ColumnConfig {
count: number;
tasks: Task[];
updatingTaskIds?: Set;
diff --git a/app/components/layout/UserBadge.tsx b/app/components/layout/UserBadge.tsx
index 98f7625..6cb9a73 100644
--- a/app/components/layout/UserBadge.tsx
+++ b/app/components/layout/UserBadge.tsx
@@ -1,6 +1,6 @@
/**
* @file UserBadge.tsx
- * @description Server component rendering the authenticated user profile badge with initials and name.
+ * @description Server component rendering the authenticated user profile badge with initials, name, and online status.
*/
import { auth } from "@/auth";
@@ -8,7 +8,7 @@ import { UserService } from "@/services/user.service";
import { getInitials } from "@/utils/user";
/**
- * Renders a user profile badge including an avatar initial circle with user color and full name.
+ * Renders a user profile badge including an avatar initial circle with user color, full name, and online status indicator.
*
* @async
* @returns {Promise} The rendered user badge component, or null if unauthenticated.
@@ -22,19 +22,41 @@ export default async function UserBadge() {
const fullName = `${user.firstName} ${user.lastName}`.trim();
const initials = getInitials(user.firstName, user.lastName);
- const bgColor = user.color || "bg-primary";
+ const bgColor = user.color;
+ const lastLogin = user.lastLogin;
+
+ const formattedLastLogin = new Date(lastLogin!).toLocaleString("de-DE", {
+ day: "2-digit",
+ month: "2-digit",
+ year: "numeric",
+ hour: "2-digit",
+ minute: "2-digit",
+ });
return (
-
-
- {initials}
+
+
+
{fullName}
-
Online
+
+ Online
+
);
diff --git a/app/components/ui/buttons/SignOutButton.tsx b/app/components/ui/buttons/SignOutButton.tsx
index 4398fd5..bd62a68 100644
--- a/app/components/ui/buttons/SignOutButton.tsx
+++ b/app/components/ui/buttons/SignOutButton.tsx
@@ -1,24 +1,19 @@
/**
* @file SignOutButton.tsx
- * @description Server Action-powered client component that allows users to sign out and redirect to the home page.
+ * @description Server Action-powered client component rendering a sign-out button that triggers session termination via a server action.
*/
-import { signOut } from "@/auth";
+import { handleSignOut } from "@/auth";
import { LogOut } from "lucide-react";
/**
- * Renders a sign-out button using a Server Action to securely terminate the user session.
+ * Renders a form containing a submit button to securely sign out the current user session using a server action.
*
* @returns {JSX.Element} The rendered sign-out button component.
*/
export default function SignOutButton() {
return (
-