tango-app-api-task 3.7.18 → 3.7.19
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
|
@@ -5039,7 +5039,7 @@ export async function taskcreation( req, res ) {
|
|
|
5039
5039
|
inputBody.taskDescription = '';
|
|
5040
5040
|
let userId;
|
|
5041
5041
|
let storeDetails;
|
|
5042
|
-
if ( inputBody?.
|
|
5042
|
+
if ( inputBody?.storeName ) {
|
|
5043
5043
|
storeDetails = await storeService.findOne( { storeName: inputBody.storeName, clientId: inputBody.clientId, status: 'active' }, { storeId: 1, storeName: 1, storeProfile: 1 } );
|
|
5044
5044
|
if ( !storeDetails ) {
|
|
5045
5045
|
return res.sendError( 'Store Not Found', 500 );
|
|
@@ -5090,7 +5090,7 @@ export async function taskcreation( req, res ) {
|
|
|
5090
5090
|
return res.sendError( 'Maximum 3 referenceImage only allowed', 500 );
|
|
5091
5091
|
}
|
|
5092
5092
|
let taskName;
|
|
5093
|
-
if ( inputBody
|
|
5093
|
+
if ( inputBody?.storeName ) {
|
|
5094
5094
|
taskName = `${inputBody.taskName}(${storeDetails.storeName}-${dayjs().format( 'YYYY-MM-DD' )})`;
|
|
5095
5095
|
} else {
|
|
5096
5096
|
taskName = `${inputBody.taskName}(-${dayjs().format( 'YYYY-MM-DD' )})`;
|
|
@@ -5112,7 +5112,7 @@ export async function taskcreation( req, res ) {
|
|
|
5112
5112
|
publishDate: new Date(),
|
|
5113
5113
|
locationCount: 1,
|
|
5114
5114
|
...( inputBody?.checkListId ) ? { referenceCheckListId: inputBody?.checkListId } : {},
|
|
5115
|
-
coverage: inputBody
|
|
5115
|
+
coverage: inputBody?.storeName ? 'store' : 'user',
|
|
5116
5116
|
};
|
|
5117
5117
|
let clientDetails = await clientService.findOne( { clientId: inputBody?.clientId }, { traxVideoUploadTimeLimit: 1 } );
|
|
5118
5118
|
data['videoUploadTimeLimit'] = clientDetails?.traxVideoUploadTimeLimit || 0;
|
|
@@ -5231,7 +5231,7 @@ export async function taskcreation( req, res ) {
|
|
|
5231
5231
|
assignId: storeDetails?._id,
|
|
5232
5232
|
country: storeDetails?.storeProfile?.country,
|
|
5233
5233
|
state: storeDetails?.storeProfile?.state,
|
|
5234
|
-
coverage: inputBody
|
|
5234
|
+
coverage: inputBody?.storeName ? 'store' : 'user',
|
|
5235
5235
|
};
|
|
5236
5236
|
await taskAssignService.create( userDetails );
|
|
5237
5237
|
await insertSingleProcessData( response?._id );
|