Skip to content

Commit

Permalink
Merge pull request #1111 from AI4Bharat/revert-1110-ana-mas
Browse files Browse the repository at this point in the history
Revert "task analytics for superchecker"
  • Loading branch information
ishvindersethi22 authored Oct 4, 2024
2 parents 67afb18 + 1372458 commit aed965b
Show file tree
Hide file tree
Showing 11 changed files with 150 additions and 653 deletions.
10 changes: 4 additions & 6 deletions src/redux/reducers/Progress/TaskAnalytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import C from "../../constants";

let initialState = {
data: [],
originalData: [],
};

const diffAnnotationReview = (payload) => {
Expand All @@ -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)
};
})
})
Expand All @@ -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 {
Expand Down
6 changes: 1 addition & 5 deletions src/redux/reducers/WorkspaceDetails/GetTaskAnalytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
};
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,9 @@ export default function MetaAnalytics(props) {
</Select>
</FormControl>
{/* <Grid item xs={12} sm={12} md={12} lg={12} xl={12} container justifyContent="space-between" alignItems="center"> */}
<CustomButton label="Submit" sx={{ width: "120px" }} onClick={handleSubmit} />
<Box display="flex" sx={{ width: { xs: "100px", md: "120px" }, height: "40px", marginRight: 1 }}alignItems="center">
<CustomButton
<CustomButton label="Submit" sx={{ width: "120px" }} onClick={handleSubmit} disabled={loading} />
<Box display="flex" alignItems="center">
<CustomButton
onClick={handleClick}
disabled={loading}
sx={{ marginRight: 1 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export default function SentanceCountMetaAnalyticsChart(props) {
</Box>
<Box className={classes.topBarInnerBox}>
<Typography style={{ fontSize: "0.875rem", fontWeight: "400" }}>
Total Annotated Count
Total Sentance Count
</Typography>
<Typography style={{ fontSize: "1.125rem", fontWeight: "400" }}>
{totalSentanceCount &&
Expand All @@ -117,7 +117,7 @@ export default function SentanceCountMetaAnalyticsChart(props) {
</Box>
<Box className={classes.topBarInnerBox}>
<Typography style={{ fontSize: "0.875rem", fontWeight: "400" }}>
Pending Review Count
Total Annotation Sentance Count
</Typography>
<Typography style={{ fontSize: "1.125rem", fontWeight: "400" }}>
{totalAnnotationSentanceCount &&
Expand All @@ -126,7 +126,7 @@ export default function SentanceCountMetaAnalyticsChart(props) {
</Box>
<Box className={classes.topBarInnerBox}>
<Typography style={{ fontSize: "0.875rem", fontWeight: "400" }}>
Review Completed Count
Total Quality/Reviewed Sentance Count
</Typography>
<Typography style={{ fontSize: "1.125rem", fontWeight: "400" }}>
{totalReviewSentanceCount &&
Expand Down Expand Up @@ -218,4 +218,4 @@ export default function SentanceCountMetaAnalyticsChart(props) {
</Paper>
</Box>
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -212,7 +214,7 @@ export default function WordCountMetaAnalyticsChart(props) {
</Box>
<Box className={classes.topBarInnerBox}>
<Typography style={{ fontSize: "0.875rem", fontWeight: "400" }}>
Total Annotated Count
Total Word Count
</Typography>
<Typography style={{ fontSize: "1.125rem", fontWeight: "400" }}>
{totalWordCount &&
Expand All @@ -221,7 +223,7 @@ export default function WordCountMetaAnalyticsChart(props) {
</Box>
<Box className={classes.topBarInnerBox}>
<Typography style={{ fontSize: "0.875rem", fontWeight: "400" }}>
Pending Review Count
Total Annotation Word Count
</Typography>
<Typography style={{ fontSize: "1.125rem", fontWeight: "400" }}>
{totalAnnotationWordCount &&
Expand All @@ -230,7 +232,7 @@ export default function WordCountMetaAnalyticsChart(props) {
</Box>
<Box className={classes.topBarInnerBox}>
<Typography style={{ fontSize: "0.875rem", fontWeight: "400" }}>
Review Completed Count
Total Quality/Reviewed Word Count
</Typography>
<Typography style={{ fontSize: "1.125rem", fontWeight: "400" }}>
{totalReviewWordCount &&
Expand Down
Loading

0 comments on commit aed965b

Please sign in to comment.