Skip to content

Commit

Permalink
Update dashboard layout
Browse files Browse the repository at this point in the history
This updates the cards in the dashboard to match the latest designs in
the prototype.
  • Loading branch information
thomasleese committed Oct 17, 2024
1 parent 5acdab3 commit b1f3ea7
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 11 deletions.
41 changes: 32 additions & 9 deletions app/views/dashboard/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

<ul class="nhsuk-grid-row nhsuk-card-group">
<li class="nhsuk-grid-column-one-third nhsuk-card-group__item">
<%= render AppCardComponent.new(link_to: programmes_path) do |c| %>
<% c.with_heading { t("programmes.index.title") } %>
<%= render AppCardComponent.new(link_to: programmes_path) do |card| %>
<% card.with_heading { t("programmes.index.title") } %>
<p class="nhsuk-body">Use this area to:</p>
<ul class="nhsuk-list nhsuk-list--bullet">
<li>import child records</li>
<li>organise school sessions</li>
<li>organise vaccination sessions</li>
<li>report vaccinations</li>
</ul>
<% end %>
</li>

<li class="nhsuk-grid-column-one-third nhsuk-card-group__item">
<%= render AppCardComponent.new(link_to: sessions_path) do |c| %>
<% c.with_heading { t("sessions.index.title") } %>
<%= render AppCardComponent.new(link_to: sessions_path) do |card| %>
<% card.with_heading { t("sessions.index.title") } %>
<p class="nhsuk-body">Use this area to:</p>
<ul class="nhsuk-list nhsuk-list--bullet">
<li>review consent responses</li>
Expand All @@ -27,13 +27,36 @@
</li>

<li class="nhsuk-grid-column-one-third nhsuk-card-group__item">
<%= render AppCardComponent.new(link_to: vaccines_path) do |c| %>
<% c.with_heading { t("vaccines.index.title") } %>
<%= render AppCardComponent.new(link_to: vaccines_path) do |card| %>
<% card.with_heading { t("patients.index.title") } %>
<p class="nhsuk-body">Use this area to:</p>
<ul class="nhsuk-list nhsuk-list--bullet">
<li>add new vaccine batches</li>
<li>edit details for existing batches</li>
<li>find child records</li>
<li>view child vaccinations</li>
</ul>
<% end %>
</li>
</ul>

<ul class="nhsuk-grid-row nhsuk-card-group">
<li class="nhsuk-grid-column-one-third nhsuk-card-group__item">
<%= render AppCardComponent.new(link_to: vaccines_path, secondary: true) do |card| %>
<% card.with_heading { t("vaccines.index.title") } %>
<% card.with_description { "Add and edit vaccine batches" } %>
<% end %>
</li>

<li class="nhsuk-grid-column-one-third nhsuk-card-group__item">
<%= render AppCardComponent.new(link_to: notices_path, secondary: true) do |card| %>
<% card.with_heading { t("notices.index.title") } %>
<% card.with_description { "View notices about important updates to patient records" } %>
<% end %>
</li>

<li class="nhsuk-grid-column-one-third nhsuk-card-group__item">
<%= render AppCardComponent.new(link_to: team_path, secondary: true) do |card| %>
<% card.with_heading { t("teams.show.title") } %>
<% card.with_description { "Manage your organisation’s settings" } %>
<% end %>
</li>
</ul>
2 changes: 1 addition & 1 deletion spec/features/manage_children_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def when_i_click_on_children
sign_in @team.users.first

visit "/dashboard"
click_on "Children"
click_on "Children", match: :first
end

def then_i_see_the_children
Expand Down
2 changes: 1 addition & 1 deletion spec/features/manage_teams_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def when_i_click_on_team_settings
sign_in @team.users.first

visit "/dashboard"
click_on "Your organisation"
click_on "Your organisation", match: :first
end

def then_i_see_the_team_settings
Expand Down

0 comments on commit b1f3ea7

Please sign in to comment.