removeing unnecessary comment
This commit is contained in:
@@ -732,12 +732,10 @@ async function nextQuestion(goBack, goBackFromResponse, fromDependedOn) {
|
||||
$("#page5 .container .row .createdByDiv").append(`
|
||||
Created By ${tempName}
|
||||
`);
|
||||
} //displaying user name on top ends here
|
||||
}
|
||||
|
||||
// first getting the first quiz
|
||||
totalQuizQuestions = allItems[currentQuizIndex].questions;
|
||||
|
||||
// checking if there is any resp onse in question or answer
|
||||
if (currentQuestionCounter != 0) {
|
||||
apiQues = totalQuizQuestions.find((ques) => ques.id == lastShowedQuestionId);
|
||||
let lastAnswerObject = dataToReturn.find(function (ansObj) {
|
||||
@@ -748,39 +746,8 @@ async function nextQuestion(goBack, goBackFromResponse, fromDependedOn) {
|
||||
var fullAnswerObject = apiQues.answers.find(function (cAns) {
|
||||
return cAns.answer == lastAnswerObject.answer;
|
||||
});
|
||||
// quesResponse = apiQues.response;
|
||||
|
||||
//when there is response with the question
|
||||
if (apiQues.id == 14) {
|
||||
//save progress if there is answer
|
||||
if (lastAnswerObject.answer) {
|
||||
//ajax save contact
|
||||
// const email = lastAnswerObject.answer;
|
||||
// let fullName = localStorage.getItem("name");
|
||||
// let firstName, lastName;
|
||||
// if (fullName && fullName !== "You") firstName = fullName.split(" ")[0];
|
||||
// if (fullName && fullName !== "You" && fullName.split(" ").length > 1) lastName = fullName.split(" ")[fullName.split(" ").length - 1];
|
||||
// try {
|
||||
// const newProfile = await fetch(url_preset + "/klaviyo/identity", {
|
||||
// method: "POST",
|
||||
// headers: {
|
||||
// "content-type": "application/json",
|
||||
// },
|
||||
// body: JSON.stringify({ email, firstName, lastName }),
|
||||
// }).then((res) => res.json());
|
||||
// const addedToList = await fetch(url_preset + "/klaviyo/list", {
|
||||
// method: "POST",
|
||||
// headers: {
|
||||
// "content-type": "application/json",
|
||||
// },
|
||||
// body: JSON.stringify({ email }),
|
||||
// }).then((res) => res.json());
|
||||
// console.log(newProfile);
|
||||
// console.log(addedToList);
|
||||
// } catch (error) {
|
||||
// console.error(error);
|
||||
// }
|
||||
}
|
||||
}
|
||||
if (apiQues.id == 20 && apiQues.type == 7) {
|
||||
if (Array.isArray(lastAnswerObject.answer)) {
|
||||
@@ -809,9 +776,6 @@ async function nextQuestion(goBack, goBackFromResponse, fromDependedOn) {
|
||||
$("#page4 .customImgRow .imgRowInner p").append(`${responseHeader}`);
|
||||
responseOnGoing = true;
|
||||
hasNoResponse = false;
|
||||
// closeResponseTimeout = setTimeout(async () => {
|
||||
// closeResponse();
|
||||
// }, closeResponseTimeoutCounter);
|
||||
}
|
||||
} else if (apiQues.answers && apiQues.answers[0].responseBody) {
|
||||
$("#page3").css("display", "none");
|
||||
@@ -1001,7 +965,6 @@ async function askQuestion(totalQuizQuestions, counter, fromBack) {
|
||||
});
|
||||
}
|
||||
// displaying note if it exists
|
||||
|
||||
if (note) {
|
||||
$("#noteRow").css("display", "flex");
|
||||
$("#noteRow .noteDesc p").html(note);
|
||||
|
||||
Reference in New Issue
Block a user