tango-app-api-task 3.2.1-beta-4 → 3.2.1-beta-6
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
|
@@ -1268,19 +1268,19 @@ export async function createChecklistTask( req, res ) {
|
|
|
1268
1268
|
userId = userDetails._id;
|
|
1269
1269
|
}
|
|
1270
1270
|
|
|
1271
|
-
let title = `New Task Alert ${inputBody.checkListName}`;
|
|
1272
|
-
let description = '';
|
|
1271
|
+
// let title = `New Task Alert ${inputBody.checkListName}`;
|
|
1272
|
+
// let description = '';
|
|
1273
1273
|
|
|
1274
|
-
if ( inputBody.checkListType === 'checklistTask' ) {
|
|
1275
|
-
|
|
1276
|
-
} else if ( inputBody.checkListType === 'CCTV' ) {
|
|
1277
|
-
|
|
1278
|
-
}
|
|
1274
|
+
// if ( inputBody.checkListType === 'checklistTask' ) {
|
|
1275
|
+
// description = `A new task has been generated from the response for ${inputBody.storeName}.`;
|
|
1276
|
+
// } else if ( inputBody.checkListType === 'CCTV' ) {
|
|
1277
|
+
// description = `A new task has been generated from the Live view for ${inputBody.storeName}.`;
|
|
1278
|
+
// }
|
|
1279
1279
|
|
|
1280
|
-
if ( userDetails.fcmToken ) {
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
}
|
|
1280
|
+
// if ( userDetails.fcmToken ) {
|
|
1281
|
+
// const fcmToken = userDetails.fcmToken;
|
|
1282
|
+
// await sendPushNotification( title, description, fcmToken );
|
|
1283
|
+
// }
|
|
1284
1284
|
|
|
1285
1285
|
let time = inputBody?.scheduleEndTime || '11:59 PM';
|
|
1286
1286
|
let date = inputBody?.scheduleDate || dayjs().format( 'YYYY-MM-DD' );
|
|
@@ -1407,6 +1407,7 @@ export async function createChecklistTask( req, res ) {
|
|
|
1407
1407
|
taskId: String( response?._id ),
|
|
1408
1408
|
taskStatus: true,
|
|
1409
1409
|
task: true,
|
|
1410
|
+
taskDate: dayjs( response.scheduleDate ).format( 'YYYY-MM-DD' ),
|
|
1410
1411
|
},
|
|
1411
1412
|
};
|
|
1412
1413
|
console.log( params );
|
|
@@ -2363,7 +2364,7 @@ export async function createAiTask( req, res ) {
|
|
|
2363
2364
|
if ( answer.length==0 ) {
|
|
2364
2365
|
return res.sendError( 'please enter Valid AnswerType', 500 );
|
|
2365
2366
|
}
|
|
2366
|
-
if ( inputBody?.answerType === 'multiplechoicesingle'||inputBody?.answerType === '
|
|
2367
|
+
if ( inputBody?.answerType === 'multiplechoicesingle'||inputBody?.answerType === 'multiplechoicemultiple' ) {
|
|
2367
2368
|
console.log( inputBody?.options );
|
|
2368
2369
|
if ( inputBody?.options&& inputBody?.options.length>0 ) {
|
|
2369
2370
|
let optionsResult = [];
|
|
@@ -2422,7 +2423,7 @@ export async function createAiTask( req, res ) {
|
|
|
2422
2423
|
'descriptivetype': 'text',
|
|
2423
2424
|
},
|
|
2424
2425
|
];
|
|
2425
|
-
|
|
2426
|
+
console.log( '--=>', req.files.referenceImage.length );
|
|
2426
2427
|
|
|
2427
2428
|
if ( req.files&& req.files.referenceImage&&req.files.referenceImage.length ) {
|
|
2428
2429
|
let images = [];
|
|
@@ -2438,6 +2439,10 @@ export async function createAiTask( req, res ) {
|
|
|
2438
2439
|
}
|
|
2439
2440
|
question[0].questionReferenceImage = images;
|
|
2440
2441
|
}
|
|
2442
|
+
console.log( '----->', answer );
|
|
2443
|
+
if ( inputBody?.answerType === 'image'||inputBody?.answerType === 'descriptiveImage'||inputBody?.answerType === 'multipleImage' ) {
|
|
2444
|
+
answer[0].referenceImage = question[0].questionReferenceImage;
|
|
2445
|
+
}
|
|
2441
2446
|
|
|
2442
2447
|
|
|
2443
2448
|
question = {
|
|
@@ -2745,3 +2750,18 @@ export async function uploadmultiImage( images ) {
|
|
|
2745
2750
|
return e;
|
|
2746
2751
|
}
|
|
2747
2752
|
};
|
|
2753
|
+
|
|
2754
|
+
|
|
2755
|
+
export async function customertrial( params ) {
|
|
2756
|
+
try {
|
|
2757
|
+
let inputData = {
|
|
2758
|
+
Bucket: 'tango-trax-audit',
|
|
2759
|
+
file_path: 'trail/59-147/b1c5b15c0133dec0c45640d923fda221_10_09_59_000_24_01_2025_false.mp4',
|
|
2760
|
+
};
|
|
2761
|
+
let url = await signedUrl( inputData );
|
|
2762
|
+
console.log( url );
|
|
2763
|
+
} catch ( e ) {
|
|
2764
|
+
logger.error( 'uploadImage =>', e );
|
|
2765
|
+
return e;
|
|
2766
|
+
}
|
|
2767
|
+
};
|
|
@@ -27,6 +27,7 @@ taskRouter
|
|
|
27
27
|
.get( '/duplicateTask/:checklistId', isAllowedSessionHandler, isAllowedClient, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoTrax', name: 'Task', permissions: [ 'isEdit' ] } ] } ), taskController.duplicateChecklist )
|
|
28
28
|
.get( '/teamMigrations', taskController.teamMigrations )
|
|
29
29
|
.post( '/createaiChecklist', isAllowedInternalAPIHandler, taskController.createAiChecklist )
|
|
30
|
-
.post( '/createaiTask', isAllowedInternalAPIHandler, taskController.createAiTask )
|
|
30
|
+
.post( '/createaiTask', isAllowedInternalAPIHandler, taskController.createAiTask )
|
|
31
|
+
.get( '/getcoustemer', taskController.customertrial );
|
|
31
32
|
|
|
32
33
|
|