{"version":3,"sources":["types/index.ts","components/Loading.tsx","types/config.ts","types/CustomError.ts","helpers/fetchHelper.ts","components/ValidationMessage.tsx","helpers/utils.ts","components/FormError.tsx","pages/UserRequestPage.tsx","hooks/useForm.tsx","components/FormField.tsx","pages/CreditFormPage.tsx","pages/CreditFormSuccessPage.tsx","pages/NotFoundPage.tsx","App.tsx","index.tsx"],"names":["FieldType","GroupTypeEnum","MessageType","Loading","className","type","color","height","width","config","ApiBaseUrl","process","Recaptcha_SiteKey","CustomError","message","data","validationErrors","Error","fetchHelper","url","method","fetch","body","JSON","stringify","undefined","headers","then","response","ok","statusText","status","json","catch","resJson","errorMessage","fetchText","ValidationMessage","props","children","trimValues","Object","keys","forEach","k","trim","removeWhitespaces","value","replace","formatUrl","test","FormError","errors","length","map","err","i","UserRequestPage","useState","loading","setLoading","setMessage","setErrors","initState","formData","setFormData","onInputChange","e","target","name","prevState","onInputBlur","onTextareaChange","onTextareaBlur","onChangeWithKey","key","resetForm","useForm","FirstName","LastName","EmailAddress","PhoneNumber","CompanyName","CompanyReg","CompanyWebsite","OrganisationalCode","CompanyAddress","CompanyAddress1","CompanyPostCode","CompanyCity","CompanyCountry","EVCGFContactName","EVCGFContactEmailAddress","useEffect","document","title","onSubmit","window","scrollTo","SUCCESS","text","ERROR","reduce","p","n","style","onChange","onBlur","maxLength","classnames","error","onClick","FormField","label","descriptionTop","description","field","halfField","halfInput","checkBoxLabel","meta","useField","startDate","setStartDate","country","setCountry","INPUT","TEXTAREA","CHECKBOX","setValue","currentTarget","checked","margin","DATEPICKER","id","dateFormat","selected","autoComplete","date","dateUTC","Date","getTime","COUNTRYSELECTOR","val","valueType","CURRENCYSELECTOR","Code","selectType","CreditFormPage","history","useHistory","validationSchema","yup","ACSContact","required","email","matches","max","companyName","TradingAddress1","TradingAddress2","TradingCity","TradingPostCode","TradingCountyCode","TradingCountryCode","AccountContact","TelephoneNo","FaxNo","AccountsEMailAddress","RegisteredOfficeAddress1","RegisteredOfficeAddress2","RegisteredOfficeCity","RegisteredOfficePostCode","RegisteredOfficeCountyCode","RegisteredOfficeCountryCode","VATNo","CompanyDefermentNo","IssuedAndPaidUpCapital","UltimateParent","FinancialDirector","AuditorsNameAddress1","AuditorsNameAddress2","AuditorsNameCity","AuditorsNameCounty","AuditorsNamePostCode","AuditorsNameCountryCode","BankNameAddress1","BankNameAddress2","BankNameCity","BankNameCounty","BankNamePostCode","BankNameCountryCode","AuditorsName","BankName","SortCode","AmountOfCreditRequired","AmountOfCreditRequiredCurrency","shape","Name","TermsAndConditions","oneOf","Token","useCallback","element","setSubmitting","requestBody","BIFATerms","getElementById","push","pathname","initialValues","tradingName","AccountsEmailAddress","DateIncorporated","AuditorsNameAddress","BankNameAddress","validateOnChange","validateOnBlur","isSubmitting","setFieldValue","component","textAlign","marginBottom","href","rel","marginTop","sitekey","onVerify","onExpire","disabled","CreditFormSuccessPage","NotFoundPage","App","exact","path","render"],"mappings":"yJAAYA,EA6DAC,EAYAC,E,gEAlEX,SAPWF,OAAS,iBAATA,IAAS,uBAATA,IAAS,uBAATA,IAAS,2BAATA,IAAS,qCAATA,IAAS,uCAOpB,CAPWA,MAAS,KAiEpB,SAJWC,OAAa,+BAAbA,IAAa,qBAAbA,IAAa,iBAIxB,CAJWA,MAAa,KAexB,SAHWC,KAAW,cAAXA,EAAW,kBAGtB,CAHWA,MAAW,K,iCChERC,EANC,WAAH,OACT,qBAAKC,UAAU,kBAAiB,SAC5B,cAAC,IAAM,CAACC,KAAK,OAAOC,MAAM,UAAUC,OAAQ,GAAIC,MAAO,MACrD,ECIKC,EALY,CACvBC,WAA6C,QAAnC,EAAEC,qCAAiC,EAAI,GACjDC,kBAA0D,QAAzC,EAAED,4CAAuC,EAAI,I,wCCF7CE,EAAW,kDAI5B,WAAYC,EAAkBC,GAAa,IAAD,EAGS,OAHT,qBACtC,cAAMD,IAJVC,UAAI,IACJC,sBAAgB,EAIZ,EAAKD,KAAOA,EACZ,EAAKC,iBAAuB,OAAJD,QAAI,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MACJ,qBAAKrM,UAAU,aAAY,SACtBgD,EAAOqJ,QAEZ,QAER,qBAAKrM,UAAU,mBAAkB,SAC7B,wBACIC,KAAK,SACLgO,SAAUX,EACV3G,QAASA,EAAQ,6BAS7C,KAIhB,GCn0BeuH,EAdmB,WAK9B,OAJAzI,qBAAU,WACNC,SAASC,MAAQ,oBACrB,GAAG,IAGC,cAAC,EAAiB,CAAC1F,KAAMH,EAAYiG,QAAQ,0JAMrD,ECEeoI,EAhBM,WAEjB,OACI,qBAAKnO,UAAU,kDAAiD,SAC5D,qBAAKA,UAAU,kCAAiC,SAC5C,sBAAKA,UAAU,0CAAyC,UACpD,qBAAKA,UAAU,6BAA4B,SACvC,6CAEJ,qBAAKA,UAAU,sBAAqB,wDAKxD,ECaeoO,EArBH,WACR,OACI,cAAC,IAAa,UACV,eAAC,IAAM,WACH,cAAC,IAAK,CAACC,OAAK,EAACC,KAAK,IAAId,UAAWW,IACjC,cAAC,IAAK,CACFE,OAAK,EACLC,KAAK,sBACLd,UAAWxE,IAEf,cAAC,IAAK,CACFqF,OAAK,EACLC,KAAK,8BACLd,UAAWU,IAEf,cAAC,IAAK,CAACG,OAAK,EAACC,KAAK,gBAAgBd,UAAWnK,QAI7D,E,cCpBAkL,iBACI,cAAC,EAAG,IACJ7I,SAASiH,eAAe,Q","file":"static/js/main.5442afde.chunk.js","sourcesContent":["export enum FieldType {\r\n INPUT = 0,\r\n TEXTAREA = 1,\r\n CHECKBOX = 2,\r\n DATEPICKER = 3,\r\n COUNTRYSELECTOR = 4,\r\n CURRENCYSELECTOR = 5,\r\n}\r\n\r\nexport interface CreditForm {\r\n ACSContact: string;\r\n companyName: string;\r\n tradingName?: string;\r\n TradingAddress1: string;\r\n TradingAddress2?: string;\r\n TradingCity: string;\r\n TradingPostCode: string;\r\n TradingCountyCode: string;\r\n TradingCountryCode: string;\r\n AccountContact?: string;\r\n TelephoneNo: string;\r\n FaxNo?: string;\r\n AccountsEmailAddress: string;\r\n RegisteredOfficeAddress1: string;\r\n RegisteredOfficeAddress2?: string;\r\n RegisteredOfficeCity: string;\r\n RegisteredOfficePostCode: string;\r\n RegisteredOfficeCountyCode: string;\r\n RegisteredOfficeCountryCode: string;\r\n CompanyReg?: string;\r\n VATNo?: string;\r\n CompanyDefermentNo?: string;\r\n DateIncorporated?: Date | string;\r\n IssuedAndPaidUpCapital?: string;\r\n UltimateParent?: string;\r\n FinancialDirector?: string;\r\n SortCode?: string;\r\n AmountOfCreditRequired?: number | string;\r\n AmountOfCreditRequiredCurrency?: { Code: string; }\r\n Name?: string;\r\n TermsAndConditions: boolean;\r\n BIFATerms: boolean;\r\n AuditorsName?: string;\r\n AuditorsNameAddress?: string;\r\n AuditorsNameAddress1?: string;\r\n AuditorsNameAddress2?: string;\r\n AuditorsNameCity?: string;\r\n AuditorsNameCounty?: string;\r\n AuditorsNamePostCode?: string;\r\n AuditorsNameCountryCode?: string;\r\n BankName?: string;\r\n BankNameAddress?: string;\r\n BankNameAddress1?: string;\r\n BankNameAddress2?: string;\r\n BankNameCity?: string;\r\n BankNameCounty?: string;\r\n BankNamePostCode?: string;\r\n BankNameCountryCode?: string;\r\n Token?: string;\r\n}\r\n\r\nexport enum GroupTypeEnum {\r\n Organisation = 0,\r\n Company = 1,\r\n Group = 2,\r\n}\r\n\r\nexport type SecurityGroup = {\r\n id: number;\r\n name: string;\r\n description: string;\r\n};\r\n\r\nexport enum MessageType {\r\n ERROR = \"error\",\r\n SUCCESS = \"success\",\r\n}\r\n\r\nexport type Message = {\r\n type: MessageType;\r\n text: string | undefined;\r\n};\r\n\r\nexport interface ObjectResult {\r\n success: boolean;\r\n errorList: string[];\r\n message?: string;\r\n response: T;\r\n}\r\n","import React from \"react\";\r\nimport Loader from \"react-loader-spinner\";\r\n\r\nconst Loading = () => (\r\n
\r\n \r\n
\r\n);\r\n\r\nexport default Loading;","type ConfigType = {\r\n ApiBaseUrl: string;\r\n Recaptcha_SiteKey: string;\r\n}\r\n\r\nconst config: ConfigType = {\r\n ApiBaseUrl: process.env.REACT_APP_API_BASEURL ?? \"\",\r\n Recaptcha_SiteKey: process.env.REACT_APP_RECAPTCHA_SITEKEY ?? \"\"\r\n};\r\n\r\nexport default config;","type ValidationError = {\r\n name: string;\r\n errors: string[];\r\n}\r\n\r\nexport default class CustomError extends Error {\r\n data?: any;\r\n validationErrors: ValidationError[] | undefined;\r\n\r\n constructor(message?: string, data?: any) {\r\n super(message);\r\n this.data = data;\r\n this.validationErrors = data?.validationErrors;\r\n }\r\n}","import config from \"../types/config\";\r\nimport CustomError from \"../types/CustomError\";\r\n\r\ntype MethodType = \"GET\" | \"POST\" | \"PUT\" | \"DELETE\";\r\n\r\nconst fetchHelper = async (url: string, method: MethodType, data?: any) => {\r\n return fetch(config.ApiBaseUrl + url, {\r\n method,\r\n body: data ? JSON.stringify(data) : undefined,\r\n headers: {\r\n \"Content-Type\": \"application/json\"\r\n }\r\n })\r\n .then(async (response) => {\r\n if (!response.ok) {\r\n let statusText = \"An error occured\";// response.statusText;\r\n\r\n switch (response.status) {\r\n case 401:\r\n statusText = \"Not authenticated\";\r\n break;\r\n case 403:\r\n statusText = \"Access forbidden\";\r\n break;\r\n case 404:\r\n statusText = \"Endpoint not found\";\r\n break;\r\n }\r\n\r\n const resJson = await response.json().catch(() => null);\r\n if (resJson?.errorMessage && resJson.errorMessage !== \"\") {\r\n statusText = resJson.errorMessage;\r\n }\r\n\r\n throw new CustomError(statusText, resJson);\r\n }\r\n\r\n return response;\r\n });\r\n};\r\n\r\nexport const fetchJson = (url: string, method: MethodType, data?: any) => {\r\n return fetchHelper(url, method, data)\r\n .then(response => response.json().catch(() => null));\r\n};\r\n\r\nexport const fetchText = (url: string, method: MethodType, data?: any) => {\r\n return fetchHelper(url, method, data)\r\n .then(response => response.json().catch(() => null));\r\n};","import React, { FC, ReactNode } from \"react\";\r\nimport { MessageType } from \"../types\";\r\n\r\ntype ValidationMessageProps = {\r\n type: MessageType;\r\n children?: ReactNode;\r\n};\r\n\r\nconst ValidationMessage: FC = (props) => (\r\n
\r\n {props.children}\r\n
\r\n);\r\n\r\nexport default ValidationMessage;","export const trimValues = (data: any) => {\r\n Object.keys(data).forEach((k) => {\r\n if (data[k] != null && typeof data[k] === \"string\") {\r\n data[k] = data[k].trim();\r\n }\r\n });\r\n};\r\n\r\nexport const removeWhitespaces = (value: string | undefined | null) => {\r\n if (value == null) return \"\";\r\n // trim value and strip consecutive space chars\r\n return value.trim().replace(/ {2,}/g, \" \");\r\n};\r\n\r\nexport const formatUrl = (value: string | undefined | null) => {\r\n value = removeWhitespaces(value);\r\n if (value == null || value === \"\") return \"\";\r\n\r\n const pattern = /^((http|https|ftp):\\/\\/)/;\r\n\r\n if (!pattern.test(value)) {\r\n value = \"http://\" + value;\r\n }\r\n\r\n return value;\r\n};\r\n\r\nexport const textToBase64 = (text: string) => {\r\n return btoa(text);\r\n};\r\n","import React, { FC } from \"react\";\r\n\r\ntype FormErrorProps = {\r\n errors: string[] | undefined;\r\n};\r\n\r\nexport const FormError: FC = props => {\r\n if (props.errors == null || props.errors.length === 0) return null;\r\n\r\n return (\r\n
\r\n {props.errors.map((err, i) => (\r\n
\r\n {err}\r\n
\r\n ))}\r\n
\r\n );\r\n};\r\n","import React, { FC, useEffect, useState } from \"react\";\r\nimport { MessageType, Message } from \"../types\";\r\nimport Loading from \"../components/Loading\";\r\nimport { fetchJson } from \"../helpers/fetchHelper\";\r\nimport CustomError from \"../types/CustomError\";\r\nimport ValidationMessage from \"../components/ValidationMessage\";\r\nimport { useForm } from \"../hooks/useForm\";\r\nimport { formatUrl } from \"../helpers/utils\";\r\nimport { FormError } from \"../components/FormError\";\r\nimport classnames from \"classnames\";\r\nimport { useLocation } from \"react-router\";\r\n\r\ntype FormData = {\r\n FirstName: string;\r\n LastName: string;\r\n EmailAddress: string;\r\n PhoneNumber: string;\r\n CompanyName: string;\r\n CompanyReg: string;\r\n CompanyWebsite: string;\r\n OrganisationalCode: string;\r\n CompanyAddress: string;\r\n CompanyAddress1: string;\r\n CompanyPostCode: string;\r\n CompanyCity: string;\r\n CompanyCountry: string;\r\n EVCGFContactName: string;\r\n EVCGFContactEmailAddress: string;\r\n};\r\n\r\nconst UserRequestPage: FC = () => {\r\n const [loading, setLoading] = useState(false);\r\n const [message, setMessage] = useState();\r\n const [errors, setErrors] = useState<\r\n { [key in keyof FormData]: string[] } | undefined\r\n >();\r\n\r\n const { formData, setFormData, resetForm, onInputChange, onInputBlur } =\r\n useForm({\r\n FirstName: \"\",\r\n LastName: \"\",\r\n EmailAddress: \"\",\r\n PhoneNumber: \"\",\r\n CompanyName: \"\",\r\n CompanyReg: \"\",\r\n CompanyWebsite: \"\",\r\n OrganisationalCode: \"\",\r\n CompanyAddress: \"\",\r\n CompanyAddress1: \"\",\r\n CompanyPostCode: \"\",\r\n CompanyCity: \"\",\r\n CompanyCountry: \"\",\r\n EVCGFContactName: \"\",\r\n EVCGFContactEmailAddress: \"\",\r\n });\r\n\r\n useEffect(() => {\r\n document.title = \"User registration\";\r\n }, []);\r\n\r\n const onWebsiteBlur = (e: React.FocusEvent) => {\r\n const value = e.target.value;\r\n setFormData(\r\n (prevState) =>\r\n ({\r\n ...prevState,\r\n CompanyWebsite: formatUrl(value),\r\n } as FormData)\r\n );\r\n };\r\n\r\n const onSubmit = async () => {\r\n window.scrollTo(0, 0);\r\n\r\n setLoading(true);\r\n setMessage(undefined);\r\n setErrors(undefined);\r\n\r\n await fetchJson(\"user-request/new\", \"POST\", formData)\r\n .then(() => {\r\n setMessage({\r\n type: MessageType.SUCCESS,\r\n text: \"Your user account has been created successfully, but needs to be approved!\",\r\n });\r\n resetForm();\r\n })\r\n .catch((e: CustomError) => {\r\n const errorMessage = e.message;\r\n\r\n // if (e.validationErrors != null) {\r\n // errorMessage += \" \" + e.validationErrors.map(x => `${x.name}: ${x.errors.join(\", \")}`).join(\"; \");\r\n // }\r\n\r\n setMessage({ type: MessageType.ERROR, text: errorMessage });\r\n\r\n setErrors(\r\n e.validationErrors?.reduce((p, n) => {\r\n p[n.name] = n.errors;\r\n return p;\r\n }, {} as any)\r\n );\r\n });\r\n\r\n setLoading(false);\r\n };\r\n\r\n // const isSubmitDisabled = (\r\n // formData.FirstName === \"\"\r\n // || formData.LastName === \"\"\r\n // || formData.EmailAddress === \"\"\r\n // || formData.CompanyName === \"\"\r\n // || formData.OrganisationalCode === \"\"\r\n // || formData.CompanyAddress === \"\"\r\n // || formData.CompanyWebsite === \"\"\r\n // || formData.CompanyAddress1 === \"\"\r\n // || formData.CompanyPostCode === \"\"\r\n // || formData.CompanyCity === \"\"\r\n // || formData.CompanyCountry === \"\"\r\n // || formData.PhoneNumber === \"\"\r\n // || formData.EVCGFContactName === \"\"\r\n // || formData.EVCGFContactEmailAddress === \"\"\r\n // );\r\n\r\n return (\r\n
\r\n {loading && }\r\n\r\n
\r\n

\r\n Application for Access Facilities\r\n

\r\n
\r\n\r\n {message && (\r\n \r\n {message.text ?? \"\"}\r\n \r\n )}\r\n\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n (you can find this on any documentation provided by EV\r\n Cargo)\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n Apply\r\n \r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default UserRequestPage;\r\n","import { useState } from \"react\";\r\nimport { removeWhitespaces } from \"../helpers/utils\";\r\n\r\nexport function useForm(initState: T) {\r\n const [formData, setFormData] = useState(initState);\r\n\r\n const onInputChange = (e: React.ChangeEvent) => {\r\n const { name, value } = e.target;\r\n setFormData((prevState) => ({\r\n ...prevState,\r\n [name]: value,\r\n }));\r\n };\r\n\r\n const onInputBlur = (e: React.FocusEvent) => {\r\n const { name, value } = e.target;\r\n setFormData((prevState) => ({\r\n ...prevState,\r\n [name]: removeWhitespaces(value),\r\n }));\r\n };\r\n\r\n const onTextareaChange = (e: React.ChangeEvent) => {\r\n const { name, value } = e.target;\r\n setFormData((prevState) => ({\r\n ...prevState,\r\n [name]: value,\r\n }));\r\n };\r\n\r\n const onTextareaBlur = (e: React.FocusEvent) => {\r\n const { name, value } = e.target;\r\n setFormData((prevState) => ({\r\n ...prevState,\r\n [name]: removeWhitespaces(value),\r\n }));\r\n };\r\n\r\n const onChangeWithKey = (key: string) => (e: { value: any }) => {\r\n const value = e.value;\r\n setFormData((prevState) => ({\r\n ...prevState,\r\n [key]: value,\r\n }));\r\n };\r\n\r\n const resetForm = () => {\r\n setFormData(initState);\r\n };\r\n\r\n return {\r\n formData,\r\n setFormData,\r\n onInputChange,\r\n onInputBlur,\r\n onTextareaChange,\r\n onTextareaBlur,\r\n onChangeWithKey,\r\n resetForm,\r\n };\r\n}\r\n","import React, { CSSProperties, useState } from \"react\";\r\nimport { FieldProps, useField } from \"formik\";\r\nimport { FieldType } from \"../types\";\r\nimport DatePicker from \"react-datepicker\";\r\nimport { CountryDropdown } from \"react-country-region-selector\";\r\n\r\ninterface Props extends FieldProps {\r\n label: string;\r\n descriptionTop?: boolean;\r\n description?: string;\r\n type?: FieldType;\r\n halfField?: boolean;\r\n halfInput?: boolean;\r\n checkBoxLabel?: string;\r\n style?: CSSProperties;\r\n onChange?: (event) => void;\r\n}\r\n\r\nconst FormField = ({\r\n label,\r\n descriptionTop,\r\n description,\r\n type,\r\n field,\r\n halfField,\r\n halfInput,\r\n checkBoxLabel,\r\n style,\r\n onChange,\r\n}: Props) => {\r\n const meta = useField(field);\r\n const [startDate, setStartDate] = useState(undefined);\r\n const [country, setCountry] = useState(field.value);\r\n\r\n const selectType = (type) => {\r\n switch (type) {\r\n case FieldType.INPUT:\r\n return (\r\n \r\n \r\n \r\n );\r\n case FieldType.TEXTAREA:\r\n return (\r\n \r\n \r\n \r\n );\r\n case FieldType.CHECKBOX:\r\n return (\r\n \r\n );\r\n case FieldType.DATEPICKER:\r\n return (\r\n {\r\n if (date) {\r\n const dateUTC = new Date(\r\n date.getTime() + 12 * 60 * 60 * 1000\r\n );\r\n setStartDate(date);\r\n meta[2].setValue(dateUTC);\r\n } else {\r\n setStartDate(undefined);\r\n }\r\n }}\r\n className={\r\n meta[1].error\r\n ? \"field-input error-input\"\r\n : \"field-input\"\r\n }\r\n />\r\n );\r\n case FieldType.COUNTRYSELECTOR:\r\n return (\r\n {\r\n setCountry(val);\r\n meta[2].setValue(val);\r\n }}\r\n valueType=\"short\"\r\n />\r\n );\r\n case FieldType.CURRENCYSELECTOR:\r\n return (\r\n <>\r\n \r\n \r\n );\r\n default:\r\n return \"\";\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n {label}\r\n \r\n {description && descriptionTop ? (\r\n
{description}
\r\n ) : null}\r\n\r\n {selectType(type)}\r\n\r\n {description && !descriptionTop ? (\r\n
{description}
\r\n ) : null}\r\n\r\n {meta[1].error ? (\r\n
{meta[1].error}
\r\n ) : null}\r\n \r\n );\r\n};\r\n\r\nexport default FormField;\r\n","/* eslint-disable indent */\r\nimport React, { FC, useCallback, useEffect, useState } from \"react\";\r\nimport FormField from \"../components/FormField\";\r\nimport * as yup from \"yup\";\r\nimport { FieldType, Message, MessageType } from \"../types\";\r\nimport { Formik, Field, Form } from \"formik\";\r\nimport Reaptcha from \"reaptcha\";\r\nimport { CreditForm } from \"../types\";\r\nimport Loading from \"../components/Loading\";\r\nimport config from \"../types/config\";\r\nimport { fetchText } from \"../helpers/fetchHelper\";\r\nimport CustomError from \"../types/CustomError\";\r\nimport { useHistory } from \"react-router\";\r\nimport ValidationMessage from \"../components/ValidationMessage\";\r\nimport { trimValues } from \"../helpers/utils\";\r\n\r\nimport \"react-datepicker/dist/react-datepicker.css\";\r\n\r\ninterface INewUser {\r\n name: string;\r\n email: string;\r\n}\r\n\r\n// eslint-disable no-unused-expressions\r\nconst CreditFormPage: FC = () => {\r\n const [message, setMessage] = useState();\r\n const [isAddUserChecked, setIsAddUserChecked] = useState(false);\r\n const [requestedUserArray, setRequestedUserArray] = useState(\r\n []\r\n );\r\n\r\n const history = useHistory();\r\n\r\n useEffect(() => {\r\n document.title = \"Credit Application\";\r\n }, []);\r\n\r\n const validationSchema = yup.object({\r\n ACSContact: yup\r\n .string()\r\n .required(\"This field is required.\")\r\n .email(\"Please insert a valid email address\")\r\n .matches(\r\n /^[A-Za-z0-9._%+-]+@evcargo\\.com$/,\r\n \"Please enter a valid EV Cargo contact\"\r\n )\r\n .max(254, \"You have reached the maximum number of characters\"),\r\n companyName: yup\r\n .string()\r\n .trim()\r\n .required(\"This field is required.\")\r\n .max(100, \"You have reached the maximum number of characters\"),\r\n TradingAddress1: yup\r\n .string()\r\n .trim()\r\n .required(\"This field is required.\")\r\n .max(50, \"You have reached the maximum number of characters\"),\r\n TradingAddress2: yup\r\n .string()\r\n .max(50, \"You have reached the maximum number of characters\"),\r\n TradingCity: yup\r\n .string()\r\n .trim()\r\n .required(\"This field is required.\")\r\n .max(25, \"You have reached the maximum number of characters\"),\r\n TradingPostCode: yup\r\n .string()\r\n .trim()\r\n .required(\"This field is required.\")\r\n .max(10, \"You have reached the maximum number of characters\"),\r\n TradingCountyCode: yup\r\n .string()\r\n .trim()\r\n .required(\"This field is required.\")\r\n .max(25, \"You have reached the maximum number of characters\"),\r\n TradingCountryCode: yup.string().required(\"This field is required.\"),\r\n AccountContact: yup\r\n .string()\r\n .max(50, \"You have reached the maximum number of characters\"),\r\n TelephoneNo: yup\r\n .string()\r\n .trim()\r\n .required(\"This field is required.\")\r\n .max(20, \"You have reached the maximum number of characters\"),\r\n FaxNo: yup\r\n .string()\r\n .max(20, \"You have reached the maximum number of characters\"),\r\n AccountsEMailAddress: yup\r\n .string()\r\n .required(\"This field is required\")\r\n .email(\"Please insert a valid email address\")\r\n .max(254, \"You have reached the maximum number of characters\"),\r\n RegisteredOfficeAddress1: yup\r\n .string()\r\n .trim()\r\n .required(\"This field is required.\")\r\n .max(50, \"You have reached the maximum number of characters\"),\r\n RegisteredOfficeAddress2: yup\r\n .string()\r\n .max(50, \"You have reached the maximum number of characters\"),\r\n RegisteredOfficeCity: yup\r\n .string()\r\n .trim()\r\n .required(\"This field is required.\")\r\n .max(25, \"You have reached the maximum number of characters\"),\r\n RegisteredOfficePostCode: yup\r\n .string()\r\n .trim()\r\n .required(\"This field is required.\")\r\n .max(10, \"You have reached the maximum number of characters\"),\r\n RegisteredOfficeCountyCode: yup\r\n .string()\r\n .trim()\r\n .required(\"This field is required.\")\r\n .max(25, \"You have reached the maximum number of characters\"),\r\n RegisteredOfficeCountryCode: yup\r\n .string()\r\n .required(\"This field is required.\"),\r\n CompanyReg: yup\r\n .string()\r\n .max(35, \"You have reached the maximum number of characters\"),\r\n VATNo: yup\r\n .string()\r\n .max(35, \"You have reached the maximum number of characters\"),\r\n CompanyDefermentNo: yup\r\n .string()\r\n .max(35, \"You have reached the maximum number of characters\"),\r\n IssuedAndPaidUpCapital: yup\r\n .string()\r\n .max(16, \"You have reached the maximum number of characters\"),\r\n UltimateParent: yup\r\n .string()\r\n .max(128, \"You have reached the maximum number of characters\"),\r\n FinancialDirector: yup\r\n .string()\r\n .max(50, \"You have reached the maximum number of characters\"),\r\n AuditorsNameAddress1: yup\r\n .string()\r\n .max(50, \"You have reached the maximum number of characters\"),\r\n AuditorsNameAddress2: yup\r\n .string()\r\n .max(50, \"You have reached the maximum number of characters\"),\r\n AuditorsNameCity: yup\r\n .string()\r\n .max(25, \"You have reached the maximum number of characters\"),\r\n AuditorsNameCounty: yup\r\n .string()\r\n .max(25, \"You have reached the maximum number of characters\"),\r\n AuditorsNamePostCode: yup\r\n .string()\r\n .max(10, \"You have reached the maximum number of characters\"),\r\n AuditorsNameCountryCode: yup\r\n .string()\r\n .max(2, \"You have reached the maximum number of characters\"),\r\n BankNameAddress1: yup\r\n .string()\r\n .max(50, \"You have reached the maximum number of characters\"),\r\n BankNameAddress2: yup\r\n .string()\r\n .max(50, \"You have reached the maximum number of characters\"),\r\n BankNameCity: yup\r\n .string()\r\n .max(25, \"You have reached the maximum number of characters\"),\r\n BankNameCounty: yup\r\n .string()\r\n .max(25, \"You have reached the maximum number of characters\"),\r\n BankNamePostCode: yup\r\n .string()\r\n .max(10, \"You have reached the maximum number of characters\"),\r\n BankNameCountryCode: yup\r\n .string()\r\n .max(2, \"You have reached the maximum number of characters\"),\r\n AuditorsName: yup\r\n .string()\r\n .max(50, \"You have reached the maximum number of characters\"),\r\n BankName: yup\r\n .string()\r\n .max(50, \"You have reached the maximum number of characters\"),\r\n SortCode: yup\r\n .string()\r\n .max(16, \"You have reached the maximum number of characters\"),\r\n AmountOfCreditRequired: yup\r\n .string()\r\n .matches(\r\n /^\\d+(\\.\\d+)?$/,\r\n \"Please enter a valid number\"\r\n )\r\n .required(\"This field is required.\"),\r\n AmountOfCreditRequiredCurrency: yup.object().shape({\r\n Code: yup.string().required(\"This field is required.\"),\r\n }),\r\n Name: yup\r\n .string()\r\n .trim()\r\n .required(\"This field is required.\")\r\n .max(50, \"You have reached the maximum number of characters\"),\r\n TermsAndConditions: yup\r\n .boolean()\r\n .oneOf([true], \"This field is required.\"),\r\n Token: yup.string().required(\"This field is required.\"),\r\n });\r\n\r\n const initialValues: CreditForm = {\r\n ACSContact: \"\",\r\n companyName: \"\",\r\n tradingName: \"\",\r\n TradingAddress1: \"\",\r\n TradingAddress2: \"\",\r\n TradingCity: \"\",\r\n TradingCountryCode: \"GB\",\r\n TradingPostCode: \"\",\r\n TradingCountyCode: \"\",\r\n AccountContact: \"\",\r\n TelephoneNo: \"\",\r\n FaxNo: \"\",\r\n AccountsEmailAddress: \"\",\r\n RegisteredOfficeAddress1: \"\",\r\n RegisteredOfficeAddress2: \"\",\r\n RegisteredOfficeCity: \"\",\r\n RegisteredOfficeCountryCode: \"GB\",\r\n RegisteredOfficePostCode: \"\",\r\n RegisteredOfficeCountyCode: \"\",\r\n CompanyReg: \"\",\r\n VATNo: \"\",\r\n CompanyDefermentNo: \"\",\r\n DateIncorporated: \"\",\r\n IssuedAndPaidUpCapital: \"\",\r\n UltimateParent: \"\",\r\n FinancialDirector: \"\",\r\n AuditorsNameAddress1: \"\",\r\n AuditorsNameAddress2: \"\",\r\n AuditorsNameCity: \"\",\r\n AuditorsNameCounty: \"\",\r\n AuditorsNamePostCode: \"\",\r\n AuditorsNameCountryCode: \"\",\r\n BankNameAddress1: \"\",\r\n BankNameAddress2: \"\",\r\n BankNameCity: \"\",\r\n BankNameCounty: \"\",\r\n BankNamePostCode: \"\",\r\n BankNameCountryCode: \"\",\r\n AuditorsName: \"\",\r\n BankName: \"\",\r\n AuditorsNameAddress: \"\",\r\n BankNameAddress: \"\",\r\n SortCode: \"\",\r\n AmountOfCreditRequired: \"\",\r\n AmountOfCreditRequiredCurrency: { Code: \"GBP\" },\r\n Name: \"\",\r\n TermsAndConditions: false,\r\n BIFATerms: false,\r\n Token: \"\",\r\n };\r\n\r\n const onClick = useCallback(() => {\r\n window.scrollTo(0, 0);\r\n }, []);\r\n\r\n const onSubmit = useCallback(\r\n async (data: CreditForm, { setSubmitting, resetForm }) => {\r\n setSubmitting(true);\r\n\r\n //delete empty or null fields\r\n for (const element in data) {\r\n if (!data[element]) {\r\n delete data[element];\r\n }\r\n }\r\n\r\n // trim values\r\n trimValues(data);\r\n\r\n const requestBody: CreditForm = { ...data };\r\n\r\n requestBody.BIFATerms = requestBody.TermsAndConditions;\r\n\r\n await fetchText(\"creditapplication\", \"POST\", requestBody)\r\n .then(() => {\r\n resetForm();\r\n setMessage(undefined);\r\n (\r\n document.getElementById(\r\n \"datepicker\"\r\n ) as HTMLInputElement\r\n ).value = \"\";\r\n history.push({\r\n pathname: \"/credit-application/success\",\r\n });\r\n })\r\n .catch((e: CustomError) => {\r\n setMessage({ type: MessageType.ERROR, text: e.message });\r\n });\r\n\r\n setSubmitting(false);\r\n },\r\n [history]\r\n );\r\n\r\n // const newUserHandler = (event: boolean) => {\r\n // setIsAddUserChecked(event);\r\n // setRequestedUserArray(\r\n // event\r\n // ? [\r\n // {\r\n // name: \"\",\r\n // email: \"\",\r\n // },\r\n // ]\r\n // : []\r\n // );\r\n // };\r\n\r\n // const addNewUser = () => {\r\n // setRequestedUserArray([\r\n // ...requestedUserArray,\r\n // {\r\n // name: \"\",\r\n // email: \"\",\r\n // },\r\n // ]);\r\n // };\r\n\r\n return (\r\n
\r\n \r\n {({ isSubmitting, errors, setFieldValue }) => {\r\n return (\r\n <>\r\n {isSubmitting && }\r\n\r\n
\r\n
\r\n

\r\n Application for Credit Facilities\r\n

\r\n
\r\n\r\n {message && (\r\n \r\n {message.text ?? \"\"}\r\n \r\n )}\r\n\r\n {Object.keys(errors).length > 0 && (\r\n \r\n There was a problem with your\r\n submission. Errors have been highlighted\r\n below.\r\n \r\n )}\r\n
\r\n \r\n \r\n\r\n \r\n\r\n
\r\n Trading Address *\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n Registered Office *\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n Auditors Name & Address\r\n
\r\n
\r\n Bank Name & Address\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n

\r\n \r\n TO BE COMPLETED BY AN\r\n AUTHORIZED REPRESENTATIVE OF\r\n THE CUSTOMER\r\n \r\n

\r\n
\r\n
\r\n \r\n {/* To be added back when BE part will be done */}\r\n {/* \r\n newUserHandler(e.target.checked)\r\n }\r\n /> */}\r\n {/* {isAddUserChecked && (\r\n <>\r\n {requestedUserArray.map(\r\n (m, index) => (\r\n <>\r\n \r\n \r\n \r\n )\r\n )}\r\n\r\n \r\n Add one more\r\n \r\n \r\n )} */}\r\n

\r\n Terms & Conditions of appointment:\r\n

\r\n

\r\n Subject to approval and credit checks,\r\n the credit terms of EV Cargo Global\r\n Forwarding Limited (EVCGF) are strictly\r\n 30 days the date of invoice (excluding\r\n duty & VAT which is payable in advance).\r\n In all dealings with HM Revenue and\r\n Customs on behalf of the Customer, EVCGF\r\n is deemed to be appointed as a direct\r\n representative only, unless otherwise\r\n agreed in writing.\r\n

\r\n \r\n

\r\n All business with EVCGF is conducted\r\n stricly upon the BIFA standard\r\n trading conditions (Edition 2021)\r\n (as amended from time to time)\r\n \r\n (BIFA terms)\r\n \r\n . A copy of the BIFA terms can be\r\n found {\" \"}\r\n \r\n here\r\n \r\n

\r\n
\r\n \r\n \r\n \r\n CAPTCHA\r\n \r\n \r\n {\r\n setFieldValue(\r\n \"Token\",\r\n response\r\n );\r\n }}\r\n onExpire={() => {\r\n setFieldValue(\"Token\", \"\");\r\n }}\r\n />\r\n \r\n {errors.Token ? (\r\n
\r\n {errors.Token}\r\n
\r\n ) : null}\r\n \r\n
\r\n \r\n Apply\r\n \r\n
\r\n \r\n \r\n \r\n );\r\n }}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default CreditFormPage;\r\n","import React, { FC, useEffect } from \"react\";\r\nimport ValidationMessage from \"../components/ValidationMessage\";\r\nimport { MessageType } from \"../types\";\r\n\r\nconst CreditFormSuccessPage: FC = () => {\r\n useEffect(() => {\r\n document.title = \"Credit Application\";\r\n }, []);\r\n\r\n return (\r\n \r\n Many thanks for your application. Your EV Cargo Global Forwarding\r\n contact will be in touch with you soon to discuss and further\r\n requirements.\r\n \r\n );\r\n};\r\n\r\nexport default CreditFormSuccessPage;\r\n","import React from \"react\";\r\n\r\nconst NotFoundPage = () => {\r\n\r\n return (\r\n
\r\n
\r\n
\r\n
\r\n

NOT FOUND

\r\n
\r\n
Requested resource is not available.
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default NotFoundPage;\r\n","import React, { useEffect } from \"react\";\r\nimport { Route, Switch } from \"react-router\";\r\nimport { BrowserRouter } from \"react-router-dom\";\r\nimport UserRequestPage from \"./pages/UserRequestPage\";\r\nimport CreditFormPage from \"./pages/CreditFormPage\";\r\nimport CreditFormSuccessPage from \"./pages/CreditFormSuccessPage\";\r\nimport NotFoundPage from \"./pages/NotFoundPage\";\r\n\r\nconst App = () => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default App;\r\n","import React from \"react\";\r\nimport { render } from \"react-dom\";\r\nimport App from \"./App\";\r\nimport \"./scss/style.scss\";\r\nimport \"react-loader-spinner/dist/loader/css/react-spinner-loader.css\";\r\n// import registerServiceWorker from './registerServiceWorker';\r\n\r\nrender(\r\n ,\r\n document.getElementById(\"root\")\r\n);\r\n\r\n// registerServiceWorker();\r\n"],"sourceRoot":""}