Skip to content

Commit

Permalink
feat(InfoReferentielComponent): change badge style when referentiel i…
Browse files Browse the repository at this point in the history
…s configured and reachable, aka ready
  • Loading branch information
mfo committed Jan 15, 2025
1 parent 3832c35 commit bde6377
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
class TypesDeChampEditor::InfoReferentielComponent < ApplicationComponent
attr_reader :procedure, :type_de_champ
delegate :referentiel, to: :type_de_champ
delegate :ready?, to: :referentiel, allow_nil: true

def initialize(procedure:, type_de_champ:)
@procedure = procedure
Expand All @@ -18,10 +19,6 @@ def edit_referentiel_on_draft_or_clone_url
end
end

def configured?
false
end

private

def should_create_new_referentiel?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

.flex.fr-mb-2w.cell
%p.fake-label.fr-text--bold.flex-grow.fr-mb-0 Configuration du champ référentiel
- if !configured?
- if !ready?
%p.fr-badge.fr-badge--sm.fr-badge--error À configurer
- else
%p.fr-badge.fr-badge--sm.fr-badge--success Configuré

.fr-notice.fr-notice--info.fr-mb-2w
.fr-container
Expand Down

0 comments on commit bde6377

Please sign in to comment.