diff --git a/apps/web/app/constants.ts b/apps/web/app/constants.ts index 3fe5fe151..edc6b00cd 100644 --- a/apps/web/app/constants.ts +++ b/apps/web/app/constants.ts @@ -166,6 +166,12 @@ export const APPLICATION_LANGUAGES_CODE = [ 'es' ]; +export enum KanbanTabs { + TODAY = 'TODAY', + YESTERDAY = 'YESTERDAY', + TOMORROW = 'TOMORROW' +} + export enum IssuesView { CARDS = 'CARDS', TABLE = 'TABLE', diff --git a/apps/web/components/ui/data-table.tsx b/apps/web/components/ui/data-table.tsx index 048181208..0351af56c 100644 --- a/apps/web/components/ui/data-table.tsx +++ b/apps/web/components/ui/data-table.tsx @@ -12,42 +12,26 @@ import { getPaginationRowModel, getSortedRowModel, useReactTable -} from "@tanstack/react-table" +} from '@tanstack/react-table'; -import { - Table, - TableHeader, - TableRow, - TableHead, - TableCell, - TableBody, - TableFooter, -} from './table'; +import { Table, TableHeader, TableRow, TableHead, TableCell, TableBody, TableFooter } from './table'; interface DataTableProps { - columns: ColumnDef[] - data: TData[], - footerRows?: React.ReactNode[], + columns: ColumnDef[]; + data: TData[]; + footerRows?: React.ReactNode[]; isError?: boolean; noResultsMessage?: { heading: string; content: string; - } + }; } -function DataTable({ - columns, - data, - footerRows, -}: DataTableProps) { - - const [rowSelection, setRowSelection] = React.useState({}) - const [columnVisibility, setColumnVisibility] = - React.useState({}) - const [columnFilters, setColumnFilters] = React.useState( - [] - ) - const [sorting, setSorting] = React.useState([]) +function DataTable({ columns, data, footerRows }: DataTableProps) { + const [rowSelection, setRowSelection] = React.useState({}); + const [columnVisibility, setColumnVisibility] = React.useState({}); + const [columnFilters, setColumnFilters] = React.useState([]); + const [sorting, setSorting] = React.useState([]); const table = useReactTable({ data, @@ -56,7 +40,7 @@ function DataTable({ sorting, columnVisibility, rowSelection, - columnFilters, + columnFilters }, enableRowSelection: true, onRowSelectionChange: setRowSelection, @@ -68,8 +52,8 @@ function DataTable({ getPaginationRowModel: getPaginationRowModel(), getSortedRowModel: getSortedRowModel(), getFacetedRowModel: getFacetedRowModel(), - getFacetedUniqueValues: getFacetedUniqueValues(), - }) + getFacetedUniqueValues: getFacetedUniqueValues() + }); return ( diff --git a/apps/web/components/ui/svgs/vertificalline.tsx b/apps/web/components/ui/svgs/vertificalline.tsx new file mode 100644 index 000000000..ab86ac679 --- /dev/null +++ b/apps/web/components/ui/svgs/vertificalline.tsx @@ -0,0 +1,9 @@ +export default function VerticalLine() { + return ( + <> + + + + + ) +} \ No newline at end of file diff --git a/apps/web/components/ui/table.tsx b/apps/web/components/ui/table.tsx index e59990b4f..9f104cba0 100644 --- a/apps/web/components/ui/table.tsx +++ b/apps/web/components/ui/table.tsx @@ -1,115 +1,76 @@ -import * as React from "react" +import * as React from 'react'; import { clsxm } from '@app/utils'; +const Table = React.forwardRef>( + ({ className, ...props }, ref) => ( +
+
+ + ) +); +Table.displayName = 'Table'; -const Table = React.forwardRef< - HTMLTableElement, - React.HTMLAttributes ->(({ className, ...props }, ref) => ( -
-
- -)) -Table.displayName = "Table" +const TableHeader = React.forwardRef>( + ({ className, ...props }, ref) => +); +TableHeader.displayName = 'TableHeader'; -const TableHeader = React.forwardRef< - HTMLTableSectionElement, - React.HTMLAttributes ->(({ className, ...props }, ref) => ( - -)) -TableHeader.displayName = "TableHeader" +const TableBody = React.forwardRef>( + ({ className, ...props }, ref) => ( + + ) +); +TableBody.displayName = 'TableBody'; -const TableBody = React.forwardRef< - HTMLTableSectionElement, - React.HTMLAttributes ->(({ className, ...props }, ref) => ( - -)) -TableBody.displayName = "TableBody" +const TableFooter = React.forwardRef>( + ({ className, ...props }, ref) => ( + + ) +); +TableFooter.displayName = 'TableFooter'; -const TableFooter = React.forwardRef< - HTMLTableSectionElement, - React.HTMLAttributes ->(({ className, ...props }, ref) => ( - -)) -TableFooter.displayName = "TableFooter" +const TableRow = React.forwardRef>( + ({ className, ...props }, ref) => ( + + ) +); +TableRow.displayName = 'TableRow'; -const TableRow = React.forwardRef< - HTMLTableRowElement, - React.HTMLAttributes ->(({ className, ...props }, ref) => ( - -)) -TableRow.displayName = "TableRow" +const TableHead = React.forwardRef>( + ({ className, ...props }, ref) => ( +
+ ) +); +TableHead.displayName = 'TableHead'; -const TableHead = React.forwardRef< - HTMLTableCellElement, - React.ThHTMLAttributes ->(({ className, ...props }, ref) => ( - -)) -TableHead.displayName = "TableHead" +const TableCell = React.forwardRef>( + ({ className, ...props }, ref) => ( + + ) +); +TableCell.displayName = 'TableCell'; -const TableCell = React.forwardRef< - HTMLTableCellElement, - React.TdHTMLAttributes ->(({ className, ...props }, ref) => ( - -)) -TableCell.displayName = "TableCell" +const TableCaption = React.forwardRef>( + ({ className, ...props }, ref) => ( +
+ ) +); +TableCaption.displayName = 'TableCaption'; -const TableCaption = React.forwardRef< - HTMLTableCaptionElement, - React.HTMLAttributes ->(({ className, ...props }, ref) => ( - -)) -TableCaption.displayName = "TableCaption" - -export { - Table, - TableHeader, - TableBody, - TableFooter, - TableHead, - TableRow, - TableCell, - TableCaption, -} +export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption }; diff --git a/apps/web/lib/components/Kanban.tsx b/apps/web/lib/components/Kanban.tsx index aff2213ec..cc336dfc2 100644 --- a/apps/web/lib/components/Kanban.tsx +++ b/apps/web/lib/components/Kanban.tsx @@ -239,7 +239,7 @@ export const EmptyKanbanDroppable = ({index,title, items}: { {...provided.dragHandleProps} aria-label={`${title}`} > - + {title} @@ -248,12 +248,7 @@ export const EmptyKanbanDroppable = ({index,title, items}: { - + : null diff --git a/apps/web/lib/components/kanban-card.tsx b/apps/web/lib/components/kanban-card.tsx index d10eb2586..c1e33aa82 100644 --- a/apps/web/lib/components/kanban-card.tsx +++ b/apps/web/lib/components/kanban-card.tsx @@ -90,7 +90,7 @@ function TagList({tags}: { } -const stackImages = (index: number, length: number) => { +export const stackImages = (index: number, length: number) => { const imageRadius = 20; const total_length = ((length+1) * imageRadius); @@ -178,7 +178,7 @@ export default function Item(props: any) { aria-label={`${item.status.name} ${item.content}`} >
-
+
{item.tags && ( )} @@ -189,17 +189,19 @@ export default function Item(props: any) { } rounded-sm mr-1`}/> #{item.number} - {item.title} + + {item.title} +
-
+
-
+
{item.status === TaskStatus.INPROGRESS ? (
@@ -214,18 +216,18 @@ export default function Item(props: any) { )}
-
+
{item.members.map((option: any, index: number)=> { return ( +
{`${option.user.firstName} +
) })}
diff --git a/apps/web/lib/components/pagination.tsx b/apps/web/lib/components/pagination.tsx index b5b862589..710e361c1 100644 --- a/apps/web/lib/components/pagination.tsx +++ b/apps/web/lib/components/pagination.tsx @@ -16,7 +16,10 @@ export function Paginate({ total, itemsPerPage = 10, onPageChange, itemOffset, e const pageCount: number = Math.ceil(total / itemsPerPage); return ( -
+