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

Create new file names to implement changes #7862

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e9868d7
Create new file names to implement changes
Katy600 Dec 10, 2024
743a5af
Format supporting evidence
Katy600 Dec 11, 2024
e5bebaa
Format evidence table;
Katy600 Dec 11, 2024
4549044
Format defendant details;
Katy600 Dec 11, 2024
2689abc
Format claims section
Katy600 Dec 13, 2024
93622b4
Format certification in basic claims information
Katy600 Dec 17, 2024
725bfd9
Format claim retrial detals from the claim section
Katy600 Dec 17, 2024
822bff9
Format offence details;
Katy600 Dec 18, 2024
e4c4bd8
Format first part of lgfs summary
Katy600 Dec 19, 2024
f703400
Format basic and additional fees;
Katy600 Dec 19, 2024
6b162e4
Format new warrent fee lgfs;
Katy600 Dec 20, 2024
946993e
Fix new claim layout
Katy600 Dec 20, 2024
785d10a
Format Travel expenses for LGFS in summary card;
Katy600 Jan 8, 2025
5554262
Update translation for expenses summary card
Katy600 Jan 10, 2025
7f19322
Fix translations in new details
Katy600 Jan 10, 2025
2868a85
Revert new show to use helper methods
Katy600 Jan 10, 2025
4db26e8
Update translate file for warrant fees
Katy600 Jan 10, 2025
7d6fa70
Sort translation in warrant fees lgfs caseworker
Katy600 Jan 10, 2025
f46f236
Update translate file to match new file structure
Katy600 Jan 14, 2025
4342fba
Create a seperate file for lgfs disbursemetns and update file paths
Katy600 Jan 14, 2025
f7cb4db
Fix translation working rspec tests
Katy600 Jan 14, 2025
6153bf5
Format agfs fees in a summary card;
Katy600 Jan 14, 2025
11e72d5
Display formatted travel expense table for agfs
Katy600 Jan 14, 2025
2913583
Format additional claims information in a summary card
Katy600 Jan 14, 2025
24fa15f
Format disbursments with VAT in a summary card
Katy600 Jan 14, 2025
d42e424
Move defendant details into the accordion to create consistency with …
Katy600 Jan 14, 2025
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: 1 addition & 1 deletion app/views/case_workers/claims/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
= render 'warnings/injection_warnings_summary', claim: claim

= render partial: 'shared/claim_header', locals: { claim: claim }
= render partial: 'shared/claim_accordion', locals: { claim: claim, status_disabled: false }
= render partial: 'shared/new_claim_accordion', locals: { claim: claim, status_disabled: false }
12 changes: 6 additions & 6 deletions app/views/case_workers/court_data/_defendant.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,31 @@
%li.govuk-summary-card__action
= govuk_link_to t('.court_data_link'), "#{ENV.fetch('VIEW_COURT_DATA_URL', nil)}/laa_references/new?id=#{defendant.hmcts.id}&urn=#{case_number}", target: :_blank
.govuk-summary-card__content
%dl.govuk-summary-list
.govuk-summary-list__row
.govuk-summary-list
%dl.govuk-summary-list__row
%dt.govuk-summary-list__key
= t('.name')
%dd.govuk-summary-list__value
= defendant.hmcts.name
.govuk-summary-list__row
%dl.govuk-summary-list__row
%dt.govuk-summary-list__key
= t('.maat_reference')
%dd.govuk-summary-list__value
= defendant.maat_reference
- if defendant.hmcts.start.present?
.govuk-summary-list__row
%dl.govuk-summary-list__row
%dt.govuk-summary-list__key
= t('.start_date')
%dd.govuk-summary-list__value
= defendant.hmcts.start.strftime(Settings.date_format)
- if defendant.hmcts.end.present?
.govuk-summary-list__row
%dl.govuk-summary-list__row
%dt.govuk-summary-list__key
= t('.end_date')
%dd.govuk-summary-list__value
= defendant.hmcts.end.strftime(Settings.date_format)
- if defendant.hmcts.contract_number.present?
.govuk-summary-list__row
%dl.govuk-summary-list__row
%dt.govuk-summary-list__key
= t('.contract_number')
%dd.govuk-summary-list__value
Expand Down
49 changes: 16 additions & 33 deletions app/views/shared/_evidence_list.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -12,39 +12,22 @@
= t('.no_documents_uploaded')

- else
= govuk_table do
= govuk_table_caption(class: 'govuk-visually-hidden') do
= t('.caption')

= govuk_table_thead do
= govuk_table_row do
= govuk_table_th do
= t('.name_of_file')

= govuk_table_th_numeric do
= t('.file_size')

= govuk_table_th_numeric do
= t('.date_added')

= govuk_table_th_numeric do
= t('.actions')

= govuk_table_tbody do
.govuk-summary-card.custom-summary-card
.govuk-summary-card__title-wrapper
%h2.govuk-summary-card__title= t('.existing_evidence')
.govuk-summary-card__content
%dl.govuk-summary-list
Copy link
Contributor

Choose a reason for hiding this comment

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

There are some summary_list helper methods in lib/govuk_component/summary_list_helpers.rb which might make this section a bit cleaner. There's an example of how to use it here: app/views/external_users/claims/case_details/_summary.html.haml.

Edit: actually, I can see that there are lots of places in other files here where that helper could potentially be used. Possibly it's too big a change for this PR at this point...

%dt.govuk-summary-list__key= t('.name_of_file')
%dd.govuk-summary-list__value
- @claim.documents.includes(:document_blob, :converted_preview_document_attachment).each do |document|
= govuk_table_row do
= govuk_table_td('data-label': t('.name_of_file')) do
= document.document_file_name

= govuk_table_td_numeric('data-label': t('.file_size')) do
= number_to_human_size(document.document_file_size)

= govuk_table_td_numeric('data-label': t('.date_added')) do
= document.created_at.strftime(Settings.date_format)
= govuk_link_to document.document_file_name, download_document_path(document)

= govuk_table_td_numeric('data-label': t('.actions')) do
.app-link-group
- if document.converted_preview_document.present?
= govuk_link_to t('common.view_html', context: "#{document.document_file_name}"), document_path(document)
%dt.govuk-summary-list__key= t('.file_size')
%dd.govuk-summary-list__value
- @claim.documents.each do |document|
= number_to_human_size(document.document_file_size)

= govuk_link_to t('common.download_html', context: "#{document.document_file_name}"), download_document_path(document)
%dt.govuk-summary-list__key= t('.date_added')
%dd.govuk-summary-list__value
- @claim.documents.each do |document|
= document.created_at.strftime(Settings.date_format)
12 changes: 12 additions & 0 deletions app/views/shared/_new_additional_information.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.govuk-summary-card
.govuk-summary-card__title-wrapper
%h2.govuk-summary-card__title
= t('shared.new_claim_accordion.additional_information')

.govuk-summary-card__content
.govuk-summary-list
%dl.govuk-summary-list__row
= format_multiline(claim.additional_information)



Comment on lines +10 to +12
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpicky, but could these blank lines be deleted? I've noticed similar blank lines at the end of a few other files, it might be better if they could all be tidied up a bit (sorry!)

98 changes: 98 additions & 0 deletions app/views/shared/_new_agfs_fee_details.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
.govuk-summary-card.custom-summary-card
.govuk-summary-card__title-wrapper
%h2.govuk-summary-card__title
= t('common.fees')
.govuk-summary-card__content
%dl.govuk-summary-list.new_summary
%div.govuk-summary-list__header
%div.govuk-summary-list__row

= govuk_table do
= govuk_table_caption(class: 'govuk-visually-hidden') do
= t('.fees.caption')
= govuk_table_thead do
= govuk_table_row do
= govuk_table_th do
= t('.fee_category')
= govuk_table_th do
= t('.fee_type')
- unless claim.interim?
= govuk_table_th_numeric do
= t('.quantity')

= govuk_table_th_numeric do
= t('.rate')
= govuk_table_th_numeric do
= t('.net_amount')
= govuk_table_tbody do
- present_collection(claim.fees.select(&:present?).sort_by(&:position)).each do |fee|
= govuk_table_row do
= govuk_table_td('data-label': t('.fee_category')) do
= fee.fee_type&.fee_category_name || 'n/a'
%br/
- if fee.fee_type.unique_code.eql?('BABAF')
- if fee.first_day_of_trial
= t('.first_day_of_trial')
%br/
= fee.first_day_of_trial
%br/
%br/

- if fee.retrial_started_at
= t('.retrial_started_at')
%br/
= fee.retrial_started_at
%br/
%br/
- if fee.dates_attended.any?
- if fee.fee_type.unique_code.eql?('BABAF')
= t(fee.claim.case_type.name.split(' ').collect(&:capitalize).join.underscore, scope: "external_users.claims.basic_fees.basic_fee_fields_primary.date_label")
- else
= t('.dates_attended')
%br/
= fee.dates_attended_delimited_string
%br/
%br/


- if fee.date?
= t('.date')
= fee.date
= govuk_table_td('data-label': t('.fee_type')) do
= fee.fee_type&.description || 'n/a'
- if fee.sub_type.present?
%p
= "#{t('.fee_subtype')}: #{fee.sub_type.description}"
- if fee.case_uplift?
%br
= "#{t('.case_numbers')}: #{fee.case_numbers}"
- unless claim.interim?
= govuk_table_td_numeric('data-label': t('.quantity')) do
= fee.quantity
= govuk_table_td_numeric('data-label': t('.rate')) do
= fee.rate
= govuk_table_td_numeric('data-label': t('.net_amount')) do
= fee.amount

= govuk_table do
= govuk_table_thead do
= govuk_table_row do
= govuk_table_th do
= t('shared.description')
= govuk_table_th_numeric do
= t('shared.net_amount')
= govuk_table_th_numeric do
= t('shared.vat')
= govuk_table_th_numeric do
= t('shared.gross_amount')

= govuk_table_tbody do
= govuk_table_row do
= govuk_table_td('data-label': t('shared.description')) do
= t('shared.summary.fees_total')
= govuk_table_td_numeric('data-label': t('shared.net_amount')) do
= claim.fees_total
= govuk_table_td_numeric('data-label': t('shared.vat')) do
= claim.fees_vat
= govuk_table_td_numeric('data-label': t('shared.gross_amount')) do
= claim.fees_gross
20 changes: 20 additions & 0 deletions app/views/shared/_new_certification.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.govuk-summary-card
.govuk-summary-card__title-wrapper
%h2.govuk-summary-card__title
= t('.certification_box_title')

.govuk-summary-card__content
.govuk-summary-list
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('.instructed_heading')
%dd.govuk-summary-list__value
= claim.external_user.name

- if @claim.agfs?
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('.certification_reason')
%dd.govuk-summary-list__value
= claim.certification.certification_type.name rescue ''

33 changes: 33 additions & 0 deletions app/views/shared/_new_claim.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
- if claim.certification.present?
= render partial: 'shared/new_certification', locals: { claim: claim }

.govuk-summary-card
.govuk-summary-card__title-wrapper
%h2.govuk-summary-card__title
= t('shared.claim.claim_type')

.govuk-summary-card__content
.govuk-summary-list

= render partial: 'shared/new_claim_and_case_type_details', locals: { claim: claim }

- if claim.agfs? && claim.case_type.present? && claim.requires_cracked_dates?
= render partial: 'shared/new_claim_cracked_trial_details', locals: { claim: claim }

- if claim.case_type && claim.case_concluded_at
= render partial: 'shared/new_claim_case_concluded_at_details', locals: { claim: claim }

- if claim.lgfs? && claim.interim? && !claim.interim_fee.nil?
= render partial: 'shared/new_claim_interim_details', locals: { claim: claim }

- if claim.transfer?
= render partial: 'shared/new_claim_transfer_details', locals: { claim: claim }

- if claim&.requires_trial_dates?
= render partial: 'shared/new_claim_trial_details', locals: { claim: claim }

- if claim&.requires_retrial_dates?
= render partial: 'shared/new_claim_retrial_details', locals: { claim: claim }

- if claim.main_hearing_date
= render partial: 'shared/new_main_hearing_date_details', locals: { claim: claim }
49 changes: 49 additions & 0 deletions app/views/shared/_new_claim_accordion.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#claim-accordion
.govuk-grid-row
.govuk-grid-column-one-half
%h2.govuk-heading-m
= t('.h2_messages')

.govuk-grid-column-one-half
- if current_user.persona.is_a?(CaseWorker)
.other-claims
- if claim_ids.present? && claim_ids.include?(@claim.id)
= t('shared.position_and_count', position: claim_position_and_count)

- unless last_claim?
= next_claim_link 'Next claim >'.html_safe, class: 'next-claim'

= render partial: 'shared/claim_history', locals: { claim: claim }
= render partial: 'shared/claim_status', locals: { claim: claim, disabled: status_disabled }

%h2.govuk-heading-l
= t('.h2_basic_info')
.js-accordion__panel
= render partial: 'shared/new_claim', locals: { claim: claim, hide_totals: true }

- if claim.defendants.any?
%h2.govuk-heading-l
= t('.h2_defendant_details')
.js-accordion__panel
= render partial: 'shared/new_claim_defendants', locals: { defendants: claim.defendants }
-else
= render partial: 'shared/new_defendant_details', locals: { claim: claim }

%h2.govuk-heading-l
= t('.h2_evidence')
.js-accordion__panel
= render partial: 'shared/new_evidence_list', locals: { claim: claim }

%h2.govuk-heading-l
= t('.h2_summary')
.js-accordion__panel.fees-summary
- if claim.agfs?
= render partial: 'shared/new_summary_agfs', locals: { claim: claim }
- else
= render partial: 'shared/new_summary_lgfs', locals: { claim: claim }

- if claim.additional_information.present?
%h2.govuk-heading-l
= t('.additional_information')
.js-accordion__panel.fees-summary
= render partial: 'shared/new_additional_information', locals: { claim: claim }
Loading