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

[MDS-5583] View Report #2885

Merged
merged 13 commits into from
Jan 15, 2024
Merged

[MDS-5583] View Report #2885

merged 13 commits into from
Jan 15, 2024

Conversation

taraepp
Copy link
Collaborator

@taraepp taraepp commented Jan 15, 2024

Objective

  • brand new page for the report view since we're not on a modal anymore
  • move document table stuff to common so we can use it without making it a prop (there are notes in the code where there were differences between Core & MS versions, but nothing I saw looked major)
  • bring over dataMocks and give some mock data to the view form.
  • adding in initialValues, dealing with any resulting bugs
  • currently just console logging the values on submit

NOTE: report type & report name are a bit broken right now. This is expected and there's another ticket where this should be handled (5662 I think?)

MDS-5583

…t record on that page. Already had the endpoint there, but no 'get' of a single record. Made a couple files typescript. Make the link to the new page from the 'view' on the table
…itialValues for the form, pass them in. Update Callout to tsx
… picking the previous year, pass the right form values to ReportFilesTable, do submission handling on the ReportPage
…y of mine reports, too) and give some initial values to view report form to test that all out
@@ -38,6 +46,12 @@ const reportReducerObject = {
export const getReports = (state) => state[REPORTS].reports;
export const getReportsPageData = (state) => state[REPORTS].reportsPageData;
export const getMineReports = (state) => state[REPORTS].mineReports;
export const getMineReportById = (state, reportGuid) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this function used to get the latest report or the first report ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is meant to get the whole report, including all submissions.

useEffect(() => {
if (!mine || mine.mine_guid !== mineGuid) {
dispatch(fetchMineRecordById(mineGuid));
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the logic here can be moved to the other useEffect on line 38 since the useEffect gets triggered when either reportGuid or mineGuid changes ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, yeah, I think I can. 👍

Copy link
Contributor

@henryoforeh-dev henryoforeh-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Copy link
Collaborator

@simensma-fresh simensma-fresh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yayy for more things in the common folder! 🙌

@taraepp taraepp merged commit f3cbdc5 into develop Jan 15, 2024
10 checks passed
@taraepp taraepp deleted the mds-5583-view-report branch January 15, 2024 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants