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

Chore/512 pulp paper compliance exception #3059

Merged
merged 12 commits into from
Mar 28, 2025

Conversation

dleard
Copy link
Contributor

@dleard dleard commented Mar 20, 2025

This PR implements handling an exception for Pulp & Paper. Issue 512

On the Frontend it should:

  • throw a validation error on the Production page if:
    • the activity Pulp & paper is reported,
    • there are emissions reported that are categorized as both industrial process & excluded
    • and the chemical pulp product is not reported
  • throw a validation error on the Emission allocation page if:
    • the activity Pulp & paper is reported,
    • there are emissions reported that are categorized as both industrial process & excluded
    • and chemical pulp product is not reported OR if the amount allocated to chemical pulp - sum of emissions categorized as both industrial process & excluded is less than 0.

On the Backend it should:

  • Subtract the total of emissions categorized as both industrial process & excluded from the total industrial process emissions allocated to the chemical pulp product

@dleard dleard force-pushed the chore/512-pulp-paper-compliance-exception branch from 1835c81 to 7b2dc15 Compare March 20, 2025 22:25
@dleard dleard marked this pull request as ready for review March 21, 2025 20:58
@dleard dleard force-pushed the chore/512-pulp-paper-compliance-exception branch from 3c5faaa to 5e8edef Compare March 21, 2025 20:58
@dleard dleard force-pushed the chore/512-pulp-paper-compliance-exception branch 3 times, most recently from 46883c0 to bf4384d Compare March 26, 2025 20:31
Copy link
Contributor

@pbastia pbastia left a comment

Choose a reason for hiding this comment

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

Very nice!

*/
if (isPulpAndPaper && overlappingIndustrialProcessEmissions > 0) {
if (!data.product_selection.includes("Pulp and paper: chemical pulp")) {
setErrors(["Missing Product: 'Pulp and paper: chemical pulp'"]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add to the message: "Please add the product on the operation or facility information page" ?

@dleard dleard force-pushed the chore/512-pulp-paper-compliance-exception branch from bf4384d to dc1367e Compare March 28, 2025 18:01
@dleard dleard merged commit db4b358 into develop Mar 28, 2025
23 checks passed
@dleard dleard deleted the chore/512-pulp-paper-compliance-exception branch March 28, 2025 18:21
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.

2 participants