Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 476 | Rev 478 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 476 Rev 477
Línea 49... Línea 49...
49
    const formCompleted = () => {
49
    const formCompleted = () => {
50
        let completed = true;
50
        let completed = true;
51
        test.content.map((section) => {
51
        test.content.map((section) => {
52
            section.questions.map((question) => {
52
            section.questions.map((question) => {
53
                //Validate if the answer is empty
53
                //Validate if the answer is empty
54
                if (question.answer || question.answer.length == 0) {
54
                if (!question.answer || question.answer.length == 0) {
55
                    completed = false;
55
                    completed = false;
56
                }
56
                }
57
            });
57
            });
58
        })
58
        })
59
        return completed;
59
        return completed;
Línea 67... Línea 67...
67
     const leastOneAnswer = () => {
67
     const leastOneAnswer = () => {
68
        let answer = false;
68
        let answer = false;
69
        test.content.map((section) => {
69
        test.content.map((section) => {
70
            section.questions.map((question) => {
70
            section.questions.map((question) => {
71
                //Validate if the answer is not empty
71
                //Validate if the answer is not empty
72
                if (question.answer) {
72
                if (question.answer && question.answer.length == 0) {
73
                    answer = true;
73
                    answer = true;
74
                }
74
                }
75
            });
75
            });
76
        })
76
        })
77
        return answer;
77
        return answer;