diff --git a/frontend/src/components/task/task-filters.tsx b/frontend/src/components/task/task-filters.tsx index 7f50a375..4b383a69 100644 --- a/frontend/src/components/task/task-filters.tsx +++ b/frontend/src/components/task/task-filters.tsx @@ -1,29 +1,22 @@ -import React, { useState , useEffect } from 'react'; -import { AppBar, Toolbar, Button, ButtonGroup, Chip} from '@material-ui/core'; -import { injectIntl, defineMessages } from 'react-intl'; +import React, { useState, useEffect } from 'react'; +import { AppBar, Toolbar, Select, MenuItem, Chip, InputLabel, OutlinedInput } from '@material-ui/core'; +import FormControl from '@mui/material/FormControl'; +import { injectIntl, defineMessages, FormattedMessage } from 'react-intl'; import { withRouter } from 'react-router-dom'; import { withStyles } from '@material-ui/core/styles'; import Labels from '../../containers/label'; import Language from '../../containers/language'; -import { get } from "lodash"; -import { connect } from "react-redux"; -import { filterTasks } from "../../actions/taskActions"; -import { backdropClasses } from "@mui/material"; const styles = (theme) => ({ - button: { - backgroundColor: theme.palette.primary.light, - }, - buttonActive: { - backgroundColor: theme.palette.primary.dark, - color: theme.palette.primary.contrastText, + select: { + backgroundColor: 'transparent', }, chip: { marginLeft: theme.spacing(1), }, chipActive: { marginLeft: theme.spacing(1), - color: theme.palette.primary.contrastText, + color: theme.palette.primary.dark, borderColor: theme.palette.primary.light, }, }); @@ -83,7 +76,8 @@ const TaskFilters: React.FC = ({ taskList.filter((task) => parseFloat(task.value) === 0).length ); }; - const handleTabChange = (event, value) => { + const handleTabChange = (event) => { + const value = event.target.value; setTaskListState({ ...taskListState, tab: value }); let filterPromise; switch (value) { @@ -107,64 +101,54 @@ const TaskFilters: React.FC = ({ }); }; - - return( - - + return ( + +
- - -
-
- -
-
- +
+
+ +
+
+ +
@@ -172,4 +156,3 @@ const TaskFilters: React.FC = ({ } export default injectIntl(withRouter(withStyles(styles)(TaskFilters))) -