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

Feature/update app to support multi years #334

Merged
merged 71 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
0f33148
Add @tailwindscss/forms
courtneymyers Jul 11, 2023
f63c10f
Add updated header to userDashboard (commented out for now)
courtneymyers Jul 11, 2023
f9833c0
Move new application button out of dashboard component (will go on al…
courtneymyers Jul 11, 2023
23461a3
Add rebate year select to allRebates and move new application button/…
courtneymyers Jul 11, 2023
3c047ff
Remove IconText component from userDashboard and create indivitual ic…
courtneymyers Jul 11, 2023
4975880
Remove commented out 'new' dashboard bar/menu, as the old one has now…
courtneymyers Jul 11, 2023
8ada8ba
Add year context component for storing selected rebate year globally,…
courtneymyers Jul 12, 2023
05fe852
Add yearly env variables for controlling each form's open enrollment …
courtneymyers Jul 20, 2023
14518f2
Rename year context to rebateYear
courtneymyers Jul 20, 2023
59889a7
Update allRebates to use rebateYear to determine whether each form's …
courtneymyers Jul 20, 2023
78d33a8
Update form components to use rebate year in determining if form's op…
courtneymyers Jul 20, 2023
712ebe3
Move submissionPeriodOpen into shared config object in api file and u…
courtneymyers Jul 27, 2023
50fb136
Rename csb-data api route (and react-query related code) to config
courtneymyers Jul 27, 2023
3349968
Update s3 endpoint to include rebateYear as well (for determining if …
courtneymyers Jul 28, 2023
f32257a
Format logged messages in api file
courtneymyers Jul 31, 2023
468517e
Rename markdown files to reflect new form naming convention (FRF, PRF…
courtneymyers Jul 31, 2023
49427b7
Fix spelling of close out form abbreviation (CRF not COF)
courtneymyers Jul 31, 2023
0b89742
Update use of env variables for form paths for each rebate year
courtneymyers Jul 31, 2023
feba5b4
Rename 2022 form urls appropriately, to set stage for future form url…
courtneymyers Aug 1, 2023
914068a
Update references to form names in api to use abbreviations (excludin…
courtneymyers Aug 1, 2023
bc534ca
Update references to form names in helpdesk api to use abbreviations
courtneymyers Aug 1, 2023
088f041
Update client app to begin using form acronyms for form types
courtneymyers Aug 1, 2023
a3e59c5
Continue updating client app code to use new form abbreviations
courtneymyers Aug 1, 2023
eee85b4
Update variables used for frf and prf's review item ids and modified …
courtneymyers Aug 2, 2023
b55fc28
Update bap query functions to use new form abbreviations
courtneymyers Aug 2, 2023
3b02dd9
Update formioCSBMetadata variable name
courtneymyers Aug 2, 2023
8937fa4
Rename frfSubmissionPeriodOpen in newApplicationForm
courtneymyers Aug 2, 2023
60e6b86
Update api to use submissionPeriodOpen instead of individual variable…
courtneymyers Aug 2, 2023
7bb2abf
Rename env variables to use rebate year before form abbreviation
courtneymyers Aug 2, 2023
63c51c2
Update api routes for fetching user's submissions from formio for eac…
courtneymyers Aug 2, 2023
2789c37
Update remaining formio routes to include rebate year and form abbrev…
courtneymyers Aug 2, 2023
f18222d
Move formio api routes to a new formio2022.js file, for easier mainta…
courtneymyers Aug 3, 2023
2361e88
Update formio s3 endpoint to reflect /api/formio/2022 api path prefix
courtneymyers Aug 3, 2023
fb3e1d5
Move content api route into its own file
courtneymyers Aug 3, 2023
83c9a3c
Move user and config api routes into discrete files
courtneymyers Aug 3, 2023
e8f357f
Move bap api into discrete file and update bap api endpoints
courtneymyers Aug 3, 2023
3c6582b
Update helpdesk api endpoint
courtneymyers Aug 3, 2023
4aac351
Rename client route components with new form abbreviations
courtneymyers Aug 3, 2023
923ba93
Update routes to 2022 form pages and add redirects from out urls to n…
courtneymyers Aug 3, 2023
552b60e
Update form components to include 2022 in filename and component name
courtneymyers Aug 3, 2023
12eb9e3
Update urls navigated to in 2022 components to use new urls
courtneymyers Aug 3, 2023
e406fe1
Add initial FRF 2023 component
courtneymyers Aug 3, 2023
a9fce58
Move checkFormSubmissionPeriodAndBapStatus() out of formio2022.js fil…
courtneymyers Aug 3, 2023
7da4247
Update forms' react-query mutation's onSuccess to use the updated que…
courtneymyers Aug 3, 2023
442463a
Move formio upload and download of s3 file metadata functions out of …
courtneymyers Aug 3, 2023
daf4632
Add initial formio2023.js routes file
courtneymyers Aug 3, 2023
f480de9
Fix formType type signature for getBapFormSubmissionData to reflect n…
courtneymyers Aug 3, 2023
3d698fe
Update formio config to include 2023 form urls
courtneymyers Aug 3, 2023
97780eb
Update userDashboard to properly set onFormPage, now that the form ro…
courtneymyers Aug 4, 2023
3d2e55d
Update submissions component and checkClientRouteExists() middleware …
courtneymyers Aug 4, 2023
158f2e2
Create formUrl object storing rebate year and form type in formio con…
courtneymyers Aug 8, 2023
ffdf5eb
Update server api routes to use formio config's formUrl object instea…
courtneymyers Aug 8, 2023
48d9076
Update formio2022 route to store urls for each form for 2022, instead…
courtneymyers Aug 8, 2023
326e219
Update frfNew component to support creating new frf submissions for 2…
courtneymyers Aug 9, 2023
faeb140
Move fetching of frf submissions in formio utility function for use a…
courtneymyers Aug 9, 2023
e27e45f
Move creation of a new frf submissions to a formio utility function f…
courtneymyers Aug 9, 2023
db3def5
Move fetching of existing frf submission to a formio utility function…
courtneymyers Aug 10, 2023
8d39242
Move updating of existing frf submission to a formio utility function…
courtneymyers Aug 10, 2023
57c2dc5
Mount formio2023 server routes to express app
courtneymyers Aug 10, 2023
577da41
Update frf2023 component to load and render submission
courtneymyers Aug 10, 2023
5c2a382
Comment out all BAP data related fields from frf2023 component until …
courtneymyers Aug 10, 2023
9f5b8ef
Update Formio form submission types to explicitly identify them as 20…
courtneymyers Aug 11, 2023
e664a7f
Update PRF 2022 form component's dirty check to account for newBusDel…
courtneymyers Aug 11, 2023
bb753f1
Add getComboKeyFieldName() to server app's formio utilities, so the c…
courtneymyers Aug 11, 2023
7cb0e1e
Add use2023SubmissionsQueries() custom hook to fetch 2023 submission …
courtneymyers Aug 11, 2023
c00391a
Rename stored 2022 submissionQueries and rebates variables with the 2…
courtneymyers Aug 11, 2023
ee1ca94
Update Submissions route component to split up 2022 and 2023 logic fo…
courtneymyers Aug 11, 2023
b3fd0cc
Update server app comments and variables in api routes to be consistent
courtneymyers Aug 11, 2023
d836799
Combine use2022SubmissionsQueries() and use2023SubmissionsQueries()
courtneymyers Aug 15, 2023
6e99b5d
Begin updating hooks and functions that combine rebates to work acros…
courtneymyers Aug 15, 2023
e57e93c
Update combine2023Submissions() utility function to set structure of …
courtneymyers Aug 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 25 additions & 13 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,22 @@ jobs:
# SAML_PRIVATE_KEY: ${{ secrets.SAML_PRIVATE_KEY }}
JWT_PUBLIC_KEY: ${{ secrets.JWT_PUBLIC_KEY }}
JWT_PRIVATE_KEY: ${{ secrets.JWT_PRIVATE_KEY }}
CSB_APPLICATION_FORM_OPEN: true
CSB_PAYMENT_REQUEST_FORM_OPEN: true
CSB_CLOSE_OUT_FORM_OPEN: true
FORMIO_PKG_AUTH_TOKEN: ${{ secrets.FORMIO_PKG_AUTH_TOKEN }}
CSB_2022_FRF_OPEN: true
CSB_2022_PRF_OPEN: true
CSB_2022_CRF_OPEN: true
CSB_2023_FRF_OPEN: true
CSB_2023_PRF_OPEN: true
CSB_2023_CRF_OPEN: true
FORMIO_2022_FRF_PATH: ${{ secrets.FORMIO_2022_FRF_PATH }}
FORMIO_2022_PRF_PATH: ${{ secrets.FORMIO_2022_PRF_PATH }}
FORMIO_2022_CRF_PATH: ${{ secrets.FORMIO_2022_CRF_PATH }}
FORMIO_2023_FRF_PATH: ${{ secrets.FORMIO_2023_FRF_PATH }}
FORMIO_2023_PRF_PATH: ${{ secrets.FORMIO_2023_PRF_PATH }}
FORMIO_2023_CRF_PATH: ${{ secrets.FORMIO_2023_CRF_PATH }}
FORMIO_BASE_URL: ${{ secrets.FORMIO_BASE_URL }}
FORMIO_PROJECT_NAME: ${{ secrets.FORMIO_PROJECT_NAME }}
FORMIO_APPLICATION_FORM_PATH: ${{ secrets.FORMIO_APPLICATION_FORM_PATH }}
FORMIO_PAYMENT_REQUEST_FORM_PATH: ${{ secrets.FORMIO_PAYMENT_REQUEST_FORM_PATH }}
FORMIO_CLOSE_OUT_FORM_PATH: ${{ secrets.FORMIO_CLOSE_OUT_FORM_PATH }}
FORMIO_API_KEY: ${{ secrets.FORMIO_API_KEY }}
FORMIO_PKG_AUTH_TOKEN: ${{ secrets.FORMIO_PKG_AUTH_TOKEN }}
BAP_CLIENT_ID: ${{ secrets.BAP_CLIENT_ID }}
BAP_CLIENT_SECRET: ${{ secrets.BAP_CLIENT_SECRET }}
BAP_URL: ${{ secrets.BAP_URL }}
Expand Down Expand Up @@ -124,14 +130,20 @@ jobs:
# cf set-env $APP_NAME "SAML_PRIVATE_KEY" "$SAML_PRIVATE_KEY" > /dev/null
cf set-env $APP_NAME "JWT_PUBLIC_KEY" "$JWT_PUBLIC_KEY" > /dev/null
cf set-env $APP_NAME "JWT_PRIVATE_KEY" "$JWT_PRIVATE_KEY" > /dev/null
cf set-env $APP_NAME "CSB_APPLICATION_FORM_OPEN" "$CSB_APPLICATION_FORM_OPEN" > /dev/null
cf set-env $APP_NAME "CSB_PAYMENT_REQUEST_FORM_OPEN" "$CSB_PAYMENT_REQUEST_FORM_OPEN" > /dev/null
cf set-env $APP_NAME "CSB_CLOSE_OUT_FORM_OPEN" "$CSB_CLOSE_OUT_FORM_OPEN" > /dev/null
cf set-env $APP_NAME "CSB_2022_FRF_OPEN" "$CSB_2022_FRF_OPEN" > /dev/null
cf set-env $APP_NAME "CSB_2022_PRF_OPEN" "$CSB_2022_PRF_OPEN" > /dev/null
cf set-env $APP_NAME "CSB_2022_CRF_OPEN" "$CSB_2022_CRF_OPEN" > /dev/null
cf set-env $APP_NAME "CSB_2023_FRF_OPEN" "$CSB_2023_FRF_OPEN" > /dev/null
cf set-env $APP_NAME "CSB_2023_PRF_OPEN" "$CSB_2023_PRF_OPEN" > /dev/null
cf set-env $APP_NAME "CSB_2023_CRF_OPEN" "$CSB_2023_CRF_OPEN" > /dev/null
cf set-env $APP_NAME "FORMIO_2022_FRF_PATH" "$FORMIO_2022_FRF_PATH" > /dev/null
cf set-env $APP_NAME "FORMIO_2022_PRF_PATH" "$FORMIO_2022_PRF_PATH" > /dev/null
cf set-env $APP_NAME "FORMIO_2022_CRF_PATH" "$FORMIO_2022_CRF_PATH" > /dev/null
cf set-env $APP_NAME "FORMIO_2023_FRF_PATH" "$FORMIO_2023_FRF_PATH" > /dev/null
cf set-env $APP_NAME "FORMIO_2023_PRF_PATH" "$FORMIO_2023_PRF_PATH" > /dev/null
cf set-env $APP_NAME "FORMIO_2023_CRF_PATH" "$FORMIO_2023_CRF_PATH" > /dev/null
cf set-env $APP_NAME "FORMIO_BASE_URL" "$FORMIO_BASE_URL" > /dev/null
cf set-env $APP_NAME "FORMIO_PROJECT_NAME" "$FORMIO_PROJECT_NAME" > /dev/null
cf set-env $APP_NAME "FORMIO_APPLICATION_FORM_PATH" "$FORMIO_APPLICATION_FORM_PATH" > /dev/null
cf set-env $APP_NAME "FORMIO_PAYMENT_REQUEST_FORM_PATH" "$FORMIO_PAYMENT_REQUEST_FORM_PATH" > /dev/null
cf set-env $APP_NAME "FORMIO_CLOSE_OUT_FORM_PATH" "$FORMIO_CLOSE_OUT_FORM_PATH" > /dev/null
cf set-env $APP_NAME "FORMIO_API_KEY" "$FORMIO_API_KEY" > /dev/null
cf set-env $APP_NAME "BAP_CLIENT_ID" "$BAP_CLIENT_ID" > /dev/null
cf set-env $APP_NAME "BAP_CLIENT_SECRET" "$BAP_CLIENT_SECRET" > /dev/null
Expand Down
38 changes: 25 additions & 13 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,22 @@ jobs:
SAML_PRIVATE_KEY: ${{ secrets.SAML_PRIVATE_KEY }}
JWT_PUBLIC_KEY: ${{ secrets.JWT_PUBLIC_KEY }}
JWT_PRIVATE_KEY: ${{ secrets.JWT_PRIVATE_KEY }}
CSB_APPLICATION_FORM_OPEN: true
CSB_PAYMENT_REQUEST_FORM_OPEN: true
CSB_CLOSE_OUT_FORM_OPEN: true
FORMIO_PKG_AUTH_TOKEN: ${{ secrets.FORMIO_PKG_AUTH_TOKEN }}
CSB_2022_FRF_OPEN: true
CSB_2022_PRF_OPEN: true
CSB_2022_CRF_OPEN: true
CSB_2023_FRF_OPEN: true
CSB_2023_PRF_OPEN: true
CSB_2023_CRF_OPEN: true
FORMIO_2022_FRF_PATH: ${{ secrets.FORMIO_2022_FRF_PATH }}
FORMIO_2022_PRF_PATH: ${{ secrets.FORMIO_2022_PRF_PATH }}
FORMIO_2022_CRF_PATH: ${{ secrets.FORMIO_2022_CRF_PATH }}
FORMIO_2023_FRF_PATH: ${{ secrets.FORMIO_2023_FRF_PATH }}
FORMIO_2023_PRF_PATH: ${{ secrets.FORMIO_2023_PRF_PATH }}
FORMIO_2023_CRF_PATH: ${{ secrets.FORMIO_2023_CRF_PATH }}
FORMIO_BASE_URL: ${{ secrets.FORMIO_BASE_URL }}
FORMIO_PROJECT_NAME: ${{ secrets.FORMIO_PROJECT_NAME }}
FORMIO_APPLICATION_FORM_PATH: ${{ secrets.FORMIO_APPLICATION_FORM_PATH }}
FORMIO_PAYMENT_REQUEST_FORM_PATH: ${{ secrets.FORMIO_PAYMENT_REQUEST_FORM_PATH }}
FORMIO_CLOSE_OUT_FORM_PATH: ${{ secrets.FORMIO_CLOSE_OUT_FORM_PATH }}
FORMIO_API_KEY: ${{ secrets.FORMIO_API_KEY }}
FORMIO_PKG_AUTH_TOKEN: ${{ secrets.FORMIO_PKG_AUTH_TOKEN }}
BAP_CLIENT_ID: ${{ secrets.BAP_CLIENT_ID }}
BAP_CLIENT_SECRET: ${{ secrets.BAP_CLIENT_SECRET }}
BAP_URL: ${{ secrets.BAP_URL }}
Expand Down Expand Up @@ -124,14 +130,20 @@ jobs:
cf set-env $APP_NAME "SAML_PRIVATE_KEY" "$SAML_PRIVATE_KEY" > /dev/null
cf set-env $APP_NAME "JWT_PUBLIC_KEY" "$JWT_PUBLIC_KEY" > /dev/null
cf set-env $APP_NAME "JWT_PRIVATE_KEY" "$JWT_PRIVATE_KEY" > /dev/null
cf set-env $APP_NAME "CSB_APPLICATION_FORM_OPEN" "$CSB_APPLICATION_FORM_OPEN" > /dev/null
cf set-env $APP_NAME "CSB_PAYMENT_REQUEST_FORM_OPEN" "$CSB_PAYMENT_REQUEST_FORM_OPEN" > /dev/null
cf set-env $APP_NAME "CSB_CLOSE_OUT_FORM_OPEN" "$CSB_CLOSE_OUT_FORM_OPEN" > /dev/null
cf set-env $APP_NAME "CSB_2022_FRF_OPEN" "$CSB_2022_FRF_OPEN" > /dev/null
cf set-env $APP_NAME "CSB_2022_PRF_OPEN" "$CSB_2022_PRF_OPEN" > /dev/null
cf set-env $APP_NAME "CSB_2022_CRF_OPEN" "$CSB_2022_CRF_OPEN" > /dev/null
cf set-env $APP_NAME "CSB_2023_FRF_OPEN" "$CSB_2023_FRF_OPEN" > /dev/null
cf set-env $APP_NAME "CSB_2023_PRF_OPEN" "$CSB_2023_PRF_OPEN" > /dev/null
cf set-env $APP_NAME "CSB_2023_CRF_OPEN" "$CSB_2023_CRF_OPEN" > /dev/null
cf set-env $APP_NAME "FORMIO_2022_FRF_PATH" "$FORMIO_2022_FRF_PATH" > /dev/null
cf set-env $APP_NAME "FORMIO_2022_PRF_PATH" "$FORMIO_2022_PRF_PATH" > /dev/null
cf set-env $APP_NAME "FORMIO_2022_CRF_PATH" "$FORMIO_2022_CRF_PATH" > /dev/null
cf set-env $APP_NAME "FORMIO_2023_FRF_PATH" "$FORMIO_2023_FRF_PATH" > /dev/null
cf set-env $APP_NAME "FORMIO_2023_PRF_PATH" "$FORMIO_2023_PRF_PATH" > /dev/null
cf set-env $APP_NAME "FORMIO_2023_CRF_PATH" "$FORMIO_2023_CRF_PATH" > /dev/null
cf set-env $APP_NAME "FORMIO_BASE_URL" "$FORMIO_BASE_URL" > /dev/null
cf set-env $APP_NAME "FORMIO_PROJECT_NAME" "$FORMIO_PROJECT_NAME" > /dev/null
cf set-env $APP_NAME "FORMIO_APPLICATION_FORM_PATH" "$FORMIO_APPLICATION_FORM_PATH" > /dev/null
cf set-env $APP_NAME "FORMIO_PAYMENT_REQUEST_FORM_PATH" "$FORMIO_PAYMENT_REQUEST_FORM_PATH" > /dev/null
cf set-env $APP_NAME "FORMIO_CLOSE_OUT_FORM_PATH" "$FORMIO_CLOSE_OUT_FORM_PATH" > /dev/null
cf set-env $APP_NAME "FORMIO_API_KEY" "$FORMIO_API_KEY" > /dev/null
cf set-env $APP_NAME "BAP_CLIENT_ID" "$BAP_CLIENT_ID" > /dev/null
cf set-env $APP_NAME "BAP_CLIENT_SECRET" "$BAP_CLIENT_SECRET" > /dev/null
Expand Down
33 changes: 33 additions & 0 deletions app/client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"@headlessui/react": "1.7.14",
"@heroicons/react": "2.0.18",
"@radix-ui/react-tooltip": "1.0.5",
"@tailwindcss/forms": "0.5.3",
"@tanstack/react-query": "4.29.7",
"@tanstack/react-query-devtools": "4.29.7",
"@testing-library/jest-dom": "5.16.5",
Expand Down
46 changes: 36 additions & 10 deletions app/client/src/components/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { render } from "react-dom";
import {
createBrowserRouter,
createRoutesFromElements,
redirect,
Navigate,
Route,
RouterProvider,
Expand Down Expand Up @@ -38,11 +39,12 @@ import { UserDashboard } from "components/userDashboard";
import { ConfirmationDialog } from "components/confirmationDialog";
import { Notifications } from "components/notifications";
import { Helpdesk } from "routes/helpdesk";
import { AllRebates } from "routes/allRebates";
import { NewApplicationForm } from "routes/newApplicationForm";
import { ApplicationForm } from "routes/applicationForm";
import { PaymentRequestForm } from "routes/paymentRequestForm";
import { CloseOutForm } from "routes/closeOutForm";
import { Submissions } from "routes/submissions";
import { FRFNew } from "routes/frfNew";
import { FRF2022 } from "routes/frf2022";
import { PRF2022 } from "routes/prf2022";
import { CRF2022 } from "routes/crf2022";
import { FRF2023 } from "routes/frf2023";
import { useDialogState, useDialogActions } from "contexts/dialog";

/** Custom hook to display a site-wide alert banner */
Expand Down Expand Up @@ -238,12 +240,36 @@ export function App() {
<Route errorElement={<Message type="error" text={messages.genericError} />}>
<Route path="/welcome" element={<Welcome />} />
<Route path="/" element={<ProtectedRoute />}>
<Route index element={<AllRebates />} />
<Route index element={<Submissions />} />

<Route path="helpdesk" element={<Helpdesk />} />
<Route path="rebate/new" element={<NewApplicationForm />} />
<Route path="rebate/:id" element={<ApplicationForm />} />
<Route path="payment-request/:id" element={<PaymentRequestForm />} />
<Route path="close-out/:id" element={<CloseOutForm />} />

{/* Redirect pre-v4 routes to use post-v4 routes */}
<Route
path="rebate/new"
loader={({ params }) => redirect(`/frf/new`)}
/>
<Route
path="rebate/:id"
loader={({ params }) => redirect(`/frf/2022/${params.id}`)}
/>
<Route
path="payment-request/:id"
loader={({ params }) => redirect(`/prf/2022/${params.id}`)}
/>
<Route
path="close-out/:id"
loader={({ params }) => redirect(`/crf/2022/${params.id}`)}
/>

<Route path="frf/new" element={<FRFNew />} />

<Route path="frf/2022/:id" element={<FRF2022 />} />
<Route path="prf/2022/:id" element={<PRF2022 />} />
<Route path="crf/2022/:id" element={<CRF2022 />} />

<Route path="frf/2023/:id" element={<FRF2023 />} />

<Route path="*" element={<Navigate to="/" replace />} />
</Route>
</Route>
Expand Down
Loading
Loading