1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-17 11:54:22 +01:00

(bug) cannot show order statstic

This commit is contained in:
Du Peng 2022-10-18 12:44:19 +02:00
parent 7155a00870
commit ebbbb47e67
2 changed files with 4 additions and 2 deletions

View File

@ -187,7 +187,8 @@ Application.Controllers.controller('StatisticsController', ['$scope', '$state',
return ((tab.es_type_key === 'subscription' && !$rootScope.modules.plans) ||
(tab.es_type_key === 'training' && !$rootScope.modules.trainings) ||
(tab.es_type_key === 'space' && !$rootScope.modules.spaces) ||
(tab.es_type_key === 'machine' && !$rootScope.modules.machines)
(tab.es_type_key === 'machine' && !$rootScope.modules.machines) ||
(tab.es_type_key === 'order' && !$rootScope.modules.store)
);
} else {
return true;

View File

@ -12,7 +12,8 @@ if StatisticIndex.count.zero?
{ id: 4, es_type_key: 'event', label: I18n.t('statistics.events') },
{ id: 5, es_type_key: 'account', label: I18n.t('statistics.registrations'), ca: false },
{ id: 6, es_type_key: 'project', label: I18n.t('statistics.projects'), ca: false },
{ id: 7, es_type_key: 'user', label: I18n.t('statistics.users'), table: false, ca: false }
{ id: 7, es_type_key: 'user', label: I18n.t('statistics.users'), table: false, ca: false },
{ id: 8, es_type_key: 'order', label: I18n.t('statistics.orders') }
])
connection = ActiveRecord::Base.connection
connection.execute("SELECT setval('statistic_indices_id_seq', 7);") if connection.instance_values['config'][:adapter] == 'postgresql'