- {sampleRecordsFinal.map((record: any, index: number) => (
+ {sampleRecordsFinal.map((record: any) => (
@@ -151,7 +153,7 @@ export default function ExecutionContainer(props: ExecutionContainerProps) {
}
-
+
)
}
\ No newline at end of file
diff --git a/src/components/projects/projectId/attributes/attributeId/ViewRecordDetailsModal.tsx b/src/components/projects/projectId/attributes/attributeId/ViewRecordDetailsModal.tsx
index b47ce748..007be4cd 100644
--- a/src/components/projects/projectId/attributes/attributeId/ViewRecordDetailsModal.tsx
+++ b/src/components/projects/projectId/attributes/attributeId/ViewRecordDetailsModal.tsx
@@ -24,10 +24,10 @@ export default function ViewRecordDetailsModal(props: ViewRecordDetailsModalProp
Calculated value
{props.currentAttribute.dataType != DataTypeEnum.EMBEDDING_LIST ?
- {props.sampleRecords.calculatedAttributes[modalViewRecordDetails.recordIdx]}
+ {props.sampleRecords[modalViewRecordDetails.recordIdx].calculatedValue.value}
:
- {props.sampleRecords.calculatedAttributesListDisplay[modalViewRecordDetails.recordIdx].map((item: any) =>
- {props.sampleRecords.calculatedAttributesList[modalViewRecordDetails.recordIdx]}
+ {props.sampleRecords[modalViewRecordDetails.recordIdx].calculatedValue.value.map((item: any) =>
+ {item}
)}
}
diff --git a/src/components/projects/projectId/data-browser/SearchGroups.tsx b/src/components/projects/projectId/data-browser/SearchGroups.tsx
index 42b94e38..9c5a1b55 100644
--- a/src/components/projects/projectId/data-browser/SearchGroups.tsx
+++ b/src/components/projects/projectId/data-browser/SearchGroups.tsx
@@ -85,6 +85,7 @@ export default function SearchGroups() {
});
colors.push('gray');
visibleAttributes.forEach((att) => {
+ if (att.dataType == DataTypeEnum.PERMISSION) return;
attributesSort.push({
name: att.name,
key: att.id,
diff --git a/src/components/projects/projectId/heuristics/heuristicId/labeling-function/LabelingFunction.tsx b/src/components/projects/projectId/heuristics/heuristicId/labeling-function/LabelingFunction.tsx
index f4daf388..1979a907 100644
--- a/src/components/projects/projectId/heuristics/heuristicId/labeling-function/LabelingFunction.tsx
+++ b/src/components/projects/projectId/heuristics/heuristicId/labeling-function/LabelingFunction.tsx
@@ -8,7 +8,7 @@ import { postProcessCurrentHeuristic, postProcessLastTaskLogs } from "@/src/util
import { Tooltip } from "@nextui-org/react";
import { TOOLTIPS_DICT } from "@/src/util/tooltip-constants";
import { postProcessLabelingTasksSchema } from "@/src/util/components/projects/projectId/settings/labeling-tasks-helper";
-import { selectVisibleAttributesHeuristics, selectLabelingTasksAll, setLabelingTasksAll } from "@/src/reduxStore/states/pages/settings";
+import { selectVisibleAttributesHeuristics, selectLabelingTasksAll, setLabelingTasksAll, selectVisibleAttributesWithoutPermissions } from "@/src/reduxStore/states/pages/settings";
import HeuristicsEditor from "../shared/HeuristicsEditor";
import DangerZone from "@/src/components/shared/danger-zone/DangerZone";
import HeuristicRunButtons from "../shared/HeuristicRunButtons";
@@ -46,7 +46,7 @@ export default function LabelingFunction() {
const projectId = useSelector(selectProjectId);
const currentHeuristic = useSelector(selectHeuristic);
const labelingTasks = useSelector(selectLabelingTasksAll);
- const attributes = useSelector(selectVisibleAttributesHeuristics);
+ const attributes = useSelector(selectVisibleAttributesWithoutPermissions);
const allUsers = useSelector(selectAllUsers);
const [lastTaskLogs, setLastTaskLogs] = useState
([]);
diff --git a/src/components/projects/projectId/heuristics/heuristicId/shared/HeuristicsLayout.tsx b/src/components/projects/projectId/heuristics/heuristicId/shared/HeuristicsLayout.tsx
index ac8d2c89..de54a508 100644
--- a/src/components/projects/projectId/heuristics/heuristicId/shared/HeuristicsLayout.tsx
+++ b/src/components/projects/projectId/heuristics/heuristicId/shared/HeuristicsLayout.tsx
@@ -1,7 +1,7 @@
import Statuses from "@/src/components/shared/statuses/Statuses";
import { selectHeuristic, setActiveHeuristics, updateHeuristicsState } from "@/src/reduxStore/states/pages/heuristics";
import { selectAllLookupLists, setAllLookupLists } from "@/src/reduxStore/states/pages/lookup-lists";
-import { selectVisibleAttributesHeuristics, setAllAttributes } from "@/src/reduxStore/states/pages/settings";
+import { selectVisibleAttributesHeuristics, selectVisibleAttributesWithoutPermissions, setAllAttributes } from "@/src/reduxStore/states/pages/settings";
import { selectProjectId } from "@/src/reduxStore/states/project"
import { HeuristicsProperty } from "@/src/types/components/projects/projectId/heuristics/heuristicId/heuristics-details";
import { Attribute } from "@/src/types/components/projects/projectId/settings/data-schema";
@@ -26,7 +26,7 @@ export default function HeuristicsLayout(props: any) {
const projectId = useSelector(selectProjectId);
const currentHeuristic = useSelector(selectHeuristic);
- const usableAttributes = useSelector(selectVisibleAttributesHeuristics);
+ const usableAttributes = useSelector(selectVisibleAttributesWithoutPermissions);
const lookupLists = useSelector(selectAllLookupLists);
const [isHeaderNormal, setIsHeaderNormal] = useState(true);
diff --git a/src/components/projects/projectId/playground/CreateEvaluationSetModal.tsx b/src/components/projects/projectId/playground/CreateEvaluationSetModal.tsx
index 47a111ad..45d2489e 100644
--- a/src/components/projects/projectId/playground/CreateEvaluationSetModal.tsx
+++ b/src/components/projects/projectId/playground/CreateEvaluationSetModal.tsx
@@ -15,6 +15,7 @@ import { useCallback, useEffect, useState } from "react";
import { useDispatch, useSelector } from "react-redux";
import QuestionHistory from "./QuestionHistory";
import { MemoIconPlus, MemoIconWand } from "@/submodules/react-components/components/kern-icons/icons";
+import { postProcessUpdateAndSortRecords } from "@/submodules/javascript-functions/post-process-functions";
const ACCEPT_BUTTON = { buttonCaption: 'Create', useButton: true };
const SEARCH_REQUEST = { offset: 0, limit: 20 };
@@ -129,16 +130,7 @@ export default function CreateEvaluationSetModal(props: CreateEvaluationSetsModa
}
function updateAndSortRecordList(newRecords = []) {
- setRecordList((prev) => {
- const merged = [...prev, ...newRecords];
- const uniqueRecords = Array.from(
- new Map(merged.map((item) => [item.data?.running_id, item])).values()
- );
- uniqueRecords.sort(
- (a, b) => (a.data?.running_id || 0) - (b.data?.running_id || 0)
- );
- return uniqueRecords;
- });
+ setRecordList((prev) => postProcessUpdateAndSortRecords(prev, newRecords));
}
function resetState() {
diff --git a/src/components/shared/record-display/RecordDisplay.tsx b/src/components/shared/record-display/RecordDisplay.tsx
index 80bd4da0..6af65606 100644
--- a/src/components/shared/record-display/RecordDisplay.tsx
+++ b/src/components/shared/record-display/RecordDisplay.tsx
@@ -3,11 +3,11 @@ import { selectAttributesDict } from "@/src/reduxStore/states/pages/settings";
import { LineBreaksType } from "@/src/types/components/projects/projectId/data-browser/data-browser";
import { Attribute } from "@/src/types/components/projects/projectId/settings/data-schema";
import { DataTypeEnum } from "@/src/types/shared/general";
-import { postProcessAttributes, postProcessRecord } from "@/src/util/shared/record-display-helper";
import { useEffect, useState } from "react";
import { useSelector } from "react-redux";
import Highlight from "../highlight/Highlight";
import { MemoIconAlertCircle } from "@/submodules/react-components/components/kern-icons/icons";
+import { postProcessAttributes, postProcessRecord } from "@/submodules/javascript-functions/post-process-functions";
export function RecordDisplay(props: any) {
const attributesDict = useSelector(selectAttributesDict);
@@ -33,8 +33,8 @@ export function RecordDisplay(props: any) {