Skip to content

Commit

Permalink
fix(j-s): simplify applyDativeCaseToCourtName
Browse files Browse the repository at this point in the history
  • Loading branch information
thorhildurt committed Jan 15, 2025
1 parent d966d19 commit 40786a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -876,9 +876,7 @@ export class CaseNotificationService extends BaseNotificationService {
isIndictmentCase(theCase.type)
? this.formatMessage(notifications.caseCompleted.prosecutorBody, {
courtCaseNumber: theCase.courtCaseNumber,
courtName: theCase.court?.name
? applyDativeCaseToCourtName(theCase.court?.name)
: '',
courtName: applyDativeCaseToCourtName(theCase.court?.name || ""),
caseIndictmentRulingDecision:
getHumanReadableCaseIndictmentRulingDecision(
theCase.indictmentRulingDecision,
Expand Down Expand Up @@ -916,9 +914,7 @@ export class CaseNotificationService extends BaseNotificationService {
isIndictmentCase(theCase.type)
? this.formatMessage(notifications.caseCompleted.defenderBody, {
courtCaseNumber: theCase.courtCaseNumber,
courtName: theCase.court?.name
? applyDativeCaseToCourtName(theCase.court?.name)
: '',
courtName: applyDativeCaseToCourtName(theCase.court?.name || ""),
caseIndictmentRulingDecision:
getHumanReadableCaseIndictmentRulingDecision(
theCase.indictmentRulingDecision,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@ export class IndictmentCaseNotificationService extends BaseNotificationService {
strings.indictmentCompletedWithRuling.body,
{
courtCaseNumber: theCase.courtCaseNumber,
courtName: theCase.court?.name
? applyDativeCaseToCourtName(theCase.court?.name)
: '',
courtName: applyDativeCaseToCourtName(theCase.court?.name || ""),
serviceRequirement:
theCase.defendants && theCase.defendants[0].serviceRequirement,
caseOrigin: theCase.origin,
Expand Down

0 comments on commit 40786a7

Please sign in to comment.