-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into VACMS-19548-orientation-of-map-controls-fl
- Loading branch information
Showing
223 changed files
with
2,550 additions
and
1,298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
import { submitToUrl } from 'platform/forms-system/src/js/actions'; | ||
import environment from 'platform/utilities/environment'; | ||
|
||
import { NEW_API, SUBMIT_URL_NEW } from '../constants/apis'; | ||
|
||
// Analytics event | ||
export const buildEventData = () => {}; | ||
|
||
const submitForm = (form, formConfig) => { | ||
const { trackingPrefix } = formConfig; | ||
// v1 (add part III data) | ||
const submitUrl = `${environment.API_URL}/v1/${formConfig.submitUrl}`; | ||
const { submitUrl, trackingPrefix } = formConfig; | ||
const body = formConfig.transformForSubmit(formConfig, form); | ||
|
||
const url = `${environment.API_URL}${ | ||
form.data[NEW_API] ? SUBMIT_URL_NEW : submitUrl | ||
}`; | ||
|
||
// eventData for analytics | ||
const eventData = buildEventData(form.data); | ||
return submitToUrl(body, submitUrl, trackingPrefix, eventData); | ||
return submitToUrl(body, url, trackingPrefix, eventData); | ||
}; | ||
|
||
export default submitForm; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
* NOTE: If any of these API values change, please update the documentation: | ||
* https://github.com/department-of-veterans-affairs/va.gov-team/blob/master/products/decision-reviews/Notice-of-Disagreement/engineering/NOD_frontend_backend_interactions.md | ||
*/ | ||
export const NEW_API = 'decisionReviewNodNewApi'; | ||
|
||
export const CONTESTABLE_ISSUES_API = | ||
'/v1/notice_of_disagreements/contestable_issues'; | ||
|
||
// Evidence upload API - same endpoint as Supplemental Claim | ||
export const EVIDENCE_UPLOAD_API = '/v1/decision_review_evidence'; | ||
|
||
export const SUBMIT_URL = '/v1/notice_of_disagreements'; | ||
|
||
/** | ||
* New modularized API behind feature toggle: decision_review_nod_new_api | ||
* The endpoint will be the same until the backend has completed modularization | ||
*/ | ||
export const CONTESTABLE_ISSUES_API_NEW = | ||
'/decision_reviews/v1/notice_of_disagreements/contestable_issues'; | ||
|
||
// Evidence upload API - same endpoint as Supplemental Claim | ||
export const EVIDENCE_UPLOAD_API_NEW = | ||
'/decision_reviews/v1/decision_review_evidence'; | ||
|
||
export const SUBMIT_URL_NEW = '/decision_reviews/v1/notice_of_disagreements'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.