Improve task views mobile responsiveness

This commit updates the task dashboard and assignment views for smaller screens by tightening spacing, improving text wrapping, and making filter/search controls responsive. It also refreshes the assignment detail layout with clearer date spans, team summaries, and switchable grid/list member views, while polishing client and assignment cards for better readability on mobile.
This commit is contained in:
Ichsan Kurniawan
2026-10-06 11:24:30 +07:00
parent d0db9ee429
commit 93a9b489d0
11 changed files with 449 additions and 180 deletions
@@ -71,7 +71,7 @@ export default function ClientGrid({ clients, onEdit, onDelete }: ClientGridProp
</span>
</button>
</HoverCardTrigger>
<HoverCardContent side="bottom" align='end' className="flex flex-col gap-0.5 text-sm w-68">
<HoverCardContent side="bottom" align='end' className="flex flex-col gap-0.5 text-sm w-[calc(100vw-3rem)] max-w-xs sm:w-72">
<div className="font-semibold">Status Summary</div>
<div className="text-xs text-muted-foreground">This is status summary information from WO or IM related to this client.</div>
<div className='flex flex-col mt-4 gap-3 text-xs'>
@@ -87,10 +87,10 @@ export default function ClientGrid({ clients, onEdit, onDelete }: ClientGridProp
</div>
</div>
<div className="p-5 flex flex-col flex-1 justify-between gap-4">
<div className="space-y-2">
<div className="flex items-center justify-between gap-2">
<div className="flex items-center gap-2 min-w-0">
<div className="p-4 sm:p-5 flex flex-col flex-1 justify-between gap-4 min-w-0">
<div className="space-y-2 min-w-0">
<div className="flex items-start justify-between gap-2 min-w-0">
<div className="flex flex-wrap items-center gap-1.5 min-w-0 flex-1">
{client.code && (
<span className="text-[11px] font-mono font-medium px-2 py-0.5 rounded bg-accent text-accent-foreground border border-border/60 shrink-0">
{client.code}
@@ -98,7 +98,7 @@ export default function ClientGrid({ clients, onEdit, onDelete }: ClientGridProp
)}
<Link
href={`/task/client-detail/${client.id}`}
className="font-bold text-base sm:text-lg leading-tight text-foreground hover:text-primary transition-colors truncate"
className="font-bold text-base sm:text-lg leading-tight text-foreground hover:text-primary transition-colors truncate min-w-0 max-w-full block"
>
{client.name}
</Link>
@@ -110,7 +110,7 @@ export default function ClientGrid({ clients, onEdit, onDelete }: ClientGridProp
</Link>
</div>
<p className="text-sm leading-relaxed text-muted-foreground line-clamp-3 h-16">
<p className="text-xs sm:text-sm leading-relaxed text-muted-foreground line-clamp-3 min-h-[3.75rem] wrap-break-word">
{projectCount === 0 && imCount === 0 && woCount === 0 ? (
"No active projects, internal memos, or work orders recorded for this client yet."
) : (