Skip to content

Commit 78484f2

Browse files
feat(upload): make new import the default (#2751)
* feat(upload): make new import the default * minor lint fix * fix: remove need for shared component * fix: renaming to more specific name
1 parent 01ad853 commit 78484f2

File tree

9 files changed

+65
-1
lines changed

9 files changed

+65
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { Controller } from "@hotwired/stimulus"
2+
3+
export default class extends Controller {
4+
close() {
5+
this.element.remove()
6+
}
7+
}

app/javascript/stylesheets/components/_banner.scss

+14
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,17 @@
1111
color: white;
1212
}
1313
}
14+
15+
.announcement-banner {
16+
background-color: #6363E6;
17+
color: white;
18+
19+
a {
20+
color: white;
21+
22+
&:hover {
23+
color: white;
24+
}
25+
}
26+
}
27+

app/views/layouts/_application_base.html.erb

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<%= render 'layouts/rdv_insertion_instance_name' %>
77
<%= content_for :header %>
88
<%= render 'common/flashes' %>
9+
<%= content_for :announcement_banner %>
910
<div class="wrapper">
1011
<%= turbo_frame_tag "remote_modal", target: "_top" %>
1112
<%= yield %>

app/views/layouts/user_list_upload.html.erb

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<body data-matomo-mask class="bg-white">
1111
<%= render 'layouts/rdv_insertion_instance_name' %>
1212
<%= content_for :header %>
13+
<%= content_for :announcement_banner %>
1314
<%= render 'common/flashes' %>
1415
<div class="wrapper">
1516
<%= turbo_frame_tag "remote_modal", target: "_top" %>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<div class="announcement-banner d-flex" data-controller="announcement-banner">
2+
<div class="container pt-2 pb-3 px-5">
3+
<div class="d-flex justify-content-between align-items-center">
4+
<div class="d-flex justify-content-between flex-column">
5+
<h5>
6+
<i class="ri-information-line me-1 fs-4"></i>
7+
Bienvenue sur la nouvelle version d’import de fichier de rdv-insertion !
8+
</h5>
9+
<p class="mb-0">
10+
Nous l’avons conçue pour simplifier la gestion des dossiers usagers et l’envoi des invitations en masse.
11+
<%= link_to "Consulter notre tutoriel", "https://rdv-insertion.gitbook.io/guide-dutilisation-rdv-insertion-and-faq/invitation-and-convocation/import-des-usagers-nouvelle-version", target: "_blank", class: "btn-link" %> ou
12+
<%= link_to "revenir sur l’ancienne version", new_structure_upload_path, class: "btn-link" %>.
13+
</p>
14+
</div>
15+
<button class="btn text-white align-self-start p-0" data-action="click->announcement-banner#close">
16+
<i class="ri-close-line fs-4"></i>
17+
</button>
18+
</div>
19+
</div>
20+
</div>

app/views/user_list_uploads/category_selections/new.html.erb

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<% content_for :title, "Charger un fichier usagers - #{structure_name_with_context(current_structure)} - rdv-insertion" %>
2+
<%= content_for :announcement_banner, render("announcement_banner") %>
23

34
<div class="container p-3">
45
<div class="row text-dark-blue col-md-10 mx-auto">

app/views/users/_users_list_header.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
<% end %>
126126
</li>
127127
<li>
128-
<%= link_to(new_structure_upload_path, class: "dropdown-item") do %>
128+
<%= link_to(new_structure_user_list_uploads_category_selection_path, class: "dropdown-item") do %>
129129
Charger fichier usagers
130130
<% end %>
131131
</li>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<div class="announcement-banner d-flex" data-controller="announcement-banner">
2+
<div class="container pt-2 pb-3 px-5">
3+
<div class="d-flex justify-content-between align-items-center">
4+
<div class="d-flex justify-content-between flex-column">
5+
<h5>
6+
<i class="ri-information-line me-1 fs-4"></i>
7+
Vous êtes sur l’ancienne interface de création et d’invitation des usagers.
8+
</h5>
9+
<p class="mb-0">
10+
Cette interface vient d’être rénovée. Cette version ne sera plus disponible à partir du 01 mai 2025. Vous pouvez
11+
<%= link_to "essayer la nouvelle version.", new_structure_user_list_uploads_category_selection_path, class: "btn-link" %>
12+
</p>
13+
</div>
14+
<button class="btn text-white align-self-start p-0" data-action="click->announcement-banner#close">
15+
<i class="ri-close-line fs-4"></i>
16+
</button>
17+
</div>
18+
</div>
19+
</div>

app/views/users/uploads/category_selection.html.erb

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<% content_for :title, "Importer des usagers - #{current_structure.name} - rdv-insertion" %>
2+
<% content_for :announcement_banner, render("announcement_banner") %>
23

34
<div class="container mt-5">
45
<div class="row mt-5 justify-content-center">

0 commit comments

Comments
 (0)