fix question type
This commit is contained in:
parent
6eb03dc112
commit
8182bc1c43
7 changed files with 46 additions and 34 deletions
|
|
@ -27,7 +27,7 @@ interface QuestionActionData {
|
|||
surveyId: number;
|
||||
id?: number;
|
||||
title: string;
|
||||
questionType: 'singleanswerquestion' | 'multipleanswerquestion';
|
||||
questionType: 'SingleAnswerQuestion' | 'MultipleAnswerQuestion';
|
||||
}
|
||||
|
||||
interface AnswerActionData {
|
||||
|
|
@ -188,7 +188,7 @@ export const SurveyPage: React.FC = () => {
|
|||
return {
|
||||
id: q.id,
|
||||
text: q.title,
|
||||
questionType: q.questionType as 'singleanswerquestion' | 'multipleanswerquestion',
|
||||
questionType: q.questionType as 'SingleAnswerQuestion' | 'MultipleAnswerQuestion',
|
||||
answerVariants: answerVariants.map((a: IAnswerVariant) => ({
|
||||
id: a.id,
|
||||
text: a.text
|
||||
|
|
@ -233,7 +233,7 @@ export const SurveyPage: React.FC = () => {
|
|||
surveyId: id,
|
||||
id: question.id,
|
||||
title: question.text,
|
||||
questionType: question.questionType
|
||||
questionType: question.questionType // Убедитесь, что передается новый тип
|
||||
} as QuestionActionData & { id: number }
|
||||
});
|
||||
}
|
||||
|
|
@ -284,7 +284,7 @@ export const SurveyPage: React.FC = () => {
|
|||
return {
|
||||
id: q.id,
|
||||
text: q.title,
|
||||
questionType: q.questionType as 'singleanswerquestion' | 'multipleanswerquestion',
|
||||
questionType: q.questionType as 'SingleAnswerQuestion' | 'MultipleAnswerQuestion',
|
||||
answerVariants: answerVariants.map((a: IAnswerVariant) => ({
|
||||
id: a.id,
|
||||
text: a.text
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue