Skip to content
Snippets Groups Projects
Commit a89ffd91 authored by piotr.kupczyk@id.ethz.ch's avatar piotr.kupczyk@id.ethz.ch
Browse files

SSDM-10833 : Entity Deletion History - NG_UI - fix grid ids for the...

SSDM-10833 : Entity Deletion History - NG_UI - fix grid ids for the configuration to be properly saved
parent 0720279c
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@ import Link from '@material-ui/core/Link'
import openbis from '@src/js/services/openbis.js'
import messages from '@src/js/common/messages.js'
import date from '@src/js/common/date.js'
import ids from '@src/js/common/consts/ids.js'
import logger from '@src/js/common/logger.js'
class HistoryGrid extends React.PureComponent {
......@@ -33,7 +34,6 @@ class HistoryGrid extends React.PureComponent {
logger.log(logger.DEBUG, 'HistoryGrid.render')
const {
id,
rows,
selectedRowId,
onSelectedRowChange,
......@@ -42,9 +42,9 @@ class HistoryGrid extends React.PureComponent {
return (
<Grid
id={id}
controllerRef={controllerRef}
id={this.getId()}
header={this.getHeader()}
controllerRef={controllerRef}
columns={[
{
name: 'eventType',
......@@ -142,6 +142,16 @@ class HistoryGrid extends React.PureComponent {
)
}
getId() {
const { eventType } = this.props
if (eventType === openbis.EventType.DELETION) {
return ids.HISTORY_OF_DELETION_GRID_ID
} else if (eventType === openbis.EventType.FREEZING) {
return ids.HISTORY_OF_FREEZING_GRID_ID
}
}
getHeader() {
const { eventType } = this.props
......
......@@ -6,7 +6,6 @@ import { withStyles } from '@material-ui/core/styles'
import GridContainer from '@src/js/components/common/grid/GridContainer.jsx'
import HistoryGrid from '@src/js/components/tools/common/HistoryGrid.jsx'
import FormUtil from '@src/js/components/common/form/FormUtil.js'
import ids from '@src/js/common/consts/ids.js'
import openbis from '@src/js/services/openbis.js'
import store from '@src/js/store/store.js'
import actions from '@src/js/store/actions/actions.js'
......@@ -116,7 +115,6 @@ class HistoryForm extends React.PureComponent {
return (
<GridContainer>
<HistoryGrid
id={ids.HISTORY}
eventType={id}
rows={rows}
onRowChange={this.handleRowChange}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment