{"version":3,"sources":["../node_modules/react-page-visibility/node_modules/prop-types/index.js","../node_modules/react-page-visibility/node_modules/prop-types/factoryWithThrowingShims.js","../node_modules/react-page-visibility/node_modules/prop-types/lib/ReactPropTypesSecret.js","components/Forms/RadioButtons.tsx","components/Forms/RadioButtonsField.tsx","../node_modules/querystring-es3/decode.js","../node_modules/querystring-es3/encode.js","components/Proposals/ProposalDealerOverview/StatsBox.tsx","components/AccountManagers/AccountManagerActivities/types.ts","components/AccountManagers/AccountManagerActivities/accountManagerActivityValidationSchema.ts","components/AccountManagers/AccountManagerActivities/CreateOrUpdateActivityFormInner.tsx","components/AccountManagers/AccountManagerActivities/fragments.ts","components/AccountManagers/AccountManagerActivities/useAccountManagerActivity.ts","components/AccountManagers/AccountManagerActivities/useCreateOrUpdateActivity.ts","components/AccountManagers/AccountManagerActivities/CreateOrUpdateActivityModal.tsx","components/AccountManagers/AccountManagerActivities/AccountManagerActivityActionButtons.tsx","components/AccountManagers/AccountManagerActivities/useDeleteAccountManagerActivity.ts","components/AccountManagers/AccountManagerActivities/DeleteAccountManagerActivityDropdownItem.tsx","components/AccountManagers/AccountManagerActivities/AccountManagerActivityListItem.tsx","components/AccountManagers/AccountManagerActivities/AccountManagerActivityList.tsx","../node_modules/resolve-pathname/esm/resolve-pathname.js","components/Dealers/CreateHouseDealer/CreateHouseDealerMutation.tsx","components/Dealers/DealerList/DealerListFilterPanel.tsx","components/Dealers/DealerBadges.tsx","components/Dealers/DealerList/DealerListSearchForm.tsx","components/AccountManagers/AccountManagerTargetsSummary/AccountManagerTargetsQuery.tsx","../node_modules/reactstrap/es/ButtonGroup.js","../node_modules/querystring-es3/index.js","../node_modules/reactstrap/es/ButtonDropdown.js","components/AccountManagers/AccountManagerActivities/AccountManagerActivityTabContent.tsx","components/Dealers/CreateHouseDealer/HouseDealerFormInner.tsx","components/Dealers/CreateHouseDealer/CreateHouseDealerModal.tsx","components/Dealers/DealerList/DealerListActionButtons.tsx","components/Dealers/DealerList/DealerDropdown.tsx","components/Dealers/DealerList/DealerListItem.tsx","components/Dealers/DealerList/index.tsx","components/Proposals/ProposalDealerOverview/TargetStatsBox.tsx","components/AccountManagers/AccountManagerTargetsSummary/index.tsx","components/AccountManagers/AccountManagerScene/AccountManagerTargetsTabContent.tsx","components/AccountManagers/accountManagerValidationSchema.ts","components/AccountManagers/AccountManagerForm/AccountManagerFormInner.tsx","components/AccountManagers/AccountManagerForm/CreateOrUpdateAccountManagerMutation.tsx","components/AccountManagers/AccountManagerBadges.tsx","components/AccountManagers/AccountManagerForm/CreateAccountManagerModal.tsx","components/AccountManagers/AccountManagerList/AccountManagerListFilterPanel.tsx","components/AccountManagers/AccountManagerList/DeleteAccountManagerMutation.tsx","components/AccountManagers/AccountManagerList/DeleteAccountManagerDropdownItem.tsx","components/AccountManagers/AccountManagerList/AccountManagerListItem.tsx","components/AccountManagers/AccountManagerList/index.tsx","../node_modules/reactstrap/es/UncontrolledButtonDropdown.js","components/RegionalSalesManagers/regionalSalesManagerValidationSchema.ts","components/RegionalSalesManagers/RegionalSalesManagerForm/CreateOrUpdateRegionalSalesManagerMutation.tsx","components/RegionalSalesManagers/RegionalSalesManagerForm/RegionalSalesManagerFormInner.tsx","components/RegionalSalesManagers/RegionalSalesManagerForm/CreateRegionalSalesManagerModal.tsx","components/RegionalSalesManagers/RegionalSalesManagerListFilterPanel.tsx","components/RegionalSalesManagers/DeleteRegionalSalesManagerMutation.tsx","components/RegionalSalesManagers/DeleteRegionalSalesManagerDropdownItem.tsx","components/RegionalSalesManagers/RegionalSalesManagerBadges.tsx","components/RegionalSalesManagers/RegionalSalesManagerListItem.tsx","components/RegionalSalesManagers/RegionalSalesManagerList.tsx","components/RegionalSalesManagers/RegionalSalesManagerListScene.tsx","components/RegionalSalesManagers/RegionalSalesManagerAccountManagersTabContent.tsx","components/RegionalSalesManagers/RegionalSalesManagerDealersTabContent.tsx","components/RegionalSalesManagers/RegionalSalesManagerForm/RegionalSalesManagerFormSummary.tsx","components/RegionalSalesManagers/RegionalSalesManagerForm/RegionalSalesManagerEditForm.tsx","components/RegionalSalesManagers/RegionalSalesManagerDetailsTabContent.tsx","components/RegionalSalesManagers/RegionalSalesManagerProposalsTabContent.tsx","components/RegionalSalesManagers/RegionalSalesManagerTabHeaders.tsx","components/RegionalSalesManagers/RegionalSalesManagerScene.tsx","components/RegionalSalesManagers/UserRegionalSalesManagerScene.tsx","components/RegionalSalesManagers/RegionalSalesManagerRouter.tsx","../node_modules/react-page-visibility/dist/es5/PageVisibility.js","../node_modules/react-page-visibility/dist/es5/index.js"],"names":["module","exports","require","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","props","propName","componentName","location","propFullName","secret","err","Error","name","getShim","isRequired","ReactPropTypes","array","bool","func","number","object","string","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","getButtonClass","color","outline","result","defaultComparer","value1","value2","RadioButtons","value","options","onChange","comparer","valueComparer","className","data-toggle","map","x","index","key","classnames","active","type","e","target","checked","label","RadioButtonsField","title","colSize","submitOnChange","Col","lg","form","field","setFieldValue","setFieldTouched","submitForm","hasOwnProperty","obj","prop","Object","prototype","call","qs","sep","eq","length","regexp","split","maxKeys","len","i","kstr","vstr","k","v","replace","idx","indexOf","substr","decodeURIComponent","isArray","push","Array","xs","toString","stringifyPrimitive","isFinite","undefined","objectKeys","ks","encodeURIComponent","join","f","res","keys","StatsBox","description","units","loading","ActivityType","accountManagerActivityValidationSchema","Yup","id","nullable","default","dealerId","required","accountManagerId","notes","max","activityDate","activityType","CreateOrUpdateActivityFormInner","values","context","useLoggedInUser","loggedInUser","isAccountManager","useAccountManagerShallow","accountManager","accountManagerLoading","useDealerShallow","dealer","dealerLoading","maxDate","moment","endOf","toDate","create","accountManagerFixed","ContextNames","ACCOUNT_MANAGER","DEALER","dealerFixed","Row","fieldProps","FormGroupWrapper","Input","readOnly","to","icon","faCaretRight","AccountManagerSelect","onSelectAccountManager","autoFocus","isClearable","isDisabled","formikProps","DealerSelect","onSelectDealer","did","includeSuspended","RadioField","VISIT","TELEPHONE_CALL","CustomDatePicker","placeholder","selected","dateFormat","onDayChange","date","toISOString","rows","AccountManagerActivityFragment","gql","SingleDealerFragment","AccountManagerShallowFragment","GET_ACCOUNT_MANAGER_ACTIVITY","useAccountManagerActivity","useQuery","variables","skip","data","activity","CREATE_OR_UPDATE_ACTIVITY_MUTATION","useCreateOrUpdateActivity","useMutation","cleanActivityBeforeSubmit","cleanFormData","CreateOrUpdateActivityModal","accountManagerActivityId","isOpen","toggle","defaults","mutation","refresh","React","PagedListContext","useDealer","initialValues","merge","ModalForm","validationSchema","headerText","submitButtonText","onSubmit","input","then","AccountManagerActivityActionButtons","useToggle","Button","onClick","DELETE_ACCOUNT_MANAGER_ACTIVITY","useDeleteAccountManagerActivity","DeleteAccountManagerActivityDropdownItem","message","confirmButtonText","confirmButtonColor","confirm","DropdownItem","preventDefault","stopPropagation","faTrash","AccountManagerActivityListItem","item","showAccountManagerAndDealer","sm","faPhoneAlt","faStoreAlt","formatEnumValue","format","style","whiteSpace","ActionsDropdown","divider","ACCOUNT_MANAGER_ACTIVITIES_LIST","defaultSearchArgs","page","pageSize","AccountManagerActivityList","regionalSalesManagerId","isEditing","state","setState","hideModal","handleClick","activityId","SearchForm","mapValuesToQuerystring","mapQuerystringToValues","fixedValues","defaultValues","getVariables","memoizeOne","PagedList","query","listItemComponent","getSearchResults","activities","actionButtonsComponent","fetchPolicy","isAbsolute","pathname","charAt","spliceOne","list","n","pop","resolvePathname","from","hasTrailingSlash","toParts","fromParts","isToAbs","isFromAbs","mustEndAbs","concat","last","up","part","unshift","CREATE_HOUSE_DEALER","DealerFragment","useCreateHouseDealer","createHouseDealer","houseDealer","refetchQueries","GET_ACCOUNT_MANAGER","DealerListFilterPanel","isAdministrator","DealerMapType","LOCATIONS","PROPOSAL_PAIDOUT_VALUE","DealerMapStyle","LIGHT","DARK","SATELLITE","md","disabled","hasProposalsPaidOutInTimePeriod","startDateFieldName","endDateFieldName","editDatesFieldName","config","AUTOCONVERT_NAME","dss","DealerSetupStatus","DealerBadges","groups","isSuspended","countOfActiveProposals","contractSigned","autoConvert","isOnICORegister","setupStatus","franchised","isDealer","convertToTitleCase","g","IsStatusFullySetup","el","Math","pow","viewStatePropNames","mapOptionsPropNames","lastMonth","getMonthDateRange","subtract","fundedDealersOnly","hasActivityInLastSixWeeks","hasActivityInLastYear","hasActiveProposalsOnly","hasLocationOnly","locationNotFoundOnly","proposalStartDate","start","proposalEndDate","end","proposalEditDates","mapType","mapStyle","autoConvertOnly","houseDealersOnly","defaultViewState","latitude","longitude","zoom","pitch","bearing","DealerListSearchForm","fixedPageSize","fixedPage","fixedHasLocationOnly","children","cleanNumber","omit","viewState","pick","totalFinanceFilter","startDate","endDate","prevValues","currentValues","ignorePropNames","prevFormValues","currentFormValues","shouldSubmit","formValuesChanged","isEqual","searchTextChanged","q","forEach","p","prevViewStateValues","currentViewStateValues","setTimeout","initialViewState","onViewStateChanged","nextViewState","ACCOUNT_MANAGER_TARGETS","AccountManagerTargetsFragment","AccountManagerActualsFragment","ACCOUNT_MANAGER_TARGETS_WITHOUT_NET_PROFIT","AccountManagerTargetsFragmentWithoutNetProfit","AccountManagerActualsFragmentWithoutNetProfit","ACCOUNT_MANAGER_SINGLE_TARGET","useAccountManagerTargets","canViewNetProfit","targetTemplate","targets","useAccountManagerSingleTarget","propTypes","tag","tagPropType","cssModule","role","size","vertical","ButtonGroup","Tag","attributes","_objectWithoutPropertiesLoose","classes","mapToCssModules","classNames","createElement","_extends","defaultProps","decode","parse","encode","stringify","ButtonDropdown","Dropdown","group","UserAccountManagerActivityTabContent","regionalSalesManager","REGIONAL_SALES_MANAGER","AccountManagerActivityTabContent","match","params","parseInt","HouseDealerFormInner","formSize","wideCol","FormSize","NARROW","amId","requiresHouseDealer","houseDealerValidationSchema","CreateHouseDealerModal","history","useHistory","MapButtonLabel","faMapMarked","getCreateDealerUrl","CreateDealerButton","DealerListActionButtons","rsmId","selectedAccountManager","useAccountManager","loggedInAccountManager","useLoggedInAccountManager","checkCanCreate","isSuperUser","canCreate","PermissionModuleNames","Dealers","useState","showHouseDealerModal","setShowHouseDealerModal","toggleHouseDealerModal","hasHouseDealer","UncontrolledButtonDropdown","DropdownToggle","caret","DropdownMenu","RouterDropdownItem","window","search","faHome","DELETE_DEALER","DealerDropdown","deleteDealer","editDates","DEALER_LIST","DealerListItem","noGutters","getShortAddress","address","DealerList","SearchFormControls","filterPanel","dealers","defaultFormatter","round","TargetStatsBox","actual","proportionOfPeriodElapsed","projectToEndOfPeriod","formatter","displayActual","progressPercent","min","formatToPercentage","width","startOf","add","forecast","getQueryStringForReports","args","convertedArgs","querystring","AccountManagerTargetsSummaryInner","now","isBetween","totalDuration","duration","diff","asMilliseconds","getProportionOfPeriodElapsed","isSeniorManager","isRegionalSalesManager","checkCanRead","RegionalSalesManagers","canViewNewStats","isThisMonth","thisMonth","isSame","getIsThisMonth","actuals","xl","PeriodPickerField","monthsOnly","compactView","BooleanCheckboxField","proposalsCreated","totalCreatedCount","proposalsPaidout","totalPaidOutCount","netProfit","netProfit100","formatCurrency","turnover","totalFinance","dealerCreated","dealerPaidOut","dealerSetup","getProportion","holdbackInternal","FileDownloadLink","href","API_URL","faFileExcel","AccountManagerTargetsSummary","QuerystringForm","UserAccountManagerTargetsTabContent","LoadingSpinner","AccountManagerTargetsTabContent","accountManagerValidationSchema","email","mobile","telephoneValidationSchema","autoConvertReference","matches","GUID_PATTERN","FORMSTATE_create","AccountManagerFormInner","narrowCol","component","FormInputField","onSelectRegionalSalesManager","CREATE_OR_UPDATE_ACCOUNTMANAGER","AccountManagerFragment","cleanAccountManagerBeforeSubmit","user","useCreateOrUpdateAccountManager","createOrUpdateAccountManager","AccountManagerBadges","suspended","CreateAccountManagerModal","AccountManagerListFilterPanel","FormGroup","Label","RegionalSalesManagerSelect","DELETE_AM","DeleteAccountManagerMutation","DeleteAccountManagerDropdownItem","ACCOUNT_MANAGER_LIST","AccountManagerListItem","faMap","canManageAccountManagers","AccountManagerActionButtons","showCreateModal","setShowCreateModal","showCreateWithoutUserModal","setShowCreateWithoutUserModal","toggleCreateModal","useCallback","toggleCreateWithoutUserModal","AccountManagers","CreateUserModal","display","fixedRole","UserRoles","account_manager","AccountManagerActivity","AccountManagerList","hasIdentityProviderUserId","accountManagers","omitKeys","_Component","_this","this","defaultOpen","bind","_assertThisInitialized","_inheritsLoose","_proto","render","Component","_objectSpread2","regionalSalesManagerValidationSchema","region","CREATE_OR_UPDATE_RSM","RegionalSalesManagerFragment","cleanRegionalSalesManagerBeforeSubmit","CreateOrUpdateRegionalSalesManagerMutation","RegionalSalesManagerFormInner","errors","withRouter","createOrUpdateRegionalSalesManager","RegionalSalesManagerListFilterPanel","DELETE_RSM","DeleteRegionalSalesManagerMutation","DeleteRegionalSalesManagerDropdownItem","REGIONAL_SALES_MANAGER_LIST","RegionalSalesManagerBadges","Badge","RegionalSalesManagerListItem","canManageRegionalSalesManagers","RegionalSalesManagerList","RegionalManagerListFilterPanel","regionalSalesManagers","regional_sales_manager","s","RegionalSalesManagerListScene","Container","Breadcrumbs","breadcrumbs","RegionalSalesManagerAccountManagersTabContent","RegionalSalesManagerDealersTabContent","RegionalSalesManagerFormSummary","SummaryRow","RegionalSalesManagerEditForm","checkCanUpdate","useRegionalSalesManager","useCreateOrUpdateRegionalSalesManager","disableEditing","EditForm","summary","formValues","UserRegionalSalesManagerDetailsTabContent","RegionalSalesManagerDetailsTabContent","RegionalSalesManagerProposalsTabContent","ProposalList","fixedArgs","defaultArgs","status","RegionalSalesManagerTabHeaders","isCaseManagementTeam","roles","includes","case_management_team","tabs","path","collapse","Proposals","FullWidthTabHeaders","RegionalSalesManagerSceneInner","url","Users","username","TabContentContainer","preloadData","client","PROPOSAL_LIST","GET_USER","RegionalSalesManagerScene","useApolloClient","SceneLoadingSpinner","UserRegionalSalesManagerScene","DealerMapScene","RegionalSalesManagerRouter","fallback","_createClass","defineProperties","descriptor","enumerable","configurable","writable","defineProperty","Constructor","protoProps","staticProps","_toConsumableArray","arr","arr2","PageVisibility","_React$Component","instance","TypeError","_classCallCheck","self","ReferenceError","_possibleConstructorReturn","__proto__","getPrototypeOf","isSupported","visibility","subClass","superClass","constructor","setPrototypeOf","_inherits","handleVisibilityChange","document","addEventListener","event","removeEventListener","_props","apply","getHandlerArgs","forceUpdate","_props2","Children","only","displayName"],"mappings":"uFAiBEA,EAAOC,QAAUC,EAAQ,KAARA,I,kCCRnB,IAAIC,EAAuBD,EAAQ,MAEnC,SAASE,KACT,SAASC,KACTA,EAAuBC,kBAAoBF,EAE3CJ,EAAOC,QAAU,WACf,SAASM,EAAKC,EAAOC,EAAUC,EAAeC,EAAUC,EAAcC,GACpE,GAAIA,IAAWV,EAAf,CAIA,IAAIW,EAAM,IAAIC,MACZ,mLAKF,MADAD,EAAIE,KAAO,sBACLF,GAGR,SAASG,IACP,OAAOV,EAFTA,EAAKW,WAAaX,EAMlB,IAAIY,EAAiB,CACnBC,MAAOb,EACPc,KAAMd,EACNe,KAAMf,EACNgB,OAAQhB,EACRiB,OAAQjB,EACRkB,OAAQlB,EACRmB,OAAQnB,EAERoB,IAAKpB,EACLqB,QAASX,EACTY,QAAStB,EACTuB,YAAavB,EACbwB,WAAYd,EACZe,KAAMzB,EACN0B,SAAUhB,EACViB,MAAOjB,EACPkB,UAAWlB,EACXmB,MAAOnB,EACPoB,MAAOpB,EAEPqB,eAAgBjC,EAChBC,kBAAmBF,GAKrB,OAFAe,EAAeoB,UAAYpB,EAEpBA,I,kCCnDTnB,EAAOC,QAFoB,gD,qFCKrBuC,EAAiB,SAACC,EAAgBC,GACtC,IAAIC,EAAS,OAGb,OAFAA,GAAUD,EAAU,WAAa,GACjCC,GAAUF,GAAgB,aAItBG,EAAkB,SAACC,EAAaC,GAAd,OACtBD,IAAWC,IAAYD,IAAWC,GAmCrBC,EAjCM,SAAC,GAQI,IAPxB/B,EAOuB,EAPvBA,KACAgC,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MoW,UAb3B,KAIP,IAAIyW,MAaT1B,EAnEU,CAoEnB5e,IAAMoZ,WAERwF,EAAe6B,YAAc,iBAE7B7B,EAAezS,UAAY,CACvBhW,SAAUX,IAAUjB,KACpBsV,SAAUrU,IAAUJ,UAAU,CAACI,IAAUP,KAAMO,IAAUjB,QAG9CqqB,QCzFAA","file":"static/js/14.81be5ba7.chunk.js","sourcesContent":["/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","import classnames from \"classnames\";\nimport * as React from \"react\";\nimport \"./formstyles.scss\";\n\nexport interface RadioButtonsProps {\n name: string;\n value?: any;\n options: { label: string | React.ReactElement; value?: any }[];\n onChange: (value?: any) => void;\n color?: string;\n outline?: boolean;\n valueComparer?: (value1?: any, value2?: any) => boolean;\n}\n\nconst getButtonClass = (color?: string, outline?: boolean) => {\n let result = \"btn-\";\n result += outline ? \"outline-\" : \"\";\n result += color ? color : \"secondary\";\n return result;\n};\n\nconst defaultComparer = (value1: any, value2: any) =>\n value1 === value2 || (!value1 && !value2);\n\nconst RadioButtons = ({\n name,\n value,\n options,\n onChange,\n color,\n outline,\n valueComparer\n}: RadioButtonsProps) => {\n const comparer = valueComparer || defaultComparer;\n return (\n
\n {options.map((x, index) => (\n \n {\n e.target.checked && onChange(x.value);\n }}\n checked={comparer(value, x.value)}\n />\n {x.label}\n \n ))}\n
\n );\n};\nexport default RadioButtons;\n","import { Field, FieldProps } from \"formik\";\nimport * as React from \"react\";\nimport { Col } from \"reactstrap\";\nimport \"./formstyles.scss\";\nimport RadioButtons from \"./RadioButtons\";\n\ninterface RadioButtonsFieldProps {\n title?: string;\n name: string;\n options: { label: any; value: any }[];\n color?: string;\n outline?: boolean;\n colSize?: number;\n submitOnChange?: boolean;\n onChange?: (value?: any) => void;\n}\n\nconst RadioButtonsField = ({\n title,\n name,\n options,\n color,\n outline,\n colSize,\n submitOnChange,\n onChange,\n}: RadioButtonsFieldProps) => (\n \n \n {({ form, field }: FieldProps) => (\n <>\n {title && }\n
\n {\n form.setFieldValue(field.name as any, value, !submitOnChange);\n form.setFieldTouched(field.name as any, true, !submitOnChange);\n if (onChange) {\n onChange(value);\n }\n submitOnChange && form.submitForm();\n }}\n />\n
\n \n )}\n
\n \n);\n\nexport default RadioButtonsField;\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function(qs, sep, eq, options) {\n sep = sep || '&';\n eq = eq || '=';\n var obj = {};\n\n if (typeof qs !== 'string' || qs.length === 0) {\n return obj;\n }\n\n var regexp = /\\+/g;\n qs = qs.split(sep);\n\n var maxKeys = 1000;\n if (options && typeof options.maxKeys === 'number') {\n maxKeys = options.maxKeys;\n }\n\n var len = qs.length;\n // maxKeys <= 0 means that we should not limit keys count\n if (maxKeys > 0 && len > maxKeys) {\n len = maxKeys;\n }\n\n for (var i = 0; i < len; ++i) {\n var x = qs[i].replace(regexp, '%20'),\n idx = x.indexOf(eq),\n kstr, vstr, k, v;\n\n if (idx >= 0) {\n kstr = x.substr(0, idx);\n vstr = x.substr(idx + 1);\n } else {\n kstr = x;\n vstr = '';\n }\n\n k = decodeURIComponent(kstr);\n v = decodeURIComponent(vstr);\n\n if (!hasOwnProperty(obj, k)) {\n obj[k] = v;\n } else if (isArray(obj[k])) {\n obj[k].push(v);\n } else {\n obj[k] = [obj[k], v];\n }\n }\n\n return obj;\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar stringifyPrimitive = function(v) {\n switch (typeof v) {\n case 'string':\n return v;\n\n case 'boolean':\n return v ? 'true' : 'false';\n\n case 'number':\n return isFinite(v) ? v : '';\n\n default:\n return '';\n }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n sep = sep || '&';\n eq = eq || '=';\n if (obj === null) {\n obj = undefined;\n }\n\n if (typeof obj === 'object') {\n return map(objectKeys(obj), function(k) {\n var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n if (isArray(obj[k])) {\n return map(obj[k], function(v) {\n return ks + encodeURIComponent(stringifyPrimitive(v));\n }).join(sep);\n } else {\n return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n }\n }).join(sep);\n\n }\n\n if (!name) return '';\n return encodeURIComponent(stringifyPrimitive(name)) + eq +\n encodeURIComponent(stringifyPrimitive(obj));\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\nfunction map (xs, f) {\n if (xs.map) return xs.map(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n res.push(f(xs[i], i));\n }\n return res;\n}\n\nvar objectKeys = Object.keys || function (obj) {\n var res = [];\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);\n }\n return res;\n};\n","import * as React from \"react\";\n\nconst StatsBox = ({\n label,\n description,\n value,\n units,\n loading\n}: {\n label: string;\n description?: string;\n value?: string;\n units?: string;\n loading?: boolean;\n}) => (\n
\n {loading ? (\n

 

\n ) : (\n

\n {units ? {units} : null}\n {value || \"0\"}\n

\n )}\n

{label}

\n

{description}

\n
\n);\n\nexport default StatsBox;\n","import { Dealer } from \"../../Dealers/types\";\nimport { SearchArgs } from \"../../types\";\nimport { AccountManager } from \"../types\";\n\nexport interface AccountManagerActivity {\n id?: number;\n dealerId?: number;\n accountManagerId?: string;\n notes?: string;\n activityDate?: string;\n activityType?: ActivityType;\n dealer?: Dealer;\n accountManager?: AccountManager;\n}\n\nexport enum ActivityType {\n TELEPHONE_CALL = \"TELEPHONE_CALL\",\n VISIT = \"VISIT\"\n}\n\nexport interface AccountManagerActivitySearchArgs extends SearchArgs {\n dealerId?: number;\n accountManagerId?: string;\n regionalSalesManagerId?: string;\n}\n","import * as Yup from \"yup\";\nimport { AccountManagerActivity } from \"./types\";\n\nconst accountManagerActivityValidationSchema = Yup.object<\n AccountManagerActivity\n>().shape({\n id: Yup.number()\n .nullable(true)\n .default(undefined),\n dealerId: Yup.number()\n .required()\n .label(\"Dealer\")\n .default(undefined)\n .nullable(true),\n accountManagerId: Yup.string()\n .required()\n .label(\"Account manager\")\n .default(undefined)\n .nullable(true),\n notes: Yup.string()\n .required()\n .label(\"Notes\")\n .max(1000)\n .default(undefined),\n activityDate: Yup.string()\n .required()\n .default(undefined)\n .label(\"Activity date\"),\n activityType: Yup.string()\n .required()\n .default(undefined)\n .label(\"Activity type\")\n});\n\nexport default accountManagerActivityValidationSchema;\n","import { faCaretRight } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { Field, FieldProps, FormikProps } from \"formik\";\nimport moment from \"moment\";\nimport * as React from \"react\";\nimport { Link } from \"react-router-dom\";\nimport { Col, Input, Row } from \"reactstrap\";\nimport CustomDatePicker from \"../../CustomDatePicker\";\nimport { useDealerShallow } from \"../../Dealers/DealerQuery\";\nimport DealerSelect from \"../../Dealers/DealerSelect\";\nimport FormGroupWrapper from \"../../Forms/FormGroupWrapper\";\nimport RadioField from \"../../Forms/RadioField\";\nimport { useLoggedInUser } from \"../../LoggedInUserQuery\";\nimport { ContextNames } from \"../../types\";\nimport { useAccountManagerShallow } from \"../AccountManagerQuery\";\nimport AccountManagerSelect from \"../AccountManagerSelect\";\nimport { AccountManagerActivity, ActivityType } from \"./types\";\n\nconst CreateOrUpdateActivityFormInner = ({\n values,\n setFieldValue,\n setFieldTouched,\n context\n}: FormikProps & { context?: ContextNames }) => {\n const { loggedInUser, isAccountManager } = useLoggedInUser();\n\n const {\n accountManager,\n loading: accountManagerLoading\n } = useAccountManagerShallow(values.accountManagerId);\n const { dealer, loading: dealerLoading } = useDealerShallow(values.dealerId);\n\n const maxDate = moment()\n .endOf(\"day\")\n .toDate();\n\n if (!loggedInUser || accountManagerLoading || dealerLoading) {\n return null;\n }\n\n const create = !values.id;\n\n const accountManagerFixed =\n !!values.accountManagerId &&\n (!create ||\n isAccountManager ||\n context === ContextNames.ACCOUNT_MANAGER ||\n context === ContextNames.DEALER);\n\n const dealerFixed =\n !values.accountManagerId ||\n (!!values.dealerId && (!create || context === ContextNames.DEALER));\n\n return (\n <>\n {!isAccountManager ||\n values.accountManagerId !== loggedInUser.accountManager?.id ? (\n \n \n \n {(fieldProps: any) => (\n \n {accountManagerFixed ? (\n <>\n \n {context !== ContextNames.ACCOUNT_MANAGER && !create ? (\n \n Go to account manager\n \n \n ) : null}\n \n ) : (\n {\n setFieldTouched(\"accountManagerId\", true);\n setFieldValue(\"accountManagerId\", id);\n setFieldValue(\"dealerId\", null);\n }}\n autoFocus={true}\n isClearable={true}\n isDisabled={accountManagerFixed}\n />\n )}\n \n )}\n \n \n \n ) : null}\n \n \n \n {(formikProps: any) => (\n \n {dealerFixed ? (\n <>\n {\" \"}\n {context !== ContextNames.DEALER && !create ? (\n \n Go to dealer\n \n \n ) : null}\n \n ) : (\n {\n setFieldTouched(\"dealerId\", true);\n setFieldValue(\"dealerId\", did);\n }}\n autoFocus={accountManagerFixed}\n isClearable={true}\n isDisabled={dealerFixed}\n includeSuspended={true}\n />\n )}\n \n )}\n \n \n \n \n \n \n \n \n {({ field, form }: FieldProps) => (\n \n \n {\n setFieldValue(\"activityDate\", moment(date).toISOString());\n }}\n />\n \n \n )}\n \n \n \n \n {({ field, form }: FieldProps) => (\n \n \n \n \n \n )}\n \n \n \n );\n};\n\nexport default CreateOrUpdateActivityFormInner;\n","import gql from \"graphql-tag\";\nimport { SingleDealerFragment } from \"../../Dealers/fragments\";\nimport { AccountManagerShallowFragment } from \"../fragments\";\n\nexport const AccountManagerActivityFragment = gql`\n fragment AccountManagerActivityFragment on AccountManagerActivity {\n id\n dealerId\n accountManagerId\n notes\n activityDate\n activityType\n dealer {\n ...SingleDealerFragment\n }\n accountManager {\n ...AccountManagerShallowFragment\n }\n }\n ${SingleDealerFragment}\n ${AccountManagerShallowFragment}\n`;\n","import gql from \"graphql-tag\";\nimport { useQuery } from \"react-apollo\";\nimport { AccountManagerActivityFragment } from \"./fragments\";\nimport { AccountManagerActivity } from \"./types\";\n\ninterface AccountManagerActivityData {\n activity?: AccountManagerActivity;\n}\n\ninterface AccountManagerActivityVariables {\n id?: number;\n}\n\nexport const GET_ACCOUNT_MANAGER_ACTIVITY = gql`\n query AccountManagerActivityQuery($id: ID!) {\n activity(id: $id) {\n ...AccountManagerActivityFragment\n }\n }\n ${AccountManagerActivityFragment}\n`;\n\nexport const useAccountManagerActivity = (id?: number) => {\n const { loading, data } = useQuery<\n AccountManagerActivityData,\n AccountManagerActivityVariables\n >(GET_ACCOUNT_MANAGER_ACTIVITY, { variables: { id }, skip: !id });\n\n return { loading, activity: data?.activity };\n};\n\nexport default useAccountManagerActivity;\n","import gql from \"graphql-tag\";\nimport { useMutation } from \"react-apollo\";\nimport { AccountManagerActivityFragment } from \"./fragments\";\nimport { AccountManagerActivity } from \"./types\";\n\ninterface CreateOrUpdateActivityData {\n createOrUpdateActivity: AccountManagerActivity;\n}\n\ninterface CreateOrUpdateActivityVariables {\n input: AccountManagerActivity;\n}\n\nconst CREATE_OR_UPDATE_ACTIVITY_MUTATION = gql`\n mutation CreateOrUpdateAccountManagerActivity(\n $input: AccountManagerActivityInput\n ) {\n createOrUpdateActivity(input: $input) {\n ...AccountManagerActivityFragment\n }\n }\n ${AccountManagerActivityFragment}\n`;\n\nconst useCreateOrUpdateActivity = () => {\n const [createOrUpdateActivity] = useMutation<\n CreateOrUpdateActivityData,\n CreateOrUpdateActivityVariables\n >(CREATE_OR_UPDATE_ACTIVITY_MUTATION);\n return createOrUpdateActivity;\n};\n\nexport default useCreateOrUpdateActivity;\n","import { merge } from \"lodash\";\nimport moment from \"moment\";\nimport * as React from \"react\";\nimport { cleanFormData } from \"../../../utils\";\nimport { useDealer } from \"../../Dealers/DealerQuery\";\nimport ModalForm from \"../../Forms/ModalForm\";\nimport { PagedListContext } from \"../../PagedList\";\nimport { ContextNames } from \"../../types\";\nimport accountManagerActivityValidationSchema from \"./accountManagerActivityValidationSchema\";\nimport CreateOrUpdateActivityFormInner from \"./CreateOrUpdateActivityFormInner\";\nimport { AccountManagerActivity } from \"./types\";\nimport useAccountManagerActivity from \"./useAccountManagerActivity\";\nimport useCreateOrUpdateActivity from \"./useCreateOrUpdateActivity\";\n\nconst cleanActivityBeforeSubmit = (values: AccountManagerActivity) => {\n const result = cleanFormData(values);\n\n delete result.accountManager;\n delete result.dealer;\n\n return result;\n};\n\nconst CreateOrUpdateActivityModal = ({\n accountManagerActivityId,\n accountManagerId,\n dealerId,\n context,\n isOpen,\n toggle\n}: {\n accountManagerActivityId?: number;\n accountManagerId?: string;\n dealerId?: number;\n context?: ContextNames;\n isOpen: boolean;\n toggle: () => void;\n}) => {\n const defaults = accountManagerActivityValidationSchema.default() as AccountManagerActivity;\n const { activity, loading } = useAccountManagerActivity(\n accountManagerActivityId\n );\n const mutation = useCreateOrUpdateActivity();\n\n const { refresh } = React.useContext(PagedListContext);\n const { dealer, loading: dealerLoading } = useDealer(dealerId);\n\n if (loading || dealerLoading) {\n return null;\n }\n\n const initialValues = merge(\n {},\n defaults,\n {\n dealerId,\n accountManagerId: accountManagerId || dealer?.accountManager?.id,\n activityDate: moment().toISOString()\n },\n activity\n );\n const create = !initialValues.id;\n\n return (\n {\n const variables = { input: cleanActivityBeforeSubmit(values) };\n\n return mutation({\n variables\n }).then(refresh);\n }}\n >\n {formikProps => (\n \n )}\n \n );\n};\n\nexport default CreateOrUpdateActivityModal;\n","import * as React from \"react\";\nimport { Button } from \"reactstrap\";\nimport { ContextNames } from \"../../types\";\nimport { useToggle } from \"../../withToggleState\";\nimport CreateOrUpdateActivityModal from \"./CreateOrUpdateActivityModal\";\nimport { AccountManagerActivitySearchArgs } from \"./types\";\n\nconst AccountManagerActivityActionButtons = ({\n context,\n variables\n}: {\n context?: ContextNames;\n variables?: { input: AccountManagerActivitySearchArgs };\n}) => {\n const { active, toggle } = useToggle();\n const { dealerId, accountManagerId } = variables?.input || {};\n\n return (\n <>\n
\n \n
\n \n \n );\n};\n\nexport default AccountManagerActivityActionButtons;\n","import gql from \"graphql-tag\";\nimport { useMutation } from \"react-apollo\";\n\nconst DELETE_ACCOUNT_MANAGER_ACTIVITY = gql`\n mutation DeleteAccountManagerActivity($id: ID!) {\n deleteActivity(id: $id) {\n success\n }\n }\n`;\n\nconst useDeleteAccountManagerActivity = () => {\n const [deleteAccountManagerActivity] = useMutation(\n DELETE_ACCOUNT_MANAGER_ACTIVITY\n );\n\n return deleteAccountManagerActivity;\n};\n\nexport default useDeleteAccountManagerActivity;\n","import { faTrash } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport * as React from \"react\";\nimport { DropdownItem } from \"reactstrap\";\nimport { ConfirmDialog } from \"../../Forms/ConfirmDialogProvider\";\nimport { PagedListContext } from \"../../PagedList\";\nimport { AccountManagerActivity } from \"./types\";\nimport useDeleteAccountManagerActivity from \"./useDeleteAccountManagerActivity\";\n\ninterface DeleteAccountManagerActivityDropdownItemProps {\n activity: AccountManagerActivity;\n}\n\nconst DeleteAccountManagerActivityDropdownItem = ({\n activity: { id }\n}: DeleteAccountManagerActivityDropdownItemProps) => {\n const mutation = useDeleteAccountManagerActivity();\n const { refresh } = React.useContext(PagedListContext);\n\n if (!id) {\n return null;\n }\n return (\n \n {confirm => (\n {\n e.preventDefault();\n e.stopPropagation();\n\n confirm(() =>\n mutation({\n variables: { id }\n }).then(refresh)\n );\n }}\n >\n Delete\n \n )}\n \n );\n};\n\nexport default DeleteAccountManagerActivityDropdownItem;\n","import { faPhoneAlt, faStoreAlt } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport moment from \"moment\";\nimport * as React from \"react\";\nimport { Col, DropdownItem, Row } from \"reactstrap\";\nimport { formatEnumValue } from \"../../../utils\";\nimport ActionsDropdown from \"../../PagedList/ActionsDropdown\";\nimport { ContextNames } from \"../../types\";\nimport DeleteAccountManagerActivityDropdownItem from \"./DeleteAccountManagerActivityDropdownItem\";\nimport { AccountManagerActivity, ActivityType } from \"./types\";\n\nconst AccountManagerActivityListItem = ({\n item,\n context,\n onClick\n}: {\n item: AccountManagerActivity;\n context?: ContextNames;\n onClick?: () => void;\n}) => {\n const showAccountManagerAndDealer =\n context !== ContextNames.ACCOUNT_MANAGER && context !== ContextNames.DEALER;\n\n return (\n
\n \n \n

\n {context !== ContextNames.ACCOUNT_MANAGER ? (\n {item.accountManager?.name}\n ) : null}\n {showAccountManagerAndDealer ? \" | \" : null}\n {context !== ContextNames.DEALER ? (\n {item.dealer?.name}\n ) : null}\n

\n

\n \n {formatEnumValue(item.activityType)}{\" \"}\n {moment(item.activityDate).format(\"Do MMMM YYYY\")}\n

\n

{item.notes}

\n \n \n \n Edit activity\n \n \n \n \n
\n
\n );\n};\n\nexport default AccountManagerActivityListItem;\n","import gql from \"graphql-tag\";\nimport memoizeOne from \"memoize-one\";\nimport * as React from \"react\";\nimport SearchForm from \"../../Forms/SearchForm\";\nimport PagedList from \"../../PagedList\";\nimport { ContextNames } from \"../../types\";\nimport AccountManagerActivityActionButtons from \"./AccountManagerActivityActionButtons\";\nimport AccountManagerActivityListItem from \"./AccountManagerActivityListItem\";\nimport CreateOrUpdateActivityModal from \"./CreateOrUpdateActivityModal\";\nimport { AccountManagerActivityFragment } from \"./fragments\";\nimport {\n AccountManagerActivity,\n AccountManagerActivitySearchArgs\n} from \"./types\";\n\ninterface AccountManagerActivityListProps {\n accountManagerId?: string;\n regionalSalesManagerId?: string;\n dealerId?: number;\n context?: ContextNames;\n}\n\nexport const ACCOUNT_MANAGER_ACTIVITIES_LIST = gql`\n query ActivityListQuery($input: AccountManagerActivitySearchArgsInput) {\n activities(input: $input) {\n pageInfo {\n hasMorePages\n totalResults\n page\n pageSize\n first\n last\n }\n edges {\n node {\n ...AccountManagerActivityFragment\n }\n }\n }\n }\n ${AccountManagerActivityFragment}\n`;\n\nconst defaultSearchArgs = {\n page: 1,\n pageSize: 10\n};\n\nconst AccountManagerActivityList = ({\n accountManagerId,\n regionalSalesManagerId,\n dealerId,\n context\n}: AccountManagerActivityListProps) => {\n const [state, setState] = React.useState<{\n activityId?: number;\n isEditing: boolean;\n }>({ isEditing: false });\n\n const hideModal = React.useCallback(\n () => setState({ ...state, isEditing: false }),\n [state, setState]\n );\n\n const handleClick = React.useCallback(\n (item: AccountManagerActivity) =>\n setState({ activityId: item.id, isEditing: true }),\n [setState]\n );\n\n const { activityId, isEditing } = state;\n\n return (\n <>\n \n placeholder=\"Search activities\"\n context={context}\n mapValuesToQuerystring={values => values}\n mapQuerystringToValues={qs => qs}\n fixedValues={{ accountManagerId, dealerId, regionalSalesManagerId }}\n defaultValues={defaultSearchArgs}\n >\n {formikProps => {\n const getVariables = memoizeOne(initialValues => ({\n input: initialValues || {}\n }));\n return (\n data.activities}\n variables={getVariables(formikProps.initialValues)}\n context={context}\n actionButtonsComponent={AccountManagerActivityActionButtons}\n onClick={handleClick}\n fetchPolicy=\"cache-and-network\"\n >\n \n \n );\n }}\n \n \n );\n};\n\nexport default AccountManagerActivityList;\n","function isAbsolute(pathname) {\n return pathname.charAt(0) === '/';\n}\n\n// About 1.5x faster than the two-arg version of Array#splice()\nfunction spliceOne(list, index) {\n for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {\n list[i] = list[k];\n }\n\n list.pop();\n}\n\n// This implementation is based heavily on node's url.parse\nfunction resolvePathname(to, from) {\n if (from === undefined) from = '';\n\n var toParts = (to && to.split('/')) || [];\n var fromParts = (from && from.split('/')) || [];\n\n var isToAbs = to && isAbsolute(to);\n var isFromAbs = from && isAbsolute(from);\n var mustEndAbs = isToAbs || isFromAbs;\n\n if (to && isAbsolute(to)) {\n // to is absolute\n fromParts = toParts;\n } else if (toParts.length) {\n // to is relative, drop the filename\n fromParts.pop();\n fromParts = fromParts.concat(toParts);\n }\n\n if (!fromParts.length) return '/';\n\n var hasTrailingSlash;\n if (fromParts.length) {\n var last = fromParts[fromParts.length - 1];\n hasTrailingSlash = last === '.' || last === '..' || last === '';\n } else {\n hasTrailingSlash = false;\n }\n\n var up = 0;\n for (var i = fromParts.length; i >= 0; i--) {\n var part = fromParts[i];\n\n if (part === '.') {\n spliceOne(fromParts, i);\n } else if (part === '..') {\n spliceOne(fromParts, i);\n up++;\n } else if (up) {\n spliceOne(fromParts, i);\n up--;\n }\n }\n\n if (!mustEndAbs) for (; up--; up) fromParts.unshift('..');\n\n if (\n mustEndAbs &&\n fromParts[0] !== '' &&\n (!fromParts[0] || !isAbsolute(fromParts[0]))\n )\n fromParts.unshift('');\n\n var result = fromParts.join('/');\n\n if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n\n return result;\n}\n\nexport default resolvePathname;\n","import { gql } from \"apollo-boost\";\nimport { useMutation } from \"react-apollo\";\nimport { GET_ACCOUNT_MANAGER } from \"../../AccountManagers/AccountManagerQuery\";\nimport { DealerFragment } from \"../fragments\";\nimport { HouseDealer } from \"../types\";\n\nconst CREATE_HOUSE_DEALER = gql`\n mutation CreateHouseDealer($input: HouseDealerInput!) {\n createHouseDealer(input: $input) {\n ...DealerFragment\n }\n }\n ${DealerFragment}\n`;\n\nexport const useCreateHouseDealer = () => {\n const [createHouseDealer] = useMutation(CREATE_HOUSE_DEALER);\n\n return (houseDealer: HouseDealer) =>\n createHouseDealer({\n variables: { input: houseDealer },\n refetchQueries: [\n {\n query: GET_ACCOUNT_MANAGER,\n variables: { id: houseDealer.accountManagerId }\n }\n ]\n });\n};\n","import { FormikProps } from \"formik\";\nimport * as React from \"react\";\nimport { Col, FormGroup, Label, Row } from \"reactstrap\";\nimport config from \"../../../config\";\nimport AccountManagerSelect from \"../../AccountManagers/AccountManagerSelect\";\nimport BooleanCheckboxField from \"../../Forms/BooleanCheckboxField\";\nimport PeriodPickerField from \"../../Forms/PeriodPickerField\";\nimport RadioButtonsField from \"../../Forms/RadioButtonsField\";\nimport { useLoggedInUser } from \"../../LoggedInUserQuery\";\nimport { ContextNames } from \"../../types\";\nimport { DealerMapStyle, DealerMapType, DealerSearchArgs } from \"../types\";\n\nconst DealerListFilterPanel = ({\n values,\n setFieldValue,\n submitForm,\n context,\n map\n}: FormikProps & {\n context?: ContextNames;\n map?: boolean;\n}) => {\n const {\n loggedInUser,\n loading,\n isAdministrator,\n isAccountManager\n } = useLoggedInUser();\n\n if (loading || !loggedInUser) {\n return null;\n }\n\n return (\n <>\n {map && (\n <>\n \n \n \n \n \n \n \n )}\n \n \n \n \n \n \n\n {context !== ContextNames.ACCOUNT_MANAGER && !isAccountManager && (\n \n \n \n \n {\n setFieldValue(\"accountManagerId\", id, false);\n submitForm();\n }}\n isClearable={true}\n />\n \n \n \n )}\n \n \n \n \n \n {isAdministrator && (\n \n )}\n \n );\n};\n\nexport default DealerListFilterPanel;\n","import classnames from \"classnames\";\nimport * as React from \"react\";\nimport { Badge } from \"reactstrap\";\nimport config from \"../../config\";\nimport { convertToTitleCase } from \"../../utils\";\nimport { useLoggedInUser } from \"../LoggedInUserQuery\";\nimport { ContextNames } from \"../types\";\nimport { Dealer, DealerSetupStatus } from \"./types\";\nimport { IsStatusFullySetup } from \"./dealerSetup\";\n\nconst dss = Object.keys(DealerSetupStatus) as Array<\n keyof typeof DealerSetupStatus\n>;\n\nconst DealerBadges = ({\n dealer: {\n accountManager,\n groups,\n isSuspended,\n countOfActiveProposals,\n location,\n contractSigned,\n autoConvert,\n isOnICORegister,\n setupStatus,\n franchised,\n },\n className,\n context,\n}: {\n dealer: Dealer;\n context?: ContextNames;\n className?: string;\n}) => {\n const { isDealer, isAccountManager } = useLoggedInUser();\n\n return (\n
\n {context !== ContextNames.ACCOUNT_MANAGER &&\n !isAccountManager &&\n accountManager ? (\n {convertToTitleCase(accountManager.name)} (AM)\n ) : null}\n {isOnICORegister === false ? (\n \n Not on ICO register\n \n ) : !isOnICORegister && !isDealer ? (\n \n ICO check required\n \n ) : null}\n {!autoConvert ? (\n \n Not in {config.AUTOCONVERT_NAME}\n \n ) : null}\n {groups &&\n groups.map((g) => (\n \n {g.name}\n \n ))}\n {countOfActiveProposals && !isDealer && (\n \n {countOfActiveProposals}\n {countOfActiveProposals > 1 ? \" proposals\" : \" proposal\"}\n \n )}\n {!location && !isDealer && (\n \n No location specified\n \n )}\n {isSuspended && contractSigned && Suspended}\n {!contractSigned && isDealer && (\n \n Not approved\n \n )}\n {!isDealer &&\n setupStatus != null &&\n !IsStatusFullySetup(setupStatus) &&\n dss.map(\n (el, index) =>\n index > (franchised ? 1 : 0) && (\n \n \n {DealerSetupStatus[el]}\n {\": \"}\n {(setupStatus || 0) & Math.pow(2, index - 1) ? \"Yes\" : \"No\"}\n {\" \"}\n \n )\n )}\n
\n );\n};\n\nexport default DealerBadges;\n","import { FormikProps } from \"formik\";\nimport { isEqual, omit, pick } from \"lodash\";\nimport moment from \"moment\";\nimport * as React from \"react\";\nimport { ViewState } from \"react-map-gl\";\nimport { cleanNumber, getMonthDateRange } from \"../../../utils\";\nimport FormikEffects from \"../../Forms/FormikEffects\";\nimport SearchFormCore from \"../../Forms/SearchFormCore\";\nimport { ProposalSearchArgs } from \"../../Proposals/types\";\nimport { CompositeComponent, ContextNames } from \"../../types\";\nimport { DealerMapStyle, DealerMapType, DealerSearchArgs } from \"../types\";\n\nexport type DealerListSearchFormValues = DealerSearchArgs &\n Partial & {\n proposalEditDates?: string;\n mapType?: DealerMapType;\n options?: boolean;\n mapStyle?: DealerMapStyle;\n };\n\nconst viewStatePropNames: (keyof ViewState)[] = [\n \"latitude\",\n \"longitude\",\n \"zoom\",\n \"pitch\",\n \"bearing\"\n];\n\nconst mapOptionsPropNames = [\n \"proposalEditDates\",\n \"mapType\",\n \"options\",\n \"mapStyle\"\n];\n\ninterface DealerListProps {\n variables: {\n input: DealerSearchArgs;\n totalFinanceFilter: ProposalSearchArgs;\n };\n initialViewState: Partial;\n context?: ContextNames;\n onViewStateChanged: (viewState: Partial) => void;\n formikProps: FormikProps;\n}\n\ninterface DealerSearchFormProps {\n accountManagerId?: string;\n regionalSalesManagerId?: string;\n fixedPageSize?: number;\n fixedPage?: number;\n fixedHasLocationOnly?: boolean;\n context?: ContextNames;\n className?: string;\n searchPanelWrapper?: CompositeComponent<{ children?: React.ReactNode }>;\n children: (props: DealerListProps) => JSX.Element | null;\n}\n\nconst { value: lastMonth } = getMonthDateRange(moment().subtract(1, \"month\"));\n\nconst defaultSearchArgs = {\n page: 1,\n pageSize: 10,\n includeSuspended: false,\n fundedDealersOnly: false,\n hasActivityInLastSixWeeks: false,\n hasActivityInLastYear: false,\n hasActiveProposalsOnly: false,\n hasLocationOnly: false,\n locationNotFoundOnly: false,\n hasProposalsPaidOutInTimePeriod: false,\n proposalStartDate: lastMonth.start,\n proposalEndDate: lastMonth.end,\n proposalEditDates: false,\n mapType: DealerMapType.LOCATIONS,\n options: false,\n mapStyle: DealerMapStyle.LIGHT,\n autoConvertOnly: false,\n houseDealersOnly: false\n};\n\nconst defaultViewState: any = {\n latitude: null,\n longitude: null,\n zoom: null,\n pitch: null,\n bearing: null\n};\n\nconst DealerListSearchForm = ({\n accountManagerId,\n regionalSalesManagerId,\n fixedPageSize,\n fixedPage,\n fixedHasLocationOnly,\n context,\n className,\n children\n}: DealerSearchFormProps) => (\n ({\n ...qs,\n fundedDealersOnly: qs.fundedDealersOnly === \"true\",\n includeSuspended: qs.includeSuspended === \"true\",\n hasActivityInLastSixWeeks: qs.hasActivityInLastSixWeeks === \"true\",\n hasActivityInLastYear: qs.hasActivityInLastYear === \"true\",\n hasActiveProposalsOnly: qs.hasActiveProposalsOnly === \"true\",\n locationNotFoundOnly: qs.locationNotFoundOnly === \"true\",\n hasLocationOnly: qs.hasLocationOnly === \"true\",\n latitude: cleanNumber(qs.latitude),\n longitude: cleanNumber(qs.longitude),\n pitch: cleanNumber(qs.pitch),\n bearing: cleanNumber(qs.bearing),\n zoom: cleanNumber(qs.zoom),\n proposalEditDates: qs.proposalEditDates === \"true\",\n options: qs.options === \"true\"\n })}\n mapValuesToQuerystring={values => values}\n defaultValues={{ ...defaultSearchArgs, ...defaultViewState }}\n fixedValues={{\n pageSize: fixedPageSize,\n page: fixedPage,\n hasLocationOnly: fixedHasLocationOnly,\n accountManagerId,\n regionalSalesManagerId\n }}\n context={context}\n className={className}\n >\n {(\n formikProps: FormikProps<\n DealerSearchArgs &\n Partial & {\n proposalStartDate?: string;\n proposalEndDate?: string;\n }\n >\n ) => {\n const input: DealerSearchArgs = omit(\n formikProps.initialValues,\n (viewStatePropNames as string[]).concat(mapOptionsPropNames)\n );\n const viewState: Partial = pick(\n formikProps.initialValues,\n viewStatePropNames\n );\n\n const variables = {\n input,\n totalFinanceFilter: {\n startDate: formikProps.initialValues.proposalStartDate,\n endDate: formikProps.initialValues.proposalEndDate\n }\n };\n\n const onViewStateChanged = (nextViewState: Partial) => {\n viewStatePropNames.forEach(k => {\n const value =\n nextViewState[k] || nextViewState[k] === 0\n ? nextViewState[k]\n : null;\n formikProps.setFieldValue(k, value, false);\n });\n };\n\n return (\n <>\n ,\n currentValues: DealerSearchArgs & Partial\n ) => {\n // Do not reset the location when these prop names change\n const ignorePropNames = [\n ...viewStatePropNames,\n \"options\",\n \"mapStyle\",\n \"q\"\n ];\n\n const prevFormValues: DealerSearchArgs & {\n mapType?: string;\n } = omit(prevValues, ignorePropNames);\n const currentFormValues: DealerSearchArgs & {\n mapType?: string;\n } = omit(currentValues, ignorePropNames);\n\n let shouldSubmit = false;\n\n const formValuesChanged = !isEqual(\n prevFormValues,\n currentFormValues\n );\n const searchTextChanged = prevValues.q !== currentValues.q;\n\n // If the search values have changed, reset the map location\n if (formValuesChanged || searchTextChanged) {\n viewStatePropNames.forEach(p =>\n formikProps.setFieldValue(p, null, false)\n );\n }\n\n if (formValuesChanged) {\n shouldSubmit = true;\n }\n\n // If the map type changes to the chart, filter the dealers\n // to only show dealers with recent proposals\n if (\n currentFormValues.mapType ===\n DealerMapType.PROPOSAL_PAIDOUT_VALUE &&\n prevFormValues.mapType !==\n DealerMapType.PROPOSAL_PAIDOUT_VALUE &&\n !currentFormValues.hasProposalsPaidOutInTimePeriod\n ) {\n formikProps.setFieldValue(\n \"hasProposalsPaidOutInTimePeriod\",\n true,\n false\n );\n shouldSubmit = true;\n }\n\n // If the map location has changed, submit the form to update\n // the querystring\n const prevViewStateValues = pick(prevValues, viewStatePropNames);\n const currentViewStateValues = pick(\n currentValues,\n viewStatePropNames\n );\n\n if (!isEqual(prevViewStateValues, currentViewStateValues)) {\n shouldSubmit = true;\n }\n\n // Submit the form after a zero timeout, so the submit happens after\n // any state changes are written\n shouldSubmit && setTimeout(() => formikProps.submitForm(), 0);\n }}\n />\n {children({\n variables,\n context,\n initialViewState: {\n latitude: cleanNumber(viewState.latitude),\n longitude: cleanNumber(viewState.longitude),\n pitch: cleanNumber(viewState.pitch),\n bearing: cleanNumber(viewState.bearing),\n zoom: cleanNumber(viewState.zoom)\n },\n onViewStateChanged,\n formikProps\n })}\n \n );\n }}\n \n);\n\nexport default DealerListSearchForm;\n","import gql from \"graphql-tag\";\nimport { useQuery } from \"react-apollo\";\nimport {\n AccountManagerActualsFragment,\n AccountManagerTargetsFragment,\n AccountManagerTargetsFragmentWithoutNetProfit,\n AccountManagerActualsFragmentWithoutNetProfit,\n} from \"../fragments\";\nimport { AccountManagerTargets } from \"../types\";\n\nexport interface AccountManagerTargetsData {\n targets: AccountManagerTargets;\n}\n\nexport interface AccountManagerSingleTargetData {\n target: AccountManagerTargets;\n}\n\nexport const ACCOUNT_MANAGER_TARGETS = gql`\n query AccountManagerTargetsQuery(\n $input: AccountManagerTargetsArgsInputType!\n ) {\n targets(input: $input) {\n ...AccountManagerTargetsFragment\n actuals {\n ...AccountManagerActualsFragment\n }\n }\n }\n ${AccountManagerTargetsFragment}\n ${AccountManagerActualsFragment}\n`;\n\nexport const ACCOUNT_MANAGER_TARGETS_WITHOUT_NET_PROFIT = gql`\n query AccountManagerTargetsQuery(\n $input: AccountManagerTargetsArgsInputType!\n ) {\n targets(input: $input) {\n ...AccountManagerTargetsFragment\n actuals {\n ...AccountManagerActualsFragment\n }\n }\n }\n ${AccountManagerTargetsFragmentWithoutNetProfit}\n ${AccountManagerActualsFragmentWithoutNetProfit}\n`;\n\nexport const ACCOUNT_MANAGER_SINGLE_TARGET = gql`\n query AccountManagerSingleTargetQuery($id: ID!) {\n target(id: $id) {\n ...AccountManagerTargetsFragment\n actuals {\n ...AccountManagerActualsFragment\n }\n }\n }\n ${AccountManagerTargetsFragment}\n ${AccountManagerActualsFragment}\n`;\n\ninterface AccountManagerTargetsVariables {\n input: {\n accountManagerId?: string;\n regionalSalesManagerId?: string;\n startDate?: string;\n endDate?: string;\n };\n}\n\nexport const useAccountManagerTargets = (\n input: {\n accountManagerId?: string;\n regionalSalesManagerId?: string;\n startDate?: string;\n endDate?: string;\n },\n canViewNetProfit: boolean\n) => {\n let targetTemplate = ACCOUNT_MANAGER_TARGETS_WITHOUT_NET_PROFIT;\n\n if (canViewNetProfit) {\n targetTemplate = ACCOUNT_MANAGER_TARGETS;\n }\n const { data, loading } = useQuery<\n AccountManagerTargetsData,\n AccountManagerTargetsVariables\n >(targetTemplate, { variables: { input } });\n return { loading, targets: data?.targets };\n};\n\nexport const useAccountManagerSingleTarget = (id?: string) => {\n const { data, loading } = useQuery<\n AccountManagerSingleTargetData,\n { id?: string }\n >(ACCOUNT_MANAGER_SINGLE_TARGET, { variables: { id }, skip: !id });\n\n return { loading, target: data?.target };\n};\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, tagPropType } from './utils';\nvar propTypes = {\n tag: tagPropType,\n 'aria-label': PropTypes.string,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n role: PropTypes.string,\n size: PropTypes.string,\n vertical: PropTypes.bool\n};\nvar defaultProps = {\n tag: 'div',\n role: 'group'\n};\n\nvar ButtonGroup = function ButtonGroup(props) {\n var className = props.className,\n cssModule = props.cssModule,\n size = props.size,\n vertical = props.vertical,\n Tag = props.tag,\n attributes = _objectWithoutPropertiesLoose(props, [\"className\", \"cssModule\", \"size\", \"vertical\", \"tag\"]);\n\n var classes = mapToCssModules(classNames(className, size ? 'btn-group-' + size : false, vertical ? 'btn-group-vertical' : 'btn-group'), cssModule);\n return React.createElement(Tag, _extends({}, attributes, {\n className: classes\n }));\n};\n\nButtonGroup.propTypes = propTypes;\nButtonGroup.defaultProps = defaultProps;\nexport default ButtonGroup;","'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Dropdown from './Dropdown';\nvar propTypes = {\n children: PropTypes.node\n};\n\nvar ButtonDropdown = function ButtonDropdown(props) {\n return React.createElement(Dropdown, _extends({\n group: true\n }, props));\n};\n\nButtonDropdown.propTypes = propTypes;\nexport default ButtonDropdown;","import * as React from \"react\";\nimport { RouteComponentProps } from \"react-router\";\nimport { useLoggedInUser } from \"../../LoggedInUserQuery\";\nimport { ContextNames } from \"../../types\";\nimport AccountManagerActivityList from \"./AccountManagerActivityList\";\n\nconst AccountManagerActivityTabContent = ({\n match\n}: RouteComponentProps<{\n dealerId?: string;\n accountManagerId?: string;\n regionalSalesManagerId?: string;\n}>) => {\n const dealerId = match.params.dealerId\n ? parseInt(match.params.dealerId, 10)\n : undefined;\n const accountManagerId = match.params.accountManagerId\n ? decodeURIComponent(match.params.accountManagerId)\n : undefined;\n const regionalSalesManagerId = match.params.regionalSalesManagerId\n ? decodeURIComponent(match.params.regionalSalesManagerId)\n : undefined;\n\n return (\n \n );\n};\n\nexport const UserAccountManagerActivityTabContent = () => {\n const { loggedInUser, loading } = useLoggedInUser();\n\n if (loading || !loggedInUser) {\n return null;\n }\n\n const accountManagerId = loggedInUser.accountManager?.id;\n const regionalSalesManagerId = loggedInUser.regionalSalesManager?.id;\n\n return (\n \n );\n};\n\nexport default AccountManagerActivityTabContent;\n","import { Field, FormikProps } from \"formik\";\nimport * as React from \"react\";\nimport { Col, Row } from \"reactstrap\";\nimport AccountManagerSelect from \"../../AccountManagers/AccountManagerSelect\";\nimport FormGroupWrapper from \"../../Forms/FormGroupWrapper\";\nimport { ContextNames, FormSize } from \"../../types\";\nimport { HouseDealer } from \"../types\";\n\nconst HouseDealerFormInner = ({\n values,\n setFieldValue,\n setFieldTouched,\n formSize,\n context\n}: FormikProps & {\n context?: ContextNames;\n formSize?: FormSize;\n}) => {\n const wideCol = formSize === FormSize.NARROW ? 12 : 6;\n\n return (\n <>\n \n \n \n {(fieldProps: any) => (\n \n {\n setFieldTouched(\"accountManagerId\", true);\n setFieldValue(\"accountManagerId\", amId);\n }}\n isDisabled={\n !!values.accountManagerId &&\n context === ContextNames.ACCOUNT_MANAGER\n }\n requiresHouseDealer={true}\n />\n \n )}\n \n \n \n \n );\n};\n\nexport default HouseDealerFormInner;\n","import { FormikProps } from \"formik\";\nimport * as React from \"react\";\nimport { useHistory } from \"react-router\";\nimport * as Yup from \"yup\";\nimport { cleanFormData } from \"../../../utils\";\nimport ModalForm from \"../../Forms/ModalForm\";\nimport { ContextNames } from \"../../types\";\nimport { HouseDealer } from \"../types\";\nimport { useCreateHouseDealer } from \"./CreateHouseDealerMutation\";\nimport HouseDealerFormInner from \"./HouseDealerFormInner\";\n\ninterface CreateHouseDealerModalProps {\n isOpen: boolean;\n toggle: () => void;\n context?: ContextNames;\n accountManagerId?: string;\n}\n\nconst houseDealerValidationSchema = Yup.object().shape({\n accountManagerId: Yup.string().required()\n});\n\nconst CreateHouseDealerModal = ({\n isOpen,\n toggle,\n context,\n accountManagerId\n}: CreateHouseDealerModalProps) => {\n const createHouseDealer = useCreateHouseDealer();\n const history = useHistory();\n\n return (\n \n createHouseDealer(cleanFormData(values)).then(result => {\n if (result?.data?.createHouseDealer) {\n history.push(`/dealers/${result.data.createHouseDealer.id}`);\n }\n })\n }\n context={context}\n >\n {(props: FormikProps & { context?: ContextNames }) => (\n \n )}\n \n );\n};\n\nexport default CreateHouseDealerModal;\n","import { faHome, faMapMarked } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport classnames from \"classnames\";\nimport React, { useState } from \"react\";\nimport { Link as RouterLink } from \"react-router-dom\";\nimport {\n DropdownItem,\n DropdownMenu,\n DropdownToggle,\n UncontrolledButtonDropdown\n} from \"reactstrap\";\nimport {\n useAccountManager,\n useLoggedInAccountManager\n} from \"../../AccountManagers/AccountManagerQuery\";\nimport { useLoggedInUser } from \"../../LoggedInUserQuery\";\nimport { PermissionModuleNames } from \"../../Permissions/types\";\nimport RouterDropdownItem from \"../../RouterDropdownItem\";\nimport { ContextNames } from \"../../types\";\nimport CreateHouseDealerModal from \"../CreateHouseDealer/CreateHouseDealerModal\";\n\nconst MapButtonLabel = () => (\n <>\n Map view\n \n);\n\nconst getCreateDealerUrl = (accountManagerId?: string) =>\n accountManagerId\n ? `/accountmanagers/${encodeURIComponent(accountManagerId)}/dealers/create`\n : \"/dealers/create\";\n\nconst CreateDealerButton = ({\n accountManagerId\n}: {\n accountManagerId?: string;\n}) => (\n \n New dealer\n \n);\n\nconst DealerListActionButtons = (props: any) => {\n const { context, variables } = props;\n const amId = variables.input.accountManagerId;\n\n const rsmId =\n context === ContextNames.REGIONAL_SALES_MANAGER &&\n variables.input.regionalSalesManagerId;\n\n const { accountManager: selectedAccountManager } = useAccountManager(amId);\n const {\n accountManager: loggedInAccountManager\n } = useLoggedInAccountManager();\n const { checkCanCreate, isSuperUser } = useLoggedInUser();\n\n const accountManager = selectedAccountManager || loggedInAccountManager;\n\n const canCreate = checkCanCreate(PermissionModuleNames.Dealers);\n\n const [showHouseDealerModal, setShowHouseDealerModal] = useState(false);\n const toggleHouseDealerModal = () =>\n setShowHouseDealerModal(!showHouseDealerModal);\n\n const hasHouseDealer = !!accountManager?.houseDealer;\n\n return (\n
\n {canCreate ? (\n <>\n {isSuperUser ? (\n <>\n \n \n \n \n \n New dealer\n \n \n \n New dealer (no questionnaire)\n \n \n New house dealer\n \n \n \n \n \n ) : (\n \n )}\n \n Draft dealers\n \n \n ) : null}\n \n \n \n {accountManager ? (\n \n \n House dealer\n \n ) : null}\n
\n );\n};\n\nexport default DealerListActionButtons;\n","import { faMapMarked, faTrash } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { Field, FieldProps } from \"formik\";\nimport gql from \"graphql-tag\";\nimport * as React from \"react\";\nimport { useMutation } from \"react-apollo\";\nimport { DropdownItem } from \"reactstrap\";\nimport { ConfirmDialog } from \"../../Forms/ConfirmDialogProvider\";\nimport { useLoggedInUser } from \"../../LoggedInUserQuery\";\nimport ActionsDropdown from \"../../PagedList/ActionsDropdown\";\nimport RouterDropdownItem from \"../../RouterDropdownItem\";\nimport { Dealer } from \"../types\";\nimport { DEALER_LIST } from \"./DealerListQuery\";\n\nconst DELETE_DEALER = gql`\n mutation DeleteDealer($id: ID!) {\n deleteDealer(id: $id) {\n success\n }\n }\n`;\n\nconst DealerDropdown = ({ dealer }: { dealer: Dealer }) => {\n const { id, name, location } = dealer;\n const [deleteDealer] = useMutation(DELETE_DEALER);\n\n const { loggedInUser, isAdministrator } = useLoggedInUser();\n\n if (!loggedInUser || !isAdministrator) {\n return null;\n }\n\n return (\n \n {({\n form: {\n initialValues: {\n editDates,\n latitude,\n longitude,\n zoom,\n pitch,\n bearing,\n mapType,\n mapStyle,\n options,\n proposalEditDates,\n ...initialValues\n }\n }\n }: FieldProps) => (\n \n \n Show on map\n \n\n \n \n

Are you sure you want to delete dealer \"{name}\"?

\n \n }\n confirmButtonText=\"Delete dealer\"\n confirmButtonColor=\"danger\"\n >\n {confirm => (\n \n confirm(() =>\n deleteDealer({\n variables: { id },\n refetchQueries: [\n {\n query: DEALER_LIST,\n variables: {\n input: initialValues || {}\n }\n }\n ]\n })\n )\n }\n >\n \n Delete\n
\n )}\n \n
\n )}\n
\n );\n};\n\nexport default DealerDropdown;\n","import * as React from \"react\";\nimport { Link as RouterLink } from \"react-router-dom\";\nimport { Col, Row } from \"reactstrap\";\nimport { getShortAddress } from \"../../../utils\";\nimport LoadingSpinner from \"../../LoadingSpinner\";\nimport DealerBadges from \"../DealerBadges\";\nimport { DealerProps } from \"../types\";\nimport DealerDropdown from \"./DealerDropdown\";\nimport \"./DealerListItem.scss\";\n\nconst DealerListItem = ({ loggedInUser, dealer, context }: DealerProps) => (\n \n \n \n

\n {dealer.name}\n

\n

{getShortAddress(dealer.address)}

\n \n \n \n \n \n
\n
\n);\n\nexport const DealerListItemLoadingPlaceholder = () => (\n
\n \n
\n);\n\nexport default DealerListItem;\n","import * as React from \"react\";\nimport { SearchFormControlsCore } from \"../../Forms/SearchFormControls\";\nimport PagedList from \"../../PagedList\";\nimport { ContextNames } from \"../../types\";\nimport DealerListActionButtons from \"./DealerListActionButtons\";\nimport DealerListFilterPanel from \"./DealerListFilterPanel\";\nimport DealerListItem from \"./DealerListItem\";\nimport { DEALER_LIST, DealerListData } from \"./DealerListQuery\";\nimport DealerListSearchForm from \"./DealerListSearchForm\";\n\ninterface DealerListProps {\n accountManagerId?: string;\n regionalSalesManagerId?: string;\n context?: ContextNames;\n}\n\nconst DealerList = ({\n accountManagerId,\n regionalSalesManagerId,\n context\n}: DealerListProps) => (\n \n {({ variables, formikProps }) => (\n <>\n {\n formikProps.setFieldValue(\n \"options\",\n !formikProps.values.options,\n false\n );\n formikProps.submitForm();\n }}\n placeholder=\"Search dealers\"\n filterPanel={DealerListFilterPanel}\n formikProps={formikProps}\n context={context}\n />\n \n data.loggedInUser && data.loggedInUser.dealers\n }\n fetchPolicy=\"cache-and-network\"\n actionButtonsComponent={DealerListActionButtons}\n context={context}\n listItemComponent={({ item, loggedInUser }) => (\n \n )}\n />\n \n )}\n \n);\n\nexport default DealerList;\n","import classnames from \"classnames\";\nimport * as React from \"react\";\nimport { formatToPercentage } from \"../../../utils\";\n\nconst defaultFormatter = (value?: number) =>\n value ? Math.round(value).toString() : \"-\";\n\nexport interface TargetStatsBoxProps {\n label?: string;\n target?: number;\n actual?: number;\n proportionOfPeriodElapsed?: number | null;\n formatter?: (value?: number) => string;\n loading?: boolean;\n projectToEndOfPeriod?: boolean;\n}\n\nconst TargetStatsBox = ({\n label,\n target,\n actual,\n loading,\n proportionOfPeriodElapsed,\n projectToEndOfPeriod,\n ...props\n}: TargetStatsBoxProps) => {\n const { formatter = defaultFormatter } = props;\n\n const displayActual =\n projectToEndOfPeriod && actual && proportionOfPeriodElapsed\n ? actual / proportionOfPeriodElapsed\n : actual;\n\n const progressPercent =\n Math.min(target ? (displayActual || 0) / target : 0, 1) * 100;\n return (\n
\n {loading ? (\n

 

\n ) : (\n

\n {(displayActual || displayActual === 0) && target\n ? formatToPercentage((displayActual / target) * 100)\n : \"0%\"}\n

\n )}\n

{label}

\n
\n \n {proportionOfPeriodElapsed && (\n \n )}\n
\n

\n {`${formatter(displayActual)} / ${formatter(target)}`}\n

\n
\n );\n};\nexport default TargetStatsBox;\n","import { faFileExcel } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport classnames from \"classnames\";\nimport { FormikProps } from \"formik\";\nimport moment from \"moment\";\nimport querystring from \"query-string\";\nimport React from \"react\";\nimport { Col, Row } from \"reactstrap\";\nimport config from \"../../../config\";\nimport {\n formatCurrency,\n getMonthDateRange,\n getProportion,\n} from \"../../../utils\";\nimport FileDownloadLink from \"../../FileDownloadLink\";\nimport BooleanCheckboxField from \"../../Forms/BooleanCheckboxField\";\nimport PeriodPickerField from \"../../Forms/PeriodPickerField\";\nimport QuerystringForm from \"../../Forms/QuerystringForm\";\nimport { useLoggedInUser } from \"../../LoggedInUserQuery\";\nimport { PermissionModuleNames } from \"../../Permissions/types\";\nimport StatsBox from \"../../Proposals/ProposalDealerOverview/StatsBox\";\nimport TargetStatsBox from \"../../Proposals/ProposalDealerOverview/TargetStatsBox\";\nimport { ContextNames } from \"../../types\";\nimport AccountManagerSelect from \"../AccountManagerSelect\";\nimport { useAccountManagerTargets } from \"./AccountManagerTargetsQuery\";\n\nexport const TargetsTableRow = (props: {\n title: string;\n proportion?: any;\n actual?: any;\n target?: any;\n valueHighlighted?: boolean;\n}) => (\n <>\n \n {props.title}\n \n {props.proportion}\n \n \n {props.actual && props.target\n ? `${props.actual} / ${props.target}`\n : \"0\"}\n \n \n \n);\n\nexport const StatisticsTableRow = (props: {\n title: string;\n value?: any;\n valueHighlighted?: boolean;\n}) => (\n <>\n \n {props.title}\n \n \n {props.value ? props.value : \"0\"}\n \n \n \n);\n\ninterface AccountManagerTargetsSummaryProps {\n regionalSalesManagerId?: string;\n accountManagerId?: string;\n context?: ContextNames;\n}\n\ninterface AccountManagerTargetsFormValues {\n accountManagerId?: string;\n regionalSalesManagerId?: string;\n startDate?: string | null;\n endDate?: string | null;\n editDates?: boolean;\n forecast?: boolean;\n}\n\nconst defaultValues: AccountManagerTargetsFormValues = {\n startDate: moment().startOf(\"month\").format(\"YYYY-MM-DD\"),\n endDate: moment()\n .add(1, \"month\")\n .startOf(\"month\")\n .subtract(1, \"day\")\n .format(\"YYYY-MM-DD\"),\n editDates: false,\n forecast: false,\n};\n\nconst getQueryStringForReports = (args: any) => {\n const { editDates, forecast, ...convertedArgs } = args;\n\n return querystring.stringify(convertedArgs);\n};\n\nconst getProportionOfPeriodElapsed = (start: string, end: string) => {\n if (!start || !end) {\n return null;\n }\n const now = moment();\n if (!now.isBetween(start, end)) {\n return null;\n }\n const totalDuration = moment.duration(moment(end).diff(moment(start)));\n const currentDuration = moment.duration(now.diff(moment(start)));\n\n const result =\n currentDuration.asMilliseconds() / totalDuration.asMilliseconds();\n\n return Math.round(result * 100) / 100;\n};\n\nconst getIsThisMonth = (startDate: string, endDate: string) => {\n if (startDate && endDate) {\n const thisMonth = getMonthDateRange(moment());\n if (\n moment(thisMonth.value.start).isSame(moment(startDate)) &&\n moment(thisMonth.value.end).isSame(moment(endDate))\n ) {\n return true;\n }\n }\n return false;\n};\n\nconst AccountManagerTargetsSummaryInner = ({\n values,\n setFieldValue,\n submitForm,\n context,\n}: FormikProps & { context?: ContextNames }) => {\n const proportionOfPeriodElapsed = getProportionOfPeriodElapsed(\n values.startDate,\n values.endDate\n );\n\n const { isSuperUser, isSeniorManager, isRegionalSalesManager, checkCanRead } =\n useLoggedInUser();\n const canViewNetProfit =\n (isSuperUser || isRegionalSalesManager) &&\n checkCanRead(PermissionModuleNames.RegionalSalesManagers);\n const canViewNewStats =\n (isSuperUser || isRegionalSalesManager || isSeniorManager) &&\n checkCanRead(PermissionModuleNames.RegionalSalesManagers);\n\n const isThisMonth = getIsThisMonth(values.startDate, values.endDate);\n\n const { targets, loading } = useAccountManagerTargets(\n {\n accountManagerId: values.accountManagerId,\n regionalSalesManagerId: values.regionalSalesManagerId,\n startDate: values.startDate,\n endDate: values.endDate,\n },\n canViewNetProfit\n );\n\n const actuals = targets?.actuals;\n\n return (\n
\n {!values.accountManagerId && context !== ContextNames.ACCOUNT_MANAGER && (\n \n \n {\n setFieldValue(\"accountManagerId\", id, false);\n submitForm();\n }}\n isClearable={true}\n />\n \n \n )}\n \n \n \n \n \n <>\n \n \n

Proposal targets

\n {proportionOfPeriodElapsed || proportionOfPeriodElapsed === 0 ? (\n <>\n

\n Lower bar shows time elapsed{\" \"}\n {isThisMonth ? \"this month\" : \"in the selected date range\"}\n

\n \n \n ) : null}\n
\n \n \n {canViewNetProfit && (\n \n )}\n \n
\n \n
\n \n \n

Dealers

\n
\n \n \n \n
\n \n
\n \n \n

Stats

\n
\n \n \n \n
\n \n
\n {canViewNewStats && (\n \n \n

New Stats

\n
\n \n \n
\n \n
\n )}\n \n \n \n \n Download report\n \n \n \n \n
\n );\n};\n\nconst AccountManagerTargetsSummary = (\n props: AccountManagerTargetsSummaryProps\n) => {\n const { accountManagerId, regionalSalesManagerId, context } = props;\n\n return (\n ({\n ...qs,\n editDates: qs.editDates === \"true\",\n forecast: qs.forecast === \"true\",\n })}\n mapValuesToQuerystring={(values: any) => values}\n defaultValues={defaultValues}\n fixedValues={{\n accountManagerId,\n regionalSalesManagerId,\n }}\n >\n {(formikProps: any) => (\n \n )}\n \n );\n};\n\nexport default AccountManagerTargetsSummary;\n","import React from \"react\";\nimport { RouteComponentProps } from \"react-router\";\nimport LoadingSpinner from \"../../LoadingSpinner\";\nimport { useLoggedInUser } from \"../../LoggedInUserQuery\";\nimport { ContextNames } from \"../../types\";\nimport AccountManagerTargetsSummary from \"../AccountManagerTargetsSummary\";\n\nconst AccountManagerTargetsTabContent = ({\n match\n}: RouteComponentProps<{\n accountManagerId?: string;\n regionalSalesManagerId?: string;\n}>) => (\n \n);\n\nexport const UserAccountManagerTargetsTabContent = () => {\n const { loggedInUser } = useLoggedInUser();\n\n if (!loggedInUser) {\n return ;\n }\n\n return (\n \n );\n};\n\nexport default AccountManagerTargetsTabContent;\n","import * as Yup from \"yup\";\nimport config from \"../../config\";\nimport { GUID_PATTERN } from \"../../utils\";\nimport telephoneValidationSchema from \"../Forms/telephoneValidationSchema\";\nimport { AccountManager } from \"./types\";\n\nconst accountManagerValidationSchema = Yup.object().shape({\n id: Yup.string()\n .label(\"Initials\")\n .nullable(true)\n .default(undefined)\n .max(10),\n name: Yup.string()\n .label(\"Name\")\n .nullable(true)\n .default(undefined)\n .max(50)\n .required(),\n email: Yup.string()\n .label(\"Email\")\n .email()\n .nullable(true)\n .default(undefined)\n .required(),\n mobile: telephoneValidationSchema.label(\"Mobile\").required(),\n regionalSalesManagerId: Yup.string()\n .label(\"Regional sales manager\")\n .default(undefined)\n .nullable(true)\n .required(),\n autoConvertReference: Yup.string()\n .matches(\n GUID_PATTERN,\n `The ${config.AUTOCONVERT_NAME} user reference must be a valid guid`\n )\n .default(undefined)\n .nullable(),\n FORMSTATE_create: Yup.boolean()\n .nullable(true)\n .default(true)\n});\n\nexport default accountManagerValidationSchema;\n","import { Field, FormikProps } from \"formik\";\nimport * as React from \"react\";\nimport { Col, Row } from \"reactstrap\";\nimport config from \"../../../config\";\nimport BooleanCheckboxField from \"../../Forms/BooleanCheckboxField\";\nimport FormGroupWrapper from \"../../Forms/FormGroupWrapper\";\nimport FormInputField from \"../../Forms/FormInputField\";\nimport RegionalSalesManagerSelect from \"../../RegionalSalesManagers/RegionalSalesManagerSelect\";\nimport { ContextNames, FormSize } from \"../../types\";\nimport { AccountManager } from \"../types\";\n\nconst AccountManagerFormInner = ({\n values,\n setFieldValue,\n setFieldTouched,\n formSize,\n context\n}: FormikProps & {\n context?: ContextNames;\n formSize?: FormSize;\n}) => {\n const narrowCol = formSize === FormSize.NARROW ? 8 : 4;\n const wideCol = formSize === FormSize.NARROW ? 12 : 6;\n\n return (\n <>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {(fieldProps: any) => (\n \n {\n setFieldTouched(\"regionalSalesManagerId\", true);\n setFieldValue(\"regionalSalesManagerId\", rsmId);\n }}\n isDisabled={\n !!values.regionalSalesManagerId &&\n context === ContextNames.REGIONAL_SALES_MANAGER\n }\n />\n \n )}\n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default AccountManagerFormInner;\n","import gql from \"graphql-tag\";\nimport { useMutation } from \"react-apollo\";\nimport { cleanFormData } from \"../../../utils\";\nimport { AccountManagerFragment } from \"../fragments\";\nimport { AccountManager } from \"../types\";\n\ninterface AccountManagerData {\n createOrUpdateAccountManager: AccountManager;\n}\n\ninterface AccountManagerVariables {\n input: AccountManager;\n}\n\nexport const CREATE_OR_UPDATE_ACCOUNTMANAGER = gql`\n mutation CreateOrUpdateAccountManager($input: AccountManagerInput) {\n createOrUpdateAccountManager(input: $input) {\n ...AccountManagerFragment\n }\n }\n ${AccountManagerFragment}\n`;\n\n/** Remove unused fields from the form data before submitting */\nexport const cleanAccountManagerBeforeSubmit = (\n values: AccountManager\n): AccountManager => {\n const accountManager: AccountManager = cleanFormData(values);\n\n delete accountManager.regionalSalesManager;\n delete accountManager.user;\n delete accountManager.houseDealer;\n\n return accountManager;\n};\n\nexport const useCreateOrUpdateAccountManager = () => {\n const [createOrUpdateAccountManager] = useMutation<\n AccountManagerData,\n AccountManagerVariables\n >(CREATE_OR_UPDATE_ACCOUNTMANAGER);\n\n return (accountManager: AccountManager) =>\n createOrUpdateAccountManager({ variables: { input: accountManager } });\n};\n","import classNames from \"classnames\";\nimport React from \"react\";\nimport { Badge } from \"reactstrap\";\nimport config from \"../../config\";\nimport { AccountManagerProps } from \"./AccountManagerQuery\";\n\nconst AccountManagerBadges = ({\n accountManager: { suspended, autoConvertReference },\n className\n}: AccountManagerProps & { className?: string }) => (\n
\n {suspended ? Suspended : null}\n {!autoConvertReference ? (\n Not in {config.AUTOCONVERT_NAME}\n ) : null}\n
\n);\n\nexport default AccountManagerBadges;\n","import { FormikProps } from \"formik\";\nimport * as React from \"react\";\nimport { useHistory } from \"react-router\";\nimport ModalForm from \"../../Forms/ModalForm\";\nimport { ContextNames } from \"../../types\";\nimport accountManagerValidationSchema from \"../accountManagerValidationSchema\";\nimport { AccountManager } from \"../types\";\nimport AccountManagerFormInner from \"./AccountManagerFormInner\";\nimport {\n cleanAccountManagerBeforeSubmit,\n useCreateOrUpdateAccountManager\n} from \"./CreateOrUpdateAccountManagerMutation\";\n\ninterface CreateAccountManagerModalProps {\n regionalSalesManagerId?: string;\n isOpen: boolean;\n toggle: () => void;\n context?: ContextNames;\n}\n\nconst CreateAccountManagerModal = ({\n isOpen,\n toggle,\n context,\n regionalSalesManagerId\n}: CreateAccountManagerModalProps) => {\n const createOrUpdateAccountManager = useCreateOrUpdateAccountManager();\n const history = useHistory();\n\n return (\n \n createOrUpdateAccountManager(\n cleanAccountManagerBeforeSubmit(values)\n ).then(result => {\n if (result?.data?.createOrUpdateAccountManager) {\n history.push(\n `/accountmanagers/${result.data.createOrUpdateAccountManager.id}`\n );\n }\n })\n }\n context={context}\n >\n {(props: FormikProps & { context?: ContextNames }) => (\n \n )}\n \n );\n};\n\nexport default CreateAccountManagerModal;\n","import { FormikProps } from \"formik\";\nimport * as React from \"react\";\nimport { Col, FormGroup, Label, Row } from \"reactstrap\";\nimport BooleanCheckboxField from \"../../Forms/BooleanCheckboxField\";\nimport { useLoggedInUser } from \"../../LoggedInUserQuery\";\nimport RegionalSalesManagerSelect from \"../../RegionalSalesManagers/RegionalSalesManagerSelect\";\nimport { ContextNames } from \"../../types\";\nimport { AccountManagerSearchArgs } from \"../types\";\n\nconst AccountManagerListFilterPanel = ({\n values,\n setFieldValue,\n submitForm,\n context\n}: FormikProps & { context?: ContextNames }) => {\n const { loggedInUser } = useLoggedInUser();\n\n if (!loggedInUser) {\n return null;\n }\n\n return (\n <>\n {context !== ContextNames.REGIONAL_SALES_MANAGER && (\n \n \n \n \n {\n setFieldValue(\"regionalSalesManagerId\", id, false);\n submitForm();\n }}\n isClearable={true}\n />\n \n \n \n )}\n \n \n \n \n \n \n );\n};\n\nexport default AccountManagerListFilterPanel;\n","import gql from \"graphql-tag\";\nimport * as React from \"react\";\nimport { Mutation, MutationFunction, MutationResult } from \"react-apollo\";\n\ninterface DeleteAccountManagerData {\n success: boolean;\n}\n\ninterface DeleteAccountManagerVariables {\n id: string;\n}\n\nexport const DELETE_AM = gql`\n mutation DeleteAccountManager($id: ID!) {\n deleteAccountManager(id: $id) {\n success\n }\n }\n`;\n\nconst DeleteAccountManagerMutation = ({\n children\n}: {\n children: (\n mutationFunction: MutationFunction<\n DeleteAccountManagerData,\n DeleteAccountManagerVariables\n >,\n result: MutationResult\n ) => JSX.Element | null;\n}) => {children};\n\nexport default DeleteAccountManagerMutation;\n","import { faTrash } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { Field, FieldProps } from \"formik\";\nimport * as React from \"react\";\nimport { DropdownItem } from \"reactstrap\";\nimport { ConfirmDialog } from \"../../Forms/ConfirmDialogProvider\";\nimport { AccountManager } from \"../types\";\nimport { ACCOUNT_MANAGER_LIST } from \"./AccountManagerListQuery\";\nimport DeleteAccountManagerMutation from \"./DeleteAccountManagerMutation\";\n\ninterface DeleteAccountManagerDropdownItemProps {\n accountManager: AccountManager;\n}\n\nconst DeleteAccountManagerDropdownItem = ({\n accountManager: { id, name }\n}: DeleteAccountManagerDropdownItemProps) => (\n \n {({ form: { initialValues } }: FieldProps) => (\n \n {confirm => (\n \n {mutation => (\n {\n e.preventDefault();\n e.stopPropagation();\n\n confirm(() =>\n mutation({\n variables: { id },\n refetchQueries: [\n {\n query: ACCOUNT_MANAGER_LIST,\n variables: {\n input: initialValues || {}\n }\n }\n ]\n })\n );\n }}\n >\n Delete\n \n )}\n \n )}\n \n )}\n \n);\n\nexport default DeleteAccountManagerDropdownItem;\n","import { faHome, faMap } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport * as React from \"react\";\nimport { Link as RouterLink } from \"react-router-dom\";\nimport { Col, DropdownItem, Row } from \"reactstrap\";\nimport { canManageAccountManagers } from \"../../../utils\";\nimport ActionsDropdown from \"../../PagedList/ActionsDropdown\";\nimport RouterDropdownItem from \"../../RouterDropdownItem\";\nimport AccountManagerBadges from \"../AccountManagerBadges\";\nimport { AccountManagerProps } from \"../AccountManagerQuery\";\nimport DeleteAccountManagerDropdownItem from \"./DeleteAccountManagerDropdownItem\";\n\nconst AccountManagerListItem = ({\n loggedInUser,\n accountManager\n}: AccountManagerProps) => (\n \n \n \n

\n \n {accountManager.name === \".\"\n ? accountManager.id\n : accountManager.name}\n \n

\n\n \n \n \n \n \n \n Map of dealers\n \n \n \n House dealer\n \n {canManageAccountManagers(loggedInUser) && (\n <>\n \n \n \n )}\n \n \n
\n \n);\n\nexport default AccountManagerListItem;\n","import { FormikProps } from \"formik\";\nimport React from \"react\";\nimport { Link as RouterLink } from \"react-router-dom\";\nimport {\n Button,\n DropdownItem,\n DropdownMenu,\n DropdownToggle,\n UncontrolledButtonDropdown\n} from \"reactstrap\";\nimport SearchForm from \"../../Forms/SearchForm\";\nimport { useLoggedInUser } from \"../../LoggedInUserQuery\";\nimport PagedList from \"../../PagedList\";\nimport { PermissionModuleNames } from \"../../Permissions/types\";\nimport CreateUserModal from \"../../Settings/Users/CreateUserModal\";\nimport { ContextNames, SearchResults, User, UserRoles } from \"../../types\";\nimport CreateAccountManagerModal from \"../AccountManagerForm/CreateAccountManagerModal\";\nimport { AccountManager, AccountManagerSearchArgs } from \"../types\";\nimport AccountManagerListFilterPanel from \"./AccountManagerListFilterPanel\";\nimport AccountManagerListItem from \"./AccountManagerListItem\";\nimport {\n ACCOUNT_MANAGER_LIST,\n AccountManagerListData\n} from \"./AccountManagerListQuery\";\n\nconst defaultSearchArgs: AccountManagerSearchArgs = {\n page: 1,\n pageSize: 10,\n includeSuspended: false\n};\n\nconst AccountManagerActionButtons = ({\n context,\n variables\n}: {\n variables?: AccountManagerSearchArgs;\n results?: SearchResults;\n loggedInUser?: User;\n context?: ContextNames;\n}) => {\n const { loggedInUser, checkCanCreate, checkCanRead } = useLoggedInUser();\n\n const [showCreateModal, setShowCreateModal] = React.useState(false);\n const [\n showCreateWithoutUserModal,\n setShowCreateWithoutUserModal\n ] = React.useState(false);\n\n const toggleCreateModal = React.useCallback(\n () => setShowCreateModal(!showCreateModal),\n [setShowCreateModal, showCreateModal]\n );\n\n const toggleCreateWithoutUserModal = React.useCallback(\n () => setShowCreateWithoutUserModal(!showCreateWithoutUserModal),\n [setShowCreateWithoutUserModal, showCreateWithoutUserModal]\n );\n\n const regionalSalesManagerId = variables?.regionalSalesManagerId;\n\n if (!loggedInUser) {\n return null;\n }\n\n return (\n
\n {checkCanCreate(PermissionModuleNames.AccountManagers) ? (\n <>\n \n \n \n \n \n New account manager\n \n \n New account manager (without linked user)\n \n \n \n \n \n \n ) : null}\n {context !== ContextNames.REGIONAL_SALES_MANAGER &&\n checkCanRead(PermissionModuleNames.AccountManagerActivity) ? (\n \n Account manager activity\n \n ) : null}\n
\n );\n};\n\nconst AccountManagerList = ({\n regionalSalesManagerId,\n context\n}: {\n regionalSalesManagerId?: string;\n context?: ContextNames;\n}) => {\n return (\n <>\n ({\n ...qs,\n hasIdentityProviderUserId:\n qs.hasIdentityProviderUserId === \"true\" || undefined,\n includeSuspended: qs.includeSuspended === \"true\" || undefined\n })}\n mapValuesToQuerystring={values => values}\n defaultValues={defaultSearchArgs}\n fixedValues={{ regionalSalesManagerId }}\n filterPanel={AccountManagerListFilterPanel}\n context={context}\n >\n {(formikProps: FormikProps) => (\n \n data.accountManagers\n }\n listItemComponent={({ item, loggedInUser }) => (\n \n )}\n actionButtonsComponent={AccountManagerActionButtons}\n context={context}\n />\n )}\n \n \n );\n};\n\nexport default AccountManagerList;\n","import _objectSpread2 from \"@babel/runtime/helpers/esm/objectSpread\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport ButtonDropdown from './ButtonDropdown';\nimport { omit } from './utils';\nvar omitKeys = ['defaultOpen'];\n\nvar UncontrolledButtonDropdown =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose(UncontrolledButtonDropdown, _Component);\n\n function UncontrolledButtonDropdown(props) {\n var _this;\n\n _this = _Component.call(this, props) || this;\n _this.state = {\n isOpen: props.defaultOpen || false\n };\n _this.toggle = _this.toggle.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n var _proto = UncontrolledButtonDropdown.prototype;\n\n _proto.toggle = function toggle() {\n this.setState({\n isOpen: !this.state.isOpen\n });\n };\n\n _proto.render = function render() {\n return React.createElement(ButtonDropdown, _extends({\n isOpen: this.state.isOpen,\n toggle: this.toggle\n }, omit(this.props, omitKeys)));\n };\n\n return UncontrolledButtonDropdown;\n}(Component);\n\nexport { UncontrolledButtonDropdown as default };\nUncontrolledButtonDropdown.propTypes = _objectSpread2({\n defaultOpen: PropTypes.bool\n}, ButtonDropdown.propTypes);","import * as Yup from \"yup\";\nimport telephoneValidationSchema from \"../Forms/telephoneValidationSchema\";\nimport { RegionalSalesManager } from \"./types\";\n\nconst regionalSalesManagerValidationSchema = Yup.object<\n RegionalSalesManager\n>().shape({\n id: Yup.string()\n .label(\"Initials\")\n .nullable(true)\n .default(undefined),\n name: Yup.string()\n .label(\"Name\")\n .nullable(true)\n .default(undefined)\n .max(50)\n .required(),\n email: Yup.string()\n .label(\"Email\")\n .email()\n .nullable(true)\n .default(undefined),\n mobile: telephoneValidationSchema.label(\"Mobile\"),\n region: Yup.string()\n .nullable(true)\n .label(\"Region\")\n .default(undefined)\n .required(),\n isSuspended: Yup.boolean()\n .label(\"Suspended\")\n .default(false)\n .nullable(true)\n .required()\n});\n\nexport default regionalSalesManagerValidationSchema;\n","import gql from \"graphql-tag\";\nimport * as React from \"react\";\nimport {\n Mutation,\n MutationFunction,\n MutationResult,\n useMutation\n} from \"react-apollo\";\nimport { cleanFormData } from \"../../../utils\";\nimport { RegionalSalesManagerFragment } from \"../fragments\";\nimport { RegionalSalesManager } from \"../types\";\n\ninterface RegionalSalesManagerData {\n createOrUpdateRegionalSalesManager: RegionalSalesManager;\n}\n\ninterface RegionalSalesManagerVariables {\n input: RegionalSalesManager;\n}\n\nexport const CREATE_OR_UPDATE_RSM = gql`\n mutation CreateOrUpdateRegionalSalesManager(\n $input: RegionalSalesManagerInput\n ) {\n createOrUpdateRegionalSalesManager(input: $input) {\n ...RegionalSalesManagerFragment\n }\n }\n ${RegionalSalesManagerFragment}\n`;\n\n/** Remove unused fields from the form data before submitting */\nexport const cleanRegionalSalesManagerBeforeSubmit = (\n values: RegionalSalesManager\n): RegionalSalesManager => {\n const regionalSalesManager: RegionalSalesManager = cleanFormData(values);\n\n delete regionalSalesManager.user;\n\n return regionalSalesManager;\n};\n\nconst CreateOrUpdateRegionalSalesManagerMutation = ({\n children\n}: {\n children: (\n mutationFunction: MutationFunction<\n RegionalSalesManagerData,\n RegionalSalesManagerVariables\n >,\n result: MutationResult\n ) => JSX.Element | null;\n}) => {children};\n\nexport const useCreateOrUpdateRegionalSalesManager = () => {\n const [createOrUpdateRegionalSalesManager] = useMutation<\n RegionalSalesManagerData,\n RegionalSalesManagerVariables\n >(CREATE_OR_UPDATE_RSM);\n\n return createOrUpdateRegionalSalesManager;\n};\n\nexport default CreateOrUpdateRegionalSalesManagerMutation;\n","import { Field, FormikProps } from \"formik\";\nimport * as React from \"react\";\nimport { Col, Row } from \"reactstrap\";\nimport BooleanCheckboxField from \"../../Forms/BooleanCheckboxField\";\nimport FormInputField from \"../../Forms/FormInputField\";\nimport { ContextNames, FormSize } from \"../../types\";\nimport { RegionalSalesManager } from \"../types\";\n\nconst RegionalSalesManagerFormInner = ({\n formSize,\n errors\n}: FormikProps & {\n context?: ContextNames;\n formSize?: FormSize;\n}) => {\n const narrowCol = formSize === FormSize.NARROW ? 8 : 4;\n const wideCol = formSize === FormSize.NARROW ? 12 : 6;\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\nexport default RegionalSalesManagerFormInner;\n","import { FormikProps } from \"formik\";\nimport * as React from \"react\";\nimport { RouteComponentProps, withRouter } from \"react-router\";\nimport ModalForm from \"../../Forms/ModalForm\";\nimport { ContextNames } from \"../../types\";\nimport regionalSalesManagerValidationSchema from \"../regionalSalesManagerValidationSchema\";\nimport { RegionalSalesManager } from \"../types\";\nimport CreateOrUpdateRegionalSalesManagerMutation, {\n cleanRegionalSalesManagerBeforeSubmit\n} from \"./CreateOrUpdateRegionalSalesManagerMutation\";\nimport RegionalSalesManagerFormInner from \"./RegionalSalesManagerFormInner\";\n\ninterface CreateRegionalSalesManagerModalProps {\n isOpen: boolean;\n toggle: () => void;\n}\n\nconst CreateRegionalSalesManagerModal = ({\n isOpen,\n toggle,\n history\n}: CreateRegionalSalesManagerModalProps & RouteComponentProps) => {\n return (\n \n {mutation => (\n \n mutation({\n variables: {\n input: cleanRegionalSalesManagerBeforeSubmit(values)\n }\n }).then(result => {\n if (\n result &&\n result.data &&\n result.data.createOrUpdateRegionalSalesManager\n ) {\n history.push(\n `regionalsalesmanagers/${result.data.createOrUpdateRegionalSalesManager.id}`\n );\n }\n })\n }\n >\n {(\n props: FormikProps & {\n context?: ContextNames;\n }\n ) => }\n \n )}\n \n );\n};\n\nexport default withRouter(CreateRegionalSalesManagerModal);\n","import { FormikProps } from \"formik\";\nimport * as React from \"react\";\nimport { Col, Row } from \"reactstrap\";\nimport BooleanCheckboxField from \"../Forms/BooleanCheckboxField\";\nimport { ContextNames } from \"../types\";\nimport { RegionalSalesManagerSearchArgs } from \"./types\";\n\nconst RegionalSalesManagerListFilterPanel = (\n props: FormikProps & {\n context?: ContextNames;\n }\n) => {\n return (\n \n \n \n \n \n );\n};\n\nexport default RegionalSalesManagerListFilterPanel;\n","import gql from \"graphql-tag\";\nimport * as React from \"react\";\nimport { Mutation, MutationFunction, MutationResult } from \"react-apollo\";\n\ninterface DeleteRegionalSalesManagerData {\n success: boolean;\n}\n\ninterface DeleteRegionalSalesManagerVariables {\n id: string;\n}\n\nexport const DELETE_RSM = gql`\n mutation DeleteRegionalSalesManager($id: ID!) {\n deleteRegionalSalesManager(id: $id) {\n success\n }\n }\n`;\n\nconst DeleteRegionalSalesManagerMutation = ({\n children\n}: {\n children: (\n mutationFunction: MutationFunction<\n DeleteRegionalSalesManagerData,\n DeleteRegionalSalesManagerVariables\n >,\n result: MutationResult\n ) => JSX.Element | null;\n}) => {children};\n\nexport default DeleteRegionalSalesManagerMutation;\n","import { faTrash } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { Field, FieldProps } from \"formik\";\nimport * as React from \"react\";\nimport { DropdownItem } from \"reactstrap\";\nimport { ConfirmDialog } from \"../Forms/ConfirmDialogProvider\";\nimport DeleteRegionalSalesManagerMutation from \"./DeleteRegionalSalesManagerMutation\";\nimport { REGIONAL_SALES_MANAGER_LIST } from \"./RegionalSalesManagerListQuery\";\nimport { RegionalSalesManager } from \"./types\";\n\ninterface DeleteRegionalSalesManagerDropdownItemProps {\n regionalSalesManager: RegionalSalesManager;\n}\n\nconst DeleteRegionalSalesManagerDropdownItem = ({\n regionalSalesManager: { id, name }\n}: DeleteRegionalSalesManagerDropdownItemProps) => (\n \n {({ form: { initialValues } }: FieldProps) => (\n \n {confirm => (\n \n {mutation => (\n {\n e.preventDefault();\n e.stopPropagation();\n\n confirm(() =>\n mutation({\n variables: { id },\n refetchQueries: [\n {\n query: REGIONAL_SALES_MANAGER_LIST,\n variables: {\n input: initialValues || {}\n }\n }\n ]\n })\n );\n }}\n >\n Delete\n \n )}\n \n )}\n \n )}\n \n);\n\nexport default DeleteRegionalSalesManagerDropdownItem;\n","import classNames from \"classnames\";\nimport React from \"react\";\nimport { Badge } from \"reactstrap\";\nimport { RegionalSalesManagerProps } from \"./RegionalSalesManagerQuery\";\n\nconst RegionalSalesManagerBadges = ({\n regionalSalesManager: { isSuspended },\n className\n}: RegionalSalesManagerProps & { className?: string }) => (\n
\n {isSuspended && Suspended}\n
\n);\n\nexport default RegionalSalesManagerBadges;\n","import { faMap } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport * as React from \"react\";\nimport { Link as RouterLink } from \"react-router-dom\";\nimport { Col, DropdownItem, Row } from \"reactstrap\";\nimport { canManageRegionalSalesManagers } from \"../../utils\";\nimport ActionsDropdown from \"../PagedList/ActionsDropdown\";\nimport RouterDropdownItem from \"../RouterDropdownItem\";\nimport DeleteRegionalSalesManagerDropdownItem from \"./DeleteRegionalSalesManagerDropdownItem\";\nimport RegionalSalesManagerBadges from \"./RegionalSalesManagerBadges\";\nimport { RegionalSalesManagerProps } from \"./RegionalSalesManagerQuery\";\n\nconst RegionalSalesManagerListItem = ({\n loggedInUser,\n regionalSalesManager\n}: RegionalSalesManagerProps) => (\n \n \n \n

\n {regionalSalesManager.name}{\" \"}\n

\n

{regionalSalesManager.region}

\n \n \n \n \n \n Map of dealers\n \n {canManageRegionalSalesManagers(loggedInUser) && (\n <>\n \n \n \n )}\n \n \n
\n\n \n \n);\n\nexport default RegionalSalesManagerListItem;\n","import { FormikProps } from \"formik\";\nimport React from \"react\";\nimport Helmet from \"react-helmet\";\nimport {\n Button,\n DropdownItem,\n DropdownMenu,\n DropdownToggle,\n UncontrolledButtonDropdown\n} from \"reactstrap\";\nimport { canManageRegionalSalesManagers } from \"../../utils\";\nimport SearchForm from \"../Forms/SearchForm\";\nimport PagedList from \"../PagedList\";\nimport CreateUserModal from \"../Settings/Users/CreateUserModal\";\nimport { UserRoles } from \"../types\";\nimport CreateRegionalSalesManagerModal from \"./RegionalSalesManagerForm/CreateRegionalSalesManagerModal\";\nimport RegionalManagerListFilterPanel from \"./RegionalSalesManagerListFilterPanel\";\nimport RegionalSalesManagerListItem from \"./RegionalSalesManagerListItem\";\nimport {\n REGIONAL_SALES_MANAGER_LIST,\n RegionalSalesManagerListData\n} from \"./RegionalSalesManagerListQuery\";\nimport { RegionalSalesManagerSearchArgs } from \"./types\";\n\nconst defaultSearchArgs = {\n page: 1,\n pageSize: 10,\n includeSuspended: false\n};\n\nclass RegionalSalesManagerList extends React.Component<\n {},\n { showCreateModal: boolean; showCreateWithoutUserModal: boolean }\n> {\n constructor(props: any) {\n super(props);\n\n this.toggleCreateModal = this.toggleCreateModal.bind(this);\n this.toggleCreateWithoutUserModal = this.toggleCreateWithoutUserModal.bind(\n this\n );\n\n this.state = { showCreateModal: false, showCreateWithoutUserModal: false };\n }\n\n public render() {\n const { showCreateModal, showCreateWithoutUserModal } = this.state;\n return (\n <>\n \n Regional sales managers | Eurodrive\n \n ({\n ...qs,\n hasIdentityProviderUserId:\n qs.hasIdentityProviderUserId === \"true\" || undefined,\n includeSuspended: qs.includeSuspended === \"true\" || undefined\n })}\n mapValuesToQuerystring={values => values}\n defaultValues={defaultSearchArgs}\n filterPanel={RegionalManagerListFilterPanel}\n >\n {(formikProps: FormikProps) => (\n \n data.regionalSalesManagers\n }\n listItemComponent={({ item, loggedInUser }) => (\n \n )}\n actionButtonsComponent={({ loggedInUser }: any) =>\n loggedInUser && canManageRegionalSalesManagers(loggedInUser) ? (\n \n \n New regional sales manager\n \n \n \n \n New regional sales manager\n \n \n New regional sales manager (without linked user)\n \n \n \n ) : null\n }\n />\n )}\n \n \n \n \n );\n }\n\n private toggleCreateModal() {\n this.setState(s => ({\n showCreateModal: !s.showCreateModal,\n showCreateWithoutUserModal: false\n }));\n }\n\n private toggleCreateWithoutUserModal() {\n this.setState(s => ({\n showCreateWithoutUserModal: !s.showCreateWithoutUserModal,\n showCreateModal: false\n }));\n }\n}\n\nexport default RegionalSalesManagerList;\n","import * as React from \"react\";\nimport { Container } from \"reactstrap\";\nimport Breadcrumbs from \"../Breadcrumbs\";\nimport RegionalSalesManagerList from \"./RegionalSalesManagerList\";\nimport { RegionalSalesManagerSearchArgs } from \"./types\";\n\ninterface RegionalSalesManagerListProps extends RegionalSalesManagerSearchArgs {\n updateSearchArgs: (args: RegionalSalesManagerSearchArgs) => void;\n}\n\nclass RegionalSalesManagerListScene extends React.Component<\n RegionalSalesManagerListProps,\n { inputBuffer?: string }\n> {\n public render() {\n const breadcrumbs = [\n {\n to: \"/\",\n title: \"Home\"\n },\n {\n to: \"/regionalsalesmanagers\",\n title: \"Regional sales managers\",\n active: true\n }\n ];\n\n return (\n \n \n

Regional sales managers

\n \n
\n );\n }\n}\n\nexport default RegionalSalesManagerListScene;\n","import React from \"react\";\nimport { RouteComponentProps } from \"react-router\";\nimport AccountManagerList from \"../AccountManagers/AccountManagerList\";\nimport { ContextNames } from \"../types\";\n\nconst RegionalSalesManagerAccountManagersTabContent = ({\n match\n}: RouteComponentProps<{ regionalSalesManagerId: string; tab: string }>) => {\n const id = match.params.regionalSalesManagerId;\n\n return (\n \n );\n};\n\nexport default RegionalSalesManagerAccountManagersTabContent;\n","import React from \"react\";\nimport { RouteComponentProps } from \"react-router\";\nimport DealerList from \"../Dealers/DealerList\";\nimport { ContextNames } from \"../types\";\n\nconst RegionalSalesManagerDealersTabContent = ({\n match\n}: RouteComponentProps<{ regionalSalesManagerId: string; tab: string }>) => {\n const id = match.params.regionalSalesManagerId;\n\n return (\n \n );\n};\n\nexport default RegionalSalesManagerDealersTabContent;\n","import * as React from \"react\";\nimport SummaryRow, {\n EmailSummaryRow,\n YesNoSummaryRow\n} from \"../../shared/SummarySection/SummaryRow\";\nimport { RegionalSalesManager } from \"../types\";\n\ninterface RegionalSalesManagerFormSummaryProps {\n values: RegionalSalesManager;\n}\n\nconst RegionalSalesManagerFormSummary = ({\n values: { name, email, mobile, region, isSuspended }\n}: RegionalSalesManagerFormSummaryProps) => {\n return (\n <>\n \n \n \n \n \n \n );\n};\n\nexport default RegionalSalesManagerFormSummary;\n","import React from \"react\";\nimport EditForm from \"../../Forms/EditForm\";\nimport LoadingSpinner from \"../../LoadingSpinner\";\nimport { useLoggedInUser } from \"../../LoggedInUserQuery\";\nimport { PermissionModuleNames } from \"../../Permissions/types\";\nimport {\n cleanRegionalSalesManagerBeforeSubmit,\n useCreateOrUpdateRegionalSalesManager\n} from \"../RegionalSalesManagerForm/CreateOrUpdateRegionalSalesManagerMutation\";\nimport RegionalSalesManagerFormInner from \"../RegionalSalesManagerForm/RegionalSalesManagerFormInner\";\nimport RegionalSalesManagerFormSummary from \"../RegionalSalesManagerForm/RegionalSalesManagerFormSummary\";\nimport { useRegionalSalesManager } from \"../RegionalSalesManagerQuery\";\nimport regionalSalesManagerValidationSchema from \"../regionalSalesManagerValidationSchema\";\n\nconst RegionalSalesManagerEditForm = ({\n regionalSalesManagerId\n}: {\n regionalSalesManagerId?: string;\n}) => {\n const { loggedInUser, checkCanUpdate } = useLoggedInUser();\n const { regionalSalesManager } = useRegionalSalesManager(\n regionalSalesManagerId\n );\n const mutation = useCreateOrUpdateRegionalSalesManager();\n\n if (!regionalSalesManager || !loggedInUser) {\n return ;\n }\n\n const disableEditing = !checkCanUpdate(\n PermissionModuleNames.RegionalSalesManagers\n );\n\n return (\n \n mutation({\n variables: {\n input: cleanRegionalSalesManagerBeforeSubmit(formValues)\n }\n })\n }\n validationSchema={regionalSalesManagerValidationSchema}\n >\n {formikProps => }\n \n );\n};\n\nexport default RegionalSalesManagerEditForm;\n","import React from \"react\";\nimport { RouteComponentProps } from \"react-router\";\nimport LoadingSpinner from \"../LoadingSpinner\";\nimport { useLoggedInUser } from \"../LoggedInUserQuery\";\nimport RegionalSalesManagerEditForm from \"./RegionalSalesManagerForm/RegionalSalesManagerEditForm\";\n\nconst RegionalSalesManagerDetailsTabContent = ({\n match\n}: RouteComponentProps<{ regionalSalesManagerId: string; tab: string }>) => {\n const id = match.params.regionalSalesManagerId\n ? decodeURIComponent(match.params.regionalSalesManagerId)\n : undefined;\n\n if (!id) {\n return null;\n }\n\n return ;\n};\n\nexport const UserRegionalSalesManagerDetailsTabContent = () => {\n const { loggedInUser } = useLoggedInUser();\n\n if (!loggedInUser) {\n return ;\n }\n\n return (\n \n );\n};\n\nexport default RegionalSalesManagerDetailsTabContent;\n","import React from \"react\";\nimport { RouteComponentProps } from \"react-router\";\nimport ProposalList from \"../Proposals/ProposalList\";\nimport { ContextNames } from \"../types\";\n\nconst RegionalSalesManagerProposalsTabContent = ({\n match\n}: RouteComponentProps<{ regionalSalesManagerId: string }>) => {\n const id = match.params.regionalSalesManagerId;\n return (\n \n );\n};\n\nexport default RegionalSalesManagerProposalsTabContent;\n","import React from \"react\";\nimport { useLoggedInUser } from \"../LoggedInUserQuery\";\nimport { PermissionModuleNames } from \"../Permissions/types\";\nimport FullWidthTabHeaders, {\n TabHeaderProps\n} from \"../Tabs/FullWidthTabHeaders\";\nimport { UserRoles } from \"../types\";\n\nconst RegionalSalesManagerTabHeaders = () => {\n const { loggedInUser, checkCanRead } = useLoggedInUser();\n\n if (!loggedInUser) {\n return null;\n }\n\n const isCaseManagementTeam = loggedInUser.roles.includes(\n UserRoles.case_management_team\n );\n const isRegionalSalesManager = loggedInUser.roles.includes(\n UserRoles.regional_sales_manager\n );\n\n const tabs: TabHeaderProps[] = [];\n\n if (!isCaseManagementTeam) {\n tabs.push({ path: \"\", title: \"Overview\" });\n }\n\n tabs.push({\n path: isCaseManagementTeam ? \"\" : \"details\",\n title: \"Details\",\n collapse: !isCaseManagementTeam\n });\n\n if (!isRegionalSalesManager) {\n if (checkCanRead(PermissionModuleNames.AccountManagers)) {\n tabs.push({\n path: \"accountmanagers\",\n title: \"Account managers\",\n collapse: true\n });\n }\n\n if (checkCanRead(PermissionModuleNames.Dealers)) {\n tabs.push({\n path: \"dealers\",\n title: \"Dealers\",\n collapse: true\n });\n }\n\n if (checkCanRead(PermissionModuleNames.Proposals)) {\n tabs.push({\n path: \"proposals\",\n title: \"Proposals\",\n collapse: true\n });\n }\n }\n\n if (checkCanRead(PermissionModuleNames.AccountManagerActivity)) {\n tabs.push({ path: \"activity\", title: \"Activity\", collapse: true });\n }\n\n return ;\n};\n\nexport default RegionalSalesManagerTabHeaders;\n","import { ApolloClient } from \"apollo-boost\";\nimport * as React from \"react\";\nimport { useApolloClient } from \"react-apollo\";\nimport Helmet from \"react-helmet\";\nimport { Route, RouteComponentProps, Switch } from \"react-router\";\nimport { Link as RouterLink } from \"react-router-dom\";\nimport { Container } from \"reactstrap\";\nimport AccountManagerActivityTabContent, {\n UserAccountManagerActivityTabContent\n} from \"../AccountManagers/AccountManagerActivities/AccountManagerActivityTabContent\";\nimport AccountManagerTargetsTabContent, {\n UserAccountManagerTargetsTabContent\n} from \"../AccountManagers/AccountManagerScene/AccountManagerTargetsTabContent\";\nimport Breadcrumbs from \"../Breadcrumbs\";\nimport { useLoggedInUser } from \"../LoggedInUserQuery\";\nimport { PermissionModuleNames } from \"../Permissions/types\";\nimport { PROPOSAL_LIST } from \"../Proposals/ProposalList/ProposalListQuery\";\nimport SceneLoadingSpinner from \"../SceneLoadingSpinner\";\nimport { GET_USER } from \"../Settings/Users/UserQuery\";\nimport TabContentContainer from \"../Tabs/TabContentContainer\";\nimport RegionalSalesManagerAccountManagersTabContent from \"./RegionalSalesManagerAccountManagersTabContent\";\nimport RegionalSalesManagerBadges from \"./RegionalSalesManagerBadges\";\nimport RegionalSalesManagerDealersTabContent from \"./RegionalSalesManagerDealersTabContent\";\nimport RegionalSalesManagerDetailsTabContent, {\n UserRegionalSalesManagerDetailsTabContent\n} from \"./RegionalSalesManagerDetailsTabContent\";\nimport RegionalSalesManagerProposalsTabContent from \"./RegionalSalesManagerProposalsTabContent\";\nimport { useRegionalSalesManager } from \"./RegionalSalesManagerQuery\";\nimport RegionalSalesManagerTabHeaders from \"./RegionalSalesManagerTabHeaders\";\nimport { RegionalSalesManager } from \"./types\";\n\nconst RegionalSalesManagerSceneInner = ({\n regionalSalesManager,\n url\n}: {\n regionalSalesManager: RegionalSalesManager;\n url: string;\n}) => {\n const {\n loggedInUser,\n isRegionalSalesManager,\n isCaseManagementTeam,\n checkCanCreate\n } = useLoggedInUser();\n\n if (!loggedInUser) {\n return null;\n }\n\n const breadcrumbs = isRegionalSalesManager\n ? [\n { to: \"/\", title: \"Home\" },\n {\n to: \"/regionalsalesmanager\",\n title: regionalSalesManager.name,\n active: true\n }\n ]\n : [\n { to: \"/\", title: \"Home\" },\n { to: \"/regionalsalesmanagers\", title: \"Regional sales managers\" },\n {\n to: `/regionalsalesmanagers/${encodeURIComponent(\n regionalSalesManager.id\n )}`,\n title: regionalSalesManager.name,\n active: true\n }\n ];\n\n return (\n <>\n \n \n \n

\n Regional sales manager -{\" \"}\n {regionalSalesManager.name}\n

\n
\n

\n Region: \n {regionalSalesManager.region}\n

\n {checkCanCreate(PermissionModuleNames.Users) &&\n regionalSalesManager ? (\n

\n User:{\" \"}\n {regionalSalesManager.user ? (\n \n {regionalSalesManager.user.username}\n \n ) : (\n \"[not linked to a user]\"\n )}\n

\n ) : null}\n
\n\n \n
\n \n \n \n \n \n \n \n {isCaseManagementTeam ? (\n \n ) : (\n \n )}\n \n \n \n \n \n \n \n \n \n );\n};\n\nconst preloadData = (\n { id, user }: RegionalSalesManager,\n client: ApolloClient\n) => {\n client.query({\n query: PROPOSAL_LIST,\n variables: {\n input: {\n page: 1,\n pageSize: 10,\n status: [],\n q: \"\",\n regionalSalesManagerId: id\n }\n }\n });\n\n if (user) {\n client.query({\n query: GET_USER,\n variables: { id: user.id }\n });\n }\n};\n\nconst RegionalSalesManagerScene = ({\n match\n}: RouteComponentProps<{ regionalSalesManagerId: string }>) => {\n const regionalSalesManagerId = decodeURIComponent(\n match.params.regionalSalesManagerId\n );\n\n const client = useApolloClient();\n const { regionalSalesManager } = useRegionalSalesManager(\n regionalSalesManagerId\n );\n\n if (!regionalSalesManager) {\n return ;\n }\n\n preloadData(regionalSalesManager, client);\n\n return (\n \n );\n};\n\nexport const UserRegionalSalesManagerScene = ({\n match\n}: RouteComponentProps<{}>) => {\n const client = useApolloClient();\n const { loggedInUser } = useLoggedInUser();\n const { regionalSalesManager } = useRegionalSalesManager(\n loggedInUser?.regionalSalesManager?.id\n );\n\n if (!loggedInUser || !regionalSalesManager) {\n return ;\n }\n\n preloadData(regionalSalesManager, client);\n\n return (\n \n );\n};\n\nexport default RegionalSalesManagerScene;\n","import { UserRegionalSalesManagerScene } from \"./RegionalSalesManagerScene\";\n\nexport default UserRegionalSalesManagerScene;\n","import * as React from \"react\";\nimport { Route, Switch } from \"react-router-dom\";\nimport SceneLoadingSpinner from \"../SceneLoadingSpinner\";\nimport RegionalSalesManagerListScene from \"./RegionalSalesManagerListScene\";\nimport RegionalSalesManagerScene from \"./RegionalSalesManagerScene\";\nimport UserRegionalSalesManagerScene from \"./UserRegionalSalesManagerScene\";\n\nconst DealerMapScene = React.lazy(() => import(\"../Dealers/DealerMapScene\"));\n\nconst RegionalSalesManagerRouter = () => {\n return (\n }>\n \n \n \n \n \n \n \n );\n};\n\nexport default RegionalSalesManagerRouter;\n","var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { getHandlerArgs, isSupported, visibility } from './utils';\n\nvar PageVisibility = function (_React$Component) {\n _inherits(PageVisibility, _React$Component);\n\n function PageVisibility(props) {\n _classCallCheck(this, PageVisibility);\n\n var _this = _possibleConstructorReturn(this, (PageVisibility.__proto__ || Object.getPrototypeOf(PageVisibility)).call(this, props));\n\n _this.state = {\n isSupported: isSupported && visibility\n };\n return _this;\n }\n\n _createClass(PageVisibility, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n if (!this.state.isSupported) {\n return;\n }\n\n this.handleVisibilityChange = this.handleVisibilityChange.bind(this);\n document.addEventListener(visibility.event, this.handleVisibilityChange);\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n if (!this.state.isSupported) {\n return;\n }\n document.removeEventListener(visibility.event, this.handleVisibilityChange);\n }\n }, {\n key: 'handleVisibilityChange',\n value: function handleVisibilityChange() {\n if (typeof this.props.onChange === 'function') {\n var _props;\n\n // propagate change to callback\n (_props = this.props).onChange.apply(_props, _toConsumableArray(getHandlerArgs()));\n }\n if (typeof this.props.children === 'function') {\n // we pass the props directly to the function as children\n this.forceUpdate();\n }\n }\n }, {\n key: 'render',\n value: function render() {\n if (!this.props.children) {\n return null;\n }\n // function as children pattern support\n if (typeof this.props.children === 'function') {\n var _props2;\n\n if (!this.state.isSupported) {\n // don't pass any arguments if PageVisibility is not supported\n return this.props.children();\n }\n return (_props2 = this.props).children.apply(_props2, _toConsumableArray(getHandlerArgs()));\n }\n\n return React.Children.only(this.props.children);\n }\n }]);\n\n return PageVisibility;\n}(React.Component);\n\nPageVisibility.displayName = 'PageVisibility';\n\nPageVisibility.propTypes = {\n onChange: PropTypes.func,\n children: PropTypes.oneOfType([PropTypes.node, PropTypes.func])\n};\n\nexport default PageVisibility;","import PageVisibility from './PageVisibility';\nexport { default as usePageVisibility } from './usePageVisibility';\n\nexport default PageVisibility;"],"sourceRoot":""}