Skip to content

Commit

Permalink
feat: remove caseworkers family name on non-enhanced snapshots (dvsa/…
Browse files Browse the repository at this point in the history
…olcs-backend#205)

* feat: remove caseworkers family name on non-enhanced snapshots

* fix: don't remove self-serve users last name
  • Loading branch information
gabrielg2020 authored Jul 29, 2024
1 parent e876858 commit 27e6f4c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
<h2 class="govuk-summary-card__title">
<?php
if ($message->getCreatedBy()->getContactDetails() !== null && $message->getCreatedBy()->getContactDetails()->getPerson()) {
$sender = $message->getCreatedBy()->getContactDetails()->getPerson()->getFullName();
if (!$enhanced && $message->getCreatedBy()->getTeam() !== null){
$sender = $message->getCreatedBy()->getContactDetails()->getPerson()->getForename();
} else {
$sender = $message->getCreatedBy()->getContactDetails()->getPerson()->getFullName();
}
} else {
$sender = $message->getCreatedBy()->getLoginId();
}
Expand Down

0 comments on commit 27e6f4c

Please sign in to comment.