Skip to content

Commit bc71ad5

Browse files
committed
fix: Fix error on stage page, rollback to promote checkbox disabled (#155)
Jira: EPMDEDP-13310 Related: #155 Change-Id: I2c315049965d5794e148258425a073563a249e01
1 parent ea57b1b commit bc71ad5

File tree

2 files changed

+4
-10
lines changed
  • src
    • pages/edp-stage-details
    • widgets/CreateEditCDPipeline/components/fields/Applications/components/ApplicationRow

2 files changed

+4
-10
lines changed

src/pages/edp-stage-details/view.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export const PageView = () => {
129129
) : null}
130130

131131
<Grid item style={{ marginLeft: rem(20) }}>
132-
{!!stages && (
132+
{!isLoading && stages && CDPipeline && (
133133
<StageActionsMenu
134134
data={{
135135
stages: stages?.items,

src/widgets/CreateEditCDPipeline/components/fields/Applications/components/ApplicationRow/index.tsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { FormCheckbox } from '../../../../../../../providers/Form/components/For
99
import { FormControlLabelWithTooltip } from '../../../../../../../providers/Form/components/FormControlLabelWithTooltip';
1010
import { FormSelect } from '../../../../../../../providers/Form/components/FormSelect';
1111
import { FormTextField } from '../../../../../../../providers/Form/components/FormTextField';
12-
import { FieldEvent, FieldEventTarget, FORM_MODES } from '../../../../../../../types/forms';
12+
import { FieldEvent, FieldEventTarget } from '../../../../../../../types/forms';
1313
import { CREATE_EDIT_CD_PIPELINE_DIALOG_NAME } from '../../../../../constants';
1414
import { CDPIPELINE_FORM_NAMES } from '../../../../../names';
1515
import {
@@ -36,7 +36,7 @@ export const ApplicationRow = ({ application }: ApplicationRowProps) => {
3636
} = useFormContext<CreateEditCDPipelineFormValues>();
3737

3838
const {
39-
forwardedProps: { CDPipelineData, mode },
39+
forwardedProps: { CDPipelineData },
4040
} = useSpecificDialogContext<CreateEditCDPipelineDialogForwardedProps>(
4141
CREATE_EDIT_CD_PIPELINE_DIALOG_NAME
4242
);
@@ -201,15 +201,9 @@ export const ApplicationRow = ({ application }: ApplicationRowProps) => {
201201
}
202202
)}
203203
defaultValue={CDPipelineData?.spec?.applicationsToPromote?.includes(appName)}
204-
label={
205-
<FormControlLabelWithTooltip
206-
label={'Promote in pipeline'}
207-
disabled={mode === FORM_MODES.EDIT}
208-
/>
209-
}
204+
label={<FormControlLabelWithTooltip label={'Promote in pipeline'} />}
210205
control={control}
211206
errors={errors}
212-
disabled={mode === FORM_MODES.EDIT}
213207
/>
214208
</Grid>
215209
<Grid

0 commit comments

Comments
 (0)