tango-app-api-trax 3.7.13-qid-halfshutter-16 → 3.7.14
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
|
@@ -3781,7 +3781,7 @@ export async function uploadAnswerImage( req, res ) {
|
|
|
3781
3781
|
|
|
3782
3782
|
imageUrl = await fileUpload( params );
|
|
3783
3783
|
if ( imageUrl.errors && imageUrl.errors.length ) {
|
|
3784
|
-
return res.sendError( imageUrl.errors[0].message,
|
|
3784
|
+
return res.sendError( imageUrl.errors[0].message, 400 );
|
|
3785
3785
|
}
|
|
3786
3786
|
|
|
3787
3787
|
if ( imageUrl != '' ) {
|
|
@@ -4393,7 +4393,7 @@ export async function chunkUpload( req, res ) {
|
|
|
4393
4393
|
try {
|
|
4394
4394
|
const { chunkIndex, totalChunks } = req.body;
|
|
4395
4395
|
if ( chunkIndex === undefined || !totalChunks || !req.files || !req.files.answerImage ) {
|
|
4396
|
-
return res.
|
|
4396
|
+
return res.sendError( 'Missing required params or file.', 400 );
|
|
4397
4397
|
}
|
|
4398
4398
|
const chunkNum = Number( chunkIndex );
|
|
4399
4399
|
const chunkTotal = Number( totalChunks );
|
|
@@ -3237,13 +3237,15 @@ export const flagTablesV2 = async ( req, res ) => {
|
|
|
3237
3237
|
getChecklistPerformanceData[index].flaggedStores = findCheckList.flagStoreCount;
|
|
3238
3238
|
}
|
|
3239
3239
|
} else {
|
|
3240
|
-
if (
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3240
|
+
if ( getChecklistPerformanceData[index].checkListType !== 'custom' ) {
|
|
3241
|
+
if ( requestData?.filter == 'all' ) {
|
|
3242
|
+
getChecklistPerformanceData[index].runAIFlag = 0;
|
|
3243
|
+
getChecklistPerformanceData[index].flagCount = resultData?.[getChecklistPerformanceData[index]?.checkListType] || 0;
|
|
3244
|
+
getChecklistPerformanceData[index].flaggedStores = resultData?.[`${getChecklistPerformanceData[index]?.checkListType}_flaggedstores`] || 0;
|
|
3245
|
+
} else {
|
|
3246
|
+
getChecklistPerformanceData[index].flagCount = 0;
|
|
3247
|
+
getChecklistPerformanceData[index].flaggedStores = 0;
|
|
3248
|
+
}
|
|
3247
3249
|
}
|
|
3248
3250
|
}
|
|
3249
3251
|
getChecklistPerformanceData[index].complianceRate = ( 100- ( getChecklistPerformanceData[index].flaggedStores / getChecklistPerformanceData[index].assignedStores ) * 100 );
|