-
+
Awards
-
+
@@ -272,15 +388,23 @@
Follow
-
-
-
-
-
-
-
PhonePe vs GooglePay Critique
-
-
I wonder what the difference between “ Assistant ” and “Pickup and Drop ” are. If they are the same, there are two “call to actions” for the same workflow
-
-
-
PhonePe vs GooglePay Critique
-
-
I wonder what the difference between “ Assistant ” and “Pickup and Drop ” are. If they are the same, there are two “call to actions” for the same workflow
-
-
-
PhonePe vs GooglePay Critique
-
-
I wonder what the difference between “ Assistant ” and “Pickup and Drop ” are. If they are the same, there are two “call to actions” for the same workflow
-
-
-
-
+
+
+
+
+
+
+
PhonePe vs GooglePay Critique
+
+
+ I wonder what the difference between “
+ Assistant ” and “Pickup and Drop ” are. If they are the
+ same, there are two “call to actions” for the same workflow
+
+
+
+
+
+
+
+
@@ -359,7 +477,7 @@
import Vue from "vue";
import router from "../router";
import $ from "jquery";
-import axios from 'axios'
+import axios from "axios";
export default {
name: "Profile",
@@ -368,18 +486,26 @@ export default {
return {
loggedinFlag: false,
usertoken: null,
- userData:{},
+ userData: {},
+ interestName: null,
+ oldId: null,
+ socialLink:null,
+ currentSocialLinkName:null,
};
},
mounted() {
+ this.userData = {};
+ this.socialLink = [];
+ this.userData.interests = [];
+ this.userData.socialMediaProfiles = {};
+ this.userData.socialMediaProfiles.facebook = null;
+ this.userData.socialMediaProfiles.linkedin = null;
var userdata = localStorage.getItem("spotlight_usertoken");
if (userdata) {
userdata = JSON.parse(userdata);
this.usertoken = userdata.token;
this.getProfile();
}
-
-
},
methods: {
goToSignUp() {
@@ -388,78 +514,133 @@ export default {
goToReset() {
this.$router.push("/reset");
},
+ logout() {
+ this.$router.push("/");
+ },
+ addSocialLink(obj){
+ this.socialLink.push()
+
+ },
+ addInterest() {
+ console.log(this.userData.interests.length, "called", this.interestName);
+ if (this.userData.interests.length <= 2) {
+ this.userData.interests.push(this.interestName);
+ this.interestName = null;
+ } else {
+ this.$toaster.info("Only 3 interest are allowed");
+ }
+ },
+ removeInterest(i) {
+ this.userData.interests.splice(i, 1);
+ },
+ assignClass() {
+ var element = document.getElementById(this.userData.bgColor);
+ element.classList.add("active");
+ var cols = document.getElementsByClassName("common_color");
+ for (var i = 0; i < cols.length; i++) {
+ cols[i].style.backgroundColor = this.userData.bgColor;
+ }
+
+ },
+ changeColor(clr) {
+ console.log(this.oldId,"clr",clr);
+ var element = document.getElementById(clr);
+ element.classList.add("active");
+ var removeelement = document.getElementById(this.oldId);
+ removeelement.classList.remove("active");
+ this.oldId = clr;
+ var cols = document.getElementsByClassName("common_color");
+ for (var i = 0; i < cols.length; i++) {
+ cols[i].style.backgroundColor = clr;
+ }
+ this.userData.bgColor = clr;
+
+ },
getProfile() {
axios
- .get("/profile", {
- headers: {
- Authorization: "Bearer " + this.usertoken,
- },
- })
- .then((response) => {
- this.userData = response.data.data;
- console.log(response.data.data);
- })
- .catch((error) => console.log(error));
+ .get("/profile", {
+ headers: {
+ Authorization: "Bearer " + this.usertoken,
+ },
+ })
+ .then((response) => {
+ this.userData = response.data.data;
+ this.oldId = this.userData.bgColor;
+ console.log(this.oldId,"this.userData.",this.userData.bgColor);
+
+ this.assignClass();
+ console.log(response.data.data);
+ })
+ .catch((error) => console.log(error));
},
- saveProfile(){
+ saveProfile() {
var obj = {};
+ this.userData.name =
+ this.userData.firstName + " " + this.userData.lastName;
obj = Object.assign(obj, this.userData);
- delete obj.awards;
- delete obj.createdAt;
- delete obj.email;
- delete obj.role;
- delete obj.verified;
- delete obj.updatedAt;
- delete obj.__v;
- delete obj._id;
- axios
- .put("/profile", obj,{
+ // if(!obj.socialMediaProfiles){
+ // obj.socialMediaProfiles = {};
+ // }
+ delete obj.createdAt;
+ delete obj.email;
+ delete obj.role;
+ delete obj.verified;
+ delete obj.updatedAt;
+ delete obj.__v;
+ delete obj._id;
+ delete obj.karmaPoints;
+ delete obj.awards;
+ delete obj.socialLogin;
+ axios
+ .put("/profile", obj, {
headers: {
Authorization: "Bearer " + this.usertoken,
},
})
.then((response) => {
// this.userData = response.data.data;
+ this.$toaster.success('Profile Updated');
+
console.log(response.data.data);
})
- .catch((error) => console.log(error));
-
+ .catch((error) => {
+ if (error.response) {
+ this.$toaster.error(error.response.data.message);
+ }
+ });
},
addProfileDialog() {
$(".inner-wrp").addClass("body-blur");
- $("#add-social-links").hide();
+ $("#add-social-links").hide();
$(".popup-wrp, #add-profile").show();
},
nextProfileDialog() {
- $("#add-profile").hide();
- $("#add-social-links").show();
+ $("#add-profile").hide();
+ $("#add-social-links").show();
+ this.saveProfile();
+ },
+ closeDialog() {
+ $(".popup-wrp").hide();
+ $(".inner-wrp").removeClass("body-blur");
this.saveProfile();
-
-
},
- closeDialog(){
- $(".popup-wrp").hide();
- $(".inner-wrp").removeClass("body-blur");
- },
-///
- caseDialog(){
- $(".rp-all").removeClass("active");
- $(".c-0").addClass("active");
- $("#all-replies").hide();
- $("#case-study-0").show();
- },
- repliesDialog(){
- $(".c-0").removeClass("active");
- $(".rp-all").addClass("active");
- $("#case-study-0").hide();
- $("#all-replies").show();
- },
-
- userprofileshowDialog(){
- $("#userprofileshow").toggle();
- }
-
+ ///
+ caseDialog() {
+ $(".rp-all").removeClass("active");
+ $(".c-0").addClass("active");
+ $("#all-replies").hide();
+ $("#case-study-0").show();
+ },
+ repliesDialog() {
+ $(".c-0").removeClass("active");
+ $(".rp-all").addClass("active");
+ $("#case-study-0").hide();
+ $("#all-replies").show();
+ },
+ userprofileshowDialog() {
+ $("#userprofileshow").toggle();
+ },
},
};
diff --git a/src/components/Reset.vue b/src/components/Reset.vue
index 86bcf46..d2989a3 100644
--- a/src/components/Reset.vue
+++ b/src/components/Reset.vue
@@ -83,13 +83,12 @@
id="inputEmail"
class="form-control"
placeholder="Your Email ID"
- required
- autofocus
+ v-model="email"
/>
-
+
Reset Password
-
+
Go back to Login /
import Vue from "vue";
import router from "../router";
+import axios from "axios";
export default {
name: "Reset",
data() {
- return {};
+ return {
+ email:null,
+ };
},
mounted() {},
methods: {
@@ -125,6 +127,25 @@ export default {
goToSignUp() {
this.$router.push("/signup");
},
+ forgotPassword(){
+ axios
+ .post("/forgotPassword", {'email':this.email,'forgotPassword':true})
+ .then((response) => {
+ console.log("forgotPassword- response",response)
+
+ this.$toaster.success(response.data.message)
+ if(response.data.status == 'success'){
+ localStorage.setItem('spotlight_email', this.email);
+ this.$router.push("/changepassword");
+ }
+ })
+ .catch( (error) =>{
+ if (error.response) {
+ this.$toaster.error(error.response.data.message)
+ }
+ });
+
+ }
},
};
diff --git a/src/components/SignUp.vue b/src/components/SignUp.vue
index 8110cdc..4b0f5ca 100644
--- a/src/components/SignUp.vue
+++ b/src/components/SignUp.vue
@@ -1,16 +1,24 @@
-
-
-
+
-
-
+
+
-
+
-
+
+
-
-
-
-
-
-
-
Welcome to
- Productgrowth
+
+
@@ -83,23 +128,39 @@
diff --git a/src/main.js b/src/main.js
index 6f73ab6..cd67cc2 100644
--- a/src/main.js
+++ b/src/main.js
@@ -12,7 +12,13 @@ import { domain, clientId } from "../auth_config.json"
import { Auth0Plugin } from "./auth"
import Vuelidate from 'vuelidate'
import moment from 'moment'
-
+import Toaster from 'v-toaster'
+
+// You need a specific loader for CSS files like https://github.com/webpack/css-loader
+import 'v-toaster/dist/v-toaster.css'
+
+// optional set default imeout, the default is 10000 (10 seconds).
+Vue.use(Toaster, {timeout: 5000})
Vue.use(Vuelidate)
// Install the authentication plugin here
Vue.use(Auth0Plugin, {
diff --git a/src/router/index.js b/src/router/index.js
index 45c91bf..d38b894 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -31,7 +31,8 @@ import TwoScreensWithTwoAuthor from '@/components/TwoScreensWithTwoAuthor'
import NoScreenshotTwoAuthor from '@/components/NoScreenshotTwoAuthor'
import ToAddYourComment from '@/components/ToAddYourComment'
import ReadingFlowBounceBoard from '@/components/ReadingFlowBounceBoard'
-
+import Otp from '@/components/Otp'
+import ChangePassword from '@/components/ChangePassword'
import router from '../router'
Vue.use(Router)
@@ -190,6 +191,16 @@ export default new Router({
path: '/reading-flow-bounce-board',
name: 'ReadingFlowBounceBoard',
component: ReadingFlowBounceBoard,
+ },
+ {
+ path: '/otp/:flag',
+ name: 'Otp',
+ component: Otp,
+ },
+ {
+ path: '/changepassword',
+ name: 'ChangePassword',
+ component: ChangePassword,
}