2024-04-29 00:17:15 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2022-04-25 12:40:16 +02:00
|
|
|
class ApplicationComponent < ViewComponent::Base
|
|
|
|
include ViewComponent::Translatable
|
2022-10-12 11:48:24 +02:00
|
|
|
include FlipperHelper
|
2022-06-16 14:56:53 +02:00
|
|
|
|
2023-11-27 17:06:29 +01:00
|
|
|
delegate :rich_text_area_tag, :dsfr_icon, to: :helpers
|
2023-10-11 18:49:11 +02:00
|
|
|
|
2022-10-12 11:48:24 +02:00
|
|
|
def current_user
|
|
|
|
controller.current_user
|
|
|
|
end
|
2022-11-21 12:22:41 +01:00
|
|
|
|
2024-07-19 17:53:04 +02:00
|
|
|
def current_instructeur
|
|
|
|
controller.current_instructeur
|
|
|
|
end
|
|
|
|
|
2022-11-21 12:22:41 +01:00
|
|
|
def current_administrateur
|
|
|
|
controller.current_administrateur
|
|
|
|
end
|
2023-09-28 17:45:39 +02:00
|
|
|
|
|
|
|
def current_gestionnaire
|
|
|
|
controller.current_gestionnaire
|
|
|
|
end
|
2022-04-25 12:40:16 +02:00
|
|
|
end
|