{"version":3,"sources":["components/Forms/SelectField.tsx","components/shared/SummarySection/SummarySection.tsx","components/types.ts","components/Alerts/AlertMessages.tsx","components/Announcements/AnnouncementQuery.tsx","components/Announcements/UpdateAnnouncementForUserMutation.tsx","components/Announcements/Announcements.tsx","components/Auth0Login/index.tsx","components/Auth0Login/Auth0Callback.tsx","components/Auth0Login/Auth0PasswordlessProvider.tsx","components/Auth0Login/PasswordlessAuth0Callback.tsx","components/Forbidden.tsx","components/Dealers/UserDealerQuery.tsx","components/HomeScene/index.tsx","components/ScrollToTop.tsx","components/ServerError.tsx","components/TopNavbar/LogoutDropdownItem.tsx","components/TopNavbar/index.tsx","components/Proposals/DirectDeals/DirectDealCompleteScene.tsx","components/Proposals/DirectDeals/DirectDealLogin.tsx","components/AppRouter.tsx","apollo/configureApolloClient.tsx","apollo/configureErrorLink.tsx","apollo/configureApolloLink.ts","components/DealerPortalApolloProvider/index.tsx","components/TawkToLoader.tsx","components/VersionChecker.tsx","components/App.tsx","serviceWorker.ts","index.tsx","components/Forms/FormFieldWrapper.tsx","components/Quotations/fragments.ts","components/Settings/Countries/CountryField.tsx","components/Quotations/CalculateQuotationService.tsx","components/Quotations/QuotationForm/quotationValidationSchema.ts","components/Proposals/types.ts","components/AccountManagers/fragments.ts","components/Forms/FormikEffects.tsx","components/SceneLoadingSpinner.tsx","components/AddressLookup/AddressAutocompleteFindQuery.tsx","components/AddressLookup/AddressAutocompleteRetrieveQuery.tsx","components/AddressLookup/index.tsx","components/AddressLookup/AddressFormSection.tsx","components/Forms/FormInputField.tsx","components/RouterDropdownItem.tsx","components/Forms/telephoneValidationSchema.ts","components/Forms/MultiSectionForm.tsx","components/Alerts/types.ts","components/Proposals/ProposalList/ProposalListQuery.tsx","components/shared/SummarySection/SummaryRow.tsx","components/Proposals/ProposalForm/DateSelectRow.tsx","components/Alerts/AlertsProvider.tsx","components/Proposals/ProposalForm/TitleSelectField.tsx","components/Proposals/ProposalForm/ProposalFormClearQuotation.tsx","components/Proposals/ProposalForm/ProposalQuestion.tsx","components/Quotations/QuotationForm/TargetByDropdown.tsx","components/Quotations/QuotationForm/TargetByField.tsx","components/PageNotFound.tsx","components/Forms/utils.ts","components/Forms/mobileValidationSchema.tsx","components/Proposals/ProposalForm/vehicleValidationSchema.ts","components/Quotations/QuotationForm/FinanceFormSection.tsx","components/Quotations/QuotationForm/MultiQuoteResultTable.tsx","components/Proposals/ProposalForm/businessCustomerValidationSchema.ts","components/Forms/BooleanCheckboxField.tsx","components/Dealers/DealerSelect.tsx","components/Quotations/QuotationQuery.tsx","components/Proposals/ProposalForm/financeValidationSchema.ts","components/Proposals/ProposalForm/proposalCustomerQuestionsValidationSchema.tsx","components/Proposals/ProposalForm/proposalValidationSchema.ts","components/Alerts/index.tsx","components/Forms/draftFormUtils.ts","components/Quotations/quotationRequestValidator.ts","components/Forms/FormUpdateButtons.tsx","components/Settings/Countries/CountrySelect.tsx","components/Proposals/IndustryListQuery.tsx","components/Quotations/QuotationForm/VehicleLookupField.tsx","components/Quotations/QuotationForm/VehicleMakesQuery.tsx","components/Quotations/QuotationForm/VehicleMakeField.tsx","components/Quotations/QuotationForm/VehicleModelsQuery.tsx","components/Quotations/QuotationForm/VehicleModelField.tsx","components/Quotations/QuotationForm/VehicleStylesQuery.tsx","components/Quotations/QuotationForm/VehicleStyleField.tsx","components/Proposals/ProposalForm/AgeInMonthsField.tsx","components/Proposals/ProposalForm/VehicleSection.tsx","components/shared/InformationTable.tsx","components/Proposals/ProposalForm/BusinessDetailsSection.tsx","components/Settings/Countries/CountryQuery.tsx","components/Forms/CheckboxField.tsx","components/Proposals/ProposalForm/IndividualCustomerSection.tsx","components/shared/EmailButton.tsx","components/Proposals/ProposalForm/ProposalVehicleSection.tsx","components/Forms/ReadOnlyNumberField.tsx","components/Quotations/TryCreateQuotationMutation.tsx","components/Proposals/ProposalForm/ProposalFormCreateQuotation.tsx","components/Proposals/ProposalForm/ProposalMultiQuoteResult.tsx","components/Proposals/ProposalForm/ProposalMultiQuoteResultModal.tsx","components/Quotations/CreateFullProposalQuotationMutation.tsx","components/Proposals/ProposalForm/FinanceSection.tsx","components/Proposals/ProposalForm/HomeAddressSection.tsx","components/Proposals/ProposalForm/HomeAddressHistorySection.tsx","components/Proposals/ProposalForm/DirectorsDetailsSection.tsx","components/Proposals/ProposalForm/DirectorsSection.tsx","components/Proposals/ProposalForm/EmploymentDetailsSection.tsx","components/Proposals/ProposalForm/EmploymentHistorySection.tsx","Header_logo.svg","components/LoadingSpinner.tsx","components/Breadcrumbs.tsx","components/Forms/ConfirmDialogProvider.tsx","components/Settings/Users/fragments.ts","components/FileDownloadLink.tsx","components/Dealers/DealerForm/FollowUpQuestions.tsx","components/Dealers/DealerList/DealerListQuery.tsx","components/withToggleState.tsx","components/Proposals/ProposalForm/DistanceInWordsText.tsx","components/Alerts/AlertMessageQueries.tsx","components/Quotations/QuotationList/QuotationListQuery.tsx","components/Announcements/fragments.ts","components/Proposals/ProposalBadges.tsx","components/Quotations/ProposalQuotationQuery.tsx","components/Proposals/CreateProposalMutation.tsx","components/Proposals/DraftProposals/CreateOrUpdateDraftProposalMutation.tsx","components/Proposals/DraftProposals/DraftProposalQuery.tsx","components/Proposals/DraftProposals/DraftProposalService.tsx","components/Proposals/ProposalBreadcrumbs.tsx","components/Proposals/ProposalForm/BankDetailsSection.tsx","components/Proposals/ProposalForm/CapitalizeCustomerName.tsx","components/Proposals/ProposalForm/DealerNotesSection.tsx","components/Proposals/ProposalForm/DealerSection.tsx","components/Proposals/ProposalForm/PrivacySection.tsx","components/Proposals/DirectDeals/DirectDealModal.tsx","components/Proposals/ProposalForm/ProposalFormHeader.tsx","components/Proposals/ProposalForm/ProposalFormQuotationCalculator.tsx","components/Proposals/ProposalForm/SummarySection.tsx","components/Proposals/ProposalForm/index.tsx","components/Proposals/DirectDeals/DirectDealQuery.tsx","components/Proposals/DirectDeals/CreateOrUpdateDirectDealMutation.tsx","components/Proposals/DirectDeals/DirectDealService.tsx","components/Proposals/DirectDeals/IDDValidationSchema.tsx","components/Proposals/DirectDeals/IDDForm.tsx","components/Proposals/CreateProposalScene.tsx","components/Quotations/QuotationForm/QuotationResultList.tsx","components/Quotations/QuotationForm/QuotationResultModal.tsx","components/Quotations/QuotationForm/QuotationErrorModal.tsx","components/Quotations/QuotationForm/QuotationResultTable.tsx","components/Forms/AnimatedHeightContainer.tsx","components/Quotations/QuotationForm/CapitalizeQuotationCustomerName.tsx","components/Quotations/QuotationForm/VehicleFormSection.tsx","components/Quotations/QuotationForm/MultiQuoteResultSmallTable.tsx","components/Quotations/QuotationForm/MultiQuoteResultCard.tsx","components/Quotations/QuotationForm/MultiQuoteResultModal.tsx","components/Quotations/QuotationForm/index.tsx","components/Proposals/ProposalScene/SuitabilityForm/SuitabilityQueries.tsx","components/Forms/AutoGeneratedFormSectionSummary.tsx","components/Proposals/ProposalForm/ValidateBankAccountButton.tsx","components/useHtmlElementClass.ts","utils/index.ts","components/Forms/RadioField.tsx","components/Quotations/types.ts","components/LoggedInUserQuery.tsx","components/shared/AddressRow.tsx","components/Forms/FormGroupWrapper.tsx","config.ts","components/HomeScene/Blog_1.jpg","components/HomeScene/Blog_2.jpg","components/HomeScene/Blog_3.jpg","components/HomeScene/HomeSceneNotifications.tsx","components/Forms/FormNav.tsx","components/Forms/FormSectionFooter.tsx","components/Forms/FormSectionWrapper.tsx","fonts/open-sans-v15-latin-300.woff2","fonts/open-sans-v15-latin-regular.woff2","fonts/open-sans-v17-latin-700.woff2","components/Forms/CustomSelect.tsx","components/Dealers/fragments.ts","components/Auth0Login/Auth0Provider.tsx","components/Permissions/types.ts","components/Dealers/DealerQuery.tsx","components/Proposals/fragments.ts","components/Proposals/ProposalForm/individualCustomerValidationSchema.ts"],"names":["getLabel","options","value","option","find","x","label","SelectField","name","title","placeholder","colSize","autoFocus","disabled","field","form","onChange","setFieldValue","setFieldTouched","setTimeout","validateForm","onBlur","isDisabled","SummaryDisplaySection","subTitle","children","useHtmlElementClass","className","UserRoles","DebounceKeys","ContextNames","FormSize","ProductTypeEnum","AlertMessages","isVisible","usePageVisibility","activeAlertMessages","useActiveAlertMessages","undefined","map","message","i","color","AlertColor","info","redirectPath","onClick","window","open","key","alert","fade","GET_LATEST_ANNOUNCEMENT","gql","ShallowAnnouncementWebUserFragment","UPDATE_ANNOUNCEMENT_WEB_USER","Announcements","useQuery","loading","data","latestAnnouncement","loggedInUser","latestAnnouncementWebUser","useLatestAnnouncement","React","useState","showModal","setShowModal","mutation","useMutation","useUpdateAnnouncementForUser","dismissModal","useCallback","variables","userId","announcementId","confirmed","dismissed","confirmModal","announcement","dismissedCount","messageMarkdown","buttonText","maxDismissedCount","canDismiss","Modal","isOpen","toggle","centered","modalTransition","timeout","ModalHeader","ModalBody","source","ModalFooter","Button","Auth0Login","useAuth0","loginWithRedirect","isAuthenticated","redirectPasswordless","setRedirectPasswordless","qs","querystring","location","search","returnTo","email","toLowerCase","startsWith","localStorage","getItem","redirectInfo","JSON","parse","path","setItem","stringify","to","Auth0Callback","handleRedirectCallback","history","useHistory","a","async","push","passwordlessConfig","WebAuth","clientID","config","AUTH0_CLIENT_ID","domain","AUTH0_DOMAIN","redirectUri","getPasswordlessRedirectUri","responseType","PasswordlessAuth0Callback","parseHash","hash","err","authResult","Forbidden","logout","Container","outline","USER_DEALER","DealerFragment","FullDealerFragment","dashboardPromise","Dashboard","HomeScene","client","useApolloClient","query","GET_LOGGED_IN_USER","PROPOSAL_LIST","input","fundedDealersOnly","hasDebitBackOnly","page","pageSize","status","ActiveProposalStatus","statisticsFilterByDate","filterByDate","ProposalSearchDate","PAID_OUT_DATE","QUOTATION_LIST","usePreloadedData","useLoggedInUser","isAccountManager","isRegionalSalesManager","isSales","moment","isSameOrBefore","Alert","icon","faGifts","faCarSide","Jumbotron","classnames","Row","Col","md","fallback","SceneLoadingSpinner","lg","style","HomeSceneNotifications","Card","CardImg","top","src","Image_1","CardBody","CardTitle","CardText","FileDownloadLink","href","API_URL","target","Image_2","Image_3","ScrollToTop","prevProps","this","props","pathname","scrollTo","withRouter","ServerError","LogoutDropdownItem","DropdownItem","faSignOutAlt","MenuNavLink","activeClassName","TopNavbar","context","active","setActive","checkCanRead","checkCanCreate","isDealer","isSuperUser","isAdministrator","isDirectCustomer","useEffect","listen","Navbar","dark","expand","DIRECT_DEAL","alt","Header_logo","width","NavbarToggler","Collapse","navbar","Nav","UncontrolledDropdown","nav","inNavbar","DropdownToggle","caret","username","DropdownMenu","right","isSuspended","PermissionModuleNames","Quotations","NavItem","Proposals","Dealers","AccountManagers","RegionalSalesManagers","faCog","Users","RouterDropdownItem","divider","Alerts","Permissions","encodeURIComponent","AUTOCONVERT_NAME","faUser","DirectDealCompleteScene","DirectDealLogin","setEmail","otp","setOtp","emailError","otpError","roleError","error","setError","success","setSuccess","Form","onSubmit","e","preventDefault","passwordlessStart","connection","send","res","Id","FormGroup","Label","htmlFor","Input","id","type","required","passwordlessLogin","verificationCode","console","log","quotationRouterPromise","QuotationRouter","proposalRouterPromise","ProposalRouter","dealerRouterPromise","DealerRouter","accountManagerRouterPromise","AccountManagerRouter","regionalSalesManagerRouterPromise","RegionalSalesManagerRouter","SettingsRouter","MigrateRouter","releaseNotesPromise","ReleaseNotesPromiseScene","TermsAndConditions","getLoginPath","AppRouter","GET_LOGGED_IN_USER_SHALLOW","userLoading","auth0Loading","isLoggedIn","statusCode","networkError","isServerError","roles","includes","direct_customer","isForbidden","useLoggedInStatus","component","exact","CreateProposalScene","from","PageNotFound","dataIdFromObject","object","typename","__typename","proposalRef","defaultIdResolver","_","args","dataId","toIdValue","configureApolloClient","link","Error","cache","InMemoryCache","cacheRedirects","Query","identityProviderUser","proposal","user","draftProposal","quotation","dealer","accountManager","regionalSalesManager","proposalNote","dealerContact","draftDealer","country","occupationType","alertMessage","activity","PermissionsSection","role","module","permission","roleId","moduleId","ApolloClient","defaultOptions","watchQuery","errorPolicy","mutate","postErrorAlert","alertsProvider","addAlert","authLink","getToken","setContext","headers","token","authorization","configureApolloLink","httpLink","HttpLink","credentials","uri","GRAPHQL_ENDPOINT","debounceLink","DebounceLink","errorLink","onError","graphQLErrors","TITLE","forEach","replace","cleanMessage","ApolloLink","DealerPortalApolloProvider","setClient","apolloLink","apolloClient","TawkToLoader","setChatAttributes","bind","getApi","tawkTo","enabled","TAWK_TO_SITE_ID","script","crossorigin","warn","logErrorToConsole","then","api","setAttributes","forename","surname","filter","join","addTags","catch","tries","Promise","resolve","reject","checkForApi","Tawk_API","withLoggedInUser","VERSION_CHECK_INTERVAL","VERSION_CHECK_INTERVAL_MINS","VersionChecker","interval","checkVersion","state","setInterval","clearInterval","axios","get","r","version","warning","reload","setState","withAlerts","App","rel","lightFont","as","crossOrigin","normalFont","boldFont","AlertsProvider","Auth0Provider","ConfirmDialogProvider","Boolean","hostname","match","rootElement","document","getElementById","rootComponent","ReactDOM","navigator","serviceWorker","ready","registration","unregister","FormFieldWrapper","description","fieldProps","QuotationFragment","VehicleFragment","CountryFieldInner","otherCountryInitial","otherCountry","setOtherCountry","checked","onRadioChanged","countryId","onSelectCountry","CountryField","CALCULATE_QUOTATION","CALCULATE_ALPHERA_QUOTATION","CALCULATE_MANN_ISLAND_QUOTATION","CalculateQuotationService","requestId","calculateQuotations","debounce","leading","trailing","calculateQuotationList","prevInput","nextInput","quotationRequestValidator","isValidSync","isEqual","isMannIslandDealer","isMulti","currentRequestId","result","calculateMannIslandQuotationList","calculateAlpheraQuotationList","withApollo","financeValidationSchema","Yup","shape","cashPrice","default","typeError","moreThan","deposit","lessThan","min","partExchangeValue","partExchangeSettlement","arrangementFee","nullable","completionFee","guaranteedFutureValue","commission","commissionCode","aprRate","flatRate","productType","term","integer","monthlyPayment","test","createError","quotationValidationSchema","dealerId","max","middleName","mobile","showFinanceSection","showLoanDetailsSection","showResults","showCommission","finance","vehicle","vehicleValidationSchema","targetBy","QuotationTargetBy","APR_RATE","targetByValue","productTypes","of","ensure","skipVehicle","parent","length","HP","PCP","ProposalFormSectionName","EmploymentTerms","EmploymentStatus","EmploymentType","EarningsFrequency","ProposalType","MaritalStatus","DrivingLicense","EmploymentTypesRequiringEmployerName","EMPLOYED","SELF_EMPLOYED","GOVERNMENT","MILITARY","STUDENT","HomeOwnership","BusinessType","DrivingLicenseLookup","UK_FULL","UK_PROVISIONAL","EU_LICENSE","NO_LICENSE","OTHER","DirectorOwnerStatus","ProposalStatusEnum","ProposalCancelTypeEnum","BusinessTypeLookup","LTD","LLP","VehicleTypeEnum","SuitabilityFormSectionName","EquityFundingOptions","ProposalSearchDateLookup","CREATED_DATE","ACCEPTED_DATE","CANCEL_DATE","ALL_DATES","ProposalStatusLookup","UNDERWRITING","SENT_TO_LENDER","DECLINED","ACCEPTED","PAID_OUT","NOT_TAKEN_UP","NO_FURTHER_ACTION","SENT_TO_PAYOUTS","INCOMPLETE","AWAITING_DOCS","PARTIAL_DOCS","CANCELLED","AccountManagerFragment","AccountManagerShallowFragment","AccountManagerTargetsFragmentWithoutNetProfit","AccountManagerActualsFragmentWithoutNetProfit","AccountManagerTargetsFragment","AccountManagerActualsFragment","SAVE_DELAY","FormikEffects","delay","debounceOptions","formik","values","errors","Component","connect","ADDRESS_AUTOCOMPLETE_FIND","AddressAutocompleteFindQuery","pathFilter","ADDRESS_AUTOCOMPLETE_RETRIEVE","AddressLookup","select","handleChange","readOnly","menuIsOpen","lastPathFilter","addressAutocomplete","summaryLine","locationSummary","count","shortLabel","lastItem","removeFilterOption","unshift","retrieving","faSpinner","spin","CustomSelect","ref","inputValue","onInputChange","meta","toggleMenuIsOpen","action","blurInputOnSelect","filterOption","closeMenuOnSelect","isClearable","noOptionsMessage","s","blur","focus","f","pop","retrieve","onSelectAddress","finally","AddressFormSection","clearAddress","toggleEditMode","handleSelectAddress","hasAddress","pathToAddress","edit","hasError","hidden","FormInputField","CountrySelect","address","getSingleLineAddress","marginTop","line1","line2","line3","town","county","postcode","touched","propNames","pathArray","split","reduce","o","n","selectedAddress","EnhancedField","compose","shouldUpdate","nextReadOnly","nextValue","nextName","nextTouched","nextErrors","nextDescription","units","step","spellCheck","rest","unitsPosition","addonType","crazyNumbers","telephoneValidationSchema","matches","transform","CreateOrUpdateMode","argsEqual","newArgs","lastArgs","every","MultiSectionForm","navigateToSection","navigateToNextSection","isSectionValid","isSectionTouched","getIsSectionTouchedLookup","memoizeOne","getIsSectionValidLookup","touchSection","touchAllSections","getSectionTouched","handleIsEditingChanged","handleSubmit","validateSections","isEditing","createOrUpdate","CREATE","editMode","UPDATE","section","sections","submitButtonText","onSectionChanged","savingDraft","draftLastSaved","draftValidationMessage","saveDraft","canUpdate","populateModal","formikProps","currentSectionId","sectionInfo","process","isLastSection","indexOf","isSectionTouchedLookup","isSectionValidLookup","sectionHeaders","activeSection","SectionComponent","footerProps","onSubmitForm","submitForm","isSubmitting","dirty","isValid","onIsEditingChanged","onCompleteSection","sectionProps","Summary","summaryComponent","AutoGeneratedFormSectionSummary","autoComplete","currentSection","subtitle","UPDATE_FORM","initialValues","handleReset","resetForm","allValues","allWatched","prev","merge","watchFields","missingValues","findWatchedFieldsNotInData","missingWatched","findDataValuesNotWatched","nextSection","obj","val","findTouched","innerFields","innerTouched","keys","Object","k","t","isArray","findErrors","innerErrors","some","Array","watch","setTouched","allTouched","index","UncontrolledMultiSectionForm","ShallowProposalFragment","useProposalListCount","countOnly","proposals","pageInfo","totalResults","useProposalList","pollInterval","fetchPolicy","SummaryRow","highlight","firstColumnSize","noGutters","sm","ExternalLinkSummaryRow","addHttp","faExternalLinkAlt","EmailSummaryRow","DateSummaryRow","date","format","YesNoSummaryRow","trueText","falseText","extractUkTelephoneNumber","telephone","exec","TelephoneSummaryRow","datePattern","monthOptions","month","padStart","toString","dateStyle","selectStyles","container","provided","DateSelectRow","updateDay","updateMonth","updateYear","handleBlur","preventMaxYear","day","year","results","RegExp","isNumeric","parseInt","isTouched","styles","theme","selectTheme","Date","getFullYear","dayText","oldValue","dateText","monthText","yearText","AlertsContext","alerts","removeAlert","clearAlerts","Provider","existing","uuid","danger","Consumer","alertProps","AlertsConsumer","titleOptions","titleStyles","TitleSelectField","titleOption","for","ProposalFormClearQuotation","clearQuotation","ProposalQuestion","text","additionalMessage","reverseValues","TargetByDropdown","updateValue","targetByInfo","QuotationTargetByLookup","COMMISSION_VALUE","InputGroupButtonDropdown","tabIndex","shortDescription","TargetByField","customOnBlur","FormGroupWrapper","InputGroup","MONTHLY_PAYMENT","InputGroupAddon","FLAT_RATE","inner","watched","childPath","hasOwnProperty","uniq","cleanProposalBeforeSubmit","cleanFormData","externalSource","autoConvertLenderName","isRegUnknown","regNoNotFound","LCV","totalFinance","interestCharges","totalCharges","balancePayable","totalAmountPayable","lessRentalDeposit","paidOutDate","dealerCommission","quotationListResult","rate","createdDate","proposalType","autoConvertReference","individualCustomer","countryOfBirth","nationality","countryOfResidence","countryOfActivity","business","directors","director","mobileValidationSchema","isCommercial","isNew","regNo","when","is","regUnknown","skip","vIN","reg","notOneOf","make","model","bodyStyle","dateOfRegistration","cAP","Motorhome","capId","mileage","vehicleType","maxAnnualMileage","vatQualifying","colour","doors","transmission","insuranceGroup","derivative","engineSize","fuel","termOptions","FinanceFormSection","toggleIsCollapsed","touchAllFields","handleNextButtonClick","isCollapsed","agreedApr","roundNumber","getFinanceValue","toFixed","size","financeErrors","getLowestPayment","Math","MultiQuoteResultTableRow","lenderName","lowestProductPayment","formatCurrency","round","MultiQuoteResultTable","onSelectResult","headerText","filteredByTermResults","productTypeArray","lowestByProduct","p","activeIndex","setActiveIndex","typeName","sort","b","toUpperCase","sortByProductType","sortByLowest","textA","textB","sortByNameDesc","lenderId","addressSchema","SPECIAL_CHARACTER_SELECT","trim","totalMonthlyRentOrMortgage","businessAddressSchema","directorValidationSchema","dOB","DATE_PATTERN","testDateStringIsValid","earnings","guarantor","owner","otherStatus","homeYears","homeMonths","maritalStatus","drivingLicense","countryOfBirthId","nationalityId","countryOfResidenceId","businessCustomerValidationSchema","natureOfBusiness","contactName","contactPosition","businessType","registrationNumber","notRequired","established","yearsAtAddress","monthsAtAddress","BooleanCheckbox","submitOnChange","BooleanCheckboxField","DealerSelect","accountManagerId","onSelectDealer","includeSuspended","setQuery","useDealerShallow","q","useDealerListShallow","dealers","fetchMore","edges","node","isMannIslandZList","isMultiQuote","selectedOption","onMenuScrollToBottom","hasMorePages","updateQuery","fetchMoreResult","mergeWith","objValue","srcValue","GET_QUOTATION","useQuotation","quotationId","QuotationQuery","period","balloonPayment","partExchange","cashDeposit","rFL","extras","requestDifferentLoanType","proposalCustomerQuestionsValidationSchema","privacyAgreement","oneOf","customerPresent","tNC","customerHasHadFinanceBefore","customerExpectsAffordabilityProblems","customerConfidentFinanceIsAffordable","customerUnderstandsAgreement","customerHappyAgreementIsGoodValue","customerAdditionalInfo","customerSaysDealerAnsweredQuestions","customerAnnualMileageRealistic","customerSoleSignatoryToBankAccount","proposalCustomerOverviewValidationSchema","individualCustomerValidationSchema","proposalBusinessOverviewValidationSchema","proposalVehicleOverviewValidationSchema","proposalFinanceOverviewValidationSchema","proposalValidationSchema","FORMSTATE_requiresQuotation","distanceSelling","isDealSaver","salesPerson","notes","bankDetails","branch","bank","sortCode","accountNumber","accountName","yearsWithBank","monthsWithBank","FORMSTATE_invalidBankAccount","proposalCustomerQuestions","FORMSTATE_noQuotationResults","FORMSTATE_noQuotationResultsReasons","DismissableAlert","transition","in","cursor","resetFieldsWithErrors","defaults","defaultValue","serializeTouchedData","parentPath","accumulator","prop","hydrateTouchedData","paths","valueIsArray","isProductTypeWithBalloon","LP","minTerm","maxTerm","compact","FormUpdateButtons","faEdit","useCountry","countries","useCountries","setInputValue","INDUSTRY_LIST","useIndustryList","industryList","IndustryListQuery","GET_VEHICLE_LOOKUP","VehicleLookupField","handleClick","updateVehicle","notFound","onKeyDown","display","vehicles","vehicleLookup","assign","capCode","capDer","regDate","lCV","imported","parseFloat","Van","Car","nextValues","setValues","onlyUpdateForKeys","VEHICLE_MAKES","VehicleMakesQuery","debounceKey","debounceTimeout","VehicleMakeField","vehicleMakes","VEHICLE_MODELS","VehicleModelsQuery","VehicleModelField","Placeholder","vehicleModels","VEHICLE_STYLES","VehicleStylesQuery","VehicleStyleField","vehicleStyles","AgeInMonthsField","ageInMonths","now","firstDayOfMonth","getMonth","differenceInCalendarMonths","getAgeInMonths","num","subMonths","getDateOfRegistration","toISOString","vehicleTypeOptions","VehicleRegistrationField","VehicleSection","isRegKnown","RadioField","getSingleLineVehicle","QUOTATION_FORM","InformationTableRow","highlighted","valueHighlighted","valueAlignRight","CurrencyRow","InformationTable","businessTypeOptions","businessDetailsWatchFields","otherBusinessType","BusinessDetailsSection","industryOptions","vertical","GET_COUNTRY","GET_COUNTRIES","CheckboxField","horizontal","opt","concat","maritalStatusOptions","formatEnumValue","drivingLicenseOptions","individualCustomerWatchFields","IndividualCustomerSection","fullName","getFullName","fullNameProperCase","capitalizeFirstLettersOnly","allCaps","shouldShowCustomerNameWarning","faExclamationTriangle","xs","EmailButton","url","body","querystringProps","safeBody","buildMailtoUrl","faEnvelope","proposalVehicleSectionWatchFields","VehicleSummary","ProposalVehicleSection","ReadOnlyNumberField","TRY_CREATE_QUOTATION","TRY_CREATE_INCOMPLETE_QUOTATION","TRY_CREATE_MANN_ISLAND_QUOTATION","financeFields","ProposalFormQuotationCalculator","getQuotation","cleanQuotation","hasFinanceValues","canCreateQuotation","createQuotation","createIncompleteQuotation","getTargetValue","isHidden","updateField","clearFields","callClient","tryCreateQuotation","tryCreateMannIslandQuotation","created","unableToQuote","messages","tryCreateIncompleteQuotation","formData","ProposalMultiQuoteRow","Badge","ProposalMultiQuoteResult","multiQuoteResult","lowestPayment","lowest","ProposalMultiQuoteResultModal","selectResult","tag","CREATE_FULL_PROPOSAL_QUOTATION","CreateFullProposalQuotationMutation","productTypeOptions","financeSectionWatchFields","FinanceSectionMessages","hasVehicleErrors","DEALER","VEHICLE","faInfoCircle","ProposalFormCreateQuotation","fixedWidth","faSave","FinanceSection","modalResult","aprDisabled","multiQuoteLoading","handleCalculateMultiQuote","hideModal","getProposalQuotation","cleanProposalQuotation","hasReg","multiQuoteRequest","proposalValues","returnValues","import","usage","vatQualify","getMultiQuoteRequest","mutationFunction","quoteValues","getErrorPaths","quotationResults","mutationFn","createFullProposalQuotation","proposalQuotation","homeOwnershipOptions","HomeAddressSection","remove","ownership","ValidateAddressDates","homeAddressHistoryWatchFields","homeAddresses","otherOwnership","homeAddressesError","HomeAddressHistorySection","collapseAddress","expandAddress","isValidated","collapsedItems","requiresHomeAddress","arrayHelpers","faChevronUp","faChevronDown","getMonthsAndYearsText","validateAddress","homeAddressSchema","faPlus","array","slice","splice","DirectorsDetailsSection","directorsSectionWatchFields","ShortDirectorSummary","DirectorsSection","collapseDirector","expandDirector","faUserPlus","employmentOccupationOptions","employmentTermsOptions","employmentStatusOptions","employmentTypeOptions","UNKNOWN","EmploymentDetailsSection","employmentDetails","isEmployed","employmentType","prevValues","currentValues","prevEmployers","currentEmployers","current","prevEmploymentType","currentEmploymentType","requiresEmployerInfo","employmentTerms","PERMANENT","employmentStatus","FULL_TIME","selfEmployedDirectorOrBoardMember","FollowUpQuestions","show","occupation","employerName","employmentHistorySectionWatchFields","countryOfActivityId","occupationTypeId","earningsPer","yearsWithEmployer","monthsWithEmployer","extension","fax","industry","employmentDetailsError","EmploymentCollapsedDetails","EmploymentHistorySection","collapseItem","expandItem","requiresEmploymentDetails","validateEmployer","employmentDetailsSchema","emp","exports","Breadcrumbs","breadcrumbs","ConfirmDialogContext","cancel","hide","dialog","isDisplayed","onClosed","cancelButtonColor","cancelButtonText","confirmButtonColor","confirmCallback","confirmButtonText","ConfirmDialog","confirmProps","callback","UserFragment","UserShallowFragment","IdentityProviderUserFragment","DEALER_LIST","DEALER_LIST_SHALLOW","SingleDealerFragment","useDealerList","DealerListQuery","initialActive","InnerComponent","useToggle","withQuerystringToggleState","paramName","getIsActive","previousQuery","queryString","staticContext","DistanceInWordsText","tick","counter","refreshInterval","distanceInWords","addSuffix","includeSeconds","AlertMessageFragment","ALERT_MESSAGE_LIST","GET_ALERT_MESSAGE","CREATE_OR_UPDATE_ALERT_MESSAGE","DELETE_ALERT_MESSAGE","GET_ACTIVE_ALERT_MESSAGES","useAlertMessage","AnnouncementFragment","ProposalBadges","cancelType","debitBacks","loan","isCancelled","getShortDate","lender","BUSINESS","convertToTitleCase","ACCOUNT_MANAGER","getShortDateAndTime","isSame","charAt","getProposalInitialValues","isIndividual","INDIVIDUAL","quotationVehicle","acceptanceFee","optionFee","ProposalQuotationQuery","quotationInitialValues","CREATE_PROPOSAL","ProposalFragment","CreateProposal","CREATE_OR_UPDATE_DRAFT_PROPOSAL","DraftProposalFragment","CREATE_OR_UPDATE_DRAFT_PROPOSAL_DIRECT_DEAL","DirectDealDraftProposalFragment","CreateOrUpdateDraftProposalDirectDealMutation","CreateOrUpdateDraftProposal","GET_DRAFT_PROPOSAL","GET_DRAFT_PROPOSAL_DIRECT_DEAL","DraftProposalShallowFragment","DraftProposalQuery","draftProposalId","DraftProposalService","draftProposalInitialValues","removeIdFields","requiresQuotation","initialTouched","touchedFields","initialSection","CreateOrUpdateDraftProposalMutation","mutateFn","cleanDraftProposal","cloneDeep","customerDescription","vehicleDescription","draft","createOrUpdateDraftProposal","directDealId","getBreadcrumbData","quotationName","ProposalBreadcrumbs","params","useParams","useLoggedInDealer","loggedInDealer","loggedInDealerLoading","useDraftProposal","draftProposalLoading","quotationLoading","useDealer","dealerLoading","populateBankAccountName","BankDetailsSection","invalidBankAccount","accountNotFound","displayType","onValueChange","formattedValue","ValidateBankAccountButton","validateFormData","onBankAccountValidated","CapitalizeCustomerName","prevVal","nextVal","titleCase","DealerNotesSection","rows","DealerSection","GET_DIRECT_DEAL_DEALER","PrivacySection","DirectDealModal","toggleAlert","saveDirectDeal","disabledConfirmButton","dealerName","customerEmail","totalMileage","annualMileage","ProposalFormHeader","directDealValidationMessage","loadingUser","checkCanUpdate","showDirectDealModal","modalState","setModalState","showAlert","setShowAlert","customerName","accountManagerEmail","position","isOnICORegister","canSubmitProposals","cc","subject","DirectDeal","handleFormChange","calculateQuotationValues","oldValues","getQuotationRequest","req","readOnlyFields","calculateQuotation","SummarySection","fin","customer","useDirectDealDealer","errorKeys","sectionFields","hasErrorsInOtherSections","scrollHeight","faArrowDown","hasBusinessDetails","hasDirectorDetails","AddressRow","hasEmploymentDetails","proposalFormSections","PRIVACY","CUSTOMER_DETAILS","BUSINESS_DETAILS","DIRECTORS","HOME_ADDRESSES","INDIVIDUAL_ADDRESS_YEARS_REQUIRED","INDIVIDUAL_ADDRESS_MAX_REQUIRED","BANK_DETAILS","EMPLOYMENT_HISTORY","EMPLOYERS_YEARS_REQUIRED","EMPLOYERS_MAX_REQUIRED","FINANCE","DEALERNOTES","SUMMARY","ProposalForm","getSections","handleSaveDraft","handleSaveDirectDeal","getDraftProposalValidationMessage","handleSectionChanged","getDirectDealValidationMessage","onSubmitProposal","showDealerSelect","draftProposalLastSaved","setSubmitting","validateOnChange","isInitialValid","validationSchema","saveDraftProps","directDealProps","directDeal","missingFields","sendDirectDeal","omitSections","GET_DIRECT_DEAL","DirectDealFragment","DirectDealQuery","CREATE_OR_UPDATE_DIRECT_DEAL","CreateOrUpdateDirectDeal","directDealResult","DirectDealService","CreateOrUpdateDirectDealMutation","IDDValidationSchema","iddSigned","printName","IDDForm","useCreateOrUpdateDirectDeal","rawValues","refetchQueries","convertNumber","directDealLoading","employment","YEARLY","CreateProposalMutation","updated","submitted","createProposal","writeFragment","fragment","fragmentName","QuotationResultCard","CardHeader","QuotationResultList","onSelectMoreInfo","termResults","unableToQuoteList","QuotationResultModal","offset","QuotationErrorModal","showErrorModal","errorMessage","ValueCell","UnableToQuoteTableRow","showProductType","colSpan","textAlign","verticalAlign","QuotationResultTableRow","QuotationResultTable","invisible","small","scope","productResultsByTerm","item","getProductResultsByTerm","terms","InnerContainer","SizeAwareContainer","withSize","monitorHeight","monitorWidth","AnimatedHeightContainer","isInitialHeight","handleSize","height","defaultStyle","spring","stiffness","damping","precision","onSize","CapitalizeQuotationCustomerName","VehicleFormSection","handleskipVehicle","nextButtonClicked","vehicleErrors","LoggedInUserQuery","hasErrors","MultiQuoteResultSmallTableRow","MultiQuoteResultSmallTable","MultiQuoteResultCard","MultiQuoteResultModal","mapQuotationToFormValues","quotationHasId","isMannIslandZlist","errObj","nextPath","QuotationForm","vehicleSectionCompleted","financeSectionCompleted","handleCalculateRepayments","loanDetailsSectionCompleted","hideCard","showCard","hideErrorModal","setLoading","getWindowDimensions","setWindowDimensions","cardResult","unsavedResults","loadingResults","errorModalMessage","addEventListener","onSubmitQuotation","DealerQuery","mapFormValues","forMannIslandDealer","forMannIslandZList","quotationRequest","refresh","ResponsiveMultiQuoteResultList","quotationRequest2","ResponsiveQuotationResultList","calculateQuotationList2","innerWidth","innerHeight","SuitabilityFragment","CREATE_OR_UPDATE_SUITABILITY","SEND_SUITABILITY_FORM","useSendSuitabilityForm","fieldInfo","getFieldComponents","fields","schema","fieldSchema","arraySchema","acc","describe","displayValue","summaryProps","VALIDATE_BANK_ACCOUNT","onMouseDown","formIsValid","bankAccountLookup","validateBankAccount","addBodyClass","documentElement","classList","add","removeBodyClass","getShortAddress","line","reverse","Intl","NumberFormat","currency","isNaN","isFinite","cleanNumber","number","shortenNumberForDisplay","enumValue","capitalizeFirstLetter","formatToPercentage","getProportion","numerator","denominator","totalMonths","months","years","monthsText","yearsText","getMonthDateRange","start","startOf","end","subtract","endOf","getYearDateRange","getFinancialYearDateRange","adjustedDate","clone","startDate","endDate","getCurrentQuarter","validatePassword","password","minScore","minLength","containsLowerCase","containsUpperCase","containsNumbers","containsSymbols","score","mergedOptions","keepNulls","cleanFormDataCore","shouldRemoveField","cloneDeepWith","shouldRemoveFormField","employer","administrator","account_manager","senior_manager","canManageUsers","canManageAccountManagers","canManageRegionalSalesManagers","canManageTargets","regional_sales_manager","canViewNetProfit","canManageProposalFiles","case_management_team","canEditProposal","proposalStatus","hasPermissionToEdit","proposalCanBeEdited","EMAIL_PATTERN","GUID_PATTERN","isSameOrAfter","LoggedInUserFragment","LoggedInUserShallowFragment","LOGGED_IN_USER_WITH_DEALER_RATES_QUERY","LoggedInUserQueryCore","LoggedInUserWithDealerRatesQuery","WrappedComponent","graphql","ownProps","isInRoles","checkIsInRole","isSeniorManager","isCaseManagementTeam","getPermissionsLookup","permissions","activities","permissionModuleId","checkIsAuthorized","permissionModule","PermissionActivityNames","Read","checkCanReadInternal","ReadInternal","Create","Update","checkCanDelete","Delete","descriptionNode","getConfig","env","REACT_APP_AUTH0_CLIENT_ID","REACT_APP_AUTH0_DOMAIN","AUTH0_AUDIENCE","REACT_APP_AUTH0_AUDIENCE","REACT_APP_TITLE","PUBLIC_URL","REACT_APP_API_URL","REACT_APP_VERSION_CHECK_INTERVAL_MINS","MAPBOX_ACCESS_TOKEN","REACT_APP_MAPBOX_ACCESS_TOKEN","MAPBOX_STYLE","REACT_APP_MAPBOX_STYLE","MAPBOX_DARK_STYLE","REACT_APP_MAPBOX_DARK_STYLE","MAPBOX_SATELLITE_STYLE","REACT_APP_MAPBOX_SATELLITE_STYLE","MAPBOX_USERNAME","REACT_APP_MAPBOX_USERNAME","AUTOCONVERT_URL","REACT_APP_AUTOCONVERT_URL","REACT_APP_AUTOCONVERT_NAME","REACT_APP_TAWK_TO_SITE_ID","SHAREPOINT_URL","REACT_APP_SHAREPOINT_URL","searchArgs","FormNavDropdown","withToggleState","currentProps","SectionStatusText","padding","faCheck","faExclamation","FormNavItem","data-toggle","aria-controls","aria-selected","FormNav","FormSectionFooter","toDate","FormSectionWrapper","minWidth","menu","zIndex","fontSize","control","isFocused","boxShadow","borderColor","minHeight","valueContainer","left","borderRadius","colors","primary","primary75","primary50","primary25","spacing","controlHeight","DirectDealDealerFragment","DealerContactFragment","ShallowDealerFragment","DealerQuestionnaireFragment","DraftDealerFragment","DraftDealerShallowFragment","DealerBonafideeEsignFragment","LenderRatesForDealersFragment","protocol","host","auth0Config","client_id","redirect_uri","getRedirectUri","audience","Auth0Context","getReturnToUrl","appState","setReturnToUrl","v4","createAuth0Client","auth0Client","authenticationMethods","login_hint","getTokenSilently","localOnly","contextValues","GET_DEALER","GET_DEALER_SHALLOW","GET_LOGGED_IN_DEALER","GET_LOGGED_IN_DEALER_AND_QUESTIONNAIRE","GET_DEALER_AND_QUESTIONNAIRE","useDealerWithQuestionnaire","useLoggedInDealerWithQuestionnaire","BankDetailsFragment","IndividualCustomerFragment","BusinessFragment","FinanceFragment","ProposalCustomerQuestionsFragment","ProposalNotesFragment","DraftProposalFormDataFragment","UpdateIndividualFragment","UpdateBusinessFragment","UpdateVehicleFragment","UpdateFinanceFragment","proposalId","dateValue","yearsRequired","maxAddresses","addr","durationMessage","employersRequired"],"mappings":"kGAAA,mCAKMA,EAAW,SAACC,EAAuCC,GACvD,IAAMC,EAASF,EAAQG,MAAK,SAACC,GAAD,OAAOA,EAAEH,QAAUA,KAC/C,OAAOC,GAAUA,EAAOG,OA4DXC,IAzDK,SAAC,GAAD,IAClBC,EADkB,EAClBA,KACAC,EAFkB,EAElBA,MACAC,EAHkB,EAGlBA,YACAC,EAJkB,EAIlBA,QACAV,EALkB,EAKlBA,QACAW,EANkB,EAMlBA,UACAC,EAPkB,EAOlBA,SAPkB,OAiBlB,gBAAC,IAAD,CAAOL,KAAMA,IACV,YAAuC,IAApCM,EAAmC,EAAnCA,MAAOC,EAA4B,EAA5BA,KACT,OACE,gBAAC,IAAD,CACEN,MAAOA,EACPE,QAASA,EACTG,MAAOA,EACPC,KAAMA,GAEN,gBAAC,IAAD,CACEP,KAAMM,EAAMN,KACZN,MACEY,EAAMZ,MACF,CACEI,MAAON,EAASC,EAASa,EAAMZ,OAC/BA,MAAOY,EAAMZ,OAEf,KAENc,SAAU,SAACb,GACTY,EAAKE,cACHH,EAAMN,KACLL,EAAeD,OAChB,GAEFa,EAAKG,gBAAgBJ,EAAMN,MAAa,GAAM,GAC9CW,WAAWJ,EAAKK,aAAc,IAEhCC,OAAQ,kBAAMN,EAAKG,gBAAgBJ,EAAMN,MAAM,IAC/CP,QAASA,EACTS,YAAaA,EACbE,UAAWA,EACXU,WAAYT,U,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,oBACA,yBACA,SAAU9gB,GACR,QACEA,GACAA,EAAMqiB,QACNriB,EAAM,GAAG4pB,UACR5pB,EAAM,GAAG4pB,QAAQ0J,YAEX3mB,KAAKoU,YAAY,CACtB9Z,KAAM,2DACN3E,QAAS,6BAMhB2P,SAAS,+BACTiP,IAAI,EAAG,4CACV0zB,uBAAwBr1B,WAAaY,UAAS,GAC9Cgf,iBAAkB5f,WACfnf,MAAM,oBACN+f,UAAS,GACTkC,OAAO,GACPpQ,WACAyN,aAAQtd,GACXg9B,cAAe7f,WACZnf,MAAM,eACN+f,WACAkC,OAAO,GACPpQ,WACAyN,aAAQtd,GACXi9B,qBAAsB9f,WACnBnf,MAAM,wBACN+f,WACAkC,OAAO,GACPpQ,WACAyN,aAAQtd,GACX0xC,kCAAmCv0B,YAChCnf,MAAM,2CACN6R,WACAyN,aAAQtd,GACXgyC,oBAAqB70B,WAClBnf,MAAM,uBACN+f,WACAkC,OAAO,GACP3C,aAAQtd,GACR+3B,KAAK,oCAAqC,CACzCC,IAAI,EACJzgB,KAAM4F,WAAatN,eAIVkxB,O","file":"static/js/main.a0fe61cc.chunk.js","sourcesContent":["import { Field, FieldProps } from \"formik\";\nimport * as React from \"react\";\nimport CustomSelect from \"./CustomSelect\";\nimport FormFieldWrapper from \"./FormFieldWrapper\";\n\nconst getLabel = (options: { label: any; value: any }[], value: any) => {\n const option = options.find((x) => x.value === value);\n return option && option.label;\n};\n\nconst SelectField = ({\n name,\n title,\n placeholder,\n colSize,\n options,\n autoFocus,\n disabled,\n}: {\n name: string;\n title: string;\n placeholder?: string;\n colSize: number;\n options: { label: any; value: any }[];\n autoFocus?: boolean;\n disabled?: boolean;\n}) => (\n \n {({ field, form }: FieldProps) => {\n return (\n \n {\n form.setFieldValue(\n field.name as any,\n (option as any).value,\n false\n );\n form.setFieldTouched(field.name as any, true, false);\n setTimeout(form.validateForm, 0);\n }}\n onBlur={() => form.setFieldTouched(field.name, true)}\n options={options}\n placeholder={placeholder}\n autoFocus={autoFocus}\n isDisabled={disabled}\n />\n \n );\n }}\n \n);\n\nexport default SelectField;\n","import * as React from \"react\";\nimport useHtmlElementClass from \"../../useHtmlElementClass\";\nimport \"./SummarySection.scss\";\n\nconst SummaryDisplaySection = ({\n title,\n subTitle,\n children\n}: {\n title?: string;\n subTitle?: string;\n children: React.ReactNode;\n}) => {\n useHtmlElementClass(\"smooth-scroll\");\n return (\n
\n {title ?

{title}

: null}\n {subTitle ? (\n
{subTitle}
\n ) : null}\n {children}\n
\n );\n};\n\nexport default SummaryDisplaySection;\n","import { AccountManager } from \"./AccountManagers/types\";\nimport { Dealer } from \"./Dealers/types\";\nimport { Permission } from \"./Permissions/types\";\n\nexport type RecursivePartial = {\n [P in keyof T]?: T[P] extends (infer U)[]\n ? RecursivePartial[]\n : T[P] extends object\n ? RecursivePartial\n : T[P];\n};\n\nexport enum UserRoles {\n dealer = \"dealer\",\n account_manager = \"account_manager\",\n regional_sales_manager = \"regional_sales_manager\",\n case_management_team = \"case_management_team\",\n senior_manager = \"senior_manager\",\n administrator = \"administrator\",\n partnership = \"partnership\",\n agent = \"agent\",\n group_manager = \"group_manager\",\n direct_customer = \"direct_customer\",\n}\n\nexport enum DebounceKeys {\n VEHICLE_MAKES = \"VEHICLE_MAKES\",\n VEHICLE_MODELS = \"VEHICLE_MODELS\",\n VEHICLE_STYLES = \"VEHICLE_STYLES\",\n SEARCH_IDENTITY_PROVIDER_USERS = \"SEARCH_IDENTITY_PROVIDER_USERS\",\n DEALER_LIST = \"DEALER_LIST\",\n ACCOUNT_MANAGER_LIST = \"ACCOUNT_MANAGER_LIST\",\n ACCOUNT_MANAGER_TARGETS_LIST = \"ACCOUNT_MANAGER_TARGETS_LIST\",\n}\n\nexport enum ContextNames {\n DEALER = \"DEALER\",\n ACCOUNT_MANAGER = \"ACCOUNT_MANAGER\",\n REGIONAL_SALES_MANAGER = \"REGIONAL_SALES_MANAGER\",\n UPDATE_FORM = \"UPDATE_FORM\",\n QUOTATION_FORM = \"QUOTATION_FORM\",\n DIRECT_DEAL = \"DIRECT_DEAL\",\n}\n\nexport enum FormSize {\n NARROW = \"NARROW\",\n WIDE = \"WIDE\",\n}\n\nexport interface User {\n id?: string;\n applicationUserId: string;\n username: string;\n isSuspended: boolean;\n canSubmitProposals: boolean;\n roles: UserRoles[];\n dealer?: Dealer;\n forename?: string;\n surname?: string;\n tawkTo?: {\n enabled?: boolean;\n hash?: string;\n };\n accountManager?: AccountManager;\n regionalSalesManager?: {\n id: string;\n };\n permissions?: Permission[];\n}\n\nexport interface Address {\n id?: string;\n line1?: string;\n line2?: string;\n line3?: string;\n town?: string;\n county?: string;\n postcode?: string;\n countryId?: string;\n telephone?: string;\n extension?: string;\n fax?: string;\n totalMonthlyRentOrMortgage?: number;\n}\n\nexport interface PagedArgs {\n page?: number;\n pageSize?: number;\n}\n\nexport interface SearchArgs extends PagedArgs {\n q?: string;\n}\n\nexport interface PageInfo {\n hasMorePages: boolean;\n page: number;\n pageSize: number;\n totalResults?: number;\n first: number;\n last: number;\n}\n\nexport interface SearchResults {\n pageInfo: PageInfo;\n edges: {\n node: T;\n }[];\n}\n\nexport enum ProductTypeEnum {\n PCP = \"PCP\",\n HP = \"HP\",\n LP = \"LP\",\n}\n\nexport type CompositeComponent

=\n | React.StatelessComponent

\n | React.ComponentClass

;\n\nexport default () => ({});\n","import React from \"react\";\nimport { usePageVisibility } from \"react-page-visibility\";\nimport { DismissableAlert } from \".\";\nimport { useActiveAlertMessages } from \"./AlertMessageQueries\";\nimport { AlertColor } from \"./types\";\n\n// Refresh every five minutes\nconst MESSAGE_REFRESH_INTERVAL = 1000 * 60 * 5;\n\nconst AlertMessages = () => {\n const isVisible = usePageVisibility();\n const activeAlertMessages = useActiveAlertMessages(\n isVisible ? MESSAGE_REFRESH_INTERVAL : undefined\n );\n return (\n <>\n {activeAlertMessages &&\n activeAlertMessages.map((message, i) => {\n message.color = AlertColor.info;\n if (!!message.redirectPath) {\n message.onClick = () => window.open(message.redirectPath, \"_blank\");\n }\n return ;\n })}\n \n );\n};\n\nexport default AlertMessages;\n","import gql from \"graphql-tag\";\nimport React from \"react\";\nimport { Query, QueryResult, useQuery } from \"react-apollo\";\nimport { User } from \"../types\";\nimport { ShallowAnnouncementWebUserFragment } from \"./fragments\";\nimport { Announcement, AnnouncementWebUser } from \"./types\";\n\ninterface LatestAnnouncementWebUserData {\n loggedInUser: User & { latestAnnouncementWebUser?: AnnouncementWebUser };\n}\n\nexport interface AnnouncementProps {\n loggedInUser: User;\n announcement: Announcement;\n}\n\nexport const GET_LATEST_ANNOUNCEMENT = gql`\n query LatestAnnouncementQuery {\n loggedInUser {\n id\n applicationUserId\n username\n roles\n latestAnnouncementWebUser {\n ...ShallowAnnouncementWebUserFragment\n }\n }\n }\n ${ShallowAnnouncementWebUserFragment}\n`;\n\nconst AnnouncementQuery = ({\n pollInterval,\n children\n}: {\n pollInterval?: number;\n children: (\n result: QueryResult & {\n latestAnnouncementWebUser?: AnnouncementWebUser;\n }\n ) => JSX.Element | null;\n}) => (\n \n query={GET_LATEST_ANNOUNCEMENT}\n pollInterval={pollInterval}\n >\n {result =>\n children({\n ...result,\n latestAnnouncementWebUser:\n result.data &&\n result.data.loggedInUser &&\n result.data.loggedInUser.latestAnnouncementWebUser\n })\n }\n \n);\n\nexport const useLatestAnnouncement = () => {\n const { loading, data } = useQuery(\n GET_LATEST_ANNOUNCEMENT\n );\n\n return {\n loading,\n latestAnnouncement: data?.loggedInUser?.latestAnnouncementWebUser\n };\n};\n\nexport default AnnouncementQuery;\n","import gql from \"graphql-tag\";\nimport * as React from \"react\";\nimport {\n Mutation,\n MutationFunction,\n MutationResult,\n useMutation\n} from \"react-apollo\";\n\ninterface UpdateAnnouncementForUserData {\n success: boolean;\n}\n\ninterface UpdateAnnouncementForUserVariables {\n userId: string;\n announcementId: number;\n confirmed: boolean;\n dismissed?: boolean;\n}\n\nexport const UPDATE_ANNOUNCEMENT_WEB_USER = gql`\n mutation UpdateAnnouncementForUser(\n $userId: ID!\n $announcementId: ID!\n $confirmed: Boolean!\n $dismissed: Boolean\n ) {\n updateAnnouncementForUser(\n userId: $userId\n announcementId: $announcementId\n confirmed: $confirmed\n dismissed: $dismissed\n ) {\n success\n }\n }\n`;\n\nconst UpdateAnnouncementWebUserMutation = ({\n children\n}: {\n children: (\n mutationFunction: MutationFunction<\n UpdateAnnouncementForUserData,\n UpdateAnnouncementForUserVariables\n >,\n result: MutationResult\n ) => JSX.Element | null;\n}) => {children};\n\nexport const useUpdateAnnouncementForUser = () => {\n const [updateAnnouncementForUser] = useMutation<\n UpdateAnnouncementForUserData,\n UpdateAnnouncementForUserVariables\n >(UPDATE_ANNOUNCEMENT_WEB_USER);\n return updateAnnouncementForUser;\n};\n\nexport default UpdateAnnouncementWebUserMutation;\n","import React from \"react\";\nimport ReactMarkdown from \"react-markdown\";\nimport { Button, Modal, ModalBody, ModalFooter, ModalHeader } from \"reactstrap\";\nimport { useLatestAnnouncement } from \"./AnnouncementQuery\";\nimport { useUpdateAnnouncementForUser } from \"./UpdateAnnouncementForUserMutation\";\n\nconst Announcements = () => {\n const { loading, latestAnnouncement } = useLatestAnnouncement();\n const [showModal, setShowModal] = React.useState(true);\n const mutation = useUpdateAnnouncementForUser();\n\n const dismissModal = React.useCallback(() => {\n if (latestAnnouncement) {\n mutation({\n variables: {\n userId: latestAnnouncement?.userId,\n announcementId: latestAnnouncement?.announcementId,\n confirmed: false,\n dismissed: true\n }\n });\n }\n setShowModal(false);\n }, [latestAnnouncement, mutation, setShowModal]);\n\n const confirmModal = React.useCallback(() => {\n if (latestAnnouncement) {\n mutation({\n variables: {\n userId: latestAnnouncement?.userId,\n announcementId: latestAnnouncement?.announcementId,\n confirmed: true\n }\n });\n }\n setShowModal(false);\n }, [latestAnnouncement, mutation, setShowModal]);\n\n if (loading || !latestAnnouncement?.announcement) {\n return null;\n }\n\n const { announcement, dismissedCount } = latestAnnouncement;\n\n const {\n title,\n messageMarkdown,\n buttonText,\n maxDismissedCount\n } = announcement;\n\n const canDismiss =\n (!maxDismissedCount && maxDismissedCount !== 0) ||\n dismissedCount < maxDismissedCount;\n\n return (\n \n \n {title}\n \n \n \n \n \n \n \n \n );\n};\n\nexport default Announcements;\n","import * as querystring from \"query-string\";\nimport * as React from \"react\";\nimport { useAuth0 } from \"./Auth0Provider\";\nimport { Redirect } from \"react-router\";\nimport { useState } from \"react\";\n\nconst Auth0Login = () => {\n const { loading, loginWithRedirect, isAuthenticated } = useAuth0();\n const [redirectPasswordless, setRedirectPasswordless] = useState(false);\n\n React.useEffect(() => {\n if (!loading && !isAuthenticated && loginWithRedirect) {\n const qs = querystring.parse(window.location.search);\n const returnTo = qs && qs?.returnTo;\n const email = qs?.email;\n\n if (returnTo && returnTo.toLowerCase().startsWith(\"/directdeal\")) {\n setRedirectPasswordless(true);\n } else {\n loginWithRedirect({ returnTo, email });\n }\n }\n }, [loading, loginWithRedirect, isAuthenticated]);\n\n if (redirectPasswordless) {\n const qs = querystring.parse(window.location.search);\n const returnTo = qs && qs?.returnTo;\n\n var data = localStorage.getItem(\"login_redirect\");\n if (data) {\n const redirectInfo = JSON.parse(data);\n redirectInfo.path = returnTo;\n localStorage.setItem(\"login_redirect\", JSON.stringify(redirectInfo));\n }\n\n return ;\n }\n\n return null;\n};\n\nexport default Auth0Login;\n","import * as React from \"react\";\nimport { useHistory } from \"react-router\";\nimport { useAuth0 } from \"./Auth0Provider\";\n\nconst Auth0Callback = () => {\n const { loading, handleRedirectCallback } = useAuth0();\n const history = useHistory();\n\n React.useEffect(() => {\n if (!loading && handleRedirectCallback) {\n (async () => {\n const { returnTo } = await handleRedirectCallback();\n\n history.push(returnTo);\n })();\n }\n }, [loading, handleRedirectCallback, history]);\n\n return null;\n};\n\nexport default Auth0Callback;\n","import config from \"../../config\";\nimport { WebAuth } from \"auth0-js\";\nimport { getPasswordlessRedirectUri } from \"./Auth0Provider\";\n\nexport const passwordlessConfig = new WebAuth({\n clientID: config.AUTH0_CLIENT_ID,\n domain: config.AUTH0_DOMAIN,\n redirectUri: getPasswordlessRedirectUri(),\n responseType: \"token\",\n});\n","import { useHistory } from \"react-router\";\nimport { passwordlessConfig } from \"./Auth0PasswordlessProvider\";\n\nconst PasswordlessAuth0Callback = () => {\n const history = useHistory();\n\n passwordlessConfig.parseHash(\n { hash: window.location.hash },\n (err, authResult) => {\n if (err) {\n return null;\n }\n\n const data = localStorage.getItem(\"login_redirect\");\n let returnTo: string | undefined;\n\n if (data) {\n const redirectInfo = JSON.parse(data);\n returnTo = redirectInfo.path;\n }\n\n history.push(returnTo || \"/forbidden\");\n return null;\n }\n );\n\n return null;\n};\n\nexport default PasswordlessAuth0Callback;\n","import * as React from \"react\";\nimport { Button, Container } from \"reactstrap\";\nimport { useAuth0 } from \"./Auth0Login/Auth0Provider\";\n\nconst Forbidden = () => {\n const { logout, loading } = useAuth0();\n\n if (loading || !logout) {\n return null;\n }\n\n return (\n \n

User is not authorised

\n

\n Login succeeded, but the user is not authorised to access the Eurodrive\n dealer portal.\n

\n

\n Contact your account manager or Eurodrive technical support to log in.\n

\n \n \n );\n};\n\nexport default Forbidden;\n","import gql from \"graphql-tag\";\nimport * as React from \"react\";\nimport { Query, QueryResult } from \"react-apollo\";\nimport { User } from \"../types\";\nimport { DealerFragment, FullDealerFragment } from \"./fragments\";\nimport { Dealer } from \"./types\";\n\nexport interface UserDealerProps {\n loggedInUser: User;\n}\n\nexport const USER_DEALER = gql`\n query UserDealerQuery {\n loggedInUser {\n id\n username\n isSuspended\n roles\n dealer {\n ...DealerFragment\n }\n }\n }\n ${DealerFragment}\n`;\n\nexport const USER_DEALER_AND_QUESTIONNAIRE = gql`\n query UserDealerAndQuestionnaireQuery {\n loggedInUser {\n id\n username\n isSuspended\n roles\n dealer {\n ...FullDealerFragment\n }\n }\n }\n ${FullDealerFragment}\n`;\n\nconst UserDealerQuery = ({\n query,\n children\n}: {\n query?: object;\n children: (\n result: QueryResult & {\n dealer?: Dealer;\n loggedInUser?: User;\n }\n ) => JSX.Element | null;\n}) => (\n query={query || USER_DEALER}>\n {(result: QueryResult) =>\n children({\n ...result,\n dealer: result?.data?.loggedInUser?.dealer,\n loggedInUser: result?.data?.loggedInUser\n })\n }\n \n);\n\nexport default UserDealerQuery;\n","import { faCarSide, faGifts } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport classnames from \"classnames\";\nimport moment from \"moment\";\nimport * as React from \"react\";\nimport { useApolloClient } from \"react-apollo\";\nimport Helmet from \"react-helmet\";\nimport { Link as RouterLink } from \"react-router-dom\";\nimport {\n Alert,\n Card,\n CardBody,\n CardImg,\n CardText,\n CardTitle,\n Col,\n Container,\n Jumbotron,\n Row\n} from \"reactstrap\";\nimport config from \"../../config\";\nimport { USER_DEALER } from \"../Dealers/UserDealerQuery\";\nimport FileDownloadLink from \"../FileDownloadLink\";\nimport { GET_LOGGED_IN_USER, useLoggedInUser } from \"../LoggedInUserQuery\";\nimport { PROPOSAL_LIST } from \"../Proposals/ProposalList/ProposalListQuery\";\nimport { ActiveProposalStatus, ProposalSearchDate } from \"../Proposals/types\";\nimport { QUOTATION_LIST } from \"../Quotations/QuotationList/QuotationListQuery\";\nimport SceneLoadingSpinner from \"../SceneLoadingSpinner\";\nimport Image_1 from \"./Blog_1.jpg\";\nimport Image_2 from \"./Blog_2.jpg\";\nimport Image_3 from \"./Blog_3.jpg\";\nimport HomeSceneNotifications from \"./HomeSceneNotifications\";\nimport \"./index.scss\";\n\nconst dashboardPromise = import(\n \"../AccountManagers/AccountManagerScene/UserAccountManagerTargetsTabContent\"\n);\nconst Dashboard = React.lazy(() => dashboardPromise);\n\nconst usePreloadedData = () => {\n const client = useApolloClient();\n\n React.useEffect(() => {\n // Preload the logged in user\n client.query({ query: GET_LOGGED_IN_USER });\n // Preload the user's dealer\n client.query({ query: USER_DEALER });\n // Preload the first page of proposals\n client.query({\n query: PROPOSAL_LIST,\n variables: {\n input: {\n fundedDealersOnly: false,\n hasDebitBackOnly: false,\n page: 1,\n pageSize: 10,\n status: ActiveProposalStatus,\n statisticsFilterByDate: true,\n filterByDate: ProposalSearchDate.PAID_OUT_DATE\n }\n }\n });\n // Preload the first page of quotations\n client.query({\n query: QUOTATION_LIST,\n variables: { input: { page: 1, pageSize: 10 } }\n });\n });\n};\n\nconst HomeScene = () => {\n usePreloadedData();\n const {\n loggedInUser,\n isAccountManager,\n isRegionalSalesManager\n } = useLoggedInUser();\n\n if (!loggedInUser) {\n return null;\n }\n\n const isSales = isAccountManager || isRegionalSalesManager;\n\n return (\n <>\n \n \n {moment().isSameOrBefore(moment(\"2020-01-02\", \"YYYY-MM-DD\")) ? (\n \n

\n \n Eurodrive festive opening times\n

\n
    \n
  • Christmas Eve: 9am – 1pm
  • \n
  • \n Christmas Day: Closed\n
  • \n
  • \n Boxing Day: Closed\n
  • \n
  • New Year's Eve: 9am – 3pm
  • \n
  • \n New Year's Day: Closed\n
  • \n
\n
\n ) : null}\n\n {isSales && (\n \n \n Do not use this site while driving\n \n )}\n \n \n \n
\n

Eurodrive motor finance

\n

Dealer portal

\n
\n \n New finance quotation\n \n \n Find a proposal\n \n
\n
\n \n
\n \n {isSales ? (\n }>\n \n \n

\n Today's activity\n

\n \n \n \n \n \n
\n
\n ) : null}\n \n \n \n \n \n FCA compliant\n \n As one of the first finance companies to be fully authorised\n by the FCA, Eurodrive Finance has blazed a trail in helping\n motor dealers understand the effects and implications of new\n regulation.\n \n \n Download sales and compliance guide\n \n \n \n \n \n \n \n \n Growing fast\n \n Nominated as one of the 'Fastest 50' growing companies in the\n North East and owned by Maxxia UK, Eurodrive Motor Finance is\n an emerging force within the motor finance sector.\n \n Read more\n \n \n \n \n \n \n \n Technology first\n \n We put technology at the forefront of everything we do. From\n automated responses to e-sign documents, we are constantly\n striving to deliver the service our dealers demand in record\n time.\n \n \n Read more\n \n \n \n \n \n
\n © Eurodrive Motor Finance \n \n Release notes\n \n
\n
\n \n );\n};\n\nexport default HomeScene;\n","import * as React from \"react\";\nimport { RouteComponentProps, withRouter } from \"react-router-dom\";\n\n/**\n * Listener which scrolls the page to the top after a route transition\n */\nclass ScrollToTop extends React.Component {\n public componentDidUpdate(prevProps: RouteComponentProps) {\n if (this.props.location.pathname !== prevProps.location.pathname) {\n window.scrollTo(0, 0);\n }\n }\n\n public render() {\n return this.props.children;\n }\n}\n\nexport default withRouter(ScrollToTop);\n","import * as React from \"react\";\nimport { Button, Container } from \"reactstrap\";\nimport { useAuth0 } from \"./Auth0Login/Auth0Provider\";\n\nconst ServerError = () => {\n const { logout, loading } = useAuth0();\n\n if (loading || !logout) {\n return null;\n }\n return (\n \n

Server error

\n

There has been an error on the Eurodrive server.

\n

\n Contact your account manager or Eurodrive technical support to log in.\n

\n \n
\n );\n};\n\nexport default ServerError;\n","import { faSignOutAlt } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport * as React from \"react\";\nimport { DropdownItem } from \"reactstrap\";\nimport { useAuth0 } from \"../Auth0Login/Auth0Provider\";\n\ninterface LogoutDropdownItemProps {\n children: React.ReactNode;\n}\n\nconst LogoutDropdownItem = ({ children }: LogoutDropdownItemProps) => {\n const { logout, loading } = useAuth0();\n\n if (loading || !logout) {\n return null;\n }\n\n return (\n \n {children}\n \n );\n};\n\nexport default LogoutDropdownItem;\n","import { faCog, faUser } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport classnames from \"classnames\";\nimport React, { useEffect, useState } from \"react\";\nimport { NavLink, NavLinkProps, useHistory } from \"react-router-dom\";\nimport {\n Collapse,\n Container,\n DropdownItem,\n DropdownMenu,\n DropdownToggle,\n Nav,\n Navbar,\n NavbarToggler,\n NavItem,\n UncontrolledDropdown,\n} from \"reactstrap\";\nimport config from \"../../config\";\nimport Header_logo from \"../../Header_logo.svg\";\nimport { useLoggedInUser } from \"../LoggedInUserQuery\";\nimport { PermissionModuleNames } from \"../Permissions/types\";\nimport RouterDropdownItem from \"../RouterDropdownItem\";\nimport \"./index.scss\";\nimport LogoutDropdownItem from \"./LogoutDropdownItem\";\nimport { ContextNames } from \"../types\";\n\nconst MenuNavLink = ({\n className,\n activeClassName,\n ...props\n}: NavLinkProps) => (\n \n);\n\nconst TopNavbar = ({ context }: { context?: ContextNames }) => {\n const history = useHistory();\n const [active, setActive] = useState(false);\n const toggle = () => setActive(!active);\n\n const {\n loggedInUser,\n checkCanRead,\n checkCanCreate,\n isDealer,\n isAccountManager,\n isRegionalSalesManager,\n isSuperUser,\n isAdministrator,\n isDirectCustomer,\n } = useLoggedInUser();\n\n useEffect(() =>\n history.listen(() => {\n setActive(false);\n })\n );\n\n return (\n \n \n {context === ContextNames.DIRECT_DEAL ||\n (loggedInUser && isDirectCustomer) ? (\n <>\n \"Eurodrive\"\n \n {loggedInUser && (\n \n \n \n )}\n \n ) : loggedInUser && !isDirectCustomer && !loggedInUser.isSuspended ? (\n <>\n \n \"Eurodrive\"\n \n \n \n \n \n \n \n ) : null}\n \n \n );\n};\n\nexport default TopNavbar;\n","import * as React from \"react\";\nimport { Button, Col, Container, Row } from \"reactstrap\";\nimport { useAuth0 } from \"../../Auth0Login/Auth0Provider\";\n\nconst DirectDealCompleteScene = () => {\n const { logout, loading } = useAuth0();\n\n if (loading || !logout) {\n return null;\n }\n\n return (\n \n \n \n

Success!

\n

Your proposal has been submitted and is currently under review.

\n

Your account manager will soon be in touch with the outcome.

\n \n \n
\n
\n );\n};\n\nexport default DirectDealCompleteScene;\n","import * as React from \"react\";\nimport { useState } from \"react\";\nimport { passwordlessConfig } from \"../../Auth0Login/Auth0PasswordlessProvider\";\nimport {\n Button,\n Col,\n Container,\n Form,\n FormGroup,\n Input,\n Label,\n Row,\n} from \"reactstrap\";\nimport \"./index.scss\";\n\nconst DirectDealLogin = () => {\n const [email, setEmail] = useState(\"\");\n const [otp, setOtp] = useState(\"\");\n const [error, setError] = useState({\n emailError: false,\n otpError: false,\n roleError: false,\n });\n const [success, setSuccess] = useState(false);\n\n const handleAuth = (e: any) => {\n e.preventDefault();\n const data = localStorage.getItem(\"login_redirect\");\n let returnTo: string | undefined;\n\n if (data) {\n const redirectInfo = JSON.parse(data);\n returnTo = redirectInfo.path;\n }\n\n localStorage.setItem(\"login_redirect\", JSON.stringify({ path: returnTo }));\n\n passwordlessConfig.passwordlessStart(\n {\n connection: \"email\",\n send: \"code\",\n email: email,\n },\n function (err, res) {\n if (res.Id) {\n setSuccess(true);\n } else {\n setError({ ...error, emailError: true });\n }\n }\n );\n };\n\n const handleVerifyToken = (e: any) => {\n e.preventDefault();\n\n passwordlessConfig.passwordlessLogin(\n {\n connection: \"email\",\n email: email,\n verificationCode: otp,\n },\n function (err, res) {\n console.log(\"HIT TOKEN RESULT\");\n if (err) {\n setError({ ...error, otpError: true });\n return null;\n } else {\n return;\n }\n }\n );\n };\n\n return (\n \n \n \n {!success && (\n <>\n \n \n

\n Welcome to Eurodrive Motor Finance\n

\n
\n

\n To proceed enter your email address below. You will be sent\n an authorisation code which will grant access to your\n application.\n

\n \n
\n
\n \n \n \n \n setEmail(e.target.value)}\n placeholder=\"your@email.com\"\n required\n />\n \n \n \n \n \n {error.emailError &&

Error sending mail

}\n {error.roleError &&

Unexpected error

}\n
\n
\n \n )}\n {success && (\n <>\n \n \n

\n Enter your authorisation code and click the button to\n proceed to your finance application.\n

\n \n
\n
\n \n \n \n \n setOtp(e.target.value)}\n placeholder=\"000000\"\n required\n />\n \n \n \n \n \n {error.otpError &&

Error validating OTP

}\n
\n
\n \n )}\n \n
\n
\n );\n};\n\nexport default DirectDealLogin;\n","import * as React from \"react\";\nimport {\n BrowserRouter as Router,\n Redirect,\n Route,\n Switch,\n} from \"react-router-dom\";\nimport { Container } from \"reactstrap\";\nimport Alerts from \"./Alerts\";\nimport AlertMessages from \"./Alerts/AlertMessages\";\nimport Announcements from \"./Announcements/Announcements\";\nimport Auth0Login from \"./Auth0Login\";\nimport Auth0Callback from \"./Auth0Login/Auth0Callback\";\nimport PasswordlessAuth0Callback from \"./Auth0Login/PasswordlessAuth0Callback\";\nimport { useAuth0 } from \"./Auth0Login/Auth0Provider\";\nimport Forbidden from \"./Forbidden\";\nimport HomeScene from \"./HomeScene\";\nimport {\n GET_LOGGED_IN_USER_SHALLOW,\n useLoggedInUser,\n} from \"./LoggedInUserQuery\";\nimport PageNotFound from \"./PageNotFound\";\nimport SceneLoadingSpinner from \"./SceneLoadingSpinner\";\nimport ScrollToTop from \"./ScrollToTop\";\nimport ServerError from \"./ServerError\";\nimport TopNavbar from \"./TopNavbar\";\nimport CreateProposalScene from \"./Proposals/CreateProposalScene\";\nimport { ContextNames, UserRoles } from \"./types\";\nimport DirectDealCompleteScene from \"./Proposals/DirectDeals/DirectDealCompleteScene\";\nimport DirectDealLogin from \"./Proposals/DirectDeals/DirectDealLogin\";\n\nconst quotationRouterPromise = import(\"./Quotations/QuotationRouter\");\nconst QuotationRouter = React.lazy(() => quotationRouterPromise);\n\nconst proposalRouterPromise = import(\"./Proposals/ProposalRouter\");\nconst ProposalRouter = React.lazy(() => proposalRouterPromise);\n\nconst dealerRouterPromise = import(\"./Dealers/DealerRouter\");\nconst DealerRouter = React.lazy(() => dealerRouterPromise);\n\nconst accountManagerRouterPromise = import(\n \"./AccountManagers/AccountManagerRouter\"\n);\nconst AccountManagerRouter = React.lazy(() => accountManagerRouterPromise);\n\nconst regionalSalesManagerRouterPromise = import(\n \"./RegionalSalesManagers/RegionalSalesManagerRouter\"\n);\nconst RegionalSalesManagerRouter = React.lazy(\n () => regionalSalesManagerRouterPromise\n);\n\nconst SettingsRouter = React.lazy(() => import(\"./Settings/SettingsRouter\"));\nconst MigrateRouter = React.lazy(() => import(\"./Migrate/MigrateRouter\"));\n\nconst releaseNotesPromise = import(\"./ReleaseNotes\");\nconst ReleaseNotesPromiseScene = React.lazy(() => releaseNotesPromise);\n\nconst TermsAndConditions = React.lazy(() => import(\"./TermsAndConditions\"));\n\n/** Get the path to the login component, including the current path in the query string */\nconst getLoginPath = () => {\n const returnTo = window.location.pathname + window.location.search;\n // Add the current path to the querystring, to redirect after login\n const qs =\n returnTo && returnTo !== \"/\" && !returnTo.startsWith(\"/login\")\n ? `?returnTo=${encodeURIComponent(returnTo)}`\n : \"\";\n\n return `/login${qs}`;\n};\n\nconst useLoggedInStatus = (context: string | undefined) => {\n const {\n loading: userLoading,\n loggedInUser,\n error,\n } = useLoggedInUser(\n context === ContextNames.DIRECT_DEAL ? GET_LOGGED_IN_USER_SHALLOW : null\n );\n const { loading: auth0Loading, isAuthenticated } = useAuth0();\n\n const isLoggedIn = isAuthenticated && (!!loggedInUser || userLoading);\n\n const statusCode = (error?.networkError as any)?.statusCode;\n const isServerError = statusCode && statusCode >= 500 && statusCode < 600;\n\n const isDirectCustomer =\n loggedInUser && loggedInUser.roles.includes(UserRoles.direct_customer);\n\n const isForbidden =\n (!isServerError &&\n (!!(isAuthenticated && !loggedInUser) ||\n !!(isLoggedIn && loggedInUser && loggedInUser.isSuspended))) ||\n (isLoggedIn &&\n loggedInUser &&\n isDirectCustomer &&\n context !== ContextNames.DIRECT_DEAL);\n\n return {\n loading: userLoading || auth0Loading,\n isLoggedIn,\n isAuthenticated,\n isServerError,\n isForbidden,\n isDirectCustomer,\n };\n};\n\nconst AppRouter = () => {\n const context =\n window.location.pathname.startsWith(\"/directdeal\") ||\n window.location.pathname.startsWith(\"/callback-otp\")\n ? ContextNames.DIRECT_DEAL\n : undefined;\n\n const {\n loading,\n isLoggedIn,\n isAuthenticated,\n isServerError,\n isForbidden,\n isDirectCustomer,\n } = useLoggedInStatus(context);\n\n return (\n \n \n {isLoggedIn && !isForbidden && !isDirectCustomer && (\n \n )}\n \n {!loading && !isDirectCustomer && (\n \n \n \n )}\n {isAuthenticated &&\n !isForbidden &&\n !isServerError &&\n !isDirectCustomer && (\n \n \n \n )}\n {loading ? (\n \n ) : (\n }>\n \n \n {isForbidden && (\n <>\n \n \n \n )}\n {isServerError && (\n \n )}\n {isServerError && }\n \n\n \n\n {!isLoggedIn && (\n \n )}\n {!isLoggedIn && (\n \n )}\n {!isLoggedIn && (\n \n )}\n {!isLoggedIn && (\n \n )}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )}\n \n \n );\n};\n\nexport default AppRouter;\n","import {\n ApolloClient,\n ApolloLink,\n InMemoryCache,\n NormalizedCacheObject\n} from \"apollo-boost\";\nimport { ApolloCache } from \"apollo-cache\";\nimport { toIdValue } from \"apollo-utilities\";\n\nconst dataIdFromObject = (object: any): string | null => {\n const typename = object.__typename as string;\n let key: any;\n switch (typename) {\n case \"Proposal\":\n key = (object.proposalRef || \"\").toLowerCase();\n break;\n default:\n // ids with the graphql ID type are returned as strings, so treat \"0\" as empty\n key = object.id && object.id !== \"0\" ? object.id : null;\n break;\n }\n\n if (typename && key) {\n return `${typename}:${key}`;\n }\n return null;\n};\n\nconst defaultIdResolver = (typename: string) => (_: any, args: any) => {\n const dataId = dataIdFromObject({\n id: args.id,\n __typename: typename\n });\n return dataId ? toIdValue(dataId) : null;\n};\n\nconst configureApolloClient = (link?: ApolloLink) => {\n if (!link) {\n throw new Error(\"No apollo link provided\");\n }\n\n const cache: ApolloCache = new InMemoryCache({\n cacheRedirects: {\n Query: {\n identityProviderUser: defaultIdResolver(\"IdentityProviderUser\"),\n proposal: (_, args) => {\n // Get proposals by proposalRef not id\n const dataId = args.proposalRef\n ? dataIdFromObject({\n proposalRef: (args.proposalRef as string).toLowerCase(),\n __typename: \"Proposal\"\n })\n : null;\n return dataId ? toIdValue(dataId) : undefined;\n },\n user: defaultIdResolver(\"User\"),\n draftProposal: defaultIdResolver(\"DraftProposal\"),\n quotation: defaultIdResolver(\"Quotation\"),\n dealer: defaultIdResolver(\"Dealer\"),\n accountManager: defaultIdResolver(\"AccountManager\"),\n regionalSalesManager: defaultIdResolver(\"RegionalSalesManager\"),\n proposalNote: defaultIdResolver(\"ProposalNote\"),\n dealerContact: defaultIdResolver(\"DealerContact\"),\n target: defaultIdResolver(\"AccountManagerTargets\"),\n draftDealer: defaultIdResolver(\"DraftDealer\"),\n country: defaultIdResolver(\"Country\"),\n occupationType: defaultIdResolver(\"OccupationType\"),\n announcement: defaultIdResolver(\"Announcement\"),\n alertMessage: defaultIdResolver(\"AlertMessage\"),\n activity: defaultIdResolver(\"AccountManagerActivity\")\n },\n PermissionsSection: {\n role: defaultIdResolver(\"PermissionRole\"),\n module: defaultIdResolver(\"PermissionModule\"),\n permission: (_: any, args: any) => {\n const dataId = dataIdFromObject({\n id: `${args.roleId}:${args.moduleId}`,\n __typename: \"Permission\"\n });\n return dataId ? toIdValue(dataId) : null;\n }\n }\n },\n dataIdFromObject\n });\n\n const client = new ApolloClient({\n cache,\n link,\n defaultOptions: {\n watchQuery: {\n errorPolicy: \"all\"\n },\n query: {\n errorPolicy: \"all\"\n },\n mutate: {\n errorPolicy: \"all\"\n }\n }\n });\n\n return client;\n};\n\nexport default configureApolloClient;\n","import { onError } from \"apollo-link-error\";\n\nimport config from \"../config\";\n\nconst cleanMessage = (message: string) =>\n message ? message.replace(\"GraphQL.ExecutionError: \", \"\") : \"\";\n\n// This uses a hack to access the error provider from outside of React.\nconst postErrorAlert = (message: string) => {\n const alertsProvider = (window as any).alertsProvider;\n if (alertsProvider) {\n alertsProvider.addAlert({ message });\n }\n};\n\nexport default () =>\n onError(({ graphQLErrors, networkError }) => {\n if (networkError) {\n // Post an error to notify the user\n postErrorAlert(\n `Network error when connecting to the ${config.TITLE} server`\n );\n }\n\n if (graphQLErrors) {\n graphQLErrors.forEach(({ message }) => {\n // Post an error to notify the user\n postErrorAlert(cleanMessage(message));\n });\n }\n });\n","import { ApolloLink, HttpLink } from \"apollo-boost\";\nimport { setContext } from \"apollo-link-context\";\nimport DebounceLink from \"apollo-link-debounce\";\nimport config from \"../config\";\nimport configureErrorLink from \"./configureErrorLink\";\n\nconst DEFAULT_DEBOUNCE_TIMEOUT = 100;\n\nconst authLink = (getToken: () => Promise) =>\n setContext(async (_, { headers }) => {\n const token = await getToken();\n\n // return the headers to the context so httpLink can read them\n return {\n headers: {\n ...headers,\n authorization: token ? `Bearer ${token}` : \"\"\n }\n };\n });\n\nconst configureApolloLink = async ({\n getToken\n}: {\n getToken: () => Promise;\n}): Promise => {\n const httpLink = new HttpLink({\n credentials: \"same-origin\",\n uri: config.GRAPHQL_ENDPOINT\n });\n\n const debounceLink = new DebounceLink(DEFAULT_DEBOUNCE_TIMEOUT);\n const errorLink = configureErrorLink();\n\n return ApolloLink.from([\n errorLink,\n authLink(getToken),\n debounceLink,\n httpLink\n ]);\n};\n\nexport default configureApolloLink;\n","import { ApolloClient } from \"apollo-boost\";\nimport * as React from \"react\";\nimport { ApolloProvider } from \"react-apollo\";\nimport configureApolloClient from \"../../apollo/configureApolloClient\";\nimport configureApolloLink from \"../../apollo/configureApolloLink\";\nimport { useAuth0 } from \"../Auth0Login/Auth0Provider\";\n\nconst DealerPortalApolloProvider = ({\n children\n}: {\n children: React.ReactElement | React.ReactElement[];\n}) => {\n const [client, setClient] = React.useState | undefined>();\n const { loading, getToken } = useAuth0();\n\n React.useEffect(() => {\n if (!loading && getToken) {\n (async () => {\n // Create an apollo link which is authenticated with the Auth0 access token\n const apolloLink = await configureApolloLink({\n getToken\n });\n const apolloClient = configureApolloClient(apolloLink);\n setClient(apolloClient);\n })();\n }\n }, [loading, getToken]);\n\n if (!client) {\n return null;\n }\n\n return {children};\n};\n\nexport default DealerPortalApolloProvider;\n","import * as React from \"react\";\nimport Helmet from \"react-helmet\";\nimport config from \"../config\";\nimport { LoggedInUserProps, withLoggedInUser } from \"./LoggedInUserQuery\";\nimport { User } from \"./types\";\n\nconst getFullName = ({ forename, surname }: User) =>\n [forename, surname].filter(x => !!x).join(\" \") || undefined;\n\nclass TawkToLoader extends React.Component {\n public constructor(props: LoggedInUserProps) {\n super(props);\n this.setChatAttributes = this.setChatAttributes.bind(this);\n this.getApi = this.getApi.bind(this);\n }\n\n public componentDidMount() {\n this.setChatAttributes();\n }\n\n public componentDidUpdate() {\n this.setChatAttributes();\n }\n\n public render() {\n const { loggedInUser } = this.props;\n\n if (!loggedInUser?.tawkTo?.enabled) {\n return null;\n }\n\n if (!config.TAWK_TO_SITE_ID) {\n // tslint:disable-next-line:no-console\n console.warn(\"No tawk.to site id specified\");\n return null;\n }\n\n return (\n \n );\n }\n\n private setChatAttributes() {\n const { loggedInUser } = this.props;\n\n // tslint:disable-next-line:no-console\n const logErrorToConsole = (error: any) => error && console.error(error);\n\n if (loggedInUser?.tawkTo?.enabled) {\n this.getApi()\n .then(api => {\n api.setAttributes(\n {\n name: getFullName(loggedInUser),\n email: loggedInUser.username,\n hash: loggedInUser?.tawkTo?.hash\n },\n logErrorToConsole\n );\n\n if (loggedInUser.dealer) {\n api.addTags([`Dealer: ${loggedInUser.dealer.name}`]);\n }\n })\n .catch(logErrorToConsole);\n }\n }\n\n private getApi() {\n let tries = 0;\n const wait = 400;\n\n return new Promise((resolve, reject) => {\n const checkForApi = () => {\n tries += 1;\n\n if ((window as any).Tawk_API) {\n resolve((window as any).Tawk_API);\n } else {\n if (tries > 10) {\n reject(new Error(\"tawk.to api not found\"));\n }\n\n setTimeout(checkForApi, wait * tries);\n }\n };\n\n try {\n checkForApi();\n } catch (err) {\n reject(err);\n }\n });\n }\n}\n\nexport default withLoggedInUser(TawkToLoader);\n","import axios from \"axios\";\nimport * as React from \"react\";\nimport config from \"../config\";\nimport { withAlerts } from \"./Alerts/AlertsProvider\";\nimport { AlertColor, AlertsProps } from \"./Alerts/types\";\n\nconst VERSION_CHECK_INTERVAL = config.VERSION_CHECK_INTERVAL_MINS * 1000 * 60;\n\nclass VersionChecker extends React.Component<\n AlertsProps,\n { version?: string }\n> {\n private interval?: any;\n\n public constructor(props: AlertsProps) {\n super(props);\n this.checkVersion = this.checkVersion.bind(this);\n this.state = {};\n }\n\n public componentDidMount() {\n this.checkVersion();\n this.interval = setInterval(this.checkVersion, VERSION_CHECK_INTERVAL);\n }\n\n public componentWillUnmount() {\n this.interval && clearInterval(this.interval);\n }\n\n public render() {\n return null;\n }\n\n private checkVersion() {\n axios\n .get(\"/version.json\", { headers: { \"Cache-Control\": \"no-cache\" } })\n .then(r => {\n const { version } = this.state;\n if (r.data && r.data.version) {\n if (version && r.data.version !== version) {\n this.props.addAlert({\n color: AlertColor.warning,\n message:\n \"A new version of the dealer portal has been released. Make sure your work is saved, then click here to refresh your browser.\",\n onClick: () => (window as any).location.reload(true)\n });\n }\n }\n this.setState({ version: r.data.version });\n })\n .catch(error => {\n // tslint:disable-next-line:no-console\n console.error(\"Error finding current app version\");\n });\n }\n}\n\nexport default withAlerts<{}>(VersionChecker);\n","import { ApolloClient } from \"apollo-boost\";\nimport * as React from \"react\";\nimport Helmet from \"react-helmet\";\nimport AlertsProvider from \"./Alerts/AlertsProvider\";\nimport AppRouter from \"./AppRouter\";\nimport Auth0Provider from \"./Auth0Login/Auth0Provider\";\nimport DealerPortalApolloProvider from \"./DealerPortalApolloProvider\";\nimport ConfirmDialogProvider from \"./Forms/ConfirmDialogProvider\";\nimport TawkToLoader from \"./TawkToLoader\";\nimport VersionChecker from \"./VersionChecker\";\n\nimport lightFont from \"../fonts/open-sans-v15-latin-300.woff2\";\nimport normalFont from \"../fonts/open-sans-v15-latin-regular.woff2\";\nimport boldFont from \"../fonts/open-sans-v17-latin-700.woff2\";\n\nexport interface AppProps {\n apolloClient: ApolloClient;\n}\n\nconst App = () => (\n <>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n);\n\nexport default App;\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read http://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(\n (process as { env: { [key: string]: string } }).env.PUBLIC_URL,\n window.location.href\n );\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit http://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See http://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","// tslint:disable:no-submodule-imports\nimport \"core-js/features/array\";\nimport \"core-js/features/map\";\nimport \"core-js/features/number\";\nimport \"core-js/features/promise\";\nimport \"core-js/features/string\";\nimport \"react-app-polyfill/ie11\";\n// tslint:enable:no-submodule-imports\n\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport App from \"./components/App\";\nimport * as serviceWorker from \"./serviceWorker\";\n\nimport \"./components/PagedList/index.scss\";\nimport \"./styles/styles.scss\";\n\nconst rootElement = document.getElementById(\"root\");\nconst rootComponent = ReactDOM.render(, rootElement);\n\n// Save the root component globally so it can be\n// refreshed outside of react, during the login process\n(window as any).rootComponent = rootComponent;\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: http://bit.ly/CRA-PWA\nserviceWorker.unregister();\n","import { FieldProps } from \"formik\";\nimport * as React from \"react\";\nimport { Col } from \"reactstrap\";\nimport FormGroupWrapper from \"./FormGroupWrapper\";\n\nconst FormFieldWrapper = ({\n children,\n colSize,\n description,\n ...fieldProps\n}: FieldProps & {\n colSize?: number;\n title?: string;\n description?: string | React.ReactNode;\n children: React.ReactNode;\n}) => (\n \n \n {children}\n \n \n);\n\nexport default FormFieldWrapper;\n","import gql from \"graphql-tag\";\nimport { VehicleFragment } from \"../Proposals/fragments\";\n\nexport const QuotationFragment = gql`\n fragment QuotationFragment on Quotation {\n id\n title\n forename\n middleName\n surname\n dealerId\n dealer {\n id\n name\n isMannIslandDealer\n isMultiQuote\n }\n submittedDate\n skipVehicle\n finance {\n id\n productType\n term\n cashPrice\n deposit\n partExchangeSettlement\n partExchangeValue\n arrangementFee\n completionFee\n guaranteedFutureValue\n monthlyPayment\n commission\n commissionCode\n aprRate\n flatRate\n totalFinance\n interestCharges\n totalCharges\n balancePayable\n totalAmountPayable\n }\n lender {\n id\n name\n }\n vehicle {\n ...VehicleFragment\n }\n targetBy\n targetByValue\n }\n ${VehicleFragment}\n`;\n","import { Field, FieldProps } from \"formik\";\nimport * as React from \"react\";\nimport { Col } from \"reactstrap\";\nimport FormGroupWrapper from \"../../Forms/FormGroupWrapper\";\nimport CountrySelect from \"./CountrySelect\";\n\nconst CountryField = ({\n name,\n label,\n colSize,\n}: {\n name: string;\n label: string;\n colSize?: number;\n}) => {\n return (\n \n \n {(fieldProps: FieldProps) => (\n \n )}\n \n \n );\n};\n\nconst CountryFieldInner = ({\n title,\n ...fieldProps\n}: FieldProps & { title: string }) => {\n const country = fieldProps.field.value;\n const otherCountryInitial = !!country ? country !== \"GBR\" : undefined;\n const [otherCountry, setOtherCountry] = React.useState(otherCountryInitial);\n\n const {\n form: { setFieldValue, setFieldTouched },\n field: { name },\n } = fieldProps;\n\n const onRadioChanged = (value: boolean) => {\n const countryId = value ? null : \"GBR\";\n setFieldValue(name as any, countryId);\n setFieldTouched(name as any, true);\n setOtherCountry(value);\n };\n\n return (\n \n
\n {[\n { label: \"United Kingdom\", value: false },\n { label: \"Other\", value: true },\n ].map(({ label, value }) => {\n const key = `${name}_${value}`;\n return (\n \n onRadioChanged(value)}\n />\n \n
\n );\n })}\n \n {otherCountry && (\n {\n setFieldValue(name, countryId);\n setFieldTouched(name, true);\n }}\n />\n )}\n \n );\n};\n\nexport default CountryField;\n","import { ApolloQueryResult, gql } from \"apollo-boost\";\nimport { debounce, isEqual } from \"lodash\";\nimport * as React from \"react\";\nimport { withApollo, WithApolloClient } from \"react-apollo\";\nimport quotationRequestValidator from \"./quotationRequestValidator\";\nimport { QuotationListResult, QuotationRequest } from \"./types\";\n\ninterface CalculateQuotationServiceProps {\n input?: QuotationRequest;\n isMannIslandDealer?: boolean;\n isMulti?: boolean;\n children: (props: {\n loading: boolean;\n calculateQuotationList?: QuotationListResult;\n }) => JSX.Element;\n}\n\nexport interface CalculateQuotationData {\n calculateQuotationList: QuotationListResult;\n}\n\nexport interface CalculateAlpheraQuotationData {\n calculateAlpheraQuotationList: QuotationListResult;\n}\n\nexport interface CalculateMannIslandQuotationData {\n calculateMannIslandQuotationList: QuotationListResult;\n}\n\ninterface CalculateQuotationServiceState {\n loading: boolean;\n calculateQuotationList?: QuotationListResult;\n}\n\nexport const CALCULATE_QUOTATION = gql`\n query CalculateQuotationQuery($input: QuotationRequestInput) {\n calculateQuotationList(input: $input) {\n results {\n id\n term\n productType\n monthlyPayment\n cashPrice\n deposit\n finance\n arrangementFee\n completionFee\n finalPayment\n aprRate\n flatRate\n guaranteedFutureValue\n guaranteed\n lenderId\n lenderName\n loanId\n commissionCode\n commission\n interestCharges\n }\n unableToQuote {\n term\n productType\n messages\n lenderName\n }\n }\n }\n`;\n\nexport const CALCULATE_ALPHERA_QUOTATION = gql`\n query CalculateQuotationQuery($input: AlpheraQuotationRequestInput) {\n calculateAlpheraQuotationList(input: $input) {\n results {\n id\n term\n productType\n monthlyPayment\n cashPrice\n deposit\n finance\n arrangementFee\n completionFee\n finalPayment\n aprRate\n flatRate\n guaranteedFutureValue\n guaranteed\n loanId\n commissionCode\n commission\n interestCharges\n }\n unableToQuote {\n term\n productType\n messages\n lenderName\n }\n }\n }\n`;\nexport const CALCULATE_MANN_ISLAND_QUOTATION = gql`\n query CalculateQuotationQuery($input: MannIslandQuotationRequestInput) {\n calculateMannIslandQuotationList(input: $input) {\n results {\n id\n term\n productType\n monthlyPayment\n cashPrice\n deposit\n finance\n arrangementFee\n completionFee\n finalPayment\n aprRate\n flatRate\n guaranteedFutureValue\n guaranteed\n loanId\n commissionCode\n commission\n interestCharges\n lenderId\n }\n unableToQuote {\n term\n productType\n messages\n lenderName\n }\n }\n }\n`;\n\n/** Helper class to get quotation results */\nclass CalculateQuotationService extends React.Component<\n WithApolloClient,\n CalculateQuotationServiceState\n> {\n private requestId = 0;\n\n public constructor(props: WithApolloClient) {\n super(props);\n this.state = { loading: false };\n this.calculateQuotations = debounce(\n this.calculateQuotations.bind(this),\n 200,\n { leading: false, trailing: true }\n );\n }\n\n public render() {\n const { loading, calculateQuotationList } = this.state;\n const { children } = this.props;\n return children({ loading, calculateQuotationList });\n }\n\n public componentDidUpdate(\n prevProps: WithApolloClient\n ) {\n const { input: prevInput } = prevProps;\n const { input: nextInput } = this.props;\n\n if (nextInput && quotationRequestValidator.isValidSync(nextInput)) {\n if (!isEqual(prevInput, nextInput)) {\n // Recalculate the results if the next props have changed and are valid\n this.setState({ loading: true });\n this.calculateQuotations(nextInput);\n }\n } else {\n // Clear the results if the next props are not valid\n this.state.calculateQuotationList &&\n this.setState({ calculateQuotationList: undefined });\n }\n }\n\n /** Get quotation results for the provided request */\n private calculateQuotations(input: QuotationRequest) {\n const { client, isMannIslandDealer, isMulti } = this.props;\n\n this.setState({ loading: true });\n\n this.requestId += 1;\n const currentRequestId = this.requestId;\n\n if (isMulti) {\n return client\n .query({\n query: CALCULATE_QUOTATION,\n variables: { input },\n })\n .then((result: ApolloQueryResult) => {\n if (this.requestId === currentRequestId) {\n this.setState({\n loading: false,\n calculateQuotationList:\n result.data && result.data.calculateQuotationList\n ? result.data.calculateQuotationList\n : undefined,\n });\n }\n })\n .catch(() => this.setState({ loading: false }));\n } else if (isMannIslandDealer) {\n return client\n .query({\n query: CALCULATE_MANN_ISLAND_QUOTATION,\n variables: { input },\n })\n .then((result: ApolloQueryResult) => {\n if (this.requestId === currentRequestId) {\n this.setState({\n loading: false,\n calculateQuotationList:\n result.data && result.data.calculateMannIslandQuotationList\n ? result.data.calculateMannIslandQuotationList\n : undefined,\n });\n }\n })\n .catch(() => this.setState({ loading: false }));\n } else {\n return client\n .query({\n query: CALCULATE_ALPHERA_QUOTATION,\n variables: { input },\n })\n .then((result: ApolloQueryResult) => {\n if (this.requestId === currentRequestId) {\n this.setState({\n loading: false,\n calculateQuotationList:\n result.data && result.data.calculateAlpheraQuotationList\n ? result.data.calculateAlpheraQuotationList\n : undefined,\n });\n }\n })\n .catch(() => this.setState({ loading: false }));\n }\n }\n}\n\nexport default withApollo(\n CalculateQuotationService\n);\n","import * as Yup from \"yup\";\nimport vehicleValidationSchema from \"../../Proposals/ProposalForm/vehicleValidationSchema\";\nimport { ProductTypeEnum } from \"../../types\";\nimport {\n QuotationFinance,\n QuotationFormValues,\n QuotationTargetBy,\n} from \"../types\";\n\nconst financeValidationSchema = Yup.object()\n .shape({\n cashPrice: Yup.number()\n .default(undefined)\n .typeError(\"Price of vehicle required\")\n .required(\"Price of vehicle required\")\n .moreThan(0, \"Price must be more than zero\"),\n deposit: Yup.number()\n .default(0)\n .typeError(\"Deposit must be a number\")\n .required(\"Deposit not specified\")\n .lessThan(Yup.ref(\"cashPrice\"), \"Deposit must be less than the price\")\n .min(0, \"Deposit must be zero or more\"),\n partExchangeValue: Yup.number()\n .default(0)\n .typeError(\"Part exchange value must be a number\")\n .required(\"Part exchange value not specified\")\n .min(0, \"Part exchange value must be zero or more\"),\n partExchangeSettlement: Yup.number()\n .default(0)\n .typeError(\"Part exchange settlement must be a number\")\n .required(\"Part exchange settlement not specified\")\n .min(0, \"Part exchange settlement must be zero or more\"),\n arrangementFee: Yup.number().nullable(true).default(undefined),\n completionFee: Yup.number().nullable(true).default(undefined),\n guaranteedFutureValue: Yup.number().nullable(true).default(undefined),\n commission: Yup.number().nullable(true).default(undefined),\n commissionCode: Yup.string().nullable(true).default(undefined),\n aprRate: Yup.number().nullable(true).default(undefined),\n flatRate: Yup.number().nullable(true).default(undefined),\n productType: Yup.string()\n .nullable(true)\n .label(\"Product type\")\n .required()\n .default(undefined),\n term: Yup.number()\n .label(\"Term\")\n .nullable(true)\n .integer(\"Period must be a whole number\")\n .default(36)\n .required(\"Term is required\"),\n monthlyPayment: Yup.number().nullable(true).default(undefined),\n })\n .test(\n \"quotation-negative-finance-value\",\n \"message\",\n // tslint:disable:ter-prefer-arrow-callback\n // tslint:disable:only-arrow-functions\n function (value: QuotationFinance) {\n const { cashPrice, deposit, partExchangeValue, partExchangeSettlement } =\n value;\n const t =\n (cashPrice || 0) +\n (partExchangeSettlement || 0) -\n ((deposit || 0) + (partExchangeValue || 0));\n if (t < 0) {\n return this.createError({\n path: \"finance.cashPrice\",\n message: \"Finance value must be greater than 0\",\n });\n }\n return true;\n }\n // tslint:enable:ter-prefer-arrow-callback\n // tslint:enable:only-arrow-functions\n )\n .required();\n\nconst quotationValidationSchema = Yup.object().shape({\n dealerId: Yup.number()\n .label(\"Dealer\")\n .nullable(true)\n .required()\n .default(undefined),\n title: Yup.string().max(10).label(\"Title\").nullable(true).default(undefined),\n forename: Yup.string()\n .label(\"Forename\")\n .max(100)\n .nullable(true)\n .default(undefined),\n middleName: Yup.string()\n .label(\"Middle name\")\n .max(100)\n .nullable(true)\n .default(undefined),\n surname: Yup.string()\n .label(\"Surname\")\n .max(100)\n .nullable(true)\n .default(undefined),\n mobile: Yup.string().max(25).nullable(true).default(undefined),\n email: Yup.string().max(256).nullable(true).default(undefined),\n showFinanceSection: Yup.boolean().default(false),\n showLoanDetailsSection: Yup.boolean().default(true),\n showResults: Yup.boolean().default(false),\n showCommission: Yup.boolean().default(false),\n finance: financeValidationSchema,\n vehicle: vehicleValidationSchema,\n targetBy: Yup.string()\n .required(\"Target by not specified\")\n .default(QuotationTargetBy.APR_RATE) as any,\n targetByValue: Yup.number()\n .default(undefined)\n .typeError(\"Target value must be a number\")\n .required(\"Target value not specified\")\n .moreThan(0, \"Target value must be more than zero\"),\n productTypes: Yup.array()\n .of(Yup.string().min(1))\n .ensure()\n .min(1, \"At least one loan type must be specified\")\n .test(\n \"hp-only-if-vehicle-not-specified\",\n \"Only HP loans can be selected if the vehicle is not specified\",\n // tslint:disable:ter-prefer-arrow-callback\n // tslint:disable:only-arrow-functions\n function (value) {\n const skipVehicle = !!(\n this.parent &&\n this.parent.vehicle &&\n this.parent.vehicle.skipVehicle\n );\n return (\n !value ||\n !skipVehicle ||\n value.length === 0 ||\n (value.length === 1 && value[0] === ProductTypeEnum.HP)\n );\n }\n // tslint:enable:ter-prefer-arrow-callback\n // tslint:enable:only-arrow-functions\n )\n .default([ProductTypeEnum.PCP, ProductTypeEnum.HP]) as any,\n});\n\nexport default quotationValidationSchema;\n","import { Dealer } from \"../Dealers/types\";\nimport { QuotationListResult, QuotationTargetBy } from \"../Quotations/types\";\n\nimport {\n Address,\n ContextNames,\n ProductTypeEnum,\n SearchArgs,\n User,\n} from \"../types\";\n\nexport interface FormSectionProps {\n title: string;\n subtitle?: string;\n buttonTitle?: string;\n sectionCompleted: () => void;\n isSectionValid: boolean;\n showSaveDraftProposalButton?: boolean;\n savingDraft?: boolean;\n savedDraft?: boolean;\n draftProposalLastSaved?: Date;\n draftProposalIsValid?: boolean;\n isSubmitting?: boolean;\n saveDraft: () => Promise;\n}\n\nexport interface ProposalProps {\n loggedInUser: User;\n proposal: Proposal;\n context?: ContextNames;\n}\n\nexport interface Proposal {\n id: number;\n quotationId?: number;\n targetBy?: QuotationTargetBy;\n targetByValue?: number;\n proposalRef: string;\n salesPerson: string;\n isDealSaver: boolean;\n distanceSelling?: boolean;\n dealer: Dealer;\n dealerId?: number;\n accountManagerId?: string;\n finance: ProposalFinance;\n individualCustomer: Individual;\n business: Business;\n vehicle: Vehicle;\n status: ProposalStatusEnum;\n cancelType: ProposalCancelTypeEnum;\n createdDate: Date;\n bankDetails: BankDetails;\n notes?: string;\n debitBacks?: {\n id: number;\n }[];\n proposalType?: ProposalType;\n FORMSTATE_noQuotationResults?: boolean;\n FORMSTATE_noQuotationResultsReasons?: string[];\n FORMSTATE_requiresQuotation?: boolean;\n loan?: {\n id: string;\n name: string;\n lender?: {\n id: string;\n name: string;\n };\n };\n autoConvertReference?: string;\n autoConvertLenderName?: string;\n externalSource?: string;\n suitability: Suitability;\n isMannIslandDealer?: boolean;\n isDocsRequested?: boolean;\n quotationListResult?: QuotationListResult;\n proposalCustomerQuestions: ProposalCustomerQuestions;\n directDealId?: string;\n}\n\nexport interface DraftProposal {\n id?: number;\n dealerId: number;\n customerDescription?: string;\n vehicleDescription?: string;\n proposal: Proposal;\n touchedFields: string[];\n currentSection?: string;\n created?: string;\n updated?: string;\n proposalType?: ProposalType;\n dealer?: Dealer;\n quotationId?: number;\n requiresQuotation?: boolean;\n isDirectDeal?: boolean;\n}\n\nexport interface DraftProposalProps {\n loggedInUser: User;\n draftProposal: DraftProposal;\n context?: ContextNames;\n}\n\nexport interface DraftProposalSearchArgs extends SearchArgs {\n accountManagerId?: string;\n dealerId?: number;\n}\n\nexport interface ProposalStatistics {\n id: string;\n totalCreatedCount: number;\n totalPaidOutCount: number;\n totalAcceptedCount: number;\n totalCancelledCount: number;\n totalFinance: number;\n averagePaidOutFinance: number;\n averageApr: number;\n averagePeriod: number;\n totalDebitBackAmount: number;\n totalDealerCommission: number;\n averageAcceptedFinance: number;\n acceptance: number;\n dealerCreated: number;\n dealerPaidOut: number;\n totalNetProfit?: number;\n holdbackInternal: number;\n}\n\nexport interface ProposalInternalStatistics extends ProposalStatistics {\n netProfit100: number;\n netProfit: number;\n dealerSetup: number;\n}\n\nexport enum ProposalFormSectionName {\n PRIVACY = \"PRIVACY\",\n DEALER = \"DEALER\",\n CUSTOMER_DETAILS = \"CUSTOMER_DETAILS\",\n BUSINESS_DETAILS = \"BUSINESS_DETAILS\",\n HOME_ADDRESSES = \"HOME_ADDRESSES\",\n EMPLOYMENT_HISTORY = \"EMPLOYMENT_HISTORY\",\n DIRECTORS = \"DIRECTORS\",\n BANK_DETAILS = \"BANK_DETAILS\",\n VEHICLE = \"VEHICLE\",\n FINANCE = \"FINANCE\",\n DEALERNOTES = \"DEALERNOTES\",\n SUMMARY = \"SUMMARY\",\n}\n\nexport interface BankDetails {\n id?: string;\n branch?: string;\n bank?: string;\n accountName?: string;\n accountNumber?: string;\n sortCode?: string;\n yearsWithBank?: number;\n monthsWithBank?: number;\n FORMSTATE_invalidBankAccount?: { accountNumber: string; sortCode: string };\n}\n\nexport interface ProposalFormValues {\n vehicle: Vehicle;\n individual: Individual;\n}\n\nexport interface Vehicle {\n id?: number;\n regNo?: string;\n dateOfRegistration?: string;\n isNew?: boolean;\n cAP?: string;\n capId?: string;\n make?: string;\n model?: string;\n derivative?: string;\n bodyStyle?: string;\n colour?: string;\n vIN?: string;\n doors?: number | null;\n engineSize?: number | null;\n fuel?: string;\n transmission?: string;\n insuranceGroup?: string;\n mileage?: number;\n maxAnnualMileage?: number;\n isCommercial?: boolean;\n regNoNotFound?: string;\n skipVehicle?: boolean;\n isRegUnknown?: boolean;\n vatQualifying?: boolean;\n vehicleType?: string;\n LCV?: boolean;\n imported?: boolean;\n __typename?: string;\n}\n\nexport interface HomeAddress extends Address {\n id?: string;\n yearsAtAddress?: number;\n monthsAtAddress?: number;\n ownership?: HomeOwnership;\n otherOwnership?: string;\n}\n\nexport interface EmploymentDetails {\n id?: string;\n employmentTerms?: EmploymentTerms;\n employmentStatus?: EmploymentStatus;\n employmentType?: EmploymentType;\n occupation?: string;\n employerName?: string;\n earnings?: number;\n earningsPer?: EarningsFrequency;\n yearsWithEmployer?: number;\n monthsWithEmployer?: number;\n address: Address;\n industry?: string;\n}\n\nexport enum EmploymentTerms {\n PERMANENT = \"PERMANENT\",\n TEMPORARY = \"TEMPORARY\",\n}\n\nexport enum EmploymentStatus {\n FULL_TIME = \"FULL_TIME\",\n PART_TIME = \"PART_TIME\",\n}\n\nexport enum EmploymentType {\n EMPLOYED = \"EMPLOYED\",\n SELF_EMPLOYED = \"SELF_EMPLOYED\",\n UNEMPLOYED = \"UNEMPLOYED\",\n STUDENT = \"STUDENT\",\n RETIRED = \"RETIRED\",\n MILITARY = \"MILITARY\",\n HOUSEWIFE = \"HOUSEWIFE\",\n GOVERNMENT = \"GOVERNMENT\",\n DISABLED = \"DISABLED\",\n UNKNOWN = \"UNKNOWN\",\n}\n\nexport const EmploymentTypesRequiringEmployerName = [\n EmploymentType.EMPLOYED,\n EmploymentType.SELF_EMPLOYED,\n EmploymentType.GOVERNMENT,\n EmploymentType.MILITARY,\n EmploymentType.STUDENT,\n];\n\nexport enum EarningsFrequency {\n YEARLY = \"YEARLY\",\n MONTHLY = \"MONTHLY\",\n WEEKLY = \"WEEKLY\",\n}\n\nexport enum ProposalType {\n INDIVIDUAL = \"INDIVIDUAL\",\n BUSINESS = \"BUSINESS\",\n}\n\nexport interface ProposalFinance {\n id?: string;\n rate?: number;\n aprRate?: number;\n period: number;\n monthlyPayment: number;\n balloonPayment?: number;\n partExchange?: number;\n partExchangeSettlement?: number;\n cashPrice?: number;\n cashDeposit?: number;\n rFL?: number;\n extras?: number;\n productType?: ProductTypeEnum;\n acceptanceFee?: number;\n optionFee?: number;\n totalFinance?: number;\n interestCharges?: number;\n totalCharges?: number;\n balancePayable?: number;\n totalAmountPayable?: number;\n lessRentalDeposit?: number;\n commissionCode?: string;\n dealerCommission?: number;\n paidOutDate?: string;\n requestDifferentLoanType?: string;\n lenderId?: number;\n lenderName?: string;\n}\n\nexport interface ProposalCustomerQuestions {\n id?: number;\n privacyAgreement?: boolean;\n customerHasHadFinanceBefore?: boolean;\n customerSoleSignatoryToBankAccount?: boolean;\n customerExpectsAffordabilityProblems?: boolean;\n customerAnnualMileageRealistic?: boolean;\n customerConfidentFinanceIsAffordable?: boolean;\n customerUnderstandsAgreement?: boolean;\n customerHappyAgreementIsGoodValue?: boolean;\n customerAdditionalInfo?: boolean;\n customerSaysDealerAnsweredQuestions?: boolean;\n customerPresent?: boolean;\n tNC?: boolean;\n}\n\ninterface Country {\n id: string;\n name: string;\n}\n\nexport interface Individual {\n id?: string;\n proposalId?: number;\n title?: string;\n forename?: string;\n middleName?: string;\n surname?: string;\n dOB?: string;\n maritalStatus?: MaritalStatus;\n drivingLicense?: DrivingLicense;\n mobile: string;\n email: string;\n homeAddresses: HomeAddress[];\n homeAddressesError?: string;\n employmentDetails: EmploymentDetails[];\n employmentDetailsError?: string;\n countryOfBirthId?: string;\n countryOfBirth?: Country;\n nationalityId?: string;\n nationality?: Country;\n countryOfResidenceId?: string;\n countryOfResidence?: Country;\n occupationType?: { id: number; description: string };\n selfEmployedDirectorOrBoardMember?: boolean;\n countryOfActivityId?: string;\n countryOfActivity?: Country;\n occupationTypeId?: number;\n}\n\nexport enum MaritalStatus {\n MARRIED = \"MARRIED\",\n SINGLE = \"SINGLE\",\n DIVORCED_OR_SEPARATED = \"DIVORCED_OR_SEPARATED\",\n WIDOWED = \"WIDOWED\",\n}\n\nexport enum DrivingLicense {\n OTHER = \"OTHER\",\n NO_LICENSE = \"NO_LICENSE\",\n EU_LICENSE = \"EU_LICENSE\",\n UK_PROVISIONAL = \"UK_PROVISIONAL\",\n UK_FULL = \"UK_FULL\",\n}\n\nexport const DrivingLicenseLookup: {\n [key in DrivingLicense]: { description: string };\n} = {\n UK_FULL: { description: \"UK full\" },\n UK_PROVISIONAL: { description: \"UK provisional\" },\n EU_LICENSE: { description: \"EU license\" },\n NO_LICENSE: { description: \"No license\" },\n OTHER: { description: \"Other\" },\n};\n\nexport enum HomeOwnership {\n OWNER = \"OWNER\",\n TENANT = \"TENANT\",\n WITH_PARENTS = \"WITH_PARENTS\",\n WITH_PARTNER = \"WITH_PARTNER\",\n OTHER = \"OTHER\",\n}\nexport interface Business {\n id?: string;\n name?: string;\n natureOfBusiness?: string;\n contactName?: string;\n contactPosition?: string;\n email?: string;\n mobile?: string;\n businessType?: BusinessType;\n otherBusinessType?: string;\n registrationNumber?: string;\n established?: string;\n yearsAtAddress?: number;\n monthsAtAddress?: number;\n address: Address;\n directors: BusinessDirector[];\n}\n\nexport enum BusinessType {\n LTD = \"LTD\",\n LLP = \"LLP\",\n // OTHER = \"OTHER\",\n}\n\nexport const BusinessTypeLookup: { [key in BusinessType]: string } = {\n LTD: \"Limited\",\n LLP: \"Partnership (LLP)\",\n // OTHER: \"Other\",\n};\n\nexport enum DirectorOwnerStatus {\n OWNER = \"OWNER\",\n TENANT = \"TENANT\",\n WITH_PARENTS = \"WITH_PARENTS\",\n WITH_PARTNER = \"WITH_PARTNER\",\n OTHER = \"OTHER\",\n}\n\nexport interface BusinessDirector {\n id?: string;\n title?: string;\n forename?: string;\n middleName?: string;\n surname?: string;\n dOB?: string;\n email?: string;\n earnings?: number;\n guarantor?: boolean;\n mobile?: string;\n owner?: DirectorOwnerStatus;\n otherStatus?: string;\n homeYears?: number;\n homeMonths?: number;\n address: Address;\n maritalStatus?: MaritalStatus;\n drivingLicense?: DrivingLicense;\n countryOfBirthId?: string;\n countryOfBirth?: Country;\n nationalityId?: string;\n nationality?: Country;\n countryOfResidenceId?: string;\n countryOfResidence?: Country;\n}\n\nexport interface ProposalSearchArgs extends SearchArgs {\n dealerId?: number;\n accountManagerId?: string;\n regionalSalesManagerId?: string;\n status?: string[];\n fundedDealersOnly?: boolean;\n startDate?: Date | string;\n endDate?: Date | string;\n filterByDate?: ProposalSearchDate;\n statisticsFilterByDate?: boolean;\n editDates?: boolean;\n hasDebitBackOnly?: boolean;\n autoConvertOnly?: boolean;\n}\n\nexport interface ProposalDealerCommissionSearchArgs extends SearchArgs {\n dealerId?: number;\n accountManagerId?: string;\n regionalSalesManagerId?: string;\n fundedDealersOnly?: boolean;\n startDate?: Date | string;\n endDate?: Date | string;\n}\n\nexport interface ProposalNoteProps {\n note: ProposalNote;\n loggedInUser: User;\n}\n\nexport interface ProposalNoteSearchArgs extends SearchArgs {\n proposalId?: number;\n proposalRef?: string;\n}\n\nexport interface ProposalNote {\n id?: number;\n proposalId: number;\n updated?: Date;\n loggedBy: string;\n priority: number;\n body: string;\n isSticky?: boolean;\n followupDate?: Date;\n}\n\nexport interface AutoConvertNotes {\n id?: string;\n text?: string;\n dateCreated?: string;\n visibleToDealer?: boolean;\n proposalId?: number;\n createWarningFromNote?: boolean;\n userName?: string;\n}\n\nexport interface DealerDocs {\n id: string;\n dealerId: number;\n proposalRef: string;\n received: Date;\n subject: string;\n filename: string;\n extension: string;\n}\n\nexport enum ProposalStatusEnum {\n UNDERWRITING = \"UNDERWRITING\",\n DECLINED = \"DECLINED\",\n ACCEPTED = \"ACCEPTED\",\n PAID_OUT = \"PAID_OUT\",\n NOT_TAKEN_UP = \"NOT_TAKEN_UP\",\n NO_FURTHER_ACTION = \"NO_FURTHER_ACTION\",\n SENT_TO_PAYOUTS = \"SENT_TO_PAYOUTS\",\n INCOMPLETE = \"INCOMPLETE\",\n AWAITING_DOCS = \"AWAITING_DOCS\",\n PARTIAL_DOCS = \"PARTIAL_DOCS\",\n SENT_TO_LENDER = \"SENT_TO_LENDER\",\n CANCELLED = \"CANCELLED\",\n}\n\nexport enum ProposalCancelTypeEnum {\n CANCELLED = \"CANCELLED\",\n FRAUD = \"FRAUD\",\n UNWOUND = \"UNWOUND\",\n}\n\nexport enum ProposalSearchDate {\n CREATED_DATE = \"CREATED_DATE\",\n PAID_OUT_DATE = \"PAID_OUT_DATE\",\n ACCEPTED_DATE = \"ACCEPTED_DATE\",\n CANCEL_DATE = \"CANCEL_DATE\",\n ALL_DATES = \"ALL_DATES\",\n}\n\nexport const ProposalSearchDateLookup: {\n [key in ProposalSearchDate]: { description: string };\n} = {\n CREATED_DATE: { description: \"Created date\" },\n PAID_OUT_DATE: { description: \"Paid out date\" },\n ACCEPTED_DATE: { description: \"Accepted date\" },\n CANCEL_DATE: { description: \"Cancelled date\" },\n ALL_DATES: { description: \"All dates\" },\n};\n\nexport const ProposalStatusLookup: {\n [key in ProposalStatusEnum]: { description: string; color: string };\n} = {\n UNDERWRITING: { description: \"Underwriting\", color: \"info\" },\n SENT_TO_LENDER: { description: \"Sent to lender\", color: \"info\" },\n DECLINED: { description: \"Declined\", color: \"danger\" },\n ACCEPTED: { description: \"Accepted\", color: \"success\" },\n PAID_OUT: { description: \"Paid out\", color: \"success\" },\n NOT_TAKEN_UP: { description: \"Not taken up\", color: \"danger\" },\n NO_FURTHER_ACTION: { description: \"No further action\", color: \"danger\" },\n SENT_TO_PAYOUTS: { description: \"Payouts processing\", color: \"warning\" },\n INCOMPLETE: { description: \"Incomplete\", color: \"warning\" },\n AWAITING_DOCS: { description: \"Awaiting docs\", color: \"warning\" },\n PARTIAL_DOCS: { description: \"Partial docs\", color: \"danger\" },\n CANCELLED: { description: \"Cancelled\", color: \"danger\" },\n};\n\nexport const ActiveProposalStatus = [\n ProposalStatusEnum.UNDERWRITING,\n ProposalStatusEnum.INCOMPLETE,\n ProposalStatusEnum.SENT_TO_LENDER,\n ProposalStatusEnum.ACCEPTED,\n ProposalStatusEnum.AWAITING_DOCS,\n ProposalStatusEnum.PARTIAL_DOCS,\n ProposalStatusEnum.SENT_TO_PAYOUTS,\n];\n\nexport enum VehicleTypeEnum {\n Car = \"Car\",\n Van = \"Van\",\n Motorbike = \"Motorbike\",\n Motorhome = \"Motorhome\",\n HeavyGoodsVehicle = \"Heavy goods vehicle\",\n StaticCaravan = \"Static caravan\",\n HorseBox = \"Horse box\",\n}\n\nexport enum SuitabilityFormSectionName {\n CUSTOMER_DETAILS = \"CUSTOMER_DETAILS\",\n PART_EXCHANGE = \"PART_EXCHANGE\",\n NEGATIVE_EQUITY = \"NEGATIVE_EQUITY\",\n ABOUT_YOU = \"ABOUT_YOU\",\n SUITABILITY = \"SUITABILITY\",\n AFFORDABILITY = \"AFFORDABILITY\",\n}\n\nexport interface Suitability {\n id: number;\n dealerId: number;\n proposalId: number;\n title: string;\n middleName: string;\n forename: string;\n surname: string;\n email: string;\n address: Address;\n pxAnotherVehicle: boolean;\n outstandingFinance: boolean;\n outstandingMonthlyPayment: number;\n existingFinanceCompany: string;\n settlementFigure: number;\n pxValuation: number;\n voluntaryAgreement: boolean;\n voluntaryAgreementConfirm: boolean;\n halfAmountMade: boolean;\n financialAdvantage: boolean;\n equityFunding: string;\n customerType: string;\n vehicleAge: string;\n vehicleChange: string;\n deferLoanConfirmation: boolean;\n financeType: string;\n financeCompany: string;\n financeCompanyReason: string;\n financeCompanySelectConfirmation: boolean;\n alternativeDeclines: boolean;\n topUpLoanRequired: boolean;\n agreedPrice: number;\n agreedDeposit: number;\n lowDepositConfirmation: boolean;\n keepVehicleMonths: number;\n agreementOverMonths: number;\n acceptanceFee: number;\n optionToPurchaseFee: number;\n initialPayment: number;\n monthlyPayments: number;\n finalPayment: number;\n annualApr: number;\n agreedMaximumMileage: number;\n excessMileageCharge: number;\n leftoverFinance: number;\n isCustomerHappyWithFinance: boolean;\n hasCustomerBeenDeclinedBefore: boolean;\n}\n\nexport enum EquityFundingOptions {\n CASH = \"CASH\",\n TOP_UP_LOAN = \"TOP_UP_LOAN\",\n}\n\nexport interface DirectDeal {\n id?: string;\n title: string;\n forename: string;\n middleName?: string;\n surname: string;\n customerEmail: string;\n dealerId: number;\n dealerName: string;\n dealerDetailsNotes?: string;\n vehicle?: string;\n totalMileage?: number;\n annualMileage?: number;\n period?: number;\n monthlyPayment?: number;\n productType?: ProductTypeEnum;\n draftProposalId?: number;\n isActive?: boolean;\n iddSigned?: boolean;\n printName?: string;\n salesPerson?: string;\n distanceSelling?: boolean;\n}\n\nexport default () => ({});\n","import gql from \"graphql-tag\";\n\nexport const AccountManagerFragment = gql`\n fragment AccountManagerFragment on AccountManager {\n id\n name\n email\n mobile\n suspended\n regionalSalesManagerId\n regionalSalesManager {\n id\n name\n }\n user {\n id\n username\n }\n autoConvertReference\n houseDealer {\n id\n }\n }\n`;\n\nexport const AccountManagerShallowFragment = gql`\n fragment AccountManagerShallowFragment on AccountManager {\n id\n name\n email\n }\n`;\n\nexport const AccountManagerTargetsFragmentWithoutNetProfit = gql`\n fragment AccountManagerTargetsFragment on AccountManagerTargets {\n id\n proposalsCreated\n proposalsAccepted\n proposalsPaidout\n dealerCreated\n dealerPaidout\n turnover\n dealerSetups\n startDate\n endDate\n accountManager {\n id\n name\n }\n }\n`;\n\nexport const AccountManagerActualsFragmentWithoutNetProfit = gql`\n fragment AccountManagerActualsFragment on AccountManagerActuals {\n id\n totalCreatedCount\n totalPaidOutCount\n totalAcceptedCount\n totalCancelledCount\n totalFinance\n averagePaidOutFinance\n averageApr\n averagePeriod\n totalDebitBackAmount\n totalDealerCommission\n averageAcceptedFinance\n acceptance\n dealerCreated\n dealerPaidOut\n dealerSetup\n }\n`;\nexport const AccountManagerTargetsFragment = gql`\n fragment AccountManagerTargetsFragment on AccountManagerTargets {\n id\n proposalsCreated\n proposalsAccepted\n proposalsPaidout\n dealerCreated\n dealerPaidout\n netProfit\n turnover\n dealerSetups\n startDate\n endDate\n accountManager {\n id\n name\n }\n }\n`;\n\nexport const AccountManagerActualsFragment = gql`\n fragment AccountManagerActualsFragment on AccountManagerActuals {\n id\n netProfit\n netProfit100\n totalCreatedCount\n totalPaidOutCount\n totalAcceptedCount\n totalCancelledCount\n totalFinance\n averagePaidOutFinance\n averageApr\n averagePeriod\n totalDebitBackAmount\n totalDealerCommission\n averageAcceptedFinance\n acceptance\n dealerCreated\n dealerPaidOut\n dealerSetup\n holdbackInternal\n }\n`;\n","import { connect, FormikProps } from \"formik\";\nimport { debounce, DebounceSettings, isEqual } from \"lodash\";\nimport { Component } from \"react\";\n\ninterface FormikEffectsProps {\n delay?: number;\n debounceOptions?: DebounceSettings;\n onChange: (\n prevValues: any,\n currentValues: any,\n formikProps: FormikProps\n ) => void;\n}\n\ninterface FormikEffectsPropsEnhanced extends FormikEffectsProps {\n formik: FormikProps;\n}\n\nconst SAVE_DELAY = 100;\n\n/** Provides an onChange callback within a formik Form */\nclass FormikEffects extends Component {\n constructor(props: FormikEffectsPropsEnhanced) {\n super(props);\n\n this.onChange = debounce(\n this.onChange.bind(this),\n props.delay || SAVE_DELAY,\n props.debounceOptions || {\n leading: true,\n trailing: true\n }\n );\n }\n\n public componentDidUpdate(prevProps: FormikEffectsPropsEnhanced) {\n this.onChange(prevProps);\n }\n\n public render() {\n return null;\n }\n\n private onChange(prevProps: FormikEffectsPropsEnhanced) {\n const { formik } = this.props;\n const hasChanged =\n !isEqual(prevProps.formik.values, formik.values) ||\n !isEqual(prevProps.formik.errors, formik.errors);\n\n if (hasChanged) {\n this.props.onChange(\n prevProps.formik.values,\n formik.values,\n this.props.formik\n );\n }\n }\n}\n\nexport default connect(FormikEffects);\n","import * as React from \"react\";\nimport { Container } from \"reactstrap\";\nimport LoadingSpinner from \"./LoadingSpinner\";\n\nconst SceneLoadingSpinner: React.SFC = () => (\n \n \n \n);\n\nexport default SceneLoadingSpinner;\n","import gql from \"graphql-tag\";\nimport * as React from \"react\";\nimport { Query, QueryResult, useQuery } from \"react-apollo\";\n\ninterface AddressAutocompleteFindArgs {\n input: {\n query?: string;\n pathFilter?: string;\n };\n}\n\ninterface AddressAutocompleteFindData {\n addressAutocomplete: {\n find: {\n id: string;\n type: string;\n summaryLine: string;\n locationSummary: string;\n count: number;\n }[];\n };\n}\n\nexport const ADDRESS_AUTOCOMPLETE_FIND = gql`\n query AddressAutocompleteFindQuery($input: AddressAutocompleteArgsInput) {\n addressAutocomplete {\n find(input: $input) {\n summaryLine\n locationSummary\n id\n type\n count\n }\n }\n }\n`;\n\nconst AddressAutocompleteFindQuery = ({\n children,\n input: { query, pathFilter }\n}: AddressAutocompleteFindArgs & {\n children: (\n result: QueryResult<\n AddressAutocompleteFindData,\n AddressAutocompleteFindArgs\n >\n ) => JSX.Element | null;\n}) => {\n const variables: AddressAutocompleteFindArgs = {\n input: { query, pathFilter }\n };\n\n return (\n \n query={ADDRESS_AUTOCOMPLETE_FIND}\n variables={variables}\n >\n {children}\n \n );\n};\n\nexport const useAddressAutocompleteFind = ({\n query,\n pathFilter\n}: {\n query?: string;\n pathFilter?: string;\n}) => {\n const { loading, data } = useQuery<\n AddressAutocompleteFindData,\n AddressAutocompleteFindArgs\n >(ADDRESS_AUTOCOMPLETE_FIND, { variables: { input: { query, pathFilter } } });\n\n return { loading, addressAutoComplete: data?.addressAutocomplete };\n};\n\nexport default AddressAutocompleteFindQuery;\n","import gql from \"graphql-tag\";\nimport * as React from \"react\";\nimport { Query, QueryResult } from \"react-apollo\";\nimport { Address } from \"../types\";\n\ninterface AddressAutocompleteRetrieveArgs {\n input: {\n id?: string;\n query?: string;\n };\n}\n\nexport interface AddressAutocompleteRetrieveData {\n addressAutocomplete: {\n retrieve: Address;\n };\n}\n\nexport const ADDRESS_AUTOCOMPLETE_RETRIEVE = gql`\n query AddressAutocompleteRetrieveQuery(\n $input: AddressAutocompleteRetrieveArgsInput\n ) {\n addressAutocomplete {\n retrieve(input: $input) {\n line1\n line2\n line3\n town\n county\n postcode\n countryId\n }\n }\n }\n`;\n\nconst AddressAutocompleteRetrieveQuery = ({\n children,\n input: { id, query }\n}: AddressAutocompleteRetrieveArgs & {\n children: (\n result: QueryResult<\n AddressAutocompleteRetrieveData,\n AddressAutocompleteRetrieveArgs\n >\n ) => JSX.Element | null;\n}) => (\n \n query={ADDRESS_AUTOCOMPLETE_RETRIEVE}\n variables={{ input: { id, query } }}\n >\n {children}\n \n);\n\nexport default AddressAutocompleteRetrieveQuery;\n","import { faSpinner } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { ApolloClient } from \"apollo-boost\";\nimport * as React from \"react\";\n// tslint:disable-next-line:no-submodule-imports\nimport { ValueType } from \"react-select/src/types\";\nimport CustomSelect from \"../Forms/CustomSelect\";\nimport { Address } from \"../types\";\nimport AddressAutocompleteFindQuery from \"./AddressAutocompleteFindQuery\";\nimport {\n ADDRESS_AUTOCOMPLETE_RETRIEVE,\n AddressAutocompleteRetrieveData\n} from \"./AddressAutocompleteRetrieveQuery\";\n\ninterface AddressLookupProps {\n selectedAddress?: Address;\n onSelectAddress: (address?: Address) => void;\n placeholder?: string;\n autoFocus?: boolean;\n readOnly?: boolean;\n}\n\ninterface AddressLookupState {\n query?: string;\n pathFilter?: { label: string; value: string }[] | null;\n menuIsOpen?: boolean;\n retrieving?: boolean;\n}\n\ninterface AddressLookupOption {\n label: string;\n shortLabel: string;\n value: string;\n type: string;\n}\n\n// tslint:disable-next-line:max-classes-per-file\nclass AddressLookup extends React.Component<\n AddressLookupProps,\n AddressLookupState\n> {\n private select: any;\n\n constructor(props: AddressLookupProps) {\n super(props);\n this.state = {};\n this.handleChange = this.handleChange.bind(this);\n }\n\n public render() {\n const { placeholder, autoFocus, readOnly } = this.props;\n const { query, pathFilter, menuIsOpen } = this.state;\n\n const lastPathFilter =\n pathFilter && pathFilter.length\n ? pathFilter[pathFilter.length - 1].value\n : undefined;\n\n return (\n \n {({ data, client, loading }) => {\n const options =\n data && data.addressAutocomplete && data.addressAutocomplete.find\n ? data.addressAutocomplete.find.map(x => ({\n label: `${x.summaryLine}${x.locationSummary ? \", \" : \"\"}${\n x.locationSummary\n }${\n x.count > 1\n ? ` (${x.count > 100 ? \"100+\" : x.count} addresses)`\n : \"\"\n }`,\n shortLabel: `${x.summaryLine}${\n x.locationSummary ? \", \" : \"\"\n }${x.locationSummary}`,\n value: x.id,\n type: x.type\n }))\n : [];\n\n if (pathFilter && pathFilter.length) {\n const lastItem = pathFilter[pathFilter.length - 1];\n const removeFilterOption = {\n label: `< Remove filter: ${lastItem.label}`,\n shortLabel: \"\",\n value: \"\",\n type: \"REMOVE_FILTER\"\n };\n options.unshift(removeFilterOption);\n }\n\n if (this.state.retrieving) {\n return (\n

\n \n

\n );\n }\n\n return (\n {\n this.select = ref;\n }}\n menuIsOpen={menuIsOpen || false}\n key=\"address-lookup\"\n options={options}\n inputValue={query}\n onInputChange={(value: any, meta: any) => {\n if (value && !menuIsOpen) {\n this.toggleMenuIsOpen();\n }\n\n if (meta.action !== \"set-value\") {\n this.setState({ query: value });\n }\n }}\n blurInputOnSelect={false}\n onChange={(value: any) => this.handleChange(value, client)}\n filterOption={() => true}\n closeMenuOnSelect={false}\n onBlur={() => menuIsOpen && this.toggleMenuIsOpen()}\n isClearable={false}\n placeholder={placeholder || \"Start typing to find an address\"}\n noOptionsMessage={() =>\n loading ? \"Loading...\" : \"No addresses found\"\n }\n autoFocus={autoFocus}\n />\n );\n }}\n \n );\n }\n\n private toggleMenuIsOpen() {\n this.setState(s => ({\n menuIsOpen: !s.menuIsOpen,\n pathFilter: s.menuIsOpen ? s.pathFilter : undefined\n }));\n if (this.select) {\n !this.state.menuIsOpen ? this.select.focus() : this.select.blur();\n }\n }\n\n private handleChange(\n value: ValueType,\n client: ApolloClient\n ) {\n const option = value as AddressLookupOption;\n\n if (option && option.type === \"REMOVE_FILTER\") {\n this.setState(s => {\n const f =\n s.pathFilter && s.pathFilter.length ? [...(s.pathFilter || [])] : [];\n f.pop();\n return { pathFilter: f };\n });\n } else if (option && option.type !== \"ADD\") {\n if (option.value) {\n this.setState(s => ({\n pathFilter: [\n ...(s.pathFilter || []),\n { label: option.shortLabel, value: option.value }\n ]\n }));\n }\n } else {\n if (option && option.value) {\n this.setState({ retrieving: true });\n client\n .query({\n query: ADDRESS_AUTOCOMPLETE_RETRIEVE,\n variables: { input: { id: option.value, query: this.state.query } }\n })\n .then(({ data }) => {\n if (\n data &&\n data.addressAutocomplete &&\n data.addressAutocomplete.retrieve\n ) {\n this.props.onSelectAddress(data.addressAutocomplete.retrieve);\n }\n })\n .finally(() => this.setState({ retrieving: false }));\n }\n if (this.select) {\n this.select.blur();\n }\n this.setState({\n menuIsOpen: false,\n pathFilter: null,\n query: \"\"\n });\n }\n }\n}\n\nexport default AddressLookup;\n","import { Field, FormikProps } from \"formik\";\nimport * as React from \"react\";\nimport { Col, FormGroup, Label, Row } from \"reactstrap\";\nimport { getSingleLineAddress } from \"../../utils\";\nimport FormInputField from \"../Forms/FormInputField\";\nimport CountrySelect from \"../Settings/Countries/CountrySelect\";\nimport { Address } from \"../types\";\nimport AddressLookup from \"./\";\n\ninterface AddressFormSectionProps extends FormikProps {\n pathToAddress?: string;\n address: Address;\n title?: string;\n autoFocus?: boolean;\n colSize?: number;\n readOnly?: boolean;\n}\n\ninterface AddressFormSectionState {\n edit?: boolean;\n}\n\nclass AddressFormSection extends React.Component<\n AddressFormSectionProps,\n AddressFormSectionState\n> {\n constructor(props: AddressFormSectionProps) {\n super(props);\n this.clearAddress = this.clearAddress.bind(this);\n this.toggleEditMode = this.toggleEditMode.bind(this);\n this.handleSelectAddress = this.handleSelectAddress.bind(this);\n this.hasAddress = this.hasAddress.bind(this);\n this.state = {};\n }\n\n public render() {\n const { pathToAddress, autoFocus, colSize, readOnly } = this.props;\n const edit = this.state.edit && !readOnly;\n const path = pathToAddress ? `${pathToAddress}.` : \"\";\n const hasAddress = this.hasAddress();\n const hasError = this.hasError();\n const title = this.props.title;\n\n return (\n <>\n \n\n \n\n \n\n \n \n {hasAddress || edit ? (\n <>\n \n Clear address\n \n {!edit ? \"| \" : null}\n \n ) : null}\n {!edit && !readOnly ? (\n \n Enter address manually\n \n ) : null}\n \n \n \n );\n }\n\n private hasAddress() {\n const { address } = this.props;\n return (\n address &&\n (address.line1 ||\n address.line2 ||\n address.line3 ||\n address.town ||\n address.county ||\n address.postcode)\n );\n }\n\n private hasError() {\n const { pathToAddress, touched, errors } = this.props;\n const path = pathToAddress ? `${pathToAddress}.` : \"\";\n\n const propNames = [\"line1\", \"line2\", \"line3\", \"town\", \"postcode\"];\n // tslint:disable-next-line:prefer-for-of\n for (let i = 0; i < propNames.length; i += 1) {\n const pathArray = `${path}${propNames[i]}`.split(\".\");\n const isTouched = pathArray.reduce((o, n) => o && o[n], {\n ...touched\n } as any);\n const error =\n (isTouched &&\n pathArray.reduce((o, n) => o && o[n], { ...errors } as any)) ||\n \"\";\n if (error) {\n return true;\n }\n }\n return false;\n }\n\n private clearAddress(e?: any) {\n const { setFieldValue, pathToAddress } = this.props;\n const path = pathToAddress ? `${pathToAddress}.` : \"\";\n\n e && e.preventDefault();\n\n this.setState({ edit: false });\n\n [\n \"line1\",\n \"line2\",\n \"line3\",\n \"county\",\n \"town\",\n \"postcode\",\n \"countryId\"\n ].map(x => setFieldValue(`${path}${x}`, \"\"));\n }\n\n private toggleEditMode(e?: any) {\n e && e.preventDefault();\n this.setState(s => ({ edit: !s.edit }));\n }\n\n private handleSelectAddress(selectedAddress?: Address) {\n const { setFieldValue, pathToAddress, setFieldTouched } = this.props;\n const path = pathToAddress ? `${pathToAddress}.` : \"\";\n if (selectedAddress) {\n [\n \"line1\",\n \"line2\",\n \"line3\",\n \"town\",\n \"county\",\n \"postcode\",\n \"countryId\"\n ].forEach(x => {\n setFieldValue(`${path}${x}`, (selectedAddress as any)[x] || \"\");\n setFieldTouched(`${path}${x}`, true);\n });\n } else {\n this.clearAddress();\n }\n }\n}\n\nexport default AddressFormSection;\n","import { FieldProps } from \"formik\";\nimport { get } from \"lodash\";\nimport * as React from \"react\";\nimport { InputGroup, InputGroupAddon } from \"reactstrap\";\nimport { compose, shouldUpdate } from \"recompose\";\nimport FormFieldWrapper from \"./FormFieldWrapper\";\n\ninterface FormInputFieldProps {\n colSize?: number;\n title: string;\n description?: string;\n units?: string;\n type?: string;\n unitsPosition?: \"before\" | \"after\";\n placeholder?: string;\n step?: number;\n min?: number;\n max?: number;\n readOnly?: boolean;\n autoFocus?: boolean;\n spellCheck?: boolean;\n onBlur?: (e: React.FocusEvent) => void;\n}\n\nconst FormInputField = ({\n units,\n description,\n placeholder,\n type,\n onBlur,\n step,\n min,\n max,\n readOnly,\n autoFocus,\n spellCheck,\n ...rest\n}: FieldProps & FormInputFieldProps) => {\n const { field } = rest;\n\n const input = (\n \n );\n\n const unitsPosition = rest.unitsPosition || \"before\";\n\n return (\n \n {units ? (\n \n {unitsPosition === \"before\" ? (\n {units}\n ) : null}\n {input}\n {unitsPosition === \"after\" ? (\n {units}\n ) : null}\n \n ) : (\n input\n )}\n \n );\n};\n\nconst EnhancedField = compose<\n FormInputFieldProps & FieldProps,\n FormInputFieldProps & FieldProps\n>(\n shouldUpdate(\n (\n {\n readOnly,\n field: { value, name },\n form: { touched, errors },\n description,\n }: FormInputFieldProps & FieldProps,\n {\n readOnly: nextReadOnly,\n field: { value: nextValue, name: nextName },\n form: { touched: nextTouched, errors: nextErrors },\n description: nextDescription,\n }: FormInputFieldProps & FieldProps\n ) =>\n value !== nextValue ||\n readOnly !== nextReadOnly ||\n description !== nextDescription ||\n get(touched, name) !== get(nextTouched, nextName) ||\n get(errors, name) !== get(nextErrors, nextName)\n )\n)(FormInputField);\n\nexport default EnhancedField;\n","import * as React from \"react\";\nimport { RouteComponentProps, withRouter } from \"react-router-dom\";\nimport { DropdownItem } from \"reactstrap\";\n\nconst RouterDropdownItem = withRouter(\n ({\n history,\n location,\n to,\n children,\n disabled\n }: RouteComponentProps & {\n to: string;\n children?: React.ReactNode;\n disabled?: boolean;\n }) => (\n {\n e.preventDefault();\n history.push(to);\n }}\n >\n {children}\n \n )\n);\n\nexport default RouterDropdownItem;\n","import * as Yup from \"yup\";\n\nconst crazyNumbers = [\n \"0000000000\",\n \"00000000000\",\n \"000000000000\",\n \"1111111111\",\n \"11111111111\",\n \"111111111111\",\n \"2222222222\",\n \"22222222222\",\n \"222222222222\",\n \"3333333333\",\n \"33333333333\",\n \"333333333333\",\n \"4444444444\",\n \"44444444444\",\n \"444444444444\",\n \"5555555555\",\n \"55555555555\",\n \"555555555555\",\n \"6666666666\",\n \"66666666666\",\n \"666666666666\",\n \"7777777777\",\n \"77777777777\",\n \"777777777777\",\n \"8888888888\",\n \"88888888888\",\n \"888888888888\",\n \"9999999999\",\n \"99999999999\",\n \"999999999999\",\n];\n\n// tslint:disable:ter-prefer-arrow-callback\n// tslint:disable:only-arrow-functions\nconst telephoneValidationSchema = Yup.string()\n .default(undefined)\n .min(10)\n .max(12)\n .nullable(true)\n .matches(/^\\d*$/, \"Field must be numbers only\")\n .transform((value) => (value || value === 0 ? value : null))\n .test(\"prevent-crazy-numbers\", \"Phone number invalid\", function (value) {\n return !crazyNumbers.includes(value);\n });\nexport default telephoneValidationSchema;\n","import classnames from \"classnames\";\nimport { FormikErrors, FormikProps, FormikTouched } from \"formik\";\nimport { debounce, isArray, isEqual, merge } from \"lodash\";\nimport memoizeOne from \"memoize-one\";\nimport * as React from \"react\";\nimport { Col, Form, Row } from \"reactstrap\";\nimport { ContextNames } from \"../types\";\nimport AutoGeneratedFormSectionSummary from \"./AutoGeneratedFormSectionSummary\";\nimport FormNav, { FormNavItemProps } from \"./FormNav\";\nimport FormSectionFooter, { FormSectionFooterProps } from \"./FormSectionFooter\";\nimport FormSectionWrapper from \"./FormSectionWrapper\";\nimport { findDataValuesNotWatched, findWatchedFieldsNotInData } from \"./utils\";\nimport { DirectDeal } from \"../Proposals/types\";\n\ninterface MultiSectionFormProps\n extends UncontrolledMultiSectionFormProps {\n section?: string;\n onSectionChanged: (section: string) => void;\n canUpdate?: boolean;\n context?: ContextNames;\n}\n\nexport enum CreateOrUpdateMode {\n CREATE = \"CREATE\",\n UPDATE = \"UPDATE\",\n}\n\ninterface UncontrolledMultiSectionFormProps extends SaveDraftProps {\n submitButtonText?: string;\n sections: FormSectionInfo[];\n className?: string;\n createOrUpdate: CreateOrUpdateMode;\n populateModal?: (dealerList: Array) => void | null;\n}\n\nexport interface SaveDraftProps {\n savingDraft?: boolean;\n draftLastSaved?: string;\n draftValidationMessage?: string;\n saveDraft?: () => Promise;\n}\n\nexport interface DirectDealProps {\n saveDirectDeal?: (directDeal: DirectDeal) => Promise;\n directDealValidationMessage?: string;\n}\n\ninterface MultiSectionFormState {\n section?: string;\n}\n\nexport type FormSectionProps = {\n section: FormSectionInfo;\n navigateToSection: (section: string) => void;\n isSectionTouched: boolean;\n context?: ContextNames;\n populateModal?: (dealerList: Array) => void | null;\n} & FormikProps;\n\nexport interface FormSectionSummaryProps {\n section: FormSectionInfo;\n values: Values;\n}\n\nexport interface FormSectionInfo {\n id: string;\n title: string;\n subtitle?: string;\n watchFields: WatchFields;\n component: React.ComponentType>;\n summaryComponent?: React.ComponentType>;\n}\n\nexport type WatchFields = {\n [K in keyof Values]?: Values[K] extends object\n ? WatchFields\n : true;\n};\n\n/** Compare two arrays of arguments for deep equality */\nfunction argsEqual(newArgs: any[], lastArgs: any[]) {\n return lastArgs.every((x, i) => isEqual(x, newArgs[i]));\n}\n\nclass MultiSectionForm extends React.Component<\n FormikProps & MultiSectionFormProps,\n { isEditing: boolean }\n> {\n constructor(\n props: FormikProps & MultiSectionFormProps\n ) {\n super(props);\n this.navigateToSection = this.navigateToSection.bind(this);\n this.navigateToNextSection = this.navigateToNextSection.bind(this);\n this.isSectionValid = this.isSectionValid.bind(this);\n this.isSectionTouched = this.isSectionTouched.bind(this);\n this.getIsSectionTouchedLookup = memoizeOne(\n this.getIsSectionTouchedLookup.bind(this),\n argsEqual\n );\n this.getIsSectionValidLookup = memoizeOne(\n this.getIsSectionValidLookup.bind(this),\n argsEqual\n );\n this.touchSection = this.touchSection.bind(this);\n this.touchAllSections = this.touchAllSections.bind(this);\n this.getSectionTouched = this.getSectionTouched.bind(this);\n this.handleIsEditingChanged = this.handleIsEditingChanged.bind(this);\n this.handleSubmit = this.handleSubmit.bind(this);\n\n // Use a long debounce for warning about the sections\n this.validateSections = debounce(this.validateSections.bind(this), 10000, {\n leading: true,\n trailing: false,\n });\n\n this.state = {\n isEditing: props.createOrUpdate === CreateOrUpdateMode.CREATE,\n };\n }\n\n public componentDidMount() {\n const { createOrUpdate: editMode, validateForm } = this.props;\n if (editMode === CreateOrUpdateMode.UPDATE) {\n this.touchAllSections();\n setTimeout(validateForm, 0);\n }\n }\n\n public componentDidUpdate(\n prevProps: FormikProps & MultiSectionFormProps\n ) {\n const { section, sections } = this.props;\n if (\n sections.length &&\n section &&\n !sections.find(({ id }) => id === section)\n ) {\n this.navigateToSection(sections[0].id);\n }\n }\n\n public render() {\n const {\n sections,\n className,\n submitButtonText,\n section,\n onSectionChanged,\n createOrUpdate,\n savingDraft,\n draftLastSaved,\n draftValidationMessage,\n saveDraft,\n canUpdate,\n populateModal,\n ...formikProps\n } = this.props;\n\n const { errors, touched } = formikProps;\n\n const currentSectionId = section || sections[0].id;\n const sectionInfo = sections.find((s) => s.id === currentSectionId);\n\n // Show a warning message if there are problems in the section watched fields\n if (process && process.env && process.env.NODE_ENV === \"development\") {\n this.validateSections();\n }\n\n if (!sectionInfo || !currentSectionId) {\n return null;\n }\n\n const isLastSection = sections.indexOf(sectionInfo) === sections.length - 1;\n const isSectionTouchedLookup: {\n [val: string]: boolean;\n } = this.getIsSectionTouchedLookup(sections, touched);\n\n const isSectionValidLookup: {\n [val: string]: boolean;\n } = this.getIsSectionValidLookup(sections, touched, errors);\n\n const sectionHeaders: FormNavItemProps[] = sections.map(\n ({ id, title }) => ({\n section: id,\n activeSection: currentSectionId,\n title,\n onClick: this.navigateToSection,\n isSectionValid: isSectionValidLookup[id],\n isSectionTouched: isSectionTouchedLookup[id],\n })\n );\n\n const SectionComponent = sectionInfo.component;\n const { isEditing } = this.state;\n\n const footerProps: FormSectionFooterProps = {\n isLastSection,\n onSubmitForm: () => {\n formikProps.submitForm();\n return new Promise((resolve) => setTimeout(resolve, 0));\n },\n isSubmitting: formikProps.isSubmitting,\n submitButtonText,\n dirty: formikProps.dirty,\n isValid: formikProps.isValid,\n isSectionValid: isSectionValidLookup[sectionInfo.id],\n createOrUpdate,\n isEditing,\n onIsEditingChanged: this.handleIsEditingChanged,\n onCompleteSection: this.navigateToNextSection,\n savingDraft,\n draftLastSaved,\n draftValidationMessage,\n saveDraft,\n canUpdate,\n };\n\n const sectionProps: FormSectionProps = {\n ...formikProps,\n section: sectionInfo,\n navigateToSection: this.navigateToSection,\n isSectionTouched: isSectionTouchedLookup[sectionInfo.id],\n };\n\n const Summary =\n sectionInfo.summaryComponent || AutoGeneratedFormSectionSummary;\n\n return (\n \n \n \n \n \n \n \n <>\n {isEditing ? (\n <>\n \n \n \n ) : (\n \n )}\n \n \n \n \n \n );\n }\n\n private handleIsEditingChanged(isEditing: boolean) {\n this.setState({ isEditing });\n if (isEditing) {\n this.touchAllSections();\n } else {\n setTimeout(this.props.handleReset, 0);\n }\n }\n\n private handleSubmit(e: React.FormEvent) {\n const { isValid, handleSubmit, createOrUpdate, resetForm, values } =\n this.props;\n const { isEditing } = this.state;\n\n if (isValid && isEditing) {\n handleSubmit(e);\n\n if (createOrUpdate === CreateOrUpdateMode.UPDATE) {\n this.setState({ isEditing: false });\n // Reset the form initial values to the current values\n resetForm(values);\n }\n } else {\n e.preventDefault();\n }\n }\n\n private validateSections() {\n const { sections, values: allValues } = this.props;\n\n const allWatched = sections.reduce((prev, section) => {\n return merge(prev, section.watchFields);\n }, {});\n\n const missingValues = findWatchedFieldsNotInData(allWatched, allValues);\n if (missingValues.length) {\n // tslint:disable-next-line:no-console\n console.warn(\n `Some watched fields are not present in the data: ${missingValues.join(\n \", \"\n )}`\n );\n }\n const missingWatched = findDataValuesNotWatched(allWatched, allValues);\n if (missingWatched.length) {\n // tslint:disable-next-line:no-console\n console.warn(\n `Some data values are not being watched in a form section: ${missingWatched.join(\n \", \"\n )}`\n );\n }\n }\n\n private navigateToSection(nextSection: string) {\n const { section, sections, onSectionChanged } = this.props;\n const { isEditing } = this.state;\n\n const currentSection = section\n ? sections.find((x) => x.id === section)\n : sections[0];\n\n if (currentSection && isEditing) {\n this.touchSection(currentSection);\n }\n\n onSectionChanged(nextSection);\n }\n\n private getIsSectionTouchedLookup(\n sections: FormSectionInfo[],\n touched: FormikTouched\n ): { [val: string]: boolean } {\n return sections.reduce(\n (obj, val) => ({\n ...obj,\n [val.id]: this.isSectionTouched(val, touched),\n }),\n {}\n );\n }\n\n private getIsSectionValidLookup(\n sections: FormSectionInfo[],\n touched: FormikTouched,\n errors: FormikErrors\n ): { [val: string]: boolean } {\n return sections.reduce(\n (obj, val) => ({\n ...obj,\n [val.id]: this.isSectionValid(val, errors, touched),\n }),\n {}\n );\n }\n\n private isSectionTouched(\n section: FormSectionInfo,\n touched: FormikTouched\n ) {\n const findTouched = (innerFields: any, innerTouched: any): boolean => {\n const keys = Object.keys(innerFields);\n return (\n keys.length > 0 &&\n keys.every((k) => {\n const t = innerTouched && innerTouched[k];\n if (t === true || (isArray(t) && t.every((x) => x === true))) {\n return true;\n }\n if (t) {\n return findTouched(innerFields[k], t);\n }\n return false;\n })\n );\n };\n\n return findTouched(section.watchFields, touched);\n }\n\n private isSectionValid(\n section: FormSectionInfo,\n errors: FormikErrors,\n touched: FormikTouched\n ) {\n const findErrors = (\n innerFields: any,\n innerErrors: any,\n innerTouched: any\n ): boolean =>\n Object.keys(innerFields)\n .filter(\n (k) =>\n Object.keys(innerErrors).includes(k) &&\n (!innerTouched || Object.keys(innerTouched).includes(k))\n )\n .some((k) => {\n const field = innerFields[k];\n const err = innerErrors[k];\n const t = innerTouched && innerTouched[k];\n // Error found!\n if ((!innerTouched || t === true) && typeof err === \"string\") {\n return true;\n }\n\n if (\n err &&\n field &&\n Array.isArray(field) &&\n field.length &&\n Array.isArray(err)\n ) {\n // Find any child elements with errors\n return err.some(\n (e, i) => e && findErrors(field[0], e, t ? t[i] : undefined)\n );\n }\n if (field && err && t) {\n return findErrors(field, err, t);\n }\n return false;\n });\n\n return !findErrors(section.watchFields || {}, errors, touched);\n }\n\n private getSectionTouched(\n watchFields: WatchFields,\n values: TFormValues\n ) {\n return Object.keys(watchFields).reduce((obj, key) => {\n const watch = (watchFields as any)[key];\n const value = values ? (values as any)[key] : undefined;\n\n if (watch === true) {\n obj[key] = true;\n } else if (Array.isArray(watch) && watch.length) {\n obj[key] = value.map((x: any) => this.getSectionTouched(watch[0], x));\n } else {\n obj[key] = this.getSectionTouched(watch, value);\n }\n return obj;\n }, {} as any);\n }\n\n private touchSection(section: FormSectionInfo) {\n const { values, touched, setTouched } = this.props;\n const watchFields = section.watchFields || {};\n const touchedFields = merge(\n {},\n this.getSectionTouched(watchFields, values),\n touched\n );\n\n setTouched(touchedFields as FormikTouched);\n }\n\n private touchAllSections() {\n const { values, setTouched, touched } = this.props;\n const allTouched: FormikTouched = this.props.sections.reduce(\n (prev: any, section) =>\n merge(prev, this.getSectionTouched(section.watchFields, values)),\n {}\n );\n\n merge(allTouched, touched);\n\n setTouched(allTouched);\n }\n\n private navigateToNextSection() {\n const { submitForm, sections, section } = this.props;\n\n const currentSection = section\n ? sections.find((x) => x.id === section)\n : sections[0];\n\n if (!currentSection) {\n return Promise.resolve();\n }\n\n const index = sections.indexOf(currentSection);\n const isLastSection = index === sections.length - 1;\n\n this.touchSection(currentSection);\n\n return Promise.resolve()\n .then(() => {\n if (!this.props.dirty) {\n return this.props.validateForm() as Promise;\n }\n return Promise.resolve();\n })\n .then(() => {\n const watchFields = currentSection.watchFields || {};\n if (\n this.isSectionValid(currentSection, this.props.errors, watchFields)\n ) {\n if (isLastSection) {\n !this.props.isSubmitting && submitForm();\n } else {\n this.navigateToSection(sections[index + 1].id);\n }\n }\n });\n }\n}\n\n// tslint:disable-next-line:max-classes-per-file\nexport class UncontrolledMultiSectionForm extends React.Component<\n FormikProps & UncontrolledMultiSectionFormProps,\n MultiSectionFormState\n> {\n public constructor(props: any) {\n super(props);\n this.state = {};\n }\n\n public render() {\n return (\n this.setState({ section })}\n section={this.state.section}\n />\n );\n }\n}\n\nexport default MultiSectionForm;\n","export interface AlertMessage {\n id: string;\n title?: string;\n message: string;\n redirectPath?: string;\n color: AlertColor;\n count: number;\n startDate?: Date;\n endDate?: Date;\n priority?: number;\n onClick?: () => void;\n}\n\nexport interface AlertsProps {\n alerts: AlertMessage[];\n addAlert: (alert: {\n message: string;\n color?: AlertColor;\n onClick?: () => void;\n }) => void;\n removeAlert: (id: string) => void;\n clearAlerts: () => void;\n}\n\nexport enum AlertColor {\n primary = \"primary\",\n secondary = \"secondary\",\n success = \"success\",\n danger = \"danger\",\n warning = \"warning\",\n info = \"info\",\n light = \"light\",\n dark = \"dark\"\n}\n","import gql from \"graphql-tag\";\nimport { useQuery } from \"react-apollo\";\nimport { SearchResults, User } from \"../../types\";\nimport { ShallowProposalFragment } from \"../fragments\";\nimport { Proposal, ProposalSearchArgs } from \"../types\";\n\nexport interface ProposalListData {\n loggedInUser: User & {\n proposals: SearchResults;\n };\n}\n\nexport const PROPOSAL_LIST = gql`\n query ProposalListQuery(\n $input: ProposalSearchArgsInput\n $countOnly: Boolean = false\n ) {\n loggedInUser {\n id\n username\n roles\n proposals(input: $input, countOnly: $countOnly) {\n pageInfo {\n hasMorePages\n totalResults\n page\n pageSize\n first\n last\n }\n edges {\n node {\n ...ShallowProposalFragment\n }\n }\n }\n }\n }\n ${ShallowProposalFragment}\n`;\n\nexport const useProposalListCount = (input: ProposalSearchArgs) => {\n const { loading, data } = useQuery<\n ProposalListData,\n { input: ProposalSearchArgs; countOnly?: boolean }\n >(PROPOSAL_LIST, {\n variables: { input, countOnly: true }\n });\n\n const count = data?.loggedInUser?.proposals?.pageInfo?.totalResults || 0;\n\n return { loading, count };\n};\n\nexport const useProposalList = (\n input: ProposalSearchArgs,\n pollInterval?: number\n) => {\n const { loading, data } = useQuery<\n ProposalListData,\n { input: ProposalSearchArgs }\n >(PROPOSAL_LIST, {\n variables: { input },\n pollInterval: pollInterval || 0,\n fetchPolicy: \"cache-and-network\"\n });\n\n return { loading, proposals: data?.loggedInUser?.proposals };\n};\n","import { faExternalLinkAlt } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport classnames from \"classnames\";\nimport moment from \"moment\";\nimport * as React from \"react\";\nimport { Col, Row } from \"reactstrap\";\nimport { addHttp } from \"../../../utils\";\n\nexport interface SummaryRowBaseProps {\n title: string;\n highlight?: boolean;\n firstColumnSize?: number;\n}\n\ninterface SummaryRowProps extends SummaryRowBaseProps {\n value?: string | number | boolean | React.ReactElement | null;\n}\n\nconst SummaryRow = ({\n title,\n value,\n highlight,\n firstColumnSize = 3\n}: SummaryRowProps) => (\n \n \n

{title}

\n \n \n \n {value || value === 0 || value === false ? (\n value\n ) : (\n [not specified]\n )}\n

\n \n
\n);\n\nexport const ExternalLinkSummaryRow = ({\n href,\n ...rest\n}: SummaryRowBaseProps & {\n href?: string;\n}) => (\n \n {href}{\" \"}\n \n \n \n \n ) : null\n }\n />\n);\n\nexport const EmailSummaryRow = ({\n to,\n ...rest\n}: SummaryRowBaseProps & {\n to?: string;\n}) => (\n {to} : null} />\n);\n\nexport const DateSummaryRow = ({\n date,\n ...rest\n}: SummaryRowBaseProps & {\n date?: string | Date | null;\n}) => (\n \n);\n\nexport const YesNoSummaryRow = ({\n value,\n trueText = \"Yes\",\n falseText = \"No\",\n ...rest\n}: SummaryRowBaseProps & {\n value?: boolean | null;\n trueText?: string;\n falseText?: string;\n}) => (\n \n);\n\nconst extractUkTelephoneNumber = (telephone: string) => {\n const match = /^0(\\d+)$/g.exec(telephone);\n\n if (match && match.length) {\n return `+44${match[1]}`;\n }\n\n return telephone;\n};\n\nexport const TelephoneSummaryRow = ({\n to,\n ...rest\n}: SummaryRowBaseProps & {\n to?: string;\n}) => (\n {to} : null}\n />\n);\n\nexport default SummaryRow;\n","import { FieldProps } from \"formik\";\nimport { padStart } from \"lodash\";\nimport * as React from \"react\";\nimport Select from \"react-select\";\nimport { isNumeric } from \"../../../utils\";\nimport { selectStyles, selectTheme } from \"../../Forms/CustomSelect\";\n\ninterface DateSelectRowState {\n day?: number;\n month?: number;\n year?: number;\n}\n\nconst datePattern = /^(\\d*)-(\\d*)-(\\d*)(.*)/g;\n\nconst monthOptions: { label: any; value: any }[] = [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n].map((month, i) => ({\n label: month,\n value: padStart((i + 1).toString(), 2, \"0\"),\n}));\n\nconst dateStyle = {\n ...selectStyles,\n container: (provided: any) => ({\n ...provided,\n }),\n};\n\nclass DateSelectRow extends React.Component<\n FieldProps & { preventMaxYear?: boolean },\n DateSelectRowState\n> {\n public constructor(props: FieldProps) {\n super(props);\n this.updateDay = this.updateDay.bind(this);\n this.updateMonth = this.updateMonth.bind(this);\n this.updateYear = this.updateYear.bind(this);\n this.handleBlur = this.handleBlur.bind(this);\n }\n\n public render() {\n const {\n field: { value },\n form: { errors, touched },\n preventMaxYear,\n } = this.props;\n\n let day = \"\";\n let month = \"\";\n let year = \"\";\n if (value) {\n const results = new RegExp(datePattern).exec(value);\n if (results) {\n day = results[3] || \"\";\n month = results[2] || \"\";\n year = results[1] || \"\";\n }\n }\n\n // Remove any leading digits from the day for display\n if (day && isNumeric(day)) {\n day = parseInt(day, 10).toString();\n }\n\n const option = monthOptions.find((x) => x.value === month);\n\n const path = this.props.field.name.split(\".\");\n const isTouched = path.reduce((o, i) => o && o[i], { ...touched } as any);\n const err =\n (isTouched && path.reduce((o, i) => o && o[i], { ...errors } as any)) ||\n \"\";\n\n return (\n
\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n {err && isTouched ?

{err}

: null}\n
\n );\n }\n\n private updateDay(e: any) {\n const dayText = e.target.value ? e.target.value.padStart(2, \"0\") : \"\";\n const oldValue: string = this.props.field.value;\n\n const dateText = oldValue && oldValue.match(datePattern) ? oldValue : \"--\";\n this.props.form.setFieldValue(\n this.props.field.name,\n dateText.replace(datePattern, `$1-$2-${dayText}$4`)\n );\n }\n\n private updateMonth(option: any) {\n const monthText = option.value;\n const oldValue: string = this.props.field.value;\n\n const dateText = oldValue && oldValue.match(datePattern) ? oldValue : \"--\";\n this.props.form.setFieldValue(\n this.props.field.name,\n dateText.replace(datePattern, `$1-${monthText}-$3$4`)\n );\n }\n\n private updateYear(e: any) {\n const yearText = e.target.value ? e.target.value : \"\";\n const oldValue: string = this.props.field.value;\n\n const dateText = oldValue && oldValue.match(datePattern) ? oldValue : \"--\";\n this.props.form.setFieldValue(\n this.props.field.name,\n dateText.replace(datePattern, `${yearText}-$2-$3$4`)\n );\n }\n\n private handleBlur(e: any) {\n this.props.form.setFieldTouched(this.props.field.name, true);\n }\n}\n\nexport default DateSelectRow;\n","import * as React from \"react\";\nimport * as uuid from \"uuid\";\nimport { AlertColor, AlertMessage, AlertsProps } from \"./types\";\n\nconst dummyContext: AlertsProps = {\n alerts: [],\n addAlert: alert => {\n return;\n },\n removeAlert: id => {\n return;\n },\n clearAlerts: () => {\n return;\n }\n};\n\nconst AlertsContext = React.createContext(dummyContext);\n\nclass AlertsProvider extends React.Component<\n { children: React.ReactNode },\n { alerts: AlertMessage[] }\n> {\n constructor(props: any) {\n super(props);\n\n this.addAlert = this.addAlert.bind(this);\n this.removeAlert = this.removeAlert.bind(this);\n this.clearAlerts = this.clearAlerts.bind(this);\n\n this.state = { alerts: [] };\n }\n\n public componentDidMount() {\n // Hack to allow access to the alerts provider from outside of React,\n // so the Apollo error link can post errors.\n (window as any).alertsProvider = this;\n }\n\n public componentWillUnmount() {\n delete (window as any).alertsProvider;\n }\n\n public render() {\n const { children } = this.props;\n const { alerts } = this.state;\n\n return (\n \n {children}\n \n );\n }\n\n private addAlert({\n message,\n color,\n onClick\n }: {\n message: string;\n color?: AlertColor;\n onClick?: () => void;\n }) {\n this.setState(s => {\n const existing = s.alerts.find(a => a.message === message);\n\n // Merge alerts with the same message\n const alert = existing\n ? { ...existing, onClick, count: existing.count + 1 }\n : {\n id: uuid.v4(),\n count: 1,\n message,\n onClick,\n color: color || AlertColor.danger\n };\n\n if (!existing && (!color || color === AlertColor.danger)) {\n // tslint:disable-next-line:no-console\n console.log(message);\n }\n\n return {\n alerts: [\n ...s.alerts.filter(a => !existing || a.id !== existing.id),\n alert\n ]\n };\n });\n }\n\n private removeAlert(id: string) {\n this.setState(s => {\n return { alerts: s.alerts.filter(a => a.id !== id) };\n });\n }\n\n private clearAlerts() {\n this.setState({ alerts: [] });\n }\n}\n\nexport function withAlerts(\n Component: React.ComponentType\n) {\n return (props: TProps) => (\n \n {alertProps => }\n \n );\n}\n\nexport const AlertsConsumer = AlertsContext.Consumer;\n\nexport default AlertsProvider;\n","import { FieldProps } from \"formik\";\nimport * as React from \"react\";\nimport Select from \"react-select\";\nimport { Col, Label } from \"reactstrap\";\nimport { selectStyles, selectTheme } from \"../../Forms/CustomSelect\";\n\ninterface TitleSelectProps {\n colSize?: number;\n autoFocus?: boolean;\n}\n\nconst titleOptions: { label: any; value: any }[] = [\n \"Mr\",\n \"Ms\",\n \"Mrs\",\n \"Miss\",\n \"Dr\",\n \"Other\"\n].map(title => ({\n label: title,\n value: title\n}));\n\nconst titleStyles = {\n ...selectStyles,\n container: (provided: any) => ({\n ...provided\n })\n};\n\nconst TitleSelectField = (props: FieldProps & TitleSelectProps) => {\n const {\n form: { errors, touched }\n } = props;\n\n const path = props.field.name.split(\".\");\n\n const isTouched = path.reduce((o, i) => o && o[i], { ...touched } as any);\n const err =\n (isTouched && path.reduce((o, i) => o && o[i], { ...errors } as any)) || \"\";\n\n const titleOption = !!props.field.value\n ? titleOptions.find(\n x => x.value.toLowerCase() === props.field.value.toLowerCase()\n ) || titleOptions.find(x => x.value === \"Other\")\n : null;\n\n return (\n \n \n \n props.form.setFieldValue(props.field.name, option.value)\n }\n onBlur={() => props.form.setFieldTouched(props.field.name, true)}\n options={titleOptions}\n placeholder=\"Title\"\n autoFocus={!!props.autoFocus}\n />\n {err && isTouched ?
{err}
: null}\n \n );\n};\n\nexport default TitleSelectField;\n","import { FormikProps } from \"formik\";\nimport { Proposal } from \"../types\";\n\nconst ProposalFormClearQuotation = ({\n children,\n setFieldValue,\n setFieldTouched,\n validateForm,\n}: {\n children: (props: { clearQuotation: () => void }) => JSX.Element;\n} & FormikProps) =>\n children({\n clearQuotation: () => {\n [\n \"quotationId\",\n \"finance.monthlyPayment\",\n \"finance.rate\",\n \"finance.aprRate\",\n \"finance.balloonPayment\",\n \"finance.acceptanceFee\",\n \"finance.optionFee\",\n \"finance.cashPrice\",\n \"finance.lenderId\",\n \"finance.lenderName\"\n ].forEach((field) => {\n setFieldValue(field as any, undefined, false);\n setFieldTouched(field as any, true, false);\n });\n return setTimeout(validateForm, 0);\n },\n });\n\nexport default ProposalFormClearQuotation;\n","import { Field, FieldProps, FormikProps } from \"formik\";\nimport React from \"react\";\nimport { Alert, Col, Row } from \"reactstrap\";\nimport RadioField from \"../../Forms/RadioField\";\nimport { Proposal } from \"../types\";\n\ninterface ProposalQuestionProps {\n name: string;\n text: string;\n additionalMessage?: string;\n reverseValues?: boolean;\n}\n\ntype ProposalQuestionPropsEnhanced = FormikProps &\n ProposalQuestionProps;\n\nclass ProposalQuestion extends React.Component {\n public render() {\n const { name, text, additionalMessage, reverseValues } = this.props;\n\n return (\n \n \n \n {({ field, form }: FieldProps) => (\n \n

Customer question

\n \n \n \n {additionalMessage && field.value === !!reverseValues ? (\n

{additionalMessage}

\n ) : null}\n
\n )}\n
\n \n
\n );\n }\n}\n\nexport default ProposalQuestion;\n","import * as React from \"react\";\nimport {\n DropdownItem,\n DropdownMenu,\n DropdownToggle,\n InputGroupButtonDropdown,\n} from \"reactstrap\";\nimport { useLoggedInUser } from \"../../LoggedInUserQuery\";\nimport { QuotationTargetBy, QuotationTargetByLookup } from \"../types\";\n\ninterface TargetByDropdownProps {\n targetBy: QuotationTargetBy;\n disabled?: boolean;\n updateValue: (value: QuotationTargetBy) => void;\n}\n\nconst TargetByDropdown = ({\n targetBy,\n disabled,\n updateValue,\n}: TargetByDropdownProps) => {\n const { loading, isDealer } = useLoggedInUser();\n const [active, setActive] = React.useState(false);\n const toggle = () => setActive(!active);\n\n const targetByInfo = QuotationTargetByLookup[targetBy];\n\n if (loading) {\n return null;\n }\n\n const options = Object.keys(QuotationTargetBy)\n .filter((k) => !isDealer || k !== QuotationTargetBy.COMMISSION_VALUE)\n .map((k) => ({\n label: QuotationTargetByLookup[k as QuotationTargetBy].description,\n value: k as QuotationTargetBy,\n }));\n\n return (\n \n \n {targetByInfo.shortDescription || targetByInfo.description}\n \n \n {options.map((x) => (\n updateValue(x.value)}>\n {x.label}\n \n ))}\n \n \n );\n};\n\nexport default TargetByDropdown;\n","import { FieldProps } from \"formik\";\nimport * as React from \"react\";\nimport { InputGroup, InputGroupAddon } from \"reactstrap\";\nimport FormGroupWrapper from \"../../Forms/FormGroupWrapper\";\nimport { QuotationFormValues, QuotationTargetBy } from \"../types\";\nimport TargetByDropdown from \"./TargetByDropdown\";\n\nconst TargetByField = ({\n onBlur,\n ...props\n}: FieldProps & {\n onBlur?: (e: React.FocusEvent) => void;\n} & { disabled?: boolean }) => {\n const targetBy: QuotationTargetBy =\n (props.form.values.targetBy as QuotationTargetBy) ||\n QuotationTargetBy.APR_RATE;\n let customOnBlur: (e: React.FocusEvent) => void;\n\n if (onBlur) {\n customOnBlur = (e) => {\n props.field.onBlur(e);\n onBlur(e);\n };\n } else {\n customOnBlur = props.field.onBlur;\n }\n\n return (\n \n \n {\n props.form.setFieldValue(\"targetBy\", x);\n props.form.setFieldValue(\"targetByValue\", \"\");\n props.form.setFieldTouched(\"targetByValue\", true);\n props.form.setFieldTouched(\"targetBy\", true);\n }}\n disabled={!!props.disabled}\n />\n\n {targetBy === QuotationTargetBy.COMMISSION_VALUE ||\n targetBy === QuotationTargetBy.MONTHLY_PAYMENT ? (\n £\n ) : null}\n \n {targetBy === QuotationTargetBy.APR_RATE ||\n targetBy === QuotationTargetBy.FLAT_RATE ? (\n %\n ) : null}\n \n \n );\n};\n\nexport default TargetByField;\n","import * as React from \"react\";\nimport { Container } from \"reactstrap\";\n\nexport default () => (\n \n

Page not found

\n
\n);\n","import { isArray, uniq } from \"lodash\";\nimport { Proposal } from \"../Proposals/types\";\nimport { cleanFormData } from \"../../utils\";\n\nexport function findWatchedFieldsNotInData(allWatched: any, allValues: any) {\n const inner = (watched: any, values: any, path?: string): string[] => {\n if (!watched || typeof watched !== \"object\") {\n return [];\n }\n\n if (isArray(watched)) {\n if (!values) {\n return [path || \"\"];\n }\n if (isArray(values) && watched.length) {\n return values.reduce((prev: string[], val: any, i: number) => {\n return [...prev, ...inner(watched[0], val, `${path}[${i}]`)];\n }, [] as string[]);\n }\n return [];\n }\n\n return Object.keys(watched).reduce((prev, k) => {\n if (k === \"id\") {\n return prev;\n }\n const childPath = path ? `${path}.${k}` : k;\n if (!values?.hasOwnProperty(k)) {\n return [...prev, path ? `${path}.${k}` : k];\n }\n return [...prev, ...inner(watched[k], values[k], childPath)];\n }, [] as string[]);\n };\n\n return inner(allWatched, allValues);\n}\n\nexport function findDataValuesNotWatched(allWatched: any, allValues: any) {\n const inner = (watched: any, values: any, path?: string): string[] => {\n if (!values || typeof values !== \"object\") {\n return [];\n }\n\n if (isArray(values)) {\n if (watched === true) {\n return [];\n }\n if (!watched || !isArray(watched) || !watched.length) {\n return [path || \"\"];\n }\n if (values.length) {\n return values.reduce((prev: string[], val: any) => {\n return uniq([...prev, ...inner(watched[0], val, `${path}[0]`)]);\n }, [] as string[]);\n }\n return [];\n }\n\n return Object.keys(values).reduce((prev, k) => {\n if (k === \"id\") {\n return prev;\n }\n const childPath = path ? `${path}.${k}` : k;\n if (!watched.hasOwnProperty(k)) {\n return [...prev, path ? `${path}.${k}` : k];\n }\n return [...prev, ...inner(watched[k], values[k], childPath)];\n }, [] as string[]);\n };\n\n return inner(allWatched, allValues);\n}\n\n/** Removes client-only fields from the proposal object before submitting it to the server */\nexport function cleanProposalBeforeSubmit(values: Proposal) {\n const isMannIslandDealer = values.dealer.isMannIslandDealer;\n const proposal = cleanFormData(values) as Proposal;\n\n // Remove questions\n // delete proposal.customerPresent;\n\n // delete proposal.proposalCustomerQuestions.tNC;\n delete proposal.externalSource;\n // delete proposal.cancelType;\n\n // Remove client-only fields\n delete proposal.autoConvertLenderName;\n delete proposal.vehicle.skipVehicle;\n delete proposal.vehicle.isRegUnknown;\n delete proposal.vehicle.regNoNotFound;\n delete proposal.vehicle.LCV;\n delete proposal.finance.totalFinance;\n delete proposal.finance.commissionCode;\n delete proposal.finance.interestCharges;\n delete proposal.finance.totalCharges;\n delete proposal.finance.balancePayable;\n delete proposal.finance.totalAmountPayable;\n delete proposal.finance.lessRentalDeposit;\n delete proposal.finance.paidOutDate;\n delete proposal.finance.dealerCommission;\n delete proposal.targetBy;\n delete proposal.targetByValue;\n delete proposal.quotationListResult;\n\n if (isMannIslandDealer) {\n proposal.finance.rate = 0.1;\n }\n if (proposal.isMannIslandDealer != null) {\n delete proposal.isMannIslandDealer;\n }\n\n delete proposal.dealer;\n delete proposal.createdDate;\n // delete submittedProp.finance;\n delete proposal.proposalType;\n delete proposal.autoConvertReference;\n\n if (proposal.individualCustomer) {\n delete proposal.individualCustomer.countryOfBirth;\n delete proposal.individualCustomer.nationality;\n delete proposal.individualCustomer.countryOfResidence;\n delete proposal.individualCustomer.countryOfActivity;\n delete proposal.individualCustomer.occupationType;\n }\n\n if (proposal.business) {\n proposal.business.directors.forEach((director) => {\n delete director.countryOfBirth;\n delete director.nationality;\n delete director.countryOfResidence;\n });\n }\n\n return proposal;\n}\n","import * as Yup from \"yup\";\n\nexport const mobileValidationSchema = Yup.string()\n .default(undefined)\n .min(11, \"Mobile number must be at least 11 characters\")\n .max(11)\n .nullable(true)\n .matches(\n /^07\\d*$/,\n \"Mobile number has to start with '07' and contain numbers only\"\n )\n .transform((value) => (value || value === 0 ? value : null));\n\nexport default mobileValidationSchema;\n","import * as Yup from \"yup\";\nimport { Vehicle, VehicleTypeEnum } from \"../types\";\n\n/**\n * Regex pattern to validate uk number plates.\n * Found it here: https://gist.github.com/glcheetham/75c3821e5ddcad7f65bdd18474a8b8a4\n */\nconst UK_PLATE_PATTERN =\n /(^[A-Z]{2}[0-9]{2}\\s?[A-Z]{3}$)|(^[A-Z][0-9]{1,3}[A-Z]{3}$)|(^[A-Z]{3}[0-9]{1,3}[A-Z]$)|(^[0-9]{1,4}[A-Z]{1,2}$)|(^[0-9]{1,3}[A-Z]{1,3}$)|(^[A-Z]{1,2}[0-9]{1,4}$)|(^[A-Z]{1,3}[0-9]{1,3}$)/i;\n\nconst vehicleValidationSchema = Yup.object().shape({\n isCommercial: Yup.boolean().default(false),\n isNew: Yup.boolean().default(false),\n skipVehicle: Yup.boolean().default(false),\n isRegUnknown: Yup.boolean().default(false),\n regNo: Yup.string()\n .label(\"Vehicle registration\")\n .max(8)\n .default(undefined)\n .nullable(true)\n .when([\"isRegUnknown\", \"skipVehicle\", \"vIN\"], {\n is: (regUnknown: boolean, skip: boolean, vIN: string) =>\n !regUnknown && !skip && !vIN,\n then: Yup.string().matches(\n UK_PLATE_PATTERN,\n \"Not a valid UK number plate\"\n ),\n })\n .when([\"isRegUnknown\", \"skipVehicle\"], {\n is: (regUnknown: boolean, skip: boolean) => !regUnknown && !skip,\n then: Yup.string().required().max(255),\n })\n .when([\"regNoNotFound\", \"skipVehicle\"], {\n is: (reg: string, skip: boolean) => !!reg && !skip,\n then: Yup.string().notOneOf(\n [Yup.ref(\"regNoNotFound\")],\n \"Registration not found. Try entering the details manually.\"\n ),\n }),\n regNoNotFound: Yup.string().default(undefined).max(255),\n make: Yup.string()\n .nullable()\n .default(undefined)\n .when([\"isRegUnknown\", \"skipVehicle\"], {\n is: (regUnknown: boolean, skip: boolean) => !!regUnknown && !skip,\n then: Yup.string().required(\"Vehicle make not specified\"),\n })\n .max(50),\n model: Yup.string()\n .default(undefined)\n .nullable()\n .when([\"isRegUnknown\", \"skipVehicle\"], {\n is: (regUnknown: boolean, skip: boolean) => !!regUnknown && !skip,\n then: Yup.string().required(\"Vehicle model not specified\"),\n })\n .max(50),\n bodyStyle: Yup.string().default(null).nullable(true),\n dateOfRegistration: Yup.mixed()\n .default(undefined)\n .nullable(true)\n .when([\"skipVehicle\"], {\n is: (skip: boolean) => !skip,\n then: Yup.date().required(\"Date of registration not specified\"),\n }),\n cAP: Yup.string()\n .default(undefined)\n .nullable(true)\n .when([\"isRegUnknown\", \"skipVehicle\", \"vehicleType\"], {\n is: (regUnknown: boolean, skip: boolean, type: string) =>\n !regUnknown && !skip && type !== VehicleTypeEnum.Motorhome,\n then: Yup.string().required(\"No vehicle specified\").max(20),\n }),\n capId: Yup.string().max(50).default(undefined).nullable(true),\n mileage: Yup.number()\n .label(\"Mileage\")\n .nullable(true)\n .default(undefined)\n .min(0)\n .lessThan(1000000, \"It's not the starship enterprise!\")\n .when(\"skipVehicle\", {\n is: false,\n then: Yup.number()\n .integer(\"Mileage must be a whole number\")\n .required()\n .typeError(\"Mileage must be a number\"),\n }),\n vehicleType: Yup.string()\n .label(\"Vehicle type\")\n .nullable(false)\n .default(\"Car\"),\n maxAnnualMileage: Yup.number()\n .default(6000)\n .label(\"Max annual mileage\")\n .nullable(true)\n .min(6000)\n .when(\"skipVehicle\", {\n is: false,\n then: Yup.number()\n .integer(\"Annual mileage must be a whole number\")\n .typeError(\"Annual mileage must be a number\")\n .required(),\n }),\n vatQualifying: Yup.bool().default(false).nullable(true),\n vIN: Yup.string().default(undefined).nullable(true),\n colour: Yup.string().default(undefined).nullable(true),\n doors: Yup.number()\n .default(undefined)\n .nullable(true)\n .transform((value) => (value || value === 0 ? value : null)),\n transmission: Yup.string().default(undefined).nullable(true),\n insuranceGroup: Yup.string().default(undefined).nullable(true),\n derivative: Yup.string().default(undefined).nullable(true),\n engineSize: Yup.number()\n .default(undefined)\n .nullable(true)\n .transform((value) => (value || value === 0 ? value : null)),\n fuel: Yup.string().default(undefined).nullable(true),\n});\n\nexport default vehicleValidationSchema;\n","import { Field, FormikProps } from \"formik\";\nimport * as React from \"react\";\nimport {\n Col,\n FormGroup,\n InputGroup,\n InputGroupAddon,\n Label,\n Row,\n} from \"reactstrap\";\nimport { roundNumber } from \"../../../utils\";\nimport { Dealer } from \"../../Dealers/types\";\nimport CheckboxField from \"../../Forms/CheckboxField\";\nimport FormInputField from \"../../Forms/FormInputField\";\nimport SelectField from \"../../Forms/SelectField\";\nimport { ProductTypeEnum } from \"../../types\";\nimport { QuotationFormValues, QuotationTargetBy } from \"../types\";\nimport TargetByField from \"./TargetByField\";\n\nexport const termOptions: { label: string; value: number }[] = [\n { label: \"12 months\", value: 12 },\n { label: \"24 months\", value: 24 },\n { label: \"36 months\", value: 36 },\n { label: \"48 months\", value: 48 },\n { label: \"60 months\", value: 60 },\n];\n\nclass FinanceFormSection extends React.Component<\n FormikProps & {\n nextSection: () => void;\n refresh: (props?: FormikProps) => void;\n className?: string;\n dealer?: Dealer;\n isMulti?: boolean;\n },\n {\n isCollapsed: boolean;\n productTypes?: ProductTypeEnum[];\n targetBy?: QuotationTargetBy;\n targetByValue?: number;\n }\n> {\n constructor(\n props: FormikProps & {\n nextSection: () => void;\n refresh: () => void;\n }\n ) {\n super(props);\n this.toggleIsCollapsed = this.toggleIsCollapsed.bind(this);\n this.touchAllFields = this.touchAllFields.bind(this);\n this.handleNextButtonClick = this.handleNextButtonClick.bind(this);\n this.state = { isCollapsed: !!props.values.id };\n\n this.props.setFieldValue(\n \"targetByValue\",\n this.props.dealer?.agreedApr\n ? roundNumber(this.props.dealer?.agreedApr)\n : \"\"\n );\n }\n\n public render() {\n const props = this.props;\n return props.isMulti ? (\n <>\n \n \n\n \n\n \n\n \n\n \n \n \n \n £\n \n \n \n \n\n \n \n \n\n \n\n \n\n ({\n label: x,\n value: x,\n }))}\n />\n \n \n ) : (\n <>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n £\n \n \n \n \n \n \n \n \n \n \n \n ({\n label: x,\n value: x,\n }))}\n />\n \n \n );\n }\n\n private handleNextButtonClick() {\n const financeErrors = Object.keys(this.props.errors).filter(\n (x) => !x.startsWith(\"vehicle\")\n );\n this.touchAllFields();\n if (!financeErrors.length) {\n this.toggleIsCollapsed();\n this.props.nextSection();\n }\n }\n\n private getFinanceValue(values: QuotationFormValues) {\n const {\n finance: {\n cashPrice,\n deposit,\n partExchangeValue,\n partExchangeSettlement,\n },\n } = values;\n\n return (\n (cashPrice || 0) +\n (partExchangeSettlement || 0) -\n ((deposit || 0) + (partExchangeValue || 0))\n );\n }\n\n private toggleIsCollapsed() {\n this.touchAllFields();\n this.setState((s) => ({ isCollapsed: !s.isCollapsed }));\n }\n\n private touchAllFields() {\n this.props.setTouched({\n finance: {\n cashPrice: true,\n deposit: true,\n partExchangeSettlement: true,\n partExchangeValue: true,\n },\n targetByValue: true,\n });\n }\n}\n\nexport default FinanceFormSection;\n","import { FormikProps } from \"formik\";\nimport * as React from \"react\";\nimport { useEffect, useState } from \"react\";\nimport FlipMove from \"react-flip-move\";\nimport { Badge, Col, Row } from \"reactstrap\";\nimport { formatCurrency } from \"../../../utils\";\nimport {\n QuotationFormValues,\n QuotationResults,\n QuotationTargetBy,\n} from \"../types\";\nimport {\n QuotationResultListItemProps,\n QuotationResultListProps,\n} from \"./QuotationResultList\";\nimport { ProductTypeEnum } from \"../../types\";\n\nexport const getLowestPayment = (results?: QuotationResults[]) =>\n results &&\n results.reduce((prev: number, r: QuotationResults) => {\n return prev > 0 ? Math.min(prev, r.monthlyPayment) : r.monthlyPayment;\n }, 0);\n\nconst MultiQuoteResultTableRow = ({\n result: {\n productType,\n finance,\n arrangementFee,\n completionFee,\n interestCharges,\n guaranteedFutureValue,\n term,\n monthlyPayment,\n aprRate,\n commissionCode,\n lenderName,\n },\n lowestProductPayment,\n showCommission,\n targetBy,\n}: QuotationResultListItemProps) => (\n <>\n \n
{productType}
\n
{lenderName}
\n \n \n
\n Monthly Payment: {formatCurrency(monthlyPayment)}\n
\n\n {productType === ProductTypeEnum.PCP && (\n

Final rental {formatCurrency(guaranteedFutureValue)}

\n )}\n {false && (\n

\n Total Amount Payable:{\" \"}\n {formatCurrency(\n finance + arrangementFee + completionFee + interestCharges\n )}\n

\n )}\n

Term {term} months

\n
\n APR {(Math.round(aprRate * 100) / 100).toFixed(2)}%\n
\n
\n {monthlyPayment === lowestProductPayment &&\n targetBy !== QuotationTargetBy.MONTHLY_PAYMENT ? (\n \n {\" \"}\n Lowest {productType}\n \n ) : null}\n
\n {showCommission && (\n

\n {commissionCode}\n

\n )}\n \n \n);\n\nconst MultiQuoteResultTable = ({\n quotationListResult,\n onSelectResult,\n loading,\n headerText,\n props,\n}: QuotationResultListProps & { props: FormikProps }) => {\n const { values } = props;\n const results = quotationListResult?.results;\n\n let filteredByTermResults = results?.filter(\n (x) => x.term === values.finance.term\n );\n\n const NoItemsPlaceholder = () => (\n
No results found
\n );\n\n const productTypeArray = [\"LP\", \"HP\", \"PCP\"];\n\n const lowestByProduct = productTypeArray.map((r) => {\n return getLowestPayment(\n filteredByTermResults?.filter((p) => p.productType === r)\n );\n });\n\n const sortByProductType = (a: QuotationResults, b: QuotationResults) => {\n return (\n productTypeArray.indexOf(b.productType.toUpperCase()) -\n productTypeArray.indexOf(a.productType.toUpperCase())\n );\n };\n\n const sortByNameDesc = (a: QuotationResults, b: QuotationResults) => {\n let textA = a.lenderName?.toUpperCase() || \"\";\n let textB = b.lenderName?.toUpperCase() || \"\";\n return textA < textB ? 1 : textA > textB ? -1 : 0;\n };\n\n const sortByLowest = (a: QuotationResults, b: QuotationResults) => {\n return (\n lowestByProduct.indexOf(b.monthlyPayment) -\n lowestByProduct.indexOf(a.monthlyPayment)\n );\n };\n\n const [activeIndex, setActiveIndex] = useState(-1);\n\n useEffect(() => {\n setActiveIndex(-1);\n onSelectResult(null);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [values.finance, values.productTypes]);\n\n return results ? (\n <>\n \n {!filteredByTermResults?.length ? (\n <>{NoItemsPlaceholder()}\n ) : (\n
\n \n \n {headerText}\n \n\n \n {filteredByTermResults\n .sort((a, b) => {\n return (\n sortByProductType(a, b) ||\n sortByLowest(a, b) ||\n sortByNameDesc(a, b)\n );\n })\n .map((r, i) => {\n const lowestProductPayment = getLowestPayment(\n filteredByTermResults?.filter(\n (p) => p.productType === r.productType\n )\n );\n\n return (\n {\n setActiveIndex(i);\n onSelectResult(r);\n }}\n className={\n \"row custom-row\" +\n (activeIndex === i ? \" selected\" : \"\")\n }\n >\n onSelectResult(r)}\n loading={loading}\n />\n
\n );\n })}\n \n \n \n )}\n \n \n ) : null;\n};\n\nexport default MultiQuoteResultTable;\n","import * as Yup from \"yup\";\nimport {\n DATE_PATTERN,\n SPECIAL_CHARACTER_SELECT,\n testDateStringIsValid,\n} from \"../../../utils\";\nimport mobileValidationSchema from \"../../Forms/mobileValidationSchema\";\nimport telephoneValidationSchema from \"../../Forms/telephoneValidationSchema\";\nimport { Address } from \"../../types\";\nimport {\n Business,\n BusinessDirector,\n BusinessType,\n DirectorOwnerStatus,\n} from \"../types\";\n\nexport const addressSchema = Yup.object
().shape({\n line1: Yup.string()\n .label(\"Line 1\")\n .default(undefined)\n .test(\n \"line1-comma-check\",\n \"Line 1 format is incorrect\",\n // tslint:disable:ter-prefer-arrow-callback\n // tslint:disable:only-arrow-functions\n function (value) {\n return (\n !!value &&\n value.replace(SPECIAL_CHARACTER_SELECT, \"\").trim().length > 2\n );\n }\n // tslint:enable:ter-prefer-arrow-callback\n // tslint:enable:only-arrow-functions\n )\n .min(3)\n .required(\"Line 1 of the address is required\")\n .max(50)\n .nullable(true),\n line2: Yup.string().default(undefined).max(50).label(\"Line 2\").nullable(true),\n line3: Yup.string().default(undefined).max(50).label(\"Line 3\").nullable(true),\n town: Yup.string()\n .default(undefined)\n .test(\n \"town-comma-check\",\n \"Town format is incorrect\",\n // tslint:disable:ter-prefer-arrow-callback\n // tslint:disable:only-arrow-functions\n function (value) {\n return (\n !!value &&\n value.replace(SPECIAL_CHARACTER_SELECT, \"\").trim().length > 2\n );\n }\n // tslint:enable:ter-prefer-arrow-callback\n // tslint:enable:only-arrow-functions\n )\n .min(3)\n .max(50)\n .required(\"Town of the address is required\")\n .label(\"Town\")\n .nullable(true),\n postcode: Yup.string()\n .default(undefined)\n .test(\n \"postcode-comma-check\",\n \"Postcode format is incorrect\",\n // tslint:disable:ter-prefer-arrow-callback\n // tslint:disable:only-arrow-functions\n function (value) {\n return (\n !!value &&\n value.replace(SPECIAL_CHARACTER_SELECT, \"\").trim().length > 2\n );\n }\n // tslint:enable:ter-prefer-arrow-callback\n // tslint:enable:only-arrow-functions\n )\n .min(3)\n .max(8)\n .required(\"Postcode of the address is required\")\n .label(\"Postcode\")\n .nullable(true),\n countryId: Yup.string().nullable(true).default(\"GBR\"),\n telephone: telephoneValidationSchema.label(\"Telephone number\"),\n totalMonthlyRentOrMortgage: Yup.number()\n .label(\"Monthly rent or mortgage cost\")\n .default(undefined)\n .nullable(true)\n .min(0, \"Rent or mortgage value cannot be lower than 0\")\n .typeError(\"Rent or mortgage must be a number\")\n .integer(\"Rent or mortgage amount must be a whole number\"),\n});\n\nexport const businessAddressSchema = Yup.object
().shape({\n line1: Yup.string()\n .label(\"Line 1\")\n .default(undefined)\n .test(\n \"line1-comma-check\",\n \"Line 1 format is incorrect\",\n\n function (value) {\n return (\n !!value &&\n value.replace(SPECIAL_CHARACTER_SELECT, \"\").trim().length > 2\n );\n }\n )\n .min(3)\n .required(\"Line 1 of the address is required\")\n .max(50)\n .nullable(true),\n line2: Yup.string().default(undefined).max(50).label(\"Line 2\").nullable(true),\n line3: Yup.string().default(undefined).max(50).label(\"Line 3\").nullable(true),\n town: Yup.string()\n .default(undefined)\n .test(\n \"town-comma-check\",\n \"Town format is incorrect\",\n\n function (value) {\n return (\n !!value &&\n value.replace(SPECIAL_CHARACTER_SELECT, \"\").trim().length > 2\n );\n }\n )\n .min(3)\n .max(50)\n .required(\"Town of the address is required\")\n .label(\"Town\")\n .nullable(true),\n postcode: Yup.string()\n .default(undefined)\n .test(\n \"postcode-comma-check\",\n \"Postcode format is incorrect\",\n\n function (value) {\n return (\n !!value &&\n value.replace(SPECIAL_CHARACTER_SELECT, \"\").trim().length > 2\n );\n }\n )\n .min(3)\n .max(8)\n .required(\"Postcode of the address is required\")\n .label(\"Postcode\")\n .nullable(true),\n countryId: Yup.string().nullable(true).default(\"GBR\"),\n telephone: telephoneValidationSchema.label(\"Telephone number\"),\n});\n\nexport const directorValidationSchema = Yup.object().shape({\n id: Yup.string().nullable(true).default(undefined),\n title: Yup.string()\n .label(\"Title\")\n .required()\n .nullable(true)\n .default(undefined)\n .max(10),\n forename: Yup.string()\n .label(\"Forename\")\n .nullable(true)\n .required()\n .default(undefined)\n .max(20),\n middleName: Yup.string()\n .default(undefined)\n .nullable(true)\n .label(\"Middle name\")\n .max(100),\n surname: Yup.string()\n .label(\"Surname\")\n .nullable(true)\n .required()\n .default(undefined)\n .max(50),\n dOB: Yup.string()\n .label(\"Date of birth\")\n .matches(DATE_PATTERN, \"Date of birth is a required field\")\n .default(undefined)\n .test(\n \"director-date-format-validation\",\n \"Date does not exist\",\n testDateStringIsValid\n )\n .required()\n .typeError(\"Date of birth must be a date\") as any,\n email: Yup.string()\n .label(\"Email\")\n .email()\n .nullable(true)\n .default(undefined)\n .required()\n .max(256),\n earnings: Yup.number()\n .label(\"Earnings\")\n .default(undefined)\n .nullable(true)\n .min(10200, \"Earnings must be equal to or greater than £850 per month\")\n .required(),\n guarantor: Yup.boolean().nullable(true).default(false).required(),\n mobile: mobileValidationSchema.label(\"Mobile\").required(),\n owner: Yup.string()\n .label(\"Home ownership\")\n .nullable(true)\n .default(undefined)\n .required() as any,\n otherStatus: Yup.string()\n .label(\"Ownership details\")\n .nullable(true)\n .default(undefined)\n .max(50)\n .when(\"owner\", {\n is: (t: DirectorOwnerStatus) => t === DirectorOwnerStatus.OTHER,\n then: Yup.string().required(),\n }),\n homeYears: Yup.number()\n .nullable(true)\n .default(undefined)\n .min(0)\n .required()\n .label(\"Years at address\"),\n homeMonths: Yup.number()\n .nullable(true)\n .min(0)\n .lessThan(12)\n .default(undefined)\n .required()\n .label(\"Months at address\")\n .test(\n \"director-months-at-address-not-zero\",\n \"Months at address must be specified if years at address is zero\",\n // tslint:disable:ter-prefer-arrow-callback\n // tslint:disable:only-arrow-functions\n function (value) {\n return value !== 0 || !this.parent || this.parent.homeYears !== 0;\n }\n // tslint:enable:ter-prefer-arrow-callback\n // tslint:enable:only-arrow-functions\n ),\n address: addressSchema.default(addressSchema.default()).required(),\n maritalStatus: Yup.string()\n .default(undefined)\n .label(\"Marital status\")\n .nullable(true)\n .required() as any,\n drivingLicense: Yup.string()\n .default(undefined)\n .label(\"Driving license\")\n .nullable(true)\n .required() as any,\n countryOfBirthId: Yup.string()\n .label(\"Country of birth\")\n .nullable(true)\n .length(3)\n .required()\n .default(undefined),\n nationalityId: Yup.string()\n .label(\"Nationality\")\n .nullable()\n .length(3)\n .required()\n .default(undefined),\n countryOfResidenceId: Yup.string()\n .label(\"Country of residence\")\n .nullable()\n .length(3)\n .required()\n .default(undefined),\n});\n\nconst businessCustomerValidationSchema = Yup.object()\n .nullable(true)\n .shape({\n id: Yup.string().nullable(true),\n name: Yup.string()\n .label(\"Business name\")\n .max(50)\n .default(undefined)\n .required(),\n natureOfBusiness: Yup.string()\n .label(\"Industry\")\n .nullable(true)\n .max(50)\n .default(undefined)\n .required(\"Please specify industry\"),\n contactName: Yup.string()\n .label(\"Contact name\")\n .nullable(true)\n .max(50)\n .default(undefined)\n .required(),\n contactPosition: Yup.string()\n .label(\"Contact position\")\n .nullable(true)\n .max(50)\n .default(undefined)\n .required(),\n email: Yup.string()\n .label(\"Email\")\n .nullable(true)\n .max(256)\n .default(undefined),\n mobile: mobileValidationSchema.label(\"Mobile telephone\"),\n businessType: Yup.string()\n .label(\"Business type\")\n .nullable(true)\n .required()\n .default(undefined) as any,\n registrationNumber: Yup.string()\n .label(\"Company reg no.\")\n .nullable(true)\n .notRequired()\n .max(10)\n .default(undefined)\n .when(\"businessType\", {\n is: (t: BusinessType) => t === BusinessType.LTD || t === undefined,\n then: Yup.string().required(),\n }),\n established: Yup.string()\n .label(\"Date established\")\n .required()\n .matches(DATE_PATTERN, \"Date established is a required field\")\n .nullable(true)\n .test(\n \"date-format-validation\",\n \"Date does not exist\",\n testDateStringIsValid\n )\n .default(undefined) as any,\n yearsAtAddress: Yup.number()\n .label(\"Years at address\")\n .integer(\"Years at address must be a whole number\")\n .min(0)\n .nullable(true)\n .required()\n .default(undefined)\n .typeError(\"Years at address must be a number\"),\n monthsAtAddress: Yup.number()\n .label(\"Months at address\")\n .integer(\"Months at address must be a whole number\")\n .min(0)\n .lessThan(12)\n .nullable(true)\n .required()\n .default(undefined)\n .typeError(\"Months at address must be a number\")\n .test(\n \"business-months-at-address-not-zero\",\n \"Months at address must be specified if years at address is zero\",\n // tslint:disable:ter-prefer-arrow-callback\n // tslint:disable:only-arrow-functions\n function (value) {\n return (\n value !== 0 || !this.parent || this.parent.yearsAtAddress !== 0\n );\n }\n // tslint:enable:ter-prefer-arrow-callback\n // tslint:enable:only-arrow-functions\n ),\n address: businessAddressSchema,\n directors: Yup.array(directorValidationSchema)\n .default([directorValidationSchema.default()])\n .test(\n \"earningsRequired\",\n \"Earnings are required\",\n function (value: BusinessDirector[]) {\n if (\n value &&\n value.length &&\n value[0].earnings !== 0 &&\n !value[0].earnings\n ) {\n return this.createError({\n path: \"business.directors.0.earnings\",\n message: \"Earnings are required\",\n });\n }\n return true;\n }\n )\n .test(\n \"totalMonthlyRentOrMortgageRequired\",\n \"Monthly rent or mortgage cost is required\",\n function (value: BusinessDirector[]) {\n if (\n value &&\n value.length &&\n value[0].address.totalMonthlyRentOrMortgage !== 0 &&\n !value[0].address.totalMonthlyRentOrMortgage\n ) {\n return this.createError({\n path: \"business.directors.0.address.totalMonthlyRentOrMortgage\",\n message: \"Monthly rent or mortgage cost is required\",\n });\n }\n return true;\n }\n )\n .max(2)\n .required(),\n });\n\nexport default businessCustomerValidationSchema;\n","import classnames from \"classnames\";\nimport { Field, FieldProps } from \"formik\";\nimport * as React from \"react\";\n\nimport \"./formstyles.scss\";\n\nexport interface BooleanCheckboxFieldProps {\n label: string;\n readOnly?: boolean;\n className?: string;\n submitOnChange?: boolean;\n}\n\nexport const BooleanCheckbox = ({\n form,\n field,\n label,\n className,\n readOnly,\n submitOnChange\n}: FieldProps & BooleanCheckboxFieldProps) => (\n
\n {\n if (!readOnly) {\n form.setFieldValue(field.name, !field.value, !submitOnChange);\n form.setFieldTouched(field.name, true, !submitOnChange);\n submitOnChange && form.submitForm();\n }\n }}\n />\n \n
\n);\n\nconst BooleanCheckboxField = ({\n name,\n ...props\n}: BooleanCheckboxFieldProps & { name: string }) => (\n \n {(fieldProps: FieldProps) => (\n \n )}\n \n);\n\nexport default BooleanCheckboxField;\n","import { isArray, mergeWith } from \"lodash\";\nimport * as React from \"react\";\nimport CustomSelect from \"../Forms/CustomSelect\";\nimport { useDealerListShallow } from \"./DealerList/DealerListQuery\";\nimport { useDealerShallow } from \"./DealerQuery\";\n\ninterface DealerSelectProps {\n dealerId?: number;\n accountManagerId?: string;\n fundedDealersOnly?: boolean;\n onSelectDealer: (\n dealerId: number,\n isMannIslandDealer: boolean,\n isMannIslandZList: boolean,\n isMultiQuote: boolean\n ) => void;\n autoFocus?: boolean;\n isClearable?: boolean;\n isDisabled?: boolean;\n includeSuspended?: boolean;\n}\n\nconst DealerSelect = (props: DealerSelectProps) => {\n const {\n dealerId,\n accountManagerId,\n fundedDealersOnly,\n onSelectDealer,\n autoFocus,\n isClearable,\n isDisabled,\n includeSuspended,\n } = props;\n const [query, setQuery] = React.useState(\"\");\n\n const { dealer, loading } = useDealerShallow(dealerId);\n\n const input = {\n q: query || undefined,\n page: 1,\n pageSize: 40,\n accountManagerId,\n fundedDealersOnly,\n includeSuspended,\n };\n\n const { dealers, fetchMore } = useDealerListShallow(input);\n\n const options =\n dealers?.edges?.map(\n ({\n node: { name, id, isMannIslandDealer, isMannIslandZList, isMultiQuote },\n }) => ({\n label: name,\n value: id,\n isMannIslandDealer: isMannIslandDealer,\n isMannIslandZList: isMannIslandZList,\n isMultiQuote: isMultiQuote,\n })\n ) || [];\n\n const selectedOption = dealer\n ? {\n label: dealer.name,\n value: dealer.id,\n }\n : null;\n\n const pageInfo = dealers?.pageInfo;\n\n return (\n {\n onSelectDealer(\n value ? value.value : undefined,\n value && value.isMannIslandDealer,\n value && value.isMannIslandZList,\n value && value.isMultiQuote\n );\n }}\n noOptionsMessage={() =>\n loading ? (dealer ? dealer.name : \"Loading...\") : \"No dealers found\"\n }\n filterOption={() => true}\n placeholder={dealers ? \"Type to search dealers\" : \"Loading...\"}\n autoFocus={autoFocus}\n isClearable={!!isClearable}\n onMenuScrollToBottom={() =>\n pageInfo &&\n pageInfo.hasMorePages &&\n fetchMore({\n variables: {\n input: {\n ...input,\n page: (pageInfo.page || 1) + 1,\n },\n },\n updateQuery: (prev, { fetchMoreResult }) => {\n if (!fetchMoreResult) {\n return prev;\n }\n\n return mergeWith(\n {},\n prev,\n fetchMoreResult,\n (objValue, srcValue) => {\n if (isArray(objValue)) {\n return [...objValue, ...srcValue];\n }\n return;\n }\n );\n },\n })\n }\n />\n );\n};\n\nexport default DealerSelect;\n","import gql from \"graphql-tag\";\nimport * as React from \"react\";\nimport { Query, QueryResult, useQuery } from \"react-apollo\";\nimport { User } from \"../types\";\nimport { QuotationFragment } from \"./fragments\";\nimport { Quotation } from \"./types\";\n\ninterface QuotationData {\n loggedInUser: User;\n quotation: Quotation;\n}\n\ninterface QuotationArgs {\n quotationId?: number;\n}\n\nexport const GET_QUOTATION = gql`\n query QuotationQuery($quotationId: ID!) {\n loggedInUser {\n id\n username\n roles\n }\n quotation(id: $quotationId) {\n ...QuotationFragment\n }\n }\n ${QuotationFragment}\n`;\n\nconst QuotationQuery = ({\n children,\n quotationId\n}: QuotationArgs & {\n children: (\n result: QueryResult & {\n quotation?: Quotation;\n }\n ) => JSX.Element | null;\n}) => (\n \n query={GET_QUOTATION}\n skip={!quotationId}\n variables={{ quotationId }}\n >\n {result =>\n children({\n ...result,\n quotation: result && result.data && result.data.quotation\n })\n }\n \n);\n\nexport const useQuotation = (quotationId?: number) => {\n const { loading, data } = useQuery(\n GET_QUOTATION,\n { variables: { quotationId }, skip: !quotationId }\n );\n\n return { loading, quotation: data?.quotation };\n};\n\nexport default QuotationQuery;\n","import * as Yup from \"yup\";\nimport { ProposalFinance } from \"../types\";\n\nconst financeValidationSchema = Yup.object()\n .shape({\n id: Yup.string().nullable(true).default(undefined),\n rate: Yup.number()\n .label(\"Flat rate\")\n .nullable(true)\n .required()\n .default(undefined),\n aprRate: Yup.number()\n .label(\"APR\")\n .nullable(true)\n .required()\n .default(undefined),\n period: Yup.number()\n .label(\"Period\")\n .integer(\"Period must be a whole number\")\n .moreThan(0)\n .nullable(true)\n .required()\n .default(36)\n .typeError(\"Period is a required field\"),\n monthlyPayment: Yup.number()\n .label(\"Monthly payment\")\n .required()\n .moreThan(0)\n .nullable(true)\n .default(undefined),\n balloonPayment: Yup.number()\n .label(\"Balloon payment\")\n .required()\n .default(undefined)\n .nullable(true)\n .default(undefined),\n partExchange: Yup.number()\n .default(0)\n .min(0)\n .label(\"Part exchange\")\n .typeError(\"Part exchange is a required field\")\n .nullable(true)\n .required(),\n partExchangeSettlement: Yup.number()\n .default(0)\n .label(\"Part exchange settlement\")\n .required()\n .nullable(true)\n .min(0)\n .default(0)\n .typeError(\"Part exchange settlement is a required field\"),\n cashPrice: Yup.number()\n .label(\"Cash price\")\n .moreThan(0)\n .required()\n .typeError(\"Cash price is a required field\")\n .nullable(true)\n .default(undefined),\n cashDeposit: Yup.number()\n .default(0)\n .min(0)\n .label(\"Deposit\")\n .typeError(\"Deposit must is a required field\")\n .nullable(true)\n .required(),\n rFL: Yup.number().default(0).label(\"Road fund license\").nullable(true),\n extras: Yup.number().default(0).label(\"Extras\").nullable(true).required(),\n requestDifferentLoanType: Yup.string().default(\"\").nullable(true),\n productType: Yup.string()\n .default(\"HP\")\n .label(\"Product type\")\n .nullable(true)\n .required() as any,\n })\n .test(\"negative-finance-value\", \"message\", function (value: ProposalFinance) {\n const { cashPrice, cashDeposit, partExchange, partExchangeSettlement } =\n value;\n const t =\n (cashPrice || 0) +\n (partExchangeSettlement || 0) -\n ((cashDeposit || 0) + (partExchange || 0));\n if (t < 0) {\n return this.createError({\n path: \"finance.cashPrice\",\n message: \"Finance value must be greater than 0\",\n });\n }\n return true;\n });\n\nexport default financeValidationSchema;\n","import * as Yup from \"yup\";\nimport { ProposalCustomerQuestions } from \"../types\";\n\nexport const proposalCustomerQuestionsValidationSchema =\n Yup.object().shape({\n id: Yup.number().nullable(true).default(undefined),\n privacyAgreement: Yup.boolean()\n .default(undefined)\n .nullable(true)\n .when(\"customerPresent\", {\n is: true,\n then: Yup.boolean()\n .required(\"The customer has to be notified of the privacy details\")\n .oneOf(\n [true],\n \"The customer has to be notified of the privacy details\"\n ),\n }),\n customerPresent: Yup.boolean()\n .default(true)\n .nullable(true)\n .required(\"Customer presence is required\"),\n tNC: Yup.boolean()\n .default(false)\n .required(\"You must accept the terms and conditions\")\n .oneOf([true], \"You must accept the terms and conditions\"),\n customerHasHadFinanceBefore: Yup.boolean()\n .nullable(true)\n .default(undefined),\n customerExpectsAffordabilityProblems: Yup.boolean()\n .default(undefined)\n .nullable(true),\n customerConfidentFinanceIsAffordable: Yup.boolean()\n .default(undefined)\n .nullable(true)\n .when(\"customerPresent\", {\n is: true,\n then: Yup.boolean()\n .required(\"Customer needs to answer this question\")\n .oneOf([true, false], \"Customer needs to answer this question\"),\n }),\n customerUnderstandsAgreement: Yup.boolean()\n .default(undefined)\n .nullable(true)\n .when(\"customerPresent\", {\n is: true,\n then: Yup.boolean()\n .required(\"Customer needs to answer this question\")\n .oneOf([true, false], \"Customer needs to answer this question\"),\n }),\n customerHappyAgreementIsGoodValue: Yup.boolean()\n .default(undefined)\n .nullable(true)\n .when(\"customerPresent\", {\n is: true,\n then: Yup.boolean()\n .required(\"Customer needs to answer this question\")\n .oneOf([true, false], \"Customer needs to answer this question\"),\n }),\n customerAdditionalInfo: Yup.boolean()\n .default(undefined)\n .nullable(true)\n .when(\"customerPresent\", {\n is: true,\n then: Yup.boolean()\n .required(\"Customer needs to answer this question\")\n .oneOf([true, false], \"Customer needs to answer this question\"),\n }),\n customerSaysDealerAnsweredQuestions: Yup.boolean()\n .default(undefined)\n .nullable(true)\n .when(\"customerPresent\", {\n is: true,\n then: Yup.boolean()\n .required(\"Customer needs to answer this question\")\n .oneOf([true, false], \"Customer needs to answer this question\"),\n }),\n customerAnnualMileageRealistic: Yup.boolean()\n .default(undefined)\n .nullable(true)\n .when(\"customerPresent\", {\n is: true,\n then: Yup.boolean()\n .required(\"Customer needs to answer this question\")\n .oneOf([true, false], \"Customer needs to answer this question\"),\n }),\n customerSoleSignatoryToBankAccount: Yup.boolean()\n .default(false)\n .nullable(true)\n .when(\"customerPresent\", {\n is: true,\n then: Yup.boolean()\n .required(\"Customer needs to answer this question\")\n .oneOf([true], \"Customer needs to answer this question\"),\n }),\n });\n","import * as Yup from \"yup\";\nimport { QuotationTargetBy } from \"../../Quotations/types\";\nimport { BankDetails, Proposal, ProposalStatusEnum } from \"../types\";\nimport businessCustomerValidationSchema from \"./businessCustomerValidationSchema\";\nimport financeValidationSchema from \"./financeValidationSchema\";\nimport individualCustomerValidationSchema from \"./individualCustomerValidationSchema\";\nimport vehicleValidationSchema from \"./vehicleValidationSchema\";\nimport { proposalCustomerQuestionsValidationSchema } from \"./proposalCustomerQuestionsValidationSchema\";\n\nexport const proposalCustomerOverviewValidationSchema =\n Yup.object().shape({\n id: Yup.number(),\n proposalRef: Yup.string().max(23),\n individualCustomer: individualCustomerValidationSchema\n .default(undefined)\n .nullable(true),\n });\n\nexport const proposalBusinessOverviewValidationSchema =\n Yup.object().shape({\n id: Yup.number(),\n proposalRef: Yup.string().max(23),\n business: businessCustomerValidationSchema\n .default(undefined)\n .nullable(true),\n });\n\nexport const proposalVehicleOverviewValidationSchema =\n Yup.object().shape({\n id: Yup.number(),\n proposalRef: Yup.string().max(23),\n vehicle: vehicleValidationSchema.default(undefined).nullable(true),\n });\n\nexport const proposalFinanceOverviewValidationSchema =\n Yup.object().shape({\n id: Yup.number(),\n proposalRef: Yup.string().max(23),\n finance: financeValidationSchema.default(undefined).nullable(true),\n quotationId: Yup.string().required(),\n });\n\nconst proposalValidationSchema = Yup.object().shape({\n id: Yup.number(),\n dealerId: Yup.number()\n .label(\"Dealer\")\n .nullable(true)\n .default(undefined)\n .required(),\n quotationId: Yup.number()\n .label(\"Quotation\")\n .nullable(true)\n .default(undefined)\n .when(\"FORMSTATE_requiresQuotation\", {\n is: true,\n then: Yup.number().required(\"Quotation must be saved\"),\n }),\n FORMSTATE_requiresQuotation: Yup.boolean().default(true),\n distanceSelling: Yup.boolean()\n .label(\"Type of sales transaction\")\n .nullable(true)\n .default(undefined)\n .required(),\n targetBy: Yup.string()\n .label(\"Target by\")\n .nullable(true)\n .default(QuotationTargetBy.APR_RATE) as Yup.Ref | Yup.Schema,\n targetByValue: Yup.number().nullable(true).default(undefined),\n proposalRef: Yup.string().max(23),\n isDealSaver: Yup.boolean(),\n salesPerson: Yup.string()\n .label(\"Sales person\")\n .max(50)\n .nullable(true)\n .default(undefined)\n .required(),\n notes: Yup.string().label(\"Notes\").max(200).default(undefined).nullable(true),\n dealer: Yup.object().notRequired() as Yup.Ref | Yup.Schema,\n accountManagerId: Yup.string().nullable(true).label(\"Account manager\"),\n finance: financeValidationSchema\n .default(financeValidationSchema.default())\n .nullable(true),\n business: businessCustomerValidationSchema.default(undefined),\n status: Yup.string() as Yup.Ref | Yup.Schema,\n createdDate: Yup.date(),\n vehicle: vehicleValidationSchema,\n bankDetails: Yup.object().shape({\n id: Yup.string().nullable(true),\n branch: Yup.string().label(\"Branch\").required().nullable(true).max(100),\n bank: Yup.string().label(\"Bank\").required().nullable(true).max(100),\n sortCode: Yup.string()\n .label(\"Sort code\")\n .required()\n .nullable(true)\n .matches(/^\\d\\d-\\d\\d-\\d\\d$/, 'Sort code must be in the format \"##-##-##\"')\n .max(8),\n accountNumber: Yup.string()\n .label(\"Account number\")\n .required()\n .nullable(true)\n .matches(/^\\d{8}$/, \"Bank account number must be 8 digits\"),\n accountName: Yup.string()\n .label(\"Account name\")\n .default(undefined)\n .nullable(true),\n yearsWithBank: Yup.number()\n .label(\"Years with bank\")\n .required()\n .nullable(true)\n .min(0),\n monthsWithBank: Yup.number()\n .label(\"Months with bank\")\n .required()\n .nullable(true)\n .min(0)\n .lessThan(12),\n FORMSTATE_invalidBankAccount: Yup.object()\n .shape({\n accountNumber: Yup.string().nullable(true),\n sortCode: Yup.string().nullable(true),\n })\n .nullable(true)\n .default(undefined),\n }),\n individualCustomer: individualCustomerValidationSchema\n .default(undefined)\n .nullable(true),\n proposalCustomerQuestions: proposalCustomerQuestionsValidationSchema\n .default(proposalCustomerQuestionsValidationSchema.default())\n .nullable(true)\n .test(\n \"previous-finance-required\",\n \"Customer needs to answer this question\",\n function (value) {\n if (\n this.parent.proposalCustomerQuestions.customerPresent &&\n value.customerHasHadFinanceBefore === undefined &&\n (this.parent.business === null || this.parent.business === undefined)\n ) {\n return this.createError({\n path: \"proposalCustomerQuestions.customerHasHadFinanceBefore\",\n message: \"Customer needs to answer this question\",\n });\n }\n return true;\n }\n )\n .test(\n \"affordability-required\",\n \"Customer needs to answer this question\",\n function (value) {\n if (\n this.parent.proposalCustomerQuestions.customerPresent &&\n value.customerExpectsAffordabilityProblems === undefined &&\n (this.parent.business === null || this.parent.business === undefined)\n ) {\n return this.createError({\n path: \"proposalCustomerQuestions.customerExpectsAffordabilityProblems\",\n message: \"Customer needs to answer this question\",\n });\n }\n return true;\n }\n ),\n FORMSTATE_noQuotationResults: Yup.boolean().default(undefined).nullable(true),\n FORMSTATE_noQuotationResultsReasons: Yup.array()\n .of(Yup.string())\n .default(undefined)\n .nullable(true),\n});\n\nexport default proposalValidationSchema;\n","import * as React from \"react\";\nimport { Alert, Badge } from \"reactstrap\";\nimport { AlertsConsumer } from \"./AlertsProvider\";\nimport { AlertMessage } from \"./types\";\n\nexport const DismissableAlert = ({\n alert,\n removeAlert,\n fade\n}: {\n alert: AlertMessage;\n removeAlert?: () => void;\n fade?: boolean;\n}) => (\n \n \n {alert.title ?

{alert.title}

: null}\n {alert.color === \"danger\" && process.env.NODE_ENV === \"development\" ? (\n
{alert.message}
\n ) : (\n alert.message\n )}\n {alert.count && alert.count > 1 ? (\n \n {alert.count}\n \n ) : null}\n \n \n);\n\nconst Alerts = () => (\n \n {({ alerts, removeAlert }) => {\n return (\n
\n {alerts && alerts.length\n ? alerts.map(a => (\n removeAlert(a.id)}\n />\n ))\n : null}\n
\n );\n }}\n
\n);\n\nexport default Alerts;\n","import { FormikErrors, FormikTouched } from \"formik\";\nimport { isNumeric } from \"../../utils\";\n\n/**\n * Replaces all fields which have validation errors with provided default values\n * @param data Form data to be mutated\n * @param errors Formik errors object\n * @param defaults Default values to replace values with validation errors\n */\nexport const resetFieldsWithErrors = (\n data: any,\n errors: FormikErrors,\n defaults: any\n) => {\n Object.keys(data)\n .filter(k => errors.hasOwnProperty(k))\n .forEach(k => {\n const defaultValue =\n defaults && Array.isArray(defaults) && defaults.length\n ? defaults[0]\n : defaults && defaults[k];\n if (typeof errors[k] === \"object\") {\n resetFieldsWithErrors(\n data[k],\n errors[k] as FormikErrors,\n defaultValue\n );\n } else {\n data[k] = defaultValue;\n }\n });\n};\n\n/** Converts the touched fields object into an array of path strings, to be saved to the server */\nexport const serializeTouchedData = (\n obj: FormikTouched,\n parentPath?: string\n): string[] => {\n return Object.keys(obj).reduce(\n (accumulator, prop) => {\n const path = parentPath ? `${parentPath}.${prop}` : prop;\n const value = obj[prop];\n\n if (typeof value === \"object\") {\n return [\n ...accumulator,\n ...serializeTouchedData(value as FormikTouched, path)\n ];\n }\n return [...accumulator, path];\n },\n [] as string[]\n );\n};\n\n/** Converts an array of field paths from the server to a formik touched object */\nexport const hydrateTouchedData = (paths: string[]): FormikTouched => {\n const touched: FormikTouched = {};\n paths.forEach(path => {\n const pathArray = path.split(\".\");\n\n pathArray.reduce((obj, val, i) => {\n if (i === pathArray.length - 1) {\n obj[val] = true;\n return obj;\n }\n if (!obj[val]) {\n const valueIsArray =\n i < pathArray.length - 1 && isNumeric(pathArray[i + 1]);\n obj[val] = valueIsArray ? ([] as object) : {};\n }\n return obj[val] as FormikTouched;\n }, touched);\n });\n return touched;\n};\n","import * as Yup from \"yup\";\nimport { ProductTypeEnum } from \"../types\";\nimport { QuotationRequest } from \"./types\";\n\nconst isProductTypeWithBalloon = (p?: ProductTypeEnum[]) =>\n !!p && (p.includes(ProductTypeEnum.LP) || p.includes(ProductTypeEnum.PCP));\n\nconst quotationRequestValidator = Yup.object().shape({\n dealerId: Yup.number()\n .required()\n .nullable(true)\n .default(undefined),\n minTerm: Yup.number()\n .required()\n .moreThan(0)\n .max(120),\n maxTerm: Yup.number()\n .required()\n .moreThan(0)\n .max(120),\n productTypes: Yup.array()\n .ensure()\n .compact()\n .min(1, \"Product type is required\")\n .required(\"Product types are required\") as any,\n cAP: Yup.string()\n .nullable(true)\n .label(\"CAP\")\n .when(\"productTypes\", {\n is: isProductTypeWithBalloon,\n then: Yup.string().required()\n }),\n mileage: Yup.number()\n .nullable(true)\n .label(\"Mileage\")\n .when(\"productTypes\", {\n is: isProductTypeWithBalloon,\n then: Yup.number()\n .min(0)\n .required()\n }),\n maxAnnualMileage: Yup.number()\n .nullable(true)\n .label(\"Max annual mileage\")\n .when(\"productTypes\", {\n is: isProductTypeWithBalloon,\n then: Yup.number()\n .moreThan(0)\n .required()\n }),\n isNew: Yup.boolean()\n .nullable(true)\n .when(\"productTypes\", {\n is: isProductTypeWithBalloon,\n then: Yup.boolean().required()\n }),\n dateOfRegistration: Yup.date()\n .nullable(true)\n .when(\"productTypes\", {\n is: isProductTypeWithBalloon,\n then: Yup.date().required()\n }) as any,\n targetBy: Yup.string().required() as any,\n targetByValue: Yup.number()\n .moreThan(0)\n .required(),\n cashPrice: Yup.number()\n .moreThan(0)\n .required(),\n cashDeposit: Yup.number()\n .min(0)\n .required(),\n partExchange: Yup.number()\n .min(0)\n .required(),\n partExchangeSettlement: Yup.number()\n .min(0)\n .required(),\n extras: Yup.number()\n .min(0)\n .required(),\n rFL: Yup.number()\n .min(0)\n .nullable(true)\n});\n\nexport default quotationRequestValidator;\n","import { faEdit, faSpinner } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport * as React from \"react\";\nimport { Button } from \"reactstrap\";\nimport { FormSectionFooterProps } from \"./FormSectionFooter\";\nimport { CreateOrUpdateMode } from \"./MultiSectionForm\";\n\nexport const FormUpdateButtons = ({\n isSubmitting,\n createOrUpdate,\n isEditing,\n onIsEditingChanged,\n isSectionValid,\n canUpdate,\n}: FormSectionFooterProps) => {\n if (createOrUpdate === CreateOrUpdateMode.CREATE) {\n return null;\n }\n\n return isEditing ? (\n
\n \n \n {!isSectionValid && (\n

\n Error in this section\n

\n )}\n
\n ) : canUpdate !== false ? (\n onIsEditingChanged(true)}\n >\n \n Edit\n \n ) : null;\n};\n\nexport default FormUpdateButtons;\n","import React, { useState } from \"react\";\nimport CustomSelect from \"../../Forms/CustomSelect\";\nimport { useCountries, useCountry } from \"./CountryQuery\";\n\ninterface CountrySelectProps {\n countryId?: string;\n onSelectCountry: (countryId: string) => void;\n className?: string;\n}\n\nconst CountrySelect = ({\n countryId,\n onSelectCountry,\n className\n}: CountrySelectProps) => {\n const country = useCountry(countryId);\n const countries = useCountries();\n\n const [inputValue, setInputValue] = useState(\"\");\n\n const options = countries\n ? countries.map(({ id, name }) => ({ label: name, value: id }))\n : [];\n const selectedOption =\n countryId && country ? { value: country.id, label: country.name } : null;\n\n return (\n setInputValue(value)}\n options={options}\n onChange={(value: any) =>\n onSelectCountry(value ? value.value : undefined)\n }\n noOptionsMessage={() => (countries ? \"Loading...\" : \"No countries found\")}\n placeholder={countries ? \"Type to search countries\" : \"Loading...\"}\n autoFocus={false}\n isClearable={false}\n />\n );\n};\n\nexport default CountrySelect;\n","import gql from \"graphql-tag\";\nimport * as React from \"react\";\nimport { Query, QueryResult, useQuery } from \"react-apollo\";\n\nexport interface IndustryListData {\n industryList: string[];\n}\n\nexport const INDUSTRY_LIST = gql`\n query IndustryListQuery {\n industryList\n }\n`;\n\nconst IndustryListQuery = ({\n children,\n}: {\n children: (result: QueryResult) => JSX.Element | null;\n}) => query={INDUSTRY_LIST}>{children};\n\nexport const useIndustryList = () => {\n const { loading, data } = useQuery(INDUSTRY_LIST);\n\n return { loading, industryList: data };\n};\n\nexport default IndustryListQuery;\n","import { faSpinner } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { FieldProps } from \"formik\";\nimport gql from \"graphql-tag\";\nimport { assign } from \"lodash\";\nimport * as React from \"react\";\nimport { withApollo, WithApolloClient } from \"react-apollo\";\nimport { Button } from \"reactstrap\";\nimport { compose, onlyUpdateForKeys } from \"recompose\";\nimport { isNumeric } from \"../../../utils\";\nimport { Vehicle, VehicleTypeEnum } from \"../../Proposals/types\";\nimport { VehicleLookup } from \"../types\";\n\nconst GET_VEHICLE_LOOKUP = gql`\n query GetVehicleLookup($input: VehicleLookupArgsInput) {\n vehicles {\n vehicleLookup(input: $input) {\n make\n model\n capCode\n capId\n capDer\n regDate\n vIN\n colour\n doors\n engineSize\n fuel\n transmission\n lCV\n imported\n }\n }\n }\n`;\n\ntype VehicleLookupFieldProps = FieldProps<{ vehicle: Vehicle }> & {\n autoFocus?: boolean;\n};\n\nclass VehicleLookupField extends React.Component<\n WithApolloClient,\n { loading: boolean }\n> {\n constructor(props: WithApolloClient) {\n super(props);\n this.handleClick = this.handleClick.bind(this);\n this.updateVehicle = this.updateVehicle.bind(this);\n this.state = { loading: false };\n }\n\n public render() {\n const { field, form, autoFocus } = this.props;\n const errors = form.errors as any;\n const { loading } = this.state;\n const notFound =\n form.values.vehicle.regNo &&\n form.values.vehicle.regNo === form.values.vehicle.regNoNotFound;\n\n return (\n <>\n {\n if (e.key === \"Enter\") {\n e.preventDefault();\n this.handleClick();\n }\n }}\n />\n \n {loading ? (\n \n ) : null}\n Find vehicle\n \n {!loading &&\n !notFound &&\n !errors[field.name] &&\n errors.vehicle &&\n errors.vehicle.cAP ? (\n \n {'Click \"Find vehicle\" to get the details'}\n \n ) : null}\n \n );\n }\n\n private handleClick() {\n const { field, form, client } = this.props;\n const regNo = field.value;\n\n this.setState({ loading: true });\n\n client\n .query<{\n vehicles: { vehicleLookup: VehicleLookup };\n }>({\n query: GET_VEHICLE_LOOKUP,\n variables: {\n input: {\n regNo,\n },\n },\n })\n .then(({ data }) => {\n const vehicle = data && data.vehicles.vehicleLookup;\n this.updateVehicle(\n assign({}, vehicle, { regNoNotFound: vehicle ? \"\" : regNo })\n );\n form.setFieldTouched(\"vehicle.regNo\", true);\n form.setFieldTouched(\"vehicle.cAP\", true);\n })\n .finally(() => this.setState({ loading: false }));\n }\n\n private updateVehicle({\n capCode,\n capId,\n make,\n model,\n capDer,\n vIN,\n doors,\n engineSize,\n fuel,\n transmission,\n regDate,\n lCV,\n imported,\n }: Partial) {\n const { form } = this.props;\n\n const vehicle = {\n regNo: form.values.vehicle.regNo,\n cAP: capCode || undefined,\n capId: capId || undefined,\n make: make || undefined,\n model: model || undefined,\n derivative: capDer || undefined,\n vIN: vIN || undefined,\n doors: doors || null,\n engineSize: isNumeric(engineSize) ? parseFloat(engineSize || \"\") : null,\n fuel: fuel || undefined,\n transmission:\n transmission && [\"A\", \"M\", \"O\"].includes(transmission)\n ? transmission\n : undefined,\n dateOfRegistration: regDate || undefined,\n regNoNotFound: capCode ? undefined : form.values.vehicle.regNo,\n LCV: !!lCV,\n vehicleType: !!lCV ? VehicleTypeEnum.Van : VehicleTypeEnum.Car,\n imported,\n };\n\n const nextValues = {\n ...form.values,\n vehicle: assign({}, form.values.vehicle, vehicle),\n };\n\n form.setValues(nextValues);\n }\n}\n\nexport default compose<\n WithApolloClient,\n VehicleLookupFieldProps\n>(\n onlyUpdateForKeys([\"field\"]),\n withApollo\n)(VehicleLookupField);\n","import gql from \"graphql-tag\";\nimport * as React from \"react\";\nimport { Query, QueryResult } from \"react-apollo\";\nimport { DebounceKeys } from \"../../types\";\n\ninterface VehicleMakesData {\n vehicles: {\n vehicleMakes: {\n id: string;\n name: string;\n }[];\n };\n}\n\ninterface VehicleMakeArgs {\n isCommercial?: boolean;\n}\n\ninterface VehicleMakeVariables {\n input: VehicleMakeArgs;\n}\n\nconst VEHICLE_MAKES = gql`\n query VehicleMakesQuery($input: VehicleMakeArgsInput) {\n vehicles {\n vehicleMakes(input: $input) {\n id\n name\n }\n }\n }\n`;\n\nconst VehicleMakesQuery = ({\n children,\n isCommercial\n}: VehicleMakeArgs & {\n children: (\n result: QueryResult\n ) => JSX.Element | null;\n}) => {\n const variables: VehicleMakeVariables = {\n input: { isCommercial: !!isCommercial }\n };\n return (\n \n variables={variables}\n query={VEHICLE_MAKES}\n context={{\n debounceKey: DebounceKeys.VEHICLE_MAKES,\n debounceTimeout: 300\n }}\n >\n {children}\n \n );\n};\n\nexport default VehicleMakesQuery;\n","import { FieldProps } from \"formik\";\nimport * as React from \"react\";\nimport CustomSelect from \"../../Forms/CustomSelect\";\nimport { QuotationFormValues } from \"../types\";\nimport \"./index.scss\";\nimport VehicleMakesQuery from \"./VehicleMakesQuery\";\n\nconst VehicleMakeField = ({\n placeholder,\n ...props\n}: FieldProps & {\n placeholder?: string;\n}) => {\n const { form, field } = props;\n\n return (\n \n {({ loading, error, data }) => {\n const options =\n loading || !data\n ? []\n : data.vehicles.vehicleMakes.map((x) => ({\n value: x.id,\n label: x.name,\n }));\n\n return (\n {\n form.setFieldValue(field.name, (option as any).value);\n form.setFieldValue(\"vehicle.model\", undefined);\n }}\n onBlur={() => form.setFieldTouched(field.name, true)}\n options={options}\n />\n );\n }}\n \n );\n};\n\nexport default VehicleMakeField;\n","import gql from \"graphql-tag\";\nimport * as React from \"react\";\nimport { Query, QueryResult } from \"react-apollo\";\nimport { DebounceKeys } from \"../../types\";\n\ninterface VehicleModelsData {\n vehicles: {\n vehicleModels: {\n id: string;\n name: string;\n }[];\n };\n}\n\ninterface VehicleModelArgs {\n isCommercial?: boolean;\n make: string;\n}\n\ninterface VehicleModelVariables {\n input: VehicleModelArgs;\n}\n\nconst VEHICLE_MODELS = gql`\n query VehicleModelsQuery($input: VehicleModelArgsInput) {\n vehicles {\n vehicleModels(input: $input) {\n id\n name\n }\n }\n }\n`;\n\nconst VehicleModelsQuery = ({\n children,\n isCommercial,\n make\n}: VehicleModelArgs & {\n children: (\n result: QueryResult\n ) => JSX.Element | null;\n}) => (\n \n query={VEHICLE_MODELS}\n variables={{ input: { isCommercial: !!isCommercial, make } }}\n context={{ debounceKey: DebounceKeys.VEHICLE_MODELS, debounceTimeout: 300 }}\n >\n {children}\n \n);\n\nexport default VehicleModelsQuery;\n","import { FieldProps } from \"formik\";\nimport * as React from \"react\";\nimport CustomSelect from \"../../Forms/CustomSelect\";\nimport { QuotationFormValues } from \"../types\";\nimport \"./index.scss\";\nimport VehicleModelsQuery from \"./VehicleModelsQuery\";\n\nconst VehicleModelField = (props: FieldProps) => {\n const { form, field } = props;\n const make = form.values.vehicle.make;\n\n const Placeholder = () => (\n \n );\n\n return (\n <>\n {make ? (\n \n {({ loading, error, data }) => {\n const options =\n loading || !data\n ? []\n : data.vehicles.vehicleModels.map(x => ({\n value: x.id,\n label: x.name\n }));\n\n if (loading || !data) {\n return ;\n }\n\n return (\n option.value === field.value) || null\n }\n onChange={option => {\n form.setFieldValue(field.name, (option as any).value);\n form.setFieldValue(\"vehicle.derivative\", undefined);\n }}\n onBlur={() => form.setFieldTouched(field.name, true)}\n options={options}\n />\n );\n }}\n \n ) : (\n \n )}\n \n );\n};\n\nexport default VehicleModelField;\n","import gql from \"graphql-tag\";\nimport * as React from \"react\";\nimport { Query, QueryResult } from \"react-apollo\";\nimport { DebounceKeys } from \"../../types\";\n\ninterface VehicleStylesData {\n vehicles: {\n vehicleStyles: {\n id: string;\n name: string;\n }[];\n };\n}\n\ninterface VehicleStyleArgs {\n isCommercial?: boolean;\n make: string;\n model: string;\n}\n\ninterface VehicleStyleVariables {\n input: VehicleStyleArgs;\n}\n\nconst VEHICLE_STYLES = gql`\n query VehicleStylesQuery($input: VehicleStyleArgsInput) {\n vehicles {\n vehicleStyles(input: $input) {\n id\n name\n }\n }\n }\n`;\n\nconst VehicleStylesQuery = ({\n children,\n isCommercial,\n make,\n model\n}: VehicleStyleArgs & {\n children: (\n result: QueryResult\n ) => JSX.Element | null;\n}) => (\n \n query={VEHICLE_STYLES}\n variables={{ input: { isCommercial: !!isCommercial, make, model } }}\n context={{ debounceKey: DebounceKeys.VEHICLE_STYLES, debounceTimeout: 300 }}\n >\n {children}\n \n);\n\nexport default VehicleStylesQuery;\n","import { FieldProps } from \"formik\";\nimport * as React from \"react\";\nimport CustomSelect from \"../../Forms/CustomSelect\";\nimport { QuotationFormValues } from \"../types\";\nimport \"./index.scss\";\nimport VehicleStylesQuery from \"./VehicleStylesQuery\";\n\nexport const VehicleStyleField = (props: FieldProps) => {\n const { form, field } = props;\n const make = form.values.vehicle.make;\n const model = form.values.vehicle.model;\n\n const Placeholder = () => (\n \n );\n\n return (\n <>\n {make && model ? (\n \n {({ loading, error, data }) => {\n const options =\n loading || !data\n ? []\n : data.vehicles.vehicleStyles.map((x) => ({\n value: x.id,\n label: x.name,\n }));\n\n if (loading || !data) {\n return ;\n }\n\n return (\n option.value === field.value) || null\n }\n onChange={(option) => {\n form.setFieldValue(\n \"vehicle.derivative\",\n option ? (option as any).value || null : null\n );\n form.setFieldValue(\"vehicle.cAP\", null);\n }}\n onBlur={() => form.setFieldTouched(field.name, true)}\n options={options}\n />\n );\n }}\n \n ) : (\n \n )}\n \n );\n};\n\nexport default VehicleStyleField;\n","import { differenceInCalendarMonths, parse, subMonths } from \"date-fns\";\nimport { FieldProps } from \"formik\";\nimport * as React from \"react\";\nimport { Col, InputGroup, InputGroupAddon } from \"reactstrap\";\nimport FormGroupWrapper from \"../../Forms/FormGroupWrapper\";\n\nconst getDateOfRegistration = (ageInMonths: number) => {\n if (ageInMonths || ageInMonths === 0) {\n const now = new Date();\n const firstDayOfMonth = new Date(now.getFullYear(), now.getMonth(), 1);\n return subMonths(firstDayOfMonth, ageInMonths);\n }\n return null;\n};\n\nconst getAgeInMonths = (dateOfRegistration: string) => {\n if (dateOfRegistration) {\n const date = parse(dateOfRegistration);\n const now = new Date();\n const firstDayOfMonth = new Date(now.getFullYear(), now.getMonth(), 1);\n\n return differenceInCalendarMonths(firstDayOfMonth, date);\n }\n return null;\n};\n\nconst AgeInMonthsField = ({\n field,\n form,\n title,\n colSize\n}: FieldProps & { title: string; colSize?: number }) => {\n const ageInMonths = getAgeInMonths(field.value);\n\n const handleChange = (e: any) => {\n const num = e.target.value ? parseFloat(e.target.value) : null;\n let date: Date | null = null;\n if (num || num === 0) {\n date = getDateOfRegistration(num);\n }\n form.setFieldValue(field.name, date ? date.toISOString() : null);\n form.setFieldTouched(field.name, true);\n };\n\n return (\n \n \n \n \n Months\n \n \n \n );\n};\n\nexport default AgeInMonthsField;\n","import classnames from \"classnames\";\nimport { Field, FieldProps, FormikProps } from \"formik\";\nimport * as React from \"react\";\nimport { Col, FormGroup, Row } from \"reactstrap\";\nimport { compose, onlyUpdateForKeys } from \"recompose\";\nimport { getSingleLineVehicle } from \"../../../utils\";\nimport FormFieldWrapper from \"../../Forms/FormFieldWrapper\";\nimport FormInputField from \"../../Forms/FormInputField\";\nimport RadioField from \"../../Forms/RadioField\";\nimport SelectField from \"../../Forms/SelectField\";\nimport VehicleLookupField from \"../../Quotations/QuotationForm/VehicleLookupField\";\nimport VehicleMakeField from \"../../Quotations/QuotationForm/VehicleMakeField\";\nimport VehicleModelField from \"../../Quotations/QuotationForm/VehicleModelField\";\nimport VehicleStyleField from \"../../Quotations/QuotationForm/VehicleStyleField\";\nimport { ContextNames } from \"../../types\";\nimport { Proposal, Vehicle, VehicleTypeEnum } from \"../types\";\nimport AgeInMonthsField from \"./AgeInMonthsField\";\n\nconst vehicleTypeOptions: { label: any; value: any }[] = Object.values(\n VehicleTypeEnum\n).map((x) => ({\n label: x,\n value: x,\n}));\n\ntype VehicleSectionProps = FormikProps<{ vehicle: Vehicle }> & {\n autoFocus?: boolean;\n context?: ContextNames;\n};\n\nconst VehicleRegistrationField = (fieldProps: FieldProps) => (\n \n \n \n);\n\nclass VehicleSection extends React.Component {\n public render() {\n const { setFieldValue, autoFocus, values, context } = this.props;\n const isRegKnown = !values.vehicle.isRegUnknown;\n\n const {\n vehicle: { regNo, cAP, make, model, vatQualifying, vehicleType, isNew },\n } = this.props.values;\n\n return (\n <>\n \n \n \n \n \n \n {isRegKnown ? (\n <>\n \n \n \n \n \n \n

\n {(regNo || \"\").toUpperCase()}\n

\n

{getSingleLineVehicle(values.vehicle)}

\n
\n \n
\n \n \n {regNo && cAP ? (\n <>\n {\n e.preventDefault();\n\n [\n \"vehicle.regNo\",\n \"vehicle.make\",\n \"vehicle.model\",\n \"vehicle.derivative\",\n \"vehicle.cAP\",\n \"vehicle.capId\",\n ].map((x) => setFieldValue(x, null));\n\n setFieldValue(\"vehicle.dateOfRegistration\", null);\n }}\n >\n Clear registration\n \n {!!isNew && \" | \"}\n \n ) : null}\n\n {!!isNew && context !== ContextNames.QUOTATION_FORM && (\n {\n e.preventDefault();\n\n [\n \"vehicle.regNo\",\n \"vehicle.make\",\n \"vehicle.model\",\n \"vehicle.derivative\",\n \"vehicle.cAP\",\n \"vehicle.capId\",\n ].map((x) => setFieldValue(x, null));\n\n setFieldValue(\"vehicle.dateOfRegistration\", null);\n setFieldValue(\"vehicle.isRegUnknown\", true);\n }}\n >\n Enter vehicle details manually...\n \n )}\n \n \n \n ) : (\n <>\n {vehicleType !== VehicleTypeEnum.Motorhome ? (\n <>\n \n \n \n \n (\n \n \n \n )}\n />\n \n \n (\n \n \n \n )}\n make={make}\n />\n \n \n (\n \n \n \n )}\n make={make}\n model={model}\n />\n \n \n \n \n \n ) : (\n <>\n \n \n \n \n \n \n \n \n \n \n \n \n \n )}\n \n \n {\n e.preventDefault();\n [\n \"vehicle.make\",\n \"vehicle.model\",\n \"vehicle.derivative\",\n \"vehicle.cAP\",\n \"vehicle.capId\",\n ].map((x) => setFieldValue(x, \"\"));\n setFieldValue(\"vehicle.isRegUnknown\", false);\n }}\n >\n Find vehicle by registration...\n \n \n \n \n )}\n <>\n \n \n
\n {\n this.props.setFieldValue(\n \"vehicle.vatQualifying\",\n e.target.checked\n );\n }}\n />\n \n VAT Qualifying\n \n
\n \n
\n \n \n \n \n \n \n \n \n );\n }\n}\n\nexport default compose(\n onlyUpdateForKeys([\"values\"])\n)(VehicleSection);\n","import classnames from \"classnames\";\nimport * as React from \"react\";\nimport { formatCurrency } from \"../../utils\";\nimport \"./InformationTable.scss\";\n\nexport const InformationTableRow = (props: {\n title: string;\n value?: any;\n valueHighlighted?: boolean;\n valueAlignRight?: boolean;\n}) =>\n props.value || props.value === 0 ? (\n <>\n \n {props.title}\n \n {props.value}\n \n \n \n ) : null;\n\nexport const CurrencyRow = ({\n title,\n value,\n highlighted\n}: {\n title: string;\n value?: number;\n highlighted?: boolean;\n}) => (\n \n);\n\nconst InformationTable = ({\n title,\n children\n}: {\n title?: string;\n children: React.ReactNode;\n}) => {\n return (\n <>\n
\n \n {title ? {title} : null}\n {children}\n \n
\n \n );\n};\n\nexport default InformationTable;\n","import { Field } from \"formik\";\nimport React from \"react\";\nimport { Col, Label, Row } from \"reactstrap\";\nimport AddressFormSection from \"../../AddressLookup/AddressFormSection\";\nimport FormInputField from \"../../Forms/FormInputField\";\nimport { FormSectionProps, WatchFields } from \"../../Forms/MultiSectionForm\";\nimport RadioField from \"../../Forms/RadioField\";\nimport SelectField from \"../../Forms/SelectField\";\nimport IndustryListQuery from \"../IndustryListQuery\";\nimport { BusinessType, BusinessTypeLookup, Proposal } from \"../types\";\nimport DateSelectRow from \"./DateSelectRow\";\n\nconst businessTypeOptions = Object.keys(BusinessType).map((x) => ({\n label: BusinessTypeLookup[x as BusinessType],\n value: x,\n}));\n\nexport const businessDetailsWatchFields: WatchFields = {\n business: {\n name: true,\n natureOfBusiness: true,\n contactName: true,\n contactPosition: true,\n businessType: true,\n otherBusinessType: true,\n registrationNumber: true,\n established: true,\n address: {\n line1: true,\n line2: true,\n line3: true,\n town: true,\n county: true,\n postcode: true,\n countryId: true,\n },\n yearsAtAddress: true,\n monthsAtAddress: true,\n },\n};\n\nclass BusinessDetailsSection extends React.Component<\n FormSectionProps\n> {\n public render() {\n const { navigateToSection, ...formikProps } = this.props;\n const { business } = this.props.values;\n\n return (\n <>\n \n \n \n \n {({ data }) => {\n const industryOptions =\n data && data.industryList\n ? data.industryList.map((i) => ({\n label: i,\n value: i,\n }))\n : [];\n return (\n \n \n \n );\n }}\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {business.businessType !== BusinessType.LLP && (\n \n \n \n )}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n }\n}\n\nexport default BusinessDetailsSection;\n","import gql from \"graphql-tag\";\nimport { useQuery } from \"react-apollo\";\n\nconst GET_COUNTRY = gql`\n query GetCountry($id: ID!) {\n country(id: $id) {\n id\n name\n }\n }\n`;\n\nconst GET_COUNTRIES = gql`\n query GetCountries {\n countries {\n id\n name\n }\n }\n`;\n\ninterface Country {\n id: string;\n name: string;\n}\n\nexport const useCountry = (id?: string) => {\n const { data } = useQuery<{ country: Country }, { id?: string }>(\n GET_COUNTRY,\n {\n variables: { id },\n skip: !id\n }\n );\n\n return data?.country;\n};\n\nexport const useCountries = () => {\n const { data } = useQuery<{ countries: Country[] }>(GET_COUNTRIES);\n\n return data?.countries;\n};\n","import classnames from \"classnames\";\nimport { Field, FieldProps } from \"formik\";\nimport * as React from \"react\";\nimport { Col } from \"reactstrap\";\nimport FormGroupWrapper from \"./FormGroupWrapper\";\nimport \"./formstyles.scss\";\n\nconst CheckboxField = ({\n name,\n description,\n options,\n title,\n colSize,\n vertical,\n readOnly\n}: {\n name: string;\n description?: string;\n title?: string;\n colSize?: number;\n options: { label: any; value: any }[];\n vertical?: boolean;\n readOnly?: boolean;\n}) => (\n \n {({ form, field }: FieldProps) => (\n <>\n \n \n
\n {options.map(opt => (\n \n {\n let nextValue: string[];\n if (field.value.includes(opt.value)) {\n nextValue = (field.value as string[]).filter(\n value => value !== opt.value\n );\n form.setFieldValue(field.name, nextValue);\n } else {\n nextValue = field.value.concat(opt.value);\n form.setFieldValue(name, nextValue);\n }\n form.setFieldTouched(field.name, true);\n }}\n />\n \n {opt.label}\n \n
\n ))}\n \n \n \n \n )}\n
\n);\n\nexport default CheckboxField;\n","import { faExclamationTriangle } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { Field, FieldProps, FormikProps } from \"formik\";\nimport * as React from \"react\";\nimport { Alert, Col, Label, Row } from \"reactstrap\";\nimport {\n capitalizeFirstLettersOnly,\n formatEnumValue,\n getFullName,\n} from \"../../../utils\";\nimport FormInputField from \"../../Forms/FormInputField\";\nimport { WatchFields } from \"../../Forms/MultiSectionForm\";\nimport RadioField from \"../../Forms/RadioField\";\nimport CountryField from \"../../Settings/Countries/CountryField\";\nimport {\n DrivingLicense,\n DrivingLicenseLookup,\n MaritalStatus,\n Proposal,\n} from \"../types\";\nimport DateSelectRow from \"./DateSelectRow\";\nimport TitleSelectField from \"./TitleSelectField\";\nimport { ContextNames } from \"../../types\";\n\nconst maritalStatusOptions = Object.keys(MaritalStatus).map((x) => ({\n label: formatEnumValue(x),\n value: x,\n}));\n\nconst drivingLicenseOptions = Object.keys(DrivingLicenseLookup).map((x) => ({\n label: DrivingLicenseLookup[x as DrivingLicense].description,\n value: x,\n}));\n\nexport const individualCustomerWatchFields: WatchFields = {\n individualCustomer: {\n title: true,\n forename: true,\n middleName: true,\n surname: true,\n dOB: true,\n maritalStatus: true,\n drivingLicense: true,\n mobile: true,\n email: true,\n countryOfBirthId: true,\n nationalityId: true,\n countryOfResidenceId: true,\n },\n proposalCustomerQuestions: {\n customerHasHadFinanceBefore: true,\n },\n};\n\nconst containsAllCaps = (props: any) =>\n [\"title\", \"forename\", \"middleName\", \"surname\"].some(\n (x) =>\n props[x] && props[x].length > 1 && props[x].toUpperCase() === props[x]\n );\n\nconst shouldShowCustomerNameWarning = (proposal: Proposal) => {\n const fullName = getFullName(proposal.individualCustomer);\n const fullNameProperCase = fullName\n ? capitalizeFirstLettersOnly(fullName)\n : undefined;\n const allCaps = containsAllCaps(proposal.individualCustomer);\n\n return fullName && (fullNameProperCase !== fullName || allCaps);\n};\n\nconst IndividualCustomerSection = (\n props: FormikProps & { context?: ContextNames }\n) => {\n return (\n <>\n \n \n \n \n \n \n \n \n {props.context === ContextNames.DIRECT_DEAL ? (\n

\n Make sure to add a middle name if you have one.\n

\n ) : (\n

\n Make sure to add a middle name if the customer has one.\n

\n )}\n\n

\n The customer name should be the same as it appears on the driving\n license or passport to successfully complete e-sign.\n

\n\n {shouldShowCustomerNameWarning(props.values) ? (\n

\n \n The name should use Title Case, with capital letters only at the start\n of each name.\n

\n ) : null}\n\n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {props.values.proposalCustomerQuestions.customerPresent && (\n \n \n \n {({ field, form }: FieldProps) => (\n \n

Customer question

\n \n \n \n \n \n \n {field.value === false ? (\n

\n Please ensure you explain the responsibilities of a\n secured finance agreement to the customer\n

\n ) : null}\n \n )}\n
\n \n
\n )}\n \n );\n};\n\nexport default IndividualCustomerSection;\n","import { faEnvelope } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport querystring from \"query-string\";\nimport React from \"react\";\nimport { Button } from \"reactstrap\";\n\ninterface MailtoProps {\n to?: string;\n cc?: string;\n bcc?: string;\n subject?: string;\n body?: string;\n}\n\ninterface EmailButtonProps extends MailtoProps {\n buttonText: string;\n className?: string;\n outline?: boolean;\n disabled?: boolean;\n}\n\nconst buildMailtoUrl = ({ to, body, ...querystringProps }: MailtoProps) => {\n let url: string | undefined;\n if (to) {\n url = `mailto:${encodeURIComponent(to)}`;\n\n let qs = querystring.stringify(querystringProps);\n\n // Special case for the body, because url encoding mangles line breaks\n if (body) {\n let safeBody = encodeURIComponent(body);\n // Replace url encoded /n with %0D%0A, to make line breaks work\n safeBody = safeBody.replace(/%2Fn/g, \"%0D%0A\");\n qs = qs ? `${qs}&body=${safeBody}` : `body=${safeBody}`;\n }\n\n if (qs) {\n url = `${url}?${qs}`;\n }\n }\n return url;\n};\n\nexport const EmailButton = ({\n buttonText,\n className,\n outline,\n disabled,\n ...mailtoProps\n}: EmailButtonProps) => {\n const url = buildMailtoUrl(mailtoProps);\n\n return (\n \n \n {buttonText}\n \n );\n};\n\nexport default EmailButton;\n","import classnames from \"classnames\";\nimport { Field, FormikProps } from \"formik\";\nimport * as React from \"react\";\nimport { Alert, Button, Col, FormGroup, Row } from \"reactstrap\";\nimport { getSingleLineVehicle } from \"../../../utils\";\nimport BooleanCheckboxField from \"../../Forms/BooleanCheckboxField\";\nimport FormInputField from \"../../Forms/FormInputField\";\nimport { WatchFields } from \"../../Forms/MultiSectionForm\";\nimport RadioField from \"../../Forms/RadioField\";\nimport { Proposal } from \"../types\";\nimport ProposalFormClearQuotation from \"./ProposalFormClearQuotation\";\nimport ProposalQuestion from \"./ProposalQuestion\";\nimport VehicleSection from \"./VehicleSection\";\nimport { ContextNames } from \"../../types\";\n\nexport const proposalVehicleSectionWatchFields: WatchFields = {\n proposalCustomerQuestions: {\n customerAnnualMileageRealistic: true,\n },\n vehicle: {\n regNo: true,\n dateOfRegistration: true,\n isNew: true,\n cAP: true,\n capId: true,\n make: true,\n model: true,\n derivative: true,\n bodyStyle: true,\n colour: true,\n vIN: true,\n doors: true,\n engineSize: true,\n fuel: true,\n transmission: true,\n insuranceGroup: true,\n mileage: true,\n maxAnnualMileage: true,\n isCommercial: true,\n vatQualifying: true,\n isRegUnknown: true,\n skipVehicle: true,\n regNoNotFound: true,\n vehicleType: true,\n },\n};\n\nconst VehicleSummary = (\n formikProps: FormikProps & { context?: ContextNames }\n) => {\n const {\n values: { vehicle },\n context,\n } = formikProps;\n return (\n <>\n {context !== ContextNames.DIRECT_DEAL && (\n \n Vehicle details are fixed for the finance quotation{\" \"}\n \n {({ clearQuotation }) => (\n \n Clear quotation and edit vehicle\n \n )}\n \n \n )}\n \n \n \n {vehicle.regNo ? (\n

\n {vehicle.regNo.toUpperCase()}\n

\n ) : null}\n

{getSingleLineVehicle(vehicle)}

\n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nconst ProposalVehicleSection = (\n props: FormikProps & { context?: ContextNames }\n) => {\n const {\n values: {\n quotationId,\n proposalCustomerQuestions: { customerPresent },\n },\n } = props;\n\n return (\n <>\n {quotationId ? (\n \n ) : (\n \n )}\n {customerPresent && (\n \n )}\n \n );\n};\n\nexport default ProposalVehicleSection;\n","import { Field, FieldProps } from \"formik\";\nimport * as React from \"react\";\nimport { InputGroup, InputGroupAddon } from \"reactstrap\";\nimport { roundNumber } from \"../../utils\";\nimport FormFieldWrapper from \"./FormFieldWrapper\";\n\nconst ReadOnlyNumberField = ({\n name,\n title,\n colSize,\n units,\n unitsPosition\n}: {\n name: string;\n title: string;\n colSize: number;\n units?: string;\n unitsPosition?: string;\n}) => (\n \n {({ field, form }: FieldProps) => {\n const input = (\n \n );\n return (\n \n {units ? (\n \n {unitsPosition === \"before\" ? (\n {units}\n ) : null}\n {input}\n {unitsPosition === \"after\" ? (\n {units}\n ) : null}\n \n ) : (\n input\n )}\n \n );\n }}\n \n);\n\nexport default ReadOnlyNumberField;\n","import gql from \"graphql-tag\";\nimport * as React from \"react\";\nimport { Mutation, MutationFunction, MutationResult } from \"react-apollo\";\nimport { QuotationFragment } from \"./fragments\";\nimport { Quotation, QuotationVariables, UnableToQuote } from \"./types\";\n\nexport interface TryCreateQuotationData {\n tryCreateQuotation: {\n quotation?: Quotation;\n unableToQuote?: UnableToQuote;\n };\n}\nexport interface TryCreateMannIslandQuotationData {\n tryCreateMannIslandQuotation: {\n quotation?: Quotation;\n unableToQuote?: UnableToQuote;\n };\n}\n\nexport const TRY_CREATE_QUOTATION = gql`\n mutation TryCreateQuotation($input: QuotationInput) {\n tryCreateQuotation(input: $input) {\n quotation {\n ...QuotationFragment\n }\n unableToQuote {\n term\n productType\n messages\n }\n }\n }\n ${QuotationFragment}\n`;\n\nexport const TRY_CREATE_INCOMPLETE_QUOTATION = gql`\n mutation TryCreateIncompleteQuotation($input: QuotationInput) {\n tryCreateIncompleteQuotation(input: $input) {\n quotation {\n ...QuotationFragment\n }\n unableToQuote {\n term\n productType\n messages\n }\n }\n }\n ${QuotationFragment}\n`;\n\nexport const TRY_CREATE_MANN_ISLAND_QUOTATION = gql`\n mutation TryCreateMannIslandQuotation($input: QuotationInput) {\n tryCreateMannIslandQuotation(input: $input) {\n quotation {\n ...QuotationFragment\n }\n unableToQuote {\n term\n productType\n messages\n }\n }\n }\n ${QuotationFragment}\n`;\n\nconst TryCreateQuotationMutation = ({\n children,\n}: {\n children: (\n mutationFunction: MutationFunction<\n TryCreateQuotationData,\n QuotationVariables\n >,\n result: MutationResult\n ) => JSX.Element | null;\n}) => {children};\n\nexport const TryCreateMannIslandQuotationMutation = ({\n children,\n}: {\n children: (\n mutationFunction: MutationFunction<\n TryCreateMannIslandQuotationData,\n QuotationVariables\n >,\n result: MutationResult\n ) => JSX.Element | null;\n}) => (\n {children}\n);\n\nexport default TryCreateQuotationMutation;\n","import { FormikProps } from \"formik\";\nimport * as React from \"react\";\nimport { withApollo, WithApolloClient } from \"react-apollo\";\nimport { cleanFormData } from \"../../../utils\";\nimport quotationValidationSchema from \"../../Quotations/QuotationForm/quotationValidationSchema\";\nimport {\n TRY_CREATE_QUOTATION,\n TRY_CREATE_INCOMPLETE_QUOTATION,\n TryCreateQuotationData,\n TRY_CREATE_MANN_ISLAND_QUOTATION,\n TryCreateMannIslandQuotationData,\n} from \"../../Quotations/TryCreateQuotationMutation\";\nimport {\n Quotation,\n QuotationTargetBy,\n QuotationVariables,\n} from \"../../Quotations/types\";\nimport { Proposal, ProposalFinance } from \"../types\";\n\ninterface ProposalFormQuotationCalculatorProps {\n children: (props: {\n canCreateQuotation: boolean;\n createQuotation: () => void;\n createIncompleteQuotation: () => void;\n loading: boolean;\n }) => JSX.Element | null;\n}\n\nconst financeFields: (keyof ProposalFinance)[] = [\n \"monthlyPayment\",\n \"rate\",\n \"aprRate\",\n \"balloonPayment\",\n \"acceptanceFee\",\n \"optionFee\",\n];\n\nclass ProposalFormQuotationCalculator extends React.Component<\n WithApolloClient<\n ProposalFormQuotationCalculatorProps & FormikProps\n >,\n { loading: boolean }\n> {\n public constructor(props: any) {\n super(props);\n this.getQuotation = this.getQuotation.bind(this);\n this.cleanQuotation = this.cleanQuotation.bind(this);\n this.state = { loading: false };\n }\n\n public render() {\n const { children, ...formikProps } = this.props;\n const { loading } = this.state;\n\n const quotation = this.getQuotation(formikProps.values);\n const { finance, quotationId } = formikProps.values;\n const isMannIslandDealer = !!formikProps.values.dealer?.isMannIslandDealer;\n\n const hasFinanceValues = financeFields.every(\n (x) => !!finance[x] || finance[x] === 0\n );\n\n const canCreateQuotation =\n !quotationId &&\n hasFinanceValues &&\n quotationValidationSchema.isValidSync(quotation);\n\n return children({\n loading,\n canCreateQuotation,\n createQuotation: () =>\n canCreateQuotation\n ? this.createQuotation(quotation, formikProps, isMannIslandDealer)\n : undefined,\n createIncompleteQuotation: () =>\n !canCreateQuotation\n ? this.createIncompleteQuotation(\n quotation,\n formikProps,\n isMannIslandDealer\n )\n : undefined,\n });\n }\n\n /** Get the variables required for getting a quotation from the server */\n private getQuotation(proposal: Proposal): Quotation {\n let { dealerId, targetBy, individualCustomer, dealer = null } = proposal;\n\n dealerId == null && (dealerId = dealer?.id);\n targetBy == null && (targetBy = QuotationTargetBy.APR_RATE);\n let targetByValue = this.getTargetValue(proposal);\n\n const {\n period,\n productType,\n cashPrice,\n cashDeposit,\n partExchange,\n partExchangeSettlement,\n } = proposal.finance;\n\n const vehicle = cleanFormData(proposal.vehicle);\n\n const quotation = {\n dealerId,\n title: individualCustomer ? individualCustomer.title : undefined,\n forename: individualCustomer ? individualCustomer.forename : undefined,\n surname: individualCustomer ? individualCustomer.surname : undefined,\n finance: {\n productType,\n term: period,\n cashPrice,\n deposit: cashDeposit,\n partExchangeSettlement,\n partExchangeValue: partExchange,\n },\n skipVehicle: false,\n vehicle,\n targetBy,\n targetByValue,\n isHidden: true,\n };\n\n return quotation;\n }\n\n private getTargetValue(proposal: Proposal): number | undefined {\n var targetByValue = proposal.targetByValue;\n targetByValue == null && (targetByValue = proposal?.dealer?.agreedApr);\n targetByValue == null && (targetByValue = proposal?.finance?.aprRate);\n\n return targetByValue;\n }\n\n /** Get finance values from the server in response to changes in the form */\n private createQuotation(\n quotation: Quotation,\n formikProps: FormikProps,\n isMannIslandDealer: boolean | undefined\n ) {\n const { client } = this.props;\n const { touched, setFieldValue, setFieldTouched } = formikProps;\n\n const updateField = (field: string, value?: number | null) => {\n setFieldValue(field as any, value, false);\n setFieldTouched(field as any, true, false);\n };\n\n const clearFields = () => {\n financeFields.forEach((x) => updateField(`finance.${x}`, null));\n updateField(\"quotationId\", null);\n };\n\n const isValid = quotationValidationSchema.isValidSync(quotation);\n\n if (isValid) {\n this.setState({ loading: true });\n\n const callClient = async (isMannIslandDealer: boolean | undefined) => {\n if (isMannIslandDealer) {\n return client.mutate<\n TryCreateMannIslandQuotationData,\n QuotationVariables\n >({\n mutation: TRY_CREATE_MANN_ISLAND_QUOTATION,\n variables: {\n input: this.cleanQuotation(quotation, isMannIslandDealer),\n },\n });\n } else {\n return client.mutate({\n mutation: TRY_CREATE_QUOTATION,\n variables: { input: this.cleanQuotation(quotation) },\n });\n }\n };\n\n callClient(isMannIslandDealer)\n .then(({ data }: any) => {\n let result = data && data.tryCreateQuotation;\n if (isMannIslandDealer) {\n result = data && data.tryCreateMannIslandQuotation;\n }\n const created = result && result.quotation;\n const unableToQuote = result && result.unableToQuote;\n\n if (created) {\n updateField(\n \"finance.monthlyPayment\",\n created.finance.monthlyPayment\n );\n updateField(\"finance.rate\", created.finance.flatRate);\n updateField(\"finance.aprRate\", created.finance.aprRate);\n updateField(\n \"finance.balloonPayment\",\n created.finance.guaranteedFutureValue\n );\n updateField(\n \"finance.acceptanceFee\",\n created.finance.arrangementFee\n );\n updateField(\"finance.optionFee\", created.finance.completionFee);\n updateField(\"quotationId\", created.id);\n } else {\n clearFields();\n }\n\n setFieldValue(\"FORMSTATE_requiresQuotation\" as any, true, false);\n setFieldValue(\"FORMSTATE_noQuotationResults\", !created, false);\n\n setFieldValue(\n \"FORMSTATE_noQuotationResultsReasons\",\n unableToQuote ? unableToQuote.messages : null,\n false\n );\n\n this.setState({ loading: false });\n })\n .then(() => formikProps.validateForm());\n } else {\n setFieldValue(\"FORMSTATE_noQuotationResults\", false, false);\n setFieldValue(\"FORMSTATE_noQuotationResultsReasons\", null, false);\n if (touched && touched.finance) {\n clearFields();\n }\n }\n }\n\n private createIncompleteQuotation(\n quotation: Quotation,\n formikProps: FormikProps,\n isMannIslandDealer: boolean | undefined\n ) {\n const { client } = this.props;\n const { touched, setFieldValue, setFieldTouched } = formikProps;\n\n const updateField = (field: string, value?: number | null) => {\n setFieldValue(field as any, value, false);\n setFieldTouched(field as any, true, false);\n };\n\n const clearFields = () => {\n financeFields.forEach((x) => updateField(`finance.${x}`, null));\n updateField(\"quotationId\", null);\n };\n\n const isValid = quotationValidationSchema.isValidSync(quotation);\n\n if (isValid) {\n this.setState({ loading: true });\n\n const callClient = async (isMannIslandDealer: boolean | undefined) => {\n return client.mutate({\n mutation: TRY_CREATE_INCOMPLETE_QUOTATION,\n variables: { input: this.cleanQuotation(quotation) },\n });\n };\n\n callClient(isMannIslandDealer)\n .then(({ data }: any) => {\n let result = data && data.tryCreateIncompleteQuotation;\n const created = result && result.quotation;\n const unableToQuote = result && result.unableToQuote;\n\n if (created) {\n updateField(\n \"finance.monthlyPayment\",\n created.finance.monthlyPayment\n );\n updateField(\"finance.rate\", created.finance.flatRate);\n updateField(\"finance.aprRate\", created.finance.aprRate);\n updateField(\n \"finance.balloonPayment\",\n created.finance.guaranteedFutureValue\n );\n updateField(\n \"finance.acceptanceFee\",\n created.finance.arrangementFee\n );\n updateField(\"finance.optionFee\", created.finance.completionFee);\n updateField(\"quotationId\", created.id);\n } else {\n clearFields();\n }\n\n setFieldValue(\"FORMSTATE_requiresQuotation\" as any, true, false);\n setFieldValue(\"FORMSTATE_noQuotationResults\", !created, false);\n\n setFieldValue(\n \"FORMSTATE_noQuotationResultsReasons\",\n unableToQuote ? unableToQuote.messages : null,\n false\n );\n\n this.setState({ loading: false });\n })\n .then(() => formikProps.validateForm());\n } else {\n setFieldValue(\"FORMSTATE_noQuotationResults\", false, false);\n setFieldValue(\"FORMSTATE_noQuotationResultsReasons\", null, false);\n if (touched && touched.finance) {\n clearFields();\n }\n }\n }\n\n private cleanQuotation(\n formData: Quotation,\n isMannIslandDealer: boolean | undefined = undefined\n ) {\n const quotation: Quotation = cleanFormData(formData);\n\n if (quotation.vehicle) {\n delete quotation.vehicle.isRegUnknown;\n delete quotation.vehicle.skipVehicle;\n delete quotation.vehicle.regNoNotFound;\n delete quotation.vehicle.LCV;\n if (!isMannIslandDealer) {\n delete quotation.vehicle.imported;\n }\n }\n\n return quotation;\n }\n}\n\nexport default withApollo<\n ProposalFormQuotationCalculatorProps & FormikProps\n>(ProposalFormQuotationCalculator);\n","import { FormikProps } from \"formik\";\nimport * as React from \"react\";\nimport { Proposal } from \"../types\";\nimport {\n QuotationListResult,\n QuotationResults,\n QuotationTargetBy,\n} from \"../../Quotations/types\";\nimport { QuotationResultListItemProps } from \"../../Quotations/QuotationForm/QuotationResultList\";\nimport { getLowestPayment } from \"../../Quotations/QuotationForm/MultiQuoteResultTable\";\nimport { useEffect, useState } from \"react\";\nimport { Badge, Col, Row } from \"reactstrap\";\nimport FlipMove from \"react-flip-move\";\nimport { formatCurrency } from \"../../../utils\";\n\ninterface ProposalMultiQuoteResultProps {\n loading?: boolean;\n multiQuoteResult?: QuotationListResult;\n targetBy?: QuotationTargetBy;\n onSelectResult: (result: QuotationResults | null) => void;\n}\n\nconst ProposalMultiQuoteRow = ({\n result: {\n finance,\n arrangementFee,\n completionFee,\n interestCharges,\n term,\n monthlyPayment,\n aprRate,\n commissionCode,\n lenderName,\n },\n lowestProductPayment,\n showCommission,\n targetBy,\n}: QuotationResultListItemProps) => (\n <>\n \n
{lenderName}
\n \n \n
\n Monthly Payment: {formatCurrency(monthlyPayment)}\n
\n\n

\n Total Amount Payable:{\" \"}\n {formatCurrency(\n finance + arrangementFee + completionFee + interestCharges\n )}\n

\n

Term {term} months

\n
\n APR {(Math.round(aprRate * 100) / 100).toFixed(2)}%\n
\n
\n {monthlyPayment === lowestProductPayment &&\n targetBy !== QuotationTargetBy.MONTHLY_PAYMENT ? (\n \n {\" \"}\n Lowest\n \n ) : null}\n
\n {showCommission && (\n

\n {commissionCode}\n

\n )}\n \n \n);\n\nconst ProposalMultiQuoteResult = ({\n loading,\n multiQuoteResult,\n targetBy,\n props,\n onSelectResult,\n}: ProposalMultiQuoteResultProps & { props: FormikProps }) => {\n const { values } = props;\n const results = multiQuoteResult?.results;\n\n let filteredByTermResults = results?.filter(\n (x) => x.term === values.finance.period\n );\n\n const NoItemsPlaceholder = () => (\n
No results found
\n );\n\n const productTypes = [\"LP\", \"HP\", \"PCP\"];\n\n const lowestPayment = productTypes.map((p) => {\n return getLowestPayment(\n filteredByTermResults?.filter((r) => r.productType === p)\n );\n });\n\n const sortByNameDesc = (a: QuotationResults, b: QuotationResults) => {\n let textA = a.lenderName?.toUpperCase() || \"\";\n let textB = b.lenderName?.toUpperCase() || \"\";\n return textA < textB ? 1 : textA > textB ? -1 : 0;\n };\n\n const sortByLowest = (a: QuotationResults, b: QuotationResults) => {\n return (\n lowestPayment.indexOf(b.monthlyPayment) -\n lowestPayment.indexOf(a.monthlyPayment)\n );\n };\n\n const [activeIndex, setActiveIndex] = useState(-1);\n\n useEffect(() => {\n setActiveIndex(-1);\n onSelectResult(null);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [values.finance, values.finance.productType]);\n\n return results ? (\n <>\n \n {!filteredByTermResults?.length ? (\n <>{NoItemsPlaceholder()}\n ) : (\n
\n \n \n Select Your Lender Quote\n \n \n\n \n \n {filteredByTermResults\n .sort((a, b) => {\n return sortByLowest(a, b) || sortByNameDesc(a, b);\n })\n .map((r, i) => {\n const lowest = getLowestPayment(\n filteredByTermResults?.filter(\n (p) => p.productType === r.productType\n )\n );\n\n return (\n {\n setActiveIndex(i);\n onSelectResult(r);\n }}\n className={\n \"row custom-row\" +\n (activeIndex === i ? \" selected\" : \"\")\n }\n >\n onSelectResult(r)}\n loading={loading}\n />\n
\n );\n })}\n \n \n \n )}\n \n \n ) : null;\n};\n\nexport default ProposalMultiQuoteResult;\n","import * as React from \"react\";\nimport { QuotationResults } from \"../../Quotations/types\";\nimport { Button, Col, Modal, ModalBody, ModalHeader, Row } from \"reactstrap\";\nimport InformationTable, {\n CurrencyRow,\n InformationTableRow,\n} from \"../../shared/InformationTable\";\n\nexport interface ProposalMultiQuoteResultModalProps {\n result?: QuotationResults | null;\n toggle: () => void;\n selectResult: (result: QuotationResults) => void;\n}\n\nconst ProposalMultiQuoteResultModal = ({\n result,\n toggle,\n selectResult,\n}: ProposalMultiQuoteResultModalProps) => {\n return (\n \n {result ? (\n <>\n \n
\n
{result.productType}
\n
\n
\n
\n
{result.lenderName}
\n
Representative Example
\n
\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {\n selectResult(result);\n toggle();\n }}\n >\n Save this loan\n \n \n \n \n \n ) : null}\n \n );\n};\n\nexport default ProposalMultiQuoteResultModal;\n","import gql from \"graphql-tag\";\nimport * as React from \"react\";\nimport { QuotationFragment } from \"./fragments\";\nimport {\n Mutation,\n MutationFunction,\n MutationResult,\n useMutation,\n} from \"react-apollo\";\nimport { Quotation, QuotationVariables } from \"./types\";\n\nexport interface CreateFullProposalQuotationData {\n createFullProposalQuotation?: Quotation;\n}\n\nexport const CREATE_FULL_PROPOSAL_QUOTATION = gql`\n mutation CreateFullProposalQuotation($input: QuotationInput) {\n createFullProposalQuotation(input: $input) {\n ...QuotationFragment\n }\n }\n ${QuotationFragment}\n`;\n\nconst CreateFullProposalQuotationMutation = ({\n children,\n}: {\n children: (\n mutationFunction: MutationFunction<\n CreateFullProposalQuotationData,\n QuotationVariables\n >,\n result: MutationResult\n ) => JSX.Element | null;\n}) => {children};\n\nexport const useCreateFullProposalQuotation = () => {\n const [createFullProposalQuotation] = useMutation<\n CreateFullProposalQuotationData,\n QuotationVariables\n >(CREATE_FULL_PROPOSAL_QUOTATION);\n\n return createFullProposalQuotation;\n};\n\nexport default CreateFullProposalQuotationMutation;\n","/* eslint-disable jsx-a11y/anchor-is-valid */\nimport {\n faInfoCircle,\n faSave,\n faSpinner,\n} from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport classnames from \"classnames\";\nimport { Field, FieldProps, FormikProps } from \"formik\";\nimport * as React from \"react\";\nimport {\n Alert,\n Button,\n Col,\n FormGroup,\n InputGroup,\n InputGroupAddon,\n Label,\n Row,\n} from \"reactstrap\";\nimport { cleanFormData, formatCurrency, roundNumber } from \"../../../utils\";\nimport FormInputField from \"../../Forms/FormInputField\";\nimport { FormSectionProps, WatchFields } from \"../../Forms/MultiSectionForm\";\nimport RadioField from \"../../Forms/RadioField\";\nimport ReadOnlyNumberField from \"../../Forms/ReadOnlyNumberField\";\nimport TargetByField from \"../../Quotations/QuotationForm/TargetByField\";\nimport {\n Quotation,\n QuotationRequest,\n QuotationResults,\n QuotationTargetBy,\n QuotationVariables,\n} from \"../../Quotations/types\";\nimport {\n Proposal,\n ProposalFinance,\n ProposalFormSectionName,\n Vehicle,\n} from \"../types\";\nimport { ContextNames, ProductTypeEnum } from \"../../types\";\nimport ProposalFormClearQuotation from \"./ProposalFormClearQuotation\";\nimport ProposalFormCreateQuotation from \"./ProposalFormCreateQuotation\";\nimport ProposalQuestion from \"./ProposalQuestion\";\nimport { termOptions } from \"../../Quotations/QuotationForm/FinanceFormSection\";\nimport SelectField from \"../../Forms/SelectField\";\nimport { getErrorPaths } from \"../../Quotations/QuotationForm\";\nimport CalculateQuotationService from \"../../Quotations/CalculateQuotationService\";\nimport ProposalMultiQuoteResult from \"./ProposalMultiQuoteResult\";\nimport ProposalMultiQuoteResultModal from \"./ProposalMultiQuoteResultModal\";\nimport quotationValidationSchema from \"../../Quotations/QuotationForm/quotationValidationSchema\";\nimport CreateFullProposalQuotationMutation, {\n CreateFullProposalQuotationData,\n} from \"../../Quotations/CreateFullProposalQuotationMutation\";\nimport { MutationFunction } from \"react-apollo\";\n\nconst productTypeOptions = Object.keys(ProductTypeEnum).map((x) => ({\n label: x,\n value: x,\n}));\n\nconst financeFields: (keyof ProposalFinance)[] = [\n \"monthlyPayment\",\n \"rate\",\n \"aprRate\",\n \"balloonPayment\",\n];\n\nexport const financeSectionWatchFields: WatchFields = {\n proposalCustomerQuestions: {\n customerConfidentFinanceIsAffordable: true,\n },\n quotationId: true,\n finance: {\n rate: true,\n aprRate: true,\n period: true,\n monthlyPayment: true,\n balloonPayment: true,\n partExchange: true,\n partExchangeSettlement: true,\n cashPrice: true,\n cashDeposit: true,\n rFL: true,\n extras: true,\n productType: true,\n },\n targetBy: true,\n targetByValue: true,\n FORMSTATE_noQuotationResults: true,\n FORMSTATE_noQuotationResultsReasons: true,\n};\n\nconst FinanceSectionMessages = ({\n isSectionTouched,\n navigateToSection,\n ...formikProps\n}: FormSectionProps & { context?: ContextNames }) => {\n const { values, errors, context } = formikProps;\n const hasVehicleErrors =\n values.finance.productType !== ProductTypeEnum.HP &&\n (!values.vehicle.cAP ||\n (!!errors && !!errors.vehicle && !!Object.keys(errors.vehicle).length));\n\n return (\n <>\n {!values.dealerId && !values.dealer ? (\n \n \n {\n e.preventDefault();\n navigateToSection(ProposalFormSectionName.DEALER);\n }}\n style={{ color: \"inherit\" }}\n className=\"strong\"\n >\n Dealer\n \n {\" \"}\n is required before loan details can be calculated\n \n ) : null}\n {hasVehicleErrors ? (\n \n \n {\n e.preventDefault();\n navigateToSection(ProposalFormSectionName.VEHICLE);\n }}\n style={{ color: \"inherit\" }}\n className=\"strong\"\n >\n Vehicle details\n \n {\" \"}\n are required before non-HP loan details can be calculated\n \n ) : null}\n {!values.dealer?.isMultiQuote && values.FORMSTATE_noQuotationResults && (\n \n

\n Unable to quote for the selected vehicle and finance\n

\n {values.FORMSTATE_noQuotationResultsReasons\n ? values.FORMSTATE_noQuotationResultsReasons.map((x) => (\n

\n \n {x}\n

\n ))\n : null}\n

\n You can submit an application without a quote and we'll fix it for\n you\n

\n \n {({ createIncompleteQuotation, loading }) => (\n <>\n <>\n \n \n Continue without quote\n \n \n \n )}\n \n
\n )}\n {context !== ContextNames.DIRECT_DEAL && values.quotationId ? (\n \n Finance details are fixed for this quotation{\" \"}\n \n {({ clearQuotation }) => (\n \n Clear quotation and edit finance\n \n )}\n \n \n ) : null}\n \n );\n};\n\nconst getMultiQuoteRequest = (\n proposalValues: Proposal,\n isMulti: boolean = false,\n isMannIslandDealer: boolean | undefined = undefined,\n isMannIslandZList: boolean | undefined = undefined\n): QuotationRequest => {\n const {\n dealerId,\n finance: {\n productType,\n cashPrice,\n cashDeposit,\n partExchange,\n partExchangeSettlement,\n },\n vehicle: {\n cAP,\n capId,\n mileage,\n maxAnnualMileage,\n isNew,\n dateOfRegistration,\n imported,\n regNo,\n vehicleType,\n isCommercial,\n vatQualifying,\n },\n targetBy,\n targetByValue,\n } = proposalValues;\n\n let returnValues = {\n minTerm: 12,\n maxTerm: 60,\n dealerId: dealerId ? dealerId : proposalValues.dealer.id,\n productTypes: [ProductTypeEnum[productType || \"HP\"]],\n cAP,\n mileage,\n maxAnnualMileage,\n regNo,\n targetBy,\n targetByValue,\n isNew,\n dateOfRegistration,\n cashPrice,\n cashDeposit,\n partExchange,\n partExchangeSettlement,\n extras: 0,\n rFL: 0,\n };\n\n if (!isMulti && isMannIslandDealer && !isMannIslandZList) {\n return {\n ...returnValues,\n capId: capId ? +capId : undefined,\n import: imported,\n regNo,\n vehicleType,\n usage: isCommercial ? \"commercial\" : \"Social\",\n vatQualify: vatQualifying,\n minTerm: 36,\n };\n }\n return returnValues;\n};\n\nclass FinanceSection extends React.Component<\n FormSectionProps,\n {\n modalResult: QuotationResults | null;\n aprDisabled: boolean;\n showResults: boolean;\n multiQuoteLoading: boolean;\n }\n> {\n public constructor(props: FormSectionProps) {\n super(props);\n this.state = {\n modalResult: null,\n aprDisabled: false,\n showResults: false,\n multiQuoteLoading: false,\n };\n\n this.getFinanceValue = this.getFinanceValue.bind(this);\n this.handleCalculateMultiQuote = this.handleCalculateMultiQuote.bind(this);\n this.showModal = this.showModal.bind(this);\n this.hideModal = this.hideModal.bind(this);\n this.selectResult = this.selectResult.bind(this);\n this.getProposalQuotation = this.getProposalQuotation.bind(this);\n this.cleanProposalQuotation = this.cleanProposalQuotation.bind(this);\n if (props.values.dealer && props.values.dealer.agreedApr) {\n this.props.values.targetByValue = this.props.values.dealer.agreedApr; // need to round the apr rate to display correctly\n this.props.setFieldValue(\n \"targetByValue\",\n roundNumber(props.values.dealer.agreedApr)\n );\n this.props.values.targetBy = QuotationTargetBy.APR_RATE;\n this.props.setFieldValue(\"targetBy\", QuotationTargetBy.APR_RATE);\n }\n\n if (!!props.values.vehicle.isRegUnknown) {\n this.props.setFieldValue(\"finance.productType\", ProductTypeEnum.HP);\n }\n }\n\n public render() {\n const { isSectionTouched, navigateToSection, ...formikProps } = this.props;\n const { values } = formikProps;\n\n const isMulti = values.dealer && values.dealer.isMultiQuote;\n\n const dealer = this.props.values.dealer;\n\n const hasReg = !values.vehicle.isRegUnknown;\n const readOnly = !!values.quotationId;\n\n const multiQuoteRequest = this.state.showResults\n ? getMultiQuoteRequest(values, isMulti)\n : undefined;\n\n return (\n <>\n \n {isMulti ? (\n <>\n \n {({ calculateQuotationList, loading }) => {\n if (\n !!multiQuoteRequest &&\n !values.quotationListResult &&\n !loading\n ) {\n this.props.setFieldValue(\n \"quotationListResult\",\n calculateQuotationList,\n false\n );\n } else if (!!values.quotationListResult && loading) {\n this.props.setFieldValue(\n \"quotationListResult\",\n undefined,\n false\n );\n }\n\n return (\n <>\n \n \n\n \n\n \n\n \n\n \n \n \n \n \n £\n \n \n \n \n \n\n \n \n \n\n \n\n \n\n \n \n {\n this.handleCalculateMultiQuote(formikProps);\n }}\n className={classnames(\"btn wide-button btn-lg mb-2\", {\n \"btn-primary\": !this.state.showResults,\n \"btn-outline-secondary\": this.state.showResults,\n })}\n type=\"button\"\n disabled={this.state.showResults || readOnly}\n >\n {loading && (\n \n )}{\" \"}\n Show loans\n \n \n \n \n {!readOnly ? (\n {\n this.showModal(x);\n }}\n />\n ) : (\n <>\n \n

Saved Quotation:

\n \n \n
\n \n
{`${values.finance.lenderName}`}
\n \n \n
\n {`Monthly payment: ${formatCurrency(\n values.finance.monthlyPayment\n )}`}\n
\n

\n {values.finance.productType === \"PCP\"\n ? `Balloon payment: ${formatCurrency(\n values.finance.balloonPayment\n )}`\n : null}\n

\n

{`Period: ${values.finance.period} months`}

\n

{`Product type: ${values.finance.productType}`}

\n {values.finance.aprRate && (\n

\n {`APR rate: ${(\n Math.round(values.finance.aprRate * 100) /\n 100\n ).toFixed(2)}%`}\n

\n )}\n \n
\n \n \n )}\n \n {(mutationFunction) => (\n {\n this.selectResult(\n mutationFunction,\n result,\n formikProps\n );\n }}\n />\n )}\n \n
\n \n );\n }}\n
\n \n ) : (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n £\n \n \n \n \n \n \n \n \n \n \n \n {!readOnly && !dealer?.agreedApr ? (\n \n \n \n \n \n ) : null}\n \n \n \n {({ canCreateQuotation, createQuotation, loading }) => (\n <>\n {!readOnly ? (\n <>\n \n \n Save quotation\n \n {canCreateQuotation ? (\n formikProps.values\n .FORMSTATE_noQuotationResults ? (\n

\n Unable to quote\n

\n ) : (\n \n Save the quotation to store the finance values\n for this proposal\n

\n )\n ) : null}\n \n ) : null}\n \n )}\n
\n \n
\n \n \n \n \n \n {values.finance.productType !== ProductTypeEnum.HP ? (\n \n \n \n ) : null}\n \n \n \n \n \n \n {values.finance.rFL || values.finance.extras ? (\n <>\n \n \n \n \n \n \n \n ) : null}\n \n
\n )}\n\n {!hasReg && (\n \n \n \n {({ field, form }: FieldProps) => (\n \n

\n Request a different loan type (optional)\n

\n

\n For manually selected vehicles PCP or LP quotes have to be\n manually processed by one of our advisors. Please let us\n know if you want to convert your quote\n

\n \n \n \n \n )}\n
\n \n
\n )}\n {!!formikProps.values.targetByValue &&\n formikProps.values.targetByValue > 13.9 && (\n \n \n \n Warning: Some lenders only lend up to 13.9% APR\n \n \n \n )}\n {this.props.values.proposalCustomerQuestions.customerPresent && (\n \n )}\n \n );\n }\n\n private getFinanceValue(values: Proposal) {\n const {\n finance: { cashPrice, cashDeposit, partExchange, partExchangeSettlement },\n } = values;\n\n return (\n (cashPrice || 0) +\n (partExchangeSettlement || 0) -\n ((cashDeposit || 0) + (partExchange || 0))\n );\n }\n\n private async handleCalculateMultiQuote(formikProps: FormikProps) {\n const quoteValues = [\n \"finance.cashPrice\",\n \"finance.cashDeposit\",\n \"finance.partExchange\",\n \"finance.partExchangeSettlement\",\n \"targetBy\",\n \"targetByValue\",\n \"productType\",\n ];\n\n quoteValues.forEach((x) =>\n formikProps.setFieldTouched(x as any, true, false)\n );\n\n formikProps.validateForm().then((err) => {\n if (!getErrorPaths(err).some((x) => quoteValues.indexOf(x) >= 0)) {\n this.setState({ showResults: true });\n }\n });\n }\n\n private showModal(results: QuotationResults | null) {\n this.setState({ modalResult: results });\n }\n\n private hideModal() {\n this.setState({ modalResult: null });\n }\n\n private getProposalQuotation(\n proposal: Proposal,\n quotationResults: QuotationResults\n ): Quotation {\n let { dealerId, targetBy, individualCustomer, dealer = null } = proposal;\n\n let {\n arrangementFee,\n commission,\n commissionCode,\n completionFee,\n guaranteedFutureValue,\n aprRate,\n flatRate,\n term,\n productType,\n cashPrice,\n deposit,\n monthlyPayment,\n } = quotationResults;\n\n dealerId == null && (dealerId = dealer?.id);\n targetBy == null && (targetBy = QuotationTargetBy.APR_RATE);\n\n const { partExchange, partExchangeSettlement } = proposal.finance;\n\n const vehicle = cleanFormData(proposal.vehicle) as Vehicle;\n\n delete vehicle.skipVehicle;\n delete vehicle.isRegUnknown;\n\n const quotation = {\n dealerId,\n title: individualCustomer ? individualCustomer.title : undefined,\n forename: individualCustomer ? individualCustomer.forename : undefined,\n surname: individualCustomer ? individualCustomer.surname : undefined,\n finance: {\n productType,\n term,\n cashPrice,\n deposit,\n partExchangeSettlement,\n partExchangeValue: partExchange,\n aprRate,\n arrangementFee,\n commission,\n commissionCode,\n completionFee,\n flatRate,\n guaranteedFutureValue,\n monthlyPayment,\n },\n skipVehicle: false,\n vehicle,\n targetBy,\n targetByValue: aprRate,\n isHidden: true,\n };\n\n return quotation;\n }\n\n private selectResult(\n mutationFn: MutationFunction<\n CreateFullProposalQuotationData,\n QuotationVariables\n >,\n result: QuotationResults,\n { isSubmitting, setFieldValue, handleSubmit, values }: FormikProps\n ) {\n if (!isSubmitting) {\n values.finance.aprRate = result.aprRate;\n values.finance.rate = result.flatRate;\n values.finance.balloonPayment = result.guaranteedFutureValue;\n values.finance.productType = result.productType;\n values.finance.period = result.term;\n values.finance.monthlyPayment = result.monthlyPayment;\n values.finance.lenderId = result.lenderId;\n values.finance.lenderName = result.lenderName;\n values.FORMSTATE_requiresQuotation = false;\n\n setTimeout(handleSubmit, 0);\n }\n\n const { finance, quotationId } = values;\n\n const hasFinanceValues = financeFields.every((x) => {\n return !!finance[x] || finance[x] === 0;\n });\n const quotation = this.getProposalQuotation(values, result);\n\n const canCreateQuotation =\n !quotationId &&\n hasFinanceValues &&\n quotationValidationSchema.isValidSync(quotation);\n\n return canCreateQuotation\n ? mutationFn({\n variables: { input: this.cleanProposalQuotation(quotation) },\n }).then((result) => {\n setFieldValue(\n \"quotationId\",\n result.data?.createFullProposalQuotation?.id,\n false\n );\n })\n : null;\n }\n\n private cleanProposalQuotation(formData: Quotation) {\n const proposalQuotation: Quotation = cleanFormData(formData);\n\n if (proposalQuotation.vehicle) {\n delete proposalQuotation.vehicle.isRegUnknown;\n delete proposalQuotation.vehicle.skipVehicle;\n delete proposalQuotation.vehicle.regNoNotFound;\n delete proposalQuotation.vehicle.LCV;\n }\n\n return proposalQuotation;\n }\n}\n\nexport default FinanceSection;\n","import { Field, FormikProps } from \"formik\";\nimport * as React from \"react\";\nimport { Col, Row } from \"reactstrap\";\nimport { formatEnumValue } from \"../../../utils\";\nimport AddressFormSection from \"../../AddressLookup/AddressFormSection\";\nimport FormInputField from \"../../Forms/FormInputField\";\nimport RadioField from \"../../Forms/RadioField\";\nimport { HomeAddress, HomeOwnership, Proposal } from \"../types\";\n\ninterface HomeAddressSectionProps {\n index: number;\n remove: () => void;\n address: HomeAddress;\n}\n\nconst homeOwnershipOptions = Object.keys(HomeOwnership).map((x) => ({\n label: formatEnumValue(x),\n value: x,\n}));\n\nconst HomeAddressSection = ({\n index,\n address,\n remove,\n ...rest\n}: HomeAddressSectionProps & FormikProps) => (\n
\n \n \n \n \n {address.ownership === HomeOwnership.OTHER ? (\n \n \n \n ) : null}\n {index === 0 && (\n \n \n \n )}\n \n \n \n \n \n \n \n \n {index === 0 && (\n \n \n \n )}\n
\n);\n\nexport default HomeAddressSection;\n","import {\n faChevronDown,\n faChevronUp,\n faPlus\n} from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { FieldArray } from \"formik\";\nimport * as React from \"react\";\nimport { Button } from \"reactstrap\";\nimport {\n formatEnumValue,\n getMonthsAndYearsText,\n getSingleLineAddress,\n hasAddress\n} from \"../../../utils\";\nimport { FormSectionProps, WatchFields } from \"../../Forms/MultiSectionForm\";\nimport { HomeAddress, Proposal } from \"../types\";\nimport HomeAddressSection from \"./HomeAddressSection\";\nimport { homeAddressSchema } from \"./individualCustomerValidationSchema\";\n\nconst ValidateAddressDates = (address: HomeAddress) => {\n return (\n (address.monthsAtAddress || address.monthsAtAddress === 0) &&\n (address.yearsAtAddress || address.yearsAtAddress === 0)\n );\n};\n\nconst validateAddress = (address: HomeAddress) => {\n return (\n hasAddress(address) && address.ownership && ValidateAddressDates(address)\n );\n};\n\nexport const homeAddressHistoryWatchFields: WatchFields = {\n individualCustomer: {\n homeAddresses: [\n {\n line1: true,\n line2: true,\n line3: true,\n town: true,\n county: true,\n postcode: true,\n countryId: true,\n telephone: true,\n yearsAtAddress: true,\n monthsAtAddress: true,\n ownership: true,\n otherOwnership: true,\n totalMonthlyRentOrMortgage: true\n }\n ],\n homeAddressesError: true\n }\n};\n\nclass HomeAddressHistorySection extends React.Component<\n FormSectionProps,\n { isValidated: boolean; collapsedItems: number[] }\n> {\n constructor(props: FormSectionProps) {\n super(props);\n this.collapseAddress = this.collapseAddress.bind(this);\n this.expandAddress = this.expandAddress.bind(this);\n\n this.state = {\n isValidated: false,\n collapsedItems: []\n };\n\n const { individualCustomer } = this.props.values;\n if (individualCustomer.homeAddresses.length > 1) {\n individualCustomer.homeAddresses.forEach((_, i) => {\n this.state.collapsedItems.push(i);\n });\n }\n }\n\n public render() {\n const { collapsedItems } = this.state;\n const errors = this.props.errors;\n\n const { individualCustomer } = this.props.values;\n const requiresHomeAddress =\n !!(\n !individualCustomer.homeAddresses ||\n !individualCustomer.homeAddresses.length\n ) ||\n !!(\n errors.individualCustomer &&\n (errors.individualCustomer as any).homeAddressesError\n );\n\n return (\n \n {arrayHelpers => (\n
\n {individualCustomer.homeAddresses &&\n individualCustomer.homeAddresses.map((address, i) => {\n const isOpen = collapsedItems.indexOf(i) === -1;\n return (\n
\n this.collapseAddress(i)\n : () => this.expandAddress(i)\n }\n >\n {i > 0 ? <>Previous address {i} : <>Current address}\n \n \n
\n {isOpen ? (\n <>\n arrayHelpers.remove(i)}\n // isAddressValid={this.validateAddress(i)}\n {...this.props}\n />\n {i > 0 ? (\n arrayHelpers.remove(i)}\n >\n Remove this address\n \n ) : null}\n \n ) : (\n {\n this.expandAddress(i);\n }}\n className=\"pointer pb-3\"\n >\n

\n {hasAddress(address) ? (\n getSingleLineAddress(address)\n ) : i > 0 ? (\n <>No previous address provided\n ) : (\n <>No current address provided\n )}\n

\n {address.ownership ? (\n

\n Home ownership:{\" \"}\n {formatEnumValue(address.ownership)}\n

\n ) : null}\n {ValidateAddressDates(address) ? (\n

\n {getMonthsAndYearsText(\n (address.yearsAtAddress\n ? address.yearsAtAddress\n : 0) *\n 12 +\n (address.monthsAtAddress\n ? address.monthsAtAddress\n : 0)\n )}\n

\n ) : null}\n {!validateAddress(address) ? (\n

\n Home address section is incomplete\n

\n ) : null}\n
\n )}\n
\n
\n );\n })}\n {requiresHomeAddress ? (\n <>\n {\n arrayHelpers.push(homeAddressSchema.default());\n this.collapseAddress(\n individualCustomer.homeAddresses.length - 1\n );\n }}\n >\n \n Add previous address\n \n {errors.individualCustomer &&\n (errors.individualCustomer as any).homeAddressesError ? (\n

\n {(errors.individualCustomer as any).homeAddressesError}\n

\n ) : null}\n \n ) : null}\n \n )}\n
\n );\n }\n\n private collapseAddress(i: number) {\n const array = this.state.collapsedItems.slice();\n if (array.indexOf(i) === -1) {\n array.push(i);\n\n this.setState({\n collapsedItems: array\n });\n }\n }\n\n private expandAddress(i: number) {\n const array = this.state.collapsedItems.slice();\n array.splice(array.indexOf(i), 1);\n\n this.setState({\n collapsedItems: array\n });\n }\n}\n\nexport default HomeAddressHistorySection;\n","import { Field, FormikProps } from \"formik\";\nimport React from \"react\";\nimport { Col, Label, Row } from \"reactstrap\";\nimport { formatEnumValue } from \"../../../utils\";\nimport AddressFormSection from \"../../AddressLookup/AddressFormSection\";\nimport FormInputField from \"../../Forms/FormInputField\";\nimport RadioField from \"../../Forms/RadioField\";\nimport CountryField from \"../../Settings/Countries/CountryField\";\nimport {\n Business,\n DirectorOwnerStatus,\n DrivingLicense,\n DrivingLicenseLookup,\n MaritalStatus,\n} from \"../types\";\nimport DateSelectRow from \"./DateSelectRow\";\nimport TitleSelectField from \"./TitleSelectField\";\n\ninterface DirectorsDetailsSectionProps {\n index: number;\n business: Business;\n}\n\nconst maritalStatusOptions = Object.keys(MaritalStatus).map((x) => ({\n label: formatEnumValue(x),\n value: x,\n}));\n\nconst drivingLicenseOptions = Object.keys(DrivingLicenseLookup).map((x) => ({\n label: DrivingLicenseLookup[x as DrivingLicense].description,\n value: x,\n}));\n\nconst homeOwnershipOptions = Object.keys(DirectorOwnerStatus).map((x) => ({\n label: formatEnumValue(x),\n value: x,\n}));\n\nconst DirectorsDetailsSection = ({\n index,\n business,\n ...rest\n}: DirectorsDetailsSectionProps & FormikProps) => {\n return (\n <>\n \n \n \n \n \n \n \n \n

\n Make sure to add a middle name if the customer has one.\n

\n

\n The customer name should be the same as it appears on their driving\n license or passport to successfully complete e-sign.\n

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {business.directors[index].owner === DirectorOwnerStatus.OTHER ? (\n \n \n \n ) : null}\n {index === 0 ? (\n \n \n \n ) : null}\n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n {\n rest.setFieldValue(\n `business.directors.${index}.guarantor`,\n e.target.checked\n );\n }}\n />\n \n Guarantor\n \n \n It may be required to provide evidence that this individual is a\n guarantor\n \n
\n \n
\n \n );\n};\n\nexport default DirectorsDetailsSection;\n","import {\n faChevronDown,\n faChevronUp,\n faUserPlus,\n} from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { FieldArray } from \"formik\";\nimport React from \"react\";\nimport { Button } from \"reactstrap\";\nimport {\n formatEnumValue,\n getMonthsAndYearsText,\n getSingleLineAddress,\n hasAddress,\n} from \"../../../utils\";\nimport { FormSectionProps, WatchFields } from \"../../Forms/MultiSectionForm\";\nimport { BusinessDirector, DirectorOwnerStatus, Proposal } from \"../types\";\nimport DirectorsDetailsSection from \"./DirectorsDetailsSection\";\n\nexport const directorsSectionWatchFields: WatchFields = {\n business: {\n directors: [\n {\n title: true,\n forename: true,\n middleName: true,\n surname: true,\n dOB: true,\n email: true,\n earnings: true,\n guarantor: true,\n mobile: true,\n owner: true,\n otherStatus: true,\n homeYears: true,\n homeMonths: true,\n countryOfBirthId: true,\n nationalityId: true,\n countryOfResidenceId: true,\n maritalStatus: true,\n drivingLicense: true,\n address: {\n line1: true,\n line2: true,\n line3: true,\n town: true,\n county: true,\n postcode: true,\n countryId: true,\n totalMonthlyRentOrMortgage: true,\n },\n },\n ],\n },\n};\n\nconst ValidateAddressDates = (director: BusinessDirector) => {\n return (\n (director.homeMonths || director.homeMonths === 0) &&\n (director.homeYears || director.homeYears === 0)\n );\n};\n\nconst validateDirectorDetails = (director: BusinessDirector) => {\n return !!(\n director.title &&\n director.forename &&\n director.surname &&\n director.dOB &&\n director.email &&\n hasAddress(director.address) &&\n director.owner &&\n ValidateAddressDates\n );\n};\n\nconst ShortDirectorSummary = ({ director }: { director: BusinessDirector }) => {\n return (\n <>\n

\n {director.title && director.forename && director.surname ? (\n \n Name: {`${director.title} ${director.forename} ${director.surname}`}\n \n ) : null}\n {director.dOB ? DOB: {director.dOB} : null}\n

\n

\n {director.email ? (\n Email: {director.email}\n ) : null}\n {director.mobile ? Mobile: {director.mobile} : null}\n

\n {hasAddress(director.address) ? (\n

\n Address: {getSingleLineAddress(director.address)}\n

\n ) : null}\n

\n {director.owner && director.owner !== DirectorOwnerStatus.OTHER ? (\n \n Home ownership: {formatEnumValue(director.owner)}\n \n ) : director.owner === DirectorOwnerStatus.OTHER ? (\n director.otherStatus ? (\n Home ownership: {director.otherStatus}\n ) : null\n ) : null}\n {(director.homeMonths || director.homeMonths === 0) &&\n (director.homeYears || director.homeYears === 0) ? (\n \n {getMonthsAndYearsText(\n director.homeMonths + director.homeYears * 12\n )}\n \n ) : null}\n

\n \n );\n};\nclass DirectorsSection extends React.Component<\n FormSectionProps,\n { collapsedItems: number[] }\n> {\n constructor(props: FormSectionProps) {\n super(props);\n this.collapseDirector = this.collapseDirector.bind(this);\n this.expandDirector = this.expandDirector.bind(this);\n\n this.state = { collapsedItems: [] };\n const { business } = this.props.values;\n if (business.directors.length > 1) {\n business.directors.forEach((_, i) => {\n this.state.collapsedItems.push(i);\n });\n }\n }\n\n public render() {\n const { collapsedItems } = this.state;\n const { business } = this.props.values;\n\n const formikProps = this.props;\n return (\n <>\n \n {(arrayHelpers) => (\n
\n {business.directors &&\n business.directors.map((_, i) => {\n const isOpen = collapsedItems.indexOf(i) === -1;\n return (\n
\n this.collapseDirector(i)\n : () => this.expandDirector(i)\n }\n >\n Director / Partner - {i + 1}\n \n \n
\n {isOpen ? (\n <>\n \n {i > 0 ? (\n arrayHelpers.remove(i)}\n >\n Remove this director\n \n ) : null}\n \n ) : (\n this.expandDirector(i)}\n >\n \n {!validateDirectorDetails(business.directors[i]) ? (\n

\n Director details section is incomplete\n

\n ) : null}\n
\n )}\n
\n
\n );\n })}\n {business.directors.length === 1 ? (\n {\n arrayHelpers.push({ address: {} });\n this.collapseDirector(business.directors.length - 1);\n }}\n >\n \n Add another director\n \n ) : null}\n \n )}\n
\n \n );\n }\n\n private collapseDirector(i: number) {\n const array = this.state.collapsedItems.slice();\n if (array.indexOf(i) === -1) {\n array.push(i);\n\n this.setState({\n collapsedItems: array,\n });\n }\n }\n\n private expandDirector(i: number) {\n const array = this.state.collapsedItems.slice();\n array.splice(array.indexOf(i), 1);\n\n this.setState({\n collapsedItems: array,\n });\n }\n}\n\nexport default DirectorsSection;\n","import { Field, FormikProps } from \"formik\";\nimport * as React from \"react\";\nimport { Col, Row } from \"reactstrap\";\nimport { formatEnumValue } from \"../../../utils\";\nimport AddressFormSection from \"../../AddressLookup/AddressFormSection\";\nimport FollowUpQuestions from \"../../Dealers/DealerForm/FollowUpQuestions\";\nimport FormikEffects from \"../../Forms/FormikEffects\";\nimport FormInputField from \"../../Forms/FormInputField\";\nimport RadioField from \"../../Forms/RadioField\";\nimport SelectField from \"../../Forms/SelectField\";\nimport CountryField from \"../../Settings/Countries/CountryField\";\nimport { useIndustryList } from \"../IndustryListQuery\";\nimport {\n EmploymentDetails,\n EmploymentStatus,\n EmploymentTerms,\n EmploymentType,\n EmploymentTypesRequiringEmployerName,\n Proposal,\n} from \"../types\";\nimport { addressSchema } from \"./individualCustomerValidationSchema\";\n\ninterface EmploymentDetailsSectionProps {\n index: number;\n remove: () => void;\n employmentDetails: EmploymentDetails;\n}\n\nconst employmentOccupationOptions = [\n \"Administration / Clerical\",\n \"Director / Board member\",\n \"Miscellaneous\",\n \"Production worker\",\n \"Professional\",\n \"Skilled manual\",\n \"Taxi driver\",\n \"Unskilled manual\",\n // \"Administrator\",\n // \"Clerical\",\n // \"Armed forces\",\n // \"Director\",\n // \"Senior manager\",\n // \"Board member\",\n // \"Middle manager\",\n // \"Miscellaneous\",\n // \"Production worker\",\n // \"Professional\",\n // \"Skilled manual\",\n // \"Taxi driver or chauffeur\",\n // \"Unskilled manual\",\n].map((x) => ({\n label: formatEnumValue(x),\n value: x,\n}));\n\nconst employmentTermsOptions = Object.keys(EmploymentTerms).map((x) => ({\n label: formatEnumValue(x),\n value: x,\n}));\n\nconst employmentStatusOptions = Object.keys(EmploymentStatus).map((x) => ({\n label: formatEnumValue(x),\n value: x,\n}));\n\nconst employmentTypeOptions = Object.keys(EmploymentType)\n .filter((x) => x !== EmploymentType.UNKNOWN)\n .map((x) => ({\n label: formatEnumValue(x),\n value: x,\n }));\n\nconst EmploymentDetailsSection = ({\n index,\n remove,\n employmentDetails,\n ...rest\n}: EmploymentDetailsSectionProps & FormikProps) => {\n const address = (employmentDetails && employmentDetails.address) || {};\n\n const isEmployed =\n !employmentDetails?.employmentType ||\n EmploymentTypesRequiringEmployerName.includes(\n employmentDetails.employmentType\n );\n\n const { industryList } = useIndustryList();\n\n const industryOptions =\n industryList?.industryList?.map((i) => ({\n label: i,\n value: i,\n })) || [];\n\n return (\n <>\n {\n // Make the employer address null if the customer is not employed.\n const prevEmployers =\n prevValues?.individualCustomer?.employmentDetails || [];\n const currentEmployers =\n currentValues?.individualCustomer?.employmentDetails || [];\n\n prevEmployers.forEach((prev, i) => {\n const current = currentEmployers[i];\n const prevEmploymentType = prev.employmentType;\n const currentEmploymentType = current?.employmentType;\n\n const requiresEmployerInfo =\n !!currentEmploymentType &&\n EmploymentTypesRequiringEmployerName.includes(\n currentEmploymentType\n );\n\n const path = `individualCustomer.employmentDetails.${i}`;\n\n if (\n currentEmploymentType &&\n currentEmploymentType !== prevEmploymentType &&\n !requiresEmployerInfo\n ) {\n rest.setFieldValue(`${path}.address`, null);\n rest.setFieldValue(`${path}.earnings`, 0);\n\n if (current.employmentTerms === undefined) {\n rest.setFieldValue(\n `${path}.employmentTerms`,\n EmploymentTerms.PERMANENT,\n false\n );\n }\n if (current.employmentStatus === undefined) {\n rest.setFieldValue(\n `${path}.employmentStatus`,\n EmploymentStatus.FULL_TIME,\n false\n );\n }\n } else if (requiresEmployerInfo && !current.address) {\n rest.setFieldValue(`${path}.address`, addressSchema.default());\n if (!current.earnings) {\n rest.setFieldValue(`${path}.earnings`, null);\n }\n }\n });\n\n if (\n currentValues.individualCustomer\n .selfEmployedDirectorOrBoardMember !==\n prevValues.individualCustomer.selfEmployedDirectorOrBoardMember\n ) {\n rest.setFieldValue(\n \"individualCustomer.employmentDetails.0.occupation\",\n \"\"\n );\n rest.setFieldTouched(\n \"individualCustomer.employmentDetails.0.occupation\",\n true\n );\n }\n }}\n />\n {index === 0 ? (\n <>\n \n \n \n \n \n \n \n \n \n ) : null}\n\n \n \n \n \n \n \n \n \n \n \n \n \n {!!rest.values.individualCustomer.selfEmployedDirectorOrBoardMember &&\n index === 0 ? (\n \n \n \n ) : (\n \n \n \n )}\n\n \n \n \n \n \n \n \n {index === 0 ? (\n \n \n \n ) : null}\n\n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default EmploymentDetailsSection;\n","import {\n faChevronDown,\n faChevronUp,\n faPlus,\n} from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { FieldArray } from \"formik\";\nimport * as React from \"react\";\nimport { Button } from \"reactstrap\";\nimport {\n formatCurrency,\n formatEnumValue,\n getMonthsAndYearsText,\n getSingleLineAddress,\n hasAddress,\n} from \"../../../utils\";\nimport { FormSectionProps, WatchFields } from \"../../Forms/MultiSectionForm\";\nimport { EmploymentDetails, Proposal } from \"../types\";\nimport EmploymentDetailsSection from \"./EmploymentDetailsSection\";\nimport { employmentDetailsSchema } from \"./individualCustomerValidationSchema\";\nimport ProposalQuestion from \"./ProposalQuestion\";\n\nexport const employmentHistorySectionWatchFields: WatchFields = {\n proposalCustomerQuestions: {\n customerExpectsAffordabilityProblems: true,\n },\n individualCustomer: {\n countryOfActivityId: true,\n occupationTypeId: true,\n selfEmployedDirectorOrBoardMember: true,\n employmentDetails: [\n {\n employmentTerms: true,\n employmentStatus: true,\n employmentType: true,\n occupation: true,\n employerName: true,\n earnings: true,\n earningsPer: true,\n yearsWithEmployer: true,\n monthsWithEmployer: true,\n address: {\n line1: true,\n line2: true,\n line3: true,\n town: true,\n county: true,\n postcode: true,\n countryId: true,\n telephone: true,\n extension: true,\n fax: true,\n },\n industry: true,\n },\n ],\n employmentDetailsError: true,\n },\n};\n\nconst EmploymentCollapsedDetails = ({\n employmentDetails,\n}: {\n employmentDetails: EmploymentDetails;\n}) => {\n return (\n <>\n

\n {employmentDetails.employerName ? (\n \n Employer: {employmentDetails.employerName}\n \n ) : null}\n {employmentDetails.occupation ? (\n <>Occupation: {employmentDetails.occupation}\n ) : null}\n

\n

\n {employmentDetails.employmentType\n ? formatEnumValue(employmentDetails.employmentType)\n : null}\n {employmentDetails.employmentStatus ? (\n <>\n {employmentDetails.employmentType ? \", \" : null}\n {formatEnumValue(employmentDetails.employmentStatus)}\n \n ) : null}\n {employmentDetails.employmentTerms ? (\n <>\n {employmentDetails.employmentType ||\n employmentDetails.employmentStatus\n ? \", \"\n : null}\n {formatEnumValue(employmentDetails.employmentTerms)}\n \n ) : null}\n\n {employmentDetails.yearsWithEmployer &&\n employmentDetails.monthsWithEmployer ? (\n <>\n {employmentDetails.employmentType ||\n employmentDetails.employmentStatus ||\n employmentDetails.employmentTerms\n ? \", \"\n : null}\n {getMonthsAndYearsText(\n employmentDetails.yearsWithEmployer * 12 +\n employmentDetails.monthsWithEmployer\n )}\n \n ) : null}\n

\n {employmentDetails.earnings ? (\n

\n Earnings{\" \"}\n {employmentDetails.earningsPer ? (\n <>({formatEnumValue(employmentDetails.earningsPer)})\n ) : null}\n : {formatCurrency(employmentDetails.earnings)}{\" \"}\n

\n ) : null}\n {employmentDetails.address ? (\n

\n {hasAddress(employmentDetails.address) ? <>Address: : null}\n {getSingleLineAddress(\n employmentDetails.address ? employmentDetails.address : {}\n )}\n

\n ) : null}\n \n );\n};\n\nclass EmploymentHistorySection extends React.Component<\n FormSectionProps,\n { isValidated: boolean; collapsedItems: number[] }\n> {\n constructor(props: any) {\n super(props);\n\n this.collapseItem = this.collapseItem.bind(this);\n this.expandItem = this.expandItem.bind(this);\n\n this.state = {\n isValidated: false,\n collapsedItems: [],\n };\n\n const { individualCustomer } = this.props.values;\n if (individualCustomer.employmentDetails.length > 1) {\n individualCustomer.employmentDetails.forEach((_, i) => {\n this.state.collapsedItems.push(i);\n });\n }\n }\n\n public render() {\n const errors = this.props.errors;\n const {\n values: { individualCustomer },\n } = this.props;\n\n const requiresEmploymentDetails =\n !!(\n !individualCustomer.employmentDetails ||\n !individualCustomer.employmentDetails.length\n ) ||\n !!(\n errors.individualCustomer &&\n (errors.individualCustomer as any).employmentDetailsError\n );\n\n return (\n <>\n \n {(arrayHelpers: any) => (\n
\n {individualCustomer.employmentDetails &&\n individualCustomer.employmentDetails.map(\n (employmentDetails: any, i: number) => {\n const isOpen = this.state.collapsedItems.indexOf(i) === -1;\n return (\n
\n this.collapseItem(i)\n : () => this.expandItem(i)\n }\n >\n {i > 0 ? <>Previous employer {i} : <>Employer}\n \n \n
\n {isOpen ? (\n <>\n arrayHelpers.remove(i)}\n {...this.props}\n />\n\n {i > 0 ? (\n arrayHelpers.remove(i)}\n >\n Remove this employer\n \n ) : null}\n \n ) : (\n {\n this.expandItem(i);\n }}\n className=\"pointer pb-4\"\n >\n \n {this.validateEmployer(\n employmentDetails\n ) ? null : (\n

\n Employer section is incomplete\n

\n )}\n
\n )}\n
\n
\n );\n }\n )}\n {requiresEmploymentDetails ? (\n <>\n {\n arrayHelpers.push(employmentDetailsSchema.default());\n this.collapseItem(\n individualCustomer.employmentDetails.length - 1\n );\n }}\n >\n \n Add previous employer\n \n {errors.individualCustomer &&\n (errors.individualCustomer as any).employmentDetailsError ? (\n

\n {\n (errors.individualCustomer as any)\n .employmentDetailsError\n }\n

\n ) : null}\n \n ) : null}\n \n )}\n
\n {this.props.values.proposalCustomerQuestions.customerPresent && (\n \n )}\n \n );\n }\n\n private collapseItem(i: number) {\n const array = this.state.collapsedItems.slice();\n if (array.indexOf(i) === -1) {\n array.push(i);\n\n this.setState({\n collapsedItems: array,\n });\n }\n }\n\n private expandItem(i: number) {\n const array = this.state.collapsedItems.slice();\n array.splice(array.indexOf(i), 1);\n\n this.setState({\n collapsedItems: array,\n });\n }\n\n private validateEmployer(emp: EmploymentDetails) {\n return employmentDetailsSchema.isValidSync(emp);\n }\n}\n\nexport default EmploymentHistorySection;\n","module.exports = __webpack_public_path__ + \"static/media/Header_logo.f2c19bc7.svg\";","import { faSpinner } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\n\nexport default React.memo(\n ({\n className,\n style\n }: {\n className?: string;\n style?: React.CSSProperties;\n }) => (\n
\n Loading\n
\n )\n);\n","import * as React from \"react\";\nimport { Link as RouterLink } from \"react-router-dom\";\nimport { Breadcrumb, BreadcrumbItem } from \"reactstrap\";\n\ninterface PageBreadcrumbProps {\n breadcrumbs: {\n to: string;\n title: string;\n active?: boolean;\n }[];\n}\n\nconst Breadcrumbs = ({\n breadcrumbs,\n className\n}: PageBreadcrumbProps & {\n className?: string;\n}) => (\n \n {breadcrumbs.map(({ to, title, active }) => (\n \n {active ? title : {title}}\n \n ))}\n \n);\n\nexport default Breadcrumbs;\n","import * as React from \"react\";\nimport { Button, Modal, ModalBody, ModalFooter, ModalHeader } from \"reactstrap\";\n\ninterface ConfirmDialogProviderProps {\n show: (props: ConfirmDialogWithCallback) => void;\n cancel: () => void;\n}\n\ninterface ConfirmDialogProps {\n title: string;\n message: string | React.ReactElement;\n confirmButtonText: string;\n cancelButtonText?: string;\n confirmButtonColor?: string;\n cancelButtonColor?: string;\n}\n\ninterface ConfirmDialogWithCallback extends ConfirmDialogProps {\n confirmCallback: () => void;\n}\n\nconst dummyContext: ConfirmDialogProviderProps = {\n show: () => {\n return;\n },\n cancel: () => {\n return;\n }\n};\n\ninterface ConfirmDialogProviderState {\n dialog?: ConfirmDialogWithCallback;\n isDisplayed?: boolean;\n}\n\nconst ConfirmDialogContext = React.createContext(dummyContext);\n\nclass ConfirmDialogProvider extends React.Component<\n { children: React.ReactNode },\n ConfirmDialogProviderState\n> {\n constructor(props: any) {\n super(props);\n\n this.show = this.show.bind(this);\n this.cancel = this.cancel.bind(this);\n this.hide = this.hide.bind(this);\n\n this.state = {};\n }\n\n public render() {\n const { children } = this.props;\n\n const dialog: Partial void;\n }> = this.state.dialog || {};\n\n return (\n \n <>\n {children}\n \n {dialog.title}\n {dialog.message}\n \n \n {dialog.cancelButtonText || \"Cancel\"}\n \n {\n dialog.confirmCallback && dialog.confirmCallback();\n this.hide();\n }}\n >\n {dialog.confirmButtonText}\n \n \n \n \n \n );\n }\n\n private show(dialog: ConfirmDialogWithCallback) {\n this.setState({ dialog, isDisplayed: true });\n }\n\n private hide() {\n this.setState({ isDisplayed: false });\n }\n\n private cancel() {\n this.setState({ dialog: undefined });\n }\n}\n\nexport const ConfirmDialog = ({\n children,\n ...confirmProps\n}: ConfirmDialogProps & {\n children: (confirm: (callback: () => void) => void) => JSX.Element | null;\n}) => (\n \n {({ show }) =>\n children(callback =>\n show({\n ...confirmProps,\n confirmCallback: callback\n })\n )\n }\n \n);\n\nexport default ConfirmDialogProvider;\n","import gql from \"graphql-tag\";\n\nexport const UserFragment = gql`\n fragment UserFragment on User {\n id\n username\n email\n isSuspended\n forename\n surname\n identityProviderUserId\n isReadyToMigrate\n roles\n lastLoginOnOldSystem\n lastLogin\n loginCount\n auth0Roles\n dealer {\n id\n name\n }\n accountManager {\n id\n name\n }\n regionalSalesManager {\n id\n name\n }\n }\n`;\n\nexport const UserShallowFragment = gql`\n fragment UserShallowFragment on User {\n id\n username\n email\n isSuspended\n forename\n surname\n identityProviderUserId\n isReadyToMigrate\n roles\n lastLoginOnOldSystem\n dealer {\n id\n name\n }\n accountManager {\n id\n name\n }\n regionalSalesManager {\n id\n name\n }\n }\n`;\n\nexport const IdentityProviderUserFragment = gql`\n fragment IdentityProviderUserFragment on IdentityProviderUser {\n id\n username\n isSuspended\n forename\n surname\n }\n`;\n","import classnames from \"classnames\";\nimport * as React from \"react\";\n\ninterface FileDownloadLinkProps {\n href: string;\n className?: string;\n children: React.ReactNode;\n disabled?: boolean;\n target?: string;\n}\n\nconst FileDownloadLink = ({\n href,\n className,\n children,\n disabled,\n target\n}: FileDownloadLinkProps) => {\n return (\n \n {children}\n \n );\n};\n\nexport default FileDownloadLink;\n","import * as React from \"react\";\n\nconst FollowUpQuestions = ({\n children,\n className,\n show\n}: {\n children: React.ReactNode;\n show?: boolean;\n className?: string;\n}) =>\n show ? (\n
\n {children}\n
\n ) : null;\n\nexport default FollowUpQuestions;\n","import gql from \"graphql-tag\";\nimport * as React from \"react\";\nimport { Query, QueryResult, useQuery } from \"react-apollo\";\nimport { DebounceKeys, SearchResults, User } from \"../../types\";\nimport { DealerFragment, SingleDealerFragment } from \"../fragments\";\nimport { Dealer, DealerSearchArgs } from \"../types\";\n\nexport interface DealerListData {\n loggedInUser: User & { dealers: SearchResults };\n}\n\nexport const DEALER_LIST = gql`\n query DealerListQuery($input: DealerSearchArgsInput) {\n loggedInUser {\n id\n username\n roles\n dealers(input: $input) {\n pageInfo {\n hasMorePages\n totalResults\n page\n pageSize\n first\n last\n }\n edges {\n node {\n ...DealerFragment\n }\n }\n }\n }\n }\n ${DealerFragment}\n`;\n\nexport const DEALER_LIST_SHALLOW = gql`\n query ShallowDealerListQuery($input: DealerSearchArgsInput) {\n loggedInUser {\n id\n username\n roles\n dealers(input: $input) {\n pageInfo {\n hasMorePages\n totalResults\n page\n pageSize\n first\n last\n }\n edges {\n node {\n ...SingleDealerFragment\n }\n }\n }\n }\n }\n ${SingleDealerFragment}\n`;\n\nconst DealerListQuery = ({\n children,\n query,\n ...input\n}: DealerSearchArgs & {\n query?: any;\n children: (\n result: QueryResult & {\n dealers?: SearchResults;\n }\n ) => JSX.Element | null;\n}) => (\n \n query={query || DEALER_LIST}\n variables={{ input }}\n context={{ debounceKey: DebounceKeys.DEALER_LIST, debounceTimeout: 300 }}\n >\n {result =>\n children({\n ...result,\n dealers:\n result.data &&\n result.data.loggedInUser &&\n result.data.loggedInUser.dealers\n })\n }\n \n);\n\nexport const useDealerList = (input: DealerSearchArgs) => {\n const { loading, data, fetchMore } = useQuery<\n DealerListData,\n { input: DealerSearchArgs }\n >(DEALER_LIST, { variables: { input } });\n return { loading, dealers: data?.loggedInUser?.dealers, fetchMore };\n};\n\nexport const useDealerListShallow = (input: DealerSearchArgs) => {\n const { loading, data, fetchMore } = useQuery<\n DealerListData,\n { input: DealerSearchArgs }\n >(DEALER_LIST_SHALLOW, { variables: { input } });\n return { loading, dealers: data?.loggedInUser?.dealers, fetchMore };\n};\n\nexport default DealerListQuery;\n","import * as queryString from \"query-string\";\nimport * as React from \"react\";\nimport { RouteComponentProps, withRouter } from \"react-router\";\nimport { compose } from \"recompose\";\nimport { CompositeComponent } from \"../utils/types\";\n\nexport interface ToggleStateProps {\n /** Toggleable property */\n active: boolean;\n /** Toggles the \"active\" property between true and false */\n toggle: () => void;\n}\n\n/**\n * Provides a toggleable \"active\" property to child components like dropdowns\n * @param initialActive Indicates what the initial state of the \"active\" property should be\n */\nexport default (initialActive = false) => (\n InnerComponent: CompositeComponent\n): React.ComponentClass => {\n return class ToggleStateComponent extends React.Component<\n TProps,\n { active: boolean }\n > {\n constructor(props: TProps) {\n super(props);\n this.toggle = this.toggle.bind(this);\n this.state = { active: initialActive };\n }\n\n public render() {\n const { active } = this.state;\n\n return (\n \n );\n }\n\n private toggle() {\n this.setState(({ active }) => ({\n active: !active\n }));\n }\n };\n};\n\nexport const useToggle = (initialActive = false) => {\n const [active, setActive] = React.useState(initialActive);\n const toggle = React.useCallback(() => setActive(!active), [\n active,\n setActive\n ]);\n\n return { active, toggle };\n};\n\n/** Provides a toggleable \"active\" property by setting or unsetting a query string parameter */\nexport const withQuerystringToggleState = (\n paramName: string\n) =>\n compose(\n withRouter,\n (InnerComponent: CompositeComponent) => {\n // tslint:disable-next-line:max-classes-per-file\n return class QueryStringToggleStateComponent extends React.Component<\n RouteComponentProps & TProps\n > {\n constructor(props: RouteComponentProps & TProps) {\n super(props);\n\n this.getIsActive = this.getIsActive.bind(this);\n this.toggle = this.toggle.bind(this);\n }\n\n public toggle() {\n const { location, history } = this.props;\n const previousQuery = queryString.parse(location.search);\n const active = !(previousQuery[paramName] === \"true\");\n\n // Copy the previous query string\n // to make sure we don't wipe any other parameters\n const query = { ...previousQuery, [paramName]: active };\n\n // Remove the menu parameter if it is false\n if (!active) {\n delete query[paramName];\n }\n\n // Set the new querystring by replacing the current history location\n history.replace({\n pathname: location.pathname,\n search: queryString.stringify(query)\n });\n }\n\n /** Get the menu state from the query string */\n public getIsActive() {\n const { location } = this.props;\n const query = queryString.parse(location.search);\n return query[paramName] === \"true\";\n }\n\n public render() {\n // Strip out the router props\n const {\n history,\n location,\n match,\n staticContext,\n ...rest\n } = this.props;\n\n return (\n \n );\n }\n };\n }\n );\n","import { distanceInWords } from \"date-fns\";\n\nimport * as React from \"react\";\n\ninterface DistanceInWordsTextProps {\n date: Date;\n refreshInterval?: number;\n}\n\nclass DistanceInWordsText extends React.Component<\n DistanceInWordsTextProps,\n { counter: number }\n> {\n private interval?: NodeJS.Timeout;\n\n constructor(props: DistanceInWordsTextProps) {\n super(props);\n this.tick = this.tick.bind(this);\n\n this.state = {\n counter: 0\n };\n }\n\n public componentDidMount() {\n this.interval = setInterval(this.tick, this.props.refreshInterval || 10000);\n }\n\n public componentWillUnmount() {\n this.interval && clearInterval(this.interval);\n }\n\n public render() {\n return (\n <>\n {distanceInWords(new Date(), this.props.date, {\n addSuffix: true,\n includeSeconds: true\n })}\n \n );\n }\n\n private tick() {\n this.setState(s => ({ counter: s.counter + 1 }));\n }\n}\n\nexport default DistanceInWordsText;\n","import gql from \"graphql-tag\";\nimport { useQuery } from \"react-apollo\";\nimport { SearchResults, User } from \"../types\";\nimport { AlertMessage } from \"./types\";\n\nexport const AlertMessageFragment = gql`\n fragment AlertMessageFragment on AlertMessage {\n id\n title\n message\n redirectPath\n startDate\n endDate\n priority\n }\n`;\n\nexport interface AlertMessagesListData {\n loggedInUser: User;\n alertMessageSearch: SearchResults;\n}\n\nexport interface AlertMessageData {\n alertMessage: AlertMessage;\n}\n\nexport const ALERT_MESSAGE_LIST = gql`\n query AlertMessageSearchQuery($input: AlertMessageSearchArgsInput) {\n loggedInUser {\n id\n roles\n username\n }\n alertMessageSearch(input: $input) {\n pageInfo {\n hasMorePages\n totalResults\n page\n pageSize\n first\n last\n }\n edges {\n node {\n ...AlertMessageFragment\n }\n }\n }\n }\n ${AlertMessageFragment}\n`;\n\nexport const GET_ALERT_MESSAGE = gql`\n query AlertMessageQuery($id: ID) {\n alertMessage(id: $id) {\n ...AlertMessageFragment\n }\n }\n ${AlertMessageFragment}\n`;\n\nexport const CREATE_OR_UPDATE_ALERT_MESSAGE = gql`\n mutation CreateOrUpdateAlertMessage($input: AlertMessageInput) {\n createOrUpdateAlertMessage(input: $input) {\n ...AlertMessageFragment\n }\n }\n ${AlertMessageFragment}\n`;\n\nexport const DELETE_ALERT_MESSAGE = gql`\n mutation DeleteAlertMessage($id: ID) {\n deleteAlertMessage(id: $id) {\n success\n }\n }\n`;\n\nexport const GET_ACTIVE_ALERT_MESSAGES = gql`\n query ActiveAlertMessageQuery {\n loggedInUser {\n id\n username\n roles\n }\n activeAlertMessages {\n ...AlertMessageFragment\n }\n }\n ${AlertMessageFragment}\n`;\n\nexport const useAlertMessage = (id?: string) => {\n const { data } = useQuery<{ alertMessage: AlertMessage }>(GET_ALERT_MESSAGE, {\n variables: { id },\n skip: !id,\n });\n\n return data?.alertMessage;\n};\n\nexport const useActiveAlertMessages = (pollInterval?: number) => {\n const { data } = useQuery<{ activeAlertMessages: AlertMessage[] }>(\n GET_ACTIVE_ALERT_MESSAGES,\n {\n pollInterval,\n }\n );\n\n return data?.activeAlertMessages;\n};\n","import gql from \"graphql-tag\";\nimport * as React from \"react\";\nimport { Query, QueryResult } from \"react-apollo\";\nimport { SearchResults, User } from \"../../types\";\nimport { QuotationFragment } from \"../fragments\";\nimport { Quotation, QuotationSearchArgs } from \"../types\";\n\nexport interface QuotationListData {\n loggedInUser: User & {\n quotations: SearchResults;\n };\n}\n\nexport const QUOTATION_LIST = gql`\n query QuotationListQuery($input: QuotationSearchArgsInput) {\n loggedInUser {\n id\n username\n roles\n quotations(input: $input) {\n pageInfo {\n hasMorePages\n totalResults\n page\n pageSize\n first\n last\n }\n edges {\n node {\n ...QuotationFragment\n }\n }\n }\n }\n }\n ${QuotationFragment}\n`;\n\nconst QuotationListQuery = ({\n children,\n ...input\n}: QuotationSearchArgs & {\n children: (\n result: QueryResult\n ) => JSX.Element | null;\n}) => (\n \n query={QUOTATION_LIST}\n variables={{ input }}\n >\n {children}\n \n);\n\nexport default QuotationListQuery;\n","import gql from \"graphql-tag\";\nimport { UserShallowFragment } from \"../Settings/Users/fragments\";\n\nexport const AnnouncementFragment = gql`\n fragment AnnouncementFragment on Announcement {\n id\n title\n messageMarkdown\n buttonText\n createdDate\n maxDismissedCount\n }\n`;\n\nexport const ShallowAnnouncementWebUserFragment = gql`\n fragment ShallowAnnouncementWebUserFragment on AnnouncementWebUser {\n id\n announcementId\n userId\n confirmed\n confirmedDate\n dismissedCount\n announcement {\n ...AnnouncementFragment\n }\n }\n ${AnnouncementFragment}\n`;\n\nexport const AnnouncementWebUserFragment = gql`\n fragment AnnouncementWebUserFragment on AnnouncementWebUser {\n id\n announcementId\n userId\n confirmed\n confirmedDate\n dismissedCount\n user {\n ...UserShallowFragment\n }\n announcement {\n ...AnnouncementFragment\n }\n }\n ${UserShallowFragment}\n ${AnnouncementFragment}\n`;\n","import classnames from \"classnames\";\nimport { distanceInWords } from \"date-fns\";\nimport moment from \"moment\";\nimport * as React from \"react\";\nimport { Badge } from \"reactstrap\";\nimport {\n convertToTitleCase,\n formatEnumValue,\n getShortDate,\n getShortDateAndTime\n} from \"../../utils\";\nimport { useLoggedInUser } from \"../LoggedInUserQuery\";\nimport { ContextNames } from \"../types\";\nimport {\n ProposalProps,\n ProposalStatusEnum,\n ProposalStatusLookup,\n ProposalType\n} from \"./types\";\n\nfunction capitalizeFirstLetter(s: string) {\n return s.charAt(0).toUpperCase() + s.slice(1);\n}\n\nconst ProposalBadges = ({\n proposal: {\n isDealSaver,\n createdDate,\n status,\n cancelType,\n salesPerson,\n dealer,\n debitBacks,\n proposalType,\n loan,\n autoConvertReference,\n autoConvertLenderName,\n finance: { paidOutDate }\n },\n compact,\n context,\n className\n}: ProposalProps & { className?: string; compact?: boolean }) => {\n const { loggedInUser, isDealer, isAccountManager } = useLoggedInUser();\n if (!loggedInUser) {\n return null;\n }\n\n const isCancelled = !!cancelType || status === ProposalStatusEnum.CANCELLED;\n\n return (\n
\n {isCancelled && (\n \n {formatEnumValue(cancelType) || \"Cancelled\"}\n \n )}\n {!isCancelled && ProposalStatusLookup[status] && (\n \n {ProposalStatusLookup[status].description}\n {paidOutDate && status === ProposalStatusEnum.PAID_OUT\n ? ` ${getShortDate(paidOutDate)}`\n : null}\n \n )}\n {debitBacks && debitBacks.length && !compact ? (\n \n Debit back\n \n ) : null}{\" \"}\n {!autoConvertReference && !isDealer && !compact ? (\n \n EuroDealer\n \n ) : null}\n {(loan?.lender || autoConvertLenderName) &&\n status !== ProposalStatusEnum.UNDERWRITING &&\n !compact && (\n \n {autoConvertLenderName || loan?.lender?.name}\n \n )}\n {isDealSaver && !compact ? (\n Dealsaver\n ) : null}\n {proposalType === ProposalType.BUSINESS && (\n Business\n )}\n {salesPerson && !compact ? (\n \n {convertToTitleCase(salesPerson)} (sales)\n \n ) : null}\n {dealer?.accountManager &&\n context !== ContextNames.ACCOUNT_MANAGER &&\n !isAccountManager &&\n !isDealer &&\n !compact ? (\n \n {convertToTitleCase(dealer.accountManager.name)} (AM)\n \n ) : null}\n {createdDate ? {getShortDateAndTime(createdDate)} : null}\n {createdDate && moment(createdDate).isSame(moment(), \"day\") ? (\n {`${capitalizeFirstLetter(\n distanceInWords(new Date(), createdDate)\n )} ago`}\n ) : null}\n
\n );\n};\n\nexport default ProposalBadges;\n","import * as React from \"react\";\nimport { ProposalFormInitialValues } from \"../Proposals/ProposalForm\";\nimport { ProposalType, Vehicle } from \"../Proposals/types\";\nimport QuotationQuery from \"./QuotationQuery\";\nimport { Quotation } from \"./types\";\n\ninterface ProposalQuotationQueryInnerProps {\n quotation?: Quotation;\n quotationInitialValues?: ProposalFormInitialValues;\n loading?: boolean;\n}\n\ninterface ProposalQuotationQueryProps {\n quotationId?: number;\n proposalType?: ProposalType;\n children: (props: ProposalQuotationQueryInnerProps) => JSX.Element | null;\n}\n\n/** Map a quotation to the initial values required for a proposal */\nconst getProposalInitialValues = (\n quotation?: Quotation,\n proposalType?: ProposalType\n): ProposalFormInitialValues | undefined => {\n if (!quotation) {\n return undefined;\n }\n\n const isIndividual = proposalType === ProposalType.INDIVIDUAL;\n\n const {\n id: quotationId,\n title,\n forename,\n middleName,\n surname,\n dealerId,\n vehicle: quotationVehicle,\n targetBy,\n targetByValue,\n } = quotation;\n\n const {\n flatRate,\n aprRate,\n term,\n monthlyPayment,\n guaranteedFutureValue,\n cashPrice,\n deposit,\n productType,\n partExchangeValue,\n partExchangeSettlement,\n arrangementFee,\n completionFee,\n } = quotation.finance;\n\n const vehicle: Partial = quotationVehicle\n ? {\n ...quotationVehicle,\n isRegUnknown: !!quotationVehicle.cAP && !quotationVehicle.regNo,\n }\n : {};\n\n delete vehicle.__typename;\n\n const result: any = {\n quotationId,\n dealerId,\n targetBy,\n targetByValue,\n individualCustomer: isIndividual\n ? { title, forename, middleName, surname }\n : undefined,\n vehicle: vehicle\n ? {\n isRegUnknown: !vehicle.regNo,\n isCommercial: vehicle.isCommercial || false,\n ...vehicle,\n }\n : {},\n finance: {\n rate: flatRate,\n aprRate,\n period: term,\n monthlyPayment,\n balloonPayment: guaranteedFutureValue,\n partExchange: partExchangeValue,\n partExchangeSettlement,\n cashPrice,\n cashDeposit: deposit,\n productType,\n acceptanceFee: arrangementFee,\n optionFee: completionFee,\n lenderId: quotation.lender?.id,\n lenderName: quotation.lender?.name,\n },\n };\n\n return {\n initialValues: result,\n proposalType,\n };\n};\n\n/** Gets a quotation and maps it to the initial values required for a proposal */\nconst ProposalQuotationQuery = ({\n quotationId,\n proposalType,\n children,\n}: ProposalQuotationQueryProps) => {\n return (\n \n {({ quotation, loading }) =>\n children({\n quotation,\n loading,\n quotationInitialValues: getProposalInitialValues(\n quotation,\n proposalType\n ),\n })\n }\n \n );\n};\n\nexport default ProposalQuotationQuery;\n","import gql from \"graphql-tag\";\nimport * as React from \"react\";\nimport { Mutation, MutationFunction, MutationResult } from \"react-apollo\";\nimport { ProposalFragment } from \"./fragments\";\nimport { Proposal } from \"./types\";\n\ninterface ProposalData {\n createProposal: Proposal;\n}\n\ninterface ProposalVariables {\n input: Proposal;\n}\n\nexport const CREATE_PROPOSAL = gql`\n mutation CreateProposal($input: ProposalInput) {\n createProposal(input: $input) {\n ...ProposalFragment\n }\n }\n ${ProposalFragment}\n`;\n\nconst CreateProposal = ({\n children,\n}: {\n children: (\n mutationFunction: MutationFunction,\n result: MutationResult\n ) => JSX.Element | null;\n}) => {children};\n\nexport default CreateProposal;\n","import gql from \"graphql-tag\";\nimport * as React from \"react\";\nimport {\n graphql,\n Mutation,\n MutationFunction,\n MutationResult,\n} from \"react-apollo\";\nimport { CompositeComponent } from \"../../types\";\nimport {\n DirectDealDraftProposalFragment,\n DraftProposalFragment,\n} from \"../fragments\";\nimport { DraftProposal } from \"../types\";\n\nexport interface DraftProposalData {\n createOrUpdateDraftProposal: DraftProposal;\n}\n\nexport interface DraftProposalVariables {\n input: DraftProposal;\n}\n\nexport const CREATE_OR_UPDATE_DRAFT_PROPOSAL = gql`\n mutation CreateOrUpdateDraftProposal($input: DraftProposalInput) {\n createOrUpdateDraftProposal(input: $input) {\n ...DraftProposalFragment\n }\n }\n ${DraftProposalFragment}\n`;\n\nexport const CREATE_OR_UPDATE_DRAFT_PROPOSAL_DIRECT_DEAL = gql`\n mutation CreateOrUpdateDraftProposalDirectDeal($input: DraftProposalInput) {\n createOrUpdateDraftProposal(input: $input) {\n ...DirectDealDraftProposalFragment\n }\n }\n ${DirectDealDraftProposalFragment}\n`;\nconst CreateOrUpdateDraftProposal = ({\n children,\n}: {\n children: (\n mutateFn: MutationFunction,\n result: MutationResult\n ) => JSX.Element | null;\n}) => (\n {children}\n);\n\nexport const CreateOrUpdateDraftProposalDirectDealMutation = ({\n children,\n}: {\n children: (\n mutateFn: MutationFunction,\n result: MutationResult\n ) => JSX.Element | null;\n}) => (\n \n {children}\n \n);\n\nexport interface CreateOrUpdateDraftProposalProps {\n createOrUpdateDraftProposal: (draftProposal: DraftProposal) => Promise;\n}\n\nexport const withCreateOrUpdateDraftProposal = (\n WrappedComponent: CompositeComponent<\n TProps & CreateOrUpdateDraftProposalProps\n >\n) => {\n return graphql<\n TProps,\n DraftProposalVariables,\n {},\n CreateOrUpdateDraftProposalProps\n >(CREATE_OR_UPDATE_DRAFT_PROPOSAL, {\n props: ({ mutate }) => ({\n createOrUpdateDraftProposal: (draftProposal) => {\n return mutate\n ? mutate({ variables: { input: draftProposal } })\n : Promise.reject(\"No mutation provided\");\n },\n }),\n })(WrappedComponent);\n};\n\nexport default CreateOrUpdateDraftProposal;\n","import gql from \"graphql-tag\";\nimport * as React from \"react\";\nimport { Query, QueryResult, useQuery } from \"react-apollo\";\nimport { User } from \"../../types\";\nimport {\n DirectDealDraftProposalFragment,\n DraftProposalFragment,\n DraftProposalShallowFragment\n} from \"../fragments\";\nimport { DraftProposal } from \"../types\";\n\nexport interface DraftProposalProps {\n loggedInUser: User;\n draftProposal: DraftProposal;\n}\n\ninterface DraftProposalData {\n loggedInUser: User;\n draftProposal: DraftProposal;\n}\n\ninterface DraftProposalArgs {\n draftProposalId?: number;\n}\n\nexport const GET_DRAFT_PROPOSAL = gql`\n query DraftProposalQuery($draftProposalId: Int!) {\n loggedInUser {\n id\n username\n roles\n }\n draftProposal(id: $draftProposalId) {\n ...DraftProposalFragment\n }\n }\n ${DraftProposalFragment}\n`;\n\nexport const GET_DRAFT_PROPOSAL_SHALLOW = gql`\n query DraftProposalQuery($draftProposalId: Int!) {\n loggedInUser {\n id\n username\n roles\n }\n draftProposal(id: $draftProposalId) {\n ...DraftProposalShallowFragment\n }\n }\n ${DraftProposalShallowFragment}\n`;\n\nexport const GET_DRAFT_PROPOSAL_DIRECT_DEAL = gql`\n query DraftProposalDirectDealQuery($draftProposalId: Int!) {\n loggedInUser {\n id\n username\n roles\n }\n draftProposal(id: $draftProposalId) {\n ...DirectDealDraftProposalFragment\n }\n }\n ${DirectDealDraftProposalFragment}\n`;\n\nconst DraftProposalQuery = ({\n children,\n draftProposalId,\n query\n}: DraftProposalArgs & {\n children: (\n result: QueryResult & {\n draftProposal?: DraftProposal;\n }\n ) => JSX.Element | null;\n query?: any;\n}) => (\n \n query={query || GET_DRAFT_PROPOSAL}\n variables={{ draftProposalId }}\n skip={!draftProposalId}\n >\n {result =>\n children({\n ...result,\n draftProposal: result?.data?.draftProposal\n })\n }\n \n);\n\nexport const useDraftProposal = (id?: number) => {\n const { loading, data } = useQuery(\n GET_DRAFT_PROPOSAL,\n {\n variables: { draftProposalId: id },\n skip: !id\n }\n );\n return { loading, draftProposal: data?.draftProposal };\n};\n\nexport default DraftProposalQuery;\n","import { FormikErrors, FormikTouched } from \"formik\";\nimport { cloneDeep } from \"lodash\";\nimport * as React from \"react\";\nimport { MutationFunction } from \"react-apollo\";\nimport {\n cleanFormData,\n getFullName,\n getSingleLineVehicle,\n} from \"../../../utils\";\nimport {\n hydrateTouchedData,\n resetFieldsWithErrors,\n serializeTouchedData,\n} from \"../../Forms/draftFormUtils\";\nimport { ProposalFormInitialValues } from \"../ProposalForm\";\nimport {\n DraftProposal,\n Proposal,\n ProposalFormSectionName,\n ProposalType,\n} from \"../types\";\nimport CreateOrUpdateDraftProposalMutation, {\n CreateOrUpdateDraftProposalDirectDealMutation,\n DraftProposalData,\n DraftProposalVariables,\n} from \"./CreateOrUpdateDraftProposalMutation\";\nimport DraftProposalQuery, {\n GET_DRAFT_PROPOSAL_DIRECT_DEAL,\n} from \"./DraftProposalQuery\";\nimport { ContextNames } from \"../../types\";\n\ninterface DraftProposalServiceProps {\n draftProposal?: DraftProposal;\n draftProposalInitialValues?: ProposalFormInitialValues;\n saveDraft: (formData: DraftProposalFormData) => Promise;\n loading?: boolean;\n}\n\ninterface DraftProposalServiceOuterProps {\n draftProposalId?: number;\n context?: string;\n children: (props: DraftProposalServiceProps) => JSX.Element | null;\n}\n\nexport interface DraftProposalFormData {\n values: Proposal;\n initialValues: Proposal;\n errors: FormikErrors;\n touched: FormikTouched;\n currentSection?: string;\n}\n\n/** Gets and saves draft proposals */\nclass DraftProposalService extends React.Component {\n public constructor(props: DraftProposalServiceOuterProps) {\n super(props);\n this.saveDraft = this.saveDraft.bind(this);\n }\n\n public render() {\n const { draftProposalId, children, context } = this.props;\n\n return (\n \n {({ draftProposal, loading }) => {\n let draftProposalInitialValues: ProposalFormInitialValues;\n\n if (draftProposal) {\n const proposal: Proposal = cleanFormData(draftProposal.proposal, {\n removeIdFields: true,\n });\n\n // Indicate that a quotation is required to submit the proposal\n proposal.FORMSTATE_requiresQuotation =\n !!draftProposal.requiresQuotation;\n\n draftProposalInitialValues = {\n initialTouched: hydrateTouchedData(draftProposal.touchedFields),\n initialSection:\n draftProposal.currentSection as ProposalFormSectionName,\n initialValues: proposal,\n proposalType: draftProposal.proposalType,\n };\n\n if (draftProposal.dealer) {\n draftProposalInitialValues.initialValues.dealer =\n draftProposal.dealer;\n }\n }\n\n return context !== ContextNames.DIRECT_DEAL ? (\n \n {(mutateFn) =>\n children({\n draftProposal,\n draftProposalInitialValues,\n saveDraft: (formData) =>\n this.saveDraft(mutateFn, formData, draftProposal),\n loading,\n })\n }\n \n ) : (\n \n {(mutateFn) =>\n children({\n draftProposal,\n draftProposalInitialValues,\n saveDraft: (formData) =>\n this.saveDraft(mutateFn, formData, draftProposal),\n loading,\n })\n }\n \n );\n }}\n \n );\n }\n\n /** Saves the state of the proposal form to the server */\n private saveDraft(\n mutate: MutationFunction,\n formData: DraftProposalFormData,\n existing?: DraftProposal\n ) {\n const proposal = this.cleanDraftProposal(formData);\n const touched = cloneDeep(formData.touched);\n // delete touched.proposalCustomerQuestions.tNC;\n\n const currentSection = formData.currentSection;\n\n const customerDescription = proposal.individualCustomer\n ? getFullName(proposal.individualCustomer)\n : proposal.business.name;\n\n const vehicleDescription = getSingleLineVehicle(proposal.vehicle);\n\n const draftProposal: DraftProposal = {\n id: existing && existing.id,\n dealerId: proposal.dealerId || 0,\n proposal,\n touchedFields: serializeTouchedData(touched),\n currentSection,\n customerDescription,\n vehicleDescription,\n proposalType: proposal.individualCustomer\n ? ProposalType.INDIVIDUAL\n : ProposalType.BUSINESS,\n quotationId: proposal.quotationId,\n requiresQuotation: existing\n ? !!proposal.quotationId || existing.requiresQuotation\n : true,\n };\n\n return mutate({ variables: { input: draftProposal } }).then((result) => {\n const draft =\n result && result.data && result.data.createOrUpdateDraftProposal;\n\n if (!draft) {\n return;\n }\n\n return draft;\n });\n }\n\n /** Removes client only fields from the draft proposal object before submitting it to the server */\n private cleanDraftProposal(formData: DraftProposalFormData): Proposal {\n const { values, initialValues, errors } = formData;\n const isMannIslandDealer = values.dealer?.isMannIslandDealer;\n const proposal: Proposal = cleanFormData(values, { removeIdFields: true });\n\n // Clean up properties which are not used on the server\n // delete proposal.proposalCustomerQuestions.tNC;\n delete proposal.accountManagerId;\n delete proposal.externalSource;\n delete proposal.cancelType;\n delete proposal.directDealId;\n\n delete proposal.vehicle.skipVehicle;\n delete proposal.vehicle.isRegUnknown;\n delete proposal.vehicle.regNoNotFound;\n delete proposal.vehicle.LCV;\n\n delete proposal.finance.interestCharges;\n delete proposal.finance.totalCharges;\n delete proposal.finance.balancePayable;\n delete proposal.finance.totalAmountPayable;\n delete proposal.finance.lessRentalDeposit;\n delete proposal.finance.commissionCode;\n delete proposal.finance.totalFinance;\n delete proposal.finance.paidOutDate;\n delete proposal.finance.dealerCommission;\n delete proposal.quotationListResult;\n\n if (isMannIslandDealer) {\n proposal.finance.rate = 0.1;\n }\n if (proposal.isMannIslandDealer != null) {\n delete proposal.isMannIslandDealer;\n }\n\n if (proposal.individualCustomer) {\n delete proposal.individualCustomer.countryOfBirth;\n delete proposal.individualCustomer.nationality;\n delete proposal.individualCustomer.countryOfResidence;\n delete proposal.individualCustomer.countryOfActivity;\n delete proposal.individualCustomer.occupationType;\n }\n\n if (proposal.business) {\n proposal.business.directors.forEach((director) => {\n delete director.countryOfBirth;\n delete director.nationality;\n delete director.countryOfResidence;\n });\n }\n\n delete proposal.dealer;\n\n // Remove properties which have validation errors, and reset them\n // to default values\n resetFieldsWithErrors(proposal, errors, initialValues);\n\n return proposal;\n }\n}\n\nexport default DraftProposalService;\n","import * as React from \"react\";\nimport { useParams } from \"react-router\";\nimport { getFullName } from \"../../utils\";\nimport Breadcrumbs from \"../Breadcrumbs\";\nimport { useDealer, useLoggedInDealer } from \"../Dealers/DealerQuery\";\nimport { Dealer } from \"../Dealers/types\";\nimport { useQuotation } from \"../Quotations/QuotationQuery\";\nimport { Quotation } from \"../Quotations/types\";\nimport { useDraftProposal } from \"./DraftProposals/DraftProposalQuery\";\n\nconst getBreadcrumbData = (\n dealer?: Dealer,\n proposalType?: string,\n quotation?: Quotation,\n draftProposalId?: number\n) => {\n if (dealer) {\n return [\n { to: \"/\", title: \"Home\" },\n { to: \"/dealers\", title: \"Dealers\" },\n { to: `/dealers/${dealer.id}/proposals`, title: dealer.name },\n {\n to: `/dealers/${dealer.id}/proposals/create`,\n title: \"Proposal type\"\n },\n {\n to: `/dealers/${dealer.id}/proposals/create/${proposalType}`,\n title: `New ${proposalType} proposal`,\n active: true\n }\n ];\n }\n if (quotation) {\n const quotationName = getFullName(quotation);\n return [\n { to: \"/\", title: \"Home\" },\n { to: \"/quotations\", title: \"Quotations\" },\n {\n to: `/quotations/${quotation && quotation.id}`,\n title: quotation && quotationName ? quotationName : \"Untitled quotation\"\n },\n {\n to: `/quotations/${quotation && quotation.id}/convert`,\n title: \"Proposal type\"\n },\n {\n to: `/quotations/${quotation && quotation.id}/convert/${proposalType}`,\n title: \"Convert quotation to new proposal\",\n active: true\n }\n ];\n }\n if (draftProposalId) {\n if (!proposalType) {\n return [];\n }\n\n return [\n { to: \"/\", title: \"Home\" },\n { to: \"/proposals\", title: \"Proposals\" },\n { to: \"/proposals/drafts\", title: \"Draft proposals\" },\n {\n to: `/proposals/drafts/${draftProposalId}`,\n title: `New ${proposalType} proposal`,\n active: true\n }\n ];\n }\n return [\n { to: \"/\", title: \"Home\" },\n { to: \"/proposals\", title: \"Proposals\" },\n { to: \"/proposals/create\", title: \"Proposal type\" },\n {\n to: `/proposals/create/${proposalType}`,\n title: `New ${proposalType} proposal`,\n active: true\n }\n ];\n};\n\nconst ProposalBreadcrumbs = () => {\n const params = useParams<{\n dealerId?: string;\n proposalType?: string;\n quotationId?: string;\n draftProposalId?: string;\n }>();\n\n const dealerId = params.dealerId ? parseInt(params.dealerId, 10) : undefined;\n const quotationId = params.quotationId\n ? parseInt(params.quotationId, 10)\n : undefined;\n const draftProposalId = params.draftProposalId\n ? parseInt(params.draftProposalId, 10)\n : undefined;\n\n const {\n dealer: loggedInDealer,\n loading: loggedInDealerLoading\n } = useLoggedInDealer();\n const { draftProposal, loading: draftProposalLoading } = useDraftProposal(\n draftProposalId\n );\n const { quotation, loading: quotationLoading } = useQuotation(quotationId);\n const { dealer, loading: dealerLoading } = useDealer(dealerId);\n\n if (\n loggedInDealerLoading ||\n draftProposalLoading ||\n quotationLoading ||\n dealerLoading\n ) {\n return null;\n }\n\n const proposalType = (\n params.proposalType || draftProposal?.proposalType\n )?.toLowerCase();\n\n return (\n \n );\n};\n\nexport default ProposalBreadcrumbs;\n","import { Field, FieldProps } from \"formik\";\nimport * as React from \"react\";\nimport NumberFormat from \"react-number-format\";\nimport { Alert, Col, Row } from \"reactstrap\";\nimport { getFullName } from \"../../../utils\";\nimport { BooleanCheckbox } from \"../../Forms/BooleanCheckboxField\";\nimport FormGroupWrapper from \"../../Forms/FormGroupWrapper\";\nimport FormInputField from \"../../Forms/FormInputField\";\nimport { FormSectionProps, WatchFields } from \"../../Forms/MultiSectionForm\";\nimport { Proposal } from \"../types\";\nimport ValidateBankAccountButton from \"./ValidateBankAccountButton\";\n\nexport const bankDetailsSectionWatchFields: WatchFields = {\n bankDetails: {\n branch: true,\n bank: true,\n accountName: true,\n accountNumber: true,\n sortCode: true,\n yearsWithBank: true,\n monthsWithBank: true,\n FORMSTATE_invalidBankAccount: true,\n },\n proposalCustomerQuestions: {\n customerSoleSignatoryToBankAccount: true,\n },\n};\n\nconst populateBankAccountName = (props: Proposal) => {\n if (\n !!(\n props.individualCustomer &&\n props.individualCustomer.title &&\n props.individualCustomer.forename &&\n props.individualCustomer.surname\n ) &&\n !props.bankDetails.accountName\n ) {\n return getFullName(props.individualCustomer);\n }\n\n return props.bankDetails.accountName;\n};\n\nclass BankDetailsSection extends React.Component> {\n public componentDidMount() {\n const { values } = this.props;\n\n if (populateBankAccountName(values) !== values.bankDetails.accountName) {\n this.props.setFieldValue(\n \"bankDetails.accountName\",\n populateBankAccountName(values)\n );\n }\n }\n\n public render() {\n const {\n bankDetails,\n proposalCustomerQuestions: { customerPresent },\n } = this.props.values;\n const invalidBankAccount = bankDetails.FORMSTATE_invalidBankAccount;\n const accountNotFound =\n !!invalidBankAccount &&\n bankDetails.accountNumber === invalidBankAccount.accountNumber &&\n bankDetails.sortCode === invalidBankAccount.sortCode;\n\n return (\n <>\n \n \n \n \n \n \n {({ field, form }: FieldProps) => {\n return (\n \n {\n const { formattedValue } = values;\n form.setFieldValue(field.name, formattedValue);\n }}\n onBlur={() => {\n form.setFieldTouched(field.name, true);\n }}\n />\n \n );\n }}\n \n \n \n \n \n {\n [\"bank.accountNumber\", \"bank.sortCode\"].forEach((x) =>\n this.props.setFieldTouched(x as any, true, false)\n );\n return this.props.validateForm().then((errors) => {\n return (\n !errors.bankDetails ||\n (!errors.bankDetails.accountNumber &&\n !errors.bankDetails.sortCode)\n );\n });\n }}\n accountNotFound={accountNotFound}\n onBankAccountValidated={({\n isValid,\n bank,\n branch,\n accountNumber,\n sortCode,\n }) => {\n if (isValid) {\n this.props.setFieldValue(\"bankDetails.bank\", bank || null);\n this.props.setFieldValue(\n \"bankDetails.branch\",\n branch || null\n );\n } else {\n this.props.setFieldValue(\n \"bankDetails.FORMSTATE_invalidBankAccount\",\n { accountNumber, sortCode }\n );\n }\n }}\n />\n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n {customerPresent && (\n \n {(fieldProps: FieldProps) => (\n \n

Customer question

\n\n \n \n \n
\n )}\n
\n )}\n \n );\n }\n}\n\nexport default BankDetailsSection;\n","import * as React from \"react\";\nimport { capitalizeFirstLettersOnly } from \"../../../utils\";\nimport FormikEffects from \"../../Forms/FormikEffects\";\n\n/**\n * Automatically capitalizes the customer name on the proposal form\n */\nconst CapitalizeCustomerName = () => (\n {\n // Automatically capitalize the first letters of the customer name\n if (nextValues.individualCustomer) {\n [\"title\", \"forename\", \"middleName\", \"surname\"].forEach((field) => {\n const prevVal = prevValues.individualCustomer[field];\n const nextVal = nextValues.individualCustomer[field];\n if (nextVal && prevVal !== nextVal) {\n const titleCase = capitalizeFirstLettersOnly(nextVal);\n if (titleCase !== nextVal) {\n setFieldValue(`individualCustomer.${field}`, titleCase, false);\n }\n }\n });\n }\n }}\n />\n);\n\nexport default CapitalizeCustomerName;\n","import { Field, FieldProps, FormikProps } from \"formik\";\nimport * as React from \"react\";\nimport { Col, Row } from \"reactstrap\";\nimport FormGroupWrapper from \"../../Forms/FormGroupWrapper\";\nimport FormInputField from \"../../Forms/FormInputField\";\nimport { WatchFields } from \"../../Forms/MultiSectionForm\";\nimport RadioField from \"../../Forms/RadioField\";\nimport { Proposal } from \"../types\";\nimport { ContextNames } from \"../../types\";\n\nexport const dealerNotesSectionWatchFields: WatchFields = {\n salesPerson: true,\n notes: true,\n distanceSelling: true,\n};\n\nconst DealerNotesSection = (\n props: FormikProps & { context?: ContextNames }\n) => {\n const { context } = props;\n return (\n <>\n \n \n \n \n \n {({ field, form }: FieldProps) => (\n \n \n \n \n \n )}\n \n \n \n \n \n \n );\n};\n\nexport default DealerNotesSection;\n","import { FormikProps } from \"formik\";\nimport * as React from \"react\";\nimport { Alert, Button, Col, FormGroup, Row } from \"reactstrap\";\nimport { GET_DIRECT_DEAL_DEALER, useDealer } from \"../../Dealers/DealerQuery\";\nimport DealerSelect from \"../../Dealers/DealerSelect\";\nimport { WatchFields } from \"../../Forms/MultiSectionForm\";\nimport { Proposal } from \"../types\";\nimport \"./index.scss\";\nimport ProposalFormClearQuotation from \"./ProposalFormClearQuotation\";\nimport { ContextNames } from \"../../types\";\n\nexport const dealerWatchFields: WatchFields = {\n dealerId: true,\n};\n\nconst DealerSection = (\n formikProps: FormikProps & { context?: ContextNames }\n) => {\n const { setFieldTouched, setFieldValue, values, context } = formikProps;\n const { dealer } = useDealer(\n values.dealerId,\n context === ContextNames.DIRECT_DEAL ? GET_DIRECT_DEAL_DEALER : null\n );\n\n return (\n <>\n \n \n {context !== ContextNames.DIRECT_DEAL && values.quotationId ? (\n \n Dealer is fixed for this quotation{\" \"}\n \n {({ clearQuotation }) => (\n \n Clear quotation and change dealer\n \n )}\n \n \n ) : null}\n \n \n \n \n {values.quotationId && values.dealerId ? (\n dealer ? (\n

{dealer.name}

\n ) : null\n ) : (\n \n {\n setFieldTouched(\"dealerId\", true);\n setFieldValue(\"dealerId\", dealerId);\n }}\n autoFocus={true}\n />\n \n )}\n \n
\n \n );\n};\n\nexport default DealerSection;\n","import { faExternalLinkAlt } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { Field, FieldProps, FormikProps } from \"formik\";\nimport React from \"react\";\nimport { Link } from \"react-router-dom\";\nimport { Alert, Row } from \"reactstrap\";\nimport FormGroupWrapper from \"../../Forms/FormGroupWrapper\";\nimport { WatchFields } from \"../../Forms/MultiSectionForm\";\nimport RadioField from \"../../Forms/RadioField\";\nimport { Proposal } from \"../types\";\nimport { ContextNames } from \"../../types\";\n\nexport const privacySectionWatchFields: WatchFields = {\n proposalCustomerQuestions: { customerPresent: true, privacyAgreement: true },\n};\n\nconst PrivacySection = ({\n values,\n context,\n}: FormikProps & { context?: ContextNames }) => (\n <>\n {context !== ContextNames.DIRECT_DEAL && (\n \n \n \n )}\n {values.proposalCustomerQuestions.customerPresent && (\n \n

\n The personal information we have collected from you will be shared\n with fraud prevention agencies who will use it to prevent fraud and\n money-laundering and to verify your identity. If fraud is detected,\n you could be refused certain services, finance, or employment. Further\n details of how your information will be used by us and these fraud\n prevention agencies, and your data protection rights, can be found on\n our{\" \"}\n \n Terms and conditions\n {\" \"}\n page.\n

\n\n

\n As we use a soft credit search, this allows you to obtain quotes\n without affecting your credit rating. These, however, may be visible\n on your credit report but will not display the search, on you, in the\n same manner as a full credit check until you decide to proceed with a\n full application for the loan. However, searches made by external\n lenders on our panel may show on your credit profile, depending on the\n type of search they use. Should you require further information please\n review our privacy policy para.6 .{\" \"}\n \n ‘Compliance with Laws’\n {\" \"}\n

\n \n {(fieldProps: FieldProps) => (\n \n
\n {\n fieldProps.form.setFieldValue(\n fieldProps.field.name,\n !fieldProps.field.value,\n true\n );\n fieldProps.form.setFieldTouched(\n fieldProps.field.name,\n true,\n true\n );\n }}\n />\n {context === ContextNames.DIRECT_DEAL ? (\n \n I have been notified of the information above, as well as\n agreeing to the{\" \"}\n \n Privacy Policy{\" \"}\n \n {\" \"}\n \n {\" \"}\n and consent\n \n ) : (\n \n The customer has been notified of the information above, as\n well as agreeing to our{\" \"}\n \n Privacy Policy{\" \"}\n \n {\" \"}\n \n {\" \"}\n and consents\n \n )}\n
\n
\n )}\n
\n
\n )}\n \n);\n\nexport default PrivacySection;\n","import * as React from \"react\";\nimport {\n Button,\n Col,\n Modal,\n ModalBody,\n ModalFooter,\n ModalHeader,\n Row,\n} from \"reactstrap\";\nimport { DirectDeal } from \"../types\";\nimport { formatCurrency, getFullName } from \"../../../utils\";\nimport SummaryRow from \"../../shared/SummarySection/SummaryRow\";\nimport { DirectDealProps } from \"../../Forms/MultiSectionForm\";\n\nexport interface DirectDealModalProps extends DirectDealProps {\n toggle: () => void;\n toggleAlert: () => void;\n display: boolean;\n values: DirectDeal;\n disabledConfirmButton: boolean;\n}\n\nconst DirectDealModal = ({\n display,\n toggle,\n toggleAlert,\n saveDirectDeal,\n values,\n disabledConfirmButton,\n}: DirectDealModalProps) => {\n const {\n dealerName,\n title,\n forename,\n middleName,\n surname,\n customerEmail,\n vehicle,\n totalMileage,\n annualMileage,\n period,\n monthlyPayment,\n productType,\n salesPerson,\n distanceSelling,\n } = values;\n\n return (\n <>\n \n \n Direct Deal - Individual Customer\n \n \n \n \n

\n You are about to start the direct deal process for an individual\n customer. To proceed, confirm the details below are correct.\n

\n

This action cannot be undone.

\n \n
\n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n {\n toggle();\n toggleAlert();\n\n delete values.vehicle;\n delete values.totalMileage;\n delete values.annualMileage;\n delete values.period;\n delete values.monthlyPayment;\n delete values.productType;\n delete values.salesPerson;\n delete values.distanceSelling;\n\n saveDirectDeal && saveDirectDeal(values);\n }}\n >\n Confirm\n \n \n
\n \n );\n};\n\nexport default DirectDealModal;\n","import {\n faExclamationTriangle,\n faSave,\n faSpinner,\n} from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { FormikProps } from \"formik\";\nimport * as React from \"react\";\nimport { Link as RouterLink } from \"react-router-dom\";\nimport { Alert, Button } from \"reactstrap\";\nimport { getFullName, getSingleLineVehicle } from \"../../../utils\";\nimport { GET_DIRECT_DEAL_DEALER, useDealer } from \"../../Dealers/DealerQuery\";\nimport { DirectDealProps, SaveDraftProps } from \"../../Forms/MultiSectionForm\";\nimport {\n GET_LOGGED_IN_USER_SHALLOW,\n useLoggedInUser,\n} from \"../../LoggedInUserQuery\";\nimport EmailButton from \"../../shared/EmailButton\";\nimport { ContextNames, User } from \"../../types\";\nimport { Proposal } from \"../types\";\nimport { PermissionModuleNames } from \"../../Permissions/types\";\nimport DirectDealModal from \"../DirectDeals/DirectDealModal\";\nimport { useState } from \"react\";\n\ninterface DirectDealModalState {\n showDirectDealModal: boolean;\n}\n\ninterface ProposalFormHeaderProps extends SaveDraftProps, DirectDealProps {\n formikProps: FormikProps;\n loggedInUser: User;\n draftProposalId?: number;\n context?: ContextNames;\n directDealValidationMessage?: string;\n}\n\nconst ProposalFormHeader = ({\n formikProps,\n saveDraft,\n saveDirectDeal,\n savingDraft,\n draftValidationMessage,\n context,\n directDealValidationMessage,\n}: ProposalFormHeaderProps) => {\n const {\n isDealer,\n isAccountManager,\n loading: loadingUser,\n loggedInUser,\n checkCanUpdate,\n } = useLoggedInUser(\n context === ContextNames.DIRECT_DEAL ? GET_LOGGED_IN_USER_SHALLOW : null\n );\n\n const { values } = formikProps;\n const { dealer } = useDealer(\n values.dealerId,\n context === ContextNames.DIRECT_DEAL ? GET_DIRECT_DEAL_DEALER : null\n );\n\n const [modalState, setModalState] = useState({\n showDirectDealModal: false,\n });\n\n const { showDirectDealModal } = modalState;\n\n const toggleDirectDealModal = () => {\n setModalState({ showDirectDealModal: !showDirectDealModal });\n };\n\n const [showAlert, setShowAlert] = useState(false);\n const toggleAlert = () => setShowAlert(!showAlert);\n\n if (loadingUser) {\n return null;\n }\n\n if (dealer) {\n values.dealer = dealer;\n }\n\n const customerName = values.individualCustomer\n ? getFullName(values.individualCustomer)\n : values.business.name;\n\n const accountManagerEmail = dealer?.accountManager?.email;\n\n return (\n <>\n
\n

\n New proposal\n {customerName ? (\n - {customerName}\n ) : null}\n

\n
\n {context !== ContextNames.DIRECT_DEAL && dealer && !isDealer && (\n

\n \n {dealer.name}\n \n

\n )}\n {dealer?.isSuspended && (\n \n \n Dealer {dealer.name} is suspended, so new proposals cannot be\n submitted\n \n )}\n {dealer?.isOnICORegister === false && (\n \n \n Dealer {dealer.name} is not on the Information Commissioner's Office\n (ICO) register, so proposals cannot be submitted.{\" \"}\n {isDealer ? \"Please contact your Eurodrive account manager.\" : null}\n \n )}\n {loggedInUser?.canSubmitProposals === false && (\n \n \n Eurodrive is not currently accepting finance proposals. Please contact\n your account manager for more information.\n \n )}\n {context !== ContextNames.DIRECT_DEAL && (\n
\n \n \n Save as draft\n \n {!isDealer && (\n \n )}\n {!isAccountManager && (\n \n )}\n {checkCanUpdate(PermissionModuleNames.DirectDeal) &&\n values.individualCustomer ? (\n <>\n setModalState({ showDirectDealModal: true })}\n >\n Direct Deal\n \n \n {showAlert && (\n setShowAlert(false)}\n >\n The direct deal has been initiated\n \n )}\n \n ) : null}\n
\n )}\n \n );\n};\n\nexport default ProposalFormHeader;\n","import ApolloClient from \"apollo-client\";\nimport { FormikProps } from \"formik\";\nimport { get } from \"lodash\";\nimport * as React from \"react\";\nimport { withApollo, WithApolloClient } from \"react-apollo\";\nimport FormikEffects from \"../../Forms/FormikEffects\";\nimport {\n CALCULATE_ALPHERA_QUOTATION,\n CALCULATE_MANN_ISLAND_QUOTATION,\n CalculateMannIslandQuotationData,\n CalculateAlpheraQuotationData,\n} from \"../../Quotations/CalculateQuotationService\";\nimport quotationRequestValidator from \"../../Quotations/quotationRequestValidator\";\nimport { QuotationRequest } from \"../../Quotations/types\";\nimport { ProductTypeEnum } from \"../../types\";\nimport { Proposal } from \"../types\";\n\nclass ProposalFormQuotationCalculator extends React.Component<\n WithApolloClient<{}>\n> {\n private requestId = 0;\n\n public constructor(props: any) {\n super(props);\n this.handleFormChange = this.handleFormChange.bind(this);\n this.calculateQuotationValues = this.calculateQuotationValues.bind(this);\n }\n\n public render() {\n return (\n \n );\n }\n\n /** Detect changes to the proposal which will require new finance values to be calculated on the server */\n private handleFormChange(\n oldValues: Proposal,\n currentValues: Proposal,\n formikProps: FormikProps\n ) {\n if (!formikProps.dirty) {\n return;\n }\n\n const keys = [\n \"dealerId\",\n \"targetBy\",\n \"targetByValue\",\n \"vehicle.cAP\",\n \"vehicle.mileage\",\n \"vehicle.maxAnnualMileage\",\n \"vehicle.isNew\",\n \"vehicle.dateOfRegistration\",\n \"finance.period\",\n \"finance.productType\",\n \"finance.cashPrice\",\n \"finance.cashDeposit\",\n \"finance.partExchange\",\n \"finance.partExchangeSettlement\",\n \"finance.extras\",\n \"finance.rFL\",\n ];\n\n if (\n !currentValues.quotationId &&\n keys.some((k) => get(oldValues, k) !== get(currentValues, k))\n ) {\n const isMannIslandDealer = currentValues?.dealer?.isMannIslandDealer;\n\n this.calculateQuotationValues(\n this.getQuotationRequest(currentValues),\n formikProps,\n isMannIslandDealer\n );\n }\n }\n\n /** Get the variables required for getting a quotation from the server */\n private getQuotationRequest(values: Proposal): QuotationRequest {\n const { dealerId, targetBy, targetByValue } = values;\n\n const {\n period,\n productType,\n cashPrice,\n cashDeposit,\n partExchange,\n partExchangeSettlement,\n extras,\n rFL,\n } = values.finance;\n\n const { cAP, mileage, maxAnnualMileage, isNew, dateOfRegistration } =\n values.vehicle;\n\n const returnValues = {\n dealerId,\n minTerm: period,\n maxTerm: period,\n productTypes: [productType] as ProductTypeEnum[],\n cAP,\n mileage,\n maxAnnualMileage,\n isNew,\n dateOfRegistration,\n targetBy,\n targetByValue,\n cashPrice,\n cashDeposit,\n partExchange,\n partExchangeSettlement,\n extras,\n rFL,\n };\n\n if (!values.dealer?.isMultiQuote && values.dealer?.isMannIslandDealer) {\n const {\n capId,\n imported,\n regNo,\n vehicleType,\n isCommercial,\n vatQualifying,\n } = values.vehicle;\n return {\n capId: capId ? +capId : undefined,\n import: imported,\n regNo,\n vehicleType,\n usage: isCommercial ? \"commercial\" : \"Social\",\n vatQualify: vatQualifying,\n ...returnValues,\n };\n }\n\n return returnValues;\n }\n\n /** Get finance values from the server in response to changes in the form */\n private calculateQuotationValues(\n req: QuotationRequest,\n formikProps: FormikProps,\n isMannIslandDealer: Boolean = false\n ) {\n const { client } = this.props;\n const { touched, setFieldValue, setFieldTouched } = formikProps;\n\n const readOnlyFields = [\n \"monthlyPayment\",\n \"rate\",\n \"aprRate\",\n \"balloonPayment\",\n \"acceptanceFee\",\n \"optionFee\",\n ];\n\n const updateField = (field: string, value?: number | null) => {\n setFieldValue(field as any, value, false);\n setFieldTouched(field as any, true, false);\n };\n\n const clearFields = () =>\n readOnlyFields.forEach((x) =>\n setFieldValue(`finance.${x}` as any, null, false)\n );\n\n const isValid = quotationRequestValidator.isValidSync(req);\n\n if (isValid) {\n this.requestId += 1;\n const currentRequestId = this.requestId;\n\n calculateQuotation(client, isMannIslandDealer, req)\n .then(({ data: { calculateQuotationList } }) => {\n const result =\n calculateQuotationList &&\n calculateQuotationList.results.find((x) => x.term === req.maxTerm);\n const unableToQuote =\n calculateQuotationList &&\n calculateQuotationList.unableToQuote.find(\n (x) => x.term === req.maxTerm\n );\n\n // Make sure that only the results of the last issued request\n // are applied to the form.\n if (result && currentRequestId === this.requestId) {\n updateField(\"finance.monthlyPayment\", result.monthlyPayment);\n updateField(\"finance.rate\", result.flatRate);\n updateField(\"finance.aprRate\", result.aprRate);\n updateField(\"finance.balloonPayment\", result.guaranteedFutureValue);\n updateField(\"finance.acceptanceFee\", result.arrangementFee);\n updateField(\"finance.optionFee\", result.completionFee);\n } else {\n clearFields();\n }\n\n setFieldValue(\"FORMSTATE_noQuotationResults\", !result, false);\n\n setFieldValue(\n \"FORMSTATE_noQuotationResultsReasons\",\n unableToQuote ? unableToQuote.messages : null,\n false\n );\n })\n .then(() => formikProps.validateForm());\n } else {\n setFieldValue(\"FORMSTATE_noQuotationResults\", false, false);\n setFieldValue(\"FORMSTATE_noQuotationResultsReasons\", null, false);\n if (touched && touched.finance) {\n clearFields();\n }\n }\n }\n}\n\nfunction calculateQuotation(\n client: ApolloClient,\n isMannIslandDealer: Boolean,\n req: QuotationRequest\n) {\n if (isMannIslandDealer) {\n return client\n .query({\n query: CALCULATE_MANN_ISLAND_QUOTATION,\n variables: { input: req },\n })\n .then(({ data }) => {\n return {\n data: {\n calculateQuotationList: data.calculateMannIslandQuotationList,\n },\n };\n });\n }\n return client\n .query({\n query: CALCULATE_ALPHERA_QUOTATION,\n variables: { input: req },\n })\n .then(({ data }) => {\n return {\n data: {\n calculateQuotationList: data.calculateAlpheraQuotationList,\n },\n };\n });\n}\n\nexport default withApollo<{}>(ProposalFormQuotationCalculator);\n","import {\n faArrowDown,\n faExternalLinkAlt,\n} from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { Field, FieldProps, FormikErrors, FormikProps } from \"formik\";\nimport * as React from \"react\";\nimport { Alert, Col, Container, Row } from \"reactstrap\";\nimport {\n formatCurrency,\n formatEnumValue,\n getFullName,\n getMonthsAndYearsText,\n getSingleLineAddress,\n getSingleLineVehicle,\n hasAddress,\n hasBusinessDetails,\n hasDirectorDetails,\n hasEmploymentDetails,\n roundNumber,\n} from \"../../../utils\";\nimport { useDirectDealDealer } from \"../../Dealers/DealerQuery\";\nimport FormGroupWrapper from \"../../Forms/FormGroupWrapper\";\nimport { WatchFields } from \"../../Forms/MultiSectionForm\";\nimport RadioField from \"../../Forms/RadioField\";\nimport AddressRow from \"../../shared/AddressRow\";\nimport SummaryRow, {\n YesNoSummaryRow,\n} from \"../../shared/SummarySection/SummaryRow\";\nimport SummaryDisplaySection from \"../../shared/SummarySection/SummarySection\";\nimport {\n BankDetails,\n DrivingLicenseLookup,\n Individual,\n Proposal,\n ProposalFinance,\n} from \"../types\";\n\nexport const summarySectionWatchFields: WatchFields = {\n proposalCustomerQuestions: {\n customerUnderstandsAgreement: true,\n customerHappyAgreementIsGoodValue: true,\n customerAdditionalInfo: true,\n customerSaysDealerAnsweredQuestions: true,\n tNC: true,\n },\n};\n\n//#region Form fields check\n\nconst hasCustomerDetails = (customer: Individual) => {\n return (\n customer &&\n (customer.title ||\n customer.forename ||\n customer.surname ||\n customer.dOB ||\n customer.maritalStatus ||\n customer.drivingLicense ||\n customer.mobile ||\n customer.email)\n );\n};\n\nconst hasBankDetails = (bank: BankDetails) => {\n return (\n bank &&\n (bank.accountName ||\n bank.accountNumber ||\n bank.branch ||\n bank.bank ||\n bank.sortCode)\n );\n};\n\nconst hasFinanceDetails = (fin: ProposalFinance) => {\n return (\n fin &&\n (fin.rate ||\n fin.period ||\n fin.monthlyPayment ||\n fin.balloonPayment ||\n fin.partExchange ||\n fin.partExchangeSettlement ||\n fin.cashDeposit ||\n fin.cashPrice ||\n fin.productType)\n );\n};\n\nconst hasErrorsInOtherSections = (errors: FormikErrors) => {\n const errorKeys = Object.keys(errors);\n if (!errorKeys.length) {\n return false;\n }\n\n const sectionFields = [\n \"tNC\",\n \"customerUnderstandsAgreement\",\n \"customerHappyAgreementIsGoodValue\",\n \"customerAdditionalInfo\",\n \"customerSaysDealerAnsweredQuestions\",\n ];\n return !errorKeys.every((k) => sectionFields.includes(k));\n};\n\n//#endregion\n\nconst SummarySection = ({\n values,\n isValid,\n errors,\n touched,\n setFieldValue,\n setFieldTouched,\n}: FormikProps) => {\n // Direct deal query used because only dealer name is required for this page\n // If this changes, need to take direct customer permissions into account (i.e. account managers - READ)\n const { dealer, loading: dealerLoading } = useDirectDealDealer(\n values.dealerId\n );\n\n const { lenderName } = values.finance;\n\n return (\n
\n {!hasErrorsInOtherSections(errors) ? (\n window.scrollTo(0, document.body.scrollHeight)}\n >\n \n Scroll down to review the details and submit the proposal\n \n ) : (\n \n More details are required before the proposal can be submitted\n \n )}\n\n {!dealerLoading && dealer?.name ? (\n \n \n \n ) : null}\n\n {hasCustomerDetails(values.individualCustomer) ? (\n \n \n \n \n \n \n \n \n ) : null}\n\n {hasBusinessDetails(values.business) ? (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ) : null}\n\n {values.business && hasDirectorDetails(values.business.directors[0]) ? (\n \n {values.business.directors.map((director, i) => (\n \n \n \n \n \n \n \n \n \n {i === 0 && (\n \n )}\n \n \n \n \n \n ))}\n \n ) : null}\n\n {values.individualCustomer &&\n hasAddress(values.individualCustomer.homeAddresses[0]) ? (\n \n {values.individualCustomer.homeAddresses.map((address, index) => (\n
\n \n \n
\n ))}\n
\n ) : null}\n\n {values.individualCustomer &&\n hasEmploymentDetails(values.individualCustomer.employmentDetails[0]) ? (\n \n {values.individualCustomer.employmentDetails.map((value, index) => (\n
\n

\n {index > 0 ? `Previous Employer ${index}` : \"Current Employer\"}\n

\n \n \n \n \n \n \n \n {value.earnings && (\n \n )}\n\n \n \n
\n ))}\n
\n ) : null}\n\n {hasBankDetails(values.bankDetails) ? (\n \n \n \n \n \n \n \n \n ) : null}\n\n {values.vehicle &&\n (values.vehicle.make ||\n values.vehicle.model ||\n values.vehicle.derivative) ? (\n \n \n \n \n \n \n ) : null}\n\n {hasFinanceDetails(values.finance) ? (\n \n \n \n \n \n \n \n \n \n \n {!dealer?.isMultiQuote && (\n \n )}\n {dealer?.isMultiQuote && (\n \n )}\n \n ) : null}\n\n {values.notes || values.salesPerson ? (\n \n \n \n \n ) : null}\n \n \n \n {values.proposalCustomerQuestions.customerPresent && (\n
\n

Customer questions

\n \n \n \n\n \n \n \n \n \n \n\n \n \n \n {[\n \"customerSaysDealerAnsweredQuestions\",\n \"customerAdditionalInfo\",\n \"customerHappyAgreementIsGoodValue\",\n \"customerUnderstandsAgreement\",\n ].some((x) => (values as any)[x] === false) && (\n

\n Please ensure you explain the responsibilities of a secured\n finance agreement to the customer\n

\n )}\n
\n )}\n\n \n {(fieldProps: FieldProps) => (\n \n \n \n
\n {\n fieldProps.form.setFieldValue(\n fieldProps.field.name,\n !fieldProps.field.value,\n true\n );\n fieldProps.form.setFieldTouched(\n fieldProps.field.name,\n true,\n true\n );\n }}\n />\n \n I have read and accept the{\" \"}\n \n Terms and Conditions{\" \"}\n \n {\" \"}\n \n \n \n
\n
\n \n
\n )}\n
\n \n
\n
\n
\n );\n};\n\nexport default SummarySection;\n","import debounce from \"debounce-promise\";\nimport {\n Formik,\n FormikProps,\n FormikTouched,\n InjectedFormikProps,\n} from \"formik\";\nimport memoizeOne from \"memoize-one\";\nimport * as React from \"react\";\nimport { Prompt, RouteComponentProps, withRouter } from \"react-router\";\nimport { compose } from \"recompose\";\nimport MultiSectionForm, {\n CreateOrUpdateMode,\n DirectDealProps,\n FormSectionInfo,\n SaveDraftProps,\n} from \"../../Forms/MultiSectionForm\";\nimport { LoggedInUserProps, withLoggedInUser } from \"../../LoggedInUserQuery\";\nimport { ContextNames, RecursivePartial, UserRoles } from \"../../types\";\nimport { DraftProposalFormData } from \"../DraftProposals/DraftProposalService\";\nimport {\n DirectDeal,\n DraftProposal,\n Proposal,\n ProposalFormSectionName,\n ProposalType,\n} from \"../types\";\nimport BankDetailsSection, {\n bankDetailsSectionWatchFields,\n} from \"./BankDetailsSection\";\nimport BusinessDetailsSection, {\n businessDetailsWatchFields,\n} from \"./BusinessDetailsSection\";\nimport CapitalizeCustomerName from \"./CapitalizeCustomerName\";\nimport DealerNotesSection, {\n dealerNotesSectionWatchFields,\n} from \"./DealerNotesSection\";\nimport DealerSection, { dealerWatchFields } from \"./DealerSection\";\nimport DirectorsSection, {\n directorsSectionWatchFields,\n} from \"./DirectorsSection\";\nimport EmploymentHistorySection, {\n employmentHistorySectionWatchFields,\n} from \"./EmploymentHistorySection\";\nimport FinanceSection, { financeSectionWatchFields } from \"./FinanceSection\";\nimport HomeAddressHistorySection, {\n homeAddressHistoryWatchFields,\n} from \"./HomeAddressHistorySection\";\nimport \"./index.scss\";\nimport IndividualCustomerSection, {\n individualCustomerWatchFields,\n} from \"./IndividualCustomerSection\";\nimport {\n EMPLOYERS_MAX_REQUIRED,\n EMPLOYERS_YEARS_REQUIRED,\n INDIVIDUAL_ADDRESS_MAX_REQUIRED,\n INDIVIDUAL_ADDRESS_YEARS_REQUIRED,\n} from \"./individualCustomerValidationSchema\";\nimport PrivacySection, { privacySectionWatchFields } from \"./PrivacySection\";\nimport ProposalFormHeader from \"./ProposalFormHeader\";\nimport ProposalFormQuotationCalculator from \"./ProposalFormQuotationCalculator\";\nimport proposalValidationSchema from \"./proposalValidationSchema\";\nimport ProposalVehicleSection, {\n proposalVehicleSectionWatchFields,\n} from \"./ProposalVehicleSection\";\nimport SummarySection, { summarySectionWatchFields } from \"./SummarySection\";\n\nexport interface ProposalFormInitialValues {\n initialValues: Proposal;\n initialSection?: ProposalFormSectionName;\n initialTouched?: FormikTouched;\n proposalType?: ProposalType;\n}\n\ninterface ProposalFormProps extends ProposalFormInitialValues {\n showDealerSelect?: boolean;\n isIndividual?: boolean;\n proposal?: RecursivePartial;\n draftProposalLastSaved?: string;\n context?: ContextNames;\n saveDraft: (formData: DraftProposalFormData) => Promise;\n onSubmitProposal: (proposal: Proposal) => Promise;\n sendDirectDeal: (directDeal: DirectDeal) => Promise;\n}\n\ntype ProposalFormPropsEnhanced = InjectedFormikProps<\n ProposalFormProps & LoggedInUserProps & RouteComponentProps,\n Proposal\n>;\n\nconst proposalFormSections: FormSectionInfo[] = [\n {\n id: ProposalFormSectionName.PRIVACY,\n title: \"Privacy agreement\",\n component: PrivacySection,\n watchFields: privacySectionWatchFields,\n },\n {\n id: ProposalFormSectionName.DEALER,\n title: \"Dealer\",\n component: DealerSection,\n watchFields: dealerWatchFields,\n },\n {\n id: ProposalFormSectionName.CUSTOMER_DETAILS,\n title: \"Customer details\",\n component: IndividualCustomerSection,\n watchFields: individualCustomerWatchFields,\n },\n {\n id: ProposalFormSectionName.BUSINESS_DETAILS,\n title: \"Business details\",\n component: BusinessDetailsSection,\n watchFields: businessDetailsWatchFields,\n },\n {\n id: ProposalFormSectionName.DIRECTORS,\n title: \"Directors details\",\n component: DirectorsSection,\n watchFields: directorsSectionWatchFields,\n },\n {\n id: ProposalFormSectionName.HOME_ADDRESSES,\n title: \"Home address\",\n subtitle: `Home addresses from the last ${INDIVIDUAL_ADDRESS_YEARS_REQUIRED} years required, up to ${INDIVIDUAL_ADDRESS_MAX_REQUIRED} addresses`,\n component: HomeAddressHistorySection,\n watchFields: homeAddressHistoryWatchFields,\n },\n {\n id: ProposalFormSectionName.BANK_DETAILS,\n title: \"Bank details\",\n component: BankDetailsSection,\n watchFields: bankDetailsSectionWatchFields,\n },\n {\n id: ProposalFormSectionName.EMPLOYMENT_HISTORY,\n title: \"Employer\",\n subtitle: `Employer details from the last ${EMPLOYERS_YEARS_REQUIRED} years required, up to ${EMPLOYERS_MAX_REQUIRED} employers`,\n component: EmploymentHistorySection,\n watchFields: employmentHistorySectionWatchFields,\n },\n {\n id: ProposalFormSectionName.VEHICLE,\n title: \"Vehicle\",\n component: ProposalVehicleSection,\n watchFields: proposalVehicleSectionWatchFields,\n },\n {\n id: ProposalFormSectionName.FINANCE,\n title: \"Finance\",\n component: FinanceSection,\n watchFields: financeSectionWatchFields,\n },\n {\n id: ProposalFormSectionName.DEALERNOTES,\n title: \"Dealer notes\",\n component: DealerNotesSection,\n watchFields: dealerNotesSectionWatchFields,\n },\n {\n id: ProposalFormSectionName.SUMMARY,\n title: \"Summary\",\n component: SummarySection,\n watchFields: summarySectionWatchFields,\n },\n];\n\nclass ProposalForm extends React.Component<\n ProposalFormPropsEnhanced,\n { section?: string; savingDraft: boolean }\n> {\n /**\n * Field to store the formik setTouched function,\n * so it can be used to set the initial touched values in componentDidMount\n */\n private setTouched: any;\n\n constructor(props: ProposalFormPropsEnhanced) {\n super(props);\n this.getSections = memoizeOne(this.getSections.bind(this));\n this.handleSaveDraft = debounce(this.handleSaveDraft.bind(this), 3000, {\n leading: true,\n });\n this.handleSaveDirectDeal = debounce(\n this.handleSaveDirectDeal.bind(this),\n 3000,\n {\n leading: true,\n }\n );\n this.getDraftProposalValidationMessage =\n this.getDraftProposalValidationMessage.bind(this);\n this.handleSectionChanged = this.handleSectionChanged.bind(this);\n this.getDirectDealValidationMessage =\n this.getDirectDealValidationMessage.bind(this);\n this.state = { section: this.props.initialSection, savingDraft: false };\n }\n\n public render() {\n const {\n loggedInUser,\n onSubmitProposal,\n showDealerSelect,\n isIndividual,\n draftProposalLastSaved,\n initialValues,\n } = this.props;\n\n const { savingDraft } = this.state;\n\n if (!loggedInUser) {\n return null;\n }\n\n const isDealer = loggedInUser.roles.includes(UserRoles.dealer);\n const activeSection = this.state.section;\n\n return (\n \n onSubmitProposal(values).then(() => setSubmitting(false))\n }\n validateOnChange={false}\n isInitialValid={({ proposal }: any) => !!(proposal && proposal.id)}\n validationSchema={proposalValidationSchema}\n >\n {(formikProps) => {\n this.setTouched = formikProps.setTouched;\n\n const saveDraftProps: SaveDraftProps = {\n saveDraft: () => this.handleSaveDraft(formikProps),\n draftLastSaved: draftProposalLastSaved,\n savingDraft,\n draftValidationMessage: this.getDraftProposalValidationMessage(\n formikProps.values\n ),\n };\n\n const directDealProps: DirectDealProps = {\n saveDirectDeal: (directDeal: DirectDeal) =>\n this.handleSaveDirectDeal(formikProps, directDeal),\n directDealValidationMessage: this.getDirectDealValidationMessage(\n formikProps.values\n ),\n };\n\n return (\n <>\n \n \n \n \n \n \n );\n }}\n \n );\n }\n\n public componentDidMount() {\n if (this.props.initialTouched && this.setTouched) {\n this.setTouched(this.props.initialTouched);\n }\n }\n\n public componentWillUnmount() {\n this.setTouched = undefined;\n }\n\n private handleSectionChanged(section: string) {\n this.setState({ section });\n }\n\n /** Indicates whether the draft proposal can be saved */\n private getDraftProposalValidationMessage(\n values: Proposal\n ): string | undefined {\n const missingFields = [];\n if (!values.dealerId) {\n missingFields.push(\"dealer\");\n }\n if (\n values.individualCustomer &&\n !values.individualCustomer.forename &&\n !values.individualCustomer.surname\n ) {\n missingFields.push(\"customer name\");\n }\n if (values.business && !values.business.name) {\n missingFields.push(\"business name\");\n }\n\n if (missingFields.length) {\n return `Requires ${missingFields.join(\" and \")} to save as draft`;\n }\n\n return undefined;\n }\n\n /**\n * Save the current form state to the server as a draft.\n * Redirects to the draft proposal url if it is being created for the first time.\n */\n private handleSaveDraft({ values, errors, touched }: FormikProps) {\n const { saveDraft, history, initialValues } = this.props;\n const { section: currentSection } = this.state;\n\n const formData = {\n values,\n initialValues,\n errors,\n touched,\n currentSection,\n };\n\n this.setState({ savingDraft: true });\n\n return saveDraft(formData).then((result) => {\n if (result && this.props.context !== ContextNames.DIRECT_DEAL) {\n history.push(`/proposals/drafts/${result.id}`);\n }\n this.setState({ savingDraft: false });\n });\n }\n\n private handleSaveDirectDeal(\n { values, errors, touched }: FormikProps,\n directDeal: DirectDeal\n ) {\n const { saveDraft, sendDirectDeal, history, initialValues } = this.props;\n\n const formData = {\n values,\n initialValues,\n errors,\n touched,\n };\n\n this.setState({ savingDraft: true });\n\n return saveDraft(formData).then((result) => {\n if (result) {\n history.push(`/proposals/drafts/${result.id}`);\n directDeal.draftProposalId = result.id;\n\n sendDirectDeal(directDeal);\n }\n\n this.setState({ savingDraft: false });\n });\n }\n\n /** Get a filtered collection of form sections */\n private getSections(showDealerSelect?: boolean, isIndividual?: boolean) {\n const omitSections: ProposalFormSectionName[] = [];\n if (!showDealerSelect) {\n omitSections.push(ProposalFormSectionName.DEALER);\n }\n if (!isIndividual) {\n omitSections.push(\n ProposalFormSectionName.CUSTOMER_DETAILS,\n ProposalFormSectionName.HOME_ADDRESSES,\n ProposalFormSectionName.EMPLOYMENT_HISTORY\n );\n } else {\n omitSections.push(\n ProposalFormSectionName.BUSINESS_DETAILS,\n ProposalFormSectionName.DIRECTORS\n );\n }\n return proposalFormSections.filter(\n (section) => !omitSections.includes(section.id as ProposalFormSectionName)\n );\n }\n\n private getDirectDealValidationMessage(values: Proposal): string | undefined {\n const missingFields = [];\n if (!values.dealerId) {\n missingFields.push(\"dealer\");\n }\n if (\n values.individualCustomer &&\n (!values.individualCustomer.forename ||\n !values.individualCustomer.surname)\n ) {\n missingFields.push(\"customer name\");\n }\n if (values.individualCustomer && !values.individualCustomer.email) {\n missingFields.push(\"customer email\");\n }\n if (\n !values.vehicle.regNo ||\n !values.vehicle.mileage ||\n !values.vehicle.maxAnnualMileage\n ) {\n missingFields.push(\"vehicle details\");\n }\n if (\n !values.finance.cashPrice ||\n !values.finance.aprRate ||\n !values.finance.period ||\n !values.finance.productType\n ) {\n missingFields.push(\"finance details\");\n }\n if (!values.salesPerson) {\n missingFields.push(\"sales person\");\n }\n if (values.distanceSelling === undefined) {\n missingFields.push(\"type of sales transaction\");\n }\n\n if (missingFields.length) {\n return `Requires ${missingFields.join(\n \" and \"\n )} before issuing direct deal`;\n }\n\n return undefined;\n }\n}\n\nexport default compose(\n withRouter,\n withLoggedInUser\n)(ProposalForm);\n","import * as React from \"react\";\nimport gql from \"graphql-tag\";\nimport { DirectDeal } from \"../types\";\nimport { DirectDealFragment } from \"../fragments\";\nimport { Query, QueryResult } from \"react-apollo\";\n\ninterface DirectDealData {\n directDeal: DirectDeal;\n}\n\ninterface DirectDealVariables {\n directDealId?: string;\n}\n\nexport const GET_DIRECT_DEAL = gql`\n query DirectDealQuery($directDealId: String!) {\n directDeal(id: $directDealId) {\n ...DirectDealFragment\n }\n }\n ${DirectDealFragment}\n`;\n\nconst DirectDealQuery = ({\n children,\n directDealId,\n query,\n}: DirectDealVariables & {\n children: (\n result: QueryResult & {\n directDeal?: DirectDeal;\n }\n ) => JSX.Element | null;\n query?: any;\n}) => (\n \n query={query || GET_DIRECT_DEAL}\n variables={{ directDealId }}\n skip={!directDealId}\n >\n {(result) =>\n children({\n ...result,\n directDeal: result?.data?.directDeal,\n })\n }\n \n);\n\nexport default DirectDealQuery;\n","import gql from \"graphql-tag\";\nimport {\n Mutation,\n MutationFunction,\n MutationResult,\n useMutation,\n} from \"react-apollo\";\nimport { DirectDeal } from \"../types\";\nimport * as React from \"react\";\n\nexport interface DirectDealData {\n success: boolean;\n}\n\nexport interface DirectDealVariables {\n input: DirectDeal;\n}\n\nexport const CREATE_OR_UPDATE_DIRECT_DEAL = gql`\n mutation CreateOrUpdateDirectDeal($input: DirectDealInput) {\n createOrUpdateDirectDeal(input: $input) {\n success\n }\n }\n`;\n\nconst CreateOrUpdateDirectDeal = ({\n children,\n}: {\n children: (\n mutationFunction: MutationFunction,\n result: MutationResult\n ) => JSX.Element | null;\n}) => {children};\n\nexport const useCreateOrUpdateDirectDeal = () => {\n const [createOrUpdateDirectDeal] = useMutation<\n DirectDealData,\n DirectDealVariables\n >(CREATE_OR_UPDATE_DIRECT_DEAL);\n return createOrUpdateDirectDeal;\n};\n\nexport default CreateOrUpdateDirectDeal;\n","import * as React from \"react\";\nimport DirectDealQuery from \"./DirectDealQuery\";\nimport CreateOrUpdateDirectDealMutation, {\n DirectDealData,\n DirectDealVariables,\n} from \"./CreateOrUpdateDirectDealMutation\";\nimport { DirectDeal, Proposal } from \"../types\";\nimport { FormikErrors, FormikTouched } from \"formik\";\nimport { MutationFunction } from \"react-apollo\";\n\ninterface DirectDealServiceProps {\n directDeal?: DirectDeal;\n loading?: boolean;\n sendDirectDeal: (directDeal: DirectDeal) => Promise;\n}\n\ninterface DirectDealServiceOuterProps {\n directDealId?: string;\n children: (props: DirectDealServiceProps) => JSX.Element | null;\n}\n\nexport interface DirectDealFormData {\n values: Proposal;\n initialValues: Proposal;\n errors: FormikErrors;\n touched: FormikTouched;\n currentSection?: string;\n}\n\nconst DirectDealService = ({\n directDealId,\n children,\n}: DirectDealServiceOuterProps) => {\n return (\n \n {({ directDeal, loading }) => {\n return (\n \n {(mutationFunction) =>\n children({\n directDeal,\n loading,\n sendDirectDeal: (directDeal) =>\n sendDirectDeal(mutationFunction, directDeal),\n })\n }\n \n );\n }}\n \n );\n};\n\nconst sendDirectDeal = (\n mutate: MutationFunction,\n directDeal: DirectDeal\n) => {\n return mutate({ variables: { input: directDeal } }).then((result) => {\n const directDealResult = result && result.data && result.data.success;\n\n if (!directDealResult) {\n return;\n }\n\n return directDealResult;\n });\n};\n\nexport default DirectDealService;\n","import * as Yup from \"yup\";\nimport { DirectDeal } from \"../types\";\n\nconst IDDValidationSchema = Yup.object().shape({\n iddSigned: Yup.boolean()\n .required(\"This box must be checked in order to proceed\")\n .default(false)\n .nullable(true)\n .oneOf([true], \"This box must be checked in order to proceed\"),\n printName: Yup.string()\n .required(\"Print your full name to accept and continue\")\n .default(undefined)\n .nullable(true)\n .typeError(\"This field can only contain letters\"),\n});\n\nexport default IDDValidationSchema;\n","import { Field, FieldProps, Formik } from \"formik\";\nimport * as React from \"react\";\nimport { Button, Col, Container, Form, Row } from \"reactstrap\";\nimport FormGroupWrapper from \"../../Forms/FormGroupWrapper\";\nimport { DirectDeal } from \"../types\";\nimport { useCreateOrUpdateDirectDeal } from \"./CreateOrUpdateDirectDealMutation\";\nimport { GET_DIRECT_DEAL } from \"./DirectDealQuery\";\nimport FormInputField from \"../../Forms/FormInputField\";\nimport IDDValidationSchema from \"./IDDValidationSchema\";\nimport { cleanFormData } from \"../../../utils\";\nimport { defaults } from \"lodash\";\nimport \"./index.scss\";\n\nconst IDDForm = ({ directDeal }: { directDeal: DirectDeal }) => {\n const mutation = useCreateOrUpdateDirectDeal();\n\n return (\n \n \n \n

Important: Please Read

\n \n
\n \n \n

Initial Disclosure Document

\n \n
\n \n \n This ‘Initial Disclosure Document’ is provided to help you decide\n whether our services are suitable for you, to let you know more about\n how we make our money, what to do if you have any concerns or\n complaints and how your information is used.\n \n \n
\n \n \n
Who Are We?
\n Eurodrive Motor Finance is a trading style of European Vehicle\n Contracts Ltd, with a company registration number of 06532275. Our\n registered address is European House, 9 Apex Business Village,\n Newcastle upon Tyne, NE23 7BF. We are authorised and regulated by the\n Financial Conduct Authority for credit brokerage. Our FCA number is\n 649225. We act as a broker, not a lender.\n \n
\n
\n \n \n
\n What can we do to help finance your purchase?\n
\n We work with a number of carefully selected credit providers who may\n be able to offer you finance for your purchase. Please note we and\n these providers will perform checks with Credit Reference and Fraud\n Prevention agencies. We are only able to offer finance products from\n these providers who may offer us an commission to do so.\n \n
\n
\n \n \n This commission is fixed and will never impact the rate you receive.\n We will not charge you any fee for our services. All Finance is\n subject to terms and circumstance.\n \n \n
\n \n \n
\n Can we give you independent financial advice?\n
\n No, we are not independent financial advisers and are unable to give\n you independent financial advice. We will provide you with all the\n information in a clear, transparent manner to allow you to make an\n informed decision.\n \n
\n
\n \n \n
\n What can you do if you wish to complain about our services?\n
\n Eurodrive Motor Finance takes all complaints seriously. If you are\n unhappy with the service you have received, please contact us by\n telephone and we will endeavor to resolve the matter straight away.\n Alternatively, if you want to write to us, please send your complaint\n to: Complaints Department, Eurodrive Motor Finance, European House 9\n Apex Business Village, Annitsford. Newcastle upon Tyne NE23 7BF\n \n
\n
\n \n \n You have the right to refer any unresolved complaint to the Financial\n Ombudsman Service, Exchange Tower, Harbour Exchange Square, Isle of\n Dogs, London E14 9SR\n \n \n
\n \n \n
\n Web:{\" \"}\n \n www.financial-ombudsman.org.uk\n \n
\n \n
Telephone: 02079 641 000
\n
Fax: 020 7964 1001
\n \n
\n
\n \n \n
Your Affordability
\n It is extremely important that you look into finance options that are\n suitable for your current (and potential future) financial situation.\n Our team will go over all your details to ensure we have the correct\n information to pass onto our lenders, who will then try to verify the\n information. However, please note that evidence of your income may be\n requested. If you are aware or suspect that your financial position\n will change in the future, you must inform us. Your credit rating\n could be adversely affected if you do not make payments when due.\n \n
\n
\n \n \n
How do we use your information?
\n In order to process your application, you will need to provide us with\n some of your personal information. We pride ourselves on handling your\n information in the most secure and professional way we can. Your data\n will not be processed without your explicit consent for us to do so.\n Therefore, if you do not wish for your application to be processed, we\n kindly ask that this is not submitted. As mentioned above, your\n information will be passed over to our finance providers in order to\n try to obtain you a finance acceptance. Whilst we have assessed the\n providers we work with; we have included their information within our\n privacy policy so you can fully research how they will use your\n information.\n \n
\n
\n \n \n For further detail on how your information is used by us and who it\n will be shared with, please view our privacy policy{\" \"}\n \n here\n \n .\n \n \n
\n \n Our ICO number is Z2537167.\n \n
\n {\n const rawValues = cleanFormData(values);\n const { id } = rawValues;\n return mutation({\n variables: { input: rawValues },\n refetchQueries: [\n {\n query: GET_DIRECT_DEAL,\n variables: { directDealId: id },\n },\n ],\n });\n }}\n validateOnChange={false}\n validationSchema={IDDValidationSchema}\n >\n {(formikProps) => (\n {\n formikProps.handleSubmit(e);\n }}\n >\n <>\n \n {(fieldProps: FieldProps) => (\n \n
\n {\n fieldProps.form.setFieldValue(\n fieldProps.field.name,\n !fieldProps.field.value,\n true\n );\n fieldProps.form.setFieldTouched(\n fieldProps.field.name,\n true,\n true\n );\n }}\n />\n \n I have read the above document and agree to proceed\n \n
\n
\n )}\n
\n \n \n \n \n \n \n )}\n \n
\n );\n};\n\nexport default IDDForm;\n","import { FormikTouched } from \"formik\";\nimport { merge } from \"lodash\";\nimport * as React from \"react\";\nimport Helmet from \"react-helmet\";\nimport { Route, RouteComponentProps, withRouter } from \"react-router\";\nimport { Container } from \"reactstrap\";\nimport { compose } from \"recompose\";\nimport { convertNumber } from \"../../utils\";\nimport { cleanProposalBeforeSubmit } from \"../Forms/utils\";\nimport { LoggedInUserProps, withLoggedInUser } from \"../LoggedInUserQuery\";\nimport PageNotFound from \"../PageNotFound\";\nimport ProposalQuotationQuery from \"../Quotations/ProposalQuotationQuery\";\nimport SceneLoadingSpinner from \"../SceneLoadingSpinner\";\nimport { ContextNames, UserRoles } from \"../types\";\nimport CreateProposalMutation from \"./CreateProposalMutation\";\nimport DraftProposalService from \"./DraftProposals/DraftProposalService\";\nimport { ProposalFragment } from \"./fragments\";\nimport ProposalBreadcrumbs from \"./ProposalBreadcrumbs\";\nimport ProposalForm from \"./ProposalForm\";\nimport businessCustomerValidationSchema from \"./ProposalForm/businessCustomerValidationSchema\";\nimport individualCustomerValidationSchema from \"./ProposalForm/individualCustomerValidationSchema\";\nimport proposalValidationSchema from \"./ProposalForm/proposalValidationSchema\";\nimport { PROPOSAL_LIST } from \"./ProposalList/ProposalListQuery\";\nimport {\n EarningsFrequency,\n EmploymentTypesRequiringEmployerName,\n Proposal,\n ProposalFormSectionName,\n ProposalType,\n} from \"./types\";\nimport DirectDealService from \"./DirectDeals/DirectDealService\";\nimport IDDForm from \"./DirectDeals/IDDForm\";\n\ntype CreateProposalSceneProps = RouteComponentProps<{\n dealerId?: string;\n proposalType?: string;\n draftProposalId?: string;\n quotationId?: string;\n directDealId?: string;\n}> &\n LoggedInUserProps;\n\nconst CreateProposalScene = ({\n history,\n match,\n loggedInUser,\n}: CreateProposalSceneProps) => {\n if (!loggedInUser) {\n return null;\n }\n\n let draftProposalId = match.params.draftProposalId\n ? parseInt(match.params.draftProposalId, 10)\n : undefined;\n\n const loggedInDealerId =\n loggedInUser &&\n loggedInUser.dealer &&\n loggedInUser.roles.includes(UserRoles.dealer)\n ? loggedInUser.dealer.id\n : undefined;\n\n const dealerId =\n loggedInDealerId ||\n (match.params.dealerId ? convertNumber(match.params.dealerId) : undefined);\n\n const accountManagerId =\n loggedInUser &&\n loggedInUser.accountManager &&\n loggedInUser.accountManager.id;\n\n const quotationId = match.params.quotationId\n ? parseInt(match.params.quotationId, 10)\n : undefined;\n\n const directDealId = match.params.directDealId;\n\n const context = directDealId ? ContextNames.DIRECT_DEAL : undefined;\n\n return (\n \n \n {context !== ContextNames.DIRECT_DEAL && }\n \n {({ directDeal, loading: directDealLoading, sendDirectDeal }) => {\n if (directDeal) {\n if (!directDeal.iddSigned) {\n return ;\n }\n draftProposalId = directDeal.draftProposalId;\n } else if (\n !directDeal &&\n context === ContextNames.DIRECT_DEAL &&\n !directDealLoading\n ) {\n return ;\n }\n\n return (\n \n {({\n draftProposal,\n draftProposalInitialValues,\n loading: draftProposalLoading,\n saveDraft,\n }) => {\n if (directDealLoading || draftProposalLoading) {\n return ;\n }\n\n // Get the proposal type from the draft proposal, or from the\n // route values if there is no draft proposal\n const proposalType =\n draftProposalInitialValues &&\n draftProposalInitialValues.proposalType\n ? draftProposalInitialValues.proposalType\n : match.params.proposalType\n ? (match.params.proposalType.toUpperCase() as ProposalType)\n : (ProposalType.BUSINESS as ProposalType);\n return (\n \n {({\n quotationInitialValues,\n loading: quotationLoading,\n }) => {\n if (draftProposalLoading || quotationLoading) {\n return ;\n }\n\n if (\n (quotationId && !quotationInitialValues) ||\n (draftProposalId && !draftProposalInitialValues)\n ) {\n return ;\n }\n\n // Create a set of default values for all proposals\n let initialValues = merge(\n {},\n proposalValidationSchema.default() as Proposal,\n {\n individualCustomer:\n proposalType === ProposalType.INDIVIDUAL\n ? individualCustomerValidationSchema.default()\n : undefined,\n business:\n proposalType === ProposalType.INDIVIDUAL\n ? undefined\n : businessCustomerValidationSchema.default(),\n },\n {\n dealerId,\n accountManagerId,\n directDealId:\n context === ContextNames.DIRECT_DEAL &&\n proposalType === ProposalType.INDIVIDUAL\n ? directDealId\n : null,\n }\n );\n\n let initialSection: ProposalFormSectionName | undefined;\n let initialTouched: FormikTouched | undefined;\n\n if (draftProposalInitialValues) {\n // Merge in draft proposal data\n initialValues = merge(\n {},\n initialValues,\n draftProposalInitialValues.initialValues\n );\n initialSection =\n context !== ContextNames.DIRECT_DEAL\n ? draftProposalInitialValues.initialSection\n : undefined;\n initialTouched =\n context !== ContextNames.DIRECT_DEAL\n ? draftProposalInitialValues.initialTouched\n : undefined;\n } else if (quotationInitialValues) {\n // Merge in quotation data\n initialValues = merge(\n {},\n initialValues,\n quotationInitialValues.initialValues\n );\n }\n\n // Set the initial value for isRegUnknown\n if (initialValues.vehicle) {\n initialValues.vehicle.isRegUnknown =\n !initialValues.vehicle.regNo &&\n !!initialValues.vehicle.cAP;\n }\n\n initialValues.individualCustomer?.employmentDetails?.forEach(\n (employment) => {\n // Manually add the \"EarningsPer\" field to employers if necessary\n employment.earningsPer =\n employment.earningsPer || EarningsFrequency.YEARLY;\n\n // Remove the employer address if it is not required,\n // so it does not fail validation\n const requiresEmployerAddress =\n !employment.employmentType ||\n EmploymentTypesRequiringEmployerName.some(\n (x) => x === employment.employmentType\n );\n\n if (!requiresEmployerAddress) {\n (employment.address as any) = null;\n }\n }\n );\n\n return (\n \n {(mutation, { client }) => (\n <>\n \n\n {\n return sendDirectDeal(directDeal);\n }}\n draftProposalLastSaved={\n draftProposal && draftProposal.updated\n }\n onSubmitProposal={(submitted) => {\n const variables = {\n input: cleanProposalBeforeSubmit(submitted),\n };\n return context !== ContextNames.DIRECT_DEAL\n ? mutation({\n variables,\n refetchQueries: [\n {\n query: PROPOSAL_LIST,\n variables: {\n input: { page: 1, pageSize: 10 },\n },\n },\n ],\n }).then((result) => {\n if (result && result.data) {\n const created =\n result.data.createProposal;\n if (created) {\n client?.writeFragment({\n id: (\n created.proposalRef || \"\"\n ).toString(),\n fragment: ProposalFragment,\n data: created,\n fragmentName: \"ProposalFragment\",\n });\n history.push(\n `/proposals/${created.proposalRef}`\n );\n }\n }\n })\n : mutation({\n variables,\n }).then((result) => {\n if (result && result.data) {\n const created =\n result.data.createProposal;\n if (created) {\n history.push(\n `/directdeal/completed`\n );\n }\n }\n });\n }}\n />\n \n )}\n \n );\n }}\n \n );\n }}\n \n );\n }}\n \n \n );\n};\n\nexport default compose(\n withLoggedInUser,\n withRouter\n)(CreateProposalScene);\n","import * as React from \"react\";\nimport FlipMove from \"react-flip-move\";\nimport {\n Badge,\n Button,\n Card,\n CardBody,\n CardHeader,\n CardTitle,\n} from \"reactstrap\";\nimport { formatCurrency } from \"../../../utils\";\nimport {\n QuotationListResult,\n QuotationResults,\n QuotationTargetBy,\n} from \"../types\";\n\nexport interface QuotationResultListProps {\n className?: string;\n quotationListResult?: QuotationListResult;\n targetBy?: QuotationTargetBy;\n showCommission?: boolean;\n loading?: boolean;\n onSelectResult: (result: QuotationResults | null) => void;\n onSelectMoreInfo: (errorMessage: string | null) => void;\n headerText?: string;\n}\nexport interface QuotationResultListItemProps {\n result: QuotationResults;\n lowestPayment?: number;\n lowestProductPayment?: number;\n targetBy?: QuotationTargetBy;\n showCommission?: boolean;\n loading?: boolean;\n onSelectResult: () => void;\n}\n\nconst MAX_PCP_TERM = 49;\n\nconst getLowestPayment = (results?: QuotationResults[]) =>\n results &&\n results.reduce((prev: number, r: QuotationResults) => {\n return prev > 0 ? Math.min(prev, r.monthlyPayment) : r.monthlyPayment;\n }, 0);\n\nconst QuotationResultCard = ({\n result: {\n id,\n productType,\n term,\n monthlyPayment,\n guaranteedFutureValue,\n aprRate,\n flatRate,\n commissionCode,\n },\n showCommission,\n onSelectResult,\n lowestPayment,\n lowestProductPayment,\n targetBy,\n}: QuotationResultListItemProps) => {\n return (\n \n \n \n {productType} finance, {term} months\n \n \n \n

\n {term} monthly payments: {formatCurrency(monthlyPayment)}{\" \"}\n {monthlyPayment === lowestProductPayment &&\n targetBy !== QuotationTargetBy.MONTHLY_PAYMENT ? (\n \n Lowest {monthlyPayment !== lowestPayment ? productType : \"\"}\n \n ) : null}\n

\n

\n Balloon payment: {formatCurrency(guaranteedFutureValue)}\n

\n

\n APR: {(Math.round(aprRate * 100) / 100).toFixed(2)}%\n

\n

\n Flat rate: {(Math.round(flatRate * 100) / 100).toFixed(2)}%\n

\n {showCommission ? (\n

Scheme code: {commissionCode}

\n ) : null}{\" \"}\n {\n e.preventDefault();\n onSelectResult();\n }}\n >\n Show details\n \n
\n \n );\n};\n\nconst QuotationResultList: React.SFC = ({\n className,\n quotationListResult,\n onSelectResult,\n onSelectMoreInfo,\n targetBy,\n showCommission,\n loading,\n headerText,\n}: QuotationResultListProps) => {\n if (!quotationListResult) {\n return null;\n }\n\n let termResults = quotationListResult.results;\n termResults = termResults.filter(\n (r) => r.productType !== \"PCP\" || r.term <= MAX_PCP_TERM\n );\n\n const lowestPayment = getLowestPayment(termResults) || 0;\n return (\n
\n
{headerText}
\n \n {[\"PCP\", \"LP\", \"HP\"].map((productType) => {\n const results =\n termResults.filter((x) => x.productType === productType) || [];\n\n const lowestProductPayment = getLowestPayment(results);\n\n const unableToQuoteList =\n quotationListResult.unableToQuote.filter(\n (x) => x.productType === productType\n ) || [];\n\n return results.length || unableToQuoteList.length ? (\n
\n {results.map((result) => (\n onSelectResult(result)}\n loading={loading}\n targetBy={targetBy}\n />\n ))}\n {unableToQuoteList.length ? (\n \n \n

\n Could not quote for some {productType} products\n

\n
    \n {unableToQuoteList.map(({ term, messages }) => (\n
  • \n

    \n {productType} finance, {term} months\n

    \n {messages.map((message) => (\n

    {message}

    \n ))}\n {\n e.preventDefault();\n onSelectMoreInfo(messages[0]);\n }}\n >\n Show details\n \n
  • \n ))}\n
\n
\n
\n ) : null}\n
\n ) : null;\n })}\n
\n
\n );\n};\n\nexport default QuotationResultList;\n","import * as React from \"react\";\nimport {\n Alert,\n Button,\n Col,\n Modal,\n ModalBody,\n ModalFooter,\n ModalHeader,\n Row\n} from \"reactstrap\";\nimport InformationTable, {\n CurrencyRow,\n InformationTableRow\n} from \"../../shared/InformationTable\";\nimport { ProductTypeEnum } from \"../../types\";\nimport { QuotationResults } from \"../types\";\n\ninterface QuotationResultModalProps {\n result?: QuotationResults | null;\n showCommission?: boolean;\n toggle: () => void;\n selectResult: (result: QuotationResults) => void;\n}\n\nconst displayLoanDepositAlert = (props: QuotationResults) => {\n return (\n props &&\n (props.productType === ProductTypeEnum.LP ||\n props.productType === ProductTypeEnum.PCP) &&\n props.term > 48 &&\n (props.deposit * 100) / props.cashPrice < 10\n );\n};\n\nconst QuotationResultModal: React.SFC = React.memo(\n ({\n selectResult,\n result,\n toggle,\n showCommission\n }: QuotationResultModalProps) => {\n return (\n \n {result ? (\n <>\n \n {result.productType} finance, {result.term} month term\n \n \n {displayLoanDepositAlert(result) ? (\n \n Please note: 10% minimum deposit may be required for all\n periods exceeding 48 months and subject to the customer status\n \n ) : null}\n \n \n \n \n \n \n \n \n \n \n \n \n \n {showCommission ? (\n \n ) : null}\n \n \n \n \n \n \n {\n selectResult(result);\n }}\n >\n Save this loan\n \n \n \n ) : null}\n \n );\n }\n);\n\nexport default QuotationResultModal;\n","import * as React from \"react\";\nimport {\n Col,\n Button,\n Modal,\n ModalBody,\n ModalFooter,\n ModalHeader,\n Row,\n} from \"reactstrap\";\n\ninterface QuotationErrorModalProps {\n showErrorModal: boolean;\n errorMessage?: string | null;\n toggle: () => void;\n}\n\nconst QuotationErrorModal: React.SFC = React.memo(\n ({ showErrorModal, errorMessage, toggle }: QuotationErrorModalProps) => {\n return (\n \n <>\n \n We're having an issue retrieving this quote.\n \n \n \n \n

\n Please continue with the application and we'll get back to you\n with a quote as soon as we can\n

\n \n
\n
\n \n \n \n \n \n );\n }\n);\n\nexport default QuotationErrorModal;\n","import { faInfoCircle } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport FlipMove from \"react-flip-move\";\nimport { Badge, Button } from \"reactstrap\";\nimport { formatCurrency } from \"../../../utils\";\nimport { ProductTypeEnum } from \"../../types\";\nimport {\n QuotationListResult,\n QuotationResults,\n QuotationTargetBy,\n} from \"../types\";\nimport {\n QuotationResultListItemProps,\n QuotationResultListProps,\n} from \"./QuotationResultList\";\n\nconst MIN_PCP_TERM = 24;\nconst MAX_PCP_TERM = 49;\n\nconst getLowestPayment = (results?: QuotationResults[]) =>\n results &&\n results.reduce((prev: number, r: QuotationResults) => {\n return prev > 0 ? Math.min(prev, r.monthlyPayment) : r.monthlyPayment;\n }, 0);\n\nconst ValueCell = ({\n loading,\n children,\n className,\n}: {\n loading?: boolean;\n children: React.ReactNode;\n className?: string;\n}) => (\n \n {children}\n \n);\n\nconst UnableToQuoteTableRow = ({\n messages,\n showCommission,\n showProductType,\n productType,\n term,\n onSelectMoreInfo,\n}: {\n messages: string[];\n showCommission: boolean;\n productType: ProductTypeEnum;\n showProductType: boolean;\n term: number;\n onSelectMoreInfo: () => void;\n}) => (\n \n \n {showProductType ? productType : null}\n \n {term}\n \n

\n Unable to quote for {productType} at {term} months:\n

\n {messages.map((x) => (\n

\n {x}\n

\n ))}\n \n \n {\n e.preventDefault();\n onSelectMoreInfo();\n }}\n size={showCommission ? \"sm\" : undefined}\n >\n More info\n \n \n \n);\n\nconst QuotationResultTableRow = ({\n result: {\n id,\n productType,\n term,\n monthlyPayment,\n guaranteedFutureValue,\n aprRate,\n flatRate,\n commissionCode,\n },\n lowestPayment,\n lowestProductPayment,\n showCommission,\n loading,\n onSelectResult,\n targetBy,\n showProductType,\n}: QuotationResultListItemProps & { showProductType: boolean }) => (\n onSelectResult()}>\n \n {showProductType ? productType : null}\n \n {term}\n \n {formatCurrency(monthlyPayment)}\n {monthlyPayment === lowestProductPayment &&\n targetBy !== QuotationTargetBy.MONTHLY_PAYMENT ? (\n \n Lowest {monthlyPayment !== lowestPayment ? productType : \"\"}\n \n ) : null}\n \n \n {guaranteedFutureValue ? formatCurrency(guaranteedFutureValue) : null}\n \n \n {(Math.round(aprRate * 100) / 100).toFixed(2)}%\n \n\n \n {(Math.round(flatRate * 100) / 100).toFixed(2)}%\n \n {showCommission ? (\n \n {commissionCode}\n \n ) : null}\n \n {\n e.preventDefault();\n onSelectResult();\n }}\n size={showCommission ? \"sm\" : undefined}\n >\n Show details\n \n \n \n);\n\nconst getProductResultsByTerm = (\n quotationListResult: QuotationListResult,\n productType: ProductTypeEnum\n) => {\n const { results, unableToQuote } = quotationListResult;\n\n const productResultsByTerm: {\n [val: number]: { result?: QuotationResults; errors?: string[] };\n } = results.reduce((obj, val) => {\n if (val.productType === productType) {\n obj[val.term] = { result: val };\n }\n return obj;\n }, {} as any);\n\n unableToQuote.reduce((obj, val) => {\n if (val.productType === productType) {\n let item: any = obj[val.term];\n if (!item) {\n obj[val.term] = item = {};\n }\n item.errors = val.messages;\n }\n return obj;\n }, productResultsByTerm);\n\n return productResultsByTerm;\n};\n\nconst QuotationResultTable: React.SFC = ({\n className,\n quotationListResult,\n onSelectResult,\n onSelectMoreInfo,\n showCommission,\n targetBy,\n loading,\n headerText,\n}: QuotationResultListProps) => {\n if (!quotationListResult) {\n return null;\n }\n\n const { unableToQuote } = quotationListResult;\n let { results } = quotationListResult;\n results = results.filter(\n (r) => r.productType !== \"PCP\" || r.term <= MAX_PCP_TERM\n );\n const lowestPayment = getLowestPayment(results);\n return (\n <>\n
{headerText}
\n \n \n \n \n \n \n \n \n {showCommission ? : null}\n \n \n \n \n \n Term\n Monthly\n GFV / Balloon\n APR\n Flat rate\n {showCommission ? (\n \n Scheme code\n \n ) : null}\n \n \n \n \n {[\"PCP\", \"LP\", \"HP\"].map((p) => {\n const productResultsByTerm = getProductResultsByTerm(\n quotationListResult,\n p as ProductTypeEnum\n );\n\n const lowestProductPayment = getLowestPayment(\n results.filter((x) => x.productType === p)\n );\n\n const terms = Object.keys(productResultsByTerm)\n .map((t) => parseInt(t, 10))\n .filter(\n (t) => p !== \"PCP\" || (t >= MIN_PCP_TERM && t <= MAX_PCP_TERM)\n )\n .sort();\n\n return terms.length ? (\n \n {terms.map((term, i) => {\n const { result, errors } = productResultsByTerm[term];\n\n return result ? (\n onSelectResult(result)}\n loading={loading}\n targetBy={targetBy}\n />\n ) : errors ? (\n onSelectMoreInfo(errors[0])}\n />\n ) : null;\n })}\n \n ) : null;\n })}\n \n \n \n );\n};\n\nexport default QuotationResultTable;\n","import * as React from \"react\";\nimport { Motion, spring } from \"react-motion\";\nimport { SizeMeProps, withSize } from \"react-sizeme\";\n\ninterface AnimatedHeightContainerProps {\n className?: string;\n children: React.ReactNode;\n}\n\nclass InnerContainer extends React.Component<\n AnimatedHeightContainerProps & SizeMeProps\n> {\n public render() {\n const { children } = this.props;\n return
{children}
;\n }\n}\n\nconst SizeAwareContainer = withSize({\n monitorHeight: true,\n monitorWidth: false,\n})(InnerContainer);\n\n// tslint:disable-next-line:max-classes-per-file\nclass AnimatedHeightContainer extends React.Component<\n AnimatedHeightContainerProps,\n { height?: number; isInitialHeight: boolean }\n> {\n constructor(props: AnimatedHeightContainerProps) {\n super(props);\n this.state = { isInitialHeight: true };\n this.handleSize = this.handleSize.bind(this);\n }\n\n public componentDidMount() {\n this.setState({ isInitialHeight: true });\n }\n\n public render() {\n const { height, isInitialHeight } = this.state;\n\n return (\n \n {(value) => {\n return (\n \n \n \n );\n }}\n \n );\n }\n\n private handleSize(size: any) {\n size.height &&\n this.setState((s) => ({\n height: size.height,\n isInitialHeight: !s.height,\n }));\n }\n}\n\nexport default AnimatedHeightContainer;\n","import * as React from \"react\";\nimport { capitalizeFirstLettersOnly } from \"../../../utils\";\nimport FormikEffects from \"../../Forms/FormikEffects\";\n\n/**\n * Automatically capitalizes the customer name on the quotation form\n */\nconst CapitalizeQuotationCustomerName = () => (\n {\n // Automatically capitalize the first letters of the customer name\n [\"title\", \"forename\", \"middleName\", \"surname\"].forEach(field => {\n const prevVal = prevValues[field];\n const nextVal = nextValues[field];\n if (nextVal && prevVal !== nextVal) {\n const titleCase = capitalizeFirstLettersOnly(nextVal);\n if (titleCase !== nextVal) {\n setFieldValue(`${field}`, titleCase, false);\n }\n }\n });\n }}\n />\n);\n\nexport default CapitalizeQuotationCustomerName;\n","import { faEdit } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport classnames from \"classnames\";\nimport { Field, FieldProps, FormikProps } from \"formik\";\nimport * as React from \"react\";\nimport {\n Badge,\n Button,\n CardBody,\n CardHeader,\n CardTitle,\n Col,\n Row,\n} from \"reactstrap\";\nimport { getFullName } from \"../../../utils\";\nimport DealerSelect from \"../../Dealers/DealerSelect\";\nimport AnimatedHeightContainer from \"../../Forms/AnimatedHeightContainer\";\nimport FormGroupWrapper from \"../../Forms/FormGroupWrapper\";\nimport FormInputField from \"../../Forms/FormInputField\";\nimport LoggedInUserQuery from \"../../LoggedInUserQuery\";\nimport TitleSelectField from \"../../Proposals/ProposalForm/TitleSelectField\";\nimport VehicleSection from \"../../Proposals/ProposalForm/VehicleSection\";\nimport { ContextNames, ProductTypeEnum, UserRoles } from \"../../types\";\nimport { QuotationFormValues } from \"../types\";\nimport CapitalizeQuotationCustomerName from \"./CapitalizeQuotationCustomerName\";\n\nclass VehicleFormSection extends React.Component<\n FormikProps & {\n showDealerSelect?: boolean;\n nextSection: () => void;\n },\n { isCollapsed: boolean; nextButtonClicked: boolean }\n> {\n constructor(\n props: FormikProps & { nextSection: () => void }\n ) {\n super(props);\n this.toggleIsCollapsed = this.toggleIsCollapsed.bind(this);\n this.touchAllFields = this.touchAllFields.bind(this);\n this.handleNextButtonClick = this.handleNextButtonClick.bind(this);\n this.handleskipVehicle = this.handleskipVehicle.bind(this);\n this.state = {\n isCollapsed:\n !!props.values.vehicle.cAP || !!props.values.vehicle.skipVehicle,\n nextButtonClicked: false,\n };\n }\n\n public render() {\n const props = this.props;\n const { isCollapsed } = this.state;\n const vehicleErrors: any = (props.errors && props.errors.vehicle) || {};\n\n const {\n vehicle: {\n regNo,\n cAP,\n make,\n model,\n derivative: style,\n mileage,\n maxAnnualMileage,\n },\n } = this.props.values;\n\n const fullName = getFullName(this.props.values);\n\n return (\n \n {!isCollapsed ? (\n \n Quotation details\n \n ) : null}\n \n {isCollapsed ? (\n \n \n {\" \"}\n \n \n Edit details\n \n \n\n \n {fullName ?

{fullName}

: null}\n {cAP ? (\n <>\n

\n {regNo ? (\n {`${regNo.toUpperCase()}, `}\n ) : null}\n {make} {model}\n

\n

\n {style}\n {mileage && !vehicleErrors.mileage ? (\n <>, {mileage} miles\n ) : null}\n {maxAnnualMileage && !vehicleErrors.maxAnnualMileage ? (\n <>, Max {maxAnnualMileage} miles per year\n ) : null}\n

{\" \"}\n \n ) : null}\n {vehicleErrors.length ? (\n <>\n \n Vehicle details are incomplete\n \n
\n \n ) : null}\n \n
\n ) : (\n \n {({ data, loading }) => {\n const isDealer =\n data &&\n data.loggedInUser &&\n data.loggedInUser.roles.includes(UserRoles.dealer);\n const showDealerSelect =\n !loading && props.showDealerSelect !== false && !isDealer;\n\n return (\n \n \n \n {showDealerSelect ? (\n \n {({\n field,\n form,\n }: FieldProps) => (\n \n \n \n {\n props.setFieldValue(field.name, dealerId);\n props.setFieldValue(\n \"isMannIslandDealer\",\n isMannIslandDealer\n );\n props.setFieldValue(\n \"isMannIslandZlist\",\n isMannIslandZList\n );\n props.setFieldValue(\n \"isMultiQuote\",\n isMultiQuote\n );\n }}\n />\n \n \n \n )}\n \n ) : null}\n \n \n \n \n \n \n \n \n

\n Make sure to add a middle name if the customer has one.\n

\n

\n The customer name should be the same as it appears on\n their driving license or passport to successfully\n complete e-sign.\n

\n\n \n \n \n \n {props.values.showFinanceSection\n ? \"Update\"\n : \"Next\"}\n \n {this.state.nextButtonClicked &&\n vehicleErrors.length ? (\n

\n Vehicle details are incomplete\n

\n ) : null}\n\n \n Skip vehicle details (HP loans only)\n \n \n
\n \n
\n );\n }}\n
\n )}\n
\n \n );\n }\n\n private handleskipVehicle(e: React.MouseEvent) {\n e.preventDefault();\n\n const { setFieldValue } = this.props;\n\n setFieldValue(\"vehicle.skipVehicle\" as any, true, false);\n setFieldValue(\"productTypes\" as any, [ProductTypeEnum.HP], false);\n setFieldValue(\"vehicle.regNo\" as any, \"\", false);\n setFieldValue(\"vehicle.dateOfRegistration\" as any, null, false);\n setFieldValue(\"vehicle.make\" as any, \"\", false);\n setFieldValue(\"vehicle.model\" as any, \"\", false);\n setFieldValue(\"vehicle.derivative\" as any, \"\", false);\n setFieldValue(\"vehicle.cAP\" as any, \"\", false);\n setFieldValue(\"vehicle.capId\" as any, \"\", false);\n setFieldValue(\"vehicle.mileage\" as any, null, false);\n setFieldValue(\"vehicle.maxAnnualMileage\" as any, null, false);\n\n Promise.resolve()\n .then(() => this.props.validateForm())\n .then(() => {\n this.handleNextButtonClick();\n });\n }\n\n private handleNextButtonClick() {\n const { errors } = this.props;\n const hasErrors = !!errors.vehicle || !!errors.dealerId;\n\n this.touchAllFields();\n this.setState({ nextButtonClicked: true });\n\n if (\n (this.props.values.vehicle.cAP ||\n this.props.values.vehicle.skipVehicle) &&\n !hasErrors\n ) {\n this.toggleIsCollapsed();\n this.props.nextSection();\n }\n }\n\n private toggleIsCollapsed() {\n this.touchAllFields();\n\n const { isCollapsed } = this.state;\n this.setState({ isCollapsed: !isCollapsed });\n\n if (isCollapsed) {\n this.props.setFieldValue(\"showResults\", false);\n this.props.setFieldValue(\"vehicle.skipVehicle\", false);\n }\n }\n\n private touchAllFields() {\n [\n \"dealerId\",\n \"vehicle.cAP\",\n \"vehicle.capId\",\n \"vehicle.isCommercial\",\n \"vehicle.mileage\",\n \"vehicle.regNo\",\n \"vehicle.maxAnnualMileage\",\n \"vehicle.isNew\",\n \"vehicle.make\",\n \"vehicle.model\",\n \"vehicle.dateOfRegistration\",\n \"vehicle.derivative\",\n \"vehicle.regNoNotFound\",\n ].forEach((x) => this.props.setFieldTouched(x as any, true, false));\n }\n}\n\nexport default VehicleFormSection;\n","import * as React from \"react\";\nimport {\n QuotationResultListItemProps,\n QuotationResultListProps,\n} from \"./QuotationResultList\";\nimport {\n QuotationFormValues,\n QuotationResults,\n QuotationTargetBy,\n} from \"../types\";\nimport { useEffect, useState } from \"react\";\nimport { Badge, Col, Row } from \"reactstrap\";\nimport FlipMove from \"react-flip-move\";\nimport { FormikProps } from \"formik\";\nimport { formatCurrency } from \"../../../utils\";\n\nconst getLowestPayment = (results?: QuotationResults[]) =>\n results &&\n results.reduce((prev: number, r: QuotationResults) => {\n return prev > 0 ? Math.min(prev, r.monthlyPayment) : r.monthlyPayment;\n }, 0);\n\nconst MultiQuoteResultSmallTableRow = ({\n result: {\n productType,\n finance,\n arrangementFee,\n completionFee,\n interestCharges,\n term,\n monthlyPayment,\n aprRate,\n commissionCode,\n lenderName,\n },\n lowestProductPayment,\n showCommission,\n targetBy,\n}: QuotationResultListItemProps) => (\n <>\n \n
{productType}
\n
{lenderName}
\n \n \n
\n Monthly Payment: {formatCurrency(monthlyPayment)}\n
\n\n

\n Total Amount Payable:{\" \"}\n {formatCurrency(\n finance + arrangementFee + completionFee + interestCharges\n )}\n

\n

Term {term} months

\n
\n APR {(Math.round(aprRate * 100) / 100).toFixed(2)}%\n
\n
\n {monthlyPayment === lowestProductPayment &&\n targetBy !== QuotationTargetBy.MONTHLY_PAYMENT ? (\n \n {\" \"}\n Lowest {productType}\n \n ) : null}\n
\n {showCommission && (\n

\n {commissionCode}\n

\n )}\n \n \n);\n\nconst MultiQuoteResultSmallTable = ({\n quotationListResult,\n onSelectResult,\n loading,\n headerText,\n props,\n}: QuotationResultListProps & { props: FormikProps }) => {\n const { values } = props;\n const results = quotationListResult?.results;\n\n let filteredByTermResults = results?.filter(\n (x) => x.term === values.finance.term\n );\n\n const NoItemsPlaceholder = () => (\n
No results found
\n );\n\n const productTypeArray = [\"LP\", \"HP\", \"PCP\"];\n\n const lowestByProduct = productTypeArray.map((r) => {\n return getLowestPayment(\n filteredByTermResults?.filter((p) => p.productType === r)\n );\n });\n\n const sortByProductType = (a: QuotationResults, b: QuotationResults) => {\n return (\n productTypeArray.indexOf(b.productType.toUpperCase()) -\n productTypeArray.indexOf(a.productType.toUpperCase())\n );\n };\n\n const sortByNameDesc = (a: QuotationResults, b: QuotationResults) => {\n let textA = a.lenderName?.toUpperCase() || \"\";\n let textB = b.lenderName?.toUpperCase() || \"\";\n return textA < textB ? 1 : textA > textB ? -1 : 0;\n };\n\n const sortByLowest = (a: QuotationResults, b: QuotationResults) => {\n return (\n lowestByProduct.indexOf(b.monthlyPayment) -\n lowestByProduct.indexOf(a.monthlyPayment)\n );\n };\n\n const [activeIndex, setActiveIndex] = useState(-1);\n\n useEffect(() => {\n setActiveIndex(-1);\n onSelectResult(null);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [values.finance.term]);\n\n return results ? (\n <>\n \n {!filteredByTermResults?.length ? (\n <>{NoItemsPlaceholder()}\n ) : (\n
\n \n \n \n {headerText}\n \n \n\n \n {filteredByTermResults\n .sort((a, b) => {\n return (\n sortByProductType(a, b) ||\n sortByLowest(a, b) ||\n sortByNameDesc(a, b)\n );\n })\n .map((r, i) => {\n const lowestProductPayment = getLowestPayment(\n filteredByTermResults?.filter(\n (p) => p.productType === r.productType\n )\n );\n\n return (\n {\n setActiveIndex(i);\n onSelectResult(r);\n }}\n className={\n \"row custom-row\" +\n (activeIndex === i ? \" selected\" : \"\")\n }\n >\n onSelectResult(r)}\n loading={loading}\n />\n
\n );\n })}\n \n \n \n )}\n \n \n ) : null;\n};\n\nexport default MultiQuoteResultSmallTable;\n","import * as React from \"react\";\nimport { Button, Card, CardBody, CardHeader, Col, Row } from \"reactstrap\";\nimport InformationTable, {\n CurrencyRow,\n InformationTableRow,\n} from \"../../shared/InformationTable\";\nimport { QuotationResults } from \"../types\";\n\ninterface MultiQuoteResultCardProps {\n result?: QuotationResults | null;\n showCommission?: boolean;\n toggle: () => void;\n selectResult: (result: QuotationResults) => void;\n}\n\nconst MultiQuoteResultCard = ({\n selectResult,\n result,\n showCommission,\n}: MultiQuoteResultCardProps) => {\n return result ? (\n <>\n \n \n \n \n \n
{result.productType}
\n \n \n
\n
{result.lenderName}
\n
Representative Example
\n
\n \n
\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {showCommission ? (\n \n ) : null}\n \n \n \n \n \n {\n selectResult(result);\n }}\n >\n Save this loan\n \n \n \n \n
\n \n \n ) : null;\n};\n\nexport default MultiQuoteResultCard;\n","import * as React from \"react\";\nimport { Button, Col, Modal, ModalBody, ModalHeader, Row } from \"reactstrap\";\nimport InformationTable, {\n CurrencyRow,\n InformationTableRow,\n} from \"../../shared/InformationTable\";\nimport { QuotationResults } from \"../types\";\n\nexport interface MultiQuoteResultModalProps {\n result?: QuotationResults | null;\n showCommission?: boolean;\n toggle: () => void;\n selectResult: (result: QuotationResults) => void;\n}\n\nconst MultiQuoteResultModal = ({\n selectResult,\n result,\n toggle,\n showCommission,\n}: MultiQuoteResultModalProps) => {\n return (\n \n {result ? (\n <>\n \n
\n
{result.productType}
\n
\n
\n
\n
{result.lenderName}
\n
Representative Example
\n
\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {showCommission ? (\n \n ) : null}\n \n \n \n \n \n {\n selectResult(result);\n }}\n >\n Save this loan\n \n \n \n \n \n ) : null}\n \n );\n};\n\nexport default MultiQuoteResultModal;\n","import { faSpinner } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport classnames from \"classnames\";\nimport { Formik, FormikProps } from \"formik\";\nimport { merge } from \"lodash\";\nimport * as React from \"react\";\nimport { withApollo, WithApolloClient } from \"react-apollo\";\nimport { SizeMeProps, withSize } from \"react-sizeme\";\nimport {\n Alert,\n Card,\n CardBody,\n CardHeader,\n CardTitle,\n Col,\n DropdownItem,\n DropdownMenu,\n DropdownToggle,\n Form,\n Row,\n UncontrolledDropdown,\n} from \"reactstrap\";\nimport { compose } from \"recompose\";\nimport DealerQuery from \"../../Dealers/DealerQuery\";\nimport { LoggedInUserWithDealerRatesQuery } from \"../../LoggedInUserQuery\";\nimport { ProductTypeEnum, RecursivePartial, User } from \"../../types\";\nimport CalculateQuotationService from \"../CalculateQuotationService\";\nimport {\n Quotation,\n QuotationFormValues,\n QuotationProps,\n QuotationRequest,\n QuotationResults,\n} from \"../types\";\nimport FinanceFormSection from \"./FinanceFormSection\";\nimport \"./index.scss\";\nimport QuotationResultList, {\n QuotationResultListProps,\n} from \"./QuotationResultList\";\nimport QuotationResultModal from \"./QuotationResultModal\";\nimport QuotationErrorModal from \"./QuotationErrorModal\";\nimport QuotationResultTable from \"./QuotationResultTable\";\nimport quotationValidationSchema from \"./quotationValidationSchema\";\nimport VehicleFormSection from \"./VehicleFormSection\";\nimport MultiQuoteResultSmallTable from \"./MultiQuoteResultSmallTable\";\nimport MultiQuoteResultTable from \"./MultiQuoteResultTable\";\nimport MultiQuoteResultCard from \"./MultiQuoteResultCard\";\nimport MultiQuoteResultModal from \"./MultiQuoteResultModal\";\nimport { Dealer } from \"../../Dealers/types\";\n\nconst mapQuotationToFormValues = (\n loggedInUser: User,\n quotation?: RecursivePartial,\n dealer?: Dealer\n): QuotationFormValues => {\n const defaults: QuotationFormValues =\n quotationValidationSchema.default() as any;\n const quotationHasId = !!(quotation && quotation.id);\n\n if (quotation) {\n // tslint:disable-next-line:prefer-object-spread\n const finance: any = { ...quotation.finance };\n\n delete finance.totalFinance;\n delete finance.interestCharges;\n delete finance.totalCharges;\n delete finance.balancePayable;\n delete finance.totalAmountPayable;\n\n quotation.finance = finance;\n\n const skipVehicle = quotation.skipVehicle || false;\n\n if (skipVehicle) {\n defaults.productTypes = [ProductTypeEnum.HP];\n }\n\n defaults.isMannIslandDealer = dealer\n ? dealer.isMannIslandDealer\n : quotation.dealer?.isMannIslandDealer;\n defaults.isMannIslandZlist = dealer\n ? dealer.isMannIslandZList\n : quotation.dealer?.isMannIslandZList;\n defaults.isMultiQuote = dealer\n ? dealer.isMultiQuote\n : quotation.dealer?.isMultiQuote;\n\n delete quotation.id;\n quotation.finance && delete quotation.finance.id;\n delete quotation.skipVehicle;\n delete quotation.dealer;\n if (quotation.vehicle) {\n delete quotation.vehicle.id;\n quotation.vehicle.isRegUnknown = !(\n skipVehicle || quotation.vehicle.regNo\n );\n quotation.vehicle.skipVehicle = skipVehicle;\n }\n }\n\n const { dealer: loggedInDealer } = loggedInUser;\n if (loggedInDealer) {\n defaults.dealerId = loggedInDealer.id;\n }\n\n const result = merge(\n defaults,\n quotation,\n quotation && quotationHasId\n ? {\n showFinanceSection: true,\n showLoanDetailsSection: true,\n showResults: false,\n showCommission: false,\n }\n : undefined\n );\n\n return result;\n};\n\nconst mapFormValues = (values: QuotationFormValues): Quotation => {\n delete values.vehicle.LCV;\n\n const {\n vehicle: {\n __typename: vehicleType,\n skipVehicle,\n isRegUnknown,\n regNoNotFound,\n ...vehicle\n },\n showFinanceSection,\n showLoanDetailsSection,\n showResults,\n showCommission,\n productTypes,\n __typename: quotationType,\n finance: { __typename: financeType, ...finance },\n isMannIslandZlist,\n ...rest\n } = values;\n\n const result = {\n skipVehicle,\n vehicle: skipVehicle ? undefined : vehicle,\n finance,\n ...rest,\n };\n\n return result;\n};\n\nconst getQuotationRequest = (\n values: QuotationFormValues,\n isMulti: boolean = false,\n isMannIslandDealer: boolean | undefined = undefined,\n isMannIslandZList: boolean | undefined = undefined\n): QuotationRequest => {\n const {\n dealerId,\n productTypes,\n vehicle: {\n cAP,\n mileage,\n maxAnnualMileage,\n isNew,\n dateOfRegistration,\n capId,\n imported,\n regNo,\n vehicleType,\n isCommercial,\n vatQualifying,\n },\n finance: { cashPrice, deposit, partExchangeValue, partExchangeSettlement },\n targetBy,\n targetByValue,\n } = values;\n\n let returnValues = {\n minTerm: 12,\n maxTerm: 60,\n dealerId,\n productTypes,\n cAP,\n mileage,\n maxAnnualMileage,\n regNo,\n targetBy,\n targetByValue,\n isNew,\n dateOfRegistration,\n cashPrice,\n cashDeposit: deposit,\n partExchange: partExchangeValue,\n partExchangeSettlement,\n extras: 0,\n rFL: 0,\n };\n\n if (!isMulti && isMannIslandDealer && !isMannIslandZList) {\n return {\n ...returnValues,\n capId: capId ? +capId : undefined,\n import: imported,\n regNo,\n vehicleType,\n usage: isCommercial ? \"commercial\" : \"Social\",\n vatQualify: vatQualifying,\n minTerm: 36,\n };\n }\n return returnValues;\n};\n\n/** Get a collection of paths to errors in a formik errors object */\nexport const getErrorPaths = (errObj: any, path?: string): string[] =>\n Object.keys(errObj).reduce((prev, k) => {\n const val = errObj[k];\n const nextPath = path ? `${path}.${k}` : k;\n if (typeof val === \"object\") {\n return [...prev, ...getErrorPaths(val, nextPath)];\n }\n return [...prev, nextPath];\n }, [] as string[]);\n\ntype QuotationFormProps = WithApolloClient> & {\n onSubmitQuotation: (quotation: Quotation) => Promise;\n};\n\nclass QuotationForm extends React.Component<\n QuotationFormProps,\n {\n modalResult: QuotationResults | null;\n cardResult: QuotationResults | null;\n unsavedResults: QuotationResults[] | null;\n loadingResults: boolean;\n showErrorModal: boolean;\n errorModalMessage: string | null;\n quotationLoading: boolean;\n size: any;\n }\n> {\n constructor(props: QuotationFormProps) {\n super(props);\n this.vehicleSectionCompleted = this.vehicleSectionCompleted.bind(this);\n this.financeSectionCompleted = this.financeSectionCompleted.bind(this);\n this.handleCalculateRepayments = this.handleCalculateRepayments.bind(this);\n this.loanDetailsSectionCompleted =\n this.loanDetailsSectionCompleted.bind(this);\n this.selectResult = this.selectResult.bind(this);\n this.hideModal = this.hideModal.bind(this);\n this.showModal = this.showModal.bind(this);\n this.hideCard = this.hideCard.bind(this);\n this.showCard = this.showCard.bind(this);\n this.showErrorModal = this.showErrorModal.bind(this);\n this.hideErrorModal = this.hideErrorModal.bind(this);\n this.setLoading = this.setLoading.bind(this);\n this.getWindowDimensions = this.getWindowDimensions.bind(this);\n this.setWindowDimensions = this.setWindowDimensions.bind(this);\n\n this.state = {\n modalResult: null,\n cardResult: null,\n unsavedResults: null,\n loadingResults: false,\n showErrorModal: false,\n errorModalMessage: null,\n quotationLoading: false,\n size: this.getWindowDimensions(),\n };\n\n window.addEventListener(\"resize\", this.setWindowDimensions);\n }\n\n public render() {\n const { quotation, onSubmitQuotation } = this.props;\n return (\n \n {({ loggedInUser }) => {\n if (!loggedInUser) {\n return null;\n }\n\n return (\n \n {({ dealer, loading }) => {\n if (loading) {\n return null;\n }\n return (\n {\n onSubmitQuotation(mapFormValues(values)).then(() => {\n this.setState({ unsavedResults: null });\n setSubmitting(false);\n });\n }}\n validationSchema={quotationValidationSchema}\n >\n {(formikProps) => {\n const {\n handleSubmit,\n values: { showResults, showCommission },\n } = formikProps;\n\n const isMannIslandDealer =\n formikProps.values.isMannIslandDealer;\n const isMannIslandZList =\n formikProps.values.isMannIslandZlist;\n\n let forMannIslandDealer = isMannIslandDealer;\n let forMannIslandZList = isMannIslandZList;\n\n if (\n isMannIslandDealer === undefined &&\n loggedInUser.dealer\n ) {\n forMannIslandDealer =\n loggedInUser?.dealer?.isMannIslandDealer;\n } else if (loggedInUser && loggedInUser.dealer === null) {\n forMannIslandDealer = isMannIslandDealer;\n }\n\n const isMulti =\n (loggedInUser &&\n loggedInUser.dealer &&\n loggedInUser.dealer.isMultiQuote) ||\n formikProps.values.isMultiQuote;\n\n const quotationRequest = showResults\n ? getQuotationRequest(\n formikProps.values,\n isMulti,\n forMannIslandDealer,\n forMannIslandZList\n )\n : undefined;\n\n return (\n \n \n this.vehicleSectionCompleted(formikProps)\n }\n />\n {formikProps.values.showFinanceSection ? (\n isMulti ? (\n <>\n \n {({ calculateQuotationList, loading }) => {\n return (\n <>\n \n \n \n \n \n Finance calculator\n \n \n \n \n {({\n data,\n loading: dealerLoading,\n }) => {\n return !dealerLoading ? (\n \n this.financeSectionCompleted(\n formikProps\n )\n }\n refresh={(props) =>\n this.handleCalculateRepayments(\n props || formikProps\n )\n }\n dealer={data?.dealer}\n isMulti={true}\n />\n ) : null;\n }}\n \n \n \n Display options\n \n \n \n formikProps.setFieldValue(\n \"showCommission\",\n !showCommission\n )\n }\n >\n {showCommission\n ? \"Hide\"\n : \"Show\"}{\" \"}\n scheme codes\n \n \n \n \n \n \n this.handleCalculateRepayments(\n formikProps\n )\n }\n className={classnames(\n \"btn wide-button btn-lg\",\n {\n \"btn-primary\": !showResults,\n \"btn-outline-secondary\":\n showResults,\n }\n )}\n type=\"button\"\n disabled={showResults}\n >\n {(this.state.quotationLoading ||\n loading) && (\n \n )}{\" \"}\n Show loans\n \n \n \n {!!formikProps.values\n .targetByValue &&\n formikProps.values.targetByValue >\n 13.9 && (\n \n \n \n Warning: Some\n lenders only lend up to\n 13.9% APR\n \n \n \n )}\n \n \n this.showCard(x)\n }\n onSelectMoreInfo={(x) =>\n this.showErrorModal(x)\n }\n showCommission={showCommission}\n props={formikProps}\n />\n {this.state.size &&\n this.state.size.width < 992 ? (\n \n this.selectResult(\n result,\n formikProps\n )\n }\n />\n ) : (\n \n this.selectResult(\n result,\n formikProps\n )\n }\n />\n )}\n \n \n \n \n );\n }}\n \n \n ) : (\n <>\n \n {({ calculateQuotationList, loading }) => {\n const quotationRequest2 = showResults\n ? getQuotationRequest(\n formikProps.values,\n false,\n !forMannIslandDealer,\n forMannIslandZList\n )\n : undefined;\n return (\n <>\n \n \n \n \n \n Finance calculator\n \n \n \n \n {({\n data,\n loading: dealerLoading,\n }) => {\n return !dealerLoading ? (\n \n this.financeSectionCompleted(\n formikProps\n )\n }\n refresh={(props) =>\n this.handleCalculateRepayments(\n props || formikProps\n )\n }\n dealer={data?.dealer}\n isMulti={false}\n />\n ) : null;\n }}\n \n \n \n Display options\n \n \n \n formikProps.setFieldValue(\n \"showCommission\",\n !showCommission\n )\n }\n >\n {showCommission\n ? \"Hide\"\n : \"Show\"}{\" \"}\n scheme codes\n \n \n \n \n \n \n this.handleCalculateRepayments(\n formikProps\n )\n }\n className={classnames(\n \"btn wide-button btn-lg\",\n {\n \"btn-primary\": !showResults,\n \"btn-outline-secondary\":\n showResults,\n }\n )}\n type=\"button\"\n disabled={showResults}\n >\n {(this.state.quotationLoading ||\n loading) && (\n \n )}{\" \"}\n Show loans\n \n \n \n {!!formikProps.values\n .targetByValue &&\n formikProps.values.targetByValue >\n 13.9 && (\n \n \n \n Warning: Some\n lenders only lend up to\n 13.9% APR\n \n \n \n )}\n \n this.showModal(x)\n }\n onSelectMoreInfo={(x) =>\n this.showErrorModal(x)\n }\n showCommission={showCommission}\n />\n {!forMannIslandDealer &&\n !forMannIslandZList ? (\n \n {({\n calculateQuotationList:\n calculateQuotationList2,\n loading,\n }) => {\n this.setLoading(loading);\n return (\n \n this.showModal(x)\n }\n onSelectMoreInfo={(x) =>\n this.showErrorModal(x)\n }\n showCommission={\n showCommission\n }\n />\n );\n }}\n \n ) : null}\n \n \n \n );\n }}\n \n \n )\n ) : null}\n \n \n this.selectResult(result, formikProps)\n }\n />\n \n );\n }}\n \n );\n }}\n \n );\n }}\n \n );\n }\n\n private selectResult(\n result: QuotationResults,\n {\n isSubmitting,\n setFieldValue,\n handleSubmit,\n }: FormikProps\n ) {\n if (!isSubmitting) {\n setFieldValue(\"finance.productType\" as any, result.productType, false);\n setFieldValue(\"finance.term\" as any, result.term, false);\n setFieldValue(\n \"finance.monthlyPayment\" as any,\n result.monthlyPayment,\n false\n );\n setFieldValue(\"lenderId\" as any, result.lenderId, false);\n\n setTimeout(handleSubmit, 0);\n }\n }\n\n private vehicleSectionCompleted(\n formikProps: FormikProps\n ) {\n formikProps.setFieldValue(\"showFinanceSection\", true);\n }\n\n private async financeSectionCompleted(\n formikProps: FormikProps\n ) {\n formikProps.setFieldValue(\"showLoanDetailsSection\", true);\n }\n\n private async loanDetailsSectionCompleted(\n formikProps: FormikProps\n ) {\n await this.handleCalculateRepayments(formikProps);\n }\n\n private async handleCalculateRepayments(\n formikProps: FormikProps\n ) {\n [\n \"finance.cashPrice\",\n \"finance.deposit\",\n \"finance.partExchangeValue\",\n \"finance.partExchangeSettlement\",\n \"targetBy\",\n \"targetByValue\",\n \"productTypes\",\n ].forEach((x) => formikProps.setFieldTouched(x as any, true, false));\n\n formikProps.validateForm().then((err) => {\n if (\n !getErrorPaths(err).filter(\n (x) => x !== \"finance.term\" && x !== \"finance.productType\"\n ).length\n ) {\n formikProps.setFieldValue(\"showResults\", true, false);\n }\n });\n }\n\n private showModal(results: QuotationResults | null) {\n this.setState({ modalResult: results });\n }\n\n private hideModal() {\n this.setState({ modalResult: null });\n }\n\n private showCard(results: QuotationResults | null) {\n this.setState({ cardResult: results });\n }\n\n private hideCard() {\n this.setState({ cardResult: null });\n }\n\n private showErrorModal(errorModalMessage: string | null) {\n this.setState({ showErrorModal: true, errorModalMessage });\n }\n private hideErrorModal() {\n this.setState({ showErrorModal: false });\n }\n private setLoading(value: boolean) {\n if (value !== this.state.quotationLoading)\n this.setState({ quotationLoading: value });\n }\n\n private getWindowDimensions() {\n const { innerWidth: width, innerHeight: height } = window;\n\n return {\n width,\n height,\n };\n }\n\n private setWindowDimensions() {\n const { innerWidth: width, innerHeight: height } = window;\n\n this.setState({\n size: {\n width,\n height,\n },\n });\n }\n}\n\nexport default compose<\n QuotationFormProps,\n RecursivePartial & {\n onSubmitQuotation: (quotation: Quotation) => Promise;\n }\n>(withApollo)(QuotationForm);\n\nconst ResponsiveQuotationResultListInner = ({\n size,\n ...rest\n}: SizeMeProps & QuotationResultListProps) =>\n size.width && size.width < 600 ? (\n \n ) : (\n \n );\n\nconst ResponsiveQuotationResultList = withSize({\n monitorHeight: false,\n monitorWidth: true,\n})(ResponsiveQuotationResultListInner);\n\nconst ResponsiveMultiQuoteResultListInner = ({\n size,\n ...rest\n}: SizeMeProps &\n QuotationResultListProps & { props: FormikProps }) =>\n size.width && size.width < 600 ? (\n \n ) : (\n \n );\n\nconst ResponsiveMultiQuoteResultList = withSize({\n monitorHeight: false,\n monitorWidth: true,\n})(ResponsiveMultiQuoteResultListInner);\n","import gql from \"graphql-tag\";\nimport { useMutation } from \"react-apollo\";\ninterface SendSuitabilityData {\n success: boolean;\n}\n\ninterface SendSuitabilityVariables {\n id: number;\n}\n\nexport const SuitabilityFragment = gql`\n fragment SuitabilityFragment on Suitability {\n id\n dealerId\n proposalId\n title\n forename\n middleName\n surname\n email\n address {\n line1\n line2\n line3\n town\n county\n postcode\n countryId\n }\n pxAnotherVehicle\n outstandingFinance\n outstandingMonthlyPayment\n existingFinanceCompany\n settlementFigure\n pxValuation\n voluntaryAgreement\n voluntaryAgreementConfirm\n halfAmountMade\n financialAdvantage\n equityFunding\n customerType\n vehicleAge\n vehicleChange\n deferLoanConfirmation\n financeType\n financeCompany\n financeCompanyReason\n financeCompanySelectConfirmation\n alternativeDeclines\n topUpLoanRequired\n agreedPrice\n agreedDeposit\n lowDepositConfirmation\n keepVehicleMonths\n agreementOverMonths\n acceptanceFee\n optionToPurchaseFee\n initialPayment\n monthlyPayments\n finalPayment\n annualApr\n agreedMaximumMileage\n excessMileageCharge\n leftoverFinance\n isCustomerHappyWithFinance\n hasCustomerBeenDeclinedBefore\n }\n`;\n\nexport const CREATE_OR_UPDATE_SUITABILITY = gql`\n mutation CreateOrUpdateSuitability($input: SuitabilityInput) {\n createOrUpdateSuitability(input: $input) {\n ...SuitabilityFragment\n }\n }\n ${SuitabilityFragment}\n`;\n\nexport const SEND_SUITABILITY_FORM = gql`\n mutation SendSuitabilityForm($id: ID!) {\n sendSuitabilityForm(id: $id) {\n success\n }\n }\n`;\n\nexport const useSendSuitabilityForm = () => {\n const [sendSuitabilityForm] = useMutation<\n SendSuitabilityData,\n SendSuitabilityVariables\n >(SEND_SUITABILITY_FORM);\n\n return sendSuitabilityForm;\n};\n\nexport default () => ({});\n","import { connect, FormikContext } from \"formik\";\nimport { isArray } from \"lodash\";\nimport * as React from \"react\";\nimport { DATE_PATTERN } from \"../../utils\";\nimport SummaryRow, {\n DateSummaryRow,\n YesNoSummaryRow,\n} from \"../shared/SummarySection/SummaryRow\";\nimport { FormSectionSummaryProps, WatchFields } from \"./MultiSectionForm\";\n\ninterface FieldInfo {\n label: string;\n value: string;\n}\n\nconst getFieldComponents = (\n values: any,\n fields: WatchFields,\n schema?: any\n): FieldInfo[] =>\n Object.keys(fields).reduce((prev: FieldInfo[], k: any) => {\n const value = values && values[k];\n const field = fields[k];\n const fieldSchema = schema && schema.fields ? schema.fields[k] : undefined;\n\n if (isArray(value) && typeof field === \"object\") {\n const arraySchema = fieldSchema ? fieldSchema.of : undefined;\n return [\n ...prev,\n ...(value as any[]).reduce(\n (acc: FieldInfo[], item) => [\n ...acc,\n ...getFieldComponents(item, field, arraySchema),\n ],\n []\n ),\n ];\n }\n\n if (typeof field === \"object\") {\n return [...prev, ...getFieldComponents(value, field, fieldSchema)] as any;\n }\n\n const label = (fieldSchema && fieldSchema.describe().label) || k;\n\n let displayValue = value;\n if (typeof displayValue === \"boolean\") {\n displayValue = displayValue ? \"Yes\" : \"No\";\n }\n\n if (!displayValue && displayValue !== 0) {\n displayValue = undefined;\n }\n return [...prev, { label, value: displayValue }];\n }, []);\n\ninterface AutoGeneratedFormSectionSummaryProps\n extends FormSectionSummaryProps {\n firstColumnSize?: number;\n}\n\nconst AutoGeneratedFormSectionSummary = ({\n section: { watchFields },\n firstColumnSize,\n formik: { initialValues, validationSchema },\n}: AutoGeneratedFormSectionSummaryProps & {\n formik: FormikContext;\n}) => {\n const fieldInfo = getFieldComponents(\n initialValues,\n watchFields,\n validationSchema\n );\n\n return (\n <>\n {fieldInfo.map(({ label, value }, i) => {\n const summaryProps = {\n title: label,\n firstColumnSize,\n };\n const key = `${label}_${i}`;\n\n if (value && typeof value === \"boolean\") {\n return ;\n }\n\n if (value && new RegExp(DATE_PATTERN).test(value)) {\n return ;\n }\n\n return ;\n })}\n \n );\n};\n\nexport default connect>(\n AutoGeneratedFormSectionSummary\n);\n","import { faSpinner } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { gql } from \"apollo-boost\";\nimport * as React from \"react\";\nimport { withApollo, WithApolloClient } from \"react-apollo\";\nimport { Button } from \"reactstrap\";\n\ninterface ValidateBankAccountButtonData {\n bankAccountLookup: {\n validateBankAccount?: {\n isValid: boolean;\n bank?: string;\n branch?: string;\n };\n };\n}\n\nexport const VALIDATE_BANK_ACCOUNT = gql`\n query ValidateBankAccountQuery($input: ValidateBankAccountArgsInputType) {\n bankAccountLookup {\n validateBankAccount(input: $input) {\n isValid\n bank\n branch\n }\n }\n }\n`;\n\ninterface ValidateBankAccountButtonProps {\n accountNumber?: string;\n sortCode?: string;\n accountNotFound: boolean;\n validateFormData: () => Promise;\n onBankAccountValidated: (account: {\n isValid: boolean;\n accountNumber: string;\n sortCode: string;\n bank?: string;\n branch?: string;\n }) => void;\n}\n\nclass ValidateBankAccountButton extends React.Component<\n WithApolloClient,\n { loading: boolean }\n> {\n constructor(props: WithApolloClient) {\n super(props);\n this.handleClick = this.handleClick.bind(this);\n this.state = { loading: false };\n }\n\n public render() {\n const { accountNotFound } = this.props;\n const { loading } = this.state;\n return (\n <>\n \n {loading && (\n \n )}\n Find bank details\n \n {accountNotFound && (\n

\n Bank account not found\n

\n )}\n \n );\n }\n\n private handleClick(e: any) {\n e.preventDefault();\n const {\n validateFormData,\n onBankAccountValidated,\n accountNumber,\n sortCode\n } = this.props;\n\n validateFormData().then(formIsValid => {\n const { client } = this.props;\n\n if (formIsValid && accountNumber && sortCode) {\n this.setState({ loading: true });\n client\n .query({\n query: VALIDATE_BANK_ACCOUNT,\n variables: { input: { accountNumber, sortCode } }\n })\n .then(({ data }) => {\n const result = data && data.bankAccountLookup.validateBankAccount;\n\n onBankAccountValidated({\n isValid: !!result && result.isValid,\n accountNumber,\n sortCode,\n bank: (result && result.bank) || undefined,\n branch: (result && result.branch) || undefined\n });\n })\n .finally(() => this.setState({ loading: false }));\n }\n });\n }\n}\n\nexport default withApollo(\n ValidateBankAccountButton\n);\n","import { useEffect } from \"react\";\n\nconst addBodyClass = (className: string) =>\n document.documentElement.classList.add(className);\nconst removeBodyClass = (className: string) =>\n document.documentElement.classList.remove(className);\n\nexport default function useHtmlElementClass(className: string) {\n useEffect(() => {\n // Set up\n addBodyClass(className);\n\n // Clean up\n return () => removeBodyClass(className);\n }, [className]);\n}\n","import { cloneDeepWith, defaults, isArray } from \"lodash\";\nimport moment from \"moment\";\nimport {\n Business,\n BusinessDirector,\n EmploymentDetails,\n Vehicle,\n ProposalStatusEnum,\n} from \"../components/Proposals/types\";\nimport { Address, User, UserRoles } from \"../components/types\";\n\n/** Get the last two lines of an address for display */\nexport const getShortAddress = ({ line1, line2, line3, town }: Address) => {\n return [town, line2, line3, line1]\n .map((line) => (line ? line.trim() : \"\"))\n .reduce((prev: string[], line: string) => {\n if (line && prev.length < 2) {\n prev.push(line);\n }\n return prev;\n }, [])\n .reverse()\n .join(\", \");\n};\n\n/** Join the title, forename and surname */\nexport const getFullName = ({\n title,\n forename,\n middleName,\n surname,\n}: {\n title?: string;\n forename?: string;\n middleName?: string;\n surname?: string;\n}) =>\n [title !== \"Other\" ? title : null, forename, middleName, surname]\n .filter((x) => !!x)\n .join(\" \");\n\n/** Postal address in a single line */\nexport const getSingleLineAddress = ({\n line1,\n line2,\n line3,\n town,\n postcode,\n}: Address) => {\n return [line1, line2, line3, town, postcode]\n .map((line) => (line ? line.trim() : \"\"))\n .filter((x) => !!x)\n .join(\", \");\n};\n\nexport const hasAddress = ({ line1, line2, line3, town, postcode }: any) => {\n return line1 && (line2 || line3 || town || postcode);\n};\n\nexport const formatCurrency = (value?: number) =>\n value || value === 0\n ? new Intl.NumberFormat(\"en-GB\", {\n style: \"currency\",\n currency: \"GBP\",\n }).format(value)\n : \"-\";\n\nexport const isNumeric = (n: any) => {\n return !isNaN(parseFloat(n)) && isFinite(n);\n};\n\nexport const convertNumber = (n: string | undefined) =>\n n && isNumeric(n) ? parseFloat(n) : 0;\n\nexport const cleanNumber = (number: any) => {\n if (typeof number === \"number\") {\n return number;\n }\n if (number && typeof number === \"string\" && isNumeric(number)) {\n return convertNumber(number);\n }\n return undefined;\n};\n\nexport const roundNumber = (rate?: number) => {\n return isNumeric(rate)\n ? (Math.round((rate || 0) * 100) / 100).toFixed(2)\n : undefined;\n};\n\nexport const shortenNumberForDisplay = (value?: number) => {\n if (!value && value !== 0) {\n return \"\";\n }\n\n if (value / 1000000 > 1) {\n return `${Math.round(value / 1000000)}m`;\n }\n if (value / 1000 > 1) {\n return `${Math.round(value / 1000)}k`;\n }\n return Math.round(value).toString();\n};\n\nexport const formatEnumValue = (enumValue?: string) => {\n const result = enumValue ? enumValue.replace(/_/g, \" \") : \"\";\n return capitalizeFirstLetter(result.toLowerCase());\n};\n\nexport const formatToPercentage = (value?: number) => {\n return `${Math.round(value ? value : 0)}%`;\n};\n\nexport const getProportion = (numerator?: number, denominator?: number) => {\n const result = denominator ? ((numerator || 0) / denominator) * 100 : 0;\n return formatToPercentage(result);\n};\n\nexport const capitalizeFirstLettersOnly = (value: string) =>\n value\n .split(\" \")\n .map((x) => x.charAt(0).toUpperCase() + x.slice(1))\n .join(\" \");\n\nexport const capitalizeFirstLetter = (value: string) =>\n value.charAt(0).toUpperCase() + value.slice(1).toLowerCase();\n\nexport const convertToTitleCase = (value: string) =>\n value\n .split(\" \")\n .map((x) => capitalizeFirstLetter(x))\n .join(\" \");\n\n/** Get vehicle details in a single line */\nexport const getSingleLineVehicle = ({ make, model, derivative }: Vehicle) => {\n return [make, model, derivative]\n .map((line) => (line ? line.trim() : \"\"))\n .filter((x) => !!x)\n .join(\", \");\n};\n\nexport const getMonthsAndYearsText = (totalMonths: number) => {\n const months = totalMonths % 12;\n const years = (totalMonths - months) / 12;\n const monthsText = months\n ? `${months} ${months > 1 ? \"months\" : \"month\"}`\n : \"\";\n const yearsText = years ? `${years} ${years > 1 ? \"years\" : \"year\"}` : \"\";\n\n return totalMonths ? `${yearsText}${monthsText ? ` ${monthsText}` : \"\"}` : \"\";\n};\n\nexport const getMonthDateRange = (date: moment.Moment) => ({\n label: date.format(\"MMMM YYYY\"),\n value: {\n start: date.startOf(\"month\").toISOString(true),\n end: date\n .startOf(\"month\")\n .add(1, \"month\")\n .subtract(1, \"day\")\n .endOf(\"day\")\n .toISOString(true),\n },\n});\n\nexport const getYearDateRange = (date: moment.Moment) => ({\n label: date.format(\"YYYY\"),\n value: {\n start: date.startOf(\"year\").toISOString(true),\n end: date\n .startOf(\"year\")\n .add(1, \"year\")\n .subtract(1, \"day\")\n .endOf(\"day\")\n .toISOString(true),\n },\n});\n\nexport const getFinancialYearDateRange = (date: moment.Moment) => {\n const adjustedDate =\n date.month() >= 3 ? date.clone().subtract(1, \"year\") : date.clone();\n\n const startDate = adjustedDate.month(\"April\").startOf(\"month\");\n const endDate = adjustedDate\n .clone()\n .add(1, \"year\")\n .subtract(1, \"day\")\n .endOf(\"day\");\n\n return {\n label: `FY ${startDate.format(\"YYYY\")}-${endDate.format(\"YYYY\")}`,\n value: {\n start: startDate.toISOString(true),\n end: endDate.toISOString(true),\n },\n };\n};\n\nexport const getCurrentQuarter = (date: moment.Moment) => {\n const startDate = date.clone().startOf(\"quarter\");\n const endDate = date.clone().endOf(\"quarter\");\n\n return {\n value: {\n start: startDate.toISOString(true),\n end: endDate.toISOString(true),\n },\n };\n};\n\nexport const validatePassword = (\n password: string,\n minScore: number = 3,\n minLength: number = 8\n) => {\n // Fail early if the password isn't long enough\n if (!password || password.length < minLength) {\n return false;\n }\n\n const containsLowerCase = new RegExp(\"^(?=.*[a-z])\").test(password);\n const containsUpperCase = new RegExp(\"^(?=.*[A-Z])\").test(password);\n const containsNumbers = new RegExp(\"^(?=.*[0-9])\").test(password);\n const containsSymbols = new RegExp('^(?=.*[!@#$%^&*(),.?\":{}|<>])').test(\n password\n );\n\n const score =\n (containsLowerCase ? 1 : 0) +\n (containsUpperCase ? 1 : 0) +\n (containsNumbers ? 1 : 0) +\n (containsSymbols ? 1 : 0);\n\n return score >= minScore;\n};\n\nconst shouldRemoveFormField = (\n field: string,\n value: any,\n keepNulls: boolean,\n removeIdFields: boolean\n) => {\n // Remove special fields which should not be sent to the server\n if (field === \"__typename\" || field.startsWith(\"FORMSTATE_\")) {\n return true;\n }\n // Remove empty fields\n if (!keepNulls) {\n if (value === null || value === undefined || value === \"\") {\n return true;\n }\n if (typeof value === \"string\" && value.trim() === \"\") {\n return true;\n }\n }\n // Optionally remove id fields\n if (removeIdFields && field === \"id\") {\n return true;\n }\n return false;\n};\n\nconst cleanFormDataCore = (\n formData: any,\n shouldRemoveField: (field: string, value: any) => boolean\n) =>\n cloneDeepWith(formData, (value) => {\n if (value && !isArray(value)) {\n if (typeof value === \"object\") {\n return Object.keys(value)\n .filter((k) => !shouldRemoveField(k, value[k]))\n .reduce((clone, k) => {\n clone[k] = cleanFormDataCore(value[k], shouldRemoveField);\n return clone;\n }, {} as any);\n }\n\n if (typeof value === \"string\") {\n return value.trim();\n }\n }\n });\n\n/**\n * Deep clones and cleans a form data object, ready to submit to the server.\n * Removes special fields \"__typename\" and \"FORMSTATE_*\"\".\n * Removes empty fields.\n * Optionally removes \"id\" fields\n * @param formData Form data to clone and clean\n * @param options Options for fields to remove\n */\nexport const cleanFormData = (\n formData: any,\n options?: {\n keepNulls?: boolean;\n removeIdFields?: boolean;\n }\n) => {\n const defaultOptions = {\n keepNulls: false,\n removeIdFields: false,\n };\n const mergedOptions = defaults({}, options, defaultOptions);\n const shouldRemoveField = (field: string, value: any) =>\n shouldRemoveFormField(\n field,\n value,\n mergedOptions.keepNulls,\n mergedOptions.removeIdFields\n );\n\n return cleanFormDataCore(formData, shouldRemoveField);\n};\n\nexport const hasEmploymentDetails = (employer: EmploymentDetails) => {\n return (\n employer &&\n (employer.employmentTerms ||\n employer.employmentStatus ||\n employer.employmentType ||\n employer.occupation ||\n employer.employerName ||\n employer.earnings ||\n employer.yearsWithEmployer ||\n employer.monthsWithEmployer ||\n hasAddress(employer.address) ||\n employer.industry)\n );\n};\n\nexport const hasBusinessDetails = (business: Business) => {\n return !!(\n business &&\n (business.name ||\n business.contactName ||\n business.contactPosition ||\n business.email ||\n business.mobile ||\n business.registrationNumber ||\n business.natureOfBusiness ||\n business.businessType ||\n business.otherBusinessType ||\n business.established ||\n hasAddress(business.address) ||\n (business.monthsAtAddress && business.yearsAtAddress))\n );\n};\n\nexport const hasDirectorDetails = (director: BusinessDirector) => {\n return !!(director && director.forename && director.surname);\n};\n\n/** Test function to validate a date string. Accepts empty strings. */\nexport const testDateStringIsValid = (value: string) => {\n // Ignore empty values\n if (!value) {\n return true;\n }\n\n return new RegExp(DATE_PATTERN).test(value) && moment(value).isValid();\n};\n\nexport const isAdministrator = (user: User) =>\n user.roles.includes(UserRoles.administrator);\n\nexport const isDealer = (user: User) => user.roles.includes(UserRoles.dealer);\n\nexport const isAccountManager = (user: User) =>\n user.roles.includes(UserRoles.account_manager);\n\nexport const isSuperUser = (user: User) =>\n [UserRoles.senior_manager, UserRoles.administrator].some((r) =>\n user.roles.includes(r)\n );\n\nexport const canManageContacts = isSuperUser;\n\nexport const canManageUsers = isSuperUser;\n\nexport const canManageAccountManagers = isSuperUser;\n\nexport const canManageRegionalSalesManagers = isSuperUser;\n\nexport const canManageTargets = (user: User) =>\n isSuperUser(user) || user.roles.includes(UserRoles.regional_sales_manager);\n\nexport const canViewNetProfit = canManageTargets;\n\nexport const canManageProposalFiles = (user: User) =>\n isSuperUser(user) ||\n user.roles.includes(UserRoles.case_management_team) ||\n user.roles.includes(UserRoles.account_manager) ||\n user.roles.includes(UserRoles.regional_sales_manager);\n\nexport const canEditProposal = (\n user: User,\n proposalStatus: ProposalStatusEnum\n) => {\n if (user.roles.includes(UserRoles.administrator)) {\n return true;\n }\n\n const hasPermissionToEdit = user.roles.includes(UserRoles.dealer);\n const proposalCanBeEdited =\n proposalStatus === ProposalStatusEnum.UNDERWRITING ||\n proposalStatus === ProposalStatusEnum.ACCEPTED;\n\n return hasPermissionToEdit && proposalCanBeEdited;\n};\n\nexport const EMAIL_PATTERN =\n /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n\nexport const DATE_PATTERN = /^\\d{4}-\\d{1,2}-\\d{1,2}$/;\n\nexport const GUID_PATTERN =\n /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;\n\nexport const SPECIAL_CHARACTER_SELECT = /[&/\\\\#,+()$~%.'£\":*^-_=?!<>{}]/g;\n\n/** Adds the http protocol to a url string */\nexport const addHttp = (url: string) => {\n if (url.search(/^http[s]?:\\/\\//) === -1) {\n return `http://${url}`;\n }\n return url;\n};\n\n/**\n * Gets a formatted date, including the time if it is recent.\n * Behaviour is roughly the same as dates in Outlook.\n */\nexport const getShortDateAndTime = (date?: string | Date) => {\n if (!date) {\n return null;\n }\n\n const now = moment();\n const then = moment(date);\n\n if (then.isSame(now, \"day\")) {\n return moment(date).format(\"HH:mm\");\n }\n\n if (then.isSame(now, \"week\")) {\n return moment(date).format(\"ddd HH:mm\");\n }\n\n if (\n then.isSame(now, \"year\") &&\n then.isSameOrAfter(moment().subtract(1, \"month\"))\n ) {\n return moment(date).format(\"ddd DD/MM\");\n }\n\n return then.format(\"DD/MM/YYYY\");\n};\n\n/**\n * Gets a formatted date, including the time if it is recent.\n * Behaviour is roughly the same as dates in Outlook.\n */\nexport const getShortDate = (date?: string | Date) => {\n if (!date) {\n return null;\n }\n\n const now = moment();\n const then = moment(date);\n\n if (then.isSame(now, \"day\")) {\n return \"Today\";\n }\n\n if (then.isSame(moment().subtract(1, \"day\"))) {\n return \"Yesterday\";\n }\n\n if (then.isSame(now, \"week\")) {\n return moment(date).format(\"ddd\");\n }\n\n if (then.isSame(now, \"year\")) {\n return moment(date).format(\"ddd DD/MM\");\n }\n\n return then.format(\"DD/MM/YYYY\");\n};\n","import classnames from \"classnames\";\nimport { Field, FieldProps } from \"formik\";\nimport * as React from \"react\";\nimport { Col } from \"reactstrap\";\nimport FormGroupWrapper from \"./FormGroupWrapper\";\nimport \"./formstyles.scss\";\n\ninterface RadioFieldProps {\n name: string;\n description?: string;\n title?: string;\n colSize?: number;\n options: { label: any; value: any }[];\n vertical?: boolean;\n readOnly?: boolean;\n autoFocus?: boolean;\n className?: string;\n}\n\nconst RadioField = ({\n name,\n description,\n options,\n title,\n colSize,\n vertical,\n readOnly,\n autoFocus,\n className\n}: RadioFieldProps) => (\n \n {({ form, field }: FieldProps) => (\n \n \n
\n {options.map((opt, i) => (\n \n {\n if (!readOnly) {\n form.setFieldValue(name, opt.value);\n form.setFieldTouched(name, true);\n }\n }}\n />\n \n {opt.label}\n \n
\n ))}\n \n \n \n )}\n
\n);\n\nexport default RadioField;\n","import { Dealer } from \"../Dealers/types\";\nimport { Vehicle } from \"../Proposals/types\";\nimport { ContextNames, ProductTypeEnum, SearchArgs, User } from \"../types\";\n\nexport interface VehicleLookup {\n bodyStyle?: string;\n capCode?: string;\n capDer?: string;\n capId?: string;\n capMan?: string;\n capMod?: string;\n colour?: string;\n doors?: number;\n engineSize?: string;\n exported?: boolean;\n fuel?: string;\n imported?: boolean;\n lCV?: boolean;\n make?: string;\n model?: string;\n regDate?: string;\n regNo?: string;\n scrapped?: boolean;\n transmission?: string;\n vIN?: string;\n variant?: string;\n}\n\nexport interface QuotationSearchArgs extends SearchArgs {\n accountManagerId?: string;\n dealerId?: number;\n}\n\nexport interface QuotationFormValues {\n id?: number;\n dealerId?: number;\n lenderId?: number;\n title?: string;\n forename?: string;\n middleName?: string;\n surname?: string;\n mobile?: string;\n email?: string;\n targetBy?: QuotationTargetBy;\n targetByValue?: number;\n productTypes?: ProductTypeEnum[];\n showFinanceSection: boolean;\n showLoanDetailsSection: boolean;\n showResults: boolean;\n showCommission: boolean;\n vehicle: Vehicle;\n finance: QuotationFinance;\n isMannIslandDealer?: boolean;\n isMannIslandZlist?: boolean;\n isMultiQuote?: boolean;\n __typename?: string;\n}\n\nexport interface QuotationFinance {\n id?: string;\n productType?: ProductTypeEnum;\n term?: number;\n cashPrice?: number;\n deposit?: number;\n financeValue?: number;\n partExchangeSettlement?: number;\n partExchangeValue?: number;\n arrangementFee?: number;\n completionFee?: number;\n guaranteedFutureValue?: number;\n monthlyPayment?: number;\n commission?: number;\n commissionCode?: string;\n aprRate?: number;\n flatRate?: number;\n __typename?: string;\n}\nexport interface Quotation {\n id?: number;\n dealerId?: number;\n lenderId?: number;\n dealer?: Dealer;\n title?: string;\n forename?: string;\n middleName?: string;\n surname?: string;\n mobile?: string;\n email?: string;\n submittedDate?: Date;\n targetBy?: QuotationTargetBy;\n targetByValue?: number;\n skipVehicle?: boolean;\n finance: {\n id?: string;\n productType?: ProductTypeEnum;\n term?: number;\n cashPrice?: number;\n deposit?: number;\n financeValue?: number;\n partExchangeSettlement?: number;\n partExchangeValue?: number;\n arrangementFee?: number;\n completionFee?: number;\n guaranteedFutureValue?: number;\n monthlyPayment?: number;\n commission?: number;\n commissionCode?: string;\n aprRate?: number;\n flatRate?: number;\n __typename?: string;\n totalFinance?: number;\n interestCharges?: number;\n totalCharges?: number;\n balancePayable?: number;\n totalAmountPayable?: number;\n };\n lender?: {\n id?: number;\n name?: string;\n };\n vehicle?: Vehicle;\n isHidden?: boolean;\n isMannIslandDealer?: boolean;\n isMannIslandZList?: boolean;\n isMultiQuote?: boolean;\n}\n\nexport interface QuotationRequest {\n minTerm?: number;\n maxTerm?: number;\n dealerId?: number;\n productTypes?: ProductTypeEnum[];\n cAP?: string;\n mileage?: number;\n maxAnnualMileage?: number;\n targetBy?: QuotationTargetBy;\n targetByValue?: number;\n isNew?: boolean;\n dateOfRegistration?: string;\n cashPrice?: number;\n cashDeposit?: number;\n partExchange?: number;\n partExchangeSettlement?: number;\n extras?: number;\n rFL?: number;\n capId?: number;\n import?: boolean;\n regNo?: string;\n vehicleType?: string;\n usage?: string;\n vatQualify?: boolean;\n}\n\nexport interface QuotationListResult {\n results: QuotationResults[];\n unableToQuote: UnableToQuote[];\n}\n\nexport interface UnableToQuote {\n term: number;\n productType: ProductTypeEnum;\n messages: string[];\n lenderName: string;\n}\n\nexport interface QuotationResults {\n id?: number;\n term: number;\n productType: ProductTypeEnum;\n monthlyPayment: number;\n cashPrice: number;\n deposit: number;\n finance: number;\n arrangementFee: number;\n completionFee: number;\n finalPayment: number;\n aprRate: number;\n flatRate: number;\n guaranteedFutureValue: number;\n guaranteed: boolean;\n lenderId?: number;\n lenderName?: string;\n loanId: number;\n commissionCode: string;\n commission: number;\n interestCharges: number;\n}\n\nexport interface QuotationProps {\n showDealerSelect?: boolean;\n loggedInUser: User;\n quotation: Quotation;\n context?: ContextNames;\n}\n\nexport interface QuotationData {\n quotation: Quotation;\n}\n\nexport interface QuotationVariables {\n input: Quotation;\n}\n\nexport enum QuotationTargetBy {\n FLAT_RATE = \"FLAT_RATE\",\n APR_RATE = \"APR_RATE\",\n COMMISSION_VALUE = \"COMMISSION_VALUE\",\n MONTHLY_PAYMENT = \"MONTHLY_PAYMENT\",\n}\n\nexport const QuotationTargetByLookup: {\n [key in QuotationTargetBy]: {\n description: string;\n shortDescription?: string;\n };\n} = {\n FLAT_RATE: { description: \"Flat rate\" },\n APR_RATE: { description: \"APR rate\" },\n COMMISSION_VALUE: {\n description: \"Commission\",\n shortDescription: \"Comm.\",\n },\n MONTHLY_PAYMENT: {\n description: \"Monthly repayment\",\n shortDescription: \"Repayment\",\n },\n};\n\nexport default () => ({});\n","import { DocumentNode } from \"apollo-boost\";\nimport gql from \"graphql-tag\";\nimport memoizeOne from \"memoize-one\";\nimport * as React from \"react\";\nimport { graphql, Query, QueryResult, useQuery } from \"react-apollo\";\nimport { AccountManagerFragment } from \"./AccountManagers/fragments\";\nimport {\n PermissionActivityNames,\n PermissionModuleNames,\n} from \"./Permissions/types\";\nimport { CompositeComponent, User, UserRoles } from \"./types\";\n\nexport interface LoggedInUserProps {\n loggedInUser?: User;\n loading?: boolean;\n}\n\ninterface LoggedInUserQueryProps {\n children: (\n result: QueryResult & { loggedInUser?: User }\n ) => JSX.Element | null;\n}\n\nexport const LoggedInUserFragment = gql`\n fragment LoggedInUserFragment on LoggedInUser {\n id\n username\n isSuspended\n canSubmitProposals\n roles\n forename\n surname\n tawkTo {\n enabled\n hash\n }\n dealer {\n id\n name\n }\n accountManager {\n ...AccountManagerFragment\n }\n regionalSalesManager {\n id\n }\n permissions {\n id\n activities\n permissionRoleId\n permissionModuleId\n }\n }\n ${AccountManagerFragment}\n`;\n\nexport const LoggedInUserShallowFragment = gql`\n fragment LoggedInUserShallowFragment on LoggedInUser {\n id\n username\n isSuspended\n canSubmitProposals\n roles\n forename\n surname\n dealer {\n id\n name\n }\n permissions {\n id\n activities\n permissionRoleId\n permissionModuleId\n }\n }\n`;\n\nexport const GET_LOGGED_IN_USER = gql`\n query LoggedInUserQuery {\n loggedInUser {\n ...LoggedInUserFragment\n }\n }\n ${LoggedInUserFragment}\n`;\n\nconst LOGGED_IN_USER_WITH_DEALER_RATES_QUERY = gql`\n query LoggedInUserWithDealerRatesQuery {\n loggedInUser {\n id\n username\n isSuspended\n roles\n dealer {\n id\n isMannIslandDealer\n isMultiQuote\n rateBands {\n minVehicleAgeInMonths\n maxVehicleAgeInMonths\n flatRate\n maxFlatRate\n volumeBonusFlatRate\n }\n }\n }\n }\n`;\n\nexport const GET_LOGGED_IN_USER_SHALLOW = gql`\n query LoggedInUserShallowQuery {\n loggedInUser {\n ...LoggedInUserShallowFragment\n }\n }\n ${LoggedInUserShallowFragment}\n`;\n\nconst LoggedInUserQueryCore = ({\n query,\n children,\n}: LoggedInUserQueryProps & { query: DocumentNode }) => (\n \n {(result: QueryResult) =>\n children({\n ...result,\n loggedInUser: result && result.data && result.data.loggedInUser,\n })\n }\n \n);\n\nconst LoggedInUserQuery = (props: LoggedInUserQueryProps) => (\n \n);\n\nexport const LoggedInUserWithDealerRatesQuery = (\n props: LoggedInUserQueryProps\n) => (\n \n);\n\nexport const withLoggedInUser = (\n WrappedComponent: CompositeComponent\n) => {\n return graphql(\n GET_LOGGED_IN_USER_SHALLOW,\n {\n props: (props: any) => {\n const {\n data: { loading, error, loggedInUser },\n } = props;\n\n return {\n loading,\n error,\n loggedInUser,\n ...props.ownProps,\n };\n },\n }\n )(WrappedComponent);\n};\n\n/** Get helper values indicating the roles the logged in user is a member of */\nconst isInRoles = memoizeOne((user?: User) => {\n const checkIsInRole = (role: UserRoles) =>\n user?.roles?.includes(role) === true;\n\n return {\n isDealer: checkIsInRole(UserRoles.dealer),\n isAccountManager: checkIsInRole(UserRoles.account_manager),\n isAdministrator: checkIsInRole(UserRoles.administrator),\n isRegionalSalesManager: checkIsInRole(UserRoles.regional_sales_manager),\n isSeniorManager: checkIsInRole(UserRoles.senior_manager),\n isCaseManagementTeam: checkIsInRole(UserRoles.case_management_team),\n isSuperUser:\n checkIsInRole(UserRoles.administrator) ||\n checkIsInRole(UserRoles.senior_manager),\n isDirectCustomer: checkIsInRole(UserRoles.direct_customer),\n };\n});\n\n/** Build an array of strings representing the users permissions as \"Module:Activity\" */\nconst getPermissionsLookup = memoizeOne((user?: User) => {\n return user?.permissions?.reduce((prev, p) => {\n p.activities.forEach((activity) => {\n const key = `${p.permissionModuleId}:${activity}`;\n if (!prev.includes(key)) {\n prev.push(key);\n }\n });\n\n return prev;\n }, [] as string[]);\n});\n\n/** Check that the specified user is authorized for the module and activity */\nconst checkIsAuthorized = (\n permissionModule: PermissionModuleNames,\n activity: PermissionActivityNames,\n user?: User\n) => {\n if (!user) {\n return false;\n }\n\n if (user.roles.includes(UserRoles.administrator)) {\n return true;\n }\n\n const permissions = getPermissionsLookup(user);\n const key = `${permissionModule}:${activity}`;\n\n return permissions?.includes(key) === true;\n};\n\nexport const useLoggedInUser = (query?: DocumentNode) => {\n const { data, loading, error } = useQuery<{ loggedInUser: User }>(\n query || GET_LOGGED_IN_USER\n );\n\n const loggedInUser = data?.loggedInUser;\n\n return {\n loading,\n loggedInUser,\n error,\n /** Check that the user is authorized for the module and activity */\n checkIsAuthorized: (\n permissionModule: PermissionModuleNames,\n activity: PermissionActivityNames\n ) => checkIsAuthorized(permissionModule, activity, loggedInUser),\n /** Check that the user is authorized to read the specified module */\n checkCanRead: (permissionModule: PermissionModuleNames) =>\n checkIsAuthorized(\n permissionModule,\n PermissionActivityNames.Read,\n loggedInUser\n ),\n /** Check that the user is authorized to read internal data in the specified module */\n checkCanReadInternal: (permissionModule: PermissionModuleNames) =>\n checkIsAuthorized(\n permissionModule,\n PermissionActivityNames.ReadInternal,\n loggedInUser\n ),\n /** Check that the user is authorized to create entities in the specified module */\n checkCanCreate: (permissionModule: PermissionModuleNames) =>\n checkIsAuthorized(\n permissionModule,\n PermissionActivityNames.Create,\n loggedInUser\n ),\n /** Check that the user is authorized to update entities in the specified module */\n checkCanUpdate: (permissionModule: PermissionModuleNames) =>\n checkIsAuthorized(\n permissionModule,\n PermissionActivityNames.Update,\n loggedInUser\n ),\n /** Check that the user is authorized to delete entities in the specified module */\n checkCanDelete: (permissionModule: PermissionModuleNames) =>\n checkIsAuthorized(\n permissionModule,\n PermissionActivityNames.Delete,\n loggedInUser\n ),\n ...isInRoles(loggedInUser),\n };\n};\n\nexport default LoggedInUserQuery;\n","import React from \"react\";\nimport { formatCurrency, getMonthsAndYearsText, getSingleLineAddress } from \"../../utils\";\nimport { HomeAddress } from \"../Proposals/types\";\nimport SummaryRow, { TelephoneSummaryRow } from \"./SummarySection/SummaryRow\";\n\nconst AddressRow = ({\n address,\n index,\n}: {\n address: HomeAddress;\n index: number;\n}) => (\n <>\n \n {index === 0 && (\n \n )}\n \n \n \n);\n\nexport default AddressRow;\n","import classnames from \"classnames\";\nimport { FieldProps } from \"formik\";\nimport { get } from \"lodash\";\nimport * as React from \"react\";\nimport { FormGroup, Label } from \"reactstrap\";\n\nconst FormGroupWrapper = ({\n className,\n field,\n form,\n title,\n description,\n children\n}: FieldProps & {\n className?: string;\n title?: string;\n description?: string | React.ReactNode;\n children: React.ReactNode;\n}) => {\n const { errors, touched } = form;\n const isTouched = get(touched, field.name);\n const error = isTouched ? get(errors, field.name) : null;\n const descriptionNode =\n description && typeof description === \"string\" ? (\n {description}\n ) : (\n description\n );\n\n return (\n \n {title ? : null}\n {children}\n
{error}
\n {descriptionNode || null}\n \n );\n};\n\nexport default FormGroupWrapper;\n","export interface ClientConfig {\n PUBLIC_URL: string;\n GRAPHQL_ENDPOINT: string;\n API_URL: string;\n TITLE: string;\n AUTH0_CLIENT_ID: string;\n AUTH0_DOMAIN: string;\n AUTH0_AUDIENCE: string;\n VERSION_CHECK_INTERVAL_MINS: number;\n MAPBOX_ACCESS_TOKEN: string;\n MAPBOX_STYLE: string;\n MAPBOX_DARK_STYLE: string;\n MAPBOX_SATELLITE_STYLE: string;\n MAPBOX_USERNAME: string;\n AUTOCONVERT_URL: string;\n AUTOCONVERT_NAME: string;\n TAWK_TO_SITE_ID: string;\n SHAREPOINT_URL: string;\n}\n\nlet config: ClientConfig | undefined;\n\n/**\n * Creates or returns the runtime configuration settings\n * for the client\n */\nconst getConfig = (): ClientConfig => {\n if (config) {\n return config;\n }\n const env: any = (process as any).env;\n\n config = {\n AUTH0_CLIENT_ID: env.REACT_APP_AUTH0_CLIENT_ID,\n AUTH0_DOMAIN: env.REACT_APP_AUTH0_DOMAIN,\n AUTH0_AUDIENCE: env.REACT_APP_AUTH0_AUDIENCE,\n TITLE: env.REACT_APP_TITLE || \"Eurodealer\",\n PUBLIC_URL: env.PUBLIC_URL || undefined,\n GRAPHQL_ENDPOINT: `${env.REACT_APP_API_URL || \"\"}/graphql`,\n API_URL: env.REACT_APP_API_URL || \"\",\n VERSION_CHECK_INTERVAL_MINS:\n env.REACT_APP_VERSION_CHECK_INTERVAL_MINS || 15,\n MAPBOX_ACCESS_TOKEN: env.REACT_APP_MAPBOX_ACCESS_TOKEN,\n MAPBOX_STYLE: env.REACT_APP_MAPBOX_STYLE,\n MAPBOX_DARK_STYLE:\n env.REACT_APP_MAPBOX_DARK_STYLE || env.REACT_APP_MAPBOX_STYLE,\n MAPBOX_SATELLITE_STYLE:\n env.REACT_APP_MAPBOX_SATELLITE_STYLE || env.REACT_APP_MAPBOX_STYLE,\n MAPBOX_USERNAME: env.REACT_APP_MAPBOX_USERNAME,\n AUTOCONVERT_URL: env.REACT_APP_AUTOCONVERT_URL || \"\",\n AUTOCONVERT_NAME: env.REACT_APP_AUTOCONVERT_NAME || \"AutoConvert\",\n TAWK_TO_SITE_ID: env.REACT_APP_TAWK_TO_SITE_ID,\n SHAREPOINT_URL: env.REACT_APP_SHAREPOINT_URL,\n };\n\n return config;\n};\n\nexport default getConfig();\n","module.exports = __webpack_public_path__ + \"static/media/Blog_1.8a17bd81.jpg\";","module.exports = __webpack_public_path__ + \"static/media/Blog_2.73c09704.jpg\";","module.exports = __webpack_public_path__ + \"static/media/Blog_3.884a0194.jpg\";","import moment from \"moment\";\nimport * as React from \"react\";\nimport { usePageVisibility } from \"react-page-visibility\";\nimport { useHistory } from \"react-router\";\nimport { Link as RouterLink } from \"react-router-dom\";\nimport { getFullName } from \"../../utils\";\nimport { useLoggedInUser } from \"../LoggedInUserQuery\";\nimport ProposalBadges from \"../Proposals/ProposalBadges\";\nimport { useProposalList } from \"../Proposals/ProposalList/ProposalListQuery\";\nimport { Proposal, ProposalSearchArgs } from \"../Proposals/types\";\n\nconst getName = (proposal: Proposal) =>\n proposal.individualCustomer\n ? getFullName(proposal.individualCustomer)\n : proposal.business.name;\n\nconst HomeSceneNotifications = () => {\n const startDate =\n process && process.env && process.env.NODE_ENV === \"development\"\n ? moment(\"2019-04-01\")\n : moment();\n\n const searchArgs: ProposalSearchArgs = {\n startDate: startDate.startOf(\"day\").toISOString(true),\n pageSize: 5\n };\n const isVisible = usePageVisibility();\n const { loggedInUser } = useLoggedInUser();\n const { proposals } = useProposalList(\n searchArgs,\n isVisible ? 30000 : undefined\n );\n const history = useHistory();\n\n if (!proposals || !loggedInUser) {\n return null;\n }\n\n return (\n <>\n
\n {proposals.edges.map(({ node: item }) => (\n history.push(`/proposals/${item.proposalRef}`)}\n >\n
\n

\n {getName(item) || \"[no name]\"}{\" \"}\n \n {item.vehicle.regNo\n ? `${item.vehicle.regNo.toUpperCase()}, `\n : null}\n {item.vehicle.make || item.vehicle.model\n ? `${item.vehicle.make} ${item.vehicle.model}`\n : \"[vehicle unknown]\"}\n \n

\n

{item.dealer?.name}

\n
\n \n
\n ))}\n \n {proposals.pageInfo.hasMorePages ? (\n \n {(proposals.pageInfo.totalResults || 0) -\n (proposals.pageInfo.pageSize || 0)}{\" \"}\n more proposals today\n \n ) : null}\n \n );\n};\n\nexport default HomeSceneNotifications;\n","/* eslint-disable jsx-a11y/anchor-is-valid */\nimport { faCheck, faExclamation } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { Badge, Dropdown, DropdownMenu, DropdownToggle } from \"reactstrap\";\nimport withToggleState, { ToggleStateProps } from \"../withToggleState\";\n\ninterface FormNavProps {\n sections: FormNavItemProps[];\n currentSection: string;\n isEditing: boolean;\n}\n\nexport interface FormNavItemProps {\n section: string;\n activeSection: string;\n title: string;\n onClick: (s: string) => void;\n isSectionValid: boolean;\n isSectionTouched: boolean;\n}\n\nconst FormNavDropdown = withToggleState()(\n ({\n sections,\n currentSection,\n active,\n toggle,\n }: FormNavProps & ToggleStateProps) => {\n const currentProps = sections.find((s) => s.section === currentSection);\n const index = currentProps ? sections.indexOf(currentProps) : 0;\n const title = currentProps && currentProps.title;\n return (\n \n \n {`${index + 1}/${sections.length}: ${title}`}{\" \"}\n {currentProps && (\n \n )}\n \n \n {sections.map((s, i) => (\n {\n toggle();\n s.onClick(s.section);\n }}\n >\n {`${s.title}`}{\" \"}\n \n \n ))}\n \n \n );\n }\n);\n\nconst SectionStatusText = ({\n isSectionValid,\n isSectionTouched,\n section,\n currentSection,\n}: FormNavItemProps & {\n currentSection: string;\n}) => (\n \n {!isSectionValid ? (\n \n \n \n ) : isSectionTouched ? (\n \n \n \n ) : null}\n \n);\n\nconst FormNavItem = React.memo(\n ({\n isEditing,\n ...props\n }: FormNavItemProps & {\n currentSection: string;\n isEditing: boolean;\n }) => (\n
  • \n {\n e.preventDefault();\n props.onClick(props.section);\n }}\n >\n {props.title}\n {isEditing && }\n \n
  • \n )\n);\n\nconst FormNav = ({ sections, currentSection, isEditing }: FormNavProps) => (\n <>\n \n {sections.map((s: FormNavItemProps) => (\n \n ))}\n \n \n \n \n \n);\n\nexport default FormNav;\n","import { faSave, faSpinner } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport moment from \"moment\";\nimport * as React from \"react\";\nimport { Button, Col, Row } from \"reactstrap\";\nimport DistanceInWordsText from \"../Proposals/ProposalForm/DistanceInWordsText\";\nimport FormUpdateButtons from \"./FormUpdateButtons\";\nimport { CreateOrUpdateMode, SaveDraftProps } from \"./MultiSectionForm\";\n\nexport interface FormSectionFooterProps extends SaveDraftProps {\n isLastSection: boolean;\n onSubmitForm: () => Promise;\n isSubmitting: boolean;\n submitButtonText?: string;\n dirty: boolean;\n isValid: boolean;\n isSectionValid: boolean;\n createOrUpdate: CreateOrUpdateMode;\n canUpdate?: boolean;\n isEditing: boolean;\n onIsEditingChanged: (isEditing: boolean) => void;\n onCompleteSection: () => Promise;\n}\n\nconst FormSectionFooter = React.memo((props: FormSectionFooterProps) => {\n const {\n isLastSection,\n onCompleteSection,\n isSectionValid,\n isSubmitting,\n submitButtonText,\n createOrUpdate,\n draftValidationMessage,\n draftLastSaved,\n saveDraft,\n savingDraft,\n } = props;\n\n return (\n \n {createOrUpdate === CreateOrUpdateMode.CREATE ? (\n <>\n \n \n {isSubmitting ? (\n \n ) : null}{\" \"}\n {isLastSection ? submitButtonText || \"Submit\" : \"Next\"}\n \n {!isSectionValid && (\n

    \n Error in this section\n

    \n )}\n \n {saveDraft && (\n \n {\n e.preventDefault();\n saveDraft();\n }}\n >\n \n Save as draft\n \n {draftLastSaved ? (\n

    \n Saved{\" \"}\n \n

    \n ) : null}\n {draftValidationMessage ? (\n

    \n {draftValidationMessage}\n

    \n ) : null}\n \n )}\n \n ) : (\n \n \n \n )}\n
    \n );\n});\n\nexport default FormSectionFooter;\n","import * as React from \"react\";\nimport {\n Card,\n CardBody,\n CardHeader,\n CardSubtitle,\n CardTitle\n} from \"reactstrap\";\nimport { FormSectionFooterProps } from \"./FormSectionFooter\";\nimport FormUpdateButtons from \"./FormUpdateButtons\";\n\nexport interface FormSectionHeaderProps extends FormSectionFooterProps {\n title: string;\n subtitle?: string;\n}\n\nclass FormSectionWrapper extends React.Component<\n FormSectionHeaderProps & { id: string; children: React.ReactNode }\n> {\n public render() {\n const { children, title, subtitle, ...footerProps } = this.props;\n\n return (\n \n \n \n {title}\n \n \n {subtitle ? (\n \n {subtitle}\n \n ) : null}\n \n {children}\n \n );\n }\n}\n\nexport default FormSectionWrapper;\n","module.exports = __webpack_public_path__ + \"static/media/open-sans-v15-latin-300.60c86674.woff2\";","module.exports = __webpack_public_path__ + \"static/media/open-sans-v15-latin-regular.cffb686d.woff2\";","module.exports = __webpack_public_path__ + \"static/media/open-sans-v17-latin-700.0edb7628.woff2\";","import * as React from \"react\";\nimport Select from \"react-select\";\n// tslint:disable-next-line:no-submodule-imports\nimport { Props } from \"react-select/src/Select\";\n// tslint:disable-next-line:no-submodule-imports\nimport { Styles } from \"react-select/src/styles\";\n// tslint:disable-next-line:no-submodule-imports\nimport { Theme } from \"react-select/src/types\";\n\nexport const selectStyles: Partial = {\n container: provided => ({\n ...provided,\n minWidth: 150\n }),\n menu: provided => ({\n ...provided,\n zIndex: 10000\n }),\n input: provided => ({\n ...provided,\n \"@media (max-width: 768px)\": {\n fontSize: \"1rem\"\n }\n }),\n control: (provided, { isFocused }) => {\n return {\n ...provided,\n boxShadow: isFocused\n ? `inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0 0.2rem rgba(117, 48, 207, 0.25)`\n : \"inset 0 1px 1px rgba(0, 0, 0, 0.075)\",\n borderColor: isFocused ? \"#ba98e7\" : \"#ced4da\",\n \"&:hover\": {\n borderColor: isFocused ? \"#ba98e7\" : \"#ced4da\"\n },\n height: \"35.6px\",\n minHeight: \"35.6px\"\n };\n },\n valueContainer: (provided: any) => ({\n ...provided,\n top: -1,\n left: 3\n })\n};\n\nexport const selectTheme: (theme: Theme) => Theme = theme => ({\n ...theme,\n borderRadius: 4.8,\n colors: {\n ...theme.colors,\n primary: \"#7530cf\",\n primary75: \"#7a3dc9\",\n primary50: \"#9872ca\",\n primary25: \"#dbc1fc\"\n },\n spacing: {\n ...theme.spacing,\n controlHeight: 36\n }\n});\n\nconst CustomSelect: React.ComponentType<\n Props & React.RefAttributes\n> = React.forwardRef<{}, Props>((props: Props, ref: any) => (\n