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/integrate 2023 prf #377

Merged
merged 35 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
9bd8612
Update generic error message
courtneymyers Jan 19, 2024
7b6fb34
Rename Submission component's ButtonLink to FormButtonLink
courtneymyers Jan 19, 2024
d03ea68
Update Submissions component with new PRF2023Submission component
courtneymyers Jan 19, 2024
0e626cb
Add initial prf2023 route component
courtneymyers Jan 22, 2024
c398e27
Move fetching of prf submissions into new formio utility function for…
courtneymyers Jan 22, 2024
596f94a
Move creation of a brand new prf submission into new formio utility f…
courtneymyers Jan 22, 2024
f8798a0
Update formio2023 server route file with route handler to create an P…
courtneymyers Jan 22, 2024
75facde
Update BAP query functions for getting 2022 PRF data to include rebat…
courtneymyers Jan 22, 2024
39e6c2e
Update BAP query functions for getting 2022 CRF data to include rebat…
courtneymyers Jan 22, 2024
8f9ae29
Add initial BAP query for fetching BAP data for the 2023 PRF
courtneymyers Jan 23, 2024
eb34c8d
Update BAP query for 2023 PRF data to include bus line item fields
courtneymyers Jan 23, 2024
c133ff5
Destructure entity fields in frfNew component
courtneymyers Jan 23, 2024
4b548e9
Add Id field to busRecordsQuery when querying for 2023 PRF data from …
courtneymyers Jan 24, 2024
82c4ebf
Update capitalization of fields queried in BAP queries
courtneymyers Jan 25, 2024
174ef51
Inline BAP_SAM_TABLE value
courtneymyers Jan 25, 2024
1976732
Inline BAP_FORMS_TABLE value
courtneymyers Jan 25, 2024
2da4803
Inline BAP_BUS_TABLE value
courtneymyers Jan 25, 2024
eed3aa2
Remove no longer used env variables
courtneymyers Jan 25, 2024
05b9b5a
Begin renaming variables used in BAP queries to be more clear
courtneymyers Jan 25, 2024
9b55a50
Continue renaming variables used in BAP queries to be more clear
courtneymyers Jan 25, 2024
6939186
Finish renaming variables used in BAP queries to be more clear
courtneymyers Jan 25, 2024
7c2766d
Update 2023 PRF external status for when funding is not approved to d…
courtneymyers Jan 25, 2024
da69fa9
Update data injected into a 2023 PRF submission, every time it's edit…
courtneymyers Jan 25, 2024
7d28d40
Update queryBapFor2022PRFData() to fetch 2023 FRF bus records contact…
courtneymyers Jan 25, 2024
6466e91
Move function for fetching an existing prf's schema and submission da…
courtneymyers Jan 26, 2024
ce71f58
Add commented out stub of CRF2023Submission component to submissions …
courtneymyers Jan 26, 2024
e301beb
Move function for updating an existing prf's submission data from For…
courtneymyers Jan 26, 2024
78960bd
Update formio2023 router to include routes for fetching and updating …
courtneymyers Jan 26, 2024
d4ebc61
Move function for deleting an existing prf's submission data from For…
courtneymyers Jan 26, 2024
6c78590
Update formio2023 router's /delete-prf-submission to call deletePRFSu…
courtneymyers Jan 26, 2024
3f146ec
Store rebateYear variable in formio2022 and formio2023 routes, so it …
courtneymyers Jan 26, 2024
0a857f2
Move function for fetching crf's submission data from Formio out of f…
courtneymyers Jan 26, 2024
c765f14
Correct 2023 PRF CSB rebate Id and entity combo key fields to be the …
courtneymyers Jan 26, 2024
e7fbb43
Update data injected into a brand new 2023 PRF submission to include …
courtneymyers Jan 26, 2024
f347dd3
Update existingOwnerRecord in fetchDataForPRFSubmission() to be set w…
courtneymyers Jan 26, 2024
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
4 changes: 4 additions & 0 deletions app/client/src/components/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ import { FRF2022 } from "@/routes/frf2022";
import { PRF2022 } from "@/routes/prf2022";
import { CRF2022 } from "@/routes/crf2022";
import { FRF2023 } from "@/routes/frf2023";
import { PRF2023 } from "@/routes/prf2023";
// import { CRF2023 } from "@/routes/crf2023";
import { useDialogState, useDialogActions } from "@/contexts/dialog";

/** Custom hook to display a site-wide alert banner */
Expand Down Expand Up @@ -249,6 +251,8 @@ export function App() {
<Route path="crf/2022/:id" element={<CRF2022 />} />

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

<Route path="*" element={<Navigate to="/" replace />} />
</Route>
Expand Down
2 changes: 1 addition & 1 deletion app/client/src/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const formioProjectName = VITE_FORMIO_PROJECT_NAME;
export const formioProjectUrl = `${formioBaseUrl}/${formioProjectName}`;

export const messages = {
genericError: "Something went wrong.",
genericError: "The application has encountered an unknown error.",
authError: "Authentication error. Please log in again or contact support.",
samlError: "Error logging in. Please try again or contact support.",
bapSamFetchError: "Error loading SAM.gov data. Please contact support.",
Expand Down
4 changes: 2 additions & 2 deletions app/client/src/routes/frf2023.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ function FundingRequestForm(props: { email: string }) {

postData(url, {
mongoId: prf._id,
rebateId: prf.data.hidden_bap_rebate_id,
comboKey: prf.data.bap_hidden_entity_combo_key,
rebateId: prf.data._bap_rebate_id,
comboKey: prf.data._bap_entity_combo_key,
})
.then((_res) => {
window.location.reload();
Expand Down
69 changes: 38 additions & 31 deletions app/client/src/routes/frfNew.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,56 +34,63 @@ function createInitialSubmissionData(options: {
const { rebateYear, email, entity } = options;

const { title, name } = getUserInfo(email, entity);
const comboKey = entity.ENTITY_COMBO_KEY__c;
const uei = entity.UNIQUE_ENTITY_ID__c;
const efti = entity.ENTITY_EFT_INDICATOR__c;
const orgName = entity.LEGAL_BUSINESS_NAME__c;
const address1 = entity.PHYSICAL_ADDRESS_LINE_1__c;
const address2 = entity.PHYSICAL_ADDRESS_LINE_2__c;
const city = entity.PHYSICAL_ADDRESS_CITY__c;
const state = entity.PHYSICAL_ADDRESS_PROVINCE_OR_STATE__c;
const zip = entity.PHYSICAL_ADDRESS_ZIPPOSTAL_CODE__c;

const {
ENTITY_COMBO_KEY__c,
UNIQUE_ENTITY_ID__c,
ENTITY_EFT_INDICATOR__c,
LEGAL_BUSINESS_NAME__c,
PHYSICAL_ADDRESS_LINE_1__c,
PHYSICAL_ADDRESS_LINE_2__c,
PHYSICAL_ADDRESS_CITY__c,
PHYSICAL_ADDRESS_PROVINCE_OR_STATE__c,
PHYSICAL_ADDRESS_ZIPPOSTAL_CODE__c,
ELEC_BUS_POC_EMAIL__c,
ALT_ELEC_BUS_POC_EMAIL__c,
GOVT_BUS_POC_EMAIL__c,
ALT_GOVT_BUS_POC_EMAIL__c,
} = entity;

return rebateYear === "2022"
? {
last_updated_by: email,
hidden_current_user_email: email,
hidden_current_user_title: title,
hidden_current_user_name: name,
bap_hidden_entity_combo_key: comboKey,
bap_hidden_entity_combo_key: ENTITY_COMBO_KEY__c,
sam_hidden_applicant_email: email,
sam_hidden_applicant_title: title,
sam_hidden_applicant_name: name,
sam_hidden_applicant_efti: efti,
sam_hidden_applicant_uei: uei,
sam_hidden_applicant_organization_name: orgName,
sam_hidden_applicant_street_address_1: address1,
sam_hidden_applicant_street_address_2: address2,
sam_hidden_applicant_city: city,
sam_hidden_applicant_state: state,
sam_hidden_applicant_zip_code: zip,
sam_hidden_applicant_efti: ENTITY_EFT_INDICATOR__c,
sam_hidden_applicant_uei: UNIQUE_ENTITY_ID__c,
sam_hidden_applicant_organization_name: LEGAL_BUSINESS_NAME__c,
sam_hidden_applicant_street_address_1: PHYSICAL_ADDRESS_LINE_1__c,
sam_hidden_applicant_street_address_2: PHYSICAL_ADDRESS_LINE_2__c,
sam_hidden_applicant_city: PHYSICAL_ADDRESS_CITY__c,
sam_hidden_applicant_state: PHYSICAL_ADDRESS_PROVINCE_OR_STATE__c,
sam_hidden_applicant_zip_code: PHYSICAL_ADDRESS_ZIPPOSTAL_CODE__c,
}
: rebateYear === "2023"
? {
_user_email: email,
_user_title: title,
_user_name: name,
_bap_entity_combo_key: comboKey,
_bap_elec_bus_poc_email: entity.ELEC_BUS_POC_EMAIL__c,
_bap_alt_elec_bus_poc_email: entity.ALT_ELEC_BUS_POC_EMAIL__c,
_bap_govt_bus_poc_email: entity.GOVT_BUS_POC_EMAIL__c,
_bap_alt_govt_bus_poc_email: entity.ALT_GOVT_BUS_POC_EMAIL__c,
_bap_entity_combo_key: ENTITY_COMBO_KEY__c,
_bap_elec_bus_poc_email: ELEC_BUS_POC_EMAIL__c,
_bap_alt_elec_bus_poc_email: ALT_ELEC_BUS_POC_EMAIL__c,
_bap_govt_bus_poc_email: GOVT_BUS_POC_EMAIL__c,
_bap_alt_govt_bus_poc_email: ALT_GOVT_BUS_POC_EMAIL__c,
_bap_applicant_email: email,
_bap_applicant_title: title,
_bap_applicant_name: name,
_bap_applicant_efti: efti,
_bap_applicant_uei: uei,
_bap_applicant_organization_name: orgName,
_bap_applicant_street_address_1: address1,
_bap_applicant_street_address_2: address2,
_bap_applicant_city: city,
_bap_applicant_state: state,
_bap_applicant_zip: zip,
_bap_applicant_efti: ENTITY_EFT_INDICATOR__c,
_bap_applicant_uei: UNIQUE_ENTITY_ID__c,
_bap_applicant_organization_name: LEGAL_BUSINESS_NAME__c,
_bap_applicant_street_address_1: PHYSICAL_ADDRESS_LINE_1__c,
_bap_applicant_street_address_2: PHYSICAL_ADDRESS_LINE_2__c,
_bap_applicant_city: PHYSICAL_ADDRESS_CITY__c,
_bap_applicant_state: PHYSICAL_ADDRESS_PROVINCE_OR_STATE__c,
_bap_applicant_zip: PHYSICAL_ADDRESS_ZIPPOSTAL_CODE__c,
}
: null;
}
Expand Down
Loading
Loading