Commit a07f07c7 authored by Oleksii Savran's avatar Oleksii Savran

Fix: Request for material

parent 77c11c18
...@@ -21,6 +21,8 @@ class StepperPage extends StepperPageTemplate<DiversityTree, any> { ...@@ -21,6 +21,8 @@ class StepperPage extends StepperPageTemplate<DiversityTree, any> {
protected static needs = [ protected static needs = [
({params: {uuid}}) => uuid ? withPermissionCheck('write')(loadDivTree(uuid)) : null, ({params: {uuid}}) => uuid ? withPermissionCheck('write')(loadDivTree(uuid)) : null,
]; ];
protected onPublish = null; // override
} }
const mapStateToProps = (state, ownProps) => ({ const mapStateToProps = (state, ownProps) => ({
......
...@@ -140,7 +140,7 @@ class StepperTemplate<T, P> extends React.Component<IStepperProps<StepperUnionTy ...@@ -140,7 +140,7 @@ class StepperTemplate<T, P> extends React.Component<IStepperProps<StepperUnionTy
} }
public render() { public render() {
const {uuid, apiCall, pageTitle, route, match, steps, path, location, showHeader = true, t, progress = null, withoutApiCall = false, publishItem} = this.props; const {uuid, apiCall, pageTitle, route, match, steps, path, location, showHeader = true, t, progress = null, withoutApiCall = false} = this.props;
if (!apiCall && !withoutApiCall) { if (!apiCall && !withoutApiCall) {
return <Loading/> return <Loading/>
} }
...@@ -169,7 +169,7 @@ class StepperTemplate<T, P> extends React.Component<IStepperProps<StepperUnionTy ...@@ -169,7 +169,7 @@ class StepperTemplate<T, P> extends React.Component<IStepperProps<StepperUnionTy
t, t,
progress, progress,
onDelete: this.onDelete, onDelete: this.onDelete,
onPublish: !!publishItem ? this.onPublish : null, onPublish: !!this.onPublish ? this.onPublish : null, // for DiversityTree, it has only 2 publish states
onUnpublish: this.onUnpublish, onUnpublish: this.onUnpublish,
onApprove: this.onApprove, onApprove: this.onApprove,
onGotoStep: this.gotoStep, onGotoStep: this.gotoStep,
......
...@@ -78,7 +78,7 @@ class VocabularyEditPage extends React.Component<IVocabularyEditPageProps, any> ...@@ -78,7 +78,7 @@ class VocabularyEditPage extends React.Component<IVocabularyEditPageProps, any>
public componentDidMount() { public componentDidMount() {
const { uuid, apiCall, loadVocabulary, myPartners, loadMyPartners } = this.props; const { uuid, apiCall, loadVocabulary, myPartners, loadMyPartners } = this.props;
const { data: vocabulary } = apiCall || { ta: undefined }; const { data: vocabulary } = apiCall || { data: undefined };
if (!myPartners || myPartners.length === 0) { if (!myPartners || myPartners.length === 0) {
loadMyPartners(); loadMyPartners();
......
Markdown is supported
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