Skip to content

Commit 6bd346c

Browse files
Merged in r2-2826-followups-insight (pull request #6748)
R2-2826: Fixing missing i18n strings, using followup_date for indicator, changed css to wrap insight fitlers
2 parents e86d55e + a6c783b commit 6bd346c

File tree

5 files changed

+21
-9
lines changed

5 files changed

+21
-9
lines changed

app/javascript/components/insights-filters/components/styles.css

+7-1
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@
33
.filter {
44
display: flex;
55

6+
& > div {
7+
display: contents;
8+
}
9+
610
& > div:first-of-type {
711
font-weight: 600;
8-
margin: 0 var(--sp-1) 0 0;
912
flex: 0 0;
1013

1114
&:after {
1215
content: ':';
16+
margin: 0 var(--sp-1) 0 0;
1317
}
1418
}
1519
}
@@ -33,6 +37,8 @@
3337

3438
.container {
3539
display: flex;
40+
gap: var(--sp-1);
41+
flex-wrap: wrap;
3642

3743
& > div {
3844
margin: 0 var(--sp-1) 0 0;

app/javascript/components/insights/constants.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ const VIOLATION_TYPE = "violation_type";
4646
const REGISTRATION_DATE = "registration_date";
4747
const SERVICE_IMPLEMENTED_DAY_TIME = "service_implemented_day_time";
4848
const CREATED_AT = "created_at";
49+
const FOLLOWUP_DATE = "followup_date";
4950

5051
const GBV_STATISTICS = "gbv_statistics";
5152
const VIOLATIONS = "violations";
@@ -493,7 +494,7 @@ export const INSIGHTS_CONFIG = {
493494
[GROUPED_BY]: WEEK,
494495
[DATE_RANGE]: LAST_WEEK,
495496
[STATUS]: [STATUS_OPEN],
496-
[DATE]: REGISTRATION_DATE,
497+
[DATE]: FOLLOWUP_DATE,
497498
[BY]: OWNED_BY_GROUPS
498499
},
499500
filters: [

app/models/managed_report.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def self.list
4949
subreports: %w[followups],
5050
permitted_filters: [
5151
:grouped_by, :by, :created_by_groups, :owned_by_groups,
52-
:created_organization, :owned_by_agency_id, { status: {}, registration_date: {}, followup_type: {} }
52+
:created_organization, :owned_by_agency_id, { status: {}, followup_date: {}, followup_type: {} }
5353
],
5454
module_id: PrimeroModule::CP
5555
),

app/models/managed_reports/indicators/followups.rb

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ def subform_section
1717
'followup_subform_section'
1818
end
1919

20+
def date_filter_nested?
21+
true
22+
end
23+
2024
def multiple_field_values
2125
true
2226
end

config/locales/en.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -2011,6 +2011,7 @@ en:
20112011
referral_transfer_status: Referral / Transfer Status
20122012
protection_concerns: Protection Concerns
20132013
location_current: Reporting Locations
2014+
followup_type: Type of Follow Up
20142015
status_options:
20152016
open: Open
20162017
closed: Closed
@@ -2084,10 +2085,10 @@ en:
20842085
description: 'Cases with the selected Reporting Location, broken down by age and sex.'
20852086
reporting_locations_report:
20862087
reports:
2087-
protection_concerns: Reporting Location
2088+
reporting_locations: Reporting Location
20882089
description: ''
20892090
sub_reports:
2090-
protection_concerns: Reporting Location
2091+
reporting_location_by_sex_and_age: Reporting Location
20912092
ghn_report:
20922093
name: Global Horizontal Note
20932094
description: ''
@@ -3383,16 +3384,16 @@ en:
33833384
managed_report:
33843385
actions:
33853386
reporting_locations_report:
3386-
label: Reporting Location
3387+
label: Reporting Location (Cases)
33873388
explanation: Ability to view statistics on the number of Cases registered within a given date range, filtered by Reporting Location, and broken down by age and sex. This permission also allows the user to export data from an Insight.
33883389
followups_report:
3389-
label: Followups
3390+
label: Followups (Cases)
33903391
explanation: Ability to view statistics on the number of Follow Ups performed within a given date range, filtered by Type of Follow Up, and broken down by age and sex. This permission also allows the user to export data from an Insight.
33913392
services_report:
3392-
label: Services
3393+
label: Services (Cases)
33933394
explanation: Ability to view statistics on the number of Services performed within a given date range, filtered by service type, and broken down by age and sex. This permission also allows the user to export data from an Insight.
33943395
protection_concerns_report:
3395-
label: Protection Concerns
3396+
label: Protection Concerns (Cases)
33963397
explanation: Ability to view statistics on the Protection Concerns of Cases registered within a given date range. This permission also allows the user to export data from an Insight.
33973398
managed_report_scope:
33983399
label: What records should this role be able to see in Insights?

0 commit comments

Comments
 (0)