From eb4994b05eb94ef4687e2f8d895135ddd6a38dc4 Mon Sep 17 00:00:00 2001 From: Cevo Date: Thu, 3 Sep 2015 18:25:12 +0200 Subject: [PATCH 1/2] add more --- js/actions/contract_actions.js | 2 -- .../ascribe_settings/contract_settings.js | 16 ++++++++-------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/js/actions/contract_actions.js b/js/actions/contract_actions.js index c6055ffc..d1bf1432 100644 --- a/js/actions/contract_actions.js +++ b/js/actions/contract_actions.js @@ -39,8 +39,6 @@ class ContractActions { contractEmail: null }); }); - } else { - /* No email was entered - Ignore and keep going*/ } } diff --git a/js/components/ascribe_settings/contract_settings.js b/js/components/ascribe_settings/contract_settings.js index 222bd42e..f38464f3 100644 --- a/js/components/ascribe_settings/contract_settings.js +++ b/js/components/ascribe_settings/contract_settings.js @@ -35,10 +35,10 @@ let ContractSettings = React.createClass({ console.log(contract); ContractListActions.makeContractPublic(contract) .then(( ) => ContractListActions.fetchContractList()) - .catch((error)=>{console.log("Error ", error); - let notification = new GlobalNotificationModel("Service is unavailable", 'danger', 10000); + .catch((error)=>{console.log('Error ', error); + let notification = new GlobalNotificationModel('Service is unavailable', 'danger', 10000); GlobalNotificationActions.appendGlobalNotification(notification); -}) +}); }, getPublicContracts(){ return this.state.contractList.filter((contract) => contract.public); @@ -68,31 +68,31 @@ let ContractSettings = React.createClass({ {(publicContracts.length > 0) ? publicContracts.map( (contract) => { - return( + return ( } - />) + />); } ) : null } } {

Private Contracts

- {(privateContracts.length>0) ? + {(privateContracts.length > 0) ? privateContracts.map( (contract) => { - return( + return ( } - />) + />); } ) : null}
} From f312c94eeb9ce57371d866486bcf5d33325135e2 Mon Sep 17 00:00:00 2001 From: Cevo Date: Fri, 4 Sep 2015 11:31:53 +0200 Subject: [PATCH 2/2] if there is anything else --- js/actions/contract_list_actions.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/actions/contract_list_actions.js b/js/actions/contract_list_actions.js index c57bceb9..608b5df1 100644 --- a/js/actions/contract_list_actions.js +++ b/js/actions/contract_list_actions.js @@ -24,13 +24,15 @@ class ContractListActions { } makeContractPublic(contract){ - contract.public=true; + contract.public = true; return Q.Promise((resolve, reject) => { OwnershipFetcher.makeContractPublic(contract) .then((res) => { + console.log('Here is the result... '); resolve(res); }) .catch((err)=> { + console.log('Here we have an error'); console.logGlobal(err); reject(err); });