Commit 284591d
Report Submission Form (#443)
* feat: implement grantee report submission system
* feat: add grantee report submission feature with tests
* refactor(report-bot): improve typing and error handling - Switch to GH_BOT_TOKEN, add proper types, validation, and better error handling
* Delete .babelrc
* Auto-fix lint errors
* Use GH_ACCESS_TOKEN
* Remove unused import
* Auto-fix lint errors
* npm i marked
* refactor: remove unnecessary encryption from form data storage
* refactor: remove unused email_hash prop from GrantReportForm
* style: fix formatting in GrantReportForm setValue call
* fix: resolve build errors - remove unused variables and fix email function call
* refactor: remove CryptoJS dependency from validate-grant endpoint
* refactor: remove email_hash from submit page and validation result
* style: fix formatting in submit page
* fix: resolve useLayoutEffect warning in GrantValidationForm
* fix: make GrantValidationForm client-side only to resolve useLayoutEffect warning
* fix: replace DynamicFormButton with standard button in GrantValidationForm
* style: update GrantValidationForm to match application form layout
* style: update GrantReportForm to match application form layout and styling
* style: update submit page to use PageSection for consistent layout
* fix: use localStorage to persist grant details between pages
* fix: report preview functionality and storage handling
- Fix storage key consistency between write and preview pages
- Add proper validation and error handling for preview
- Add preview page with proper data loading
- Clean up unused code and improve error messages
- Fix form validation before preview navigation
* feat: improve validation form button styling
- Update Next button to Next Step with arrow icon
- Add proper SVG arrow icon from Heroicons
- Improve button layout with flexbox for icon alignment
* feat: improve grant validation form
- Update grant ID help text to reference Grant Agreement
- Update email placeholder with example
- Improve error message for invalid grant ID
* refactor: remove report number field
- Remove report number field from form and preview
- Simplify storage key handling
- Update markdown template structure
- Clean up form validation logic
* fix: improve report submission flow and fix form rendering
- Fix form rendering to always show form with pre-filled data when available\n- Add notification banner for recovered data\n- Update storage keys to use constants\n- Fix preview page data flow\n- Add getReportPreview function\n- Fix import paths to use relative paths
* fix: correct field names in report preview
- Update getReportPreview to use correct field names from form data\n- Fix data structure when storing report data in localStorage\n- Remove unused report number field
* refactor: remove recovered data notice from grant report form
* refactor: convert instructions notice to regular paragraph in grant report form
* refactor: move records text to Use of Funds section and simplify help text
* fix: auto-fix all lint problems
* fix: auto-fix lint issues
* refactor: replace custom markdown parser with marked library
* refactor: remove convertMarkdownToHtml function and use marked directly
* refactor: extract Reporting Guidelines into separate component and improve heading hierarchy
* refactor: remove reportNumber from email confirmation and update write page
* chore: update write page
* refactor: remove ReportingGuidelines component
* refactor: remove ReportingGuidelines references
* refactor: update validation form and submit page
* refactor: extract help needed formatting to utility function
* fix: remove extra parameter in sendReportConfirmationEmail call
* refactor: consolidate report content generation into a single function
* refactor: remove reportNumber parameter from generateReportContent
* refactor: remove format-helpers.ts and move function to api-helpers.ts
* refactor: incorporate help needed section formatting directly into generateReportContent
* style: fix formatting in generateReportContent function
* fix: address linting issues in report-related files
* fix: remove unused variables and imports
* feat: add back button to write report page
* refactor: remove convertMarkdownToHtml function and use marked directly
* style: align next step button to the right and match preview report button styling
* refactor: extract grant not found error message to constants
* refactor: remove Grant ID field from GrantReportForm
* feat: include grant_id in grant_details object
* fix: auto-fix lint issues
* Fix report submission by removing report_number requirement
* Add success page for report submission
* Fix success page and add link to Grantee FAQ
* Fix DOM nesting error in write report page
* refactor: improve project name extraction in validate-grant API
* refactor: consolidate email functionality into sendgrid.ts
* chore: update env example and remove old email.ts
* chore: add log message for application copy sent to OpenSats
* refactor: remove simulated email sending
* refactor: rename report-bot.ts to report.ts for cleaner API endpoint naming
* refactor: rename validate-grant.ts to grant.ts for cleaner API endpoint naming
* refactor: remove email from grant validation response
* refactor: remove email from grant validation response
* fix: remove default sender address to ensure proper configuration
* feat: add BCC support for email notifications
* refactor: add BCC to EmailOptions interface and handle it consistently
* refactor: remove email from grant validation response handling
* fix: include email from form data in grant validation result
* fix: remove 'by' part from project name in report emails
* refactor: clean project name once and use consistently (DRY)
* fix: update API endpoint URL from report-bot to report
* refactor: clear all storage keys after successful report submission
* Disable SendGrid tracking features (click, open, and subscription tracking)
* Fix Prettier, TypeScript, and unused import errors in sendgrid API and report success page
---------
Co-authored-by: BoltTouring <github@tricycle.cc>1 parent 40b2098 commit 284591d
19 files changed
Lines changed: 14877 additions & 7712 deletions
File tree
- __tests__/components
- components
- data/pages
- pages
- api
- reports
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
0 commit comments