mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +01:00
fixing the public note bug
This commit is contained in:
parent
3a234e42ec
commit
c0e0354ce8
@ -57,6 +57,7 @@ let PieceContainer = React.createClass({
|
|||||||
mixins: [History],
|
mixins: [History],
|
||||||
|
|
||||||
getInitialState() {
|
getInitialState() {
|
||||||
|
console.log('Piece initially ... ', PieceStore.getState());
|
||||||
return mergeOptions(
|
return mergeOptions(
|
||||||
UserStore.getState(),
|
UserStore.getState(),
|
||||||
PieceListStore.getState(),
|
PieceListStore.getState(),
|
||||||
@ -103,7 +104,6 @@ let PieceContainer = React.createClass({
|
|||||||
|
|
||||||
let pieceState = mergeOptions({}, state.piece);
|
let pieceState = mergeOptions({}, state.piece);
|
||||||
pieceState.acl.acl_loan = false;
|
pieceState.acl.acl_loan = false;
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
piece: pieceState
|
piece: pieceState
|
||||||
});
|
});
|
||||||
@ -273,14 +273,17 @@ let PieceContainer = React.createClass({
|
|||||||
currentUser={this.state.currentUser}/>
|
currentUser={this.state.currentUser}/>
|
||||||
<Note
|
<Note
|
||||||
id={this.getId}
|
id={this.getId}
|
||||||
label={getLangText('Piece note (public)')}
|
label={getLangText('Personal note (public)')}
|
||||||
defaultValue={this.state.piece.public_note || null}
|
defaultValue={this.state.piece.public_note || null}
|
||||||
placeholder={getLangText('Enter your comments ...')}
|
placeholder={getLangText('Enter your comments ...')}
|
||||||
editable={!!this.state.piece.acl.acl_edit}
|
editable={this.state.piece.acl.acl_edit}
|
||||||
successMessage={getLangText('Public piece note saved')}
|
successMessage={getLangText('Public note saved')}
|
||||||
url={ApiUrls.note_public_piece}
|
url={ApiUrls.note_public_piece}
|
||||||
currentUser={this.state.currentUser}/>
|
currentUser={this.state.currentUser}/>
|
||||||
</CollapsibleParagraph>
|
</CollapsibleParagraph>
|
||||||
|
{console.log('hey')}
|
||||||
|
{console.log(this.state.piece)}
|
||||||
|
{console.log(this.state.piece.acl.acl_edit)}
|
||||||
<CollapsibleParagraph
|
<CollapsibleParagraph
|
||||||
title={getLangText('Further Details')}
|
title={getLangText('Further Details')}
|
||||||
show={this.state.piece.acl.acl_edit
|
show={this.state.piece.acl.acl_edit
|
||||||
|
Loading…
Reference in New Issue
Block a user