Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close fyst #187355990 #4472

Merged
merged 25 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 4 additions & 7 deletions app/assets/stylesheets/_state-file.scss
Original file line number Diff line number Diff line change
Expand Up @@ -673,13 +673,10 @@
max-width: 100%;
}

.esign-declaration-outer, .return-status-outer, .submission-confirmation-outer {

.question-wrapper .button--primary {
min-width: 40rem;
max-width: 40rem;
width: 40rem;
}
.question-layout .question-wrapper .button--primary.button--wide {
min-width: 40rem;
max-width: 40rem;
width: 40rem;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed some text overflow on some buttons - making this a more generic rule allowed it to be reused. (Particularly in the different states of the return-status page)

}

.esign-declaration-outer .text--error {
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ def open_for_ctc_read_write?
helper_method :open_for_ctc_read_write?

def open_for_state_file_intake?
app_time.between?(Rails.configuration.state_file_start_of_open_intake, Rails.configuration.state_file_end_of_intake)
app_time.between?(Rails.configuration.state_file_start_of_open_intake, Rails.configuration.state_file_end_of_in_progress_intakes)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

end_of_in_progress_intakes is a more descriptive standardized name

end
helper_method :open_for_state_file_intake?

Expand Down
3 changes: 2 additions & 1 deletion app/controllers/session_toggles_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ def index
service_url: url_for(host: MultiTenantService.new(:statefile).host, controller: :session_toggles),
times: [
SessionToggleTime.new(name: 'Start of open intake', property: :state_file_start_of_open_intake),
SessionToggleTime.new(name: 'End of intake', property: :state_file_end_of_intake),
SessionToggleTime.new(name: 'End of New intake', property: :state_file_end_of_new_intakes),
SessionToggleTime.new(name: 'End of In Progress Intakes', property: :state_file_end_of_in_progress_intakes),
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ module Questions
class LandingPageController < QuestionsController
skip_before_action :redirect_if_no_intake
skip_before_action :set_current_step
skip_before_action :redirect_if_in_progress_intakes_ended

def edit
@state_name = StateFileBaseIntake::STATE_CODE_AND_NAMES[params[:us_state]]
@closed = app_time.after?(Rails.configuration.state_file_end_of_in_progress_intakes)
if current_intake.present?
if current_intake.primary_first_name.present?
@user_name = current_intake.primary_first_name
Expand Down
11 changes: 11 additions & 0 deletions app/controllers/state_file/questions/questions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module Questions
class QuestionsController < ::Questions::QuestionsController
include StateFile::StateFileControllerConcern
before_action :redirect_if_no_intake
before_action :redirect_if_in_progress_intakes_ended
helper_method :card_postscript

# default layout for all state file questions
Expand Down Expand Up @@ -51,6 +52,16 @@ def redirect_if_no_intake
end
end

def redirect_if_in_progress_intakes_ended
if app_time.after?(Rails.configuration.state_file_end_of_in_progress_intakes)
if current_intake.efile_submissions.empty?
redirect_to root_path
else
redirect_to StateFile::Questions::ReturnStatusController.to_path_helper(action: :edit, us_state: state_code)
end
end
end

def next_step
form_navigation.next
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
module StateFile
module Questions
class ReturnStatusController < AuthenticatedQuestionsController
include StateFile::SurveyLinksConcern
before_action :redirect_if_from_efile
before_action :redirect_if_no_submission
skip_before_action :redirect_if_in_progress_intakes_ended

def edit
@error = submission_error
Expand All @@ -12,6 +14,7 @@ def edit
@download_form_name = download_form_name
@mail_voucher_address = mail_voucher_address
@voucher_path = voucher_path
@survey_link = survey_link(current_intake)
end

def prev_path
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module StateFile
module Questions
class SubmissionPdfsController < QuestionsController
skip_before_action :redirect_if_in_progress_intakes_ended

def show
@submission = current_intake.efile_submissions.find_by(id: params[:id])
error_redirect and return unless @submission.present?
Expand Down
4 changes: 3 additions & 1 deletion app/controllers/state_file/state_file_pages_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ def clear_session
redirect_to action: :about_page
end

def login_options; end
def login_options
@sign_in_closed = app_time.after?(Rails.configuration.state_file_end_of_in_progress_intakes)
end

private

Expand Down
1 change: 0 additions & 1 deletion app/models/state_file_az_intake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
# hashed_ssn :string
# household_excise_credit_claimed :integer default("unfilled"), not null
# household_excise_credit_claimed_amt :integer
# last_completed_step :string
# last_sign_in_at :datetime
# last_sign_in_ip :inet
# locale :string default("en")
Expand Down
1 change: 0 additions & 1 deletion app/models/state_file_ny_intake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
# household_rent_amount :integer
# household_rent_own :integer default("unfilled"), not null
# household_ssi :integer
# last_completed_step :string
# last_sign_in_at :datetime
# last_sign_in_ip :inet
# locale :string default("en")
Expand Down
4 changes: 3 additions & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@
<% if hide_intercom? %>
<div></div>
<% elsif state_file? %>
<%= render("shared/state_file_intercom")%>
<% unless app_time.after?(Rails.configuration.state_file_end_of_in_progress_intakes) %>
<%= render("shared/state_file_intercom")%>
<% end %>
<% else %>
<%= render("shared/intercom", isHub: hub?) unless (hub? || Routes::CtcDomain.new.matches?(request)) %>
<% end %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@
<div class="form-card__content">
<h1 class="h2"><%= content_for :page_title %></h1>

<p class="spacing-below-15"><%= t(".code_sent_to_html", contact_info: @verification_code_form.formatted_contact_info) %></p>
<p class="spacing-below-15">
<% if app_time.after?(Rails.configuration.state_file_end_of_in_progress_intakes) %>
<%= t(".code_sent_to_closed_html", contact_info: @verification_code_form.formatted_contact_info) %>
<% else %>
<%= t(".code_sent_to_html", contact_info: @verification_code_form.formatted_contact_info) %>
<% end %>
</p>
<%= f.hidden_field(:contact_info) %>
<div class="blue-group">
<%= f.cfa_input_field(:verification_code, t(".enter_6_digit_code"), classes: ["form-width--long"]) %>
Expand Down
78 changes: 49 additions & 29 deletions app/views/state_file/questions/landing_page/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,49 +1,69 @@
<% state_image_path = params[:us_state] == "ny" ? "partner-logos/nygov-logo.svg" : "partner-logos/azgov-logo.svg" %>
<% title = t(".#{params[:us_state]}.title") %>
<% title = @closed ? t(".title_closed", state_name: @state_name) : t(".#{params[:us_state]}.title") %>

<% content_for :page_title, title %>

<% content_for :card do %>
<div class="landing-page-content">
<h1 class="h1"><%= title %></h1>

<% unless @user_name.present? %>
<% if @closed %>
<h2 class="h2">
<%= t(".#{params[:us_state]}.built_with_html") %>
<%= t(".#{params[:us_state]}.closed_html") %>
</h2>
<% end %>

<div class="partner-logo-wrapper spacing-below-35">
<div class="partner-logo-image">
<%= image_tag state_image_path, alt: "#{state_name} state logo", class: "" %>
</div>
<div class="partner-logo-text text--body text--bold">
<%=t(".#{params[:us_state]}.supported_by") %>
<h2 class="h2">
<%= t(".already_filed_html") %>
</h2>
<div class="partner-logo-wrapper spacing-below-35">
<div class="partner-logo-image">
<%= image_tag state_image_path, alt: "#{state_name} state logo", class: "" %>
</div>
<div class="partner-logo-text text--body text--bold">
<%=t(".#{params[:us_state]}.supported_by") %>
</div>
</div>
</div>

<% if @user_name.present? %>
<h2 class="h2"><%= t(".welcome_back", user_name: @user_name) %></h2>
<h2 class="h2"><%= t(".continue", state_name: @state_name) %></h2>
<%= link_to StateFile::StateFilePagesController.to_path_helper(action: :login_options, us_state: current_intake.state_code), class: "button button--primary button--wide", id: "firstCta" do %>
<%= t("general.sign_in") %>
<%= link_to StateFile::StateFilePagesController.to_path_helper(action: :login_options, us_state: params[:us_state]), class: "button button--primary button--wide", id: "firstCta" do %>
<%= t(".download_your_record") %>
<% end %>
<%= form_with model: @form, url: { action: :update }, local: true, method: :put, builder: VitaMinFormBuilder, id: "start-again-form" do |f| %>
<% else %>
<% unless @user_name.present? %>
<h2 class="h2">
<%= t(".not_you", user_name: @user_name) %>
<%=f.submit t(".start_new", state_name: @state_name), class: "button--link" %>
<%= t(".#{params[:us_state]}.built_with_html") %>
</h2>
<% end %>
<% else %>
<div class="blue-group spacing-below-60">
<%= t(".help_text_html") %>

<div class="partner-logo-wrapper spacing-below-35">
<div class="partner-logo-image">
<%= image_tag state_image_path, alt: "#{state_name} state logo", class: "" %>
</div>
<div class="partner-logo-text text--body text--bold">
<%=t(".#{params[:us_state]}.supported_by") %>
</div>
</div>
<%= form_with model: @form, url: { action: :update }, local: true, method: :put, builder: VitaMinFormBuilder do |f| %>
<%= f.submit t("general.get_started"), class: "button button--primary button--wide", id: "firstCta" %>

<% if @user_name.present? %>
<h2 class="h2"><%= t(".welcome_back", user_name: @user_name) %></h2>
<h2 class="h2"><%= t(".continue", state_name: @state_name) %></h2>
<%= link_to StateFile::StateFilePagesController.to_path_helper(action: :login_options, us_state: current_intake.state_code), class: "button button--primary button--wide", id: "firstCta" do %>
<%= t("general.sign_in") %>
<% end %>
<%= form_with model: @form, url: { action: :update }, local: true, method: :put, builder: VitaMinFormBuilder, id: "start-again-form" do |f| %>
<h2 class="h2">
<%= t(".not_you", user_name: @user_name) %>
<%=f.submit t(".start_new", state_name: @state_name), class: "button--link" %>
</h2>
<% end %>
<% else %>
<div class="blue-group spacing-below-60">
<%= t(".help_text_html") %>
</div>
<%= form_with model: @form, url: { action: :update }, local: true, method: :put, builder: VitaMinFormBuilder do |f| %>
<%= f.submit t("general.get_started"), class: "button button--primary button--wide", id: "firstCta" %>
<% end %>
<h2 class="h2">
<%= t(".already_started_html", sign_in_url: StateFile::StateFilePagesController.to_path_helper(action: :login_options, us_state: params[:us_state])) %>
</h2>
<% end %>
<h2 class="h2">
<%= t(".already_started_html", sign_in_url: StateFile::StateFilePagesController.to_path_helper(action: :login_options, us_state: params[:us_state])) %>
</h2>
<% end %>
</div>
<%= image_tag 'questions/welcome.svg', class: 'fyst-home-image' %>
Expand Down
79 changes: 45 additions & 34 deletions app/views/state_file/questions/return_status/_accepted.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,51 +8,62 @@
<%= t("state_file.questions.return_status.accepted.title", state_name: States.name_for_key(params[:us_state].upcase)) %>
</h1>

<% refund_or_owed_amount = current_intake.calculated_refund_or_owed_amount %>
<% if refund_or_owed_amount.positive? %>
<p><%= t('.check_your_refund_html', refund_url: @refund_url) %></p>
<% elsif refund_or_owed_amount.negative? %>
<% if app_time.before?(Rails.configuration.state_file_end_of_in_progress_intakes) %>
<% refund_or_owed_amount = current_intake.calculated_refund_or_owed_amount %>
<% if refund_or_owed_amount.positive? %>
<p><%= t('.check_your_refund_html', refund_url: @refund_url) %></p>
<% elsif refund_or_owed_amount.negative? %>
<p>
<%= t('.direct_debit_html', tax_payment_url: @tax_payment_url) %>
<%= t('.track_your_payment_html') if params[:us_state] == 'ny' %>
</p>
<% end %>

<p>
<%= t('.direct_debit_html', tax_payment_url: @tax_payment_url) %>
<%= t('.track_your_payment_html') if params[:us_state] == 'ny' %>
<a target="_blank" rel="noopener nofollow" href="https://vote.gov/"><%= t('.register_to_vote') %></a>
</p>
<% end %>

<p>
<a target="_blank" rel="noopener nofollow" href="https://vote.gov/"><%= t('.register_to_vote') %></a>
</p>
<p><%= t('general.spread_the_word_html') %></p>

<p><%= t('general.spread_the_word_html') %></p>
<div class="blue-group">
<p>
<strong><%= t('.pay_by_mail_or_moneyorder') %></strong>
</p>

<div class="blue-group">
<p>
<strong><%= t('.pay_by_mail_or_moneyorder') %></strong>
</p>
<p>
<%= t('.include_payment') %>
(<%= @download_form_name %>)
</p>

<p>
<%= t('.include_payment') %>
(<%= @download_form_name %>)
</p>
<div>
<%= link_to t('.download_voucher'), ActionController::Base.helpers.asset_path(@voucher_path) %>
</div>

<div>
<%= link_to t('.download_voucher'), ActionController::Base.helpers.asset_path(@voucher_path) %>
</div>
<hr class="spacing-above-25 spacing-below-25">

<% if params[:us_state] == 'az' %>
<p>
<%= t('.check_payable') %>
</p>

<hr class="spacing-above-25 spacing-below-25">
<hr class="spacing-above-25 spacing-below-25">
<% end %>

<% if params[:us_state] == 'az' %>
<p>
<%= t('.check_payable') %>
<%= t('.mail_voucher_and_payment') %>
</p>

<hr class="spacing-above-25 spacing-below-25">
<% end %>

<strong>
<%= @mail_voucher_address %>
</strong>
</div>
<% else %>
<h1 class="h2">
<%= t("state_file.questions.return_status.accepted.download_title", state_name: States.name_for_key(params[:us_state].upcase)) %>
</h1>
<p>
<%= t('.mail_voucher_and_payment') %>
<%= t("state_file.questions.return_status.thank_you_html", state_name: States.name_for_key(params[:us_state].upcase)) %>
</p>

<strong>
<%= @mail_voucher_address %>
</strong>
</div>
<p><a target="_blank" rel="noopener nofollow" href="<%= @survey_link %>"><%= t("state_file.questions.return_status.accepted.feedback") %></a></p>
<p><a target="_blank" rel="noopener nofollow" href="https://vote.gov/"><%= t('.register_to_vote') %></a></p>
<% end %>
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
</p>

<p>
<%= t('.more_than_two_days') %>
<%= app_time.before?(Rails.configuration.state_file_end_of_in_progress_intakes) ? t('.more_than_two_days') : t('.more_than_two_days_closed_html') %>
</p>