Skip to content

Commit

Permalink
Merge pull request #7575 from uktrade/CLS2-1292-show-headquarter-on-e…
Browse files Browse the repository at this point in the history
…yb-lead-preview

add company head quarters location to eyb lead preview
  • Loading branch information
santoshdasa12345 authored Feb 26, 2025
2 parents dde8433 + 61fa597 commit 08c70b4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/client/modules/Investments/EYBLeads/transformers.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const transformLeadToListItem = ({
proposed_investment_region,
is_high_value,
audit_log,
address,
}) => {
const tags = [
{
Expand Down Expand Up @@ -76,6 +77,10 @@ export const transformLeadToListItem = ({

metadata.push(
{ label: 'Estimated spend', value: spend },
{
label: 'Location of company headquarters',
value: address?.country?.name ? address?.country?.name : '',
},
{ label: 'Sector', value: sector ? sector.name : '' },
{
label: 'Estimated land date',
Expand Down
4 changes: 4 additions & 0 deletions test/functional/cypress/specs/investments/eyb-leads-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,10 @@ describe('EYB leads collection page', () => {
`Submitted to EYB ${formatDate(eybLead.triage_created, DATE_FORMAT_COMPACT)}`
)
.should('contain', `Estimated spend ${eybLead.spend}`)
.should(
'contain',
`Location of company headquarters ${eybLead.address.country.name}`
)
.should('contain', `Sector ${eybLead.sector.name}`)
.should(
'contain',
Expand Down

0 comments on commit 08c70b4

Please sign in to comment.