diff --git a/src/components/projects/ProjectCard.tsx b/src/components/projects/ProjectCard.tsx index c0f4097c..6f98952b 100644 --- a/src/components/projects/ProjectCard.tsx +++ b/src/components/projects/ProjectCard.tsx @@ -65,7 +65,7 @@ export default function ProjectCard(props: ProjectCardProps) { {props.project.time} } } - {props.project.is_integration_project &&
+ {props.project.isIntegrationProject &&
This is an integration project, please do not delete it unless the integration is deleted
} {(isAdmin && props.project.status !== ProjectStatus.INIT_SAMPLE_PROJECT) && diff --git a/src/components/projects/ProjectsList.tsx b/src/components/projects/ProjectsList.tsx index 00dc2f67..96771162 100644 --- a/src/components/projects/ProjectsList.tsx +++ b/src/components/projects/ProjectsList.tsx @@ -44,6 +44,8 @@ export default function ProjectsList() { if (!organizationInactive) { refetchProjectsAndPostProcess(); refetchStatsAndPostProcess(); + } else { + setDataLoaded(true); } }, [organizationInactive, user]); @@ -70,7 +72,6 @@ export default function ProjectsList() { const orgId = useSelector(selectOrganizationId); useWebsocket(orgId, Application.REFINERY, CurrentPage.PROJECTS, handleWebsocketNotification); - return (
{dataLoaded ? (<> diff --git a/src/components/projects/projectId/attributes/attributeId/AttributeCalculations.tsx b/src/components/projects/projectId/attributes/attributeId/AttributeCalculations.tsx index 2b36e105..e5af0f86 100644 --- a/src/components/projects/projectId/attributes/attributeId/AttributeCalculations.tsx +++ b/src/components/projects/projectId/attributes/attributeId/AttributeCalculations.tsx @@ -332,7 +332,7 @@ export default function AttributeCalculation() { return (projectId &&
onScrollEvent(e)}> {currentAttribute &&
-
+
diff --git a/src/components/projects/projectId/edit-records/EditField.tsx b/src/components/projects/projectId/edit-records/EditField.tsx index 1afbb2d8..94cfd4e8 100644 --- a/src/components/projects/projectId/edit-records/EditField.tsx +++ b/src/components/projects/projectId/edit-records/EditField.tsx @@ -4,13 +4,14 @@ import { DataTypeEnum } from "@/src/types/shared/general"; import { ModalEnum } from "@/src/types/shared/modal"; import { buildAccessKey } from "@/src/util/components/projects/projectId/edit-records-helper"; import { jsonCopy } from "@/submodules/javascript-functions/general"; -import { useRef, useState } from "react"; +import { useEffect, useRef, useState } from "react"; import { useDispatch } from "react-redux"; export default function EditField(props: EditFieldProps) { const dispatch = useDispatch(); - const [inputValue, setInputValue] = useState(props.record.data[props.attribute.name]); + + const [inputValue, setInputValue] = useState(null); const inputRef = useRef(null); @@ -67,6 +68,14 @@ export default function EditField(props: EditFieldProps) { } } + useEffect(() => { + if (props.subKey == undefined) setInputValue(props.record.data[props.attribute.name]); + else setInputValue(props.record.data[props.attribute.name][props.subKey]); + }, [props.record.data[props.attribute.name], props.subKey]); + + if (!inputValue) return null; + + return (<> {(props.attribute.dataType == DataTypeEnum.TEXT || props.attribute.dataType == DataTypeEnum.LLM_RESPONSE) &&