mirror of
https://github.com/pierre42100/ComunicWeb
synced 2025-06-21 21:35:16 +00:00
Display survey responses
This commit is contained in:
@ -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>"
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
}
|
@ -78,6 +78,7 @@ xhr.onload = function(){
|
||||
ApplyPosts();
|
||||
ApplyCommentsList();
|
||||
ApplyUserLikes();
|
||||
ApplySurveyResponses();
|
||||
}
|
||||
|
||||
xhr.send(null);
|
Reference in New Issue
Block a user