1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2024-10-31 16:00:05 -04:00

js: Add Security Description field

This commit is contained in:
Aaron Lindsay 2016-02-19 19:59:04 -05:00
parent 9e26b30bdc
commit 48487c230b
2 changed files with 7 additions and 3 deletions

View File

@ -128,8 +128,8 @@ const AddEditAccountModal = React.createClass({
<Combobox
data={this.props.securities}
valueField='SecurityId'
textField='Name'
value={this.state.security}
textField={item => item.Name + " - " + item.Description}
defaultValue={this.state.security}
onChange={this.handleSecurityChange}
ref="security" />
</Input>
@ -141,7 +141,7 @@ const AddEditAccountModal = React.createClass({
data={AccountTypeList}
valueField='TypeId'
textField='Name'
value={this.state.type}
defaultValue={this.state.type}
onChange={this.handleTypeChange}
ref="type" />
</Input>

View File

@ -90,6 +90,7 @@ for (var type in SecurityType) {
function Security() {
this.SecurityId = -1;
this.Name = "";
this.Description = "";
this.Symbol = "";
this.Precision = -1;
this.Type = -1;
@ -99,6 +100,7 @@ Security.prototype.toJSON = function() {
var json_obj = {};
json_obj.SecurityId = this.SecurityId;
json_obj.Name = this.Name;
json_obj.Description = this.Description;
json_obj.Symbol = this.Symbol;
json_obj.Precision = this.Precision;
json_obj.Type = this.Type;
@ -112,6 +114,8 @@ Security.prototype.fromJSON = function(json_input) {
this.SecurityId = json_obj.SecurityId;
if (json_obj.hasOwnProperty("Name"))
this.Name = json_obj.Name;
if (json_obj.hasOwnProperty("Description"))
this.Description = json_obj.Description;
if (json_obj.hasOwnProperty("Symbol"))
this.Symbol = json_obj.Symbol;
if (json_obj.hasOwnProperty("Precision"))