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:
parent
9e26b30bdc
commit
48487c230b
@ -128,8 +128,8 @@ const AddEditAccountModal = React.createClass({
|
|||||||
<Combobox
|
<Combobox
|
||||||
data={this.props.securities}
|
data={this.props.securities}
|
||||||
valueField='SecurityId'
|
valueField='SecurityId'
|
||||||
textField='Name'
|
textField={item => item.Name + " - " + item.Description}
|
||||||
value={this.state.security}
|
defaultValue={this.state.security}
|
||||||
onChange={this.handleSecurityChange}
|
onChange={this.handleSecurityChange}
|
||||||
ref="security" />
|
ref="security" />
|
||||||
</Input>
|
</Input>
|
||||||
@ -141,7 +141,7 @@ const AddEditAccountModal = React.createClass({
|
|||||||
data={AccountTypeList}
|
data={AccountTypeList}
|
||||||
valueField='TypeId'
|
valueField='TypeId'
|
||||||
textField='Name'
|
textField='Name'
|
||||||
value={this.state.type}
|
defaultValue={this.state.type}
|
||||||
onChange={this.handleTypeChange}
|
onChange={this.handleTypeChange}
|
||||||
ref="type" />
|
ref="type" />
|
||||||
</Input>
|
</Input>
|
||||||
|
@ -90,6 +90,7 @@ for (var type in SecurityType) {
|
|||||||
function Security() {
|
function Security() {
|
||||||
this.SecurityId = -1;
|
this.SecurityId = -1;
|
||||||
this.Name = "";
|
this.Name = "";
|
||||||
|
this.Description = "";
|
||||||
this.Symbol = "";
|
this.Symbol = "";
|
||||||
this.Precision = -1;
|
this.Precision = -1;
|
||||||
this.Type = -1;
|
this.Type = -1;
|
||||||
@ -99,6 +100,7 @@ Security.prototype.toJSON = function() {
|
|||||||
var json_obj = {};
|
var json_obj = {};
|
||||||
json_obj.SecurityId = this.SecurityId;
|
json_obj.SecurityId = this.SecurityId;
|
||||||
json_obj.Name = this.Name;
|
json_obj.Name = this.Name;
|
||||||
|
json_obj.Description = this.Description;
|
||||||
json_obj.Symbol = this.Symbol;
|
json_obj.Symbol = this.Symbol;
|
||||||
json_obj.Precision = this.Precision;
|
json_obj.Precision = this.Precision;
|
||||||
json_obj.Type = this.Type;
|
json_obj.Type = this.Type;
|
||||||
@ -112,6 +114,8 @@ Security.prototype.fromJSON = function(json_input) {
|
|||||||
this.SecurityId = json_obj.SecurityId;
|
this.SecurityId = json_obj.SecurityId;
|
||||||
if (json_obj.hasOwnProperty("Name"))
|
if (json_obj.hasOwnProperty("Name"))
|
||||||
this.Name = json_obj.Name;
|
this.Name = json_obj.Name;
|
||||||
|
if (json_obj.hasOwnProperty("Description"))
|
||||||
|
this.Description = json_obj.Description;
|
||||||
if (json_obj.hasOwnProperty("Symbol"))
|
if (json_obj.hasOwnProperty("Symbol"))
|
||||||
this.Symbol = json_obj.Symbol;
|
this.Symbol = json_obj.Symbol;
|
||||||
if (json_obj.hasOwnProperty("Precision"))
|
if (json_obj.hasOwnProperty("Precision"))
|
||||||
|
Loading…
Reference in New Issue
Block a user