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

Convert am-i-getting-minimum-wage to use ERB templates for questions #2114

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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/smart_answer_flows/am-i-getting-minimum-wage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ def define
status :published
satisfies_need "100145"

use_erb_templates_for_questions

use_shared_logic "minimum_wage"
end
end
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<% content_for :title do %>
Are you an apprentice?
<% end %>

<% options(
"not_an_apprentice": "Not an apprentice",
"apprentice_under_19": "Apprentice under 19",
"apprentice_over_19_first_year": "Apprentice aged 19 and over in your first year",
"apprentice_over_19_second_year_onwards": "Apprentice 19 and over in your second year or onwards"
) %>

<% content_for :hint do %>
If you’re 19 or over and past your first year you don’t count as an apprentice for minimum wage purposes.
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<% content_for :title do %>
How much does your employer charge for accommodation per day?
<% end %>

<% content_for :suffix_label do %>
per day
<% end %>

<% content_for :error_message do %>
Please enter a number greater than 0
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<% content_for :title do %>
How many days per week do you live in the accommodation?
<% end %>

<% content_for :suffix_label do %>
days per week
<% end %>

<% content_for :error_message do %>
7 is the highest number of days you can enter.
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<% content_for :title do %>
How many hours did you work during the pay period?
<% end %>

<% content_for :hint do %>
Don’t include any overtime or other extra hours you worked.

<% end %>

<% content_for :suffix_label do %>
hours
<% end %>

<% content_for :error_message do %>
Please enter a number
<% end %>
<% content_for :error_hours do %>
Please enter the number of hours you actually worked during the pay period.
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<% content_for :title do %>
How many hours do you work during the pay period?
<% end %>

<% content_for :hint do %>
Don’t include any overtime or other extra hours you might work.

<% end %>

<% content_for :suffix_label do %>
hours
<% end %>

<% content_for :error_message do %>
Please enter a number
<% end %>
<% content_for :error_hours do %>
Please enter the number of hours you actually work during the pay period.
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<% content_for :title do %>
How many hours of overtime did you work during the pay period?
<% end %>

<% content_for :hint do %>
If you didn’t work overtime enter 0
<% end %>

<% content_for :suffix_label do %>
hours
<% end %>

<% content_for :error_message do %>
Please enter a number
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<% content_for :title do %>
How many hours of overtime do you work during the pay period?
<% end %>

<% content_for :hint do %>
If you don’t work overtime enter 0
<% end %>

<% content_for :suffix_label do %>
hours
<% end %>

<% content_for :error_message do %>
Please enter a number
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<% content_for :title do %>
How much do you get paid before tax in the pay period?
<% end %>

<% content_for :hint do %>
Don’t include payments for overtime or anything extra to your pay, eg money for clothes or goods.
<% end %>

<% content_for :suffix_label do %>
in the pay period
<% end %>

<% content_for :error_message do %>
Please enter a number
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<% content_for :title do %>
How much were you paid in the pay period?
<% end %>

<% content_for :hint do %>
Don’t include payments for overtime or anything extra to your pay, eg money for clothes or goods.
<% end %>

<% content_for :suffix_label do %>
in the pay period
<% end %>

<% content_for :error_message do %>
Please enter a number
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<% content_for :title do %>
How often did you get paid?
<% end %>

<% content_for :hint do %>
You get paid every

<% end %>

<% content_for :suffix_label do %>
days
<% end %>

<% content_for :body do %>
This is your pay period.

<% end %>

<% content_for :error_message do %>
Please enter a number between 1 and 31.
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<% content_for :title do %>
How often do you get paid?
<% end %>

<% content_for :hint do %>
You get paid every

<% end %>

<% content_for :suffix_label do %>
days
<% end %>

<% content_for :body do %>
This is your pay period.

<% end %>

<% content_for :error_message do %>
Please enter a number between 1 and 31.
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<% content_for :title do %>
How old are you?
<% end %>

<% content_for :suffix_label do %>
years old
<% end %>

<% content_for :error_message do %>
Please enter a whole number greater than 0
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<% content_for :title do %>
How old were you at the time?
<% end %>

<% content_for :suffix_label do %>
years old
<% end %>

<% content_for :error_message do %>
Please enter a whole number greater than 0
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<% content_for :title do %>
Does your employer provide you with accommodation?
<% end %>

<% options(
"no": "No",
"yes_free": "Yes, the accommodation is free",
"yes_charged": "Yes, the accommodation is charged for"
) %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<% content_for :title do %>
How much did your employer charge for accommodation per day?
<% end %>

<% content_for :suffix_label do %>
per day
<% end %>

<% content_for :error_message do %>
Please enter a number greater than 0
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<% content_for :title do %>
How many days per week did you live in the accommodation?
<% end %>

<% content_for :suffix_label do %>
days per week
<% end %>

<% content_for :error_message do %>
7 is the highest number of days you can enter.
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<% content_for :title do %>
Which year would you like to check past payments for?
<% end %>

<% options(
"2014-10-01": "Oct 2014 - Sep 2015",
"2013-10-01": "Oct 2013 - Sep 2014",
"2012-10-01": "Oct 2012 - Sep 2013",
"2011-10-01": "Oct 2011 - Sep 2012",
"2010-10-01": "Oct 2010 - Sep 2011",
"2009-10-01": "Oct 2009 - Sep 2010",
"2008-10-01": "Oct 2008 - Sep 2009"
) %>

<% content_for :hint do %>
You can go back up to 6 years
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<% content_for :title do %>
Did your employer provide you with accommodation?
<% end %>

<% options(
"no": "No",
"yes_free": "Yes, the accommodation was free",
"yes_charged": "Yes, the accommodation was charged for"
) %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<% content_for :title do %>
Were you an apprentice at the time?
<% end %>

<% options(
"no": "No",
"apprentice_under_19": "Apprentice under 19",
"apprentice_over_19": "Apprentice aged 19 and over and in your first year"
) %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<% content_for :title do %>
How much do you get paid for overtime per hour?
<% end %>

<% content_for :suffix_label do %>
per hour
<% end %>

<% content_for :error_message do %>
Please enter a number
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<% content_for :title do %>
How much did you get paid for overtime per hour?
<% end %>

<% content_for :suffix_label do %>
per hour
<% end %>

<% content_for :error_message do %>
Please enter a number
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<% content_for :title do %>
What would you like to check?
<% end %>

<% options(
"current_payment": "If you're getting the National Minimum Wage (from October 2015)",
"past_payment": "If an employer owes you past payments (before October 2015)"
) %>
Loading