Commit 4d5578e1 authored by Matija Obreza's avatar Matija Obreza

Merge branch '754-bug-request-for-material' into 'master'

Fix: Request for material

Closes #754

See merge request genesys-pgr/genesys-ui!731
parents 881ef4fc a07f07c7
......@@ -21,6 +21,8 @@ class StepperPage extends StepperPageTemplate<DiversityTree, any> {
protected static needs = [
({params: {uuid}}) => uuid ? withPermissionCheck('write')(loadDivTree(uuid)) : null,
];
protected onPublish = null; // override
}
const mapStateToProps = (state, ownProps) => ({
......
......@@ -140,7 +140,7 @@ class StepperTemplate<T, P> extends React.Component<IStepperProps<StepperUnionTy
}
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) {
return <Loading/>
}
......@@ -169,7 +169,7 @@ class StepperTemplate<T, P> extends React.Component<IStepperProps<StepperUnionTy
t,
progress,
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,
onApprove: this.onApprove,
onGotoStep: this.gotoStep,
......
......@@ -78,7 +78,7 @@ class VocabularyEditPage extends React.Component<IVocabularyEditPageProps, any>
public componentDidMount() {
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) {
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