Built motion from commit (unavailable).|2.5.0
[motion2.git] / server / config / seedDB / report / default.js
index c6c7a8e..cfc7402 100644 (file)
@@ -1,6 +1,6 @@
 'use strict';
 
-module.exports = function(prefix) {
+module.exports = function (prefix) {
     return [{
         id: 1,
         name: 'Details',
@@ -302,14 +302,14 @@ module.exports = function(prefix) {
         parent: prefix + '_bull_ivr_campaigns',
         table: 'cm_hopper_final',
         conditions: '{"group":{"operator":"AND","rules":[{"condition":"=","field":"campaigntype","value":"\'ivr\'"}]}}'
-    },{
+    }, {
         id: 44,
         name: 'Website Summary',
         description: 'Chat interactions by website',
         parent: prefix + '_chat',
         table: 'chat_interactions',
         joins: '[{"parentKey":"ChatWebsiteId","foreignTable":"chat_websites","foreignKey":"id","type":"join"}]'
-    },{
+    }, {
         id: 45,
         name: 'Website Times',
         description: 'Chat interaction times by website',
@@ -317,7 +317,7 @@ module.exports = function(prefix) {
         table: 'chat_interactions',
         conditions: '{"group":{"operator":"AND","rules":[{"condition":"=","field":"chat_interactions.closed","value":"1"},{"group":{"operator":"OR","rules":[{"condition":"IS NULL","field":"chat_interactions.disposition","value":""},{"group":{"operator":"AND","rules":[{"condition":"!=","field":"chat_interactions.disposition","value":"\'abandoned\'"},{"condition":"!=","field":"chat_interactions.disposition","value":"\'unmanaged\'"}]}}]}}]}}',
         joins: '[{"parentKey":"ChatWebsiteId","foreignTable":"chat_websites","foreignKey":"id","type":"join"}]'
-    },{
+    }, {
         id: 46,
         name: 'Chat By Agent',
         description: 'Chat interactions by agent',
@@ -325,28 +325,28 @@ module.exports = function(prefix) {
         table: 'chat_interactions',
         conditions: '{"group":{"operator":"AND","rules":[{"condition":"=","field":"chat_interactions.closed","value":"1"}]}}',
         joins: '[{"parentKey":"UserId","foreignTable":"users","foreignKey":"id","type":"join"}]'
-    },{
+    }, {
         id: 47,
         name: 'Chat By Date',
         description: 'Chat interactions by date',
         parent: prefix + '_chat',
         table: 'chat_interactions',
         conditions: '{"group":{"operator":"AND","rules":[{"condition":"=","field":"chat_interactions.closed","value":"1"}]}}'
-    },{
+    }, {
         id: 48,
         name: 'Chat By Queue',
         description: 'Chat interactions by queue',
         parent: prefix + '_chat',
         table: 'report_chat_queue',
         joins: '[{"parentKey":"ChatQueueId","foreignTable":"chat_queues","foreignKey":"id","type":"join"}]'
-    },{
+    }, {
         id: 49,
         name: 'Email Account Summary',
         description: 'Email interactions by account',
         parent: prefix + '_mail',
         table: 'mail_interactions',
         joins: '[{"parentKey":"MailAccountId","foreignTable":"mail_accounts","foreignKey":"id","type":"join"}]'
-    },{
+    }, {
         id: 50,
         name: 'Email Account Times',
         description: 'Email interaction times by account',
@@ -354,7 +354,7 @@ module.exports = function(prefix) {
         table: 'mail_interactions',
         conditions: '{"group":{"operator":"AND","rules":[{"condition":"=","field":"mail_interactions.closed","value":"1"},{"group":{"operator":"OR","rules":[{"condition":"!=","field":"mail_interactions.disposition","value":"\'unmanaged\'"},{"condition":"IS NULL","field":"mail_interactions.disposition","value":""}]}}]}}',
         joins: '[{"parentKey":"MailAccountId","foreignTable":"mail_accounts","foreignKey":"id","type":"join"}]'
-    },{
+    }, {
         id: 51,
         name: 'Email By Agent',
         description: 'Email interactions by agent',
@@ -362,28 +362,28 @@ module.exports = function(prefix) {
         table: 'mail_interactions',
         conditions: '{"group":{"operator":"AND","rules":[{"condition":"=","field":"mail_interactions.closed","value":"1"}]}}',
         joins: '[{"parentKey":"UserId","foreignTable":"users","foreignKey":"id","type":"join"}]'
-    },{
+    }, {
         id: 52,
         name: 'Email By Date',
         description: 'Email interactions by date',
         parent: prefix + '_mail',
         table: 'mail_interactions',
         conditions: '{"group":{"operator":"AND","rules":[{"condition":"=","field":"mail_interactions.closed","value":"1"}]}}'
-    },{
+    }, {
         id: 53,
         name: 'Email By Queue',
         description: 'Email interactions by queue',
         parent: prefix + '_mail',
         table: 'report_mail_queue',
         joins: '[{"parentKey":"MailQueueId","foreignTable":"mail_queues","foreignKey":"id","type":"join"}]'
-    },{
+    }, {
         id: 54,
         name: 'Openchannel Account Summary',
         description: 'Openchannel interactions by account',
         parent: prefix + '_openchannel',
         table: 'openchannel_interactions',
         joins: '[{"parentKey":"OpenchannelAccountId","foreignTable":"openchannel_accounts","foreignKey":"id","type":"join"}]'
-    },{
+    }, {
         id: 55,
         name: 'Openchannel Account Times',
         description: 'Openchannel interaction times by account',
@@ -391,7 +391,7 @@ module.exports = function(prefix) {
         table: 'openchannel_interactions',
         conditions: '{"group":{"operator":"AND","rules":[{"condition":"=","field":"openchannel_interactions.closed","value":"1"},{"group":{"operator":"OR","rules":[{"condition":"!=","field":"openchannel_interactions.disposition","value":"\'unmanaged\'"},{"condition":"IS NULL","field":"openchannel_interactions.disposition","value":""}]}}]}}',
         joins: '[{"parentKey":"OpenchannelAccountId","foreignTable":"openchannel_accounts","foreignKey":"id","type":"join"}]'
-    },{
+    }, {
         id: 56,
         name: 'Openchannel By Agent',
         description: 'Openchannel interactions by agent',
@@ -399,28 +399,28 @@ module.exports = function(prefix) {
         table: 'openchannel_interactions',
         conditions: '{"group":{"operator":"AND","rules":[{"condition":"=","field":"openchannel_interactions.closed","value":"1"}]}}',
         joins: '[{"parentKey":"UserId","foreignTable":"users","foreignKey":"id","type":"join"}]'
-    },{
+    }, {
         id: 57,
         name: 'Openchannel By Date',
         description: 'Openchannel interactions by date',
         parent: prefix + '_openchannel',
         table: 'openchannel_interactions',
         conditions: '{"group":{"operator":"AND","rules":[{"condition":"=","field":"openchannel_interactions.closed","value":"1"}]}}'
-    },{
+    }, {
         id: 58,
         name: 'Openchannel By Queue',
         description: 'Openchannel interactions by queue',
         parent: prefix + '_openchannel',
         table: 'report_openchannel_queue',
         joins: '[{"parentKey":"OpenchannelQueueId","foreignTable":"openchannel_queues","foreignKey":"id","type":"join"}]'
-    },{
+    }, {
         id: 59,
         name: 'Sms Account Summary',
         description: 'Sms interactions by account',
         parent: prefix + '_sms',
         table: 'sms_interactions',
         joins: '[{"parentKey":"SmsAccountId","foreignTable":"sms_accounts","foreignKey":"id","type":"join"}]'
-    },{
+    }, {
         id: 60,
         name: 'Sms Account Times',
         description: 'Sms interaction times by account',
@@ -428,7 +428,7 @@ module.exports = function(prefix) {
         table: 'sms_interactions',
         conditions: '{"group":{"operator":"AND","rules":[{"condition":"=","field":"sms_interactions.closed","value":"1"},{"group":{"operator":"OR","rules":[{"condition":"!=","field":"sms_interactions.disposition","value":"\'unmanaged\'"},{"condition":"IS NULL","field":"sms_interactions.disposition","value":""}]}}]}}',
         joins: '[{"parentKey":"SmsAccountId","foreignTable":"sms_accounts","foreignKey":"id","type":"join"}]'
-    },{
+    }, {
         id: 61,
         name: 'Sms By Agent',
         description: 'Sms interactions by agent',
@@ -436,28 +436,28 @@ module.exports = function(prefix) {
         table: 'sms_interactions',
         conditions: '{"group":{"operator":"AND","rules":[{"condition":"=","field":"sms_interactions.closed","value":"1"}]}}',
         joins: '[{"parentKey":"UserId","foreignTable":"users","foreignKey":"id","type":"join"}]'
-    },{
+    }, {
         id: 62,
         name: 'Sms By Date',
         description: 'Sms interactions by date',
         parent: prefix + '_sms',
         table: 'sms_interactions',
         conditions: '{"group":{"operator":"AND","rules":[{"condition":"=","field":"sms_interactions.closed","value":"1"}]}}'
-    },{
+    }, {
         id: 63,
         name: 'Sms By Queue',
         description: 'Sms interactions by queue',
         parent: prefix + '_sms',
         table: 'report_sms_queue',
         joins: '[{"parentKey":"SmsQueueId","foreignTable":"sms_queues","foreignKey":"id","type":"join"}]'
-    },{
+    }, {
         id: 64,
         name: 'Fax Account Summary',
         description: 'Fax interactions by account',
         parent: prefix + '_fax',
         table: 'fax_interactions',
         joins: '[{"parentKey":"FaxAccountId","foreignTable":"fax_accounts","foreignKey":"id","type":"join"}]'
-    },{
+    }, {
         id: 65,
         name: 'Fax Account Times',
         description: 'Fax interaction times by account',
@@ -465,7 +465,7 @@ module.exports = function(prefix) {
         table: 'fax_interactions',
         conditions: '{"group":{"operator":"AND","rules":[{"condition":"=","field":"fax_interactions.closed","value":"1"},{"group":{"operator":"OR","rules":[{"condition":"!=","field":"fax_interactions.disposition","value":"\'unmanaged\'"},{"condition":"IS NULL","field":"fax_interactions.disposition","value":""}]}}]}}',
         joins: '[{"parentKey":"FaxAccountId","foreignTable":"fax_accounts","foreignKey":"id","type":"join"}]'
-    },{
+    }, {
         id: 66,
         name: 'Fax By Agent',
         description: 'Fax interactions by agent',
@@ -473,19 +473,71 @@ module.exports = function(prefix) {
         table: 'fax_interactions',
         conditions: '{"group":{"operator":"AND","rules":[{"condition":"=","field":"fax_interactions.closed","value":"1"}]}}',
         joins: '[{"parentKey":"UserId","foreignTable":"users","foreignKey":"id","type":"join"}]'
-    },{
+    }, {
         id: 67,
         name: 'Fax By Date',
         description: 'Fax interactions by date',
         parent: prefix + '_fax',
         table: 'fax_interactions',
         conditions: '{"group":{"operator":"AND","rules":[{"condition":"=","field":"fax_interactions.closed","value":"1"}]}}'
-    },{
+    }, {
         id: 68,
         name: 'Fax By Queue',
         description: 'Fax interactions by queue',
         parent: prefix + '_fax',
         table: 'report_fax_queue',
         joins: '[{"parentKey":"FaxQueueId","foreignTable":"fax_queues","foreignKey":"id","type":"join"}]'
+    }, {
+        id: 69,
+        name: 'WhatsApp Account Summary',
+        description: 'WhatsApp interactions by account',
+        parent: prefix + '_whatsapp',
+        table: 'whatsapp_interactions',
+        joins: '[{"parentKey":"WhatsappAccountId","foreignTable":"whatsapp_accounts","foreignKey":"id","type":"join"}]'
+    },{
+        id: 70,
+        name: 'WhatsApp Account Times',
+        description: 'WhatsApp interaction times by account',
+        parent: prefix + '_whatsapp',
+        table: 'whatsapp_interactions',
+        conditions: '{"group":{"operator":"AND","rules":[{"condition":"=","field":"whatsapp_interactions.closed","value":"1"},{"group":{"operator":"OR","rules":[{"condition":"!=","field":"whatsapp_interactions.disposition","value":"\'unmanaged\'"},{"condition":"IS NULL","field":"whatsapp_interactions.disposition","value":""}]}}]}}',
+        joins: '[{"parentKey":"WhatsappAccountId","foreignTable":"whatsapp_accounts","foreignKey":"id","type":"join"}]'
+    },{
+        id: 71,
+        name: 'WhatsApp By Agent',
+        description: 'WhatsApp interactions by agent',
+        parent: prefix + '_whatsapp',
+        table: 'whatsapp_interactions',
+        conditions: '{"group":{"operator":"AND","rules":[{"condition":"=","field":"whatsapp_interactions.closed","value":"1"}]}}',
+        joins: '[{"parentKey":"UserId","foreignTable":"users","foreignKey":"id","type":"join"}]'
+    },{
+        id: 72,
+        name: 'WhatsApp By Date',
+        description: 'WhatsApp interactions by date',
+        parent: prefix + '_whatsapp',
+        table: 'whatsapp_interactions',
+        conditions: '{"group":{"operator":"AND","rules":[{"condition":"=","field":"whatsapp_interactions.closed","value":"1"}]}}'
+    },{
+        id: 73,
+        name: 'WhatsApp By Queue',
+        description: 'WhatsApp interactions by queue',
+        parent: prefix + '_whatsapp',
+        table: 'report_whatsapp_queue',
+        joins: '[{"parentKey":"WhatsappQueueId","foreignTable":"whatsapp_queues","foreignKey":"id","type":"join"}]'
+    },{
+        id: 74,
+        name: 'Sentiment by Agent',
+        description: 'Sentiment by agent',
+        parent: prefix + '_voice_recordings',
+        table: 'voice_recordings',
+        conditions: '{"group":{"operator":"AND","rules":[{"condition":"IS NOT NULL","field":"voice_recordings.sentiment","value":"NULL"}]}}',
+        joins: '[{"parentKey":"UserId","foreignTable":"users","foreignKey":"id","type":"join"}]'
+    },{
+        id: 75,
+        name: 'Sentiment Summary',
+        description: 'Sentiment Summary',
+        parent: prefix + '_voice_recordings',
+        table: 'voice_recordings',
+        conditions: '{"group":{"operator":"AND","rules":[{"condition":"IS NOT NULL","field":"voice_recordings.sentiment","value":""}]}}'
     }];
 };