From e3b85bf808eed869ed65b7c09998064c5f0b3adb Mon Sep 17 00:00:00 2001 From: diminator Date: Wed, 26 Aug 2015 12:51:25 +0200 Subject: [PATCH] removed loadPieceList from shortlist in detail --- .../ascribe_forms/form_loan_request_answer.js | 2 +- .../components/ascribe_detail/prize_piece_container.js | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/js/components/ascribe_forms/form_loan_request_answer.js b/js/components/ascribe_forms/form_loan_request_answer.js index b695213c..e1a0f5db 100644 --- a/js/components/ascribe_forms/form_loan_request_answer.js +++ b/js/components/ascribe_forms/form_loan_request_answer.js @@ -74,7 +74,7 @@ let LoanRequestAnswerForm = React.createClass({ message={''} id={this.props.id} url={this.props.url} - email={""} + email={this.state.loanRequest.new_owner} gallery={this.state.loanRequest.gallery} showPassword={true} showPersonalMessage={false} diff --git a/js/components/whitelabel/prize/components/ascribe_detail/prize_piece_container.js b/js/components/whitelabel/prize/components/ascribe_detail/prize_piece_container.js index 9e76bdb4..443c22de 100644 --- a/js/components/whitelabel/prize/components/ascribe_detail/prize_piece_container.js +++ b/js/components/whitelabel/prize/components/ascribe_detail/prize_piece_container.js @@ -16,7 +16,6 @@ import PrizeRatingActions from '../../actions/prize_rating_actions'; import PrizeRatingStore from '../../stores/prize_rating_store'; import UserStore from '../../../../../stores/user_store'; -import WhitelabelStore from '../../../../../stores/whitelabel_store'; import Piece from '../../../../../components/ascribe_detail/piece'; import Note from '../../../../../components/ascribe_detail/note'; @@ -189,8 +188,7 @@ let PrizePieceRatings = React.createClass({ getInitialState() { return mergeOptions( PieceListStore.getState(), - PrizeRatingStore.getState(), - WhitelabelStore.getState() + PrizeRatingStore.getState() ); }, @@ -199,7 +197,6 @@ let PrizePieceRatings = React.createClass({ PrizeRatingActions.fetchOne(this.props.piece.id); PrizeRatingActions.fetchAverage(this.props.piece.id); PieceListStore.listen(this.onChange); - WhitelabelStore.listen(this.onChange); }, componentWillUnmount() { @@ -210,7 +207,6 @@ let PrizePieceRatings = React.createClass({ PrizeRatingActions.updateRating({}); PrizeRatingStore.unlisten(this.onChange); PieceListStore.unlisten(this.onChange); - WhitelabelStore.unlisten(this.onChange); }, // The StarRating component does not have a property that lets us set @@ -255,7 +251,7 @@ let PrizePieceRatings = React.createClass({ 'Please accept the loan request to proceed\n\nBest regards,\n\nSluice.'} id={{piece_id: this.props.piece.id}} url={ApiUrls.ownership_loans_pieces_request} - email={this.state.whitelabel.user} + email={this.props.currentUser.email} gallery={this.props.piece.prize.name} startdate={today} enddate={endDate} @@ -270,8 +266,6 @@ let PrizePieceRatings = React.createClass({ handleLoanRequestSuccess(){}, refreshPieceData() { - PieceListActions.fetchPieceList(this.state.page, this.state.pageSize, this.state.search, - this.state.orderBy, this.state.orderAsc, this.state.filterBy); this.props.loadPiece(); },