diff --git a/src/components/FormFields/ParameterFields.js b/src/components/FormFields/ParameterFields.js index f2b99831..0f439f0e 100644 --- a/src/components/FormFields/ParameterFields.js +++ b/src/components/FormFields/ParameterFields.js @@ -41,6 +41,13 @@ const getCustomComponent = (jobType, parameterName) => { return null case 'ANALYTICS_TABLE': + if (parameterName === 'skipTableTypes') { + return SkipTableTypesField + } else if (parameterName === 'skipPrograms') { + return LabeledOptionsField + } + + return null case 'CONTINUOUS_ANALYTICS_TABLE': if (parameterName === 'skipTableTypes') { return SkipTableTypesField diff --git a/src/hooks/parameter-options/use-parameter-options.js b/src/hooks/parameter-options/use-parameter-options.js index cda6f22d..03b1e8c7 100644 --- a/src/hooks/parameter-options/use-parameter-options.js +++ b/src/hooks/parameter-options/use-parameter-options.js @@ -37,6 +37,9 @@ const query = { receivers: { resource: 'userGroups', }, + programs: { + resource: 'programs', + } } const useParameterOptions = () => { @@ -53,6 +56,7 @@ const useParameterOptions = () => { const dataIntegrityChecks = fetch.data?.dataIntegrityChecks const dashboard = fetch.data?.dashboard?.dashboards const receivers = fetch.data?.receivers?.userGroups + const skipPrograms = fetch.data?.programs?.programs if ( !skipTableTypes || @@ -62,7 +66,8 @@ const useParameterOptions = () => { !predictorGroups || !dataIntegrityChecks || !dashboard || - !receivers + !receivers || + !skipPrograms ) { const error = new Error( 'Did not receive the expected parameter options' @@ -79,6 +84,7 @@ const useParameterOptions = () => { dataIntegrityChecks, dashboard, receivers, + skipPrograms } return { ...fetch, data }