tango-app-ui-analyse-trax 3.9.75 → 3.9.76

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.
@@ -11776,7 +11776,7 @@ class AddTaskComponent {
11776
11776
  "runAIDescription": "",
11777
11777
  "allowUploadfromGallery": response[0].questions[0].allowUploadfromGallery,
11778
11778
  "linkType": false,
11779
- "questionReferenceImage": [...this.uploadedFiles, ...response[0].questions[0].questionReferenceImage],
11779
+ "questionReferenceImage": !['image', 'descriptiveImage', 'multipleImage'].includes(response[0].questions[0].answerType) ? [...this.uploadedFiles, ...response[0].questions[0].questionReferenceImage] : [],
11780
11780
  "descriptivetype": response[0].questions[0].descriptivetype,
11781
11781
  "answers": response[0].questions[0].answers,
11782
11782
  "allowMultiple": response[0].questions[0].allowMultiple
@@ -11790,15 +11790,15 @@ class AddTaskComponent {
11790
11790
  "clientId": this.storeProfile?.client_id,
11791
11791
  "checkListType": "checklistTask" // ['checklistTask','cctv]
11792
11792
  };
11793
- // if(response[0].questions[0].answerType==='image'||response[0].questions[0].answerType==='descriptiveImage'||response[0].questions[0].answerType==='multipleImage'){
11794
- // if(this.uploadedFiles&&this.uploadedFiles.length>0){
11795
- // payload.question.forEach((data:any)=>{
11796
- // data?.answers.forEach((ans: any) => {
11797
- // ans.referenceImage = this.uploadedFiles
11798
- // });
11799
- // })
11800
- // }
11801
- // }
11793
+ if (['image', 'descriptiveImage', 'multipleImage'].includes(response[0].questions[0].answerType)) {
11794
+ if (this.uploadedFiles && this.uploadedFiles.length > 0) {
11795
+ payload.question.forEach((data) => {
11796
+ data?.answers.forEach((ans) => {
11797
+ ans.referenceImage = this.uploadedFiles;
11798
+ });
11799
+ });
11800
+ }
11801
+ }
11802
11802
  this.traxService.CreatechecklistTask(payload).pipe(takeUntil(this.destroy$)).subscribe({
11803
11803
  next: (res) => {
11804
11804
  if (res.code === 200) {