eAPD
eAPD copied to clipboard
[Feature] Update the state dashboard
Description and related issues
Update the state Dashboard:
- Remove intro/help text copy
- Group APDs by Funding Source (i.e: MMIS, HITECH, etc.), if there are not APDs for a Funding Source do not show that group
- Update the APD item to show:
- APD name (should still be a link to the APD)
- Tag of FFY | Years range
- Last edited (formated Month Day, Year, Hours:Minutes Timezone)
- Last edited by (display name of last user to edit APD)
- Created (formatted Month Day, Year)
Behind the scenes
The APD schema needs to be updated to hold the last updated by information. It should store the user's username (EUA ID) and their displayName. The APD patch endpoint needs to be updated to save the user's information when they update.
The query to retrieve the list of APDs needs to be updated to group the APDs by funding source and sort them by the last edited datetime desc. It could either be done as a single query:
APD.aggregate([
{ $sort: { "updatedAt": -1 } },
{ $group: {
_id: "$__t",
apds: {
$push: "$$ROOT"
}
}}
])
Or query each APD type and sort it by updatedAt:
HITECH.find().sort('updatedAt', -1);
MMIS.find().sort('updatedAt', -1);
Mockups or link to Figma
Design issue #3919, #2456 https://www.figma.com/file/hJpKHKU6fz5J0Z7fisSwa2/eAPD-MMIS-2022?node-id=4314:19558&t=vuMZzMMCiiptEiQy-0
This task is done when…
- [ ] update APD schema to save user information (username, displayName)
- [ ] updating the APD saves the users information
- [ ] retrieving the APD list groups APDs by funding source and sorts them by last edited date within those groups
- [ ] the dashboard displays the information above as presented in the figma
Testing Criteria
Given | When | Then |
---|---|---|
the patch APD endpoint | saving to the APD | the user information is saved to the APD |
the get APDs endpoint | called for a state | the APDs are retrieved grouped by Funding Source |
eAPD state dashboard | on the dashboard | intro/help text is removed |
eAPD state dashboard | on the dashboard | APDs are grouped by Funding Source (HITECH, MMIS) |
eAPD state dashboard | on the dashboard | Each APD should display APD name, tag of FFY's, last edited by, and date of creation |
eAPD state dashboard | an APD has been updated | The APD information in the dashboard should update to reflect the change |
I've been looking into this track changes issue. I've found a plugin that we can use and looks pretty simple the implement. It lets us do all the things that we need for track changes and rolling back. I'm going to propose for the sake of retrieving the last edited by and on though, that we just keep those values right in the APD and keep overwriting them with changes. That way we don't have to do some complicated retrieval process for every APD in the list. See #4059
Closing per Tiff, being addressed through new tickets.
One minor clarification in the acceptance criteria.
Looks great to me @mirano-darren