Skip to content

Commit

Permalink
feat: Hide manual qg name field (#496)
Browse files Browse the repository at this point in the history
  • Loading branch information
callmevladik authored and SergK committed Nov 20, 2024
1 parent bbec1f7 commit ec015d4
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,25 +275,29 @@ export const QualityGateRow = ({
options={availableQualityGateTypeSelectOptions}
/>
</Grid>
<Grid item xs={3}>
<FormTextField
{...register(
// @ts-ignore
createQualityGateStepNameFieldName(currentQualityGate.id),
{
required: 'Enter step name.',
onChange: handleChangeQualityGateStepName,
}
)}
label={'Step name'}
title={
'Name the deployment step within the stage to distinguish different phases of the deployment process.'
}
placeholder={'Enter step name'}
control={control}
errors={errors}
/>
</Grid>
{currentQualityGateTypeFieldValue &&
currentQualityGateTypeFieldValue !== QUALITY_GATE_TYPES.MANUAL && (
<Grid item xs={3}>
<FormTextField
{...register(
// @ts-ignore
createQualityGateStepNameFieldName(currentQualityGate.id),
{
required: 'Enter step name.',
onChange: handleChangeQualityGateStepName,
}
)}
label={'Step name'}
title={
'Name the deployment step within the stage to distinguish different phases of the deployment process.'
}
placeholder={'Enter step name'}
control={control}
errors={errors}
/>
</Grid>
)}

{!!autotestsWithBranchesOptions.length &&
currentQualityGateTypeFieldValue === QUALITY_GATE_TYPES.AUTOTESTS ? (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { v4 as uuidv4 } from 'uuid';
export const DEFAULT_QUALITY_GATE = {
id: uuidv4(),
qualityGateType: 'manual',
stepName: '',
stepName: 'approve',
autotestName: null,
branchName: null,
};

0 comments on commit ec015d4

Please sign in to comment.