tango-app-api-task 3.2.0-beta.6 → 3.2.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -973,14 +973,12 @@ export async function taskDetails( req, res ) {
|
|
|
973
973
|
let limit = req.body?.limit || 10;
|
|
974
974
|
let page = req.body?.offset ? ( req.body.offset * req.body.limit ) : 0;
|
|
975
975
|
let idList = [];
|
|
976
|
-
if (
|
|
976
|
+
if ( req.body.coverage.includes( 'checklist' ) ) {
|
|
977
977
|
let taskQuery;
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
taskQuery = { referenceCheckListId: { $exists: true } };
|
|
983
|
-
}
|
|
978
|
+
taskQuery = {
|
|
979
|
+
referenceCheckListId: { $exists: true },
|
|
980
|
+
...( req.body.checklistId && req.body.checklistId != '' ) ? { referenceCheckListId: { $eq: req.body.checklistId } } : {},
|
|
981
|
+
};
|
|
984
982
|
let getChecklistDetails = await taskService.find( taskQuery, { _id: 1 } );
|
|
985
983
|
if ( getChecklistDetails ) {
|
|
986
984
|
idList = getChecklistDetails.map( ( item ) => item._id );
|