Skip to content

Commit

Permalink
Merge pull request #236 from AI4Bharat/develop
Browse files Browse the repository at this point in the history
All-taks-tab-options-fix
  • Loading branch information
sagarika-padmanaban authored Jan 27, 2025
2 parents 100ff3f + f95b67c commit 8064e50
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/components/Project/AllTaskTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ import AllTaskSearchPopup from "./AllTasksSearchpopup";
import { fetchAllTaskData } from "@/Lib/Features/projects/getAllTaskData";

const excludeCols = [
"avg_rating",
"curr_rating",
"inter_annotator_difference",
"context",
"input_language",
"output_language",
Expand Down Expand Up @@ -130,6 +133,12 @@ const AllTaskTable = (props) => {
.map((key) => el.data[key]),
);
AllTaskData[0].task_status && row.push(el.task_status);
if (
ProjectDetails?.required_annotators_per_task > 1 &&
AllTaskData[0].input_data_id
) {
row.push(el.input_data_id);
}
row.push(
<>
<Link
Expand Down Expand Up @@ -157,12 +166,19 @@ const AllTaskTable = (props) => {
return row;
});
let colList = ["id"];

colList.push(
...Object.keys(AllTaskData[0].data).filter(
(el) => !excludeCols.includes(el),
),
);

AllTaskData[0].task_status && colList.push("status");
if (ProjectDetails?.required_annotators_per_task > 1) {
if (AllTaskData[0].input_data_id) {
colList.push("Input_data_id");
}
}
colList.push("actions");
const cols = colList.map((col) => {
return {
Expand Down

0 comments on commit 8064e50

Please sign in to comment.