Skip to content
Snippets Groups Projects

Feature/email counter

Merged Maxime requested to merge feature/email-counter into risefor_main/master
2 files
+ 58
30
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -149,14 +149,16 @@ document.addEventListener('DOMContentLoaded', (e) => {
@params solid-display
*****/
function emailSentCounter(actionDisplay){
console.log("action display counter");
let numberOfParticipants = document.querySelector("#numberOfParticipants").innerHTML;
numberOfParticipants = parseInt(numberOfParticipants);
let totalParticipants = 10;
//Adapt total number when participants reached
if (numberOfParticipants >= totalParticipants) {
totalParticipants = Math.ceil(numberOfParticipants /100.0)*100 ;
//if we're at 100%, update total to next goal
if ((numberOfParticipants/totalParticipants)==1){
totalParticipants = totalParticipants +1;
}
totalParticipants = Math.ceil(numberOfParticipants /100.0)*100;
actionDisplay.querySelector("#totalParticipants").innerText = totalParticipants;
}
else{
Loading