fix by review

This commit is contained in:
moririn2528
2023-09-19 13:38:42 +09:00
parent 388908500c
commit e40f410264
3 changed files with 10 additions and 12 deletions
+6 -6
View File
@@ -165,13 +165,13 @@ def serialize_study_detail(
form_widgets = get_form_widgets_json(system_attrs)
if form_widgets:
serialized["form_widgets"] = form_widgets
serialized["feedback_component_type"] = system_attrs.get(
_SYSTEM_ATTR_FEEDBACK_COMPONENT,
{
"output_type": "note",
},
)
if serialized["is_preferential"]:
serialized["feedback_component_type"] = system_attrs.get(
_SYSTEM_ATTR_FEEDBACK_COMPONENT,
{
"output_type": "note",
},
)
serialized["preference_history"] = serialize_preference_history(system_attrs)
serialized["preferences"] = get_preferences(system_attrs)
serialized["skipped_trials"] = skipped_trials
+2 -4
View File
@@ -101,7 +101,7 @@ interface StudyDetailResponse {
preferences?: [number, number][]
preference_history?: PreferenceHistoryResponce[]
plotly_graph_objects: PlotlyGraphObject[]
feedback_component_type?: FeedbackComponentType
feedback_component_type: FeedbackComponentType
skipped_trials?: number[]
}
@@ -138,9 +138,7 @@ export const getStudyDetailAPI = (
objective_names: res.data.objective_names,
form_widgets: res.data.form_widgets,
is_preferential: res.data.is_preferential,
feedback_component_type: res.data.feedback_component_type ?? {
output_type: "note",
},
feedback_component_type: res.data.feedback_component_type,
preferences: res.data.preferences,
preference_history: res.data.preference_history?.map(
convertPreferenceHistory
+2 -2
View File
@@ -287,7 +287,7 @@ export const AppDrawer: FC<{
<ListItemText primary="Trials (Table)" sx={styleListItemText} />
</ListItemButton>
</ListItem>
<ListItem key="note" disablePadding sx={styleListItem}>
<ListItem key="Note" disablePadding sx={styleListItem}>
<ListItemButton
component={Link}
to={`${URL_PREFIX}/studies/${studyId}/note`}
@@ -297,7 +297,7 @@ export const AppDrawer: FC<{
<ListItemIcon sx={styleListItemIcon}>
<RateReviewIcon />
</ListItemIcon>
<ListItemText primary="note" sx={styleListItemText} />
<ListItemText primary="Note" sx={styleListItemText} />
</ListItemButton>
</ListItem>
</List>