Realy add UCQ and int input
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
12f956f8d6
commit
b2954ccb4c
4 changed files with 13 additions and 5 deletions
|
@ -528,8 +528,10 @@ angular.module("AtsebaytApp")
|
|||
if (!questions[idxquestions[response.id_question]].response) {
|
||||
if (response.value) {
|
||||
questions[idxquestions[response.id_question]].response = response;
|
||||
if (questions[idxquestions[response.id_question]].kind == "text") {
|
||||
if (questions[idxquestions[response.id_question]].kind == "text" || questions[idxquestions[response.id_question]].kind == "ucq") {
|
||||
questions[idxquestions[response.id_question]].value = response.value;
|
||||
} else if (questions[idxquestions[response.id_question]].kind == "int") {
|
||||
questions[idxquestions[response.id_question]].value = parseInt(response.value);
|
||||
} else {
|
||||
response.value.split(",").forEach(function (val) {
|
||||
questions[idxquestions[response.id_question]]["p" + val] = true;
|
||||
|
@ -547,6 +549,10 @@ angular.module("AtsebaytApp")
|
|||
$scope.questions.forEach(function(q) {
|
||||
if (q.kind == "text")
|
||||
res.push({"id_question": q.id, "value": q.value})
|
||||
else if (q.kind == "int")
|
||||
res.push({"id_question": q.id, "value": "" + q.value})
|
||||
else if (q.kind == "ucq")
|
||||
res.push({"id_question": q.id, "value": q.value})
|
||||
else {
|
||||
var values = [];
|
||||
Object.keys(q).forEach(function (k) {
|
||||
|
|
Reference in a new issue