Commit 09892a73fd0a242c71ce277b4405b9147d54d8a1

Authored by Digvijay Singh
1 parent df91162127
Exists in master

issue on profile open

Showing 1 changed file with 12 additions and 13 deletions   Show diff stats
src/components/Profile.vue
... ... @@ -376,8 +376,8 @@
376 376 <a
377 377 href="javascript:void(0);"
378 378 v-if="
379   - userData.designation.length == 0 &&
380   - userData.organisation.length == 0
  379 + !userData.designation&&
  380 + ! userData.organisation
381 381 "
382 382 @click="addProfileDialog"
383 383 >Add your work</a
... ... @@ -385,22 +385,22 @@
385 385 <a
386 386 class="no-cursor no-underline"
387 387 href="javascript:void(0);"
388   - v-if="userData.designation.length != 0"
  388 + v-if="userData.designation"
389 389 >{{ userData.designation }}</a
390 390 >
391 391 <a
392 392 class="no-cursor no-underline"
393 393 href="javascript:void(0);"
394 394 v-if="
395   - userData.designation.length != 0 &&
396   - userData.organisation.length != 0
  395 + userData.designation &&
  396 + userData.organisation
397 397 "
398 398 >at</a
399 399 >
400 400 <a
401 401 class="no-cursor no-underline"
402 402 href="javascript:void(0);"
403   - v-if="userData.organisation.length != 0"
  403 + v-if="userData.organisation"
404 404 >{{ userData.organisation }}</a
405 405 >
406 406 <img src="../assets/images/u-info-icon.png" /> <span></span>
... ... @@ -423,7 +423,7 @@
423 423 </div>
424 424 <!-- user profile -->
425 425 <div class="col-sm-4 col-md-12 col-lg-4 col-xl-4">
426   - <div class="list-style-group" v-if="userData.awards">
  426 + <div class="list-style-group" v-if="userData.awards.views">
427 427 <p>Awards</p>
428 428 <ul class="list-style">
429 429 <li>
... ... @@ -753,15 +753,11 @@ export default {
753 753 if (!response.data.data.socialMediaProfiles) {
754 754 this.userData.socialMediaProfiles = {};
755 755 }
756   - this.userData = Object.assign(this.userData, response.data.data);
  756 + this.userData = response.data.data;
757 757  
758 758 // this.userData = response.data.data;
759 759 this.oldId = this.userData.bgColor;
760 760 console.log(this.oldId, "this.userData.", this.userData);
761   - this.showDesignation =
762   - this.userData.designation.length == 0 ? true : false;
763   - this.showCompany =
764   - this.userData.organisation.length == 0 ? true : false;
765 761 console.log("this.userData.firstLogin ",this.userData.firstLogin )
766 762 if (this.userData.firstLogin == true) {
767 763 this.addProfileDialog();
... ... @@ -800,7 +796,7 @@ export default {
800 796 openStudy(payload) {
801 797 console.log("payload-", payload);
802 798 payload.intro.date = payload.createdAt;
803   - payload.intro.focusPoint = payload.createdAt;
  799 + payload.intro.focusPoint = payload.focusAreas;
804 800 axios
805 801 .get("/caseStudy/slides?caseStudyId=" + payload._id, {
806 802 headers: {
... ... @@ -808,6 +804,7 @@ export default {
808 804 },
809 805 })
810 806 .then((response) => {
  807 +
811 808 this.createSlide(payload, response.data.data);
812 809 })
813 810 .catch((error) => console.log(error));
... ... @@ -858,6 +855,7 @@ export default {
858 855 });
859 856  
860 857 console.log(finalSlides);
  858 + console.log("payload",payload)
861 859 localStorage.setItem(
862 860 "spotlight_slide" + payload._id,
863 861 JSON.stringify(finalSlides)
... ... @@ -927,6 +925,7 @@ export default {
927 925 delete obj.karmaPoints;
928 926 delete obj.awards;
929 927 delete obj.socialLogin;
  928 + delete obj.phoneNo;
930 929 axios
931 930 .put("/profile", obj, {
932 931 headers: {
... ...