mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-29 15:36:07 +00:00
dev
This commit is contained in:
@@ -6,7 +6,16 @@
|
||||
"type": "Type",
|
||||
"startDate": "Start Date",
|
||||
"endDate": "End Date",
|
||||
"targetLists": "Target Lists"
|
||||
"targetLists": "Target Lists",
|
||||
"sentCount": "Sent",
|
||||
"openedCount": "Opened",
|
||||
"clickedCount": "Clicked",
|
||||
"optedOutCount": "Opted Out",
|
||||
"bouncedCount": "Bounced",
|
||||
"hardBouncedCount": "Hard Bounced",
|
||||
"softBouncedCount": "Soft Bounced",
|
||||
"leadCreatedCount": "Leads Created",
|
||||
"revenue": "Revenue"
|
||||
},
|
||||
"links": {
|
||||
"targetLists": "Target Lists",
|
||||
@@ -22,7 +31,8 @@
|
||||
"Web": "Web",
|
||||
"Television": "Television",
|
||||
"Radio": "Radio",
|
||||
"Newsletter": "Newsletter"
|
||||
"Newsletter": "Newsletter",
|
||||
"Mail": "Mail"
|
||||
},
|
||||
"status": {
|
||||
"Planning": "Planning",
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
},
|
||||
"type": {
|
||||
"type": "enum",
|
||||
"options": ["Email", "Web", "Television", "Radio", "Newsletter"]
|
||||
"options": ["Email", "Newsletter", "Web", "Television", "Radio", "Mail"]
|
||||
},
|
||||
"startDate": {
|
||||
"type": "date"
|
||||
@@ -47,6 +47,78 @@
|
||||
},
|
||||
"targetLists": {
|
||||
"type": "linkMultiple"
|
||||
},
|
||||
"sentCount": {
|
||||
"type": "int",
|
||||
"notStorable": true,
|
||||
"readOnly": true,
|
||||
"layoutDetailDisabled": true,
|
||||
"layoutListDisabled": true,
|
||||
"layoutSearchDisabled": true
|
||||
},
|
||||
"openedCount": {
|
||||
"type": "int",
|
||||
"notStorable": true,
|
||||
"readOnly": true,
|
||||
"layoutDetailDisabled": true,
|
||||
"layoutListDisabled": true,
|
||||
"layoutSearchDisabled": true
|
||||
},
|
||||
"clickedCount": {
|
||||
"type": "int",
|
||||
"notStorable": true,
|
||||
"readOnly": true,
|
||||
"layoutDetailDisabled": true,
|
||||
"layoutListDisabled": true,
|
||||
"layoutSearchDisabled": true
|
||||
},
|
||||
"optedOutCount": {
|
||||
"type": "int",
|
||||
"notStorable": true,
|
||||
"readOnly": true,
|
||||
"layoutDetailDisabled": true,
|
||||
"layoutListDisabled": true,
|
||||
"layoutSearchDisabled": true
|
||||
},
|
||||
"bouncedCount": {
|
||||
"type": "int",
|
||||
"notStorable": true,
|
||||
"readOnly": true,
|
||||
"layoutDetailDisabled": true,
|
||||
"layoutListDisabled": true,
|
||||
"layoutSearchDisabled": true
|
||||
},
|
||||
"hardBouncedCount": {
|
||||
"type": "int",
|
||||
"notStorable": true,
|
||||
"readOnly": true,
|
||||
"layoutDetailDisabled": true,
|
||||
"layoutListDisabled": true,
|
||||
"layoutSearchDisabled": true
|
||||
},
|
||||
"softBouncedCount": {
|
||||
"type": "int",
|
||||
"notStorable": true,
|
||||
"readOnly": true,
|
||||
"layoutDetailDisabled": true,
|
||||
"layoutListDisabled": true,
|
||||
"layoutSearchDisabled": true
|
||||
},
|
||||
"leadCreatedCount": {
|
||||
"type": "int",
|
||||
"notStorable": true,
|
||||
"readOnly": true,
|
||||
"layoutDetailDisabled": true,
|
||||
"layoutListDisabled": true,
|
||||
"layoutSearchDisabled": true
|
||||
},
|
||||
"revenue": {
|
||||
"type": "currency",
|
||||
"notStorable": true,
|
||||
"readOnly": true,
|
||||
"layoutDetailDisabled": true,
|
||||
"layoutListDisabled": true,
|
||||
"layoutSearchDisabled": true
|
||||
}
|
||||
},
|
||||
"links": {
|
||||
|
||||
@@ -24,17 +24,46 @@ Espo.define('Crm:Views.Campaign.Record.Panels.Statistics', 'Views.Record.Panels.
|
||||
|
||||
return Dep.extend({
|
||||
|
||||
template: 'crm:campaign.record.panels.statistics',
|
||||
|
||||
data: function () {
|
||||
/*data: function () {
|
||||
return {};
|
||||
},*/
|
||||
|
||||
setupFieldList: function () {
|
||||
var type = this.model.get('type');
|
||||
switch (type) {
|
||||
case 'Email':
|
||||
case 'Newsletter':
|
||||
this.fields = ['sentCount', 'openedCount', 'clickedCount', 'optedOutCount', 'bouncedCount', 'revenue'];
|
||||
break;
|
||||
case 'Web':
|
||||
case 'Television':
|
||||
case 'Radio':
|
||||
this.fields = ['leadCreatedCount', 'revenue'];
|
||||
break;
|
||||
case 'Mail':
|
||||
this.fields = ['sentCount', 'leadCreatedCount', 'revenue'];
|
||||
break;
|
||||
default:
|
||||
this.fields = ['leadCreatedCount', 'revenue'];
|
||||
}
|
||||
},
|
||||
|
||||
setup: function () {
|
||||
this.fields = ['sentCount', 'openedCount', 'clickedCount', 'optedOutCount', 'bouncedCount', 'leadCreatedCount', 'revenue'];
|
||||
Dep.prototype.setup.call(this);
|
||||
this.setupFieldList();
|
||||
|
||||
this.listenTo(this.model, 'change:type', function () {
|
||||
this.setupFieldList();
|
||||
if (this.isRendered()) {
|
||||
this.render();
|
||||
}
|
||||
}, this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user