Skip to content

Commit

Permalink
Merge pull request #452 from USEPA/feature/begin-supporting-2024-reba…
Browse files Browse the repository at this point in the history
…te-year

Feature/begin supporting 2024 rebate year
  • Loading branch information
courtneymyers authored Jul 12, 2024
2 parents 04359d1 + 392e421 commit 53fbe18
Show file tree
Hide file tree
Showing 28 changed files with 2,608 additions and 656 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,20 @@ jobs:
CSB_2023_FRF_OPEN: true
CSB_2023_PRF_OPEN: true
CSB_2023_CRF_OPEN: true
CSB_2024_FRF_OPEN: true
CSB_2024_PRF_OPEN: true
CSB_2024_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_2023_CHANGE_PATH: ${{ secrets.FORMIO_2023_CHANGE_PATH }}
FORMIO_2024_FRF_PATH: ${{ secrets.FORMIO_2024_FRF_PATH }}
FORMIO_2024_PRF_PATH: ${{ secrets.FORMIO_2024_PRF_PATH }}
FORMIO_2024_CRF_PATH: ${{ secrets.FORMIO_2024_CRF_PATH }}
FORMIO_2024_CHANGE_PATH: ${{ secrets.FORMIO_2024_CHANGE_PATH }}
FORMIO_BASE_URL: ${{ secrets.FORMIO_BASE_URL }}
FORMIO_PROJECT_NAME: ${{ secrets.FORMIO_PROJECT_NAME }}
FORMIO_API_KEY: ${{ secrets.FORMIO_API_KEY }}
Expand Down Expand Up @@ -133,13 +140,20 @@ jobs:
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 "CSB_2024_FRF_OPEN" "$CSB_2024_FRF_OPEN" > /dev/null
cf set-env $APP_NAME "CSB_2024_PRF_OPEN" "$CSB_2024_PRF_OPEN" > /dev/null
cf set-env $APP_NAME "CSB_2024_CRF_OPEN" "$CSB_2024_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_2023_CHANGE_PATH" "$FORMIO_2023_CHANGE_PATH" > /dev/null
cf set-env $APP_NAME "FORMIO_2024_FRF_PATH" "$FORMIO_2024_FRF_PATH" > /dev/null
cf set-env $APP_NAME "FORMIO_2024_PRF_PATH" "$FORMIO_2024_PRF_PATH" > /dev/null
cf set-env $APP_NAME "FORMIO_2024_CRF_PATH" "$FORMIO_2024_CRF_PATH" > /dev/null
cf set-env $APP_NAME "FORMIO_2024_CHANGE_PATH" "$FORMIO_2024_CHANGE_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_API_KEY" "$FORMIO_API_KEY" > /dev/null
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,20 @@ jobs:
CSB_2023_FRF_OPEN: true
CSB_2023_PRF_OPEN: true
CSB_2023_CRF_OPEN: true
CSB_2024_FRF_OPEN: true
CSB_2024_PRF_OPEN: true
CSB_2024_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_2023_CHANGE_PATH: ${{ secrets.FORMIO_2023_CHANGE_PATH }}
FORMIO_2024_FRF_PATH: ${{ secrets.FORMIO_2024_FRF_PATH }}
FORMIO_2024_PRF_PATH: ${{ secrets.FORMIO_2024_PRF_PATH }}
FORMIO_2024_CRF_PATH: ${{ secrets.FORMIO_2024_CRF_PATH }}
FORMIO_2024_CHANGE_PATH: ${{ secrets.FORMIO_2024_CHANGE_PATH }}
FORMIO_BASE_URL: ${{ secrets.FORMIO_BASE_URL }}
FORMIO_PROJECT_NAME: ${{ secrets.FORMIO_PROJECT_NAME }}
FORMIO_API_KEY: ${{ secrets.FORMIO_API_KEY }}
Expand Down Expand Up @@ -133,13 +140,20 @@ jobs:
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 "CSB_2024_FRF_OPEN" "$CSB_2024_FRF_OPEN" > /dev/null
cf set-env $APP_NAME "CSB_2024_PRF_OPEN" "$CSB_2024_PRF_OPEN" > /dev/null
cf set-env $APP_NAME "CSB_2024_CRF_OPEN" "$CSB_2024_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_2023_CHANGE_PATH" "$FORMIO_2023_CHANGE_PATH" > /dev/null
cf set-env $APP_NAME "FORMIO_2024_FRF_PATH" "$FORMIO_2024_FRF_PATH" > /dev/null
cf set-env $APP_NAME "FORMIO_2024_PRF_PATH" "$FORMIO_2024_PRF_PATH" > /dev/null
cf set-env $APP_NAME "FORMIO_2024_CRF_PATH" "$FORMIO_2024_CRF_PATH" > /dev/null
cf set-env $APP_NAME "FORMIO_2024_CHANGE_PATH" "$FORMIO_2024_CHANGE_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_API_KEY" "$FORMIO_API_KEY" > /dev/null
Expand Down
12 changes: 10 additions & 2 deletions app/client/src/components/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,14 @@ import { FRFNew } from "@/routes/frfNew";
import { FRF2022 } from "@/routes/frf2022";
import { PRF2022 } from "@/routes/prf2022";
import { CRF2022 } from "@/routes/crf2022";
import { Change2023 } from "@/routes/change2023";
import { FRF2023 } from "@/routes/frf2023";
import { PRF2023 } from "@/routes/prf2023";
// import { CRF2023 } from "@/routes/crf2023";
import { Change2023 } from "@/routes/change2023";
import { Change2024 } from "@/routes/change2024";
import { FRF2024 } from "@/routes/frf2024";
// import { PRF2024 } from "@/routes/prf2024";
// import { CRF2024 } from "@/routes/crf2024";
import { useDialogState, useDialogActions } from "@/contexts/dialog";

/** Custom hook to display a site-wide alert banner */
Expand Down Expand Up @@ -252,11 +256,15 @@ export function App() {
<Route path="prf/2022/:id" element={<PRF2022 />} />
<Route path="crf/2022/:id" element={<CRF2022 />} />

<Route path="/change/2023/:id" element={<Change2023 />} />
<Route path="frf/2023/:id" element={<FRF2023 />} />
<Route path="prf/2023/:id" element={<PRF2023 />} />
{/* <Route path="crf/2023/:id" element={<CRF2023 />} /> */}

<Route path="/change/2023/:id" element={<Change2023 />} />
<Route path="/change/2024/:id" element={<Change2024 />} />
<Route path="frf/2024/:id" element={<FRF2024 />} />
{/* <Route path="prf/2024/:id" element={<PRF2024 />} /> */}
{/* <Route path="crf/2024/:id" element={<CRF2024 />} /> */}

<Route path="*" element={<Navigate to="/" replace />} />
</Route>
Expand Down
7 changes: 3 additions & 4 deletions app/client/src/components/change2023New.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ import { Form } from "@formio/react";
import clsx from "clsx";
import icons from "uswds/img/sprite.svg";
// ---
import { type FormType, type FormioChange2023Submission } from "@/types";
import { serverUrl, messages } from "@/config";
import {
type FormType,
type FormioChange2023Submission,
getData,
postData,
useContentData,
Expand All @@ -31,15 +30,15 @@ type ChangeRequestData = {
name: string;
};

type ServerResponse = { url: string; json: object };
type Response = { url: string; json: object };

/** Custom hook to fetch Formio schema */
function useFormioSchemaQuery() {
const url = `${serverUrl}/api/formio/2023/change`;

const query = useQuery({
queryKey: ["formio/2023/change"],
queryFn: () => getData<ServerResponse>(url),
queryFn: () => getData<Response>(url),
refetchOnWindowFocus: false,
});

Expand Down
Loading

0 comments on commit 53fbe18

Please sign in to comment.