Half-Working order-answers

This commit is contained in:
Mawoka
2023-01-02 18:18:44 +01:00
parent 629822b2df
commit 0f000987ca
13 changed files with 664 additions and 314 deletions
+4
View File
@@ -81,11 +81,15 @@ export const dataSchema = yup.object({
} else if (typeof v[0].case_sensitive === 'boolean') {
console.log('TextQuestionSchema');
return TextQuestionSchema;
} else if (v[0].id !== undefined) {
console.log('OrderQuestionSchema');
return VotingQuestionSchema;
} else if (v[0].answer !== undefined) {
console.log('VotingQuestionSchema');
return VotingQuestionSchema;
}
} else if (typeof v === 'string' || v instanceof String) {
console.log('StringQuestionSchema');
return yup.string().required("The slide mustn't be empty").nullable();
} else {
console.log('RangeQuestionSchema');