mirror of https://github.com/sipwise/ngcp-csc.git
- renaming - layout adjusted - data added - entry items on sms/fax/call triggered - trigger call from conversation-with - applied filters Change-Id: Ia6d9c3a57e0fd35f710ab202d684498a48d54b6echanges/41/11741/18
parent
138166f39a
commit
8d69e694aa
@ -1,21 +0,0 @@
|
||||
Ext.define('NgcpCsc.model.Chat', {
|
||||
extend: 'Ext.data.Model',
|
||||
|
||||
fields: [{
|
||||
name: 'new_message',
|
||||
type: 'string'
|
||||
}, {
|
||||
name: 'chatEnabled',
|
||||
type: 'boolean'
|
||||
}],
|
||||
|
||||
proxy: {
|
||||
type: 'ajax',
|
||||
url: '/resources/data/message.json',
|
||||
autoLoad: true,
|
||||
reader: {
|
||||
type: 'json',
|
||||
rootProperty: 'data'
|
||||
}
|
||||
}
|
||||
});
|
@ -1,20 +1,4 @@
|
||||
Ext.define('NgcpCsc.model.ChatNotification', {
|
||||
Ext.define('NgcpCsc.model.Message', {
|
||||
extend: 'Ext.data.Model',
|
||||
fields: [{
|
||||
name: '_id'
|
||||
}, {
|
||||
name: 'parent_id'
|
||||
}, {
|
||||
name: 'name'
|
||||
}, {
|
||||
name: 'source'
|
||||
}, {
|
||||
name: 'date'
|
||||
}, {
|
||||
name: 'isActive'
|
||||
}, {
|
||||
name: 'time'
|
||||
}, {
|
||||
name: 'content'
|
||||
}]
|
||||
fields: ['_id', 'new_message']
|
||||
});
|
||||
|
@ -0,0 +1,5 @@
|
||||
Ext.define('NgcpCsc.model.Notification', {
|
||||
extend: 'Ext.data.Model',
|
||||
|
||||
fields: ['id', 'conversation_type', 'status', 'text', 'direction', 'start_time']
|
||||
});
|
@ -1,18 +0,0 @@
|
||||
Ext.define('NgcpCsc.store.Chat', {
|
||||
extend: 'Ext.data.Store',
|
||||
|
||||
storeId: 'Chat',
|
||||
|
||||
model: 'NgcpCsc.model.ChatNotification',
|
||||
|
||||
autoLoad:true,
|
||||
|
||||
proxy: {
|
||||
type: 'ajax',
|
||||
url: '/resources/data/chat.json',
|
||||
reader: {
|
||||
type: 'json',
|
||||
rootProperty: 'data'
|
||||
}
|
||||
}
|
||||
});
|
@ -0,0 +1,19 @@
|
||||
Ext.define('NgcpCsc.store.Notifications', {
|
||||
extend: 'Ext.data.Store',
|
||||
|
||||
storeId: 'Notifications',
|
||||
|
||||
model: 'NgcpCsc.model.Notification',
|
||||
|
||||
autoLoad:true,
|
||||
|
||||
proxy: {
|
||||
type: 'ajax',
|
||||
baseUrl : '/resources/data/notifications/',
|
||||
url: '/resources/data/notifications/0.json',
|
||||
reader: {
|
||||
type: 'json',
|
||||
rootProperty: 'data'
|
||||
}
|
||||
}
|
||||
});
|
@ -1,126 +0,0 @@
|
||||
.user-notifications {
|
||||
padding: 15px;
|
||||
background: #fff;
|
||||
|
||||
.x-view-item-focused {
|
||||
outline: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.comments {
|
||||
margin-bottom: 10px;
|
||||
cursor: pointer;
|
||||
|
||||
img.profile-icon {
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
border: 2px solid $base-border-color;
|
||||
@include border-radius($circle-border-radius);
|
||||
float: left;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 14px;
|
||||
float: left;
|
||||
|
||||
span {
|
||||
margin-left: 8px;
|
||||
font-size: 18px;
|
||||
position: relative;
|
||||
top: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.from-now {
|
||||
float: right;
|
||||
|
||||
span {
|
||||
margin-right: 5px;
|
||||
font-size: 16px;
|
||||
position: relative;
|
||||
top: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
.content-wrap {
|
||||
margin-left: 65px;
|
||||
|
||||
.content {
|
||||
margin-bottom: 15px;
|
||||
white-space: normal;
|
||||
clear: both;
|
||||
}
|
||||
}
|
||||
|
||||
&.sub-comments {
|
||||
margin: 0 0 10px 60px;
|
||||
|
||||
.like-comment-btn-wrap {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.like-comment-btn-wrap {
|
||||
text-align: right;
|
||||
padding-bottom: 15px;
|
||||
|
||||
button {
|
||||
margin-left: 15px;
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
background-color: $like-comment-btn-background-color;
|
||||
font-size: 14px;
|
||||
color: $color;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.menu-item-common {
|
||||
padding-right: 20px;
|
||||
position: absolute;
|
||||
font-family: FontAwesome;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.new-message-cont {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.submit-new-message {
|
||||
float: right;
|
||||
top: 0 !important;
|
||||
}
|
||||
|
||||
.hide-pm {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.private-conversation-text {
|
||||
padding: 30px;
|
||||
}
|
||||
|
||||
.online-user {
|
||||
color: $online-menu-item-color !important;
|
||||
}
|
||||
|
||||
.offline-user {
|
||||
color: $offline-menu-item-color !important;
|
||||
}
|
||||
|
||||
.chat-container {
|
||||
// replace core-container $ui , because tabpanel has no mixin/variables
|
||||
border: 1px solid lightgray;
|
||||
border-radius: 10px;
|
||||
|
||||
.x-panel-body {
|
||||
background-color: $body-background-color;
|
||||
}
|
||||
}
|
||||
|
||||
.chat-default-msg-cont {
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
margin-top: 30px;
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
.user-notifications {
|
||||
padding: 15px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.icon:before {
|
||||
font-family: FontAwesome;
|
||||
color: $base-color;
|
||||
}
|
||||
|
||||
.call-icon,
|
||||
.chat-icon,
|
||||
.sms-icon,
|
||||
.voicemail-icon,
|
||||
.fax-icon,
|
||||
.incoming-answered-icon,
|
||||
.incoming-missed-icon,
|
||||
.outgoing-answered-icon,
|
||||
.outgoing-missed-icon
|
||||
{
|
||||
float: left;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.incoming-answered-icon:before {
|
||||
@extend .icon:before;
|
||||
content: "\f053";
|
||||
color:#66a648;
|
||||
}
|
||||
.incoming-missed-icon:before {
|
||||
@extend .icon:before;
|
||||
content: "\f053";
|
||||
color:#ea5000;
|
||||
}
|
||||
.outgoing-answered-icon:before {
|
||||
@extend .icon:before;
|
||||
content: "\f054";
|
||||
color:#66a648;
|
||||
}
|
||||
.outgoing-missed-icon:before {
|
||||
@extend .icon:before;
|
||||
content: "\f054";
|
||||
color:#ea5000;
|
||||
}
|
||||
|
||||
.call-icon:before {
|
||||
@extend .icon:before;
|
||||
content: "\f095";
|
||||
}
|
||||
|
||||
.chat-icon:before {
|
||||
@extend .icon:before;
|
||||
content: "\f0e5";
|
||||
}
|
||||
|
||||
.sms-icon:before {
|
||||
@extend .icon:before;
|
||||
content: "\f003";
|
||||
}
|
||||
|
||||
.voicemail-icon:before {
|
||||
@extend .icon:before;
|
||||
content: "\f115";
|
||||
}
|
||||
|
||||
.fax-icon:before {
|
||||
@extend .icon:before;
|
||||
content: "\f0f6";
|
||||
}
|
||||
|
||||
.notification {
|
||||
margin-bottom: 30px;
|
||||
.text {
|
||||
margin-left:40px;
|
||||
}
|
||||
|
||||
}
|
||||
.menu-item-common {
|
||||
padding-right: 20px;
|
||||
position: absolute;
|
||||
font-family: FontAwesome;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.toolbar-cont {
|
||||
background-color: #F6F6F6;
|
||||
}
|
||||
|
||||
.submit-new-message {
|
||||
float: right;
|
||||
top: 0 !important;
|
||||
}
|
||||
|
||||
.hide-pm {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.private-conversation-text {
|
||||
padding: 30px;
|
||||
.x-view-item-focused {
|
||||
outline: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.online-user {
|
||||
color: $online-menu-item-color !important;
|
||||
}
|
||||
|
||||
.offline-user {
|
||||
color: $offline-menu-item-color !important;
|
||||
}
|
||||
|
||||
.conversation-with-container {
|
||||
// replace core-container $ui , because tabpanel has no mixin/variables
|
||||
border: 1px solid lightgray;
|
||||
border-radius: 10px;
|
||||
|
||||
.x-panel-body {
|
||||
background-color: $body-background-color;
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
Ext.define('NgcpCsc.view.pages.chat.Chat', {
|
||||
extend: 'Ext.panel.Panel',
|
||||
|
||||
xtype: 'chat',
|
||||
|
||||
layout: 'fit',
|
||||
|
||||
defaults: {
|
||||
margin: 10
|
||||
},
|
||||
|
||||
initComponent: function() {
|
||||
this.items = [{
|
||||
xtype: 'chatcontainer'
|
||||
}];
|
||||
this.callParent();
|
||||
}
|
||||
});
|
@ -1,55 +0,0 @@
|
||||
// CHAT
|
||||
// . when call, sms or fax are sent/triggered add entry in chat
|
||||
// . when chat is opened, display topbar (add fax, sms, call to chat data)
|
||||
// . create multiple submit text btn (chat, sms, call)
|
||||
// . change how contacts look like in mobile
|
||||
// . chat should not be a tabpanel anymore
|
||||
// . apply filters on conversationwith
|
||||
// . clicking on user in chat opens conversationwith
|
||||
// . rename the module from chat to conversationwith
|
||||
Ext.define('NgcpCsc.view.pages.chat.ChatContainer', {
|
||||
extend: 'Ext.tab.Panel',
|
||||
xtype: 'chatcontainer',
|
||||
cls: 'chat-container',
|
||||
plugins: 'tabreorderer',
|
||||
viewModel: 'chat',
|
||||
controller: 'chat',
|
||||
title: null,
|
||||
listeners: {
|
||||
remove: 'tabRemoved'
|
||||
},
|
||||
dockedItems: [{
|
||||
xtype: 'toolbar',
|
||||
reference: 'chat-bottom-bar',
|
||||
cls: 'new-message-cont',
|
||||
fixed: true,
|
||||
margin: '0 5 5 5',
|
||||
dock: 'bottom',
|
||||
hidden: true,
|
||||
layout: {
|
||||
type: 'hbox',
|
||||
align: 'stretch'
|
||||
},
|
||||
items: [{
|
||||
xtype: 'textarea',
|
||||
bind: {
|
||||
value: '{message.new_message}'
|
||||
},
|
||||
cls: 'new-message',
|
||||
name: 'new-message',
|
||||
enableKeyEvents: true,
|
||||
height: 100,
|
||||
flex: 8,
|
||||
emptyText: Ngcp.csc.locales.chat.msg_box.empty_text[localStorage.getItem('languageSelected')],
|
||||
listeners: {
|
||||
keypress: 'onPressEnter'
|
||||
}
|
||||
}, {
|
||||
flex: 1,
|
||||
xtype: 'button',
|
||||
iconCls: 'fa fa-send',
|
||||
cls: 'submit-new-message',
|
||||
handler: 'onPressSubmitBtn'
|
||||
}]
|
||||
}]
|
||||
})
|
@ -1,135 +0,0 @@
|
||||
Ext.define('NgcpCsc.view.pages.chat.ChatController', {
|
||||
extend: 'Ext.app.ViewController',
|
||||
|
||||
alias: 'controller.chat',
|
||||
|
||||
listen: {
|
||||
controller: {
|
||||
'#contacts': {
|
||||
openpmtab: 'openPM',
|
||||
openchanneltab: 'openChat',
|
||||
destroytab: 'closeChat'
|
||||
},
|
||||
'*': {
|
||||
togglechat: 'toggleChat'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onPressEnter: function(field, e) {
|
||||
if (!e.shiftKey && e.getKey() == e.ENTER) {
|
||||
e.preventDefault();
|
||||
this.submitMessage();
|
||||
}
|
||||
},
|
||||
|
||||
onPressSubmitBtn: function(field, e) {
|
||||
this.submitMessage();
|
||||
},
|
||||
|
||||
submitMessage: function(msg, user) {
|
||||
var message = msg || this.getViewModel().get('message.new_message');
|
||||
if (message.length < 1 || !this.getView().getActiveTab()) {
|
||||
return;
|
||||
}
|
||||
var chatStore = this.getView().getActiveTab().getStore('notifications');
|
||||
var lastMsg = chatStore.getAt(chatStore.getCount() - 1) || this.getViewModel().getStore('notifications').findRecord('id', this.getView().getActiveTab().name);
|
||||
var date = new Date();
|
||||
var minutes = date.getMinutes();
|
||||
var hour = date.getHours();
|
||||
var day = date.getDate();
|
||||
var month = date.getMonth() + 1;
|
||||
var messageModel = Ext.create('NgcpCsc.model.ChatNotification', {
|
||||
/// "id": (user) ? user.get('id') : 0,
|
||||
"name": (user) ? user.get('name') : localStorage.getItem('username'),
|
||||
"date": Ext.String.format("{0}.{1}", day, month),
|
||||
"isActive": true,
|
||||
"time": Ext.String.format("{0}:{1}", hour, minutes),
|
||||
"thumbnail": (user) ? user.get('thumbnail') : "resources/images/user-profile/2.png",
|
||||
"content": message.replace(/(?:\r\n|\r|\n)/g, '<br />')
|
||||
});
|
||||
chatStore.add(messageModel);
|
||||
this.clearMsg();
|
||||
this.focusLastMsg();
|
||||
},
|
||||
|
||||
clearMsg: function() {
|
||||
this.getView().down('[name=new-message]').reset();
|
||||
},
|
||||
|
||||
focusLastMsg: function(rec) {
|
||||
var chatCmp = this.getView().getActiveTab();
|
||||
chatCmp.scrollTo(0, chatCmp.getEl().dom.scrollHeight);
|
||||
},
|
||||
|
||||
openPM: function(item, rec) {
|
||||
var tab = this.getView().down('[name=' + rec.get('uid') + ']');
|
||||
if (rec.get('name') == 'administrator') // hardcoded administrator
|
||||
return;
|
||||
if (!tab) {
|
||||
tab = this.getView().add({
|
||||
xtype: 'chat-notifications',
|
||||
title: rec.get('name'),
|
||||
closable: true,
|
||||
scrollable: true,
|
||||
cls: 'private-conversation-text',
|
||||
deferEmptyText: false,
|
||||
emptyText: Ext.String.format(Ngcp.csc.locales.chat.start_conversation[localStorage.getItem('languageSelected')], rec.get('name')),
|
||||
name: rec.get('uid'),
|
||||
store: Ext.create('Ext.data.Store', {
|
||||
model: 'NgcpCsc.model.ChatNotification'
|
||||
})
|
||||
});
|
||||
}
|
||||
this.getView().setActiveTab(tab);
|
||||
this.toggleTextArea(true);
|
||||
this.redirectTo('conversation-with');
|
||||
|
||||
},
|
||||
openChat: function(rec) {
|
||||
var tab = this.getView().down('[name=' + rec.get('name') + ']');
|
||||
var messages = Ext.create('NgcpCsc.store.Chat');
|
||||
messages.load({callback:function(records){
|
||||
Ext.each(records, function(message){
|
||||
if(!rec.findChild('uid',message.get('uid'))){
|
||||
messages.remove(message);
|
||||
}
|
||||
});
|
||||
}});
|
||||
if (!tab) {
|
||||
tab = this.getView().add({
|
||||
xtype: 'chat-notifications',
|
||||
title: rec.get('name'),
|
||||
name: rec.get('name'),
|
||||
closable: true,
|
||||
emptyText: Ngcp.csc.locales.chat.start_group_conversation[localStorage.getItem('languageSelected')],
|
||||
store: messages
|
||||
});
|
||||
}
|
||||
this.getView().setActiveTab(tab);
|
||||
this.toggleTextArea(true);
|
||||
},
|
||||
|
||||
closeChat: function(tabToClose) {
|
||||
var tabToClose = this.getView().down('[name=' + tabToClose + ']');
|
||||
var contacts = this.getView().down('#contacts');
|
||||
if (tabToClose) {
|
||||
tabToClose.destroy();
|
||||
}
|
||||
if(contacts){
|
||||
contacts.getView().refresh()
|
||||
}
|
||||
},
|
||||
|
||||
tabRemoved: function(tabP){
|
||||
this.toggleTextArea(tabP.items.length > 0);
|
||||
},
|
||||
|
||||
toggleChat: function(visible) {
|
||||
this.getViewModel().set('messages.chatEnabled', visible);
|
||||
},
|
||||
|
||||
toggleTextArea: function(visible){
|
||||
this.lookupReference('chat-bottom-bar').setVisible(visible);
|
||||
}
|
||||
});
|
@ -1,13 +0,0 @@
|
||||
Ext.define('NgcpCsc.view.pages.chat.ChatModel', {
|
||||
extend: 'Ext.app.ViewModel',
|
||||
alias: 'viewmodel.chat',
|
||||
links: {
|
||||
message: {
|
||||
type: 'NgcpCsc.model.Chat',
|
||||
id: Ext.id()
|
||||
}
|
||||
},
|
||||
stores: {
|
||||
notifications: 'Chat'
|
||||
}
|
||||
});
|
@ -1,26 +0,0 @@
|
||||
Ext.define('NgcpCsc.view.pages.chat.ChatNotifications', {
|
||||
extend: 'Ext.DataView',
|
||||
xtype: 'chat-notifications',
|
||||
|
||||
cls: 'user-notifications',
|
||||
|
||||
listeners: {
|
||||
itemclick: 'openPM'
|
||||
},
|
||||
|
||||
itemTpl: [
|
||||
"<div class='comments'>",
|
||||
"<img src='{thumbnail}' alt='' class='profile-icon'>",
|
||||
"<div class='content-wrap'>",
|
||||
"<div>",
|
||||
"<h4 class='profilenotifications-username'>{name}</h4>",
|
||||
"<span class='from-now'><span class='x-fa fa-clock-o'></span>{time} {date}",
|
||||
"<span class='like-comment-btn-wrap'>", // hide the private message button in case the message comes from the user (in this case _d = 0);
|
||||
"<button type='button' id='{name}' class='x-fa fa-comments {[values.name === 'administrator' ? 'hide-pm' : '']}'></button>",
|
||||
"</span></span>",
|
||||
"</div>",
|
||||
"<div class='content'>{content}</div>",
|
||||
"</div>",
|
||||
"</div>"
|
||||
]
|
||||
});
|
@ -0,0 +1,47 @@
|
||||
Ext.define('NgcpCsc.view.pages.conversations.ConversationsToolbar', {
|
||||
extend: 'Ext.toolbar.Toolbar',
|
||||
dock: 'top',
|
||||
layout: 'center',
|
||||
ui: 'conversations-actions-tbar',
|
||||
items: [{
|
||||
xtype: 'core-container',
|
||||
margin: Ext.os.is.Desktop ? '-5 0 0 35' : '-5 0 0 15',
|
||||
width: Ext.os.is.Desktop ? 810 : '100%',
|
||||
layout: {
|
||||
type: 'hbox',
|
||||
align: 'stretch'
|
||||
},
|
||||
defaults: {
|
||||
xtype: 'button',
|
||||
flex: 1,
|
||||
iconAlign: 'top',
|
||||
scale: 'medium',
|
||||
ui: 'conversations-actions-btn'
|
||||
},
|
||||
items: [{
|
||||
text: Ngcp.csc.locales.conversations.btns.new_sms[localStorage.getItem('languageSelected')],
|
||||
itemId: 'newSms',
|
||||
iconCls: 'x-fa fa-envelope fa',
|
||||
overCls: 'conversations-btn-over',
|
||||
margin: '0 20 0 0',
|
||||
handler: 'composeSms',
|
||||
tooltip: Ngcp.csc.locales.conversations.tooltips.new_sms[localStorage.getItem('languageSelected')]
|
||||
}, {
|
||||
|
||||
text: Ngcp.csc.locales.conversations.btns.new_call[localStorage.getItem('languageSelected')],
|
||||
itemId: 'newCall',
|
||||
iconCls: 'x-fa fa-phone fa',
|
||||
overCls: 'conversations-btn-over',
|
||||
margin: '0 20 0 0',
|
||||
handler: 'composeCall',
|
||||
tooltip: Ngcp.csc.locales.conversations.tooltips.new_call[localStorage.getItem('languageSelected')]
|
||||
}, {
|
||||
text: Ngcp.csc.locales.conversations.btns.new_fax[localStorage.getItem('languageSelected')],
|
||||
itemId: 'newfax',
|
||||
iconCls: 'x-fa fa-file-text fa',
|
||||
overCls: 'conversations-btn-over',
|
||||
handler: 'composeFax',
|
||||
tooltip: Ngcp.csc.locales.conversations.tooltips.new_fax[localStorage.getItem('languageSelected')]
|
||||
}]
|
||||
}]
|
||||
});
|
@ -0,0 +1,77 @@
|
||||
Ext.define('NgcpCsc.view.pages.conversationwith.ConversationWith', {
|
||||
extend: 'Ext.tab.Panel',
|
||||
xtype: 'conversationwith',
|
||||
cls: 'conversation-with-container',
|
||||
plugins: 'tabreorderer',
|
||||
viewModel: 'conversationwith',
|
||||
controller: 'conversationwith',
|
||||
title: null,
|
||||
scrollable:false,
|
||||
listeners: {
|
||||
render: 'hideTabBar'
|
||||
},
|
||||
dockedItems: [Ext.create('NgcpCsc.view.pages.conversations.ConversationsToolbar'),
|
||||
{
|
||||
xtype: 'toolbar',
|
||||
dock: 'top',
|
||||
height:60,
|
||||
cls: 'toolbar-cont',
|
||||
items:['->',{
|
||||
text:'Older',
|
||||
handler: 'loadOlderMsg'
|
||||
},'->']
|
||||
}
|
||||
, {
|
||||
xtype: 'toolbar',
|
||||
reference: 'chat-bottom-bar',
|
||||
cls: 'toolbar-cont',
|
||||
fixed: true,
|
||||
margin: '0 5 5 5',
|
||||
dock: 'bottom',
|
||||
items: [{
|
||||
width: '100%',
|
||||
xtype: 'panel',
|
||||
layout: {
|
||||
type: 'hbox'
|
||||
},
|
||||
items: [{
|
||||
// bind is dynamically set in controller (search for ".setBind")
|
||||
xtype: 'textfield',
|
||||
cls: 'new-message',
|
||||
reference:'newmessage',
|
||||
enableKeyEvents: true,
|
||||
flex: 1,
|
||||
emptyText: Ngcp.csc.locales.conversationwith.msg_box.empty_text[localStorage.getItem('languageSelected')],
|
||||
listeners: {
|
||||
keypress: 'onPressEnter'
|
||||
}
|
||||
}, {
|
||||
width:50,
|
||||
xtype: 'button',
|
||||
menu: {
|
||||
defaults:{
|
||||
handler:'onPressSubmitBtn'
|
||||
},
|
||||
items:[{
|
||||
text: 'Send as SMS',
|
||||
value:'sms'
|
||||
}, {
|
||||
text: 'Send as chat message',
|
||||
value:'chat'
|
||||
}]
|
||||
},
|
||||
bind:{
|
||||
iconCls: '{iconcls}'
|
||||
},
|
||||
cls: 'submit-new-message'
|
||||
},{
|
||||
width:35,
|
||||
xtype: 'button',
|
||||
margin : '0 0 0 5',
|
||||
cls:'rtc-icons',
|
||||
iconCls: 'x-fa fa-phone',
|
||||
handler:'onPressCallBtn'
|
||||
}]
|
||||
}]
|
||||
}]
|
||||
})
|
@ -0,0 +1,143 @@
|
||||
Ext.define('NgcpCsc.view.pages.conversationwith.ConversationWithController', {
|
||||
extend: 'NgcpCsc.view.pages.conversations.ConversationsController',
|
||||
|
||||
alias: 'controller.conversationwith',
|
||||
|
||||
listen: {
|
||||
controller: {
|
||||
'*': {
|
||||
openpmtab: 'openPM',
|
||||
destroytab: 'closeChat',
|
||||
notify: 'submitNotification',
|
||||
focusLastMsg: 'focusLastMsg'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onPressEnter: function(field, e) {
|
||||
var vm = this.getViewModel();
|
||||
var currMsg = this.lookupReference('newmessage').getValue();
|
||||
var type = vm.get('messagetype');
|
||||
if (!e.shiftKey && e.getKey() == e.ENTER && currMsg.length > 0) {
|
||||
e.preventDefault();
|
||||
this.submitNotification(type);
|
||||
}
|
||||
},
|
||||
|
||||
onPressSubmitBtn: function(menuitem, ev) {
|
||||
var currMsg = this.lookupReference('newmessage').getValue();
|
||||
this.getViewModel().set('messagetype', menuitem.value);
|
||||
this.getViewModel().set('iconcls', menuitem.value == 'sms' ? 'fa fa-envelope' : 'fa fa-comment');
|
||||
if (currMsg.length > 0) {
|
||||
this.submitNotification(menuitem.value);
|
||||
}
|
||||
},
|
||||
|
||||
onPressCallBtn: function(btn) {
|
||||
var vm = this.getViewModel();
|
||||
var contact = Ext.getStore('Contacts').findRecord("uid", vm.get('activeUserId'));
|
||||
var record = Ext.create('Ext.data.Model', {
|
||||
id: vm.get('activeUserId'),
|
||||
callee: vm.get('activeUserName'),
|
||||
thumbnail: contact ? contact.get('thumbnail') : null
|
||||
});
|
||||
this.fireEvent('initrtc', record, 'startCall', false, true);
|
||||
},
|
||||
|
||||
hideTabBar: function(panel) {
|
||||
panel.getTabBar().hide();
|
||||
},
|
||||
|
||||
submitNotification: function(type, msg) {
|
||||
var vm = this.getViewModel();
|
||||
var chatStore = this.getView().getActiveTab().getStore('Notifications');
|
||||
var messageModel = Ext.create('NgcpCsc.model.Notification', {
|
||||
"id": Ext.id(),
|
||||
"conversation_type": type || vm.get('messagetype'),
|
||||
"direction": "outgoing",
|
||||
"status": "answered",
|
||||
"text": (type && ['sms', 'chat'].indexOf(type) > -1) ? msg || this.lookupReference('newmessage').getValue() : '',
|
||||
"start_time": Date.now()
|
||||
});
|
||||
chatStore.add(messageModel);
|
||||
this.clearMsg();
|
||||
this.focusLastMsg();
|
||||
},
|
||||
|
||||
clearMsg: function() {
|
||||
this.lookupReference('newmessage').reset();
|
||||
},
|
||||
|
||||
focusLastMsg: function() {
|
||||
var chatCmp = this.getView().getActiveTab();
|
||||
if (chatCmp) {
|
||||
chatCmp.getEl().scroll('b', Infinity);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
loadOlderMsg: function(btn) {
|
||||
var chatCmp = this.getView().getActiveTab();
|
||||
chatCmp.getEl().scroll('t', Infinity, true);
|
||||
},
|
||||
|
||||
openPM: function(item, rec, focusTextarea) {
|
||||
var id = rec.get('uid') || rec.get('id');
|
||||
var tab = this.getView().down('[name=' + id + ']');
|
||||
var me = this;
|
||||
var vm = this.getViewModel();
|
||||
var textArea = this.lookupReference('newmessage');
|
||||
if (!tab) {
|
||||
vm.set('newmessage-' + id, '');
|
||||
tab = this.getView().add({
|
||||
xtype: 'notifications',
|
||||
title: rec.get('name'),
|
||||
closable: false,
|
||||
cls: 'private-conversation-text',
|
||||
deferEmptyText: false,
|
||||
emptyText: Ext.String.format(Ngcp.csc.locales.conversationwith.start_conversation[localStorage.getItem('languageSelected')], rec.get('name')),
|
||||
name: id,
|
||||
store: Ext.create('NgcpCsc.store.Notifications', {
|
||||
autoLoad: !!rec.get('uid'), // when new call/sms/fax is triggered the callback has no uid ( = user id from contacts), so the conversation is new and should not have logs => prevents autoload (TODO remove when API is available)
|
||||
listeners: {
|
||||
beforeload: function(store) {
|
||||
me.updateProxy(store, id);
|
||||
},
|
||||
load: function() {
|
||||
me.focusLastMsg();
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
textArea.setBind({
|
||||
value: '{newmessage-' + id + '}'
|
||||
});
|
||||
me.getView().setActiveTab(tab);
|
||||
me.focusLastMsg();
|
||||
vm.set('activeUserName', rec.get('name') || rec.get('callee'));
|
||||
vm.set('activeUserId', id);
|
||||
if (focusTextarea) {
|
||||
textArea.focus();
|
||||
vm.set('messagetype', 'chat');
|
||||
vm.set('iconcls', 'fa fa-comment');
|
||||
}
|
||||
|
||||
},
|
||||
// (only for prototyping) change randomly the read url to retrieve different json
|
||||
updateProxy: function(store, uid) {
|
||||
var filename = uid + '.json';
|
||||
store.proxy.url = store.proxy.baseUrl + filename;
|
||||
},
|
||||
|
||||
closeChat: function(tabToClose) {
|
||||
var tabToClose = this.getView().down('[name=' + tabToClose + ']');
|
||||
var contacts = this.getView().down('#contacts');
|
||||
if (tabToClose) {
|
||||
tabToClose.destroy();
|
||||
}
|
||||
if (contacts) {
|
||||
contacts.getView().refresh()
|
||||
}
|
||||
}
|
||||
});
|
@ -0,0 +1,13 @@
|
||||
Ext.define('NgcpCsc.view.pages.conversationwith.ConversationWithModel', {
|
||||
extend: 'Ext.app.ViewModel',
|
||||
alias: 'viewmodel.conversationwith',
|
||||
data:{
|
||||
messagetype:'chat',
|
||||
iconcls:'fa fa-comment',
|
||||
activeUserName:'',
|
||||
activeUserId:''
|
||||
},
|
||||
stores: {
|
||||
notifications: 'Notifications'
|
||||
}
|
||||
});
|
@ -0,0 +1,23 @@
|
||||
Ext.define('NgcpCsc.view.pages.conversationwith.Notifications', {
|
||||
extend: 'Ext.DataView',
|
||||
xtype: 'notifications',
|
||||
|
||||
cls: 'user-notifications',
|
||||
|
||||
scrollable: true,
|
||||
|
||||
disableSelection: true,
|
||||
|
||||
itemTpl: [
|
||||
"<div class='notification'>",
|
||||
"<div class='{conversation_type}-icon'></div>",
|
||||
"<div class='{direction}-{status}-icon'></div>",
|
||||
"<div>{[Ngcp.csc.formatter.timeSince(values.start_time)]} " + Ngcp.csc.locales.common.ago[localStorage.getItem('languageSelected')] + "</div>",
|
||||
"<div class='text'>",
|
||||
"<tpl if='conversation_type == \"sms\" || conversation_type == \"chat\"'>",
|
||||
"<p>{text}</p>",
|
||||
"</tpl>",
|
||||
"</div>",
|
||||
"</div>"
|
||||
]
|
||||
});
|
@ -1,30 +0,0 @@
|
||||
{
|
||||
"data": [{
|
||||
"uid": 840,
|
||||
"name": "Jil Sanchez",
|
||||
"date": "10/27/2016",
|
||||
"isActive": true,
|
||||
"number": "439911233",
|
||||
"time": "13:42",
|
||||
"thumbnail": "resources/images/user-profile/9.png",
|
||||
"content": "There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don\'t look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn\'t anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc."
|
||||
}, {
|
||||
"uid": 252,
|
||||
"name": "Ben Wright",
|
||||
"date": "10/27/2010",
|
||||
"number": "141423442",
|
||||
"isActive": true,
|
||||
"time": "14:03",
|
||||
"thumbnail": "resources/images/user-profile/10.png",
|
||||
"content": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."
|
||||
}, {
|
||||
"uid": 162,
|
||||
"name": "Allen Morris",
|
||||
"date": "10/27/2016",
|
||||
"number": "23423423234",
|
||||
"isActive": true,
|
||||
"time": "4:57",
|
||||
"thumbnail": "resources/images/user-profile/11.png",
|
||||
"content": "There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don\'t look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn\'t anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc."
|
||||
}]
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
{
|
||||
"data": [{
|
||||
"id": 5,
|
||||
"conversation_type": "fax",
|
||||
"source_cli": "+390290775544",
|
||||
"status": "missed",
|
||||
"direction": "outgoing",
|
||||
"start_time": "2017-01-10T10:05:33.384000000+02:00",
|
||||
"pages": "7"
|
||||
}, {
|
||||
"id": 4,
|
||||
"conversation_type": "chat",
|
||||
"text": "This is a chat message. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.",
|
||||
"direction": "incoming",
|
||||
"status": "answered",
|
||||
"start_time": "2017-01-30T10:05:33.384000000+02:00"
|
||||
}, {
|
||||
"id": 3,
|
||||
"conversation_type": "sms",
|
||||
"text": "This is an sms. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.",
|
||||
"direction": "incoming",
|
||||
"status": "answered",
|
||||
"start_time": "2017-01-31T10:05:33+02:00"
|
||||
}, {
|
||||
"id": 2,
|
||||
"conversation_type": "call",
|
||||
"status": "missed",
|
||||
"direction": "outgoing",
|
||||
"start_time": "2017-02-09T10:05:33.384000000+02:00"
|
||||
}, {
|
||||
"id": 1,
|
||||
"conversation_type": "voicemail",
|
||||
"status": "answered",
|
||||
"direction": "incoming",
|
||||
"start_time": "2017-02-09T12:05:33.384000000+02:00"
|
||||
}, {
|
||||
"id": 15,
|
||||
"conversation_type": "fax",
|
||||
"source_cli": "+390290775544",
|
||||
"status": "missed",
|
||||
"direction": "outgoing",
|
||||
"start_time": "2017-03-03T10:05:33.384000000+02:00",
|
||||
"pages": "7"
|
||||
}, {
|
||||
"id": 14,
|
||||
"conversation_type": "chat",
|
||||
"text": "This is a chat message. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.",
|
||||
"direction": "incoming",
|
||||
"status": "answered",
|
||||
"start_time": "2017-03-04T10:05:33.384000000+02:00"
|
||||
}, {
|
||||
"id": 13,
|
||||
"conversation_type": "sms",
|
||||
"text": "This is an sms. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.",
|
||||
"direction": "incoming",
|
||||
"status": "answered",
|
||||
"start_time": "2017-03-05T10:05:33+02:00"
|
||||
}, {
|
||||
"id": 12,
|
||||
"conversation_type": "call",
|
||||
"status": "missed",
|
||||
"direction": "outgoing",
|
||||
"start_time": "2017-03-06T10:05:33.384000000+02:00"
|
||||
}, {
|
||||
"id": 11,
|
||||
"conversation_type": "voicemail",
|
||||
"status": "answered",
|
||||
"direction": "incoming",
|
||||
"start_time": "2017-03-07T12:05:33.384000000+02:00"
|
||||
}, {
|
||||
"id": 25,
|
||||
"conversation_type": "fax",
|
||||
"source_cli": "+390290775544",
|
||||
"status": "missed",
|
||||
"direction": "outgoing",
|
||||
"start_time": "2017-03-07T10:05:33.384000000+02:00",
|
||||
"pages": "7"
|
||||
}, {
|
||||
"id": 24,
|
||||
"conversation_type": "chat",
|
||||
"text": "This is a chat message. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.",
|
||||
"direction": "incoming",
|
||||
"status": "answered",
|
||||
"start_time": "2017-03-07T11:05:33.384000000+02:00"
|
||||
}, {
|
||||
"id": 23,
|
||||
"conversation_type": "sms",
|
||||
"text": "This is an sms. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.",
|
||||
"direction": "incoming",
|
||||
"status": "answered",
|
||||
"start_time": "2017-03-07T12:05:33+02:00"
|
||||
}, {
|
||||
"id": 22,
|
||||
"conversation_type": "call",
|
||||
"status": "missed",
|
||||
"direction": "outgoing",
|
||||
"start_time": "2017-03-07T13:05:33.384000000+02:00"
|
||||
}, {
|
||||
"id": 21,
|
||||
"conversation_type": "voicemail",
|
||||
"status": "answered",
|
||||
"direction": "incoming",
|
||||
"start_time": "2017-03-07T14:05:33.384000000+02:00"
|
||||
}]
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
{
|
||||
"data": [{
|
||||
"id": 5,
|
||||
"conversation_type": "fax",
|
||||
"source_cli": "+390290775544",
|
||||
"status": "missed",
|
||||
"direction": "outgoing",
|
||||
"start_time": "2017-01-10T10:05:33.384000000+02:00",
|
||||
"pages": "7"
|
||||
}, {
|
||||
"id": 4,
|
||||
"conversation_type": "chat",
|
||||
"text": "This is a chat message. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.",
|
||||
"direction": "incoming",
|
||||
"status": "answered",
|
||||
"start_time": "2017-01-30T10:05:33.384000000+02:00"
|
||||
}, {
|
||||
"id": 3,
|
||||
"conversation_type": "sms",
|
||||
"text": "This is an sms. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.",
|
||||
"direction": "incoming",
|
||||
"status": "answered",
|
||||
"start_time": "2017-01-31T10:05:33+02:00"
|
||||
}]
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
{
|
||||
"data": [{
|
||||
"id": 22,
|
||||
"conversation_type": "call",
|
||||
"status": "missed",
|
||||
"direction": "outgoing",
|
||||
"start_time": "2017-03-07T13:05:33.384000000+02:00"
|
||||
}, {
|
||||
"id": 21,
|
||||
"conversation_type": "voicemail",
|
||||
"status": "answered",
|
||||
"direction": "incoming",
|
||||
"start_time": "2017-03-07T14:05:33.384000000+02:00"
|
||||
}]
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
{
|
||||
"data": [{
|
||||
"id": 5,
|
||||
"conversation_type": "fax",
|
||||
"source_cli": "+390290775544",
|
||||
"status": "missed",
|
||||
"direction": "outgoing",
|
||||
"start_time": "2017-01-10T10:05:33.384000000+02:00",
|
||||
"pages": "7"
|
||||
}, {
|
||||
"id": 2,
|
||||
"conversation_type": "call",
|
||||
"status": "missed",
|
||||
"direction": "outgoing",
|
||||
"start_time": "2017-02-09T10:05:33.384000000+02:00"
|
||||
}, {
|
||||
"id": 15,
|
||||
"conversation_type": "fax",
|
||||
"source_cli": "+390290775544",
|
||||
"status": "missed",
|
||||
"direction": "outgoing",
|
||||
"start_time": "2017-03-03T10:05:33.384000000+02:00",
|
||||
"pages": "7"
|
||||
}, {
|
||||
"id": 12,
|
||||
"conversation_type": "call",
|
||||
"status": "missed",
|
||||
"direction": "outgoing",
|
||||
"start_time": "2017-03-06T10:05:33.384000000+02:00"
|
||||
}, {
|
||||
"id": 11,
|
||||
"conversation_type": "voicemail",
|
||||
"status": "answered",
|
||||
"direction": "incoming",
|
||||
"start_time": "2017-03-07T12:05:33.384000000+02:00"
|
||||
}, {
|
||||
"id": 25,
|
||||
"conversation_type": "fax",
|
||||
"source_cli": "+390290775544",
|
||||
"status": "missed",
|
||||
"direction": "outgoing",
|
||||
"start_time": "2017-03-07T10:05:33.384000000+02:00",
|
||||
"pages": "7"
|
||||
}, {
|
||||
"id": 23,
|
||||
"conversation_type": "sms",
|
||||
"text": "This is an sms. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.",
|
||||
"direction": "incoming",
|
||||
"status": "answered",
|
||||
"start_time": "2017-03-07T12:05:33+02:00"
|
||||
}, {
|
||||
"id": 21,
|
||||
"conversation_type": "voicemail",
|
||||
"status": "answered",
|
||||
"direction": "incoming",
|
||||
"start_time": "2017-03-07T14:05:33.384000000+02:00"
|
||||
}]
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
{
|
||||
"data": [{
|
||||
"id": 2,
|
||||
"conversation_type": "call",
|
||||
"status": "missed",
|
||||
"direction": "outgoing",
|
||||
"start_time": "2017-02-09T10:05:33.384000000+02:00"
|
||||
}, {
|
||||
"id": 1,
|
||||
"conversation_type": "voicemail",
|
||||
"status": "answered",
|
||||
"direction": "incoming",
|
||||
"start_time": "2017-02-09T12:05:33.384000000+02:00"
|
||||
}, {
|
||||
"id": 15,
|
||||
"conversation_type": "fax",
|
||||
"source_cli": "+390290775544",
|
||||
"status": "missed",
|
||||
"direction": "outgoing",
|
||||
"start_time": "2017-03-03T10:05:33.384000000+02:00",
|
||||
"pages": "7"
|
||||
}, {
|
||||
"id": 14,
|
||||
"conversation_type": "chat",
|
||||
"text": "This is a chat message. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.",
|
||||
"direction": "incoming",
|
||||
"status": "answered",
|
||||
"start_time": "2017-03-04T10:05:33.384000000+02:00"
|
||||
}]
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
{
|
||||
"data": [{
|
||||
"id": 15,
|
||||
"conversation_type": "fax",
|
||||
"source_cli": "+390290775544",
|
||||
"status": "missed",
|
||||
"direction": "outgoing",
|
||||
"start_time": "2017-03-03T10:05:33.384000000+02:00",
|
||||
"pages": "7"
|
||||
}, {
|
||||
"id": 14,
|
||||
"conversation_type": "chat",
|
||||
"text": "This is a chat message. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.",
|
||||
"direction": "incoming",
|
||||
"status": "answered",
|
||||
"start_time": "2017-03-04T10:05:33.384000000+02:00"
|
||||
},{
|
||||
"id": 11,
|
||||
"conversation_type": "voicemail",
|
||||
"status": "answered",
|
||||
"direction": "incoming",
|
||||
"start_time": "2017-03-07T12:05:33.384000000+02:00"
|
||||
}, {
|
||||
"id": 24,
|
||||
"conversation_type": "chat",
|
||||
"text": "This is a chat message. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.",
|
||||
"direction": "incoming",
|
||||
"status": "answered",
|
||||
"start_time": "2017-03-07T11:05:33.384000000+02:00"
|
||||
}, {
|
||||
"id": 21,
|
||||
"conversation_type": "voicemail",
|
||||
"status": "answered",
|
||||
"direction": "incoming",
|
||||
"start_time": "2017-03-07T14:05:33.384000000+02:00"
|
||||
}]
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"data": [{
|
||||
"id": 5,
|
||||
"conversation_type": "fax",
|
||||
"source_cli": "+390290775544",
|
||||
"status": "missed",
|
||||
"direction": "outgoing",
|
||||
"start_time": "2017-01-10T10:05:33.384000000+02:00",
|
||||
"pages": "7"
|
||||
}, {
|
||||
"id": 21,
|
||||
"conversation_type": "voicemail",
|
||||
"status": "answered",
|
||||
"direction": "incoming",
|
||||
"start_time": "2017-03-07T14:05:33.384000000+02:00"
|
||||
}]
|
||||
}
|
Loading…
Reference in new issue