1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-15 00:24:09 +01:00
fab-manager/app/models/statistic_index.rb

17 lines
425 B
Ruby
Raw Normal View History

2020-03-25 10:16:47 +01:00
class StatisticIndex < ApplicationRecord
2016-03-23 18:39:41 +01:00
has_many :statistic_types
has_many :statistic_fields
has_one :statistic_graph
2023-07-20 16:55:22 +02:00
def concerned_by_reservation_context?
return false unless es_type_key.in? ReservationContext::APPLICABLE_ON
return false unless Setting.get('reservation_context_feature')
true
end
def show_coupon?
es_type_key.in? %w[subscription machine training event space order]
end
2016-03-23 18:39:41 +01:00
end