You are on page 1of 2

if(allSheets[i][key].

v == "Response"){
console.log( key.charAt(0));
charact = key.charAt(0);
num = key.slice(1,key.length);
for(let x = 0; x<12; x++){
num++;
var str = charact+num;
console.log(str)
if(allSheets[i].hasOwnProperty(str) && allSheets[i]
[str].v != ""){
stat1 = "Approved";
console.log("Stat: "+ stat1);
break;
}else{
console.log("REJECT THIS")
}

stat1 = "Reject";

// console.log("Reject Na to");
}

if(stat1 == "Approved"){
console.log("Cayle");
Object.keys(allSheets[i]).forEach(function(key, value) {
if(allSheets[i][key].v == "Response"){
console.log( key.charAt(0));
charact = key.charAt(0);
num = key.slice(1,key.length);
for(let x = 0; x<12; x++){
num++;
z++;
var str = charact+num;
console.log(str)
if(allSheets[i].hasOwnProperty(str) && allSheets[i]
[str].v != ""){
stat2 = "Approved";
console.log("Stat: "+ stat1);
break;
}else{
console.log("REJECT THIS")
}

}
return forStat(); // console.log("Reject Na
to");
}
});
function forStat(){
if(z == 12){
stat2 = "Reject";
}else{
console.log("hey");
return "Approved";
stat2 = "Approved";
}
}
}else{
return "Reject";
}

You might also like