('surveys', 'institutions', id, true)
+ )
+ ).then(newInstitutions => {
+ setInstitutionCache(prev => {
+ const newCache = new Map(prev);
+ newInstitutions.forEach(institution => institution && newCache.set(institution.id, institution));
+ return newCache;
+ });
+ });
+ }
+ }, [institutionsToLoad]);
+
+ return (
+
+
+ {profession?.name}
+
+ {profession?.description || ''}
+
+
+
Где можно обучиться
+ (
+
+ )}
+ />
+
+
+
+ );
+}
+
+function SpecialtyBlock({
+ specialty,
+ institution,
+}: {
+ specialty: Specialty;
+ institution: Institution | undefined;
+}) {
+ return (
+
+
{specialty.name}
+
Учебное заведение: {institution?.name || 'Загрузка...'}
+
+ );
+}
\ No newline at end of file
diff --git a/src/pages/SurveyResultPage.tsx b/src/pages/SurveyResultPage.tsx
index 6cee410..d397764 100644
--- a/src/pages/SurveyResultPage.tsx
+++ b/src/pages/SurveyResultPage.tsx
@@ -17,8 +17,6 @@ export function SurveyResultPage() {
!!scoreVariable
);
-
-
return (
diff --git a/src/types/survey.ts b/src/types/survey.ts
index c7c549c..e270f5e 100644
--- a/src/types/survey.ts
+++ b/src/types/survey.ts
@@ -44,4 +44,14 @@ export interface ScoreVariable {
export interface Profession extends UniqueItem {
name: string;
description: string;
+}
+
+export interface Specialty extends UniqueItem {
+ name: string;
+ institution: number;
+ profession: number;
+}
+
+export interface Institution extends UniqueItem {
+ name: string;
}
\ No newline at end of file