File tree Expand file tree Collapse file tree 1 file changed +7
-18
lines changed Expand file tree Collapse file tree 1 file changed +7
-18
lines changed Original file line number Diff line number Diff line change @@ -264,24 +264,13 @@ export default {
264264 * Creates an array of steps that should be visible/enalbed based on data from steps array
265265 * and updates the steps array
266266 */
267- if (stepName in visibleSetters) {
268- let visible = []
269- if (stepName === ' BY' && this .useDropdownForSelection ) {
270- // If CC0 was selected from the dropdown, all licenseAttributes and CW should be visible
271- // Otherwise, CopyrightWaiver shouldn't be visible
272- visible = isStepSelected ? visibleSetters .FSBY : visibleSetters .FSCC0
273- } else {
274- visible = visibleSetters[stepName][isStepSelected]
275- }
276- if (visible !== undefined ) {
277- this .setStepsVisible (visible)
278- }
279- }
280- if (stepName === ' BY' || stepName === ' ND' ) {
281- let disabled = disabledSetters[stepName][isStepSelected]
282- if (disabled === undefined ) { disabled = [] }
283- this .setStepsDisabled (disabled)
284- }
267+ const stepsStatusData = {}
268+ this .steps .forEach ((step ) => {
269+ stepsStatusData[step .name ] = step .selected
270+ })
271+ const { visible , enabled , disabledDue } = updateVisibleEnabledStatus (stepsStatusData)
272+ this .setStepsVisible (visible)
273+ this .setStepsEnabled (enabled, disabledDue)
285274 },
286275 visibleSteps () {
287276 return this .steps .filter (step => {
You can’t perform that action at this time.
0 commit comments