uix fixes for filtering
This commit is contained in:
@@ -101,15 +101,29 @@ export default function Dashboard() {
|
|||||||
const data = prepareReport(report.data.data);
|
const data = prepareReport(report.data.data);
|
||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
<Paper sx={{ m: 2, p: 2, display: "flex", gap: 2, alignItems: "center" }} elevation={0} variant="outlined">
|
<Container>
|
||||||
|
<Paper
|
||||||
|
sx={{
|
||||||
|
mt: 4,
|
||||||
|
p: 2,
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: { xs: "column", sm: "row" },
|
||||||
|
gap: 2,
|
||||||
|
alignItems: { xs: "stretch", sm: "center" },
|
||||||
|
borderRadius: 4,
|
||||||
|
mb: -2 // pull up to be closer to the dashboard container below
|
||||||
|
}}
|
||||||
|
elevation={0}
|
||||||
|
variant="outlined"
|
||||||
|
>
|
||||||
<Autocomplete
|
<Autocomplete
|
||||||
multiple
|
multiple
|
||||||
freeSolo
|
freeSolo
|
||||||
options={loadedPayees}
|
options={loadedPayees}
|
||||||
value={payeeInput}
|
value={payeeInput}
|
||||||
onChange={(_, val) => setPayeeInput(val as string[])}
|
onChange={(_, val) => setPayeeInput(val as string[])}
|
||||||
renderInput={(params) => <TextField {...params} label="Filter by Payee" size="small" />}
|
renderInput={(params) => <TextField {...params} label="Filter by Payee" />}
|
||||||
sx={{ minWidth: 250, flex: 1 }}
|
sx={{ minWidth: { sm: 250 }, flex: 1 }}
|
||||||
/>
|
/>
|
||||||
<Autocomplete
|
<Autocomplete
|
||||||
multiple
|
multiple
|
||||||
@@ -117,20 +131,23 @@ export default function Dashboard() {
|
|||||||
options={loadedTags}
|
options={loadedTags}
|
||||||
value={tagsInput}
|
value={tagsInput}
|
||||||
onChange={(_, val) => setTagsInput(val as string[])}
|
onChange={(_, val) => setTagsInput(val as string[])}
|
||||||
renderInput={(params) => <TextField {...params} label="Filter by Tags" size="small" />}
|
renderInput={(params) => <TextField {...params} label="Filter by Tags" />}
|
||||||
sx={{ minWidth: 250, flex: 1 }}
|
sx={{ minWidth: { sm: 250 }, flex: 1 }}
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
|
size="large"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setAppliedPayees(payeeInput);
|
setAppliedPayees(payeeInput);
|
||||||
setAppliedTags(tagsInput);
|
setAppliedTags(tagsInput);
|
||||||
}}
|
}}
|
||||||
disabled={isLoading}
|
disabled={isLoading}
|
||||||
|
sx={{ height: 56, borderRadius: 2 }}
|
||||||
>
|
>
|
||||||
Apply
|
Apply
|
||||||
</Button>
|
</Button>
|
||||||
</Paper>
|
</Paper>
|
||||||
|
</Container>
|
||||||
<ConfigurableDashboard
|
<ConfigurableDashboard
|
||||||
config={configuration}
|
config={configuration}
|
||||||
data={data}
|
data={data}
|
||||||
|
|||||||
Reference in New Issue
Block a user