feat: complete Phase 3 — advanced features for Casera web app
Adds sharing (residence share codes, join, user management, .casera file export/import), subscription status with feature comparison, notification preferences with bell icon, profile settings (edit info, change password, theme picker, delete account), onboarding wizard with create/join paths, enhanced dashboard with stats cards, Recharts completion chart, recent activity feed, and task report PDF download. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { Calendar, DollarSign } from "lucide-react";
|
||||
import { cn } from "@/lib/utils";
|
||||
import type { TaskResponse } from "@/lib/api/tasks";
|
||||
|
||||
interface TaskCardProps {
|
||||
task: TaskResponse;
|
||||
isDragging?: boolean;
|
||||
}
|
||||
|
||||
export function TaskCard({ task, isDragging }: TaskCardProps) {
|
||||
return (
|
||||
<Link href={`/app/tasks/${task.id}`}>
|
||||
<div
|
||||
className={cn(
|
||||
"rounded-lg border bg-card p-3 space-y-2 transition-shadow hover:shadow-md cursor-grab",
|
||||
isDragging && "shadow-lg ring-2 ring-primary"
|
||||
)}
|
||||
>
|
||||
<div className="font-medium text-sm leading-tight line-clamp-2">
|
||||
{task.title}
|
||||
</div>
|
||||
|
||||
{task.residence_name && (
|
||||
<p className="text-xs text-muted-foreground truncate">
|
||||
{task.residence_name}
|
||||
</p>
|
||||
)}
|
||||
|
||||
<div className="flex flex-wrap gap-1.5">
|
||||
{task.priority && (
|
||||
<Badge variant="outline" className="text-xs px-1.5 py-0">
|
||||
{task.priority.icon && (
|
||||
<span className="mr-0.5">{task.priority.icon}</span>
|
||||
)}
|
||||
{task.priority.name}
|
||||
</Badge>
|
||||
)}
|
||||
{task.category && (
|
||||
<Badge variant="secondary" className="text-xs px-1.5 py-0">
|
||||
{task.category.icon && (
|
||||
<span className="mr-0.5">{task.category.icon}</span>
|
||||
)}
|
||||
{task.category.name}
|
||||
</Badge>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-3 text-xs text-muted-foreground">
|
||||
{task.due_date && (
|
||||
<span className="flex items-center gap-1">
|
||||
<Calendar className="size-3" />
|
||||
{new Date(task.due_date).toLocaleDateString()}
|
||||
</span>
|
||||
)}
|
||||
{task.estimated_cost != null && task.estimated_cost > 0 && (
|
||||
<span className="flex items-center gap-1">
|
||||
<DollarSign className="size-3" />
|
||||
{task.estimated_cost.toFixed(2)}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user