baarkerlounger
3 years ago
8 changed files with 79 additions and 10 deletions
@ -1,8 +1,16 @@ |
|||||||
<%= form_with model: @case_log, builder: GOVUKDesignSystemFormBuilder::FormBuilder do |f| %> |
<div class="govuk-grid-row"> |
||||||
<%= f.govuk_number_field :age, |
<div class="govuk-grid-column-two-thirds"> |
||||||
hint: { text: "More detail" }, |
<h1 class="govuk-heading-xl">Tasklist for log |
||||||
label: { text: "What is the tenant's age?", size: "l"}, |
<%= @case_log.id %></h1> |
||||||
min: 0, max: 150, step: 1, width: 20 |
|
||||||
%> |
<h2 class="govuk-heading-s govuk-!-margin-bottom-2">This submission is |
||||||
<%= f.govuk_submit %> |
<%= @case_log.status %></h2> |
||||||
<% end %> |
<p class="govuk-body govuk-!-margin-bottom-7">You've completed 0 of 9 sections.</p> |
||||||
|
<p class="govuk-body govuk-!-margin-bottom-7"> |
||||||
|
<a href="#">Skip to next incomplete section</a> |
||||||
|
</p> |
||||||
|
|
||||||
|
<%= render "tasklist" %> |
||||||
|
|
||||||
|
</div> |
||||||
|
</div> |
||||||
|
@ -0,0 +1,8 @@ |
|||||||
|
<%= form_with model: @case_log, method: "patch", builder: GOVUKDesignSystemFormBuilder::FormBuilder do |f| %> |
||||||
|
<%= f.govuk_number_field :tenant_age, |
||||||
|
hint: { text: "More detail" }, |
||||||
|
label: { text: "What is the tenant's age?", size: "l"}, |
||||||
|
min: 0, max: 150, step: 1, width: 20 |
||||||
|
%> |
||||||
|
<%= f.govuk_submit "Save and continue" %> |
||||||
|
<% end %> |
@ -0,0 +1,8 @@ |
|||||||
|
<%= form_with model: @case_log, method: "patch", builder: GOVUKDesignSystemFormBuilder::FormBuilder do |f| %> |
||||||
|
<%= f.govuk_text_field :tenant_code, |
||||||
|
hint: { text: "More detail" }, |
||||||
|
label: { text: "What is the tenant code?", size: "l"}, |
||||||
|
width: 20 |
||||||
|
%> |
||||||
|
<%= f.govuk_submit "Save and continue" %> |
||||||
|
<% end %> |
@ -0,0 +1,12 @@ |
|||||||
|
class AddQuestionFieldsToCaseLogs < ActiveRecord::Migration[6.1] |
||||||
|
def change |
||||||
|
add_column :case_logs, :tenant_code, :string |
||||||
|
add_column :case_logs, :tenant_age, :integer |
||||||
|
add_column :case_logs, :tenant_gender, :string |
||||||
|
add_column :case_logs, :tenant_ethnic_group, :string |
||||||
|
add_column :case_logs, :tenant_nationality, :string |
||||||
|
add_column :case_logs, :previous_housing_situation, :string |
||||||
|
add_column :case_logs, :prior_homelessness, :integer |
||||||
|
add_column :case_logs, :armed_forces, :string |
||||||
|
end |
||||||
|
end |
Loading…
Reference in new issue