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

Refactor land-use-action conditionals #492

Open
godfreyyeung opened this issue Jul 13, 2020 · 0 comments
Open

Refactor land-use-action conditionals #492

godfreyyeung opened this issue Jul 13, 2020 · 0 comments
Assignees
Labels
Refactor Related to refactoring code

Comments

@godfreyyeung
Copy link
Contributor

Currently there are long conditionals within land-use-action.
We can refactor them to be more manageable. e.g.

{{#if (or (eq landUseAction.name "Zoning Special Permit") (eq landUseAction.name "Zoning Certification") (eq landUseAction.name "Zoning Authorization") (eq landUseAction.name "Zoning Map Amendment") (eq landUseAction.name "Zoning Text Amendment") (eq landUseAction.name "Modification") (eq landUseAction.name "Renewal"))}}

can be instead refactored so that we use a component js array like ["Zoning Special Permit", "Zoning Certification"] along with an {{in-array}} helper

See https://github.com/NYCPlanning/labs-applicant-portal/pull/489/files#r453734034

@godfreyyeung godfreyyeung added the Refactor Related to refactoring code label Jul 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactor Related to refactoring code
Projects
None yet
Development

No branches or pull requests

2 participants