This is an app designed to create the annual Community District Needs statements. They were previously generated using the CD Needs platform, a PHP/Symfony application. The functionality of that platform has been broken up into ae-cdneeds-alchemer for collecting the form submissions, and this tool for creating the statements.
In the template files, where appropriate, there are comments indicating which file(s) in the old repo the new files are based upon, and there may be commented-out snippets of that code at the bottom of some template files.
Install the node modules
npm installFirst, run the development server:
npm run devOpen http://localhost:3000 with your browser to see the result.
This is a Next.js project bootstrapped with create-next-app.
You will need to export the data for both the Needs Statements and the Budget Request forms. To do so, in Alchemer select the corresponding survey, and go to Results -> Exports -> CSV / Excel -> Download All Data Now!
- Use
variablenamelookups.xlsxto replace the variable names in the csvs- Any blanks should be removed
- Add in
boro,boardNumber, andagencyAcronymcolumns - In the budget requests, remove items where:
Statusis notCompleteisDeletedisTRUE
When done, convert them to json and put them in /public/jsondata
Console error "Warning: Expected server HTML to contain a matching <i> in <a>." is related to implementing FontAwesome with Next.js that doesn't need to be fixed. I assume that is what is causing the other issues which are about hydration.
Open the site in Safari (the links in the Table of Contents do not work if exporting from other browsers). If there is a toast notification in the bottom left about errors, close it before hitting print or there will be shading at the top of each page. Select the community district from the drop-down and hit the "Print" button at the bottom of the page. At the bottom of the print menu, make sure PDF is selected, and then hit print.