tango-app-api-trax 3.5.2-alpha-13 → 3.5.2-sec-1
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
|
@@ -280,6 +280,7 @@ export const create = async ( req, res ) => {
|
|
|
280
280
|
checkListId: checkListId,
|
|
281
281
|
question: section.questions,
|
|
282
282
|
checkList: inputBody.checklistName,
|
|
283
|
+
sectionNumber: section.sectionNumber,
|
|
283
284
|
};
|
|
284
285
|
await questionService.create( sectionList ).then( async ( data ) => {
|
|
285
286
|
if ( i == inputBody.sections.length - 1 ) {
|
|
@@ -429,6 +430,7 @@ export const getConfigDetails = async ( req, res ) => {
|
|
|
429
430
|
name: item.section,
|
|
430
431
|
oldName: item?.sectionOldName,
|
|
431
432
|
questions: item.question,
|
|
433
|
+
sectionNumber: item.sectionNumber,
|
|
432
434
|
} );
|
|
433
435
|
} );
|
|
434
436
|
sectionList = sections;
|
|
@@ -906,11 +908,13 @@ export const update = async ( req, res ) => {
|
|
|
906
908
|
checkListId: checkListId,
|
|
907
909
|
question: section.questions,
|
|
908
910
|
checkList: inputBody.checklistName,
|
|
911
|
+
sectionNumber: section.sectionNumber,
|
|
909
912
|
} );
|
|
910
913
|
}
|
|
911
914
|
}
|
|
912
915
|
await questionService.deleteMany( { checkListId: checkListId, client_id: req.body.clientId } );
|
|
913
916
|
if ( sectionList.length ) {
|
|
917
|
+
sectionList.sort( ( a, b ) => a.sectionNumber - b.sectionNumber );
|
|
914
918
|
await questionService.insertMany( sectionList );
|
|
915
919
|
}
|
|
916
920
|
|
|
@@ -1670,6 +1674,7 @@ export const updateConfigurev1 =async ( req, res ) => {
|
|
|
1670
1674
|
client_id: req.body.clientId,
|
|
1671
1675
|
createdByEmail: req.user.email,
|
|
1672
1676
|
approver: inputBody?.checkListDetails?.approver || [],
|
|
1677
|
+
sections: inputBody?.checkListDetails?.sections || [],
|
|
1673
1678
|
};
|
|
1674
1679
|
await checklistLogs.create( logInsertData );
|
|
1675
1680
|
|