summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/js/app.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/public/js/app.js b/public/js/app.js
index efc0752..1dee270 100644
--- a/public/js/app.js
+++ b/public/js/app.js
@@ -51,6 +51,7 @@ DS.RESTAdapter.reopen({
App.Switchboard = DS.Model.extend({
switchboardEntrys: DS.hasMany('App.SwitchboardEntry'),
activeCalls: DS.hasMany('App.ActiveCall'),
+ dispatchableIncomingCalls: DS.hasMany('App.DispatchableIncomingCall'),
name: DS.attr('string')
});
@@ -87,6 +88,30 @@ App.ActiveCall = DS.Model.extend({
}.property('b_callstate')
});
+App.DispatchableIncomingCall = DS.Model.extend({
+ start_stamp: DS.attr('number'),
+ callstate: DS.attr('string'),
+ b_callstate: DS.attr('string'),
+ destination: DS.attr('string'),
+ b_caller_id_number: DS.attr('string'),
+
+ isActive: function() {
+ if (this.get('b_callstate') == 'ACTIVE') {
+ return true
+ } else {
+ return false
+ }
+ }.property('b_callstate'),
+
+ isRinging: function() {
+ if (this.get('b_callstate') == 'RINGING') {
+ return true
+ } else {
+ return false
+ }
+ }.property('b_callstate')
+});
+
App.Adapter = DS.RESTAdapter.extend();
App.store = App.Store.create({