Commit 28fd23c9 authored by Mohammad Nakhaee's avatar Mohammad Nakhaee
Browse files

Remove the old EditMetadata dialog

parent 8dedf223
Pipeline #119179 passed with stages
in 26 minutes and 32 seconds
This diff is collapsed.
...@@ -25,7 +25,6 @@ import { ...@@ -25,7 +25,6 @@ import {
Datatable, DatatablePagePagination, DatatableTable, Datatable, DatatablePagePagination, DatatableTable,
DatatableToolbar, DatatableToolbarActions } from '../datatable/Datatable' DatatableToolbar, DatatableToolbarActions } from '../datatable/Datatable'
import EntryDownloadButton from '../entry/EntryDownloadButton' import EntryDownloadButton from '../entry/EntryDownloadButton'
import EditUserMetadataDialog from '../entry/EditUserMetadataDialog'
import Quantity from '../Quantity' import Quantity from '../Quantity'
import {uploadPageContext} from './UploadPage' import {uploadPageContext} from './UploadPage'
import EditMetaDataDialog from '../entry/EditMetaDataDialog' import EditMetaDataDialog from '../entry/EditMetaDataDialog'
...@@ -87,7 +86,7 @@ const defaultSelectedColumns = [ ...@@ -87,7 +86,7 @@ const defaultSelectedColumns = [
export default function ProcessingTable(props) { export default function ProcessingTable(props) {
const [selected, setSelected] = useState([]) const [selected, setSelected] = useState([])
const {data, pagination, onPaginationChanged} = props const {pagination} = props
const {upload, isWriter} = useContext(uploadPageContext) const {upload, isWriter} = useContext(uploadPageContext)
const selectedQuery = useMemo(() => { const selectedQuery = useMemo(() => {
...@@ -107,14 +106,6 @@ export default function ProcessingTable(props) { ...@@ -107,14 +106,6 @@ export default function ProcessingTable(props) {
<DatatableToolbarActions selection> <DatatableToolbarActions selection>
<EntryDownloadButton tooltip="Download files" query={selectedQuery} /> <EntryDownloadButton tooltip="Download files" query={selectedQuery} />
{isWriter && <EditMetaDataDialog isIcon selectedEntries={selectedQuery}/>} {isWriter && <EditMetaDataDialog isIcon selectedEntries={selectedQuery}/>}
{isWriter && <EditUserMetadataDialog
example={selected === 'all' ? data[0] : selected[0]}
query={selectedQuery}
total={pagination.total}
onEditComplete={() => onPaginationChanged({...pagination})} // simply trigger a refresh
buttonProps={{variant: 'contained', color: 'primary', disabled: upload?.process_running}}
withoutLiftEmbargo={!upload.published}
/>}
</DatatableToolbarActions> </DatatableToolbarActions>
</DatatableToolbar> </DatatableToolbar>
<DatatableTable actions={EntryRowActions} details={EntryDetails}> <DatatableTable actions={EntryRowActions} details={EntryDetails}>
......
...@@ -37,7 +37,6 @@ import WithButton from '../utils/WithButton' ...@@ -37,7 +37,6 @@ import WithButton from '../utils/WithButton'
import PublishedIcon from '@material-ui/icons/Public' import PublishedIcon from '@material-ui/icons/Public'
import UnPublishedIcon from '@material-ui/icons/AccountCircle' import UnPublishedIcon from '@material-ui/icons/AccountCircle'
import Markdown from '../Markdown' import Markdown from '../Markdown'
import EditUserMetadataDialog from '../entry/EditUserMetadataDialog'
import EditMembersDialog from '../entry/EditMembersDialog' import EditMembersDialog from '../entry/EditMembersDialog'
import EditMetaDataDialog from '../entry/EditMetaDataDialog' import EditMetaDataDialog from '../entry/EditMetaDataDialog'
import Page from '../Page' import Page from '../Page'
...@@ -511,15 +510,6 @@ function UploadPage() { ...@@ -511,15 +510,6 @@ function UploadPage() {
edit all entries at once. edit all entries at once.
</Typography> </Typography>
{!isEmpty && <EditMetaDataDialog selectedEntries={{'upload_id': upload.upload_id}}/>} {!isEmpty && <EditMetaDataDialog selectedEntries={{'upload_id': upload.upload_id}}/>}
{!isEmpty && <EditUserMetadataDialog
example={data.data[0].entry_metadata || {}}
query={{'upload_id': [uploadId]}}
total={data.pagination.total}
onEditComplete={() => setPagination({...pagination})}
buttonProps={{variant: 'contained', color: 'primary', disabled: isProcessing}}
text={`Edit metadata of all ${data.pagination.total} entries`}
withoutLiftEmbargo={!isPublished}
/>}
</StepContent> </StepContent>
</Step>} </Step>}
{(isAuthenticated && isWriter) && <Step expanded={!isEmpty}> {(isAuthenticated && isWriter) && <Step expanded={!isEmpty}>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment