diff --git a/actions/index.js b/actions/index.js index 0b32ddd4..574e78e6 100644 --- a/actions/index.js +++ b/actions/index.js @@ -30,7 +30,7 @@ export const getBasicSearch = (searchString) => { axios //.get("https://devcrm2016.llcdt.gov.wales/DVPINS/api/data/v8.2/incidents?$select=_accountid_value,_customerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title&$filter=contains(title, '" + searchString + "')&$count=true", crmHeaders) //.get("https://jsonplaceholder.typicode.com/todos/1",{proxy:{protocol: 'http',host:'lon3.sme.zscloud.net',port: 80}}) - .get("http://localhost:3000/api/searchresults2", { + .get("/api/searchresults2", { httpsAgent: new https.Agent({ rejectUnauthorized: false }), }) .then((res) => res.data) @@ -45,15 +45,15 @@ export const getFormData = (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", { - .get("http://localhost:3000/api/appealforms/pinswg_" + whichForm, { + //.get("api/appealforms/pinswg_dns", { + //.get("api/appealforms/pinswg_planningobligationappeals106", { + //.get("api/appealforms/pinswg_planningconditionss73s79", { + //.get("api/appealforms/pinswg_row", { + //.get("api/appealforms/pinswg_transportandworkact", { + //.get("api/appealforms/pinswg_harbourrevisionorder", { + //.get("api/appealforms/pinswg_planningappeals78", { + //.get(api/appealforms/pinswg_householderappealhas", { + .get("/api/appealforms/pinswg_" + whichForm, { httpsAgent: new https.Agent({ rejectUnauthorized: false }), }) .then((res) => res.data) @@ -67,7 +67,7 @@ export const getAppealsTypes = () => { console.log("got to axios: appeal types"); return axios - .get("http://localhost:3000/api/lookups/pinswg_appealcasetype", { + .get("/api/lookups/pinswg_appealcasetype", { httpsAgent: new https.Agent({ rejectUnauthorized: false }), }) .then((res) => res.data) diff --git a/components/elements/index.js b/components/elements/index.js index 81b1d5bb..90e47051 100644 --- a/components/elements/index.js +++ b/components/elements/index.js @@ -1,4 +1,5 @@ import useSWR from "swr"; +import { Field, reduxForm } from "redux-form"; export function Textfield(props) { const { name, label } = props; @@ -8,12 +9,12 @@ export function Textfield(props) { - - ); @@ -36,13 +37,15 @@ export function MultiLinefield(props) { Do not include personal or financial information, like your National Insurance number or credit card details. - + /> ); } @@ -70,18 +73,18 @@ export function DateField(props) {
-
@@ -89,18 +92,18 @@ export function DateField(props) {
-
@@ -108,18 +111,18 @@ export function DateField(props) {
-
@@ -131,7 +134,7 @@ export function DateField(props) { export function YesNofield(props) { const { name, label } = props; - + const yesNo = ["Yes", "No"]; return (
-
- -
+ ))}
@@ -193,7 +188,11 @@ export function PickList(props) { - @@ -213,7 +212,7 @@ export function PickList(props) { - {Object.keys(dropdownObj).map((key, index) => { return (