Skip to content

Commit

Permalink
Ajout du bouton
Browse files Browse the repository at this point in the history
  • Loading branch information
tnicolas1 committed Dec 19, 2024
1 parent b43f09c commit eb1a6f8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/schoolings_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class SchoolingsController < ApplicationController
before_action :authenticate_user!, :set_classe, :set_schooling
before_action :check_director, :update_confirmed_director!, :check_confirmed_director,
only: %i[abrogate_decision update]
before_action :set_student_breadcrumbs, only: %i[confirm_removal confirm_removal_cancellation confirm_da_extension]
before_action :set_student_breadcrumbs, only: %i[confirm_removal confirm_removal_cancellation confirm_da_extension confirm_cancellation_decision]

def abrogate_decision
Generate::AbrogationDecisionJob.perform_now(@schooling)
Expand All @@ -24,7 +24,7 @@ def cancellation_decision
redirect_to student_path(@schooling.student), notice: t("flash.da.cancellation", name: @schooling.student.full_name)
end

def confirm_cancellation; end
def confirm_cancellation_decision; end

def confirm_da_extension; end

Expand Down
2 changes: 2 additions & 0 deletions app/views/classes/_students_table.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
%button.fr-btn--tooltip.fr-btn{"aria-describedby" => "tooltip-da_extension-#{student.id}", type: "button"}
%span.fr-tooltip.fr-placement{id: "tooltip-da_extension-#{student.id}", role: "tooltip", "aria-hidden" => "true"}
%em= t("activerecord.tooltips.report")
%p
= dsfr_link_to "Retrait des DA", confirm_cancellation_decision_school_year_class_schooling_path(selected_school_year, @classe, schooling)
- else
- if schooling.abrogation_decision.present?
= dsfr_badge(status: :error) { "Abrogée" }
Expand Down
3 changes: 3 additions & 0 deletions config/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ fr:
confirm_removal_cancellation:
title: "Réintégration de l'élève dans la classe"
breadcrumb: "Réintégration de l'élève dans la classe"
confirm_cancellation_decision:
title: "Retrait des décisions d'attribution"
breadcrumb: "Retrait des décisions d'attribution"

global:
sponsor: "Direction\nInterministérielle\ndu Numérique"
Expand Down

0 comments on commit eb1a6f8

Please sign in to comment.