mirror of
https://github.com/ascribe/onion.git
synced 2024-12-23 01:39:36 +01:00
Merge remote-tracking branch 'remotes/origin/AD-456-ikonotv-branded-page-for-registra' into AD-883-show-notificationsrequests-on-col
This commit is contained in:
commit
8a49006592
@ -39,8 +39,6 @@ class ContractActions {
|
|||||||
contractEmail: null
|
contractEmail: null
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
/* No email was entered - Ignore and keep going*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,13 +24,15 @@ class ContractListActions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
makeContractPublic(contract){
|
makeContractPublic(contract){
|
||||||
contract.public=true;
|
contract.public = true;
|
||||||
return Q.Promise((resolve, reject) => {
|
return Q.Promise((resolve, reject) => {
|
||||||
OwnershipFetcher.makeContractPublic(contract)
|
OwnershipFetcher.makeContractPublic(contract)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
console.log('Here is the result... ');
|
||||||
resolve(res);
|
resolve(res);
|
||||||
})
|
})
|
||||||
.catch((err)=> {
|
.catch((err)=> {
|
||||||
|
console.log('Here we have an error');
|
||||||
console.logGlobal(err);
|
console.logGlobal(err);
|
||||||
reject(err);
|
reject(err);
|
||||||
});
|
});
|
||||||
|
@ -35,10 +35,10 @@ let ContractSettings = React.createClass({
|
|||||||
console.log(contract);
|
console.log(contract);
|
||||||
ContractListActions.makeContractPublic(contract)
|
ContractListActions.makeContractPublic(contract)
|
||||||
.then(( ) => ContractListActions.fetchContractList())
|
.then(( ) => ContractListActions.fetchContractList())
|
||||||
.catch((error)=>{console.log("Error ", error);
|
.catch((error)=>{console.log('Error ', error);
|
||||||
let notification = new GlobalNotificationModel("Service is unavailable", 'danger', 10000);
|
let notification = new GlobalNotificationModel('Service is unavailable', 'danger', 10000);
|
||||||
GlobalNotificationActions.appendGlobalNotification(notification);
|
GlobalNotificationActions.appendGlobalNotification(notification);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
getPublicContracts(){
|
getPublicContracts(){
|
||||||
return this.state.contractList.filter((contract) => contract.public);
|
return this.state.contractList.filter((contract) => contract.public);
|
||||||
@ -68,31 +68,31 @@ let ContractSettings = React.createClass({
|
|||||||
{(publicContracts.length > 0) ?
|
{(publicContracts.length > 0) ?
|
||||||
publicContracts.map(
|
publicContracts.map(
|
||||||
(contract) => {
|
(contract) => {
|
||||||
return(
|
return (
|
||||||
<ActionPanel title = {contract.name}
|
<ActionPanel title = {contract.name}
|
||||||
content = {this.getblobEndName(contract)}
|
content = {this.getblobEndName(contract)}
|
||||||
buttons = {<span>
|
buttons = {<span>
|
||||||
<button className="btn btn-default btn-sm margin-left-2px">UPDATE</button>
|
<button className="btn btn-default btn-sm margin-left-2px">UPDATE</button>
|
||||||
<button className="btn btn-default btn-sm margin-left-2px">REMOVE</button>
|
<button className="btn btn-default btn-sm margin-left-2px">REMOVE</button>
|
||||||
</span>}
|
</span>}
|
||||||
/>)
|
/>);
|
||||||
}
|
}
|
||||||
) : null }
|
) : null }
|
||||||
</div>}
|
</div>}
|
||||||
|
|
||||||
{<div>
|
{<div>
|
||||||
<p>Private Contracts</p>
|
<p>Private Contracts</p>
|
||||||
{(privateContracts.length>0) ?
|
{(privateContracts.length > 0) ?
|
||||||
privateContracts.map(
|
privateContracts.map(
|
||||||
(contract) => {
|
(contract) => {
|
||||||
return(
|
return (
|
||||||
<ActionPanel title = {contract.name}
|
<ActionPanel title = {contract.name}
|
||||||
content = {this.getblobEndName(contract)}
|
content = {this.getblobEndName(contract)}
|
||||||
buttons = {<span> <button className="btn btn-default btn-sm margin-left-2px">UPDATE</button>
|
buttons = {<span> <button className="btn btn-default btn-sm margin-left-2px">UPDATE</button>
|
||||||
<button className="btn btn-default btn-sm margin-left-2px" >REMOVE</button>
|
<button className="btn btn-default btn-sm margin-left-2px" >REMOVE</button>
|
||||||
<button className="btn btn-default btn-sm margin-left-2px"
|
<button className="btn btn-default btn-sm margin-left-2px"
|
||||||
onClick={this.makeContractPublic.bind(this, contract)}>MAKE PUBLIC</button> </span>}
|
onClick={this.makeContractPublic.bind(this, contract)}>MAKE PUBLIC</button> </span>}
|
||||||
/>)
|
/>);
|
||||||
}
|
}
|
||||||
) : null}
|
) : null}
|
||||||
</div>}
|
</div>}
|
||||||
|
Loading…
Reference in New Issue
Block a user