Skip to content

style: apply prettier formatting for feat/tasks/improve-board-task-ui #3146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/web/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,7 @@
"task-boards": {
"name": "Name",
"board": "Board",
"progress": "Progress",
"progress": "Progress",
"tasks": "Tasks",
"status": "Status",
"last_updated": "Last Updated",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,8 @@ export function KanbanBoard({ boardId, tasks, isLoading }: Props) {
const { transform } = args;

// Get viewport bounds (safely handle SSR)
const viewportWidth = typeof window !== 'undefined' ? window.innerWidth : 1920;
const viewportWidth =
typeof window !== 'undefined' ? window.innerWidth : 1920;
const maxX = viewportWidth - 350; // Account for card width

return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,9 @@ export function TaskCard({
variant: 'destructive',
});
} finally {
setIsLoading(false);
setMenuOpen(false);
}
setIsLoading(false);
setMenuOpen(false);
}
}

async function handleDelete() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
'use client';

import { ProjectRowActions } from './row-action';
import { ColumnDef } from '@tanstack/react-table';
import { EnhancedBoard } from './types';
import { DataTableColumnHeader } from '@tuturuuu/ui/custom/tables/data-table-column-header';
import { ColumnDef } from '@tanstack/react-table';
import { Badge } from '@tuturuuu/ui/badge';
import { Progress } from '@tuturuuu/ui/progress';
import { Button } from '@tuturuuu/ui/button';
import { DataTableColumnHeader } from '@tuturuuu/ui/custom/tables/data-table-column-header';
import { ExternalLink } from '@tuturuuu/ui/icons';
import { Progress } from '@tuturuuu/ui/progress';
import moment from 'moment';
import Link from 'next/link';

Expand All @@ -29,16 +29,16 @@ export const projectColumns = (
return (
<div className="flex items-center gap-3">
{/* Department/Group Color Indicator */}
<div className="w-1 h-8 rounded-full bg-primary/20" />
<div className="h-8 w-1 rounded-full bg-primary/20" />
<div>
<Link
href={board.href}
className="font-medium hover:text-primary transition-colors hover:underline"
className="font-medium transition-colors hover:text-primary hover:underline"
>
{board.name}
</Link>
{board.groupId && (
<p className="text-xs text-muted-foreground mt-1">
<p className="mt-1 text-xs text-muted-foreground">
Group: {board.groupId}
</p>
)}
Expand All @@ -59,9 +59,9 @@ export const projectColumns = (
cell: ({ row }) => {
const completionRate = row.original.stats.completionRate;
return (
<div className="flex items-center gap-2 min-w-[120px]">
<Progress value={completionRate} className="w-16 h-2" />
<span className="text-sm font-medium min-w-[3rem]">
<div className="flex min-w-[120px] items-center gap-2">
<Progress value={completionRate} className="h-2 w-16" />
<span className="min-w-[3rem] text-sm font-medium">
{completionRate}%
</span>
</div>
Expand Down Expand Up @@ -106,20 +106,28 @@ export const projectColumns = (
</Badge>
)}
{stats.hasMultipleOverdue && (
<Badge variant="secondary" className="text-xs bg-orange-100 text-orange-800">
<Badge
variant="secondary"
className="bg-orange-100 text-xs text-orange-800"
>
Overdue
</Badge>
)}
{stats.hasWorkloadImbalance && (
<Badge variant="outline" className="text-xs border-blue-200 text-blue-700">
<Badge
variant="outline"
className="border-blue-200 text-xs text-blue-700"
>
Imbalanced
</Badge>
)}
{!stats.hasUrgentTasks && !stats.hasMultipleOverdue && !stats.hasWorkloadImbalance && (
<Badge variant="outline" className="text-xs">
Normal
</Badge>
)}
{!stats.hasUrgentTasks &&
!stats.hasMultipleOverdue &&
!stats.hasWorkloadImbalance && (
<Badge variant="outline" className="text-xs">
Normal
</Badge>
)}
</div>
);
},
Expand Down Expand Up @@ -156,7 +164,11 @@ export const projectColumns = (
return (
<div className="flex items-center gap-2">
<Link href={board.href}>
<Button variant="ghost" size="sm" className="hover:bg-primary/10 hover:text-primary">
<Button
variant="ghost"
size="sm"
className="hover:bg-primary/10 hover:text-primary"
>
<ExternalLink className="h-4 w-4" />
</Button>
</Link>
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@

Loading