Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TTAHUB-3603] Monitoring goals for AR #2488

Merged
merged 261 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from 162 commits
Commits
Show all changes
261 commits
Select commit Hold shift + click to select a range
a2b141a
merge main run migrations
AdamAdHocTeam Nov 15, 2024
b69906d
rename migration
AdamAdHocTeam Nov 15, 2024
d4a9f26
rename file add proper cli running and wrap in txn
AdamAdHocTeam Nov 15, 2024
305d6f3
add missing model entry run migrate and rename file
AdamAdHocTeam Nov 15, 2024
0d408c2
WIP adding ARO citations
AdamAdHocTeam Nov 18, 2024
1883597
fixes per Garrett
AdamAdHocTeam Nov 19, 2024
a61fe43
Merge branch 'main' into al-ttahub-3513-monitoring-cron-job
AdamAdHocTeam Nov 19, 2024
d532d2d
Merge branch 'main' into al-ttahub-3603-activity-report-objective-cit…
AdamAdHocTeam Nov 19, 2024
979bc11
put back profiles
AdamAdHocTeam Nov 19, 2024
51cbb1b
hook up aro citation to links tables
AdamAdHocTeam Nov 19, 2024
abbaa71
Update src/migrations/20241115143738-AddMonitoringEnum.js
AdamAdHocTeam Nov 19, 2024
9d0830d
WIP
AdamAdHocTeam Nov 20, 2024
7212595
add standard column per Garrett
AdamAdHocTeam Nov 20, 2024
735abff
minio remove
AdamAdHocTeam Nov 20, 2024
e114b7e
add missing model entry
AdamAdHocTeam Nov 20, 2024
4612aa0
push model changes again
AdamAdHocTeam Nov 21, 2024
f528e95
add function with test to get the grant citations
AdamAdHocTeam Nov 21, 2024
e3f0f6c
see if we need these for now
AdamAdHocTeam Nov 22, 2024
9cb9638
merge main
AdamAdHocTeam Nov 22, 2024
32db707
overwrite from main
AdamAdHocTeam Nov 22, 2024
e8a4918
per Jon switch json column to array of objects to match what we expec…
AdamAdHocTeam Nov 22, 2024
d5187ce
fix process exit when running from cmd
AdamAdHocTeam Nov 22, 2024
2a0b7a2
apply Garretts idea for a approach that doesnt require joins to monit…
AdamAdHocTeam Nov 22, 2024
ab91b39
Test fixes and clean up
AdamAdHocTeam Nov 25, 2024
97964ca
Fix test order issue
AdamAdHocTeam Nov 25, 2024
25190c8
cleanup tests from old path and add crud for ARO citation
AdamAdHocTeam Nov 25, 2024
91d9ff1
hook up saving of aro citations add skip and tests for monitoring goals
AdamAdHocTeam Nov 25, 2024
a7147e2
fix puml
AdamAdHocTeam Nov 26, 2024
9e29885
Merge branch 'main' into al-ttahub-3603-activity-report-objective-cit…
AdamAdHocTeam Nov 26, 2024
730617c
hook up more citation stuff for ARs
AdamAdHocTeam Nov 26, 2024
8db40d3
remove unused items
AdamAdHocTeam Nov 26, 2024
937e01e
updates for grant goal retrieval
AdamAdHocTeam Nov 27, 2024
56cbf56
merge
AdamAdHocTeam Nov 27, 2024
cb95166
fix api test
AdamAdHocTeam Nov 27, 2024
2570a21
see if hardcoding fetcher value gets e2e to pass
AdamAdHocTeam Nov 27, 2024
703bffb
fix FE tests
AdamAdHocTeam Dec 2, 2024
5a3e907
fix e2e
AdamAdHocTeam Dec 2, 2024
c17a547
Merge pull request #2470 from HHS/al-ttahub-3513-monitoring-cron-job
AdamAdHocTeam Dec 2, 2024
f84ee3a
dont require start date simply dont return monitoring goals
AdamAdHocTeam Dec 2, 2024
8f251e8
fix model relationships
AdamAdHocTeam Dec 2, 2024
d66f7ce
update alerts to require start date
AdamAdHocTeam Dec 2, 2024
911ed42
Decompose types
thewatermethod Dec 3, 2024
24ef526
hooking up ar to citations
AdamAdHocTeam Dec 3, 2024
d9ba411
fixes per Matt
AdamAdHocTeam Dec 3, 2024
86c3b87
remove date conversion
AdamAdHocTeam Dec 3, 2024
45b629f
More work on byReview query, need to track down a few additional fields
thewatermethod Dec 4, 2024
cc30fad
Merge remote-tracking branch 'origin/main' into mb/TTAHUB-3635/TTAHUB…
thewatermethod Dec 4, 2024
fa5a39e
fixes and upates to get citations on reports
AdamAdHocTeam Dec 4, 2024
542aa3e
fix tests and merge latest from parent branch
AdamAdHocTeam Dec 4, 2024
7ced6d0
Expand types, byreview query, start bycitation
thewatermethod Dec 5, 2024
8bd9b52
Extract source
thewatermethod Dec 5, 2024
20cf11f
see if this fixes e2e
AdamAdHocTeam Dec 5, 2024
50d89b1
Finish citation query
thewatermethod Dec 5, 2024
4f84555
Merge remote-tracking branch origin/main into mb/TTAHUB-3635/TTAHUB-3…
thewatermethod Dec 5, 2024
1b41dcd
fix e2e for non montoring ar
AdamAdHocTeam Dec 5, 2024
aa21b80
Improve test cleanup
thewatermethod Dec 5, 2024
09187b2
fixes for both regular and citation path
AdamAdHocTeam Dec 5, 2024
7777e04
fix fe
AdamAdHocTeam Dec 5, 2024
b49f0ea
put back date oops
AdamAdHocTeam Dec 5, 2024
e5f5e62
add test coverage FE
AdamAdHocTeam Dec 5, 2024
d56f7d6
lint
AdamAdHocTeam Dec 5, 2024
f2d3dff
Add unit test
thewatermethod Dec 5, 2024
b5625f9
Update LDM
thewatermethod Dec 5, 2024
dcf1b41
fixes cleanup and FE test
AdamAdHocTeam Dec 5, 2024
9693549
update test
AdamAdHocTeam Dec 6, 2024
2c575c2
Merge branch 'main' into al-ttahub-3530-fe-for-ar-monitoring
thewatermethod Dec 6, 2024
955436c
Merge branch 'main' into al-ttahub-3603-activity-report-objective-cit…
thewatermethod Dec 6, 2024
347014b
Merge branch 'al-ttahub-3603-activity-report-objective-citations' int…
thewatermethod Dec 6, 2024
37c04bc
check standard instead of source per Matt
AdamAdHocTeam Dec 6, 2024
5976c53
Merge branch 'al-ttahub-3530-fe-for-ar-monitoring' of https://github.…
AdamAdHocTeam Dec 6, 2024
c1dde16
Merge branch 'main' into al-ttahub-3603-activity-report-objective-cit…
AdamAdHocTeam Dec 6, 2024
19f321d
Merge branch 'al-ttahub-3603-activity-report-objective-citations' of …
AdamAdHocTeam Dec 6, 2024
becf9e4
Merge branch 'al-ttahub-3603-activity-report-objective-citations' int…
AdamAdHocTeam Dec 6, 2024
aeaf2a8
add API to get citation text for drawers
thewatermethod Dec 6, 2024
2ba38c1
update goal template retrieve
AdamAdHocTeam Dec 6, 2024
fe606bb
Merge remote-tracking branch 'origin/main' into mb-get-text-by-citations
thewatermethod Dec 6, 2024
1785882
Revert change to cut-off date
thewatermethod Dec 6, 2024
ecc1e19
dont require user
AdamAdHocTeam Dec 6, 2024
6645cee
Update query
thewatermethod Dec 6, 2024
0fadddd
Merge branch 'main' into mb/TTAHUB-3635/TTAHUB-3637/monitoring-backend
thewatermethod Dec 6, 2024
398a59b
rework check for monitoring goal so we dont create moniotring goals f…
AdamAdHocTeam Dec 6, 2024
0ff128d
updates for citations
AdamAdHocTeam Dec 7, 2024
7383c7b
add citations to read only
AdamAdHocTeam Dec 7, 2024
e7fa0c3
remove comment for testing
AdamAdHocTeam Dec 7, 2024
c8274e3
fix FE tets
AdamAdHocTeam Dec 7, 2024
c802c3c
see if moving rollback fixes connection issue
AdamAdHocTeam Dec 7, 2024
5935449
remove unwanted change to get tests passing
AdamAdHocTeam Dec 7, 2024
2d8c220
update migration names
AdamAdHocTeam Dec 7, 2024
6a83824
merge latest parent
AdamAdHocTeam Dec 7, 2024
e3ad811
see if this fixes the sequelize close connection issue
AdamAdHocTeam Dec 9, 2024
2d22d8c
fix parens
AdamAdHocTeam Dec 9, 2024
f70ea78
Merge remote-tracking branch 'origin/al-ttahub-3530-fe-for-ar-monitor…
thewatermethod Dec 9, 2024
a5b129a
Merge pull request #2525 from HHS/mb-get-text-by-citations
thewatermethod Dec 9, 2024
a60b1be
Not started > Not Started
thewatermethod Dec 9, 2024
1890fa7
revert date change
thewatermethod Dec 9, 2024
7948c46
Update frontend/src/pages/ActivityReport/Pages/components/GoalPicker.js
AdamAdHocTeam Dec 9, 2024
fbbd76b
fix selected optiosn
AdamAdHocTeam Dec 9, 2024
5935437
Merge branch 'al-ttahub-3530-fe-for-ar-monitoring' of https://github.…
AdamAdHocTeam Dec 9, 2024
e5139aa
add missing import from git commit
AdamAdHocTeam Dec 9, 2024
f454213
change per Matt
AdamAdHocTeam Dec 9, 2024
2ca6a7d
Hide monitoring goals behind a feature flag
thewatermethod Dec 9, 2024
f7e37a3
Fix test
thewatermethod Dec 9, 2024
f13ef3d
Revert change
thewatermethod Dec 9, 2024
3fad940
actually fix script
thewatermethod Dec 9, 2024
3586184
Group by text and citation
thewatermethod Dec 9, 2024
4b39248
prevent changing source for monitoring template
AdamAdHocTeam Dec 9, 2024
8991969
Merge branch 'al-ttahub-3530-fe-for-ar-monitoring' of https://github.…
AdamAdHocTeam Dec 9, 2024
ad0a54c
Merge remote-tracking branch 'origin/main' into hide-monitoring-behin…
thewatermethod Dec 9, 2024
2d62eab
Update test
thewatermethod Dec 9, 2024
f4d8a85
Update more tests
thewatermethod Dec 9, 2024
c8db75f
fix fe test
AdamAdHocTeam Dec 9, 2024
4d05c48
Merge branch 'al-ttahub-3530-fe-for-ar-monitoring' into hide-monitori…
thewatermethod Dec 9, 2024
ced5c58
Merge pull request #2505 from HHS/al-ttahub-3530-fe-for-ar-monitoring
AdamAdHocTeam Dec 9, 2024
ddc8485
fix FE issue that would dupe citations and save aro citations json pe…
AdamAdHocTeam Dec 9, 2024
e2466d7
merge al-ttahub-3603-activity-report-objective-citations
thewatermethod Dec 10, 2024
bf88d30
Merge remote-tracking branch 'origin/al-ttahub-3603-activity-report-o…
thewatermethod Dec 10, 2024
fe11d81
Merge pull request #2530 from HHS/hide-monitoring-behind-a-feature-flag
thewatermethod Dec 10, 2024
9a94684
Merge pull request #2529 from HHS/mb/fix-monitoring-goals-script
thewatermethod Dec 10, 2024
62bd3c5
Update query to get ARO Citations
thewatermethod Dec 10, 2024
a618a6d
Remove "any" type
thewatermethod Dec 10, 2024
112f4e8
WIP
thewatermethod Dec 10, 2024
17da147
monitoring goal card
AdamAdHocTeam Dec 10, 2024
fac0986
fix tests
AdamAdHocTeam Dec 10, 2024
b892831
Fix BE test
AdamAdHocTeam Dec 10, 2024
0f59015
switch finding type to source
AdamAdHocTeam Dec 10, 2024
6422cef
fixes per UX
AdamAdHocTeam Dec 10, 2024
a6c4868
Merge remote-tracking branch 'origin/main' into mb/TTAHUB-3635/query-…
thewatermethod Dec 11, 2024
1263f0d
update FE test for new error logic
AdamAdHocTeam Dec 11, 2024
fcffafc
fix BE test
AdamAdHocTeam Dec 11, 2024
cacbd7b
lint
AdamAdHocTeam Dec 11, 2024
7d28ec9
Refactor backend
thewatermethod Dec 11, 2024
5ce953d
Merge remote-tracking branch 'origin/main' into mb/TTAHUB-3635/TTAHUB…
thewatermethod Dec 11, 2024
683d777
Merge branch 'main' into al-ttahub-3603-activity-report-objective-cit…
AdamAdHocTeam Dec 11, 2024
b4e5830
Merge branch al-ttahub-3529-monitoring-goal-card into mb/TTAHUB-3635/…
thewatermethod Dec 11, 2024
8c25b50
Fix AROCitation tests & rerun LDM
thewatermethod Dec 11, 2024
de7509f
update with Matts specialist tags component
AdamAdHocTeam Dec 11, 2024
1ccd512
Merge pull request #2533 from HHS/al-ttahub-3529-monitoring-goal-card
AdamAdHocTeam Dec 11, 2024
90059cd
Update tests
thewatermethod Dec 11, 2024
2b36a06
Merge remote-tracking branch origin/al-ttahub-3603-activity-report-ob…
thewatermethod Dec 11, 2024
8b1bab9
Update tests
thewatermethod Dec 11, 2024
b7ee914
missing monitoring goal warning
AdamAdHocTeam Dec 12, 2024
24a3256
Initial commit
thewatermethod Dec 12, 2024
f32f1c6
add test for approvedreport view
thewatermethod Dec 12, 2024
bc32cf7
add test for recipient review section
thewatermethod Dec 12, 2024
6297375
add test for component
thewatermethod Dec 12, 2024
cf55f23
Update e2e test
thewatermethod Dec 12, 2024
d132a8f
Merge branch 'main' into mb/TTAHUB-3532/review-and-approved-reports-s…
thewatermethod Dec 12, 2024
5e6d5f8
add test
AdamAdHocTeam Dec 12, 2024
93d297c
put back date
AdamAdHocTeam Dec 12, 2024
25d053e
Merge branch 'main' into al-ttahub-3603-activity-report-objective-cit…
AdamAdHocTeam Dec 12, 2024
2ff8191
Merge branch 'al-ttahub-3603-activity-report-objective-citations' int…
AdamAdHocTeam Dec 12, 2024
dec8e51
Merge pull request #2542 from HHS/mb/TTAHUB-3532/review-and-approved-…
thewatermethod Dec 12, 2024
48cdcdd
put back removed tests
AdamAdHocTeam Dec 12, 2024
ec8da05
Initial commit
thewatermethod Dec 13, 2024
0ffc99d
Add test for citation content drawer
thewatermethod Dec 13, 2024
f558c1f
Add test for fetcher
thewatermethod Dec 13, 2024
1652364
Add citation drawer to RTR
thewatermethod Dec 13, 2024
a3a9222
Revert citation fetch change
thewatermethod Dec 13, 2024
b624172
add missing message and prevent submitting on ar
AdamAdHocTeam Dec 13, 2024
e676ceb
lint
AdamAdHocTeam Dec 13, 2024
7bc1ee4
make sure alerts only show if we have one goal that is monitoring
AdamAdHocTeam Dec 13, 2024
e856a25
fix the issue Matt found of multiple citaitons for different grants n…
AdamAdHocTeam Dec 16, 2024
6227316
Fix multiple grant spacing ar review
thewatermethod Dec 16, 2024
af96d0a
Update capitalization and ensure order in citation service
thewatermethod Dec 16, 2024
e277bdf
simply check monitoring goal is linked to grant id
AdamAdHocTeam Dec 16, 2024
889c019
Merge pull request #2541 from HHS/al-ttahub-monitoring-goal-warnings
AdamAdHocTeam Dec 16, 2024
d1963a8
add warnings to goal and objectives page
AdamAdHocTeam Dec 17, 2024
ea84764
add submit alert
AdamAdHocTeam Dec 17, 2024
ae3ac83
Update with required join
thewatermethod Dec 17, 2024
0aa9df4
Merge branch 'main' into mb/TTAHUB-3635/TTAHUB-3637/monitoring-backend
thewatermethod Dec 17, 2024
de3c270
fix BE issue and cleanup code
AdamAdHocTeam Dec 17, 2024
2e59097
Merge branch 'al-ttahub-3603-activity-report-objective-citations' int…
thewatermethod Dec 17, 2024
d411afb
fix if current of previous objective doesnt have citations
AdamAdHocTeam Dec 17, 2024
54990cb
Merge remote-tracking branch 'origin/al-ttahub-3603-activity-report-o…
thewatermethod Dec 17, 2024
9e43a1e
fix test
AdamAdHocTeam Dec 17, 2024
6b30633
fix weird pop up citations on objective
AdamAdHocTeam Dec 17, 2024
7c5a1e5
remove console logs
thewatermethod Dec 17, 2024
81a91b9
prevent submit
AdamAdHocTeam Dec 17, 2024
f0b292a
cleanup per Matt
AdamAdHocTeam Dec 17, 2024
685b958
Merge pull request #2547 from HHS/al-ttahub-3627-add-citation-alerts
AdamAdHocTeam Dec 17, 2024
3510287
Merge pull request #2546 from HHS/mb/TTAHUB-3531/citation-drawer
thewatermethod Dec 18, 2024
ac32d48
update test w citations
thewatermethod Dec 18, 2024
4dee22f
Fix date formats
thewatermethod Dec 18, 2024
ad36775
fix dates
AdamAdHocTeam Dec 18, 2024
9b9c030
per Matt add supsended to reactivate
AdamAdHocTeam Dec 19, 2024
7cd16b2
Merge branch 'al-ttahub-3603-activity-report-objective-citations' of …
AdamAdHocTeam Dec 19, 2024
ab4223b
fix cleanup bug and existing bug that created extra objectives
AdamAdHocTeam Dec 19, 2024
366f2a6
Merge pull request #2507 from HHS/mb/TTAHUB-3635/TTAHUB-3637/monitori…
thewatermethod Dec 19, 2024
459129e
Add additional test coverage
thewatermethod Dec 19, 2024
5fd7778
Whoops remove console
thewatermethod Dec 19, 2024
5588a31
Fix test order problem
thewatermethod Dec 19, 2024
3959e29
add users policy test
thewatermethod Dec 19, 2024
cf460fc
add test coverage for reduceGoals
AdamAdHocTeam Dec 19, 2024
261fe5d
Merge branch 'al-ttahub-3603-activity-report-objective-citations' of …
AdamAdHocTeam Dec 19, 2024
5e74165
Add model tests for AROCitation
thewatermethod Dec 19, 2024
7f03c9c
Merge remote-tracking branch 'origin/al-ttahub-3603-activity-report-o…
thewatermethod Dec 19, 2024
076f7cc
Merge branch 'main' into al-ttahub-3603-activity-report-objective-cit…
AdamAdHocTeam Dec 19, 2024
e757593
fix extra comma in bad merge
AdamAdHocTeam Dec 19, 2024
91e1d5f
deploy to sandbox
AdamAdHocTeam Dec 19, 2024
2e73e7a
push back dates for testing on SB
AdamAdHocTeam Dec 20, 2024
cc72c9a
Add support for grants with monitoring from a grant that was replaced
GarrettEHill Dec 21, 2024
3faa352
ssdi query to use for identifying grants to use for testing
GarrettEHill Dec 21, 2024
963f109
add a test to ensure we are returning citations from the replaced grants
AdamAdHocTeam Dec 23, 2024
2b50bd3
Merge branch 'main' into al-ttahub-3603-activity-report-objective-cit…
GarrettEHill Dec 23, 2024
148d05e
Update grants-with-citations.sql
GarrettEHill Dec 30, 2024
1c75ab3
Match delivery date to citation date
thewatermethod Jan 2, 2025
5b2b0d5
Adjust date in seeders
thewatermethod Jan 2, 2025
41f2cfb
Update test helpers
thewatermethod Jan 2, 2025
a1e1511
Update some additional tests
thewatermethod Jan 2, 2025
8db9577
Sort reviews and citations
thewatermethod Jan 2, 2025
9f23981
Alter review sort
thewatermethod Jan 2, 2025
fcac485
Deploy to main
thewatermethod Jan 2, 2025
4c84c5a
check for false on monitoring
AdamAdHocTeam Jan 3, 2025
bfd6757
Merge branch 'al-ttahub-3603-activity-report-objective-citations' of …
AdamAdHocTeam Jan 3, 2025
d90b82d
Initial pass
thewatermethod Jan 7, 2025
f9e4f27
sql for setting closed goals with some tests
AdamAdHocTeam Jan 9, 2025
eb085ed
rename migrations
AdamAdHocTeam Jan 9, 2025
1f4b47f
per Garrett we need to update goals using hooks
AdamAdHocTeam Jan 9, 2025
ab74aba
Update monitoring test
thewatermethod Jan 10, 2025
b73ee3b
Update migration
thewatermethod Jan 10, 2025
ca46b9b
Update frontend tests
thewatermethod Jan 10, 2025
0ecbe6b
Update migration timestamps
thewatermethod Jan 10, 2025
2b388d4
Check for recipient data
thewatermethod Jan 10, 2025
a7d24b7
add Garretts changes with fix
AdamAdHocTeam Jan 13, 2025
b7b1f7c
update code and test
AdamAdHocTeam Jan 13, 2025
f9da545
change things a bit to allow null user for status change
AdamAdHocTeam Jan 13, 2025
3b43cbc
implemented agreed upon solution
AdamAdHocTeam Jan 14, 2025
68edc6f
Merge pull request #2589 from HHS/al-ttahub-3757-close-monitoring-goals
AdamAdHocTeam Jan 15, 2025
901bd4f
Remove abort controller
thewatermethod Jan 15, 2025
dd74679
Refactor to use custom hook instead of managing with abort controller
thewatermethod Jan 15, 2025
8d2d167
Merge pull request #2590 from HHS/mb/TTAHUB-3758/TTAHUB-3759/loading-…
thewatermethod Jan 15, 2025
88d45c8
add validation to check and rollback start date if before selected ci…
AdamAdHocTeam Jan 15, 2025
ff30751
fix null bug on filter
AdamAdHocTeam Jan 15, 2025
f999b5b
not sure how this ever would have passed
AdamAdHocTeam Jan 16, 2025
f00130d
rename migrations
AdamAdHocTeam Jan 16, 2025
2f0f41a
set initial start date
AdamAdHocTeam Jan 16, 2025
56ba92b
Merge pull request #2597 from HHS/al-ttahub-3800-citation-start-date-…
AdamAdHocTeam Jan 16, 2025
c258dbc
Merge branch 'main' into al-ttahub-3603-activity-report-objective-cit…
AdamAdHocTeam Jan 16, 2025
f56a309
check before running
AdamAdHocTeam Jan 16, 2025
70e1f8c
remove duplicate migrations
AdamAdHocTeam Jan 17, 2025
471a683
see if tests pass
AdamAdHocTeam Jan 17, 2025
c38d33b
make cutoff date today
AdamAdHocTeam Jan 21, 2025
4b8d250
Confirm fix with test
thewatermethod Jan 21, 2025
87a312a
Its now the year 2025 lol
AdamAdHocTeam Jan 21, 2025
fddf3fa
Update some tests
thewatermethod Jan 21, 2025
dd6675b
Old tests now broken
thewatermethod Jan 21, 2025
efd2f40
put back envs to what they were before testing party
AdamAdHocTeam Jan 21, 2025
0b93801
Fix final unit test, hopefully
thewatermethod Jan 21, 2025
55c45a7
add Nathans comment
AdamAdHocTeam Jan 21, 2025
b784d62
Merge pull request #2601 from HHS/mb/TTAHUB-3603/fix-rtr-cut-off-date
thewatermethod Jan 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/logical_data_model.encoded

Large diffs are not rendered by default.

28 changes: 27 additions & 1 deletion docs/logical_data_model.puml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,15 @@ class ActivityReportGoals{
timeframe : text
}

class ActivityReportObjectiveCitations{
* id : integer : <generated>
* activityReportObjectiveId : integer
* citation : text
* createdAt : timestamp with time zone : now()
* monitoringReferences : jsonb
* updatedAt : timestamp with time zone : now()
}

class ActivityReportObjectiveCourses{
* id : integer : <generated>
* activityReportObjectiveId : integer : REFERENCES "ActivityReportObjectives".id
Expand Down Expand Up @@ -403,6 +412,7 @@ class GoalTemplates{
* updatedAt : timestamp with time zone
lastUsed : timestamp with time zone
source : varchar(255)
standard : text
}

class Goals{
Expand Down Expand Up @@ -541,6 +551,7 @@ class Imports{
* updatedAt : timestamp with time zone
fileMask : text
path : text
postProcessingActions : jsonb
}

class MailerLogs{
Expand Down Expand Up @@ -1242,6 +1253,20 @@ class ZALActivityReportGoals{
session_sig : text
}

class ZALActivityReportObjectiveCitations{
* id : bigint : <generated>
* data_id : bigint
* dml_as : bigint
* dml_by : bigint
* dml_timestamp : timestamp with time zone
* dml_txid : uuid
* dml_type : enum
descriptor_id : integer
new_row_data : jsonb
old_row_data : jsonb
session_sig : text
}

class ZALActivityReportObjectiveCourses{
* id : bigint : <generated>
* data_id : bigint
Expand Down Expand Up @@ -2483,6 +2508,7 @@ Grants "1" --[#black,plain,thickness=2]-- "1" GrantNumberLinks : grant, grantNum
ActivityReportCollaborators "1" --[#black,dashed,thickness=2]--{ "n" CollaboratorRoles : collaboratorRoles, activityReportCollaborator
ActivityReportGoals "1" --[#black,dashed,thickness=2]--{ "n" ActivityReportGoalFieldResponses : activityReportGoal, activityReportGoalFieldResponses
ActivityReportGoals "1" --[#black,dashed,thickness=2]--{ "n" ActivityReportGoalResources : activityReportGoal, activityReportGoalResources
ActivityReportObjectives "1" --[#black,dashed,thickness=2]--{ "n" ActivityReportObjectiveCitations : activityReportObjective, activityReportObjectiveCitations
ActivityReportObjectives "1" --[#black,dashed,thickness=2]--{ "n" ActivityReportObjectiveCourses : activityReportObjective, activityReportObjectiveCourses
ActivityReportObjectives "1" --[#black,dashed,thickness=2]--{ "n" ActivityReportObjectiveFiles : activityReportObjective, activityReportObjectiveFiles
ActivityReportObjectives "1" --[#black,dashed,thickness=2]--{ "n" ActivityReportObjectiveResources : activityReportObjective, activityReportObjectiveResources
Expand Down Expand Up @@ -2560,7 +2586,7 @@ MonitoringReviewLinks "1" --[#black,dashed,thickness=2]--{ "n" MonitoringReview
MonitoringReviewStatusLinks "1" --[#black,dashed,thickness=2]--{ "n" MonitoringReviewStatuses : monitoringReviewStatuses, statusLink
MonitoringReviewStatusLinks "1" --[#black,dashed,thickness=2]--{ "n" MonitoringReviews : monitoringReviews, statusLink
MonitoringStandardLinks "1" --[#black,dashed,thickness=2]--{ "n" MonitoringFindingStandards : statusLink, monitoringFindingStandards
MonitoringStandardLinks "1" --[#black,dashed,thickness=2]--{ "n" MonitoringStandards : monitoringStandardes, statusLink
MonitoringStandardLinks "1" --[#black,dashed,thickness=2]--{ "n" MonitoringStandards : monitoringStandards, statusLink
NationalCenters "1" --[#black,dashed,thickness=2]--{ "n" EventReportPilotNationalCenterUsers : nationalCenter, eventReportPilotNationalCenterUsers
NationalCenters "1" --[#black,dashed,thickness=2]--{ "n" NationalCenterUsers : nationalCenter, nationalCenterUsers
NationalCenters "1" --[#black,dashed,thickness=2]--{ "n" NationalCenters : mapsToNationalCenter, mapsFromNationalCenters
Expand Down
37 changes: 37 additions & 0 deletions frontend/src/components/CitationDrawerContent.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import { uniqueId } from 'lodash';
import { fetchCitationTextByName } from '../fetchers/citations';

export default function CitationDrawerContent({ citations }) {
const [content, setContent] = useState([]); // { text: string, citation: string }[]

useEffect(() => {
async function fetchCitations() {
try {
const response = await fetchCitationTextByName(citations);
setContent(response);
} catch (err) {
// eslint-disable-next-line no-console
console.error(err);
}
}

fetchCitations();
}, [citations]);

return (
<div>
{content.map((standard) => (
<div key={uniqueId('citation-drawer-content-citation-')} className="margin-bottom-3">
<p className="text-bold usa-prose margin-0">{standard.citation}</p>
<p className="usa-prose margin-0">{standard.text}</p>
</div>
))}
</div>
);
}

CitationDrawerContent.propTypes = {
citations: PropTypes.arrayOf(PropTypes.string).isRequired,
};
35 changes: 35 additions & 0 deletions frontend/src/components/GoalCards/EnteredBy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import React from 'react';
import PropTypes from 'prop-types';
import Tooltip from '../Tooltip';

const EnteredBy = ({
goalNumber, creatorRole, creatorName, moreThanOne,
}) => (
<>
<p key={goalNumber} className="usa-prose margin-top-0 margin-bottom-1 bg-base-lightest radius-md padding-x-1 display-inline-flex flex-align-center flex-justify-between text-decoration-underline">
{moreThanOne && (
<>
<strong className="margin-right-1 text-no-wrap">{goalNumber}</strong>
{' '}
</>
)}
<Tooltip
displayText={creatorRole}
screenReadDisplayText={false}
buttonLabel={`reveal the full name of the creator of this goal: ${goalNumber}`}
tooltipText={creatorName}
underlineStyle="solid"
className="ttahub-goal-card__entered-by-tooltip"
/>
</p>
</>
);

EnteredBy.propTypes = {
goalNumber: PropTypes.string.isRequired,
creatorRole: PropTypes.string.isRequired,
creatorName: PropTypes.string.isRequired,
moreThanOne: PropTypes.bool.isRequired,
};

export default EnteredBy;
44 changes: 37 additions & 7 deletions frontend/src/components/GoalCards/GoalCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ export const ObjectiveSwitch = ({
regionId,
goalStatus,
dispatchStatusChange,
isMonitoringGoal,
}) => (
<ObjectiveCard
objective={objective}
objectivesExpanded={objectivesExpanded}
goalStatus={goalStatus}
regionId={regionId}
dispatchStatusChange={dispatchStatusChange}
isMonitoringGoal={isMonitoringGoal}
/>
);

Expand All @@ -54,6 +56,7 @@ ObjectiveSwitch.propTypes = {
regionId: PropTypes.number.isRequired,
goalStatus: PropTypes.string.isRequired,
dispatchStatusChange: PropTypes.func.isRequired,
isMonitoringGoal: PropTypes.bool.isRequired,
};

export default function GoalCard({
Expand Down Expand Up @@ -86,6 +89,14 @@ export default function GoalCard({
isReopenedGoal,
} = goal;

// Check for monitoring goal.
const reasonsToMonitor = [...reasons];
let isMonitoringGoal = false;
if (goal.createdVia === 'monitoring') {
reasonsToMonitor.push('Monitoring Goal');
isMonitoringGoal = true;
}

const { user } = useContext(UserContext);
const { setIsAppLoading } = useContext(AppLoadingContext);
const [invalidStatusChangeAttempted, setInvalidStatusChangeAttempted] = useState();
Expand Down Expand Up @@ -206,6 +217,27 @@ export default function GoalCard({
return responses.map((r) => r).join(', ');
};

const renderEnteredBy = () => {
if (isMonitoringGoal) {
return (
<SpecialistTags
specialists={[{
name: 'System-generated',
roles: ['OHS'],
}]}
/>
);
}
return (
<SpecialistTags
specialists={collaborators.filter((c) => c.goalCreatorName).map((c) => ({
name: c.goalCreatorName,
roles: [c.goalCreatorRoles].flat(),
}))}
/>
);
};

return (
<DataCard
testId="goalCard"
Expand Down Expand Up @@ -265,7 +297,7 @@ export default function GoalCard({
{goalText}
{' '}
<FlagStatus
reasons={reasons}
reasons={reasonsToMonitor}
goalNumbers={goalNumbers}
/>
</p>
Expand Down Expand Up @@ -298,12 +330,9 @@ export default function GoalCard({
</div>
<div className="ttahub-goal-card__goal-column ttahub-goal-card__goal-column__entered-by padding-right-3">
<p className="usa-prose text-bold margin-y-0">Entered by</p>
<SpecialistTags
specialists={collaborators.filter((c) => c.goalCreatorName).map((c) => ({
name: c.goalCreatorName,
roles: [c.goalCreatorRoles].flat(),
}))}
/>
{
renderEnteredBy()
}
</div>
</div>

Expand All @@ -324,6 +353,7 @@ export default function GoalCard({
goalStatus={goalStatus}
regionId={parseInt(regionId, DECIMAL_BASE)}
dispatchStatusChange={dispatchStatusChange}
isMonitoringGoal={isMonitoringGoal}
/>
))}
</DataCard>
Expand Down
1 change: 0 additions & 1 deletion frontend/src/components/GoalCards/GoalCard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ $max-width-date-column: 50%;
@media(min-width: 1475px) {

.ttahub-goal-card__goal-column__goal-source p {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
max-width: 220px;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/GoalCards/ObjectiveCard.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
it was wrapping at minw-15)
**/
.ttahub-goal-card__objective-list li span:first-child {
min-width: 130px;
min-width: 140px;
}
13 changes: 13 additions & 0 deletions frontend/src/components/GoalCards/ObjectiveCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ function ObjectiveCard({
regionId,
dispatchStatusChange,
forceReadOnly,
isMonitoringGoal,
}) {
const {
title,
Expand All @@ -31,6 +32,7 @@ function ObjectiveCard({
activityReports,
supportType,
ids,
citations,
} = objective;
const modalRef = useRef(null);
const [localStatus, setLocalStatus] = useState(status || 'Not Started');
Expand Down Expand Up @@ -106,6 +108,14 @@ function ObjectiveCard({
<span className="margin-right-3 desktop:text-normal text-bold">Objective </span>
<div>{title}</div>
</li>
{
isMonitoringGoal && (
<li className="desktop:display-flex padding-bottom-05 flex-align-start">
<span className="margin-right-3 desktop:text-normal text-bold">Citations addressed </span>
<div>{citations.join(', ')}</div>
</li>
)
}
<li className="desktop:display-flex padding-bottom-05 flex-align-start">
<span className="margin-right-3 desktop:text-normal text-bold">Activity reports </span>
<ul className="usa-list usa-list--unstyled">
Expand Down Expand Up @@ -205,6 +215,7 @@ export const objectivePropTypes = PropTypes.shape({
id: PropTypes.number,
name: PropTypes.string,
})),
citations: PropTypes.arrayOf(PropTypes.string),
supportType: PropTypes.string,
ids: PropTypes.arrayOf(PropTypes.number).isRequired,
});
Expand All @@ -221,6 +232,7 @@ objectivePropTypes.defaultProps = {
ObjectiveCard.propTypes = {
objective: objectivePropTypes.isRequired,
objectivesExpanded: PropTypes.bool.isRequired,
isMonitoringGoal: PropTypes.bool,
goalStatus: PropTypes.string,
regionId: PropTypes.number.isRequired,
dispatchStatusChange: PropTypes.func,
Expand All @@ -231,6 +243,7 @@ ObjectiveCard.defaultProps = {
dispatchStatusChange: () => {},
goalStatus: null,
forceReadOnly: false,
isMonitoringGoal: false,
};

export default ObjectiveCard;
22 changes: 22 additions & 0 deletions frontend/src/components/GoalCards/__tests__/GoalCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ describe('GoalCard', () => {
activityReports: [],
grantNumbers: ['G-1'],
topics: [],
citations: [],
},
{
id: 2,
Expand All @@ -55,6 +56,7 @@ describe('GoalCard', () => {
activityReports: [],
grantNumbers: ['G-1'],
topics: [],
citations: [],
},
],
previousStatus: null,
Expand Down Expand Up @@ -127,6 +129,20 @@ describe('GoalCard', () => {
expect(objectives.length).toBe(2);
});

it('shows the monitoring flag when the goal creatdVia is monitoring', () => {
renderGoalCard({ }, { ...goal, createdVia: 'monitoring' });
const monitoringToolTip = screen.getByRole('button', {
name: /reason for flag on goal g-1 is monitoring\. click button to visually reveal this information\./i,
});
expect(monitoringToolTip).toBeInTheDocument();
});

it('shows entered by as OHS when the goal createdVia is monitoring', () => {
renderGoalCard({ }, { ...goal, createdVia: 'monitoring' });
expect(screen.getByText(/entered by/i)).toBeInTheDocument();
expect(screen.getByText(/OHS/i)).toBeInTheDocument();
});

it('shows goal source', () => {
renderGoalCard();

Expand Down Expand Up @@ -396,6 +412,7 @@ describe('GoalCard', () => {
activityReports: [],
grantNumbers: ['G-1'],
topics: [],
citations: [],
},
{
id: 2,
Expand All @@ -408,6 +425,7 @@ describe('GoalCard', () => {
activityReports: [],
grantNumbers: ['G-2'],
topics: [],
citations: [],
},
],
};
Expand Down Expand Up @@ -445,6 +463,7 @@ describe('GoalCard', () => {
activityReports: [],
grantNumbers: ['G-1'],
topics: [],
citations: [],
ids: [1],
},
{
Expand All @@ -459,6 +478,7 @@ describe('GoalCard', () => {
activityReports: [],
grantNumbers: ['G-2'],
topics: [],
citations: [],
},
],
};
Expand Down Expand Up @@ -495,6 +515,7 @@ describe('GoalCard', () => {
activityReports: [],
grantNumbers: ['G-1'],
topics: [],
citations: [],
ids: [1],
},
{
Expand All @@ -509,6 +530,7 @@ describe('GoalCard', () => {
activityReports: [],
grantNumbers: ['G-2'],
topics: [],
citations: [],
},
],
};
Expand Down
Loading