Created
September 13, 2018 12:15
-
-
Save ngbinh/649bec1f317ec05ee28922c9f959a101 to your computer and use it in GitHub Desktop.
Negotating
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Negotating | |
Empty | |
investorSign -> OnlyInvestorSigned | |
companySign -> OnlyCompanySigned | |
OnlyCompanySigned | |
companyUnSign -> Empty | |
investorSign -> Done | |
OnlyInvestorSigned | |
companySign -> Done | |
investorUnSign -> Empty | |
Done | |
companyUnSign -> OnlyInvestorSigned | |
investorUnSign -> OnlyCompanySigned | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function turnText(state) { | |
switch (state) { | |
case "CompanyToShareBankInfo": | |
return "Company To Share Bank Info"; | |
break; | |
case "CompanyToShareWireInfo": | |
return "Company To Share Wire Info"; | |
break; | |
case "CompanyToMarkStockCertSent": | |
return "Company To Mark Stock Certificates Sent"; | |
break; | |
case "CompanyToMarkFundReceived": | |
return "Company To Mark Fund Received"; | |
break; | |
default: | |
return ""; | |
break; | |
} | |
} | |
function render(model) { | |
let current_state_names = []; | |
let turnsText = []; | |
for (var i = 0; i < model.active_states.length; i++) { | |
current_state_names.push(model.active_states[i].name); | |
var text = turnText(model.active_states[i].name); | |
if (text != "") turnsText.push(text); | |
} | |
console.log(turnsText); | |
return <div> | |
<p>The current state is: {current_state_names.toString()}</p> | |
<p>The current turns: </p> | |
<ul>{turnsText.map(txt => <li>{txt}</li>)}</ul> | |
</div> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment