forked from demarches-simplifiees/demarches-simplifiees.fr
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/import-2023-06-01'
- Loading branch information
Showing
132 changed files
with
2,580 additions
and
763 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,8 @@ | |
} | ||
} | ||
|
||
.number-col { | ||
.number-col, | ||
.fr-badge { | ||
white-space: nowrap; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
@import "constants"; | ||
|
||
.motivation { | ||
padding: $default-padding; | ||
color: $black; | ||
width: 450px; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
app/components/instructeurs/en_construction_menu_component.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# frozen_string_literal: true | ||
|
||
class Instructeurs::EnConstructionMenuComponent < ApplicationComponent | ||
attr_reader :dossier | ||
|
||
def initialize(dossier:) | ||
@dossier = dossier | ||
end | ||
|
||
def render? | ||
return true if dossier.may_repasser_en_construction? | ||
return true if dossier.may_flag_as_pending_correction? | ||
|
||
false | ||
end | ||
|
||
def menu_label | ||
if dossier.en_construction? | ||
t('.request_correction') | ||
else | ||
t(".revert_en_construction") | ||
end | ||
end | ||
end |
4 changes: 4 additions & 0 deletions
4
...ponents/instructeurs/en_construction_menu_component/en_construction_menu_component.en.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
en: | ||
revert_en_construction: Revert to in progress | ||
request_correction: Request a correction |
4 changes: 4 additions & 0 deletions
4
...ponents/instructeurs/en_construction_menu_component/en_construction_menu_component.fr.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
fr: | ||
revert_en_construction: Repasser en construction | ||
request_correction: Demander une correction |
31 changes: 31 additions & 0 deletions
31
...ents/instructeurs/en_construction_menu_component/en_construction_menu_component.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
= render Dropdown::MenuComponent.new(wrapper: :div, menu_options: { id: "menu-en-construction" }, button_options: { class: "fr-btn--secondary" }, role: :region) do |menu| | ||
- menu.with_button_inner_html do | ||
= menu_label | ||
|
||
- if dossier.may_repasser_en_construction? | ||
= menu.with_item do | ||
= link_to(repasser_en_construction_instructeur_dossier_path(dossier.procedure.id, dossier.id), method: :post, role: 'menuitem') do | ||
%span.fr-icon.fr-icon-draft-line.fr-text-default--info.fr-mt-1v{ "aria-hidden": "true" } | ||
.dropdown-description | ||
%h4= t('.revert_en_construction') | ||
L’usager sera notifié qu’il peut modifier son dossier | ||
- menu.with_item do | ||
= link_to('#', onclick: "DS.showMotivation(event, 'pending_correction');", role: 'menuitem') do | ||
%span.fr-icon.fr-icon-error-warning-line.fr-text-default--info.fr-mt-1v{ "aria-hidden": "true" } | ||
.dropdown-description | ||
%h4= t('.request_correction') | ||
L’usager sera notifié que des modifications sont attendues | ||
- menu.with_item(class: "inactive form-inside fr-pt-1v") do | ||
= render partial: 'instructeurs/dossiers/instruction_button_motivation', locals: { dossier:, | ||
visible: true, | ||
form_path: pending_correction_instructeur_dossier_path(dossier.procedure, dossier), | ||
placeholder: 'Expliquez au demandeur quelle(s) correction(s) sont attendues', | ||
popup_class: 'pending_correction', | ||
button_justificatif_label: "Ajouter une pièce jointe (facultatif)", | ||
process_button: dossier.en_construction? ? 'Valider' : 'Valider et repasser en construction', | ||
process_action: nil, | ||
title: 'Marquer en attente de corrections', | ||
confirm: 'Envoyer la demande de corrections ?'} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# frozen_string_literal: true | ||
|
||
class Instructeurs::InstructionMenuComponent < ApplicationComponent | ||
attr_reader :dossier | ||
|
||
def initialize(dossier:) | ||
@dossier = dossier | ||
end | ||
|
||
def render? | ||
dossier.en_instruction? | ||
end | ||
|
||
def menu_label | ||
t(".instruct") | ||
end | ||
end |
3 changes: 3 additions & 0 deletions
3
app/components/instructeurs/instruction_menu_component/instruction_menu_component.en.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
en: | ||
instruct: Instruct the file |
3 changes: 3 additions & 0 deletions
3
app/components/instructeurs/instruction_menu_component/instruction_menu_component.fr.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
fr: | ||
instruct: Instruire le dossier |
34 changes: 34 additions & 0 deletions
34
app/components/instructeurs/instruction_menu_component/instruction_menu_component.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
= render Dropdown::MenuComponent.new(wrapper: :div, wrapper_options: { data: { turbo_force: :server } }, role: :region) do |menu| | ||
- menu.with_button_inner_html do | ||
= menu_label | ||
|
||
- menu.with_item do | ||
= link_to('#', onclick: "DS.showMotivation(event, 'accept');", role: 'menuitem') do | ||
%span.icon.accept | ||
.dropdown-description | ||
%h4 Accepter | ||
L’usager sera informé que son dossier a été accepté | ||
|
||
- menu.with_item(class: "hidden inactive form-inside fr-pt-1v") do | ||
= render partial: 'instructeurs/dossiers/instruction_button_motivation', locals: { dossier: dossier, placeholder: 'Expliquez au demandeur pourquoi ce dossier est accepté (facultatif)', popup_class: 'accept', process_action: 'accepter', title: 'Accepter', confirm: "Confirmez-vous l'acceptation ce dossier ?" } | ||
|
||
- menu.with_item do | ||
= link_to('#', onclick: "DS.showMotivation(event, 'without-continuation');", role: 'menuitem') do | ||
%span.icon.without-continuation | ||
.dropdown-description | ||
%h4 Classer sans suite | ||
L’usager sera informé que son dossier a été classé sans suite | ||
|
||
- menu.with_item(class: "hidden inactive form-inside fr-pt-1v") do | ||
= render partial: 'instructeurs/dossiers/instruction_button_motivation', locals: { dossier: dossier, placeholder: 'Expliquez au demandeur pourquoi ce dossier est classé sans suite (obligatoire)', popup_class: 'without-continuation', process_action: 'classer_sans_suite', title: 'Classer sans suite', confirm: 'Confirmez-vous le classement sans suite de ce dossier ?' } | ||
|
||
- menu.with_item do | ||
= link_to('#', onclick: "DS.showMotivation(event, 'refuse');", role: 'menuitem') do | ||
%span.icon.refuse | ||
.dropdown-description | ||
%h4 Refuser | ||
L’usager sera informé que son dossier a été refusé | ||
|
||
- menu.with_item(class: "hidden inactive form-inside fr-pt-1v") do | ||
= render partial: 'instructeurs/dossiers/instruction_button_motivation', locals: { dossier: dossier, placeholder: 'Expliquez au demandeur pourquoi ce dossier est refusé (obligatoire)', popup_class: 'refuse', process_action: 'refuser', title: 'Refuser', confirm: 'Confirmez-vous le refus de ce dossier ?' } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.