Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit question Radio button for value format, is now initialized when you open an existing question to edit it. #19

Merged
merged 2 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/js/components/Person/PersonSummaryHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ const PersonSummaryHeader = () => {
return (
<OnePersonHeader>
{/* Width (below) of this PersonHeaderCell comes from the combined widths of the first x columns in PersonMemberList */}
<PersonHeaderCell $largeFont $titleCell width={150 + 125}>
<PersonHeaderCell $largeFont $titleCell width={200}> {/* Name */}
&nbsp;
</PersonHeaderCell>
<PersonHeaderCell width={190}>
<PersonHeaderCell $largeFont $titleCell width={300}>
Location
</PersonHeaderCell>
<PersonHeaderCell width={225}>
Title / Volunteering Love
</PersonHeaderCell>
{/* Edit icon */}
Expand Down
4 changes: 2 additions & 2 deletions src/js/components/Questionnaire/EditQuestionForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const EditQuestionForm = ({ classes }) => {
const [fieldMappingRuleCopied, setFieldMappingRuleCopied] = useState('');
const [saveButtonActive, setSaveButtonActive] = useState(false);
const [showFieldMappingOptions, setShowFieldMappingOptions] = useState(false);
const [radioValue, setRadioValue] = useState();
const [radioValue, setRadioValue] = useState('STRING');

const fieldMappingRuleFldRef = useRef('');
const questionInstructionsFldRef = useRef('');
Expand Down Expand Up @@ -157,8 +157,8 @@ const EditQuestionForm = ({ classes }) => {
<FormLabel id="demo-radio-buttons-group-label">Data format of answer</FormLabel>
<RadioGroup
aria-labelledby="demo-radio-buttons-group-label"
defaultValue="STRING"
inputRef={formatRadioFldRef}
value={radioValue}
name="radio-buttons-group"
onChange={handleRadioChange}
row
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/Task/TaskSummaryRow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const TaskSummaryRow = ({ classes, hideIfCompleted, personId, rowNumberForDispla
</GraySpan>
</TaskCell>
)}
<TaskCell id={`taskName-${task.taskDefinitionId}`} width={300}>
<TaskCell id={`taskName-${task.taskDefinitionId}`} width={500}>
{taskDef.taskDescription ? (
<Tooltip arrow id={`taskDescription-${task.taskDefinitionId}`} title={taskDef.taskDescription}>
<span>{taskDef.taskName}</span>
Expand Down
8 changes: 4 additions & 4 deletions src/js/pages/SystemSettings/SystemSettings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const SystemSettings = ({ classes }) => {
const navigate = useNavigate();
const queryClient = useQueryClient();

const { data: dataQList, isFetching: isFetchingQList } = useFetchData(['questionnaire-list-retrieve'], {});
const { data: dataQList, isFetching: isFetchingQList, isSuccess: isSuccessQList } = useFetchData(['questionnaire-list-retrieve'], {});
if (isFetchingQList) {
console.log('isFetching questionnaire-list-retrieve ------------');
}
Expand All @@ -34,9 +34,9 @@ const SystemSettings = ({ classes }) => {
const questionnaireListTemp = dataQList.questionnaireList;
setQuestionnaireList(questionnaireListTemp);
}
}, [dataQList]);
}, [dataQList, isSuccessQList]);

const { data: dataGroupList, isFetching: isFetchingGroupList } = useFetchData(['task-group-list-retrieve'], {});
const { data: dataGroupList, isFetching: isFetchingGroupList, isSuccess: isSuccessGroupList } = useFetchData(['task-group-list-retrieve'], {});
if (isFetchingGroupList) {
console.log('isFetching task-group-retrieve ------------');
}
Expand All @@ -45,7 +45,7 @@ const SystemSettings = ({ classes }) => {
const taskListTemp = dataGroupList.taskGroupList;
setTaskGroupList(taskListTemp);
}
}, [dataGroupList]);
}, [dataGroupList, isSuccessGroupList]);

const addQuestionnaireClick = () => {
setAppContextValue('editQuestionnaireDrawerOpen', true);
Expand Down
Loading