From 5b454d58be9c06447c368ef81e07362ace7efe19 Mon Sep 17 00:00:00 2001 From: bvn13 Date: Fri, 16 Feb 2024 23:54:47 +0300 Subject: [PATCH] added results info --- docs/q/template.json | 2 +- survey/public/q/agile-compass.json | 3 ++- survey/public/q/beck-depression.json | 3 ++- survey/public/q/template.json | 3 ++- survey/src/api/Api.ts | 2 +- survey/src/components/survey/Survey.tsx | 3 ++- 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/q/template.json b/docs/q/template.json index f9fa896..c0e41fd 100644 --- a/docs/q/template.json +++ b/docs/q/template.json @@ -18,5 +18,5 @@ ] } ], - "resultsInfo": null + "resultsInfo": "" } \ No newline at end of file diff --git a/survey/public/q/agile-compass.json b/survey/public/q/agile-compass.json index 9599422..9150981 100644 --- a/survey/public/q/agile-compass.json +++ b/survey/public/q/agile-compass.json @@ -291,5 +291,6 @@ } ] } - ] + ], + "resultsInfo": "

Оценка результатов

личная сфера— если результат ≤ 8, то это говорит о:

социальная сфера — если результат ≤ 8, то это говорит о:

корпоративная сфера — если результат ≤ 8, то это говорит о:

" } \ No newline at end of file diff --git a/survey/public/q/beck-depression.json b/survey/public/q/beck-depression.json index 9f4f9b2..6196af8 100644 --- a/survey/public/q/beck-depression.json +++ b/survey/public/q/beck-depression.json @@ -489,5 +489,6 @@ } ] } - ] + ], + "resultsInfo": "

Оценка результатов

В зависимости от того, сколько баллов вы набрали, можно предположить следующее.

0–13 — депрессивных симптомов нет. С вашим психическим здоровьем всё в порядке.
14–19 — вероятна лёгкая депрессия (субдепрессия).
20–28 — умеренная депрессия.
29–63 — тяжёлая депрессия. Состояние тем сложнее, чем больше количество баллов." } \ No newline at end of file diff --git a/survey/public/q/template.json b/survey/public/q/template.json index 375f9e0..c0e41fd 100644 --- a/survey/public/q/template.json +++ b/survey/public/q/template.json @@ -17,5 +17,6 @@ } ] } - ] + ], + "resultsInfo": "" } \ No newline at end of file diff --git a/survey/src/api/Api.ts b/survey/src/api/Api.ts index 4120835..1469419 100644 --- a/survey/src/api/Api.ts +++ b/survey/src/api/Api.ts @@ -21,7 +21,7 @@ export interface SurveyDto { intro: string, settings: SettingsDto, questions: QuestionDto[], - resultsInfo?: string + resultsInfo: string } const Api = { diff --git a/survey/src/components/survey/Survey.tsx b/survey/src/components/survey/Survey.tsx index 6f4ada9..9573952 100644 --- a/survey/src/components/survey/Survey.tsx +++ b/survey/src/components/survey/Survey.tsx @@ -62,7 +62,8 @@ const Survey: React.FC = ({survey}) => { question: q.question, options: randomizeIfNeeded(survey.settings.randomizeOptions, q.options) } - }) + }), + resultsInfo: survey.resultsInfo }) } }, [survey])