Unverified Commit 1e615f9f authored by Vaishali K's avatar Vaishali K Committed by GitHub
Browse files

Merge pull request #76 from Sunbird-Ed/revert-74-vk-sprint-13-ps

Revert "#dp-35 fix: showing corrections pending count in downloaded csv"
No related merge requests found
Showing with 2 additions and 9 deletions
+2 -9
......@@ -170,8 +170,7 @@ class ProgramServiceHelper {
aggregations: [
{
"l1": "collectionId",
"l2": "status",
"l3": "prevStatus",
"l2": "status"
}
],
limit: 0
......@@ -233,7 +232,6 @@ class ProgramServiceHelper {
result['Contributions Accepted'] = collection.acceptedContents ? collection.acceptedContents.length : 0;
result['Contributions Rejected'] = collection.rejectedContents ? collection.rejectedContents.length : 0;
result['Contributions Pending'] = 0;
result['Contributions corrections pending'] = 0;
// count of sample contents
if (sampleContentResponse.length) {
......@@ -254,11 +252,6 @@ class ProgramServiceHelper {
// tslint:disable-next-line:max-line-length
result['Contributions Pending'] = result['Contributions Received'] - (result['Contributions Rejected'] + result['Contributions Accepted']);
}
if (obj.name === 'draft') {
const correctionPendingNode = _.find(obj.aggregations[0].values, {name: "live"});
result['Contributions corrections pending'] = correctionPendingNode.count;
result['Contributions Received'] = result['Contributions Received'] + correctionPendingNode.count;
}
});
}
}
......@@ -267,7 +260,7 @@ class ProgramServiceHelper {
if (nominationResponse.length) {
_.forEach(nominationResponse, (obj) => {
if (obj.collection_ids && _.includes(obj.collection_ids, collection.identifier) ) {
if (obj.status === 'Approved') {
if (obj.status === 'Approved') {
result['Nominations Accepted'] = result['Nominations Accepted'] + Number(obj.count);
} else if (obj.status !== 'Initiated') {
result['Nominations Received'] = result['Nominations Received'] + Number(obj.count);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment