2022-11-13 10:29:25 +00:00
|
|
|
import { CellProps, Column } from 'react-table';
|
2022-11-28 02:00:28 +00:00
|
|
|
import { Clock } from 'lucide-react';
|
2022-11-13 10:29:25 +00:00
|
|
|
|
|
|
|
import { Job } from '@/react/nomad/types';
|
|
|
|
|
|
|
|
export const actions: Column<Job> = {
|
|
|
|
Header: 'Job Actions',
|
|
|
|
id: 'actions',
|
|
|
|
disableFilters: true,
|
|
|
|
canHide: true,
|
|
|
|
disableResizing: true,
|
|
|
|
width: '110px',
|
|
|
|
sortType: 'string',
|
|
|
|
Filter: () => null,
|
|
|
|
Cell: ActionsCell,
|
|
|
|
};
|
|
|
|
|
|
|
|
export function ActionsCell({ row }: CellProps<Job>) {
|
|
|
|
return (
|
|
|
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
|
|
<div className="text-center" {...row.getToggleRowExpandedProps()}>
|
2022-11-28 02:00:28 +00:00
|
|
|
<Clock className="lucide" />
|
2022-11-13 10:29:25 +00:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|