diff --git a/awx/ui_next/src/components/LaunchPrompt/LaunchPrompt.jsx b/awx/ui_next/src/components/LaunchPrompt/LaunchPrompt.jsx
index 4dfac93e23..f130e7f2d8 100644
--- a/awx/ui_next/src/components/LaunchPrompt/LaunchPrompt.jsx
+++ b/awx/ui_next/src/components/LaunchPrompt/LaunchPrompt.jsx
@@ -71,7 +71,7 @@ function LaunchPrompt({ config, resource, onLaunch, onCancel, i18n }) {
if (config.survey_enabled) {
steps.push({
name: i18n._(t`Survey`),
- component: ,
+ component: ,
});
}
steps.push({
diff --git a/awx/ui_next/src/components/LaunchPrompt/SurveyStep.jsx b/awx/ui_next/src/components/LaunchPrompt/SurveyStep.jsx
index c0b8e6ec14..5d18040037 100644
--- a/awx/ui_next/src/components/LaunchPrompt/SurveyStep.jsx
+++ b/awx/ui_next/src/components/LaunchPrompt/SurveyStep.jsx
@@ -1,7 +1,64 @@
-import React from 'react';
+import React, { useCallback, useEffect } from 'react';
+import { withI18n } from '@lingui/react';
+import { JobTemplatesAPI, WorkflowJobTemplatesAPI } from '@api';
+import { Form } from '@patternfly/react-core';
+import FormField from '@components/FormField';
+import ContentLoading from '@components/ContentLoading';
+import ContentError from '@components/ContentError';
+import useRequest from '@util/useRequest';
+import { required } from '@util/validators';
-function InventoryStep() {
- return
;
+function InventoryStep({ template, i18n }) {
+ const { result: survey, request: fetchSurvey, isLoading, error } = useRequest(
+ useCallback(async () => {
+ const { data } =
+ template.type === 'workflow_job_template'
+ ? await WorkflowJobTemplatesAPI.readSurvey(template.id)
+ : await JobTemplatesAPI.readSurvey(template.id);
+ return data;
+ }, [template])
+ );
+ useEffect(() => {
+ fetchSurvey();
+ }, [fetchSurvey]);
+
+ if (error) {
+ return ;
+ }
+ if (isLoading || !survey) {
+ return ;
+ }
+
+ return (
+
+ );
}
-export default InventoryStep;
+function SurveyQuestion({ question, i18n }) {
+ const isNumeric = question.type === 'number' || question.type === 'integer';
+ return (
+
+ );
+}
+
+export default withI18n()(InventoryStep);