Skip to content

Commit

Permalink
Merge pull request #334 from USEPA/feature/update-app-to-support-mult…
Browse files Browse the repository at this point in the history
…i-years

Feature/update app to support multi years
  • Loading branch information
courtneymyers authored Aug 16, 2023
2 parents 36cb6a0 + e57e93c commit 57b3618
Show file tree
Hide file tree
Showing 43 changed files with 4,320 additions and 2,950 deletions.
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

0 comments on commit 57b3618

Please sign in to comment.