aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/ReportConfigController.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/view/ReportConfigController.js')
-rw-r--r--web/app/view/ReportConfigController.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/web/app/view/ReportConfigController.js b/web/app/view/ReportConfigController.js
index 5bd6ae7ef..64acb7403 100644
--- a/web/app/view/ReportConfigController.js
+++ b/web/app/view/ReportConfigController.js
@@ -21,7 +21,11 @@ Ext.define('Traccar.view.ReportConfigController', {
init: function () {
var store = this.lookupReference('eventTypeField').getStore();
- if (store.getCount() === 1) {
+ if (store.getCount() === 0) {
+ store.add({
+ type: Traccar.store.ReportEventTypes.allEvents,
+ name: Strings.eventAll
+ });
Ext.create('Traccar.store.AllNotifications').load({
scope: this,
callback: function (records, operation, success) {
@@ -44,10 +48,10 @@ Ext.define('Traccar.view.ReportConfigController', {
this.getView().callingPanel.deviceId = this.lookupReference('deviceField').getValue();
this.getView().callingPanel.groupId = this.lookupReference('groupField').getValue();
eventType = this.lookupReference('eventTypeField').getValue();
- if (eventType.indexOf(Ext.getStore('ReportEventTypes').allEvents) > -1) {
- eventType = [Ext.getStore('ReportEventTypes').allEvents];
+ if (eventType.indexOf(Traccar.store.ReportEventTypes.allEvents) > -1) {
+ eventType = [Traccar.store.ReportEventTypes.allEvents];
} else if (eventType.length === this.lookupReference('eventTypeField').getStore().getCount() - 1) {
- eventType = [Ext.getStore('ReportEventTypes').allEvents];
+ eventType = [Traccar.store.ReportEventTypes.allEvents];
}
this.getView().callingPanel.eventType = eventType;
this.getView().callingPanel.fromDate = this.lookupReference('fromDateField').getValue();