Skip to content

Commit

Permalink
NCL-8668 Display Build param descriptions on existing fields (edit page)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrikk0123 committed Apr 22, 2024
1 parent 83b2298 commit 91ba717
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ interface IBuildParamOption {
}

interface IBuildParamData {
[title: string]: { value: string; description?: string };
[title: string]: { value: string };
}

interface IBuildConfigCreateEditPageProps {
Expand Down Expand Up @@ -878,7 +878,6 @@ export const BuildConfigCreateEditPage = ({ isEditPage = false }: IBuildConfigCr
...buildParamData,
[selection as string]: {
value: '',
description: buildParamOptions.find((option) => option.title === selection)?.description,
},
});
setIsBuildParamSelectOpen(false);
Expand Down Expand Up @@ -949,12 +948,12 @@ export const BuildConfigCreateEditPage = ({ isEditPage = false }: IBuildConfigCr
}
>
<FormHelperText
isHidden={!buildParam.description && key !== 'ALIGNMENT_PARAMETERS'}
isHidden={false}
isError={key === 'ALIGNMENT_PARAMETERS' && !getFieldValue(buildConfigEntityAttributes.buildType.id)}
>
{key === 'ALIGNMENT_PARAMETERS'
? generateAlignmentParametersDescription(getFieldValue(buildConfigEntityAttributes.buildType.id))
: buildParam.description}
: buildParamOptions.find((option) => option.title === key)?.description}
</FormHelperText>

{key === 'BUILD_CATEGORY' ? (
Expand Down

0 comments on commit 91ba717

Please sign in to comment.