tango-app-api-trax 1.0.0-beta-task.16 → 1.0.0-beta-task.18
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/fir-51e77-firebase-adminsdk-x3sdp-fd902b74ae.json +2 -3
- package/package.json +3 -3
- package/src/controllers/download.controller.js +3 -0
- package/src/controllers/gallery.controller.js +35 -32
- package/src/controllers/mobileTrax.controller.js +9 -9
- package/src/controllers/teaxFlag.controller.js +24 -3
- package/src/controllers/trax.controller.js +5 -1
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
2
1
|
{
|
|
3
2
|
"type": "service_account",
|
|
4
3
|
"project_id": "tango-trax",
|
|
5
|
-
"private_key_id": "
|
|
6
|
-
"private_key": "-----BEGIN PRIVATE KEY-----\
|
|
4
|
+
"private_key_id": "25f62c55f9ad649f333b54f62ab8b1aa97b7038e",
|
|
5
|
+
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDEZRGyxM+TUN+j\nqv6rSGWUqN9sEn9BxhdmCKZ8vsp73QIp71plFQSzWCL8pH5cfiwIu2zJlE1suApj\nGxJ+3/4X8CxWZ374HZBTSGVhsXcchYEGIwKWY6D3kfma8zRoPft3RULbus9fW0l/\nADcOMkLlN6OsawfvJXGPkMyM4e67ZOAkjlLWDGWYRnakbJZPqFN0U7aqGaXxgGoR\n1oN9qgnqQUqLl/085it5rqJ08hTXIsTViDrbD9gsShesC4L95C9jE1fnrJseghLM\n91qlJcspWGU6MgI1H44SYT0SttFaYZ2hJXmISMH9CnI9sdFmQBs8oBZXPHL3oXhM\nsrnMy169AgMBAAECggEABdpRj3S5jz/uVkPoNdsLue/ZbrCowwv1UmNeG3gac9wH\ng+U/709pIIjMdsqBKzOluiHkcVJz3JJUhD/ANUXqyN8DDJUmLcdAb+xHpy8WfWQG\nJGnChTsABvi+SfhG/sygE/MdYGEowRmo7vm8P6D5qOKXrwb73sw3Hj/tX00euU4Q\nKek3W9Sd5j3MDvSoCM7tlqmOuyQjD1z4taUmeQ8I4KOOWmpamS4wg90iW13FxgSK\n/vNpqb/xWqlxoFfpwgZaT8xM6TKBURyDeDi0Fu+WAP6gIDM8lHoW1tPtSJifE5bU\ngMmAhR+DlWZM6wuDJvdJRomHl7huT36rYp1IFa/nkQKBgQDswbL21UbkdV2YsSRn\nwmDjgO/VAGv27OhTtHJpSSOQ9O1Fk94BLG9RPqx6CXm+86Kmxctrl3EIsEbfPcBK\nOHF0yknhwhTfDZuEtLdsqvK06bLaBYdq0E0RghUiqi9jtQvaQJeu3e0735gfHsrp\nhE21rctn85uo31WCVrjW5WegUQKBgQDUW4sYZ+46RrjPhVNj2W1w0A6qAaWeN/BC\nJn0y2kS0AbDSRzqfLrGivwDGRwlAzVyo76ARRZKVxqR4XlzygGELV0obGtKj1a1R\nwjLCbmsFIf7xXl2+rWeQh9oNsOfa2OR1cuG/ne8IS2dLayGOyZBoku45SOWLhwDA\nINwCCcmIrQKBgQC9fHmjnCbVCioS3xPoB2ZMLxHEREYkpo97DtzS7zqL9btBCIuS\nHOIrACJCufq6nXv8Rin8voQ1FABlA6M2w93qP0zKZu8VZmql141GZ7tAmBoQ7IPp\nNTW5YYdQ6yxqfKgz0aaUygHo/ZdesOJt6vnXAnXdiNd4XOavHoFpXMmHQQKBgB42\nV/fE8ZPA9BIyOcb+7B8curldOp7j/n6q0y0k+JlTlECWebSkBAnPeuC6wopBrWkr\njm5mo5BDjqrBYh/uO+BNLvHkQwukHuB+7JHU+8zjJU5ZyqSSLyXU7iT8gkAUk4xS\nJ+QHKDbZ43xLZZ7W9oCqRtJHmMDdGDI9eo+frNiRAoGBANN7ZkuPdUAqBbMmj5I7\n+C9k5Jg5OFsw9CYzi5LBETKcy1YiUw4PX5xSWV0hlhjrSbCuvpbX1fVwcz4UNYaK\nNdgt2GJOQZ6vtnaInhx737D31l5ZXpb+9IH7O5iZ711PXV3Ic4zQSPbDkC8V5z+k\nafICa9PE9II8SypV9b5kVbpl\n-----END PRIVATE KEY-----\n",
|
|
7
6
|
"client_email": "firebase-adminsdk-k7lom@tango-trax.iam.gserviceaccount.com",
|
|
8
7
|
"client_id": "112026772051782321525",
|
|
9
8
|
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tango-app-api-trax",
|
|
3
|
-
"version": "1.0.0-beta-task.
|
|
3
|
+
"version": "1.0.0-beta-task.18",
|
|
4
4
|
"description": "Trax",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"mongodb": "^6.8.0",
|
|
27
27
|
"nodemon": "^3.1.4",
|
|
28
28
|
"path": "^0.12.7",
|
|
29
|
-
"tango-api-schema": "^2.2.
|
|
30
|
-
"tango-app-api-middleware": "3.1.43-alpha.10",
|
|
29
|
+
"tango-api-schema": "^2.2.8",
|
|
30
|
+
"tango-app-api-middleware": "^3.1.43-alpha.10",
|
|
31
31
|
"url": "^0.11.4",
|
|
32
32
|
"winston": "^3.13.1",
|
|
33
33
|
"winston-daily-rotate-file": "^5.0.0"
|
|
@@ -52,7 +52,10 @@ export const downloadInsert = async ( req, res ) => {
|
|
|
52
52
|
{ sourceCheckList_id: new mongoose.Types.ObjectId( requestData.sourceCheckList_id ) },
|
|
53
53
|
{ date_iso: { $gte: fromDate, $lte: toDate } },
|
|
54
54
|
{ store_id: { $in: requestData.storeIds } },
|
|
55
|
+
],
|
|
56
|
+
$or: [
|
|
55
57
|
{ checklistStatus: 'submit' },
|
|
58
|
+
{ redoStatus: true },
|
|
56
59
|
],
|
|
57
60
|
},
|
|
58
61
|
} );
|
|
@@ -267,44 +267,49 @@ export async function approveChecklist( req, res ) {
|
|
|
267
267
|
let userTimezoneOffset = toDate.getTimezoneOffset() * 60000;
|
|
268
268
|
toDate = new Date( toDate.getTime() - userTimezoneOffset );
|
|
269
269
|
toDate.setUTCHours( 23, 59, 59, 59 );
|
|
270
|
-
let query = { sourceCheckList_id: req.body.sourceCheckList_id, date_iso: { $gte: req.body.fromDate, $lte: toDate }, checklistStatus: 'submit', approvalEnable: true };
|
|
270
|
+
let query = { sourceCheckList_id: req.body.sourceCheckList_id, date_iso: { $gte: req.body.fromDate, $lte: toDate }, $or: [ { checklistStatus: 'submit' }, { redoStatus: true } ], approvalEnable: true };
|
|
271
271
|
if ( req.body?.storeId?.length ) {
|
|
272
272
|
query['store_id'] = { $in: req.body.storeId };
|
|
273
273
|
}
|
|
274
|
-
let checklistDetails = await processedChecklist.find( query, { _id: 1 } );
|
|
274
|
+
let checklistDetails = await processedChecklist.find( query, { _id: 1, checklistStatus: 1, storeName: 1 } );
|
|
275
275
|
if ( !checklistDetails.length ) {
|
|
276
276
|
return res.sendError( 'No data found', 204 );
|
|
277
277
|
}
|
|
278
|
-
let idList = checklistDetails.map( ( item ) => item._id );
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
278
|
+
let idList = checklistDetails.filter( ( ele ) => ele.checklistStatus == 'submit' ).map( ( item ) => item._id );
|
|
279
|
+
if ( idList.length ) {
|
|
280
|
+
let updateResponse = await processedChecklist.updateMany( { _id: { $in: idList } }, { approvalStatus: true } );
|
|
281
|
+
if ( updateResponse.modifiedCount || updateResponse.matchedCount ) {
|
|
282
|
+
let params = {
|
|
283
|
+
'payload': {
|
|
284
|
+
sourceCheckList_id: req.body.sourceCheckList_id,
|
|
285
|
+
fromDate: req.body.fromDate,
|
|
286
|
+
toDate: req.body.toDate,
|
|
287
|
+
store_id: req.body.storeId,
|
|
288
|
+
},
|
|
289
|
+
'upsert': {
|
|
290
|
+
approvalStatus: true,
|
|
291
|
+
},
|
|
292
|
+
};
|
|
293
|
+
const requestOptions = {
|
|
294
|
+
method: 'POST',
|
|
295
|
+
headers: {
|
|
296
|
+
'Content-Type': 'application/json',
|
|
297
|
+
},
|
|
298
|
+
body: JSON.stringify( params ),
|
|
299
|
+
};
|
|
300
|
+
let url = JSON.parse( process.env.LAMBDAURL );
|
|
301
|
+
let searchResponse = await fetch( url.approveChecklist, requestOptions );
|
|
301
302
|
|
|
302
303
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
304
|
+
if ( searchResponse.ok ) {
|
|
305
|
+
return res.sendSuccess( 'Checklist Approved successfully' );
|
|
306
|
+
} else {
|
|
307
|
+
return res.sendError( 'Something went wrong', 500 );
|
|
308
|
+
}
|
|
307
309
|
}
|
|
310
|
+
} else {
|
|
311
|
+
let redoList = checklistDetails.filter( ( ele ) => ele.checklistStatus == 'open' ).map( ( item ) => item.storeName );
|
|
312
|
+
return res.sendError( `redo stores ${redoList.toString()}`, 400 );
|
|
308
313
|
}
|
|
309
314
|
} catch ( e ) {
|
|
310
315
|
logger.error( { function: 'approveChecklist', error: e } );
|
|
@@ -348,6 +353,7 @@ export async function redoChecklist( req, res ) {
|
|
|
348
353
|
let updateData = {
|
|
349
354
|
checklistStatus: 'open',
|
|
350
355
|
redoStatus: true,
|
|
356
|
+
reinitiateStatus: true,
|
|
351
357
|
questionAnswers: question,
|
|
352
358
|
};
|
|
353
359
|
|
|
@@ -444,9 +450,6 @@ export async function getLogs( req, res ) {
|
|
|
444
450
|
|
|
445
451
|
export async function approvalstatus( req, res ) {
|
|
446
452
|
try {
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
453
|
let Approver = await ApproverModel.find( { checkListId: req.body.checklistId } );
|
|
451
454
|
if ( Approver.length === 0 ) {
|
|
452
455
|
return res.sendSuccess( 'suceess' );
|
|
@@ -639,7 +639,7 @@ export async function sopMobilechecklistMultiSectionFormatter( req, res, next )
|
|
|
639
639
|
structure.parentanswer = requestSection[i].parentanswer;
|
|
640
640
|
structure.questionReferenceImage = qaAnswers[j].questionReferenceImage;
|
|
641
641
|
structure.descriptivetype = qaAnswers[j].descriptivetype;
|
|
642
|
-
if ( typeof qaAnswers[j]?.redo === 'boolean' ) {
|
|
642
|
+
if ( typeof qaAnswers[j]?.redo === 'boolean' && requestData.submittype == 'submit' ) {
|
|
643
643
|
structure.redo = false;
|
|
644
644
|
}
|
|
645
645
|
if ( qaAnswers[j]?.redoComment ) {
|
|
@@ -688,7 +688,7 @@ export async function sopMobilechecklistMultiSectionFormatter( req, res, next )
|
|
|
688
688
|
structure.parentanswer = requestSection[i].parentanswer;
|
|
689
689
|
structure.questionReferenceImage = qaAnswers[j].questionReferenceImage;
|
|
690
690
|
structure.descriptivetype = qaAnswers[j].descriptivetype;
|
|
691
|
-
if ( typeof qaAnswers[j]?.redo === 'boolean' ) {
|
|
691
|
+
if ( typeof qaAnswers[j]?.redo === 'boolean' && requestData.submittype == 'submit' ) {
|
|
692
692
|
structure.redo = false;
|
|
693
693
|
}
|
|
694
694
|
if ( qaAnswers[j]?.redoComment ) {
|
|
@@ -742,7 +742,7 @@ export async function sopMobilechecklistMultiSectionFormatter( req, res, next )
|
|
|
742
742
|
structure.parentanswer = requestSection[i].parentanswer;
|
|
743
743
|
structure.questionReferenceImage = qaAnswers[j].questionReferenceImage;
|
|
744
744
|
structure.descriptivetype = qaAnswers[j].descriptivetype;
|
|
745
|
-
if ( typeof qaAnswers[j]?.redo === 'boolean' ) {
|
|
745
|
+
if ( typeof qaAnswers[j]?.redo === 'boolean' && requestData.submittype == 'submit' ) {
|
|
746
746
|
structure.redo = false;
|
|
747
747
|
}
|
|
748
748
|
if ( qaAnswers[j]?.redoComment ) {
|
|
@@ -791,7 +791,7 @@ export async function sopMobilechecklistMultiSectionFormatter( req, res, next )
|
|
|
791
791
|
structure.parentanswer = requestSection[i].parentanswer;
|
|
792
792
|
structure.questionReferenceImage = qaAnswers[j].questionReferenceImage;
|
|
793
793
|
structure.descriptivetype = qaAnswers[j].descriptivetype;
|
|
794
|
-
if ( typeof qaAnswers[j]?.redo === 'boolean' ) {
|
|
794
|
+
if ( typeof qaAnswers[j]?.redo === 'boolean' && requestData.submittype == 'submit' ) {
|
|
795
795
|
structure.redo = false;
|
|
796
796
|
}
|
|
797
797
|
if ( qaAnswers[j]?.redoComment ) {
|
|
@@ -895,7 +895,7 @@ export async function sopMobileTaskMultiSectionFormatter( req, res, next ) {
|
|
|
895
895
|
structure.questionReferenceImage = qaAnswers[j].questionReferenceImage;
|
|
896
896
|
structure.descriptivetype = qaAnswers[j].descriptivetype;
|
|
897
897
|
|
|
898
|
-
if ( typeof qaAnswers[j]?.redo === 'boolean' ) {
|
|
898
|
+
if ( typeof qaAnswers[j]?.redo === 'boolean' && requestData.submittype == 'submit' ) {
|
|
899
899
|
structure.redo = false;
|
|
900
900
|
}
|
|
901
901
|
if ( qaAnswers[j]?.redoComment ) {
|
|
@@ -940,7 +940,7 @@ export async function sopMobileTaskMultiSectionFormatter( req, res, next ) {
|
|
|
940
940
|
structure.parentanswer = requestSection[i].parentanswer;
|
|
941
941
|
structure.questionReferenceImage = qaAnswers[j].questionReferenceImage;
|
|
942
942
|
structure.descriptivetype = qaAnswers[j].descriptivetype;
|
|
943
|
-
if ( typeof qaAnswers[j]?.redo === 'boolean' ) {
|
|
943
|
+
if ( typeof qaAnswers[j]?.redo === 'boolean' && requestData.submittype == 'submit' ) {
|
|
944
944
|
structure.redo = false;
|
|
945
945
|
}
|
|
946
946
|
if ( qaAnswers[j]?.redoComment ) {
|
|
@@ -989,7 +989,7 @@ export async function sopMobileTaskMultiSectionFormatter( req, res, next ) {
|
|
|
989
989
|
structure.parentanswer = requestSection[i].parentanswer;
|
|
990
990
|
structure.questionReferenceImage = qaAnswers[j].questionReferenceImage;
|
|
991
991
|
structure.descriptivetype = qaAnswers[j].descriptivetype;
|
|
992
|
-
if ( typeof qaAnswers[j]?.redo === 'boolean' ) {
|
|
992
|
+
if ( typeof qaAnswers[j]?.redo === 'boolean' && requestData.submittype == 'submit' ) {
|
|
993
993
|
structure.redo = false;
|
|
994
994
|
}
|
|
995
995
|
if ( qaAnswers[j]?.redoComment ) {
|
|
@@ -1043,7 +1043,7 @@ export async function sopMobileTaskMultiSectionFormatter( req, res, next ) {
|
|
|
1043
1043
|
structure.parentanswer = requestSection[i].parentanswer;
|
|
1044
1044
|
structure.questionReferenceImage = qaAnswers[j].questionReferenceImage;
|
|
1045
1045
|
structure.descriptivetype = qaAnswers[j].descriptivetype;
|
|
1046
|
-
if ( typeof qaAnswers[j]?.redo === 'boolean' ) {
|
|
1046
|
+
if ( typeof qaAnswers[j]?.redo === 'boolean' && requestData.submittype == 'submit' ) {
|
|
1047
1047
|
structure.redo = false;
|
|
1048
1048
|
}
|
|
1049
1049
|
if ( qaAnswers[j]?.redoComment ) {
|
|
@@ -1095,7 +1095,7 @@ export async function sopMobileTaskMultiSectionFormatter( req, res, next ) {
|
|
|
1095
1095
|
structure.parentanswer = requestSection[i].parentanswer;
|
|
1096
1096
|
structure.questionReferenceImage = qaAnswers[j].questionReferenceImage;
|
|
1097
1097
|
structure.descriptivetype = qaAnswers[j].descriptivetype;
|
|
1098
|
-
if ( typeof qaAnswers[j]?.redo === 'boolean' ) {
|
|
1098
|
+
if ( typeof qaAnswers[j]?.redo === 'boolean' && requestData.submittype == 'submit' ) {
|
|
1099
1099
|
structure.redo = false;
|
|
1100
1100
|
}
|
|
1101
1101
|
if ( qaAnswers[j]?.redoComment ) {
|
|
@@ -3,6 +3,7 @@ import { aggregate } from '../services/processedchecklist.services.js';
|
|
|
3
3
|
import dayjs from 'dayjs';
|
|
4
4
|
import * as processedchecklistService from '../services/processedchecklist.services.js';
|
|
5
5
|
import * as processedchecklistconfigService from '../services/processedchecklistconfig.services.js';
|
|
6
|
+
import * as checklistconfigService from '../services/checklist.service.js';
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
import utc from 'dayjs/plugin/utc.js';
|
|
@@ -608,13 +609,23 @@ export const flagCardsV1 = async ( req, res ) => {
|
|
|
608
609
|
if ( data.questionFlag ) flagCards.questionFlag.count = data.questionFlag;
|
|
609
610
|
if ( data.delayInSubmission ) flagCards.delayInSubmission.count = data.delayInSubmission;
|
|
610
611
|
|
|
612
|
+
const publishedAiChecklists = await checklistconfigService.find( { client_id: clientId, publish: true, checkListType: { $ne: 'custom' } }, { checkListType: 1 } );
|
|
613
|
+
|
|
614
|
+
if ( !publishedAiChecklists?.length ) {
|
|
615
|
+
return res.sendError( { error: 'No Data Found' }, 204 );
|
|
616
|
+
}
|
|
617
|
+
|
|
611
618
|
const detectionPayload = { fromDate, toDate, storeId, clientId };
|
|
612
619
|
const lambdaURL = 'https://f65azvtljclaxp6l7rnx65cdmm0lcgvp.lambda-url.ap-south-1.on.aws/';
|
|
613
620
|
const resultData = await LamdaServiceCall( lambdaURL, detectionPayload );
|
|
614
621
|
|
|
622
|
+
const published = publishedAiChecklists.map( ( val ) => val?.checkListType );
|
|
623
|
+
|
|
615
624
|
if ( resultData && resultData.status_code === '200' ) {
|
|
616
|
-
|
|
617
|
-
|
|
625
|
+
published.forEach( ( item ) => {
|
|
626
|
+
flagCards.detectionFlag.count += resultData[item];
|
|
627
|
+
} );
|
|
628
|
+
flagCards.totalFlag = flagCards.detectionFlag.count;
|
|
618
629
|
}
|
|
619
630
|
|
|
620
631
|
return res.sendSuccess( { flagCards } );
|
|
@@ -726,11 +737,21 @@ export const flagComparisonCardsV1 = async ( req, res ) => {
|
|
|
726
737
|
|
|
727
738
|
console.log( dayjs( toDate ).startOf( 'day' ).subtract( 1, 'day' ).format( 'YYYY-MM-DD' ), 'new start of' );
|
|
728
739
|
|
|
740
|
+
const publishedAiChecklists = await checklistconfigService.find( { client_id: requestData.clientId, publish: true, checkListType: { $ne: 'custom' } }, { checkListType: 1 } );
|
|
741
|
+
|
|
742
|
+
if ( !publishedAiChecklists?.length ) {
|
|
743
|
+
return 0;
|
|
744
|
+
}
|
|
745
|
+
|
|
729
746
|
const LamdaURL = 'https://f65azvtljclaxp6l7rnx65cdmm0lcgvp.lambda-url.ap-south-1.on.aws/';
|
|
730
747
|
const resultData = await LamdaServiceCall( LamdaURL, detectionPayload );
|
|
731
748
|
|
|
749
|
+
const published = publishedAiChecklists.map( ( val ) => val?.checkListType );
|
|
750
|
+
|
|
732
751
|
if ( resultData?.status_code === '200' ) {
|
|
733
|
-
|
|
752
|
+
let result = 0;
|
|
753
|
+
published.forEach( ( item ) => result += resultData[item] );
|
|
754
|
+
return result;
|
|
734
755
|
}
|
|
735
756
|
return 0;
|
|
736
757
|
};
|
|
@@ -530,7 +530,7 @@ export const duplicateChecklist = async ( req, res ) => {
|
|
|
530
530
|
|
|
531
531
|
let dupDetails = { ...checkDetails._doc };
|
|
532
532
|
let name = `^${dupDetails.checkListName.split( '(' )[0]}\\(.*\\)$`;
|
|
533
|
-
let checkListNameDetails = await checklistService.find( { checkListName: { $regex: name }, client_id: req.query.clientId, type: 'checklist'
|
|
533
|
+
let checkListNameDetails = await checklistService.find( { checkListName: { $regex: name }, client_id: req.query.clientId, type: 'checklist' } );
|
|
534
534
|
if ( checkListNameDetails.length ) {
|
|
535
535
|
let nameLength = checkListNameDetails.length + 1;
|
|
536
536
|
dupDetails.checkListName = dupDetails.checkListName.split( '(' )[0] + '(' + nameLength +')';
|
|
@@ -976,6 +976,7 @@ export const updateConfigure =async ( req, res ) => {
|
|
|
976
976
|
} ) : [],
|
|
977
977
|
remainder: inputBody?.checkListDetails?.remainder || [],
|
|
978
978
|
owner: inputBody?.checkListDetails?.owner || [],
|
|
979
|
+
restrictAttendance: inputBody?.checkListDetails?.restrictAttendance || false,
|
|
979
980
|
};
|
|
980
981
|
|
|
981
982
|
if ( inputBody?.checkListDetails?.approver.length ) {
|
|
@@ -1850,6 +1851,8 @@ export async function insertSingleProcessData( checklistId, processId = 0, oldDa
|
|
|
1850
1851
|
insertdata.allowedMultiSubmit = getCLconfig.allowedMultiSubmit;
|
|
1851
1852
|
insertdata.approver = getCLconfig?.approver || [];
|
|
1852
1853
|
insertdata.remainder = getCLconfig?.remainder || [];
|
|
1854
|
+
insertdata.restrictAttendance = getCLconfig?.restrictAttendance;
|
|
1855
|
+
|
|
1853
1856
|
let collectSections = [];
|
|
1854
1857
|
let sectionQuery = [];
|
|
1855
1858
|
sectionQuery.push( {
|
|
@@ -2029,6 +2032,7 @@ async function insertPCBulkV3( getCLconfig, checklistId, currentdate, updatedche
|
|
|
2029
2032
|
element4.scheduleRepeatedType = getCLconfig.scheduleRepeatedType;
|
|
2030
2033
|
element4.approvalEnable = getCLconfig.approver.length ? true : false;
|
|
2031
2034
|
element4.remainder = getCLconfig?.remainder || [];
|
|
2035
|
+
element4.restrictAttendance = getCLconfig?.restrictAttendance;
|
|
2032
2036
|
}
|
|
2033
2037
|
if ( userIdList.length ) {
|
|
2034
2038
|
allQuestion = allQuestion.filter( ( item ) => typeof item._id == 'undefined' );
|