Commit 51ce61cc2058d441d821a00e6262927dd18c8044

Authored by Digvijay Singh
1 parent 0e3c6b8283
Exists in admin

insight issue

Showing 1 changed file with 12 additions and 1 deletions   Show diff stats
src/components/Profile.vue
... ... @@ -864,6 +864,7 @@ export default {
864 864 })
865 865 .then((response) => {
866 866 var finalArray = [];
  867 + console.log("1");
867 868 response.data.data.forEach((template_) => {
868 869 console.log("template_", template_);
869 870 var keys = [];
... ... @@ -881,6 +882,8 @@ export default {
881 882 comments: [],
882 883 },
883 884 };
  885 + console.log("2");
  886 +
884 887 if (this.templateList[i].bounceBoard) {
885 888 obj.commentBox = this.templateList[i].commentBox;
886 889 obj.metaData.comments = template_.comments;
... ... @@ -889,6 +892,8 @@ export default {
889 892 obj.insightId = template_.insightId;
890 893 }
891 894 var fieldArray = [];
  895 + console.log("3");
  896 +
892 897 this.templateList[i].metaData.fields.forEach((element) => {
893 898 var fieldobj = {
894 899 fieldName: element.fieldName,
... ... @@ -898,9 +903,15 @@ export default {
898 903 };
899 904 obj.metaData.fields.push(fieldobj);
900 905 });
  906 + console.log("4");
  907 +
901 908 finalArray.push(obj);
902   - this.insightId = template_.insight._id;
  909 + if(template_.insight){
  910 + this.insightId = template_.insight._id;
  911 + }
903 912 });
  913 + console.log("5");
  914 +
904 915 this.caseStudy.slides = finalArray;
905 916 console.log("----", finalArray);
906 917 console.log(this.templateList, "getSLideData==>");
... ...