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

feat: [#188645598] add environmental questionnaire for land #9207

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

somabadri
Copy link
Contributor

@somabadri somabadri commented Dec 3, 2024

Description

Ticket

This pull request resolves #188645598.

Approach

  • this builds off the work done for environmental questionnaire for waste
  • created components that dynamically render content and update userData based on media area
  • added migration v151 which adds land to environmentData

Steps to Test

  • Onboard as a new business
  • Select All other businesses for industry
  • You should now see the Waste Task under step 3 of the roadmap

Notes

Code author checklist

  • I have rebased this branch from the latest main branch
  • I have performed a self-review of my code
  • I have created and/or updated relevant documentation on the engineering documentation website
  • I have not used any relative imports
  • I have pruned any instances of unused code
  • I have not added any markdown to labels, titles and button text in config
  • If I added/updated any values in userData (including profileData, formationData etc), then I added a new migration file
  • I have checked for and removed instances of unused config from CMS
  • If I added any new collections to the CMS config, then I updated the search tool and cmsCollections.ts (see CMS Additions in Engineering Reference/FAQ on the engineering documentation site)
  • I have updated relevant .env values in both .env-template and in Bitwarden

@somabadri somabadri force-pushed the check-env-req-land branch 3 times, most recently from 4eb035b to 0e176b3 Compare December 14, 2024 00:18
@somabadri somabadri force-pushed the check-env-req-land branch 7 times, most recently from c6eff32 to f1f077d Compare December 18, 2024 01:40
@somabadri somabadri marked this pull request as ready for review December 18, 2024 02:04
@somabadri somabadri force-pushed the check-env-req-land branch 2 times, most recently from a16c64a to d9cac7b Compare December 19, 2024 00:22
Copy link
Contributor

@adidner adidner left a comment

Choose a reason for hiding this comment

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

Man this was complicated. So great work in that regard parsing through it all.

I have a few dust food for comment thoughts and a few minor refactor sand things but honestly they're pretty nit picky and I think you're largely good to go. Nice job

selected === true && optionsMarkedTrue.push(text);
}

return optionsMarkedTrue;
Copy link
Contributor

Choose a reason for hiding this comment

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

dust - so this feels a little convoluted, I'm not sure if its a changable thing and I did spend some time really thinking about it.

It kinda feels to me like somehow we should have like a combined state object that has both the string values and their checked state all together as one object. But I'm not sure how much less convoluted that actually because you have to build it and I think this is fine. Mostly just food for thought

Copy link
Contributor

Choose a reason for hiding this comment

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

I see what you're saying, AA. At the very least we should rename the variable (optionsMarkedTrue) so it's not the same as the function.

takeOverExistingBiz: true,
propertyAssessment: false,
constructionActivities: false,
}),
Copy link
Contributor

Choose a reason for hiding this comment

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

dust - my inclination here would have been to cover ever variable in both states just to make sure its possible. I think there are a lot of ways to do that and this is mostly nit picky BS at this point and you can ignore this if you like.

expect(currentBusiness().taskProgress[taskId]).toEqual("COMPLETED");
});

it("calls scrollToTop when saved", async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

sand - I believe all these tests are repeated verbatum with different values so you can use an it.each to just pass ing 2 different values and half your total test code volume. Lmk if you want to talk about how to do that,.

@@ -11,7 +11,7 @@ interface Props {
isDividerDisabled?: boolean;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

sand - I don't think those props above (specifically mini and isDividerDisabled are actually used ever?)

"editInfo": "Your answers were successfully completed!",
"editText": "Edit.",
"summary": {
"partOne": "Based on your answers, your business may be legally required to have a Department of Environmental Protection’s (DEP)",
Copy link
Contributor

Choose a reason for hiding this comment

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

I know we may have to check with the Content team, but we don't need the apostrophe and s. It should just read: Protection.

"editText": "Edit.",
"summary": {
"partOne": "Based on your answers, your business may be legally required to have a Department of Environmental Protection’s (DEP)",
"partTwo": "license or permit. Find out your business' requirements below.",
Copy link
Contributor

Choose a reason for hiding this comment

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

This may be another one for the Content team: business' should either be business or business's

@@ -0,0 +1,8 @@
---
summaryDescriptionMd: The New Jersey Department of Environmental Protection's (DEP) has environmental regulations for businesses in the State.
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as before: We should update this to Protection.

selected === true && optionsMarkedTrue.push(text);
}

return optionsMarkedTrue;
Copy link
Contributor

Choose a reason for hiding this comment

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

I see what you're saying, AA. At the very least we should rename the variable (optionsMarkedTrue) so it's not the same as the function.

- label: "Waste Questionnaire Task"
name: "waste-questionnaire-task"
file: content/src/fieldConfig/waste-questionnaire-page.json
- label: "Environment Questionnaire Tasks"
Copy link
Contributor

Choose a reason for hiding this comment

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

Great condensing here

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.

4 participants