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 {
Datatable, DatatablePagePagination, DatatableTable,
DatatableToolbar, DatatableToolbarActions } from '../datatable/Datatable'
import EntryDownloadButton from '../entry/EntryDownloadButton'
import EditUserMetadataDialog from '../entry/EditUserMetadataDialog'
import Quantity from '../Quantity'
import {uploadPageContext} from './UploadPage'
import EditMetaDataDialog from '../entry/EditMetaDataDialog'
......@@ -87,7 +86,7 @@ const defaultSelectedColumns = [
export default function ProcessingTable(props) {
const [selected, setSelected] = useState([])
const {data, pagination, onPaginationChanged} = props
const {pagination} = props
const {upload, isWriter} = useContext(uploadPageContext)
const selectedQuery = useMemo(() => {
......@@ -107,14 +106,6 @@ export default function ProcessingTable(props) {
<DatatableToolbarActions selection>
<EntryDownloadButton tooltip="Download files" query={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>
</DatatableToolbar>
<DatatableTable actions={EntryRowActions} details={EntryDetails}>
......
......@@ -37,7 +37,6 @@ import WithButton from '../utils/WithButton'
import PublishedIcon from '@material-ui/icons/Public'
import UnPublishedIcon from '@material-ui/icons/AccountCircle'
import Markdown from '../Markdown'
import EditUserMetadataDialog from '../entry/EditUserMetadataDialog'
import EditMembersDialog from '../entry/EditMembersDialog'
import EditMetaDataDialog from '../entry/EditMetaDataDialog'
import Page from '../Page'
......@@ -511,15 +510,6 @@ function UploadPage() {
edit all entries at once.
</Typography>
{!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>
</Step>}
{(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