Add attendees
This commit is contained in:
@ -62,13 +62,10 @@ module.exports = React.createClass({
|
||||
if (this.props.user.isUser())
|
||||
mainContent = (
|
||||
<Tabs defaultActiveKey={1} id='mainNavigationTabs'>
|
||||
<Tab title="Accounts" eventKey={1} >accounts
|
||||
<Tab title="New Entry" eventKey={1} >accounts
|
||||
</Tab>
|
||||
<Tab title="Securities" eventKey={2} >securities
|
||||
<Tab title="Statistics" eventKey={2} >stats will go here
|
||||
</Tab>
|
||||
<Tab title="Scheduled Transactions" eventKey={3} >Scheduled transactions go here...</Tab>
|
||||
<Tab title="Budgets" eventKey={4} >Budgets go here...</Tab>
|
||||
<Tab title="Reports" eventKey={5} >Reports go here...</Tab>
|
||||
</Tabs>);
|
||||
else
|
||||
mainContent = (
|
||||
|
29
js/models.js
29
js/models.js
@ -1,5 +1,3 @@
|
||||
var Big = require('big.js');
|
||||
|
||||
function getJSONObj(json_input) {
|
||||
if (typeof json_input == "string")
|
||||
return $.parseJSON(json_input)
|
||||
@ -76,6 +74,33 @@ Session.prototype.isSession = function() {
|
||||
this.UserId != empty_session.UserId;
|
||||
}
|
||||
|
||||
function Attendee() {
|
||||
this.AttendeeId = -1;
|
||||
this.Name = "";
|
||||
}
|
||||
|
||||
Attendee.prototype.toJSON = function() {
|
||||
var json_obj = {};
|
||||
json_obj.AttendeeId = this.AttendeeId;
|
||||
json_obj.Name = this.Name;
|
||||
return JSON.stringify(json_obj);
|
||||
}
|
||||
|
||||
Attendee.prototype.fromJSON = function(json_input) {
|
||||
var json_obj = getJSONObj(json_input);
|
||||
|
||||
if (json_obj.hasOwnProperty("AttendeeId"))
|
||||
this.AttendeeId = json_obj.AttendeeId;
|
||||
if (json_obj.hasOwnProperty("Name"))
|
||||
this.Name = json_obj.Name;
|
||||
}
|
||||
|
||||
Attendee.prototype.isAttendee = function() {
|
||||
var empty_attendee = new Attendee();
|
||||
return this.AttendeeId != empty_attendee.AttendeeId ||
|
||||
this.Name != empty_attendee.Name;
|
||||
}
|
||||
|
||||
function Error() {
|
||||
this.ErrorId = -1;
|
||||
this.ErrorString = "";
|
||||
|
Reference in New Issue
Block a user