-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #489 from digitalgreenorg/fs_eth_test
Fs eth test
- Loading branch information
Showing
29 changed files
with
1,612 additions
and
1,008 deletions.
There are no files selected for viewing
127 changes: 79 additions & 48 deletions
127
src/Components/AdminDatasetConnection/AccordionForUploadedFileDetails.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,82 @@ | ||
import { Avatar, Accordion, AccordionDetails, AccordionSummary, Divider, IconButton, ListItem, ListItemAvatar, ListItemText, Typography, Badge, LinearProgress } from '@mui/material' | ||
import React from 'react' | ||
import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; | ||
import DescriptionOutlinedIcon from '@mui/icons-material/DescriptionOutlined'; | ||
import DeleteOutlinedIcon from '@mui/icons-material/DeleteOutlined'; | ||
import { | ||
Avatar, | ||
Accordion, | ||
AccordionDetails, | ||
AccordionSummary, | ||
Divider, | ||
IconButton, | ||
ListItem, | ||
ListItemAvatar, | ||
ListItemText, | ||
Typography, | ||
} from "@mui/material"; | ||
import React from "react"; | ||
import ExpandMoreIcon from "@mui/icons-material/ExpandMore"; | ||
import DescriptionOutlinedIcon from "@mui/icons-material/DescriptionOutlined"; | ||
import DeleteOutlinedIcon from "@mui/icons-material/DeleteOutlined"; | ||
|
||
const AccordionForUploadedFileDetails = ({ data, title, deleteFunc, source, datasetname, loader }) => { | ||
console.log(data) | ||
return ( | ||
<Accordion defaultExpanded={true}> | ||
<AccordionSummary | ||
expandIcon={<ExpandMoreIcon />} | ||
aria-controls="panel1a-content" | ||
id="panel1a-header" | ||
> | ||
<Typography sx={{ width: '33%', flexShrink: 0 }}> | ||
{title} | ||
const AccordionForUploadedFileDetails = ({ | ||
data, | ||
title, | ||
deleteFunc, | ||
source, | ||
datasetname, | ||
}) => { | ||
console.log(data); | ||
return ( | ||
<Accordion defaultExpanded={true}> | ||
<AccordionSummary | ||
expandIcon={<ExpandMoreIcon />} | ||
aria-controls="panel1a-content" | ||
id="panel1a-header" | ||
> | ||
<Typography sx={{ width: "33%", flexShrink: 0 }}> | ||
{title} | ||
|
||
<sup style={{ height: "20px", width: "20px", backgroundColor: "green", color: "white", borderRadius: "10px", padding: "0px 5px", fontSize: "small", margin: "0px 5px" }}>{data?.length} </sup> | ||
</Typography> | ||
<Typography sx={{ color: 'text.secondary' }}> | ||
</Typography> | ||
</AccordionSummary> | ||
<AccordionDetails> | ||
<Typography style={{ maxHeight: "300px", overflowY: "scroll" }}> | ||
{/* <ul> */} | ||
{data?.map((item) => { | ||
console.log(data, item) | ||
return <ListItem> | ||
<ListItemAvatar> | ||
<Avatar> | ||
<DescriptionOutlinedIcon /> | ||
</Avatar> | ||
</ListItemAvatar> | ||
<ListItemText primary={item} secondary="Jan 9, 2014" /> | ||
<IconButton edge="end" aria-label="delete"> | ||
<DeleteOutlinedIcon | ||
onClick={() => deleteFunc(datasetname, source, item)} | ||
color='warning' /> | ||
</IconButton> | ||
<Divider /> | ||
</ListItem> | ||
})} | ||
{/* </ul> */} | ||
</Typography> | ||
</AccordionDetails> | ||
</Accordion> | ||
) | ||
} | ||
<sup | ||
style={{ | ||
height: "20px", | ||
width: "20px", | ||
backgroundColor: "green", | ||
color: "white", | ||
borderRadius: "10px", | ||
padding: "0px 5px", | ||
fontSize: "small", | ||
margin: "0px 5px", | ||
}} | ||
> | ||
{data?.length}{" "} | ||
</sup> | ||
</Typography> | ||
<Typography sx={{ color: "text.secondary" }}></Typography> | ||
</AccordionSummary> | ||
<AccordionDetails> | ||
<Typography style={{ maxHeight: "300px", overflowY: "scroll" }}> | ||
{/* <ul> */} | ||
{data?.map((item) => { | ||
return ( | ||
<ListItem> | ||
<ListItemAvatar> | ||
<Avatar> | ||
<DescriptionOutlinedIcon /> | ||
</Avatar> | ||
</ListItemAvatar> | ||
<ListItemText primary={item} secondary="Jan 9, 2014" /> | ||
<IconButton edge="end" aria-label="delete"> | ||
<DeleteOutlinedIcon | ||
onClick={() => deleteFunc(datasetname, source, item)} | ||
color="warning" | ||
/> | ||
</IconButton> | ||
<Divider /> | ||
</ListItem> | ||
); | ||
})} | ||
{/* </ul> */} | ||
</Typography> | ||
</AccordionDetails> | ||
</Accordion> | ||
); | ||
}; | ||
|
||
export default AccordionForUploadedFileDetails | ||
export default AccordionForUploadedFileDetails; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.