2022-11-13 10:29:25 +00:00
|
|
|
import { Task } from '@/react/nomad/types';
|
|
|
|
|
2022-11-22 12:16:34 +00:00
|
|
|
import { NestedDatatable } from '@@/datatables/NestedDatatable';
|
2022-11-13 10:29:25 +00:00
|
|
|
|
|
|
|
import { useColumns } from './columns';
|
|
|
|
|
2022-11-22 12:16:34 +00:00
|
|
|
export interface Props {
|
2022-11-13 10:29:25 +00:00
|
|
|
data: Task[];
|
|
|
|
}
|
|
|
|
|
2022-11-22 12:16:34 +00:00
|
|
|
export function TasksDatatable({ data }: Props) {
|
2022-11-13 10:29:25 +00:00
|
|
|
const columns = useColumns();
|
|
|
|
|
|
|
|
return (
|
2022-11-22 12:16:34 +00:00
|
|
|
<NestedDatatable
|
|
|
|
columns={columns}
|
|
|
|
dataset={data}
|
|
|
|
defaultSortBy="taskName"
|
|
|
|
/>
|
2022-11-13 10:29:25 +00:00
|
|
|
);
|
|
|
|
}
|