FIX_PROPOSAL_ADD_MORE_THAN_10
This commit is contained in:
parent
96ac988a7b
commit
c74c9e864e
@ -1783,16 +1783,19 @@
|
|||||||
// // console.log("Subheader th: subHeaderThList",subHeaderThList);
|
// // console.log("Subheader th: subHeaderThList",subHeaderThList);
|
||||||
// let validSubHeaders = subHeaderThList.filter(th => th.hasAttribute("data-proposal"));
|
// let validSubHeaders = subHeaderThList.filter(th => th.hasAttribute("data-proposal"));
|
||||||
// // console.log("Subheader th: validSubHeaders",validSubHeaders);
|
// // console.log("Subheader th: validSubHeaders",validSubHeaders);
|
||||||
let subHeaderTh = validSubHeaders.find(th => th.textContent.trim() === codeValue) || null;
|
|
||||||
// // console.log("Subheader th: subHeaderTh",subHeaderTh);
|
// // console.log("Subheader th: subHeaderTh",subHeaderTh);
|
||||||
// if (subHeaderTh.classList.contains("insurer_proposal")) {
|
// if (subHeaderTh.classList.contains("insurer_proposal")) {
|
||||||
// alert(subHeaderTh);
|
// alert(subHeaderTh);
|
||||||
// }
|
// }
|
||||||
|
// console.log("Subheader th: ",subHeaderTh);
|
||||||
|
|
||||||
|
let subHeaderTh = validSubHeaders.find(th => th.textContent.trim());
|
||||||
|
|
||||||
let subHeaderText = subHeaderTh ? subHeaderTh.textContent.trim() : '';
|
let subHeaderText = subHeaderTh ? subHeaderTh.textContent.trim() : '';
|
||||||
// // console.log("Subheader th: ",subHeaderText);
|
|
||||||
// Check if subheader is NOT "Quote asked"
|
// Check if subheader is NOT "Quote asked"
|
||||||
let className = subHeaderText !== "Quote asked" && subHeaderText != "-" ? "insurer_proposal" : "";
|
let className = !subHeaderText.startsWith("Quote asked") && subHeaderText != "-" ?
|
||||||
// alert(subHeaderText);
|
"insurer_proposal" : ""; // alert(subHeaderText);
|
||||||
let defaultJsonString = typeof default_answers_array == "object" ? JSON.stringify(default_answers_array[0]) : String(default_answers_array);
|
let defaultJsonString = typeof default_answers_array == "object" ? JSON.stringify(default_answers_array[0]) : String(default_answers_array);
|
||||||
|
|
||||||
// // // console.log("defaultJsonString", defaultJsonString);
|
// // // console.log("defaultJsonString", defaultJsonString);
|
||||||
@ -2900,8 +2903,8 @@
|
|||||||
proposalCountForTableINcrease * 150;
|
proposalCountForTableINcrease * 150;
|
||||||
|
|
||||||
|
|
||||||
// console.log("Quotes COnfig : ",quotesConfig);
|
console.log("Quotes COnfig : ",quotesConfig);
|
||||||
// console.log("policy COnfig :", policyConfig);
|
console.log("policy COnfig :", policyConfig);
|
||||||
// // // console.log("trying to find checkbox data : : : ", increaseBy);
|
// // // console.log("trying to find checkbox data : : : ", increaseBy);
|
||||||
|
|
||||||
|
|
||||||
@ -3092,6 +3095,7 @@
|
|||||||
// Parent header
|
// Parent header
|
||||||
const th1 = document.createElement('th');
|
const th1 = document.createElement('th');
|
||||||
th1.textContent = header.parentHeader;
|
th1.textContent = header.parentHeader;
|
||||||
|
// console.log("parent header : ",header.parentHeader);
|
||||||
if (header.parentHeader.startsWith('Proposal') || header.parentHeader.startsWith("Existing")) {
|
if (header.parentHeader.startsWith('Proposal') || header.parentHeader.startsWith("Existing")) {
|
||||||
if (lead_type == 1){
|
if (lead_type == 1){
|
||||||
headerName = header.parentHeader;
|
headerName = header.parentHeader;
|
||||||
@ -3108,9 +3112,15 @@
|
|||||||
// alert(headerName);
|
// alert(headerName);
|
||||||
if (lead_type == 1){
|
if (lead_type == 1){
|
||||||
// console.log("Header Name lead type 1 : ",header.parentHeader);
|
// console.log("Header Name lead type 1 : ",header.parentHeader);
|
||||||
|
matchedKey = Object.keys(overallColumnDataProposal).find(key => headerName == key);
|
||||||
|
|
||||||
|
if (!matchedKey){
|
||||||
|
console.log("inside else");
|
||||||
matchedKey = Object.keys(overallColumnDataProposal).find(key => headerName.startsWith(key));
|
matchedKey = Object.keys(overallColumnDataProposal).find(key => headerName.startsWith(key));
|
||||||
|
}
|
||||||
|
// matchedKey = Object.keys(overallColumnDataProposal).find(key => headerName.startsWith(key));
|
||||||
proposalHTMLNumber = header.parentHeader.split(' ')[1];
|
proposalHTMLNumber = header.parentHeader.split(' ')[1];
|
||||||
|
// console.log('proposalHTMLNumber',proposalHTMLNumber)
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
// console.log("Header Name lead type not 1 : ",header.parentHeader);
|
// console.log("Header Name lead type not 1 : ",header.parentHeader);
|
||||||
@ -3119,7 +3129,13 @@
|
|||||||
// console.log("Header Name lead type not 1 proposal: ",header.parentHeader);
|
// console.log("Header Name lead type not 1 proposal: ",header.parentHeader);
|
||||||
|
|
||||||
var tempHeader = header.parentHeader;
|
var tempHeader = header.parentHeader;
|
||||||
|
matchedKey = Object.keys(overallColumnDataProposal).find(key => tempHeader == key);
|
||||||
|
|
||||||
|
if (!matchedKey){
|
||||||
|
console.log("inside else");
|
||||||
matchedKey = Object.keys(overallColumnDataProposal).find(key => tempHeader.startsWith(key));
|
matchedKey = Object.keys(overallColumnDataProposal).find(key => tempHeader.startsWith(key));
|
||||||
|
}
|
||||||
|
// matchedKey = Object.keys(overallColumnDataProposal).find(key => tempHeader.startsWith(key));
|
||||||
proposalHTMLNumber = 0;
|
proposalHTMLNumber = 0;
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
@ -3130,9 +3146,15 @@
|
|||||||
var tempHeader2 = lead_type == 2 ?"Existing Renewal 0":"Existing Roll Over 0";
|
var tempHeader2 = lead_type == 2 ?"Existing Renewal 0":"Existing Roll Over 0";
|
||||||
matchedKey = Object.keys(overallColumnDataProposal).find(key => tempHeader2.startsWith(key));
|
matchedKey = Object.keys(overallColumnDataProposal).find(key => tempHeader2.startsWith(key));
|
||||||
proposalHTMLNumber = 0;
|
proposalHTMLNumber = 0;
|
||||||
// alert(tempHeader2);
|
|
||||||
}else if (header.parentHeader.startsWith("Proposal")){
|
}else if (header.parentHeader.startsWith("Proposal")){
|
||||||
|
|
||||||
|
matchedKey = Object.keys(overallColumnDataProposal).find(key => headerName == key);
|
||||||
|
|
||||||
|
if (!matchedKey){
|
||||||
|
console.log("inside else");
|
||||||
matchedKey = Object.keys(overallColumnDataProposal).find(key => headerName.startsWith(key));
|
matchedKey = Object.keys(overallColumnDataProposal).find(key => headerName.startsWith(key));
|
||||||
|
}
|
||||||
proposalHTMLNumber = header.parentHeader.split(' ')[1];
|
proposalHTMLNumber = header.parentHeader.split(' ')[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3143,6 +3165,7 @@
|
|||||||
|
|
||||||
|
|
||||||
if (matchedKey) {
|
if (matchedKey) {
|
||||||
|
console.log(matchedKey);
|
||||||
// // console.log("something wrong : ", overallColumnDataProposal[matchedKey]);
|
// // console.log("something wrong : ", overallColumnDataProposal[matchedKey]);
|
||||||
var headerCheckBoxProperties = overallColumnDataProposal[matchedKey];
|
var headerCheckBoxProperties = overallColumnDataProposal[matchedKey];
|
||||||
// // console.log("something wrong :headerCheckBoxProperties ", headerCheckBoxProperties);
|
// // console.log("something wrong :headerCheckBoxProperties ", headerCheckBoxProperties);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user