tango-app-api-task 3.4.1-activitylog-2 → 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-app-api-task",
3
- "version": "3.4.1-activitylog-2",
3
+ "version": "3.4.1-activitylog-3",
4
4
  "description": "Task",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -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
- let imgUrl = decodeURIComponent( ele.split( '?' )[0] );
1914
- let url = imgUrl.split( '/' );
1915
- if ( url.includes( 'https:' ) || url.includes( 'http:' ) ) {
1916
- url.splice( 0, 3 );
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
  );