-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
394: Add low-fi view ECT record (#421)
Update ECT record view to match low-fi design: - display induction history - display full_name - Update seeds so we have better test data ## Design: <img width="557" alt="Screenshot 2024-10-07 at 16 04 49" src="https://github.com/user-attachments/assets/669b3a09-8496-4d68-ba8e-048b4849af6a"> ## Result: <img width="1014" alt="Screenshot 2024-10-08 at 13 58 22" src="https://github.com/user-attachments/assets/3f24fc0b-729f-40e7-b920-7e6db9ed9d7b">
- Loading branch information
Showing
3 changed files
with
59 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,62 @@ | ||
<% page_data(title: Teachers::Name.new(@teacher).full_name, error: false) %> | ||
|
||
<div class="govuk-button-group"> | ||
<%= govuk_button_link_to("Release ECT", new_ab_teacher_release_ect_path(@teacher), secondary: true) %> | ||
<%= govuk_button_link_to("Record induction outcome", new_ab_teacher_record_outcome_path(@teacher), secondary: true) %> | ||
<%= govuk_button_link_to("Record induction outcome", new_ab_teacher_record_outcome_path(@teacher)) %> | ||
</div> | ||
|
||
<h2 class="govuk-heading-m">Early career teacher<h2> | ||
|
||
<%= | ||
govuk_summary_list do |sl| | ||
sl.with_row do |row| | ||
row.with_key(text: "Teacher record number") | ||
row.with_value(text: @teacher.trn) | ||
row.with_key(text: "Name") | ||
row.with_value(text: Teachers::Name.new(@teacher).full_name) | ||
end | ||
|
||
sl.with_row do |row| | ||
row.with_key(text: "First name") | ||
row.with_value(text: @teacher.first_name) | ||
row.with_key(text: "TRN") | ||
row.with_value(text: @teacher.trn) | ||
end | ||
|
||
sl.with_row do |row| | ||
row.with_key(text: "Last name") | ||
row.with_value(text: @teacher.last_name) | ||
row.with_key(text: "Induction status") | ||
|
||
# FIXME: This is a placeholder. The actual status should be displayed here. | ||
row.with_value(text: govuk_tag(text: "placeholder", colour: %w[grey green red purple orange yellow].sample)) | ||
end | ||
end | ||
%> | ||
|
||
<h2 class="govuk-heading-m">Induction history<h2> | ||
|
||
<mark class="govuk-body">Add this later.</mark> | ||
<%= govuk_summary_list do |sl| | ||
sl.with_row do |row| | ||
row.with_key(text: "Induction start date") | ||
row.with_value(text: Teachers::InductionPeriod.new(@teacher).induction_start_date&.to_fs(:govuk)) | ||
end | ||
end | ||
|
||
govuk_table do |table| | ||
table.with_caption(size: 'm', text: '') | ||
|
||
table.with_head do |head| | ||
head.with_row do |row| | ||
row.with_cell(text: 'Appropriate body') | ||
row.with_cell(text: 'Induction programme') | ||
row.with_cell(text: 'Start date') | ||
row.with_cell(text: 'End date') | ||
row.with_cell(text: 'Number of terms', numeric: true) | ||
end | ||
end | ||
table.with_body do |body| | ||
@teacher.induction_periods_reported_by_appropriate_body.each do |induction_period | | ||
body.with_row do |row| | ||
row.with_cell(text: induction_period.appropriate_body.name) | ||
row.with_cell(text: induction_programme_choice_name(induction_period.induction_programme)) | ||
row.with_cell(text: induction_period.started_on.to_fs(:govuk)) | ||
row.with_cell(text: induction_period.finished_on&.to_fs(:govuk)) | ||
row.with_cell(text: induction_period.number_of_terms, numeric: true) | ||
end | ||
end | ||
end | ||
end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -253,6 +253,20 @@ def describe_mentorship_period(mp) | |
finished_on: nil | ||
).tap { |mp| describe_mentorship_period(mp) } | ||
|
||
print_seed_info("Harriet Walter (mentor)", indent: 2) | ||
|
||
PeriodBuilders::InductionPeriodBuilder.new( | ||
appropriate_body: umber_teaching_school_hub, | ||
teacher: harriet_walter, | ||
school: abbey_grove_school | ||
).build(started_on: 2.years.ago, finished_on: 1.year.ago) | ||
|
||
PeriodBuilders::InductionPeriodBuilder.new( | ||
appropriate_body: golden_leaf_academy, | ||
teacher: harriet_walter, | ||
school: abbey_grove_school | ||
).build(started_on: 1.year.ago) | ||
|
||
print_seed_info("Adding persona users") | ||
|
||
User.create!(name: "Velma Dinkley (AB)", email: "[email protected]").tap do |velma_dinkley| | ||
|