Skip to content

Commit 67afb18

Browse files
Merge pull request #1110 from AI4Bharat/ana-mas
task analytics for superchecker
2 parents a20440d + de9059f commit 67afb18

File tree

11 files changed

+653
-150
lines changed

11 files changed

+653
-150
lines changed

src/redux/reducers/Progress/TaskAnalytics.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import C from "../../constants";
22

33
let initialState = {
44
data: [],
5-
originalData: [],
65
};
76

87
const diffAnnotationReview = (payload) => {
@@ -14,7 +13,11 @@ const diffAnnotationReview = (payload) => {
1413
languages: (value?.language),
1514
annotation_cumulative_tasks_count: (value?.ann_cumulative_tasks_count),
1615
review_cumulative_tasks_count: (value?.rew_cumulative_tasks_count),
17-
diff_annotation_review: (value?.ann_cumulative_tasks_count - value?.rew_cumulative_tasks_count)
16+
sup_cumulative_tasks_count : (value?.sup_cumulative_tasks_count),
17+
diff_annotation_rev_sup: (value?.ann_cumulative_tasks_count - value?.rew_cumulative_tasks_count-value?.sup_cumulative_tasks_count),
18+
diff_annotation_rev: (value?.ann_cumulative_tasks_count - value?.rew_cumulative_tasks_count),
19+
diff_annotation_sup: (value?.ann_cumulative_tasks_count - value?.sup_cumulative_tasks_count),
20+
diff_rev:(value?.rew_cumulative_tasks_count-value?.sup_cumulative_tasks_count),
1821
};
1922
})
2023
})
@@ -29,8 +32,7 @@ const reducer = (state = initialState, action) => {
2932
switch (action.type) {
3033
case C.FETCH_TASK_ANALYTICS_DATA:
3134
const data = diffAnnotationReview(action.payload);
32-
return { ...state, originalData: action.payload, data };
33-
35+
return { ...state, data };
3436

3537
default:
3638
return {

src/redux/reducers/WorkspaceDetails/GetTaskAnalytics.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ const diffAnnotationReview = (payload) => {
1515
languages: (value?.language),
1616
annotation_cumulative_tasks_count: (value?.ann_cumulative_tasks_count),
1717
review_cumulative_tasks_count: (value?.rew_cumulative_tasks_count),
18-
diff_annotation_review: (value?.ann_cumulative_tasks_count - value?.rew_cumulative_tasks_count)
18+
sup_cumulative_tasks_count : (value?.sup_cumulative_tasks_count),
19+
diff_annotation_rev_sup: (value?.ann_cumulative_tasks_count - value?.rew_cumulative_tasks_count-value?.sup_cumulative_tasks_count),
20+
diff_annotation_rev: (value?.ann_cumulative_tasks_count - value?.rew_cumulative_tasks_count),
21+
diff_annotation_sup: (value?.ann_cumulative_tasks_count - value?.sup_cumulative_tasks_count),
22+
diff_rev:(value?.rew_cumulative_tasks_count-value?.sup_cumulative_tasks_count),
1923
};
2024
})
2125
})

src/ui/pages/container/Progress/MetaAnalytics/MetaAnalytics.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,9 @@ export default function MetaAnalytics(props) {
231231
</Select>
232232
</FormControl>
233233
{/* <Grid item xs={12} sm={12} md={12} lg={12} xl={12} container justifyContent="space-between" alignItems="center"> */}
234-
<CustomButton label="Submit" sx={{ width: "120px" }} onClick={handleSubmit} disabled={loading} />
235-
<Box display="flex" alignItems="center">
236-
<CustomButton
234+
<CustomButton label="Submit" sx={{ width: "120px" }} onClick={handleSubmit} />
235+
<Box display="flex" sx={{ width: { xs: "100px", md: "120px" }, height: "40px", marginRight: 1 }}alignItems="center">
236+
<CustomButton
237237
onClick={handleClick}
238238
disabled={loading}
239239
sx={{ marginRight: 1 }}

src/ui/pages/container/Progress/MetaAnalytics/SentanceCountMetaAnalyticsChart.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export default function SentanceCountMetaAnalyticsChart(props) {
108108
</Box>
109109
<Box className={classes.topBarInnerBox}>
110110
<Typography style={{ fontSize: "0.875rem", fontWeight: "400" }}>
111-
Total Sentance Count
111+
Total Annotated Count
112112
</Typography>
113113
<Typography style={{ fontSize: "1.125rem", fontWeight: "400" }}>
114114
{totalSentanceCount &&
@@ -117,7 +117,7 @@ export default function SentanceCountMetaAnalyticsChart(props) {
117117
</Box>
118118
<Box className={classes.topBarInnerBox}>
119119
<Typography style={{ fontSize: "0.875rem", fontWeight: "400" }}>
120-
Total Annotation Sentance Count
120+
Pending Review Count
121121
</Typography>
122122
<Typography style={{ fontSize: "1.125rem", fontWeight: "400" }}>
123123
{totalAnnotationSentanceCount &&
@@ -126,7 +126,7 @@ export default function SentanceCountMetaAnalyticsChart(props) {
126126
</Box>
127127
<Box className={classes.topBarInnerBox}>
128128
<Typography style={{ fontSize: "0.875rem", fontWeight: "400" }}>
129-
Total Quality/Reviewed Sentance Count
129+
Review Completed Count
130130
</Typography>
131131
<Typography style={{ fontSize: "1.125rem", fontWeight: "400" }}>
132132
{totalReviewSentanceCount &&
@@ -218,4 +218,4 @@ export default function SentanceCountMetaAnalyticsChart(props) {
218218
</Paper>
219219
</Box>
220220
)
221-
}
221+
}

src/ui/pages/container/Progress/MetaAnalytics/WordCountMetaAnalyticsChart.jsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ import {
1515

1616
export default function WordCountMetaAnalyticsChart(props) {
1717
const {analyticsData,graphCategory} = props
18-
console.log(analyticsData);
19-
2018
const classes = DatasetStyle();
2119
const [totalWordCount, setTotalWordCount] = useState();
2220
const [totalAnnotationWordCount, setTotalAnnotationWordCount] = useState();
@@ -214,7 +212,7 @@ export default function WordCountMetaAnalyticsChart(props) {
214212
</Box>
215213
<Box className={classes.topBarInnerBox}>
216214
<Typography style={{ fontSize: "0.875rem", fontWeight: "400" }}>
217-
Total Word Count
215+
Total Annotated Count
218216
</Typography>
219217
<Typography style={{ fontSize: "1.125rem", fontWeight: "400" }}>
220218
{totalWordCount &&
@@ -223,7 +221,7 @@ export default function WordCountMetaAnalyticsChart(props) {
223221
</Box>
224222
<Box className={classes.topBarInnerBox}>
225223
<Typography style={{ fontSize: "0.875rem", fontWeight: "400" }}>
226-
Total Annotation Word Count
224+
Pending Review Count
227225
</Typography>
228226
<Typography style={{ fontSize: "1.125rem", fontWeight: "400" }}>
229227
{totalAnnotationWordCount &&
@@ -232,7 +230,7 @@ export default function WordCountMetaAnalyticsChart(props) {
232230
</Box>
233231
<Box className={classes.topBarInnerBox}>
234232
<Typography style={{ fontSize: "0.875rem", fontWeight: "400" }}>
235-
Total Quality/Reviewed Word Count
233+
Review Completed Count
236234
</Typography>
237235
<Typography style={{ fontSize: "1.125rem", fontWeight: "400" }}>
238236
{totalReviewWordCount &&

0 commit comments

Comments
 (0)