diff --git a/apps/assessment_registry/enums.py b/apps/assessment_registry/enums.py index 181fa49e2d..34d83241f7 100644 --- a/apps/assessment_registry/enums.py +++ b/apps/assessment_registry/enums.py @@ -97,11 +97,11 @@ AssessmentRegistrySummaryPillarTypeEnum = convert_enum_to_graphene_enum( Summary.Pillar, name='AssessmentRegistrySummaryPillarTypeEnum' ) -AssessmentRegistrySummaryFocusSectorTypeEnum = convert_enum_to_graphene_enum( - SummaryFocus.Sector, name='AssessmentRegistrySummaryFocusSectorTypeEnum' +AssessmentRegistrySummaryFocusDimmensionTypeEnum = convert_enum_to_graphene_enum( + SummaryFocus.Dimmension, name='AssessmentRegistrySummaryFocusDimmensionTypeEnum' ) -AssessmentRegistrySummaryFocusSubSectorTypeEnum = convert_enum_to_graphene_enum( - SummaryIssue.FocusSubSector, name='AssessmentRegistrySummaryFocusSubSectorTypeEnum' +AssessmentRegistrySummarySubDimmensionTypeEnum = convert_enum_to_graphene_enum( + SummaryIssue.SubDimmension, name='AssessmentRegistrySummarySubDimmensionTypeEnum' ) AssessmentRegistrySummarySubPillarTypeEnum = convert_enum_to_graphene_enum( SummaryIssue.SubPillar, name='AssessmentRegistrySummarySubPillarTypeEnum' @@ -134,7 +134,7 @@ (ScoreAnalyticalDensity.analysis_level_covered, AssessmentRegistryAnalysisLevelTypeEnum), (ScoreAnalyticalDensity.figure_provided, AssessmentRegistryAnalysisFigureTypeEnum), (SummaryFocusSubSectorIssue.focus, AssessmentRegistryFocusTypeEnum), - (SummaryIssue.sub_sector, AssessmentRegistrySummarySubPillarTypeEnum), - (SummaryIssue.focus_sub_sector, AssessmentRegistrySummaryFocusSubSectorTypeEnum), + (SummaryIssue.sub_pillar, AssessmentRegistrySummarySubPillarTypeEnum), + (SummaryIssue.sub_dimmension, AssessmentRegistrySummarySubDimmensionTypeEnum), ) } diff --git a/apps/assessment_registry/filters.py b/apps/assessment_registry/filters.py index 14925f14d8..7e4c696487 100644 --- a/apps/assessment_registry/filters.py +++ b/apps/assessment_registry/filters.py @@ -10,7 +10,7 @@ from lead.models import Lead from .models import AssessmentRegistry, SummaryIssue -from .enums import AssessmentRegistrySummarySubPillarTypeEnum, AssessmentRegistrySummaryFocusSubSectorTypeEnum +from .enums import AssessmentRegistrySummarySubPillarTypeEnum, AssessmentRegistrySummarySubDimmensionTypeEnum class AssessmentRegistryGQFilterSet(UserResourceGqlFilterSet): @@ -50,8 +50,8 @@ def filter_assessment_registry(self, qs, name, value): class IssueGQFilterSet(django_filters.FilterSet): - sub_sector = SimpleInputFilter(AssessmentRegistrySummarySubPillarTypeEnum) - focus_sub_sector = SimpleInputFilter(AssessmentRegistrySummaryFocusSubSectorTypeEnum) + sub_pillar = SimpleInputFilter(AssessmentRegistrySummarySubPillarTypeEnum) + sub_dimmension = SimpleInputFilter(AssessmentRegistrySummarySubDimmensionTypeEnum) class Meta: model = SummaryIssue diff --git a/apps/assessment_registry/migrations/0014_alter_scorerating_score_type.py b/apps/assessment_registry/migrations/0014_alter_scorerating_score_type.py new file mode 100644 index 0000000000..70f0010b1b --- /dev/null +++ b/apps/assessment_registry/migrations/0014_alter_scorerating_score_type.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.17 on 2023-08-03 04:54 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('assessment_registry', '0013_auto_20230803_0222'), + ] + + operations = [ + migrations.AlterField( + model_name='scorerating', + name='score_type', + field=models.IntegerField(choices=[(0, 'Relevance'), (1, 'Comprehensiveness'), (2, 'Timeliness'), (3, 'Granularity'), (4, 'Comparability'), (5, 'Source reability'), (6, 'Methods'), (7, 'Triangulation'), (8, 'Plausibility'), (9, 'Inclusiveness'), (10, 'Assumptions'), (11, 'Corroboration'), (12, 'Structured Ananlytical Technique'), (13, 'Consensus'), (14, 'Reproducibility'), (15, 'Clearly Articulated Result'), (16, 'Level Of Confidence'), (17, 'Illustration'), (18, 'Sourced data and evidence'), (19, 'Clearly stated outliers')]), + ), + ] diff --git a/apps/assessment_registry/migrations/0015_auto_20230803_0608.py b/apps/assessment_registry/migrations/0015_auto_20230803_0608.py new file mode 100644 index 0000000000..af3f114ffa --- /dev/null +++ b/apps/assessment_registry/migrations/0015_auto_20230803_0608.py @@ -0,0 +1,23 @@ +# Generated by Django 3.2.17 on 2023-08-03 06:08 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('assessment_registry', '0014_alter_scorerating_score_type'), + ] + + operations = [ + migrations.RenameField( + model_name='summaryissue', + old_name='focus_sub_sector', + new_name='sub_dimmension', + ), + migrations.RenameField( + model_name='summaryissue', + old_name='sub_sector', + new_name='sub_pillar', + ), + ] diff --git a/apps/assessment_registry/models.py b/apps/assessment_registry/models.py index f0fe8943b3..9670de37ad 100644 --- a/apps/assessment_registry/models.py +++ b/apps/assessment_registry/models.py @@ -538,7 +538,7 @@ class SummarySubPillarIssue(UserResource): class SummaryFocus(UserResource): - class Sector(models.IntegerChoices): + class Dimmension(models.IntegerChoices): IMPACT = 0, 'Impact' HUMANITARIAN_CONDITIONS = 1, 'Humanitarian Conditions' PRIORITIES_AND_PREFERENCES = 2, 'Priorities & Preferences' @@ -594,7 +594,7 @@ class SubPillar(models.IntegerChoices): RELIEF_TO_POPULATION = 20, 'Relief To Population' PHYSICAL_AND_SECURITY = 21, 'Physical & Security' - class FocusSubSector(models.IntegerChoices): + class SubDimmension(models.IntegerChoices): DRIVERS = 0, 'Drivers' IMPACT_ON_PEOPLE = 1, 'Impact on People' IMPACT_ON_SYSTEM = 2, 'Impact On System, Network And Services' @@ -611,8 +611,8 @@ class FocusSubSector(models.IntegerChoices): PEOPLE_AT_RISKS = 13, 'People At Risks' FOCAL_ISSUES = 14, 'Focal Issues' - sub_sector = models.IntegerField(choices=SubPillar.choices, blank=True, null=True) - focus_sub_sector = models.IntegerField(choices=FocusSubSector.choices, blank=True, null=True) + sub_pillar = models.IntegerField(choices=SubPillar.choices, blank=True, null=True) + sub_dimmension = models.IntegerField(choices=SubDimmension.choices, blank=True, null=True) parent = models.ForeignKey( 'SummaryIssue', on_delete=models.CASCADE, diff --git a/apps/assessment_registry/schema.py b/apps/assessment_registry/schema.py index 07e449fdef..2f13b9ef19 100644 --- a/apps/assessment_registry/schema.py +++ b/apps/assessment_registry/schema.py @@ -56,8 +56,8 @@ AssessmentRegistryCNAQuestionSubSectorTypeEnum, AssessmentRegistrySummaryPillarTypeEnum, AssessmentRegistrySummarySubPillarTypeEnum, - AssessmentRegistrySummaryFocusSectorTypeEnum, - AssessmentRegistrySummaryFocusSubSectorTypeEnum, + AssessmentRegistrySummaryFocusDimmensionTypeEnum, + AssessmentRegistrySummarySubDimmensionTypeEnum, ) @@ -79,13 +79,13 @@ class SummarySubSectorType(graphene.ObjectType): class SummaryOptionType(graphene.ObjectType): - sector = graphene.Field(AssessmentRegistrySummaryPillarTypeEnum, required=True) - sub_sector = graphene.List(graphene.NonNull(AssessmentRegistrySummarySubPillarTypeEnum), required=True) + pillar = graphene.Field(AssessmentRegistrySummaryPillarTypeEnum, required=True) + sub_pillar = graphene.List(graphene.NonNull(AssessmentRegistrySummarySubPillarTypeEnum), required=True) class SummaryFocusOptionType(graphene.ObjectType): - sector = graphene.Field(AssessmentRegistrySummaryFocusSectorTypeEnum, required=False) - sub_sector = graphene.List(graphene.NonNull(AssessmentRegistrySummaryFocusSubSectorTypeEnum), required=False) + dimmension = graphene.Field(AssessmentRegistrySummaryFocusDimmensionTypeEnum, required=False) + sub_dimmension = graphene.List(graphene.NonNull(AssessmentRegistrySummarySubDimmensionTypeEnum), required=False) class ScoreOptionsType(graphene.ObjectType): @@ -122,36 +122,36 @@ def resolve_cna_questions(root, info, **kwargs): def resolve_summary_options(root, info, **kwargs): return [ SummaryOptionType( - sector=enum, - sub_sector=[ + pillar=enum, + sub_pillar=[ enum for enum, _ in SummaryIssue.SubPillar.choices if 0 <= enum <= 5 ] ) for enum, _ in Summary.Pillar.choices if enum == 0 ] + [ SummaryOptionType( - sector=enum, - sub_sector=[ + pillar=enum, + sub_pillar=[ enum for enum, _ in SummaryIssue.SubPillar.choices if 6 <= enum <= 9 ] ) for enum, _ in Summary.Pillar.choices if enum == 1 ] + [ SummaryOptionType( - sector=enum, - sub_sector=[ + pillar=enum, + sub_pillar=[ enum for enum, _ in SummaryIssue.SubPillar.choices if 10 <= enum <= 14 ] ) for enum, _ in Summary.Pillar.choices if enum == 2 ] + [ SummaryOptionType( - sector=enum, - sub_sector=[ + pillar=enum, + sub_pillar=[ enum for enum, _ in SummaryIssue.SubPillar.choices if 15 <= enum <= 18 ] ) for enum, _ in Summary.Pillar.choices if enum == 3 ] + [ SummaryOptionType( - sector=enum, - sub_sector=[ + pillar=enum, + sub_pillar=[ enum for enum, _ in SummaryIssue.SubPillar.choices if 19 <= enum <= 21 ] ) for enum, _ in Summary.Pillar.choices if enum == 4 @@ -161,32 +161,32 @@ def resolve_summary_options(root, info, **kwargs): def resolve_summary_focus_options(root, info, **kwargs): return [ SummaryFocusOptionType( - sector=enum, - sub_sector=[ - enum for enum, _ in SummaryIssue.SubPillar.choices if 0 <= enum <= 2 + dimmension=enum, + sub_dimmension=[ + enum for enum, _ in SummaryIssue.SubDimmension.choices if 0 <= enum <= 2 ] - ) for enum, _ in Summary.Pillar.choices if enum == 0 + ) for enum, _ in SummaryFocus.Dimmension.choices if enum == 0 ] + [ SummaryFocusOptionType( - sector=enum, - sub_sector=[ - enum for enum, _ in SummaryIssue.SubPillar.choices if 3 <= enum <= 5 + dimmension=enum, + sub_dimmension=[ + enum for enum, _ in SummaryIssue.SubDimmension.choices if 3 <= enum <= 5 ] - ) for enum, _ in Summary.Pillar.choices if enum == 1 + ) for enum, _ in SummaryFocus.Dimmension.choices if enum == 1 ] + [ SummaryFocusOptionType( - sector=enum, - sub_sector=[ - enum for enum, _ in SummaryIssue.SubPillar.choices if 6 <= enum <= 9 + dimmension=enum, + sub_dimmension=[ + enum for enum, _ in SummaryIssue.SubDimmension.choices if 6 <= enum <= 9 ] - ) for enum, _ in Summary.Pillar.choices if enum == 2 + ) for enum, _ in SummaryFocus.Dimmension.choices if enum == 2 ] + [ SummaryFocusOptionType( - sector=enum, - sub_sector=[ - enum for enum, _ in SummaryIssue.SubPillar.choices if 10 <= enum <= 14 + dimmension=enum, + sub_dimmension=[ + enum for enum, _ in SummaryIssue.SubDimmension.choices if 10 <= enum <= 14 ] - ) for enum, _ in Summary.Pillar.choices if enum == 3 + ) for enum, _ in SummaryFocus.Dimmension.choices if enum == 3 ] @@ -208,12 +208,8 @@ class Meta: sector = graphene.Field(AssessmentRegistrySectorTypeEnum, required=True) sector_display = EnumDescription(source='get_sector_display', required=True) - - analysis_level_covered = graphene.Field(AssessmentRegistryAnalysisLevelTypeEnum, required=True) - analysis_level_covered_display = EnumDescription(source='get_analysis_level_covered_display', required=True) - - figure_provided = graphene.Field(AssessmentRegistryAnalysisFigureTypeEnum, required=True) - figure_provided_display = EnumDescription(source='get_figure_provided_display', required=True) + analysis_level_covered = graphene.List(graphene.NonNull(AssessmentRegistryAnalysisLevelTypeEnum), required=True) + figure_provided = graphene.List(graphene.NonNull(AssessmentRegistryAnalysisFigureTypeEnum), required=True) def get_assessment_registry_qs(info): @@ -256,7 +252,7 @@ def resolve_external_link(root, info, **kwargs): return render_string_for_graphql(root.external_link) -class CNAType(DjangoObjectType, UserResourceMixin): +class CNAType(DjangoObjectType, UserResourceMixin, ClientIdMixin): question = graphene.Field(QuestionType, required=True) class Meta: @@ -265,10 +261,10 @@ class Meta: class IssueType(DjangoObjectType, UserResourceMixin): - sub_sector = graphene.Field(AssessmentRegistrySummarySubPillarTypeEnum, required=False) - sub_sector_display = graphene.String(required=False) - focus_sub_sector = graphene.Field(AssessmentRegistrySummaryFocusSubSectorTypeEnum, required=False) - focus_sub_sector_display = graphene.String(required=False) + sub_pillar = graphene.Field(AssessmentRegistrySummarySubPillarTypeEnum, required=False) + sub_pillar_display = graphene.String(required=False) + sub_dimmension = graphene.Field(AssessmentRegistrySummarySubDimmensionTypeEnum, required=False) + sub_dimmension_display = graphene.String(required=False) class Meta: model = SummaryIssue @@ -277,15 +273,15 @@ class Meta: ] @staticmethod - def resolve_sub_sector_display(root, info, **kwargs): - if root.sub_sector is not None: - return root.get_sub_sector_display() + def resolve_sub_pillar_display(root, info, **kwargs): + if root.sub_pillar is not None: + return root.get_sub_pillar_display() return None @staticmethod - def resolve_focus_sub_sector_display(root, info, **kwargs): - if root.focus_sub_sector is not None: - return root.get_focus_sub_sector_display() + def resolve_sub_dimmension_display(root, info, **kwargs): + if root.sub_dimmension is not None: + return root.get_sub_dimmension_display() return None @@ -295,7 +291,7 @@ class Meta: filterset_class = IssueGQFilterSet -class SummaryType(DjangoObjectType, UserResourceMixin): +class SummaryMetaType(DjangoObjectType, UserResourceMixin): class Meta: model = Summary fields = [ @@ -318,12 +314,12 @@ def resolve_issue(root, info, **kwargs): return root.summary_issue -class SummaryFocusType(DjangoObjectType, UserResourceMixin): +class SummaryFocusMetaType(DjangoObjectType, UserResourceMixin): class Meta: model = SummaryFocus -class SummaryFocusSubSectorIssueType(DjangoObjectType, UserResourceMixin): +class SummaryFocusSubDimmensionIssueType(DjangoObjectType, UserResourceMixin): focus = graphene.Field(AssessmentRegistryFocusTypeEnum, required=False) focus_display = graphene.String(required=False) @@ -366,7 +362,7 @@ class Meta: language = graphene.List(graphene.NonNull(AssessmentRegistryLanguageTypeEnum), required=True) focuses = graphene.List(graphene.NonNull(AssessmentRegistryFocusTypeEnum), required=True) sectors = graphene.List(graphene.NonNull(AssessmentRegistrySectorTypeEnum), required=True) - protection_info_mgmts = graphene.List(graphene.NonNull(AssessmentRegistryProtectionInfoTypeEnum), required=True) + protection_info_mgmts = graphene.List(graphene.NonNull(AssessmentRegistryProtectionInfoTypeEnum), required=False) affected_groups = graphene.List(graphene.NonNull(AssessmentRegistryAffectedGroupTypeEnum), required=True) methodology_attributes = graphene.List(graphene.NonNull(MethodologyAttributeType), required=False) additional_documents = graphene.List(graphene.NonNull(AdditionalDocumentType), required=False) @@ -374,12 +370,11 @@ class Meta: score_analytical_density = graphene.List(graphene.NonNull(ScoreAnalyticalDensityType), required=True) lead = graphene.NonNull(LeadDetailType) locations = graphene.List(graphene.NonNull(ProjectGeoAreaType)) - summary = graphene.List(graphene.NonNull(SummaryType), required=False) cna = graphene.List(graphene.NonNull(CNAType), required=False) - summary_meta = graphene.Field(SummaryType, required=False) - summary_subsector_issue = graphene.List(graphene.NonNull(SummarySubPillarIssueType), required=False) - summary_focus_meta = graphene.List(graphene.NonNull(SummaryFocusType), required=False) - summary_focus_subsector_issue = graphene.List(graphene.NonNull(SummaryFocusSubSectorIssueType), required=False) + summary_pillar_meta = graphene.Field(SummaryMetaType, required=False) + summary_sub_pillar_issue = graphene.List(graphene.NonNull(SummarySubPillarIssueType), required=False) + summary_dimmension_meta = graphene.List(graphene.NonNull(SummaryFocusMetaType), required=False) + summary_sub_dimmension_issue = graphene.List(graphene.NonNull(SummaryFocusSubDimmensionIssueType), required=False) lead = graphene.NonNull(LeadDetailType) @staticmethod @@ -411,19 +406,19 @@ def resolve_cna(root, info, **kwargs): return Answer.objects.filter(assessment_registry=root) @staticmethod - def resolve_summary_meta(root, info, **kwargs): + def resolve_summary_pillar_meta(root, info, **kwargs): return Summary.objects.get(assessment_registry=root) @staticmethod - def resolve_summary_subsector_issue(root, info, **kwargs): + def resolve_summary_sub_pillar_issue(root, info, **kwargs): return SummarySubPillarIssue.objects.filter(assessment_registry=root) @staticmethod - def resolve_summary_focus_meta(root, info, **kwargs): + def resolve_summary_dimmension_meta(root, info, **kwargs): return SummaryFocus.objects.filter(assessment_registry=root) @staticmethod - def resolve_summary_focus_subsector_issue(root, info, **kwargs): + def resolve_summary_sub_dimmension_issue(root, info, **kwargs): return SummaryFocusSubSectorIssue.objects.filter(assessment_registry=root) diff --git a/apps/assessment_registry/serializers.py b/apps/assessment_registry/serializers.py index 521ec98ba3..8c89131a01 100644 --- a/apps/assessment_registry/serializers.py +++ b/apps/assessment_registry/serializers.py @@ -37,20 +37,20 @@ class IssueSerializer(UserResourceSerializer): class Meta: model = SummaryIssue fields = ( - 'sub_sector', 'focus_sub_sector', 'parent', 'label' + 'sub_pillar', 'sub_dimmension', 'parent', 'label' ) def validate(self, data): - if data.get('sub_sector') is not None and data.get('focus_sub_sector') is not None: - raise serializers.ValidationError("Cannot select both sub_sector and focus_sub_sector field.") + if data.get('sub_pillar') is not None and data.get('sub_dimmension') is not None: + raise serializers.ValidationError("Cannot select both sub_pillar and sub_dimmension field.") if data.get('parent') is not None: - if data.get('sub_sector') is not None: - if data.get('sub_sector') != data.get('parent').sub_sector: - raise serializers.ValidationError("sub_sector does not match between parent and child.") + if data.get('sub_pillar') is not None: + if data.get('sub_pillar') != data.get('parent').sub_pillar: + raise serializers.ValidationError("sub_pillar does not match between parent and child.") - if data.get('focus_sub_sector') is not None: - if data.get('focus_sub_sector') != data.get('parent').focus_sub_sector: - raise serializers.ValidationError("focus_sub_sector does not match between child and parent.") + if data.get('sub_dimmension') is not None: + if data.get('sub_dimmension') != data.get('parent').sub_dimmension: + raise serializers.ValidationError("sub_dimmension does not match between child and parent.") return data @@ -60,8 +60,7 @@ class Meta: fields = ("summary_issue", "text", "order", "lead_preview_text_ref") -class SummarySerializer(UserResourceSerializer): - +class SummaryMetaSerializer(UserResourceSerializer): class Meta: model = Summary fields = ( @@ -70,8 +69,7 @@ class Meta: ) -class SummaryFocusSerializer(UserResourceSerializer): - +class SummaryFocusMetaSerializer(UserResourceSerializer): class Meta: model = SummaryFocus fields = ( @@ -101,10 +99,10 @@ class Meta: fields = ("client_id", "sector", "analysis_level_covered", "figure_provided",) -class CNAAnswerSerializer(UserResourceSerializer): +class CNAAnswerSerializer(TempClientIdMixin, UserResourceSerializer): class Meta: model = Answer - fields = ('question', 'answer') + fields = ('client_id', 'question', 'answer') class AssessmentRegistrySerializer(UserResourceSerializer, ProjectPropertySerializerMixin): @@ -125,15 +123,15 @@ class AssessmentRegistrySerializer(UserResourceSerializer, ProjectPropertySerial many=True, required=False ) - summary_meta = SummarySerializer(source='summary', many=True, required=False) + summary_pillar_meta = SummaryMetaSerializer(source='summary', many=True, required=False) - summary_subsector_issue = SummarySubPillarIssueSerializer( + summary_sub_pillar_issue = SummarySubPillarIssueSerializer( source="summary_sub_sector_issue_ary", many=True, required=False ) - summary_focus_meta = SummaryFocusSerializer( + summary_dimmension_meta = SummaryFocusMetaSerializer( source='summary_focus', many=True, required=False ) - summary_focus_issue = SummaryFocusIssueSerializer( + summary_sub_dimmension_issue = SummaryFocusIssueSerializer( source="summary_focus_subsector_issue_ary", many=True, required=False ) @@ -180,10 +178,10 @@ class Meta: "final_score", "score_analytical_density", "cna", - "summary_meta", - "summary_subsector_issue", - "summary_focus_meta", - "summary_focus_issue", + "summary_pillar_meta", + "summary_sub_pillar_issue", + "summary_dimmension_meta", + "summary_sub_dimmension_issue", ) def validate_score_ratings(self, data): diff --git a/schema.graphql b/schema.graphql index 85aff029e5..a30d024541 100644 --- a/schema.graphql +++ b/schema.graphql @@ -653,10 +653,10 @@ input AssessmentRegistryCreateInputType { finalScore: Int scoreAnalyticalDensity: [ScoreAnalyticalDensityInputType!] cna: [CNAAnswerInputType!] - summaryMeta: [SummaryInputType!] - summarySubsectorIssue: [SummarySubPillarIssueInputType!] - summaryFocusMeta: [SummaryFocusInputType!] - summaryFocusIssue: [SummaryFocusIssueInputType!] + summaryPillarMeta: [SummaryMetaInputType!] + summarySubPillarIssue: [SummarySubPillarIssueInputType!] + summaryDimmensionMeta: [SummaryFocusMetaInputType!] + summarySubDimmensionIssue: [SummaryFocusIssueInputType!] } enum AssessmentRegistryCrisisTypeEnum { @@ -856,7 +856,7 @@ enum AssessmentRegistrySectorTypeEnum { INTER_CROSS_SECTOR } -enum AssessmentRegistrySummaryFocusSectorTypeEnum { +enum AssessmentRegistrySummaryFocusDimmensionTypeEnum { IMPACT HUMANITARIAN_CONDITIONS PRIORITIES_AND_PREFERENCES @@ -864,7 +864,15 @@ enum AssessmentRegistrySummaryFocusSectorTypeEnum { HUMANITARIAN_POPULATION_FIGURES } -enum AssessmentRegistrySummaryFocusSubSectorTypeEnum { +enum AssessmentRegistrySummaryPillarTypeEnum { + CONTEXT + EVENT_SHOCK + DISPLACEMENT + INFORMATION_AND_COMMUNICATION + HUMANITARIAN_ACCESS +} + +enum AssessmentRegistrySummarySubDimmensionTypeEnum { DRIVERS IMPACT_ON_PEOPLE IMPACT_ON_SYSTEM @@ -882,14 +890,6 @@ enum AssessmentRegistrySummaryFocusSubSectorTypeEnum { FOCAL_ISSUES } -enum AssessmentRegistrySummaryPillarTypeEnum { - CONTEXT - EVENT_SHOCK - DISPLACEMENT - INFORMATION_AND_COMMUNICATION - HUMANITARIAN_ACCESS -} - enum AssessmentRegistrySummarySubPillarTypeEnum { POLITICS DEMOGRAPHY @@ -963,18 +963,17 @@ type AssessmentRegistryType { language: [AssessmentRegistryLanguageTypeEnum!]! focuses: [AssessmentRegistryFocusTypeEnum!]! sectors: [AssessmentRegistrySectorTypeEnum!]! - protectionInfoMgmts: [AssessmentRegistryProtectionInfoTypeEnum!]! + protectionInfoMgmts: [AssessmentRegistryProtectionInfoTypeEnum!] affectedGroups: [AssessmentRegistryAffectedGroupTypeEnum!]! methodologyAttributes: [MethodologyAttributeType!] additionalDocuments: [AdditionalDocumentType!] scoreRatings: [ScoreRatingType!]! scoreAnalyticalDensity: [ScoreAnalyticalDensityType!]! - summary: [SummaryType!] cna: [CNAType!] - summaryMeta: SummaryType - summarySubsectorIssue: [SummarySubPillarIssueType!] - summaryFocusMeta: [SummaryFocusType!] - summaryFocusSubsectorIssue: [SummaryFocusSubSectorIssueType!] + summaryPillarMeta: SummaryMetaType + summarySubPillarIssue: [SummarySubPillarIssueType!] + summaryDimmensionMeta: [SummaryFocusMetaType!] + summarySubDimmensionIssue: [SummaryFocusSubDimmensionIssueType!] } enum AssessmentRegistryUnitOfAnalysisTypeEnum { @@ -1232,6 +1231,7 @@ input BulkUserGroupMembershipInputType { } input CNAAnswerInputType { + clientId: String question: ID! answer: Boolean! } @@ -1240,6 +1240,7 @@ type CNAType { id: ID! question: QuestionType! answer: Boolean! + clientId: String! createdAt: DateTime! modifiedAt: DateTime! createdBy: UserType @@ -2297,8 +2298,8 @@ input HIDLoginInputType { } input IssueCreateInputType { - subSector: AssessmentRegistrySummarySubPillarTypeEnum - focusSubSector: AssessmentRegistrySummaryFocusSubSectorTypeEnum + subPillar: AssessmentRegistrySummarySubPillarTypeEnum + subDimmension: AssessmentRegistrySummarySubDimmensionTypeEnum parent: ID label: String! } @@ -2319,10 +2320,10 @@ type IssueType { modifiedAt: DateTime! createdBy: UserType modifiedBy: UserType - subSector: AssessmentRegistrySummarySubPillarTypeEnum - subSectorDisplay: String - focusSubSector: AssessmentRegistrySummaryFocusSubSectorTypeEnum - focusSubSectorDisplay: String + subPillar: AssessmentRegistrySummarySubPillarTypeEnum + subPillarDisplay: String + subDimmension: AssessmentRegistrySummarySubDimmensionTypeEnum + subDimmensionDisplay: String } type JwtTokenType { @@ -3441,7 +3442,7 @@ type PublicProjectWithMembershipData { type Query { issue(id: ID!): IssueType - issues(label: String, parent: ID, subSector: AssessmentRegistrySummarySubPillarTypeEnum, focusSubSector: AssessmentRegistrySummaryFocusSubSectorTypeEnum, page: Int = 1, ordering: String, pageSize: Int): IssueListType + issues(label: String, parent: ID, subPillar: AssessmentRegistrySummarySubPillarTypeEnum, subDimmension: AssessmentRegistrySummarySubDimmensionTypeEnum, page: Int = 1, ordering: String, pageSize: Int): IssueListType deepExploreStats(filter: ExploreDeepFilterInputType!): ExploreDashboardStatType publicDeepExploreYearlySnapshots: [PublicExploreSnapshotType!] publicDeepExploreGlobalSnapshots: [PublicExploreSnapshotType!] @@ -3616,15 +3617,13 @@ type ScoreAnalyticalDensityType { id: ID! clientId: String! sector: AssessmentRegistrySectorTypeEnum! - analysisLevelCovered: AssessmentRegistryAnalysisLevelTypeEnum! - figureProvided: AssessmentRegistryAnalysisFigureTypeEnum! + analysisLevelCovered: [AssessmentRegistryAnalysisLevelTypeEnum!]! + figureProvided: [AssessmentRegistryAnalysisFigureTypeEnum!]! createdAt: DateTime! modifiedAt: DateTime! createdBy: UserType modifiedBy: UserType sectorDisplay: EnumDescription! - analysisLevelCoveredDisplay: EnumDescription! - figureProvidedDisplay: EnumDescription! } type ScoreOptionsType { @@ -3673,7 +3672,15 @@ type SectionType { widgets: [WidgetType!] } -input SummaryFocusInputType { +input SummaryFocusIssueInputType { + summaryIssue: ID! + focus: AssessmentRegistryFocusTypeEnum! + text: String + order: Int + leadPreviewTextRef: GenericScalar +} + +input SummaryFocusMetaInputType { percentageOfPeopleAffected: Int totalPeopleAffected: Int percentageOfModerate: Int @@ -3693,36 +3700,7 @@ input SummaryFocusInputType { totalPeopleCriticallyInNeed: Int } -input SummaryFocusIssueInputType { - summaryIssue: ID! - focus: AssessmentRegistryFocusTypeEnum! - text: String - order: Int - leadPreviewTextRef: GenericScalar -} - -type SummaryFocusOptionType { - sector: AssessmentRegistrySummaryFocusSectorTypeEnum - subSector: [AssessmentRegistrySummaryFocusSubSectorTypeEnum!] -} - -type SummaryFocusSubSectorIssueType { - id: ID! - createdAt: DateTime! - modifiedAt: DateTime! - createdBy: UserType - modifiedBy: UserType - clientId: String - assessmentRegistry: AssessmentRegistryType! - focus: AssessmentRegistryFocusTypeEnum - summaryIssue: IssueType! - text: String! - order: Int - leadPreviewTextRef: GenericScalar - focusDisplay: String -} - -type SummaryFocusType { +type SummaryFocusMetaType { id: ID! createdAt: DateTime! modifiedAt: DateTime! @@ -3749,18 +3727,53 @@ type SummaryFocusType { totalPeopleCriticallyInNeed: Int } -input SummaryInputType { +type SummaryFocusOptionType { + dimmension: AssessmentRegistrySummaryFocusDimmensionTypeEnum + subDimmension: [AssessmentRegistrySummarySubDimmensionTypeEnum!] +} + +type SummaryFocusSubDimmensionIssueType { + id: ID! + createdAt: DateTime! + modifiedAt: DateTime! + createdBy: UserType + modifiedBy: UserType + clientId: String + assessmentRegistry: AssessmentRegistryType! + focus: AssessmentRegistryFocusTypeEnum + summaryIssue: IssueType! + text: String! + order: Int + leadPreviewTextRef: GenericScalar + focusDisplay: String +} + +input SummaryMetaInputType { + totalPeopleAssessed: Int + totalDead: Int + totalInjured: Int + totalMissing: Int + totalPeopleFacingHumAccessCons: Int + percentageOfPeopleFacingHumAccessCons: Int +} + +type SummaryMetaType { + id: ID! totalPeopleAssessed: Int totalDead: Int totalInjured: Int totalMissing: Int totalPeopleFacingHumAccessCons: Int percentageOfPeopleFacingHumAccessCons: Int + createdAt: DateTime! + modifiedAt: DateTime! + createdBy: UserType + modifiedBy: UserType } type SummaryOptionType { - sector: AssessmentRegistrySummaryPillarTypeEnum! - subSector: [AssessmentRegistrySummarySubPillarTypeEnum!]! + pillar: AssessmentRegistrySummaryPillarTypeEnum! + subPillar: [AssessmentRegistrySummarySubPillarTypeEnum!]! } input SummarySubPillarIssueInputType { @@ -3782,20 +3795,6 @@ type SummarySubPillarIssueType { issue: IssueType } -type SummaryType { - id: ID! - totalPeopleAssessed: Int - totalDead: Int - totalInjured: Int - totalMissing: Int - totalPeopleFacingHumAccessCons: Int - percentageOfPeopleFacingHumAccessCons: Int - createdAt: DateTime! - modifiedAt: DateTime! - createdBy: UserType - modifiedBy: UserType -} - enum TopicModelStatusEnum { PENDING STARTED