1
0
mirror of https://github.com/ascribe/onion.git synced 2024-06-30 13:41:57 +02:00

fix disappearing fineuploader in additional data

This commit is contained in:
Tim Daubenschütz 2015-08-21 14:07:10 +02:00
parent 5acce27df2
commit 116cb9c2fc
3 changed files with 9 additions and 1 deletions

View File

@ -38,6 +38,7 @@ let FurtherDetailsFileuploader = React.createClass({
if (!this.props.editable && (!this.props.otherData || this.props.otherData.length === 0)) { if (!this.props.editable && (!this.props.otherData || this.props.otherData.length === 0)) {
return null; return null;
} }
let otherDataIds = this.props.otherData ? this.props.otherData.map((data)=>{return data.id; }).join() : null; let otherDataIds = this.props.otherData ? this.props.otherData.map((data)=>{return data.id; }).join() : null;
return ( return (

View File

@ -106,6 +106,7 @@ let Form = React.createClass({
if ('getFormData' in this.props){ if ('getFormData' in this.props){
data = mergeOptionsWithDuplicates(data, this.props.getFormData()); data = mergeOptionsWithDuplicates(data, this.props.getFormData());
} }
return data; return data;
}, },

View File

@ -106,6 +106,12 @@ let CylandRegisterPiece = React.createClass({
}, },
handleAdditionalDataSuccess() { handleAdditionalDataSuccess() {
// We need to refetch the piece again after submitting the additional data
// since we want it's otherData to be displayed when the user choses to click
// on the browsers back button.
PieceActions.fetchOne(this.state.piece.id);
this.refreshPieceList(); this.refreshPieceList();
this.incrementStep(); this.incrementStep();
@ -161,7 +167,7 @@ let CylandRegisterPiece = React.createClass({
let today = new Moment(); let today = new Moment();
let datetimeWhenWeAllWillBeFlyingCoolHoverboardsAndDinosaursWillLiveAgain = new Moment(); let datetimeWhenWeAllWillBeFlyingCoolHoverboardsAndDinosaursWillLiveAgain = new Moment();
datetimeWhenWeAllWillBeFlyingCoolHoverboardsAndDinosaursWillLiveAgain.add(1000, 'years'); datetimeWhenWeAllWillBeFlyingCoolHoverboardsAndDinosaursWillLiveAgain.add(1000, 'years');
console.log(this.state.piece.id)
return ( return (
<SlidesContainer <SlidesContainer
ref="slidesContainer" ref="slidesContainer"