mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-01 12:24:28 +01:00
17 lines
425 B
Ruby
17 lines
425 B
Ruby
class StatisticIndex < ApplicationRecord
|
|
has_many :statistic_types
|
|
has_many :statistic_fields
|
|
has_one :statistic_graph
|
|
|
|
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
|
|
end
|