u
This commit is contained in:
@@ -13,7 +13,7 @@ import { enqueueSnackbar } from 'notistack';
|
|||||||
import BackendError from '../../components/BackendError';
|
import BackendError from '../../components/BackendError';
|
||||||
import SingleLineTextEdit from 'dashgui/SingleLineTextEdit';
|
import SingleLineTextEdit from 'dashgui/SingleLineTextEdit';
|
||||||
import FillSpace from 'dashgui/FillSpace';
|
import FillSpace from 'dashgui/FillSpace';
|
||||||
import { PanelTile, PanelTileGrid } from 'dashgui/panels';
|
import { PanelTile, PanelTileGrid, TabbedPanelTileGrid } from 'dashgui/panels';
|
||||||
import withNavigate from '../../components/withNavigate';
|
import withNavigate from '../../components/withNavigate';
|
||||||
import { backendErrorFrom } from '../../utils/backendError';
|
import { backendErrorFrom } from '../../utils/backendError';
|
||||||
import { notifyError } from '../../utils/notify';
|
import { notifyError } from '../../utils/notify';
|
||||||
@@ -69,6 +69,7 @@ class ArtikelMerkmalePage extends PureComponent {
|
|||||||
this._valSortable = null;
|
this._valSortable = null;
|
||||||
|
|
||||||
this.handleRetry = this.handleRetry.bind(this);
|
this.handleRetry = this.handleRetry.bind(this);
|
||||||
|
this.handleTabChange = this.handleTabChange.bind(this);
|
||||||
this.handleCreateAttribute = this.handleCreateAttribute.bind(this);
|
this.handleCreateAttribute = this.handleCreateAttribute.bind(this);
|
||||||
this.handleCreateValue = this.handleCreateValue.bind(this);
|
this.handleCreateValue = this.handleCreateValue.bind(this);
|
||||||
this.handleCreateProperty = this.handleCreateProperty.bind(this);
|
this.handleCreateProperty = this.handleCreateProperty.bind(this);
|
||||||
@@ -340,6 +341,15 @@ class ArtikelMerkmalePage extends PureComponent {
|
|||||||
void this.loadAll();
|
void this.loadAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleTabChange(nextTab) {
|
||||||
|
if (nextTab === 0) {
|
||||||
|
this._initAttrSortable();
|
||||||
|
this._initValSortable();
|
||||||
|
} else if (nextTab === 1) {
|
||||||
|
this._initPropSortable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
handleSelectAttribute(attrId) {
|
handleSelectAttribute(attrId) {
|
||||||
this.setState({ selectedAttributeId: attrId, valFilter: '', valPage: 1 });
|
this.setState({ selectedAttributeId: attrId, valFilter: '', valPage: 1 });
|
||||||
}
|
}
|
||||||
@@ -453,7 +463,9 @@ class ArtikelMerkmalePage extends PureComponent {
|
|||||||
: properties;
|
: properties;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PanelTileGrid>
|
<TabbedPanelTileGrid onChange={this.handleTabChange}>
|
||||||
|
{/* Tab 1: Auswahl-Merkmale & Werte */}
|
||||||
|
<PanelTileGrid icon={<StyleIcon />} text="Auswahl-Merkmale">
|
||||||
{/* Tile 1: Auswahl-Merkmale */}
|
{/* Tile 1: Auswahl-Merkmale */}
|
||||||
<PanelTile wide={2} minHeight={0} color={BLUE_PANEL}>
|
<PanelTile wide={2} minHeight={0} color={BLUE_PANEL}>
|
||||||
<Stack spacing={1.5}>
|
<Stack spacing={1.5}>
|
||||||
@@ -585,7 +597,10 @@ class ArtikelMerkmalePage extends PureComponent {
|
|||||||
)}
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
</PanelTile>
|
</PanelTile>
|
||||||
|
</PanelTileGrid>
|
||||||
|
|
||||||
|
{/* Tab 2: Text-Merkmale */}
|
||||||
|
<PanelTileGrid icon={<TuneIcon />} text="Text-Merkmale">
|
||||||
{/* Tile 3: Text-Merkmale */}
|
{/* Tile 3: Text-Merkmale */}
|
||||||
<PanelTile wide={2} minHeight={0} color={ORANGE_PANEL}>
|
<PanelTile wide={2} minHeight={0} color={ORANGE_PANEL}>
|
||||||
<Stack spacing={1.5}>
|
<Stack spacing={1.5}>
|
||||||
@@ -647,6 +662,7 @@ class ArtikelMerkmalePage extends PureComponent {
|
|||||||
</Stack>
|
</Stack>
|
||||||
</PanelTile>
|
</PanelTile>
|
||||||
</PanelTileGrid>
|
</PanelTileGrid>
|
||||||
|
</TabbedPanelTileGrid>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user