-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy patherror_component.html.erb
More file actions
40 lines (40 loc) · 1.93 KB
/
error_component.html.erb
File metadata and controls
40 lines (40 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<div>
<h1><%= t(@status) %></h1>
<div>
<p>
<%=raw t(key=@text, org_name: @org_name, ao_full_name: @ao_full_name, ao_email: @ao_email) %>
</p>
</div>
<% 'have to put the case statement here, as do not have route helper in ViewComponent'
case(@reason)
when :ao_expired %>
<%= render Core::Button::ButtonComponent.new(label: "Request new link",
disabled: @invitation&.renewed?,
destination: renew_organization_invitation_path(@invitation.provider_organization, @invitation),
method: :post) %>
<% when :ao_accepted %>
<%= button_to new_user_session_path, class: 'usa-button', method: :get, data: { turbo: false } do %>
Sign in with <span class="login-button__logo">Login.gov</span>
<% end %>
<% when :cd_accepted %>
<%= render Core::Button::ButtonComponent.new(label: "Go to DPC home",
destination: root_path,
method: :get) %>
<% when :pii_mismatch %>
<%= render Core::Button::ButtonComponent.new(label: "Sign out of Login.gov",
destination: login_dot_gov_logout_path(invitation_id: @invitation.id),
method: :delete) %>
<% when :email_mismatch %>
<%= render Core::Button::ButtonComponent.new(label: "Sign out of Login.gov",
destination: login_dot_gov_logout_path(invitation_id: @invitation.id),
method: :delete) %>
<% when :no_account %>
<%= render Core::Button::ButtonComponent.new(label: "Sign out of Login.gov",
destination: login_dot_gov_logout_path,
method: :delete) %>
<% when :login_gov_signin_cancel %>
<%= link_to 'Back to portal home', root_path, class: 'usa-button usa-button--outline', data: { turbo: false }%>
<% when :login_gov_signin_fail %>
<%= link_to 'Back to portal home', root_path, class: 'usa-button usa-button--outline', data: { turbo: false }%>
<% end %>
</div>