mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +01:00
withdraw transfer with delete of transfer record
This commit is contained in:
parent
99d6dd278c
commit
eff25a9801
@ -203,6 +203,9 @@ let EditionSummary = React.createClass({
|
|||||||
edition: React.PropTypes.object
|
edition: React.PropTypes.object
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getTransferWithdrawData(){
|
||||||
|
return {'bitcoin_id': this.props.edition.bitcoin_id};
|
||||||
|
},
|
||||||
handleSuccess(){
|
handleSuccess(){
|
||||||
EditionActions.fetchOne(this.props.edition.id);
|
EditionActions.fetchOne(this.props.edition.id);
|
||||||
},
|
},
|
||||||
@ -215,19 +218,23 @@ let EditionSummary = React.createClass({
|
|||||||
let status = null;
|
let status = null;
|
||||||
if (this.props.edition.status.length > 0){
|
if (this.props.edition.status.length > 0){
|
||||||
let statusStr = this.props.edition.status.join().replace(/_/, ' ');
|
let statusStr = this.props.edition.status.join().replace(/_/, ' ');
|
||||||
let statusAction = null;
|
status = <EditionDetailProperty label="STATUS" value={ statusStr }/>;
|
||||||
if (this.props.edition.pending_new_owner && this.props.edition.acl.indexOf('withdraw_transfer') > -1){
|
if (this.props.edition.pending_new_owner && this.props.edition.acl.indexOf('withdraw_transfer') > -1){
|
||||||
statusAction = (
|
status = (
|
||||||
<button
|
<Form
|
||||||
className="pull-right btn btn-default btn-sm">
|
url={apiUrls.ownership_transfers_withdraw}
|
||||||
WITHDRAW
|
getFormData={this.getTransferWithdrawData}
|
||||||
</button>
|
handleSuccess={this.showNotification}>
|
||||||
|
<EditionDetailProperty label="STATUS" value={ statusStr }>
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
className="pull-right btn btn-default btn-sm">
|
||||||
|
WITHDRAW
|
||||||
|
</button>
|
||||||
|
</EditionDetailProperty>
|
||||||
|
</Form>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
status = (
|
|
||||||
<EditionDetailProperty label="STATUS" value={ statusStr }>
|
|
||||||
{statusAction}
|
|
||||||
</EditionDetailProperty>);
|
|
||||||
}
|
}
|
||||||
let actions = null;
|
let actions = null;
|
||||||
if (this.props.edition.request_action && this.props.edition.request_action.length > 0){
|
if (this.props.edition.request_action && this.props.edition.request_action.length > 0){
|
||||||
|
@ -23,6 +23,7 @@ let apiUrls = {
|
|||||||
'ownership_loans_deny': AppConstants.apiEndpoint + 'ownership/loans/deny/',
|
'ownership_loans_deny': AppConstants.apiEndpoint + 'ownership/loans/deny/',
|
||||||
'ownership_shares': AppConstants.apiEndpoint + 'ownership/shares/',
|
'ownership_shares': AppConstants.apiEndpoint + 'ownership/shares/',
|
||||||
'ownership_transfers': AppConstants.apiEndpoint + 'ownership/transfers/',
|
'ownership_transfers': AppConstants.apiEndpoint + 'ownership/transfers/',
|
||||||
|
'ownership_transfers_withdraw': AppConstants.apiEndpoint + 'ownership/transfers/withdraw/',
|
||||||
'ownership_unconsigns': AppConstants.apiEndpoint + 'ownership/unconsigns/',
|
'ownership_unconsigns': AppConstants.apiEndpoint + 'ownership/unconsigns/',
|
||||||
'ownership_unconsigns_deny': AppConstants.apiEndpoint + 'ownership/unconsigns/deny/',
|
'ownership_unconsigns_deny': AppConstants.apiEndpoint + 'ownership/unconsigns/deny/',
|
||||||
'ownership_unconsigns_request': AppConstants.apiEndpoint + 'ownership/unconsigns/request/',
|
'ownership_unconsigns_request': AppConstants.apiEndpoint + 'ownership/unconsigns/request/',
|
||||||
|
Loading…
Reference in New Issue
Block a user