Display survey responses

This commit is contained in:
2019-01-14 21:19:06 +01:00
parent 4a24d5249c
commit 0e3aee13bd
3 changed files with 51 additions and 1 deletions

View File

@ -0,0 +1,28 @@
/**
* Surveys category
*
* @author Pierre HUBERT
*/
/**
* Apply all survey responses
*/
function ApplySurveyResponses(){
let target = document.querySelector("#all-survey-responses tbody");
data.survey_responses.forEach(response => {
createElem2({
appendTo: target,
type: "tr",
innerHTML:
"<td>"+response.id+"</td>" +
"<td>"+response.surveyID+"</td>" +
"<td>"+response.choiceID+"</td>" +
"<td>"+timeToStr(response.time_sent)+"</td>"
})
});
}

View File

@ -78,6 +78,7 @@ xhr.onload = function(){
ApplyPosts();
ApplyCommentsList();
ApplyUserLikes();
ApplySurveyResponses();
}
xhr.send(null);