Skip to content

Commit

Permalink
fix: convert spaces to dashes in ahjo case page link (#2897)
Browse files Browse the repository at this point in the history
  • Loading branch information
EmiliaMakelaVincit committed Mar 27, 2024
1 parent c1382ad commit a9fc149
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,10 @@ const DecisionSummary = ({ application }: Props): JSX.Element => {
}

const displayDecision = (): void => {
const id = application.ahjoCaseId.split(' ').join('-');

// eslint-disable-next-line security/detect-non-literal-fs-filename
window.open(
`https://paatokset.hel.fi/fi/asia/${application.ahjoCaseId}`,
'_blank'
);
window.open(`https://paatokset.hel.fi/fi/asia/${id}`, '_blank');
};

const hasHandledTermination = application.alterations.some(
Expand Down Expand Up @@ -96,6 +95,7 @@ const DecisionSummary = ({ application }: Props): JSX.Element => {
onClick={displayDecision}
theme="black"
variant="secondary"
role="link"
>
{t('common:applications.decision.actions.showDecision')}
</Button>
Expand Down

0 comments on commit a9fc149

Please sign in to comment.