diff --git a/src/redux/reducers/Progress/TaskAnalytics.js b/src/redux/reducers/Progress/TaskAnalytics.js index d41c2f526..f66b3f17a 100644 --- a/src/redux/reducers/Progress/TaskAnalytics.js +++ b/src/redux/reducers/Progress/TaskAnalytics.js @@ -2,6 +2,7 @@ import C from "../../constants"; let initialState = { data: [], + originalData: [], }; const diffAnnotationReview = (payload) => { @@ -13,11 +14,7 @@ const diffAnnotationReview = (payload) => { languages: (value?.language), annotation_cumulative_tasks_count: (value?.ann_cumulative_tasks_count), review_cumulative_tasks_count: (value?.rew_cumulative_tasks_count), - sup_cumulative_tasks_count : (value?.sup_cumulative_tasks_count), - diff_annotation_rev_sup: (value?.ann_cumulative_tasks_count - value?.rew_cumulative_tasks_count-value?.sup_cumulative_tasks_count), - diff_annotation_rev: (value?.ann_cumulative_tasks_count - value?.rew_cumulative_tasks_count), - diff_annotation_sup: (value?.ann_cumulative_tasks_count - value?.sup_cumulative_tasks_count), - diff_rev:(value?.rew_cumulative_tasks_count-value?.sup_cumulative_tasks_count), + diff_annotation_review: (value?.ann_cumulative_tasks_count - value?.rew_cumulative_tasks_count) }; }) }) @@ -32,7 +29,8 @@ const reducer = (state = initialState, action) => { switch (action.type) { case C.FETCH_TASK_ANALYTICS_DATA: const data = diffAnnotationReview(action.payload); - return { ...state, data }; + return { ...state, originalData: action.payload, data }; + default: return { diff --git a/src/redux/reducers/WorkspaceDetails/GetTaskAnalytics.js b/src/redux/reducers/WorkspaceDetails/GetTaskAnalytics.js index 5d8c04844..55522d0b5 100644 --- a/src/redux/reducers/WorkspaceDetails/GetTaskAnalytics.js +++ b/src/redux/reducers/WorkspaceDetails/GetTaskAnalytics.js @@ -15,11 +15,7 @@ const diffAnnotationReview = (payload) => { languages: (value?.language), annotation_cumulative_tasks_count: (value?.ann_cumulative_tasks_count), review_cumulative_tasks_count: (value?.rew_cumulative_tasks_count), - sup_cumulative_tasks_count : (value?.sup_cumulative_tasks_count), - diff_annotation_rev_sup: (value?.ann_cumulative_tasks_count - value?.rew_cumulative_tasks_count-value?.sup_cumulative_tasks_count), - diff_annotation_rev: (value?.ann_cumulative_tasks_count - value?.rew_cumulative_tasks_count), - diff_annotation_sup: (value?.ann_cumulative_tasks_count - value?.sup_cumulative_tasks_count), - diff_rev:(value?.rew_cumulative_tasks_count-value?.sup_cumulative_tasks_count), + diff_annotation_review: (value?.ann_cumulative_tasks_count - value?.rew_cumulative_tasks_count) }; }) }) diff --git a/src/ui/pages/container/Progress/MetaAnalytics/MetaAnalytics.jsx b/src/ui/pages/container/Progress/MetaAnalytics/MetaAnalytics.jsx index 3a2832515..7cdd01f43 100644 --- a/src/ui/pages/container/Progress/MetaAnalytics/MetaAnalytics.jsx +++ b/src/ui/pages/container/Progress/MetaAnalytics/MetaAnalytics.jsx @@ -231,9 +231,9 @@ export default function MetaAnalytics(props) { {/* */} - - - + + - Total Annotated Count + Total Sentance Count {totalSentanceCount && @@ -117,7 +117,7 @@ export default function SentanceCountMetaAnalyticsChart(props) { - Pending Review Count + Total Annotation Sentance Count {totalAnnotationSentanceCount && @@ -126,7 +126,7 @@ export default function SentanceCountMetaAnalyticsChart(props) { - Review Completed Count + Total Quality/Reviewed Sentance Count {totalReviewSentanceCount && @@ -218,4 +218,4 @@ export default function SentanceCountMetaAnalyticsChart(props) { ) -} +} \ No newline at end of file diff --git a/src/ui/pages/container/Progress/MetaAnalytics/WordCountMetaAnalyticsChart.jsx b/src/ui/pages/container/Progress/MetaAnalytics/WordCountMetaAnalyticsChart.jsx index a522b8fc9..0241b19c4 100644 --- a/src/ui/pages/container/Progress/MetaAnalytics/WordCountMetaAnalyticsChart.jsx +++ b/src/ui/pages/container/Progress/MetaAnalytics/WordCountMetaAnalyticsChart.jsx @@ -15,6 +15,8 @@ import { export default function WordCountMetaAnalyticsChart(props) { const {analyticsData,graphCategory} = props + console.log(analyticsData); + const classes = DatasetStyle(); const [totalWordCount, setTotalWordCount] = useState(); const [totalAnnotationWordCount, setTotalAnnotationWordCount] = useState(); @@ -212,7 +214,7 @@ export default function WordCountMetaAnalyticsChart(props) { - Total Annotated Count + Total Word Count {totalWordCount && @@ -221,7 +223,7 @@ export default function WordCountMetaAnalyticsChart(props) { - Pending Review Count + Total Annotation Word Count {totalAnnotationWordCount && @@ -230,7 +232,7 @@ export default function WordCountMetaAnalyticsChart(props) { - Review Completed Count + Total Quality/Reviewed Word Count {totalReviewWordCount && diff --git a/src/ui/pages/container/Progress/TaskAnalytics/AudioTaskAnalyticsChart.jsx b/src/ui/pages/container/Progress/TaskAnalytics/AudioTaskAnalyticsChart.jsx index 683b74c1a..6c1c81700 100644 --- a/src/ui/pages/container/Progress/TaskAnalytics/AudioTaskAnalyticsChart.jsx +++ b/src/ui/pages/container/Progress/TaskAnalytics/AudioTaskAnalyticsChart.jsx @@ -13,7 +13,6 @@ import { Tooltip, Legend, ResponsiveContainer, - Checkbox, Label, } from "recharts"; import ResponsiveChartContainer from "../../../component/common/ResponsiveChartContainer" @@ -22,13 +21,11 @@ import ResponsiveChartContainer from "../../../component/common/ResponsiveChartC function AudioTaskAnalyticsChart(props) { const classes = DatasetStyle(); const dispatch = useDispatch(); - const { analyticsData ,annotationChecked,reviewChecked,supercheckChecked} = props; + const { analyticsData } = props; const [totalTaskCount, setTotalTaskCount] = useState(); const [totalAnnotationTasksCount, setTotalAnnotationTasksCount] = useState(); const [totalReviewTasksCount, setTotalReviewTasksCount] = useState(); - const [totalSuperCheckTasksCount, setTotalSuperCheckTasksCount] = useState(); const [data, setData] = useState([]); - const [annRev,setAnnRev] = useState(); useEffect(() => { analyticsData?.sort( @@ -40,27 +37,22 @@ function AudioTaskAnalyticsChart(props) { let allAnnotatorCumulativeTasksCount = 0; let allReviewCumulativeTasksCount = 0; - let allSuperCheckCumulativeTasksCount = 0; var languages; analyticsData?.map((element, index) => { allAnnotatorCumulativeTasksCount += element.annotation_cumulative_tasks_count; allReviewCumulativeTasksCount += element.review_cumulative_tasks_count; - allSuperCheckCumulativeTasksCount += element.sup_cumulative_tasks_count; languages = element.languages; }); setTotalAnnotationTasksCount(allAnnotatorCumulativeTasksCount); setTotalReviewTasksCount(allReviewCumulativeTasksCount); - setTotalSuperCheckTasksCount(allSuperCheckCumulativeTasksCount) setTotalTaskCount( - allAnnotatorCumulativeTasksCount + allReviewCumulativeTasksCount+allSuperCheckCumulativeTasksCount + allAnnotatorCumulativeTasksCount + allReviewCumulativeTasksCount ); - setAnnRev(allAnnotatorCumulativeTasksCount + allReviewCumulativeTasksCount) - }, [analyticsData]); + const CustomTooltip = ({ active, payload, label }) => { - if (active && payload && payload.length) { return (
@@ -73,77 +65,29 @@ function AudioTaskAnalyticsChart(props) { payload[0].payload.annotation_cumulative_tasks_count ) : 0 - }`}

- {annotationChecked&&!reviewChecked&&!supercheckChecked?(

+ }`} +

{`Annotation : ${ - payload[0].payload.annotation_cumulative_tasks_count + payload[0].payload.diff_annotation_review ? new Intl.NumberFormat("en").format( - payload[0].payload.annotation_cumulative_tasks_count + payload[0].payload.diff_annotation_review ) : 0 - }`}

):annotationChecked&&reviewChecked&&!supercheckChecked?(

- {`Annotation : ${ - payload[0].payload.diff_annotation_rev - ? new Intl.NumberFormat("en").format( - payload[0].payload.diff_annotation_rev - ) - : 0 - }`}

):annotationChecked&&reviewChecked&&supercheckChecked?(

- {`Annotation : ${ - payload[0].payload.diff_annotation_rev_sup - ? new Intl.NumberFormat("en").format( - payload[0].payload.diff_annotation_rev_sup - ) - : 0 - }`}

):null} - - - - - {reviewChecked&&!annotationChecked&&!supercheckChecked?(

{`Review : ${ - payload[0].payload.diff_rev - ? new Intl.NumberFormat("en").format( - payload[0].payload.diff_rev - ) - : 0 - }`}

):annotationChecked&&reviewChecked&&!supercheckChecked?(

{`Review : ${ + }`} +

{`Review : ${ payload[0].payload.review_cumulative_tasks_count ? new Intl.NumberFormat("en").format( payload[0].payload.review_cumulative_tasks_count ) : 0 - }`}

):annotationChecked&&reviewChecked&&supercheckChecked?(

{`Review : ${ - payload[0].payload.diff_rev - ? new Intl.NumberFormat("en").format( - payload[0].payload.diff_rev - ) - : 0 - }`}

):null} - - - - - - - {supercheckChecked&&!reviewChecked&&!annotationChecked?(

{`SuperCheck : ${ - payload[0].payload.sup_cumulative_tasks_count - ? new Intl.NumberFormat("en").format( - payload[0].payload.sup_cumulative_tasks_count - ) - : 0 - }`}

):annotationChecked&&reviewChecked&&supercheckChecked?(

{`SuperCheck : ${ - payload[0].payload.sup_cumulative_tasks_count - ? new Intl.NumberFormat("en").format( - payload[0].payload.sup_cumulative_tasks_count - ) - : 0 - }`}

):null} + }`}

+

+

); } - return null; }; @@ -153,7 +97,7 @@ function AudioTaskAnalyticsChart(props) { {`Tasks Dashboard - ${analyticsData[0].projectType}`} - Count of Annotated , Reviewed and SuperChecked Audio Data + Count of Annotated and Reviewed Audio Data @@ -169,84 +113,34 @@ function AudioTaskAnalyticsChart(props) { > Tasks Dashboard
-
- {annotationChecked? - - Total Annotated Tasks - - - {totalAnnotationTasksCount && - new Intl.NumberFormat("en").format(totalAnnotationTasksCount)} - - :annotationChecked&&reviewChecked&&!supercheckChecked? - - Total Annotated Tasks - - - {annRev && - new Intl.NumberFormat("en").format(annRev)} - - :annotationChecked&&reviewChecked&&supercheckChecked? - - Total Annotated Tasks + + + + Total Tasks Count {totalTaskCount && new Intl.NumberFormat("en").format(totalTaskCount)} - :null} - - - - {annotationChecked&&reviewChecked&&!supercheckChecked? - - Pending Review Tasks - - - {totalAnnotationTasksCount && - new Intl.NumberFormat("en").format(totalAnnotationTasksCount)} - - :annotationChecked&&reviewChecked&&supercheckChecked? + + - Pending Review Tasks + Total Audio Files Annotated {totalAnnotationTasksCount && new Intl.NumberFormat("en").format(totalAnnotationTasksCount)} - :null} - - - - {annotationChecked&&reviewChecked&&!supercheckChecked? - - Review Completed Task - - - {totalReviewTasksCount && - new Intl.NumberFormat("en").format(totalReviewTasksCount)} - - :annotationChecked&&reviewChecked&&supercheckChecked? + + - Pending Supercheck Tasks + Total quality/ reviewed audio files {totalReviewTasksCount && new Intl.NumberFormat("en").format(totalReviewTasksCount)} - :null} - - - - {annotationChecked&&reviewChecked&&supercheckChecked? - - SuperCheck Completed Tasks - - - {totalSuperCheckTasksCount && - new Intl.NumberFormat("en").format(totalSuperCheckTasksCount)} - - :null} +
@@ -309,84 +203,21 @@ function AudioTaskAnalyticsChart(props) { content={} /> - {supercheckChecked&&!reviewChecked&&!annotationChecked?():annotationChecked&&reviewChecked&&supercheckChecked?():null} - - - - {reviewChecked&&!annotationChecked&&!supercheckChecked?():annotationChecked&&reviewChecked&&!supercheckChecked?():annotationChecked&&reviewChecked&&supercheckChecked?():reviewChecked&&supercheckChecked&&!annotationChecked?():null} - - - {annotationChecked&&!reviewChecked&&!supercheckChecked?():annotationChecked&&reviewChecked&&!supercheckChecked?():annotationChecked&&reviewChecked&&supercheckChecked?():annotationChecked&&supercheckChecked&&!reviewChecked?( + ):null} + /> diff --git a/src/ui/pages/container/Progress/TaskAnalytics/TaskAnalytics.jsx b/src/ui/pages/container/Progress/TaskAnalytics/TaskAnalytics.jsx index 9abb62c56..f9651c8af 100644 --- a/src/ui/pages/container/Progress/TaskAnalytics/TaskAnalytics.jsx +++ b/src/ui/pages/container/Progress/TaskAnalytics/TaskAnalytics.jsx @@ -1,6 +1,6 @@ import React, { useEffect, useState,useRef } from "react"; import { useDispatch, useSelector } from "react-redux"; -import { Grid, Button, FormControl, InputLabel, Select, MenuItem, Box, styled, Menu,Checkbox ,FormControlLabel,IconButton} from "@mui/material"; +import { Grid, Button, FormControl, InputLabel, Select, MenuItem, Box, styled, Menu } from "@mui/material"; import APITransport from "../../../../../redux/actions/apitransport/apitransport"; import TaskAnalyticsDataAPI from "../../../../../redux/actions/api/Progress/TaskAnalytics"; import AudioTaskAnalyticsChart from "./AudioTaskAnalyticsChart"; @@ -14,7 +14,7 @@ import { MenuProps } from "../../../../../utils/utils"; import exportFromJSON from 'export-from-json'; import jsPDF from 'jspdf'; import html2canvas from 'html2canvas'; -import { FilterList, KeyboardArrowDown } from "@material-ui/icons"; +import { KeyboardArrowDown } from "@material-ui/icons"; const StyledMenu = styled((props) => ( { const taskAnalyticsData = useSelector((state) => state.getTaskAnalyticsData.data); const taskAnalyticsDataJson = useSelector((state) => state.getTaskAnalyticsData.originalData); const [anchorEl, setAnchorEl] = useState(null); - const [annotationChecked, setAnnotationChecked] = useState(true); - const [reviewChecked, setReviewChecked] = useState(true); - const [supercheckChecked, setSupercheckChecked] = useState(false); - const [showFilterBox, setShowFilterBox] = useState(false); - const open = Boolean(anchorEl); @@ -179,111 +174,37 @@ const TaskAnalytics = (props) => { setAnchorEl(event.currentTarget); }; - const handleReviewChange = (e) => { - const isChecked = e.target.checked; - setReviewChecked(isChecked); - - if (isChecked) { - setAnnotationChecked(true); - } - else{ - setSupercheckChecked(false) - } - }; - - const handleSupercheckChange = (e) => { - const isChecked = e.target.checked; - setSupercheckChecked(isChecked); - - if (isChecked) { - setReviewChecked(true); - setAnnotationChecked(true); - } - }; - const handleApply = () => { - getTaskAnalyticsdata(); - setShowFilterBox(false); - }; - - const handleCancel = () => { - setSelectedType("ContextualTranslationEditing"); - setAnnotationChecked(true); - setReviewChecked(true); - setSupercheckChecked(true); - setShowFilterBox(false); - }; - const toggleFilterBox = () => { - setShowFilterBox(!showFilterBox); - }; return ( + return ( <> - - - - - - - - {showFilterBox && ( - - - {/* Project Type Dropdown */} - - Project Type - - - - - -
  • To View annotation count seperately.
  • -
  • To View combination of annotation and review counts.
  • -
  • To View combination of annotation, review, and supercheck counts.
  • - -} placement="top" - > - -
    - - } - label="Annotation" - /> - } - label="Review" - /> - } - label="Supercheck" - /> -
    - - - - - - -
    - )} + + + + Project Type {" "} + + + + + + {/* */} - {/* */} - + + { JSON + {/* */}
    @@ -312,10 +234,7 @@ const TaskAnalytics = (props) => { taskAnalyticsData.map((analyticsData, _index) => { if (analyticsData.length && ['AudioTranscription', 'AudioSegmentation', 'AudioTranscriptionEditing', 'AcousticNormalisedTranscriptionEditing'].includes(analyticsData[0].projectType)) { return ( - + ) } if (analyticsData.length && @@ -324,10 +243,7 @@ const TaskAnalytics = (props) => { ['OCRTranscriptionEditing','OCRSegmentCategorizationEditing'].includes(analyticsData[0].projectType)) ) { return - + } }) diff --git a/src/ui/pages/container/Progress/TaskAnalytics/TaskCountAnalyticsChart.jsx b/src/ui/pages/container/Progress/TaskAnalytics/TaskCountAnalyticsChart.jsx index 2937d5de8..c2d97cce4 100644 --- a/src/ui/pages/container/Progress/TaskAnalytics/TaskCountAnalyticsChart.jsx +++ b/src/ui/pages/container/Progress/TaskAnalytics/TaskCountAnalyticsChart.jsx @@ -21,14 +21,12 @@ import ResponsiveChartContainer from "../../../component/common/ResponsiveChartC function TaskCountAnalyticsChart(props) { const classes = DatasetStyle(); const dispatch = useDispatch(); - const { analyticsData ,annotationChecked,reviewChecked,supercheckChecked} = props; + const { analyticsData } = props; const [totalTaskCount, setTotalTaskCount] = useState(); const [totalAnnotationTasksCount, setTotalAnnotationTasksCount] = useState(); const [totalReviewTasksCount, setTotalReviewTasksCount] = useState(); - const [totalSupercheckCount, setTotalSupercheckCount] = useState(); const [data, setData] = useState([]); - const [annRev,setAnnRev] = useState(); useEffect(() => { analyticsData?.sort( @@ -40,27 +38,22 @@ function TaskCountAnalyticsChart(props) { let allAnnotatorCumulativeTasksCount = 0; let allReviewCumulativeTasksCount = 0; - let allSuperCheckCumulativeTasksCount = 0; var languages; analyticsData?.map((element, index) => { allAnnotatorCumulativeTasksCount += element.annotation_cumulative_tasks_count; allReviewCumulativeTasksCount += element.review_cumulative_tasks_count; - allSuperCheckCumulativeTasksCount += element.sup_cumulative_tasks_count; languages = element.languages; }); setTotalAnnotationTasksCount(allAnnotatorCumulativeTasksCount); setTotalReviewTasksCount(allReviewCumulativeTasksCount); - setTotalSupercheckCount(allSuperCheckCumulativeTasksCount) setTotalTaskCount( - allAnnotatorCumulativeTasksCount + allReviewCumulativeTasksCount+allSuperCheckCumulativeTasksCount + allAnnotatorCumulativeTasksCount + allReviewCumulativeTasksCount ); - setAnnRev(allAnnotatorCumulativeTasksCount + allReviewCumulativeTasksCount) }, [analyticsData]); const CustomTooltip = ({ active, payload, label }) => { - if (active && payload && payload.length) { return (
    @@ -73,71 +66,24 @@ function TaskCountAnalyticsChart(props) { payload[0].payload.annotation_cumulative_tasks_count ) : 0 - }`}

    - {annotationChecked&&!reviewChecked&&!supercheckChecked?(

    + }`} +

    {`Annotation : ${ - payload[0].payload.annotation_cumulative_tasks_count + payload[0].payload.diff_annotation_review ? new Intl.NumberFormat("en").format( - payload[0].payload.annotation_cumulative_tasks_count + payload[0].payload.diff_annotation_review ) : 0 - }`}

    ):annotationChecked&&reviewChecked&&!supercheckChecked?(

    - {`Annotation : ${ - payload[0].payload.diff_annotation_rev - ? new Intl.NumberFormat("en").format( - payload[0].payload.diff_annotation_rev - ) - : 0 - }`}

    ):annotationChecked&&reviewChecked&&supercheckChecked?(

    - {`Annotation : ${ - payload[0].payload.diff_annotation_rev_sup - ? new Intl.NumberFormat("en").format( - payload[0].payload.diff_annotation_rev_sup - ) - : 0 - }`}

    ):null} - - - - - {reviewChecked&&!annotationChecked&&!supercheckChecked?(

    {`Review : ${ - payload[0].payload.diff_rev - ? new Intl.NumberFormat("en").format( - payload[0].payload.diff_rev - ) - : 0 - }`}

    ):annotationChecked&&reviewChecked&&!supercheckChecked?(

    {`Review : ${ + }`} +

    {`Review : ${ payload[0].payload.review_cumulative_tasks_count ? new Intl.NumberFormat("en").format( payload[0].payload.review_cumulative_tasks_count ) : 0 - }`}

    ):annotationChecked&&reviewChecked&&supercheckChecked?(

    {`Review : ${ - payload[0].payload.diff_rev - ? new Intl.NumberFormat("en").format( - payload[0].payload.diff_rev - ) - : 0 - }`}

    ):null} - - - - - - - {supercheckChecked&&!reviewChecked&&!annotationChecked?(

    {`SuperCheck : ${ - payload[0].payload.sup_cumulative_tasks_count - ? new Intl.NumberFormat("en").format( - payload[0].payload.sup_cumulative_tasks_count - ) - : 0 - }`}

    ):annotationChecked&&reviewChecked&&supercheckChecked?(

    {`SuperCheck : ${ - payload[0].payload.sup_cumulative_tasks_count - ? new Intl.NumberFormat("en").format( - payload[0].payload.sup_cumulative_tasks_count - ) - : 0 - }`}

    ):null} + }`}

    +

    +

    ); @@ -152,7 +98,7 @@ function TaskCountAnalyticsChart(props) { {`Tasks Dashboard - ${analyticsData[0].projectType}`} - Count of Annotated , Reviewed and SuperChecked Data + Count of Annotated and Reviewed Data @@ -168,83 +114,33 @@ function TaskCountAnalyticsChart(props) { Tasks Dashboard - {annotationChecked? - - Total Annotated Tasks - - - {totalAnnotationTasksCount && - new Intl.NumberFormat("en").format(totalAnnotationTasksCount)} - - :annotationChecked&&reviewChecked&&!supercheckChecked? - - Total Annotated Tasks - - - {annRev && - new Intl.NumberFormat("en").format(annRev)} - - :annotationChecked&&reviewChecked&&supercheckChecked? - - Total Annotated Tasks + + + Total Tasks Count {totalTaskCount && new Intl.NumberFormat("en").format(totalTaskCount)} - :null} - - - - {annotationChecked&&reviewChecked&&!supercheckChecked? - - Pending Review Tasks - - - {totalAnnotationTasksCount && - new Intl.NumberFormat("en").format(totalAnnotationTasksCount)} - - :annotationChecked&&reviewChecked&&supercheckChecked? + + - Pending Review Tasks + Total Sentence Pairs {totalAnnotationTasksCount && new Intl.NumberFormat("en").format(totalAnnotationTasksCount)} - :null} - - - - {annotationChecked&&reviewChecked&&!supercheckChecked? - - Review Completed Task - - - {totalReviewTasksCount && - new Intl.NumberFormat("en").format(totalReviewTasksCount)} - - :annotationChecked&&reviewChecked&&supercheckChecked? + + - Pending Supercheck Tasks + Total Quality/Reviewed Sentence Pairs {totalReviewTasksCount && new Intl.NumberFormat("en").format(totalReviewTasksCount)} - :null} - - - - {annotationChecked&&reviewChecked&&supercheckChecked? - - SuperCheck Completed Tasks - - - {totalSupercheckCount && - new Intl.NumberFormat("en").format(totalSupercheckCount)} - - :null} + @@ -307,84 +203,21 @@ function TaskCountAnalyticsChart(props) { content={} /> - {supercheckChecked&&!reviewChecked&&!annotationChecked?():annotationChecked&&reviewChecked&&supercheckChecked?():null} - - - - {reviewChecked&&!annotationChecked&&!supercheckChecked?():annotationChecked&&reviewChecked&&!supercheckChecked?():annotationChecked&&reviewChecked&&supercheckChecked?():reviewChecked&&supercheckChecked&&!annotationChecked?():null} - - - {annotationChecked&&!reviewChecked&&!supercheckChecked?():annotationChecked&&reviewChecked&&!supercheckChecked?():annotationChecked&&reviewChecked&&supercheckChecked?():annotationChecked&&supercheckChecked&&!reviewChecked?( + ):null} + /> diff --git a/src/ui/pages/container/Progress/Workspace/MetaAnalytics.jsx b/src/ui/pages/container/Progress/Workspace/MetaAnalytics.jsx index f005bd338..afb58d31a 100644 --- a/src/ui/pages/container/Progress/Workspace/MetaAnalytics.jsx +++ b/src/ui/pages/container/Progress/Workspace/MetaAnalytics.jsx @@ -232,8 +232,8 @@ export default function MetaAnalytics(props) { ))} - - + + ( { const [loading, setLoading] = useState(true); const [projectTypes, setProjectTypes] = useState([]); const [selectedType, setSelectedType] = useState("ContextualTranslationEditing"); - const [annotationChecked, setAnnotationChecked] = useState(true); - const [reviewChecked, setReviewChecked] = useState(true); - const [supercheckChecked, setSupercheckChecked] = useState(false); - const [showFilterBox, setShowFilterBox] = useState(false); - const ProjectTypes = useSelector((state) => state.getProjectDomains.data); const workspaceDetails = useSelector((state) => state.getWorkspaceDetails.data); const taskAnalyticsData = useSelector( @@ -191,112 +186,45 @@ const TaskAnalytics = () => { }; - const handleReviewChange = (e) => { - const isChecked = e.target.checked; - setReviewChecked(isChecked); - - if (isChecked) { - setAnnotationChecked(true); - } - else{ - setSupercheckChecked(false) - } - }; - - const handleSupercheckChange = (e) => { - const isChecked = e.target.checked; - setSupercheckChecked(isChecked); - - if (isChecked) { - setReviewChecked(true); - setAnnotationChecked(true); - } - }; - const handleApply = () => { - getTaskAnalyticsdata(); - setShowFilterBox(false); - }; - - const handleCancel = () => { - setSelectedType("ContextualTranslationEditing"); - setAnnotationChecked(true); - setReviewChecked(true); - setSupercheckChecked(true); - setShowFilterBox(false); - }; - const toggleFilterBox = () => { - setShowFilterBox(!showFilterBox); - }; - return ( + return ( <> - - - - - - - - - {showFilterBox && ( - - - {/* Project Type Dropdown */} - - Project Type - - - - - -
  • To View annotation count seperately.
  • -
  • To View combination of annotation and review counts.
  • -
  • To View combination of annotation, review, and supercheck counts.
  • - -} placement="top" - > - -
    + {console.log(taskAnalyticsData[0])} + + + + + Project Type {" "} + { + + + + } + - } - label="Annotation" - /> - } - label="Review" - /> - } - label="Supercheck" - /> -
    - - - - - - -
    - )} - {/* */} - {/* */} - + + + + { JSON + {/* */}
    - {loading && } {taskAnalyticsData.length ? taskAnalyticsData.map((analyticsData,_index)=>{ if (analyticsData.length && audioProjectTypes.includes(analyticsData[0].projectType)){ return ( - + )} if(analyticsData.length && (translationProjectTypes.includes(analyticsData[0].projectType) || @@ -338,10 +263,7 @@ const TaskAnalytics = () => { ) ){ return - + } }) diff --git a/src/ui/styles/Dataset.js b/src/ui/styles/Dataset.js index d3bb752da..8ce09f681 100644 --- a/src/ui/styles/Dataset.js +++ b/src/ui/styles/Dataset.js @@ -278,7 +278,6 @@ const DatasetStyle = makeStyles({ topBar: { display: "flex", alignItems: "center", - justifyContent:"space-around", backgroundColor: "#DEECFF", fontSize: "18px", }, @@ -288,10 +287,10 @@ const DatasetStyle = makeStyles({ display: "flex", flexDirection: "column", textAlign: "center", - // boxShadow: "3px 0 2px -2px #00000029", + boxShadow: "3px 0 2px -2px #00000029", }, toolTip: { - width: "200px", height: "auto", fontSize: "16px", backgroundColor: "white", color: "black", padding: "5px 10px 10px 10px", border: "1px solid gray" + width: "200px", height: "180px", fontSize: "16px", backgroundColor: "white", color: "black", padding: "5px 10px 10px 10px", border: "1px solid gray" }, toolTips: {