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

Draft
wants to merge 39 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
d741683
Create new file names to implement changes
Katy600 Dec 10, 2024
fb4f9a1
Update translate files to align with new files
Katy600 Dec 11, 2024
06ef64f
Format supporting evidence
Katy600 Dec 11, 2024
020c39a
Format evidence table
Katy600 Dec 11, 2024
3a155cb
Format defendant details
Katy600 Dec 11, 2024
baa310f
Update translations - i18n-tasks missing
Katy600 Dec 12, 2024
fc03943
Fix claim details maat and date issue
Katy600 Dec 12, 2024
a95fb17
Ammend defendant details to display maat details and date on seperate…
Katy600 Dec 12, 2024
da90f91
Number each defendent
Katy600 Dec 12, 2024
cac6852
Fix accessibility error
Katy600 Dec 12, 2024
4738d77
Fix accessibility issue
Katy600 Dec 13, 2024
314f8a7
Revert evidence list back to previous state
Katy600 Dec 13, 2024
54a0157
Format claims section
Katy600 Dec 13, 2024
76a58fd
Add dl parent to fix accessibility issue
Katy600 Dec 17, 2024
1cb9c43
Update translation files
Katy600 Dec 17, 2024
6583e54
Fix styling issue
Katy600 Dec 17, 2024
cf3ccea
Ammend new evidence list partial
Katy600 Dec 17, 2024
d999624
Fix broken test
Katy600 Dec 17, 2024
5c6dcf8
Format certification in basic claims information
Katy600 Dec 17, 2024
66a3622
Format claim retrial detals from the claim section
Katy600 Dec 17, 2024
3ca4f92
Format offence details
Katy600 Dec 18, 2024
51aacef
Fix failing test - update translations in Offence detail
Katy600 Dec 18, 2024
3824dfe
Fix accessibility erros - add dl above dt and dd
Katy600 Dec 18, 2024
aa5e582
Format first part of lgfs summary
Katy600 Dec 19, 2024
9a59e76
Format basic and additional fees
Katy600 Dec 19, 2024
18fae1f
Format basic and additional fees
Katy600 Dec 20, 2024
584be47
Move additional fees into a partial
Katy600 Dec 20, 2024
e1910f6
Move translations to reflect new partial
Katy600 Dec 20, 2024
ed5042d
Format new warrent fee lgfs
Katy600 Dec 20, 2024
4c6bd7f
Convert date to long form - warrant fees
Katy600 Dec 20, 2024
dab6f6a
Fix new claim layout
Katy600 Dec 20, 2024
eb96ed1
Tidy up evidence so that it display correctly
Katy600 Dec 20, 2024
7f5bc0a
Tidy up main hearing date in claims table so that it displays correctly
Katy600 Dec 20, 2024
17d70e4
Wrap Travel expenses for LGFS in summary card
Katy600 Jan 8, 2025
f609d38
Revert expenses table back to previous table - with summarycard and t…
Katy600 Jan 9, 2025
47231c6
Fix style formatting error
Katy600 Jan 9, 2025
7b6d453
Update translation for expenses summary card
Katy600 Jan 10, 2025
7bab8a2
Fix translations in new details
Katy600 Jan 10, 2025
7860137
Revert new show to use helper methods
Katy600 Jan 10, 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
.govuk-summary-card.custom-summary-card
.govuk-summary-card__title-wrapper
%h2.govuk-summary-card__title
= t('.caption')
.govuk-summary-card__content
%dl.govuk-summary-list.new_summary
%div.govuk-summary-list__header
%div.govuk-summary-list__row

%table.govuk-table.remove-margin
%thead.govuk-table__head
%tr.govuk-table__row
%th.govuk-table__header.align-left{ scope: "col" }= t('.fee_category')
%th.govuk-table__header.align-left{ scope: "col" }= t('.fee_type')
- if claim.display_days?
%th.govuk-table__header.align-right{ scope: "col" }
= claim.transfer? ? t('.days_claimed') : t('.actual_trial_length')
%th.govuk-table__header.align-right{ scope: "col" }= claim.fixed_fee_case? ? t('.quantity') : 'PPE'
- if claim.fixed_fee_case?
%th.govuk-table__header.align-right{ scope: "col" }= t('.rate')
%th.govuk-table__header.align-right{ scope: "col" }= t('.amount')

%tbody.govuk-table__body
- present_collection(claim.fees.select(&:present?).sort_by(&:position)).each do |fee|
%tr.govuk-table__row
%td.govuk-table__cell.align-left
= fee.fee_type&.fee_category_name || fee.not_applicable
- if fee.dates_attended.any?
%br
= t('.dates_attended')
= fee.dates_attended_delimited_string
- if fee.date?
%br
= t('.date')
= fee.date

%td.govuk-table__cell.align-left
= fee.fee_type&.description || fee.not_applicable
- if fee.sub_type.present?
%br
= "#{t('.fee_subtype')}: #{fee.sub_type.description}"
- if fee.case_uplift?
%br
= "(#{t('.case_numbers')}: #{fee.case_numbers})"

- if claim.display_days?
%td.govuk-table__cell.align-right
= fee.days_claimed

%td.govuk-table__cell.align-right
= fee.quantity

- if claim.fixed_fee_case?
%td.govuk-table__cell.align-right
= fee.rate
%td.govuk-table__cell.align-right
= fee.amount

.govuk-summary-list
%dl.govuk-summary-list__row.total-fees
%dt.govuk-summary-list__key.total-fees
= t('.fees_total')
%dd.govuk-summary-list__value
= claim.fees_total
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 ''

48 changes: 48 additions & 0 deletions app/views/shared/_new_claim.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
- 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 }


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

- else
.govuk-grid-row
.govuk-grid-column-two-thirds
%p.govuk-body
= t('.no_defendant')

- unless claim.fixed_fee_case?
= render partial: 'shared/offence_details/new_summary', locals: { claim: claim }
41 changes: 41 additions & 0 deletions app/views/shared/_new_claim_accordion.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#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 }

%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')
%p
= format_multiline(claim.additional_information)
93 changes: 93 additions & 0 deletions app/views/shared/_new_claim_and_case_type_details.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
- unless claim.providers_ref.blank?
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('.provider_reference')
%dd.govuk-summary-list__value
= claim.providers_ref

- unless claim.draft?
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('.claim_submitted')
%dd.govuk-summary-list__value
= claim.submitted_at

- if claim.case_workers.any? && current_user_is_caseworker? && current_user.persona.admin?
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('.assignee')
%dd.govuk-summary-list__value
= claim.case_worker_names

- if @claim.lgfs?
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('common.external_user.claim_creator')
%dd.govuk-summary-list__value
= claim.creator.name

- if @claim.agfs?
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t("common.external_user.#{@claim.external_user_type}")
%dd.govuk-summary-list__value
= claim.external_user.name
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t("common.external_user.category.#{@claim.external_user_type}")
%dd.govuk-summary-list__value
= claim.advocate_category

%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t("common.external_user.account_number.#{@claim.external_user_type}")
%dd.govuk-summary-list__value
= claim.supplier_number

- if claim.court
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('common.crown_court')
%dd.govuk-summary-list__value
= claim.court.name

%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('.case_num')
%dd.govuk-summary-list__value
= claim.case_number
%span.unique-id-small
= claim.unique_id

- if claim.transfer_court.present?
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('common.transfer_court')
%dd.govuk-summary-list__value
= claim.transfer_court.name
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('common.transfer_case_number')
%dd.govuk-summary-list__value
= claim.transfer_case_number

- if claim.case_stage
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('.case_stage')
%dd.govuk-summary-list__value
= claim.case_stage&.description

- if claim.display_case_type?
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('.case_type')
%dd.govuk-summary-list__value
= claim.case_type&.name

- if claim.discontinuance?
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('common.prosecution_evidence')
%dd.govuk-summary-list__value
= t(claim.prosecution_evidence?.class)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('external_users.claims.case_details.case_concluded_date.case_concluded_at')
%dd.govuk-summary-list__value
= claim.case_concluded_at
31 changes: 31 additions & 0 deletions app/views/shared/_new_claim_cracked_trial_details.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
- cracked_trial_detail_translations = 'external_users.claims.case_details.cracked_trial_fields'

- trial_cracked_at_third_key = ''
- if claim.hardship?
- trial_cracked_at_third_key = t("#{cracked_trial_detail_translations}.trial_cracked_at_third.hardship")
- else
- trial_cracked_at_third_key = t("#{cracked_trial_detail_translations}.trial_cracked_at_third.default")

%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t("#{cracked_trial_detail_translations}.trial_fixed_notice_at")
%dd.govuk-summary-list__value
= claim.trial_fixed_notice_at.strftime(Settings.date_format) rescue ''

%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t("#{cracked_trial_detail_translations}.trial_fixed_at")
%dd.govuk-summary-list__value
= claim.trial_fixed_at.strftime(Settings.date_format) rescue ''

%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t("#{cracked_trial_detail_translations}.trial_cracked_at")
%dd.govuk-summary-list__value
= claim.trial_cracked_at.strftime(Settings.date_format) rescue ''

%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= trial_cracked_at_third_key
%dd.govuk-summary-list__value
= claim.trial_cracked_at_third.humanize rescue ''
45 changes: 45 additions & 0 deletions app/views/shared/_new_claim_defendant_details.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
.govuk-summary-card
.govuk-summary-card__title-wrapper
%h2.govuk-summary-card__title
= "#{t('.title_defendant')} #{index}"

.govuk-summary-card__content
.govuk-summary-list
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('.first_name')
%dd.govuk-summary-list__value
= defendant.first_name

%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('.last_name')
%dd.govuk-summary-list__value
= defendant.last_name

%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('.date_of_birth')
%dd.govuk-summary-list__value
= defendant.date_of_birth.strftime(Settings.date_format) rescue ''

%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('.order_of_judicial_apportionment')
%dd.govuk-summary-list__value
= defendant.order_for_judicial_apportionment == true ? t('global_yes') : t('global_no')

- if defendant.representation_orders.any?
- defendant.representation_orders.each_with_index do |representation_order, index|
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= "#{t('.reporders')} #{index + 1}"
%dd.govuk-summary-list__value.summary-page-values
%p
%span= representation_order.representation_order_date.strftime(Settings.date_format) rescue ''
%p
%span= t('.maat_reference')
= representation_order.maat_reference

- else
= govuk_inset_text(t('.no_reporder'))
Loading