Skip to content

Commit

Permalink
M #~: Minor fix on form schemas (#1880)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio Betanzos authored Mar 25, 2022
1 parent 2620449 commit 614b19d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { T, HYPERVISORS } from 'client/constants'
import {
Field,
Section,
getValidationFromFields,
getObjectSchemaFromFields,
filterFieldsByHypervisor,
} from 'client/utils'

Expand Down Expand Up @@ -75,6 +75,6 @@ const FIELDS = (hypervisor) =>
* @param {HYPERVISORS} hypervisor - Hypervisor
* @returns {ObjectSchema} Advanced options schema
*/
const SCHEMA = (hypervisor) => getValidationFromFields(FIELDS(hypervisor))
const SCHEMA = (hypervisor) => getObjectSchemaFromFields(FIELDS(hypervisor))

export { SECTIONS, FIELDS, SCHEMA }
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,11 @@ const UserInputsStep = (vmTemplate) => {
vmTemplate?.TEMPLATE?.INPUTS_ORDER
)

console.log({ userInputs, order: vmTemplate?.TEMPLATE?.INPUTS_ORDER })

return {
id: STEP_ID,
label: T.UserInputs,
optionsValidate: { abortEarly: false },
resolver: () => SCHEMA(userInputs),
resolver: SCHEMA(userInputs),
content: (props) => Content({ ...props, userInputs }),
}
}
Expand Down

0 comments on commit 614b19d

Please sign in to comment.