@@ -57,8 +109,279 @@ function TaskGroupsTable(props: Props & ConnectedProps) {
error={props.groupsError}
/>
+ {!window.READ_ONLY && (
+
0}
+ iconButtonActions={[
+ {
+ tooltip: "Delete",
+ icon: ,
+ onClick: () => {}, // TODO: handleBatchDeleteClick,
+ disabled: false, //TODO: props.batchActionPending,
+ },
+ {
+ tooltip: "Archive",
+ icon: ,
+ onClick: () => {}, //TODO: handleBatchArchiveClick,
+ disabled: false, //TODO: props.batchActionPending,
+ },
+ ]}
+ menuItemActions={[
+ {
+ label: "Delete All",
+ onClick: () => {}, //TODO: handleDeleteAllClick,
+ disabled: false, // TODO: props.allActionPending,
+ },
+ {
+ label: "Archive All",
+ onClick: () => {}, // TODO: handleArchiveAllClick,
+ disabled: false, // TODO: props.allActionPending,
+ },
+ ]}
+ />
+ )}
+
+
+
+
+ {!window.READ_ONLY && (
+
+
+ 0 && numSelected < rowCount}
+ checked={rowCount > 0 && numSelected === rowCount}
+ onChange={() => {} /*TODO: handleSelectAllClick*/}
+ inputProps={{
+ "aria-label": "select all tasks shown in the table",
+ }}
+ />
+
+
+ )}
+ {columns
+ .filter((col) => {
+ // Filter out actions column in readonly mode.
+ return !window.READ_ONLY || col.key !== "actions";
+ })
+ .map((col) => (
+
+ {col.label}
+
+ ))}
+
+
+
+ {
+ /*props.tasks */ dummyTasks.map((task) => (
+ {
+ if (checked) {
+ setSelectedIds(selectedIds.concat(task.id));
+ } else {
+ setSelectedIds(
+ selectedIds.filter((id) => id !== task.id)
+ );
+ }
+ }}
+ allActionPending={false /* TODO: props.allActionPending */}
+ onDeleteClick={
+ () => {}
+ //TODO: props.deletePendingTaskAsync(queue, task.id)
+ }
+ onArchiveClick={() => {
+ // TODO: props.archivePendingTaskAsync(queue, task.id);
+ }}
+ onActionCellEnter={() => {} /*setActiveTaskId(task.id) */}
+ onActionCellLeave={() => {} /*setActiveTaskId("")*/}
+ showActions={false /*activeTaskId === task.id*/}
+ />
+ ))
+ }
+
+
+
+ {} /* handlePageChange */}
+ onRowsPerPageChange={() => {} /* handleRowsPerPageChange */}
+ ActionsComponent={TablePaginationActions}
+ className={classes.pagination}
+ />
+
+
+
+
);
}
+const useRowStyles = makeStyles((theme) => ({
+ root: {
+ cursor: "pointer",
+ "& #copy-button": {
+ display: "none",
+ },
+ "&:hover": {
+ boxShadow: theme.shadows[2],
+ "& #copy-button": {
+ display: "inline-block",
+ },
+ },
+ "&:hover $copyButton": {
+ display: "inline-block",
+ },
+ "&:hover .MuiTableCell-root": {
+ borderBottomColor: theme.palette.background.paper,
+ },
+ },
+
+ actionCell: {
+ width: "96px",
+ },
+ actionButton: {
+ marginLeft: 3,
+ marginRight: 3,
+ },
+ idCell: {
+ width: "200px",
+ },
+ copyButton: {
+ display: "none",
+ },
+ IdGroup: {
+ display: "flex",
+ alignItems: "center",
+ },
+}));
+
+interface RowProps {
+ task: TaskInfoExtended;
+ isSelected: boolean;
+ onSelectChange: (checked: boolean) => void;
+ onDeleteClick: () => void;
+ onArchiveClick: () => void;
+ allActionPending: boolean;
+ showActions: boolean;
+ onActionCellEnter: () => void;
+ onActionCellLeave: () => void;
+}
+
+function Row(props: RowProps) {
+ const { task } = props;
+ const classes = useRowStyles();
+ const history = useHistory();
+ return (
+