tango-app-api-task 3.4.1-activitylog-1 → 3.4.1-activitylog-3
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
|
@@ -1107,7 +1107,7 @@ export async function taskConfig( req, res ) {
|
|
|
1107
1107
|
delete configDetails?.[item];
|
|
1108
1108
|
} );
|
|
1109
1109
|
let differences = findObjectDifference( configDetails, checklistDetails );
|
|
1110
|
-
if ( Object.keys( differences ).length || inputBody
|
|
1110
|
+
if ( Object.keys( differences ).length || inputBody?.added?.length || req.body.removed?.user?.length || req.body.removed?.store?.length ) {
|
|
1111
1111
|
let showSchedule = false;
|
|
1112
1112
|
let scheduleKeys = [ 'scheduleDate', 'priorityType', 'scheduleEndTime' ];
|
|
1113
1113
|
|
|
@@ -1182,7 +1182,7 @@ export async function taskConfig( req, res ) {
|
|
|
1182
1182
|
return res.sendSuccess( { id: inputBody._id, message: message } );
|
|
1183
1183
|
}
|
|
1184
1184
|
} catch ( e ) {
|
|
1185
|
-
|
|
1185
|
+
console.log( 'e', e );
|
|
1186
1186
|
logger.error( { functionName: 'taskConfig =>', error: e, message: req.body } );
|
|
1187
1187
|
return res.sendError( e, 500 );
|
|
1188
1188
|
}
|
|
@@ -1907,15 +1907,26 @@ export async function createChecklistTask( req, res ) {
|
|
|
1907
1907
|
}
|
|
1908
1908
|
|
|
1909
1909
|
if ( response?._id ) {
|
|
1910
|
+
inputBody.question[0].answers.forEach( ( ans ) => {
|
|
1911
|
+
ans.validation = false;
|
|
1912
|
+
ans.showLinked = false;
|
|
1913
|
+
ans.linkedQuestion = 0;
|
|
1914
|
+
ans.validationType = '';
|
|
1915
|
+
if ( ![ 'image', 'descriptiveImage', 'multipleImage' ].includes( inputBody.question[0].answerType ) ) {
|
|
1916
|
+
ans.referenceImage = '';
|
|
1917
|
+
}
|
|
1918
|
+
} );
|
|
1910
1919
|
if ( inputBody.question[0].questionReferenceImage.length ) {
|
|
1911
1920
|
let images = [];
|
|
1912
1921
|
inputBody.question[0].questionReferenceImage.forEach( ( ele ) => {
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
url.
|
|
1922
|
+
if ( ele.trim() ) {
|
|
1923
|
+
let imgUrl = decodeURIComponent( ele.split( '?' )[0] );
|
|
1924
|
+
let url = imgUrl.split( '/' );
|
|
1925
|
+
if ( url.includes( 'https:' ) || url.includes( 'http:' ) ) {
|
|
1926
|
+
url.splice( 0, 3 );
|
|
1927
|
+
}
|
|
1928
|
+
images.push( url.join( '/' ) );
|
|
1917
1929
|
}
|
|
1918
|
-
images.push( url.join( '/' ) );
|
|
1919
1930
|
} );
|
|
1920
1931
|
inputBody.question[0].questionReferenceImage = images;
|
|
1921
1932
|
}
|
|
@@ -750,6 +750,7 @@ export const taskDropdownListV1 = async ( req, res ) => {
|
|
|
750
750
|
let findAndQuery = [];
|
|
751
751
|
findAndQuery.push(
|
|
752
752
|
{ client_id: requestData.clientId },
|
|
753
|
+
{ $and: [ { checkListName: { $ne: '' } }, { checkListName: { $ne: null } } ] },
|
|
753
754
|
// { checkListType: 'task' },
|
|
754
755
|
// { isdeleted: false },
|
|
755
756
|
);
|