initial dynamic forms

This commit is contained in:
2021-07-08 16:22:12 +01:00
parent b335c11e6b
commit 878940a6d5
25 changed files with 709 additions and 60 deletions
+26 -10
View File
@@ -43,16 +43,32 @@ export const getBasicSearch = (searchString) => {
export const getFormData = (whichForm) => {
console.log("got to axios", whichForm);
return axios
.get("http://localhost:3000/api/appealforms/pinswg_dns", {
//.get("http://localhost:3000/api/appealforms/pinswg_planningobligationappeals106", {
//.get("http://localhost:3000/api/appealforms/pinswg_planningconditionss73s79", {
//.get("http://localhost:3000/api/appealforms/pinswg_row", {
//.get("http://localhost:3000/api/appealforms/pinswg_transportandworkact", {
//.get("http://localhost:3000/api/appealforms/pinswg_harbourrevisionorder", {
//.get("http://localhost:3000/api/appealforms/pinswg_planningappeals78", {
//.get("http://localhost:3000/api/appealforms/pinswg_householderappealhas", {
httpsAgent: new https.Agent({ rejectUnauthorized: false }),
return (
axios
//.get("http://localhost:3000/api/appealforms/pinswg_dns", {
//.get("http://localhost:3000/api/appealforms/pinswg_planningobligationappeals106", {
//.get("http://localhost:3000/api/appealforms/pinswg_planningconditionss73s79", {
//.get("http://localhost:3000/api/appealforms/pinswg_row", {
//.get("http://localhost:3000/api/appealforms/pinswg_transportandworkact", {
//.get("http://localhost:3000/api/appealforms/pinswg_harbourrevisionorder", {
//.get("http://localhost:3000/api/appealforms/pinswg_planningappeals78", {
//.get(http://localhost:3000/api/appealforms/pinswg_householderappealhas", {
.get("http://localhost:3000/api/appealforms/pinswg_" + whichForm, {
httpsAgent: new https.Agent({ rejectUnauthorized: false }),
})
.then((res) => res.data)
.catch((error) => {
console.log("thiserror", error);
})
);
};
export const getAppealsTypes = () => {
console.log("got to axios: appeal types");
return axios
.get("http://localhost:3000/api/lookups/pinswg_appealcasetype", {
httpsAgent: new https.Agent({ rejectUnauthorized: false }),
})
.then((res) => res.data)
.catch((error) => {