tango-app-api-trax 3.7.32 → 3.7.33
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
|
@@ -2685,3 +2685,33 @@ export async function updateChecklistConfig( req, res ) {
|
|
|
2685
2685
|
return res.sendError( e, 500 );
|
|
2686
2686
|
}
|
|
2687
2687
|
}
|
|
2688
|
+
|
|
2689
|
+
export async function submittedList( req, res ) {
|
|
2690
|
+
try {
|
|
2691
|
+
let getSubmitChecklist = await processedchecklist.find( { checklistStatus: 'submit', date_iso: new Date( dayjs().format( 'YYYY-MM-DD' ) ) }, { _id: 1 } );
|
|
2692
|
+
let getSubmitTask = await processedTaskService.find( { checklistStatus: 'submit', date_iso: new Date( dayjs().format( 'YYYY-MM-DD' ) ), isPlano: { $exists: false } }, { _id: 1 } );
|
|
2693
|
+
|
|
2694
|
+
let result = [ ...getSubmitChecklist?.map( ( ele ) => ele?._id ), ...getSubmitTask?.map( ( ele ) => ele?._id ) ];
|
|
2695
|
+
return res.sendSuccess( result );
|
|
2696
|
+
} catch ( e ) {
|
|
2697
|
+
logger.error( { functionName: 'submittedList', error: e } );
|
|
2698
|
+
return res.sendError( e, 500 );
|
|
2699
|
+
}
|
|
2700
|
+
}
|
|
2701
|
+
|
|
2702
|
+
|
|
2703
|
+
export async function submittedInfo( req, res ) {
|
|
2704
|
+
try {
|
|
2705
|
+
if ( !req.query?.id ) {
|
|
2706
|
+
return res.sendError( 'Id is required', 400 );
|
|
2707
|
+
}
|
|
2708
|
+
let info = await processedchecklist.findOne( { _id: req.query.id } );
|
|
2709
|
+
if ( !info ) {
|
|
2710
|
+
info = await processedTaskService.findOne( { _id: req.query.id } );
|
|
2711
|
+
}
|
|
2712
|
+
return res.sendSuccess( info );
|
|
2713
|
+
} catch ( e ) {
|
|
2714
|
+
logger.error( { functionName: 'getTaskCHecklistDetails', error: e } );
|
|
2715
|
+
return res.sendError( e, 500 );
|
|
2716
|
+
}
|
|
2717
|
+
}
|
|
@@ -30,6 +30,9 @@ internalTraxRouter
|
|
|
30
30
|
.post( '/countUpdateRunAI', isAllowedInternalAPIHandler, internalController.countUpdateRunAI )
|
|
31
31
|
.post( '/getRunAIQuestions', isAllowedInternalAPIHandler, internalController.getRunAIQuestions )
|
|
32
32
|
.get( '/getRunAIList', isAllowedInternalAPIHandler, internalController.getRunAIList )
|
|
33
|
-
.post( '/updateChecklistConfig', isAllowedInternalAPIHandler, internalController.updateChecklistConfig )
|
|
33
|
+
.post( '/updateChecklistConfig', isAllowedInternalAPIHandler, internalController.updateChecklistConfig )
|
|
34
|
+
.get( '/submittedList', isAllowedInternalAPIHandler, internalController.submittedList )
|
|
35
|
+
.get( '/getSubmittedDetails', isAllowedInternalAPIHandler, internalController.submittedInfo )
|
|
36
|
+
;
|
|
34
37
|
|
|
35
38
|
|