-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feat/clearer diffs #1910
Merged
Merged
Feat/clearer diffs #1910
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
daed4ae
feat: switch diff fields to only show the latest committed, and what …
mikevespi 8c17611
chore: remove the oldData from the summary form pages
mikevespi 57a8439
test: update test cases, except for 0 handling
mikevespi 39b5183
chore: fix the project status showing showing Not Entered for enterd …
mikevespi 028d1a7
test: update form diff tests
mikevespi 3d8e868
chore: linting
mikevespi b2b8e5c
test: update test data in project form summary test to be latest comm…
mikevespi 6af5a63
test: fix project form summary tests to use latest committed data
mikevespi e4e9552
chore: switch contact summary form to use latest committed data only …
mikevespi ff88327
test: update manager and contact form summary tests to use latest com…
mikevespi 333cc25
test: update manager form summary tests
mikevespi c148a65
chore: cleanup unused fields
mikevespi 0e9b401
chore: update getFilteredSchema to require latest committed form change
mikevespi d55c607
chore: use latest committed form data with getFilteredSchema in annua…
mikevespi 5d58192
test: use latest committed data for annual report summary tests
mikevespi c8b8790
chore: pre-commit run
mikevespi f50cb73
chore: fix incomplete reference in annual report form summary
mikevespi 3aadc2a
chore: pass latest committed data to getFilteredSchema in quarterly r…
mikevespi 5f9c67f
test: use latest committed form data in quarterly summary test
mikevespi daff5a2
chore: precommit run
mikevespi 5c44705
chore: add latest committed data to getFilteredSchema call in Project…
mikevespi 75e45b0
test: use latest committed data in quarterly summary test
mikevespi 625f2c3
test: use latest committed data in emission intensity summary
mikevespi a09a6d9
chore: use latest committed data to filter milestone schemas
mikevespi 770f85e
test: use latest committed data inmilestone summary tests
mikevespi 0a50060
test: use latest committed data in collapsible form widget test
mikevespi 8882143
chore: pre-commit run
mikevespi cfe1807
chore: fix filter on TEIMP summary query
mikevespi bca9aa1
chore: add attachments being archived to the summary page
mikevespi 37928cf
chore: linting
mikevespi 62785eb
test: add test for archived attachments in attachment summary form tests
mikevespi 29a47b7
chore: missing dependency in useMemo call
mikevespi 9c065d0
chore: update comments to no longer reflect 3 diffs scenario
mikevespi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,18 +51,12 @@ const ProjectEmissionsIntensityReportFormSummary: React.FC<Props> = ({ | |
formByJsonSchemaName { | ||
jsonSchema | ||
} | ||
formChangeByPreviousFormChangeId { | ||
newFormData | ||
calculatedEiPerformance | ||
paymentPercentage | ||
maximumPerformanceMilestoneAmount | ||
actualPerformanceMilestoneAmount | ||
} | ||
} | ||
} | ||
} | ||
latestCommittedEmissionIntensityReportFormChange: latestCommittedFormChangesFor( | ||
formDataTableName: "emission_intensity_report" | ||
formDataTableName: "reporting_requirement" | ||
reportType: "TEIMP" | ||
Comment on lines
+58
to
+59
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was a bug the whole time, right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was, so these would always have been showing up as new and the previous data in tests was always empty |
||
) { | ||
edges { | ||
node { | ||
|
@@ -97,24 +91,6 @@ const ProjectEmissionsIntensityReportFormSummary: React.FC<Props> = ({ | |
summaryReportingRequirement?.actualPerformanceMilestoneAmount, | ||
}; | ||
|
||
const oldData = { | ||
...summaryReportingRequirement?.formChangeByPreviousFormChangeId | ||
?.newFormData, | ||
//calculated values | ||
calculatedEiPerformance: | ||
summaryReportingRequirement?.formChangeByPreviousFormChangeId | ||
?.calculatedEiPerformance, | ||
paymentPercentage: | ||
summaryReportingRequirement?.formChangeByPreviousFormChangeId | ||
?.paymentPercentage, | ||
maximumPerformanceMilestoneAmount: | ||
summaryReportingRequirement?.formChangeByPreviousFormChangeId | ||
?.maximumPerformanceMilestoneAmount, | ||
actualPerformanceMilestoneAmount: | ||
summaryReportingRequirement?.formChangeByPreviousFormChangeId | ||
?.actualPerformanceMilestoneAmount, | ||
}; | ||
|
||
const latestCommittedData = { | ||
...latestCommittedEmissionIntensityReportFormChange?.edges[0]?.node | ||
?.newFormData, | ||
|
@@ -147,7 +123,7 @@ const ProjectEmissionsIntensityReportFormSummary: React.FC<Props> = ({ | |
const filteredSchema = getSchemaAndDataIncludingCalculatedValues( | ||
emissionIntensityFormBySlug.jsonSchema.schema as JSONSchema7, | ||
newData, | ||
oldData, | ||
latestCommittedData, | ||
{ | ||
// This is only to add the (Adjusted) to the title of the field to differentiate it from the calculated field | ||
adjustedEmissionsIntensityPerformance: { | ||
|
@@ -265,7 +241,6 @@ const ProjectEmissionsIntensityReportFormSummary: React.FC<Props> = ({ | |
actualPerformanceMilestoneAmount: | ||
summaryReportingRequirement?.actualPerformanceMilestoneAmount, | ||
operation: summaryReportingRequirement?.operation, | ||
oldData, | ||
latestCommittedData, | ||
isAmendmentsAndOtherRevisionsSpecific: | ||
isOnAmendmentsAndOtherRevisionsPage, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! This will help clarify for our users