{"version":3,"sources":["config/env-vars.ts","analytics/sentry.ts","api/generated/index.ts","utils/logger.ts","utils/notification-service.tsx","hooks/use-notifications.tsx","api/generated/enums.ts","hooks/use-subscription.ts","auth/index.ts","api/base-interceptors.ts","api/generated/config.ts","components/delayed-loading-container.tsx","routes/index.tsx","auth/use-auth.tsx","hooks/use-immer-reducer.ts","analytics/index.ts","forms/button.tsx","styles/breakpoints.tsx","forms/container.tsx","components/json.tsx","forms/submit-error.tsx","forms/field-factory.tsx","forms/adapters/checkbox.tsx","components/date.tsx","styles/index.tsx","forms/adapters/datepicker.tsx","api/generated/utils.tsx","forms/adapters/dropdown.tsx","forms/adapters/textarea.tsx","forms/value-converters.ts","forms/adapters/input.tsx","forms/adapters/radio-group.tsx","forms/fields.tsx","forms/map-formal-errors.ts","components/alert.tsx","forms/form.tsx","forms/section.tsx","forms/index.tsx","forms/adapters/custom-value.tsx","forms/debug-form-state.tsx","auth/change-password.tsx","components/navigation-link.tsx","components/non-production-warning.tsx","utils/guard.ts","utils/index.ts","store.tsx","styles/styled.tsx","selectors.ts","auth/authorization-helpers.tsx","context-selector.tsx","primary-navigation.tsx","routes/location-notifier.tsx","components/flex.tsx","components/page-title.tsx","basic-page.tsx","components/async-state-container.tsx","components/confirm-delete-button.tsx","accounts/account-create-update.tsx","hooks/use-debounced-state.ts","hooks/use-delay-expiration.ts","components/copy-button.tsx","components/tooltip.tsx","hooks/use-cached-state.ts","hooks/use-pagination.tsx","hooks/use-paged-data-table.tsx","components/data-list.tsx","accounts/account-note-create-update-modal.tsx","accounts/account-note-listing-modal.tsx","accounts/account-dashboard.tsx","accounts/account-listing.tsx","meter-readings/meter-readings-dashboard.tsx","organizations/organization-listing.tsx","settings/setting-details.tsx","settings/setting-listing.tsx","users/user-create-update.tsx","components/confirm-button.tsx","hooks/use-produce.ts","users/user-listing.tsx","meter-readings/meter-reading-calculate-modal.tsx","meter-readings/meter-reading-create-update.tsx","organizations/organization-create-update.tsx","rate-table-tiers/rate-table-tier-create-update.tsx","rate-table/rate-table-listing.tsx","rate-table/rate-table-create-update.tsx","rate-table-tiers/rate-table-tier-listing.tsx","rate-table/rate-table-dashboard.tsx","routes/portal.tsx","portal-app.tsx","customers/customer-styles.tsx","hooks/use-query.ts","customers/payment-successful.tsx","customers/account-search.tsx","customers/skip-reading-modal.tsx","customers/meter-reading-input.tsx","customers/payment-confirm-modal.tsx","customers/meter-reading-submitted.tsx","customers/meter-reading-container.tsx","routes/customer.tsx","customer-app.tsx","app.tsx","components/toast-container.tsx","index.tsx","hooks/use-memoized-value.ts","assets/e3-logo.png","images/meter-reader-balanced-black.png"],"names":["host","window","location","protocol","Env","isProductionBuild","process","publicUrl","name","buildNumber","apiBaseUrl","subdirectory","appRoot","mixPanelToken","googleAnalyticsId","sentryKey","sentryProjectId","excludedHttpBreadcrumbs","Sentry","dsn","beforeBreadcrumb","breadcrumb","hint","category","data","url","some","regex","test","ignoreErrors","release","environment","serviceOptions","axios","configs","resolve","reject","request","then","res","catch","err","Error","getConfigs","method","contentType","options","headers","Array","AccounteNotesService","params","Promise","Page","PageSize","Filtered","Sorted","replace","AccountsService","OrganizationId","OrganizationSlug","AccountNumber","organizationId","rateTableId","FormData","append","IntegrationsService","MeterReadingsService","StartDate","EndDate","AccountId","OrganizationsService","RateTablesService","startMeterReadingAmount","endMeterReadingAmount","RateTableTiersService","RateTableId","SettingsService","UsersService","this","localStorage","setItem","error","notifications","logEnabled","getItem","createLogger","namespace","subject","level","message","log","console","optionalParams","call","DEFAULT_NAMESPACE","logger","config","debug","info","warn","developmentLogger","defaultOptions","autoDismiss","autoDismissTimeout","pauseOnHover","useNotification","addToast","useToasts","createMessageType","type","appearance","success","warning","NotificationService","_notifications","useEffect","ClientIds","web","CustomClaims","permissions","role","CustomSessionClaims","organization_id","organization_slug","AuthenticationQueryKeys","CurrencyCodes","USD","UnitTypes","Gallons","Timezones","UriProtocols","WebClientDirectories","portal","customer","ReportNames","States","AL","AK","AS","AZ","AR","CA","CO","CT","DE","DC","FM","FL","GA","GU","HI","ID","IL","IN","IA","KS","KY","LA","ME","MH","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","MP","OH","OK","OR","PW","PA","PR","RI","SC","SD","TN","TX","UT","VT","VI","VA","WA","WV","WI","WY","UserPermissions","OrganizationPermissions","AccountPermissions","RateTablePermissions","RateTableTierPermissions","MeterReadingPermissions","PaymentPermissions","ServicePermissions","Roles","User","OrganizationRoles","RoleTemplates","AllPermissions","emitter","mitt","useSubscription","eventName","cb","on","off","notify","event","emit","userManager","oidcClient","Log","initializeUserManager","once","clientSettings","settings","client_id","scope","authority","response_type","post_logout_redirect_uri","filterProtocolClaims","redirect_uri","silent_redirect_uri","automaticSilentRenew","clockSkew","extraQueryParams","slug","AuthSessionToken","UserManager","events","addSilentRenewError","undefined","addAccessTokenExpiring","addUserSignedOut","a","removeUser","reload","getUser","user","expired","requestInterceptors","fns","x","reduce","v","f","compose","Date","requestCount","_ts","access_token","defaultErrorhandlers","response","hasErrors","errors","propertyName","errorMessage","map","join","errorHandlers","handler","status","result","instance","create","baseURL","paramsSerializer","qs","stringify","allowDots","interceptors","use","DelayedLoadingContainer","delayInMs","children","useState","showContent","setShowContent","id","setTimeout","clearTimeout","appSubdirectory","rootRoutes","routes","meterReadingInput","paymentSuccessful","dashboard","users","detail","listing","organizations","accounts","update","rateTables","rateTableTiers","meterReadings","buildPath","path","Object","keys","key","action","payload","onUserLoaded","onUserUnloaded","redirecting","reducer","initialState","handlers","when","build","acc","state","produce","draft","createReducer","pending","sessionAttributes","values","value","profile","Number","sub","email","preferred_username","attributes","mapOidcUser","redirectUrl","INITIAL_STATE","AuthContext","createContext","useUser","useContext","analtyics","initializeMixpanel","initializeGoogleAnalytics","identified","mockInDevelopment","args","identify","uniqueId","mixpanel","ReactGA","set","userId","trackEvent","properties","track","timeEvent","time_event","trackPage","pageview","init","initialize","Button","hoistNonReactStatics","secondary","tertiary","className","props","classNames","SemanticButton","Breakpoints","MobileMax","TabletMin","TabletMax","DektopMin","DektopMax","WideMin","MediaSizes","Media","size","styles","Json","css","JSON","SubmitError","submitError","useField","subscription","touched","meta","FieldPropKeys","FieldFactory","renderComponent","fieldProps","pick","finalFormFieldProps","omit","fieldConfig","fieldName","fieldLabel","fieldClassName","fieldHint","fieldWidth","inputProps","render","renderComponentProps","input","Form","Field","width","htmlFor","styleCache","getStyle","proportions","denominator","sum","i","CheckboxAdapter","rest","inputValues","Checkbox","checked","onChange","React","memo","date","format","moment","time","colors","white1","white2","grey1","grey2","black1","black2","transparent","themeColors","basicBoxShadow","textLabel","transparentHover","warningBackground","warningBoxShadow","errorText","mutedText","warningText","globalStyles","textInputs","lighten","darken","transparentize","DatePickerAdapter","focused","setFocused","last","useRef","datepickerStyles","inputIconPosition","onFocusChange","noBorder","readOnly","enableOutsideDays","isOutsideRange","numberOfMonths","current","onDateChange","toDate","toISOString","getEnumDropdownOptions","enumMapCache","WeakMap","enumObject","has","get","enumOptions","text","DropdownAdapter","enum","dropdownProps","_options","TextAreaAdapter","TextArea","rows","defaultValueConverter","parseInput","equals","formattedInput","currencyValueConverter","currency","toString","intValue","decimalValueConverter","parsedInput","isFinite","precision","e","p","Math","round","getPrecision","toPrecision","InputAdapter","valueConverter","additionalProps","converter","setValue","Input","onFocus","target","select","onBlur","InputCurrencyAdapter","icon","iconPosition","InputFileUrlAdapter","onDrop","uploading","setUploading","file","setFile","useDropzone","acceptedFiles","assign","preview","URL","createObjectURL","uri","getRootProps","getInputProps","isDragActive","uploader","useMemo","Message","content","thumbs","basic","color","onClick","revokeObjectURL","InputDecimalAdapter","InputMaskedAdapter","RadioGroupAdapter","option","Radio","label","FieldCheckbox","FieldDropdown","FieldInput","FieldInputCurrency","FieldInputDecimal","FieldInputFileUrl","FieldInputMasked","FieldRadioGroup","FieldTextArea","FieldDatePicker","getNestedKeys","object","flattenKeys","obj","isPlainObject","next","merge","FORM_ERROR","mapErrors","errorPath","toPath","camelCase","Alert","as","AccessibleAlert","onSubmit","disabled","disableLoading","autoComplete","finalFormProps","renderFn","_onSubmit","useCallback","form","callback","formRenderProps","handleSubmit","submitErrors","hasSubmitErrors","submitting","loading","NonFieldErrors","nonFieldErrors","fields","getRegisteredFields","errorKeys","difference","length","negative","errorKey","ErrorMessage","useFormState","isString","fullWidthFields","BaseForm","Container","Segment","Section","title","Header","Row","Fields","Dropdown","InputCurrency","InputDecimal","InputFileUrl","InputMasked","RadioGroup","DatePicker","CustomValue","field","Debug","full","output","ChangePassword","onComplete","updatePassword","body","currentPassword","newPassword","confirmNewPassword","primary","NavigationLink","partial","Item","Link","getProps","isCurrent","isPartiallyCurrent","envTag","local","development","stage","NonProductionWarning","faExclamationTriangle","handleError","defaultValue","fn","DEFAULT_VALUE","parse","parseJson","composeEnhancers","thunk","thunkMiddleware","actionCreatorFactory","createAsync","asyncFactory","setUser","setSessionExpired","setContext","getContextById","organization","initializeContext","getAll","pageSize","getMe","currentUser","lastKnownContext","items","getById","context","fetchOrganizations","createStore","initial","sessionExpired","globalStateReducer","reducerWithInitialState","case","async","done","started","failed","failure","rootReducer","combineReducers","global","reduxCreateStore","applyMiddleware","red3","red2","red1","red4","red5","blue1","blue2","blue3","blue4","blue5","black","payStarColors","red","blue","grey","moneyPositive","moneyNegative","useGlobalState","useSelector","useOrganizationContext","useHasAuthorization","permission","strict","isArray","roles","hasPermission","includes","hasRole","defaultTheme","ContextSelector","dispatch","useDispatch","history","useHistory","isAdmin","contextMap","orgFromSelectorGroup","isOpen","setIsOpen","find","toggleOpen","selectedOption","onClose","Subheader","faSort","autoFocus","backspaceRemovesValue","components","DropdownIndicator","IndicatorSeparator","controlShouldRenderValue","hideSelectedOptions","isClearable","menuIsOpen","push","filterOption","filterOptions","placeholder","selectStyles","tabSelectsValue","maxMenuHeight","onKeyDown","keyCode","theme","primary25","control","provided","minWidth","margin","menu","boxShadow","backgroundColor","fontWeight","fontStyle","isFocused","isSelected","paddingLeft","candidate","organizationName","score","ellipsis","dropdownStyles","Menu","menuStyles","Blanket","Svg","height","viewBox","focusable","neutral20","d","fill","fillRule","PrimaryNavigation","Responsive","maxWidth","Fragment","DesktopNavigation","NavLink","to","faTachometer","faFileUser","MobileNavigation","item","trigger","faBars","faBuilding","LocationNotifier","useLocation","pathname","Flex","align","vAlign","Col","Fill","Box","PageTitle","parts","currentPage","breadcrumbs","take","Breadcrumb","crumb","index","link","Divider","BasicPage","forwardRef","ref","fluid","AsyncStateContainer","Loader","inline","active","DeleteButton","onConfirm","loadingText","confirmText","confirmPosition","open","setOpen","Popup","Icon","position","AccountCreate","manual","setManual","useAsync","getAllByOrganization","mappedRateTables","rateCode","confirmCreate","getByRateCode","rateTableByRateCodeResponse","confirm","readingAmount","rateTableOptions","isCreate","AccountUpdate","match","useRouteMatch","fetchAccount","account","useAsyncFn","deleteById","deleteAccountState","deleteAccount","initialValues","FormFields","phone","phoneRegionCode","delimiter","style","marginBottom","toggle","selection","useDebouncedState","delay","useDebouncedCallback","CopyButton","description","buttonProps","copy","faCopy","Tooltip","cache","defaultPageState","initialPage","initialPageSize","pageSizeOptions","usePagination","defaultState","pageNumber","setPageNumber","initialValue","persistKey","persistedValue","newValue","useCachedState","setPageSize","useSmallPagination","useMedia","useMediumPagination","paginationProps","totalPages","totalRows","maxPage","min","pageStart","pageStop","boundaryRange","ellipsisItem","widths","Pagination","activePage","onPageChange","firstItem","lastItem","compact","usePagedDataTable","pagedFetchAction","runtimeConfig","pagination","search","setSearch","showFilters","setShowFilters","defaultSort","sortState","setSortState","cachedResult","filterState","filter","getParams","fetchData","useAsyncRetry","searchParams","searchFieldNames","searchSearchText","sortParams","sorted","column","descending","direction","page","refetchEvent","retry","showLoading","isActive","timeoutExpired","setTimeoutExpired","useDelayedExpiration","normalizedData","DEFAULT_RESULT","faFilter","actionPosition","actions","Dimmer","Dimmable","Table","unstackable","tableProps","columns","columnIndex","sortIcon","sortable","faSortUp","faSortDown","HeaderCell","cellProps","header","Body","itemIndex","rowProps","copyValue","isFunction","Cell","tabIndex","inverted","pageCount","totalItemCount","PagedDataTableConfig","renderViewButton","route","descriptor","aria-label","faFileInvoice","renderEditButton","faPencil","DataList","datumStyles","verticalAlign","collapsing","AccountNoteEditModal","isModalOpen","setIsModalOpen","accountNote","setAccountNote","deleteAccountNote","onSuccessReFetch","Modal","marginLeft","closeOnEscape","closeOnDimmerClick","Content","AccountNoteCreateModal","accountId","faPlus","NotesModal","fetchAccountNotesList","setFetchAccountNotesList","setPageCount","setTotalItemCount","fetchAccountNotes","faStickyNote","closeIcon","scrolling","userName","marginRight","note","noteDate","textAlign","AccountDashboard","createNewMeterReadingUrl","pagedDataTable","getAllByAccountId","TableConfig","fontSize","accountNumber","rateTableName","createdDate","readingDate","unitsUsed","unitType","href","paymentReferenceNumberLink","paymentReferenceNumber","AccountListing","updateAccountAfterImport","setUpdateAccountAfterImport","modalOpen","setModalOpen","handleClose","handleOpen","additionalParams","getAllByOrganizationId","_","display","preventDefault","upload","trim","fontAwesomeIcon","renderButton","faTachometerAlt","hasMeterReadings","organizationSlug","MeterReadingsDashboard","utc","startOf","add","startDate","setStartDate","endOf","endDate","setEndDate","startFocused","setStartFocused","endFocused","setEndFocused","fetchMeterReadings","getExcelReport","bytes","Uint8Array","from","atob","c","charCodeAt","blob","Blob","document","createElement","download","fileName","click","fetchMeterReadingsPdfState","fetchMeterReadingsPdf","paddingRight","faDownload","amountReceived","OrganizationListing","SettingDetails","fetchSetting","save","Enums","SettingListing","DEFAULT_USER","firstName","lastName","emailAddress","claims","mutators","arrayMutators","UserCreate","UserDetails","fetchUser","deleteUserState","deleteUser","clearable","ConfirmButton","tooltip","useProduce","_setState","mutationFn","UserOrganizationListing","setFilterState","TableOrgConfig","ResetPasswordButton","sendPasswordReset","sendResetState","sendReset","faUnlock","MeterReadingCalculatorModal","calculatedAmount","setCalculatedAmount","getRateTableCalculation","cost","onApplySubmit","applyOnCalculate","faCalculator","onOpen","defaultRateTableValue","toFixed","MeterReadingCreate","accountDashboardUrl","amountDue","setAmountDue","setUnitsUsed","setReadingAmount","goBack","MeterReadingDetails","meterReading","setMeterReading","fetchMeterReading","deleteMeterReadingState","deleteMeterReading","isInclusivelyAfterDay","OrganizationCreate","isGlobalAdmin","OrganizationDetails","isAdminOrOrganzation","fetchOrganization","redirectLink","adminBreadcrumbs","deleteOrganizationState","deleteOrganization","formFieldProps","RateTableTierCreate","fetchRateTable","rateTable","RateTableDashboardUrl","RateTableTierDetails","fetchRateTableTier","rateTableTier","startingAmount","deleteRateTableTierState","deleteRateTableTier","unitMeasurement","toLowerCase","hasNoEndingAmount","units","paddingTop","RateTableListing","roundingEnabled","roundUpAt","doNotImport","faBan","manuallyCalculated","faAbacus","RateTableCreate","RateTableUpdate","deleteRateTableState","deleteRateTable","10","100","1000","RateTableTierListing","getRateTableId","fetchRateTableTiers","getAllByRateTable","createNewRateTableTierUrl","fixedCost","RateTableDashboard","minimumAmount","PortalRoutes","exact","PortalApp","store","clearStaleState","onLocationChange","nameInitials","signoutRedirect","Image","src","e3logo","alt","LookupAccount","AdminMenu","faCog","faGlobe","faTable","faUsers","OrganizationContextProvider","SessionExpiredModal","customerStyles","useQuery","URLSearchParams","PaymentSuccessful","query","accountName","paymentAmount","meterReadingLogo","AccountSearch","setAccountNumber","SkipReadingModal","postPaymentToPayStar","freeFormAmount","paymentLogInLink","marginTop","MeterReadingInput","handleMeterReadingSubmission","calculateAmountDue","lastMeterReading","isInclusivelyBeforeDay","withPortal","alwaysAllowPayments","positive","PaymentConfirmModal","paymentMade","defaultAmount","MeterReadingSubmitted","daysSinceLastReading","allowMultiplePayments","handlePayWithPayStarState","handlePayWithPayStar","handleGoBack","deleteByIdForCustomerPortal","forEach","paddingBottom","allowFreeFormPayments","MeterReadingContainer","getByCurrentUser","getByAccountNumberForCustomerPortal","hasAccountErrors","accountError","isPortalReading","isSubmittedThroughPortal","diff","isReadingWithin10Days","MeterReadingWrapper","rel","NoAccountFound","NoRateTable","AccountIssue","CustomerRoutes","CustomerApp","faSignOut","RoleLandingPageResolver","userDefaultUrl","Callback","redirect","Components","ReactDOM","basename","useReducer","useImmerReducer","state_","stateRef","isEqual","useMemoizedValue","addUserLoaded","updatedUser","addUserUnloaded","signinRedirectCallback","signinRedirect","indeterminate","Provider","getElementById","module","exports"],"mappings":"01CAoBaA,EAAI,UAAMC,OAAOC,SAASC,SAAtB,aAAmCF,OAAOC,SAASF,MAGvDI,EAAW,CACtBC,mBAAmBC,EACnBC,UAAWD,OAEXE,KAAMF,4BACNG,YAAaH,6BACbI,WAAYJ,6BAEZN,OACAW,aAbmBL,OAcnBM,QAZkB,UAAMZ,GAAN,OAFCM,QAgBnBO,cAAeP,+BACfQ,kBAAmBR,oCACnBS,UAAWT,kCACXU,gBAAiBV,0C,UCnCOS,EAA8BX,EAA9BW,UAAWC,EAAmBZ,EAAnBY,gBAKrC,GALwDZ,EAAjDC,qBAGkBU,KAAeC,EAEhB,CACtB,IACMC,EAA0B,CADV,cAGtBC,IAAY,CACVC,IAAI,WAAD,OAAaJ,EAAb,sBAAoCC,GACvCI,iBAFU,SAEOC,EAAYC,GAC3B,GAA4B,QAAxBD,EAAWE,UAAsBF,EAAWG,KAAM,CAAC,IAC9CC,EAAOJ,EAAWG,KAAlBC,IACP,GAAIR,EAAwBS,MAAK,SAAAC,GAAK,OAAIA,EAAMC,KAAKH,MACnD,OAAO,KAGX,OAAOJ,GAETQ,aAAc,CAAC,sCACfC,QAAS1B,EAAIK,YACbsB,YAAa3B,EAAII,O,oGCARwB,EAAiC,GAG9C,SAASC,EAAMC,EAAyBC,EAA2BC,GACjE,GAAIJ,EAAeC,MACjB,OAAOD,EAAeC,MACnBI,QAAQH,GACRI,MAAK,SAAAC,GACJJ,EAAQI,EAAIf,SAEbgB,OAAM,SAAAC,GACLL,EAAOK,MAGX,MAAM,IAAIC,EAAM,gDAIpB,SAASC,EAAWC,EAAgBC,EAAqBpB,EAAaqB,GACpE,IAAMZ,EAAuB,eAAQY,EAAR,CAAiBF,SAAQnB,QAKtD,OAJAS,EAA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OAAeC,SAAWE,EAAIQ,QApBpC,gCAuBG8E,GAAIQ,KAAK,kBACTymB,EAAShZ,QAAY1E,IACrBvB,GAAY0hC,eAAe,CACzBl7B,MAAO,CACLzS,SA3BP,0DAAD,KAgCC,CAACu/B,EAAkBrU,EAAUlrB,IAE5ByS,EAAMI,QAEN,aAAC,GAAD,CAAyB3C,UAAW,KAClC,aAACmpB,GAAA,EAAD,CAAQ5H,QAAM,EAACiJ,UAAQ,GACrB,aAACnJ,GAAA,EAAD,CAAQqc,eAAa,MAMxBn7B,EAAM1E,MAAS0E,EAAMI,QAInB,aAACa,GAAYm6B,SAAb,cAAsB76B,MAAOP,GAAW+C,IAHtC,+CwFnGP,KACE,c7E6iBsB,kBAAM,aAAC,KAAD,CAAQa,OAAQkE,O6E7iB5C,MACA,cDNkC,SAAC,GAAD,IAAEpK,EAAF,EAAEA,SAAF,OACtC,aAAC,gBAAD,CAAegc,WAAY2gB,IACzB,aAAC,EAAD,MACC38B,KCGC,KACE,cFlBW,WACjB,OACE,aAAC,KAAD,KACE,aAAC,KAAD,CAAOuB,KAAMf,IACX,aAAC,GAAD,OAEF,aAAC,KAAD,CAAOe,KAAMf,IACX,aAAC,GAAD,OAEF,aAAC,KAAD,CAAOe,KAAMf,IACX,aAAC,GAAD,OAEF,aAAC,KAAD,KACE,aAAC,GAAD,UEKA,SAINowB,SAAS+M,eAAe,U,kBE9B1BC,EAAOC,QAAU,05V,oBCAjBD,EAAOC,QAAU,IAA0B,yD","file":"static/js/main.6c5bfcc3.chunk.js","sourcesContent":["type REACT_APP_ENVIRONMENT = 'local' | 'development' | 'production';\n\nexport type Env = {\n isProductionBuild: boolean;\n publicUrl: string;\n\n name: REACT_APP_ENVIRONMENT;\n buildNumber: string;\n apiBaseUrl?: string;\n host: string;\n subdirectory?: string;\n appRoot: string;\n\n mixPanelToken?: string;\n googleAnalyticsId?: string;\n sentryKey?: string;\n sentryProjectId?: string;\n};\n\nconst subdirectory = process.env.REACT_APP_SUBDIRECTORY;\nexport const host = `${window.location.protocol}//${window.location.host}`;\nexport const appRoot = `${host}${subdirectory}`;\n\nexport const Env: Env = {\n isProductionBuild: process.env.NODE_ENV === 'production',\n publicUrl: process.env.PUBLIC_URL,\n\n name: process.env.REACT_APP_ENVIRONMENT as REACT_APP_ENVIRONMENT,\n buildNumber: process.env.REACT_APP_BUILD_NUMBER || 'local',\n apiBaseUrl: process.env.REACT_APP_API_BASE_URL,\n\n host,\n subdirectory,\n appRoot,\n\n mixPanelToken: process.env.REACT_APP_MIXPANEL_TOKEN,\n googleAnalyticsId: process.env.REACT_APP_GOOGLE_ANALYTICS_ID,\n sentryKey: process.env.REACT_APP_SENTRY_PUBLIC_KEY,\n sentryProjectId: process.env.REACT_APP_SENTRY_PUBLIC_PROJECT_ID,\n};\n","import * as Sentry from '@sentry/browser';\nimport {Env} from '../config/env-vars';\n\nconst {isProductionBuild, sentryKey, sentryProjectId} = Env;\n\nconst shouldEnableSentry =\n isProductionBuild && !!sentryKey && !!sentryProjectId;\n\nif (shouldEnableSentry) {\n const regexMixpanel = /mixpanel/gi;\n const excludedHttpBreadcrumbs = [regexMixpanel];\n\n Sentry.init({\n dsn: `https://${sentryKey}@sentry.io/${sentryProjectId}`,\n beforeBreadcrumb(breadcrumb, hint) {\n if (breadcrumb.category === 'xhr' && breadcrumb.data) {\n const {url} = breadcrumb.data;\n if (excludedHttpBreadcrumbs.some(regex => regex.test(url))) {\n return null;\n }\n }\n return breadcrumb;\n },\n ignoreErrors: ['ResizeObserver loop limit exceeded'], // https://stackoverflow.com/a/50387233 All good man.\n release: Env.buildNumber,\n environment: Env.name,\n });\n}\n","/** Generate by swagger-axios-codegen */\n// tslint:disable\n/* eslint-disable */\nimport axiosStatic, { AxiosInstance } from 'axios';\n\nexport interface IRequestOptions {\n headers?: any;\n baseURL?: string;\n responseType?: string;\n}\n\ninterface IRequestConfig {\n method?: any;\n headers?: any;\n url?: any;\n data?: any;\n params?: any;\n}\n\n// Add options interface\nexport interface ServiceOptions {\n axios?: AxiosInstance;\n}\n\n// Add default options\nexport const serviceOptions: ServiceOptions = {};\n\n// Instance selector\nfunction axios(configs: IRequestConfig, resolve: (p: any) => void, reject: (p: any) => void): Promise {\n if (serviceOptions.axios) {\n return serviceOptions.axios\n .request(configs)\n .then(res => {\n resolve(res.data);\n })\n .catch(err => {\n reject(err);\n });\n } else {\n throw new Error('please inject yourself instance like axios ');\n }\n}\n\nfunction getConfigs(method: string, contentType: string, url: string, options: any): IRequestConfig {\n const configs: IRequestConfig = { ...options, method, url };\n configs.headers = {\n ...options.headers,\n 'Content-Type': contentType\n };\n return configs;\n}\n\nexport class IList extends Array {}\nexport class List extends Array {}\n\nexport interface IListResult {\n items?: T[];\n}\n\nexport class ListResultDto implements IListResult {\n items?: T[];\n}\n\nexport interface IPagedResult extends IListResult {\n totalCount: number;\n}\n\nexport class PagedResultDto implements IPagedResult {\n totalCount!: number;\n}\n\n// customer definition\nexport interface Response {\n data: T | null;\n hasErrors: boolean;\n errors: Error[];\n}\n\nexport interface Error {\n propertyName: string;\n errorMessage: string;\n}\n\nexport interface AdvancedQueryPage {\n items: T[];\n page: number;\n pageSize: number;\n pageCount: number;\n totalItemCount: number;\n}\n\nexport class AccounteNotesService {\n /**\n *\n */\n static getAll(\n params: {\n /** */\n page?: number;\n /** */\n pageSize?: number;\n /** */\n searchFieldNames?: string[];\n /** */\n searchSearchText?: string;\n /** */\n searchExactMatch?: boolean;\n /** */\n filtered?: AdvancedQueryColumnFilter[];\n /** */\n sorted?: AdvancedQueryColumnSort[];\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise>> {\n return new Promise((resolve, reject) => {\n let url = '/api/account-notes';\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n configs.params = {\n Page: params['page'],\n PageSize: params['pageSize'],\n 'Search.FieldNames': params['searchFieldNames'],\n 'Search.SearchText': params['searchSearchText'],\n 'Search.ExactMatch': params['searchExactMatch'],\n Filtered: params['filtered'],\n Sorted: params['sorted']\n };\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static create(\n params: {\n /** */\n body?: CreateAccountNoteRequest;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/account-notes';\n\n const configs: IRequestConfig = getConfigs('post', 'application/json', url, options);\n\n let data = params['body'];\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static getById(\n params: {\n /** */\n id: number;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/account-notes/{id}';\n url = url.replace('{id}', params['id'] + '');\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static update(\n params: {\n /** */\n id: number;\n /** */\n body?: UpdateAccountNoteRequest;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/account-notes/{id}';\n url = url.replace('{id}', params['id'] + '');\n\n const configs: IRequestConfig = getConfigs('put', 'application/json', url, options);\n\n let data = params['body'];\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static deleteById(\n params: {\n /** */\n id: number;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise {\n return new Promise((resolve, reject) => {\n let url = '/api/account-notes/{id}';\n url = url.replace('{id}', params['id'] + '');\n\n const configs: IRequestConfig = getConfigs('delete', 'application/json', url, options);\n\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n}\n\nexport class AccountsService {\n /**\n *\n */\n static getAll(\n params: {\n /** */\n page?: number;\n /** */\n pageSize?: number;\n /** */\n searchFieldNames?: string[];\n /** */\n searchSearchText?: string;\n /** */\n searchExactMatch?: boolean;\n /** */\n filtered?: AdvancedQueryColumnFilter[];\n /** */\n sorted?: AdvancedQueryColumnSort[];\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise>> {\n return new Promise((resolve, reject) => {\n let url = '/api/accounts';\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n configs.params = {\n Page: params['page'],\n PageSize: params['pageSize'],\n 'Search.FieldNames': params['searchFieldNames'],\n 'Search.SearchText': params['searchSearchText'],\n 'Search.ExactMatch': params['searchExactMatch'],\n Filtered: params['filtered'],\n Sorted: params['sorted']\n };\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static create(\n params: {\n /** */\n body?: CreateAccountRequest;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/accounts';\n\n const configs: IRequestConfig = getConfigs('post', 'application/json', url, options);\n\n let data = params['body'];\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static getAllByOrganizationId(\n params: {\n /** */\n organizationId?: number;\n /** */\n page?: number;\n /** */\n pageSize?: number;\n /** */\n searchFieldNames?: string[];\n /** */\n searchSearchText?: string;\n /** */\n searchExactMatch?: boolean;\n /** */\n filtered?: AdvancedQueryColumnFilter[];\n /** */\n sorted?: AdvancedQueryColumnSort[];\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise>> {\n return new Promise((resolve, reject) => {\n let url = '/api/accounts/by-organization';\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n configs.params = {\n OrganizationId: params['organizationId'],\n Page: params['page'],\n PageSize: params['pageSize'],\n 'Search.FieldNames': params['searchFieldNames'],\n 'Search.SearchText': params['searchSearchText'],\n 'Search.ExactMatch': params['searchExactMatch'],\n Filtered: params['filtered'],\n Sorted: params['sorted']\n };\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static getById(\n params: {\n /** */\n id: number;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/accounts/{id}';\n url = url.replace('{id}', params['id'] + '');\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static update(\n params: {\n /** */\n id: number;\n /** */\n body?: UpdateAccountRequest;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/accounts/{id}';\n url = url.replace('{id}', params['id'] + '');\n\n const configs: IRequestConfig = getConfigs('put', 'application/json', url, options);\n\n let data = params['body'];\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static deleteById(\n params: {\n /** */\n id: number;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise {\n return new Promise((resolve, reject) => {\n let url = '/api/accounts/{id}';\n url = url.replace('{id}', params['id'] + '');\n\n const configs: IRequestConfig = getConfigs('delete', 'application/json', url, options);\n\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static getByCurrentUser(options: IRequestOptions = {}): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/by-current-user';\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static getByAccountNumberForCustomerPortal(\n params: {\n /** */\n organizationSlug?: string;\n /** */\n accountNumber?: string;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/by-account-number';\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n configs.params = { OrganizationSlug: params['organizationSlug'], AccountNumber: params['accountNumber'] };\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static upload(\n params: {\n /** */\n organizationId?: number;\n /** */\n rateTableId?: number;\n /** */\n file?: string;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise>> {\n return new Promise((resolve, reject) => {\n let url = '/api/accounts/accounts/upload';\n\n const configs: IRequestConfig = getConfigs('post', 'multipart/form-data', url, options);\n configs.params = { organizationId: params['organizationId'], rateTableId: params['rateTableId'] };\n let data = null as any;\n data = new FormData();\n if (params['file']) {\n data.append('file', params['file'] as any);\n }\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n}\n\nexport class CompileTimeStaticsService {\n /**\n *\n */\n static getAll(options: IRequestOptions = {}): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/compile-time-statics';\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n}\n\nexport class FilesService {\n /**\n *\n */\n static upload(\n params: {\n /** */\n file?: string;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/upload';\n\n const configs: IRequestConfig = getConfigs('post', 'multipart/form-data', url, options);\n\n let data = null as any;\n data = new FormData();\n if (params['file']) {\n data.append('file', params['file'] as any);\n }\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n}\n\nexport class IntegrationsService {\n /**\n *\n */\n static postPaymentToPayStar(\n params: {\n /** */\n body?: PostPaymentToPayStarRequest;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/integrations/paystar-payment';\n\n const configs: IRequestConfig = getConfigs('post', 'application/json', url, options);\n\n let data = params['body'];\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n}\n\nexport class MeterReadingsService {\n /**\n *\n */\n static getAll(\n params: {\n /** */\n page?: number;\n /** */\n pageSize?: number;\n /** */\n searchFieldNames?: string[];\n /** */\n searchSearchText?: string;\n /** */\n searchExactMatch?: boolean;\n /** */\n filtered?: AdvancedQueryColumnFilter[];\n /** */\n sorted?: AdvancedQueryColumnSort[];\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise>> {\n return new Promise((resolve, reject) => {\n let url = '/api/meter-readings';\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n configs.params = {\n Page: params['page'],\n PageSize: params['pageSize'],\n 'Search.FieldNames': params['searchFieldNames'],\n 'Search.SearchText': params['searchSearchText'],\n 'Search.ExactMatch': params['searchExactMatch'],\n Filtered: params['filtered'],\n Sorted: params['sorted']\n };\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static create(\n params: {\n /** */\n body?: CreateMeterReadingRequest;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/meter-readings';\n\n const configs: IRequestConfig = getConfigs('post', 'application/json', url, options);\n\n let data = params['body'];\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static getAllByOrganizationId(\n params: {\n /** */\n organizationId?: number;\n /** */\n startDate?: string;\n /** */\n endDate?: string;\n /** */\n page?: number;\n /** */\n pageSize?: number;\n /** */\n searchFieldNames?: string[];\n /** */\n searchSearchText?: string;\n /** */\n searchExactMatch?: boolean;\n /** */\n filtered?: AdvancedQueryColumnFilter[];\n /** */\n sorted?: AdvancedQueryColumnSort[];\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise>> {\n return new Promise((resolve, reject) => {\n let url = '/api/meter-readings/by-organization';\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n configs.params = {\n OrganizationId: params['organizationId'],\n StartDate: params['startDate'],\n EndDate: params['endDate'],\n Page: params['page'],\n PageSize: params['pageSize'],\n 'Search.FieldNames': params['searchFieldNames'],\n 'Search.SearchText': params['searchSearchText'],\n 'Search.ExactMatch': params['searchExactMatch'],\n Filtered: params['filtered'],\n Sorted: params['sorted']\n };\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static getAllByAccountId(\n params: {\n /** */\n accountId?: number;\n /** */\n page?: number;\n /** */\n pageSize?: number;\n /** */\n searchFieldNames?: string[];\n /** */\n searchSearchText?: string;\n /** */\n searchExactMatch?: boolean;\n /** */\n filtered?: AdvancedQueryColumnFilter[];\n /** */\n sorted?: AdvancedQueryColumnSort[];\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise>> {\n return new Promise((resolve, reject) => {\n let url = '/api/meter-readings/by-account';\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n configs.params = {\n AccountId: params['accountId'],\n Page: params['page'],\n PageSize: params['pageSize'],\n 'Search.FieldNames': params['searchFieldNames'],\n 'Search.SearchText': params['searchSearchText'],\n 'Search.ExactMatch': params['searchExactMatch'],\n Filtered: params['filtered'],\n Sorted: params['sorted']\n };\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static getById(\n params: {\n /** */\n id: number;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/meter-readings/{id}';\n url = url.replace('{id}', params['id'] + '');\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static update(\n params: {\n /** */\n id: number;\n /** */\n body?: UpdateMeterReadingRequest;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/meter-readings/{id}';\n url = url.replace('{id}', params['id'] + '');\n\n const configs: IRequestConfig = getConfigs('put', 'application/json', url, options);\n\n let data = params['body'];\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static deleteById(\n params: {\n /** */\n id: number;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise {\n return new Promise((resolve, reject) => {\n let url = '/api/meter-readings/{id}';\n url = url.replace('{id}', params['id'] + '');\n\n const configs: IRequestConfig = getConfigs('delete', 'application/json', url, options);\n\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static getCostBetweenRecentMeterReadings(\n params: {\n /** */\n accountId?: number;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/meter-readings/cost-between-recent-meter-readings';\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n configs.params = { AccountId: params['accountId'] };\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static getExcelReport(\n params: {\n /** */\n organizationId?: number;\n /** */\n startDate?: string;\n /** */\n endDate?: string;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/meter-readings/excel-report';\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n configs.params = {\n OrganizationId: params['organizationId'],\n StartDate: params['startDate'],\n EndDate: params['endDate']\n };\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static deleteByIdForCustomerPortal(\n params: {\n /** */\n id: number;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise {\n return new Promise((resolve, reject) => {\n let url = '/api/meter-readings/{id}/customer-portal';\n url = url.replace('{id}', params['id'] + '');\n\n const configs: IRequestConfig = getConfigs('delete', 'application/json', url, options);\n\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n}\n\nexport class OrganizationsService {\n /**\n *\n */\n static getAll(\n params: {\n /** */\n page?: number;\n /** */\n pageSize?: number;\n /** */\n searchFieldNames?: string[];\n /** */\n searchSearchText?: string;\n /** */\n searchExactMatch?: boolean;\n /** */\n filtered?: AdvancedQueryColumnFilter[];\n /** */\n sorted?: AdvancedQueryColumnSort[];\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise>> {\n return new Promise((resolve, reject) => {\n let url = '/api/organizations';\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n configs.params = {\n Page: params['page'],\n PageSize: params['pageSize'],\n 'Search.FieldNames': params['searchFieldNames'],\n 'Search.SearchText': params['searchSearchText'],\n 'Search.ExactMatch': params['searchExactMatch'],\n Filtered: params['filtered'],\n Sorted: params['sorted']\n };\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static create(\n params: {\n /** */\n body?: CreateOrganizationRequest;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/organizations';\n\n const configs: IRequestConfig = getConfigs('post', 'application/json', url, options);\n\n let data = params['body'];\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static getById(\n params: {\n /** */\n id: number;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/organizations/{id}';\n url = url.replace('{id}', params['id'] + '');\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static update(\n params: {\n /** */\n id: number;\n /** */\n body?: UpdateOrganizationRequest;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/organizations/{id}';\n url = url.replace('{id}', params['id'] + '');\n\n const configs: IRequestConfig = getConfigs('put', 'application/json', url, options);\n\n let data = params['body'];\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static deleteById(\n params: {\n /** */\n id: number;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise {\n return new Promise((resolve, reject) => {\n let url = '/api/organizations/{id}';\n url = url.replace('{id}', params['id'] + '');\n\n const configs: IRequestConfig = getConfigs('delete', 'application/json', url, options);\n\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static getContextById(\n params: {\n /** */\n id: number;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/organizations/{id}/context';\n url = url.replace('{id}', params['id'] + '');\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n}\n\nexport class PaymentsService {\n /**\n *\n */\n static getAll(\n params: {\n /** */\n accountId?: number;\n /** */\n page?: number;\n /** */\n pageSize?: number;\n /** */\n searchFieldNames?: string[];\n /** */\n searchSearchText?: string;\n /** */\n searchExactMatch?: boolean;\n /** */\n filtered?: AdvancedQueryColumnFilter[];\n /** */\n sorted?: AdvancedQueryColumnSort[];\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise>> {\n return new Promise((resolve, reject) => {\n let url = '/api/payments';\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n configs.params = {\n AccountId: params['accountId'],\n Page: params['page'],\n PageSize: params['pageSize'],\n 'Search.FieldNames': params['searchFieldNames'],\n 'Search.SearchText': params['searchSearchText'],\n 'Search.ExactMatch': params['searchExactMatch'],\n Filtered: params['filtered'],\n Sorted: params['sorted']\n };\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static create(\n params: {\n /** */\n body?: CreatePaymentRequest;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/payments';\n\n const configs: IRequestConfig = getConfigs('post', 'application/json', url, options);\n\n let data = params['body'];\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static getById(\n params: {\n /** */\n id: number;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/payments/{id}';\n url = url.replace('{id}', params['id'] + '');\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static update(\n params: {\n /** */\n id: number;\n /** */\n body?: UpdatePaymentRequest;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/payments/{id}';\n url = url.replace('{id}', params['id'] + '');\n\n const configs: IRequestConfig = getConfigs('put', 'application/json', url, options);\n\n let data = params['body'];\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static deleteById(\n params: {\n /** */\n id: number;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise {\n return new Promise((resolve, reject) => {\n let url = '/api/payments/{id}';\n url = url.replace('{id}', params['id'] + '');\n\n const configs: IRequestConfig = getConfigs('delete', 'application/json', url, options);\n\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n}\n\nexport class RateTablesService {\n /**\n *\n */\n static getAllByOrganization(\n params: {\n /** */\n organizationId?: number;\n /** */\n page?: number;\n /** */\n pageSize?: number;\n /** */\n searchFieldNames?: string[];\n /** */\n searchSearchText?: string;\n /** */\n searchExactMatch?: boolean;\n /** */\n filtered?: AdvancedQueryColumnFilter[];\n /** */\n sorted?: AdvancedQueryColumnSort[];\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise>> {\n return new Promise((resolve, reject) => {\n let url = '/api/rate-tables/by-organization';\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n configs.params = {\n OrganizationId: params['organizationId'],\n Page: params['page'],\n PageSize: params['pageSize'],\n 'Search.FieldNames': params['searchFieldNames'],\n 'Search.SearchText': params['searchSearchText'],\n 'Search.ExactMatch': params['searchExactMatch'],\n Filtered: params['filtered'],\n Sorted: params['sorted']\n };\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static getRateTableCalculation(\n params: {\n /** */\n startMeterReadingAmount?: number;\n /** */\n endMeterReadingAmount?: number;\n /** */\n rateTableId?: number;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/rate-tables/manual-rate-table-calculation';\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n configs.params = {\n startMeterReadingAmount: params['startMeterReadingAmount'],\n endMeterReadingAmount: params['endMeterReadingAmount'],\n rateTableId: params['rateTableId']\n };\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static getById(\n params: {\n /** */\n id: number;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/rate-tables/{id}';\n url = url.replace('{id}', params['id'] + '');\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static update(\n params: {\n /** */\n id: number;\n /** */\n body?: UpdateRateTableRequest;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/rate-tables/{id}';\n url = url.replace('{id}', params['id'] + '');\n\n const configs: IRequestConfig = getConfigs('put', 'application/json', url, options);\n\n let data = params['body'];\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static deleteById(\n params: {\n /** */\n id: number;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise {\n return new Promise((resolve, reject) => {\n let url = '/api/rate-tables/{id}';\n url = url.replace('{id}', params['id'] + '');\n\n const configs: IRequestConfig = getConfigs('delete', 'application/json', url, options);\n\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static getByRateCode(\n params: {\n /** */\n rateCode: string;\n /** */\n organizationId?: number;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/rate-tables/rate-code/{rateCode}';\n url = url.replace('{rateCode}', params['rateCode'] + '');\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n configs.params = { organizationId: params['organizationId'] };\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static create(\n params: {\n /** */\n body?: CreateRateTableRequest;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/rate-tables';\n\n const configs: IRequestConfig = getConfigs('post', 'application/json', url, options);\n\n let data = params['body'];\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n}\n\nexport class RateTableTiersService {\n /**\n *\n */\n static getAll(\n params: {\n /** */\n page?: number;\n /** */\n pageSize?: number;\n /** */\n searchFieldNames?: string[];\n /** */\n searchSearchText?: string;\n /** */\n searchExactMatch?: boolean;\n /** */\n filtered?: AdvancedQueryColumnFilter[];\n /** */\n sorted?: AdvancedQueryColumnSort[];\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise>> {\n return new Promise((resolve, reject) => {\n let url = '/api/rate-table-tiers';\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n configs.params = {\n Page: params['page'],\n PageSize: params['pageSize'],\n 'Search.FieldNames': params['searchFieldNames'],\n 'Search.SearchText': params['searchSearchText'],\n 'Search.ExactMatch': params['searchExactMatch'],\n Filtered: params['filtered'],\n Sorted: params['sorted']\n };\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static create(\n params: {\n /** */\n body?: CreateRateTableTierRequest;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/rate-table-tiers';\n\n const configs: IRequestConfig = getConfigs('post', 'application/json', url, options);\n\n let data = params['body'];\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static getAllByRateTable(\n params: {\n /** */\n rateTableId?: number;\n /** */\n page?: number;\n /** */\n pageSize?: number;\n /** */\n searchFieldNames?: string[];\n /** */\n searchSearchText?: string;\n /** */\n searchExactMatch?: boolean;\n /** */\n filtered?: AdvancedQueryColumnFilter[];\n /** */\n sorted?: AdvancedQueryColumnSort[];\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise>> {\n return new Promise((resolve, reject) => {\n let url = '/api/rate-table-tiers/by-rate-table-id';\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n configs.params = {\n RateTableId: params['rateTableId'],\n Page: params['page'],\n PageSize: params['pageSize'],\n 'Search.FieldNames': params['searchFieldNames'],\n 'Search.SearchText': params['searchSearchText'],\n 'Search.ExactMatch': params['searchExactMatch'],\n Filtered: params['filtered'],\n Sorted: params['sorted']\n };\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static getById(\n params: {\n /** */\n id: number;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/rate-table-tiers/{id}';\n url = url.replace('{id}', params['id'] + '');\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static update(\n params: {\n /** */\n id: number;\n /** */\n body?: UpdateRateTableTierRequest;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/rate-table-tiers/{id}';\n url = url.replace('{id}', params['id'] + '');\n\n const configs: IRequestConfig = getConfigs('put', 'application/json', url, options);\n\n let data = params['body'];\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static deleteById(\n params: {\n /** */\n id: number;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise {\n return new Promise((resolve, reject) => {\n let url = '/api/rate-table-tiers/{id}';\n url = url.replace('{id}', params['id'] + '');\n\n const configs: IRequestConfig = getConfigs('delete', 'application/json', url, options);\n\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n}\n\nexport class SettingsService {\n /**\n *\n */\n static getAll(\n params: {\n /** */\n page?: number;\n /** */\n pageSize?: number;\n /** */\n searchFieldNames?: string[];\n /** */\n searchSearchText?: string;\n /** */\n searchExactMatch?: boolean;\n /** */\n filtered?: AdvancedQueryColumnFilter[];\n /** */\n sorted?: AdvancedQueryColumnSort[];\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise>> {\n return new Promise((resolve, reject) => {\n let url = '/api/settings';\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n configs.params = {\n Page: params['page'],\n PageSize: params['pageSize'],\n 'Search.FieldNames': params['searchFieldNames'],\n 'Search.SearchText': params['searchSearchText'],\n 'Search.ExactMatch': params['searchExactMatch'],\n Filtered: params['filtered'],\n Sorted: params['sorted']\n };\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static getById(\n params: {\n /** */\n id: number;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/settings/{id}';\n url = url.replace('{id}', params['id'] + '');\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static save(\n params: {\n /** */\n id: number;\n /** */\n body?: UpdateSettingRequest;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/settings/{id}';\n url = url.replace('{id}', params['id'] + '');\n\n const configs: IRequestConfig = getConfigs('put', 'application/json', url, options);\n\n let data = params['body'];\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n}\n\nexport class StatusService {\n /**\n *\n */\n static get(options: IRequestOptions = {}): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/status';\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n}\n\nexport class UsersService {\n /**\n *\n */\n static create(\n params: {\n /** */\n body?: CreateUserRequest;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/users';\n\n const configs: IRequestConfig = getConfigs('post', 'application/json', url, options);\n\n let data = params['body'];\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static getAll(\n params: {\n /** */\n page?: number;\n /** */\n pageSize?: number;\n /** */\n searchFieldNames?: string[];\n /** */\n searchSearchText?: string;\n /** */\n searchExactMatch?: boolean;\n /** */\n filtered?: AdvancedQueryColumnFilter[];\n /** */\n sorted?: AdvancedQueryColumnSort[];\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise>> {\n return new Promise((resolve, reject) => {\n let url = '/api/users';\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n configs.params = {\n Page: params['page'],\n PageSize: params['pageSize'],\n 'Search.FieldNames': params['searchFieldNames'],\n 'Search.SearchText': params['searchSearchText'],\n 'Search.ExactMatch': params['searchExactMatch'],\n Filtered: params['filtered'],\n Sorted: params['sorted']\n };\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static deleteById(\n params: {\n /** */\n id: number;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise {\n return new Promise((resolve, reject) => {\n let url = '/api/users/{id}';\n url = url.replace('{id}', params['id'] + '');\n\n const configs: IRequestConfig = getConfigs('delete', 'application/json', url, options);\n\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static getById(\n params: {\n /** */\n id: number;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/users/{id}';\n url = url.replace('{id}', params['id'] + '');\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static update(\n params: {\n /** */\n id: number;\n /** */\n body?: UpdateUserRequest;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/users/{id}';\n url = url.replace('{id}', params['id'] + '');\n\n const configs: IRequestConfig = getConfigs('put', 'application/json', url, options);\n\n let data = params['body'];\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static getAllByOrganization(\n params: {\n /** */\n organizationId?: number;\n /** */\n page?: number;\n /** */\n pageSize?: number;\n /** */\n searchFieldNames?: string[];\n /** */\n searchSearchText?: string;\n /** */\n searchExactMatch?: boolean;\n /** */\n filtered?: AdvancedQueryColumnFilter[];\n /** */\n sorted?: AdvancedQueryColumnSort[];\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise>> {\n return new Promise((resolve, reject) => {\n let url = '/api/users/by-organization';\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n configs.params = {\n OrganizationId: params['organizationId'],\n Page: params['page'],\n PageSize: params['pageSize'],\n 'Search.FieldNames': params['searchFieldNames'],\n 'Search.SearchText': params['searchSearchText'],\n 'Search.ExactMatch': params['searchExactMatch'],\n Filtered: params['filtered'],\n Sorted: params['sorted']\n };\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static getMe(\n params: {\n /** */\n request?: any | null;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/users/me';\n\n const configs: IRequestConfig = getConfigs('get', 'application/json', url, options);\n configs.params = { request: params['request'] };\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static updatePassword(\n params: {\n /** */\n id: number;\n /** */\n body?: UpdateUserPasswordRequest;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise> {\n return new Promise((resolve, reject) => {\n let url = '/api/users/{id}/password-update';\n url = url.replace('{id}', params['id'] + '');\n\n const configs: IRequestConfig = getConfigs('put', 'application/json', url, options);\n\n let data = params['body'];\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n /**\n *\n */\n static sendPasswordReset(\n params: {\n /** */\n id: number;\n } = {} as any,\n options: IRequestOptions = {}\n ): Promise {\n return new Promise((resolve, reject) => {\n let url = '/api/users/{id}/send-reset';\n url = url.replace('{id}', params['id'] + '');\n\n const configs: IRequestConfig = getConfigs('put', 'application/json', url, options);\n\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n}\n\nexport class WebhooksService {\n /**\n *\n */\n static triggerWebhook(options: IRequestOptions = {}): Promise {\n return new Promise((resolve, reject) => {\n let url = '/api/webhooks';\n\n const configs: IRequestConfig = getConfigs('post', 'application/json', url, options);\n\n let data = null as any;\n\n configs.data = data;\n axios(configs, resolve, reject);\n });\n }\n}\n\nexport class AdvancedQueryColumnFilter {\n /** */\n 'fieldName': string;\n\n /** */\n 'fieldValue': string;\n\n /** */\n 'exactMatch': boolean;\n\n constructor(data: undefined | any = {}) {\n this['fieldName'] = data['fieldName'];\n this['fieldValue'] = data['fieldValue'];\n this['exactMatch'] = data['exactMatch'];\n }\n}\n\nexport class AdvancedQueryColumnSort {\n /** */\n 'fieldName': string;\n\n /** */\n 'descending': boolean;\n\n constructor(data: undefined | any = {}) {\n this['fieldName'] = data['fieldName'];\n this['descending'] = data['descending'];\n }\n}\n\nexport class AccountNoteSummaryDto {\n /** */\n 'id': number;\n\n /** */\n 'accountId': number;\n\n /** */\n 'note': string;\n\n /** */\n 'userName': string;\n\n /** */\n 'noteDate': string;\n\n constructor(data: undefined | any = {}) {\n this['id'] = data['id'];\n this['accountId'] = data['accountId'];\n this['note'] = data['note'];\n this['userName'] = data['userName'];\n this['noteDate'] = data['noteDate'];\n }\n}\n\nexport class Error {\n /** */\n 'propertyName': string;\n\n /** */\n 'errorMessage': string;\n\n constructor(data: undefined | any = {}) {\n this['propertyName'] = data['propertyName'];\n this['errorMessage'] = data['errorMessage'];\n }\n}\n\nexport class CreateAccountNoteRequest {\n /** */\n 'organizationId': number;\n\n /** */\n 'accountId': number;\n\n /** */\n 'note': string;\n\n /** */\n 'noteDate': Date;\n\n constructor(data: undefined | any = {}) {\n this['organizationId'] = data['organizationId'];\n this['accountId'] = data['accountId'];\n this['note'] = data['note'];\n this['noteDate'] = data['noteDate'];\n }\n}\n\nexport class AccountDto {\n /** */\n 'rateTableId': number;\n\n /** */\n 'accountNumber': string;\n\n /** */\n 'meterNumber': string;\n\n /** */\n 'name': string;\n\n /** */\n 'email': string;\n\n /** */\n 'phoneNumber': string;\n\n /** */\n 'rateCode': string;\n\n constructor(data: undefined | any = {}) {\n this['rateTableId'] = data['rateTableId'];\n this['accountNumber'] = data['accountNumber'];\n this['meterNumber'] = data['meterNumber'];\n this['name'] = data['name'];\n this['email'] = data['email'];\n this['phoneNumber'] = data['phoneNumber'];\n this['rateCode'] = data['rateCode'];\n }\n}\n\nexport class AccountNoteDetailDto {\n /** */\n 'account': AccountDto;\n\n /** */\n 'id': number;\n\n /** */\n 'accountId': number;\n\n /** */\n 'note': string;\n\n /** */\n 'noteDate': Date;\n\n constructor(data: undefined | any = {}) {\n this['account'] = data['account'];\n this['id'] = data['id'];\n this['accountId'] = data['accountId'];\n this['note'] = data['note'];\n this['noteDate'] = data['noteDate'];\n }\n}\n\nexport class UpdateAccountNoteRequest {\n /** */\n 'accountId': number;\n\n /** */\n 'note': string;\n\n /** */\n 'noteDate': Date;\n\n constructor(data: undefined | any = {}) {\n this['accountId'] = data['accountId'];\n this['note'] = data['note'];\n this['noteDate'] = data['noteDate'];\n }\n}\n\nexport class EmptyResponse {\n /** */\n 'hasErrors': boolean;\n\n /** */\n 'errors': Error[];\n\n constructor(data: undefined | any = {}) {\n this['hasErrors'] = data['hasErrors'];\n this['errors'] = data['errors'];\n }\n}\n\nexport class AccountSummaryDto {\n /** */\n 'id': number;\n\n /** */\n 'meterNumber': string;\n\n /** */\n 'accountNumber': string;\n\n /** */\n 'name': string;\n\n /** */\n 'email': string;\n\n /** */\n 'phoneNumber': string;\n\n /** */\n 'addressLine1': string;\n\n /** */\n 'addressLine2': string;\n\n /** */\n 'city': string;\n\n /** */\n 'state': string;\n\n /** */\n 'zipCode': string;\n\n /** */\n 'organizationSlug': string;\n\n /** */\n 'hasMeterReadings': boolean;\n\n constructor(data: undefined | any = {}) {\n this['id'] = data['id'];\n this['meterNumber'] = data['meterNumber'];\n this['accountNumber'] = data['accountNumber'];\n this['name'] = data['name'];\n this['email'] = data['email'];\n this['phoneNumber'] = data['phoneNumber'];\n this['addressLine1'] = data['addressLine1'];\n this['addressLine2'] = data['addressLine2'];\n this['city'] = data['city'];\n this['state'] = data['state'];\n this['zipCode'] = data['zipCode'];\n this['organizationSlug'] = data['organizationSlug'];\n this['hasMeterReadings'] = data['hasMeterReadings'];\n }\n}\n\nexport class CreateAccountRequest {\n /** */\n 'organizationId': number;\n\n /** */\n 'readingAmount': number;\n\n /** */\n 'rateTableId': number;\n\n /** */\n 'accountNumber': string;\n\n /** */\n 'meterNumber': string;\n\n /** */\n 'name': string;\n\n /** */\n 'email': string;\n\n /** */\n 'phoneNumber': string;\n\n /** */\n 'rateCode': string;\n\n constructor(data: undefined | any = {}) {\n this['organizationId'] = data['organizationId'];\n this['readingAmount'] = data['readingAmount'];\n this['rateTableId'] = data['rateTableId'];\n this['accountNumber'] = data['accountNumber'];\n this['meterNumber'] = data['meterNumber'];\n this['name'] = data['name'];\n this['email'] = data['email'];\n this['phoneNumber'] = data['phoneNumber'];\n this['rateCode'] = data['rateCode'];\n }\n}\n\nexport class AccountDetailDto {\n /** */\n 'rateTableName': string;\n\n /** */\n 'accountNotes': AccountNoteSummaryDto[];\n\n /** */\n 'unitType': string;\n\n /** */\n 'id': number;\n\n /** */\n 'rateTableId': number;\n\n /** */\n 'accountNumber': string;\n\n /** */\n 'meterNumber': string;\n\n /** */\n 'name': string;\n\n /** */\n 'email': string;\n\n /** */\n 'phoneNumber': string;\n\n /** */\n 'rateCode': string;\n\n constructor(data: undefined | any = {}) {\n this['rateTableName'] = data['rateTableName'];\n this['accountNotes'] = data['accountNotes'];\n this['unitType'] = data['unitType'];\n this['id'] = data['id'];\n this['rateTableId'] = data['rateTableId'];\n this['accountNumber'] = data['accountNumber'];\n this['meterNumber'] = data['meterNumber'];\n this['name'] = data['name'];\n this['email'] = data['email'];\n this['phoneNumber'] = data['phoneNumber'];\n this['rateCode'] = data['rateCode'];\n }\n}\n\nexport class UpdateAccountRequest {\n /** */\n 'rateTableId': number;\n\n /** */\n 'accountNumber': string;\n\n /** */\n 'meterNumber': string;\n\n /** */\n 'name': string;\n\n /** */\n 'email': string;\n\n /** */\n 'phoneNumber': string;\n\n /** */\n 'rateCode': string;\n\n constructor(data: undefined | any = {}) {\n this['rateTableId'] = data['rateTableId'];\n this['accountNumber'] = data['accountNumber'];\n this['meterNumber'] = data['meterNumber'];\n this['name'] = data['name'];\n this['email'] = data['email'];\n this['phoneNumber'] = data['phoneNumber'];\n this['rateCode'] = data['rateCode'];\n }\n}\n\nexport class MeterReadingSummaryDto {\n /** */\n 'id': number;\n\n /** */\n 'accountId': number;\n\n /** */\n 'meterNumber': string;\n\n /** */\n 'unitsUsed': string;\n\n /** */\n 'unitType': string;\n\n /** */\n 'accountNumber': string;\n\n /** */\n 'accountName': string;\n\n /** */\n 'createdDate': string;\n\n /** */\n 'readingDate': string;\n\n /** */\n 'paymentReferenceNumber': string;\n\n /** */\n 'paymentReferenceNumberLink': string;\n\n /** */\n 'readingDateForGrouping': string;\n\n /** */\n 'readingAmount': string;\n\n /** */\n 'comments': string;\n\n /** */\n 'amountDue': string;\n\n /** */\n 'amountReceived': string;\n\n /** */\n 'isSubmittedThroughPortal': boolean;\n\n constructor(data: undefined | any = {}) {\n this['id'] = data['id'];\n this['accountId'] = data['accountId'];\n this['meterNumber'] = data['meterNumber'];\n this['unitsUsed'] = data['unitsUsed'];\n this['unitType'] = data['unitType'];\n this['accountNumber'] = data['accountNumber'];\n this['accountName'] = data['accountName'];\n this['createdDate'] = data['createdDate'];\n this['readingDate'] = data['readingDate'];\n this['paymentReferenceNumber'] = data['paymentReferenceNumber'];\n this['paymentReferenceNumberLink'] = data['paymentReferenceNumberLink'];\n this['readingDateForGrouping'] = data['readingDateForGrouping'];\n this['readingAmount'] = data['readingAmount'];\n this['comments'] = data['comments'];\n this['amountDue'] = data['amountDue'];\n this['amountReceived'] = data['amountReceived'];\n this['isSubmittedThroughPortal'] = data['isSubmittedThroughPortal'];\n }\n}\n\nexport class AccountForCustomer {\n /** */\n 'id': string;\n\n /** */\n 'accountNumber': string;\n\n /** */\n 'name': string;\n\n /** */\n 'email': string;\n\n /** */\n 'phoneNumber': string;\n\n /** */\n 'rateCode': string;\n\n /** */\n 'organizationName': string;\n\n /** */\n 'alwaysAllowPayments': boolean;\n\n /** */\n 'allowFreeFormPayments': boolean;\n\n /** */\n 'allowMultiplePayments': boolean;\n\n /** */\n 'rateTableId': string;\n\n /** */\n 'lastMeterReading': MeterReadingSummaryDto;\n\n constructor(data: undefined | any = {}) {\n this['id'] = data['id'];\n this['accountNumber'] = data['accountNumber'];\n this['name'] = data['name'];\n this['email'] = data['email'];\n this['phoneNumber'] = data['phoneNumber'];\n this['rateCode'] = data['rateCode'];\n this['organizationName'] = data['organizationName'];\n this['alwaysAllowPayments'] = data['alwaysAllowPayments'];\n this['allowFreeFormPayments'] = data['allowFreeFormPayments'];\n this['allowMultiplePayments'] = data['allowMultiplePayments'];\n this['rateTableId'] = data['rateTableId'];\n this['lastMeterReading'] = data['lastMeterReading'];\n }\n}\n\nexport class UploadFileResponse {\n /** */\n 'uri': string;\n\n constructor(data: undefined | any = {}) {\n this['uri'] = data['uri'];\n }\n}\n\nexport class PostPaymentToPayStarRequest {\n /** */\n 'accountId': number;\n\n /** */\n 'freeFormAmount': number;\n\n constructor(data: undefined | any = {}) {\n this['accountId'] = data['accountId'];\n this['freeFormAmount'] = data['freeFormAmount'];\n }\n}\n\nexport class ClientPaymentSessionResponse {\n /** */\n 'paymentSessionIdentifier': string;\n\n /** */\n 'paymentLogInLink': string;\n\n constructor(data: undefined | any = {}) {\n this['paymentSessionIdentifier'] = data['paymentSessionIdentifier'];\n this['paymentLogInLink'] = data['paymentLogInLink'];\n }\n}\n\nexport class Currency {\n /** */\n 'value': number;\n\n /** */\n 'code': string;\n\n constructor(data: undefined | any = {}) {\n this['value'] = data['value'];\n this['code'] = data['code'];\n }\n}\n\nexport class CreateMeterReadingRequest {\n /** */\n 'calculateAmountDue': boolean;\n\n /** */\n 'accountId': number;\n\n /** */\n 'readingDate': Date;\n\n /** */\n 'readingAmount': number;\n\n /** */\n 'unitsUsed': number;\n\n /** */\n 'isSubmittedThroughPortal': boolean;\n\n /** */\n 'paymentReferenceNumber': string;\n\n /** */\n 'comments': string;\n\n /** */\n 'amountDue': Currency;\n\n /** */\n 'amountReceived': Currency;\n\n constructor(data: undefined | any = {}) {\n this['calculateAmountDue'] = data['calculateAmountDue'];\n this['accountId'] = data['accountId'];\n this['readingDate'] = data['readingDate'];\n this['readingAmount'] = data['readingAmount'];\n this['unitsUsed'] = data['unitsUsed'];\n this['isSubmittedThroughPortal'] = data['isSubmittedThroughPortal'];\n this['paymentReferenceNumber'] = data['paymentReferenceNumber'];\n this['comments'] = data['comments'];\n this['amountDue'] = data['amountDue'];\n this['amountReceived'] = data['amountReceived'];\n }\n}\n\nexport class MeterReadingDetailDto {\n /** */\n 'accountNumber': string;\n\n /** */\n 'unitType': string;\n\n /** */\n 'id': number;\n\n /** */\n 'accountId': number;\n\n /** */\n 'readingDate': Date;\n\n /** */\n 'readingAmount': number;\n\n /** */\n 'unitsUsed': number;\n\n /** */\n 'isSubmittedThroughPortal': boolean;\n\n /** */\n 'paymentReferenceNumber': string;\n\n /** */\n 'comments': string;\n\n /** */\n 'amountDue': Currency;\n\n /** */\n 'amountReceived': Currency;\n\n constructor(data: undefined | any = {}) {\n this['accountNumber'] = data['accountNumber'];\n this['unitType'] = data['unitType'];\n this['id'] = data['id'];\n this['accountId'] = data['accountId'];\n this['readingDate'] = data['readingDate'];\n this['readingAmount'] = data['readingAmount'];\n this['unitsUsed'] = data['unitsUsed'];\n this['isSubmittedThroughPortal'] = data['isSubmittedThroughPortal'];\n this['paymentReferenceNumber'] = data['paymentReferenceNumber'];\n this['comments'] = data['comments'];\n this['amountDue'] = data['amountDue'];\n this['amountReceived'] = data['amountReceived'];\n }\n}\n\nexport class UpdateMeterReadingRequest {\n /** */\n 'calculateAmountDue': boolean;\n\n /** */\n 'accountId': number;\n\n /** */\n 'readingDate': Date;\n\n /** */\n 'readingAmount': number;\n\n /** */\n 'unitsUsed': number;\n\n /** */\n 'isSubmittedThroughPortal': boolean;\n\n /** */\n 'paymentReferenceNumber': string;\n\n /** */\n 'comments': string;\n\n /** */\n 'amountDue': Currency;\n\n /** */\n 'amountReceived': Currency;\n\n constructor(data: undefined | any = {}) {\n this['calculateAmountDue'] = data['calculateAmountDue'];\n this['accountId'] = data['accountId'];\n this['readingDate'] = data['readingDate'];\n this['readingAmount'] = data['readingAmount'];\n this['unitsUsed'] = data['unitsUsed'];\n this['isSubmittedThroughPortal'] = data['isSubmittedThroughPortal'];\n this['paymentReferenceNumber'] = data['paymentReferenceNumber'];\n this['comments'] = data['comments'];\n this['amountDue'] = data['amountDue'];\n this['amountReceived'] = data['amountReceived'];\n }\n}\n\nexport class RateTableCalculationResponse {\n /** */\n 'cost': Currency;\n\n /** */\n 'unitsUsed': number;\n\n /** */\n 'unitMeasurement': string;\n\n constructor(data: undefined | any = {}) {\n this['cost'] = data['cost'];\n this['unitsUsed'] = data['unitsUsed'];\n this['unitMeasurement'] = data['unitMeasurement'];\n }\n}\n\nexport class MeterReadingsReportResponse {\n /** */\n 'fileName': string;\n\n /** */\n 'data': string;\n\n constructor(data: undefined | any = {}) {\n this['fileName'] = data['fileName'];\n this['data'] = data['data'];\n }\n}\n\nexport class OrganizationSummaryDto {\n /** */\n 'id': number;\n\n /** */\n 'name': string;\n\n /** */\n 'addressLine1': string;\n\n /** */\n 'addressLine2': string;\n\n /** */\n 'city': string;\n\n /** */\n 'state': string;\n\n /** */\n 'zipCode': string;\n\n constructor(data: undefined | any = {}) {\n this['id'] = data['id'];\n this['name'] = data['name'];\n this['addressLine1'] = data['addressLine1'];\n this['addressLine2'] = data['addressLine2'];\n this['city'] = data['city'];\n this['state'] = data['state'];\n this['zipCode'] = data['zipCode'];\n }\n}\n\nexport class CreateOrganizationRequest {\n /** */\n 'name': string;\n\n /** */\n 'slug': string;\n\n /** */\n 'addressLine1': string;\n\n /** */\n 'addressLine2': string;\n\n /** */\n 'city': string;\n\n /** */\n 'state': string;\n\n /** */\n 'zipCode': string;\n\n /** */\n 'billingDay': number;\n\n /** */\n 'meterReadingInstructionsLink': string;\n\n /** */\n 'rateTableInstructionsLink': string;\n\n /** */\n 'billingSystemDigitCountAdjustment': number;\n\n /** */\n 'alwaysAllowPayments': boolean;\n\n /** */\n 'allowFreeFormPayments': boolean;\n\n /** */\n 'allowMultiplePayments': boolean;\n\n constructor(data: undefined | any = {}) {\n this['name'] = data['name'];\n this['slug'] = data['slug'];\n this['addressLine1'] = data['addressLine1'];\n this['addressLine2'] = data['addressLine2'];\n this['city'] = data['city'];\n this['state'] = data['state'];\n this['zipCode'] = data['zipCode'];\n this['billingDay'] = data['billingDay'];\n this['meterReadingInstructionsLink'] = data['meterReadingInstructionsLink'];\n this['rateTableInstructionsLink'] = data['rateTableInstructionsLink'];\n this['billingSystemDigitCountAdjustment'] = data['billingSystemDigitCountAdjustment'];\n this['alwaysAllowPayments'] = data['alwaysAllowPayments'];\n this['allowFreeFormPayments'] = data['allowFreeFormPayments'];\n this['allowMultiplePayments'] = data['allowMultiplePayments'];\n }\n}\n\nexport class OrganizationDetailDto {\n /** */\n 'id': number;\n\n /** */\n 'name': string;\n\n /** */\n 'slug': string;\n\n /** */\n 'addressLine1': string;\n\n /** */\n 'addressLine2': string;\n\n /** */\n 'city': string;\n\n /** */\n 'state': string;\n\n /** */\n 'zipCode': string;\n\n /** */\n 'billingDay': number;\n\n /** */\n 'meterReadingInstructionsLink': string;\n\n /** */\n 'rateTableInstructionsLink': string;\n\n /** */\n 'billingSystemDigitCountAdjustment': number;\n\n /** */\n 'alwaysAllowPayments': boolean;\n\n /** */\n 'allowFreeFormPayments': boolean;\n\n /** */\n 'allowMultiplePayments': boolean;\n\n constructor(data: undefined | any = {}) {\n this['id'] = data['id'];\n this['name'] = data['name'];\n this['slug'] = data['slug'];\n this['addressLine1'] = data['addressLine1'];\n this['addressLine2'] = data['addressLine2'];\n this['city'] = data['city'];\n this['state'] = data['state'];\n this['zipCode'] = data['zipCode'];\n this['billingDay'] = data['billingDay'];\n this['meterReadingInstructionsLink'] = data['meterReadingInstructionsLink'];\n this['rateTableInstructionsLink'] = data['rateTableInstructionsLink'];\n this['billingSystemDigitCountAdjustment'] = data['billingSystemDigitCountAdjustment'];\n this['alwaysAllowPayments'] = data['alwaysAllowPayments'];\n this['allowFreeFormPayments'] = data['allowFreeFormPayments'];\n this['allowMultiplePayments'] = data['allowMultiplePayments'];\n }\n}\n\nexport class UpdateOrganizationRequest {\n /** */\n 'name': string;\n\n /** */\n 'slug': string;\n\n /** */\n 'addressLine1': string;\n\n /** */\n 'addressLine2': string;\n\n /** */\n 'city': string;\n\n /** */\n 'state': string;\n\n /** */\n 'zipCode': string;\n\n /** */\n 'billingDay': number;\n\n /** */\n 'meterReadingInstructionsLink': string;\n\n /** */\n 'rateTableInstructionsLink': string;\n\n /** */\n 'billingSystemDigitCountAdjustment': number;\n\n /** */\n 'alwaysAllowPayments': boolean;\n\n /** */\n 'allowFreeFormPayments': boolean;\n\n /** */\n 'allowMultiplePayments': boolean;\n\n constructor(data: undefined | any = {}) {\n this['name'] = data['name'];\n this['slug'] = data['slug'];\n this['addressLine1'] = data['addressLine1'];\n this['addressLine2'] = data['addressLine2'];\n this['city'] = data['city'];\n this['state'] = data['state'];\n this['zipCode'] = data['zipCode'];\n this['billingDay'] = data['billingDay'];\n this['meterReadingInstructionsLink'] = data['meterReadingInstructionsLink'];\n this['rateTableInstructionsLink'] = data['rateTableInstructionsLink'];\n this['billingSystemDigitCountAdjustment'] = data['billingSystemDigitCountAdjustment'];\n this['alwaysAllowPayments'] = data['alwaysAllowPayments'];\n this['allowFreeFormPayments'] = data['allowFreeFormPayments'];\n this['allowMultiplePayments'] = data['allowMultiplePayments'];\n }\n}\n\nexport class OrganizationContextDto {\n /** */\n 'id': number;\n\n /** */\n 'name': string;\n\n /** */\n 'addressLine1': string;\n\n /** */\n 'addressLine2': string;\n\n /** */\n 'city': string;\n\n /** */\n 'state': string;\n\n /** */\n 'zipCode': string;\n\n constructor(data: undefined | any = {}) {\n this['id'] = data['id'];\n this['name'] = data['name'];\n this['addressLine1'] = data['addressLine1'];\n this['addressLine2'] = data['addressLine2'];\n this['city'] = data['city'];\n this['state'] = data['state'];\n this['zipCode'] = data['zipCode'];\n }\n}\n\nexport class PaymentSummaryDto {\n constructor(data: undefined | any = {}) {}\n}\n\nexport class CreatePaymentRequest {\n /** */\n 'accountId': number;\n\n /** */\n 'paymentAmount': Currency;\n\n constructor(data: undefined | any = {}) {\n this['accountId'] = data['accountId'];\n this['paymentAmount'] = data['paymentAmount'];\n }\n}\n\nexport class PaymentDetailDto {\n /** */\n 'id': number;\n\n /** */\n 'accountId': number;\n\n /** */\n 'paymentAmount': Currency;\n\n constructor(data: undefined | any = {}) {\n this['id'] = data['id'];\n this['accountId'] = data['accountId'];\n this['paymentAmount'] = data['paymentAmount'];\n }\n}\n\nexport class UpdatePaymentRequest {\n /** */\n 'paymentAmount': Currency;\n\n constructor(data: undefined | any = {}) {\n this['paymentAmount'] = data['paymentAmount'];\n }\n}\n\nexport class RateTableSummaryDto {\n /** */\n 'id': number;\n\n /** */\n 'units': string;\n\n /** */\n 'name': string;\n\n /** */\n 'unitMeasurement': string;\n\n /** */\n 'minimumAmount': string;\n\n /** */\n 'rateCode': string;\n\n /** */\n 'doNotImport': boolean;\n\n /** */\n 'manuallyCalculated': boolean;\n\n /** */\n 'roundingEnabled': boolean;\n\n /** */\n 'roundUpAt': number;\n\n constructor(data: undefined | any = {}) {\n this['id'] = data['id'];\n this['units'] = data['units'];\n this['name'] = data['name'];\n this['unitMeasurement'] = data['unitMeasurement'];\n this['minimumAmount'] = data['minimumAmount'];\n this['rateCode'] = data['rateCode'];\n this['doNotImport'] = data['doNotImport'];\n this['manuallyCalculated'] = data['manuallyCalculated'];\n this['roundingEnabled'] = data['roundingEnabled'];\n this['roundUpAt'] = data['roundUpAt'];\n }\n}\n\nexport class ManualRateTableCalculationResponse {\n /** */\n 'cost': Currency;\n\n constructor(data: undefined | any = {}) {\n this['cost'] = data['cost'];\n }\n}\n\nexport class RateTableDetailDto {\n /** */\n 'id': number;\n\n /** */\n 'organizationId': number;\n\n /** */\n 'name': string;\n\n /** */\n 'unitMeasurement': string;\n\n /** */\n 'minimumAmount': Currency;\n\n /** */\n 'units': number;\n\n /** */\n 'rateCode': string;\n\n /** */\n 'roundingEnabled': boolean;\n\n /** */\n 'roundUpAt': number;\n\n /** */\n 'doNotImport': boolean;\n\n /** */\n 'manuallyCalculated': boolean;\n\n constructor(data: undefined | any = {}) {\n this['id'] = data['id'];\n this['organizationId'] = data['organizationId'];\n this['name'] = data['name'];\n this['unitMeasurement'] = data['unitMeasurement'];\n this['minimumAmount'] = data['minimumAmount'];\n this['units'] = data['units'];\n this['rateCode'] = data['rateCode'];\n this['roundingEnabled'] = data['roundingEnabled'];\n this['roundUpAt'] = data['roundUpAt'];\n this['doNotImport'] = data['doNotImport'];\n this['manuallyCalculated'] = data['manuallyCalculated'];\n }\n}\n\nexport class UpdateRateTableRequest {\n /** */\n 'name': string;\n\n /** */\n 'unitMeasurement': string;\n\n /** */\n 'minimumAmount': Currency;\n\n /** */\n 'units': number;\n\n /** */\n 'rateCode': string;\n\n /** */\n 'roundingEnabled': boolean;\n\n /** */\n 'roundUpAt': number;\n\n /** */\n 'doNotImport': boolean;\n\n /** */\n 'manuallyCalculated': boolean;\n\n constructor(data: undefined | any = {}) {\n this['name'] = data['name'];\n this['unitMeasurement'] = data['unitMeasurement'];\n this['minimumAmount'] = data['minimumAmount'];\n this['units'] = data['units'];\n this['rateCode'] = data['rateCode'];\n this['roundingEnabled'] = data['roundingEnabled'];\n this['roundUpAt'] = data['roundUpAt'];\n this['doNotImport'] = data['doNotImport'];\n this['manuallyCalculated'] = data['manuallyCalculated'];\n }\n}\n\nexport class CreateRateTableRequest {\n /** */\n 'organizationId': number;\n\n /** */\n 'name': string;\n\n /** */\n 'unitMeasurement': string;\n\n /** */\n 'minimumAmount': Currency;\n\n /** */\n 'units': number;\n\n /** */\n 'rateCode': string;\n\n /** */\n 'roundingEnabled': boolean;\n\n /** */\n 'roundUpAt': number;\n\n /** */\n 'doNotImport': boolean;\n\n /** */\n 'manuallyCalculated': boolean;\n\n constructor(data: undefined | any = {}) {\n this['organizationId'] = data['organizationId'];\n this['name'] = data['name'];\n this['unitMeasurement'] = data['unitMeasurement'];\n this['minimumAmount'] = data['minimumAmount'];\n this['units'] = data['units'];\n this['rateCode'] = data['rateCode'];\n this['roundingEnabled'] = data['roundingEnabled'];\n this['roundUpAt'] = data['roundUpAt'];\n this['doNotImport'] = data['doNotImport'];\n this['manuallyCalculated'] = data['manuallyCalculated'];\n }\n}\n\nexport class RateTableTierSummaryDto {\n /** */\n 'id': number;\n\n /** */\n 'rateTableId': number;\n\n /** */\n 'startingAmountForSorting': string;\n\n /** */\n 'startingAmount': string;\n\n /** */\n 'endingAmount': string;\n\n /** */\n 'costPerUnit': string;\n\n /** */\n 'fixedCost': string;\n\n constructor(data: undefined | any = {}) {\n this['id'] = data['id'];\n this['rateTableId'] = data['rateTableId'];\n this['startingAmountForSorting'] = data['startingAmountForSorting'];\n this['startingAmount'] = data['startingAmount'];\n this['endingAmount'] = data['endingAmount'];\n this['costPerUnit'] = data['costPerUnit'];\n this['fixedCost'] = data['fixedCost'];\n }\n}\n\nexport class CreateRateTableTierRequest {\n /** */\n 'rateTableId': number;\n\n /** */\n 'startingAmount': number;\n\n /** */\n 'endingAmount': number;\n\n /** */\n 'hasNoEndingAmount': boolean;\n\n /** */\n 'costPerUnit': Currency;\n\n /** */\n 'fixedCost': Currency;\n\n constructor(data: undefined | any = {}) {\n this['rateTableId'] = data['rateTableId'];\n this['startingAmount'] = data['startingAmount'];\n this['endingAmount'] = data['endingAmount'];\n this['hasNoEndingAmount'] = data['hasNoEndingAmount'];\n this['costPerUnit'] = data['costPerUnit'];\n this['fixedCost'] = data['fixedCost'];\n }\n}\n\nexport class RateTableTierDetailDto {\n /** */\n 'id': number;\n\n /** */\n 'startingAmountForSorting': string;\n\n /** */\n 'rateTableId': number;\n\n /** */\n 'startingAmount': number;\n\n /** */\n 'endingAmount': number;\n\n /** */\n 'hasNoEndingAmount': boolean;\n\n /** */\n 'costPerUnit': Currency;\n\n /** */\n 'fixedCost': Currency;\n\n constructor(data: undefined | any = {}) {\n this['id'] = data['id'];\n this['startingAmountForSorting'] = data['startingAmountForSorting'];\n this['rateTableId'] = data['rateTableId'];\n this['startingAmount'] = data['startingAmount'];\n this['endingAmount'] = data['endingAmount'];\n this['hasNoEndingAmount'] = data['hasNoEndingAmount'];\n this['costPerUnit'] = data['costPerUnit'];\n this['fixedCost'] = data['fixedCost'];\n }\n}\n\nexport class UpdateRateTableTierRequest {\n /** */\n 'startingAmount': number;\n\n /** */\n 'endingAmount': number;\n\n /** */\n 'hasNoEndingAmount': boolean;\n\n /** */\n 'costPerUnit': Currency;\n\n /** */\n 'fixedCost': Currency;\n\n constructor(data: undefined | any = {}) {\n this['startingAmount'] = data['startingAmount'];\n this['endingAmount'] = data['endingAmount'];\n this['hasNoEndingAmount'] = data['hasNoEndingAmount'];\n this['costPerUnit'] = data['costPerUnit'];\n this['fixedCost'] = data['fixedCost'];\n }\n}\n\nexport class SettingSummaryDto {\n /** */\n 'id': number;\n\n /** */\n 'key': string;\n\n /** */\n 'type': string;\n\n /** */\n 'enum': string;\n\n /** */\n 'value': string;\n\n constructor(data: undefined | any = {}) {\n this['id'] = data['id'];\n this['key'] = data['key'];\n this['type'] = data['type'];\n this['enum'] = data['enum'];\n this['value'] = data['value'];\n }\n}\n\nexport class UpdateSettingRequest {\n /** */\n 'value': string;\n\n constructor(data: undefined | any = {}) {\n this['value'] = data['value'];\n }\n}\n\nexport class CreateUserRequest {\n /** */\n 'claims': string[];\n\n /** */\n 'organizationId': number;\n\n /** */\n 'accountId': number;\n\n /** */\n 'emailAddress': string;\n\n /** */\n 'firstName': string;\n\n /** */\n 'lastName': string;\n\n /** */\n 'role': string;\n\n constructor(data: undefined | any = {}) {\n this['claims'] = data['claims'];\n this['organizationId'] = data['organizationId'];\n this['accountId'] = data['accountId'];\n this['emailAddress'] = data['emailAddress'];\n this['firstName'] = data['firstName'];\n this['lastName'] = data['lastName'];\n this['role'] = data['role'];\n }\n}\n\nexport class UserGetDto {\n /** */\n 'id': number;\n\n /** */\n 'organizationId': number;\n\n /** */\n 'accountId': number;\n\n /** */\n 'emailAddress': string;\n\n /** */\n 'firstName': string;\n\n /** */\n 'lastName': string;\n\n /** */\n 'role': string;\n\n constructor(data: undefined | any = {}) {\n this['id'] = data['id'];\n this['organizationId'] = data['organizationId'];\n this['accountId'] = data['accountId'];\n this['emailAddress'] = data['emailAddress'];\n this['firstName'] = data['firstName'];\n this['lastName'] = data['lastName'];\n this['role'] = data['role'];\n }\n}\n\nexport class UserSummaryDto {\n /** */\n 'id': number;\n\n /** */\n 'emailAddress': string;\n\n /** */\n 'firstName': string;\n\n /** */\n 'lastName': string;\n\n /** */\n 'role': string;\n\n constructor(data: undefined | any = {}) {\n this['id'] = data['id'];\n this['emailAddress'] = data['emailAddress'];\n this['firstName'] = data['firstName'];\n this['lastName'] = data['lastName'];\n this['role'] = data['role'];\n }\n}\n\nexport class UserDetailDto {\n /** */\n 'claims': string[];\n\n /** */\n 'id': number;\n\n /** */\n 'organizationId': number;\n\n /** */\n 'accountId': number;\n\n /** */\n 'emailAddress': string;\n\n /** */\n 'firstName': string;\n\n /** */\n 'lastName': string;\n\n /** */\n 'role': string;\n\n constructor(data: undefined | any = {}) {\n this['claims'] = data['claims'];\n this['id'] = data['id'];\n this['organizationId'] = data['organizationId'];\n this['accountId'] = data['accountId'];\n this['emailAddress'] = data['emailAddress'];\n this['firstName'] = data['firstName'];\n this['lastName'] = data['lastName'];\n this['role'] = data['role'];\n }\n}\n\nexport class UpdateUserRequest {\n /** */\n 'claims': string[];\n\n /** */\n 'organizationId': number;\n\n /** */\n 'accountId': number;\n\n /** */\n 'emailAddress': string;\n\n /** */\n 'firstName': string;\n\n /** */\n 'lastName': string;\n\n /** */\n 'role': string;\n\n constructor(data: undefined | any = {}) {\n this['claims'] = data['claims'];\n this['organizationId'] = data['organizationId'];\n this['accountId'] = data['accountId'];\n this['emailAddress'] = data['emailAddress'];\n this['firstName'] = data['firstName'];\n this['lastName'] = data['lastName'];\n this['role'] = data['role'];\n }\n}\n\nexport class GetCurrentUserRequest {\n constructor(data: undefined | any = {}) {}\n}\n\nexport class UpdateUserPasswordRequest {\n /** */\n 'confirmNewPassword': string;\n\n /** */\n 'currentPassword': string;\n\n /** */\n 'newPassword': string;\n\n constructor(data: undefined | any = {}) {\n this['confirmNewPassword'] = data['confirmNewPassword'];\n this['currentPassword'] = data['currentPassword'];\n this['newPassword'] = data['newPassword'];\n }\n}\n","import {Env} from '../config/env-vars';\n\ntype LogFunction = (message: string, ...optionalParams: any[]) => void;\n\ntype Logger = {\n debug: LogFunction;\n info: LogFunction;\n warn: LogFunction;\n error: LogFunction;\n};\n\ntype levels = 'debug' | 'info' | 'warn' | 'error';\n\nif (!Env.isProductionBuild) {\n try {\n localStorage.setItem('debug', 'true');\n } catch (error) {}\n}\n\nconst logEnabled = localStorage.getItem('debug');\n\nconst createLogger = (namespace, subject, level: levels) => {\n return (message: string, ...optionalParams: any[]) => {\n // eslint-disable-next-line no-restricted-syntax\n const log = console[level] || console.log;\n\n if (!logEnabled) return;\n\n log.call(\n console,\n `${namespace}:${subject}:${level} => ${message}`,\n ...optionalParams\n );\n };\n};\n\nconst DEFAULT_NAMESPACE = 'Elevator3.MeterReadingSystem';\n\nexport const logger: (namespace, config?) => Logger = (\n subject,\n config = {\n namespace: DEFAULT_NAMESPACE,\n }\n) => {\n const namespace = config.namespace || DEFAULT_NAMESPACE;\n return {\n debug: createLogger(namespace, subject, 'debug'),\n info: createLogger(namespace, subject, 'info'),\n warn: createLogger(namespace, subject, 'warn'),\n error: createLogger(namespace, subject, 'error'),\n };\n};\n\nconst developmentLogger = logger('development');\n\nexport {developmentLogger as debug};\n","import {useEffect} from 'react';\nimport {useNotification} from '../hooks/use-notifications';\n\ntype NotificationService = ReturnType;\n\nexport let notifications: NotificationService;\n\nexport const NotificationService = () => {\n const _notifications = useNotification();\n useEffect(() => {\n notifications = _notifications;\n }, [_notifications]);\n return null;\n};\n","import {useToasts} from 'react-toast-notifications';\n\ntype MessageTypes = 'success' | 'error' | 'info' | 'warning';\n\ntype Options = {\n autoDismiss: boolean; //\tDefault: false\n autoDismissTimeout: number;\n onDismiss: (id: string) => void;\n pauseOnHover: boolean;\n onShow: (id: string) => void;\n};\n\nconst defaultOptions = {\n autoDismiss: true,\n autoDismissTimeout: 3000,\n pauseOnHover: true,\n};\n\nexport function useNotification() {\n const {addToast} = useToasts();\n\n const createMessageType = (type: MessageTypes) => (\n message: string,\n options?: Options\n ) => {\n addToast(message, {\n appearance: type,\n ...defaultOptions,\n ...(options || {}),\n });\n };\n\n return {\n success: createMessageType('success'),\n error: createMessageType('error'),\n info: createMessageType('info'),\n warning: createMessageType('warning'),\n };\n}\n","// Enums\n\nexport type ClientIds = keyof typeof ClientIds;\nexport const ClientIds = {web: 'web'} as const;\n\nexport type CustomClaims = keyof typeof CustomClaims;\nexport const CustomClaims = {permissions: 'permissions', role: 'role'} as const;\n\nexport type CustomSessionClaims = keyof typeof CustomSessionClaims;\nexport const CustomSessionClaims = {\n organization_id: 'organization_id',\n organization_slug: 'organization_slug',\n} as const;\n\nexport type AuthenticationQueryKeys = keyof typeof AuthenticationQueryKeys;\nexport const AuthenticationQueryKeys = {\n OrganizationSlug: 'OrganizationSlug',\n} as const;\n\nexport type CurrencyCodes = keyof typeof CurrencyCodes;\nexport const CurrencyCodes = {USD: 'USD'} as const;\n\nexport type UnitTypes = keyof typeof UnitTypes;\nexport const UnitTypes = {\n 'Cubic Feet': 'Cubic Feet',\n Gallons: 'Gallons',\n} as const;\n\nexport type Timezones = keyof typeof Timezones;\nexport const Timezones = {\n 'US/Pacific': 'US/Pacific',\n 'US/Mountain': 'US/Mountain',\n 'US/Central': 'US/Central',\n 'US/Eastern': 'US/Eastern',\n} as const;\n\nexport type UriProtocols = keyof typeof UriProtocols;\nexport const UriProtocols = {\n 'http://': 'http://',\n 'https://': 'https://',\n} as const;\n\nexport type WebClientDirectories = keyof typeof WebClientDirectories;\nexport const WebClientDirectories = {\n portal: 'portal',\n customer: 'customer',\n} as const;\n\nexport type ReportNames = keyof typeof ReportNames;\nexport const ReportNames = {\n 'meter-readings-excel': 'meter-readings-excel',\n 'meter-readings-drop-two-excel': 'meter-readings-drop-two-excel',\n} as const;\n\nexport type States = keyof typeof States;\nexport const States = {\n AL: 'AL',\n AK: 'AK',\n AS: 'AS',\n AZ: 'AZ',\n AR: 'AR',\n CA: 'CA',\n CO: 'CO',\n CT: 'CT',\n DE: 'DE',\n DC: 'DC',\n FM: 'FM',\n FL: 'FL',\n GA: 'GA',\n GU: 'GU',\n HI: 'HI',\n ID: 'ID',\n IL: 'IL',\n IN: 'IN',\n IA: 'IA',\n KS: 'KS',\n KY: 'KY',\n LA: 'LA',\n ME: 'ME',\n MH: 'MH',\n MD: 'MD',\n MA: 'MA',\n MI: 'MI',\n MN: 'MN',\n MS: 'MS',\n MO: 'MO',\n MT: 'MT',\n NE: 'NE',\n NV: 'NV',\n NH: 'NH',\n NJ: 'NJ',\n NM: 'NM',\n NY: 'NY',\n NC: 'NC',\n ND: 'ND',\n MP: 'MP',\n OH: 'OH',\n OK: 'OK',\n OR: 'OR',\n PW: 'PW',\n PA: 'PA',\n PR: 'PR',\n RI: 'RI',\n SC: 'SC',\n SD: 'SD',\n TN: 'TN',\n TX: 'TX',\n UT: 'UT',\n VT: 'VT',\n VI: 'VI',\n VA: 'VA',\n WA: 'WA',\n WV: 'WV',\n WI: 'WI',\n WY: 'WY',\n} as const;\n\nexport type UserPermissions = keyof typeof UserPermissions;\nexport const UserPermissions = {\n 'Users: View': 'Users: View',\n 'Users: Manage': 'Users: Manage',\n} as const;\n\nexport type OrganizationPermissions = keyof typeof OrganizationPermissions;\nexport const OrganizationPermissions = {\n 'Organizations: View': 'Organizations: View',\n 'Organizations: Manage': 'Organizations: Manage',\n} as const;\n\nexport type AccountPermissions = keyof typeof AccountPermissions;\nexport const AccountPermissions = {\n 'Accounts: View': 'Accounts: View',\n 'Accounts: Manage': 'Accounts: Manage',\n} as const;\n\nexport type RateTablePermissions = keyof typeof RateTablePermissions;\nexport const RateTablePermissions = {\n 'Rate Tables: View': 'Rate Tables: View',\n 'Rate Tables: Manage': 'Rate Tables: Manage',\n} as const;\n\nexport type RateTableTierPermissions = keyof typeof RateTableTierPermissions;\nexport const RateTableTierPermissions = {\n 'Rate Table Tiers: View': 'Rate Table Tiers: View',\n 'Rate Table Tiers: Manage': 'Rate Table Tiers: Manage',\n} as const;\n\nexport type MeterReadingPermissions = keyof typeof MeterReadingPermissions;\nexport const MeterReadingPermissions = {\n 'Meter Readings: View': 'Meter Readings: View',\n 'Meter Readings: Manage': 'Meter Readings: Manage',\n} as const;\n\nexport type PaymentPermissions = keyof typeof PaymentPermissions;\nexport const PaymentPermissions = {\n 'Payments: View': 'Payments: View',\n 'Payments: Manage': 'Payments: Manage',\n} as const;\n\nexport type ServicePermissions = keyof typeof ServicePermissions;\nexport const ServicePermissions = {\n 'Services: View': 'Services: View',\n 'Services: Manage': 'Services: Manage',\n} as const;\n\nexport type Roles = keyof typeof Roles;\nexport const Roles = {\n 'Global Admin': 'Global Admin',\n 'Organization Admin': 'Organization Admin',\n User: 'User',\n 'Quick Pay': 'Quick Pay',\n 'System User': 'System User',\n} as const;\n\nexport type OrganizationRoles = keyof typeof OrganizationRoles;\nexport const OrganizationRoles = {\n 'Organization Admin': 'Organization Admin',\n User: 'User',\n 'Quick Pay': 'Quick Pay',\n 'System User': 'System User',\n} as const;\n\n// Statics\n\nexport const RoleTemplates = {\n 'Global Admin': [\n 'Users: View',\n 'Users: Manage',\n 'Organizations: View',\n 'Organizations: Manage',\n 'Accounts: View',\n 'Accounts: Manage',\n 'Rate Table Tiers: View',\n 'Rate Table Tiers: Manage',\n ],\n 'Organization Admin': [\n 'Users: View',\n 'Users: Manage',\n 'Organizations: View',\n 'Organizations: Manage',\n 'Accounts: View',\n 'Accounts: Manage',\n 'Rate Table Tiers: View',\n 'Rate Table Tiers: Manage',\n ],\n} as const;\n\nexport const AllPermissions = [\n 'Users: View',\n 'Users: Manage',\n 'Organizations: View',\n 'Organizations: Manage',\n 'Accounts: View',\n 'Accounts: Manage',\n 'Rate Table Tiers: View',\n 'Rate Table Tiers: Manage',\n] as const;\n","import mitt from 'mitt';\nimport {useEffect} from 'react';\n\nlet emitter = mitt();\n\ntype SubscriptionEventMap = {\n 'session-expired': undefined;\n 'organization-updated': {organizationId: number};\n __NEVER__: {};\n};\n\nexport type SubscriptionEvents = keyof SubscriptionEventMap;\n\nexport function useSubscription(\n eventName: K,\n cb: (event: SubscriptionEventMap[K]) => void\n): void {\n useEffect(() => {\n emitter.on(eventName, cb);\n return () => emitter.off(eventName, cb);\n });\n}\n\nexport function notify(\n eventName: K,\n event: SubscriptionEventMap[K]\n) {\n if (eventName === '__NEVER__') {\n throw Error('Never call this event...');\n }\n emitter.emit(eventName, event);\n}\n","import * as Sentry from '@sentry/browser';\nimport {once, values} from 'lodash';\nimport {\n CustomSessionClaims,\n ClientIds,\n AuthenticationQueryKeys,\n} from '../api/generated/enums';\nimport {Env} from '../config/env-vars';\nimport {notify} from '../hooks/use-subscription';\nimport {User} from '../types';\nimport {logger} from '../utils/logger';\nimport oidcClient, {\n UserManagerSettings,\n User as OidcUser,\n UserManager,\n} from 'oidc-client';\n\ntype ClientSettings = {\n OrganizationSlug?: string;\n AuthSessionToken?: string;\n};\n\nconst log = logger('oidc', {namespace: 'oidc-client'});\noidcClient.Log.logger = log;\n\nexport let userManager: UserManager;\n\nexport const initializeUserManager = once((clientSettings: ClientSettings) => {\n const settings = {\n client_id: ClientIds.web,\n scope: `openid profile Elevator3.MeterReadingSystem.permissions Elevator3.MeterReadingSystem.api`,\n authority: Env.apiBaseUrl || '',\n response_type: 'id_token token',\n post_logout_redirect_uri: Env.appRoot,\n filterProtocolClaims: true,\n redirect_uri: `${Env.appRoot}/callback`,\n silent_redirect_uri: `${Env.appRoot}/silent-refresh.html`,\n automaticSilentRenew: true,\n\n // Allow user clocks to be off by 1hr 5 minutes. We were running into issues where we\n // may have been missing payments due to user clocks being incorrect. The logic behind\n // 1hr 5 minutes is such that a user can either be under that time, but also handle\n // the scenarion where the time is \"correct\" just missing the DST setting\n clockSkew: 60 * 65,\n\n extraQueryParams: clientSettings,\n } as UserManagerSettings;\n\n const slug = clientSettings.OrganizationSlug;\n\n if (slug) {\n Sentry.setTag(AuthenticationQueryKeys.OrganizationSlug, slug);\n }\n\n if (clientSettings.AuthSessionToken) {\n // Sentry.setExtra(\n // AuthenticationQueryKeys.AuthSessionToken,\n // clientSettings.AuthSessionToken\n // );\n }\n\n userManager = new UserManager(settings);\n\n userManager.events.addSilentRenewError(() => {\n notify('session-expired', undefined);\n });\n\n userManager.events.addAccessTokenExpiring(() => {\n log.warn('AccessTokenExpiring');\n });\n\n userManager.events.addUserSignedOut(async () => {\n await userManager.removeUser();\n window.location.reload();\n });\n});\n\nexport const getUser = async (): Promise => {\n const user = await userManager.getUser();\n return user && !user.expired ? user : null;\n};\n\nexport const mapOidcUser = (user: OidcUser): User => {\n const sessionAttributes = values(CustomSessionClaims).reduce((acc, key) => {\n const value = user.profile[key];\n if (value) {\n acc[key] = value;\n }\n return acc;\n }, {}) as User['attributes'];\n return {\n id: Number(user.profile.sub),\n name: user.profile.name || '',\n email: user.profile.preferred_username || '',\n permissions: user.profile.permissions,\n role: user.profile.role,\n attributes: sessionAttributes,\n };\n};\n","import {AxiosResponse, AxiosError, AxiosRequestConfig} from 'axios';\n\nimport {LiteralKeyedObject} from '../types';\nimport {logger} from '../utils/logger';\nimport {notifications} from '../utils/notification-service';\nimport {getUser} from '../auth';\n\ntype HandledResponseCodes = '400' | '401' | '403' | '500';\n\ntype Errorhandlers = LiteralKeyedObject<\n HandledResponseCodes,\n (respose: AxiosResponse) => Promise | void\n>;\n\nconst log = logger('axios');\n\nexport const requestInterceptors = compose(\n preventIEGetCaching,\n applyAuthHeader\n);\n\nexport const responseInterceptors = x => x;\n\nlet requestCount = 0;\nfunction preventIEGetCaching(config: AxiosRequestConfig) {\n if (/get/gi.test(config.method || '')) {\n if (config.params) {\n config.params['_ts'] = `${+new Date()}_${++requestCount}`;\n } else {\n config.params = {\n _ts: `${+new Date()}_${++requestCount}`,\n };\n }\n }\n\n return config;\n}\n\nasync function applyAuthHeader(config: AxiosRequestConfig) {\n try {\n const user = await getUser();\n if (user) {\n config.headers['Authorization'] = `Bearer ${user.access_token}`;\n }\n } catch (error) {}\n return config;\n}\n\nexport const defaultErrorhandlers: Errorhandlers = {\n '400': response => {\n log.info('Bad Request. Show Errors');\n return Promise.resolve(response);\n },\n '401': response => {\n return Promise.resolve({\n data: null,\n hasErrors: true,\n errors: [\n {\n propertyName: 'Authentication',\n errorMessage: 'Your session has expied. Please log in again',\n },\n ],\n });\n },\n '403': response => {\n notifications.error('You are not authorized to perform this action');\n },\n '500': response => {\n notifications.error(\n response.data.errors.map(x => x.errorMessage).join(' ')\n );\n return Promise.resolve(response);\n },\n};\n\nlet errorHandlers = {\n ...defaultErrorhandlers,\n};\n\nexport const setErrorHandlers = (handlers: Partial) => {\n Object.keys(handlers).forEach(key => {\n errorHandlers[key] = handlers[key];\n });\n};\n\nexport async function handleResponseError(error: AxiosError) {\n if (error.response) {\n const response: AxiosResponse = error.response;\n const handler = errorHandlers[response.status];\n if (handler) {\n const result = await handler(error.response);\n if (result) {\n return result;\n }\n }\n }\n return Promise.reject(error);\n}\n\ntype composeFn = (x: T) => T | Promise;\n\nfunction compose(...fns: composeFn[]) {\n return async (x: T | Promise): Promise =>\n fns.reduce((v, f) => (async () => f(await v))(), x);\n}\n","import axios from 'axios';\nimport qs from 'qs';\nimport {serviceOptions} from './index';\nimport {Env} from '../../config/env-vars';\n\nimport {\n requestInterceptors,\n responseInterceptors,\n handleResponseError,\n} from '../base-interceptors';\n\nexport const instance = axios.create({\n baseURL: Env.apiBaseUrl,\n paramsSerializer: params => qs.stringify(params, {allowDots: true}),\n});\n\ninstance.interceptors.request.use(requestInterceptors, Promise.reject);\ninstance.interceptors.response.use(responseInterceptors, handleResponseError);\n\nserviceOptions.axios = instance;\n","import {useState, useEffect} from 'react';\n\ntype Props = {\n delayInMs?: number;\n};\n\nexport const DelayedLoadingContainer: React.FC = ({\n delayInMs = 500,\n children,\n}): any => {\n const [showContent, setShowContent] = useState(false);\n\n useEffect(() => {\n const id = setTimeout(() => {\n setShowContent(true);\n }, delayInMs);\n\n return () => {\n clearTimeout(id);\n };\n }, [delayInMs]);\n\n return showContent && children;\n};\n","import {Env} from '../config/env-vars';\n\ntype PathParams = {\n [key: string]: string | number;\n};\n\nexport const appSubdirectory = Env.subdirectory || '';\n\nexport const rootRoutes = {\n callback: `/callback`,\n portal: `/portal`,\n customer: `/customer/:slug`,\n};\n\nexport const routes = {\n customer: {\n meterReadingInput: `${rootRoutes.customer}`,\n paymentSuccessful: `${rootRoutes.customer}/payment-successful`,\n },\n portal: {\n dashboard: `${rootRoutes.portal}/`,\n users: {\n create: `${rootRoutes.portal}/users/create`,\n detail: `${rootRoutes.portal}/users/:id`,\n listing: `${rootRoutes.portal}/users`,\n },\n organizations: {\n create: `${rootRoutes.portal}/organizations/create`,\n detail: `${rootRoutes.portal}/organizations/:id`,\n listing: `${rootRoutes.portal}/organizations`,\n },\n accounts: {\n create: `${rootRoutes.portal}/accounts/create`,\n dashboard: `${rootRoutes.portal}/accounts/dashboard/:id`,\n update: `${rootRoutes.portal}/accounts/update/:id`,\n listing: `${rootRoutes.portal}/accounts`,\n },\n rateTables: {\n create: `${rootRoutes.portal}/rate-tables/create`,\n dashboard: `${rootRoutes.portal}/rate-tables/dashboard/:id`,\n update: `${rootRoutes.portal}/rate-tables/update/:id`,\n listing: `${rootRoutes.portal}/rate-tables`,\n },\n rateTableTiers: {\n create: `${rootRoutes.portal}/rate-tables/:rateTableId/rate-table-tiers/create`,\n detail: `${rootRoutes.portal}/rate-tables/:rateTableId/rate-table-tiers/:id`,\n listing: `${rootRoutes.portal}/rate-tables/:rateTableId/rate-table-tiers`,\n },\n meterReadings: {\n create: `${rootRoutes.portal}/acounts/:accountId/meter-readings/create`,\n dashboard: `${rootRoutes.portal}/meter-readings-dashboard`,\n detail: `${rootRoutes.portal}/meter-readings/:id`,\n listing: `${rootRoutes.portal}/meter-readings`,\n },\n settings: {\n detail: `${rootRoutes.portal}/settings/:id`,\n listing: `${rootRoutes.portal}/settings`,\n },\n },\n};\n\nexport const buildPath = (path: string, params: PathParams) => {\n return Object.keys(params).reduce((url, key) => {\n return url.replace(`:${key}`, `${params[key]}`);\n }, path);\n};\n","import {getUser, initializeUserManager, mapOidcUser, userManager} from '.';\nimport React, {createContext, useContext, useEffect} from 'react';\nimport {Dimmer, Loader} from 'semantic-ui-react';\n// import {v4 as uuidv4} from 'uuid';\nimport {DelayedLoadingContainer} from '../components/delayed-loading-container';\nimport {Env} from '../config/env-vars';\nimport {useMemoizedValue} from '../hooks/use-memoized-value';\n// import {routes} from '../routes';\nimport {User} from '../types';\nimport {logger} from '../utils/logger';\n\nimport {\n actionCreatorFactory,\n createReducer,\n useImmerReducer,\n} from '../hooks/use-immer-reducer';\nimport {useLocation, useRouteMatch} from 'react-router-dom';\nimport {rootRoutes} from '../routes';\nimport {AuthenticationQueryKeys} from '../api/generated/enums';\n\nconst log = logger('auth');\n\ntype AuthState = {\n user: User | null;\n pending: boolean;\n error: Error | null;\n redirectUrl?: string;\n};\n\ntype OidcUser = Parameters[0];\n\nconst action = actionCreatorFactory();\nconst onUserLoaded = action('ON_USER_LOADED');\nconst onUserUnloaded = action('ON_USER_UNLOADED');\nconst redirecting = action('REDIRECTING');\n\nconst reducer = createReducer()\n .when(onUserLoaded, (draft, user) => {\n draft.pending = false;\n draft.user = mapOidcUser(user);\n const {url} = user.state || {};\n if (url) {\n draft.redirectUrl = url;\n }\n })\n .when(onUserUnloaded, (draft) => {\n draft.pending = true;\n draft.user = null;\n })\n .when(redirecting, (draft) => {\n draft.pending = true;\n draft.user = null;\n });\n\nconst INITIAL_STATE: AuthState = {\n user: null,\n pending: true,\n error: null,\n};\n\nexport const AuthContext = createContext(INITIAL_STATE);\n\nconst AuthProvider = (props: any) => {\n const [state_, dispatch] = useImmerReducer(reducer, INITIAL_STATE);\n const state = useMemoizedValue(state_);\n const location = useLocation();\n const url = `${location.pathname}${location.search}`\n\n const organizationSlug =\n useRouteMatch<{slug: string}>(`${rootRoutes.customer}`)?.params.slug || '';\n\n useEffect(() => {\n initializeUserManager({\n [AuthenticationQueryKeys.OrganizationSlug]: organizationSlug,\n // [AuthenticationQueryKeys.AuthSessionToken]: uuidv4(),\n });\n\n (async () => {\n const user = await getUser();\n log.debug('Initial user', user);\n\n userManager.events.addUserLoaded(async (updatedUser) => {\n dispatch(onUserLoaded(updatedUser));\n });\n\n userManager.events.addUserUnloaded(() => {\n dispatch(onUserUnloaded(undefined));\n });\n\n if (user && !user.expired) {\n dispatch(onUserLoaded(user));\n } else if (window.location.href.includes('#id_token')) {\n log.debug('Handle callback');\n try {\n await userManager.signinRedirectCallback();\n } catch (error) {\n log.info('Callback Error', error);\n (window as any).location = Env.appRoot;\n }\n } else {\n log.info('signinRedirect');\n dispatch(redirecting(undefined));\n userManager.signinRedirect({\n state: {\n url,\n },\n });\n }\n })();\n }, [organizationSlug, dispatch, url]);\n\n if (state.pending) {\n return (\n \n \n \n \n \n );\n }\n\n if (!state.user && !state.pending) {\n return
Not Authenticated
;\n }\n\n return ;\n};\n\nfunction useUser(): User {\n const {user} = useContext(AuthContext);\n if (!user) {\n throw new Error(`useUser must be used within an authenticated app`);\n }\n return user;\n}\n\nexport {AuthProvider, useUser};\n","import produce, {Draft} from 'immer';\nimport {useReducer, useMemo} from 'react';\n\ntype ActionCreator = (\n payload: Payload\n) => {type: string; payload: Payload};\ntype CreatedAction = ActionCreator & AnyAction;\ntype Handler = (state: Draft, payload: Payload) => void;\ntype Handlers = {\n [actionType: string]: Handler;\n};\n\ninterface AnyAction {\n type: any;\n}\n\ninterface Reducer {\n initialState: State;\n when: (\n action: CreatedAction,\n handler: Handler\n ) => Reducer;\n build: () => Handlers;\n}\nexport const actionCreatorFactory = () => (key: string) => {\n const cb = (payload: Payload) => ({type: key, payload});\n ((cb as unknown) as AnyAction).type = key;\n return (cb as unknown) as CreatedAction;\n};\n\nexport const createReducer = (initialState?: State) => {\n const reducer: Reducer = {\n initialState,\n } as Reducer;\n const handlers: Handlers = {};\n\n reducer.when = (\n action: CreatedAction,\n handler: Handler\n ) => {\n handlers[action.type] = handler;\n return reducer;\n };\n\n reducer.build = () => {\n const buildReducer = Object.keys(handlers).reduce((acc, key) => {\n acc[key] = (state, payload) =>\n produce(state, draft => {\n handlers[key](draft, payload);\n });\n return acc;\n }, {});\n\n return buildReducer;\n };\n\n return reducer;\n};\n\nexport const useImmerReducer = (\n reducer: Reducer,\n initialState?: State\n) => {\n const handlers = useMemo(() => reducer.build(), [reducer]);\n return useReducer((state, action) => {\n if (handlers[action.type]) {\n return (handlers[action.type](state, action.payload) as unknown) as State;\n }\n return state as State;\n }, initialState ?? reducer.initialState);\n};\n","import mixpanel from 'mixpanel-browser';\nimport ReactGA from 'react-ga';\nimport {AnalyticsEvents} from './events';\nimport {Env} from '../config/env-vars';\nimport {logger} from '../utils/logger';\n\ntype Analytics = {\n identify: Mixpanel['identify'];\n trackEvent: (\n eventName: AnalyticsEvents,\n properties?: {\n [index: string]: any;\n }\n ) => void;\n timeEvent: (eventName: AnalyticsEvents) => void;\n trackPage: (url: string) => void;\n};\n\nconst log = logger('analytics');\n\nconst {isProductionBuild, mixPanelToken, googleAnalyticsId} = Env;\n\nconst initializeMixpanel = isProductionBuild && !!mixPanelToken;\nconst initializeGoogleAnalytics = isProductionBuild && !!googleAnalyticsId;\n\nlet analtyics: Analytics;\nlet identified = false;\n\nanaltyics = {\n identify: mockInDevelopment('identify', uniqueId => {\n identified = true;\n mixpanel.identify(uniqueId);\n ReactGA.set({userId: uniqueId});\n }),\n trackEvent: mockInDevelopment('trackEvent', (eventName, properties) => {\n if (identified) {\n mixpanel.track(eventName, properties);\n }\n ReactGA.event({\n category: 'Tracked Event',\n action: eventName,\n });\n }),\n timeEvent: mockInDevelopment('timeEvent', eventName => {\n if (identified) {\n mixpanel.time_event(eventName);\n }\n }),\n trackPage: mockInDevelopment('trackPage', url => {\n ReactGA.pageview(url);\n\n if (identified) {\n const pageview: AnalyticsEvents = 'routes.pageview';\n mixpanel.track(pageview, {url});\n }\n }),\n};\n\nif (initializeMixpanel) {\n mixpanel.init(mixPanelToken as string);\n}\n\nif (initializeGoogleAnalytics) {\n ReactGA.initialize(googleAnalyticsId as string);\n}\n\nfunction mockInDevelopment(method, action) {\n return isProductionBuild\n ? (...args) => {\n try {\n action(...args);\n } catch (error) {\n log.error(`analytics.${method}`, error);\n }\n }\n : (...args) => log.info(`analytics.${method}`, ...args);\n}\n\nexport {analtyics};\n","import {cx} from 'emotion';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport React from 'react';\nimport {Button as SemanticButton, ButtonProps} from 'semantic-ui-react';\nimport {RequireOnlyOne} from '../types';\n\ntype ButtonTypeProps = {\n type?: 'button' | 'submit';\n as?: any;\n};\n\nexport type Button = ButtonProps &\n RequireOnlyOne & {\n tertiary?: boolean;\n };\n\nconst ButtonWithType = ({\n type,\n secondary,\n tertiary,\n className,\n ...props\n}: Button) => {\n const classNames = cx(className, {\n secondary: !!secondary,\n tertiary: !!tertiary,\n });\n\n return ;\n};\n\nexport const Button = hoistNonReactStatics(\n ButtonWithType,\n SemanticButton\n) as typeof ButtonWithType;\n","import {createBreakpoint} from 'react-use';\n\ntype Breakpoints = keyof typeof Breakpoints;\nexport const Breakpoints = {\n MobileMax: 767,\n TabletMin: 768,\n TabletMax: 1023,\n DektopMin: 1024,\n DektopMax: 1279,\n WideMin: 1280,\n} as const;\n\nexport const MediaSizes = {\n MobileMax: `max-width: ${Breakpoints.MobileMax}px`,\n TabletMin: `min-width: ${Breakpoints.TabletMin}px`,\n TabletMax: `max-width: ${Breakpoints.TabletMax}px`,\n} as const;\n\nexport const Media = (size: keyof typeof MediaSizes) =>\n `@media only screen and (${MediaSizes[size]})`;\n\nexport const useBreakpoint = () => {\n return createBreakpoint(Breakpoints)() as Breakpoints;\n};\n","import css from '@emotion/css/macro';\nimport React from 'react';\nimport {Segment, SegmentProps} from 'semantic-ui-react';\nimport {Media} from '../styles/breakpoints';\n\ntype FormContainer = SegmentProps & {\n children: React.ReactNode;\n className?: string;\n};\n\nexport const FormContainer: React.FC = ({\n children,\n className,\n ...props\n}) => (\n \n {children}\n \n);\n\nconst styles = css`\n &.ui.segment {\n padding: 2em;\n\n ${Media('TabletMax')} {\n padding: 1em;\n border-radius: 0;\n }\n }\n`;\n","import React from 'react';\nimport css from '@emotion/css/macro';\n\nexport const Json = ({data}) => (\n
\n    {JSON.stringify(data, null, 2)}\n  
\n);\n\nconst styles = css`\n background-color: #eaeaea;\n padding: 1rem;\n border-radius: 0.5rem;\n border: solid 1px #757575;\n max-height: 400px;\n overflow-y: auto;\n`;\n","import Alert from '@reach/alert';\nimport React from 'react';\nimport {useField} from 'react-final-form';\n\nexport const SubmitError = ({name}) => {\n const {\n meta: {submitError},\n } = useField(name, {\n subscription: {touched: true, submitError: true},\n });\n\n return submitError ? (\n
\n {submitError}\n
\n ) : null;\n};\n","import css from '@emotion/css/macro';\nimport {cx} from 'emotion';\nimport {omit, pick, sum} from 'lodash';\nimport React from 'react';\nimport {Field, FieldRenderProps} from 'react-final-form';\nimport {Form, StrictFormFieldProps} from 'semantic-ui-react';\nimport {FieldConfig} from './schema-utils';\nimport {SubmitError} from './submit-error';\nimport {RequireOnlyOne} from '../types';\nimport {Media} from '../styles/breakpoints';\n\nexport type FieldConfigProps = RequireOnlyOne<\n {\n fieldName?: string;\n fieldConfig?: FieldConfig;\n },\n 'fieldName' | 'fieldConfig'\n>;\n\nexport type FieldPropsStrict = FieldConfigProps & {\n fieldLabel?: string;\n fieldClassName?: string;\n fieldHint?: React.ReactNode;\n fieldWidth?: StrictFormFieldProps['width'];\n};\n\ntype FieldProps = T & FieldPropsStrict;\n\ntype RenderComponentProps = T & FieldRenderProps;\n\ntype RenderComponent = {\n renderComponent: (\n renderComponentProps: RenderComponentProps\n ) => React.ReactNode;\n};\n\nconst FieldPropKeys = [\n 'fieldConfig',\n 'fieldName',\n 'fieldLabel',\n 'fieldClassName',\n 'fieldHint',\n 'fieldWidth',\n 'inputProps',\n] as const;\n\nexport function FieldFactory({renderComponent}: RenderComponent) {\n return (props: FieldProps) => {\n const fieldProps = pick(props, FieldPropKeys);\n const finalFormFieldProps = omit(props, FieldPropKeys);\n\n const {\n fieldName,\n fieldLabel,\n fieldClassName,\n fieldHint,\n fieldWidth,\n } = props.fieldConfig ? props.fieldConfig : fieldProps;\n\n const inputProps = props.fieldConfig?.inputProps ?? {};\n\n if (!fieldName) {\n throw new Error('fieldName is required');\n }\n\n return (\n {\n const {input, meta} = renderComponentProps;\n return (\n
\n \n {fieldLabel ? (\n \n ) : (\n \n )}\n {renderComponent(\n renderComponentProps as RenderComponentProps\n )}\n \n {fieldHint &&
{fieldHint}
}\n \n
\n );\n }}\n {...inputProps}\n {...finalFormFieldProps}\n />\n );\n };\n}\n\ntype FormRow = {\n proportions?: number[];\n};\n\nexport const FormRow: React.FC = ({proportions, ...props}) => {\n const styles = getStyle(proportions);\n\n return
;\n};\n\nconst styleCache = {};\nconst getStyle = (proportions: number[] = []) => {\n const key = `cols-${proportions.join('-')}`;\n if (!styleCache[key]) {\n const denominator = sum(proportions);\n styleCache[key] = css`\n ${Media('TabletMin')} {\n .ui.form > & {\n ${(proportions || []).map(\n (x, i) => css`\n .form-field:nth-child(${i + 1}) {\n width: ${(x / denominator) * 100}%;\n flex: none;\n }\n `\n )};\n }\n }\n `;\n }\n\n return styleCache[key];\n};\n","import React from 'react';\nimport {Checkbox, StrictCheckboxProps} from 'semantic-ui-react';\n\nexport type CheckboxAdapterProps = StrictCheckboxProps;\n\nexport const CheckboxAdapter = ({input, meta, ...rest}) => {\n const {value, ...inputValues} = input;\n return (\n input.onChange(checked)}\n />\n );\n};\n","import React from 'react';\nimport moment from 'moment';\n\ntype DateProps = {\n date: number | Date | string;\n format?: string;\n};\n\ntype TimeProps = {\n time: number | Date | string;\n format?: string;\n};\n\nexport const DateFormat = React.memo(\n ({date, format = 'MM/DD/YY'}) => <>{moment(date).format(format)}\n);\n\nexport const TimeFormat = React.memo(\n ({time, format = 'hh:mm A'}) => <>{moment(time, 'LT').format(format)}\n);\n","import {Global} from '@emotion/core';\nimport css from '@emotion/css/macro';\nimport {darken, lighten, textInputs, transparentize} from 'polished';\nimport React from 'react';\nimport {Media} from './breakpoints';\n\nconst colors = {\n white1: '#FFFFFF',\n white2: '#F5F5F5',\n grey1: '#979C9E',\n grey2: '#CBCFD1',\n black1: '#1B1C1D',\n black2: '#444',\n transparent: 'rgba(0,0,0,0)',\n};\n\nexport const themeColors = {\n ...colors,\n basicBoxShadow: 'rgba(34, 36, 38, 0.15)',\n textLabel: colors.black2,\n transparentHover: '#efefef',\n warning: '#712928',\n warningBackground: '#fff6f6',\n warningBoxShadow: '#9F3A38',\n errorText: '#9F3A38',\n mutedText: colors.grey1,\n warningText: '#7b341e',\n};\n\nconst globalStyles = css`\n .root {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n\n .ui {\n &.form {\n ${textInputs()} {\n border-width: 2px;\n border-color: ${themeColors.grey2};\n\n &:focus {\n outline: -webkit-focus-ring-color auto 3px;\n }\n\n &[readonly] {\n background: #f1f1f1;\n color: #6b6b6b;\n &:focus {\n outline: none;\n background: #f1f1f1;\n color: #6b6b6b;\n }\n }\n }\n\n .field.error {\n ${textInputs()} {\n background: #fff;\n border-color: #e0b4b4;\n color: #9f3a38;\n box-shadow: none;\n }\n }\n\n .dropdown,\n .selection.dropdown {\n border-width: 2px;\n border-color: ${themeColors.grey2};\n\n .menu {\n border-width: 2px;\n border-color: ${themeColors.grey2};\n margin: 0px -2px;\n min-width: calc(100% + 4px);\n width: calc(100% + 4px);\n }\n\n &:not(.button) > .default.text,\n &.default:not(.button) > .text {\n color: ${themeColors.grey1};\n }\n }\n\n .success.message,\n .warning.message,\n .error.message {\n display: block;\n }\n\n .error.error input:-webkit-autofill {\n box-shadow: inherit !important;\n border-color: #cbcfd1 !important;\n }\n }\n\n &.input {\n &.labeled:not([class*='corner labeled']) .label {\n line-height: 1.3rem;\n border-width: 2px;\n border-color: ${themeColors.grey2};\n padding-top: calc(0.78571429em - 2px);\n padding-bottom: calc(0.78571429em - 2px);\n background-color: #fff;\n\n &:first-of-type + input {\n border-left: 0;\n }\n }\n\n &.action {\n > .button {\n border: solid 2px ${themeColors.grey2} !important;\n box-shadow: none;\n\n &:hover {\n box-shadow: none;\n }\n }\n\n &:not([class*='left action']) {\n > input {\n border-right-color: ${themeColors.grey2} !important;\n }\n\n > .button:last-child {\n border-left: none !important;\n }\n }\n }\n\n &.input-file-upload {\n .file-upload {\n padding: 0 !important;\n background: #fff;\n\n .ui.button {\n margin: 0;\n border-radius: 0;\n }\n }\n }\n }\n\n &.table {\n border-top: 0.2em solid ${themeColors.black1};\n font-size: 1rem;\n\n &[class*='very basic']:not(.sortable):not(.striped) td:first-of-type {\n padding-left: 0.5em;\n }\n\n .error-text {\n color: ${themeColors.errorText} !important;\n }\n\n .muted-text {\n color: ${themeColors.mutedText} !important;\n }\n\n .warning-text {\n color: ${themeColors.warningText} !important;\n }\n\n &.compact th {\n padding: 0.528571em 0.78571429em;\n }\n\n &.table tr th {\n border-left: none;\n }\n\n &.celled tr th {\n border-left: 1px solid rgba(222, 222, 222, 0.43);\n }\n\n thead th {\n border-radius: 0 !important;\n font-weight: 500;\n }\n\n &.selectable tbody tr {\n cursor: pointer;\n\n &.active,\n &.active:hover,\n &:hover {\n background: #d3eafb !important;\n\n .ui.label {\n /* border: solid 1px; */\n }\n }\n }\n\n tbody tr,\n thead tr {\n .hidden-row-action {\n opacity: 0;\n }\n\n &:hover .hidden-row-action {\n opacity: 1;\n }\n\n td:first-of-type,\n th:first-of-type {\n padding-left: 30px;\n }\n\n td:last-child,\n th:last-child {\n padding-right: 30px;\n }\n }\n }\n\n &.button {\n font-weight: normal;\n\n &.primary {\n background-color: ${themeColors.black1};\n\n &:hover,\n &:focus {\n background-color: ${lighten(0.075, themeColors.black1)} !important;\n }\n &:focus {\n box-shadow: 0px 0px 0px 1px\n ${darken(0.04, themeColors.basicBoxShadow)};\n outline: -webkit-focus-ring-color auto 1px;\n }\n }\n\n &.secondary {\n background-color: #e8e8e8;\n color: ${themeColors.textLabel};\n font-weight: normal;\n border-radius: 0.28571429rem;\n text-transform: none;\n text-shadow: none !important;\n &:hover,\n &:focus {\n color: ${themeColors.textLabel};\n background-color: ${darken(0.075, '#e8e8e8')} !important;\n\n &.active {\n color: ${themeColors.white1};\n background-color: ${themeColors.black1} !important;\n }\n }\n &:focus {\n box-shadow: 0px 0px 0px 1px\n ${darken(0.04, themeColors.basicBoxShadow)};\n outline: -webkit-focus-ring-color auto 1px;\n }\n }\n\n &.tertiary {\n background-color: #fff;\n color: ${themeColors.textLabel};\n font-weight: normal;\n border-radius: 0.28571429rem;\n text-transform: none;\n text-shadow: none !important;\n\n &.negative {\n color: #db2828;\n\n &:hover,\n &:focus {\n background: #f9dbdc !important;\n color: #db2828;\n }\n }\n\n &:hover,\n &:focus {\n color: ${themeColors.textLabel};\n background-color: ${darken(0.075, '#e8e8e8')} !important;\n }\n &:focus {\n box-shadow: 0px 0px 0px 1px\n ${darken(0.04, themeColors.basicBoxShadow)};\n outline: -webkit-focus-ring-color auto 1px;\n }\n }\n\n &.basic {\n background-color: ${themeColors.white1} !important;\n color: ${themeColors.black1};\n\n &:not(.action-button) {\n box-shadow: 0px 0px 0px 1px ${themeColors.basicBoxShadow} !important;\n }\n &:hover {\n box-shadow: 0px 0px 0px 1px\n ${darken(0.04, themeColors.basicBoxShadow)};\n color: ${darken(0.04, themeColors.black1)} !important;\n background-color: ${darken(0.08, themeColors.white1)} !important;\n }\n &:focus {\n box-shadow: 0px 0px 0px 1px\n ${darken(0.04, themeColors.basicBoxShadow)};\n color: ${darken(0.04, themeColors.black1)} !important;\n background-color: ${darken(0.02, themeColors.white1)} !important;\n }\n &:active {\n box-shadow: 0px 0px 0px 1px\n ${darken(0.08, themeColors.basicBoxShadow)};\n color: ${darken(0.08, themeColors.black1)} !important;\n background-color: ${darken(0.05, themeColors.white1)} !important;\n }\n\n &.transparent {\n background-color: ${themeColors.transparent} !important;\n &:hover {\n background-color: ${themeColors.transparentHover} !important;\n }\n &:active {\n background-color: ${darken(\n 0.05,\n themeColors.transparentHover\n )} !important;\n }\n }\n\n &.warning {\n background-color: ${themeColors.warningBackground} !important;\n box-shadow: 0px 0px 0px 1px ${themeColors.warningBoxShadow} !important;\n color: ${themeColors.warning};\n &:hover {\n box-shadow: 0px 0px 0px 1px\n ${darken(0.2, themeColors.warningBoxShadow)};\n color: ${darken(0.2, themeColors.warning)} !important;\n background-color: ${darken(\n 0.03,\n themeColors.warningBackground\n )} !important;\n }\n &:focus {\n box-shadow: 0px 0px 0px 1px\n ${darken(0.2, themeColors.warningBoxShadow)};\n color: ${darken(0.2, themeColors.warning)} !important;\n background-color: ${darken(\n 0.03,\n themeColors.warningBackground\n )} !important;\n }\n &:active {\n box-shadow: 0px 0px 0px 1px\n ${darken(0.3, themeColors.warningBoxShadow)};\n color: ${darken(0.3, themeColors.warning)} !important;\n background-color: ${darken(\n 0.05,\n themeColors.warningBackground\n )} !important;\n }\n }\n\n &.clear {\n background-color: transparent !important;\n box-shadow: none !important;\n\n &:hover,\n &:focus {\n background-color: rgba(27, 28, 29, 0.1) !important;\n }\n }\n }\n\n &.link {\n background: transparent none;\n color: rgba(0, 0, 0, 0.6);\n font-weight: normal;\n border-radius: 0.28571429rem;\n text-transform: none;\n text-shadow: none !important;\n display: inline-block;\n padding: 5px 0px;\n &:hover {\n color: rgba(0, 0, 0, 0.8);\n }\n &:focus {\n box-shadow: 0px 0px 0px 1px\n ${darken(0.04, themeColors.basicBoxShadow)};\n color: ${darken(0.04, themeColors.black1)} !important;\n background-color: ${darken(0.02, themeColors.white1)} !important;\n outline: -webkit-focus-ring-color auto 1px;\n }\n &:active {\n background: #f8f8f8;\n }\n }\n\n &.white {\n background: #fff !important;\n box-shadow: 0px 0px 0px 1px rgba(107, 112, 117, 0.35) inset,\n 0px 0px 0px 0px rgba(50, 53, 56, 0.15) inset;\n }\n\n &.clear {\n background: transparent none;\n color: rgba(0, 0, 0, 0.6);\n font-weight: normal;\n border-radius: 0.28571429rem;\n text-transform: none;\n text-shadow: none !important;\n &:hover {\n color: rgba(0, 0, 0, 0.8);\n }\n &:focus {\n box-shadow: 0px 0px 0px 1px\n ${darken(0.04, themeColors.basicBoxShadow)};\n color: ${darken(0.04, themeColors.black1)} !important;\n background-color: ${transparentize(\n 0.9,\n themeColors.black1\n )} !important;\n outline: -webkit-focus-ring-color auto 1px;\n }\n &:active {\n background: #f8f8f8;\n }\n }\n\n &.no-focus:not(:active) {\n box-shadow: none !important;\n outline: none !important;\n }\n }\n\n &.header {\n &.no-margin {\n margin: 0;\n }\n\n &.inverted.attached {\n background-color: ${themeColors.black1};\n }\n\n &.icon svg {\n display: block;\n line-height: 1;\n padding: 0em;\n font-size: 3em;\n }\n\n &.icon > svg {\n margin: 0em auto 0.5rem;\n }\n }\n\n &.buttons > .ui.button:not(.basic):not(.inverted),\n &.buttons:not(.basic):not(.inverted) > .button,\n &.buttons .ui.button:not(.basic):not(.inverted),\n &.buttons:not(.basic):not(.inverted) .button {\n box-shadow: 0px 0px 0px 1px transparent inset,\n 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset;\n }\n\n &.menu {\n &.pagination {\n border: 1px solid rgba(175, 176, 177, 0.45);\n box-shadow: none;\n\n .item:before {\n background: rgba(175, 176, 177, 0.45);\n }\n }\n\n &.secondary.pointing .active.item {\n font-weight: normal;\n color: ${themeColors.black1};\n border-color: ${themeColors.black1};\n }\n }\n\n .modal {\n .content .actions {\n margin: 15px -1.5rem -1.5rem;\n padding: 15px 10px;\n border-top: solid 1px rgba(0, 0, 0, 0.2);\n background: rgba(0, 0, 0, 0.02);\n }\n\n & > .actions {\n text-align: left;\n }\n }\n\n &.segment {\n padding: 2em;\n display: block;\n\n ${Media('TabletMax')} {\n padding: 1em;\n }\n\n &.placeholder {\n min-height: 8rem;\n display: flex;\n }\n }\n\n a.hint {\n float: right;\n font-weight: normal;\n font-size: 1rem;\n }\n }\n\n .muted {\n color: ${themeColors.mutedText} !important;\n }\n\n [data-reach-skip-link]:focus {\n z-index: 10;\n }\n\n [data-reach-tab-list] {\n margin: 0 0 1em 0;\n display: inline-block;\n background: #fff;\n border-radius: 5px;\n padding: 4px;\n border: 1px solid rgba(34, 36, 38, 0.15);\n box-shadow: 0px 1px 2px 0 rgba(34, 36, 38, 0.15);\n }\n\n [data-reach-tab-panel] {\n outline: none;\n }\n\n [data-reach-tab] {\n display: inline-block;\n padding: 0.25em 0.5em;\n margin: 0;\n background: none;\n color: inherit;\n font: inherit;\n cursor: pointer;\n -webkit-appearance: none;\n -moz-appearance: none;\n align-self: flex-end;\n border: none;\n margin: 0 2.5px 0;\n padding: 0.557143em 1.14285714em;\n border-bottom-width: 2px;\n transition: color 0.1s ease;\n background-color: transparent;\n color: #0a2233;\n border-radius: 5px;\n\n &:hover {\n background: rgba(0, 0, 0, 0.05);\n }\n\n &[data-selected] {\n background: #185885;\n color: #fff;\n }\n\n &:first-of-type {\n margin-left: 0px;\n }\n\n &:last-of-type {\n margin-right: 0px;\n }\n }\n\n [data-reach-tab]:disabled {\n opacity: 0.25;\n cursor: default;\n }\n`;\n\nexport const GlobalStyles = () => ;\n","import 'react-dates/initialize';\nimport 'react-dates/lib/css/_datepicker.css';\n\nimport css from '@emotion/css/macro';\nimport moment, {Moment} from 'moment';\nimport React, {useEffect, useMemo, useRef, useState} from 'react';\nimport {useForm, useFormState} from 'react-final-form';\nimport {Header, HtmlInputrops, StrictInputProps} from 'semantic-ui-react';\nimport nameof from 'ts-nameof.macro';\nimport {DateFormat} from '../../components/date';\nimport {themeColors} from '../../styles';\nimport {Button} from '../button';\n\nimport {\n DateRangePicker,\n SingleDatePicker,\n SingleDatePickerShape,\n} from 'react-dates';\n\ntype OmittedDatePickerProps =\n | 'id'\n | 'focused'\n | 'onFocusChange'\n | 'date'\n | 'onDateChange';\n\ntype DatePickerShape = Omit;\n\nexport type DatePickerAdapterProps = StrictInputProps &\n HtmlInputrops &\n DatePickerShape;\n\nexport const DatePickerAdapter = ({input, meta, ...rest}) => {\n const [focused, setFocused] = useState(false);\n const last = useRef(null);\n\n const getDate = date => {\n if (last.current !== date) {\n last.current = date ? moment(date) : null;\n }\n\n return last.current;\n };\n\n return (\n
\n setFocused(focused)}\n noBorder\n readOnly\n enableOutsideDays\n isOutsideRange={() => false}\n numberOfMonths={1}\n date={getDate(input.value)}\n onDateChange={date => {\n input.onChange(date ? date.toDate().toISOString() : date);\n }}\n {...rest}\n />\n
\n );\n};\n\nexport type DateRangeAdapterProps = StrictInputProps &\n HtmlInputrops & {\n startDateProperty: string;\n endDateProperty: string;\n };\ntype FocusedInputStates = 'startDate' | 'endDate' | null;\nconst getDate = date => (date ? moment(date) : null);\n\nexport const DateRangeCustomField: React.FC = props => {\n const [focusedInput, setFocusedInput] = useState(null);\n\n const state = useFormState();\n const startDate = getDate(state.values[props.startDateProperty]);\n const endDate = getDate(state.values[props.endDateProperty]);\n\n const form = useForm(nameof(DateRangeCustomField));\n\n useEffect(() => {\n form.registerField(props.startDateProperty, () => {}, {dirty: true});\n form.registerField(props.endDateProperty, () => {}, {dirty: true});\n }, [form, props.endDateProperty, props.startDateProperty]);\n\n const onDatesChanged = ({startDate, endDate}) => {\n form.batch(() => {\n form.change(\n props.startDateProperty,\n startDate ? startDate.toDate().toISOString() : startDate\n );\n form.change(\n props.endDateProperty,\n endDate ? endDate.toDate().toISOString() : endDate\n );\n form.blur(props.startDateProperty);\n form.blur(props.endDateProperty);\n });\n\n setFocusedInput(null);\n };\n\n return (\n
\n setFocusedInput(focusedInput)}\n noBorder\n readOnly\n enableOutsideDays\n isOutsideRange={() => false}\n numberOfMonths={1}\n minimumNights={0}\n renderCalendarInfo={() => (\n \n )}\n calendarInfoPosition=\"after\"\n />\n
\n );\n};\n\ntype CalendarQuickSelection = {\n onDatesChanged: (dates: {startDate: Moment; endDate: Moment}) => void;\n};\n\nconst CalendarQuickSelection: React.FC = ({\n onDatesChanged,\n}) => {\n const {\n today,\n yesterday,\n startOfWeek,\n startOfLastWeek,\n endOfLastWeek,\n startOfMonth,\n } = useMemo(() => {\n const today = moment()\n .startOf('date')\n .toDate();\n\n const yesterday = moment()\n .startOf('date')\n .subtract(1, 'day')\n .toDate();\n\n const startOfWeek = moment()\n .startOf('week')\n .toDate();\n\n const startOfLastWeek = moment()\n .startOf('week')\n .subtract(1, 'week')\n .toDate();\n\n const endOfLastWeek = moment(startOfLastWeek)\n .add(1, 'week')\n .subtract(1, 'day')\n .toDate();\n\n const startOfMonth = moment()\n .startOf('month')\n .toDate();\n\n return {\n today,\n yesterday,\n startOfWeek,\n startOfLastWeek,\n endOfLastWeek,\n startOfMonth,\n };\n }, []);\n\n return (\n
\n
Quick Selection
\n {\n onDatesChanged({\n startDate: moment(today),\n endDate: moment(today),\n });\n }}\n >\n {'Today: '}\n \n \n {\n onDatesChanged({\n startDate: moment(yesterday),\n endDate: moment(yesterday),\n });\n }}\n >\n {'Yesterday: '}\n \n \n {\n onDatesChanged({\n startDate: moment(startOfWeek),\n endDate: moment(today),\n });\n }}\n >\n {'This Week: '}\n \n {' - '}\n \n \n {\n onDatesChanged({\n startDate: moment(startOfLastWeek),\n endDate: moment(endOfLastWeek),\n });\n }}\n >\n {'Last Week: '}\n \n {' - '}\n \n \n {\n onDatesChanged({\n startDate: moment(startOfMonth),\n endDate: moment(today),\n });\n }}\n >\n {'MTD: '}\n \n {' - '}\n \n \n
\n );\n};\n\nconst datepickerStyles = css`\n .SingleDatePicker,\n .SingleDatePicker > div,\n .SingleDatePickerInput,\n .SingleDatePickerInput > div {\n display: flex;\n flex: 1;\n width: 100%;\n }\n\n .SingleDatePickerInput__showClearDate {\n padding-right: 0px;\n }\n\n .SingleDatePickerInput_clearDate {\n margin: 1px 5px 0 0;\n padding: 5px 7px 7px;\n }\n\n .SingleDatePickerInput_clearDate__default:hover {\n color: #000;\n border-radius: 4px;\n background: rgba(219, 219, 219, 0.65);\n }\n\n .SingleDatePicker .DateInput_input[readonly] {\n background-color: #fff !important;\n font-weight: 400 !important;\n }\n\n .DateInput_fang {\n margin-top: 1px;\n }\n\n .DayPicker__withBorder {\n box-shadow: 0px 1px 11px 1px rgba(0, 0, 0, 0.4),\n 0 0 0 1px rgba(0, 0, 0, 0.07) !important;\n }\n\n .DateRangePicker {\n border: solid 2px #cbcfd1;\n border-radius: 4px;\n\n .DateInput_input {\n border: none !important;\n background: #fff !important;\n font-weight: normal;\n }\n\n .DateRangePickerInput_arrow {\n margin: 0 5px;\n }\n\n .DateInput {\n width: 128px;\n }\n\n .DateInput:last-child .DateInput_input {\n text-align: right;\n }\n\n .DateInput_input__focused {\n outline: solid #85b7d9 2px !important;\n }\n }\n\n .CalendarDay__selected,\n .CalendarDay__selected:active,\n .CalendarDay__selected:hover,\n .CalendarDay__selected_span:active,\n .CalendarDay__selected_span:hover {\n background: ${themeColors.black1};\n border: 1px double ${themeColors.black1};\n color: #fff;\n }\n\n .CalendarDay__selected_span,\n .CalendarDay__hovered_span,\n .CalendarDay__hovered_span:active {\n background: ${themeColors.black1};\n border: 1px double ${themeColors.black1};\n color: #fff;\n }\n\n .DayPicker {\n background: #f1f1f1;\n }\n\n .DayPicker_wrapper__horizontal {\n background: #fff;\n }\n\n .DayPicker_transitionContainer {\n border-right: solid 1px #d2d2d2;\n }\n\n .DateRangePicker__actions {\n padding: 20px;\n\n .ui.button {\n text-align: left;\n\n strong {\n width: 85px;\n display: inline-block;\n }\n }\n }\n`;\n","import {values} from 'lodash';\nimport {AnyObject} from '../../types';\nimport {logger} from '../../utils/logger';\n\nconst log = logger('code-gen utils');\n\nexport type DropdownOption = {\n text: string;\n value: any;\n};\n\nexport const getEnumDropdownOptions = (() => {\n const enumMapCache = new WeakMap();\n\n return (enumObject: AnyObject) => {\n if (!enumObject) {\n throw new Error('invalid enum cache object');\n }\n if (enumMapCache.has(enumObject)) {\n return enumMapCache.get(enumObject) as DropdownOption[];\n }\n\n log.info('enum cache miss', enumObject);\n const enumOptions = values(enumObject).map(x => ({\n text: x,\n value: x,\n key: x,\n }));\n\n enumMapCache.set(enumObject, enumOptions);\n return enumOptions as DropdownOption[];\n };\n})();\n","import React from 'react';\nimport {Dropdown, StrictDropdownProps} from 'semantic-ui-react';\nimport {getEnumDropdownOptions} from '../../api/generated/utils';\nimport {AnyObject} from '../../types';\n\nexport type DropdownAdapterProps = StrictDropdownProps & {\n enum?: AnyObject;\n};\n\nexport const DropdownAdapter = ({input, meta, ...rest}) => {\n const {\n options,\n enum: enumObject,\n ...dropdownProps\n } = rest as DropdownAdapterProps;\n const _options = enumObject ? getEnumDropdownOptions(enumObject) : options;\n\n return (\n input.onChange(value)}\n />\n );\n};\n","import React from 'react';\nimport {StrictFormTextAreaProps, TextArea} from 'semantic-ui-react';\n\nexport type TextAreaAdapterProps = StrictFormTextAreaProps;\n\nexport const TextAreaAdapter = ({input, meta, ...rest}) => {\n return (\n input.onChange(value)}\n />\n );\n};\n","import currency from 'currency.js';\nimport moment from 'moment';\n\nexport type ValueConverter = {\n parseInput: (input: string) => any;\n format: (value: any) => string;\n equals: (value: any, formattedInput: string) => boolean;\n};\n\nexport const defaultValueConverter: ValueConverter = {\n format: x => x,\n parseInput: x => x,\n equals: (value, formattedInput) => true,\n};\n\nexport const currencyValueConverter: ValueConverter = {\n format: value => currency(value / 100).toString(),\n parseInput: input => currency(input).intValue,\n equals: (value, input) => value === currency(input).intValue,\n};\n\nexport const decimalValueConverter: ValueConverter = {\n format: value => currency(value * 100).value.toString(),\n parseInput: input => {\n const parsedInput = Number(input);\n if (!Number.isFinite(parsedInput)) {\n return 0;\n }\n const precision = getPrecision(parsedInput) + 2;\n return Number((parsedInput / 100).toPrecision(precision));\n },\n equals: (value, input) => value === decimalValueConverter.parseInput(input),\n};\n\nexport const timeValueConverter: ValueConverter = {\n format: value => moment(value || '0', 'LT').format('hh:mm A'),\n parseInput: input => moment(input || '0', 'LT').format('HH:mm:ss'),\n equals: (value, input) =>\n moment(value, 'LT').format('HH:mm:ss') ===\n moment(input, 'LT').format('HH:mm:ss'),\n};\n\nfunction getPrecision(a) {\n if (!isFinite(a)) return 0;\n let e = 1,\n p = 0;\n while (Math.round(a * e) / e !== a) {\n e *= 10;\n p++;\n }\n return p;\n}\n","import 'cleave.js/dist/addons/cleave-phone.us';\nimport {CleaveOptions} from 'cleave.js/options';\nimport Cleave from 'cleave.js/react';\nimport {cx} from 'emotion';\nimport React, {useEffect, useState, useMemo} from 'react';\nimport {useDropzone} from 'react-dropzone';\nimport {\n HtmlInputrops,\n Input,\n StrictInputProps,\n Message,\n Form,\n} from 'semantic-ui-react';\nimport {AnyObject} from '../../types';\n\nimport {\n defaultValueConverter,\n ValueConverter,\n currencyValueConverter,\n decimalValueConverter,\n} from '../value-converters';\n\ntype InputAdditionalProps = {\n valueConverter?: ValueConverter;\n};\n\nexport type InputAdapterProps = StrictInputProps &\n HtmlInputrops &\n InputAdditionalProps;\n\nexport const InputAdapter = ({input, meta, ...rest}) => {\n let {valueConverter, ...additionalProps} = rest as InputAdditionalProps;\n const converter = (valueConverter || defaultValueConverter) as ValueConverter;\n\n const [value, setValue] = useState(converter.format(input.value));\n\n // if formatting the external value does not match\n // the internal value, update internal value\n useEffect(() => {\n const shouldSetValue = !converter.equals(input.value, value);\n if (shouldSetValue) {\n setValue(converter.format(input.value));\n }\n }, [converter, input.value, value]);\n\n return (\n {\n setValue(value);\n input.onChange(converter.parseInput(value));\n }}\n onFocus={(event) => {\n input.onFocus(event);\n event.target.select();\n }}\n onBlur={(event) => {\n setValue(converter.format(input.value));\n input.onBlur(event);\n }}\n />\n );\n};\n\nexport const InputCurrencyAdapter = ({input, meta, ...rest}) => {\n const props: AnyObject = {...rest, valueConverter: currencyValueConverter};\n\n return (\n \n );\n};\n\nexport const InputFileUrlAdapter = ({input, meta, ...rest}) => {\n const {onDrop} = rest;\n const [uploading, setUploading] = useState(false);\n const [file, setFile] = useState(null);\n const {getRootProps, getInputProps, isDragActive} = useDropzone({\n onDrop: async (acceptedFiles) => {\n const file = acceptedFiles[0];\n Object.assign(file, {\n preview: URL.createObjectURL(file),\n });\n setFile(file);\n setUploading(true);\n const uri = await onDrop(acceptedFiles[0]);\n input.onChange(uri);\n setUploading(false);\n },\n });\n const uploader = useMemo(\n () => (\n
\n \n \n

Drag file here, or click to select files

\n \n }\n />\n
\n ),\n [getInputProps, getRootProps, isDragActive]\n );\n const thumbs = useMemo(\n () =>\n file && (\n
\n {/* */}\n {\n setFile(null);\n input.onChange('');\n }}\n >\n Remove\n \n
\n ),\n [file, input]\n );\n useEffect(\n () => () => {\n // Make sure to revoke the data uris to avoid memory leaks\n file && URL.revokeObjectURL(file.preview);\n },\n [file]\n );\n return (\n
\n {uploading ? 'Loading...' : file ? thumbs : uploader}\n
\n );\n};\n\nexport const InputDecimalAdapter = ({input, meta, ...rest}) => {\n const props = {...rest, valueConverter: decimalValueConverter};\n return (\n \n );\n};\n\nexport type InputMaskedAdapterProps = InputAdapterProps & {\n options?: CleaveOptions;\n};\n\nexport const InputMaskedAdapter = ({input, meta, ...rest}) => {\n const {className, ...inputProps} = rest;\n return (\n
\n \n
\n );\n};\n","import React from 'react';\nimport {Radio} from 'semantic-ui-react';\nimport {AnyObject, RequireOnlyOne} from '../../types';\nimport {\n DropdownOption,\n getEnumDropdownOptions,\n} from '../../api/generated/utils';\n\nexport type RadioGroupAdapterProps = RequireOnlyOne<\n {\n options?: DropdownOption[];\n enum?: AnyObject;\n },\n 'options' | 'enum'\n>;\n\nexport const RadioGroupAdapter = ({input, meta, ...rest}) => {\n const {options, enum: enumObject} = rest as RadioGroupAdapterProps;\n const _options = (enumObject\n ? getEnumDropdownOptions(enumObject)\n : options) as DropdownOption[];\n\n return (\n
\n {_options.map(option => (\n input.onChange(value)}\n />\n ))}\n
\n );\n};\n","import React from 'react';\nimport {CheckboxAdapter, CheckboxAdapterProps} from './adapters/checkbox';\nimport {DatePickerAdapter} from './adapters/datepicker';\nimport {DropdownAdapter, DropdownAdapterProps} from './adapters/dropdown';\nimport {TextAreaAdapter, TextAreaAdapterProps} from './adapters/textarea';\nimport {FieldFactory} from './field-factory';\nimport {\n InputAdapter,\n InputAdapterProps,\n InputCurrencyAdapter,\n InputDecimalAdapter,\n InputMaskedAdapter,\n InputMaskedAdapterProps,\n InputFileUrlAdapter,\n} from './adapters/input';\nimport {\n RadioGroupAdapter,\n RadioGroupAdapterProps,\n} from './adapters/radio-group';\n\nexport const FieldCheckbox = FieldFactory({\n renderComponent: props => ,\n});\n\nexport const FieldDropdown = FieldFactory({\n renderComponent: props => ,\n});\n\nexport const FieldInput = FieldFactory({\n renderComponent: props => ,\n});\n\nexport const FieldInputCurrency = FieldFactory({\n renderComponent: props => ,\n});\n\nexport const FieldInputDecimal = FieldFactory({\n renderComponent: props => ,\n});\n\nexport const FieldInputFileUrl = FieldFactory({\n renderComponent: props => ,\n});\n\nexport const FieldInputMasked = FieldFactory({\n renderComponent: props => ,\n});\n\nexport const FieldRadioGroup = FieldFactory({\n renderComponent: props => ,\n});\n\nexport const FieldTextArea = FieldFactory({\n renderComponent: props => ,\n});\n\nexport const FieldDatePicker = FieldFactory({\n renderComponent: props => ,\n});\n","import {FORM_ERROR} from 'final-form';\nimport {Response} from '../api/generated';\n\nimport {\n camelCase,\n isPlainObject,\n keys,\n merge,\n reduce,\n set,\n toPath,\n} from 'lodash';\n\nconst flattenKeys = (obj, path: string[] = []) =>\n !isPlainObject(obj)\n ? {[path.join('.')]: obj}\n : reduce(\n obj,\n (acc, next, key) => merge(acc, flattenKeys(next, [...path, key])),\n {}\n );\n\nexport const getNestedKeys = object => {\n return keys(flattenKeys(object)).map(x => x || FORM_ERROR);\n};\n\nexport const mapErrors = (response: Response) => {\n return response.errors.reduce((errors, error) => {\n const errorPath = toPath(error.propertyName).map(camelCase);\n const errorMessage = error.errorMessage.replace(/'/gi, '');\n return set(errors, errorPath, errorMessage);\n }, {});\n};\n\nexport const getErrorMessages = (response: Response) =>\n response.errors.map(error => error.errorMessage.replace(/'/gi, ''));\n","import AccessibleAlert from '@reach/alert';\nimport React from 'react';\nimport {Message, MessageProps} from 'semantic-ui-react';\n\nexport const Alert = (props: MessageProps) => (\n \n);\n","import css from '@emotion/css/macro';\nimport {cx} from 'emotion';\nimport {FormApi} from 'final-form';\nimport {difference, get, isString} from 'lodash';\nimport {textInputs} from 'polished';\nimport React, {useCallback, useMemo} from 'react';\nimport {Form as SemanticForm} from 'semantic-ui-react';\nimport {getNestedKeys, mapErrors} from './map-formal-errors';\nimport {Response} from '../api/generated';\nimport {Alert} from '../components/alert';\nimport {themeColors} from '../styles';\nimport {Media} from '../styles/breakpoints';\n\nimport {\n Form as FinalForm,\n FormProps,\n FormRenderProps,\n useFormState,\n AnyObject,\n} from 'react-final-form';\n\ntype FinalFormProps = FormProps & {\n disabled?: boolean;\n disableLoading?: boolean;\n className?: string;\n autoComplete?: 'off';\n};\n\ntype NonFieldErrors = {\n form: FormApi;\n submitErrors?: object;\n};\n\nexport function Form(props: FinalFormProps) {\n const {\n className,\n children,\n render,\n onSubmit,\n disabled = false,\n disableLoading = false,\n autoComplete = undefined,\n ...finalFormProps\n } = props;\n const renderFn = (children || render) as (\n props: FormRenderProps\n ) => React.ReactNode;\n\n const _onSubmit = useCallback(\n async (values, form, callback) => {\n const response = await onSubmit(values, form, callback);\n\n if (response && response.hasErrors) {\n return mapErrors(response as Response);\n }\n\n return response;\n },\n [onSubmit]\n );\n\n return (\n \n onSubmit={_onSubmit}\n {...finalFormProps}\n render={formRenderProps => {\n const {\n handleSubmit,\n submitErrors,\n hasSubmitErrors,\n submitting,\n form,\n } = formRenderProps;\n\n return (\n \n {...{form, submitErrors}} />\n {renderFn(formRenderProps)}\n \n );\n }}\n />\n );\n}\n\nconst ErrorMessage = ({name}) => {\n const formState = useFormState();\n const errors = formState.submitErrors || {};\n if (errors[name] && isString(errors[name])) {\n return {errors[name]};\n }\n return null;\n};\n\nForm.ErrorMessage = ErrorMessage;\n\nfunction NonFieldErrors({\n form,\n submitErrors,\n}: NonFieldErrors) {\n const nonFieldErrors = useMemo(() => {\n const fields = form.getRegisteredFields();\n\n const errorKeys = getNestedKeys(submitErrors);\n return difference(errorKeys, fields);\n }, [form, submitErrors]);\n\n if (!nonFieldErrors.length || !submitErrors) {\n return null;\n }\n\n return (\n \n
    \n {nonFieldErrors.map(errorKey => (\n
  • {get(submitErrors, errorKey)}
  • \n ))}\n
\n
\n );\n}\n\nconst fullWidthFields = css`\n .form-row {\n display: block;\n\n .form-field {\n flex: 1;\n margin: 0 0 1rem 0;\n }\n }\n\n .form-field {\n width: 100%;\n }\n`;\n\nconst styles = css`\n &.ui.form {\n .ui.medium.header {\n font-weight: 500;\n margin-bottom: 1.5rem;\n }\n\n .form-row {\n display: flex;\n margin-left: -0.75rem;\n margin-right: -0.75rem;\n\n .form-field {\n flex: 1;\n margin: 0 0 1rem 0;\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n }\n }\n\n .form-field {\n margin-bottom: 1rem;\n :not(&.fluid) > & {\n width: calc(50% - 0.75rem);\n }\n }\n\n .sui-error-message {\n display: block;\n color: rgb(159, 58, 56);\n font-size: 0.85rem;\n margin-left: 0.2rem;\n }\n\n .error.field + .sui-error-message {\n margin-top: -0.9em;\n margin-left: 0.2rem;\n }\n\n .form-field-hint {\n display: block;\n margin: -0.9rem 0 0 0.2rem;\n font-size: 0.85rem;\n color: #666;\n max-width: 100%;\n }\n\n .field > label {\n color: ${themeColors.textLabel};\n font-weight: bold;\n }\n\n .form-actions {\n margin-top: 2rem;\n }\n\n &.disabled {\n .form-actions {\n display: none;\n }\n\n .disabled.field {\n opacity: 1;\n\n > label {\n opacity: 1;\n }\n }\n\n ${textInputs()} {\n background: #f1f1f1;\n color: #6b6b6b;\n &:focus {\n outline: none;\n background: #f1f1f1;\n color: #6b6b6b;\n }\n\n .dropdown,\n .selection.dropdown {\n background: #f1f1f1;\n color: #6b6b6b;\n &:focus {\n outline: none;\n background: #f1f1f1;\n color: #6b6b6b;\n }\n }\n }\n }\n\n ${Media('MobileMax')} {\n ${fullWidthFields};\n }\n\n .ui.modal > .content > & {\n ${fullWidthFields};\n }\n }\n`;\n","import css from '@emotion/css/macro';\nimport React from 'react';\nimport {Header} from 'semantic-ui-react';\n\nexport const FormSection: React.FC<{title: string}> = ({title, children}) => (\n <>\n
\n {title}\n
\n {children}\n \n);\n\nconst styles = css`\n &.ui.header {\n padding-top: 15px;\n\n &:first-of-type {\n padding-top: 0;\n }\n }\n`;\n","import {FieldCustomValue} from './adapters/custom-value';\nimport {Button} from './button';\nimport {FormContainer} from './container';\nimport {DebugFormState} from './debug-form-state';\nimport {FormRow} from './field-factory';\nimport * as Fields from './fields';\nimport {Form as BaseForm} from './form';\nimport {FormSection} from './section';\n\ntype Form = typeof BaseForm & {\n Container: typeof FormContainer;\n Section: typeof FormSection;\n Row: typeof FormRow;\n\n Button: typeof Button;\n Checkbox: typeof Fields.FieldCheckbox;\n DatePicker: typeof Fields.FieldDatePicker;\n Dropdown: typeof Fields.FieldDropdown;\n Input: typeof Fields.FieldInput;\n InputCurrency: typeof Fields.FieldInputCurrency;\n InputDecimal: typeof Fields.FieldInputDecimal;\n InputFileUrl: typeof Fields.FieldInputFileUrl;\n InputMasked: typeof Fields.FieldInputMasked;\n RadioGroup: typeof Fields.FieldRadioGroup;\n TextArea: typeof Fields.FieldTextArea;\n\n CustomValue: typeof FieldCustomValue;\n Debug: typeof DebugFormState;\n};\n\nexport const Form = BaseForm as Form;\n\nForm.Container = FormContainer;\nForm.Section = FormSection;\nForm.Row = FormRow;\n\nForm.Button = Button;\nForm.Checkbox = Fields.FieldCheckbox;\nForm.Dropdown = Fields.FieldDropdown;\nForm.Input = Fields.FieldInput;\nForm.InputCurrency = Fields.FieldInputCurrency;\nForm.InputDecimal = Fields.FieldInputDecimal;\nForm.InputFileUrl = Fields.FieldInputFileUrl;\nForm.InputMasked = Fields.FieldInputMasked;\nForm.RadioGroup = Fields.FieldRadioGroup;\nForm.TextArea = Fields.FieldTextArea;\nForm.DatePicker = Fields.FieldDatePicker;\nForm.CustomValue = FieldCustomValue;\n\nForm.Debug = DebugFormState;\n","import React from 'react';\nimport {FieldRenderProps, useField} from 'react-final-form';\nimport {Form} from 'semantic-ui-react';\n\ntype FieldCustomValue = {\n fieldName: string;\n fieldLabel?: string;\n render: (\n field: FieldRenderProps\n ) => JSX.Element | false | undefined;\n};\n\nexport const FieldCustomValue = ({\n fieldName,\n fieldLabel,\n render,\n}: FieldCustomValue) => {\n const field = useField(fieldName);\n return (\n
\n \n {fieldLabel ? (\n \n ) : (\n \n )}\n {render(field)}\n \n
\n );\n};\n","import React from 'react';\nimport {useFormState} from 'react-final-form';\nimport {Json} from '../components/json';\n\nexport const DebugFormState = ({full}: {full?: boolean}) => {\n const state = useFormState();\n const output = full ? state : state.values;\n\n return ;\n};\n","import React from 'react';\nimport {UsersService} from '../api/generated';\nimport {useUser} from '../auth/use-auth';\nimport {Form} from '../forms';\nimport {notifications} from '../utils/notification-service';\n\nexport const ChangePassword = ({onComplete}) => {\n const user = useUser();\n const id = user.id;\n\n const onSubmit = async values => {\n const response = await UsersService.updatePassword({\n id,\n body: {\n currentPassword: values.currentPassword || '',\n newPassword: values.newPassword || '',\n confirmNewPassword: values.confirmNewPassword || '',\n },\n });\n\n if (response.hasErrors) {\n return response;\n }\n\n notifications.success('Password Changed');\n\n if (onComplete) {\n onComplete();\n }\n };\n\n return (\n (\n <>\n \n \n \n\n
\n \n Change Password\n \n \n Cancel\n \n
\n \n )}\n />\n );\n};\n","import React from 'react';\nimport {Menu} from 'semantic-ui-react';\nimport {Link} from 'react-router-dom';\n\nexport const NavigationLink = ({partial = false, ...props}) => (\n {\n const isActive = partial ? isPartiallyCurrent : isCurrent;\n return {\n className: isActive ? 'item active' : 'item',\n };\n }}\n {...props}\n />\n);\n","import css from '@emotion/css/macro';\nimport {faExclamationTriangle} from '@fortawesome/pro-regular-svg-icons';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {cx} from 'emotion';\nimport React from 'react';\nimport {Env} from '../config/env-vars';\n\nconst envLabelMap = {\n local: 'LOCAL',\n development: 'TEST',\n stage: 'STAGING',\n};\n\nexport const envTag: string = envLabelMap[Env.name || ''];\n\nexport const NonProductionWarning: React.FC = ({children}) => {\n return Env.name !== 'production' ? (\n
\n
\n {envTag ? (\n <>\n \n   You are on the {envTag} environment.\n \n ) : null}\n
\n {children}\n
\n ) : null;\n};\nconst styles = css`\n .environment-warning {\n text-align: center;\n padding: 3px 0 2px;\n\n &.local {\n background-color: #000;\n color: #fff;\n }\n\n &.development {\n background-color: #e04761;\n color: #fff;\n }\n\n &.stage {\n background-color: #237190;\n color: #fff;\n }\n }\n`;\n","import * as Sentry from '@sentry/browser';\nimport {Env} from '../config/env-vars';\n\ntype GuardedResult =\n | ReturnType\n | DefaultValueType;\n\ntype GuardedFn = (\n ...args\n) => GuardedResult;\n\nfunction guard(\n fn: (param1: InputParam) => ReturnType | DefaultValue,\n defaultValue: ReturnType\n): (param1: InputParam) => ReturnType | DefaultValue;\nfunction guard(\n fn: (param1: InputParam1, param2: InputParam2) => ReturnType | DefaultValue,\n defaultValue: ReturnType\n): (param1: InputParam1, param2: InputParam2) => ReturnType | DefaultValue;\nfunction guard<\n InputParam1,\n InputParam2,\n InputParam3,\n ReturnType,\n DefaultValue = ReturnType\n>(\n fn: (\n param1: InputParam1,\n param2: InputParam2,\n param3: InputParam3\n ) => ReturnType | DefaultValue,\n defaultValue: ReturnType\n): (\n param1: InputParam1,\n param2: InputParam2,\n param3: InputParam3\n) => ReturnType | DefaultValue {\n const guarded: typeof fn = (...args) => {\n try {\n return fn(...args);\n } catch (error) {\n return handleError(error, defaultValue);\n }\n };\n\n return guarded;\n}\n\nfunction guardAsync(\n fn: (param1: InputParam) => Promise,\n defaultValue: ReturnType\n): (param1: InputParam) => Promise;\nfunction guardAsync<\n InputParam1,\n InputParam2,\n ReturnType,\n DefaultValue = ReturnType\n>(\n fn: (\n param1: InputParam1,\n param2: InputParam2\n ) => Promise,\n defaultValue: ReturnType\n): (\n param1: InputParam1,\n param2: InputParam2\n) => Promise;\nfunction guardAsync<\n InputParam1,\n InputParam2,\n InputParam3,\n ReturnType,\n DefaultValue = ReturnType\n>(\n fn: (\n param1: InputParam1,\n param2: InputParam2,\n param3: InputParam3\n ) => Promise,\n defaultValue: ReturnType\n): (\n param1: InputParam1,\n param2: InputParam2,\n param3: InputParam3\n) => Promise {\n const guarded: typeof fn = async (...args) => {\n try {\n return await fn(...args);\n } catch (error) {\n return handleError(error, defaultValue);\n }\n };\n\n return guarded;\n}\n\nfunction handleError(error: Error, defaultValue: T): T {\n if (Env.isProductionBuild) {\n Sentry.captureException(error);\n }\n return defaultValue;\n}\n\nexport {guard, guardAsync};\n","import {snakeCase, upperFirst} from 'lodash';\nimport {Optional} from 'utility-types';\nimport {guard} from './guard';\nimport {debug} from './logger';\nimport {AnyObject, KeyOf} from '../types';\nimport {\n AdvancedQueryColumnFilter,\n AdvancedQueryColumnSort,\n} from '../api/generated';\n\nconst DEFAULT_VALUE = {};\nconst parse = guard((input: string) => JSON.parse(input), DEFAULT_VALUE);\n\nexport function parseJson(input: string | undefined | null): T | undefined {\n if (!input) {\n debug.warn('empty json input:', input);\n return undefined;\n }\n\n const object = parse(input);\n if (object === DEFAULT_VALUE) {\n debug.warn('invalid json input:', input);\n return undefined;\n }\n\n return object;\n}\n\nexport function parseEncodedJson(\n input: string | undefined | null\n): T | undefined {\n if (!input) {\n return undefined;\n }\n\n try {\n return parseJson(window.atob(input));\n } catch (error) {\n return undefined;\n }\n}\n\nexport function encodeJson(object: AnyObject): string {\n try {\n return window.btoa(JSON.stringify(object));\n } catch (error) {\n return '';\n }\n}\n\nexport const titleCase = input =>\n snakeCase(input)\n .split('_')\n .map(upperFirst)\n .join(' ');\n\nexport interface AdvancedPagedSearch {\n searchFieldNames: KeyOf[];\n searchSearchText: string;\n searchExactMatch?: boolean;\n}\n\nexport type AdvancedPagedRequest = {\n page?: number;\n pageSize?: number;\n filtered?: AdvancedQueryColumnFilter[];\n sorted?: AdvancedQueryColumnSort[];\n} & Optional>;\n\nexport interface AdvancedPagedResult {\n items: T[];\n page: number;\n pageSize: number;\n pageCount: number;\n totalItemCount: number;\n}\n\nexport function normalizedAdvancedPagedResult(\n value: undefined | AdvancedPagedResult\n): AdvancedPagedResult {\n return (\n value || {\n items: [],\n page: 0,\n pageSize: 0,\n pageCount: 0,\n totalItemCount: 0,\n }\n );\n}\n","import produce from 'immer';\nimport {once} from 'lodash';\nimport thunkMiddleware, {ThunkMiddleware} from 'redux-thunk';\nimport actionCreatorFactory from 'typescript-fsa';\nimport {reducerWithInitialState} from 'typescript-fsa-reducers';\nimport {asyncFactory} from 'typescript-fsa-redux-thunk';\nimport {AsyncState, User} from './types/index';\nimport {parseJson} from './utils';\nimport {logger} from './utils/logger';\nimport {\n createStore as reduxCreateStore,\n combineReducers,\n compose,\n applyMiddleware,\n AnyAction,\n Store,\n} from 'redux';\n\nimport {\n OrganizationsService,\n OrganizationContextDto,\n OrganizationSummaryDto,\n UsersService,\n} from './api/generated';\nimport {Roles} from './api/generated/enums';\n\ntype GlobalState = {\n user: User;\n organizations: OrganizationSummaryDto[];\n context: AsyncState;\n sessionExpired: boolean;\n};\n\nexport type StoreState = {\n global: GlobalState;\n};\n\nexport type OrganizationContext = {\n organizationId?: number;\n organization: OrganizationContextDto | null;\n};\n\nexport let store: Store;\n\nconst composeEnhancers =\n (window['__REDUX_DEVTOOLS_EXTENSION_COMPOSE__'] as typeof compose) || compose;\nconst thunk: ThunkMiddleware = thunkMiddleware;\nconst create = actionCreatorFactory('GLOBAL');\nconst createAsync = asyncFactory(create);\n\nconst log = logger('meter-reading-system-store');\nconst savedContextKey = `last-selected-organization`;\n\nexport const setUser = create('SET_USER');\nexport const setSessionExpired = create('SET_SESSION_EXPIRED');\n\nexport const setContext = createAsync(\n 'SET_CONTEXT',\n async (organizationId) => {\n const {data} = await OrganizationsService.getContextById({\n id: organizationId,\n });\n localStorage.setItem(savedContextKey, JSON.stringify({organizationId}));\n\n return {\n organizationId,\n organization: data,\n };\n }\n);\n\ntype initializeContext = {\n context?: OrganizationContext;\n organizations: OrganizationSummaryDto[];\n};\n\nexport const initializeContext = createAsync(\n 'INITIALIZE_CONTEXT',\n async () => {\n const response = await OrganizationsService.getAll({\n pageSize: 0,\n });\n const currentUser = await await UsersService.getMe();\n\n // Idk how to avoid doing this because of ts. Talk to justin. (remove to find out why)\n if (!response || !response.data) {\n return {\n organizations: [] as OrganizationSummaryDto[],\n };\n }\n\n const lastKnownContext = parseJson(\n localStorage.getItem(savedContextKey)\n );\n\n log.debug('lastKnownContext', lastKnownContext);\n\n let organizationId =\n currentUser.data?.organizationId ?? response.data.items[0].id;\n\n if (\n lastKnownContext &&\n lastKnownContext.organizationId &&\n currentUser.data?.role === Roles['Global Admin']\n ) {\n organizationId = lastKnownContext.organizationId;\n }\n\n const {data} = await OrganizationsService.getById({\n id: organizationId,\n });\n\n return {\n organizations: response.data.items,\n context: {\n organizationId,\n organization: data,\n },\n };\n }\n);\n\nexport const fetchOrganizations = createAsync<\n void,\n OrganizationSummaryDto[],\n Error\n>('FETCH_ORGANIZATIONS', async () => {\n const {data} = await OrganizationsService.getAll({\n pageSize: 0,\n });\n\n if (!data) {\n return [] as OrganizationSummaryDto[];\n }\n\n return data.items;\n});\n\nexport const createStore = once((user: User) => {\n const initial: GlobalState = {\n user,\n organizations: [],\n context: {\n value: undefined,\n loading: true,\n error: undefined,\n },\n sessionExpired: false,\n };\n\n const globalStateReducer = reducerWithInitialState(initial)\n .case(setUser, (state, user) =>\n produce(state, (draft) => {\n draft.user = user;\n })\n )\n .case(setSessionExpired, (state) =>\n produce(state, (draft) => {\n draft.sessionExpired = true;\n })\n )\n .case(setContext.async.done, (state, response) =>\n produce(state, (draft) => {\n draft.context = {\n value: response.result,\n loading: false,\n error: undefined,\n };\n })\n )\n .case(initializeContext.async.started, (state) =>\n produce(state, (draft) => {\n draft.context.loading = true;\n })\n )\n .case(initializeContext.async.failed, (state, failure) =>\n produce(state, (draft) => {\n draft.context.loading = false;\n draft.context.error = failure.error;\n })\n )\n .case(initializeContext.async.done, (state, response) =>\n produce(state, (draft) => {\n const {context, organizations} = response.result;\n\n draft.context.value = context;\n draft.organizations = organizations;\n\n draft.context.loading = false;\n draft.context.error = undefined;\n })\n )\n .case(fetchOrganizations.async.done, (state, success) =>\n produce(state, (draft) => {\n draft.organizations = success.result;\n draft.context.value = {\n ...draft.context.value,\n } as OrganizationContext;\n })\n );\n\n const rootReducer = combineReducers({global: globalStateReducer});\n store = reduxCreateStore(\n rootReducer,\n composeEnhancers(applyMiddleware(thunk))\n );\n\n return store;\n});\n","import styled from '@emotion/styled/macro';\nimport {CreateStyled} from '@emotion/styled';\n\nexport type Theme = typeof defaultTheme;\n\nconst colors = {\n red3: '#E04761',\n red2: '#DA1F3F',\n red1: '#B31A34',\n red4: '#AA0000',\n red5: '#9F3A38',\n blue1: '#0A2233',\n blue2: '#0D3047',\n blue3: '#144A6F',\n blue4: '#3E6A89',\n blue5: '#94ACBD',\n white1: '#FFFFFF',\n white2: '#F5F5F5',\n grey1: '#979C9E',\n grey2: '#CBCFD1',\n black: '#1B1C1D',\n transparent: 'rgba(0,0,0,0)',\n};\n\nexport const payStarColors = {\n ...colors,\n primary: {\n red: colors.red2,\n blue: colors.blue3,\n grey: '#B8BEC0',\n },\n basicBoxShadow: 'rgba(34, 36, 38, 0.15)',\n textLabel: '#444',\n transparentHover: '#efefef',\n\n warning: '#712928',\n warningBackground: '#fff6f6',\n warningBoxShadow: colors.red5,\n warningText: '#7b341e',\n\n mutedText: colors.grey1,\n errorText: colors.red5,\n\n moneyPositive: 'green',\n moneyNegative: colors.red5,\n};\n\nexport const defaultTheme = {\n logoUrl: '',\n primaryColor: payStarColors.primary.blue,\n};\n\nexport default styled as CreateStyled;\n","import {useSelector} from 'react-redux';\nimport {StoreState, OrganizationContext} from './store';\n\nexport function useGlobalState(cb: (state: StoreState) => T) {\n return useSelector((state: StoreState) => cb(state));\n}\n\nexport const useOrganizationContext = () =>\n useGlobalState(state => state.global.context.value as OrganizationContext);\n\nexport const useOrganizations = () =>\n useGlobalState(state => state.global.organizations);\n","import {includes, some} from 'lodash';\nimport React from 'react';\nimport {useUser} from './use-auth';\nimport {AllPermissions, Roles} from '../api/generated/enums';\n\ntype Permissions = typeof AllPermissions[number];\ntype PermissionParam = Permissions | Permissions[];\ntype RoleParam = Roles | Roles[];\n\ntype AuthorizationConditions =\n | {\n permission: PermissionParam;\n role?: RoleParam;\n }\n | {\n permission?: PermissionParam;\n role: RoleParam;\n }\n | {\n permission: PermissionParam;\n role: RoleParam;\n };\n\nexport type AuthorizationProps = AuthorizationConditions & {\n strict?: boolean;\n};\n\nexport const useHasAuthorization = ({\n permission,\n role,\n strict,\n}: AuthorizationProps) => {\n const user = useUser();\n\n const permissions = Array.isArray(permission) ? permission : [permission];\n const roles = Array.isArray(role) ? role : [role];\n\n const hasPermission = some(permissions, x => includes(user.permissions, x));\n const hasRole = roles.includes(user.role);\n\n const isGlobalAdmin = !strict && user.role === 'Global Admin';\n\n return isGlobalAdmin || hasPermission || hasRole;\n};\n\nexport const AuthorizedComponent: React.FC = ({\n children,\n ...rest\n}) => {\n const isAuthorized = useHasAuthorization({...rest});\n return <>{isAuthorized && children};\n};\n","import css from '@emotion/css/macro';\nimport {reduce, values} from 'lodash';\nimport React, {useEffect, useMemo, useState} from 'react';\nimport {useDispatch} from 'react-redux';\nimport Select, {defaultTheme} from 'react-select';\nimport {Header, Menu as SemanticMenu} from 'semantic-ui-react';\nimport 'string_score';\nimport {useSubscription} from './hooks/use-subscription';\nimport {setContext, fetchOrganizations} from './store';\nimport {payStarColors} from './styles/styled';\nimport {logger} from './utils/logger';\n\nimport {useOrganizationContext, useOrganizations} from './selectors';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {faSort} from '@fortawesome/pro-solid-svg-icons';\nimport {ellipsis} from 'polished';\nimport {useHistory} from 'react-router-dom';\nimport {routes} from './routes';\nimport {useHasAuthorization} from './auth/authorization-helpers';\n\ntype SelectorOption = {\n value: number;\n label: string;\n};\n\nconst {colors} = defaultTheme;\n\nconst ContextSelector = () => {\n const dispatch = useDispatch();\n const context = useOrganizationContext();\n const organizations = useOrganizations();\n const history = useHistory();\n\n const isAdmin = useHasAuthorization({\n role: ['Global Admin'],\n });\n\n const log = logger('ContextSelector');\n\n useSubscription('organization-updated', e => {\n log.info('organization-updated', e);\n dispatch(fetchOrganizations());\n if (context.organizationId) {\n dispatch(setContext(context.organizationId));\n }\n });\n\n const options = useMemo(() => {\n return values(\n reduce(\n organizations,\n (contextMap, organization) => {\n let orgFromSelectorGroup: SelectorOption =\n contextMap[organization.id];\n\n if (!orgFromSelectorGroup) {\n orgFromSelectorGroup = {\n label: organization.name,\n value: organization.id,\n };\n\n contextMap[organization.id] = orgFromSelectorGroup;\n }\n\n return contextMap;\n },\n {}\n )\n );\n }, [organizations]);\n\n const [isOpen, setIsOpen] = useState(false);\n const [value, setValue] = useState(() => {\n const key = `${context.organizationId || ''}`;\n\n var bar = options.find(x => x.value.toString() === key) as SelectorOption;\n\n return bar;\n });\n\n useEffect(() => {\n const organizationId = context.organizationId || undefined;\n\n const selectedOption = options.find(x => x.value === organizationId);\n\n setValue(selectedOption as SelectorOption);\n }, [context, options]);\n\n function toggleOpen() {\n setIsOpen(!isOpen);\n }\n\n function onSelectChange(value: SelectorOption) {\n dispatch(setContext(value.value));\n toggleOpen();\n history.push(routes.portal.dashboard);\n }\n\n return (\n \n \n
\n Organization\n {value ?
{value.label}
:
Error
}\n
\n \n
\n \n }\n css={styles}\n >\n {\n if (e.keyCode === 27) {\n setIsOpen(false);\n }\n }}\n theme={theme => ({\n ...theme,\n colors: {\n ...theme.colors,\n primary25: payStarColors.primary.blue,\n primary: payStarColors.blue5,\n },\n })}\n />\n \n );\n};\n\nconst selectStyles = {\n control: (provided: any) => ({...provided, minWidth: 180, margin: 8}),\n menu: () => ({boxShadow: 'inset 0 1px 0 rgba(0, 0, 0, 0.1)'}),\n option: (provided, state) => {\n let color = '#000';\n let backgroundColor = '#FFF';\n let fontWeight = 'normal';\n let fontStyle = 'normal';\n\n if (state.isFocused) {\n backgroundColor = payStarColors.blue3;\n color = '#FFF';\n }\n\n if (state.isSelected) {\n fontWeight = 'bold';\n fontStyle = 'italic';\n }\n return {\n ...provided,\n color,\n backgroundColor,\n fontStyle,\n fontWeight,\n paddingLeft: 25,\n };\n },\n};\n\nconst filterOptions = (candidate, input) => {\n if (input) {\n const {organizationName = ''} = candidate.data;\n return (\n organizationName.score(input) > 0.4 ||\n candidate.label.score(input, 0.5) > 0.5\n );\n }\n return true;\n};\n\nconst styles = css`\n .ui.header {\n margin-top: 0px;\n margin-bottom: 0px;\n }\n\n .item {\n border-radius: 0 !important;\n border-left: solid 1px #e4e4e4 !important;\n border-right: solid 1px #e4e4e4 !important;\n padding: 0.585714em 1.92857143em 0.185714em !important;\n margin-right: 2rem !important;\n\n @media only screen and (max-width: 500px) {\n margin-right: 0 !important;\n }\n\n .selected-organization > * {\n ${ellipsis(200)}\n }\n\n [data-icon] {\n color: #5f5f5f;\n margin-left: 15px !important;\n }\n }\n`;\n\nconst dropdownStyles = css`\n position: relative;\n @media only screen and (max-width: 767px) {\n overflow-x: hidden;\n }\n`;\n\nconst Menu = props =>
;\n\nconst menuStyles = css`\n margin-top: 5px;\n position: absolute;\n z-index: 2;\n width: auto;\n padding: 0 10px;\n\n @media only screen and (max-width: 767px) {\n position: fixed;\n z-index: 10;\n }\n\n > div {\n background-color: white;\n border-radius: 4px;\n box-shadow: 0 0 0 1px hsla(218, 50%, 10%, 0.1),\n 0 4px 11px hsla(218, 50%, 10%, 0.1);\n padding-top: 1px;\n }\n`;\n\nconst Blanket = props => (\n \n);\n\nconst Dropdown = ({children, isOpen, target, onClose, className = ''}) => (\n
\n {target}\n {isOpen ? {children} : null}\n {isOpen ? : null}\n
\n);\n\nconst Svg = p => (\n \n);\n\nconst DropdownIndicator = () => (\n
\n \n \n \n
\n);\n\nexport {ContextSelector};\n","import css from '@emotion/css/macro';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {lighten} from 'polished';\nimport React from 'react';\nimport {NavLink} from 'react-router-dom';\nimport {routes} from './routes';\nimport {themeColors} from './styles';\nimport {Breakpoints, Media} from './styles/breakpoints';\nimport {User} from './types';\nimport {\n faBars,\n faBuilding,\n faFileUser,\n faTachometer,\n} from '@fortawesome/pro-regular-svg-icons';\nimport {Dropdown, Menu, Responsive} from 'semantic-ui-react';\n\ntype PrimaryNavigation = {\n user: User;\n};\n\nexport const PrimaryNavigation: React.FC = () => {\n return (\n \n \n \n \n \n \n \n \n );\n};\n\nconst DesktopNavigation = () => (\n \n \n Meter Readings\n \n\n \n Accounts\n \n \n);\n\nconst MobileNavigation: React.FC = () => (\n \n \n \n }\n icon=\"\"\n >\n \n \n Organizations\n \n\n \n Accounts\n \n \n \n);\n\nconst styles = css`\n &.top-navigation.ui.secondary.menu {\n z-index: 3;\n margin: 0;\n padding: 0 25px 0 10px;\n\n ${Media('TabletMax')} {\n padding: 0 10px 0 0;\n }\n\n .ui.header {\n color: ${themeColors.black1};\n font-weight: normal;\n }\n\n .logo {\n height: 30px;\n }\n\n .ui.dropdown .menu {\n box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.3);\n }\n\n .ui.secondary.menu.desktop-navigation {\n border-bottom-color: #fff !important;\n\n .item {\n transition: background-color 0.5s ease;\n transition: color 0.5s ease;\n color: ${themeColors.textLabel};\n cursor: pointer;\n text-align: left;\n border-bottom-color: #fff;\n padding-bottom: 1rem;\n\n &.header {\n margin-top: 10px;\n margin-bottom: 0;\n padding-bottom: 5px;\n cursor: default;\n }\n\n &:hover:not(.header) {\n color: ${themeColors.black1};\n background: rgba(0, 0, 0, 0.05);\n }\n\n &.active,\n &.active:hover {\n background-color: ${themeColors.white2};\n\n > .label {\n background-color: #fff;\n color: ${lighten(0.05, themeColors.black1)};\n }\n }\n\n &.dropdown {\n .item.active,\n .item.active:hover {\n border: none;\n background-color: #fff;\n }\n }\n\n > i.icon {\n float: none;\n margin-right: 10px;\n }\n\n > .label {\n background-color: #767676;\n }\n }\n\n .logo-container {\n padding: 10px;\n\n .logo {\n width: 50%;\n margin: 10px auto;\n max-height: 40px;\n }\n\n .terms {\n display: block;\n text-align: center;\n padding: 10px 0;\n }\n }\n\n svg {\n width: 1.18em;\n margin: 0 10px 0 0;\n opacity: 0.9;\n color: ${themeColors.black1};\n }\n }\n\n .ui.dropdown.mobile-navigation {\n svg {\n width: 1.18em;\n margin: 0 10px 0 0;\n opacity: 0.9;\n color: ${themeColors.black1};\n }\n }\n\n .user-icon.ui.item {\n height: 30px;\n width: 30px;\n display: flex;\n padding: 0;\n border-radius: 30px;\n background: ${themeColors.black1};\n color: #fff;\n align-items: center;\n justify-content: center;\n line-height: 1.5rem;\n\n &:hover,\n &:focus,\n &:active {\n background: ${themeColors.black1};\n }\n }\n\n .user-icon-initial {\n display: block;\n text-align: center;\n padding-left: 1px;\n font-size: 1rem;\n }\n }\n`;\n","import {useEffect} from 'react';\nimport {useLocation} from 'react-router-dom';\n\ntype LocationNotifierProps = {\n onChange: (location: string) => void;\n};\n\nexport const LocationNotifier = ({onChange}: LocationNotifierProps) => {\n const location = useLocation();\n\n useEffect(() => {\n if (location) {\n onChange(location.pathname);\n }\n }, [location, onChange]);\n\n return null;\n};\n","import React from 'react';\nimport {css} from '@emotion/core';\nimport {cx} from 'emotion';\n\nexport const Flex = () =>
Namespace Only. Do Not Use
;\n\ntype FlexProps = {\n className?: string;\n fill?: boolean;\n};\n\ntype RowProps = FlexProps & {\n align?: 'top' | 'center' | 'bottom';\n vAlign?: 'top' | 'center' | 'bottom';\n};\n\ntype ColProps = FlexProps & {\n align?: 'left' | 'center' | 'right';\n};\n\nconst Row: React.FC = props => {\n const className = cx('row', props.className, {\n [props.align as string]: !!props.align,\n [props.vAlign as string]: !!props.vAlign,\n fill: !!props.fill,\n });\n const {children} = props;\n\n return (\n
\n {children}\n
\n );\n};\n\nconst Col: React.FC = props => {\n const className = cx('column', props.className, {\n [props.align as string]: !!props.align,\n fill: !!props.fill,\n });\n const {children} = props;\n\n return (\n
\n {children}\n
\n );\n};\n\nconst Fill: React.FC<{className?: string}> = ({children, className}) => (\n
{children}
\n);\nconst Box: React.FC<{className?: string}> = ({children, className}) => (\n
{children}
\n);\n\nFlex.Row = Row;\nFlex.Col = Col;\nFlex.Fill = Fill;\nFlex.Box = Box;\n\nconst styles = css`\n &.row {\n display: flex;\n flex-direction: row;\n\n @media only screen and (max-width: 767px) {\n display: block;\n\n > * {\n margin-bottom: 1rem;\n }\n }\n\n &.top {\n align-items: flex-start;\n }\n\n &.center {\n align-items: center;\n }\n\n &.bottom {\n align-items: flex-end;\n }\n }\n\n &.column {\n display: flex;\n flex-direction: column;\n\n &.center {\n align-items: center;\n }\n\n &.bottom {\n align-items: flex-end;\n }\n }\n\n .fill {\n flex: 1;\n }\n`;\n","import css from '@emotion/css/macro';\nimport {isArray, last, take} from 'lodash';\nimport React, {Fragment} from 'react';\nimport {Link} from 'react-router-dom';\nimport {Breadcrumb, Header} from 'semantic-ui-react';\nimport {Flex} from './flex';\nimport {themeColors} from '../styles';\nimport {Media} from '../styles/breakpoints';\n\ntype BreadcrumbPart = {\n title: string;\n url?: string;\n};\n\nexport const PageTitle = ({title}) => {\n const parts = (isArray(title) ? title : [{title}]) as BreadcrumbPart[];\n const currentPage = last(parts);\n const breadcrumbs = take(parts, parts.length - 1);\n return (\n \n \n
{currentPage?.title}
\n
\n {breadcrumbs.length > 0 && (\n <>\n
\n \n \n {breadcrumbs.map((crumb, index) => (\n \n {index < breadcrumbs.length - 1 ? (\n <>\n \n {crumb.title}\n \n /\n \n ) : (\n \n {crumb.title}\n \n )}\n \n ))}\n \n \n \n )}\n \n
\n );\n};\n\nconst styles = css`\n .page-header {\n margin-top: 0;\n font-weight: normal;\n }\n\n .ui.breadcrumb a {\n color: ${themeColors.grey1};\n }\n\n .breadcrumbs-separator {\n height: 22px;\n width: 1px;\n margin: 0 20px;\n background-color: #dbdce7;\n\n ${Media('MobileMax')} {\n display: none;\n }\n }\n\n margin-top: 0px;\n margin-bottom: 20px;\n`;\n","import css from '@emotion/css/macro';\nimport {cx} from 'emotion';\nimport React from 'react';\nimport {Container} from 'semantic-ui-react';\nimport {PageTitle} from './components/page-title';\nimport {Media} from './styles/breakpoints';\n\ntype TitlePart = {\n title: string;\n url?: string;\n};\n\ntype Props = {\n title: string | TitlePart[];\n className?: string;\n};\n\nexport const BasicPage: React.FC = React.forwardRef(\n ({title, children, className}, ref: any) => {\n return (\n \n
\n \n {children}\n
\n \n );\n }\n);\n\nconst styles = css`\n &.ui.container {\n max-width: 1380px !important;\n\n ${Media('MobileMax')} {\n margin-left: 0 !important;\n margin-right: 0 !important;\n }\n }\n\n > .content {\n padding: 25px;\n\n ${Media('MobileMax')} {\n padding: 25px 15px;\n }\n }\n`;\n","import css from '@emotion/css/macro';\nimport React from 'react';\nimport {Loader} from 'semantic-ui-react';\nimport {Alert} from './alert';\nimport {DelayedLoadingContainer} from './delayed-loading-container';\n\ntype AsyncStateContainer = {\n loading: boolean;\n error?: Error;\n delayInMs?: number;\n children: any;\n};\n\nexport const AsyncStateContainer = ({\n loading,\n error,\n children,\n delayInMs,\n}: AsyncStateContainer) => {\n if (loading) {\n return (\n \n \n \n
\n \n );\n }\n\n if (error) {\n return {error.message};\n }\n\n return children;\n};\n","import React, {useState} from 'react';\nimport {Icon, Popup, PopupProps} from 'semantic-ui-react';\nimport {Button} from '../forms/button';\n\ntype DeleteButton = Omit & {\n onConfirm: () => void;\n loading?: boolean;\n text?: string;\n confirmPosition?: PopupProps['position'];\n loadingText?: string;\n confirmText?: string;\n icon?: boolean;\n};\n\nexport const DeleteButton = ({\n onConfirm,\n loading,\n text = 'Delete',\n loadingText = 'Deleting...',\n confirmText = 'Are you sure?',\n confirmPosition = 'right center',\n icon,\n ...props\n}: DeleteButton) => {\n const [open, setOpen] = useState(false);\n const toggleOpen = () => {\n setOpen(!open);\n };\n\n const onClose = () => {\n setOpen(false);\n };\n\n const onConfirmClick = () => {\n onConfirm();\n onClose();\n };\n\n return (\n \n {icon && }\n {icon && ' '}\n {loading ? loadingText : text}\n \n }\n content={\n \n {confirmText}\n \n }\n position={confirmPosition}\n on=\"click\"\n />\n );\n};\n","import React, {useMemo} from 'react';\nimport {useState} from 'react';\nimport {Link, useHistory, useRouteMatch} from 'react-router-dom';\nimport {useAsync, useAsyncFn} from 'react-use';\nimport {Divider, Form as SUIForm} from 'semantic-ui-react';\nimport {AccountsService, RateTablesService} from '../api/generated';\nimport {BasicPage} from '../basic-page';\nimport {AsyncStateContainer} from '../components/async-state-container';\nimport {DeleteButton} from '../components/confirm-delete-button';\nimport {Form} from '../forms';\nimport {useNotification} from '../hooks/use-notifications';\nimport {routes, buildPath} from '../routes';\nimport {useOrganizationContext} from '../selectors';\n\nexport const AccountCreate = () => {\n const history = useHistory();\n const notifications = useNotification();\n const context = useOrganizationContext();\n const organizationId = context.organizationId as number;\n\n const [manual, setManual] = useState();\n\n const fetchRateTables = useAsync(async () => {\n const {data} = await RateTablesService.getAllByOrganization({\n organizationId,\n });\n\n if (data === null) return null;\n\n return data.items;\n });\n\n const rateTables = fetchRateTables.value || undefined;\n\n const mappedRateTables = useMemo(\n () =>\n (rateTables || []).map((x) => ({\n key: `${x.name}`,\n text: `${x.name}`,\n value: (x.id as number) || undefined,\n })),\n [rateTables]\n );\n\n const breadcrumbs = [\n {title: 'Accounts', url: routes.portal.accounts.listing},\n {title: 'Create'},\n ];\n\n const onSubmit = async (values) => {\n values.organizationId = organizationId;\n values.rateTableId = !manual ? values.rateTableId : null;\n values.rateCode = manual ? values.rateCode : null;\n var confirmCreate = true;\n\n if (values.rateCode) {\n const rateTableByRateCodeResponse = await RateTablesService.getByRateCode(\n {rateCode: values.rateCode, organizationId: organizationId}\n );\n if (!rateTableByRateCodeResponse || !rateTableByRateCodeResponse.data) {\n confirmCreate = window.confirm(\n 'There seems to be no rate table associated with the inputted rate code. You will need to manually add a rate table with the same rate code in order to submit readings.'\n );\n }\n }\n\n if (!values.readingAmount) {\n confirmCreate = window.confirm(\n 'This will create an account without an initial meter reading. You will need to add a meter reading manually if you proceed.'\n );\n }\n\n if (confirmCreate) {\n const response = await AccountsService.create({body: values});\n if (response.hasErrors) {\n return response;\n }\n\n notifications.success('Account Created');\n history.push(routes.portal.accounts.listing);\n }\n };\n\n return (\n \n \n (\n <>\n \n \n \n
\n \n Create Account\n \n \n Cancel\n \n
\n \n )}\n />\n
\n
\n );\n};\n\nexport const AccountUpdate = () => {\n const history = useHistory();\n const match = useRouteMatch<{id: string}>();\n const id = Number(match.params.id);\n const notifications = useNotification();\n const context = useOrganizationContext();\n const organizationId = context.organizationId as number;\n\n const [manual, setManual] = useState();\n\n const fetchAccount = useAsync(async () => {\n const {data} = await AccountsService.getById({\n id,\n });\n\n if (!data?.rateTableId) {\n setManual(true);\n }\n\n return data;\n }, [id]);\n\n const account = fetchAccount.value || undefined;\n\n const fetchRateTables = useAsync(async () => {\n const {data} = await RateTablesService.getAllByOrganization({\n organizationId,\n });\n\n if (data === null) return null;\n\n return data.items;\n });\n\n const rateTables = fetchRateTables.value || undefined;\n\n const mappedRateTables = useMemo(\n () =>\n (rateTables || []).map((x) => ({\n key: `${x.name}`,\n text: `${x.name}`,\n value: x.id as number | undefined,\n })),\n [rateTables]\n );\n\n const breadcrumbs = [\n {title: 'Accounts', url: routes.portal.accounts.listing},\n {title: account ? account.name : ''},\n ];\n\n const onSubmit = async (values) => {\n values.rateTableId = !manual ? values.rateTableId : null;\n values.rateCode = manual ? values.rateCode : null;\n var confirmCreate = true;\n\n if (values.rateCode) {\n const rateTableByRateCodeResponse = await RateTablesService.getByRateCode(\n {rateCode: values.rateCode, organizationId: organizationId}\n );\n\n if (\n (!rateTableByRateCodeResponse || !rateTableByRateCodeResponse.data) &&\n confirmCreate\n ) {\n confirmCreate = window.confirm(\n 'There seems to be no rate table associated with the inputted rate code. You will need to manually add a rate table with the same rate code in order to submit readings.'\n );\n }\n }\n const response = await AccountsService.update({id, body: values});\n if (response.hasErrors) {\n return response;\n }\n notifications.success('Account Updated');\n history.push(buildPath(routes.portal.accounts.dashboard, {id}));\n };\n\n const [deleteAccountState, deleteAccount] = useAsyncFn(async () => {\n const response = await AccountsService.deleteById({id});\n if (response.hasErrors) {\n var errorMessage = response.errors.reduce((acc, item) => {\n return `${acc} \\n ${item.errorMessage}`;\n }, '');\n\n notifications.error(errorMessage);\n } else {\n notifications.success('Account successfully deleted');\n history.push(routes.portal.accounts.listing, {id: id});\n }\n });\n\n return (\n \n \n \n (\n <>\n \n \n \n
\n \n Update Account\n \n \n Cancel\n \n\n \n
\n \n )}\n />\n
\n
\n
\n );\n};\n\ntype FormFields = {\n rateTableOptions: {\n key: string;\n text: string;\n value: number | undefined;\n }[];\n isCreate: boolean;\n manual: boolean | undefined;\n setManual: (checked: boolean | undefined) => void;\n};\n\nconst FormFields = (props: FormFields) => {\n return (\n <>\n \n \n \n \n \n \n \n \n \n \n \n \n \n {props.isCreate && (\n \n \n \n )}\n \n \n \n\n \n {\n props.setManual(checked);\n }}\n />\n {props.manual ? (\n \n \n \n ) : (\n \n \n \n )}\n \n );\n};\n","import {useState} from 'react';\nimport {useDebouncedCallback} from 'use-debounce';\n\nexport function useDebouncedState(defaultValue: T, delay) {\n const [value, setValue] = useState(defaultValue);\n const [debouncedSetValue] = useDebouncedCallback(value => {\n setValue(value);\n }, delay);\n\n return [value, debouncedSetValue] as [T, (newValue: T) => void];\n}\n","import {useState, useEffect} from 'react';\n\nexport const useDelayedExpiration = ({isActive = false, delayInMs = 750}) => {\n const [timeoutExpired, setTimeoutExpired] = useState(false);\n\n useEffect(() => {\n let id;\n\n if (isActive) {\n id = setTimeout(() => {\n setTimeoutExpired(true);\n }, delayInMs);\n } else {\n setTimeoutExpired(false);\n }\n\n return () => {\n if (id) {\n clearTimeout(id);\n }\n };\n }, [delayInMs, isActive]);\n\n return timeoutExpired;\n};\n","import {faCopy} from '@fortawesome/pro-regular-svg-icons';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport copy from 'copy-to-clipboard';\nimport {cx} from 'emotion';\nimport React from 'react';\nimport {Button, ButtonProps} from 'semantic-ui-react';\nimport {useNotification} from '../hooks/use-notifications';\n\ntype CopyButton = {\n value: string;\n description?: string;\n} & ButtonProps;\n\nexport const CopyButton = (props: CopyButton) => {\n let {value, description, className, ...buttonProps} = props;\n const notifications = useNotification();\n\n if (!description) {\n description = `\"${value}\"`;\n }\n\n return (\n {\n copy(value);\n notifications.info(`${description} copied to clipboard`);\n }}\n className={cx('clear no-focus copy-button', className)}\n {...buttonProps}\n >\n \n \n );\n};\n","import ReachTooltip from '@reach/tooltip';\nimport React from 'react';\nimport css from '@emotion/css/macro';\n\ntype Tooltip = {\n label: string;\n};\n\nexport const Tooltip: React.FC = ({label, children}) => (\n \n {children}\n \n);\n\nconst styles = css`\n margin-top: 0.4rem;\n`;\n","import {useCallback, useState} from 'react';\n\ninterface Cache {\n [key: string]: any;\n}\n\nexport const cache: Cache = {};\n\nexport function useCachedState(initialValue: T, persistKey: string) {\n const persistedValue: T = cache[persistKey];\n const [value, setValue] = useState(() => persistedValue || initialValue);\n\n const handleUpdateValue = useCallback(\n (newValue: T) => {\n cache[persistKey] = newValue;\n setValue(newValue);\n },\n [persistKey]\n );\n\n return [value, handleUpdateValue] as [T, (newValue: T) => void];\n}\n","import css from '@emotion/css/macro';\nimport React, {useState} from 'react';\nimport {useMedia} from 'react-use';\nimport {Dropdown, Pagination} from 'semantic-ui-react';\nimport {useCachedState} from './use-cached-state';\nimport {Flex} from '../components/flex';\nimport {Media, MediaSizes} from '../styles/breakpoints';\n\ntype InitialPaginationState = {\n initialPage?: number;\n initialPageSize?: number;\n};\n\ntype PaginationResult = {\n pageNumber: number;\n pageSize: number;\n render: (totalPages: number, totalRows: number) => React.ReactElement;\n};\n\nconst defaultPageState = {\n initialPage: 1,\n initialPageSize: 25,\n};\n\nconst pageSizeOptions = [\n {key: 1, text: '10', value: 10},\n {key: 2, text: '25', value: 25},\n {key: 3, text: '50', value: 50},\n];\n\nexport const usePagination = (\n initialState?: InitialPaginationState\n): PaginationResult => {\n const defaultState = initialState\n ? {\n ...defaultPageState,\n ...initialState,\n }\n : defaultPageState;\n\n const [pageNumber, setPageNumber] = useState(defaultState.initialPage);\n const [pageSize, setPageSize] = useCachedState(\n defaultState.initialPageSize,\n 'lines-per-page'\n );\n\n const useSmallPagination = useMedia(`(${MediaSizes.MobileMax})`);\n const useMediumPagination = useMedia(`(${MediaSizes.TabletMax})`);\n\n let paginationProps = {};\n\n const render = (totalPages, totalRows) => {\n const maxPage = Math.min(pageNumber, totalPages);\n const pageStart = (maxPage - 1) * pageSize + 1;\n const pageStop = Math.min(maxPage * pageSize, totalRows);\n\n if (useMediumPagination) {\n paginationProps = {\n ...paginationProps,\n boundaryRange: 0,\n ellipsisItem: null,\n };\n }\n\n if (useSmallPagination) {\n paginationProps = {\n ...paginationProps,\n fluid: true,\n widths: totalPages > 3 ? 5 : totalPages + 2,\n };\n }\n\n return (\n
\n \n \n {totalPages > 0 && (\n \n setPageNumber(Number(activePage))\n }\n firstItem={null}\n lastItem={null}\n {...paginationProps}\n />\n )}\n \n \n {totalRows > 0 && (\n \n {`Showing ${pageStart} - ${pageStop} of ${totalRows}`}\n setPageSize(Number(value))}\n options={pageSizeOptions}\n selection\n compact\n value={pageSize}\n />\n \n )}\n \n \n
\n );\n };\n\n return {\n pageNumber,\n pageSize,\n render,\n };\n};\n\nconst styles = css`\n .lines-per-page {\n display: inline-flex;\n align-items: center;\n\n ${Media('MobileMax')} {\n display: flex;\n\n .current-page {\n flex: 1;\n }\n }\n\n .ui.dropdown {\n margin-left: 20px;\n }\n }\n`;\n","import css from '@emotion/css/macro';\nimport {faSort, faSortDown, faSortUp} from '@fortawesome/pro-duotone-svg-icons';\nimport {faFileInvoice} from '@fortawesome/pro-regular-svg-icons';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {cx} from 'emotion';\nimport {isFunction} from 'lodash';\nimport {transparentize} from 'polished';\nimport React, {ReactNode, useRef, useState} from 'react';\nimport {Link} from 'react-router-dom';\nimport {useAsyncRetry} from 'react-use';\nimport {useDebouncedState} from './use-debounced-state';\nimport {useDelayedExpiration} from './use-delay-expiration';\nimport {SubscriptionEvents, useSubscription} from './use-subscription';\nimport {AdvancedQueryPage, Response} from '../api/generated';\nimport {Alert} from '../components/alert';\nimport {CopyButton} from '../components/copy-button';\nimport {Flex} from '../components/flex';\nimport {Tooltip} from '../components/tooltip';\nimport {usePagination} from '../hooks/use-pagination';\nimport {buildPath} from '../routes';\nimport {themeColors} from '../styles';\nimport {Media} from '../styles/breakpoints';\nimport {notifications} from '../utils/notification-service';\n/* eslint-disable no-restricted-syntax */\n\nimport {\n faPencil,\n IconDefinition,\n faFilter,\n} from '@fortawesome/pro-regular-svg-icons';\nimport {\n KeysOfType,\n RequireOnlyOne,\n AdvancedPagedSearch,\n AdvancedPagedRequest,\n} from '../types';\nimport {\n Header,\n Icon,\n Segment,\n Table,\n TableCellProps,\n Input,\n Button,\n TableRowProps,\n Loader,\n Dimmer,\n TableProps,\n} from 'semantic-ui-react';\n\ntype ColumnRenderProps = RequireOnlyOne<\n {\n column?: KeysOfType;\n render?: (item: TDto) => ReactNode;\n },\n 'column' | 'render'\n>;\n\ntype ColumnConfig = {\n header: string | React.ReactNode;\n cellProps?: TableCellProps;\n copy?: boolean | ((item: TDto) => string);\n sortable?: KeysOfType;\n} & ColumnRenderProps;\n\ntype RenderButton = {\n item: {id: number};\n route: string;\n descriptor: string;\n fontAwesomeIcon?: IconDefinition; \n disabled?: boolean;\n};\n\ntype RenderEditButton = {\n item: {id: number};\n route: string;\n descriptor: string;\n};\n\ntype RenderViewButton = {\n item: {id: number};\n route: string;\n descriptor: string;\n};\n\ntype RuntimeConfig = {\n actions?: React.ReactNode;\n filter?: {\n getParams: () => TAdditionalRequestParams;\n render: () => JSX.Element;\n };\n};\n\ntype SortState = {\n column: KeysOfType;\n direction: 'ASC' | 'DESC';\n};\n\nexport type PagedDataTableConfig = {\n columns: ColumnConfig[];\n defaultSort: SortState;\n searchFieldNames: KeysOfType[];\n rowProps?: (item: TDto) => TableRowProps;\n tableProps?: TableProps;\n refetchEvent?: SubscriptionEvents;\n};\n\nexport function usePagedDataTable(\n pagedFetchAction: (\n request: AdvancedPagedRequest\n ) => Promise>>,\n config: PagedDataTableConfig,\n runtimeConfig?: RuntimeConfig\n): ReactNode;\nexport function usePagedDataTable(\n pagedFetchAction: (\n request: AdvancedPagedRequest & TAdditionalRequestParams\n ) => Promise>>,\n config: PagedDataTableConfig,\n runtimeConfig?: RuntimeConfig\n): ReactNode {\n const pagination = usePagination();\n const [search, setSearch] = useDebouncedState('', 350);\n const [showFilters, setShowFilters] = useState(false);\n const [sortState, setSortState] = useState>(\n () => config.defaultSort\n );\n\n const cachedResult = useRef | null | undefined>();\n const filterState = runtimeConfig?.filter?.getParams();\n\n const fetchData = useAsyncRetry(async () => {\n const searchParams: AdvancedPagedSearch = search\n ? {\n searchFieldNames: config.searchFieldNames,\n searchSearchText: search,\n }\n : ({} as AdvancedPagedSearch);\n\n const sortParams: AdvancedPagedRequest = sortState\n ? {\n sorted: [\n {\n fieldName: sortState.column as string,\n descending: sortState.direction === 'DESC',\n },\n ],\n }\n : {};\n\n const params = {\n page: pagination.pageNumber,\n pageSize: pagination.pageSize,\n ...searchParams,\n ...sortParams,\n ...filterState,\n };\n\n try {\n const {data, hasErrors} = await pagedFetchAction(\n params as Parameters['0']\n );\n if (hasErrors) {\n notifications.error('Failed to fetch data');\n } else {\n cachedResult.current = data;\n return data;\n }\n } catch (error) {\n notifications.error('Failed to fetch data');\n }\n }, [\n config.searchFieldNames,\n filterState,\n pagedFetchAction,\n pagination.pageNumber,\n pagination.pageSize,\n search,\n sortState,\n ]);\n\n useSubscription(config.refetchEvent || '__NEVER__', () => {\n fetchData.retry();\n });\n\n const showLoading = useDelayedExpiration({\n isActive: fetchData.loading,\n delayInMs: 350,\n });\n\n const normalizedData = normalizedAdvancedPagedResult(\n cachedResult.current\n );\n\n return (\n <>\n \n \n \n {\n setSearch(value);\n }}\n icon=\"search\"\n placeholder=\"Search\"\n className=\"table-search\"\n action={\n runtimeConfig?.filter && (\n <>\n setShowFilters(!showFilters)}\n >\n \n \n \n )\n }\n actionPosition={runtimeConfig?.filter && 'left'}\n />\n \n {runtimeConfig?.actions}\n \n {showFilters && runtimeConfig?.filter && runtimeConfig.filter.render()}\n {fetchData.error ? (\n {fetchData.error.message}\n ) : normalizedData.items.length === 0 && !fetchData.loading ? (\n \n
\n \n No results found\n
\n
\n ) : normalizedData.items.length > 0 ? (\n <>\n \n \n \n \n {config.columns.map((column, columnIndex) => {\n const key =\n (column.column as string) || `column_${columnIndex}`;\n\n let sortIcon: IconDefinition | undefined;\n\n if (column.sortable) {\n sortIcon =\n column.sortable &&\n sortState?.column === (column.sortable as string)\n ? sortState.direction === 'ASC'\n ? faSortUp\n : faSortDown\n : faSort;\n }\n\n return (\n {\n const direction =\n sortState?.column !==\n (column.sortable as string)\n ? 'ASC'\n : sortState?.direction === 'DESC'\n ? 'ASC'\n : 'DESC';\n\n setSortState({\n column: column.sortable as any,\n direction,\n });\n })\n }\n >\n {sortIcon && }\n {column.header}\n \n );\n })}\n \n \n \n {normalizedData.items.map((item, itemIndex) => {\n const rowProps = config.rowProps?.(item) ?? {};\n\n return (\n \n {config.columns.map((column, columnIndex) => {\n const key =\n (column.column as string) ||\n `column_${columnIndex}`;\n\n let copyValue: string = '';\n\n if (column.copy) {\n copyValue = isFunction(column.copy)\n ? column.copy(item)\n : !column.render\n ? ((item[column.column] as unknown) as string)\n : '';\n }\n\n return (\n \n \n {column.render\n ? column.render(item)\n : item[column.column]}\n {copyValue && (\n \n )}\n \n \n );\n })}\n \n );\n })}\n \n \n \n \n \n {pagination.render(\n normalizedData.pageCount,\n normalizedData.totalItemCount\n )}\n \n ) : (\n \n )}\n
\n \n );\n}\n\nexport function PagedDataTableConfig(\n pagedFetchAction: (\n request: AdvancedPagedRequest\n ) => Promise>>,\n config: PagedDataTableConfig\n): PagedDataTableConfig {\n return config;\n}\n\nexport const renderButton: React.FC = (props) => {\n const {item, route, descriptor} = props;\n const url = buildPath(route, {\n id: item.id,\n });\n return (\n \n \n \n \n \n );\n};\n\nexport const renderViewButton: React.FC = (props) => {\n const {item, route, descriptor} = props;\n const url = buildPath(route, {\n id: item.id,\n });\n return (\n \n \n \n \n \n );\n};\n\nexport const renderEditButton: React.FC = (props) => {\n const {item, route, descriptor} = props;\n const url = buildPath(route, {\n id: item.id,\n });\n return (\n \n \n \n );\n};\n\nconst DEFAULT_RESULT = {\n items: [],\n page: 0,\n pageSize: 0,\n pageCount: 0,\n totalItemCount: 0,\n};\n\nfunction normalizedAdvancedPagedResult(\n value: AdvancedQueryPage | null | undefined\n): AdvancedQueryPage {\n return value || DEFAULT_RESULT;\n}\n\nconst styles = css`\n ${Media('MobileMax')} {\n &.ui.segment {\n margin: 0 -1rem;\n border-radius: 0;\n }\n }\n\n .table-search {\n input {\n border-width: 2px;\n border-color: #cbcfd1;\n }\n\n &.left.action {\n input {\n margin-left: -1px;\n }\n\n .ui.button {\n box-shadow: none !important;\n z-index: 0;\n }\n }\n }\n\n .table-container {\n overflow-x: auto;\n margin: 2em 0em;\n }\n\n .paged-table.ui.table {\n thead th {\n white-space: nowrap;\n padding: 0.528571em 0.78571429em !important;\n\n &.sortable {\n user-select: none;\n cursor: pointer;\n\n &:hover {\n background-color: #f5f5f5;\n }\n\n svg {\n margin-right: 0.2rem;\n }\n }\n }\n }\n\n .has-copy-icon {\n white-space: nowrap;\n position: relative;\n }\n\n .copy-button {\n position: relative;\n opacity: 0;\n margin-left: 0 !important;\n margin-right: -5px !important;\n background-color: ${transparentize(0.2, themeColors.white1)} !important;\n border: solid 1px ${transparentize(0.2, themeColors.white1)} !important;\n height: 36px;\n width: 36px;\n position: absolute;\n top: 50%;\n right: -38px;\n margin-top: -18px;\n\n &:hover {\n background-color: ${themeColors.white1} !important;\n border-color: inherit !important;\n }\n }\n\n td:hover .copy-button {\n opacity: 1;\n }\n\n .no-results .ui.icon.header .icon {\n line-height: 2.5rem;\n font-size: 2rem;\n }\n`;\n","import React from 'react';\nimport {Table} from 'semantic-ui-react';\nimport css from '@emotion/css/macro';\n\ntype DataList = {\n data: {label: React.ReactNode; value: React.ReactNode}[];\n};\nexport const DataList: React.FC = ({data}) => {\n return (\n \n \n {data.map(({label, value}, i) => (\n \n \n {label}:\n \n {value}\n \n ))}\n \n
\n );\n};\n\nconst datumStyles = css`\n .datum-label {\n font-weight: normal;\n color: rgba(0, 0, 0, 0.6);\n font-size: 0.9rem !important;\n line-height: 1.4em;\n }\n\n .datum-value {\n font-weight: 500;\n font-size: 0.971429rem;\n line-height: 1.28571429em;\n text-transform: none;\n color: #0a2233;\n }\n`;\n","import {faPencil, faPlus} from '@fortawesome/pro-regular-svg-icons';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport React, {useState} from 'react';\nimport {useAsyncRetry} from 'react-use';\nimport {Button, Modal} from 'semantic-ui-react';\nimport {AsyncStateContainer} from '../components/async-state-container';\nimport {} from '../api/generated/enums';\nimport {AccounteNotesService, AccountNoteDetailDto} from '../api/generated';\nimport {Form} from '../forms';\nimport {notifications} from '../utils/notification-service';\nimport {useOrganizationContext} from '../selectors';\nimport {css} from '@emotion/core';\nimport {DeleteButton} from '../components/confirm-delete-button';\n\ntype AccountNoteEditModal = {\n id: number;\n onSuccessReFetch: () => void;\n};\n\nexport const AccountNoteEditModal = (props: AccountNoteEditModal) => {\n const [isModalOpen, setIsModalOpen] = useState(false);\n const [accountNote, setAccountNote] = useState();\n\n const id = props.id;\n\n useAsyncRetry(async () => {\n if (isModalOpen && id) {\n const {data} = await AccounteNotesService.getById({\n id: props.id,\n });\n setAccountNote(data || undefined);\n return data;\n }\n }, [id, isModalOpen, props.id]);\n\n const deleteAccountNote = async () => {\n const response = await AccounteNotesService.deleteById({id: props.id});\n if (response.hasErrors) {\n var errorMessage = response.errors.reduce((acc, item) => {\n return `${acc} \\n ${item.errorMessage}`;\n }, '');\n\n notifications.error(errorMessage);\n } else {\n setIsModalOpen(false);\n notifications.success('Account note successfully deleted');\n props.onSuccessReFetch();\n }\n };\n\n const onSubmit = async values => {\n const response = await AccounteNotesService.update({id, body: values});\n if (response.hasErrors) {\n return response;\n }\n notifications.success('Account note Updated');\n props.onSuccessReFetch();\n setIsModalOpen(false);\n };\n\n return (\n
\n {\n setIsModalOpen(true);\n }}\n >\n \n \n }\n open={isModalOpen}\n closeOnEscape={isModalOpen}\n closeOnDimmerClick={isModalOpen}\n onClose={() => {\n setIsModalOpen(false);\n }}\n >\n \n \n (\n <>\n \n \n \n
\n \n Update Account\n \n setIsModalOpen(false)}\n >\n Close\n \n \n
\n \n )}\n />\n
\n
\n \n
\n );\n};\n\ntype AccountNoteCreateModal = {\n accountId: number;\n onSuccessReFetch: () => void;\n};\n\nexport const AccountNoteCreateModal = (props: AccountNoteCreateModal) => {\n const context = useOrganizationContext();\n const accountId = props.accountId;\n const organizationId = context.organizationId as number;\n const [isModalOpen, setIsModalOpen] = useState(false);\n\n const onSubmit = async values => {\n values.organizationId = organizationId;\n values.accountId = accountId;\n const response = await AccounteNotesService.create({body: values});\n if (response.hasErrors) {\n return response;\n }\n setIsModalOpen(false);\n notifications.success('Account Note Created');\n props.onSuccessReFetch();\n };\n\n return (\n
\n {\n setIsModalOpen(true);\n }}\n >\n New Account Note\n \n }\n open={isModalOpen}\n closeOnEscape={isModalOpen}\n closeOnDimmerClick={isModalOpen}\n onClose={() => {\n setIsModalOpen(false);\n }}\n >\n \n (\n <>\n \n \n \n
\n \n Create Account Note\n \n setIsModalOpen(false)}\n >\n Close\n \n
\n \n )}\n />\n
\n \n
\n );\n};\n\nconst FormFields = () => {\n return (\n <>\n \n \n \n );\n};\n\nconst styles = css`\n &.modal-create-update {\n position: fixed;\n top: 25%;\n }\n`;\n","import React, {useState} from 'react';\nimport {useAsyncRetry} from 'react-use';\nimport {Button, Modal, Divider, Input} from 'semantic-ui-react';\nimport {} from '../api/generated/enums';\nimport {\n AccounteNotesService,\n AccountNoteSummaryDto,\n} from '../api/generated';\nimport moment from 'moment';\nimport { AccountNoteEditModal, AccountNoteCreateModal } from './account-note-create-update-modal';\nimport { css } from '@emotion/core';\nimport { usePagination } from '../hooks/use-pagination';\nimport { useDebouncedState } from '../hooks/use-debounced-state';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faStickyNote } from '@fortawesome/pro-regular-svg-icons';\nimport {Tooltip} from '../components/tooltip';\n\ntype NotesModal = {\n accountId: number;\n}\n\nexport const NotesModal = (props: NotesModal) => {\n const pagination = usePagination();\n\n const [fetchAccountNotesList, setFetchAccountNotesList] = useState();\n\n const [isModalOpen, setIsModalOpen] = useState(false);\n const [search, setSearch] = useDebouncedState('', 500);\n\n const [pageCount, setPageCount] = useState();\n const [totalItemCount, setTotalItemCount] = useState();\n\n\n const accountId = props.accountId;\n\n\n const fetchAccountNotes = useAsyncRetry(async () => {\n if ((isModalOpen) && search) {\n const {data} = await AccounteNotesService.getAll({page: pagination.pageNumber, pageSize: pagination.pageSize, searchFieldNames: ['note', 'userName'], searchSearchText: search});\n setFetchAccountNotesList(data?.items);\n setPageCount(data?.pageCount);\n setTotalItemCount(data?.totalItemCount)\n return data;\n }\n else if((isModalOpen) && !search){\n const {data} = await AccounteNotesService.getAll({page: pagination.pageNumber, pageSize: pagination.pageSize,});\n setFetchAccountNotesList(data?.items);\n setPageCount(data?.pageCount);\n setTotalItemCount(data?.totalItemCount)\n return data;\n }\n }, [isModalOpen, pagination.pageNumber, pagination.pageSize, search]);\n\n return (\n
\n \n {\n setIsModalOpen(true);\n }}\n >\n \n \n \n }\n open={isModalOpen}\n closeOnEscape={isModalOpen}\n closeOnDimmerClick={isModalOpen}\n onClose={() => setIsModalOpen(false)}\n closeIcon\n >\n \n
\n Account Notes\n {\n setSearch(value);\n }}\n icon=\"search\"\n placeholder=\"Search account notes\"\n />\n
\n\n {fetchAccountNotes.retry()}} accountId={accountId}/>\n
\n
\n
\n \n {fetchAccountNotesList?.length !== 0 ? (fetchAccountNotesList?.map(x => (\n
\n
\n \n <>\n \n {x.note}\n \n
\n {moment(x.noteDate).format('MM/DD/YYYY')}\n
\n \n {fetchAccountNotes.retry()}} id={x.id} >\n
\n \n
\n ))\n ) : (\n
\n No results for account notes...\n
\n )\n }\n\n
\n \n {pagination.render(\n pageCount || 0,\n totalItemCount || 0,\n )}\n \n
\n
\n );\n};\n\nconst styles = css`\n &.modal-notes {\n position: fixed;\n top: 80px;\n bottom: 1;\n }\n\n &.menu-item {\n flex-direction: row;\n display: flex;\n justify-content: left;\n align-items: center;\n }\n\n &.modal-create-header {\n flex-direction: row;\n display: flex;\n align-items: center;\n }\n\n &.modal-create-header-item {\n flex-direction: row;\n display: flex;\n margin-left: auto;\n }\n`;","import css from '@emotion/css/macro';\nimport {faPencil, faPlus} from '@fortawesome/pro-regular-svg-icons';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport React, {useCallback} from 'react';\nimport {useAsyncRetry} from 'react-use';\nimport {Button, Segment} from 'semantic-ui-react';\nimport {AsyncStateContainer} from '../components/async-state-container';\nimport {PageTitle} from '../components/page-title';\nimport {buildPath, routes} from '../routes';\nimport {AdvancedPagedRequest} from '../utils';\nimport {} from '../api/generated/enums';\nimport {\n AccountsService,\n MeterReadingsService,\n MeterReadingSummaryDto,\n} from '../api/generated';\nimport {\n usePagedDataTable,\n PagedDataTableConfig,\n renderEditButton,\n} from '../hooks/use-paged-data-table';\nimport {useRouteMatch, Link} from 'react-router-dom';\nimport {BasicPage} from '../basic-page';\nimport {DataList} from '../components/data-list';\nimport moment from 'moment';\nimport {Flex} from '../components/flex';\nimport {NotesModal} from './account-note-listing-modal';\n\ntype FetchParams = Parameters<\n typeof MeterReadingsService.getAllByAccountId\n>['0'];\n\nexport const AccountDashboard = () => {\n const match = useRouteMatch<{id: string}>();\n const id = Number(match.params.id);\n\n const fetchAccount = useAsyncRetry(async () => {\n const {data} = await AccountsService.getById({id});\n return data;\n }, [id]);\n\n const account = fetchAccount.value;\n\n const url = buildPath(routes.portal.accounts.update, {\n id: id,\n });\n\n const createNewMeterReadingUrl = buildPath(\n routes.portal.meterReadings.create,\n {\n accountId: id,\n }\n );\n\n const fetchMeterReadings = useCallback(\n (x: AdvancedPagedRequest) =>\n MeterReadingsService.getAllByAccountId({\n accountId: id,\n ...x,\n } as FetchParams),\n [id]\n );\n\n const newMeterReadingButton = (props: {disabled: boolean}) => {\n return (\n \n New Meter Reading\n \n );\n };\n\n const pagedDataTable = usePagedDataTable(fetchMeterReadings, TableConfig, {\n actions: (\n <>\n
{newMeterReadingButton({disabled: false})}
\n \n ),\n });\n\n return (\n \n {account && (\n \n
\n \n
\n \n {account.name}\n \n
\n \n \n \n \n \n \n \n \n \n \n
\n
\n \n
\n
\n
\n \n
{pagedDataTable}
\n \n )}\n
\n );\n};\n\nconst TableConfig = PagedDataTableConfig(\n MeterReadingsService.getAllByAccountId,\n {\n columns: [\n {\n header: '',\n render: (item) => (\n <>\n {renderEditButton({\n item,\n descriptor: 'meter readings',\n route: routes.portal.meterReadings.detail,\n })}\n \n ),\n cellProps: {\n collapsing: true,\n },\n },\n {\n header: 'Submit Date',\n sortable: 'createdDate',\n render: (item) => `${moment(item.createdDate).format('MM/DD/YYYY')}`,\n },\n {\n header: 'Reading Date',\n sortable: 'readingDate',\n render: (item) => `${moment(item.readingDate).format('MM/DD/YYYY')}`,\n },\n {\n header: 'Meter Number',\n column: 'meterNumber',\n },\n {\n header: 'Reading Amount',\n column: 'readingAmount',\n },\n {\n header: 'Units Used',\n render: (item) => {\n return (\n <>\n {item.unitsUsed} {item.unitType}\n \n );\n },\n },\n {\n header: 'Amount Due',\n column: 'amountDue',\n },\n {\n header: 'Amount Received',\n column: 'amountReceived',\n },\n {\n header: 'Payment Ref #',\n render: (item) => {\n return (\n <>\n \n {item.paymentReferenceNumber}\n \n \n );\n },\n },\n {\n header: 'Comments',\n column: 'comments',\n },\n ],\n searchFieldNames: ['readingAmount', 'comments', 'comments', 'meterNumber'],\n defaultSort: {\n column: 'createdDate',\n direction: 'DESC',\n },\n }\n);\n\nconst styles = css`\n &.details-flex-container {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: stretch;\n width: 100%;\n }\n\n &.account-card {\n margin-bottom: 15px !important;\n margin-top: 0px !important;\n flex: 1;\n\n .account-balance {\n align-self: flex-start;\n .ui.statistic {\n margin-top: 0;\n > .value {\n font-size: 2rem !important;\n }\n }\n }\n\n .card-header {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n\n .left-buttons {\n margin-left: auto;\n }\n }\n }\n`;\n","import {faPlus, faTachometerAlt} from '@fortawesome/pro-regular-svg-icons';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport React, {useMemo, useCallback, useState} from 'react';\nimport {Link} from 'react-router-dom';\nimport {Button, Modal} from 'semantic-ui-react';\nimport {Form} from '../forms';\nimport {AccountsService, AccountSummaryDto} from '../api/generated';\nimport {BasicPage} from '../basic-page';\nimport {routes, buildPath} from '../routes';\nimport {\n PagedDataTableConfig,\n usePagedDataTable,\n renderViewButton,\n renderButton,\n} from '../hooks/use-paged-data-table';\nimport {useOrganizationContext} from '../selectors';\nimport {AdvancedPagedRequest} from '../types';\nimport {useNotification} from '../hooks/use-notifications';\n\ntype FetchParams = Parameters<\n typeof AccountsService.getAllByOrganizationId\n>['0'];\n\nexport const AccountListing = () => {\n const context = useOrganizationContext();\n const organizationId = context.organizationId as number;\n\n const [updateAccountAfterImport, setUpdateAccountAfterImport] = useState(0);\n\n const notifications = useNotification();\n\n const [modalOpen, setModalOpen] = useState(false);\n const handleClose = () => setModalOpen(false);\n\n const handleOpen = () => {\n setModalOpen(true);\n };\n\n const additionalParams = useMemo(\n () => ({\n organizationId: organizationId,\n }),\n [organizationId]\n );\n\n const fetchAccounts = useCallback(\n (x: AdvancedPagedRequest) =>\n AccountsService.getAllByOrganizationId({\n ...additionalParams,\n ...x,\n _: updateAccountAfterImport,\n } as FetchParams),\n [additionalParams, updateAccountAfterImport]\n );\n\n const pagedDataTable = usePagedDataTable(fetchAccounts, TableConfig, {\n actions: (\n <>\n
\n e.preventDefault}\n render={() => (\n <>\n \n Upload Accounts\n \n }\n open={modalOpen}\n onClose={handleClose}\n size=\"tiny\"\n closeIcon\n >\n \n
Accounts Upload
\n {\n handleClose();\n const response = await AccountsService.upload({\n organizationId: organizationId,\n file: file,\n });\n\n if (response.hasErrors) {\n const errorMessage = response.errors.reduce(\n (acc, error) => {\n var result = (\n acc + ` ${error.errorMessage}`\n ).trim();\n return result;\n },\n ''\n );\n notifications.error(errorMessage);\n } else {\n notifications.success(\n 'Accounts successfully imported!'\n );\n setUpdateAccountAfterImport(\n updateAccountAfterImport + 1\n );\n }\n }}\n />\n
\n \n \n )}\n >\n
\n \n \n ),\n });\n\n return {pagedDataTable};\n};\n\nconst TableConfig = PagedDataTableConfig(AccountsService.getAll, {\n columns: [\n {\n header: '',\n render: (item) => (\n <>\n {renderViewButton({\n item,\n descriptor: 'account',\n route: routes.portal.accounts.dashboard,\n })}\n {renderButton({\n item,\n descriptor: 'Add Meter Reading',\n fontAwesomeIcon: faTachometerAlt,\n disabled: !item.hasMeterReadings,\n route:\n buildPath(routes.customer.meterReadingInput, {\n slug: item.organizationSlug,\n }) + `?accountNumber=${item.accountNumber}`,\n })}\n \n ),\n cellProps: {\n collapsing: true,\n },\n },\n {\n header: 'Account Number',\n column: 'accountNumber',\n sortable: 'accountNumber',\n cellProps: {\n collapsing: true,\n },\n },\n {\n header: 'Name',\n column: 'name',\n sortable: 'name',\n },\n ],\n searchFieldNames: ['accountNumber', 'name'],\n defaultSort: {\n column: 'accountNumber',\n direction: 'ASC',\n },\n});\n","import {faDownload} from '@fortawesome/pro-regular-svg-icons';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport React, {useMemo, useCallback, useState} from 'react';\nimport {Button} from 'semantic-ui-react';\nimport {MeterReadingsService, MeterReadingSummaryDto} from '../api/generated';\nimport {BasicPage} from '../basic-page';\nimport {routes, buildPath} from '../routes';\nimport {SingleDatePicker} from 'react-dates';\n\nimport {\n PagedDataTableConfig,\n usePagedDataTable,\n renderViewButton,\n renderEditButton,\n} from '../hooks/use-paged-data-table';\nimport {useOrganizationContext} from '../selectors';\nimport {AdvancedPagedRequest} from '../types';\nimport moment, {Moment} from 'moment';\nimport {useAsyncFn} from 'react-use';\nimport {Flex} from '../components/flex';\nimport {Tooltip} from '../components/tooltip';\n\ntype FetchParams = Parameters<\n typeof MeterReadingsService.getAllByOrganizationId\n>['0'];\n\nexport const MeterReadingsDashboard = () => {\n const context = useOrganizationContext();\n const organizationId = context.organizationId as number;\n\n const [startDate, setStartDate] = useState(\n moment().utc().startOf('day').add(-1, 'M')\n );\n const [endDate, setEndDate] = useState(\n moment().utc().endOf('day')\n );\n\n const additionalParams = useMemo(\n () => ({\n organizationId: organizationId,\n startDate: startDate == null ? undefined : startDate.format(),\n endDate: endDate == null ? undefined : endDate.format(),\n }),\n [organizationId, startDate, endDate]\n );\n\n const [startFocused, setStartFocused] = useState(false);\n const [endFocused, setEndFocused] = useState(false);\n\n const fetchMeterReadings = useCallback(\n (x: AdvancedPagedRequest) =>\n MeterReadingsService.getAllByOrganizationId({\n ...additionalParams,\n ...x,\n } as FetchParams),\n [additionalParams]\n );\n\n const [\n fetchMeterReadingsPdfState,\n fetchMeterReadingsPdf,\n ] = useAsyncFn(async () => {\n var response = await MeterReadingsService.getExcelReport({\n organizationId: organizationId,\n startDate:\n startDate === null ? undefined : startDate.format('MM/DD/YYYY'),\n endDate: endDate === null ? undefined : endDate.format('MM/DD/YYYY'),\n });\n\n if (response.hasErrors || response.data == null) {\n return response;\n }\n\n const bytes = Uint8Array.from(atob(response.data.data), (c) =>\n c.charCodeAt(0)\n );\n\n var blob = new Blob([bytes], {type: 'application/vnd.ms-excel'});\n var link = document.createElement('a');\n link.href = window.URL.createObjectURL(blob);\n link.download = response.data.fileName;\n link.click();\n }, [startDate, endDate, organizationId]);\n\n const pagedDataTable = usePagedDataTable(fetchMeterReadings, TableConfig, {\n actions: (\n <>\n \n \n Start Date: \n \n setStartDate(x?.utc().startOf('day') || null)\n }\n focused={startFocused}\n onFocusChange={() => {\n setStartFocused(true);\n }}\n onClose={() => setStartFocused(false)}\n numberOfMonths={1}\n isOutsideRange={() => false}\n />\n \n \n \n \n \n End Date: \n {\n setEndDate(x?.utc().endOf('day') || null);\n }}\n focused={endFocused}\n onFocusChange={() => setEndFocused(true)}\n onClose={() => setEndFocused(false)}\n numberOfMonths={1}\n isOutsideRange={() => false}\n />\n \n \n \n \n \n \n await fetchMeterReadingsPdf()}\n >\n \n \n \n \n \n \n ),\n });\n\n return {pagedDataTable};\n};\n\nconst TableConfig = PagedDataTableConfig(\n MeterReadingsService.getAllByOrganizationId,\n {\n columns: [\n {\n header: '',\n render: (item) => (\n <>\n {renderViewButton({\n item,\n descriptor: 'account',\n route: buildPath(routes.portal.accounts.dashboard, {\n id: item.accountId,\n }),\n })}\n {renderEditButton({\n item,\n descriptor: 'meter reading',\n route: buildPath(routes.portal.meterReadings.detail, {\n id: item.id,\n }),\n })}\n \n ),\n cellProps: {\n collapsing: true,\n },\n },\n {\n header: 'Submit Date',\n sortable: 'createdDate',\n render: (item) => `${moment(item.createdDate).format('MM/DD/YYYY')}`,\n },\n {\n header: 'Reading Date',\n sortable: 'readingDate',\n render: (item) => `${moment(item.readingDate).format('MM/DD/YYYY')}`,\n },\n {\n header: 'Acct #',\n column: 'accountNumber',\n sortable: 'accountNumber',\n },\n {\n header: 'Name',\n column: 'accountName',\n sortable: 'accountName',\n },\n {\n header: 'Reading Amount',\n column: 'readingAmount',\n sortable: 'readingAmount',\n },\n {\n header: 'Units Used',\n sortable: 'unitsUsed',\n render: (item) => {\n return (\n <>\n {item.unitsUsed} {item.unitType}\n \n );\n },\n },\n {\n header: '$ Due',\n column: 'amountDue',\n },\n {\n header: '$ Paid',\n render: (item) => {\n return (\n <>\n {item.paymentReferenceNumber ? (\n \n {item.amountReceived}\n \n ) : (\n item.amountReceived\n )}\n \n );\n },\n },\n {\n header: 'Comments',\n column: 'comments',\n },\n ],\n searchFieldNames: ['accountNumber', 'accountName', 'readingAmount'],\n defaultSort: {\n column: 'createdDate',\n direction: 'DESC',\n },\n }\n);\n","import {faPlus} from '@fortawesome/pro-regular-svg-icons';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport React from 'react';\nimport {Link} from 'react-router-dom';\nimport {Button} from 'semantic-ui-react';\nimport {OrganizationsService} from '../api/generated';\nimport {BasicPage} from '../basic-page';\nimport {routes} from '../routes';\nimport {\n PagedDataTableConfig,\n usePagedDataTable,\n renderEditButton,\n} from '../hooks/use-paged-data-table';\nimport {useHasAuthorization} from '../auth/authorization-helpers';\n\nexport const OrganizationListing = () => {\n const isAdmin = useHasAuthorization({\n role: ['Global Admin'],\n });\n\n const pagedDataTable = usePagedDataTable(\n OrganizationsService.getAll,\n TableConfig,\n {\n actions: (\n \n ),\n }\n );\n\n return (\n \n {isAdmin ? pagedDataTable : null}\n \n );\n};\n\nconst TableConfig = PagedDataTableConfig(OrganizationsService.getAll, {\n columns: [\n {\n header: '',\n render: item => (\n <>\n {renderEditButton({\n item,\n descriptor: 'organizations',\n route: routes.portal.organizations.detail,\n })}\n \n ),\n cellProps: {\n collapsing: true,\n },\n },\n {\n header: 'Name',\n column: 'name',\n },\n ],\n searchFieldNames: ['name'],\n defaultSort: {\n column: 'name',\n direction: 'DESC',\n },\n});\n","import React, {useCallback} from 'react';\nimport {Link, useHistory, useRouteMatch} from 'react-router-dom';\nimport {useAsync} from 'react-use';\nimport {SettingsService} from '../api/generated';\nimport * as Enums from '../api/generated/enums';\nimport {BasicPage} from '../basic-page';\nimport {AsyncStateContainer} from '../components/async-state-container';\nimport {Form} from '../forms';\nimport {useNotification} from '../hooks/use-notifications';\nimport {routes} from '../routes';\n\nexport const SettingDetails = () => {\n const history = useHistory();\n const match = useRouteMatch<{id: string}>();\n const id = Number(match.params.id);\n\n const notifications = useNotification();\n\n const fetchSetting = useAsync(async () => {\n const {data} = await SettingsService.getById({id});\n return data;\n }, [id]);\n\n const onSubmit = useCallback(\n async values => {\n const response = await SettingsService.save({\n id,\n body: values,\n });\n\n if (response.hasErrors) {\n return response;\n }\n\n notifications.success('Setting updated');\n history.push(routes.portal.settings.listing);\n },\n [history, id, notifications]\n );\n\n return (\n \n {fetchSetting.value && (\n \n \n (\n <>\n \n {fetchSetting.value?.enum ? (\n \n ) : (\n \n )}\n
\n \n Update Setting\n \n \n Cancel\n \n
\n \n )}\n />\n
\n \n )}\n
\n );\n};\n","import React from 'react';\nimport {SettingsService} from '../api/generated';\nimport {BasicPage} from '../basic-page';\nimport {routes} from '../routes';\nimport {\n PagedDataTableConfig,\n renderEditButton,\n usePagedDataTable,\n} from '../hooks/use-paged-data-table';\n\nexport const SettingListing = () => {\n const pagedDataTable = usePagedDataTable(SettingsService.getAll, TableConfig);\n return {pagedDataTable};\n};\n\nconst TableConfig = PagedDataTableConfig(SettingsService.getAll, {\n columns: [\n {\n header: '',\n render: item =>\n renderEditButton({\n item,\n descriptor: 'setting',\n route: routes.portal.settings.detail,\n }),\n cellProps: {\n width: '1',\n },\n },\n {\n header: 'Key',\n column: 'key',\n },\n {\n header: 'Value',\n column: 'value',\n copy: true,\n },\n ],\n defaultSort: {\n column: 'key',\n direction: 'ASC',\n },\n searchFieldNames: ['key', 'value'],\n});\n","import arrayMutators from 'final-form-arrays';\nimport React from 'react';\nimport {Link, useHistory, useRouteMatch} from 'react-router-dom';\nimport {useAsync, useAsyncFn} from 'react-use';\nimport {Divider} from 'semantic-ui-react';\nimport {UsersService, OrganizationsService} from '../api/generated';\nimport {Roles} from '../api/generated/enums';\nimport {useHasAuthorization} from '../auth/authorization-helpers';\nimport {BasicPage} from '../basic-page';\nimport {AsyncStateContainer} from '../components/async-state-container';\nimport {DeleteButton} from '../components/confirm-delete-button';\nimport {Form} from '../forms';\nimport {useNotification} from '../hooks/use-notifications';\nimport {routes} from '../routes';\nimport {AnyObject} from '../types';\n\nconst DEFAULT_USER = {\n firstName: '',\n lastName: '',\n emailAddress: '',\n role: Roles['Global Admin'],\n claims: [],\n};\n\nconst mutators = {\n ...arrayMutators,\n};\n\nexport const UserCreate = () => {\n const history = useHistory();\n const notifications = useNotification();\n\n const breadcrumbs = [\n {title: 'Users', url: routes.portal.users.listing},\n {title: 'Create'},\n ];\n\n const onSubmit = async (values) => {\n const response = await UsersService.create({body: values});\n if (response.hasErrors) {\n return response;\n }\n\n notifications.success('User Created');\n history.push(routes.portal.users.listing);\n };\n\n return (\n \n \n (\n <>\n \n \n
\n \n Create User\n \n \n Cancel\n \n
\n \n )}\n />\n
\n
\n );\n};\n\nexport const UserDetails = () => {\n const history = useHistory();\n const match = useRouteMatch<{id: string}>();\n const id = Number(match.params.id);\n const notifications = useNotification();\n\n const fetchUser = useAsync(async () => {\n const {data} = await UsersService.getById({\n id,\n });\n return data;\n }, [id]);\n\n const user = fetchUser.value || undefined;\n\n const userName = user ? `${user.firstName} ${user.lastName}` : '';\n\n const breadcrumbs = [\n {title: 'Users', url: routes.portal.users.listing},\n {title: userName},\n ];\n\n const onSubmit = async (values) => {\n const response = await UsersService.update({id, body: values});\n if (response.hasErrors) {\n return response;\n }\n notifications.success('User Updated');\n history.push(routes.portal.users.listing);\n };\n\n const [deleteUserState, deleteUser] = useAsyncFn(async () => {\n const response = await UsersService.deleteById({id});\n if (response.hasErrors) {\n notifications.error('Unable to delete user');\n } else {\n notifications.success('User successfully deleted');\n history.push(routes.portal.users.listing);\n }\n });\n\n return (\n \n \n {fetchUser && user && (\n \n (\n <>\n \n \n
\n \n Update User\n \n \n Cancel\n \n\n \n
\n \n )}\n />\n
\n )}\n
\n
\n );\n};\n\ntype FormFields = {\n user?: any;\n role: string;\n isCreate: boolean;\n defaultOrganizationId?: number;\n};\n\nconst FormFields = ({values}: AnyObject) => {\n const fetchOrganizations = useAsync(async () => {\n const {data} = await OrganizationsService.getAll({\n page: 0,\n pageSize: 0,\n });\n\n if (data === null) {\n return [];\n }\n\n return data.items.map((x) => ({\n text: x.name,\n value: x.id,\n }));\n }, []);\n\n const roles = [Roles['Global Admin'], Roles['Organization Admin']];\n\n const isAdmin = useHasAuthorization({\n role: ['Global Admin'],\n });\n\n return (\n \n \n \n \n \n\n \n \n \n\n {isAdmin && (\n <>\n \n \n \n {values.role === Roles['Organization Admin'] && (\n \n \n \n )}\n \n )}\n \n );\n};\n","import {IconDefinition} from '@fortawesome/fontawesome-svg-core';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport React, {useState} from 'react';\nimport {Popup, PopupProps} from 'semantic-ui-react';\nimport {Tooltip} from './tooltip';\nimport {Button} from '../forms/button';\n\ntype ConfirmButton = Omit & {\n onConfirm: () => void;\n loading?: boolean;\n text?: string;\n tooltip?: string;\n confirmPosition?: PopupProps['position'];\n loadingText?: string;\n confirmText?: string;\n icon?: IconDefinition;\n};\n\nexport const ConfirmButton: React.FC = ({\n onConfirm,\n loading,\n text,\n loadingText = 'Loading...',\n confirmText = 'Are you sure?',\n confirmPosition = 'right center',\n icon,\n tooltip = '',\n ...props\n}) => {\n const [open, setOpen] = useState(false);\n const toggleOpen = () => {\n setOpen(!open);\n };\n const onClose = () => {\n setOpen(false);\n };\n const onConfirmClick = () => {\n onConfirm();\n onClose();\n };\n\n return (\n \n \n {!!icon && (\n <>\n {' '}\n \n )}\n {loading ? loadingText : text}\n \n
\n }\n content={\n \n {confirmText}\n \n }\n position={confirmPosition}\n on=\"click\"\n />\n );\n};\n","import produce, {Draft} from 'immer';\nimport {useState} from 'react';\n\ntype Producer = (currentState: Draft) => void;\n\nexport function useProduce(initialState: T | (() => T)) {\n const [state, _setState] = useState(initialState);\n\n function producer(mutationFn: Producer) {\n _setState(\n produce(state, draft => {\n mutationFn(draft);\n })\n );\n }\n\n return [state, producer] as [T, typeof producer];\n}\n","import {faPlus, faUnlock} from '@fortawesome/pro-regular-svg-icons';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport React, {useMemo, useCallback} from 'react';\nimport {Link} from 'react-router-dom';\nimport {useAsyncFn} from 'react-use';\nimport {Button, Segment, Checkbox} from 'semantic-ui-react';\nimport {UsersService, UserSummaryDto} from '../api/generated';\nimport {BasicPage} from '../basic-page';\nimport {routes} from '../routes';\nimport {ConfirmButton} from '../components/confirm-button';\nimport {notifications} from '../utils/notification-service';\nimport {\n PagedDataTableConfig,\n usePagedDataTable,\n renderEditButton,\n} from '../hooks/use-paged-data-table';\nimport {useProduce} from '../hooks/use-produce';\nimport {AllPermissions} from '../api/generated/enums';\nimport {AdvancedPagedRequest} from '../types';\nimport {useOrganizationContext} from '../selectors';\n\ntype FilterState = {\n claims: string[];\n};\n\nexport const UserListing = () => {\n const [filterState, setFilterState] = useProduce({\n claims: [],\n });\n const pagedDataTable = usePagedDataTable(UsersService.getAll, TableConfig, {\n actions: (\n \n ),\n filter: {\n getParams: () => filterState,\n render: () => (\n \n
\n With Claims:\n
\n {AllPermissions.map(permission => (\n
\n \n setFilterState(state => {\n if (checked) {\n state.claims.push(permission);\n } else {\n state.claims = state.claims.filter(x => x !== permission);\n }\n })\n }\n />\n
\n ))}\n
\n ),\n },\n });\n\n return {pagedDataTable};\n};\n\ntype FetchParams = Parameters['0'];\n\nexport const UserOrganizationListing = () => {\n const [filterState, setFilterState] = useProduce({\n claims: [],\n });\n\n const context = useOrganizationContext();\n const organizationId = context.organizationId as number;\n\n const additionalParams = useMemo(\n () => ({\n organizationId: organizationId,\n }),\n [organizationId]\n );\n\n const fetchRateTables = useCallback(\n (x: AdvancedPagedRequest) =>\n UsersService.getAllByOrganization({\n ...additionalParams,\n ...x,\n } as FetchParams),\n [additionalParams]\n );\n\n const pagedDataTable = usePagedDataTable(fetchRateTables, TableOrgConfig, {\n actions: (\n \n ),\n filter: {\n getParams: () => filterState,\n render: () => (\n \n
\n With Claims:\n
\n {AllPermissions.map(permission => (\n
\n \n setFilterState(state => {\n if (checked) {\n state.claims.push(permission);\n } else {\n state.claims = state.claims.filter(x => x !== permission);\n }\n })\n }\n />\n
\n ))}\n
\n ),\n },\n });\n\n return {pagedDataTable};\n};\n\nconst ResetPasswordButton = ({id}) => {\n const [sendResetState, sendReset] = useAsyncFn(async () => {\n const response = await UsersService.sendPasswordReset({\n id,\n });\n\n if (response.hasErrors) {\n notifications.error('Failed to send password reset link');\n } else {\n notifications.success('Password reset link sent!');\n }\n });\n\n return (\n \n );\n};\n\nconst TableConfig = PagedDataTableConfig(UsersService.getAll, {\n columns: [\n {\n header: '',\n render: item => (\n <>\n {renderEditButton({\n item,\n descriptor: 'User Account',\n route: routes.portal.users.detail,\n })}\n \n \n ),\n cellProps: {\n collapsing: true,\n },\n },\n {\n header: 'Email Address',\n column: 'emailAddress',\n sortable: 'emailAddress',\n },\n {\n header: 'Name',\n render: item => `${item.firstName} ${item.lastName}`,\n sortable: 'firstName',\n },\n {\n header: 'Role',\n column: 'role',\n },\n ],\n defaultSort: {\n column: 'emailAddress',\n direction: 'ASC',\n },\n searchFieldNames: ['firstName', 'lastName', 'emailAddress'],\n});\n\nconst TableOrgConfig = PagedDataTableConfig(UsersService.getAllByOrganization, {\n columns: [\n {\n header: '',\n render: item => (\n <>\n {renderEditButton({\n item,\n descriptor: 'User Account',\n route: routes.portal.users.detail,\n })}\n \n \n ),\n cellProps: {\n collapsing: true,\n },\n },\n {\n header: 'Email Address',\n column: 'emailAddress',\n sortable: 'emailAddress',\n },\n {\n header: 'Name',\n render: item => `${item.firstName} ${item.lastName}`,\n sortable: 'firstName',\n },\n {\n header: 'Role',\n column: 'role',\n },\n ],\n defaultSort: {\n column: 'emailAddress',\n direction: 'ASC',\n },\n searchFieldNames: ['firstName', 'lastName', 'emailAddress'],\n});\n","import React, {useState, useMemo} from 'react';\nimport {Modal} from 'semantic-ui-react';\nimport {Form} from '../forms';\nimport {} from '../api/generated/enums';\nimport {css} from '@emotion/core';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {faCalculator} from '@fortawesome/pro-regular-svg-icons';\nimport {Tooltip} from '../components/tooltip';\nimport {RateTablesService} from '../api/generated';\nimport {notifications} from '../utils/notification-service';\nimport {useAsync} from 'react-use';\nimport {useOrganizationContext} from '../selectors';\nimport { CopyButton } from '../components/copy-button';\n\ntype MeterReadingCalculatorModal = {\n endMeterReadingAmount: number;\n rateTableId: number;\n applyOnCalculate: (amountDue, readingAmount, unitsUsed) => any;\n}\n\nexport const MeterReadingCalculatorModal = (props: MeterReadingCalculatorModal) => {\n const context = useOrganizationContext();\n const organizationId = context.organizationId as number;\n\n const [isModalOpen, setIsModalOpen] = useState(false);\n const [calculatedAmount, setCalculatedAmount] = useState(0);\n\n const onSubmit = async (values) => {\n const response = await RateTablesService.getRateTableCalculation({\n startMeterReadingAmount: values.startMeterReadingAmount,\n endMeterReadingAmount: values.endMeterReadingAmount,\n rateTableId: values.rateTableId,\n });\n if (response.hasErrors) {\n return response;\n }\n notifications.info('Calculation Successful');\n\n setCalculatedAmount(response.data?.cost.value ?? 0);\n };\n\n const onApplySubmit = async (startMeterReadingAmount, endMeterReadingAmount, rateTableId) => {\n const response = await RateTablesService.getRateTableCalculation({\n startMeterReadingAmount: startMeterReadingAmount,\n endMeterReadingAmount: endMeterReadingAmount,\n rateTableId: rateTableId,\n });\n if (response.hasErrors) {\n return response;\n }\n notifications.info('Calculation Applied');\n \n setCalculatedAmount(response.data?.cost.value ?? 0);\n\n props.applyOnCalculate(response.data?.cost.value ?? 0, endMeterReadingAmount, endMeterReadingAmount - startMeterReadingAmount);\n \n setCalculatedAmount(0);\n };\n\n const fetchRateTables = useAsync(async () => {\n const {data} = await RateTablesService.getAllByOrganization({\n organizationId,\n });\n\n if (data === null) return null;\n\n return data.items;\n });\n\n const rateTables = fetchRateTables.value || undefined;\n\n const mappedRateTables = useMemo(\n () =>\n (rateTables || []).map(x => ({\n key: `${x.name}`,\n text: `${x.name}`,\n value: x.id,\n })),\n [rateTables]\n );\n\n return (\n
\n \n {\n setIsModalOpen(true);\n }}\n >\n Calculate Amount Due {' '}\n \n \n \n }\n open={isModalOpen}\n onOpen={() => setCalculatedAmount(0)}\n closeOnEscape={isModalOpen}\n closeOnDimmerClick={isModalOpen}\n onClose={() => {setIsModalOpen(false); \n setCalculatedAmount(0);\n ;}}\n closeIcon\n >\n \n (\n <>\n \n \n \n Amount Due: ${Number((calculatedAmount ?? 0) / 100).toFixed(2)}\n \n
\n \n Calculate\n \n {\n onApplySubmit(values.startMeterReadingAmount, values.endMeterReadingAmount, values.rateTableId);\n setIsModalOpen(false); \n }}\n >\n Apply Calculation\n \n {\n setIsModalOpen(false);\n setCalculatedAmount(0);}\n }\n >\n Close\n \n
\n \n )}\n />\n
\n \n
\n );\n};\n\ntype FormFields = {\n rateTableOptions: {\n key: string;\n text: string;\n value: number;\n }[];\n defaultRateTableValue: number;\n endMeterReadingAmount: number;\n};\n\nconst FormFields = (props: FormFields) => {\n return (\n <>\n \n \n \n \n );\n};\n\nconst styles = css`\n &.modal-notes {\n position: fixed;\n top: 80px;\n bottom: 1;\n }\n\n &.menu-item {\n flex-direction: row;\n display: flex;\n justify-content: left;\n align-items: center;\n }\n\n &.modal-create-header {\n flex-direction: row;\n display: flex;\n align-items: center;\n }\n\n &.modal-create-header-item {\n flex-direction: row;\n display: flex;\n margin-left: auto;\n }\n`;\n","import React, {useState} from 'react';\nimport {useHistory, useRouteMatch} from 'react-router-dom';\nimport {useAsync, useAsyncFn} from 'react-use';\nimport {\n MeterReadingsService,\n AccountsService,\n MeterReadingDetailDto,\n} from '../api/generated';\nimport {BasicPage} from '../basic-page';\nimport {AsyncStateContainer} from '../components/async-state-container';\nimport {DeleteButton} from '../components/confirm-delete-button';\nimport {Form} from '../forms';\nimport {useNotification} from '../hooks/use-notifications';\nimport {buildPath, routes} from '../routes';\nimport {useOrganizationContext} from '../selectors';\nimport {MeterReadingCalculatorModal} from './meter-reading-calculate-modal';\nimport moment from 'moment';\nimport {isInclusivelyAfterDay} from 'react-dates';\n\nexport const MeterReadingCreate = () => {\n const history = useHistory();\n const notifications = useNotification();\n const context = useOrganizationContext();\n const organizationId = context.organizationId as number;\n const match = useRouteMatch<{accountId: string}>();\n const accountId = Number(match.params.accountId);\n\n const accountDashboardUrl = buildPath(routes.portal.accounts.dashboard, {\n id: accountId,\n });\n\n const [amountDue, setAmountDue] = useState(0);\n const [unitsUsed, setUnitsUsed] = useState(0);\n const [readingAmount, setReadingAmount] = useState(0);\n\n const fetchAccount = useAsync(async () => {\n const {data} = await AccountsService.getById({id: accountId});\n\n if (data === null) return null;\n\n return data;\n }, [accountId]);\n\n const account = fetchAccount.value || undefined;\n\n const breadcrumbs = [\n {title: 'Meter Readings', url: accountDashboardUrl},\n {title: 'Create'},\n ];\n\n const onSubmit = async (values) => {\n values.accountId = accountId;\n values.organizationId = organizationId;\n\n const response = await MeterReadingsService.create({body: values});\n if (response.hasErrors) {\n return response;\n }\n\n notifications.success('Meter Reading Created');\n history.goBack();\n };\n\n return (\n \n \n \n (\n <>\n \n \n \n {\n setAmountDue(amountDue);\n setUnitsUsed(unitsUsed);\n setReadingAmount(readingAmount);\n }}\n />\n
\n \n Create Meter Reading\n \n {\n history.goBack();\n }}\n >\n Cancel\n \n
\n \n )}\n />\n
\n
\n
\n );\n};\n\nexport const MeterReadingDetails = () => {\n const history = useHistory();\n const match = useRouteMatch<{id: string}>();\n const id = Number(match.params.id);\n const notifications = useNotification();\n\n const [\n meterReading,\n setMeterReading,\n ] = useState();\n\n const fetchMeterReading = useAsync(async () => {\n const {data} = await MeterReadingsService.getById({\n id,\n });\n setMeterReading(data);\n return data;\n }, [id]);\n\n const fetchAccount = useAsync(async () => {\n if (meterReading?.accountId) {\n const {data} = await AccountsService.getById({\n id: meterReading?.accountId ?? 0,\n });\n return data;\n }\n }, [meterReading]);\n\n const account = fetchAccount.value || undefined;\n\n const [amountDue, setAmountDue] = useState(\n meterReading?.amountDue.value ?? 0\n );\n const [unitsUsed, setUnitsUsed] = useState(\n meterReading?.unitsUsed ?? 0\n );\n const [readingAmount, setReadingAmount] = useState(\n meterReading?.readingAmount ?? 0\n );\n\n const breadcrumbs = [\n {title: 'Meter Readings', url: routes.portal.accounts.listing},\n ];\n\n const onSubmit = async (values) => {\n const response = await MeterReadingsService.update({id, body: values});\n if (response.hasErrors) {\n return response;\n }\n notifications.success('Meter Reading Updated');\n history.goBack();\n };\n\n const [deleteMeterReadingState, deleteMeterReading] = useAsyncFn(async () => {\n const response = await MeterReadingsService.deleteById({id});\n if (response.hasErrors) {\n var errorMessage = response.errors.reduce((acc, item) => {\n return `${acc} \\n ${item.errorMessage}`;\n }, '');\n\n notifications.error(errorMessage);\n } else {\n notifications.success('Meter Reading successfully deleted');\n history.push(routes.portal.accounts.listing, {id: id});\n }\n });\n\n return (\n \n \n \n {meterReading && (\n \n (\n <>\n \n \n \n {\n setAmountDue(amountDue);\n values.amountDue.value = amountDue;\n setUnitsUsed(unitsUsed);\n values.unitsUsed = unitsUsed;\n setReadingAmount(readingAmount);\n values.readingAmount = readingAmount;\n }}\n />\n
\n \n Update Meter Reading\n \n {\n history.goBack();\n }}\n >\n Cancel\n \n\n \n
\n \n )}\n />\n
\n )}\n
\n
\n
\n );\n};\n\ntype FormFields = {\n isCreate?: boolean;\n amountDue: number;\n unitType: string;\n readingAmount: number;\n unitsUsed: number;\n};\n\nconst FormFields = (props: FormFields) => {\n return (\n <>\n \n isInclusivelyAfterDay(date, moment().add(1, 'day'))\n }\n />\n \n \n \n \n \n \n\n \n \n );\n};\n","import React from 'react';\nimport {Link, useHistory, useRouteMatch} from 'react-router-dom';\nimport {useAsync, useAsyncFn} from 'react-use';\nimport {OrganizationsService} from '../api/generated';\nimport {States} from '../api/generated/enums';\nimport {BasicPage} from '../basic-page';\nimport {AsyncStateContainer} from '../components/async-state-container';\nimport {DeleteButton} from '../components/confirm-delete-button';\nimport {Form} from '../forms';\nimport {useNotification} from '../hooks/use-notifications';\nimport {routes} from '../routes';\nimport {notify} from '../hooks/use-subscription';\nimport {useHasAuthorization} from '../auth/authorization-helpers';\n\nexport const OrganizationCreate = () => {\n const history = useHistory();\n const notifications = useNotification();\n\n const breadcrumbs = [\n {title: 'Organizations', url: routes.portal.organizations.listing},\n {title: 'Create'},\n ];\n\n const isGlobalAdmin = useHasAuthorization({\n role: ['Global Admin'],\n });\n\n const onSubmit = async (values) => {\n const response = await OrganizationsService.create({body: values});\n if (response.hasErrors) {\n return response;\n }\n\n notifications.success('Organization Created');\n history.push(routes.portal.organizations.listing);\n };\n\n return (\n \n \n (\n <>\n \n \n \n
\n \n Create Organization\n \n \n Cancel\n \n
\n \n )}\n />\n
\n
\n );\n};\n\nexport const OrganizationDetails = () => {\n const history = useHistory();\n const notifications = useNotification();\n\n const isAdminOrOrganzation = useHasAuthorization({\n role: ['Global Admin', 'Organization Admin'],\n });\n\n const match = useRouteMatch<{id: string}>();\n const organizationId = Number(match.params.id);\n\n const fetchOrganization = useAsync(async () => {\n const {data} = await OrganizationsService.getById({\n id: organizationId,\n });\n return data;\n }, [organizationId]);\n\n const organization = fetchOrganization.value || undefined;\n\n const isGlobalAdmin = useHasAuthorization({\n role: ['Global Admin'],\n });\n\n const redirectLink = isGlobalAdmin\n ? routes.portal.organizations.listing\n : routes.portal.accounts.listing;\n\n const adminBreadcrumbs = [\n {title: 'Organizations', url: routes.portal.organizations.listing},\n {title: organization ? organization.name : ''},\n ];\n\n const breadcrumbs = [{title: organization ? organization.name : ''}];\n\n const onSubmit = async (values) => {\n const response = await OrganizationsService.update({\n id: organizationId,\n body: values,\n });\n if (response.hasErrors) {\n return response;\n }\n notifications.success('Organization Updated');\n notify('organization-updated', {organizationId});\n history.push(redirectLink);\n };\n\n const [deleteOrganizationState, deleteOrganization] = useAsyncFn(async () => {\n const response = await OrganizationsService.deleteById({\n id: organizationId,\n });\n if (response.hasErrors) {\n var errorMessage = response.errors.reduce((acc, item) => {\n return `${acc} \\n ${item.errorMessage}`;\n }, '');\n\n notifications.error(errorMessage);\n } else {\n notifications.success('Organization successfully deleted');\n history.push(routes.portal.organizations.listing);\n }\n });\n\n return (\n \n \n \n (\n <>\n \n \n \n
\n \n Update Organization\n \n \n Cancel\n \n {isGlobalAdmin && (\n \n )}\n
\n \n )}\n />\n
\n
\n
\n );\n};\n\ntype FormFieldProps = {\n isAdmin?: Boolean;\n};\n\nconst FormFields = (formFieldProps: FormFieldProps) => {\n return (\n <>\n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n\n false} />\n false} />\n false} />\n \n \n \n );\n};\n","import React from 'react';\nimport {Link, useHistory, useRouteMatch} from 'react-router-dom';\nimport {useAsync, useAsyncFn} from 'react-use';\nimport {\n RateTableTiersService,\n RateTablesService,\n RateTableDetailDto,\n RateTableTierDetailDto,\n} from '../api/generated';\nimport {BasicPage} from '../basic-page';\nimport {AsyncStateContainer} from '../components/async-state-container';\nimport {DeleteButton} from '../components/confirm-delete-button';\nimport {Form} from '../forms';\nimport {useNotification} from '../hooks/use-notifications';\nimport {routes, buildPath} from '../routes';\nimport {useOrganizationContext} from '../selectors';\n\nexport const RateTableTierCreate = () => {\n const history = useHistory();\n const notifications = useNotification();\n const context = useOrganizationContext();\n const match = useRouteMatch<{rateTableId: string}>();\n const rateTableId = Number(match.params.rateTableId);\n\n const fetchRateTable = useAsync(async () => {\n const {data} = await RateTablesService.getById({\n id: rateTableId,\n });\n return data;\n }, [rateTableId]);\n\n const rateTable = fetchRateTable.value || undefined;\n\n const RateTableDashboardUrl = buildPath(routes.portal.rateTables.dashboard, {\n id: rateTableId,\n });\n\n const breadcrumbs = [\n {title: 'Rate Tiers', url: RateTableDashboardUrl},\n {title: 'Create'},\n ];\n\n const onSubmit = async (values) => {\n values.organizationId = context.organizationId;\n values.rateTableId = rateTableId;\n\n const response = await RateTableTiersService.create({body: values});\n if (response.hasErrors) {\n return response;\n }\n\n notifications.success('Rate Tier Created');\n history.push(RateTableDashboardUrl);\n };\n\n return (\n \n \n {rateTable && (\n \n (\n <>\n \n \n \n
\n \n Create Tier\n \n \n Cancel\n \n
\n \n )}\n />\n
\n )}\n
\n
\n );\n};\n\nexport const RateTableTierDetails = () => {\n const history = useHistory();\n const match = useRouteMatch<{rateTableId: string; id: string}>();\n const id = Number(match.params.id);\n const rateTableId = Number(match.params.rateTableId);\n const notifications = useNotification();\n\n const fetchRateTableTier = useAsync(async () => {\n const {data} = await RateTableTiersService.getById({\n id: id,\n });\n return data;\n }, [id]);\n\n const RateTableDashboardUrl = buildPath(routes.portal.rateTables.dashboard, {\n id: fetchRateTableTier.value ? fetchRateTableTier.value.rateTableId : 0,\n });\n\n const rateTableTier = fetchRateTableTier.value || undefined;\n\n const fetchRateTable = useAsync(async () => {\n const {data} = await RateTablesService.getById({\n id: rateTableId,\n });\n return data;\n }, [rateTableId]);\n\n const rateTable = fetchRateTable.value || undefined;\n\n const breadcrumbs = [\n {title: 'Rate Tiers', url: RateTableDashboardUrl},\n {title: rateTableTier ? rateTableTier.startingAmount.toString() : ''},\n ];\n\n const onSubmit = async (values) => {\n const response = await RateTableTiersService.update({\n id: id,\n body: values,\n });\n if (response.hasErrors) {\n return response;\n }\n notifications.success('Rate Tier Updated');\n history.push(RateTableDashboardUrl);\n };\n\n const [deleteRateTableTierState, deleteRateTableTier] = useAsyncFn(\n async () => {\n const response = await RateTableTiersService.deleteById({\n id: id,\n });\n if (response.hasErrors) {\n var errorMessage = response.errors.reduce((acc, item) => {\n return `${acc} \\n ${item.errorMessage}`;\n }, '');\n\n notifications.error(errorMessage);\n } else {\n notifications.success('Rate Tier successfully deleted');\n history.push(routes.portal.rateTables.listing);\n }\n }\n );\n\n return (\n \n \n \n {rateTable && rateTableTier && (\n \n (\n <>\n \n \n \n
\n \n Update Tier\n \n \n Cancel\n \n\n \n
\n \n )}\n />\n
\n )}\n
\n
\n
\n );\n};\n\ntype FormFields = {\n rateTable: RateTableDetailDto;\n values: RateTableTierDetailDto;\n};\n\nconst FormFields = (props: FormFields) => {\n return (\n <>\n \n \n {!props.values.hasNoEndingAmount && (\n \n )}\n \n \n\n \n \n \n
+
\n \n
\n
\n \n );\n};\n","import {faAbacus, faBan, faPlus} from '@fortawesome/pro-regular-svg-icons';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport Tooltip from '@reach/tooltip';\nimport React, {useCallback, useMemo} from 'react';\nimport {Link} from 'react-router-dom';\nimport {Button} from 'semantic-ui-react';\nimport {RateTablesService, RateTableSummaryDto} from '../api/generated';\nimport {BasicPage} from '../basic-page';\nimport {\n PagedDataTableConfig,\n renderViewButton,\n usePagedDataTable,\n} from '../hooks/use-paged-data-table';\nimport {routes} from '../routes';\nimport {useOrganizationContext} from '../selectors';\nimport {AdvancedPagedRequest} from '../types';\n\ntype FetchParams = Parameters<\n typeof RateTablesService.getAllByOrganization\n>['0'];\n\nexport const RateTableListing = () => {\n const context = useOrganizationContext();\n const organizationId = context.organizationId as number;\n\n const additionalParams = useMemo(\n () => ({\n organizationId: organizationId,\n }),\n [organizationId]\n );\n\n const fetchRateTables = useCallback(\n (x: AdvancedPagedRequest) =>\n RateTablesService.getAllByOrganization({\n ...additionalParams,\n ...x,\n } as FetchParams),\n [additionalParams]\n );\n\n const pagedDataTable = usePagedDataTable(fetchRateTables, TableConfig, {\n actions: (\n <>\n \n \n ),\n });\n\n return {pagedDataTable};\n};\n\nconst TableConfig = PagedDataTableConfig(\n RateTablesService.getAllByOrganization,\n {\n columns: [\n {\n header: '',\n render: (item) => (\n <>\n {renderViewButton({\n item,\n descriptor: 'rate-table',\n route: routes.portal.rateTables.dashboard,\n })}\n \n ),\n cellProps: {\n collapsing: true,\n },\n },\n {\n header: 'Name',\n column: 'name',\n sortable: 'name',\n },\n {\n header: 'Units',\n column: 'units',\n sortable: 'units',\n },\n {\n header: 'Unit Measurement',\n column: 'unitMeasurement',\n sortable: 'unitMeasurement',\n },\n {\n header: 'Minimum Amount',\n column: 'minimumAmount',\n },\n {\n header: 'Rate Code',\n column: 'rateCode',\n sortable: 'rateCode',\n },\n {\n header: 'Round Up At',\n render: (item) => (\n <>\n
\n {item.roundingEnabled ? `${item.roundUpAt * 100}%` : 'None'}\n
\n \n ),\n },\n {\n header: '',\n render: (item) => (\n <>\n {item.doNotImport && (\n \n \n \n \n \n )}\n {item.manuallyCalculated && (\n \n \n \n \n \n )}\n \n ),\n cellProps: {\n collapsing: true,\n },\n },\n ],\n searchFieldNames: ['name', 'unitMeasurement', 'rateCode', 'units'],\n defaultSort: {\n column: 'name',\n direction: 'DESC',\n },\n }\n);\n","import React from 'react';\nimport { useFormState } from 'react-final-form';\nimport {Link, useHistory, useRouteMatch} from 'react-router-dom';\nimport {useAsync, useAsyncFn} from 'react-use';\nimport {RateTableDetailDto, RateTablesService} from '../api/generated';\nimport {UnitTypes} from '../api/generated/enums';\nimport {BasicPage} from '../basic-page';\nimport {AsyncStateContainer} from '../components/async-state-container';\nimport {DeleteButton} from '../components/confirm-delete-button';\nimport {Form} from '../forms';\nimport {useNotification} from '../hooks/use-notifications';\nimport {routes} from '../routes';\nimport {useOrganizationContext} from '../selectors';\n\nexport const RateTableCreate = () => {\n const history = useHistory();\n const notifications = useNotification();\n const context = useOrganizationContext();\n const organizationId = context.organizationId as number;\n\n const breadcrumbs = [\n {title: 'Rate Tables', url: routes.portal.rateTables.listing},\n {title: 'Create'},\n ];\n\n const onSubmit = async (values) => {\n values.organizationId = organizationId;\n\n const response = await RateTablesService.create({body: values});\n if (response.hasErrors) {\n return response;\n }\n\n notifications.success('Rate Table Created');\n history.push(routes.portal.rateTables.listing);\n };\n\n return (\n \n \n (\n <>\n \n \n \n
\n \n Create Rate Table\n \n \n Cancel\n \n
\n \n )}\n />\n
\n
\n );\n};\n\nexport const RateTableUpdate = () => {\n const history = useHistory();\n const match = useRouteMatch<{id: string}>();\n const id = Number(match.params.id);\n const notifications = useNotification();\n\n const fetchRateTable = useAsync(async () => {\n const {data} = await RateTablesService.getById({\n id,\n });\n return data;\n }, [id]);\n\n const rateTable = fetchRateTable.value || undefined;\n\n const breadcrumbs = [\n {title: 'Rate Tables', url: routes.portal.rateTables.listing},\n {title: rateTable ? rateTable.name : ''},\n ];\n\n const onSubmit = async (values) => {\n const response = await RateTablesService.update({id, body: values});\n if (response.hasErrors) {\n return response;\n }\n notifications.success('Rate Table Updated');\n history.goBack();\n };\n\n const [deleteRateTableState, deleteRateTable] = useAsyncFn(async () => {\n const response = await RateTablesService.deleteById({id});\n if (response.hasErrors) {\n var errorMessage = response.errors.reduce((acc, item) => {\n return `${acc} \\n ${item.errorMessage}`;\n }, '');\n\n notifications.error(errorMessage);\n } else {\n notifications.success('Rate Table successfully deleted');\n history.push(routes.portal.rateTables.listing, {id: id});\n }\n });\n\n return (\n \n \n \n (\n <>\n \n \n \n
\n \n Update Rate Table\n \n \n Cancel\n \n\n \n
\n \n )}\n />\n
\n
\n
\n );\n};\n\nconst FormFields = ({values}: {values?: RateTableDetailDto}) => {\n const Units = {\n 10: 10,\n 100: 100,\n 1000: 1000,\n } as const;\n\n return (\n <>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {values && values.roundingEnabled && (\n \n ({\n text: `${x * 100}%`,\n value: x,\n key: x,\n }))}\n selection\n fieldName=\"roundUpAt\"\n fieldLabel=\"Round Up At\"\n />\n \n )}\n \n \n \n \n \n \n \n \n \n \n );\n};\n","import {faPlus} from '@fortawesome/pro-regular-svg-icons';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport React, {useCallback, useMemo} from 'react';\nimport {Link} from 'react-router-dom';\nimport {Button} from 'semantic-ui-react';\nimport {RateTableTiersService, RateTableTierSummaryDto} from '../api/generated';\nimport {BasicPage} from '../basic-page';\nimport {routes, buildPath} from '../routes';\nimport {\n PagedDataTableConfig,\n usePagedDataTable,\n renderEditButton,\n} from '../hooks/use-paged-data-table';\nimport {AdvancedPagedRequest} from '../types';\nimport {useOrganizationContext} from '../selectors';\n\ntype FetchParams = Parameters<\n typeof RateTableTiersService.getAllByRateTable\n>['0'];\n\ntype RateTableTierListing = {\n getRateTableId: () => number;\n};\n\nexport const RateTableTierListing = (props: RateTableTierListing) => {\n const context = useOrganizationContext();\n const organizationId = context.organizationId as number;\n\n const additionalParams = useMemo(() => {\n return {\n rateTableId: props.getRateTableId(),\n organizationId: organizationId,\n };\n }, [props, organizationId]);\n\n const fetchRateTableTiers = useCallback(\n (x: AdvancedPagedRequest) =>\n RateTableTiersService.getAllByRateTable({\n ...additionalParams,\n ...x,\n } as FetchParams),\n [additionalParams]\n );\n\n const createNewRateTableTierUrl = buildPath(\n routes.portal.rateTableTiers.create,\n {\n rateTableId: props.getRateTableId(),\n }\n );\n\n const pagedDataTable = usePagedDataTable(fetchRateTableTiers, TableConfig, {\n actions: (\n \n ),\n });\n\n return {pagedDataTable};\n};\n\nconst TableConfig = PagedDataTableConfig(\n RateTableTiersService.getAllByRateTable,\n {\n columns: [\n {\n header: '',\n render: item => (\n <>\n {renderEditButton({\n item,\n descriptor: 'rate table tier',\n route: buildPath(routes.portal.rateTableTiers.detail, {\n id: item.id,\n rateTableId: item.rateTableId,\n }),\n })}\n \n ),\n cellProps: {\n collapsing: true,\n },\n },\n {\n header: 'Starting Amount',\n column: 'startingAmount',\n sortable: 'startingAmountForSorting',\n },\n {\n header: 'Ending Amount',\n column: 'endingAmount',\n },\n {\n header: 'Cost Per Unit',\n column: 'costPerUnit',\n },\n {\n header: 'Fixed Cost',\n render: item => (\n <>\n {item.fixedCost && item.fixedCost !== '$0.00' && (\n
\n {item.fixedCost} fixed\n price\n
\n )}\n \n ),\n },\n ],\n searchFieldNames: ['startingAmount', 'endingAmount'],\n defaultSort: {\n column: 'startingAmountForSorting',\n direction: 'ASC',\n },\n }\n);\n","import css from '@emotion/css/macro';\nimport {faPencil} from '@fortawesome/pro-regular-svg-icons';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport React from 'react';\nimport {useAsyncRetry} from 'react-use';\nimport {Button, Segment} from 'semantic-ui-react';\nimport {AsyncStateContainer} from '../components/async-state-container';\nimport {buildPath, routes} from '../routes';\nimport {} from '../api/generated/enums';\nimport {RateTablesService} from '../api/generated';\nimport {useRouteMatch, Link} from 'react-router-dom';\nimport {BasicPage} from '../basic-page';\nimport {DataList} from '../components/data-list';\nimport {Flex} from '../components/flex';\nimport {RateTableTierListing} from '../rate-table-tiers/rate-table-tier-listing';\n\nexport const RateTableDashboard = () => {\n const match = useRouteMatch<{id: string}>();\n const id = Number(match.params.id);\n\n const fetchRateTable = useAsyncRetry(async () => {\n const {data} = await RateTablesService.getById({id});\n\n return data;\n }, [id]);\n\n const rateTable = fetchRateTable.value;\n\n const url = buildPath(routes.portal.rateTables.update, {\n id: id,\n });\n\n return (\n \n {rateTable && (\n <>\n \n
\n \n
\n \n {rateTable.name}\n \n
\n \n \n \n \n \n \n \n
\n
\n \n
\n
\n
\n
\n \n rateTable.id} />\n \n )}\n
\n );\n};\n\nconst styles = css`\n &.details-flex-container {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: stretch;\n width: 100%;\n }\n\n &.account-card {\n margin-bottom: 15px !important;\n margin-top: 0px !important;\n flex: 1;\n\n .account-balance {\n align-self: flex-start;\n .ui.statistic {\n margin-top: 0;\n > .value {\n font-size: 2rem !important;\n }\n }\n }\n\n .card-header {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n\n .left-buttons {\n margin-left: auto;\n }\n }\n }\n`;\n","import { routes } from '.';\nimport React from 'react';\nimport { Redirect, Route, Switch } from 'react-router-dom';\nimport { AccountCreate, AccountUpdate } from '../accounts/account-create-update';\nimport { AccountDashboard } from '../accounts/account-dashboard';\nimport { AccountListing } from '../accounts/account-listing';\nimport { MeterReadingsDashboard } from '../meter-readings/meter-readings-dashboard';\nimport { OrganizationListing } from '../organizations/organization-listing';\nimport { SettingDetails } from '../settings/setting-details';\nimport { SettingListing } from '../settings/setting-listing';\nimport { UserCreate, UserDetails } from '../users/user-create-update';\nimport { UserOrganizationListing } from '../users/user-listing';\nimport {\n MeterReadingCreate,\n MeterReadingDetails,\n} from '../meter-readings/meter-reading-create-update';\nimport {\n OrganizationCreate,\n OrganizationDetails,\n} from '../organizations/organization-create-update';\nimport {\n RateTableTierCreate,\n RateTableTierDetails,\n} from '../rate-table-tiers/rate-table-tier-create-update';\nimport { RateTableListing } from '../rate-table/rate-table-listing';\nimport {\n RateTableCreate,\n RateTableUpdate,\n} from '../rate-table/rate-table-create-update';\nimport { RateTableDashboard } from '../rate-table/rate-table-dashboard';\nimport { useHasAuthorization } from '../auth/authorization-helpers';\n\nexport const PortalRoutes = () => {\n const isAdmin = useHasAuthorization({\n role: ['Global Admin'],\n });\n\n return (\n \n \n \n \n\n {isAdmin ? (\n \n \n \n ) : (\n \n \n \n )}\n\n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n );\n};\n","import css from '@emotion/css/macro';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {SkipNavContent, SkipNavLink} from '@reach/skip-nav';\nimport {cx} from 'emotion';\nimport nameInitials from 'name-initials';\nimport React, {useCallback, useEffect, useState} from 'react';\nimport {Provider, useDispatch, useSelector} from 'react-redux';\nimport {Link} from 'react-router-dom';\nimport {\n Button,\n Divider,\n Dropdown,\n Menu,\n Modal,\n Responsive,\n} from 'semantic-ui-react';\nimport {Image, Message} from 'semantic-ui-react';\nimport {analtyics} from './analytics';\nimport e3logo from './assets/e3-logo.png';\nimport {userManager} from './auth';\nimport {ChangePassword} from './auth/change-password';\nimport {useUser} from './auth/use-auth';\nimport {NavigationLink} from './components/navigation-link';\nimport {NonProductionWarning} from './components/non-production-warning';\nimport {Env} from './config/env-vars';\nimport {ContextSelector} from './context-selector';\nimport {useSubscription} from './hooks/use-subscription';\nimport {PrimaryNavigation} from './primary-navigation';\nimport {routes, buildPath} from './routes';\nimport {LocationNotifier} from './routes/location-notifier';\nimport {payStarColors} from './styles/styled';\n\nimport {\n createStore,\n initializeContext,\n StoreState,\n setSessionExpired,\n} from './store';\nimport {\n faCog,\n faGlobe,\n faTable,\n faUsers,\n} from '@fortawesome/pro-regular-svg-icons';\nimport {PortalRoutes} from './routes/portal';\nimport {useHasAuthorization} from './auth/authorization-helpers';\nimport {useOrganizationContext} from './selectors';\n\nexport const PortalApp = () => {\n const user = useUser();\n\n const store = createStore(user);\n const [modalOpen, setModalOpen] = useState(false);\n\n useEffect(() => {\n analtyics.identify(`${user.id}`);\n }, [user.id]);\n\n useEffect(() => {\n userManager.clearStaleState();\n }, []);\n\n const onLocationChange = useCallback(\n (location) => analtyics.trackPage(location),\n []\n );\n\n return (\n <>\n \n \n \n Main Content\n \n
\n
\n \n \n \n
Submit My Reading
\n
\n \n \n \n \n \n \n \n \n \n \n \n {nameInitials(user.name)}\n \n \n }\n >\n \n setModalOpen(true)}>\n Change Password\n \n {\n userManager.signoutRedirect();\n }}\n >\n Sign Out\n \n \n \n \n
\n
\n \n \n \n
\n
\n
\n
\n \n \n \n\n setModalOpen(false)}>\n Change Password\n \n {\n setModalOpen(false);\n }}\n />\n \n \n \n );\n};\n\nconst LookupAccount = () => {\n const context = useOrganizationContext();\n const slug = context.organization.slug;\n\n return (\n \n \n \n Add Meter Reading\n \n \n \n );\n};\n\nconst AdminMenu = () => {\n const context = useOrganizationContext();\n const organizationId = context.organizationId as number;\n\n const isAdmin = useHasAuthorization({\n role: ['Global Admin'],\n });\n\n const isAdminOrOrganzation = useHasAuthorization({\n role: ['Global Admin', 'Organization Admin'],\n });\n\n const url = buildPath(routes.portal.organizations.detail, {\n id: organizationId,\n });\n\n return (\n } icon={null}>\n \n \n Organization\n \n\n \n\n \n Rate Tables\n \n\n {isAdminOrOrganzation && (\n <>\n \n \n Users\n \n \n )}\n \n \n );\n};\n\nconst OrganizationContextProvider = ({children}) => {\n const context = useSelector((state: StoreState) => state.global.context);\n const dispatch = useDispatch();\n\n useEffect(() => {\n dispatch(initializeContext());\n }, [dispatch]);\n\n if (context.error) {\n return Error loading context;\n }\n\n if (context.loading) {\n return null;\n }\n\n return children;\n};\n\nconst SessionExpiredModal = () => {\n const dispatch = useDispatch();\n\n const sessionExpired = useSelector(\n (state: StoreState) => state.global.sessionExpired\n );\n\n useSubscription('session-expired', () => {\n dispatch(setSessionExpired());\n userManager.signoutRedirect();\n });\n\n return (\n \n Session Expired\n \n );\n};\n\nconst styles = css`\n display: flex;\n flex-direction: column;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n overflow: hidden;\n\n .shadowed.ui.secondary.menu {\n box-shadow: rgb(87, 99, 105) 2px 0px 5px -2px;\n }\n\n .top-navigation.ui.secondary.menu {\n z-index: 3;\n margin: 0;\n padding: 0 25px 0 10px;\n\n @media only screen and (max-width: 500px) {\n padding: 0;\n }\n\n .ui.header {\n color: ${payStarColors.blue3};\n font-weight: normal;\n }\n\n .logo {\n height: 30px;\n margin-bottom: -5px;\n }\n\n .payment-disabled-icon {\n display: block;\n text-align: center;\n }\n\n .collect-payment {\n svg {\n width: 1.18em;\n margin: 0em 10px 0em 0.5em;\n }\n }\n\n .assigned-tickets {\n position: relative;\n\n .assigned-ticket-indicator {\n position: absolute;\n top: 0px;\n right: 0px;\n height: 1rem;\n width: 1rem;\n margin-top: -0.6rem !important;\n margin-right: -0.8rem !important;\n box-shadow: 0px 1px 1px 1px;\n }\n }\n }\n\n .root-container {\n flex: 1 0;\n display: flex;\n overflow: hidden;\n background-color: ${payStarColors.white2};\n }\n\n .user-icon {\n height: 30px;\n width: 30px;\n border-radius: 30px;\n font-size: 1.3rem;\n background: ${payStarColors.blue4};\n color: #fff;\n display: flex;\n align-items: center;\n justify-content: center;\n line-height: 1.5rem;\n }\n\n .user-icon-initial {\n display: inline-block;\n width: 20px;\n text-align: center;\n padding-left: 2px;\n font-size: 0.9rem;\n }\n\n .main-content {\n flex: 1;\n overflow-x: auto;\n display: flex;\n position: relative;\n background: #fff;\n border: solid 1px #b4c5ce;\n box-shadow: rgb(87, 99, 105) -1px 2px 4px -3px;\n border-top: none;\n flex-direction: column;\n\n &.production {\n border-top: solid 4px ${payStarColors.primary.red};\n }\n\n > .content {\n flex: 1;\n overflow-y: auto;\n background-color: #f9f9f9;\n position: relative;\n }\n\n .logo {\n margin-left: auto;\n margin-right: auto;\n margin-bottom: 25px;\n }\n }\n\n .better-border.ui.button.basic:not(.action-button) {\n box-shadow: none !important;\n border: solid 1px;\n border-color: #ccc;\n box-shadow: none;\n background-color: transparent;\n }\n\n .better-border.ui.button.basic:not(.action-button):hover {\n border: solid 1px;\n box-shadow: none;\n background-color: transparent;\n }\n`;\n","import {css} from '@emotion/core';\n\nexport const customerStyles = css`\n .divider {\n width: 80%;\n margin: auto;\n margin-top: 25px;\n margin-bottom: 25px;\n border-top: 2px solid lightgray;\n }\n\n .center-content-box {\n display: flex;\n justify-content: center;\n align-items: center;\n line-height: normal;\n }\n\n .meter-reading-main-content {\n margin-top: 150px;\n margin-bottom: 15px;\n padding-bottom: 25px;\n width: 600px;\n position: relative;\n padding-top: 140px;\n background-color: white;\n -webkit-box-shadow: -7px 10px 5px -1px rgba(0, 0, 0, 0.4);\n -moz-box-shadow: -7px 10px 5px -1px rgba(0, 0, 0, 0.4);\n box-shadow: -7px 10px 5px -1px rgba(0, 0, 0, 0.4);\n }\n\n .circle-content {\n width: 250px;\n height: 250px;\n border-radius: 50%;\n text-align: center;\n position: absolute;\n top: -125px;\n right: 0;\n left: 0;\n left: 50%;\n transform: translateX(-50%);\n background-color: #262e3b;\n }\n\n .meter-image {\n filter: invert(1);\n }\n\n .customer-header-content {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n text-align: center;\n }\n\n .customer-name {\n font-size: 2.5rem;\n margin-top: 15px;\n }\n\n .org-name {\n font-size: 1.25em;\n font-weight: bold;\n }\n\n .account-information {\n padding-top: 15px;\n }\n\n .centerd-body-content {\n width: 80%;\n margin: auto;\n }\n\n .centerd-message-body-content {\n width: 50%;\n text-align: center;\n margin: auto;\n }\n\n .centerd-meter-message-body-content {\n width: 90%;\n text-align: center;\n margin: auto;\n }\n\n .previous-meter-reading {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n width: 80%;\n margin: auto;\n }\n\n .previous-meter-reading .title,\n .new-meter-reading .title {\n font-size: 1.25em;\n font-weight: bold;\n margin-bottom: 15px;\n text-align: center;\n }\n\n .previous-meter-reading .reading-information {\n display: flex;\n flex-wrap: wrap;\n flex-direction: row;\n justify-content: space-around;\n width: 90%;\n font-size: 1.5rem;\n }\n\n .new-meter-reading {\n width: 80%;\n margin: auto;\n }\n\n .new-meter-reading .field label {\n font-weight: normal !important;\n }\n\n .payment-options-container {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n width: 80%;\n margin: auto;\n }\n\n .payment-options-container .title {\n font-size: 2rem;\n margin-bottom: 15px;\n text-align: center;\n }\n\n .pay-with-paystar {\n margin-top: 1rem;\n height: 3rem;\n }\n\n .return-button {\n margin-top: 1rem;\n height: 3rem;\n }\n\n .submit-button {\n height: 3rem;\n }\n\n .submission-table {\n width: 100%;\n }\n\n .submission-table td:first-child {\n text-align: right;\n width: 60%;\n }\n\n .submission-table td:last-child {\n font-size: 1.5em;\n width: 40%;\n }\n\n .tiny-text {\n font-size: 0.674665rem;\n }\n\n .small-text {\n font-size: 1.1rem;\n }\n\n .medium-text {\n font-size: 1.4rem;\n }\n\n .large-text {\n font-size: 1.9rem;\n }\n\n .center-horizontal {\n text-align: center;\n }\n\n .bold {\n font-weight: bold;\n }\n\n .amount-due-container {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n width: 100%;\n height: 100%;\n }\n\n .amount-due-container .title {\n font-size: 2rem;\n margin-bottom: 15px;\n text-align: center;\n }\n\n .amount-due-container .measurement-title {\n font-size: 2rem;\n margin-top: 15px;\n margin-bottom: 10px;\n text-align: center;\n }\n\n .go-back-span {\n cursor: pointer;\n color: blue;\n text-decoration: underline;\n }\n\n .amount-due-title {\n margin-bottom: 5px;\n }\n\n .amount-due-measure {\n margin-bottom: 15px;\n }\n\n .last-reading-info {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n text-align: center;\n padding-top: 15px;\n width: 80%;\n margin: auto;\n font-size: 1.25em;\n }\n\n .terms-of-service {\n text-align: center;\n padding-bottom: 17px;\n }\n\n .logo {\n margin-left: auto;\n margin-right: auto;\n }\n`;\n","import {useLocation} from 'react-router-dom';\n\nexport function useQuery() {\n return new URLSearchParams(useLocation().search);\n}\n","import React from 'react';\nimport meterReadingLogo from '../images/meter-reader-balanced-black.png';\n\nimport {customerStyles} from './customer-styles';\nimport {useQuery} from '../hooks/use-query';\n\nexport const PaymentSuccessful = React.memo(() => {\n const query = useQuery();\n const accountName = query.get('accountName');\n const accountNumber = query.get('accountNumber');\n const paymentAmount = query.get('paymentAmount');\n\n return (\n
\n
\n
\n
\n \n
\n {(accountName || accountNumber) && (\n <>\n
\n {accountName && (\n {accountName}\n )}\n {accountNumber && (\n \n Account Number: \n {accountNumber}\n \n )}\n
\n\n
\n \n )}\n\n
\n
\n Payment {paymentAmount ? `of ${paymentAmount}` : ''} accepted.\n
\n
\n Thanks!\n
\n
\n
\n
\n );\n});\n","import React from 'react';\nimport {Button} from 'semantic-ui-react';\nimport {Form} from '../forms';\n\nexport const AccountSearch = ({setAccountNumber}) => {\n return (\n
\n
\n
Search for an Account
\n
\n {\n setAccountNumber(values.accountNumber);\n }}\n render={() => (\n <>\n \n \n \n \n \n )}\n >\n
\n
\n );\n};\n","import React, {useState} from 'react';\nimport {Message, Modal} from 'semantic-ui-react';\nimport {Form} from '../forms';\nimport {} from '../api/generated/enums';\nimport {css} from '@emotion/core';\nimport {IntegrationsService} from '../api/generated';\n\ntype SkipReadingModal = {\n accountId: number;\n};\n\nexport const SkipReadingModal = (props: SkipReadingModal) => {\n const [isModalOpen, setIsModalOpen] = useState(false);\n\n const onSubmit = async (values) => {\n const response = await IntegrationsService.postPaymentToPayStar({\n body: {\n accountId: props.accountId as number,\n freeFormAmount: values.freeFormAmount ?? 0,\n } as any,\n });\n\n if (response.hasErrors) {\n return response;\n }\n\n window.location.assign(response.data?.paymentLogInLink as string);\n };\n\n return (\n
\n {\n setIsModalOpen(true);\n }}\n >\n Pay Without Submitting a Reading\n \n }\n open={isModalOpen}\n closeOnEscape={isModalOpen}\n closeOnDimmerClick={isModalOpen}\n onClose={() => setIsModalOpen(false)}\n closeIcon\n >\n \n (\n <>\n \n \n \n \n\n \n Pay Now\n \n \n )}\n />\n \n \n
\n );\n};\n\nconst FormFields = () => {\n return (\n \n );\n};\n\nconst styles = css`\n &.modal-notes {\n position: fixed;\n top: 80px;\n bottom: 1;\n }\n\n &.menu-item {\n flex-direction: row;\n display: flex;\n justify-content: left;\n align-items: center;\n }\n\n &.modal-create-header {\n flex-direction: row;\n display: flex;\n align-items: center;\n }\n\n &.modal-create-header-item {\n flex-direction: row;\n display: flex;\n margin-left: auto;\n }\n`;\n","import moment from 'moment';\nimport React from 'react';\nimport {Message} from 'semantic-ui-react';\nimport {customerStyles} from './customer-styles';\nimport {Form} from '../forms';\nimport {\n MeterReadingsService,\n AccountForCustomer,\n MeterReadingSummaryDto,\n} from '../api/generated';\nimport {isInclusivelyBeforeDay, isInclusivelyAfterDay} from 'react-dates';\nimport {SkipReadingModal} from './skip-reading-modal';\n\ntype MeterReadingInput = {\n account: AccountForCustomer;\n lastMeterReading: MeterReadingSummaryDto;\n setMeterReading: (MeterReadingSummaryDto) => void;\n};\n\nexport const MeterReadingInput = (props: MeterReadingInput) => {\n const handleMeterReadingSubmission = async (values) => {\n values.accountId = props.account.id;\n values.calculateAmountDue = true;\n\n const response = await MeterReadingsService.create({body: values});\n\n if (!response.data) {\n return response;\n }\n\n if (response.hasErrors) {\n return response;\n }\n\n props.setMeterReading(response.data);\n };\n\n return (\n <>\n {moment(props.lastMeterReading.readingDate).format('MM/DD/YYYY') !==\n moment().format('MM/DD/YYYY') ? (\n <>\n
\n \n {props.account.organizationName}\n \n {props.account.name}\n \n Account #: \n {props.account.accountNumber}\n \n
\n\n
\n\n
\n
\n
Previous Meter Reading
\n
\n
\n Date: \n \n {moment(props.lastMeterReading.readingDate).format(\n 'MM/DD/YYYY'\n )}\n \n
\n
\n Reading Amount: \n \n {props.lastMeterReading.readingAmount}\n \n
\n
\n
\n
\n\n
\n\n
\n (\n <>\n
Current Meter Reading
\n \n \n isInclusivelyBeforeDay(\n date,\n moment(props.lastMeterReading.readingDate)\n ) || isInclusivelyAfterDay(date, moment().add(1, 'day'))\n }\n withPortal\n />\n \n \n \n \n \n
\n \n By submitting this form, you affirm you read your meter\n and the reading you entered is accurate.\n \n
\n \n Submit Reading\n \n {props.account.alwaysAllowPayments && (\n \n )}\n \n )}\n />\n
\n \n ) : (\n
\n \n There has already been a meter reading submitted for this day.\n \n
\n )}\n \n );\n};\n","import React, {useState} from 'react';\nimport {Button, Message, Modal} from 'semantic-ui-react';\nimport {Form} from '../forms';\nimport {} from '../api/generated/enums';\nimport {css} from '@emotion/core';\nimport {IntegrationsService} from '../api/generated';\n\ntype PaymentConfirmModal = {\n accountId: number;\n defaultAmount: number | undefined;\n paymentMade: boolean;\n};\n\nexport const PaymentConfirmModal = (props: PaymentConfirmModal) => {\n const [isModalOpen, setIsModalOpen] = useState(false);\n const onSubmit = async (values) => {\n const response = await IntegrationsService.postPaymentToPayStar({\n body: {\n accountId: props.accountId as number,\n freeFormAmount: values.freeFormAmount ?? 0,\n } as any,\n });\n\n if (response.hasErrors) {\n return response;\n }\n\n window.location.assign(response.data?.paymentLogInLink as string);\n };\n\n return (\n {\n setIsModalOpen(true);\n }}\n >\n {props.paymentMade ? 'Make an Additional Payment' : 'Pay Now'}\n \n }\n open={isModalOpen}\n closeOnEscape={isModalOpen}\n closeOnDimmerClick={isModalOpen}\n onClose={() => setIsModalOpen(false)}\n closeIcon\n >\n \n (\n <>\n \n \n \n \n\n \n Pay Now\n \n \n )}\n />\n \n \n );\n};\n\nconst FormFields = () => {\n return (\n \n );\n};\n\nconst styles = css`\n &.modal-notes {\n position: fixed;\n top: 80px;\n bottom: 1;\n }\n\n &.menu-item {\n flex-direction: row;\n display: flex;\n justify-content: left;\n align-items: center;\n }\n\n &.modal-create-header {\n flex-direction: row;\n display: flex;\n align-items: center;\n }\n\n &.modal-create-header-item {\n flex-direction: row;\n display: flex;\n margin-left: auto;\n }\n`;\n","import React from 'react';\nimport {useAsyncFn} from 'react-use';\nimport {Button, Message} from 'semantic-ui-react';\nimport {notifications} from '../utils/notification-service';\nimport {useHasAuthorization} from '../auth/authorization-helpers';\nimport {\n MeterReadingsService,\n AccountForCustomer,\n IntegrationsService,\n MeterReadingSummaryDto,\n RateTableDetailDto,\n} from '../api/generated';\nimport {userManager} from '../auth';\nimport {useRouteMatch, useHistory} from 'react-router-dom';\nimport {AuthenticationQueryKeys} from '../api/generated/enums';\nimport {routes} from '../routes';\nimport {PaymentConfirmModal} from './payment-confirm-modal';\n\ntype MeterReadingSubmitted = {\n account: AccountForCustomer;\n rateTable: RateTableDetailDto;\n meterReading: MeterReadingSummaryDto;\n daysSinceLastReading: number;\n};\n\nexport const MeterReadingSubmitted = (props: MeterReadingSubmitted) => {\n const {account, meterReading, rateTable, daysSinceLastReading} = props;\n\n const history = useHistory();\n const match = useRouteMatch<{slug: string}>();\n const slug = match.params.slug;\n const allowMultiplePayments = props.account.allowMultiplePayments;\n\n const paymentMade =\n Number(\n (\n Number(meterReading?.amountReceived.replace('$', '') ?? 0) * 100\n ).toFixed(2)\n ) > 0;\n const amountDue = Number(\n (Number(meterReading?.amountDue.replace('$', '') ?? 0) * 100).toFixed(2)\n );\n\n const isAdmin = useHasAuthorization({\n role: ['Global Admin', 'Organization Admin', 'User'],\n });\n\n const [handlePayWithPayStarState, handlePayWithPayStar] = useAsyncFn(\n async () => {\n const response = await IntegrationsService.postPaymentToPayStar({\n body: {\n accountId: (account.id as unknown) as number,\n } as any,\n });\n\n if (!response.data) {\n return;\n }\n\n if (response.hasErrors) {\n response.errors.map((x) => notifications.error(x.errorMessage));\n } else {\n window.location.assign(response.data.paymentLogInLink);\n }\n }\n );\n\n const handleGoBack = async () => {\n var confirmGoBack = window.confirm(\n 'This will delete the meter entry you just submitted. You will need to resubmit a meter reading if you go back.'\n );\n\n if (confirmGoBack) {\n var response = await MeterReadingsService.deleteByIdForCustomerPortal({\n id: meterReading?.id ?? 0,\n });\n\n if (response.hasErrors) {\n response.errors.forEach((x) => notifications.error(x.errorMessage));\n } else {\n window.location.reload();\n }\n }\n };\n\n return (\n <>\n
\n {account.name}\n \n Account Number: \n {account.accountNumber}\n \n
\n\n {daysSinceLastReading > 1 && (\n
\n You submitted a reading {daysSinceLastReading} days ago.\n
\n You can submit a new reading in {10 - daysSinceLastReading} days.\n
\n )}\n\n
\n\n {!rateTable.manuallyCalculated && (\n
\n \n Amount due for this billing cycle:\n \n \n {meterReading.amountDue}\n \n
\n )}\n
\n \n {meterReading.unitType} used:\n \n \n {meterReading.unitsUsed}\n \n
\n\n {daysSinceLastReading < 2 && !paymentMade && (\n <>\n
\n Is this not correct?{' '}\n \n Click here\n {' '}\n to resubmit.\n
\n \n )}\n\n {rateTable.manuallyCalculated && (\n
\n

\n Thank you for submitting your meter reading! Please calculate the\n amount due based on this usage.\n

\n
\n )}\n\n
\n {paymentMade && (\n \n We received your payment of {meterReading.amountReceived}.\n Thank you!\n \n )}\n {!paymentMade ? (\n account.allowFreeFormPayments ? (\n \n ) : (\n \n Pay Now\n \n )\n ) : (\n allowMultiplePayments && (\n \n )\n )}\n {\n if (isAdmin) {\n history.push(routes.portal.accounts.listing);\n } else {\n userManager.signoutRedirect({\n extraQueryParams: {\n [AuthenticationQueryKeys.OrganizationSlug]: slug,\n },\n });\n }\n }}\n >\n {isAdmin ? 'Return to Accounts' : 'Exit and Pay Offline'}\n \n
\n \n );\n};\n","import React, {useState} from 'react';\nimport {useAsync} from 'react-use';\nimport {Button, Message} from 'semantic-ui-react';\nimport {customerStyles} from './customer-styles';\nimport {AsyncStateContainer} from '../components/async-state-container';\nimport {useHasAuthorization} from '../auth/authorization-helpers';\nimport {\n AccountForCustomer,\n AccountsService,\n MeterReadingSummaryDto,\n RateTablesService,\n} from '../api/generated';\nimport {useRouteMatch} from 'react-router-dom';\nimport {useQuery} from '../hooks/use-query';\nimport {useOrganizationContext} from '../selectors';\nimport {AccountSearch} from './account-search';\nimport {MeterReadingInput} from './meter-reading-input';\nimport {Image} from 'semantic-ui-react';\nimport meterReadingLogo from '../images/meter-reader-balanced-black.png';\nimport e3logo from '../assets/e3-logo.png';\nimport {MeterReadingSubmitted} from './meter-reading-submitted';\nimport moment from 'moment';\n\nexport const MeterReadingContainer = React.memo(() => {\n const context = useOrganizationContext();\n const organizationId = context.organizationId as number;\n\n const query = useQuery();\n const [accountNumber, setAccountNumber] = useState(\n query.get('accountNumber')\n );\n\n const match = useRouteMatch<{slug: string}>();\n const slug = match.params.slug;\n\n const isAdmin = useHasAuthorization({\n role: ['Global Admin', 'Organization Admin', 'User'],\n });\n\n const [meterReading, setMeterReading] = useState();\n\n const fetchAccount = useAsync(async () => {\n var account = !isAdmin\n ? await AccountsService.getByCurrentUser()\n : !accountNumber\n ? undefined\n : await AccountsService.getByAccountNumberForCustomerPortal({\n accountNumber: accountNumber,\n organizationSlug: slug,\n });\n\n setMeterReading(account?.data?.lastMeterReading);\n\n return account;\n }, [accountNumber, isAdmin, slug]);\n\n const fetchRateTable = useAsync(\n async () =>\n await RateTablesService.getByRateCode({\n rateCode: fetchAccount.value?.data?.rateCode as string,\n organizationId: organizationId,\n }),\n [fetchAccount.value, organizationId]\n );\n\n const hasAccountErrors = fetchAccount.value?.hasErrors;\n const accountError = fetchAccount.value?.errors[0]?.errorMessage;\n const rateTable = fetchRateTable.value?.data;\n const isPortalReading = meterReading?.isSubmittedThroughPortal;\n const daysSinceLastReading = meterReading\n ? moment().diff(moment.utc(meterReading?.createdDate), 'd')\n : -1;\n const isReadingWithin10Days = daysSinceLastReading < 10;\n\n return (\n \n \n \n {isAdmin && !accountNumber ? (\n \n ) : isAdmin && accountError ? (\n \n ) : !rateTable ? (\n \n ) : hasAccountErrors ? (\n \n ) : meterReading && isPortalReading && isReadingWithin10Days ? (\n \n ) : (\n \n )}\n \n \n \n );\n});\n\nconst MeterReadingWrapper = React.memo(({children}) => {\n return (\n
\n
\n
\n
\n \n
\n {children}\n
\n
\n
\n \n \n \n
\n
\n );\n});\n\nconst NoAccountFound = ({setAccountNumber}) => (\n <>\n \n
\n {\n setAccountNumber(undefined);\n }}\n >\n Try Another Account Number\n \n
\n \n);\n\nconst NoRateTable = ({setAccountNumber, isAdmin}) => (\n <>\n \n {isAdmin && (\n
\n {\n setAccountNumber(undefined);\n }}\n >\n Try Another Account Number\n \n
\n )}\n \n);\n\nconst AccountIssue = ({message}) => (\n
\n \n
\n);\n","import React from 'react';\nimport {Route, Switch} from 'react-router-dom';\nimport {PaymentSuccessful} from '../customers/payment-successful';\nimport {routes} from '.';\nimport {MeterReadingContainer} from '../customers/meter-reading-container';\n\nexport const CustomerRoutes = () => {\n return (\n \n \n \n \n \n \n \n \n );\n};\n","import css from '@emotion/css/macro';\nimport {cx} from 'emotion';\nimport React, {useCallback, useEffect, useState} from 'react';\nimport {faSignOut} from '@fortawesome/pro-regular-svg-icons';\nimport {Provider, useDispatch, useSelector} from 'react-redux';\nimport {Modal, Message, Button} from 'semantic-ui-react';\nimport {analtyics} from './analytics';\nimport {userManager} from './auth';\nimport {ChangePassword} from './auth/change-password';\nimport {useUser} from './auth/use-auth';\nimport {NonProductionWarning} from './components/non-production-warning';\nimport {Env} from './config/env-vars';\nimport {useSubscription} from './hooks/use-subscription';\nimport {LocationNotifier} from './routes/location-notifier';\nimport {payStarColors} from './styles/styled';\n\nimport {\n createStore,\n initializeContext,\n StoreState,\n setSessionExpired,\n} from './store';\nimport {SkipNavLink} from '@reach/skip-nav';\nimport {CustomerRoutes} from './routes/customer';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {AuthenticationQueryKeys} from './api/generated/enums';\nimport {useRouteMatch, useHistory} from 'react-router-dom';\nimport {useHasAuthorization} from './auth/authorization-helpers';\nimport {routes} from './routes';\n\nexport const CustomerApp = () => {\n const user = useUser();\n const store = createStore(user);\n const [modalOpen, setModalOpen] = useState(false);\n const match = useRouteMatch<{slug: string}>();\n const slug = match.params.slug;\n\n const history = useHistory();\n\n const isAdmin = useHasAuthorization({\n role: ['Global Admin', 'Organization Admin'],\n });\n\n useEffect(() => {\n analtyics.identify(`${user.id}`);\n }, [user.id]);\n\n useEffect(() => {\n userManager.clearStaleState();\n }, []);\n\n const onLocationChange = useCallback(\n location => analtyics.trackPage(location),\n []\n );\n\n return (\n <>\n \n \n \n Main Content\n \n
\n
\n \n
\n
\n {\n if (isAdmin) {\n history.push(routes.portal.accounts.listing);\n } else {\n if (slug === ':slug') {\n userManager.signoutRedirect();\n } else {\n userManager.signoutRedirect({\n extraQueryParams: {\n [AuthenticationQueryKeys.OrganizationSlug]: slug,\n },\n });\n }\n }\n }}\n >\n {' '}\n {isAdmin ? 'Accounts' : 'Sign Out'}\n \n
\n \n
\n
\n
\n
\n \n \n \n\n setModalOpen(false)}>\n Change Password\n \n {\n setModalOpen(false);\n }}\n />\n \n \n \n );\n};\n\nconst OrganizationContextProvider = ({children}) => {\n const context = useSelector((state: StoreState) => state.global.context);\n const dispatch = useDispatch();\n\n useEffect(() => {\n dispatch(initializeContext());\n }, [dispatch]);\n\n if (context.error) {\n return Error loading context;\n }\n\n if (context.loading) {\n return null;\n }\n\n return children;\n};\n\nconst SessionExpiredModal = () => {\n const dispatch = useDispatch();\n\n const sessionExpired = useSelector(\n (state: StoreState) => state.global.sessionExpired\n );\n\n useSubscription('session-expired', () => {\n dispatch(setSessionExpired());\n userManager.signoutRedirect();\n });\n\n return (\n \n Session Expired\n \n );\n};\n\nconst styles = css`\n display: flex;\n flex-direction: column;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n overflow: hidden;\n\n .sign-out {\n position: absolute;\n display: block;\n right: 0;\n padding-top: 0.4rem;\n padding-right: 0.4rem;\n }\n\n .shadowed.ui.secondary.menu {\n box-shadow: rgb(87, 99, 105) 2px 0px 5px -2px;\n }\n\n .top-navigation.ui.secondary.menu {\n z-index: 3;\n margin: 0;\n padding: 0 25px 0 10px;\n\n @media only screen and (max-width: 500px) {\n padding: 0;\n }\n\n .ui.header {\n color: ${payStarColors.blue3};\n font-weight: normal;\n }\n\n .logo {\n height: 30px;\n margin-bottom: -5px;\n }\n\n .payment-disabled-icon {\n display: block;\n text-align: center;\n }\n\n .collect-payment {\n svg {\n width: 1.18em;\n margin: 0em 10px 0em 0.5em;\n }\n }\n\n .assigned-tickets {\n position: relative;\n\n .assigned-ticket-indicator {\n position: absolute;\n top: 0px;\n right: 0px;\n height: 1rem;\n width: 1rem;\n margin-top: -0.6rem !important;\n margin-right: -0.8rem !important;\n box-shadow: 0px 1px 1px 1px;\n }\n }\n }\n\n .root-container {\n flex: 1 0;\n display: flex;\n overflow: hidden;\n background-color: ${payStarColors.white2};\n }\n\n .user-icon {\n height: 30px;\n width: 30px;\n border-radius: 30px;\n font-size: 1.3rem;\n background: ${payStarColors.blue4};\n color: #fff;\n display: flex;\n align-items: center;\n justify-content: center;\n line-height: 1.5rem;\n }\n\n .user-icon-initial {\n display: inline-block;\n width: 20px;\n text-align: center;\n padding-left: 2px;\n font-size: 0.9rem;\n }\n\n .main-content {\n flex: 1;\n overflow-x: auto;\n display: flex;\n position: relative;\n background: #fff;\n border: solid 1px #b4c5ce;\n box-shadow: rgb(87, 99, 105) -1px 2px 4px -3px;\n border-top: none;\n flex-direction: column;\n\n &.production {\n border-top: solid 4px ${payStarColors.primary.red};\n }\n\n > .content {\n flex: 1;\n overflow-y: auto;\n background-color: #f9f9f9;\n position: relative;\n height: 100%;\n background: linear-gradient(33deg, #f2f2f2 50%, #b2e2fb 50%);\n }\n }\n`;\n","import React, {useContext} from 'react';\nimport {Redirect, Route, Switch} from 'react-router-dom';\nimport {AuthContext, useUser} from './auth/use-auth';\nimport {PortalApp} from './portal-app';\nimport {appSubdirectory, rootRoutes} from './routes';\nimport {logger} from './utils/logger';\nimport { CustomerApp } from './customer-app';\n\nexport const App = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nconst log = logger('auth');\n\nconst RoleLandingPageResolver = () => {\n const {redirectUrl = ''} = useContext(AuthContext);\n const user = useUser();\n\n let userDefaultUrl = rootRoutes.portal;\n\n // let slug: string;\n if (user.role === 'Quick Pay') {\n // slug = user.attributes?.organization_slug || '';\n userDefaultUrl = rootRoutes.customer;\n // userDefaultUrl = slug\n // ? 'costomerz' //buildPath(routes.customer.dashboard, {slug})\n // : rootRoutes.customer;\n }\n\n let url = redirectUrl || userDefaultUrl || rootRoutes.portal;\n const useUserDefault =\n url === '/' || url === appSubdirectory || url === `${appSubdirectory}/`;\n\n if (useUserDefault) {\n url = userDefaultUrl;\n }\n\n log.info('redirectUrl', {\n role: user.role,\n url,\n userDefaultUrl,\n redirectUrl,\n appSubdirectory,\n });\n\n return ;\n};\n\nconst Callback = () => {\n const context = useContext(AuthContext);\n const redirect = context.redirectUrl ?? '/';\n\n return ;\n};\n","import React from 'react';\nimport {ToastProvider} from 'react-toast-notifications';\nimport styled from '@emotion/styled/macro';\nimport {NotificationService} from '../utils/notification-service';\n\nconst Container = styled.div`\n position: fixed;\n top: 70px;\n right: 8px;\n max-height: 100%;\n z-index: 10001;\n box-sizing: border-box;\n overflow-x: hidden;\n overflow-y: auto;\n padding: 8px;\n`;\n\nconst Components = {Container};\n\nexport const ToastContainer: React.FC = ({children}) => (\n \n \n {children}\n \n);\n","import 'react-app-polyfill/ie11';\nimport 'react-app-polyfill/stable';\n\nimport 'typeface-roboto';\nimport 'semantic-ui-less/semantic.less';\nimport '@reach/skip-nav/styles.css';\nimport '@reach/tooltip/styles.css';\n\nimport './dev-tools';\nimport './analytics/sentry';\nimport './api/generated/config';\n\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport {BrowserRouter as Router} from 'react-router-dom';\nimport {App} from './app';\nimport {AuthProvider} from './auth/use-auth';\nimport {ToastContainer} from './components/toast-container';\nimport {Env} from './config/env-vars';\nimport {GlobalStyles} from './styles';\n\nReactDOM.render(\n \n \n \n \n \n \n \n ,\n document.getElementById('root')\n);\n","import {isEqual} from 'lodash';\nimport {useRef} from 'react';\n\nexport const useMemoizedValue = value => {\n const stateRef = useRef(value);\n if (!isEqual(value, stateRef.current)) {\n stateRef.current = value;\n }\n return stateRef.current;\n};\n","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAABBCAYAAAAnplb4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAk6QAAJOkBUCTn+AAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAACAASURBVHic7Z17fFxVufd/z5pJ0tSCbWk7s3eSyXQm0GqQVyl3RAoH5VrkRSmIr0cQBcUXQQWaomDLxbS8HjgqRblYQDly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BB3bz0gvuqGYwGAwGg2GCwAAlJV5kAQAAABFJREFUmyKmj7jBYDAYDB7xPwfyKNC85QiMAAAAAElFTkSuQmCC\"","module.exports = __webpack_public_path__ + \"static/media/meter-reader-balanced-black.f5da6cf8.png\";"],"sourceRoot":""}