@@ -19,6 +19,8 @@ import {
19
19
useCreateBlueprintMutation ,
20
20
useUpdateBlueprintMutation ,
21
21
} from '../../../../../store/backendApi' ;
22
+ import { useAppSelector } from '../../../../../store/hooks' ;
23
+ import { selectActivationKey } from '../../../../../store/wizardSlice' ;
22
24
import { resolveRelPath } from '../../../../../Utilities/path' ;
23
25
import { mapRequestFromState } from '../../../utilities/requestMapper' ;
24
26
import { useIsBlueprintValid } from '../../../utilities/useValidation' ;
@@ -62,6 +64,8 @@ const ReviewWizardFooter = () => {
62
64
return mapRequestFromState ( store , '' ) ;
63
65
} ;
64
66
67
+ const activationKey = useAppSelector ( selectActivationKey ) ;
68
+
65
69
return (
66
70
< WizardFooterWrapper >
67
71
< div data-testid = "wizard-save-button-div" >
@@ -74,7 +78,7 @@ const ReviewWizardFooter = () => {
74
78
ref = { toggleRef }
75
79
onClick = { onToggleClick }
76
80
isExpanded = { isOpen }
77
- isDisabled = { ! isValid }
81
+ isDisabled = { ! isValid || ! activationKey }
78
82
splitButtonOptions = { {
79
83
variant : 'action' ,
80
84
items : composeId
@@ -84,15 +88,15 @@ const ReviewWizardFooter = () => {
84
88
getBlueprintPayload = { getBlueprintPayload }
85
89
setIsOpen = { setIsOpen }
86
90
blueprintId = { composeId }
87
- isDisabled = { ! isValid }
91
+ isDisabled = { ! isValid || ! activationKey }
88
92
/> ,
89
93
]
90
94
: [
91
95
< CreateSaveButton
92
96
key = "wizard-create-save-btn"
93
97
getBlueprintPayload = { getBlueprintPayload }
94
98
setIsOpen = { setIsOpen }
95
- isDisabled = { ! isValid }
99
+ isDisabled = { ! isValid || ! activationKey }
96
100
/> ,
97
101
] ,
98
102
} }
0 commit comments