{"version":3,"sources":["lib/utils/authConfig.js","store/slices/auth.js","store/slices/pref.js","store/slices/taxCast.js","lib/utils/errorUtil.js","lib/components/ErrorToast.js","store/slices/clientProfile.js","store/slices/advisor.js","store/slices/settings.js","store/index.js","lib/router/routes.js","constants/api.js","api/advisor.js","store/asyncActions/auth.js","lib/utils/account.js","modules/Auth/index.js","constants/settings.js","store/asyncActions/settings.js","modules/NavDrawer/components/DrawerHeader.js","modules/NavDrawer/components/NavList.js","modules/NavDrawer/components/ExpandButton.js","modules/NavDrawer/components/UserUtils.js","modules/NavDrawer/components/WorkingItems.js","modules/NavDrawer/index.js","modules/Login/index.js","lib/components/Tabs.js","constants/categories.js","api/utils.js","api/taxCast.js","lib/utils/forecastUtils.js","constants/toolBoxData.js","store/asyncActions/taxCast.js","api/client.js","constants/relationships.js","lib/utils/dateTimeUtils.js","constants/regex.js","lib/utils/form.js","lib/components/FormField.js","lib/components/DatePickerField.js","lib/components/SelectField.js","modules/TaxCast/components/ClientProfile/OtherDependents/NewDialog.js","modules/TaxCast/components/ClientProfile/OtherDependents/EditDialog.js","modules/TaxCast/components/ClientProfile/DeleteDialog.js","modules/TaxCast/components/ClientProfile/OtherDependents/index.js","constants/filingStatuses.js","lib/utils/format.js","lib/components/CheckboxField.js","lib/utils/validation.js","modules/TaxCast/components/ClientProfile/Profile/EditDialog.js","modules/TaxCast/components/ClientProfile/Profile/index.js","modules/TaxCast/components/ClientProfile/SpousePartner/NewDialog.js","modules/TaxCast/components/ClientProfile/SpousePartner/EditDialog.js","modules/TaxCast/components/ClientProfile/SpousePartner/index.js","modules/TaxCast/components/ClientProfile/index.js","lib/components/BusySignal.js","modules/ItsDeadJim/index.js","lib/utils/transactionCategoriesUtil.js","modules/TaxCast/components/Canvas/TaxCastToolBox/ToolBoxItem.js","modules/TaxCast/components/Canvas/TaxCastToolBox/ExpandableToolBox.js","modules/TaxCast/components/Canvas/TaxCastToolBox/index.js","modules/TaxCast/components/Canvas/TaxCastCanvas/TransactionPopover.js","modules/TaxCast/components/Canvas/TaxCastCanvas/TaxTile.js","modules/TaxCast/components/Canvas/TaxCastCanvas/TaxGroup.js","modules/TaxCast/components/Canvas/TaxCastCanvas/InactiveTaxTile.js","modules/TaxCast/components/Canvas/TaxCastCanvas/InactiveTaxGroup.js","modules/TaxCast/components/Canvas/TaxCastCanvas/TaxYearSummary.js","modules/TaxCast/components/Canvas/TaxCastCanvas/TaxYear.js","modules/TaxCast/components/Canvas/TaxCastCanvas/InactiveTaxYear.js","modules/TaxCast/components/Canvas/TaxCastCanvas/index.js","modules/TaxCast/components/Canvas/TrendRibbon/ClientShortProfile.js","modules/TaxCast/components/Canvas/TrendRibbon/TaxTrend.js","modules/TaxCast/components/Canvas/TrendRibbon/index.js","constants/charitableContributionTypes.js","modules/TaxCast/components/Canvas/dialogs/components/TransactionInfoPanel.js","modules/TaxCast/components/Canvas/dialogs/components/TransactionForm.js","lib/utils/transactionSpreader.js","modules/TaxCast/components/Canvas/dialogs/components/SpreadTransactionForm.js","modules/TaxCast/components/Canvas/dialogs/components/AlimonyStatement.js","modules/TaxCast/components/Canvas/dialogs/components/CharitableContributionTypeForm.js","modules/TaxCast/components/Canvas/dialogs/components/LongTermCapitalGainsForm.js","modules/TaxCast/components/Canvas/dialogs/components/NonQualifiedDividendForm.js","modules/TaxCast/components/Canvas/dialogs/components/QbidForm.js","modules/TaxCast/components/Canvas/dialogs/NewTransaction.js","modules/TaxCast/components/Canvas/dialogs/EditTransaction.js","modules/TaxCast/components/Canvas/dialogs/DeleteTransaction.js","modules/TaxCast/components/Canvas/dialogs/SplitDistributeTransaction.js","modules/TaxCast/components/Canvas/index.js","modules/TaxCast/components/Analytics/index.js","modules/TaxCast/index.js","modules/ClientSearch/components/RestoreDialog.js","modules/ClientSearch/components/TemplatesList.js","modules/ClientSearch/index.js","modules/Forms/NewClientForm.js","modules/Forms/NewAdvisorForm.js","modules/Help/index.js","modules/Help/ContactUs.js","modules/Advisor/Summary.js","modules/Advisor/Disclosures.js","constants/advisorDesignations.js","modules/Advisor/Designations.js","modules/Advisor/Account.js","modules/Advisor/Address.js","modules/Advisor/EmailAddresses.js","modules/Advisor/PhoneNumber.js","modules/Advisor/ChangeRequests.js","modules/Advisor/index.js","modules/Logout/index.js","modules/TaxCast/components/Analytics/UnusedOrdinaryBracketCapacity.js","modules/TaxCast/components/Analytics/ReportViewer.js","modules/LandingPage/index.js","modules/Help/About.js","lib/components/SearchBar.js","modules/Help/Glossary.js","api/glossary.js","modules/Help/provisionsData.js","modules/Help/CurrentProvisions.js","modules/Help/FutureProvisions.js","modules/Auth/components/ContactUsAboutStatus.js","modules/Auth/components/AcceptUsagePolicies.js","api/payment.js","modules/Payment/index.js","modules/ExtendForecast/index.js","lib/components/YouTubeEmbed.js","modules/Campaign/index.js","App.js","theme/theme.js","theme/index.jsx","serviceWorker.js","index.js","assets/img/Logo192x192.png","assets/img/Help-About.jpg","assets/img/Help-AccountMaintenance.jpg","assets/img/Help-ContactUsSupport.jpg","assets/img/Help-CurrentProvisions.jpg","assets/img/Help-Glossary.jpg","assets/img/Help-Roadmap.jpg","assets/img/Help-TaxPlanningWithTaxCast.jpg","assets/img/VSL_TaxCast_Screen_Images_20220328_3mb_pancrop.gif","assets/img/BouncingBarsBlack.png","assets/img/Logo512x512.png"],"names":["ua","window","navigator","userAgent","msie","indexOf","msie11","isIE","isEdge","isFirefox","tenant","reactRedirectUri","location","protocol","hostname","port","tenantSubdomain","split","instance","msalConfig","auth","clientId","process","authority","redirectUri","postLogoutRedirectUri","knownAuthorities","cache","storeAuthStateInCookie","loginRequest","scopes","initialState","user","accessToken","account","authSlice","createSlice","name","reducers","LOAD_ACCOUNT","state","action","payload","axios","defaults","headers","common","id","UPDATE_ACCOUNT_STATUS","accountStatusValue","newStatus","accountStatus","accountStatusReason","newStatusReason","AADB2C_LOGIN_SUCCESS","emailAddress","emails","pick","preferredEmailAddress","isNew","newUser","AADB2C_LOGOUT_SUCCESS","sessionStorage","setItem","Object","assign","authActions","actions","prefSlice","theme","choice","UPDATE_THEME","SET_WEB_SITE_CHOICE","prefActions","isLoadingCanvas","isSubmitting","newTransactionDialog","editTransactionDialog","deleteTransactionDialog","splitDistributeTransactionDialog","splitDistributeOperation","error","client","forecast","isRunningCalculations","calculations","isBusy","isBusyBackground","filingStatusByTaxYearChangeData","needsToCatchUp","canRollover","isPreFlightComplete","taxCastSlice","ERROR","SILENT_ERROR","SUBMITTING_FORM","TOGGLE_NEW_TRANSACTION_DIALOG","TOGGLE_EDIT_TRANSACTION_DIALOG","TOGGLE_DELETE_TRANSACTION_DIALOG","ADD_TRANSACTION","transaction","index","displaySequence","years","taxYear","category","splice","toast","success","length","ADD_TRANSACTION_SPREAD","forEach","tx","EDIT_TRANSACTION","data","find","trans","DELETE_TRANSACTION","filter","REORDER_TRANSACTIONS","destination","source","LOADING","LOAD_CANVAS","UPDATE_PREFLIGHT_STATUS","UNLOAD_FORECAST","RESET","RUNNING_CALCULATIONS","CALCULATIONS_RESULTS","UPDATED_CLIENT_PROFILE","SET_BUSY","CLEAR_BUSY","UPDATED_FILING_STATUS_FOR_TAX_YEAR","taxYearIndex","yearList","filingStatusByYearList","filingStatus","SPREAD_TRANSACTIONS","TOGGLE_SPLIT_DISTRIBUTE_TRANSACTION_DIALOG","operation","taxCastActions","shapeErrorsForToast","result","response","status","statusText","isUnhandledExceptionResponse","Array","isArray","toString","ErrorToast","toastTitle","errorMessages","map","msg","key","defaultProps","clientProfileSlice","autoClose","ADD_CLIENT_PROFILE","advisor","advisorSlice","ADD_ADVISOR","taxTableYear","Date","getFullYear","settingsSlice","LOAD_SETTINGS","settingsActions","middlewares","thunk","authPersistConfig","storage","prefPersistConfig","ProtectedRoute","children","path","exact","isAuthenticated","useIsAuthenticated","inProgress","useMsal","render","InteractionStatus","None","to","pathname","from","baseUrl","createAccountChangeRequest","advisorId","changeRequest","post","getRestoreClientProfileTemplates","templateId","get","createAccountEventEntry","affiliateId","event","details","stamp","updateAccountStatusWithEventEntry","reason","patch","then","idToken","dispatch","ACCOUNT_STATUS_CHANGED","LOGOUT","extractTrialDuration","toLowerCase","startsWith","exec","isTrialExpired","trialStartDate","trialDuration","today","trialExpirationDate","setDate","getDate","countTrialDaysRemaining","Math","round","accountStatusIsActiveOrUnexpiredTrial","accountCreateStamp","useStyles","makeStyles","root","maxWidth","breakpoints","down","margin","spacing","up","paper","minWidth","header","marginBottom","marginTop","marginLeft","marginRight","padding","content","rightCell","leftCell","borderRight","palette","primary","main","Auth","classes","useDispatch","history","useHistory","useSelector","useState","isFound","setIsFound","getItem","checkingUpdateAvailable","setCheckingUpdateAvailable","suggestUpdate","setSuggestUpdate","availableVersion","setAvailableVersion","setAccountStatus","trialExpired","setTrialExpired","trialDaysRemaining","setTrialDaysRemaining","isCancelled","setIsCancelled","isLoadingAccount","setIsLoadingAccount","marketingWebSiteLinkChoice","preference","useEffect","document","title","azureActiveDirectoryObjectId","unmounted","tokenSource","CancelToken","versionSettingIndex","findIndex","s","rowKey","versionSetting","value","taxTableYearSettingIndex","taxTableYearSetting","catch","shapedErrors","e","includes","push","oid","finally","cancel","handleSearchClick","Grid","container","item","xs","className","Paper","elevation","md","src","TaxCastLogo","alt","Typography","component","variant","color","Button","onClick","reload","href","style","givenName","surname","Dialog","open","aria-labelledby","aria-describedby","DialogTitle","DialogContent","DialogContentText","DialogActions","advisorApi","logoutPopup","autoFocus","DrawerHeader","display","MrBean","height","text","NavList","List","ListItem","button","ListItemIcon","Home","ListItemText","Search","expandIcon","background","navDrawer","expandButtonColor","position","top","borderRadius","left","zIndex","drawer","transition","transitions","create","easing","sharp","duration","leavingScreen","expanded","enteringScreen","ExpandButton","toggleDrawer","IconButton","size","clsx","aria-label","ChevronLeft","ChevronRight","UserUtils","isDarkMode","Help","Settings","paddingLeft","avatar","backgroundColor","WorkingItems","loadedClient","taxCast","ListItemAvatar","Avatar","substring","toUpperCase","flexShrink","whiteSpace","flexDirection","drawerOpen","overflowX","width","openWidth","drawerClose","closeWidth","NavDrawer","setOpen","Drawer","Divider","openState","divider","Login","callbackId","addEventCallback","eventType","EventType","LOGIN_SUCCESS","setActiveAccount","acquireTokenSilent","idTokenClaims","acquireTokenPopup","removeEventCallback","loginPopup","FSTabs","currentTab","onChange","orientation","Tabs","indicatorColor","textColor","FSTabPanel","labelBy","role","hidden","categoryTypes","categoryDisplayMap","ordinaryIncome","capitalGains","deductions","subcategoryDisplayMap","farmIncome","interest","iraDistribution","nonQualifiedDividends","sCorpDistributions","shortTermCapitalGains","soleProprietorshipIncome","taxableSocialSecurity","wages","longTermCapitalGains","qualifiedDividends","charitableContribution","healthSavingsAccountContribution","medicalExpense","mortgageInterest","personalPropertyTaxes","realEstateTaxes","retirementPlanContribution","stateIncomeTaxes","studentLoanInterest","alimony","otherDeductionAboveTheLine","otherDeductionBelowTheLine","higherEducationExpense","normalizeTransaction","norm","filterTransactions","transactions","year","categoryType","filtered","normalizedTransactions","sortBy","getClientData","availableTaxTableYear","clientApiData","fullName","normalizeClientProfile","clientProfile","currentYear","needToCatchUp","taxTablesYear","canDoRollover","forecastApiData","normalizeForecast","taxYears","normalizeTransactions","createTransaction","transactionDetail","runCalculations","clientProfileId","forecastId","toolBoxData","type","NEW_TRANSACTION_DIALOG","subcategory","sub","draggableId","replace","droppableId","NEW_TRANSACTION","taxCastApi","charitableContributionType","MOVE_TRANSACTION","updateDetails","message","REFRESH_CALCULATIONS","put","delete","RUN_CALCULATIONS","UPDATE_FILING_STATUS_FOR_TAX_YEAR","updateClientProfile","createClientRelation","clientRelation","updateClientRelation","deleteClientRelation","clientRelationId","relationshipTypes","unspecified","spouse","child","sibling","parent","nibling","parentSibling","grandparent","other","relationshipDisplayMap","getAge","birthDate","trunc","moment","diff","currencyRegex","emailRegex","phoneNumberRegex","trimWhiteSpace","trim","composeValidators","validators","reduce","validator","undefined","required","validAmount","test","isEmail","FormField","label","validate","maxLength","rows","rowsMax","multiline","shrink","submitOnEnter","startAdornment","format","readOnly","formatOnBlur","input","meta","showError","touched","TextField","fullWidth","helperText","InputLabelProps","disabled","InputProps","inputProps","autoComplete","onKeyPress","preventDefault","InputAdornment","noop","DatePickerField","disableToolbar","disableFuture","disablePast","clearable","parse","startOf","toISOString","inputConfig","DatePicker","inputVariant","htmlFor","SelectField","inputLabel","useRef","labelWidth","setLabelWidth","current","offsetWidth","FormControl","InputLabel","ref","Select","FormHelperText","minHeight","form","field","NewDialog","show","onClose","closeDialog","relation","disableBackdropClick","MuiPickersUtilsProvider","utils","MomentUtils","onSubmit","clientApi","initialValues","relationship","notes","handleSubmit","submitting","invalid","noValidate","justify","lg","textArea","keys","MenuItem","dependent","EditDialog","DeleteDialog","handleConfirmRemoveClose","flexGrow","list","OtherDependents","dependentsList","showDialogDelete","setShowDialogDelete","selectedRelation","setSelectedRelation","selectedRelationId","setSelectedRelationId","dependents","setDependents","showDialogNew","setShowDialogNew","showDialogEdit","setShowDialogEdit","updatedIndex","dependentsCopy","updatedItem","remove","PersonOutline","secondary","ListItemSecondaryAction","Tooltip","edge","Edit","relationId","Delete","filingStatusTypes","single","marriedFilingJointly","marriedFilingSeparatelyNoCohabitation","marriedFilingSeparatelySomeCohabitation","headOfHousehold","filingStatusDisplayMap","currencyFormatter","Intl","NumberFormat","currency","minimumFractionDigits","maximumFractionDigits","phoneNumberFormatter","phoneNumber","match","danger","CheckboxField","FormControlLabel","control","Checkbox","isNullEmptyOrBlank","isValidAmount","isValidPhoneNumberUnadorned","modifiedProfile","omit","sameBillingAddress","billingAddressLineOne","preferredAddressLineOne","billingAddressLineTwo","preferredAddressLineTwo","billingAddressCity","preferredAddressCity","billingAddressStateOrProvince","preferredAddressStateOrProvince","billingAddressPostalCode","preferredAddressPostalCode","preferredPhoneNumber","normalizedClientProfile","values","sm","fontSize","Profile","profile","setClientProfile","updatedProfile","ButtonGroup","Mail","clipboard","writeText","FileCopy","clientProfileAddress","clientSpouse","sameAddressAsClient","addressLineOne","addressLineTwo","addressCity","addressStateOrProvince","addressPostalCode","spousePartner","isSameAddressAsClient","checked","SpousePartner","spousePartnerRelation","setSpousePartner","isAddressSame","setIsAddressSame","addressSame","Person","leftColumn","paddingRight","middleColumn","rightColumn","borderBottom","ClientProfile","useParams","isLoading","setIsLoading","family","setFamily","isInEditModeNotes","setIsInEditModeNotes","editedNotes","setEditedNotes","Backdrop","backdrop","CircularProgress","target","updatedFamily","BusySignal","ItsDeadJim","isAboveTheLineDeduction","subcat","getBelowTheLineDeductions","allDeductions","deduction","primaryBackground","border","isDragging","ToolBoxItem","provided","snapshot","square","innerRef","draggableProps","dragHandleProps","categoryText","fontWeight","panelDetails","detailGrid","maxHeight","overflowY","ExpandableToolBox","items","ExpansionPanel","ExpansionPanelSummary","ExpansionPanelDetails","isDropDisabled","placeholder","TaxCastToolBar","expand","setExpand","moreItemIcon","moreText","TransactionPopover","editTransaction","deleteTransaction","duplicateTransaction","anchorEl","togglePopover","Popover","anchorOrigin","vertical","horizontal","transformOrigin","dense","PlaylistAdd","gridContainer","blue","tiles","incomeColor","pink","deductionsColor","orange","capitalGainsColor","primaryTextColor","amount","moreIcon","right","bottom","TaxTile","setAnchorEl","currentTarget","noWrap","charitableContributionClassification","groupContainer","overflow","paddingBottom","flexWrap","TaxGroup","isMobile","useMediaQuery","direction","wrap","InactiveTaxTile","InactiveTaxGroup","summaryText","propertyText","textSize","calculation","borderTop","TaxYearSummary","summary","ordinaryTaxableIncome","capitalGainsTaxableIncome","ordinaryTaxableIncomeTax","capitalGainsTaxableIncomeTax","totalTax","yearContainer","borderLeft","reorderIcon","TaxYear","taxYearAvailable","showChangeFilingStatusDialog","setShowChangeFilingStatusDialog","currentFilingStatus","setCurrentFilingStatus","newFilingStatus","setNewFilingStatus","marginalTaxRate","effectiveTaxRate","dividers","RadioGroup","Radio","InactiveTaxYear","expandoPanel","expando","canvasExpando","expandoText","expandoGrid","TaxCastCanvas","isBusyCalculating","didPromptToCatchUp","setDidPromptToCatchUp","showPromptToCatchUp","setShowPromptToCatchUp","wantsToCatchUp","setWantsToCatchUp","didPromptToRollover","setDidPromptToRollover","showPromptToRollover","setShowPromptToRollover","wantsToRollover","setWantsToRollover","expandedYears","setExpandedYears","getFilingStatusForTaxYear","matchingYears","y","expandedYearsObject","handleCatchUpDialogActionClick","executeCatchUpSelection","handleRolloverDialogActionClick","executeRolloverSelection","loading","currentValue","handleChange","activeYear","KeyValueGrid","ClientShortProfile","YearTaxPair","tax","showTax","TaxTrend","toggleShowTaxAmount","setToggleShowTaxAmount","ToggleOff","ToggleOn","TrendRibbon","addButton","charitableContributionTypesDisplayMap","cash","conservationEasementFarmerRancher","conservationEasement","propertyDepreciatedFairMarketValue","propertyShortTermAppreciationBasis","propertyShortTermAppreciationFairMarketValue","propertyLongTermAppreciationBasis","leftPanel","default","paddingTop","TransactionInfoPanel","mode","charitableContributionTypeValue","salePrice","basisAmount","isQualifiedBusinessIncome","isSpecifiedServiceOrTradeBusiness","w2WagesPaidByBusiness","qualifiedPropertyAmountOwnedByBusiness","isSection199AReitDividend","capitalGainsIcons","capitalGainsIconsSumButton","TransactionForm","onFieldUpdate","onValidate","isErrorName","setIsErrorName","isErrorValue","setIsErrorValue","isValidForm","handleInputChangeBase","isValid","associatedWith","row","labelPlacement","modifyByPercent","modifyByMultiplier","modifyByAmount","modifyByNoChange","distributeTransaction","transactionValue","transactionTaxYear","units","modifier","getModifier","previousYearValue","Number","selected","currentYearValue","spreadTransaction","spreadByAmount","spreadByUnits","selectedYears","pickBy","yearlyValue","splitTransaction","spreadField","SpreadTransactionForm","forecastYearList","onIsSpreadUpdate","onSpreadDataUpdate","showSpread","setShowSpread","selectAllNone","setSelectAllNone","setSpreadByAmount","isErrorSpreadByAmount","setIsErrorSpreadByAmount","setSpreadByUnits","isApplySpreadEnabled","setIsApplySpreadEnabled","spreadData","setSpreadData","updatingSpreadData","validateFormSpread","newSpreadData","updateOverallSelectionState","spreadDataState","newSelectionState","selectedItems","toggleSingleYear","handleYearlyAmountInputChange","handleYearlyAmountInputBlur","Switch","willShowSpread","nextState","indeterminate","onBlur","AlimonyStatement","CharitableContributionTypeForm","contributionType","onDataUpdate","setData","LongTermCapitalGainsForm","computedValue","setComputedValue","isErrorBasisAmount","setIsErrorBasisAmount","isErrorSalePrice","setIsErrorSalePrice","handleInputChangeLongTermCapitalGains","newData","NonQualifiedDividendForm","isSection199a","QbidForm","isQbi","isSstb","w2WagesPaid","qualifiedProperty","isErrorW2Wages","setIsErrorW2Wages","isErrorQualifiedProperty","setIsErrorQualifiedProperty","handleInputChangeQbid","dataToValidate","PropTypes","bool","NewTransactionDialog","isValidBase","setIsValidBase","isValidExtended","setIsValidExtended","isValidSpread","setIsValidSpread","isSaveEnabled","setIsSaveEnabled","isSpread","spreadableTransaction","setSpreadableTransaction","extendedData","setExtendedData","handleCancel","handleOnValidateExtended","handleOnExtendedDataUpdate","extendedFormData","fieldName","fieldValue","updatingSpreadableTransaction","isTransactionSpread","spreadIsUsed","newTransaction","nowYear","EditTransactionDialog","editableTransaction","setEditableTransaction","updatingeditableTransaction","deleteButton","borderColor","DeleteTransactionDialog","SplitDistributeTransactionDialog","SPLIT_DISTRIBUTE_TRANSACTION_DIALOG","newTransactions","columnOrder","order","trendRibbon","ClientTaxCast","NewTransaction","SplitDistributeTransaction","EditTransaction","DeleteTransaction","onDragEnd","isEqual","moveTransaction","interactionType","InteractionType","Popup","authenticationRequest","errorComponent","loadingComponent","TaxCastToolBox","card","Analytics","advisorGivenName","advisorSurname","disclosureA","disclosureB","disclosureC","clientGivenName","clientSurname","handleClickOpenInNew","reportType","reportName","localStorage","JSON","stringify","serializeStateToLocalStorage","Card","CardHeader","Description","subheader","CardContent","CardActions","disableSpacing","OpenInNew","BarChart","tab","textTransform","TaxCast","params","queryString","URLSearchParams","useLocation","search","parseInt","setCurrentTab","settings","GET_CLIENT_DATA","_","newTab","Tab","aria-controls","selectedTab","RestoreDialog","TemplatesList","selectedTemplateId","setSelectedTemplateId","isLoaded","setIsLoaded","templates","setTemplates","showDialogRestore","setShowDialogRestore","setIsBusy","onClickRestore","selectedTemplateParam","template","Restore","criteria","results","resultsList","ClientSearch","useAdvancedSearch","setUseAdvancedSearch","searchResults","setSearchResults","simpleCriteria","setSimpleCriteria","advancedCriteria","setAdvancedCriteria","revealedId","setRevealedId","mask","canSearch","setCanSearch","isSearching","setIsSearching","searchComplete","setSearchComplete","isErrorSimpleSearch","setIsErrorSimpleSearch","revealAll","setReveaAll","handleInputChange","handleClickSearch","searchCriteria","criterion","sr","isTemplate","handleClickClear","handleClickNewClient","onKeyDown","keyCode","inline","VisibilityOff","Visibility","textAlign","NewClientForm","setClientId","navigateNext","NewAdvisorForm","newAdvisor","isFinished","setIsFinished","given_name","family_name","confirmEulaCheckbox","confirmPrivacyPolicyCheckbox","justifyContent","HelpAndSupport","handleClickContactUsSupport","handleClickTaxPlanningWithTaxCast","handleClickGlossary","handleClickCurrentProvisions","handleClickFutureProvisions","handleClickAccountMaintenance","handleClickAbout","CardActionArea","CardMedia","image","HelpContactUsSupport","gutterBottom","HelpTaxPlanningWithTaxCast","HelpGlossary","HelpCurrentProvisions","HelpRoadmap","HelpAccountMaintenance","HelpAbout","ContactUs","goBack","otherThanNameContainer","otherThanNameText","Summary","designationsList","otherThanName","disclosure","Disclosures","advisorDisclosures","onSave","disclosures","setDisclosures","onChangeDisclosure","disclosureId","newDisclosures","advisorDesignations","AIF","AIFA","CFA","CFP","ChFC","CIC","CIMA","CLU","CPA","EA","JD","PFS","designationIsRegistered","designation","Designations","advisorDesignationsList","designations","setDesignations","showDesignationDialog","setShowDesignationDialog","handleConfirmPfsCpaRelationshipClose","selectedIndex","updatedDesignations","indexOfPfs","indexOfCpa","onChangeCheckbox","join","tableBanner","table","Account","middleName","changeRequests","onCreateChangeRequest","newGivenName","setNewGivenName","newMiddleName","setNewMiddleName","newSurname","setNewSurname","reasonForChange","setReasonForChange","showChangeRequestDialog","setShowChangeRequestDialog","isErrorReasonForChange","setIsErrorReasonForChange","onClickDialogAction","propertyGroup","requestedValue","Table","TableHead","TableRow","TableCell","TableBody","orderBy","submittedStamp","Address","newAddressLineOne","setNewAddressLineOne","newAddressLineTwo","setNewAddressLineTwo","newAddressCity","setNewAddressCity","newAddressStateOrProvince","setNewAddressStateOrProvince","newAddressPostalCode","setNewAddressPostalCode","EmailAddresses","newEmailAddress","setNewEmailAddress","PhoneNumber","newPhoneNumber","setNewPhoneNumber","ChangeRequests","wrapper","alignItems","Advisor","setAdvisor","setChangeRequests","currentTabTitle","setCurrentTabTitle","updatedChangeRequests","updatedDisclosures","updatedDesignationsList","o","Logout","UnusedOrdinaryBracketCapacity","brackets","setBrackets","effectiveRateYValues","setEffectiveRateYValues","isBusyBracketsLoading","setIsBusyBracketsLoading","isBusyComputingOffsets","setIsBusyComputingOffsets","taxWithinBracketDeltaYValues","setTaxWithinBracketDeltaYValues","fullBracketCountValues","setFullBracketCountValues","forecastYearListSubset","slice","loadTaxBrackets","useCallback","newBrackets","i","bracketsForTaxYear","taxBracket","sortedBracket","bracketEntry","computeBarHeightInBracket","totalAmount","bracketIndex","maximum","minimum","bracket","getFullBracketCount","computeEffectiveRateTick","effectiveRate","lowerBracketValue","upperBracketValue","bracketsBelow","filingStatusBracket","tb","withinBracketIndex","bracketFound","chartHeight","deltaYTickList","effectiveRateList","fullBracketCountList","domain","x","domainPadding","VictoryTheme","material","centerTitle","tickValues","range","tickFormat","tickLabels","dependentAxis","tickLabelComponent","dy","fill","labels","labelComponent","dx","symbol","ReportViewer","isLocalStorageLoaded","setIsLocalStorageLoaded","reportingBaseUrl","reportState","setReportState","taxCastUserId","deserializedState","deserializeStateFromLocalStorage","toolbarPluginInstance","toolbarPlugin","Toolbar","workerUrl","props","EnterFullScreen","Print","Zoom","ZoomIn","ZoomOut","plugins","fileUrl","httpHeaders","Authorization","onDocumentLoad","LandingPage","has","About","FSSearchBar","inputEl","isEmpty","setEmpty","bouncedSearch","debounce","endAdornment","focus","Clear","inputRef","Glossary","glossaryEntries","setGlossaryEntries","selectedEntry","setSelectedEntry","filteredEntries","setFilteredEntries","quickFilterList","setQuickFilterList","entries","term","firstValueList","entry","sort","sortedUniqueList","sortedUniqBy","occurrenceCountObject","countBy","sortedOccurrenceCountList","buildQuickFilterList","filterGlossaryEntries","filterValue","filteredList","SearchBar","quickFilter","TableContainer","Fragment","foundEntry","handleListItemClick","scope","colSpan","Collapse","in","timeout","unmountOnExit","Box","description","provisions","currentProvisions","provision","section","taxReturnReference","futureProvisions","availability","CurrentProvisions","FutureProvisions","ContactUsAboutStatus","AcceptUsagePolicies","confirmEula","setConfirmEula","confirmPrivacyPolicy","setConfirmPrivacyPolicy","isSaving","setIsSaving","getAmountDue","Payment","css","encodeURI","paymentData","setPaymentData","setIsSubmitting","newDiscountCodeId","setNewDiscountCodeId","discountCodeAmount","setDiscountCodeAmount","hasConsented","setHasConsented","amountDue","setAmountDue","appliedDiscountCodeId","setAppliedDiscountCodeId","expiry","setExpiry","paymentSucceeded","setPaymentSucceeded","paymentApi","responseDiscountCodes","discountCodeInfo","amountUnits","frameBorder","scrolling","onLoad","addEventListener","token","getElementById","discountCode","discountCodeId","amountDueResponse","applyError","getAmountDueError","getDiscountCodeError","paymentInfo","paymentJson","cvv","ExtendForecast","selectedOption","setForecast","setTransactions","copyLatestYearTransactionsToNewYears","setCopyLatestYearTransactionsToNewYears","extendingCompletedSuccessfully","setExtendingCompletedSuccessfully","cloningCompletedSuccessfully","setCloningCompletedSuccessfully","errorCount","setErrorCount","latestYear","option","handleClickCancel","getExtendedToYear","numberOfYearsToAdd","numberOfYearsToCatchUp","latestFilingStatus","newForecast","newTx","videoResponsive","videoResponseIframe","YouTubeEmbed","embedId","allow","allowFullScreen","rootOg","headerPanel","logo","dialog","Campaign","bookingsUrl","setBookingsUrl","ACQUIRE_TOKEN_SUCCESS","handleLoginClick","PreviewGif","reports","App","pca","HelpContactUs","colors","getTheme","darkMode","createMuiTheme","ThemeProvider","CssBaseline","isLocalhost","Boolean","registerValidSW","swUrl","config","serviceWorker","register","registration","onupdatefound","installingWorker","installing","onstatechange","controller","console","log","onUpdate","onSuccess","msalInstance","PublicClientApplication","store","configureStore","reducer","persistReducer","authReducer","prefReducer","taxCastReducer","clientProfileReducer","advisorReducer","settingsReducer","middleware","persistor","persistStore","interceptors","request","use","getState","Promise","reject","requestConfig","msalResponse","ReactDOM","hideProgressBar","URL","origin","fetch","contentType","ready","unregister","checkValidServiceWorker","module","exports"],"mappings":"uOAIMA,EAAKC,OAAOC,UAAUC,UACtBC,EAAOJ,EAAGK,QAAQ,SAClBC,EAASN,EAAGK,QAAQ,YAGpBE,EAAOH,EAAO,GAAKE,EAAS,EAC5BE,EAHSR,EAAGK,QAAQ,SAGF,EAClBI,EAHUT,EAAGK,QAAQ,WAGC,EAEtBK,EAAS,iCASTC,EAHmB,UAAMV,OAAOW,SAASC,SAAtB,aAAmCZ,OAAOW,SAASE,WAE7C,UAA7Bb,OAAOW,SAASC,SAAhB,WAA2CZ,OAAOW,SAASG,MAAS,IAGhEC,EAAkBN,EAAOO,MAAM,KAAK,GACpCC,EAAQ,kBAAcF,EAAd,iBAIDG,EAAa,CACxBC,KAAM,CACJC,SAhBkBC,uCAiBlBC,UANiB,UAAML,EAAN,YAAkBR,EAAlB,YAZA,6BAmBjBc,YAAY,GAAD,OAAKb,EAAL,UACXc,sBAAsB,GAAD,OAAKd,EAAL,WACrBe,iBAAkB,CAAC,gCAErBC,MAAO,CACLC,uBAAwBrB,GAAQC,GAAUC,IA8BjCoB,EAAe,CAC1BC,OAAQ,CACN,SACA,UACA,gG,sEChEEC,EAAe,CACnBC,KAAM,GACNC,YAAa,GACbC,QAAS,IAILC,EAAYC,YAAY,CAC5BC,KAAM,OACNN,eACAO,SAAU,CACRC,aADQ,SACKC,EAAOC,GAClBD,EAAMN,QAAUO,EAAOC,QACvBC,IAAMC,SAASC,QAAQC,OAAO,qBAAuBL,EAAOC,QAAQK,IAEtEC,sBALQ,SAKcR,EAAOC,GAG3BD,EAAMN,QAAQe,mBAAqBR,EAAOC,QAAQQ,UAClDV,EAAMN,QAAQiB,cAAgBV,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QAAU,IAA0B,+C,uHCA3CD,EAAOC,QAAU,IAA0B,0C","file":"static/js/main.2e62df43.chunk.js","sourcesContent":["// import { LogLevel } from \"@azure/msal-browser\";\r\n// Browser check variables\r\n// If you support IE, our recommendation is that you sign-in using Redirect APIs\r\n// If you as a developer are testing using Edge InPrivate mode, please add \"isEdge\" to the if check\r\nconst ua = window.navigator.userAgent;\r\nconst msie = ua.indexOf('MSIE ');\r\nconst msie11 = ua.indexOf('Trident/');\r\nconst msedge = ua.indexOf('Edge/');\r\nconst firefox = ua.indexOf('Firefox');\r\nconst isIE = msie > 0 || msie11 > 0;\r\nconst isEdge = msedge > 0;\r\nconst isFirefox = firefox > 0; // Only needed if you need to support the redirect flow in Firefox incognito\r\n\r\nconst tenant = 'canvilyticsb2c.onmicrosoft.com';\r\nconst signInPolicy = 'B2C_1_SignUpSignInTaxCast';\r\nconst applicationId = process.env.REACT_APP_MSAL_APPLICATION_ID;\r\n\r\n// To support custom subdomains, build the domain string.\r\n// Ignore port numbers for the common ports. NOTE: HTTPS is required so port 80 should fail.\r\nconst protocolAndHostName = `${window.location.protocol}//${window.location.hostname}`;\r\nconst port =\r\n window.location.protocol === 'http:' ? `:${window.location.port}` : '';\r\nconst reactRedirectUri = protocolAndHostName + port; // process.env.REACT_APP_MSAL_REDIRECT_URI;\r\n\r\nconst tenantSubdomain = tenant.split('.')[0];\r\nconst instance = `https://${tenantSubdomain}.b2clogin.com`;\r\nconst signInAuthority = `${instance}/${tenant}/${signInPolicy}`;\r\n\r\n// Config object to be passed to Msal on creation\r\nexport const msalConfig = {\r\n auth: {\r\n clientId: applicationId,\r\n authority: signInAuthority,\r\n redirectUri: `${reactRedirectUri}/login`,\r\n postLogoutRedirectUri: `${reactRedirectUri}/logout`,\r\n knownAuthorities: ['canvilyticsb2c.b2clogin.com'],\r\n },\r\n cache: {\r\n storeAuthStateInCookie: isIE || isEdge || isFirefox,\r\n },\r\n // system: {\r\n // loggerOptions: {\r\n // loggerCallback: (level, message, containsPii) => {\r\n // if (containsPii) {\r\n // return;\r\n // }\r\n // switch (level) {\r\n // case LogLevel.Error:\r\n // console.error(message);\r\n // break;\r\n // case LogLevel.Info:\r\n // console.info(message);\r\n // break;\r\n // case LogLevel.Verbose:\r\n // console.debug(message);\r\n // break;\r\n // case LogLevel.Warning:\r\n // console.warn(message);\r\n // break;\r\n // default:\r\n // break;\r\n // }\r\n // }\r\n // }\r\n // },\r\n};\r\n\r\n// Add here scopes for id token to be used at MS Identity Platform endpoints.\r\nexport const loginRequest = {\r\n scopes: [\r\n 'openid',\r\n 'profile',\r\n 'https://canvilyticsb2c.onmicrosoft.com/ab122c9b-3da9-42f6-aa8b-a09b4a1f996b/TaxCast.Advisor',\r\n ],\r\n};\r\n","// import { toast } from 'react-toastify';\r\nimport { createSlice } from '@reduxjs/toolkit';\r\nimport { pick } from 'lodash';\r\nimport axios from 'axios';\r\n\r\n// In this context, the following distinctions are made:\r\n// user - the Azure AD B2C identity information\r\n// account - the Canvilytics (TaxCast) account information\r\nconst initialState = {\r\n user: {},\r\n accessToken: '',\r\n account: {},\r\n};\r\n\r\n/* eslint no-param-reassign: [\"error\", { \"ignorePropertyModificationsFor\": [\"state\"] }] */\r\nconst authSlice = createSlice({\r\n name: 'auth',\r\n initialState,\r\n reducers: {\r\n LOAD_ACCOUNT(state, action) {\r\n state.account = action.payload;\r\n axios.defaults.headers.common['x-taxcast-user-id'] = action.payload.id;\r\n },\r\n UPDATE_ACCOUNT_STATUS(state, action) {\r\n // Although .accountStatus SHOULD BE used throughout,\r\n // set .accountStatusValue to match for consistency.\r\n state.account.accountStatusValue = action.payload.newStatus;\r\n state.account.accountStatus = action.payload.newStatus;\r\n state.account.accountStatusReason = action.payload.newStatusReason;\r\n },\r\n AADB2C_LOGIN_SUCCESS(state, action) {\r\n const emailAddress = action.payload.emails[0];\r\n state.user = pick(action.payload, [\r\n 'family_name',\r\n 'given_name',\r\n 'name',\r\n 'oid',\r\n ]);\r\n state.user = {\r\n ...state.user,\r\n preferredEmailAddress: emailAddress,\r\n isNew: action.payload.newUser ?? true,\r\n };\r\n },\r\n AADB2C_LOGOUT_SUCCESS(state) {\r\n window.sessionStorage.setItem('taxcast.auth.accessToken', null);\r\n Object.assign(state, initialState);\r\n },\r\n },\r\n});\r\n\r\nexport const authActions = authSlice.actions;\r\nexport default authSlice.reducer;\r\n","import { createSlice } from '@reduxjs/toolkit';\r\n\r\nconst initialState = {\r\n theme: 'light',\r\n choice: 'app',\r\n};\r\n\r\n/* eslint no-param-reassign: [\"error\", { \"ignorePropertyModificationsFor\": [\"state\"] }] */\r\nconst prefSlice = createSlice({\r\n name: 'pref',\r\n initialState,\r\n reducers: {\r\n UPDATE_THEME(state, action) {\r\n state.theme = action.payload || 'light';\r\n },\r\n SET_WEB_SITE_CHOICE(state, action) {\r\n state.choice = action.payload;\r\n },\r\n },\r\n});\r\n\r\nexport const prefActions = prefSlice.actions;\r\nexport default prefSlice.reducer;\r\n","/* eslint max-lines: [2, {\"max\": 200, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport { createSlice } from '@reduxjs/toolkit';\r\nimport { toast } from 'react-toastify';\r\nimport { filter, find, forEach } from 'lodash';\r\n\r\nconst initialState = {\r\n isLoadingCanvas: true,\r\n isSubmitting: false,\r\n newTransactionDialog: null,\r\n editTransactionDialog: null,\r\n deleteTransactionDialog: null,\r\n splitDistributeTransactionDialog: null,\r\n splitDistributeOperation: null,\r\n error: '',\r\n client: {},\r\n forecast: {},\r\n isRunningCalculations: false,\r\n calculations: {},\r\n isBusy: false,\r\n isBusyBackground: false,\r\n filingStatusByTaxYearChangeData: null,\r\n needsToCatchUp: false,\r\n canRollover: false,\r\n isPreFlightComplete: false,\r\n};\r\n\r\n/* eslint no-param-reassign: [\"error\", { \"ignorePropertyModificationsFor\": [\"state\"] }] */\r\nconst taxCastSlice = createSlice({\r\n name: 'taxCast',\r\n initialState,\r\n reducers: {\r\n ERROR(state, action) {\r\n Object.assign(state, initialState, {\r\n error: action.payload,\r\n isBusy: false,\r\n });\r\n },\r\n SILENT_ERROR(state) {\r\n state.isBusy = false;\r\n state.isRunningCalculations = false;\r\n state.isSubmitting = false;\r\n },\r\n SUBMITTING_FORM(state) {\r\n state.isSubmitting = true;\r\n },\r\n TOGGLE_NEW_TRANSACTION_DIALOG(state, action) {\r\n state.newTransactionDialog = action.payload;\r\n state.isSubmitting = false;\r\n },\r\n TOGGLE_EDIT_TRANSACTION_DIALOG(state, action) {\r\n state.editTransactionDialog = action.payload;\r\n state.isSubmitting = false;\r\n },\r\n TOGGLE_DELETE_TRANSACTION_DIALOG(state, action) {\r\n state.deleteTransactionDialog = action.payload;\r\n state.isSubmitting = false;\r\n },\r\n ADD_TRANSACTION(state, action) {\r\n const transaction = action.payload;\r\n const index = transaction.displaySequence;\r\n\r\n state.forecast.years[transaction.taxYear][transaction.category].splice(\r\n index,\r\n 0,\r\n transaction\r\n );\r\n toast.success(\r\n `${action.payload.length} Transaction(s) Successfully Created!`\r\n );\r\n state.newTransactionDialog = null;\r\n },\r\n ADD_TRANSACTION_SPREAD(state, action) {\r\n forEach(action.payload, (tx) => {\r\n state.forecast.years[tx.taxYear][tx.category].splice(\r\n tx.displaySequence,\r\n 0,\r\n tx\r\n );\r\n });\r\n toast.success(\r\n `${action.payload.length} Transaction(s) Successfully Created!`\r\n );\r\n state.newTransactionDialog = null;\r\n },\r\n EDIT_TRANSACTION(state, action) {\r\n const data = action.payload;\r\n const transaction = state.forecast.years[data.taxYear][\r\n data.category\r\n ].find((trans) => trans.id === data.id);\r\n\r\n Object.assign(transaction, data);\r\n toast.success('Transaction Successfully Updated!');\r\n state.editTransactionDialog = null;\r\n },\r\n DELETE_TRANSACTION(state, action) {\r\n const { id, taxYear, category } = action.payload;\r\n state.forecast.years[taxYear][category] = filter(\r\n state.forecast.years[taxYear][category],\r\n (trans) => trans.id !== id\r\n );\r\n toast.success('Transaction Successfully Deleted!');\r\n state.deleteTransactionDialog = null;\r\n },\r\n REORDER_TRANSACTIONS(state, action) {\r\n const { destination, source, category, id } = action.payload;\r\n const transaction = find(\r\n state.forecast.years[source.taxYear][category],\r\n (trans) => trans.id === id\r\n );\r\n\r\n state.forecast.years[source.taxYear][category].splice(\r\n source.displaySequence,\r\n 1\r\n );\r\n state.forecast.years[destination.taxYear][category].splice(\r\n destination.displaySequence,\r\n 0,\r\n transaction\r\n );\r\n },\r\n LOADING(state) {\r\n state.isLoadingCanvas = true;\r\n },\r\n LOAD_CANVAS(state, action) {\r\n state.isLoadingCanvas = false;\r\n state.client = action.payload.client;\r\n state.forecast = action.payload.forecast;\r\n state.needsToCatchUp = action.payload.needsToCatchUp;\r\n state.canRollover = action.payload.canRollover;\r\n },\r\n UPDATE_PREFLIGHT_STATUS(state, action) {\r\n state.isPreFlightComplete = action.payload;\r\n },\r\n UNLOAD_FORECAST(state) {\r\n state.forecast = {};\r\n state.calculations = {};\r\n state.needsToCatchUp = false;\r\n state.canRollover = false;\r\n state.isPreFlightComplete = false;\r\n },\r\n RESET(state) {\r\n Object.assign(state, initialState);\r\n },\r\n RUNNING_CALCULATIONS(state) {\r\n state.isRunningCalculations = true;\r\n },\r\n CALCULATIONS_RESULTS(state, action) {\r\n state.isRunningCalculations = false;\r\n state.calculations = action.payload;\r\n },\r\n UPDATED_CLIENT_PROFILE(state, action) {\r\n state.client = { ...state.client, ...action.payload };\r\n },\r\n SET_BUSY(state) {\r\n state.isBusy = true;\r\n },\r\n CLEAR_BUSY(state) {\r\n state.isBusy = false;\r\n },\r\n UPDATED_FILING_STATUS_FOR_TAX_YEAR(state, action) {\r\n // Expected: { taxYear, filingStatus }\r\n const taxYearIndex = state.forecast.yearList.indexOf(\r\n action.payload.taxYear\r\n );\r\n state.forecast.filingStatusByYearList[taxYearIndex] =\r\n action.payload.filingStatus;\r\n },\r\n SPREAD_TRANSACTIONS(state, action) {\r\n state.newTransactionDialog = {\r\n ...state.newTransactionDialog,\r\n ...action.payload,\r\n };\r\n },\r\n TOGGLE_SPLIT_DISTRIBUTE_TRANSACTION_DIALOG(state, action) {\r\n state.splitDistributeTransactionDialog = action.payload?.transaction;\r\n state.splitDistributeOperation = action.payload?.operation;\r\n state.isSubmitting = false;\r\n },\r\n },\r\n});\r\n\r\nexport const taxCastActions = taxCastSlice.actions;\r\nexport default taxCastSlice.reducer;\r\n","/* eslint-disable import/prefer-default-export */\r\n\r\nconst isUnhandledExceptionResponse = (error) => {\r\n // For exceptions from the server which are unhandled, the response is:\r\n // {\r\n // data: \"\"\r\n // status: 500\r\n // statusText: \"Internal Server Error\"\r\n // }\r\n let result = false;\r\n if (\r\n error &&\r\n error.response &&\r\n error.response.data === '' &&\r\n error.response.status === 500 &&\r\n error.response.statusText === 'Internal Server Error'\r\n ) {\r\n result = true;\r\n }\r\n return result;\r\n};\r\n\r\nexport const shapeErrorsForToast = (error) => {\r\n if (isUnhandledExceptionResponse(error)) {\r\n return [\r\n 'A problem occurred performing the operation. The technology team has been notified.',\r\n ];\r\n }\r\n\r\n if (error && error.response && error.response.data) {\r\n if (Array.isArray(error.response.data)) {\r\n return error.response.data;\r\n }\r\n return [error.response.data];\r\n }\r\n\r\n if (error && error.status) {\r\n return [`${error.status} - ${error.statusText}`];\r\n }\r\n\r\n // Special Case: May still occur until exception handling is fully implemented.\r\n if (error && !error.status) {\r\n return [error.toString()];\r\n }\r\n\r\n return [error];\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nexport const ErrorToast = ({ toastTitle, errorMessages }) => {\r\n return (\r\n <>\r\n {toastTitle}\r\n \r\n \r\n );\r\n};\r\n\r\nErrorToast.propTypes = {\r\n toastTitle: PropTypes.string,\r\n errorMessages: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n};\r\n\r\nErrorToast.defaultProps = {\r\n toastTitle: 'The following error(s) occurred:',\r\n};\r\n\r\nexport default ErrorToast;\r\n","import React from 'react';\r\nimport { createSlice } from '@reduxjs/toolkit';\r\nimport { toast } from 'react-toastify';\r\nimport { shapeErrorsForToast } from 'lib/utils/errorUtil';\r\nimport { ErrorToast } from 'lib/components/ErrorToast';\r\n\r\nconst initialState = {\r\n isSubmitting: false,\r\n error: '',\r\n client: {},\r\n};\r\n\r\n/* eslint no-param-reassign: [\"error\", { \"ignorePropertyModificationsFor\": [\"state\"] }] */\r\nconst clientProfileSlice = createSlice({\r\n name: 'clientProfile',\r\n initialState,\r\n reducers: {\r\n ERROR(state, action) {\r\n Object.assign(state, initialState, { error: action });\r\n },\r\n SILENT_ERROR(state, action) {\r\n toast.error(\r\n ,\r\n { autoClose: false }\r\n );\r\n state.isSubmitting = false;\r\n },\r\n SUBMITTING_FORM(state) {\r\n state.isSubmitting = true;\r\n },\r\n ADD_CLIENT_PROFILE(state) {\r\n // const client = action.payload;\r\n // state.client = client;\r\n state.isSubmitting = false;\r\n },\r\n },\r\n});\r\n\r\nexport const clientProfileActions = clientProfileSlice.actions;\r\nexport default clientProfileSlice.reducer;\r\n","import React from 'react';\r\nimport { createSlice } from '@reduxjs/toolkit';\r\nimport { toast } from 'react-toastify';\r\nimport { shapeErrorsForToast } from 'lib/utils/errorUtil';\r\nimport { ErrorToast } from 'lib/components/ErrorToast';\r\n\r\nconst initialState = {\r\n isSubmitting: false,\r\n error: '',\r\n advisor: {},\r\n};\r\n\r\n/* eslint no-param-reassign: [\"error\", { \"ignorePropertyModificationsFor\": [\"state\"] }] */\r\nconst advisorSlice = createSlice({\r\n name: 'advisor',\r\n initialState,\r\n reducers: {\r\n ERROR(state, action) {\r\n Object.assign(state, initialState, { error: action.payload });\r\n },\r\n SILENT_ERROR(state, action) {\r\n toast.error(\r\n ,\r\n { autoClose: false }\r\n );\r\n state.isSubmitting = false;\r\n },\r\n SUBMITTING_FORM(state) {\r\n state.isSubmitting = true;\r\n },\r\n ADD_ADVISOR(state, action) {\r\n const advisor = action.payload;\r\n state.advisor = advisor;\r\n state.isSubmitting = false;\r\n },\r\n },\r\n});\r\n\r\nexport const advisorActions = advisorSlice.actions;\r\nexport default advisorSlice.reducer;\r\n","import { createSlice } from '@reduxjs/toolkit';\r\n\r\nconst initialState = {\r\n taxTableYear: new Date().getFullYear(),\r\n};\r\n\r\n/* eslint no-param-reassign: [\"error\", { \"ignorePropertyModificationsFor\": [\"state\"] }] */\r\nconst settingsSlice = createSlice({\r\n name: 'settings',\r\n initialState,\r\n reducers: {\r\n LOAD_SETTINGS(state, action) {\r\n state.taxTableYear = +action.payload;\r\n },\r\n },\r\n});\r\n\r\nexport const settingsActions = settingsSlice.actions;\r\nexport default settingsSlice.reducer;\r\n","import thunk from 'redux-thunk';\r\nimport { configureStore } from '@reduxjs/toolkit';\r\n// , getDefaultMiddleware\r\n// import { configureStore } from '@reduxjs/toolkit';\r\nimport {\r\n // FLUSH,\r\n // PAUSE,\r\n // PERSIST,\r\n // PURGE,\r\n // REGISTER,\r\n // REHYDRATE,\r\n persistReducer,\r\n persistStore,\r\n} from 'redux-persist';\r\nimport sessionStorage from 'redux-persist/lib/storage/session';\r\nimport storage from 'redux-persist/lib/storage';\r\n// import axios from 'axios';\r\n\r\nimport authReducer from './slices/auth';\r\nimport prefReducer from './slices/pref';\r\nimport taxCastReducer from './slices/taxCast';\r\nimport clientProfileReducer from './slices/clientProfile';\r\nimport advisorReducer from './slices/advisor';\r\nimport settingsReducer from './slices/settings';\r\n\r\nconst logger =\r\n process.env.NODE_ENV === 'development'\r\n ? require('redux-logger').createLogger({\r\n diff: true,\r\n duration: true,\r\n collapsed: true,\r\n })\r\n : null;\r\n\r\nconst middlewares = [thunk];\r\n\r\nif (logger) {\r\n middlewares.push(logger);\r\n}\r\n\r\n// // Authorization Header\r\n// const authHeader = (store) => (next) => (action) => {\r\n// const { accessToken } = store.getState().auth;\r\n// axios.defaults.headers.common.Authorization = accessToken\r\n// ? `Bearer ${accessToken}`\r\n// : null;\r\n// return next(action);\r\n// };\r\n\r\n// middlewares.push(authHeader);\r\n\r\n// Custom Headers\r\n// const customHeaders = (store) => (next) => (action) => {\r\n// axios.defaults.headers.common[\r\n// 'x-taxcast-user-id'\r\n// ] = store.getState().auth.account.id;\r\n// return next(action);\r\n// };\r\n\r\n// middlewares.push(customHeaders);\r\n\r\nconst authPersistConfig = {\r\n key: 'auth',\r\n storage: sessionStorage,\r\n};\r\n\r\nconst prefPersistConfig = {\r\n key: 'pref',\r\n storage,\r\n};\r\n\r\nexport default () => {\r\n const store = configureStore({\r\n reducer: {\r\n auth: persistReducer(authPersistConfig, authReducer),\r\n preference: persistReducer(prefPersistConfig, prefReducer),\r\n taxCast: taxCastReducer,\r\n clientProfile: clientProfileReducer,\r\n advisor: advisorReducer,\r\n settings: settingsReducer,\r\n },\r\n middleware: [\r\n // ...getDefaultMiddleware({\r\n // serializableCheck: {\r\n // ignoredActions: [FLUSH, REHYDRATE, PAUSE, PERSIST, PURGE, REGISTER],\r\n // },\r\n // }),\r\n ...middlewares,\r\n ],\r\n });\r\n\r\n const persistor = persistStore(store);\r\n\r\n return { store, persistor };\r\n};\r\n","/* eslint-disable import/prefer-default-export */\r\nimport React from 'react';\r\nimport { Redirect, Route } from 'react-router-dom';\r\nimport PropTypes from 'prop-types';\r\nimport { useIsAuthenticated, useMsal } from '@azure/msal-react';\r\nimport { InteractionStatus } from '@azure/msal-browser';\r\n\r\nexport const ProtectedRoute = ({ children, path, exact }) => {\r\n const isAuthenticated = useIsAuthenticated();\r\n const { inProgress } = useMsal();\r\n\r\n return (\r\n {\r\n return isAuthenticated || inProgress !== InteractionStatus.None ? (\r\n children\r\n ) : (\r\n \r\n );\r\n }}\r\n />\r\n );\r\n};\r\n\r\nProtectedRoute.propTypes = {\r\n children: PropTypes.element.isRequired,\r\n path: PropTypes.string.isRequired,\r\n exact: PropTypes.bool,\r\n};\r\n\r\nProtectedRoute.defaultProps = {\r\n exact: false,\r\n};\r\n","/* eslint-disable import/prefer-default-export */\r\nexport const baseUrl = process.env.REACT_APP_API_BASEURL;\r\nexport const baseReportingUrl = process.env.REACT_APP_REPORTING_API_BASEURL;\r\nexport const basePaymentVendorUrl =\r\n process.env.REACT_APP_PAYMENT_VENDOR_BASEURL;\r\n","import axios from 'axios';\r\n\r\nimport { baseUrl } from 'constants/api';\r\n\r\nexport const createAdvisor = (advisor) =>\r\n axios.post(`${baseUrl}/api/advisors`, advisor);\r\n\r\nexport const getClientProfileList = (advisorId) =>\r\n axios.get(`${baseUrl}/api/advisors/${advisorId}/client-profiles`);\r\n\r\nexport const searchAdvisor = (emailAddress, azureActiveDirectoryObjectId) =>\r\n axios.post(`${baseUrl}/api/advisors/search`, {\r\n emailAddress,\r\n azureActiveDirectoryObjectId,\r\n });\r\n\r\nexport const reloadAdvisor = (affiliateId, advisorId) =>\r\n axios.get(`${baseUrl}/api/affiliates/${affiliateId}/advisors/${advisorId}`);\r\n\r\nexport const updateAdvisorDisclosures = (affiliateId, advisorId, disclosures) =>\r\n axios.patch(\r\n `${baseUrl}/api/affiliates/${affiliateId}/advisors/${advisorId}`,\r\n disclosures\r\n );\r\n\r\nexport const updateAdvisorDesignationsList = (\r\n affiliateId,\r\n advisorId,\r\n designationsList\r\n) =>\r\n axios.patch(\r\n `${baseUrl}/api/affiliates/${affiliateId}/advisors/${advisorId}`,\r\n {\r\n designationsList: designationsList.join(),\r\n }\r\n );\r\n\r\nexport const createAccountChangeRequest = (advisorId, changeRequest) =>\r\n axios.post(\r\n `${baseUrl}/api/advisors/${advisorId}/account-change-requests/`,\r\n changeRequest\r\n );\r\n\r\nexport const getAccountChangeRequestList = (advisorId) =>\r\n axios.get(`${baseUrl}/api/advisors/${advisorId}/account-change-requests/`);\r\n\r\n// This invokes an experience API which fetches the advisor record and the change requests in single call.\r\nexport const getAdvisorAccount = (affiliateId, advisorId) =>\r\n axios.get(\r\n `${baseUrl}/api/affiliates/${affiliateId}/advisors/${advisorId}/accounts/`\r\n );\r\n\r\nexport const getClientProfileTemplates = (advisorId) =>\r\n axios.get(`${baseUrl}/api/advisors/${advisorId}/client-profile-templates`);\r\n\r\nexport const getRestoreClientProfileTemplates = (advisorId, templateId) =>\r\n axios.get(\r\n `${baseUrl}/api/advisors/${advisorId}/client-profile-templates/${templateId}/actions/restore`\r\n );\r\n\r\nexport const setAccountStatus = (affiliateId, advisorId, newStatus, reason) =>\r\n axios.patch(\r\n `${baseUrl}/api/affiliates/${affiliateId}/advisors/${advisorId}/account-statuses/${newStatus}?reason=${reason}`\r\n );\r\n\r\nexport const createAccountEventEntry = (\r\n affiliateId,\r\n advisorId,\r\n event,\r\n details\r\n) =>\r\n axios.post(\r\n `${baseUrl}/api/affiliates/${affiliateId}/advisors/${advisorId}/account-events`,\r\n {\r\n stamp: new Date(),\r\n event,\r\n details,\r\n }\r\n );\r\n\r\nexport const updateAccountStatusWithEventEntry = (\r\n affiliateId,\r\n advisorId,\r\n newStatus,\r\n reason,\r\n event,\r\n details\r\n) =>\r\n axios\r\n .patch(\r\n `${baseUrl}/api/affiliates/${affiliateId}/advisors/${advisorId}/account-statuses/${newStatus}?reason=${reason}`\r\n )\r\n .then(() => {\r\n axios.post(\r\n `${baseUrl}/api/affiliates/${affiliateId}/advisors/${advisorId}/account-events`,\r\n {\r\n event,\r\n details,\r\n }\r\n );\r\n });\r\n","/* eslint-disable import/prefer-default-export */\r\nimport { authActions } from '../slices/auth';\r\n\r\nexport const AADB2C_LOGIN_SUCCESS = (idToken) => (dispatch) => {\r\n dispatch(authActions.AADB2C_LOGIN_SUCCESS({ ...idToken, isNew: false }));\r\n};\r\n\r\nexport const ACCOUNT_STATUS_CHANGED = (newStatus, newStatusReason) => (\r\n dispatch\r\n) => {\r\n dispatch(authActions.UPDATE_ACCOUNT_STATUS({ newStatus, newStatusReason }));\r\n};\r\n\r\nexport const LOAD_EXISTING_ACCOUNT = (advisor) => (dispatch) => {\r\n dispatch(authActions.LOAD_ACCOUNT({ ...advisor, isNew: false }));\r\n};\r\n\r\nexport const LOAD_NEW_ACCOUNT = (advisor) => (dispatch) => {\r\n dispatch(authActions.LOAD_ACCOUNT({ ...advisor, isNew: true }));\r\n};\r\n\r\nexport const LOGOUT = () => (dispatch) => {\r\n dispatch(authActions.AADB2C_LOGOUT_SUCCESS());\r\n};\r\n","/* eslint-disable import/prefer-default-export */\r\n\r\nexport const extractTrialDuration = (account) => {\r\n if (account.accountStatus === 'trial') {\r\n let result = 14;\r\n if (\r\n account.accountStatusReason.toLowerCase().startsWith('extended trial')\r\n ) {\r\n const regExp = /\\(([^)]+)\\)/;\r\n const matches = regExp.exec(account.accountStatusReason);\r\n result = +matches[1];\r\n }\r\n return result;\r\n }\r\n return -1; // Only applies to trial accounts.\r\n};\r\n\r\nexport const isTrialExpired = (trialStartDate, trialDuration) => {\r\n const today = new Date();\r\n const trialExpirationDate = new Date(trialStartDate);\r\n trialExpirationDate.setDate(trialExpirationDate.getDate() + trialDuration);\r\n return today > trialExpirationDate;\r\n};\r\n\r\n// A convenience method for displaying the number of days remaining in the trial.\r\nexport const countTrialDaysRemaining = (trialStartDate, trialDuration) => {\r\n const trialExpirationDate = new Date(trialStartDate);\r\n trialExpirationDate.setDate(trialExpirationDate.getDate() + trialDuration);\r\n const today = new Date();\r\n return Math.round((trialExpirationDate - today) / (1000 * 60 * 60 * 24));\r\n};\r\n\r\nexport const accountStatusIsActiveOrUnexpiredTrial = (account) => {\r\n return (\r\n account.accountStatus === 'active' ||\r\n (account.accountStatus === 'trial' &&\r\n !isTrialExpired(\r\n account.accountCreateStamp,\r\n extractTrialDuration(account)\r\n ))\r\n );\r\n};\r\n","/* eslint max-lines: [2, {\"max\": 600, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useEffect, useState } from 'react';\r\nimport {\r\n Button,\r\n Dialog,\r\n DialogActions,\r\n DialogContent,\r\n DialogContentText,\r\n DialogTitle,\r\n Grid,\r\n Paper,\r\n Typography,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { Redirect, useHistory } from 'react-router-dom';\r\n\r\nimport { useIsAuthenticated, useMsal } from '@azure/msal-react';\r\n\r\nimport { toast } from 'react-toastify';\r\n\r\nimport axios from 'axios';\r\n\r\nimport { shapeErrorsForToast } from 'lib/utils/errorUtil';\r\nimport { baseUrl } from 'constants/api';\r\nimport { TaxCastWebVersion } from 'constants/settings';\r\nimport * as advisorApi from 'api/advisor';\r\nimport * as authActions from 'store/asyncActions/auth';\r\nimport * as settingsActions from 'store/asyncActions/settings';\r\nimport TaxCastLogo from 'assets/img/Logo512x512.png';\r\nimport { ErrorToast } from 'lib/components/ErrorToast';\r\nimport {\r\n countTrialDaysRemaining,\r\n extractTrialDuration,\r\n isTrialExpired,\r\n} from 'lib/utils/account';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n maxWidth: theme.maxWidth,\r\n [theme.breakpoints.down('lg')]: {\r\n margin: theme.spacing(1, 3),\r\n },\r\n [theme.breakpoints.up('lg')]: {\r\n margin: theme.spacing(1, 'auto'),\r\n },\r\n },\r\n paper: {\r\n minWidth: '100%',\r\n },\r\n header: {\r\n marginBottom: theme.spacing(1),\r\n marginTop: theme.spacing(1),\r\n marginLeft: theme.spacing(1),\r\n marginRight: theme.spacing(1),\r\n padding: theme.spacing(1),\r\n },\r\n content: {\r\n padding: theme.spacing(1),\r\n },\r\n rightCell: {\r\n marginBottom: theme.spacing(1),\r\n marginTop: theme.spacing(1),\r\n marginLeft: theme.spacing(1),\r\n marginRight: theme.spacing(1),\r\n padding: theme.spacing(1),\r\n },\r\n leftCell: {\r\n marginBottom: theme.spacing(1),\r\n marginTop: theme.spacing(1),\r\n marginLeft: theme.spacing(1),\r\n marginRight: theme.spacing(1),\r\n padding: theme.spacing(1),\r\n borderRight: `1px solid ${theme.palette.primary.main}`,\r\n },\r\n}));\r\n\r\nconst Auth = () => {\r\n const classes = useStyles();\r\n const dispatch = useDispatch();\r\n const history = useHistory();\r\n const isAuthenticated = useIsAuthenticated();\r\n const { instance } = useMsal();\r\n const user = useSelector(({ auth }) => auth.user);\r\n const [isFound, setIsFound] = useState(true); // Expectation is the info will be found.\r\n const account = useSelector(({ auth }) => auth.account);\r\n const accessToken = window.sessionStorage.getItem('taxcast.auth.accessToken');\r\n const [checkingUpdateAvailable, setCheckingUpdateAvailable] = useState(true);\r\n const [suggestUpdate, setSuggestUpdate] = useState(false);\r\n const [availableVersion, setAvailableVersion] = useState(null);\r\n const [accountStatus, setAccountStatus] = useState('');\r\n const [trialExpired, setTrialExpired] = useState(false);\r\n const [trialDaysRemaining, setTrialDaysRemaining] = useState(14);\r\n const [isCancelled, setIsCancelled] = useState(false);\r\n const [isLoadingAccount, setIsLoadingAccount] = useState(false);\r\n const marketingWebSiteLinkChoice = useSelector(\r\n ({ preference }) => preference.choice\r\n );\r\n\r\n useEffect(() => {\r\n document.title = `TaxCast`;\r\n }, []);\r\n\r\n useEffect(() => {\r\n let unmounted = false;\r\n const tokenSource = axios.CancelToken.source();\r\n\r\n if (isAuthenticated && accessToken !== '') {\r\n // Add support for forced refresh updates.\r\n axios\r\n .get(`${baseUrl}/api/settings/TaxCastSetting`)\r\n .then((response) => {\r\n if (!unmounted) {\r\n // The response is now an array.\r\n const versionSettingIndex = response.data.findIndex(\r\n (s) => s.rowKey === 'TaxCastWebVersion'\r\n );\r\n let versionSetting = '';\r\n if (versionSettingIndex !== -1) {\r\n versionSetting = response.data[versionSettingIndex].value;\r\n }\r\n\r\n setCheckingUpdateAvailable(false);\r\n setSuggestUpdate(TaxCastWebVersion < versionSetting);\r\n setAvailableVersion(versionSetting);\r\n\r\n // Load the available tax table year for other pages to use.\r\n const taxTableYearSettingIndex = response.data.findIndex(\r\n (s) => s.rowKey === 'TaxTableYear'\r\n );\r\n if (taxTableYearSettingIndex !== -1) {\r\n const taxTableYearSetting = +response.data[\r\n taxTableYearSettingIndex\r\n ].value;\r\n dispatch(\r\n settingsActions.LOAD_TAXTABLEYEAR_SETTING(taxTableYearSetting)\r\n );\r\n }\r\n }\r\n })\r\n .catch((error) => {\r\n const shapedErrors = shapeErrorsForToast(error);\r\n const index = shapedErrors.find((e) => e.includes('Network Error'));\r\n if (index !== -1) {\r\n history.push('/itsdeadjim');\r\n } else {\r\n toast.error(, {\r\n autoClose: false,\r\n });\r\n }\r\n });\r\n\r\n // *** NEW ADVISOR ***\r\n // If the account is NOT new, attempt to load the advisor info.\r\n // isFound is initialized to TRUE so that flag is overloaded here.\r\n if (\r\n !checkingUpdateAvailable &&\r\n !isLoadingAccount &&\r\n !('id' in account) &&\r\n isFound\r\n ) {\r\n setIsLoadingAccount(true);\r\n advisorApi\r\n .searchAdvisor(user.preferredEmailAddress, user.oid)\r\n .then((response) => {\r\n if (response.status === 201) {\r\n // The account information is found in TaxCast database.\r\n // Set this Axios header immediately.\r\n axios.defaults.headers.common['x-taxcast-user-id'] =\r\n response.data.id;\r\n // This page's behavior is a function of account status.\r\n // unspecified | cancelled | closed | locked => logout and redirect to \"Contact Us\" page with status reason\r\n // incomplete => redirect to \"Initial Payment\" page (which allows trial)\r\n // suspended => redirect to \"Payment\" page\r\n // needsUpdating => redirect to \"T&C\" page\r\n // active => redirect to \"Home\" page\r\n // Ensure, though, a value is provided\r\n if (!response.data.accountStatus) {\r\n // If no account status is provided, default to 'active'.\r\n response.data.accountStatus = 'active';\r\n }\r\n setAccountStatus(response.data.accountStatus);\r\n if (response.data.accountStatus === 'trial') {\r\n const trialDuration = extractTrialDuration(response.data);\r\n setTrialExpired(\r\n isTrialExpired(\r\n response.data.accountCreateStamp,\r\n trialDuration\r\n )\r\n );\r\n setTrialDaysRemaining(\r\n countTrialDaysRemaining(\r\n response.data.accountCreateStamp,\r\n trialDuration\r\n )\r\n );\r\n }\r\n // Now that account status is set, finish loading the account.\r\n dispatch(authActions.LOAD_EXISTING_ACCOUNT(response.data));\r\n } else {\r\n // If the account information cannot be found, setup is incomplete.\r\n // Flag the state so the layout below renders the \"Finish Setup\" button.\r\n setIsFound(false);\r\n }\r\n })\r\n .catch((error) => {\r\n const shapedErrors = shapeErrorsForToast(error);\r\n const index = shapedErrors.find((e) => e.includes('Network Error'));\r\n if (index !== -1) {\r\n history.push('/itsdeadjim');\r\n } else {\r\n toast.error(, {\r\n autoClose: false,\r\n });\r\n }\r\n })\r\n .finally(() => {\r\n setIsLoadingAccount(false);\r\n });\r\n }\r\n\r\n // *** EXISTING ADVISOR ***\r\n // Handle changes to account status.\r\n if (\r\n !checkingUpdateAvailable &&\r\n !isLoadingAccount &&\r\n 'id' in account &&\r\n accountStatus === ''\r\n ) {\r\n setIsLoadingAccount(true);\r\n advisorApi\r\n .reloadAdvisor(account.affiliateId, account.id)\r\n .then((response) => {\r\n if (response.data.accountStatus === 'trial') {\r\n const trialDuration = extractTrialDuration(response.data);\r\n setTrialExpired(\r\n isTrialExpired(response.data.accountCreateStamp, trialDuration)\r\n );\r\n setTrialDaysRemaining(\r\n countTrialDaysRemaining(\r\n response.data.accountCreateStamp,\r\n trialDuration\r\n )\r\n );\r\n }\r\n if (response.data.accountStatus !== accountStatus) {\r\n setAccountStatus(response.data.accountStatus);\r\n dispatch(\r\n authActions.ACCOUNT_STATUS_CHANGED(\r\n response.data.accountStatus,\r\n response.data.accountStatusReason\r\n )\r\n );\r\n }\r\n })\r\n .catch((error) => {\r\n const shapedErrors = shapeErrorsForToast(error);\r\n const index = shapedErrors.find((e) => e.includes('Network Error'));\r\n if (index !== -1) {\r\n history.push('/itsdeadjim');\r\n } else {\r\n toast.error(, {\r\n autoClose: false,\r\n });\r\n }\r\n })\r\n .finally(() => {\r\n setIsLoadingAccount(false);\r\n });\r\n }\r\n }\r\n\r\n return () => {\r\n unmounted = true;\r\n tokenSource.cancel('unmounted');\r\n };\r\n }, [\r\n dispatch,\r\n user,\r\n account,\r\n isAuthenticated,\r\n accessToken,\r\n history,\r\n trialExpired,\r\n trialDaysRemaining,\r\n accountStatus,\r\n checkingUpdateAvailable,\r\n suggestUpdate,\r\n availableVersion,\r\n isLoadingAccount,\r\n isFound,\r\n marketingWebSiteLinkChoice,\r\n ]);\r\n\r\n const accountStatusIsUnspecifiedCancelledClosedLocked = (status) => {\r\n return (\r\n status === 'unspecified' ||\r\n status === 'cancelled' ||\r\n status === 'closed' ||\r\n status === 'locked'\r\n );\r\n };\r\n const accountStatusIsActiveOrUnexpiredTrial = (status) => {\r\n return status === 'active' || (status === 'trial' && !trialExpired);\r\n };\r\n\r\n const handleFinishSetupClick = () => {\r\n history.push('/advisors/new');\r\n };\r\n\r\n const handleForceRefresh = () => {\r\n window.location.reload();\r\n };\r\n\r\n const handleNewClientClick = () => {\r\n history.push('/clients/new');\r\n };\r\n\r\n const handleSearchClick = () => {\r\n history.push('/clients/search');\r\n };\r\n\r\n const handleClickLeaveTaxCast = () => {\r\n advisorApi\r\n .updateAccountStatusWithEventEntry(\r\n account.affiliateId,\r\n account.id,\r\n 'suspended',\r\n 'Did not convert',\r\n 'Trial Expired',\r\n ''\r\n )\r\n .then(() => {\r\n setIsLoadingAccount(true);\r\n dispatch(authActions.ACCOUNT_STATUS_CHANGED('suspended'));\r\n toast.success(`TaxCast successfully recorded your decision.`);\r\n instance.logoutPopup();\r\n dispatch(authActions.LOGOUT());\r\n })\r\n .catch((error) => {\r\n toast.error(, {\r\n autoClose: false,\r\n });\r\n });\r\n };\r\n\r\n if (!isAuthenticated) {\r\n return ;\r\n }\r\n\r\n if (\r\n isFound &&\r\n accountStatusIsUnspecifiedCancelledClosedLocked(accountStatus)\r\n ) {\r\n return ;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n TaxCast Logo\r\n \r\n \r\n {checkingUpdateAvailable && (\r\n \r\n Checking for an available update...\r\n \r\n )}\r\n {suggestUpdate && !checkingUpdateAvailable && (\r\n \r\n \r\n An update from version {TaxCastWebVersion} to version{' '}\r\n {availableVersion} is available.\r\n \r\n
\r\n \r\n Update\r\n \r\n
\r\n )}\r\n {!isFound && !suggestUpdate && !checkingUpdateAvailable && (\r\n \r\n \r\n Welcome to TaxCast!\r\n \r\n
\r\n \r\n We need a few more details to finish creating your account\r\n and then you can get started.\r\n \r\n
\r\n \r\n \r\n Finish Account Setup\r\n \r\n \r\n
\r\n )}\r\n {isFound &&\r\n accountStatus === 'incomplete' &&\r\n !suggestUpdate &&\r\n !checkingUpdateAvailable && (\r\n \r\n \r\n Account Setup Incomplete\r\n \r\n
\r\n \r\n Your account setup is incomplete. You must either\r\n subscribe or start a risk-free 14-day trial. Please choose\r\n an option to start using TaxCast.\r\n \r\n
\r\n \r\n history.push('/payments/initial')}\r\n variant='contained'\r\n color='primary'\r\n >\r\n Choose Payment Option\r\n \r\n \r\n
\r\n )}\r\n {isFound &&\r\n accountStatus === 'suspended' &&\r\n !suggestUpdate &&\r\n !checkingUpdateAvailable && (\r\n \r\n \r\n Payment Due\r\n \r\n
\r\n \r\n Payment is required for you to continue using TaxCast. If\r\n you believe this is incorrect, please contact us.\r\n \r\n
\r\n \r\n 888.482.9227 (888-4-TAXCAST)\r\n \r\n
\r\n \r\n \r\n support@taxcastplan.com\r\n \r\n \r\n
\r\n \r\n history.push('/payments/initial')}\r\n variant='contained'\r\n color='primary'\r\n >\r\n Payment Page\r\n \r\n \r\n
\r\n )}\r\n {isFound &&\r\n accountStatus === 'trial' &&\r\n trialExpired &&\r\n !suggestUpdate &&\r\n !checkingUpdateAvailable && (\r\n \r\n \r\n Your TaxCast trial has expired.\r\n \r\n
\r\n \r\n We hope you got a good feel for the value TaxCast can\r\n bring to your clients.\r\n \r\n
\r\n \r\n setIsCancelled(true)}\r\n variant='contained'\r\n color='primary'\r\n style={{ marginRight: '5px' }}\r\n >\r\n Leave :-(\r\n \r\n history.push('/payments/initial')}\r\n variant='contained'\r\n color='primary'\r\n >\r\n Subscribe to TaxCast™\r\n \r\n \r\n
\r\n \r\n Want more time? Need help getting the most out of TaxCast?\r\n Let us know. We are happy to discuss with you!\r\n \r\n
\r\n \r\n 888.482.9227 (888-4-TAXCAST)\r\n \r\n
\r\n \r\n \r\n support@taxcastplan.com\r\n \r\n \r\n
\r\n )}\r\n {isFound &&\r\n accountStatus === 'needsUpdating' &&\r\n !suggestUpdate &&\r\n !checkingUpdateAvailable && (\r\n \r\n \r\n We updated our EULA and Privacy Policies\r\n \r\n
\r\n \r\n To remain current, we occasionally update our EULA and\r\n Privacy Policies. Please re-read and reaffirm your\r\n agreement before continuing.\r\n \r\n
\r\n \r\n history.push('/agreements')}\r\n variant='contained'\r\n color='primary'\r\n >\r\n Review Usage Policies\r\n \r\n \r\n
\r\n )}\r\n {isFound &&\r\n accountStatusIsActiveOrUnexpiredTrial(accountStatus) &&\r\n !suggestUpdate &&\r\n !checkingUpdateAvailable && (\r\n \r\n \r\n Welcome to TaxCast {account.givenName} {account.surname}\r\n \r\n {accountStatus === 'trial' && (\r\n <>\r\n \r\n There are {trialDaysRemaining} days remaining in your\r\n trial.\r\n \r\n
\r\n \r\n )}\r\n \r\n Choose how to get started:\r\n \r\n
\r\n \r\n New Client\r\n \r\n  \r\n \r\n Search\r\n \r\n  \r\n \r\n Template Profiles\r\n \r\n
\r\n )}\r\n
\r\n
\r\n
\r\n
\r\n \r\n Leave TaxCast?\r\n \r\n \r\n Are you certain you do not want to simplify tax planning for your\r\n clients?\r\n \r\n \r\n \r\n setIsCancelled(false)}\r\n color='primary'\r\n value='cancel'\r\n >\r\n Oops! I clicked the wrong button!\r\n \r\n \r\n Yes, I really do want to leave TaxCast.\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Auth;\r\n","/* eslint-disable import/prefer-default-export */\r\nexport const TaxCastWebVersion = '1.15.11';\r\n","/* eslint-disable import/prefer-default-export */\r\nimport { settingsActions } from '../slices/settings';\r\n\r\nexport const LOAD_TAXTABLEYEAR_SETTING = (taxTableYearSetting) => (\r\n dispatch\r\n) => {\r\n dispatch(settingsActions.LOAD_SETTINGS(taxTableYearSetting));\r\n};\r\n","import React from 'react';\nimport { Typography } from '@material-ui/core';\n\nimport MrBean from 'assets/img/Logo192x192.png';\n\nconst DrawerHeader = () => (\n
\n placeholder\n TaxCast\n
\n);\n\nexport default DrawerHeader;\n","import React from 'react';\r\nimport {\r\n List,\r\n ListItem,\r\n ListItemIcon,\r\n ListItemText,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport { useHistory } from 'react-router-dom';\r\nimport { Home as HomeIcon, Search as SearchIcon } from '@material-ui/icons';\r\nimport { useIsAuthenticated } from '@azure/msal-react';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n text: {\r\n color: theme.palette.primary.main,\r\n },\r\n}));\r\n\r\nconst NavList = () => {\r\n const history = useHistory();\r\n const classes = useStyles();\r\n const isAuthenticated = useIsAuthenticated();\r\n\r\n const navHome = () => history.push('/');\r\n const navClientProfile = () => history.push('/clients/search');\r\n\r\n return (\r\n <>\r\n {isAuthenticated && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default NavList;\r\n","import React from 'react';\nimport { IconButton, makeStyles } from '@material-ui/core';\nimport {\n ChevronLeft as ChevronLeftIcon,\n ChevronRight as ChevronRightIcon,\n} from '@material-ui/icons';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\n\nconst useStyles = makeStyles((theme) => ({\n expandIcon: {\n background: theme.navDrawer.expandButtonColor,\n position: 'fixed',\n top: theme.spacing(1),\n height: theme.spacing(4),\n borderRadius: theme.spacing(3),\n left: 40,\n zIndex: theme.zIndex.drawer + 1,\n '&:hover': {\n background: theme.navDrawer.expandButtonColor,\n },\n transition: theme.transitions.create('all', {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n },\n expanded: {\n left: 224,\n transition: theme.transitions.create('all', {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen,\n }),\n },\n}));\n\nconst ExpandButton = ({ open, toggleDrawer }) => {\n const classes = useStyles();\n return (\n \n {open ? : }\n \n );\n};\n\nExpandButton.propTypes = {\n open: PropTypes.bool.isRequired,\n toggleDrawer: PropTypes.func.isRequired,\n};\n\nexport default ExpandButton;\n","import React from 'react';\r\nimport {\r\n List,\r\n ListItem,\r\n ListItemIcon,\r\n ListItemText,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport {\r\n Help as HelpIcon,\r\n PowerSettingsNew as LogoutIcon,\r\n Brightness3 as MoonIcon,\r\n Settings as SettingsIcon,\r\n WbSunny as SunIcon,\r\n} from '@material-ui/icons';\r\nimport { useHistory } from 'react-router-dom';\r\n\r\nimport { useIsAuthenticated } from '@azure/msal-react';\r\n\r\nimport { prefActions } from 'store/slices/pref';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n text: {\r\n color: theme.palette.primary.main,\r\n },\r\n}));\r\n\r\nconst UserUtils = () => {\r\n const history = useHistory();\r\n const classes = useStyles();\r\n const dispatch = useDispatch();\r\n const isDarkMode = useSelector(\r\n ({ preference }) => preference.theme === 'dark'\r\n );\r\n const isAuthenticated = useIsAuthenticated();\r\n\r\n const toggleTheme = () => {\r\n dispatch(prefActions.UPDATE_THEME(isDarkMode ? 'light' : 'dark'));\r\n };\r\n\r\n const navHelp = () => history.push('/help');\r\n const advisorMaintenance = () => history.push(`/advisor`);\r\n\r\n const handleLoginClick = () => {\r\n history.push('/login');\r\n };\r\n\r\n const handleLogoutClick = () => {\r\n history.push('/logout');\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n {isAuthenticated && (\r\n \r\n \r\n {isDarkMode ? (\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n )}\r\n\r\n {isAuthenticated && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default UserUtils;\r\n","import React from 'react';\nimport {\n Avatar,\n List,\n ListItem,\n ListItemAvatar,\n ListItemText,\n makeStyles,\n} from '@material-ui/core';\nimport { useSelector } from 'react-redux';\nimport { useHistory } from 'react-router-dom';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n paddingLeft: 8,\n },\n avatar: {\n color: theme.palette.primary.main,\n backgroundColor: theme.navDrawer.backgroundColor,\n },\n text: {\n color: theme.palette.primary.main,\n },\n}));\n\nconst WorkingItems = () => {\n const history = useHistory();\n const classes = useStyles();\n const loadedClient = useSelector(({ taxCast }) => taxCast.client);\n\n const navCanvas = () => history.push(`/clients/${loadedClient.id}`);\n\n return (\n
\n \n {loadedClient && loadedClient.id && (\n \n \n \n {loadedClient.givenName.substring(0, 1).toUpperCase()}\n {loadedClient.surname.substring(0, 1).toUpperCase()}\n \n \n \n \n )}\n \n
\n );\n};\n\nexport default WorkingItems;\n","import React, { useState } from 'react';\nimport { Divider, Drawer, makeStyles } from '@material-ui/core';\nimport clsx from 'clsx';\n\nimport DrawerHeader from './components/DrawerHeader';\nimport NavList from './components/NavList';\nimport ExpandButton from './components/ExpandButton';\nimport UserUtils from './components/UserUtils';\nimport WorkingItems from './components/WorkingItems';\n\nconst useStyles = makeStyles((theme) => ({\n drawer: {\n flexShrink: 0,\n whiteSpace: 'nowrap',\n },\n paper: {\n backgroundColor: theme.navDrawer.backgroundColor,\n display: 'flex',\n flexDirection: 'column',\n },\n drawerOpen: {\n overflowX: 'hidden',\n width: theme.navDrawer.openWidth,\n transition: theme.transitions.create('width', {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen,\n }),\n },\n drawerClose: {\n width: theme.navDrawer.closeWidth,\n overflowX: 'hidden',\n transition: theme.transitions.create('width', {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n },\n}));\n\nconst NavDrawer = () => {\n const classes = useStyles();\n const [open, setOpen] = useState(false);\n\n const toggleDrawer = () => {\n setOpen((openState) => !openState);\n };\n\n return (\n <>\n \n \n \n \n \n {/* this empty div is intended to fill up space, so the footer list will be at the bottom */}\n \n {/*
*/}\n \n \n \n \n \n );\n};\n\nexport default NavDrawer;\n","/* eslint max-lines: [2, {\"max\": 200, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useEffect } from 'react';\r\nimport { Button, Grid, Paper, Typography, makeStyles } from '@material-ui/core';\r\nimport { useDispatch } from 'react-redux';\r\nimport { useHistory } from 'react-router-dom';\r\n\r\nimport { EventType } from '@azure/msal-browser';\r\nimport {\r\n AuthenticatedTemplate,\r\n UnauthenticatedTemplate,\r\n useMsal,\r\n} from '@azure/msal-react';\r\nimport { loginRequest } from 'lib/utils/authConfig';\r\n\r\nimport * as authActions from 'store/asyncActions/auth';\r\nimport TaxCastLogo from 'assets/img/Logo512x512.png';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n maxWidth: theme.maxWidth,\r\n [theme.breakpoints.down('lg')]: {\r\n margin: theme.spacing(1, 3),\r\n },\r\n [theme.breakpoints.up('lg')]: {\r\n margin: theme.spacing(1, 'auto'),\r\n },\r\n },\r\n paper: {\r\n minWidth: '100%',\r\n },\r\n header: {\r\n marginBottom: theme.spacing(1),\r\n marginTop: theme.spacing(1),\r\n marginLeft: theme.spacing(1),\r\n marginRight: theme.spacing(1),\r\n padding: theme.spacing(1),\r\n },\r\n content: {\r\n padding: theme.spacing(1),\r\n },\r\n divider: {\r\n borderRight: `1px solid ${theme.palette.primary.main}`,\r\n padding: theme.spacing(1),\r\n },\r\n rightCell: {\r\n marginBottom: theme.spacing(1),\r\n marginTop: theme.spacing(1),\r\n marginLeft: theme.spacing(1),\r\n marginRight: theme.spacing(1),\r\n padding: theme.spacing(1),\r\n },\r\n leftCell: {\r\n marginBottom: theme.spacing(1),\r\n marginTop: theme.spacing(1),\r\n marginLeft: theme.spacing(1),\r\n marginRight: theme.spacing(1),\r\n padding: theme.spacing(1),\r\n borderRight: `1px solid ${theme.palette.primary.main}`,\r\n },\r\n}));\r\n\r\nconst Login = () => {\r\n const classes = useStyles();\r\n const dispatch = useDispatch();\r\n const history = useHistory();\r\n const { instance } = useMsal();\r\n\r\n useEffect(() => {\r\n document.title = 'TaxCast - Login';\r\n }, []);\r\n\r\n useEffect(() => {\r\n const callbackId = instance.addEventCallback((event) => {\r\n // switch (event.eventType) {\r\n // case EventType.LOGIN_SUCCESS:\r\n // console.log(\"login-success\", event);\r\n // break;\r\n // case EventType.LOGIN_FAILURE:\r\n // console.log(\"login-failure\", event);\r\n // break;\r\n // case EventType.LOGOUT_SUCCESS:\r\n // console.log(\"logout-success\", event);\r\n // break;\r\n // case EventType.LOGOUT_FAILURE:\r\n // console.log(\"logout-failure\", event);\r\n // break;\r\n // case EventType.HANDLE_REDIRECT_START:\r\n // console.log(\"redirect-start\", event);\r\n // break;\r\n // case EventType.HANDLE_REDIRECT_END:\r\n // console.log(\"redirect-end\", event);\r\n // break;\r\n // default:\r\n // break;\r\n // }\r\n // if (event.EventType === EventType.ACQUIRE_TOKEN_SUCCESS) {\r\n\r\n // }\r\n if (event.eventType === EventType.LOGIN_SUCCESS) {\r\n instance.setActiveAccount(event.payload.account);\r\n instance\r\n .acquireTokenSilent({ ...loginRequest })\r\n .then((response) => {\r\n window.sessionStorage.setItem(\r\n 'taxcast.auth.accessToken',\r\n response.accessToken\r\n );\r\n dispatch(\r\n authActions.AADB2C_LOGIN_SUCCESS(event.payload.idTokenClaims)\r\n );\r\n history.push('/auth');\r\n })\r\n .catch(() => {\r\n // acquireTokenSilent can fail for a number of reasons, fallback to interaction\r\n instance.acquireTokenPopup({ ...loginRequest }).then((response) => {\r\n window.sessionStorage.setItem(\r\n 'taxcast.auth.accessToken',\r\n response.accessToken\r\n );\r\n dispatch(\r\n authActions.AADB2C_LOGIN_SUCCESS(event.payload.idTokenClaims)\r\n );\r\n history.push('/auth');\r\n });\r\n });\r\n }\r\n });\r\n\r\n return () => {\r\n if (callbackId) {\r\n instance.removeEventCallback(callbackId);\r\n }\r\n };\r\n }, [dispatch, history, instance]);\r\n\r\n const handleLoginClick = () => {\r\n instance.loginPopup(loginRequest);\r\n };\r\n\r\n const handleGoToTaxCastClick = () => {\r\n history.push('/auth');\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n TaxCast Logo\r\n \r\n \r\n \r\n \r\n \r\n Welcome to TaxCast!\r\n \r\n
\r\n \r\n You are authenticated.\r\n \r\n
\r\n \r\n \r\n Go To TaxCast\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n Login to TaxCast\r\n \r\n
\r\n \r\n If you do not have a TaxCast account, click "Login"\r\n below and then choose "Sign up now".\r\n \r\n
\r\n \r\n Forgot your password? Click "Login" below and then\r\n choose "Forgot your password?".\r\n \r\n
\r\n \r\n \r\n Login\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default Login;\r\n","import React from 'react';\nimport { Paper, Tabs } from '@material-ui/core';\nimport PropTypes from 'prop-types';\n\nexport const FSTabs = ({ currentTab, onChange, children, orientation }) => {\n return (\n \n \n {children}\n \n \n );\n};\n\nFSTabs.propTypes = {\n currentTab: PropTypes.number.isRequired,\n onChange: PropTypes.func.isRequired,\n children: PropTypes.arrayOf(PropTypes.element).isRequired,\n orientation: PropTypes.string,\n};\n\nFSTabs.defaultProps = {\n orientation: \"horizontal\",\n};\n\nexport const FSTabPanel = ({ children, value, index, id, labelBy }) => (\n \n);\n\nFSTabPanel.propTypes = {\n children: PropTypes.element.isRequired,\n value: PropTypes.number.isRequired,\n index: PropTypes.number.isRequired,\n id: PropTypes.string.isRequired,\n labelBy: PropTypes.string.isRequired,\n};\n","/* eslint-disable import/prefer-default-export */\r\nexport const categoryTypes = {\r\n ordinaryIncome: 'ordinaryIncome',\r\n capitalGains: 'capitalGains',\r\n deductions: 'deductions',\r\n};\r\n\r\nexport const categoryDisplayMap = {\r\n ordinaryIncome: 'Ordinary Income',\r\n capitalGains: 'Capital Gains',\r\n deductions: 'Deductions',\r\n};\r\n\r\nexport const subcategoryDisplayMap = {\r\n // Ordinary Income\r\n farmIncome: 'Farm Income',\r\n interest: 'Interest',\r\n // iraDistributionRetirementPlanPensions: 'IRA Distribution/Retirement Plan, Pensions',\r\n iraDistribution: 'IRA Distribution/Retirement Plan, Pensions',\r\n nonQualifiedDividends: 'Non-Qualified Dividends',\r\n sCorpDistributions: 'S Corp Distributions',\r\n shortTermCapitalGains: 'Short Term Capital Gains',\r\n soleProprietorshipIncome: 'Sole Proprietorship Income',\r\n taxableSocialSecurity: 'Social Security',\r\n wages: 'Wages',\r\n\r\n // Capital Gains\r\n longTermCapitalGains: 'Long-Term Capital Gains',\r\n qualifiedDividends: 'Qualified Dividends',\r\n\r\n // Deductions\r\n charitableContribution: 'Charitable Contribution',\r\n healthSavingsAccountContribution: 'Health Savings Account Contribution',\r\n medicalExpense: 'Medical Expense',\r\n mortgageInterest: 'Mortgage Interest',\r\n personalPropertyTaxes: 'Personal Property Taxes',\r\n realEstateTaxes: 'Real Estate Taxes',\r\n retirementPlanContribution: 'Retirement Plan Contribution',\r\n stateIncomeTaxes: 'State Income Taxes',\r\n studentLoanInterest: 'Student Loan Interest',\r\n alimony: 'Alimony',\r\n otherDeductionAboveTheLine: 'Other',\r\n otherDeductionBelowTheLine: 'Other',\r\n higherEducationExpense: 'Higher Education Expense',\r\n};\r\n","/* eslint-disable import/prefer-default-export */\r\nimport { filter, forEach, map, pick, sortBy, split } from 'lodash';\r\nimport { categoryTypes } from 'constants/categories';\r\n\r\nexport const normalizedClientProfileProperties = () => {\r\n return [\r\n 'prefix',\r\n 'givenName',\r\n 'middleName',\r\n 'surname',\r\n 'postfix',\r\n 'filingStatus',\r\n 'birthDate',\r\n 'preferredEmailAddress',\r\n 'preferredPhoneNumber',\r\n 'advisorId',\r\n ];\r\n};\r\n\r\nexport const normalizeClientProfile = (clientApiData) => {\r\n const client = pick(clientApiData, normalizedClientProfileProperties());\r\n\r\n client.fullName = `${client.givenName} ${client.surname}`;\r\n\r\n return { ...client, id: clientApiData.id.toString() };\r\n};\r\n\r\nexport const normalizeForecast = (forecastApiData) => {\r\n const norm = pick(forecastApiData, ['name', 'notes', 'advisorId']);\r\n const yearList = split(forecastApiData.yearList, ',');\r\n\r\n // Support for filing status by tax year\r\n const filingStatusByYearList = split(\r\n forecastApiData.filingStatusByYearList,\r\n ','\r\n );\r\n\r\n return {\r\n ...norm,\r\n yearList,\r\n id: forecastApiData.id.toString(),\r\n filingStatusByYearList,\r\n };\r\n};\r\n\r\nexport const normalizeTransaction = (transaction) => {\r\n const norm = pick(transaction, [\r\n 'id',\r\n 'clientProfileId',\r\n 'forecastId',\r\n 'category',\r\n 'subcategory',\r\n 'name',\r\n 'value',\r\n 'taxYear',\r\n 'notes',\r\n 'displaySequence',\r\n 'charitableContributionTypeValue',\r\n 'salePrice',\r\n 'basisAmount',\r\n 'isQualifiedBusinessIncome',\r\n 'isSpecifiedServiceOrTradeBusiness',\r\n 'w2WagesPaidByBusiness',\r\n 'qualifiedPropertyAmountOwnedByBusiness',\r\n 'isSection199AReitDividend',\r\n 'associatedWith',\r\n ]);\r\n // return { ...norm };\r\n return {\r\n ...norm,\r\n taxYear: transaction.taxYear.toString(),\r\n value: transaction.value.toString(),\r\n };\r\n};\r\n\r\nconst filterTransactions = (transactions, year, categoryType) => {\r\n const filtered = filter(\r\n transactions,\r\n ({ taxYear, category }) =>\r\n taxYear.toString() === year && category === categoryType\r\n );\r\n\r\n const normalizedTransactions = map(filtered, (data) =>\r\n normalizeTransaction(data)\r\n );\r\n\r\n return sortBy(normalizedTransactions, 'displaySequence');\r\n};\r\n\r\nexport const normalizeTransactions = (transactions, yearList) => {\r\n const taxYears = {};\r\n\r\n forEach(yearList, (year) => {\r\n taxYears[year] = {\r\n ordinaryIncome: filterTransactions(\r\n transactions,\r\n year,\r\n categoryTypes.ordinaryIncome\r\n ),\r\n capitalGains: filterTransactions(\r\n transactions,\r\n year,\r\n categoryTypes.capitalGains\r\n ),\r\n deductions: filterTransactions(\r\n transactions,\r\n year,\r\n categoryTypes.deductions\r\n ),\r\n };\r\n });\r\n\r\n return taxYears;\r\n};\r\n\r\nexport const normalizeTransactionSpread = (transactions) => {\r\n return transactions.map((tx) => normalizeTransaction(tx));\r\n};\r\n","/* eslint-disable import/prefer-default-export */\r\nimport axios from 'axios';\r\n\r\nimport { forEach } from 'lodash';\r\n\r\nimport { baseUrl } from 'constants/api';\r\nimport { canDoRollover, needToCatchUp } from 'lib/utils/forecastUtils';\r\nimport {\r\n normalizeClientProfile,\r\n normalizeForecast,\r\n normalizeTransaction,\r\n normalizeTransactionSpread,\r\n normalizeTransactions,\r\n} from './utils';\r\n\r\nexport const getClientData = (id, availableTaxTableYear) =>\r\n axios.get(`${baseUrl}/api/canvases/${id}`).then(({ data }) => {\r\n const client = normalizeClientProfile(data.clientProfile);\r\n\r\n // BCL: Updated to support extending outdated forecasts\r\n // and/or rolling forecasts foreward when new tax\r\n // tables are available.\r\n // This must be done before normalizing the forecast.\r\n const needsToCatchUp = needToCatchUp(data.forecast);\r\n const canRollover = canDoRollover(data.forecast, availableTaxTableYear);\r\n\r\n const forecast = normalizeForecast(data.forecast);\r\n forecast.years = normalizeTransactions(\r\n data.transactions,\r\n forecast.yearList\r\n );\r\n\r\n return { client, forecast, needsToCatchUp, canRollover };\r\n });\r\n\r\nexport const createTransaction = (transactionDetail) =>\r\n axios\r\n .post(`${baseUrl}/api/transactions`, transactionDetail)\r\n .then(({ data }) => normalizeTransactionSpread(data));\r\n\r\nexport const moveTransaction = (updateDetails) =>\r\n axios.patch(`${baseUrl}/api/transactions/${updateDetails.id}`, updateDetails);\r\n\r\nexport const editTransaction = (transaction) =>\r\n axios\r\n .put(`${baseUrl}/api/transactions/${transaction.id}`, transaction)\r\n .then(() => normalizeTransaction(transaction));\r\n\r\nexport const deleteTransaction = (id, forecastId) =>\r\n axios.delete(`${baseUrl}/api/forecasts/${forecastId}/transactions/${id}`);\r\n\r\nexport const runCalculations = (clientProfileId, forecastId, advisorId) =>\r\n axios\r\n .post(`${baseUrl}/api/calculations`, {\r\n clientProfileId,\r\n forecastId,\r\n advisorId,\r\n })\r\n .then(({ data }) => data);\r\n\r\nexport const patchForecast = (\r\n clientProfileId,\r\n forecastId,\r\n taxYear,\r\n filingStatus\r\n) =>\r\n axios\r\n .patch(`${baseUrl}/api/forecasts/${forecastId}`, {\r\n clientProfileId,\r\n taxYear,\r\n filingStatus,\r\n })\r\n .then(() => {});\r\n\r\nexport const createTransactionSpread = (transactions) => {\r\n forEach(transactions, (tx) => {\r\n createTransaction(tx);\r\n });\r\n};\r\n\r\nexport const getForecast = (clientProfileId, forecastId) =>\r\n axios.get(\r\n `${baseUrl}/api/client-profiles/${clientProfileId}/forecasts/${forecastId}`\r\n );\r\n\r\nexport const putForecast = (forecast) =>\r\n axios.put(`${baseUrl}/api/forecasts/${forecast.id}`, forecast);\r\n","/* eslint-disable import/prefer-default-export */\r\n\r\n// Catchup: The forecast is behind meaning it is not\r\n// representing current year plus nine (9) years.\r\nexport const needToCatchUp = (forecast) => {\r\n const currentYear = new Date().getFullYear();\r\n const years = forecast.yearList.split(',');\r\n const latestYear = years[years.length - 1];\r\n const expectedLatestYear = currentYear + 9;\r\n return latestYear < expectedLatestYear;\r\n};\r\n\r\nexport const numberOfYearsToCatchUp = (forecast) => {\r\n const currentYear = new Date().getFullYear();\r\n const years = forecast.yearList; // The yearList property is already normalized to an array.\r\n const latestYear = years[years.length - 1];\r\n const expectedLatestYear = currentYear + 9;\r\n return expectedLatestYear - latestYear;\r\n};\r\n\r\n// Rollover: The forecast is NOT behind BUT a new year may be added due to\r\n// availability of new tax table values. The association with\r\n// new tax table values is incidental but is generally close to\r\n// the end of the calendar year.\r\nexport const canDoRollover = (forecast, taxTablesYear) => {\r\n const currentYear = new Date().getFullYear();\r\n const years = forecast.yearList.split(',');\r\n const latestYear = years[years.length - 1];\r\n const expectedLatestYear = currentYear + 9;\r\n return +latestYear === +expectedLatestYear && taxTablesYear > currentYear;\r\n};\r\n","/* eslint-disable import/prefer-default-export */\r\nimport { categoryTypes } from './categories';\r\n\r\nexport const toolBoxData = {\r\n ordinaryIncome: [\r\n {\r\n id: 'toolbox-farmIncome',\r\n type: categoryTypes.ordinaryIncome,\r\n name: 'Farm Income',\r\n },\r\n {\r\n id: 'toolbox-interest',\r\n type: categoryTypes.ordinaryIncome,\r\n name: 'Interest',\r\n },\r\n {\r\n // id: 'toolbox-iraDistributionRetirementPlanPensions',\r\n id: 'toolbox-iraDistribution',\r\n type: categoryTypes.ordinaryIncome,\r\n name: 'IRA Distribution / Retirement Plan, Pensions',\r\n },\r\n {\r\n id: 'toolbox-nonQualifiedDividends',\r\n type: categoryTypes.ordinaryIncome,\r\n name: 'Non-Qualified Dividends',\r\n },\r\n {\r\n id: 'toolbox-sCorpDistributions',\r\n type: categoryTypes.ordinaryIncome,\r\n name: 'S Corp Distributions',\r\n },\r\n {\r\n id: 'toolbox-shortTermCapitalGains',\r\n type: categoryTypes.ordinaryIncome,\r\n name: 'Short Term Capital Gains',\r\n },\r\n {\r\n id: 'toolbox-soleProprietorshipIncome',\r\n type: categoryTypes.ordinaryIncome,\r\n name: 'Sole Proprietorship Income',\r\n },\r\n {\r\n id: 'toolbox-taxableSocialSecurity',\r\n type: categoryTypes.ordinaryIncome,\r\n name: 'Social Security',\r\n },\r\n {\r\n id: 'toolbox-wages',\r\n type: categoryTypes.ordinaryIncome,\r\n name: 'Wages',\r\n },\r\n ],\r\n capitalGains: [\r\n {\r\n id: 'toolbox-longTermCapitalGains',\r\n type: categoryTypes.capitalGains,\r\n name: 'Long-Term Capital Gains',\r\n },\r\n {\r\n id: 'toolbox-qualifiedDividends',\r\n type: categoryTypes.capitalGains,\r\n name: 'Qualified Dividends',\r\n },\r\n ],\r\n deductions: [\r\n {\r\n id: 'toolbox-charitableContribution',\r\n type: categoryTypes.deductions,\r\n name: 'Charitable Contribution',\r\n },\r\n {\r\n id: 'toolbox-healthSavingsAccountContribution',\r\n type: categoryTypes.deductions,\r\n name: 'Health Savings Account Contribution',\r\n },\r\n {\r\n id: 'toolbox-medicalExpense',\r\n type: categoryTypes.deductions,\r\n name: 'Medical Expense',\r\n },\r\n {\r\n id: 'toolbox-mortgageInterest',\r\n type: categoryTypes.deductions,\r\n name: 'Mortgage Interest',\r\n },\r\n {\r\n id: 'toolbox-personalPropertyTaxes',\r\n type: categoryTypes.deductions,\r\n name: 'Personal Property Taxes',\r\n },\r\n {\r\n id: 'toolbox-realEstateTaxes',\r\n type: categoryTypes.deductions,\r\n name: 'Real Estate Taxes',\r\n },\r\n {\r\n id: 'toolbox-retirementPlanContribution',\r\n type: categoryTypes.deductions,\r\n name: 'Retirement Plan Contribution',\r\n },\r\n {\r\n id: 'toolbox-stateIncomeTaxes',\r\n type: categoryTypes.deductions,\r\n name: 'State Income Taxes',\r\n },\r\n {\r\n id: 'toolbox-studentLoanInterest',\r\n type: categoryTypes.deductions,\r\n name: 'Student Loan Interest',\r\n },\r\n {\r\n id: 'toolbox-alimony',\r\n type: categoryTypes.deductions,\r\n name: 'Alimony',\r\n },\r\n {\r\n id: 'toolbox-otherDeductionAboveTheLine',\r\n type: categoryTypes.deductions,\r\n name: 'Other',\r\n },\r\n {\r\n id: 'toolbox-otherDeductionBelowTheLine',\r\n type: categoryTypes.deductions,\r\n name: 'Other',\r\n },\r\n ],\r\n};\r\n","/* eslint-disable import/prefer-default-export */\r\n/* eslint max-lines: [2, {\"max\": 250, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React from 'react';\r\nimport { find, split } from 'lodash';\r\nimport { toast } from 'react-toastify';\r\n\r\nimport * as taxCastApi from 'api/taxCast';\r\nimport { toolBoxData } from 'constants/toolBoxData';\r\nimport { shapeErrorsForToast } from 'lib/utils/errorUtil';\r\nimport { ErrorToast } from 'lib/components/ErrorToast';\r\nimport { taxCastActions } from '../slices/taxCast';\r\n\r\nexport const GET_CLIENT_DATA = (clientId, taxTableYear) => (dispatch) => {\r\n taxCastApi\r\n .getClientData(clientId, taxTableYear)\r\n .then((data) => {\r\n dispatch(taxCastActions.LOAD_CANVAS(data));\r\n })\r\n .catch((error) => {\r\n dispatch(taxCastActions.ERROR(error.message));\r\n });\r\n};\r\n\r\nexport const NEW_TRANSACTION_DIALOG = (\r\n transaction,\r\n forecastId,\r\n clientProfileId\r\n) => (dispatch) => {\r\n if (!transaction) {\r\n dispatch(taxCastActions.TOGGLE_NEW_TRANSACTION_DIALOG(null));\r\n return;\r\n }\r\n\r\n const subcategory = find(\r\n toolBoxData[transaction.type],\r\n (sub) => sub.id === transaction.draggableId\r\n )?.id?.replace('toolbox-', '');\r\n\r\n const [taxYear, category] = split(transaction.destination.droppableId, '-');\r\n const displaySequence = transaction.destination.index;\r\n\r\n if (taxYear && category && subcategory) {\r\n dispatch(\r\n taxCastActions.TOGGLE_NEW_TRANSACTION_DIALOG({\r\n taxYear,\r\n category,\r\n subcategory,\r\n displaySequence,\r\n forecastId,\r\n clientProfileId,\r\n })\r\n );\r\n }\r\n};\r\n\r\nexport const NEW_TRANSACTION = (transaction) => (dispatch) => {\r\n dispatch(taxCastActions.SUBMITTING_FORM());\r\n let charitableContributionType;\r\n\r\n taxCastApi\r\n .createTransaction({ ...transaction, charitableContributionType })\r\n .then((data) => {\r\n // Support for transaction spreading realizes a change in which\r\n // this operation returns an array, even if the transaction is not spread.\r\n dispatch(taxCastActions.ADD_TRANSACTION_SPREAD(data));\r\n })\r\n .catch((error) => {\r\n dispatch(taxCastActions.SILENT_ERROR(error));\r\n });\r\n};\r\n\r\nexport const REFRESH_CALCULATIONS = ({\r\n clientProfileId,\r\n forecastId,\r\n advisorId,\r\n}) => (dispatch) => {\r\n dispatch(taxCastActions.RUNNING_CALCULATIONS());\r\n taxCastApi\r\n .runCalculations(clientProfileId, forecastId, advisorId)\r\n .then((response) => {\r\n dispatch(taxCastActions.CALCULATIONS_RESULTS(response));\r\n })\r\n .catch((error) => {\r\n dispatch(taxCastActions.SILENT_ERROR(error.message));\r\n });\r\n};\r\n\r\nexport const MOVE_TRANSACTION = ({\r\n destination,\r\n source,\r\n category,\r\n id,\r\n forecastId,\r\n clientProfileId,\r\n advisorId,\r\n}) => (dispatch) => {\r\n dispatch(\r\n taxCastActions.REORDER_TRANSACTIONS({ destination, source, category, id })\r\n );\r\n taxCastApi\r\n .moveTransaction({ destination, source, id, forecastId })\r\n .then(() => {\r\n dispatch(\r\n REFRESH_CALCULATIONS({ clientProfileId, forecastId, advisorId })\r\n );\r\n })\r\n .catch((error) => {\r\n dispatch(taxCastActions.SILENT_ERROR(error.message));\r\n });\r\n};\r\n\r\nexport const EDIT_TRANSACTION = (transaction) => (dispatch) => {\r\n dispatch(taxCastActions.SUBMITTING_FORM());\r\n\r\n taxCastApi\r\n .editTransaction(transaction)\r\n .then((data) => {\r\n dispatch(taxCastActions.EDIT_TRANSACTION(data));\r\n })\r\n .catch((error) => {\r\n dispatch(taxCastActions.SILENT_ERROR(error.message));\r\n });\r\n};\r\n\r\nexport const SPLIT_DISTRIBUTE_TRANSACTION_DIALOG = (transaction, operation) => (\r\n dispatch\r\n) => {\r\n dispatch(\r\n taxCastActions.TOGGLE_SPLIT_DISTRIBUTE_TRANSACTION_DIALOG(\r\n transaction,\r\n operation\r\n )\r\n );\r\n};\r\n\r\nexport const DELETE_TRANSACTION = (transaction) => (dispatch) => {\r\n dispatch(taxCastActions.SUBMITTING_FORM());\r\n const { id, taxYear, category, forecastId } = transaction;\r\n\r\n taxCastApi\r\n .deleteTransaction(id, forecastId)\r\n .then(() => {\r\n dispatch(taxCastActions.DELETE_TRANSACTION({ id, taxYear, category }));\r\n })\r\n .catch((error) => {\r\n dispatch(taxCastActions.SILENT_ERROR(error.message));\r\n });\r\n};\r\n\r\nexport const RUN_CALCULATIONS = ({\r\n clientProfileId,\r\n forecastId,\r\n advisorId,\r\n}) => (dispatch) => {\r\n // dispatch(taxCastActions.SET_BUSY());\r\n if (clientProfileId && forecastId && advisorId) {\r\n dispatch(taxCastActions.RUNNING_CALCULATIONS());\r\n\r\n taxCastApi\r\n .runCalculations(clientProfileId, forecastId, advisorId)\r\n .then((response) => {\r\n dispatch(taxCastActions.CALCULATIONS_RESULTS(response));\r\n // dispatch(taxCastActions.CLEAR_BUSY());\r\n })\r\n .catch((error) => {\r\n dispatch(taxCastActions.SILENT_ERROR());\r\n toast.error(, {\r\n autoClose: false,\r\n });\r\n // dispatch(taxCastActions.CLEAR_BUSY());\r\n });\r\n }\r\n};\r\n\r\nexport const UPDATE_CLIENT_PROFILE = (normalizedClientProfile) => (\r\n dispatch\r\n) => {\r\n dispatch(taxCastActions.UPDATED_CLIENT_PROFILE(normalizedClientProfile));\r\n};\r\n\r\nexport const UPDATE_FILING_STATUS_FOR_TAX_YEAR = (\r\n clientProfileId,\r\n forecastId,\r\n taxYear,\r\n filingStatus\r\n) => (dispatch) => {\r\n taxCastApi\r\n .patchForecast(clientProfileId, forecastId, +taxYear, filingStatus)\r\n .then(() => {\r\n dispatch(\r\n taxCastActions.UPDATED_FILING_STATUS_FOR_TAX_YEAR({\r\n taxYear,\r\n filingStatus,\r\n })\r\n );\r\n })\r\n .catch((error) => {\r\n dispatch(taxCastActions.ERROR(error.message));\r\n });\r\n};\r\n\r\nexport const SPREADING_TRANSACTION = (spreadData) => (dispatch) => {\r\n dispatch(taxCastActions.SPREAD_TRANSACTIONS(spreadData));\r\n};\r\n\r\nexport const CLEAR_TAXCAST_DATA = () => (dispatch) => {\r\n dispatch(taxCastActions.RESET());\r\n};\r\n\r\nexport const COMPLETE_PREFLIGHT = () => (dispatch) => {\r\n dispatch(taxCastActions.UPDATE_PREFLIGHT_STATUS(true));\r\n};\r\n\r\nexport const UNLOAD_FORECAST = () => (dispatch) => {\r\n dispatch(taxCastActions.UNLOAD_FORECAST());\r\n};\r\n","import axios from 'axios';\r\n\r\nimport { baseUrl } from 'constants/api';\r\n\r\n// Client Profile\r\nexport const createClientProfile = (clientProfile) =>\r\n axios.post(`${baseUrl}/api/client-profiles`, clientProfile);\r\n\r\nexport const getClientProfile = (clientProfileId) =>\r\n axios.get(`${baseUrl}/api/client-profiles/${clientProfileId}`);\r\n// `${baseUrl}/api/advisors/${advisorId}/client-profiles/${clientProfileId}`\r\n\r\nexport const getClientProfileWithDependents = (clientProfileId) =>\r\n axios.get(`${baseUrl}/api/client-profiles/${clientProfileId}/families`);\r\n\r\nexport const updateClientProfile = (clientProfile) =>\r\n axios.put(\r\n `${baseUrl}/api/client-profiles/${clientProfile.id}`,\r\n clientProfile\r\n );\r\n\r\n// Relationships\r\nexport const getClientRelationsList = (clientProfileId) =>\r\n axios.get(\r\n `${baseUrl}/api/client-profiles/${clientProfileId}/client-relations`\r\n );\r\n\r\nexport const getClientSpouse = (clientProfileId) =>\r\n axios.get(\r\n `${baseUrl}/api/client-profiles/${clientProfileId}/client-relations?spouseFilter=only`\r\n );\r\n\r\nexport const getClientOtherDependents = (clientProfileId) =>\r\n axios.get(\r\n `${baseUrl}/api/client-profiles/${clientProfileId}/client-relations?spouseFilter=omit`\r\n );\r\n\r\nexport const createClientRelation = (clientRelation) =>\r\n axios.post(\r\n `${baseUrl}/api/client-profiles/${clientRelation.clientProfileId}/client-relations`,\r\n clientRelation\r\n );\r\n\r\nexport const updateClientRelation = (clientRelation) =>\r\n axios.put(\r\n `${baseUrl}/api/client-profiles/${clientRelation.clientProfileId}/client-relations/${clientRelation.id}`,\r\n clientRelation\r\n );\r\n\r\nexport const deleteClientRelation = (clientProfileId, clientRelationId) =>\r\n axios.delete(\r\n `${baseUrl}/api/client-profiles/${clientProfileId}/client-relations/${clientRelationId}`\r\n );\r\n","/* eslint-disable import/prefer-default-export */\nexport const relationshipTypes = {\n unspecified: \"unspecified\",\n spouse: \"spouse\",\n child: \"child\",\n sibling: \"sibling\",\n parent: \"parent\",\n nibling: \"nibling\",\n parentSibling: \"parentSibling\",\n grandparent: \"grandparent\",\n other: \"other\"\n};\n\nexport const relationshipDisplayMap = {\n unspecified: \"unspecified\",\n spouse: \"Spouse/Partner\",\n child: \"Child\",\n sibling: \"Sibling\",\n parent: \"Parent\",\n nibling: \"Cousin\",\n parentSibling: \"Aunt/Uncle\",\n grandparent: \"Grandparent\",\n other: \"other\"\n};\n","/* eslint-disable import/prefer-default-export */\r\nimport moment from 'moment';\r\n\r\nexport const getAge = (birthDate) => {\r\n return Math.trunc(moment().diff(birthDate, 'years', true));\r\n};\r\n","/* eslint-disable import/prefer-default-export */\r\nexport const currencyRegex = /^-?\\d+$/;\r\n\r\nexport const emailRegex = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n\r\nexport const phoneNumberRegex = /^\\d{10}$/;\r\n","/* eslint-disable import/prefer-default-export */\nimport { currencyRegex, emailRegex } from 'constants/regex';\nimport trim from 'lodash/trim';\n\nexport const trimWhiteSpace = (value) => trim(value);\n\nexport const composeValidators = (...validators) => (value) =>\n validators.reduce((error, validator) => error || validator(value), undefined);\n\nexport const required = (value) => (value ? undefined : 'Required');\n\nexport const validAmount = (value) =>\n !value || currencyRegex.test(value) ? undefined : 'Invalid Value';\n\nexport const isEmail = (value) => (!value || emailRegex.test(value) ? undefined : 'Invalid Email');\n","import React from 'react';\r\nimport { Field } from 'react-final-form';\r\nimport { InputAdornment, TextField } from '@material-ui/core';\r\nimport PropTypes from 'prop-types';\r\nimport noop from 'lodash/noop';\r\n\r\nconst FormField = ({\r\n name,\r\n id,\r\n label,\r\n validate,\r\n autoFocus,\r\n type,\r\n maxLength,\r\n rows,\r\n rowsMax,\r\n multiline,\r\n required,\r\n shrink,\r\n submitOnEnter,\r\n startAdornment,\r\n variant,\r\n format,\r\n className,\r\n readOnly,\r\n}) => (\r\n {\r\n const showError = !!meta.error && !!meta.touched;\r\n\r\n return (\r\n {\r\n if (e.key === 'Enter' && !submitOnEnter && !multiline)\r\n e.preventDefault();\r\n },\r\n },\r\n startAdornment: startAdornment && (\r\n {startAdornment}\r\n ),\r\n }}\r\n {...input}\r\n value={input.value || ''} // https://github.com/final-form/react-final-form/issues/529\r\n />\r\n );\r\n }}\r\n />\r\n);\r\n\r\nFormField.propTypes = {\r\n name: PropTypes.string.isRequired,\r\n id: PropTypes.string.isRequired,\r\n label: PropTypes.string.isRequired,\r\n validate: PropTypes.func,\r\n autoFocus: PropTypes.bool,\r\n type: PropTypes.string,\r\n maxLength: PropTypes.number,\r\n required: PropTypes.bool,\r\n rows: PropTypes.number,\r\n rowsMax: PropTypes.number,\r\n multiline: PropTypes.bool,\r\n submitOnEnter: PropTypes.bool,\r\n shrink: PropTypes.bool,\r\n variant: PropTypes.string,\r\n format: PropTypes.func,\r\n startAdornment: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\r\n className: PropTypes.string,\r\n readOnly: PropTypes.bool,\r\n disabled: PropTypes.bool,\r\n};\r\n\r\nFormField.defaultProps = {\r\n validate: noop,\r\n autoFocus: false,\r\n type: 'text',\r\n maxLength: 50,\r\n required: false,\r\n rows: 1,\r\n rowsMax: 1,\r\n multiline: false,\r\n submitOnEnter: false,\r\n shrink: undefined,\r\n startAdornment: undefined,\r\n variant: 'standard',\r\n format: undefined,\r\n className: undefined,\r\n readOnly: false,\r\n disabled: false,\r\n};\r\n\r\nexport default FormField;\r\n","import React from 'react';\nimport { Field } from 'react-final-form';\nimport PropTypes from 'prop-types';\nimport { DatePicker } from '@material-ui/pickers';\nimport noop from 'lodash/noop';\nimport moment from 'moment';\n\nconst DatePickerField = ({\n name,\n id,\n label,\n variant,\n required,\n disableToolbar,\n disableFuture,\n disablePast,\n format,\n clearable,\n validate,\n}) => {\n return (\n moment(value).startOf('day').toISOString()}\n render={({ input, meta }) => {\n const inputConfig = {\n ...input,\n error: !!(meta.touched && meta.error),\n helperText: !!(meta.touched && meta.error) && meta.error,\n value: input.value || null,\n };\n\n return (\n \n );\n }}\n />\n );\n};\n\nDatePickerField.propTypes = {\n name: PropTypes.string.isRequired,\n id: PropTypes.string.isRequired,\n label: PropTypes.string.isRequired,\n variant: PropTypes.string,\n disableToolbar: PropTypes.bool,\n disableFuture: PropTypes.bool,\n disablePast: PropTypes.bool,\n clearable: PropTypes.bool,\n required: PropTypes.bool,\n format: PropTypes.string,\n validate: PropTypes.func,\n};\n\nDatePickerField.defaultProps = {\n variant: 'outlined',\n disableToolbar: false,\n disableFuture: false,\n disablePast: false,\n clearable: false,\n required: false,\n format: 'MMM Do YYYY',\n validate: noop,\n};\n\nexport default DatePickerField;\n","import React, { useEffect, useRef, useState } from 'react';\nimport { Field } from 'react-final-form';\nimport { FormControl, FormHelperText, InputLabel, Select } from '@material-ui/core';\nimport PropTypes from 'prop-types';\nimport noop from 'lodash/noop';\n\nconst SelectField = ({\n name,\n id,\n label,\n required,\n children,\n variant,\n validate,\n fullWidth,\n margin,\n}) => {\n // inputLabel and labelWidth is used for outlined dropdowns\n // without the code below, select not recognize the label, and will render a line through it\n const inputLabel = useRef(null);\n const [labelWidth, setLabelWidth] = useState(0);\n useEffect(() => {\n setLabelWidth(inputLabel.current.offsetWidth);\n }, []);\n\n return (\n (\n \n \n {label}\n \n \n {children}\n \n {meta.error && meta.touched && {meta.error}}\n \n )}\n />\n );\n};\n\nSelectField.propTypes = {\n name: PropTypes.string.isRequired,\n id: PropTypes.string.isRequired,\n label: PropTypes.string.isRequired,\n children: PropTypes.arrayOf(PropTypes.element).isRequired,\n required: PropTypes.bool,\n variant: PropTypes.string,\n margin: PropTypes.string,\n fullWidth: PropTypes.bool,\n validate: PropTypes.func,\n};\n\nSelectField.defaultProps = {\n required: false,\n variant: 'standard',\n margin: 'none',\n fullWidth: true,\n validate: noop,\n};\n\nexport default SelectField;\n","/* eslint max-lines: [2, {\"max\": 225, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Form } from 'react-final-form';\r\nimport {\r\n Button,\r\n Dialog,\r\n DialogActions,\r\n DialogContent,\r\n DialogTitle,\r\n Grid,\r\n MenuItem,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport { toast } from 'react-toastify';\r\nimport { MuiPickersUtilsProvider } from '@material-ui/pickers';\r\nimport { required, trimWhiteSpace } from 'lib/utils/form';\r\nimport FormField from 'lib/components/FormField';\r\nimport DatePickerField from 'lib/components/DatePickerField';\r\nimport SelectField from 'lib/components/SelectField';\r\nimport {\r\n relationshipDisplayMap,\r\n relationshipTypes,\r\n} from 'constants/relationships';\r\nimport * as clientApi from 'api/client';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { shapeErrorsForToast } from 'lib/utils/errorUtil';\r\nimport { ErrorToast } from 'lib/components/ErrorToast';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n minHeight: '55vh',\r\n maxWidth: 1000,\r\n },\r\n form: {\r\n padding: theme.spacing(2),\r\n },\r\n field: {\r\n [theme.breakpoints.up('sm')]: {\r\n minHeight: theme.spacing(12),\r\n },\r\n },\r\n}));\r\n\r\nconst NewDialog = ({ show, clientProfileId, onClose }) => {\r\n const classes = useStyles();\r\n\r\n const closeDialog = (relation) => {\r\n onClose(relation);\r\n };\r\n\r\n const submitForm = (form) => {\r\n const clientRelation = {\r\n ...form,\r\n clientProfileId,\r\n };\r\n clientApi\r\n .createClientRelation(clientRelation)\r\n .then((response) => {\r\n toast.success(`Dependent added.`);\r\n clientRelation.id = response.data.id;\r\n closeDialog(clientRelation);\r\n })\r\n .catch((error) => {\r\n toast.error(, {\r\n autoClose: false,\r\n });\r\n });\r\n };\r\n\r\n if (!clientProfileId) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n New Dependent\r\n \r\n \r\n \r\n (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n {Object.keys(relationshipTypes)\r\n .filter((item) => item !== 'spouse')\r\n .map((item) => (\r\n \r\n {relationshipDisplayMap[item]}\r\n \r\n ))}\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n closeDialog(null)}\r\n >\r\n Cancel\r\n \r\n \r\n \r\n \r\n Save\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n )}\r\n />\r\n
\r\n
\r\n
\r\n
\r\n \r\n );\r\n};\r\n\r\nNewDialog.propTypes = {\r\n dependent: PropTypes.shape({\r\n id: PropTypes.string.isRequired,\r\n givenName: PropTypes.string.isRequired,\r\n surname: PropTypes.string.isRequired,\r\n birthDate: PropTypes.string.isRequired,\r\n relationship: PropTypes.string.isRequired,\r\n clientProfileId: PropTypes.string.isRequired,\r\n notes: PropTypes.string,\r\n }),\r\n show: PropTypes.bool,\r\n clientProfileId: PropTypes.string,\r\n onClose: PropTypes.func.isRequired,\r\n};\r\n\r\nNewDialog.defaultProps = {\r\n dependent: null,\r\n clientProfileId: null,\r\n show: false,\r\n};\r\n\r\nexport default NewDialog;\r\n","/* eslint max-lines: [2, {\"max\": 225, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Form } from 'react-final-form';\r\nimport {\r\n Button,\r\n Dialog,\r\n DialogActions,\r\n DialogContent,\r\n DialogTitle,\r\n Grid,\r\n MenuItem,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport SelectField from 'lib/components/SelectField';\r\nimport { toast } from 'react-toastify';\r\nimport { MuiPickersUtilsProvider } from '@material-ui/pickers';\r\nimport { required, trimWhiteSpace } from 'lib/utils/form';\r\nimport FormField from 'lib/components/FormField';\r\nimport {\r\n relationshipDisplayMap,\r\n relationshipTypes,\r\n} from 'constants/relationships';\r\nimport * as clientApi from 'api/client';\r\nimport DatePickerField from 'lib/components/DatePickerField';\r\nimport MomentUtils from '@date-io/moment';\r\nimport { shapeErrorsForToast } from 'lib/utils/errorUtil';\r\nimport { ErrorToast } from 'lib/components/ErrorToast';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n minHeight: '45vh',\r\n maxWidth: 1000,\r\n },\r\n form: {\r\n padding: theme.spacing(2),\r\n },\r\n field: {\r\n [theme.breakpoints.up('sm')]: {\r\n minHeight: theme.spacing(12),\r\n },\r\n },\r\n}));\r\n\r\nconst EditDialog = ({ dependent, show, onClose }) => {\r\n const classes = useStyles();\r\n\r\n const closeDialog = (relation) => {\r\n onClose(relation);\r\n };\r\n\r\n const submitForm = (form) => {\r\n const clientRelation = {\r\n ...form,\r\n id: dependent.id,\r\n clientProfileId: dependent.clientProfileId,\r\n };\r\n clientApi\r\n .updateClientRelation(clientRelation)\r\n .then(() => {\r\n toast.success(`Updates successful.`);\r\n closeDialog(clientRelation);\r\n })\r\n .catch((error) => {\r\n toast.error(, {\r\n autoClose: false,\r\n });\r\n });\r\n };\r\n\r\n if (!dependent) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n Modify Dependent Info\r\n \r\n \r\n \r\n (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n {Object.keys(relationshipTypes)\r\n .filter((item) => item !== 'spouse')\r\n .map((item) => (\r\n \r\n {relationshipDisplayMap[item]}\r\n \r\n ))}\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n closeDialog(null)}\r\n >\r\n Cancel\r\n \r\n \r\n \r\n \r\n Save\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n )}\r\n />\r\n
\r\n
\r\n
\r\n
\r\n \r\n );\r\n};\r\n\r\nEditDialog.propTypes = {\r\n dependent: PropTypes.shape({\r\n id: PropTypes.string.isRequired,\r\n givenName: PropTypes.string.isRequired,\r\n surname: PropTypes.string.isRequired,\r\n birthDate: PropTypes.string.isRequired,\r\n relationship: PropTypes.string.isRequired,\r\n clientProfileId: PropTypes.string.isRequired,\r\n notes: PropTypes.string,\r\n }),\r\n onClose: PropTypes.func.isRequired,\r\n show: PropTypes.bool,\r\n};\r\n\r\nEditDialog.defaultProps = {\r\n dependent: null,\r\n show: false,\r\n};\r\n\r\nexport default EditDialog;\r\n","/* eslint max-lines: [2, {\"max\": 350, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React from 'react';\r\nimport { Button, Grid, makeStyles } from '@material-ui/core';\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport PropTypes from 'prop-types';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n maxWidth: 1000,\r\n },\r\n form: {\r\n padding: theme.spacing(2),\r\n },\r\n field: {\r\n [theme.breakpoints.up('sm')]: {\r\n minHeight: theme.spacing(12),\r\n },\r\n },\r\n}));\r\n\r\nconst DeleteDialog = ({ title, content, show, onClose }) => {\r\n const classes = useStyles();\r\n\r\n const handleConfirmRemoveClose = (event) => {\r\n onClose(event);\r\n };\r\n\r\n return (\r\n \r\n \r\n {title}\r\n \r\n \r\n {content}\r\n \r\n \r\n \r\n handleConfirmRemoveClose('cancel')}\r\n color='primary'\r\n value='cancel'\r\n // disabled={isDeleting}\r\n >\r\n Cancel\r\n \r\n handleConfirmRemoveClose('ok')}\r\n color='primary'\r\n value='ok'\r\n autoFocus\r\n // disabled={isDeleting}\r\n >\r\n Ok\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nDeleteDialog.propTypes = {\r\n title: PropTypes.string,\r\n content: PropTypes.string,\r\n show: PropTypes.bool,\r\n onClose: PropTypes.func.isRequired,\r\n};\r\n\r\nDeleteDialog.defaultProps = {\r\n title: 'Confirm Delete',\r\n content: 'Are you certain you want to delete the selected item?',\r\n show: false,\r\n};\r\n\r\nexport default DeleteDialog;\r\n","/* eslint max-lines: [2, {\"max\": 225, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useState } from 'react';\r\nimport {\r\n Avatar,\r\n Button,\r\n Divider,\r\n Grid,\r\n IconButton,\r\n List,\r\n ListItem,\r\n ListItemAvatar,\r\n ListItemSecondaryAction,\r\n ListItemText,\r\n Tooltip,\r\n Typography,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport {\r\n Delete as DeleteIcon,\r\n Edit as EditIcon,\r\n PersonOutline as PersonOutlineIcon,\r\n} from '@material-ui/icons';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { remove } from 'lodash';\r\n\r\nimport * as clientApi from 'api/client';\r\nimport { relationshipDisplayMap } from 'constants/relationships';\r\nimport { getAge } from 'lib/utils/dateTimeUtils';\r\n\r\nimport NewDialog from './NewDialog';\r\nimport EditDialog from './EditDialog';\r\nimport DeleteDialog from '../DeleteDialog';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n maxWidth: 1000,\r\n width: '100%',\r\n flexGrow: 1,\r\n },\r\n list: {\r\n padding: theme.spacing(2),\r\n },\r\n avatar: {\r\n backgroundColor: theme.palette.primary.main,\r\n },\r\n content: {\r\n padding: theme.spacing(1),\r\n },\r\n}));\r\n\r\nconst OtherDependents = ({ dependentsList, clientProfileId }) => {\r\n const classes = useStyles();\r\n const [showDialogDelete, setShowDialogDelete] = useState(false);\r\n const [selectedRelation, setSelectedRelation] = useState();\r\n const [selectedRelationId, setSelectedRelationId] = useState(-1);\r\n const [dependents, setDependents] = useState(dependentsList);\r\n const [showDialogNew, setShowDialogNew] = useState(false);\r\n const [showDialogEdit, setShowDialogEdit] = useState(false);\r\n\r\n const onClickEdit = (_, selectedRelationParam) => {\r\n setSelectedRelation(selectedRelationParam);\r\n setShowDialogEdit(true);\r\n };\r\n\r\n const onClickDelete = (event, relationId) => {\r\n setSelectedRelationId(relationId);\r\n setShowDialogDelete(true);\r\n };\r\n\r\n const onCloseDeleteDialog = (event) => {\r\n if (event === 'ok') {\r\n clientApi\r\n .deleteClientRelation(clientProfileId, selectedRelationId)\r\n .then(() => {\r\n const deletedIndex = dependents.findIndex((item) => {\r\n return item.id === selectedRelationId;\r\n });\r\n if (deletedIndex >= 0) {\r\n remove(dependents, { id: selectedRelationId });\r\n setDependents(dependents);\r\n }\r\n setSelectedRelationId(-1);\r\n })\r\n .catch(() => {\r\n setSelectedRelationId(-1);\r\n });\r\n } else {\r\n setSelectedRelationId(-1);\r\n }\r\n setShowDialogDelete(false);\r\n };\r\n\r\n const onClickAdd = () => {\r\n setShowDialogNew(true);\r\n };\r\n\r\n const onCloseEditDialog = (relation) => {\r\n if (relation) {\r\n const updatedIndex = dependents.findIndex((item) => {\r\n return item.id === relation.id;\r\n });\r\n if (updatedIndex >= 0) {\r\n const dependentsCopy = [...dependents];\r\n const updatedItem = { ...dependents[updatedIndex], ...relation };\r\n dependentsCopy[updatedIndex] = updatedItem;\r\n setDependents(dependentsCopy);\r\n }\r\n }\r\n setSelectedRelation(null);\r\n setShowDialogEdit(false);\r\n };\r\n\r\n const onCloseNewDialog = (relation) => {\r\n if (relation) {\r\n dependents.push(relation);\r\n setDependents(dependents);\r\n }\r\n setShowDialogNew(false);\r\n };\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n Other Dependents ({dependents.length})\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {dependents.map((relation, index) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n onClickEdit(event, relation)}\r\n >\r\n \r\n \r\n \r\n \r\n onClickDelete(event, relation.id)}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n {index < dependents.length - 1 && (\r\n \r\n )}\r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nOtherDependents.propTypes = {\r\n dependentsList: PropTypes.arrayOf(\r\n PropTypes.shape({\r\n givenName: PropTypes.string.isRequired,\r\n surname: PropTypes.string.isRequired,\r\n birthDate: PropTypes.string.isRequired,\r\n relationship: PropTypes.string.isRequired,\r\n })\r\n ),\r\n clientProfileId: PropTypes.string.isRequired,\r\n};\r\n\r\nOtherDependents.defaultProps = {\r\n dependentsList: null,\r\n};\r\n\r\nexport default OtherDependents;\r\n","/* eslint-disable import/prefer-default-export */\r\nexport const filingStatusTypes = {\r\n single: 'single',\r\n marriedFilingJointly: 'marriedFilingJointly',\r\n // qualifyingWidow: \"qualifyingWidow\",\r\n marriedFilingSeparatelyNoCohabitation:\r\n 'marriedFilingSeparatelyNoCohabitation',\r\n marriedFilingSeparatelySomeCohabitation:\r\n 'marriedFilingSeparatelySomeCohabitation',\r\n headOfHousehold: 'headOfHousehold',\r\n};\r\n\r\nexport const filingStatusDisplayMap = {\r\n single: 'Single',\r\n marriedFilingJointly: 'Married Filing Jointly',\r\n // qualifyingWidow: \"Qualifying Widow(er)\",\r\n marriedFilingSeparatelyNoCohabitation:\r\n 'Married Filing Separately-No Cohabitation',\r\n marriedFilingSeparatelySomeCohabitation:\r\n 'Married Filing Separately-Some Cohabitation',\r\n headOfHousehold: 'Head of Household',\r\n};\r\n","import moment from 'moment';\r\n\r\nexport const composeFormatters = (...formatters) => (value) =>\r\n formatters.reduce((formatted, formatter) => formatter(formatted), value);\r\n\r\nexport const currencyFormatter = new Intl.NumberFormat('en-US', {\r\n style: 'currency',\r\n currency: 'USD',\r\n minimumFractionDigits: 0,\r\n maximumFractionDigits: 0,\r\n});\r\n\r\nexport const dateTimeFormatter = (dateTimeString) =>\r\n moment(dateTimeString).format('MMMM DD, YYYY h:mm a');\r\n\r\nexport const phoneNumberFormatter = (phoneNumber) => {\r\n let result = '';\r\n if (phoneNumber) {\r\n const match = phoneNumber.match(/^(\\d{3})(\\d{3})(\\d{4})$/);\r\n result = `(${match[1]}) ${match[2]}-${match[3]}`;\r\n }\r\n return result;\r\n};\r\n","import React from 'react';\r\nimport { Field } from 'react-final-form';\r\nimport { Checkbox, FormControlLabel, makeStyles } from '@material-ui/core';\r\nimport PropTypes from 'prop-types';\r\nimport clsx from 'clsx';\r\nimport noop from 'lodash/noop';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n text: {\r\n color: theme.palette.primary.main,\r\n },\r\n error: {\r\n color: theme.palette.danger,\r\n },\r\n}));\r\n\r\nconst CheckboxField = ({ name, id, label, required, validate }) => {\r\n const classes = useStyles();\r\n return (\r\n (\r\n \r\n }\r\n label={`${label}${required ? ' *' : ''}`}\r\n />\r\n )}\r\n />\r\n );\r\n};\r\n\r\nCheckboxField.propTypes = {\r\n name: PropTypes.string.isRequired,\r\n id: PropTypes.string.isRequired,\r\n label: PropTypes.string.isRequired,\r\n required: PropTypes.bool,\r\n validate: PropTypes.func,\r\n};\r\n\r\nCheckboxField.defaultProps = {\r\n required: false,\r\n validate: noop,\r\n};\r\n\r\nexport default CheckboxField;\r\n","/* eslint-disable import/prefer-default-export */\r\nimport trim from 'lodash/trim';\r\nimport { currencyRegex, phoneNumberRegex } from 'constants/regex';\r\n\r\nexport const isNullEmptyOrBlank = (value) => !trim(value);\r\n\r\nexport const isValidAmount = (value) => {\r\n return !value || currencyRegex.test(value);\r\n};\r\n\r\nexport const isValidPhoneNumberUnadorned = (value) => {\r\n return !value || phoneNumberRegex.test(value);\r\n};\r\n","/* eslint max-lines: [2, {\"max\": 450, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React from 'react';\r\nimport {\r\n Button,\r\n Dialog,\r\n DialogActions,\r\n DialogContent,\r\n DialogTitle,\r\n Divider,\r\n Grid,\r\n MenuItem,\r\n Paper,\r\n Typography,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport { Form } from 'react-final-form';\r\nimport { MuiPickersUtilsProvider } from '@material-ui/pickers';\r\nimport MomentUtils from '@date-io/moment';\r\nimport {\r\n composeValidators,\r\n isEmail,\r\n required,\r\n trimWhiteSpace,\r\n} from 'lib/utils/form';\r\nimport CheckboxField from 'lib/components/CheckboxField';\r\nimport FormField from 'lib/components/FormField';\r\nimport SelectField from 'lib/components/SelectField';\r\nimport DatePickerField from 'lib/components/DatePickerField';\r\nimport { toast } from 'react-toastify';\r\nimport { omit, pick } from 'lodash';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport {\r\n filingStatusDisplayMap,\r\n filingStatusTypes,\r\n} from 'constants/filingStatuses';\r\nimport * as clientApi from 'api/client';\r\nimport * as apiUtils from 'api/utils';\r\nimport { UPDATE_CLIENT_PROFILE } from 'store/asyncActions/taxCast';\r\nimport PropTypes from 'prop-types';\r\nimport { shapeErrorsForToast } from 'lib/utils/errorUtil';\r\nimport { ErrorToast } from 'lib/components/ErrorToast';\r\n\r\nimport { isValidPhoneNumberUnadorned } from 'lib/utils/validation';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n minHeight: '95vh',\r\n maxWidth: 1000,\r\n },\r\n form: {\r\n padding: theme.spacing(2),\r\n },\r\n field: {\r\n [theme.breakpoints.up('sm')]: {\r\n minHeight: theme.spacing(12),\r\n },\r\n },\r\n}));\r\n\r\nconst EditDialog = ({ clientProfile, show, onClose }) => {\r\n const classes = useStyles();\r\n const dispatch = useDispatch();\r\n\r\n // TODO: Replace when authentication is implemented.\r\n const advisorId = useSelector(({ auth }) => auth.account.id);\r\n\r\n const closeDialog = (entity) => {\r\n onClose(entity);\r\n };\r\n\r\n const handleSave = (form) => {\r\n const modifiedProfile = omit(form, ['sameBillingAddress']);\r\n if (form.sameBillingAddress) {\r\n modifiedProfile.billingAddressLineOne = form.preferredAddressLineOne;\r\n modifiedProfile.billingAddressLineTwo = form.preferredAddressLineTwo;\r\n modifiedProfile.billingAddressCity = form.preferredAddressCity;\r\n modifiedProfile.billingAddressStateOrProvince =\r\n form.preferredAddressStateOrProvince;\r\n modifiedProfile.billingAddressPostalCode =\r\n form.preferredAddressPostalCode;\r\n }\r\n modifiedProfile.advisorId = advisorId;\r\n\r\n // Sanitize phone number to ensure no adornments.\r\n if (!isValidPhoneNumberUnadorned(modifiedProfile.preferredPhoneNumber)) {\r\n const error =\r\n 'Phone number must be ten digits with no adornments. e.g. 9065551212';\r\n toast.error(, {\r\n autoClose: false,\r\n });\r\n } else {\r\n clientApi\r\n .updateClientProfile(modifiedProfile)\r\n .then(() => {\r\n // If any of the following properties change, the loaded\r\n // Canvas needs updating. Intentionally chose not to diff.\r\n const client = pick(\r\n modifiedProfile,\r\n apiUtils.normalizedClientProfileProperties()\r\n );\r\n dispatch(UPDATE_CLIENT_PROFILE(client));\r\n toast.success(`Updates successful.`);\r\n onClose(modifiedProfile);\r\n })\r\n .catch((error) => {\r\n toast.error(\r\n ,\r\n {\r\n autoClose: false,\r\n }\r\n );\r\n });\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n Edit Client Profile\r\n \r\n \r\n \r\n (\r\n
\r\n \r\n \r\n \r\n \r\n Client Details\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n Address\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n {!values.sameBillingAddress && (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n Billing Address\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n Tax information\r\n \r\n \r\n\r\n \r\n \r\n {Object.keys(filingStatusTypes).map((item) => (\r\n \r\n {filingStatusDisplayMap[item]}\r\n \r\n ))}\r\n \r\n \r\n\r\n {/* \r\n \r\n */}\r\n\r\n \r\n \r\n \r\n closeDialog(null)}\r\n >\r\n Cancel\r\n \r\n \r\n \r\n \r\n Save\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n )}\r\n />\r\n
\r\n
\r\n
\r\n
\r\n \r\n );\r\n};\r\n\r\nEditDialog.propTypes = {\r\n spouse: PropTypes.shape({\r\n id: PropTypes.string,\r\n }),\r\n clientProfile: PropTypes.shape({\r\n givenName: PropTypes.string.isRequired,\r\n surname: PropTypes.string.isRequired,\r\n birthDate: PropTypes.string.isRequired,\r\n filingStatus: PropTypes.string.isRequired,\r\n preferredEmailAddress: PropTypes.string.isRequired,\r\n preferredPhoneNumber: PropTypes.string.isRequired,\r\n }).isRequired,\r\n show: PropTypes.bool,\r\n onClose: PropTypes.func.isRequired,\r\n};\r\n\r\nEditDialog.defaultProps = {\r\n spouse: null,\r\n show: false,\r\n};\r\n\r\nexport default EditDialog;\r\n","/* eslint max-lines: [2, {\"max\": 200, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useState } from 'react';\r\nimport {\r\n Avatar,\r\n Button,\r\n ButtonGroup,\r\n Grid,\r\n Paper,\r\n Tooltip,\r\n Typography,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport { FileCopy as FileCopyIcon, Mail as MailIcon } from '@material-ui/icons';\r\nimport moment from 'moment';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { filingStatusDisplayMap } from 'constants/filingStatuses';\r\nimport { phoneNumberFormatter } from 'lib/utils/format';\r\nimport { getAge } from 'lib/utils/dateTimeUtils';\r\n\r\nimport EditDialog from './EditDialog';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n maxWidth: theme.maxWidth,\r\n // [theme.breakpoints.down('lg')]: {\r\n // margin: theme.spacing(1, 3),\r\n // },\r\n // [theme.breakpoints.up('lg')]: {\r\n // margin: theme.spacing(1, 'auto'),\r\n // },\r\n },\r\n avatar: {\r\n width: theme.spacing(17),\r\n height: theme.spacing(17),\r\n fontSize: '48px',\r\n backgroundColor: theme.palette.primary.main,\r\n },\r\n}));\r\n\r\nconst Profile = ({ profile }) => {\r\n const classes = useStyles();\r\n const [showDialogEdit, setShowDialogEdit] = useState(false);\r\n const [clientProfile, setClientProfile] = useState(profile);\r\n\r\n const onClickEdit = () => {\r\n setShowDialogEdit(true);\r\n };\r\n\r\n const onCloseEditDialog = (updatedProfile) => {\r\n if (updatedProfile) {\r\n setClientProfile(updatedProfile);\r\n }\r\n setShowDialogEdit(false);\r\n };\r\n\r\n return (\r\n <>\r\n \r\n {clientProfile && (\r\n \r\n \r\n \r\n \r\n \r\n {clientProfile.givenName.substring(0, 1).toUpperCase()}\r\n {clientProfile.surname.substring(0, 1).toUpperCase()}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {`${clientProfile.givenName} ${clientProfile.surname}`}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {`${clientProfile.preferredAddressLineOne}`}\r\n \r\n \r\n {clientProfile.preferredAddressLineTwo && (\r\n \r\n \r\n {`${clientProfile.preferredAddressLineTwo}`}\r\n \r\n \r\n )}\r\n \r\n \r\n {`${clientProfile.preferredAddressCity} ${clientProfile.preferredAddressStateOrProvince} ${clientProfile.preferredAddressPostalCode}`}\r\n \r\n \r\n \r\n \r\n {phoneNumberFormatter(\r\n clientProfile.preferredPhoneNumber\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {`Filing Status: ${\r\n filingStatusDisplayMap[clientProfile.filingStatus]\r\n }`}\r\n \r\n \r\n \r\n \r\n {`Birth Date: ${moment(clientProfile.birthDate).format(\r\n 'MM/DD/YYYY'\r\n )} (${getAge(clientProfile.birthDate)})`}\r\n \r\n \r\n \r\n \r\n {clientProfile.preferredEmailAddress}\r\n \r\n \r\n {\r\n window.location.href = `mailto:${clientProfile.preferredEmailAddress}`;\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n {\r\n navigator.clipboard.writeText(\r\n clientProfile.preferredEmailAddress\r\n );\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Edit\r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nProfile.propTypes = {\r\n profile: PropTypes.objectOf(PropTypes.any).isRequired,\r\n};\r\n\r\nexport default Profile;\r\n","/* eslint max-lines: [2, {\"max\": 350, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React from 'react';\r\nimport {\r\n Button,\r\n Dialog,\r\n DialogActions,\r\n DialogContent,\r\n DialogTitle,\r\n Grid,\r\n Typography,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport { Form } from 'react-final-form';\r\nimport { MuiPickersUtilsProvider } from '@material-ui/pickers';\r\nimport MomentUtils from '@date-io/moment';\r\nimport {\r\n composeValidators,\r\n isEmail,\r\n required,\r\n trimWhiteSpace,\r\n} from 'lib/utils/form';\r\nimport CheckboxField from 'lib/components/CheckboxField';\r\nimport FormField from 'lib/components/FormField';\r\nimport DatePickerField from 'lib/components/DatePickerField';\r\nimport { toast } from 'react-toastify';\r\nimport { omit } from 'lodash';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { useSelector } from 'react-redux';\r\nimport * as clientApi from 'api/client';\r\nimport { shapeErrorsForToast } from 'lib/utils/errorUtil';\r\nimport { ErrorToast } from 'lib/components/ErrorToast';\r\nimport { relationshipTypes } from 'constants/relationships';\r\n\r\nimport { isValidPhoneNumberUnadorned } from 'lib/utils/validation';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n minHeight: '65vh',\r\n maxWidth: 1000,\r\n },\r\n form: {\r\n padding: theme.spacing(2),\r\n },\r\n field: {\r\n [theme.breakpoints.up('sm')]: {\r\n minHeight: theme.spacing(12),\r\n },\r\n },\r\n}));\r\n\r\nconst NewDialog = ({\r\n show,\r\n clientProfileId,\r\n clientProfileAddress,\r\n onClose,\r\n}) => {\r\n const classes = useStyles();\r\n\r\n // TODO: Replace when authentication is implemented.\r\n const advisorId = useSelector(({ auth }) => auth.account.id);\r\n\r\n const closeDialog = (relation) => {\r\n onClose(relation);\r\n };\r\n\r\n const handleSave = (form) => {\r\n const clientSpouse = omit(form, ['sameAddressAsClient']);\r\n clientSpouse.advisorId = advisorId;\r\n clientSpouse.relationship = relationshipTypes.spouse;\r\n\r\n if (form.sameAddressAsClient) {\r\n clientSpouse.addressLineOne =\r\n clientProfileAddress.preferredAddressLineOne;\r\n clientSpouse.addressLineTwo =\r\n clientProfileAddress.preferredAddressLineTwo;\r\n clientSpouse.addressCity = clientProfileAddress.preferredAddressCity;\r\n clientSpouse.addressStateOrProvince =\r\n clientProfileAddress.preferredAddressStateOrProvince;\r\n clientSpouse.addressPostalCode =\r\n clientProfileAddress.preferredAddressPostalCode;\r\n }\r\n\r\n clientSpouse.clientProfileId = clientProfileId;\r\n\r\n // Sanitize phone number to ensure no adornments.\r\n if (!isValidPhoneNumberUnadorned(clientSpouse.phoneNumber)) {\r\n const error =\r\n 'Phone number must be ten digits with no adornments. e.g. 9065551212';\r\n toast.error(, {\r\n autoClose: false,\r\n });\r\n } else {\r\n clientApi\r\n .createClientRelation(clientSpouse)\r\n .then((response) => {\r\n closeDialog(response.data);\r\n toast.success(`Spouse/partner added.`);\r\n })\r\n .catch((error) => {\r\n toast.error(\r\n ,\r\n {\r\n autoClose: false,\r\n }\r\n );\r\n });\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n New Dependent\r\n \r\n \r\n \r\n (\r\n
\r\n \r\n \r\n \r\n \r\n Spouse/Partner\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n {!values.sameAddressAsClient && (\r\n <>\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n \r\n \r\n \r\n closeDialog(null)}\r\n >\r\n Cancel\r\n \r\n \r\n \r\n \r\n Save\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n )}\r\n />\r\n
\r\n
\r\n
\r\n
\r\n \r\n );\r\n};\r\n\r\nNewDialog.propTypes = {\r\n show: PropTypes.bool,\r\n clientProfileId: PropTypes.string.isRequired,\r\n clientProfileAddress: PropTypes.shape({\r\n preferredAddressLineOne: PropTypes.string.isRequired,\r\n preferredAddressLineTwo: PropTypes.string.isRequired,\r\n preferredAddressCity: PropTypes.string.isRequired,\r\n preferredAddressStateOrProvince: PropTypes.string.isRequired,\r\n preferredAddressPostalCode: PropTypes.string.isRequired,\r\n }).isRequired,\r\n onClose: PropTypes.func.isRequired,\r\n};\r\n\r\nNewDialog.defaultProps = {\r\n show: false,\r\n};\r\n\r\nexport default NewDialog;\r\n","/* eslint max-lines: [2, {\"max\": 350, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React from 'react';\r\nimport {\r\n Button,\r\n Dialog,\r\n DialogActions,\r\n DialogContent,\r\n DialogTitle,\r\n Grid,\r\n Paper,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport { Form } from 'react-final-form';\r\nimport { MuiPickersUtilsProvider } from '@material-ui/pickers';\r\nimport MomentUtils from '@date-io/moment';\r\nimport {\r\n composeValidators,\r\n isEmail,\r\n required,\r\n trimWhiteSpace,\r\n} from 'lib/utils/form';\r\nimport CheckboxField from 'lib/components/CheckboxField';\r\nimport FormField from 'lib/components/FormField';\r\nimport DatePickerField from 'lib/components/DatePickerField';\r\nimport { toast } from 'react-toastify';\r\nimport { omit } from 'lodash';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { useSelector } from 'react-redux';\r\nimport * as clientApi from 'api/client';\r\nimport { shapeErrorsForToast } from 'lib/utils/errorUtil';\r\nimport { ErrorToast } from 'lib/components/ErrorToast';\r\nimport { relationshipTypes } from 'constants/relationships';\r\n\r\nimport { isValidPhoneNumberUnadorned } from 'lib/utils/validation';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n minHeight: '65vh',\r\n maxWidth: 1000,\r\n },\r\n form: {\r\n padding: theme.spacing(2),\r\n },\r\n field: {\r\n [theme.breakpoints.up('sm')]: {\r\n minHeight: theme.spacing(12),\r\n },\r\n },\r\n}));\r\n\r\nconst EditDialog = ({\r\n show,\r\n spousePartner,\r\n clientProfileId,\r\n clientProfileAddress,\r\n onClose,\r\n isSameAddressAsClient,\r\n}) => {\r\n const classes = useStyles();\r\n\r\n // TODO: Replace when authentication is implemented.\r\n const advisorId = useSelector(({ auth }) => auth.account.id);\r\n\r\n const closeDialog = (relation) => {\r\n onClose(relation);\r\n };\r\n\r\n const handleSave = (form) => {\r\n const clientSpouse = omit(form, ['sameAddressAsClient']);\r\n clientSpouse.advisorId = advisorId;\r\n clientSpouse.relationship = relationshipTypes.spouse;\r\n clientSpouse.clientProfileId = clientProfileId;\r\n\r\n if (form.sameAddressAsClient) {\r\n clientSpouse.addressLineOne =\r\n clientProfileAddress.preferredAddressLineOne;\r\n clientSpouse.addressLineTwo =\r\n clientProfileAddress.preferredAddressLineTwo;\r\n clientSpouse.addressCity = clientProfileAddress.preferredAddressCity;\r\n clientSpouse.addressStateOrProvince =\r\n clientProfileAddress.preferredAddressStateOrProvince;\r\n clientSpouse.addressPostalCode =\r\n clientProfileAddress.preferredAddressPostalCode;\r\n }\r\n\r\n // Sanitize phone number to ensure no adornments.\r\n if (!isValidPhoneNumberUnadorned(clientSpouse.phoneNumber)) {\r\n const error =\r\n 'Phone number must be ten digits with no adornments. e.g. 9065551212';\r\n toast.error(, {\r\n autoClose: false,\r\n });\r\n } else {\r\n clientApi\r\n .updateClientRelation(clientSpouse)\r\n .then(() => {\r\n toast.success(`Spouse/partner added.`);\r\n closeDialog(clientSpouse);\r\n })\r\n .catch((error) => {\r\n toast.error(\r\n ,\r\n {\r\n autoClose: false,\r\n }\r\n );\r\n });\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n Edit Spouse/Partner\r\n \r\n \r\n \r\n (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n {!values.sameAddressAsClient && (\r\n <>\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n \r\n \r\n \r\n closeDialog(null)}\r\n >\r\n Cancel\r\n \r\n \r\n \r\n \r\n Save\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n )}\r\n />\r\n
\r\n
\r\n
\r\n
\r\n \r\n );\r\n};\r\n\r\nEditDialog.propTypes = {\r\n clientProfileId: PropTypes.string.isRequired,\r\n clientProfileAddress: PropTypes.shape({\r\n preferredAddressLineOne: PropTypes.string.isRequired,\r\n preferredAddressLineTwo: PropTypes.string.isRequired,\r\n preferredAddressCity: PropTypes.string.isRequired,\r\n preferredAddressStateOrProvince: PropTypes.string.isRequired,\r\n preferredAddressPostalCode: PropTypes.string.isRequired,\r\n }).isRequired,\r\n show: PropTypes.bool,\r\n spousePartner: PropTypes.objectOf(PropTypes.any),\r\n onClose: PropTypes.func.isRequired,\r\n isSameAddressAsClient: PropTypes.bool,\r\n};\r\n\r\nEditDialog.defaultProps = {\r\n show: false,\r\n spousePartner: null,\r\n isSameAddressAsClient: true,\r\n};\r\n\r\nexport default EditDialog;\r\n","/* eslint max-lines: [2, {\"max\": 250, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useEffect, useState } from 'react';\r\nimport {\r\n Avatar,\r\n Button,\r\n Grid,\r\n Typography,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport { Person as PersonIcon } from '@material-ui/icons';\r\nimport PropTypes from 'prop-types';\r\nimport moment from 'moment';\r\nimport { toast } from 'react-toastify';\r\n\r\nimport * as clientApi from 'api/client';\r\nimport { getAge } from 'lib/utils/dateTimeUtils';\r\nimport { phoneNumberFormatter } from 'lib/utils/format';\r\nimport { shapeErrorsForToast } from 'lib/utils/errorUtil';\r\nimport { ErrorToast } from 'lib/components/ErrorToast';\r\n\r\nimport NewDialog from './NewDialog';\r\nimport EditDialog from './EditDialog';\r\nimport DeleteDialog from '../DeleteDialog';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n maxWidth: 1000,\r\n width: '100%',\r\n flexGrow: 1,\r\n },\r\n list: {\r\n padding: theme.spacing(2),\r\n },\r\n avatar: {\r\n backgroundColor: theme.palette.primary.main,\r\n },\r\n content: {\r\n padding: theme.spacing(1),\r\n },\r\n}));\r\n\r\nconst SpousePartner = ({\r\n spousePartnerRelation,\r\n clientProfileId,\r\n clientProfileAddress,\r\n}) => {\r\n const classes = useStyles();\r\n const [showDialogNew, setShowDialogNew] = useState(false);\r\n const [showDialogEdit, setShowDialogEdit] = useState(false);\r\n const [showDialogDelete, setShowDialogDelete] = useState(false);\r\n const [spousePartner, setSpousePartner] = useState(spousePartnerRelation);\r\n const [isAddressSame, setIsAddressSame] = useState(true);\r\n\r\n useEffect(() => {\r\n if (spousePartner) {\r\n let addressSame = true;\r\n addressSame =\r\n addressSame &&\r\n spousePartner.addressLineOne ===\r\n clientProfileAddress.preferredAddressLineOne;\r\n addressSame =\r\n addressSame &&\r\n spousePartner.addressLineTwo ===\r\n clientProfileAddress.preferredAddressLineTwo;\r\n addressSame =\r\n addressSame &&\r\n spousePartner.addressCity === clientProfileAddress.preferredAddressCity;\r\n addressSame =\r\n addressSame &&\r\n spousePartner.addressStateOrProvince ===\r\n clientProfileAddress.preferredAddressStateOrProvince;\r\n addressSame =\r\n addressSame &&\r\n spousePartner.addressPostalCode ===\r\n clientProfileAddress.preferredAddressPostalCode;\r\n setIsAddressSame(addressSame);\r\n }\r\n }, [spousePartnerRelation, clientProfileAddress, spousePartner]);\r\n\r\n const onClickEdit = () => {\r\n setShowDialogEdit(true);\r\n };\r\n\r\n const onClickDelete = () => {\r\n setShowDialogDelete(true);\r\n };\r\n\r\n const onCloseDeleteDialog = (event) => {\r\n if (event === 'ok') {\r\n clientApi\r\n .deleteClientRelation(clientProfileId, spousePartner.id)\r\n .then(() => {\r\n setSpousePartner();\r\n })\r\n .catch((error) => {\r\n toast.error(\r\n ,\r\n {\r\n autoClose: false,\r\n }\r\n );\r\n });\r\n }\r\n setShowDialogDelete(false);\r\n };\r\n\r\n const onClickAdd = () => {\r\n setShowDialogNew(true);\r\n };\r\n\r\n const onCloseEditDialog = (relation) => {\r\n if (relation) {\r\n setSpousePartner(relation);\r\n }\r\n setShowDialogEdit(false);\r\n };\r\n\r\n const onCloseNewDialog = (relation) => {\r\n if (relation) {\r\n setSpousePartner(relation);\r\n }\r\n setShowDialogNew(false);\r\n };\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n Spouse / Partner\r\n \r\n \r\n \r\n {!!spousePartner && (\r\n \r\n )}\r\n {!spousePartner && (\r\n \r\n )}\r\n \r\n \r\n {!!spousePartner && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {spousePartner.givenName} {spousePartner.surname}\r\n \r\n \r\n \r\n {moment(spousePartner.birthDate).format('MM/DD/YYYY')} (\r\n {getAge(spousePartner.birthDate)})\r\n \r\n \r\n {spousePartner.emailAddress}\r\n \r\n \r\n {phoneNumberFormatter(spousePartner.phoneNumber)}\r\n \r\n {!isAddressSame && (\r\n <>\r\n \r\n {spousePartner.addressLineOne}\r\n \r\n \r\n {spousePartner.addressLineTwo}\r\n \r\n \r\n {spousePartner.addressCity}{' '}\r\n {spousePartner.addressStateOrProvince}{' '}\r\n {spousePartner.addressPostalCode}\r\n \r\n \r\n )}\r\n {isAddressSame && (\r\n \r\n Cohabitates with client\r\n \r\n )}\r\n \r\n {spousePartner.notes}\r\n \r\n \r\n \r\n {!!spousePartner && (\r\n \r\n Remove\r\n \r\n )}\r\n \r\n {/* \r\n \r\n \r\n \r\n {spousePartner.givenName.substring(0, 1)}\r\n {spousePartner.surname.substring(0, 1)}\r\n \r\n \r\n \r\n \r\n */}\r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nSpousePartner.propTypes = {\r\n spousePartnerRelation: PropTypes.objectOf(PropTypes.any),\r\n clientProfileId: PropTypes.string.isRequired,\r\n clientProfileAddress: PropTypes.objectOf(PropTypes.any).isRequired,\r\n};\r\n\r\nSpousePartner.defaultProps = {\r\n spousePartnerRelation: null,\r\n};\r\n\r\nexport default SpousePartner;\r\n","/* eslint max-lines: [2, {\"max\": 350, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useEffect, useState } from 'react';\r\nimport {\r\n Backdrop,\r\n Button,\r\n CircularProgress,\r\n Divider,\r\n Grid,\r\n Paper,\r\n TextField,\r\n Typography,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport { useParams } from 'react-router-dom';\r\nimport { useSelector } from 'react-redux';\r\nimport { pick } from 'lodash';\r\nimport { toast } from 'react-toastify';\r\n\r\nimport * as clientApi from 'api/client';\r\nimport { shapeErrorsForToast } from 'lib/utils/errorUtil';\r\nimport { ErrorToast } from 'lib/components/ErrorToast';\r\n\r\nimport OtherDependents from './OtherDependents';\r\nimport Profile from './Profile';\r\nimport SpousePartner from './SpousePartner';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n maxWidth: theme.maxWidth,\r\n // [theme.breakpoints.down('lg')]: {\r\n // margin: theme.spacing(1, 3),\r\n // },\r\n // [theme.breakpoints.up('lg')]: {\r\n // margin: theme.spacing(1, 'auto'),\r\n // },\r\n },\r\n leftColumn: {\r\n [theme.breakpoints.up('md')]: {\r\n paddingRight: 16,\r\n },\r\n },\r\n middleColumn: {\r\n [theme.breakpoints.down('sm')]: {\r\n marginTop: 16,\r\n },\r\n },\r\n rightColumn: {\r\n [theme.breakpoints.up('md')]: {\r\n paddingLeft: 16,\r\n },\r\n [theme.breakpoints.down('sm')]: {\r\n marginTop: 16,\r\n },\r\n },\r\n header: {\r\n borderBottom: `1px solid ${theme.palette.primary.main}`,\r\n marginBottom: theme.spacing(1),\r\n marginTop: theme.spacing(1),\r\n marginLeft: theme.spacing(1),\r\n marginRight: theme.spacing(1),\r\n padding: theme.spacing(1),\r\n },\r\n content: {\r\n padding: theme.spacing(1),\r\n },\r\n}));\r\n\r\nconst ClientProfile = () => {\r\n const classes = useStyles();\r\n const params = useParams();\r\n const clientProfileId = params.id;\r\n const [isLoading, setIsLoading] = useState(true);\r\n const [family, setFamily] = useState();\r\n const [isInEditModeNotes, setIsInEditModeNotes] = useState(false);\r\n const [editedNotes, setEditedNotes] = useState('');\r\n\r\n // TODO: Replace when authentication is implemented.\r\n const advisorId = useSelector(({ auth }) => auth.account.id);\r\n\r\n useEffect(() => {\r\n clientApi\r\n .getClientProfileWithDependents(clientProfileId, advisorId)\r\n .then((response) => {\r\n setFamily({\r\n profile: response.data.profile,\r\n spousePartner: response.data.spousePartner,\r\n dependents: response.data.dependents,\r\n });\r\n setEditedNotes(response.data.profile.notes);\r\n setIsLoading(false);\r\n });\r\n }, [advisorId, clientProfileId]);\r\n\r\n const onChangeNotes = (event) => {\r\n setEditedNotes(event.target.value);\r\n };\r\n\r\n const handleClickCancelNotes = () => {\r\n setEditedNotes(family.profile.notes);\r\n setIsInEditModeNotes(false);\r\n };\r\n\r\n const handleClickSaveNotes = () => {\r\n const updatedFamily = { ...family };\r\n updatedFamily.profile.notes = editedNotes;\r\n clientApi\r\n .updateClientProfile(updatedFamily.profile)\r\n .then(() => {\r\n setFamily({ ...updatedFamily });\r\n })\r\n .catch((error) => {\r\n toast.error(, {\r\n autoClose: false,\r\n });\r\n })\r\n .finally(() => {\r\n setIsInEditModeNotes(false);\r\n });\r\n };\r\n\r\n if (!family) {\r\n return null;\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n  \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n  \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n LIFE EVENTS\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Pardon the dust! We are working on this feature.\r\n \r\n \r\n \r\n  \r\n \r\n \r\n \r\n \r\n \r\n \r\n ACTION ITEMS\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Do you have a hardhat? This feature is being built.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n FAMILY\r\n \r\n \r\n \r\n {family.profile && (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n NOTES\r\n \r\n \r\n \r\n setIsInEditModeNotes(true)}\r\n >\r\n Edit\r\n \r\n \r\n \r\n \r\n \r\n {!isInEditModeNotes && <>{family.profile.notes}}\r\n {isInEditModeNotes && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n Cancel\r\n \r\n \r\n Save\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n  \r\n \r\n \r\n \r\n \r\n \r\n \r\n FINANCIAL INFO\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Do not cross! Construction zone.\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nClientProfile.propTypes = {};\r\n\r\nClientProfile.defaultProps = {};\r\n\r\nexport default ClientProfile;\r\n","import React from 'react';\r\n\r\nconst BusySignal = () => {\r\n return

Checking Authentication...

;\r\n};\r\n\r\nexport default BusySignal;\r\n","import React from 'react';\r\nimport { Grid, Paper, Typography } from '@material-ui/core';\r\n\r\nconst ItsDeadJim = () => {\r\n return (\r\n \r\n
\r\n \r\n \r\n \r\n \r\n  \r\n \r\n \r\n \r\n \r\n It's dead, Jim.\r\n \r\n
\r\n \r\n TaxCast ran into a major problem. This is likely due to an\r\n issue with the network connection keeping TaxCast from\r\n reaching the server. We would appreciate it if you would\r\n please use one of the options below to contact customer\r\n support and let us know.\r\n \r\n
\r\n \r\n 888.482.9227 (888-4-TAXCAST)\r\n \r\n
\r\n \r\n \r\n support@taxcastplan.com\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default ItsDeadJim;\r\n","export const isAboveTheLineDeduction = (subcategory) => {\r\n let subcat = subcategory;\r\n if (subcat.startsWith('toolbox-')) {\r\n subcat = subcat.substring('toolbox-'.length);\r\n }\r\n if (\r\n subcat === 'retirementPlanContribution' ||\r\n subcat === 'healthSavingsAccountContribution' ||\r\n subcat === 'studentLoanInterest' ||\r\n subcat === 'alimony' ||\r\n subcat === 'otherDeductionAboveTheLine' ||\r\n subcat === 'higherEducationExpense'\r\n ) {\r\n return true;\r\n }\r\n return false;\r\n};\r\n\r\nexport const getAboveTheLineDeductions = (allDeductions) => {\r\n return allDeductions.filter((deduction) =>\r\n isAboveTheLineDeduction(deduction.id)\r\n );\r\n};\r\n\r\nexport const getBelowTheLineDeductions = (allDeductions) => {\r\n return allDeductions.filter(\r\n (deduction) => !isAboveTheLineDeduction(deduction.id)\r\n );\r\n};\r\n","import React from 'react';\nimport { Paper, makeStyles } from '@material-ui/core';\nimport PropTypes from 'prop-types';\nimport { Draggable } from 'react-beautiful-dnd';\nimport clsx from 'clsx';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n padding: theme.spacing(1, 2),\n backgroundColor: theme.palette.primaryBackground,\n // border is needed here, eventhough it's not visible,\n // otherwise the text inside will wrap on drag due to box sizing.\n border: `1px solid ${theme.palette.primaryBackground}`,\n },\n isDragging: {\n borderRadius: 2,\n border: '1px solid lightgrey',\n },\n}));\n\nconst ToolBoxItem = ({ item, index }) => {\n const classes = useStyles();\n return (\n \n {(provided, snapshot) => (\n \n {item.name}\n \n )}\n \n );\n};\n\nToolBoxItem.propTypes = {\n item: PropTypes.shape({\n id: PropTypes.string.isRequired,\n type: PropTypes.string.isRequired,\n name: PropTypes.string.isRequired,\n }).isRequired,\n index: PropTypes.number.isRequired,\n};\n\nexport default ToolBoxItem;\n","import React from 'react';\nimport {\n Divider,\n ExpansionPanel,\n ExpansionPanelDetails,\n ExpansionPanelSummary,\n Grid,\n Typography,\n makeStyles,\n} from '@material-ui/core';\nimport { ExpandMore as ExpandIcon } from '@material-ui/icons';\nimport { Droppable } from 'react-beautiful-dnd';\nimport PropTypes from 'prop-types';\n\nimport ToolBoxItem from './ToolBoxItem';\n\nconst useStyles = makeStyles((theme) => ({\n categoryText: {\n fontWeight: 540,\n color: theme.palette.primary.main,\n\n [theme.breakpoints.down('sm')]: {\n fontSize: '0.9em',\n },\n },\n panelDetails: {\n padding: 0,\n },\n detailGrid: {\n maxHeight: '65vh',\n overflowY: 'auto',\n overflowX: 'hidden',\n [theme.breakpoints.down('lg')]: {\n maxHeight: '52vh',\n },\n },\n}));\n\nconst ExpandableToolBox = ({ id, type, title, items, expanded, onChange }) => {\n const classes = useStyles();\n const handleChange = () => {\n onChange(expanded !== title ? title : '');\n };\n\n return (\n \n }>\n {title}\n \n \n \n {(provided) => (\n \n {items.map((item, index) => (\n \n \n \n \n ))}\n {provided.placeholder}\n \n )}\n \n \n \n );\n};\n\nExpandableToolBox.propTypes = {\n id: PropTypes.string.isRequired,\n type: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n items: PropTypes.arrayOf(\n PropTypes.shape({ type: PropTypes.string, name: PropTypes.string })\n ).isRequired,\n expanded: PropTypes.string.isRequired,\n onChange: PropTypes.func.isRequired,\n};\n\nexport default ExpandableToolBox;\n","import React, { useState } from 'react';\r\nimport { Paper, makeStyles } from '@material-ui/core';\r\n\r\nimport { categoryTypes } from 'constants/categories';\r\nimport { toolBoxData } from 'constants/toolBoxData';\r\nimport { getAboveTheLineDeductions, getBelowTheLineDeductions } from 'lib/utils/transactionCategoriesUtil';\r\nimport ExpandableToolBox from './ExpandableToolBox';\r\n\r\nconst useStyles = makeStyles(() => ({\r\n root: {\r\n height: '100%',\r\n },\r\n}));\r\n\r\nconst TaxCastToolBar = () => {\r\n const classes = useStyles();\r\n const [expand, setExpand] = useState('');\r\n\r\n return (\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n \r\n );\r\n};\r\n\r\nexport default TaxCastToolBar;\r\n","import React from 'react';\r\nimport {\r\n List,\r\n ListItem,\r\n ListItemIcon,\r\n ListItemText,\r\n Popover,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport {\r\n Delete as DeleteIcon,\r\n Edit as EditIcon,\r\n PlaylistAdd as PlaylistAddIcon,\r\n} from '@material-ui/icons';\r\nimport PropTypes from 'prop-types';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n moreItemIcon: {\r\n minWidth: theme.spacing(4),\r\n },\r\n moreText: {\r\n color: theme.palette.primary.main,\r\n },\r\n}));\r\n\r\nconst TransactionPopover = ({\r\n id,\r\n editTransaction,\r\n deleteTransaction,\r\n duplicateTransaction,\r\n anchorEl,\r\n togglePopover,\r\n taxYear,\r\n}) => {\r\n const classes = useStyles();\r\n return (\r\n \r\n \r\n {taxYear >= new Date().getFullYear() && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n {taxYear >= new Date().getFullYear() && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nTransactionPopover.propTypes = {\r\n id: PropTypes.string.isRequired,\r\n editTransaction: PropTypes.func.isRequired,\r\n deleteTransaction: PropTypes.func.isRequired,\r\n anchorEl: PropTypes.objectOf(PropTypes.object),\r\n togglePopover: PropTypes.func.isRequired,\r\n duplicateTransaction: PropTypes.func.isRequired,\r\n taxYear: PropTypes.string.isRequired,\r\n};\r\n\r\nTransactionPopover.defaultProps = {\r\n anchorEl: null,\r\n};\r\n\r\nexport default TransactionPopover;\r\n","/* eslint max-lines: [2, {\"max\": 200, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useState } from 'react';\r\nimport {\r\n Grid,\r\n IconButton,\r\n Paper,\r\n Typography,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport { MoreVert as MoreIcon } from '@material-ui/icons';\r\nimport PropTypes from 'prop-types';\r\nimport clsx from 'clsx';\r\nimport { Draggable } from 'react-beautiful-dnd';\r\nimport { useDispatch } from 'react-redux';\r\n\r\nimport { categoryTypes } from 'constants/categories';\r\nimport { currencyFormatter } from 'lib/utils/format';\r\nimport { taxCastActions } from 'store/slices/taxCast';\r\n\r\nimport TransactionPopOver from './TransactionPopover';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n position: 'relative',\r\n margin: theme.spacing(0.3),\r\n padding: theme.spacing(0.5, 1),\r\n [theme.breakpoints.down('sm')]: {\r\n width: '100%',\r\n },\r\n },\r\n gridContainer: {\r\n [theme.breakpoints.up('md')]: {\r\n width: theme.spacing(18),\r\n },\r\n },\r\n blue: {\r\n background: theme.taxCast.tiles.incomeColor,\r\n },\r\n pink: {\r\n background: theme.taxCast.tiles.deductionsColor,\r\n },\r\n orange: {\r\n background: theme.taxCast.tiles.capitalGainsColor,\r\n },\r\n name: {\r\n fontSize: '0.9em',\r\n color: theme.taxCast.primaryTextColor,\r\n },\r\n amount: {\r\n fontSize: '0.7em',\r\n color: 'grey',\r\n },\r\n moreIcon: {\r\n position: 'absolute',\r\n right: 0,\r\n bottom: 0,\r\n color: theme.taxCast.tiles.moreIcon,\r\n },\r\n}));\r\n\r\nconst TaxTile = ({ transaction, type, index }) => {\r\n const classes = useStyles();\r\n const [anchorEl, setAnchorEl] = useState(null);\r\n const dispatch = useDispatch();\r\n\r\n const togglePopover = (event) => {\r\n setAnchorEl(anchorEl ? null : event.currentTarget);\r\n };\r\n\r\n const editTransaction = () => {\r\n dispatch(taxCastActions.TOGGLE_EDIT_TRANSACTION_DIALOG(transaction));\r\n setAnchorEl(null);\r\n };\r\n\r\n const deleteTransaction = () => {\r\n dispatch(taxCastActions.TOGGLE_DELETE_TRANSACTION_DIALOG(transaction));\r\n setAnchorEl(null);\r\n };\r\n\r\n const duplicateTransaction = () => {\r\n dispatch(\r\n taxCastActions.TOGGLE_SPLIT_DISTRIBUTE_TRANSACTION_DIALOG({\r\n transaction,\r\n operation: 'currency',\r\n })\r\n );\r\n setAnchorEl(null);\r\n };\r\n\r\n return (\r\n \r\n {(provided) => (\r\n \r\n \r\n \r\n \r\n {transaction.name}\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n {currencyFormatter.format(transaction.value)}\r\n \r\n \r\n {transaction.subcategory === 'charitableContribution' && (\r\n \r\n \r\n {transaction.charitableContributionClassification}\r\n \r\n \r\n )}\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nTaxTile.propTypes = {\r\n transaction: PropTypes.shape({\r\n displaySequence: PropTypes.number.isRequired,\r\n id: PropTypes.string.isRequired,\r\n name: PropTypes.string.isRequired,\r\n value: PropTypes.string.isRequired,\r\n subcategory: PropTypes.string.isRequired,\r\n charitableContributionClassification: PropTypes.string,\r\n taxYear: PropTypes.string.isRequired,\r\n }).isRequired,\r\n index: PropTypes.number.isRequired,\r\n type: PropTypes.string.isRequired,\r\n};\r\n\r\nexport default TaxTile;\r\n","import React from 'react';\nimport { Grid, Typography, makeStyles, useMediaQuery } from '@material-ui/core';\nimport PropTypes from 'prop-types';\nimport { useSelector } from 'react-redux';\nimport { Droppable } from 'react-beautiful-dnd';\n\nimport TaxTile from './TaxTile';\n\nconst useStyles = makeStyles((theme) => ({\n groupContainer: {\n minHeight: theme.spacing(6.5),\n overflow: 'hidden', // this is hidden due to DnD not being able to handle nested scroll\n paddingBottom: 5, // this is space reserved for scrollbar gutter\n [theme.breakpoints.down('sm')]: {\n flexWrap: 'wrap',\n },\n '&:hover': {\n overflowX: 'scroll',\n paddingBottom: 0, // this is space reserved removed for scrollbar gutter\n },\n },\n text: {\n color: theme.taxCast.primaryTextColor,\n },\n}));\n\nconst TaxGroup = ({ type, label, year }) => {\n const classes = useStyles();\n const isMobile = useMediaQuery((theme) => theme.breakpoints.down('sm'));\n const transactions = useSelector(({ taxCast }) => taxCast.forecast.years[year][type]);\n\n if (!transactions) return null;\n\n return (\n \n \n \n {label} {`(${transactions.length})`}\n \n \n\n \n \n {(provided) => (\n \n {transactions.map((transaction, index) => (\n \n ))}\n {provided.placeholder}\n \n )}\n \n \n \n );\n};\n\nTaxGroup.propTypes = {\n type: PropTypes.string.isRequired,\n label: PropTypes.string.isRequired,\n year: PropTypes.string.isRequired,\n};\n\nexport default TaxGroup;\n","/* eslint max-lines: [2, {\"max\": 200, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useState } from 'react';\r\nimport {\r\n Grid,\r\n IconButton,\r\n Paper,\r\n Typography,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport { MoreVert as MoreIcon } from '@material-ui/icons';\r\nimport PropTypes from 'prop-types';\r\nimport clsx from 'clsx';\r\nimport { useDispatch } from 'react-redux';\r\n\r\nimport { categoryTypes } from 'constants/categories';\r\nimport { currencyFormatter } from 'lib/utils/format';\r\nimport { taxCastActions } from 'store/slices/taxCast';\r\n\r\nimport TransactionPopOver from './TransactionPopover';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n position: 'relative',\r\n margin: theme.spacing(0.3),\r\n padding: theme.spacing(0.5, 1),\r\n [theme.breakpoints.down('sm')]: {\r\n width: '100%',\r\n },\r\n },\r\n gridContainer: {\r\n [theme.breakpoints.up('md')]: {\r\n width: theme.spacing(18),\r\n },\r\n },\r\n blue: {\r\n background: theme.taxCast.tiles.incomeColor,\r\n },\r\n pink: {\r\n background: theme.taxCast.tiles.deductionsColor,\r\n },\r\n orange: {\r\n background: theme.taxCast.tiles.capitalGainsColor,\r\n },\r\n name: {\r\n fontSize: '0.9em',\r\n color: theme.taxCast.primaryTextColor,\r\n },\r\n amount: {\r\n fontSize: '0.7em',\r\n color: 'grey',\r\n },\r\n moreIcon: {\r\n position: 'absolute',\r\n right: 0,\r\n bottom: 0,\r\n color: theme.taxCast.tiles.moreIcon,\r\n },\r\n}));\r\n\r\nconst InactiveTaxTile = ({ transaction, type }) => {\r\n const classes = useStyles();\r\n const [anchorEl, setAnchorEl] = useState(null);\r\n const dispatch = useDispatch();\r\n\r\n const togglePopover = (event) => {\r\n setAnchorEl(anchorEl ? null : event.currentTarget);\r\n };\r\n\r\n const editTransaction = () => {\r\n dispatch(taxCastActions.TOGGLE_EDIT_TRANSACTION_DIALOG(transaction));\r\n setAnchorEl(null);\r\n };\r\n\r\n const deleteTransaction = () => {\r\n dispatch(taxCastActions.TOGGLE_DELETE_TRANSACTION_DIALOG(transaction));\r\n setAnchorEl(null);\r\n };\r\n\r\n const duplicateTransaction = () => {\r\n dispatch(\r\n taxCastActions.TOGGLE_SPLIT_DISTRIBUTE_TRANSACTION_DIALOG({\r\n transaction,\r\n operation: 'currency',\r\n })\r\n );\r\n setAnchorEl(null);\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n {transaction.name}\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n {currencyFormatter.format(transaction.value)}\r\n \r\n \r\n {transaction.subcategory === 'charitableContribution' && (\r\n \r\n \r\n {transaction.charitableContributionClassification}\r\n \r\n \r\n )}\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nInactiveTaxTile.propTypes = {\r\n transaction: PropTypes.shape({\r\n displaySequence: PropTypes.number.isRequired,\r\n id: PropTypes.string.isRequired,\r\n name: PropTypes.string.isRequired,\r\n value: PropTypes.string.isRequired,\r\n subcategory: PropTypes.string.isRequired,\r\n charitableContributionClassification: PropTypes.string,\r\n taxYear: PropTypes.string.isRequired,\r\n }).isRequired,\r\n type: PropTypes.string.isRequired,\r\n};\r\n\r\nexport default InactiveTaxTile;\r\n","import React from 'react';\r\nimport { Grid, Typography, makeStyles } from '@material-ui/core';\r\nimport PropTypes from 'prop-types';\r\nimport { useSelector } from 'react-redux';\r\n\r\nimport InactiveTaxTile from './InactiveTaxTile';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n groupContainer: {\r\n minHeight: theme.spacing(6.5),\r\n overflow: 'hidden', // this is hidden due to DnD not being able to handle nested scroll\r\n paddingBottom: 5, // this is space reserved for scrollbar gutter\r\n [theme.breakpoints.down('sm')]: {\r\n flexWrap: 'wrap',\r\n },\r\n '&:hover': {\r\n overflowX: 'scroll',\r\n paddingBottom: 0, // this is space reserved removed for scrollbar gutter\r\n },\r\n },\r\n text: {\r\n color: theme.taxCast.primaryTextColor,\r\n },\r\n}));\r\n\r\nconst InactiveTaxGroup = ({ type, label, year }) => {\r\n const classes = useStyles();\r\n const transactions = useSelector(\r\n ({ taxCast }) => taxCast.forecast.years[year][type]\r\n );\r\n\r\n if (!transactions) return null;\r\n\r\n return (\r\n \r\n \r\n \r\n {label} {`(${transactions.length})`}\r\n \r\n \r\n\r\n \r\n \r\n {transactions.map((transaction) => (\r\n \r\n ))}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nInactiveTaxGroup.propTypes = {\r\n type: PropTypes.string.isRequired,\r\n label: PropTypes.string.isRequired,\r\n year: PropTypes.string.isRequired,\r\n};\r\n\r\nexport default InactiveTaxGroup;\r\n","import React from 'react';\nimport { Grid, Typography, makeStyles } from '@material-ui/core';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { useSelector } from 'react-redux';\nimport { currencyFormatter } from 'lib/utils/format';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n [theme.breakpoints.up('sm')]: {\n padding: theme.spacing(2),\n },\n },\n header: {\n borderBottom: `1px solid ${theme.taxCast.summaryText}`,\n marginBottom: theme.spacing(1),\n marginTop: theme.spacing(1),\n },\n propertyText: {\n color: theme.taxCast.summaryText,\n },\n textSize: {\n fontSize: '0.9em',\n },\n calculation: {\n marginTop: theme.spacing(1),\n padding: theme.spacing(1, 0),\n borderTop: `1px solid ${theme.taxCast.summaryText}`,\n },\n}));\n\n// eslint-disable-next-line\nconst TaxYearSummary = ({ year }) => {\n const classes = useStyles();\n const summary = useSelector(({ taxCast }) => taxCast.calculations[year]);\n\n if (!summary) return null;\n\n return (\n \n \n \n Summary\n \n \n \n \n Ordinary Income\n \n \n \n \n {currencyFormatter.format(summary.ordinaryTaxableIncome)}\n \n \n\n \n \n Capital Gains\n \n \n \n \n {currencyFormatter.format(summary.capitalGainsTaxableIncome)}\n \n \n\n \n \n Social Security\n \n \n \n \n {currencyFormatter.format(summary.taxableSocialSecurity)}\n \n \n\n \n \n Deductions\n \n \n \n \n {currencyFormatter.format(summary.deductions)}\n \n \n \n\n \n Taxes\n \n\n {/* \n \n Summary\n \n \n */}\n\n \n \n \n Income\n \n \n \n \n {currencyFormatter.format(summary.ordinaryTaxableIncomeTax)}\n \n \n\n \n \n Capital Gains\n \n \n \n \n {currencyFormatter.format(summary.capitalGainsTaxableIncomeTax)}\n \n \n\n {/* TODO: Uncomment this upon implementation of Surtax calculation. */}\n {/* \n \n Surtax\n \n \n \n {currencyFormatter.format(summary.surtax)}\n */}\n\n \n \n Total\n \n \n \n \n {currencyFormatter.format(summary.totalTax)}\n \n \n \n \n \n );\n};\n\nTaxYearSummary.propTypes = {\n year: PropTypes.string.isRequired,\n};\n\nexport default TaxYearSummary;\n","/* eslint max-lines: [2, {\"max\": 250, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n Button,\r\n Dialog,\r\n DialogActions,\r\n DialogContent,\r\n DialogTitle,\r\n FormControlLabel,\r\n Grid,\r\n IconButton,\r\n Paper,\r\n Radio,\r\n RadioGroup,\r\n Typography,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport MoreHorizIcon from '@material-ui/icons/MoreHoriz';\r\n\r\nimport { categoryTypes } from 'constants/categories';\r\nimport {\r\n filingStatusDisplayMap,\r\n filingStatusTypes,\r\n} from 'constants/filingStatuses';\r\n\r\nimport { UPDATE_FILING_STATUS_FOR_TAX_YEAR } from 'store/asyncActions/taxCast';\r\nimport TaxGroup from './TaxGroup';\r\nimport InactiveTaxGroup from './InactiveTaxGroup';\r\nimport TaxYearSummary from './TaxYearSummary';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n background: theme.taxCast.yearContainer,\r\n padding: theme.spacing(1, 2),\r\n margin: theme.spacing(0.5, 0),\r\n border: `1px solid ${theme.palette.secondary.main}`,\r\n },\r\n summary: {\r\n [theme.breakpoints.up('sm')]: {\r\n borderLeft: '1px solid lightgrey',\r\n },\r\n },\r\n reorderIcon: {\r\n border: '1px',\r\n },\r\n}));\r\n\r\nconst TaxYear = ({ year, filingStatus }) => {\r\n const dispatch = useDispatch();\r\n const classes = useStyles();\r\n const taxYearAvailable = useSelector(\r\n ({ taxCast }) => !!taxCast.forecast.years[year]\r\n );\r\n const clientProfileId = useSelector(({ taxCast }) => taxCast.client.id);\r\n const forecastId = useSelector(({ taxCast }) => taxCast.forecast.id);\r\n const [\r\n showChangeFilingStatusDialog,\r\n setShowChangeFilingStatusDialog,\r\n ] = useState(false);\r\n const [currentFilingStatus, setCurrentFilingStatus] = useState(filingStatus);\r\n const [newFilingStatus, setNewFilingStatus] = useState(filingStatus);\r\n const summary = useSelector(({ taxCast }) => taxCast.calculations[year]);\r\n\r\n const handleShowChangeFilingStatusDialog = () => {\r\n setShowChangeFilingStatusDialog(true);\r\n };\r\n\r\n const handleSelection = (event) => {\r\n setNewFilingStatus(event.target.value);\r\n };\r\n\r\n const handleConfirmChangeFilingStatus = () => {\r\n if (currentFilingStatus !== newFilingStatus) {\r\n dispatch(\r\n UPDATE_FILING_STATUS_FOR_TAX_YEAR(\r\n clientProfileId,\r\n forecastId,\r\n year,\r\n newFilingStatus\r\n )\r\n );\r\n setCurrentFilingStatus(newFilingStatus);\r\n }\r\n setShowChangeFilingStatusDialog(false);\r\n };\r\n\r\n const handleCancelChangeFilingStatus = () => {\r\n // Revert to the original/current filing status.\r\n setNewFilingStatus(currentFilingStatus);\r\n setShowChangeFilingStatusDialog(false);\r\n };\r\n\r\n if (!taxYearAvailable) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {year} - {filingStatusDisplayMap[currentFilingStatus]}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {summary && (\r\n \r\n Marginal: {Math.round(summary.marginalTaxRate)}%\r\n \r\n )}\r\n \r\n \r\n {summary && (\r\n \r\n Effective: {Math.round(summary.effectiveTaxRate)}%\r\n \r\n )}\r\n \r\n \r\n {year < new Date().getFullYear() && (\r\n \r\n )}\r\n {year >= new Date().getFullYear() && (\r\n \r\n )}\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n {year} Filing Status\r\n \r\n \r\n \r\n {Object.keys(filingStatusTypes).map((item) => (\r\n }\r\n label={filingStatusDisplayMap[item]}\r\n />\r\n ))}\r\n \r\n \r\n \r\n \r\n Cancel\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nTaxYear.propTypes = {\r\n year: PropTypes.string.isRequired,\r\n filingStatus: PropTypes.string.isRequired,\r\n};\r\n\r\nexport default TaxYear;\r\n","/* eslint max-lines: [2, {\"max\": 250, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n Button,\r\n Dialog,\r\n DialogActions,\r\n DialogContent,\r\n DialogTitle,\r\n FormControlLabel,\r\n Grid,\r\n IconButton,\r\n Paper,\r\n Radio,\r\n RadioGroup,\r\n Typography,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport MoreHorizIcon from '@material-ui/icons/MoreHoriz';\r\n\r\nimport { categoryTypes } from 'constants/categories';\r\nimport {\r\n filingStatusDisplayMap,\r\n filingStatusTypes,\r\n} from 'constants/filingStatuses';\r\n\r\nimport { UPDATE_FILING_STATUS_FOR_TAX_YEAR } from 'store/asyncActions/taxCast';\r\nimport InactiveTaxGroup from './InactiveTaxGroup';\r\nimport TaxYearSummary from './TaxYearSummary';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n background: theme.taxCast.yearContainer,\r\n padding: theme.spacing(1, 2),\r\n margin: theme.spacing(0.5, 0),\r\n border: `1px solid ${theme.palette.secondary.main}`,\r\n },\r\n summary: {\r\n [theme.breakpoints.up('sm')]: {\r\n borderLeft: '1px solid lightgrey',\r\n },\r\n },\r\n reorderIcon: {\r\n border: '1px',\r\n },\r\n}));\r\n\r\nconst InactiveTaxYear = ({ year, filingStatus }) => {\r\n const dispatch = useDispatch();\r\n const classes = useStyles();\r\n const taxYearAvailable = useSelector(\r\n ({ taxCast }) => !!taxCast.forecast.years[year]\r\n );\r\n const clientProfileId = useSelector(({ taxCast }) => taxCast.client.id);\r\n const forecastId = useSelector(({ taxCast }) => taxCast.forecast.id);\r\n const [\r\n showChangeFilingStatusDialog,\r\n setShowChangeFilingStatusDialog,\r\n ] = useState(false);\r\n const [currentFilingStatus, setCurrentFilingStatus] = useState(filingStatus);\r\n const [newFilingStatus, setNewFilingStatus] = useState(filingStatus);\r\n const summary = useSelector(({ taxCast }) => taxCast.calculations[year]);\r\n\r\n const handleShowChangeFilingStatusDialog = () => {\r\n setShowChangeFilingStatusDialog(true);\r\n };\r\n\r\n const handleSelection = (event) => {\r\n setNewFilingStatus(event.target.value);\r\n };\r\n\r\n const handleConfirmChangeFilingStatus = () => {\r\n if (currentFilingStatus !== newFilingStatus) {\r\n dispatch(\r\n UPDATE_FILING_STATUS_FOR_TAX_YEAR(\r\n clientProfileId,\r\n forecastId,\r\n year,\r\n newFilingStatus\r\n )\r\n );\r\n setCurrentFilingStatus(newFilingStatus);\r\n }\r\n setShowChangeFilingStatusDialog(false);\r\n };\r\n\r\n const handleCancelChangeFilingStatus = () => {\r\n // Revert to the original/current filing status.\r\n setNewFilingStatus(currentFilingStatus);\r\n setShowChangeFilingStatusDialog(false);\r\n };\r\n\r\n if (!taxYearAvailable) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {year} - {filingStatusDisplayMap[currentFilingStatus]}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {summary && (\r\n \r\n Marginal: {Math.round(summary.marginalTaxRate)}%\r\n \r\n )}\r\n \r\n \r\n {summary && (\r\n \r\n Effective: {Math.round(summary.effectiveTaxRate)}%\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n {year} Filing Status\r\n \r\n \r\n \r\n {Object.keys(filingStatusTypes).map((item) => (\r\n }\r\n label={filingStatusDisplayMap[item]}\r\n />\r\n ))}\r\n \r\n \r\n \r\n \r\n Cancel\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nInactiveTaxYear.propTypes = {\r\n year: PropTypes.string.isRequired,\r\n filingStatus: PropTypes.string.isRequired,\r\n};\r\n\r\nexport default InactiveTaxYear;\r\n","/* eslint max-lines: [2, {\"max\": 350, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useEffect, useState } from 'react';\r\nimport {\r\n Backdrop,\r\n Button,\r\n Dialog,\r\n DialogActions,\r\n DialogContent,\r\n DialogContentText,\r\n DialogTitle,\r\n ExpansionPanel,\r\n ExpansionPanelDetails,\r\n ExpansionPanelSummary,\r\n Grid,\r\n Paper,\r\n Typography,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport { ExpandMore as ExpandIcon } from '@material-ui/icons';\r\nimport { useHistory } from 'react-router-dom';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport map from 'lodash/map';\r\nimport loading from 'assets/img/BouncingBarsBlack.png';\r\nimport {\r\n COMPLETE_PREFLIGHT,\r\n RUN_CALCULATIONS,\r\n} from 'store/asyncActions/taxCast';\r\n\r\nimport TaxYear from './TaxYear';\r\nimport InactiveTaxYear from './InactiveTaxYear';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n padding: theme.spacing(0, 1),\r\n maxHeight: '90vh',\r\n overflowX: 'auto',\r\n minHeight: '375px',\r\n [theme.breakpoints.down('md')]: {\r\n maxHeight: '65vh',\r\n },\r\n },\r\n backdrop: {\r\n zIndex: theme.zIndex.drawer + 1,\r\n color: '#bebebe',\r\n },\r\n expandoPanel: {\r\n width: '100%',\r\n },\r\n panelDetails: {\r\n padding: 0,\r\n overflowY: 'auto',\r\n },\r\n expando: {\r\n backgroundColor: theme.taxCast.canvasExpando,\r\n },\r\n expandoText: {\r\n color: theme.palette.secondary.main,\r\n [theme.breakpoints.down('sm')]: {\r\n fontSize: '0.9em',\r\n },\r\n },\r\n expandoGrid: {\r\n maxHeight: '65vh',\r\n overflowY: 'auto',\r\n overflowX: 'hidden',\r\n [theme.breakpoints.down('lg')]: {\r\n maxHeight: '52vh',\r\n },\r\n },\r\n}));\r\n\r\nconst TaxCastCanvas = () => {\r\n const classes = useStyles();\r\n const dispatch = useDispatch();\r\n const history = useHistory();\r\n const forecast = useSelector(({ taxCast }) => taxCast.forecast);\r\n const isBusy = useSelector(({ taxCast }) => taxCast.isLoadingCanvas);\r\n const clientProfileId = useSelector(({ taxCast }) => taxCast.client.id);\r\n const forecastId = useSelector(({ taxCast }) => taxCast.forecast.id);\r\n const advisorId = useSelector(({ auth }) => auth.account.id);\r\n const isBusyCalculating = useSelector(\r\n ({ taxCast }) => taxCast.isRunningCalculations\r\n );\r\n const isPreFlightComplete = useSelector(\r\n ({ taxCast }) => taxCast.isPreFlightComplete\r\n );\r\n\r\n // Check for catch-up.\r\n const needsToCatchUp = useSelector(({ taxCast }) => taxCast.needsToCatchUp);\r\n const [didPromptToCatchUp, setDidPromptToCatchUp] = useState(false);\r\n const [showPromptToCatchUp, setShowPromptToCatchUp] = useState(false);\r\n const [wantsToCatchUp, setWantsToCatchUp] = useState(false);\r\n\r\n // Check for rollover.\r\n const canRollover = useSelector(({ taxCast }) => taxCast.canRollover);\r\n const [didPromptToRollover, setDidPromptToRollover] = useState(false);\r\n const [showPromptToRollover, setShowPromptToRollover] = useState(false);\r\n const [wantsToRollover, setWantsToRollover] = useState(false);\r\n\r\n // Expandos for previous/inactive tax years.\r\n const [expandedYears, setExpandedYears] = useState({});\r\n\r\n const handleChange = (year) => {\r\n const currentValue = expandedYears[year];\r\n setExpandedYears({ ...expandedYears, [year]: !currentValue });\r\n };\r\n\r\n const getFilingStatusForTaxYear = (taxYear) => {\r\n const taxYearIndex = forecast.yearList.indexOf(taxYear);\r\n const filingStatus = forecast.filingStatusByYearList[taxYearIndex];\r\n return filingStatus;\r\n };\r\n\r\n useEffect(() => {\r\n // Determine if the forecast needs to catch-up on years.\r\n if (!didPromptToCatchUp && needsToCatchUp) {\r\n setShowPromptToCatchUp(true);\r\n }\r\n const canProcessRolloverLogic = !needsToCatchUp || !wantsToCatchUp;\r\n\r\n // Determine if the forecast can rollover to new years.\r\n // Only prompt to rollover if the forecast is caught up.\r\n if (!didPromptToRollover && canProcessRolloverLogic && canRollover) {\r\n setShowPromptToRollover(true);\r\n }\r\n\r\n // RUN CALCS IF:\r\n // !(needsToCatchup && wantsToCatchup)\r\n // AND\r\n // !(canRollover && wantsToRollover)\r\n const catchUpPassed =\r\n !needsToCatchUp ||\r\n (needsToCatchUp && didPromptToCatchUp && !wantsToCatchUp);\r\n const rolloverPassed =\r\n !canRollover || (canRollover && didPromptToRollover && !wantsToRollover);\r\n if (catchUpPassed && rolloverPassed) {\r\n dispatch(COMPLETE_PREFLIGHT());\r\n }\r\n }, [\r\n advisorId,\r\n clientProfileId,\r\n forecastId,\r\n dispatch,\r\n didPromptToCatchUp,\r\n didPromptToRollover,\r\n showPromptToCatchUp,\r\n showPromptToRollover,\r\n needsToCatchUp,\r\n canRollover,\r\n wantsToCatchUp,\r\n wantsToRollover,\r\n ]);\r\n\r\n useEffect(() => {\r\n if (forecast && forecast.yearList) {\r\n const currentYear = new Date().getFullYear();\r\n const matchingYears = forecast.yearList.filter((y) => +y < currentYear);\r\n const expandedYearsObject = {};\r\n matchingYears.forEach((item) => {\r\n expandedYearsObject[item] = false;\r\n });\r\n setExpandedYears(expandedYearsObject);\r\n }\r\n\r\n if (forecastId && isPreFlightComplete) {\r\n dispatch(RUN_CALCULATIONS({ clientProfileId, forecastId, advisorId }));\r\n }\r\n }, [\r\n advisorId,\r\n clientProfileId,\r\n forecastId,\r\n dispatch,\r\n isPreFlightComplete,\r\n forecast,\r\n ]);\r\n\r\n const handleCatchUpDialogActionClick = (executeCatchUpSelection) => {\r\n setDidPromptToCatchUp(true);\r\n setShowPromptToCatchUp(false);\r\n setWantsToCatchUp(executeCatchUpSelection);\r\n if (executeCatchUpSelection) {\r\n history.push(\r\n `/clients/${clientProfileId}/extend-forecast?option=catchup`\r\n );\r\n }\r\n };\r\n\r\n const handleRolloverDialogActionClick = (executeRolloverSelection) => {\r\n setDidPromptToRollover(true);\r\n setShowPromptToRollover(false);\r\n setWantsToRollover(executeRolloverSelection);\r\n if (executeRolloverSelection) {\r\n history.push(\r\n `/clients/${clientProfileId}/extend-forecast?option=rollover`\r\n );\r\n // clients/:id/extend-forecast?option=rollover\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {forecast &&\r\n forecast.yearList &&\r\n map(\r\n forecast.yearList,\r\n (year) =>\r\n year < new Date().getFullYear() && (\r\n handleChange(year)}\r\n className={classes.expandoPanel}\r\n >\r\n }\r\n className={classes.expando}\r\n >\r\n \r\n {year}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n )}\r\n {forecast &&\r\n forecast.yearList &&\r\n map(\r\n forecast.yearList,\r\n (activeYear) =>\r\n activeYear >= new Date().getFullYear() && (\r\n \r\n \r\n \r\n )\r\n )}\r\n {needsToCatchUp && didPromptToCatchUp && !wantsToCatchUp && (\r\n \r\n handleCatchUpDialogActionClick(true)}\r\n color='primary'\r\n value='ok'\r\n variant='contained'\r\n >\r\n Catch-Up\r\n \r\n \r\n )}\r\n {(!needsToCatchUp || !wantsToCatchUp) &&\r\n canRollover &&\r\n didPromptToRollover &&\r\n !wantsToRollover && (\r\n \r\n handleRolloverDialogActionClick(true)}\r\n color='primary'\r\n value='ok'\r\n variant='contained'\r\n >\r\n Rollover\r\n \r\n \r\n )}\r\n\r\n \r\n Canvas Catch-Up\r\n \r\n \r\n This canvas is eligible for more tax years. Extend it now? (You\r\n can always do it later.)\r\n \r\n \r\n \r\n handleCatchUpDialogActionClick(false)}\r\n color='primary'\r\n value='cancel'\r\n variant='outlined'\r\n >\r\n Leave as is\r\n \r\n handleCatchUpDialogActionClick(true)}\r\n color='primary'\r\n value='ok'\r\n variant='contained'\r\n >\r\n Catch-Up\r\n \r\n \r\n \r\n\r\n \r\n Canvas Rollover\r\n \r\n \r\n New tax table values are available and this canvas is eligible for\r\n more tax years. Extend it now? (You can always do it later.)\r\n \r\n \r\n \r\n handleRolloverDialogActionClick(false)}\r\n color='primary'\r\n value='cancel'\r\n variant='outlined'\r\n >\r\n Leave as is\r\n \r\n handleRolloverDialogActionClick(true)}\r\n color='primary'\r\n value='ok'\r\n variant='contained'\r\n >\r\n Rollover\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default TaxCastCanvas;\r\n","import React from 'react';\r\nimport { Grid, Typography, makeStyles } from '@material-ui/core';\r\nimport { useSelector } from 'react-redux';\r\nimport PropTypes from 'prop-types';\r\nimport { filingStatusDisplayMap } from 'constants/filingStatuses';\r\nimport { getAge } from 'lib/utils/dateTimeUtils';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n header: {\r\n borderBottom: `1px solid ${theme.palette.primary.main}`,\r\n fontSize: '1.2em',\r\n marginBottom: theme.spacing(1),\r\n [theme.breakpoints.down('sm')]: {\r\n fontSize: '0.9em',\r\n width: '90%',\r\n },\r\n },\r\n label: {\r\n fontSize: '1em',\r\n [theme.breakpoints.down('sm')]: {\r\n fontSize: '0.9em',\r\n },\r\n },\r\n value: {\r\n fontSize: '1em',\r\n [theme.breakpoints.down('sm')]: {\r\n fontSize: '0.9em',\r\n },\r\n [theme.breakpoints.up('md')]: {\r\n margin: theme.spacing(0, 0, 0.5, 1.5),\r\n },\r\n },\r\n}));\r\n\r\nconst KeyValueGrid = ({ label, value, classes }) => (\r\n <>\r\n \r\n \r\n {label}:\r\n \r\n \r\n\r\n \r\n {value}\r\n \r\n \r\n);\r\n\r\nKeyValueGrid.propTypes = {\r\n label: PropTypes.string.isRequired,\r\n value: PropTypes.string.isRequired,\r\n classes: PropTypes.shape({ label: PropTypes.string, value: PropTypes.string })\r\n .isRequired,\r\n};\r\n\r\nconst ClientShortProfile = () => {\r\n const classes = useStyles();\r\n const client = useSelector(({ taxCast }) => taxCast.client);\r\n // TODO: Find out why the 'value' prop on Line 75 (77) throws an error but the KVG before it doesn't.\r\n return (\r\n \r\n \r\n \r\n Client Profile\r\n \r\n \r\n\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default ClientShortProfile;\r\n","import React, { useState } from 'react';\r\nimport { Grid, IconButton, Typography, makeStyles } from '@material-ui/core';\r\nimport {\r\n ToggleOff as ToggleOffIcon,\r\n ToggleOn as ToggleOnIcon,\r\n} from '@material-ui/icons';\r\nimport PropTypes from 'prop-types';\r\nimport { useSelector } from 'react-redux';\r\nimport { currencyFormatter } from 'lib/utils/format';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n [theme.breakpoints.down('xs')]: {\r\n marginTop: theme.spacing(1),\r\n },\r\n },\r\n header: {\r\n borderBottom: `1px solid ${theme.palette.primary.main}`,\r\n fontSize: '1.2em',\r\n marginBottom: theme.spacing(1),\r\n [theme.breakpoints.down('sm')]: {\r\n fontSize: '0.9em',\r\n width: '90%',\r\n },\r\n },\r\n text: {\r\n fontSize: '1em',\r\n [theme.breakpoints.down('sm')]: {\r\n fontSize: '0.9em',\r\n },\r\n },\r\n}));\r\n\r\nconst YearTaxPair = ({ year, tax, classes, effectiveTaxRate, showTax }) => (\r\n <>\r\n \r\n \r\n {year}\r\n \r\n \r\n\r\n \r\n \r\n {showTax && currencyFormatter.format(tax)}\r\n {!showTax && `${Math.round(effectiveTaxRate)}%`}\r\n \r\n \r\n \r\n);\r\n\r\nYearTaxPair.propTypes = {\r\n year: PropTypes.number.isRequired,\r\n tax: PropTypes.number.isRequired,\r\n classes: PropTypes.shape({ text: PropTypes.string }).isRequired,\r\n effectiveTaxRate: PropTypes.number.isRequired,\r\n showTax: PropTypes.bool.isRequired,\r\n};\r\n\r\nconst TaxTrend = () => {\r\n const classes = useStyles();\r\n const calculations = useSelector(({ taxCast }) => taxCast.calculations);\r\n const [toggleShowTaxAmount, setToggleShowTaxAmount] = useState(true);\r\n\r\n const handleToggleShowTaxAmountClick = () => {\r\n setToggleShowTaxAmount(!toggleShowTaxAmount);\r\n };\r\n\r\n if (!calculations) return null;\r\n\r\n return (\r\n \r\n \r\n \r\n Tax Trend\r\n \r\n \r\n \r\n {toggleShowTaxAmount && }\r\n {!toggleShowTaxAmount && }\r\n \r\n \r\n \r\n\r\n \r\n {Object.keys(calculations).map((key) => (\r\n \r\n ))}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default TaxTrend;\r\n","import React from 'react';\r\nimport { Button, Grid, Paper, makeStyles } from '@material-ui/core';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { RUN_CALCULATIONS } from 'store/asyncActions/taxCast';\r\nimport ClientShortProfile from './ClientShortProfile';\r\nimport TaxTrend from './TaxTrend';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: { height: '100%', padding: theme.spacing(2) },\r\n}));\r\n\r\nconst TrendRibbon = () => {\r\n const classes = useStyles();\r\n const dispatch = useDispatch();\r\n const clientProfileId = useSelector(({ taxCast }) => taxCast.client.id);\r\n const forecastId = useSelector(({ taxCast }) => taxCast.forecast.id);\r\n const isRunningCalculations = useSelector(\r\n ({ taxCast }) => taxCast.isRunningCalculations\r\n );\r\n const advisorId = useSelector(({ auth }) => auth.account.id);\r\n\r\n const handleCalculateClick = () => {\r\n dispatch(RUN_CALCULATIONS({ clientProfileId, forecastId, advisorId }));\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {isRunningCalculations ? 'Running' : 'Calculate'}\r\n \r\n \r\n {/* \r\n Scenario\r\n \r\n Basic Scenario\r\n \r\n */}\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default TrendRibbon;\r\n","/* eslint-disable import/prefer-default-export */\nexport const charitableContributionTypesDisplayMap = {\n cash: 'Cash',\n conservationEasementFarmerRancher: 'Conservation Easement: Farmer/Rancher',\n conservationEasement: 'Conservation Easement',\n propertyDepreciatedFairMarketValue: 'Property - Depreciated (FMV)',\n propertyShortTermAppreciationBasis:\n 'Property with Short-term Appreciation (Basis)',\n propertyShortTermAppreciationFairMarketValue:\n 'Property with Long-term Appreciation (FMV)',\n propertyLongTermAppreciationBasis:\n 'Property with Long-term Appreciation (Basis)',\n};\n\nexport const charitableContributionTypes = {\n cash: 'cash',\n conservationEasementFarmerRancher: 'conservationEasementFarmerRancher',\n conservationEasement: 'conservationEasement',\n propertyDepreciatedFairMarketValue: 'propertyDepreciatedFairMarketValue',\n propertyShortTermAppreciationBasis: 'propertyShortTermAppreciationBasis',\n propertyShortTermAppreciationFairMarketValue:\n 'propertyShortTermAppreciationFairMarketValue',\n propertyLongTermAppreciationBasis: 'propertyLongTermAppreciationBasis',\n};\n","/* eslint max-lines: [2, {\"max\": 230, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React from 'react';\r\nimport { Grid, Typography, makeStyles } from '@material-ui/core';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { currencyFormatter } from 'lib/utils/format';\r\nimport {\r\n categoryDisplayMap,\r\n subcategoryDisplayMap,\r\n} from 'constants/categories';\r\nimport { charitableContributionTypesDisplayMap } from 'constants/charitableContributionTypes';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n leftPanel: {\r\n backgroundColor: theme.palette.background.default,\r\n padding: theme.spacing(2),\r\n position: 'relative',\r\n },\r\n category: {\r\n paddingTop: theme.spacing(2),\r\n },\r\n subcategory: {\r\n paddingLeft: theme.spacing(1),\r\n fontWeight: 'bold',\r\n [theme.breakpoints.down('xs')]: {\r\n paddingTop: theme.spacing(2),\r\n },\r\n },\r\n}));\r\n\r\nconst TransactionInfoPanel = ({ mode, transaction }) => {\r\n const classes = useStyles();\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n {mode} Transaction\r\n \r\n \r\n\r\n {mode === 'Duplicate' && (\r\n <>\r\n \r\n Name\r\n \r\n \r\n {transaction.name}\r\n \r\n \r\n )}\r\n\r\n {mode === 'Duplicate' && (\r\n <>\r\n \r\n Value\r\n \r\n \r\n \r\n {currencyFormatter.format(transaction.value)}\r\n \r\n \r\n \r\n )}\r\n\r\n \r\n TaxYear\r\n \r\n \r\n {transaction.taxYear}\r\n \r\n\r\n \r\n Category\r\n \r\n \r\n {categoryDisplayMap[transaction.category]}\r\n \r\n\r\n \r\n Sub-Category\r\n \r\n \r\n \r\n {subcategoryDisplayMap[transaction.subcategory]}\r\n \r\n \r\n\r\n {mode === 'Duplicate' &&\r\n transaction.subcategory === 'charitableContribution' && (\r\n <>\r\n \r\n \r\n Charitable Contribution Type\r\n \r\n \r\n \r\n \r\n {\r\n charitableContributionTypesDisplayMap[\r\n transaction.charitableContributionTypeValue\r\n ]\r\n }\r\n \r\n \r\n \r\n )}\r\n\r\n {mode === 'Duplicate' &&\r\n transaction.subcategory === 'longTermCapitalGains' && (\r\n <>\r\n \r\n Sale Price\r\n \r\n \r\n \r\n {currencyFormatter.format(transaction.salePrice)}\r\n \r\n \r\n \r\n Sale Price\r\n \r\n \r\n \r\n {currencyFormatter.format(transaction.basisAmount)}\r\n \r\n \r\n \r\n Sale Price\r\n \r\n \r\n \r\n {currencyFormatter.format(\r\n transaction.salePrice - transaction.basisAmount\r\n )}\r\n \r\n \r\n \r\n )}\r\n\r\n {mode === 'Duplicate' &&\r\n (transaction.subcategory === 'soleProprietorshipIncome' ||\r\n transaction.subcategory === 'sCorpDistributions') && (\r\n <>\r\n \r\n \r\n Qualified Business Income\r\n \r\n \r\n \r\n \r\n {transaction.isQualifiedBusinessIncome ? 'Yes' : 'No'}\r\n \r\n \r\n \r\n \r\n Specified Service Trade or Business\r\n \r\n \r\n \r\n \r\n {transaction.isSpecifiedServiceOrTradeBusiness ? 'Yes' : 'No'}\r\n \r\n \r\n \r\n \r\n W2 Wages Paid By Business\r\n \r\n \r\n \r\n \r\n {currencyFormatter.format(transaction.w2WagesPaidByBusiness)}\r\n \r\n \r\n \r\n \r\n Qualified Property Owned by Business\r\n \r\n \r\n \r\n \r\n {currencyFormatter.format(\r\n transaction.qualifiedPropertyAmountOwnedByBusiness\r\n )}\r\n \r\n \r\n \r\n )}\r\n\r\n {mode === 'Duplicate' &&\r\n transaction.subcategory === 'nonQualifiedDividends' && (\r\n <>\r\n \r\n \r\n Section 199A REIT Dividend\r\n \r\n \r\n \r\n \r\n {transaction.isSection199AReitDividend ? 'Yes' : 'No'}\r\n \r\n \r\n \r\n )}\r\n\r\n {mode === 'Duplicate' && (\r\n <>\r\n \r\n Notes\r\n \r\n \r\n {transaction.notes}\r\n \r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nTransactionInfoPanel.propTypes = {\r\n mode: PropTypes.string.isRequired,\r\n transaction: PropTypes.shape({\r\n name: PropTypes.string,\r\n value: PropTypes.string,\r\n taxYear: PropTypes.string.isRequired,\r\n category: PropTypes.string.isRequired,\r\n subcategory: PropTypes.string.isRequired,\r\n notes: PropTypes.string,\r\n charitableContributionTypeValue: PropTypes.string,\r\n salePrice: PropTypes.number,\r\n basisAmount: PropTypes.number,\r\n isQualifiedBusinessIncome: PropTypes.bool,\r\n isSpecifiedServiceOrTradeBusiness: PropTypes.bool,\r\n w2WagesPaidByBusiness: PropTypes.number,\r\n qualifiedPropertyAmountOwnedByBusiness: PropTypes.number,\r\n isSection199AReitDividend: PropTypes.bool,\r\n }),\r\n};\r\n\r\nTransactionInfoPanel.defaultProps = {\r\n transaction: {},\r\n};\r\n\r\nexport default TransactionInfoPanel;\r\n","/* eslint max-lines: [2, {\"max\": 175, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useState } from 'react';\r\nimport {\r\n FormControlLabel,\r\n Grid,\r\n InputAdornment,\r\n Radio,\r\n RadioGroup,\r\n TextField,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { required, validAmount } from 'lib/utils/form';\r\nimport { isNullEmptyOrBlank, isValidAmount } from 'lib/utils/validation';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n field: {\r\n minHeight: theme.spacing(11),\r\n },\r\n textArea: {\r\n marginBottom: theme.spacing(3),\r\n },\r\n capitalGainsIcons: {\r\n paddingTop: theme.spacing(3),\r\n },\r\n capitalGainsIconsSumButton: {\r\n paddingTop: theme.spacing(1),\r\n },\r\n}));\r\n\r\nconst TransactionForm = ({ transaction, onFieldUpdate, onValidate }) => {\r\n const classes = useStyles();\r\n\r\n const [isErrorName, setIsErrorName] = useState(false);\r\n const [isErrorValue, setIsErrorValue] = useState(false);\r\n\r\n const isValidForm = (name, value) => {\r\n let result = true;\r\n result = result && !isNullEmptyOrBlank(name);\r\n result = result && !isNullEmptyOrBlank(value) && isValidAmount(value);\r\n return result;\r\n };\r\n\r\n const handleInputChangeBase = (event) => {\r\n let isValid = true;\r\n if (event.target.id === 'name') {\r\n setIsErrorName(isNullEmptyOrBlank(event.target.value));\r\n isValid = isValidForm(event.target.value, transaction.value);\r\n }\r\n if (event.target.id === 'value') {\r\n setIsErrorValue(\r\n isNullEmptyOrBlank(event.target.value) ||\r\n !isValidAmount(event.target.value)\r\n );\r\n isValid = isValidForm(transaction.name, event.target.value);\r\n }\r\n onFieldUpdate(event.target.id, event.target.value);\r\n onValidate(isValid);\r\n };\r\n\r\n const handleFilerSpouseRadioGroupChange = (event) => {\r\n onFieldUpdate('associatedWith', event.target.value);\r\n };\r\n\r\n return (\r\n <>\r\n \r\n \r\n }\r\n label='Taxpayer'\r\n labelPlacement='start'\r\n color='primary'\r\n />\r\n }\r\n label='Spouse'\r\n labelPlacement='start'\r\n />\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n $,\r\n }}\r\n />\r\n \r\n \r\n );\r\n};\r\n\r\nTransactionForm.propTypes = {\r\n transaction: PropTypes.shape({\r\n associatedWith: PropTypes.string.isRequired,\r\n name: PropTypes.string.isRequired,\r\n value: PropTypes.string.isRequired,\r\n notes: PropTypes.string,\r\n isSpread: PropTypes.bool,\r\n }).isRequired,\r\n onFieldUpdate: PropTypes.func.isRequired,\r\n onValidate: PropTypes.func.isRequired,\r\n};\r\n\r\nTransactionForm.defaultProps = {};\r\n\r\nexport default TransactionForm;\r\n","/* eslint-disable import/prefer-default-export */\r\nimport { forEach, pickBy } from 'lodash';\r\n\r\nconst modifyByPercent = (value, amount) => {\r\n return +value * (1 + +amount / 100);\r\n};\r\n\r\nconst modifyByMultiplier = (value, amount) => {\r\n // The first year, amount will be zero.\r\n return +value * (+amount === 0 ? 1 : +amount);\r\n};\r\n\r\nconst modifyByAmount = (value, amount) => {\r\n return value + amount;\r\n};\r\n\r\nconst modifyByNoChange = (value) => {\r\n return +value;\r\n};\r\n\r\nconst getModifier = (units) => {\r\n let result;\r\n switch (units) {\r\n case 'percent':\r\n result = modifyByPercent;\r\n break;\r\n case 'times':\r\n result = modifyByMultiplier;\r\n break;\r\n case 'currency':\r\n result = modifyByAmount;\r\n break;\r\n default:\r\n result = modifyByNoChange;\r\n break;\r\n }\r\n return result;\r\n};\r\n\r\n/**\r\n *\r\n * @param {number} value The base value for the transactions;\r\n * @param {number} amount The amount by which @value is modified per year\r\n * @param {string} units The type of @amount: percent or multiplier\r\n * @param {number[]} years The years\r\n */\r\nconst distributeTransaction = (\r\n transactionValue,\r\n transactionTaxYear,\r\n amount,\r\n units,\r\n years\r\n) => {\r\n const result = { ...years };\r\n const modifier = getModifier(units);\r\n let previousYearValue = Number(transactionValue);\r\n forEach(Object.keys(years), (year) => {\r\n if (years[year].selected) {\r\n let currentYearValue = previousYearValue;\r\n if (year > transactionTaxYear) {\r\n currentYearValue = Math.round(modifier(previousYearValue, amount));\r\n }\r\n result[year].value = currentYearValue;\r\n previousYearValue = currentYearValue;\r\n } else {\r\n result[year].value = 0;\r\n }\r\n });\r\n return result;\r\n};\r\n\r\nconst splitTransaction = (transactionValue, years) => {\r\n const result = { ...years };\r\n // Evenly distribute the value over the number of years.\r\n const selectedYears = pickBy(years, (year) => year.selected === true);\r\n const yearlyValue = Math.round(\r\n Number(transactionValue) / Object.keys(selectedYears).length\r\n );\r\n forEach(Object.keys(years), (year) => {\r\n result[year].value = years[year].selected ? yearlyValue : 0;\r\n });\r\n return result;\r\n};\r\n\r\nexport const spreadTransaction = (\r\n transactionValue,\r\n transactionTaxYear,\r\n years,\r\n spreadByAmount,\r\n spreadByUnits\r\n) => {\r\n if (spreadByUnits === 'split') {\r\n return splitTransaction(transactionValue, years);\r\n }\r\n return distributeTransaction(\r\n transactionValue,\r\n transactionTaxYear,\r\n +spreadByAmount,\r\n spreadByUnits,\r\n years\r\n );\r\n};\r\n","/* eslint max-lines: [2, {\"max\": 400, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useEffect, useState } from 'react';\r\nimport {\r\n Button,\r\n Checkbox,\r\n FormControl,\r\n FormControlLabel,\r\n Grid,\r\n InputAdornment,\r\n InputLabel,\r\n MenuItem,\r\n Select,\r\n Switch,\r\n TextField,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { forEach, pickBy } from 'lodash';\r\nimport { spreadTransaction } from 'lib/utils/transactionSpreader';\r\nimport { validAmount } from 'lib/utils/form';\r\nimport { isNullEmptyOrBlank, isValidAmount } from 'lib/utils/validation';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n button: {\r\n [theme.breakpoints.up('sm')]: {\r\n minWidth: theme.spacing(1),\r\n },\r\n },\r\n spreadField: {},\r\n}));\r\n\r\nconst SpreadTransactionForm = ({\r\n mode,\r\n value,\r\n taxYear,\r\n forecastYearList,\r\n onIsSpreadUpdate,\r\n onSpreadDataUpdate,\r\n onValidate,\r\n}) => {\r\n const classes = useStyles();\r\n const [showSpread, setShowSpread] = useState(mode === 'Duplicate');\r\n const [selectAllNone, setSelectAllNone] = useState(\r\n mode === 'Duplicate' ? 'All' : 'None'\r\n );\r\n const [spreadByAmount, setSpreadByAmount] = useState(1);\r\n const [isErrorSpreadByAmount, setIsErrorSpreadByAmount] = useState(false);\r\n const [spreadByUnits, setSpreadByUnits] = useState('times');\r\n const [isApplySpreadEnabled, setIsApplySpreadEnabled] = useState(true);\r\n /* spreadData structure:\r\n {\r\n : { selected: , value: , displaySequence: , error: }, \r\n 2024: { selected: true, value: '', displaySequence: -1, error: false },\r\n 2025: { selected: true, value: 1100, displaySequence: -1, error: true }\r\n }\r\n */\r\n const [spreadData, setSpreadData] = useState();\r\n\r\n useEffect(() => {\r\n const updatingSpreadData = {};\r\n forEach(forecastYearList, (year) => {\r\n if (year >= new Date().getFullYear()) {\r\n updatingSpreadData[year] = {\r\n selected: year >= taxYear && showSpread,\r\n value: '',\r\n displaySequence: -1,\r\n error: false,\r\n };\r\n }\r\n });\r\n setSpreadData({ ...updatingSpreadData });\r\n }, [taxYear, forecastYearList, showSpread]);\r\n\r\n const validateFormSpread = (newSpreadData) => {\r\n let isValid = true;\r\n if (newSpreadData) {\r\n forEach(Object.keys(newSpreadData), (year) => {\r\n if (newSpreadData[year].selected) {\r\n isValid =\r\n isValid &&\r\n !isNullEmptyOrBlank(newSpreadData[year].value) &&\r\n isValidAmount(newSpreadData[year].value);\r\n }\r\n });\r\n }\r\n onValidate(isValid);\r\n };\r\n\r\n const updateOverallSelectionState = (spreadDataState) => {\r\n let newSelectionState = 'Some';\r\n // Separate the selected items.\r\n const selectedItems = pickBy(spreadDataState, (item) => item.selected);\r\n if (Object.keys(selectedItems).length === 0) newSelectionState = 'None';\r\n if (\r\n Object.keys(selectedItems).length === Object.keys(spreadDataState).length\r\n )\r\n newSelectionState = 'All';\r\n setSelectAllNone(newSelectionState);\r\n };\r\n\r\n const handleSpreadSwitchChange = () => {\r\n const willShowSpread = !showSpread;\r\n const updatingSpreadData = {};\r\n forEach(forecastYearList, (year) => {\r\n if (year >= new Date().getFullYear()) {\r\n updatingSpreadData[year] = {\r\n selected: year >= taxYear && willShowSpread,\r\n value: '',\r\n displaySequence: -1,\r\n error: false,\r\n };\r\n }\r\n });\r\n setSpreadData({ ...updatingSpreadData });\r\n updateOverallSelectionState(updatingSpreadData);\r\n setShowSpread(!showSpread);\r\n onIsSpreadUpdate(!showSpread);\r\n onSpreadDataUpdate(updatingSpreadData);\r\n validateFormSpread(updatingSpreadData);\r\n };\r\n\r\n const handleSpreadByAmountInputChange = (event) => {\r\n setSpreadByAmount(event.target.value);\r\n setIsErrorSpreadByAmount(\r\n !Number(event.target.value) && spreadByUnits !== 'split'\r\n );\r\n setIsApplySpreadEnabled(\r\n Number(event.target.value) || spreadByUnits === 'split'\r\n );\r\n validateFormSpread(spreadData);\r\n };\r\n\r\n const handleSpreadByUnitsChange = (event) => {\r\n setSpreadByUnits(event.target.value);\r\n setSpreadByAmount(event.target.value === 'split' ? '' : spreadByAmount);\r\n setIsErrorSpreadByAmount(\r\n !Number(spreadByAmount) && spreadByUnits !== 'split'\r\n );\r\n const updatingSpreadData = { ...spreadData };\r\n forEach(forecastYearList, (year) => {\r\n if (year >= new Date().getFullYear()) {\r\n updatingSpreadData[year].value = '';\r\n }\r\n });\r\n setSpreadData({ ...updatingSpreadData });\r\n onSpreadDataUpdate(updatingSpreadData);\r\n validateFormSpread(spreadData);\r\n };\r\n\r\n const toggleSelectAllNone = () => {\r\n const nextState = selectAllNone === 'All' ? 'None' : 'All';\r\n const updatingSpreadData = { ...spreadData };\r\n forEach(forecastYearList, (year) => {\r\n if (year >= new Date().getFullYear()) {\r\n updatingSpreadData[year].selected = nextState === 'All';\r\n }\r\n });\r\n setSpreadData({ ...updatingSpreadData });\r\n setSelectAllNone(nextState);\r\n onSpreadDataUpdate(updatingSpreadData);\r\n validateFormSpread(updatingSpreadData);\r\n };\r\n\r\n const handleResetSpread = () => {\r\n const updatingSpreadData = { ...spreadData };\r\n forEach(forecastYearList, (year) => {\r\n if (year >= new Date().getFullYear()) {\r\n updatingSpreadData[year] = {\r\n ...spreadData[year],\r\n selected: year >= taxYear,\r\n value: '',\r\n displaySequence: -1,\r\n };\r\n }\r\n });\r\n setSpreadData(updatingSpreadData);\r\n updateOverallSelectionState(updatingSpreadData);\r\n setSpreadByAmount(1);\r\n setSpreadByUnits('times');\r\n setIsApplySpreadEnabled(true);\r\n onSpreadDataUpdate(updatingSpreadData);\r\n validateFormSpread(updatingSpreadData);\r\n };\r\n\r\n const handleApplySpread = () => {\r\n if (spreadByUnits === 'split' || Number(spreadByAmount)) {\r\n const result = spreadTransaction(\r\n value,\r\n taxYear,\r\n spreadData,\r\n spreadByAmount,\r\n spreadByUnits\r\n );\r\n const updatingSpreadData = { ...spreadData };\r\n forEach(forecastYearList, (year) => {\r\n if (year >= new Date().getFullYear()) {\r\n updatingSpreadData[year].value = result[year].value;\r\n }\r\n });\r\n onSpreadDataUpdate(updatingSpreadData);\r\n validateFormSpread(updatingSpreadData);\r\n }\r\n };\r\n\r\n const toggleSingleYear = (event) => {\r\n const year = event.target.id.replace('spreadCheckbox', '');\r\n const updatingSpreadData = { ...spreadData };\r\n updatingSpreadData[year].selected = !spreadData[year].selected;\r\n updatingSpreadData[year].value = spreadData[year].selected\r\n ? spreadData[year].value\r\n : '';\r\n updatingSpreadData[year].error =\r\n updatingSpreadData[year].selected &&\r\n !isValidAmount(updatingSpreadData[year].value);\r\n setSpreadData({ ...updatingSpreadData });\r\n updateOverallSelectionState(updatingSpreadData);\r\n onSpreadDataUpdate(updatingSpreadData);\r\n validateFormSpread(updatingSpreadData);\r\n };\r\n\r\n const handleYearlyAmountInputChange = (event) => {\r\n const year = event.target.id.replace('amount', '');\r\n const updatingSpreadData = { ...spreadData };\r\n updatingSpreadData[year].value = event.target.value;\r\n setSpreadData({ ...updatingSpreadData });\r\n onSpreadDataUpdate(updatingSpreadData);\r\n validateFormSpread(updatingSpreadData);\r\n updatingSpreadData[year].error =\r\n spreadData[year].selected && !Number(spreadData[year].value);\r\n };\r\n\r\n const handleYearlyAmountInputBlur = (event) => {\r\n const year = event.target.id.replace('amount', '');\r\n const updatingSpreadData = { ...spreadData };\r\n // If the user departs an amount field and the value is either:\r\n // !provided || 0 -> deselect the associated year. The inverse case is\r\n // handled as the amount field is disabled year's checkbox is unchecked.\r\n if (\r\n isNullEmptyOrBlank(event.target.value) ||\r\n Number(event.target.value) === 0\r\n ) {\r\n updatingSpreadData[year].selected = false;\r\n } else {\r\n updatingSpreadData[year].value = event.target.value;\r\n }\r\n updatingSpreadData[year].error =\r\n spreadData[year].selected &&\r\n !isValidAmount(\r\n spreadData[year].value || isNullEmptyOrBlank(spreadData[year].value)\r\n );\r\n updateOverallSelectionState(updatingSpreadData);\r\n setSpreadData({ ...updatingSpreadData });\r\n onSpreadDataUpdate(updatingSpreadData);\r\n validateFormSpread(updatingSpreadData);\r\n };\r\n\r\n if (!spreadData) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n {mode === 'New' && (\r\n \r\n \r\n }\r\n label='Duplicate'\r\n />\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n Units(s)\r\n \r\n \r\n Dollars ($)\r\n \r\n \r\n Percent (%)\r\n \r\n \r\n Times (*)\r\n \r\n \r\n Split Evenly\r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n label={selectAllNone}\r\n />\r\n \r\n \r\n \r\n Reset\r\n \r\n  \r\n \r\n Apply\r\n \r\n \r\n {/* \r\n \r\n Apply\r\n \r\n */}\r\n {forecastYearList.map(\r\n (year) =>\r\n year >= new Date().getFullYear() && (\r\n \r\n \r\n \r\n }\r\n label={year}\r\n />\r\n \r\n \r\n $\r\n ),\r\n }}\r\n />\r\n \r\n \r\n )\r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nSpreadTransactionForm.propTypes = {\r\n mode: PropTypes.string.isRequired,\r\n value: PropTypes.number.isRequired,\r\n taxYear: PropTypes.number.isRequired,\r\n forecastYearList: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n onIsSpreadUpdate: PropTypes.func.isRequired,\r\n onSpreadDataUpdate: PropTypes.func.isRequired,\r\n onValidate: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default SpreadTransactionForm;\r\n","import React from 'react';\r\nimport { Grid, Typography, makeStyles } from '@material-ui/core';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n field: {\r\n minHeight: theme.spacing(3),\r\n marginBottom: theme.spacing(3),\r\n },\r\n}));\r\n\r\nconst AlimonyStatement = () => {\r\n const classes = useStyles();\r\n\r\n return (\r\n \r\n \r\n Alimony can only be deducted on divorces before 2019.\r\n \r\n \r\n );\r\n};\r\n\r\nexport default AlimonyStatement;\r\n","import React, { useEffect, useState } from 'react';\r\nimport {\r\n FormControl,\r\n Grid,\r\n InputLabel,\r\n MenuItem,\r\n Select,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { charitableContributionTypesDisplayMap } from 'constants/charitableContributionTypes';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n field: {\r\n minHeight: theme.spacing(3),\r\n marginBottom: theme.spacing(3),\r\n },\r\n}));\r\n\r\nconst CharitableContributionTypeForm = ({ contributionType, onDataUpdate }) => {\r\n const classes = useStyles();\r\n const [data, setData] = useState({\r\n charitableContributionTypeValue: contributionType,\r\n });\r\n\r\n useEffect(() => {\r\n onDataUpdate(data);\r\n }, [data, onDataUpdate]);\r\n\r\n const handleCharitableContributionTypeChange = (event) => {\r\n setData({ charitableContributionTypeValue: event.target.value });\r\n onDataUpdate({ charitableContributionTypeValue: event.target.value });\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n Charitable Contribution Type\r\n \r\n \r\n {Object.keys(charitableContributionTypesDisplayMap).map((item) => (\r\n \r\n {charitableContributionTypesDisplayMap[item]}\r\n \r\n ))}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nCharitableContributionTypeForm.propTypes = {\r\n contributionType: PropTypes.string,\r\n onDataUpdate: PropTypes.func.isRequired,\r\n};\r\n\r\nCharitableContributionTypeForm.defaultProps = {\r\n contributionType: 'cash',\r\n};\r\n\r\nexport default CharitableContributionTypeForm;\r\n","import React, { useEffect, useState } from 'react';\r\nimport {\r\n Grid,\r\n InputAdornment,\r\n TextField,\r\n Typography,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { validAmount } from 'lib/utils/form';\r\nimport { isNullEmptyOrBlank, isValidAmount } from 'lib/utils/validation';\r\nimport { currencyFormatter } from 'lib/utils/format';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n field: {\r\n minHeight: theme.spacing(3),\r\n marginBottom: theme.spacing(3),\r\n },\r\n}));\r\n\r\nconst LongTermCapitalGainsForm = ({\r\n salePrice,\r\n basisAmount,\r\n onDataUpdate,\r\n onValidate,\r\n}) => {\r\n const classes = useStyles();\r\n const [computedValue, setComputedValue] = useState('');\r\n const [isErrorBasisAmount, setIsErrorBasisAmount] = useState(false);\r\n const [isErrorSalePrice, setIsErrorSalePrice] = useState(false);\r\n const [data, setData] = useState({\r\n salePrice,\r\n basisAmount,\r\n });\r\n\r\n useEffect(() => {\r\n onDataUpdate(data);\r\n setComputedValue(data.salePrice - data.basisAmount);\r\n }, [data, onDataUpdate, computedValue]);\r\n\r\n const handleInputChangeLongTermCapitalGains = (event) => {\r\n if (event.target.id === 'salePrice') {\r\n setIsErrorSalePrice(\r\n isNullEmptyOrBlank(event.target.value) ||\r\n !isValidAmount(event.target.value)\r\n );\r\n }\r\n if (event.target.id === 'basisAmount') {\r\n setIsErrorBasisAmount(\r\n isNullEmptyOrBlank(event.target.value) ||\r\n !isValidAmount(event.target.value)\r\n );\r\n }\r\n const newData = { ...data };\r\n newData[event.target.name] = +event.target.value;\r\n setData(newData);\r\n onDataUpdate(newData);\r\n const isValidForm =\r\n !isNullEmptyOrBlank(newData.salePrice) &&\r\n isValidAmount(newData.salePrice) &&\r\n !isNullEmptyOrBlank(newData.basisAmount) &&\r\n isValidAmount(newData.basisAmount);\r\n onValidate(isValidForm);\r\n setComputedValue(\r\n isValidForm ? newData.salePrice - newData.basisAmount : ''\r\n );\r\n };\r\n\r\n return (\r\n <>\r\n \r\n $,\r\n }}\r\n />\r\n \r\n \r\n $,\r\n }}\r\n />\r\n \r\n \r\n \r\n Computed Transaction Value: {currencyFormatter.format(computedValue)}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nLongTermCapitalGainsForm.propTypes = {\r\n salePrice: PropTypes.number.isRequired,\r\n basisAmount: PropTypes.number.isRequired,\r\n onDataUpdate: PropTypes.func.isRequired,\r\n onValidate: PropTypes.func.isRequired,\r\n};\r\n\r\nLongTermCapitalGainsForm.defaultProps = {};\r\n\r\nexport default LongTermCapitalGainsForm;\r\n","import React, { useEffect, useState } from 'react';\r\nimport {\r\n Checkbox,\r\n FormControlLabel,\r\n Grid,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport PropTypes from 'prop-types';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n field: {\r\n minHeight: theme.spacing(3),\r\n marginBottom: theme.spacing(3),\r\n },\r\n}));\r\n\r\nconst NonQualifiedDividendForm = ({ isSection199a, onDataUpdate }) => {\r\n const classes = useStyles();\r\n const [data, setData] = useState({\r\n isSection199AReitDividend: isSection199a,\r\n });\r\n\r\n useEffect(() => {\r\n onDataUpdate(data);\r\n }, [data, onDataUpdate]);\r\n\r\n const handleInputChangeSection199a = (event) => {\r\n setData({ isSection199AReitDividend: event.target.checked });\r\n onDataUpdate({ isSection199AReitDividend: event.target.checked });\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n }\r\n label='Section 199A REIT Dividend'\r\n />\r\n \r\n \r\n );\r\n};\r\n\r\nNonQualifiedDividendForm.propTypes = {\r\n isSection199a: PropTypes.bool,\r\n onDataUpdate: PropTypes.func.isRequired,\r\n};\r\n\r\nNonQualifiedDividendForm.defaultProps = {\r\n isSection199a: false,\r\n};\r\n\r\nexport default NonQualifiedDividendForm;\r\n","/* eslint max-lines: [2, {\"max\": 200, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useEffect, useState } from 'react';\r\nimport {\r\n Checkbox,\r\n FormControlLabel,\r\n Grid,\r\n InputAdornment,\r\n TextField,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { validAmount } from 'lib/utils/form';\r\nimport { isNullEmptyOrBlank, isValidAmount } from 'lib/utils/validation';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n field: {\r\n minHeight: theme.spacing(3),\r\n marginBottom: theme.spacing(3),\r\n },\r\n}));\r\n\r\nconst QbidForm = ({\r\n isQbi,\r\n isSstb,\r\n w2WagesPaid,\r\n qualifiedProperty,\r\n onDataUpdate,\r\n onValidate,\r\n}) => {\r\n const classes = useStyles();\r\n const [isErrorW2Wages, setIsErrorW2Wages] = useState(false);\r\n const [isErrorQualifiedProperty, setIsErrorQualifiedProperty] = useState(\r\n false\r\n );\r\n const [data, setData] = useState({\r\n isQualifiedBusinessIncome: isQbi,\r\n isSpecifiedServiceOrTradeBusiness: isSstb,\r\n w2WagesPaidByBusiness: w2WagesPaid,\r\n qualifiedPropertyAmountOwnedByBusiness: qualifiedProperty,\r\n });\r\n\r\n useEffect(() => {\r\n onDataUpdate(data);\r\n }, [data, onDataUpdate]);\r\n\r\n const isValidForm = (dataToValidate) => {\r\n let result = true;\r\n if (dataToValidate.isQualifiedBusinessIncome) {\r\n result =\r\n result &&\r\n isValidAmount(dataToValidate.w2WagesPaidByBusiness) &&\r\n !isNullEmptyOrBlank(dataToValidate.w2WagesPaidByBusiness);\r\n result =\r\n result &&\r\n isValidAmount(dataToValidate.qualifiedPropertyAmountOwnedByBusiness) &&\r\n !isNullEmptyOrBlank(\r\n dataToValidate.qualifiedPropertyAmountOwnedByBusiness\r\n );\r\n }\r\n return result;\r\n };\r\n\r\n const handleInputChangeQbid = (event) => {\r\n const newData = { ...data };\r\n switch (event.target.name) {\r\n case 'isQbi':\r\n newData.isQualifiedBusinessIncome = event.target.checked;\r\n newData.isSpecifiedServiceOrTradeBusiness = event.target.checked\r\n ? data.isSpecifiedServiceOrTradeBusiness\r\n : false;\r\n if (!event.target.checked) {\r\n setIsErrorW2Wages(false);\r\n setIsErrorQualifiedProperty(false);\r\n }\r\n setData({\r\n ...data,\r\n isQualifiedBusinessIncome: event.target.checked,\r\n isSpecifiedServiceOrTradeBusiness: event.target.checked\r\n ? data.isSpecifiedServiceOrTradeBusiness\r\n : false,\r\n });\r\n break;\r\n case 'isSstb':\r\n newData.isSpecifiedServiceOrTradeBusiness = event.target.checked;\r\n break;\r\n case 'w2WagesPaidByBusiness':\r\n newData.w2WagesPaidByBusiness = event.target.value;\r\n setIsErrorW2Wages(\r\n !isValidAmount(event.target.value) ||\r\n isNullEmptyOrBlank(event.target.value)\r\n );\r\n break;\r\n case 'qualifiedPropertyOwnedByBusiness':\r\n newData.qualifiedPropertyAmountOwnedByBusiness = event.target.value;\r\n setIsErrorQualifiedProperty(\r\n !isValidAmount(event.target.value) ||\r\n isNullEmptyOrBlank(event.target.value)\r\n );\r\n break;\r\n default:\r\n break;\r\n }\r\n setData(newData);\r\n onDataUpdate(newData);\r\n onValidate(isValidForm(newData));\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n }\r\n label='Qualified Business Income'\r\n />\r\n \r\n \r\n \r\n }\r\n label='Specified Service Trade or Business'\r\n />\r\n \r\n \r\n $,\r\n }}\r\n />\r\n \r\n \r\n $,\r\n }}\r\n />\r\n \r\n \r\n );\r\n};\r\n\r\nQbidForm.propTypes = {\r\n isQbi: PropTypes.bool,\r\n isSstb: PropTypes.bool,\r\n w2WagesPaid: PropTypes.number,\r\n qualifiedProperty: PropTypes.number,\r\n onDataUpdate: PropTypes.func.isRequired,\r\n onValidate: PropTypes.func.isRequired,\r\n};\r\n\r\nQbidForm.defaultProps = {\r\n isQbi: false,\r\n isSstb: PropTypes.bool,\r\n w2WagesPaid: 0,\r\n qualifiedProperty: 0,\r\n};\r\n\r\nexport default QbidForm;\r\n","/* eslint max-lines: [2, {\"max\": 300, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useState } from 'react';\r\nimport {\r\n Button,\r\n Dialog,\r\n DialogActions,\r\n DialogContent,\r\n Grid,\r\n TextField,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\n\r\nimport { forEach, pickBy } from 'lodash';\r\n\r\nimport {\r\n NEW_TRANSACTION,\r\n NEW_TRANSACTION_DIALOG,\r\n} from 'store/asyncActions/taxCast';\r\n\r\nimport { isValidAmount } from 'lib/utils/validation';\r\n\r\nimport TransactionInfoPanel from './components/TransactionInfoPanel';\r\nimport TransactionForm from './components/TransactionForm';\r\nimport SpreadTransactionForm from './components/SpreadTransactionForm';\r\nimport AlimonyStatement from './components/AlimonyStatement';\r\nimport CharitableContributionTypeForm from './components/CharitableContributionTypeForm';\r\nimport LongTermCapitalGainsForm from './components/LongTermCapitalGainsForm';\r\nimport NonQualifiedDividendForm from './components/NonQualifiedDividendForm';\r\nimport QbidForm from './components/QbidForm';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n leftPanel: {\r\n backgroundColor: theme.palette.background.default,\r\n padding: theme.spacing(2),\r\n position: 'relative',\r\n },\r\n category: {\r\n paddingTop: theme.spacing(2),\r\n },\r\n subcategory: {\r\n paddingLeft: theme.spacing(1),\r\n fontWeight: 'bold',\r\n [theme.breakpoints.down('xs')]: {\r\n paddingTop: theme.spacing(2),\r\n },\r\n },\r\n button: {\r\n [theme.breakpoints.up('sm')]: {\r\n minWidth: theme.spacing(13),\r\n },\r\n },\r\n}));\r\n\r\nconst NewTransactionDialog = () => {\r\n const dispatch = useDispatch();\r\n const classes = useStyles();\r\n\r\n const transaction = useSelector(\r\n ({ taxCast }) => taxCast.newTransactionDialog\r\n );\r\n const isSubmitting = useSelector(({ taxCast }) => taxCast.isSubmitting);\r\n const forecast = useSelector(({ taxCast }) => taxCast.forecast);\r\n\r\n const [isValidBase, setIsValidBase] = useState(true);\r\n const [isValidExtended, setIsValidExtended] = useState(true);\r\n const [isValidSpread, setIsValidSpread] = useState(true);\r\n const [isSaveEnabled, setIsSaveEnabled] = useState(false);\r\n\r\n // All new transactions are 'spreadable', thus the nomenclature.\r\n const [spreadableTransaction, setSpreadableTransaction] = useState({\r\n associatedWith: 'Filer',\r\n name: '',\r\n value: '',\r\n notes: '',\r\n isSpread: true,\r\n });\r\n // Extended form data will vary based on subcategory.\r\n const [extendedData, setExtendedData] = useState({});\r\n /* spreadData structure:\r\n {\r\n : { selected: , value: , displaySequence: , error: }, \r\n 2024: { selected: true, value: '', displaySequence: -1, error: false },\r\n 2025: { selected: true, value: 1100, displaySequence: -1, error: true }\r\n }\r\n */\r\n const [spreadData, setSpreadData] = useState({});\r\n\r\n const handleInputChangeNotes = (event) => {\r\n setSpreadableTransaction({\r\n ...spreadableTransaction,\r\n notes: event.target.value,\r\n });\r\n };\r\n\r\n const handleCancel = () => {\r\n setIsValidBase(true);\r\n setIsValidExtended(true);\r\n setIsValidSpread(true);\r\n setIsSaveEnabled(false);\r\n setSpreadableTransaction({\r\n associatedWith: 'Filer',\r\n name: '',\r\n value: '',\r\n notes: '',\r\n isSpread: false,\r\n });\r\n setExtendedData({});\r\n setSpreadData({});\r\n dispatch(NEW_TRANSACTION_DIALOG(null));\r\n };\r\n\r\n const handleSubmit = () => {\r\n if (isValidBase && isValidExtended && isValidSpread) {\r\n // Structure the data for submission.\r\n // 'transaction' contains toolbox info such as category and tax year.\r\n // 'spreadableTransaction' contains user input from the form.\r\n // 'spreadData' contains the spread information.\r\n // 'extendedData' contains extended form input.\r\n const selectedItems = pickBy(\r\n spreadData,\r\n (item) => item.selected && isValidAmount(item.value)\r\n );\r\n const spreadIsUsed = Object.keys(selectedItems).length > 0;\r\n\r\n const newTransaction = {\r\n ...transaction,\r\n ...spreadableTransaction,\r\n ...extendedData,\r\n isSpread: spreadableTransaction.isSpread && spreadIsUsed,\r\n };\r\n // Add all new transactions to the end of the row.\r\n if (spreadableTransaction.isSpread && spreadIsUsed) {\r\n newTransaction.spreadData = { ...selectedItems };\r\n const nowYear = new Date().getFullYear();\r\n forEach(forecast.yearList, (year) => {\r\n if (year >= nowYear && newTransaction.spreadData[year]) {\r\n newTransaction.spreadData[year].displaySequence =\r\n forecast.years[year][transaction.category].length;\r\n }\r\n });\r\n }\r\n dispatch(NEW_TRANSACTION(newTransaction));\r\n handleCancel();\r\n } else {\r\n // TODO: Need to present to the user.\r\n }\r\n };\r\n\r\n // *****************\r\n // *** BASE FORM ***\r\n // *****************\r\n const handleOnValidateBase = (isValid) => {\r\n setIsValidBase(isValid);\r\n setIsSaveEnabled(isValidSpread && isValidExtended && isValid);\r\n };\r\n\r\n const handleOnFieldUpdate = (fieldName, fieldValue) => {\r\n const updatingSpreadableTransaction = { ...spreadableTransaction };\r\n updatingSpreadableTransaction[fieldName] = fieldValue;\r\n setSpreadableTransaction(updatingSpreadableTransaction);\r\n };\r\n\r\n // ************************\r\n // *** EXTENDED SUBFORM ***\r\n // ************************\r\n const handleOnValidateExtended = (isValid) => {\r\n setIsValidExtended(isValid);\r\n setIsSaveEnabled(isValidBase && isValidSpread && isValid);\r\n };\r\n\r\n // This method uses the moniker 'data' to reflect the\r\n // updating of the entire extended data object on each\r\n // change as opposed to individual field updates.\r\n const handleOnExtendedDataUpdate = (extendedFormData) => {\r\n setExtendedData(extendedFormData);\r\n };\r\n\r\n // **********************\r\n // *** SPREAD SUBFORM ***\r\n // **********************\r\n const handleOnValidateSpread = (isValid) => {\r\n setIsValidSpread(isValid);\r\n setIsSaveEnabled(isValidBase && isValidExtended && isValid);\r\n };\r\n\r\n const handleOnIsSpreadUpdate = (isTransactionSpread) => {\r\n setSpreadableTransaction({\r\n ...spreadableTransaction,\r\n isSpread: isTransactionSpread,\r\n });\r\n };\r\n\r\n const handleOnSpreadDataUpdate = (updatingSpreadData) => {\r\n setSpreadData(updatingSpreadData);\r\n };\r\n\r\n if (!transaction) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {/* Base Form */}\r\n \r\n\r\n {/* Extended Form */}\r\n {transaction.subcategory === 'alimony' && }\r\n\r\n {transaction.subcategory === 'charitableContribution' && (\r\n \r\n )}\r\n\r\n {transaction.subcategory === 'longTermCapitalGains' && (\r\n \r\n )}\r\n\r\n {(transaction.subcategory === 'soleProprietorshipIncome' ||\r\n transaction.subcategory === 'sCorpDistributions') && (\r\n \r\n )}\r\n\r\n {transaction.subcategory === 'nonQualifiedDividends' && (\r\n \r\n )}\r\n\r\n \r\n  \r\n \r\n\r\n {/* Notes */}\r\n \r\n \r\n \r\n \r\n\r\n {/* Spread Form */}\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n Cancel\r\n \r\n \r\n {isSubmitting ? 'Saving...' : 'Save'}\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default NewTransactionDialog;\r\n","/* eslint max-lines: [2, {\"max\": 300, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useEffect, useState } from 'react';\r\nimport {\r\n Button,\r\n Dialog,\r\n DialogActions,\r\n DialogContent,\r\n Grid,\r\n TextField,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\n\r\nimport { pick } from 'lodash';\r\n\r\nimport { EDIT_TRANSACTION } from 'store/asyncActions/taxCast';\r\nimport { taxCastActions } from 'store/slices/taxCast';\r\n\r\nimport TransactionInfoPanel from './components/TransactionInfoPanel';\r\nimport TransactionForm from './components/TransactionForm';\r\nimport AlimonyStatement from './components/AlimonyStatement';\r\nimport CharitableContributionTypeForm from './components/CharitableContributionTypeForm';\r\nimport LongTermCapitalGainsForm from './components/LongTermCapitalGainsForm';\r\nimport NonQualifiedDividendForm from './components/NonQualifiedDividendForm';\r\nimport QbidForm from './components/QbidForm';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n leftPanel: {\r\n backgroundColor: theme.palette.background.default,\r\n padding: theme.spacing(2),\r\n position: 'relative',\r\n },\r\n category: {\r\n paddingTop: theme.spacing(2),\r\n },\r\n subcategory: {\r\n paddingLeft: theme.spacing(1),\r\n fontWeight: 'bold',\r\n [theme.breakpoints.down('xs')]: {\r\n paddingTop: theme.spacing(2),\r\n },\r\n },\r\n button: {\r\n [theme.breakpoints.up('sm')]: {\r\n minWidth: theme.spacing(13),\r\n },\r\n },\r\n}));\r\n\r\nconst EditTransactionDialog = () => {\r\n const dispatch = useDispatch();\r\n const classes = useStyles();\r\n const transaction = useSelector(\r\n ({ taxCast }) => taxCast.editTransactionDialog\r\n );\r\n const isSubmitting = useSelector(({ taxCast }) => taxCast.isSubmitting);\r\n\r\n const [isValidBase, setIsValidBase] = useState(true);\r\n const [isValidExtended, setIsValidExtended] = useState(true);\r\n const [isSaveEnabled, setIsSaveEnabled] = useState(true);\r\n\r\n const [editableTransaction, setEditableTransaction] = useState();\r\n\r\n // Extended form data will vary based on subcategory.\r\n const [extendedData, setExtendedData] = useState();\r\n\r\n useEffect(() => {\r\n if (transaction && !editableTransaction) {\r\n setEditableTransaction({ ...transaction });\r\n }\r\n }, [transaction, editableTransaction]);\r\n\r\n useEffect(() => {\r\n if (transaction && !extendedData) {\r\n switch (transaction.subcategory) {\r\n case 'charitableContribution':\r\n setExtendedData(\r\n pick(transaction, ['charitableContributionTypeValue'])\r\n );\r\n break;\r\n case 'longTermCapitalGains':\r\n setExtendedData(pick(transaction, ['salePrice', 'basisAmount']));\r\n break;\r\n case 'soleProprietorshipIncome':\r\n case 'sCorpDistributions':\r\n setExtendedData(\r\n pick(transaction, [\r\n 'isQualifiedBusinessIncome',\r\n 'isSpecifiedServiceOrTradeBusiness',\r\n 'w2WagesPaidByBusiness',\r\n 'qualifiedPropertyAmountOwnedByBusiness',\r\n ])\r\n );\r\n break;\r\n case 'nonQualifiedDividends':\r\n setExtendedData(pick(transaction, ['isSection199AReitDividend']));\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n }, [transaction, extendedData]);\r\n\r\n const handleInputChangeNotes = (event) => {\r\n setEditableTransaction({\r\n ...editableTransaction,\r\n notes: event.target.value,\r\n });\r\n };\r\n\r\n const handleCancel = () => {\r\n setIsValidBase(true);\r\n setIsValidExtended(true);\r\n setIsSaveEnabled(true);\r\n setEditableTransaction();\r\n setExtendedData();\r\n dispatch(taxCastActions.TOGGLE_EDIT_TRANSACTION_DIALOG(null));\r\n };\r\n\r\n const handleSubmit = () => {\r\n dispatch(EDIT_TRANSACTION({ ...editableTransaction, ...extendedData }));\r\n handleCancel();\r\n };\r\n\r\n // *****************\r\n // *** BASE FORM ***\r\n // *****************\r\n const handleOnValidateBase = (isValid) => {\r\n setIsValidBase(isValid);\r\n setIsSaveEnabled(isValidExtended && isValid);\r\n };\r\n\r\n const handleOnFieldUpdate = (fieldName, fieldValue) => {\r\n const updatingeditableTransaction = { ...editableTransaction };\r\n updatingeditableTransaction[fieldName] = fieldValue;\r\n setEditableTransaction(updatingeditableTransaction);\r\n };\r\n\r\n // ************************\r\n // *** EXTENDED SUBFORM ***\r\n // ************************\r\n const handleOnValidateExtended = (isValid) => {\r\n setIsValidExtended(isValid);\r\n setIsSaveEnabled(isValidBase && isValid);\r\n };\r\n\r\n // This method uses the moniker 'data' to reflect the\r\n // updating of the entire extended data object on each\r\n // change as opposed to individual field updates.\r\n const handleOnExtendedDataUpdate = (extendedFormData) => {\r\n setExtendedData(extendedFormData);\r\n };\r\n\r\n if (!transaction || !editableTransaction) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n {/* Base Form */}\r\n \r\n\r\n {/* Extended Form */}\r\n {transaction.subcategory === 'alimony' && }\r\n\r\n {transaction.subcategory === 'charitableContribution' && (\r\n \r\n )}\r\n\r\n {transaction.subcategory === 'longTermCapitalGains' && (\r\n \r\n )}\r\n\r\n {(transaction.subcategory === 'soleProprietorshipIncome' ||\r\n transaction.subcategory === 'sCorpDistributions') && (\r\n \r\n )}\r\n\r\n {transaction.subcategory === 'nonQualifiedDividends' && (\r\n \r\n )}\r\n\r\n \r\n  \r\n \r\n\r\n {/* Notes */}\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n Cancel\r\n \r\n \r\n {isSubmitting ? 'Saving...' : 'Save'}\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default EditTransactionDialog;\r\n","import React from 'react';\r\nimport {\r\n Button,\r\n Dialog,\r\n DialogActions,\r\n DialogContent,\r\n DialogContentText,\r\n DialogTitle,\r\n Typography,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport clsx from 'clsx';\r\n\r\nimport { DELETE_TRANSACTION } from 'store/asyncActions/taxCast';\r\nimport { taxCastActions } from 'store/slices/taxCast';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n name: {\r\n marginLeft: theme.spacing(1),\r\n fontWeight: 'bold',\r\n },\r\n deleteButton: {\r\n borderColor: theme.palette.danger,\r\n color: theme.palette.danger,\r\n },\r\n button: {\r\n [theme.breakpoints.up('sm')]: {\r\n minWidth: theme.spacing(13),\r\n },\r\n },\r\n}));\r\n\r\nconst DeleteTransactionDialog = () => {\r\n const dispatch = useDispatch();\r\n const classes = useStyles();\r\n const transaction = useSelector(\r\n ({ taxCast }) => taxCast.deleteTransactionDialog\r\n );\r\n const isSubmitting = useSelector(({ taxCast }) => taxCast.isSubmitting);\r\n\r\n const closeDialog = () => {\r\n dispatch(taxCastActions.TOGGLE_DELETE_TRANSACTION_DIALOG(null));\r\n };\r\n\r\n const deleteTransaction = () => {\r\n dispatch(DELETE_TRANSACTION(transaction));\r\n };\r\n\r\n if (!transaction) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n Delete\r\n \r\n {transaction.name}\r\n \r\n \r\n\r\n \r\n \r\n Warning: This is an irreversible process. Please confirm this is what\r\n you want.\r\n \r\n \r\n\r\n \r\n \r\n {isSubmitting ? 'Deleting' : 'Delete'}\r\n \r\n \r\n Cancel\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default DeleteTransactionDialog;\r\n","/* eslint max-lines: [2, {\"max\": 200, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useState } from 'react';\r\nimport {\r\n Button,\r\n Dialog,\r\n DialogActions,\r\n DialogContent,\r\n Grid,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\n\r\nimport {\r\n NEW_TRANSACTION,\r\n SPLIT_DISTRIBUTE_TRANSACTION_DIALOG,\r\n} from 'store/asyncActions/taxCast';\r\n\r\nimport { forEach, pickBy } from 'lodash';\r\nimport { isValidAmount } from 'lib/utils/validation';\r\n\r\nimport TransactionInfoPanel from './components/TransactionInfoPanel';\r\nimport SpreadTransactionForm from './components/SpreadTransactionForm';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n leftPanel: {\r\n backgroundColor: theme.palette.background.default,\r\n padding: theme.spacing(2),\r\n position: 'relative',\r\n },\r\n category: {\r\n paddingTop: theme.spacing(2),\r\n },\r\n subcategory: {\r\n paddingLeft: theme.spacing(1),\r\n fontWeight: 'bold',\r\n [theme.breakpoints.down('xs')]: {\r\n paddingTop: theme.spacing(2),\r\n },\r\n },\r\n button: {\r\n [theme.breakpoints.up('sm')]: {\r\n minWidth: theme.spacing(13),\r\n },\r\n },\r\n textArea: {\r\n marginBottom: theme.spacing(3),\r\n },\r\n}));\r\n\r\nconst SplitDistributeTransactionDialog = () => {\r\n const dispatch = useDispatch();\r\n const classes = useStyles();\r\n\r\n const transaction = useSelector(\r\n ({ taxCast }) => taxCast.splitDistributeTransactionDialog\r\n );\r\n const isSubmitting = useSelector(({ taxCast }) => taxCast.isSubmitting);\r\n const forecast = useSelector(({ taxCast }) => taxCast.forecast);\r\n\r\n const [isValidSpread, setIsValidSpread] = useState(true);\r\n const [isSaveEnabled, setIsSaveEnabled] = useState(false);\r\n /* spreadData structure:\r\n {\r\n : { selected: , value: , displaySequence: , error: },\r\n 2024: { selected: true, value: '', displaySequence: -1, error: false },\r\n 2025: { selected: true, value: 1100, displaySequence: -1, error: true }\r\n }\r\n */\r\n const [spreadData, setSpreadData] = useState({});\r\n\r\n const handleCancel = () => {\r\n setIsValidSpread(true);\r\n setIsSaveEnabled(false);\r\n setSpreadData({});\r\n dispatch(SPLIT_DISTRIBUTE_TRANSACTION_DIALOG(null));\r\n };\r\n\r\n const handleSubmit = () => {\r\n if (isValidSpread) {\r\n const selectedItems = pickBy(\r\n spreadData,\r\n (item) => item.selected && isValidAmount(item.value)\r\n );\r\n\r\n // Since each new transaction is based on an existing transaction,\r\n // spread the existing transaction into the new transactions.\r\n const newTransactions = Object.keys(selectedItems).map((key) => {\r\n return {\r\n ...transaction,\r\n taxYear: key,\r\n value: selectedItems[key].value,\r\n displaySequence: forecast.years[key][transaction.category].length,\r\n isSpread: false,\r\n };\r\n });\r\n forEach(newTransactions, (tx) => {\r\n dispatch(NEW_TRANSACTION(tx));\r\n });\r\n handleCancel();\r\n } else {\r\n // TODO: Need to present to the user.\r\n }\r\n };\r\n\r\n // **********************\r\n // *** SPREAD SUBFORM ***\r\n // **********************\r\n const handleOnValidateSpread = (isValid) => {\r\n setIsValidSpread(isValid);\r\n setIsSaveEnabled(isValid);\r\n };\r\n\r\n const handleOnIsSpreadUpdate = () => {\r\n // This is a NOOP for duplicating existing transactions.\r\n };\r\n\r\n const handleOnSpreadDataUpdate = (updatingSpreadData) => {\r\n setSpreadData(updatingSpreadData);\r\n };\r\n\r\n if (!transaction) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n {/* Spread Form */}\r\n \r\n \r\n \r\n Cancel\r\n \r\n \r\n {isSubmitting ? 'Saving...' : 'Save'}\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default SplitDistributeTransactionDialog;\r\n","/* eslint max-lines: [2, {\"max\": 200, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React from 'react';\r\nimport {\r\n Backdrop,\r\n CircularProgress,\r\n Grid,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport { DragDropContext } from 'react-beautiful-dnd';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { isEqual, split } from 'lodash';\r\n\r\nimport { MsalAuthenticationTemplate } from '@azure/msal-react';\r\nimport { InteractionType } from '@azure/msal-browser';\r\nimport { loginRequest } from 'lib/utils/authConfig';\r\n\r\nimport {\r\n MOVE_TRANSACTION,\r\n NEW_TRANSACTION_DIALOG,\r\n} from 'store/asyncActions/taxCast';\r\n\r\nimport BusySignal from 'lib/components/BusySignal';\r\nimport ItsDeadJim from 'modules/ItsDeadJim';\r\nimport TaxCastToolBox from './TaxCastToolBox';\r\nimport TaxCastCanvas from './TaxCastCanvas';\r\nimport TrendRibbon from './TrendRibbon';\r\nimport NewTransactionDialog from './dialogs/NewTransaction';\r\nimport EditTransactionDialog from './dialogs/EditTransaction';\r\nimport DeleteTransactionDialog from './dialogs/DeleteTransaction';\r\nimport SplitDistributeTransactionDialog from './dialogs/SplitDistributeTransaction';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n marginTop: theme.spacing(0.5),\r\n },\r\n columnOrder: {\r\n order: 2,\r\n },\r\n trendRibbon: {\r\n order: 1,\r\n [theme.breakpoints.up('lg')]: {\r\n order: 3,\r\n },\r\n },\r\n backdrop: {\r\n zIndex: theme.zIndex.drawer + 1,\r\n color: '#fff',\r\n },\r\n}));\r\n\r\nconst ClientTaxCast = () => {\r\n const classes = useStyles();\r\n const dispatch = useDispatch();\r\n const forecastId = useSelector(({ taxCast }) => taxCast.forecast.id);\r\n const clientProfileId = useSelector(({ taxCast }) => taxCast.client.id);\r\n const isBusy = useSelector(({ taxCast }) => taxCast.isBusy);\r\n\r\n // TODO: Remove when authentication is implemented.\r\n const advisorId = useSelector(({ taxCast }) => taxCast.forecast.advisorId);\r\n\r\n const createTransaction = (event) => {\r\n dispatch(NEW_TRANSACTION_DIALOG(event, forecastId, clientProfileId));\r\n };\r\n\r\n const moveTransaction = (event) => {\r\n const source = {\r\n taxYear: split(event.source.droppableId, '-')[0],\r\n displaySequence: event.source.index,\r\n };\r\n const destination = {\r\n taxYear: split(event.destination.droppableId, '-')[0],\r\n displaySequence: event.destination.index,\r\n };\r\n\r\n const category = split(event.destination.droppableId, '-')[1];\r\n\r\n if (!isEqual(source, destination)) {\r\n dispatch(\r\n MOVE_TRANSACTION({\r\n destination,\r\n source,\r\n category,\r\n id: event.draggableId,\r\n forecastId,\r\n clientProfileId,\r\n advisorId,\r\n })\r\n );\r\n }\r\n };\r\n\r\n const handleDragEvent = (event) => {\r\n if (event.destination) {\r\n // Only allow dropping on current and future years,\r\n // including both creating and moving transactions.\r\n const currentYear = new Date().getFullYear();\r\n if (split(event.destination.droppableId, '-')[0] >= currentYear) {\r\n if (event.draggableId.match(/toolbox-/)) {\r\n createTransaction(event);\r\n } else if (event.source) {\r\n if (split(event.source.droppableId, '-')[0] >= currentYear) {\r\n moveTransaction(event);\r\n }\r\n }\r\n }\r\n }\r\n };\r\n\r\n return (\r\n <>\r\n {/* \r\n \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default ClientTaxCast;\r\n","import React from 'react';\r\nimport {\r\n Avatar,\r\n Card,\r\n CardActions,\r\n CardContent,\r\n CardHeader,\r\n Grid,\r\n IconButton,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport {\r\n BarChart as BarChartIcon,\r\n // CloudDownload as CloudDownloadIcon,\r\n Description as DescriptionIcon,\r\n OpenInNew as OpenInNewIcon,\r\n // PlayArrow as PlayArrowIcon,\r\n} from '@material-ui/icons';\r\n\r\nimport { useSelector } from 'react-redux';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n marginTop: theme.spacing(0.5),\r\n },\r\n card: {\r\n maxWidth: 235,\r\n },\r\n}));\r\n\r\nconst Analytics = () => {\r\n const classes = useStyles();\r\n const affiliateId = useSelector(({ auth }) => auth.account.affiliateId);\r\n const advisorId = useSelector(({ auth }) => auth.account.id);\r\n const advisorGivenName = useSelector(({ auth }) => auth.account.givenName);\r\n const advisorSurname = useSelector(({ auth }) => auth.account.surname);\r\n const disclosureA = useSelector(({ auth }) => auth.account.disclosureA);\r\n const disclosureB = useSelector(({ auth }) => auth.account.disclosureB);\r\n const disclosureC = useSelector(({ auth }) => auth.account.disclosureC);\r\n const clientGivenName = useSelector(\r\n ({ taxCast }) => taxCast.client.givenName\r\n );\r\n const clientSurname = useSelector(({ taxCast }) => taxCast.client.surname);\r\n const clientProfileId = useSelector(({ taxCast }) => taxCast.client.id);\r\n const forecastId = useSelector(({ taxCast }) => taxCast.forecast.id);\r\n const forecast = useSelector(({ taxCast }) => taxCast.forecast);\r\n const calculations = useSelector(({ taxCast }) => taxCast.calculations);\r\n\r\n const serializeStateToLocalStorage = (state) => {\r\n try {\r\n localStorage.setItem('report-state', JSON.stringify(state));\r\n } catch {\r\n // TODO: Handle errors\r\n }\r\n };\r\n\r\n const handleClickOpenInNew = (reportType, reportName) => {\r\n serializeStateToLocalStorage({\r\n affiliateId,\r\n advisorId,\r\n clientProfileId,\r\n forecastId,\r\n reportType,\r\n reportName,\r\n forecast,\r\n calculations,\r\n advisorGivenName,\r\n advisorSurname,\r\n disclosureA,\r\n disclosureB,\r\n disclosureC,\r\n clientGivenName,\r\n clientSurname,\r\n });\r\n window.open(`/reports`, '_blank');\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n title='Canvas Report'\r\n subheader='PDF'\r\n />\r\n \r\n This report provides a printable view of the entire canvas. It\r\n typically requires four (4) to nine (9) pages.\r\n \r\n \r\n \r\n handleClickOpenInNew('application/pdf', 'canvas')\r\n }\r\n >\r\n \r\n \r\n {/* \r\n \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n title='COMING SOON! Unused Bracket Capacity'\r\n subheader='Bar Chart'\r\n />\r\n \r\n This bar char helps identify the unused bracket capacity for the\r\n current TaxCast distribution.\r\n \r\n \r\n \r\n handleClickOpenInNew(\r\n 'visualization',\r\n 'unusedOrdinaryBracketCapacity'\r\n )\r\n }\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default Analytics;\r\n","import React, { useEffect, useState } from 'react';\r\nimport {\r\n Backdrop,\r\n CircularProgress,\r\n Grid,\r\n Tab,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport { Redirect, useLocation, useParams } from 'react-router-dom';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\n\r\nimport { FSTabPanel, FSTabs } from 'lib/components/Tabs';\r\nimport { GET_CLIENT_DATA, UNLOAD_FORECAST } from 'store/asyncActions/taxCast';\r\nimport { accountStatusIsActiveOrUnexpiredTrial } from 'lib/utils/account';\r\n\r\nimport ClientProfile from './components/ClientProfile';\r\nimport TaxCastCanvas from './components/Canvas';\r\nimport Analytics from './components/Analytics';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n maxWidth: theme.maxWidth,\r\n [theme.breakpoints.down('lg')]: {\r\n margin: theme.spacing(1, 3),\r\n },\r\n [theme.breakpoints.up('lg')]: {\r\n margin: theme.spacing(1, 'auto'),\r\n },\r\n },\r\n tab: {\r\n textTransform: 'none',\r\n },\r\n backdrop: {\r\n zIndex: theme.zIndex.drawer + 1,\r\n color: '#fff',\r\n },\r\n}));\r\n\r\nconst TaxCast = () => {\r\n const classes = useStyles();\r\n const params = useParams();\r\n const dispatch = useDispatch();\r\n const queryString = new URLSearchParams(useLocation().search);\r\n const [currentTab, setCurrentTab] = useState(\r\n queryString.get('tab') ? parseInt(queryString.get('tab'), 10) : 1\r\n );\r\n const isBusy = useSelector(({ taxCast }) => taxCast.isBusy);\r\n const taxTableYear = useSelector(({ settings }) => settings.taxTableYear);\r\n\r\n // TODO: Replace when authentication is implemented.\r\n const advisorId = useSelector(({ auth }) => auth.account.id);\r\n const account = useSelector(({ auth }) => auth.account);\r\n\r\n const handleChangeTab = (_, newTab) => {\r\n setCurrentTab(newTab);\r\n };\r\n\r\n useEffect(() => {\r\n dispatch(GET_CLIENT_DATA(params.id, taxTableYear));\r\n }, [advisorId, dispatch, params.id, taxTableYear]);\r\n\r\n useEffect(() => () => dispatch(UNLOAD_FORECAST()), [dispatch]);\r\n\r\n useEffect(() => {\r\n document.title = `TaxCast - Canvas`;\r\n }, []);\r\n\r\n if (isBusy) {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n\r\n if (!accountStatusIsActiveOrUnexpiredTrial(account)) {\r\n return ;\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default TaxCast;\r\n","/* eslint max-lines: [2, {\"max\": 350, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React from 'react';\r\nimport { Button, Grid, makeStyles } from '@material-ui/core';\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport PropTypes from 'prop-types';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n maxWidth: 1000,\r\n },\r\n form: {\r\n padding: theme.spacing(2),\r\n },\r\n field: {\r\n [theme.breakpoints.up('sm')]: {\r\n minHeight: theme.spacing(12),\r\n },\r\n },\r\n}));\r\n\r\nconst RestoreDialog = ({ title, content, show, onClose }) => {\r\n const classes = useStyles();\r\n\r\n const handleConfirmRemoveClose = (event) => {\r\n onClose(event);\r\n };\r\n\r\n return (\r\n \r\n \r\n {title}\r\n \r\n \r\n {content}\r\n \r\n \r\n \r\n handleConfirmRemoveClose('cancel')}\r\n color='primary'\r\n value='cancel'\r\n // disabled={isDeleting}\r\n >\r\n Cancel\r\n \r\n handleConfirmRemoveClose('ok')}\r\n color='primary'\r\n value='ok'\r\n autoFocus\r\n // disabled={isDeleting}\r\n >\r\n Ok\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nRestoreDialog.propTypes = {\r\n title: PropTypes.string,\r\n content: PropTypes.string,\r\n show: PropTypes.bool,\r\n onClose: PropTypes.func.isRequired,\r\n};\r\n\r\nRestoreDialog.defaultProps = {\r\n title: 'Confirm Restore',\r\n content: 'Are you certain you want to restore the selected item?',\r\n show: false,\r\n};\r\n\r\nexport default RestoreDialog;\r\n","/* eslint max-lines: [2, {\"max\": 250, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useEffect, useState } from 'react';\r\nimport {\r\n Avatar,\r\n Backdrop,\r\n Button,\r\n Divider,\r\n Grid,\r\n IconButton,\r\n List,\r\n ListItem,\r\n ListItemAvatar,\r\n ListItemSecondaryAction,\r\n ListItemText,\r\n Tooltip,\r\n Typography,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport { Restore as RestoreIcon } from '@material-ui/icons';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { useHistory } from 'react-router-dom';\r\nimport { toast } from 'react-toastify';\r\n\r\nimport loading from 'assets/img/BouncingBarsBlack.png';\r\nimport * as advisorApi from 'api/advisor';\r\nimport { getAge } from 'lib/utils/dateTimeUtils';\r\nimport { shapeErrorsForToast } from 'lib/utils/errorUtil';\r\nimport { ErrorToast } from 'lib/components/ErrorToast';\r\nimport { CLEAR_TAXCAST_DATA } from 'store/asyncActions/taxCast';\r\n\r\nimport RestoreDialog from './RestoreDialog';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n maxWidth: 1000,\r\n width: '100%',\r\n flexGrow: 1,\r\n },\r\n list: {\r\n padding: theme.spacing(2),\r\n },\r\n avatar: {\r\n backgroundColor: theme.palette.primary.main,\r\n },\r\n content: {\r\n padding: theme.spacing(1),\r\n },\r\n backdrop: {\r\n zIndex: theme.zIndex.drawer + 1,\r\n color: '#bebebe',\r\n },\r\n}));\r\n\r\nconst TemplatesList = () => {\r\n const classes = useStyles();\r\n const dispatch = useDispatch();\r\n const history = useHistory();\r\n const advisorId = useSelector(({ auth }) => auth.account.id);\r\n const [selectedTemplateId, setSelectedTemplateId] = useState('');\r\n const [isLoaded, setIsLoaded] = useState(false);\r\n const [templates, setTemplates] = useState([]);\r\n const [showDialogRestore, setShowDialogRestore] = useState(false);\r\n const [isBusy, setIsBusy] = useState(false);\r\n\r\n useEffect(() => {\r\n if (!isLoaded && !isBusy) {\r\n setIsBusy(true);\r\n advisorApi\r\n .getClientProfileTemplates(advisorId)\r\n .then((response) => {\r\n setTemplates(response.data);\r\n setIsLoaded(true);\r\n })\r\n .catch((error) => {\r\n toast.error(\r\n ,\r\n {\r\n autoClose: false,\r\n }\r\n );\r\n })\r\n .finally(() => {\r\n setIsBusy(false);\r\n });\r\n }\r\n }, [isLoaded, templates, advisorId, isBusy]);\r\n\r\n const onClickRestore = (_, selectedTemplateParam) => {\r\n setSelectedTemplateId(selectedTemplateParam);\r\n setShowDialogRestore(true);\r\n };\r\n\r\n const onCloseRestoreDialog = (event) => {\r\n if (event === 'ok') {\r\n dispatch(CLEAR_TAXCAST_DATA());\r\n setTemplates([]);\r\n setIsLoaded(false);\r\n setIsBusy(true);\r\n advisorApi\r\n .getRestoreClientProfileTemplates(advisorId, selectedTemplateId)\r\n .then(() => {\r\n setSelectedTemplateId('');\r\n })\r\n .catch(() => {\r\n setSelectedTemplateId('');\r\n })\r\n .finally(() => {\r\n setIsBusy(false);\r\n });\r\n } else {\r\n setSelectedTemplateId('');\r\n }\r\n setShowDialogRestore(false);\r\n };\r\n\r\n const onClickAdd = () => {\r\n setIsBusy(true);\r\n advisorApi\r\n .getRestoreClientProfileTemplates(advisorId, 'all')\r\n .then(() => {\r\n setSelectedTemplateId('');\r\n })\r\n .catch(() => {\r\n setSelectedTemplateId('');\r\n })\r\n .finally(() => {\r\n setIsBusy(false);\r\n setIsLoaded(false); // Force a reload.\r\n });\r\n };\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Template Client Profiles\r\n \r\n \r\n \r\n {isLoaded && templates.length === 0 && (\r\n <>\r\n \r\n There are no template client profiles associated with your\r\n account.\r\n \r\n
\r\n \r\n Add Templates\r\n \r\n \r\n )}\r\n {isLoaded && templates.length > 0 && (\r\n onClickRestore(event, 'all')}\r\n >\r\n Restore All\r\n \r\n )}\r\n
\r\n
\r\n \r\n \r\n \r\n {!isBusy && (\r\n \r\n {templates.map((template, index) => (\r\n \r\n history.push(`/clients/${template.id}`)}\r\n component='li'\r\n >\r\n \r\n \r\n {template.givenName.substring(0, 1).toUpperCase()}\r\n {template.surname.substring(0, 1).toUpperCase()}\r\n \r\n \r\n \r\n \r\n \r\n \r\n onClickRestore(event, template.id)\r\n }\r\n >\r\n \r\n \r\n \r\n \r\n \r\n {index < templates.length - 1 && (\r\n \r\n )}\r\n \r\n ))}\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default TemplatesList;\r\n","/* eslint max-lines: [2, {\"max\": 625, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useEffect, useState } from 'react';\r\nimport {\r\n Avatar,\r\n Button,\r\n Divider,\r\n FormControlLabel,\r\n Grid,\r\n IconButton,\r\n List,\r\n ListItem,\r\n ListItemAvatar,\r\n ListItemSecondaryAction,\r\n ListItemText,\r\n Paper,\r\n Switch,\r\n TextField,\r\n Typography,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport {\r\n Visibility as VisibilityIcon,\r\n VisibilityOff as VisibilityOffIcon,\r\n} from '@material-ui/icons';\r\n\r\nimport axios from 'axios';\r\nimport { Redirect, useHistory } from 'react-router-dom';\r\nimport { useSelector } from 'react-redux';\r\nimport { toast } from 'react-toastify';\r\n\r\nimport { baseUrl } from 'constants/api';\r\nimport { phoneNumberFormatter } from 'lib/utils/format';\r\nimport { shapeErrorsForToast } from 'lib/utils/errorUtil';\r\nimport { ErrorToast } from 'lib/components/ErrorToast';\r\nimport { accountStatusIsActiveOrUnexpiredTrial } from 'lib/utils/account';\r\n\r\nimport TemplatesList from './components/TemplatesList';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n maxWidth: theme.maxWidth,\r\n [theme.breakpoints.down('lg')]: {\r\n margin: theme.spacing(1, 3),\r\n },\r\n [theme.breakpoints.up('lg')]: {\r\n margin: theme.spacing(1, 'auto'),\r\n },\r\n },\r\n criteria: {\r\n [theme.breakpoints.down('md')]: {\r\n margin: theme.spacing(1, 'auto'),\r\n },\r\n [theme.breakpoints.down('lg')]: {\r\n margin: theme.spacing(1, 'auto'),\r\n },\r\n [theme.breakpoints.up('lg')]: {\r\n margin: theme.spacing(1, 'auto'),\r\n },\r\n maxWidth: 800,\r\n },\r\n results: {\r\n [theme.breakpoints.down('md')]: {\r\n margin: theme.spacing(1, 'auto'),\r\n },\r\n [theme.breakpoints.down('lg')]: {\r\n margin: theme.spacing(1, 3),\r\n },\r\n [theme.breakpoints.up('lg')]: {\r\n margin: theme.spacing(1, 'auto'),\r\n },\r\n maxWidth: 800,\r\n },\r\n resultsList: {\r\n width: '100%',\r\n },\r\n form: {\r\n padding: theme.spacing(0),\r\n },\r\n field: {\r\n [theme.breakpoints.up('sm')]: {\r\n minHeight: theme.spacing(12),\r\n },\r\n },\r\n}));\r\n\r\nconst ClientSearch = () => {\r\n const history = useHistory();\r\n const classes = useStyles();\r\n const [useAdvancedSearch, setUseAdvancedSearch] = useState(false); // Default to simple search.\r\n const [searchResults, setSearchResults] = useState([]);\r\n const [simpleCriteria, setSimpleCriteria] = useState('');\r\n const [advancedCriteria, setAdvancedCriteria] = useState({\r\n useAdvancedSearch: true,\r\n givenName: '',\r\n surname: '',\r\n emailAddress: '',\r\n phoneNumber: '',\r\n addressLineOne: '',\r\n addressCity: '',\r\n addressStateOrProvince: '',\r\n addressPostalCode: '',\r\n birthDate: '',\r\n });\r\n const [revealedId, setRevealedId] = useState();\r\n const mask = '*************';\r\n const [canSearch, setCanSearch] = useState(false);\r\n const [isSearching, setIsSearching] = useState(false);\r\n const [searchComplete, setSearchComplete] = useState(false);\r\n const [isErrorSimpleSearch, setIsErrorSimpleSearch] = useState(false);\r\n const minCriterionLength = 3;\r\n const [revealAll, setReveaAll] = useState(false);\r\n const account = useSelector(({ auth }) => auth.account);\r\n\r\n useEffect(() => {\r\n document.title = 'TaxCast - Search';\r\n }, []);\r\n\r\n const handleToggleSearchType = (event) => {\r\n setUseAdvancedSearch(event.target.checked);\r\n };\r\n\r\n useEffect(() => {\r\n if (useAdvancedSearch) {\r\n let value = false;\r\n value = value || advancedCriteria.givenName.trim().length > 0;\r\n value = value || advancedCriteria.surname.trim().length > 0;\r\n value = value || advancedCriteria.emailAddress.trim().length > 0;\r\n value = value || advancedCriteria.phoneNumber.trim().length > 0;\r\n value = value || advancedCriteria.addressLineOne.trim().length > 0;\r\n value = value || advancedCriteria.addressCity.trim().length > 0;\r\n value =\r\n value || advancedCriteria.addressStateOrProvince.trim().length > 0;\r\n value = value || advancedCriteria.addressPostalCode.trim().length > 0;\r\n value = value || advancedCriteria.birthDate.trim().length > 0;\r\n setCanSearch(value);\r\n } else {\r\n setCanSearch(simpleCriteria.trim().length > 0);\r\n }\r\n }, [useAdvancedSearch, simpleCriteria, advancedCriteria, canSearch]);\r\n\r\n const handleInputChange = (event) => {\r\n switch (event.target.id) {\r\n case 'simpleCriteria':\r\n setSimpleCriteria(event.target.value);\r\n break;\r\n default:\r\n setAdvancedCriteria({\r\n ...advancedCriteria,\r\n [event.target.name]: event.target.value,\r\n });\r\n break;\r\n }\r\n };\r\n\r\n const handleClickSearch = () => {\r\n if (!useAdvancedSearch && simpleCriteria.length < minCriterionLength) {\r\n setIsErrorSimpleSearch(true);\r\n } else {\r\n setIsSearching(true);\r\n const searchCriteria = useAdvancedSearch\r\n ? advancedCriteria\r\n : {\r\n criterion: simpleCriteria,\r\n };\r\n\r\n axios\r\n .post(`${baseUrl}/api/client-profiles/search`, searchCriteria)\r\n .then((response) => {\r\n setSearchComplete(true);\r\n setSearchResults(\r\n response.data.filter((sr) => sr.isTemplate === false)\r\n );\r\n })\r\n .catch((error) => {\r\n setSearchComplete(false);\r\n toast.error(\r\n ,\r\n {\r\n autoClose: false,\r\n }\r\n );\r\n })\r\n .finally(() => {\r\n setRevealedId('');\r\n setIsSearching(false);\r\n });\r\n }\r\n };\r\n\r\n const handleOnKeyDown = (event) => {\r\n if (event.keyCode === 13 && simpleCriteria.length >= minCriterionLength) {\r\n // key\r\n handleClickSearch();\r\n }\r\n };\r\n\r\n const handleToggleReveal = (id) => {\r\n if (revealedId === id) {\r\n setRevealedId(); // Basically, hide the currently revealed item.\r\n } else {\r\n setRevealedId(id);\r\n }\r\n };\r\n\r\n const handleClickClear = () => {\r\n setSearchResults([]);\r\n setSimpleCriteria('');\r\n setAdvancedCriteria({\r\n useAdvancedSearch: true,\r\n givenName: '',\r\n surname: '',\r\n emailAddress: '',\r\n phoneNumber: '',\r\n addressLineOne: '',\r\n addressCity: '',\r\n addressStateOrProvince: '',\r\n addressPostalCode: '',\r\n birthDate: '',\r\n });\r\n setReveaAll(false);\r\n setRevealedId('');\r\n };\r\n\r\n const handleClickNewClient = () => history.push('/clients/new');\r\n\r\n const handleToggleRevealAll = () => {\r\n const nextState = !revealAll;\r\n setReveaAll(nextState);\r\n // If `revealAll` is toggled off (that is, set to Hide All)\r\n // need to reset the revealedId as well to truly hide all items.\r\n // nextState === false => will hide\r\n if (!nextState) {\r\n setRevealedId('');\r\n }\r\n };\r\n\r\n if (!accountStatusIsActiveOrUnexpiredTrial(account)) {\r\n return ;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Search\r\n \r\n \r\n \r\n \r\n }\r\n />\r\n \r\n \r\n {!useAdvancedSearch && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n New Client\r\n \r\n   \r\n \r\n Clear\r\n \r\n   \r\n \r\n Search\r\n \r\n \r\n \r\n )}\r\n {useAdvancedSearch && (\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n New Client\r\n \r\n   \r\n \r\n Clear\r\n \r\n   \r\n \r\n Search\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n {searchComplete && (\r\n \r\n \r\n \r\n \r\n {`Found ${searchResults.length} ${\r\n searchResults.length !== 1 ? 'items' : 'item'\r\n }`}\r\n \r\n    \r\n \r\n {revealAll ? `Hide` : `Show`} All\r\n \r\n \r\n \r\n {searchResults.length > 10 && (\r\n \r\n \r\n \r\n Your search returned {searchResults.length} items.\r\n Consider refining your results and trying again.\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n {searchResults.map((result) => (\r\n history.push(`/clients/${result.id}`)}\r\n component='li'\r\n >\r\n \r\n \r\n {result.givenName.substring(0, 1).toUpperCase()}\r\n {result.surname.substring(0, 1).toUpperCase()}\r\n \r\n \r\n \r\n \r\n {revealedId === result.id || revealAll\r\n ? `${result.preferredEmailAddress}`\r\n : `${mask}`}\r\n \r\n
\r\n \r\n {revealedId === result.id || revealAll\r\n ? `${phoneNumberFormatter(\r\n result.preferredPhoneNumber\r\n )}`\r\n : `${mask}`}\r\n \r\n
\r\n \r\n {revealedId === result.id || revealAll\r\n ? result.preferredAddressLineOne\r\n : `${mask}`}\r\n \r\n
\r\n \r\n {revealedId === result.id || revealAll\r\n ? `${result.preferredAddressCity} ${result.preferredAddressStateOrProvince} ${result.preferredAddressPostalCode}`\r\n : `${mask} ${mask} ${mask}`}\r\n \r\n \r\n }\r\n />\r\n \r\n {!revealAll && (\r\n handleToggleReveal(result.id)}\r\n >\r\n {result.id === revealedId && (\r\n \r\n )}\r\n {result.id !== revealedId && }\r\n \r\n )}\r\n \r\n \r\n ))}\r\n
\r\n
\r\n
\r\n
\r\n )}\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default ClientSearch;\r\n","/* eslint max-lines: [2, {\"max\": 475, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useEffect, useState } from 'react';\r\nimport {\r\n Button,\r\n Divider,\r\n Grid,\r\n MenuItem,\r\n Paper,\r\n Typography,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport { Form } from 'react-final-form';\r\nimport { MuiPickersUtilsProvider } from '@material-ui/pickers';\r\nimport MomentUtils from '@date-io/moment';\r\nimport omit from 'lodash/omit';\r\nimport { useHistory } from 'react-router-dom';\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\n\r\nimport {\r\n composeValidators,\r\n isEmail,\r\n required,\r\n trimWhiteSpace,\r\n} from 'lib/utils/form';\r\n\r\nimport CheckboxField from 'lib/components/CheckboxField';\r\nimport FormField from 'lib/components/FormField';\r\nimport SelectField from 'lib/components/SelectField';\r\nimport DatePickerField from 'lib/components/DatePickerField';\r\nimport { useSelector } from 'react-redux';\r\nimport {\r\n filingStatusDisplayMap,\r\n filingStatusTypes,\r\n} from 'constants/filingStatuses';\r\nimport * as clientApi from 'api/client';\r\nimport { toast } from 'react-toastify';\r\n\r\nimport Backdrop from '@material-ui/core/Backdrop';\r\nimport CircularProgress from '@material-ui/core/CircularProgress';\r\nimport { shapeErrorsForToast } from 'lib/utils/errorUtil';\r\nimport { ErrorToast } from 'lib/components/ErrorToast';\r\n\r\nimport { isValidPhoneNumberUnadorned } from 'lib/utils/validation';\r\nimport {\r\n AuthenticatedTemplate,\r\n UnauthenticatedTemplate,\r\n} from '@azure/msal-react';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n minHeight: '95vh',\r\n maxWidth: 1000,\r\n [theme.breakpoints.down('md')]: {\r\n margin: theme.spacing(1, 'auto'),\r\n },\r\n [theme.breakpoints.down('lg')]: {\r\n margin: theme.spacing(1, 3),\r\n },\r\n [theme.breakpoints.up('lg')]: {\r\n margin: theme.spacing(1, 'auto'),\r\n },\r\n },\r\n title: {\r\n fontWeight: 'bold',\r\n textAlign: 'center',\r\n padding: theme.spacing(3),\r\n backgroundColor: theme.palette.secondary.main,\r\n },\r\n form: {\r\n padding: theme.spacing(2),\r\n },\r\n field: {\r\n [theme.breakpoints.up('sm')]: {\r\n minHeight: theme.spacing(12),\r\n },\r\n },\r\n backdrop: {\r\n zIndex: theme.zIndex.drawer + 1,\r\n color: '#fff',\r\n },\r\n}));\r\n\r\nconst NewClientForm = () => {\r\n const classes = useStyles();\r\n const advisorId = useSelector(({ auth }) => auth.account.id);\r\n const [clientId, setClientId] = useState('');\r\n const history = useHistory();\r\n const [isBusy, setIsBusy] = useState(false);\r\n\r\n useEffect(() => {\r\n document.title = 'TaxCast - New Client';\r\n }, []);\r\n\r\n const createNewClient = (form) => {\r\n setIsBusy(true);\r\n const clientProfile = omit(form, ['sameBillingAddress']);\r\n\r\n if (form.sameBillingAddress) {\r\n clientProfile.billingAddressLineOne = form.preferredAddressLineOne;\r\n clientProfile.billingAddressLineTwo = form.preferredAddressLineTwo;\r\n clientProfile.billingAddressCity = form.preferredAddressCity;\r\n clientProfile.billingAddressStateOrProvince =\r\n form.preferredAddressStateOrProvince;\r\n clientProfile.billingAddressPostalCode = form.preferredAddressPostalCode;\r\n }\r\n\r\n // BCL - Add actual post to server.\r\n clientProfile.advisorId = advisorId;\r\n\r\n // Sanitize phone number to ensure no adornments.\r\n if (!isValidPhoneNumberUnadorned(clientProfile.preferredPhoneNumber)) {\r\n const error =\r\n 'Phone number must be ten digits with no adornments. e.g. 9065551212';\r\n toast.error(, {\r\n autoClose: false,\r\n });\r\n setIsBusy(false);\r\n } else {\r\n // BCL - No need to use redux.\r\n clientApi\r\n .createClientProfile(clientProfile)\r\n .then((response) => {\r\n toast.success(`Successfully created profile.`);\r\n setIsBusy(false);\r\n setClientId(response.data.id);\r\n })\r\n .catch((error) => {\r\n setIsBusy(false);\r\n toast.error(\r\n ,\r\n {\r\n autoClose: false,\r\n }\r\n );\r\n });\r\n }\r\n };\r\n\r\n const navigateNext = (action) => {\r\n if (action === 'profile') {\r\n history.push(`/clients/${clientId}?tab=0&subtab=1`);\r\n } else if (action === 'canvas') {\r\n history.push(`/clients/${clientId}`);\r\n }\r\n };\r\n\r\n return (\r\n <>\r\n Nah dawg\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n New Client\r\n \r\n \r\n (\r\n
\r\n \r\n \r\n \r\n \r\n Client Details\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n Address\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n {!values.sameBillingAddress && (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n Billing Address\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n Tax information\r\n \r\n \r\n\r\n \r\n \r\n {Object.keys(filingStatusTypes).map((item) => (\r\n \r\n {filingStatusDisplayMap[item]}\r\n \r\n ))}\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n history.push('/clients/search')}\r\n style={{ marginRight: 5 }}\r\n >\r\n Cancel\r\n \r\n \r\n Submit\r\n \r\n \r\n \r\n \r\n
\r\n )}\r\n />\r\n
\r\n
\r\n
\r\n \r\n Success!\r\n \r\n \r\n The profile was created successfully. What do you want to do next?\r\n \r\n \r\n \r\n navigateNext('profile')}\r\n color='primary'\r\n value='cancel'\r\n >\r\n More Details\r\n \r\n navigateNext('canvas')}\r\n color='primary'\r\n value='ok'\r\n autoFocus\r\n >\r\n Start Planning\r\n \r\n \r\n \r\n
\r\n \r\n );\r\n};\r\n\r\nexport default NewClientForm;\r\n","/* eslint max-lines: [2, {\"max\": 500, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useState } from 'react';\r\nimport {\r\n Button,\r\n Divider,\r\n FormControl,\r\n Grid,\r\n MenuItem,\r\n Paper,\r\n Typography,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport { Form } from 'react-final-form';\r\nimport { MuiPickersUtilsProvider } from '@material-ui/pickers';\r\nimport MomentUtils from '@date-io/moment';\r\nimport omit from 'lodash/omit';\r\nimport { Redirect } from 'react-router-dom';\r\nimport { toast } from 'react-toastify';\r\n\r\nimport {\r\n composeValidators,\r\n isEmail,\r\n required,\r\n trimWhiteSpace,\r\n} from 'lib/utils/form';\r\n\r\nimport CheckboxField from 'lib/components/CheckboxField';\r\nimport FormField from 'lib/components/FormField';\r\nimport SelectField from 'lib/components/SelectField';\r\nimport { shapeErrorsForToast } from 'lib/utils/errorUtil';\r\nimport { ErrorToast } from 'lib/components/ErrorToast';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport * as advisorApi from 'api/advisor';\r\nimport * as authActions from 'store/asyncActions/auth';\r\n\r\nimport { isValidPhoneNumberUnadorned } from 'lib/utils/validation';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n minHeight: '95vh',\r\n maxWidth: 1000,\r\n [theme.breakpoints.down('md')]: {\r\n margin: theme.spacing(1, 'auto'),\r\n },\r\n [theme.breakpoints.down('lg')]: {\r\n margin: theme.spacing(1, 3),\r\n },\r\n [theme.breakpoints.up('lg')]: {\r\n margin: theme.spacing(1, 'auto'),\r\n },\r\n },\r\n title: {\r\n fontWeight: 'bold',\r\n textAlign: 'center',\r\n padding: theme.spacing(3),\r\n backgroundColor: theme.palette.secondary.main,\r\n },\r\n form: {\r\n padding: theme.spacing(2),\r\n },\r\n field: {\r\n [theme.breakpoints.up('sm')]: {\r\n minHeight: theme.spacing(12),\r\n },\r\n },\r\n}));\r\n\r\nconst NewAdvisorForm = () => {\r\n const classes = useStyles();\r\n const dispatch = useDispatch();\r\n const newAdvisor = useSelector(({ auth }) => auth.user);\r\n const [isFinished, setIsFinished] = useState(false);\r\n const marketingWebSiteLinkChoice = useSelector(\r\n ({ preference }) => preference.choice\r\n );\r\n\r\n const createNewAdvisor = (form) => {\r\n const advisor = omit(form, ['sameBillingAddress']);\r\n\r\n if (form.sameBillingAddress) {\r\n advisor.billingAddressLineOne = form.preferredAddressLineOne;\r\n advisor.billingAddressLineTwo = form.preferredAddressLineTwo;\r\n advisor.billingAddressCity = form.preferredAddressCity;\r\n advisor.billingAddressStateOrProvince =\r\n form.preferredAddressStateOrProvince;\r\n advisor.billingAddressPostalCode = form.preferredAddressPostalCode;\r\n }\r\n\r\n advisor.azureActiveDirectoryObjectId = newAdvisor.oid;\r\n\r\n // Sanitize phone number to ensure no adornments.\r\n if (!isValidPhoneNumberUnadorned(advisor.preferredPhoneNumber)) {\r\n const error =\r\n 'Phone number must be ten digits with no adornments. e.g. 9065551212';\r\n toast.error(, {\r\n autoClose: false,\r\n });\r\n } else {\r\n advisorApi\r\n .createAdvisor({\r\n ...advisor,\r\n accountStatus:\r\n marketingWebSiteLinkChoice === 'try' ? 'trial' : 'incomplete',\r\n })\r\n .then((response) => {\r\n dispatch(authActions.LOAD_NEW_ACCOUNT(response.data));\r\n setIsFinished(true);\r\n // Code below handles redirecting if the user chose 'trial'\r\n // from the Web site. Record the option here.\r\n advisorApi\r\n .createAccountEventEntry(\r\n response.data.affiliateId,\r\n response.data.id,\r\n 'lz',\r\n marketingWebSiteLinkChoice\r\n )\r\n .then(() => {\r\n // Do NO OP\r\n })\r\n .catch(() => {\r\n // Do NO OP\r\n });\r\n }) // TODO: handle cancel token? Since this isn't being done in a hook, how to handle? Consider adding a hook?\r\n .catch((error) => {\r\n toast(error);\r\n });\r\n }\r\n };\r\n\r\n if (newAdvisor.id || isFinished) {\r\n if (marketingWebSiteLinkChoice === 'try') {\r\n return ;\r\n }\r\n return ;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n Please Complete Your Profile\r\n \r\n \r\n (\r\n
\r\n \r\n \r\n \r\n \r\n Advisor Details\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n Address\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n {!values.sameBillingAddress && (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n Billing Address\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n window.open(\r\n '/Terms_and_Conditions_HTML_20201128.html',\r\n '_blank'\r\n )\r\n }\r\n >\r\n View\r\n \r\n \r\n\r\n \r\n \r\n \r\n window.open(\r\n '/Privacy_Policy_HTML_20201128.html',\r\n '_blank'\r\n )\r\n }\r\n >\r\n View\r\n \r\n \r\n\r\n \r\n \r\n {/* \r\n How did you learn about TaxCast?\r\n */}\r\n \r\n {/* */}\r\n \r\n Bob Veres' Insider's Forum (Nashville TN\r\n October 2021)\r\n \r\n \r\n #XYPNLive (Denver CO November 2021)\r\n \r\n \r\n Search Engine (Google, Bing, DuckDuckGo, etc.)\r\n \r\n \r\n My Network (LinkedIn, a colleague, etc.)\r\n \r\n \r\n Other\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n Save\r\n \r\n \r\n \r\n \r\n
\r\n )}\r\n />\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default NewAdvisorForm;\r\n","/* eslint max-lines: [2, {\"max\": 275, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useEffect } from 'react';\r\nimport {\r\n Button,\r\n Card,\r\n CardActionArea,\r\n CardActions,\r\n CardContent,\r\n CardMedia,\r\n Grid,\r\n Typography,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport { useHistory } from 'react-router-dom';\r\n\r\nimport HelpAbout from 'assets/img/Help-About.jpg';\r\nimport HelpAccountMaintenance from 'assets/img/Help-AccountMaintenance.jpg';\r\nimport HelpContactUsSupport from 'assets/img/Help-ContactUsSupport.jpg';\r\nimport HelpCurrentProvisions from 'assets/img/Help-CurrentProvisions.jpg';\r\nimport HelpGlossary from 'assets/img/Help-Glossary.jpg';\r\nimport HelpRoadmap from 'assets/img/Help-Roadmap.jpg';\r\nimport HelpTaxPlanningWithTaxCast from 'assets/img/Help-TaxPlanningWithTaxCast.jpg';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n display: 'flex',\r\n flexWrap: 'wrap',\r\n justifyContent: 'space-around',\r\n marginTop: theme.spacing(3),\r\n },\r\n card: {\r\n maxWidth: 345,\r\n },\r\n}));\r\n\r\nconst HelpAndSupport = () => {\r\n const classes = useStyles();\r\n const history = useHistory();\r\n\r\n useEffect(() => {\r\n document.title = 'TaxCast - Help';\r\n }, []);\r\n\r\n const handleClickContactUsSupport = () => history.push('/help/contact-us');\r\n const handleClickTaxPlanningWithTaxCast = () =>\r\n history.push('/help/tax-planning');\r\n const handleClickGlossary = () => history.push('/help/glossary');\r\n const handleClickCurrentProvisions = () =>\r\n history.push('/help/current-provisions');\r\n const handleClickFutureProvisions = () =>\r\n history.push('/help/future-provisions');\r\n const handleClickAccountMaintenance = () =>\r\n history.push('/help/account-maintenance');\r\n const handleClickAbout = () => history.push('/help/about');\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Get Help\r\n \r\n \r\n Need help with your account? Have a question about TaxCast? Want\r\n to learn more about tax planning? Reach out to us!\r\n \r\n \r\n \r\n \r\n \r\n Contact Us / Support\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Watch and Learn\r\n \r\n \r\n These videos will give you the basics of using TaxCast to help\r\n your clients optimize their tax liability.\r\n \r\n \r\n \r\n \r\n \r\n Tax Planning with TaxCast™\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Tax Code Terms\r\n \r\n \r\n Form 4952? Series of Substantially Equal Periodic Payments?\r\n Learn what these terms and more mean and how they apply to your\r\n clients.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Included in TaxCast\r\n \r\n \r\n Find out what tax provisions are currently covered by TaxCast.\r\n Take a look at the Roadmap to see what is coming next.\r\n \r\n \r\n \r\n \r\n \r\n Current Provisions\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n In Development\r\n \r\n \r\n Learn what portions of the tax are being implemented. Current\r\n Provisions shows you what is already implemented.\r\n \r\n \r\n \r\n \r\n \r\n Future Provisions\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Account Questions?\r\n \r\n \r\n Coming soon\r\n \r\n \r\n \r\n \r\n \r\n Account Maintenance\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Version Information\r\n \r\n \r\n Verify the version of TaxCast you are using. This can be helpful\r\n in troubleshooting issues with the support team.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default HelpAndSupport;\r\n","/* eslint max-lines: [2, {\"max\": 200, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React from 'react';\r\nimport { Button, Grid, Paper, Typography, makeStyles } from '@material-ui/core';\r\nimport ArrowBackIcon from '@material-ui/icons/ArrowBack';\r\nimport { useHistory } from 'react-router-dom';\r\nimport TaxCastLogo from 'assets/img/Logo192x192.png';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n maxWidth: theme.maxWidth,\r\n [theme.breakpoints.down('lg')]: {\r\n margin: theme.spacing(1, 3),\r\n },\r\n [theme.breakpoints.up('lg')]: {\r\n margin: theme.spacing(1, 'auto'),\r\n },\r\n },\r\n paper: {\r\n minWidth: '100%',\r\n },\r\n header: {\r\n marginBottom: theme.spacing(1),\r\n marginTop: theme.spacing(1),\r\n marginLeft: theme.spacing(1),\r\n marginRight: theme.spacing(1),\r\n padding: theme.spacing(1),\r\n },\r\n content: {\r\n padding: theme.spacing(1),\r\n },\r\n divider: {\r\n borderRight: `1px solid ${theme.palette.primary.main}`,\r\n padding: theme.spacing(1),\r\n },\r\n rightCell: {\r\n marginBottom: theme.spacing(1),\r\n marginTop: theme.spacing(1),\r\n marginLeft: theme.spacing(1),\r\n marginRight: theme.spacing(1),\r\n padding: theme.spacing(1),\r\n },\r\n leftCell: {\r\n marginBottom: theme.spacing(1),\r\n marginTop: theme.spacing(1),\r\n marginLeft: theme.spacing(1),\r\n marginRight: theme.spacing(1),\r\n padding: theme.spacing(1),\r\n borderRight: `1px solid ${theme.palette.primary.main}`,\r\n },\r\n}));\r\n\r\nconst ContactUs = () => {\r\n const classes = useStyles();\r\n const history = useHistory();\r\n\r\n const handleClickBack = () => history.goBack();\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n Contact Us\r\n \r\n \r\n \r\n \r\n \r\n \r\n TaxCast Logo\r\n \r\n \r\n \r\n \r\n Help is available via phone or email.\r\n
\r\n
\r\n We respond to email inquiries within 24 business hours.\r\n
\r\n \r\n support@taxcastplan.com\r\n \r\n
\r\n
\r\n The phone lines are open 9AM to 4PM ET Monday through Friday.\r\n You can leave a message and we will respond within 24 hours.\r\n
\r\n 888.482.9227 (888-4-TAXCAST)\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default ContactUs;\r\n","import React from 'react';\r\nimport { Grid, Typography, makeStyles } from '@material-ui/core';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { phoneNumberFormatter } from 'lib/utils/format';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n maxWidth: theme.maxWidth,\r\n padding: theme.spacing(3, 3),\r\n },\r\n name: {\r\n fontSize: '2em',\r\n paddingLeft: theme.spacing(2),\r\n fontWeight: 'bold',\r\n paddingBottom: theme.spacing(3),\r\n },\r\n otherThanNameContainer: {\r\n paddingLeft: theme.spacing(2),\r\n paddingBottom: theme.spacing(3),\r\n },\r\n otherThanNameText: {\r\n paddingLeft: theme.spacing(2),\r\n fontSize: '2em',\r\n },\r\n}));\r\n\r\nconst Summary = ({ advisor }) => {\r\n const classes = useStyles();\r\n\r\n return (\r\n \r\n \r\n \r\n {advisor.givenName} {advisor.surname} {advisor.designationsList}\r\n \r\n \r\n \r\n \r\n \r\n {advisor.preferredAddressLineOne}\r\n \r\n \r\n {advisor.preferredAddressLineTwo && (\r\n \r\n \r\n {advisor.preferredAddressLineTwo}\r\n \r\n \r\n )}\r\n \r\n \r\n {advisor.preferredAddressCity}{' '}\r\n {advisor.preferredAddressStateOrProvince},{' '}\r\n {advisor.preferredAddressPostalCode}\r\n \r\n \r\n \r\n \r\n \r\n {advisor.preferredEmailAddress}\r\n \r\n \r\n \r\n \r\n {phoneNumberFormatter(advisor.preferredPhoneNumber)}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nSummary.propTypes = {\r\n advisor: PropTypes.shape({\r\n givenName: PropTypes.string.isRequired,\r\n surname: PropTypes.string.isRequired,\r\n preferredAddressLineOne: PropTypes.string.isRequired,\r\n preferredAddressLineTwo: PropTypes.string,\r\n preferredAddressCity: PropTypes.string.isRequired,\r\n preferredAddressStateOrProvince: PropTypes.string.isRequired,\r\n preferredAddressPostalCode: PropTypes.string.isRequired,\r\n preferredEmailAddress: PropTypes.string.isRequired,\r\n preferredPhoneNumber: PropTypes.string.isRequired,\r\n designationsList: PropTypes.string,\r\n }).isRequired,\r\n};\r\n\r\nSummary.defaultProps = {};\r\n\r\nexport default Summary;\r\n","import React, { useState } from 'react';\r\nimport { Button, Grid, TextField, makeStyles } from '@material-ui/core';\r\nimport PropTypes from 'prop-types';\r\nimport { toast } from 'react-toastify';\r\n\r\nimport * as advisorApi from 'api/advisor';\r\nimport { shapeErrorsForToast } from 'lib/utils/errorUtil';\r\nimport { ErrorToast } from 'lib/components/ErrorToast';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n maxWidth: theme.maxWidth,\r\n padding: theme.spacing(3, 3),\r\n },\r\n disclosure: {\r\n padding: theme.spacing(1),\r\n },\r\n}));\r\n\r\nconst Disclosures = ({\r\n affiliateId,\r\n advisorId,\r\n advisorDisclosures,\r\n onSave,\r\n}) => {\r\n const classes = useStyles();\r\n const [disclosures, setDisclosures] = useState({ ...advisorDisclosures });\r\n const maxDisclosureLength = 4000;\r\n\r\n const onClickCancel = () => {\r\n setDisclosures(advisorDisclosures);\r\n };\r\n\r\n const onClickSave = () => {\r\n advisorApi\r\n .updateAdvisorDisclosures(affiliateId, advisorId, disclosures)\r\n .then(() => {\r\n toast.success(`Successfully updated disclosures.`);\r\n onSave(disclosures);\r\n })\r\n .catch((error) => {\r\n toast.error(, {\r\n autoClose: false,\r\n });\r\n });\r\n };\r\n\r\n const onChangeDisclosure = (event) => {\r\n const disclosureId = event.target.id.replace('disclosure', '');\r\n if (event.target.value.length <= maxDisclosureLength) {\r\n const newDisclosures = { ...disclosures };\r\n newDisclosures[disclosureId] = event.target.value;\r\n setDisclosures({ ...newDisclosures });\r\n }\r\n };\r\n\r\n return (\r\n \r\n {Object.keys(disclosures).map((item) => (\r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n Cancel\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nDisclosures.propTypes = {\r\n affiliateId: PropTypes.string.isRequired,\r\n advisorId: PropTypes.string.isRequired,\r\n advisorDisclosures: PropTypes.shape({\r\n dislcosureA: PropTypes.string,\r\n disclosureB: PropTypes.string,\r\n disclosureC: PropTypes.string,\r\n }).isRequired,\r\n onSave: PropTypes.func.isRequired,\r\n};\r\n\r\nDisclosures.defaultProps = {};\r\n\r\nexport default Disclosures;\r\n","/* eslint-disable import/prefer-default-export */\r\nexport const advisorDesignations = {\r\n AIF: 'Accredited Investment Fiduciary',\r\n AIFA: '\tAccredited Investment Fiduciary Analyst',\r\n CFA: '\tChartered Financial Analyst',\r\n CFP: '\tCertified Financial Planner',\r\n ChFC: '\tChartered Financial Consultant',\r\n CIC: '\tCertified Insurance Counselor',\r\n CIMA: '\tCertified Investment Management Analyst',\r\n CLU: '\tChartered Life Underwriter',\r\n CPA: '\tCertified Public Accountant',\r\n EA: '\tEnrolled Agent',\r\n JD: '\tJuris Doctor',\r\n PFS: '\tPersonal Financial Specialist',\r\n};\r\n\r\nexport const designationIsRegistered = {\r\n AIF: true,\r\n AIFA: true,\r\n CFA: true,\r\n CFP: true,\r\n ChFC: true,\r\n CIC: false,\r\n CIMA: true,\r\n CLU: true,\r\n CPA: false,\r\n EA: false,\r\n JD: false,\r\n PFS: false,\r\n};\r\n","/* eslint max-lines: [2, {\"max\": 175, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useState } from 'react';\r\nimport {\r\n Button,\r\n Checkbox,\r\n Dialog,\r\n DialogActions,\r\n DialogContent,\r\n DialogContentText,\r\n DialogTitle,\r\n Grid,\r\n List,\r\n ListItem,\r\n ListItemSecondaryAction,\r\n ListItemText,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport PropTypes from 'prop-types';\r\nimport { toast } from 'react-toastify';\r\n\r\nimport * as advisorApi from 'api/advisor';\r\nimport {\r\n advisorDesignations,\r\n designationIsRegistered,\r\n} from 'constants/advisorDesignations';\r\nimport { shapeErrorsForToast } from 'lib/utils/errorUtil';\r\nimport { ErrorToast } from 'lib/components/ErrorToast';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n maxWidth: theme.maxWidth,\r\n padding: theme.spacing(3, 3),\r\n },\r\n title: {\r\n fontWeight: 'bold',\r\n padding: theme.spacing(2),\r\n },\r\n designation: {\r\n padding: theme.spacing(1),\r\n },\r\n}));\r\n\r\nconst Designations = ({\r\n affiliateId,\r\n advisorId,\r\n advisorDesignationsList,\r\n onSave,\r\n}) => {\r\n const classes = useStyles();\r\n const [designations, setDesignations] = useState(advisorDesignationsList);\r\n const [showDesignationDialog, setShowDesignationDialog] = useState(false);\r\n\r\n const onClickCancel = () => {\r\n setDesignations(advisorDesignationsList);\r\n };\r\n\r\n const onClickSave = () => {\r\n advisorApi\r\n .updateAdvisorDesignationsList(affiliateId, advisorId, designations)\r\n .then(() => {\r\n toast.success(`Successfully updated designations.`);\r\n onSave(designations);\r\n })\r\n .catch((error) => {\r\n toast.error(, {\r\n autoClose: false,\r\n });\r\n });\r\n };\r\n\r\n const onChangeCheckbox = (value) => {\r\n const selectedIndex = designations.indexOf(value);\r\n const updatedDesignations = [...designations];\r\n\r\n if (selectedIndex === -1) {\r\n updatedDesignations.push(value);\r\n } else {\r\n updatedDesignations.splice(selectedIndex, 1);\r\n }\r\n\r\n setDesignations(updatedDesignations);\r\n\r\n // SPECIAL CASE: A PFS must have a CPA designation.\r\n const indexOfPfs = designations.indexOf('PFS');\r\n const indexOfCpa = designations.indexOf('CPA');\r\n\r\n // Scenario a: Adding PFS\r\n if (value === 'PFS' && indexOfPfs === -1 && indexOfCpa === -1) {\r\n setShowDesignationDialog(true);\r\n }\r\n\r\n // Scenario 2: Removing CPA\r\n if (value === 'CPA' && indexOfCpa !== -1 && indexOfPfs !== -1) {\r\n setShowDesignationDialog(true);\r\n }\r\n };\r\n\r\n const handleConfirmPfsCpaRelationshipClose = () => {\r\n setShowDesignationDialog(false);\r\n };\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n {Object.keys(advisorDesignations).map((item) => (\r\n \r\n \r\n \r\n onChangeCheckbox(item)}\r\n checked={designations.includes(item)}\r\n color='primary'\r\n />\r\n \r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n   \r\n \r\n \r\n \r\n \r\n \r\n Confirm Designation Selection\r\n \r\n \r\n \r\n A PFS designation requires a corresponding CPA designation.\r\n \r\n \r\n \r\n {/* handleConfirmPfsCpaRelationshipClose('cancel')}\r\n color='primary'\r\n value='cancel'\r\n >\r\n Cancel\r\n */}\r\n handleConfirmPfsCpaRelationshipClose('ok')}\r\n color='primary'\r\n value='ok'\r\n autoFocus\r\n >\r\n Ok\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nDesignations.propTypes = {\r\n affiliateId: PropTypes.string.isRequired,\r\n advisorId: PropTypes.string.isRequired,\r\n advisorDesignationsList: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n onSave: PropTypes.func.isRequired,\r\n};\r\n\r\nDesignations.defaultProps = {};\r\n\r\nexport default Designations;\r\n","/* eslint max-lines: [2, {\"max\": 325, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useState } from 'react';\r\nimport {\r\n Button,\r\n Dialog,\r\n DialogActions,\r\n DialogContent,\r\n DialogTitle,\r\n Grid,\r\n Table,\r\n TableBody,\r\n TableCell,\r\n TableHead,\r\n TableRow,\r\n TextField,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport PropTypes from 'prop-types';\r\nimport { toast } from 'react-toastify';\r\nimport { orderBy } from 'lodash';\r\nimport moment from 'moment';\r\n\r\nimport * as advisorApi from 'api/advisor';\r\nimport { shapeErrorsForToast } from 'lib/utils/errorUtil';\r\nimport { ErrorToast } from 'lib/components/ErrorToast';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n maxWidth: theme.maxWidth,\r\n padding: theme.spacing(3, 3),\r\n },\r\n content: {\r\n padding: theme.spacing(1),\r\n },\r\n tableBanner: {\r\n fontSize: '1.5em',\r\n padding: theme.spacing(1, 3),\r\n },\r\n table: {\r\n padding: theme.spacing(1, 3),\r\n },\r\n}));\r\n\r\nconst Account = ({\r\n advisorId,\r\n givenName,\r\n middleName,\r\n surname,\r\n changeRequests,\r\n onCreateChangeRequest,\r\n}) => {\r\n const classes = useStyles();\r\n const [newGivenName, setNewGivenName] = useState(givenName);\r\n const [newMiddleName, setNewMiddleName] = useState(middleName);\r\n const [newSurname, setNewSurname] = useState(surname);\r\n const [reasonForChange, setReasonForChange] = useState('');\r\n const [showChangeRequestDialog, setShowChangeRequestDialog] = useState(false);\r\n const [isErrorReasonForChange, setIsErrorReasonForChange] = useState(false);\r\n const maxReasonLength = 1000;\r\n const minReasonLength = 12;\r\n\r\n const onClickChange = () => {\r\n setShowChangeRequestDialog(true);\r\n };\r\n\r\n const onClickDialogAction = (event) => {\r\n if (event === 'ok') {\r\n if (reasonForChange.length < minReasonLength) {\r\n setIsErrorReasonForChange(true);\r\n } else if (\r\n givenName === newGivenName &&\r\n middleName === newMiddleName &&\r\n surname === newSurname\r\n ) {\r\n toast.error('Nothing changed.');\r\n } else {\r\n setIsErrorReasonForChange(false);\r\n setShowChangeRequestDialog(false);\r\n\r\n // Reset the dialog\r\n setReasonForChange('');\r\n\r\n const changeRequest = {\r\n propertyGroup: 'account',\r\n currentValue: `${givenName} ${middleName} ${surname}`,\r\n requestedValue: `${newGivenName} ${newMiddleName} ${newSurname}`,\r\n reasonForChange,\r\n };\r\n advisorApi\r\n .createAccountChangeRequest(advisorId, changeRequest)\r\n .then((response) => {\r\n onCreateChangeRequest(response.data);\r\n toast.success(\r\n `Change request submitted to change account information.`\r\n );\r\n })\r\n .catch((error) => {\r\n toast.error(\r\n ,\r\n {\r\n autoClose: false,\r\n }\r\n );\r\n });\r\n }\r\n } else {\r\n setReasonForChange('');\r\n setShowChangeRequestDialog(false);\r\n }\r\n };\r\n\r\n const onChangeNewGivenName = (event) => {\r\n setNewGivenName(event.target.value);\r\n };\r\n\r\n const onChangeNewMiddleName = (event) => {\r\n setNewMiddleName(event.target.value);\r\n };\r\n\r\n const onChangeNewSurname = (event) => {\r\n setNewSurname(event.target.value);\r\n };\r\n\r\n const onChangeReasonForChange = (event) => {\r\n if (event.target.value.length <= maxReasonLength) {\r\n setReasonForChange(event.target.value);\r\n }\r\n };\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {changeRequests && (\r\n \r\n {`${changeRequests.length} change ${\r\n changeRequests.length !== 1 ? 'requests' : 'request'\r\n }`}\r\n \r\n )}\r\n {changeRequests && changeRequests.length > 0 && (\r\n \r\n \r\n \r\n \r\n Property Group\r\n Current Value\r\n Requested Values\r\n Reason\r\n Submitted\r\n Status\r\n Notes\r\n \r\n \r\n \r\n {orderBy(changeRequests, 'submittedStamp', ['desc']).map(\r\n (item) => (\r\n \r\n {item.propertyGroup}\r\n {item.currentValue}\r\n {item.requestedValue}\r\n {item.reasonForChange}\r\n {`${moment(item.submittedStamp).format(\r\n 'MM/DD/YYYY hh:mm'\r\n )}`}\r\n {item.status}\r\n {item.notes}\r\n \r\n )\r\n )}\r\n \r\n
\r\n
\r\n )}\r\n \r\n \r\n \r\n Account Change Request - Name\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n onClickDialogAction('cancel')}\r\n color='primary'\r\n value='cancel'\r\n variant='outlined'\r\n >\r\n Cancel\r\n \r\n onClickDialogAction('ok')}\r\n color='primary'\r\n value='ok'\r\n autoFocus\r\n variant='contained'\r\n >\r\n Ok\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nAccount.propTypes = {\r\n advisorId: PropTypes.string.isRequired,\r\n givenName: PropTypes.string.isRequired,\r\n middleName: PropTypes.string,\r\n surname: PropTypes.string.isRequired,\r\n changeRequests: PropTypes.arrayOf(\r\n PropTypes.shape({\r\n id: PropTypes.string,\r\n submittedStamp: PropTypes.string,\r\n currentValue: PropTypes.string,\r\n requestedValue: PropTypes.string,\r\n reasonForChange: PropTypes.string,\r\n status: PropTypes.string,\r\n notes: PropTypes.string,\r\n propertyGroup: PropTypes.string,\r\n })\r\n ),\r\n onCreateChangeRequest: PropTypes.func.isRequired,\r\n};\r\n\r\nAccount.defaultProps = {\r\n middleName: '',\r\n changeRequests: [],\r\n};\r\n\r\nexport default Account;\r\n","/* eslint max-lines: [2, {\"max\": 425, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useState } from 'react';\r\nimport {\r\n Button,\r\n Dialog,\r\n DialogActions,\r\n DialogContent,\r\n DialogTitle,\r\n Grid,\r\n Table,\r\n TableBody,\r\n TableCell,\r\n TableHead,\r\n TableRow,\r\n TextField,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport PropTypes from 'prop-types';\r\nimport { toast } from 'react-toastify';\r\nimport { orderBy } from 'lodash';\r\nimport moment from 'moment';\r\n\r\nimport * as advisorApi from 'api/advisor';\r\nimport { shapeErrorsForToast } from 'lib/utils/errorUtil';\r\nimport { ErrorToast } from 'lib/components/ErrorToast';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n maxWidth: theme.maxWidth,\r\n padding: theme.spacing(3, 3),\r\n },\r\n content: {\r\n padding: theme.spacing(1),\r\n },\r\n tableBanner: {\r\n fontSize: '1.5em',\r\n padding: theme.spacing(1, 3),\r\n },\r\n table: {\r\n padding: theme.spacing(1, 3),\r\n },\r\n}));\r\n\r\nconst Address = ({\r\n advisorId,\r\n addressLineOne,\r\n addressLineTwo,\r\n addressCity,\r\n addressStateOrProvince,\r\n addressPostalCode,\r\n changeRequests,\r\n onCreateChangeRequest,\r\n}) => {\r\n const classes = useStyles();\r\n const [newAddressLineOne, setNewAddressLineOne] = useState(addressLineOne);\r\n const [newAddressLineTwo, setNewAddressLineTwo] = useState(addressLineTwo);\r\n const [newAddressCity, setNewAddressCity] = useState(addressCity);\r\n const [newAddressStateOrProvince, setNewAddressStateOrProvince] = useState(\r\n addressStateOrProvince\r\n );\r\n const [newAddressPostalCode, setNewAddressPostalCode] = useState(\r\n addressPostalCode\r\n );\r\n const [reasonForChange, setReasonForChange] = useState('');\r\n const [showChangeRequestDialog, setShowChangeRequestDialog] = useState(false);\r\n const [isErrorReasonForChange, setIsErrorReasonForChange] = useState(false);\r\n const maxReasonLength = 1000;\r\n const minReasonLength = 12;\r\n\r\n const onClickChange = () => {\r\n setShowChangeRequestDialog(true);\r\n };\r\n\r\n const onClickDialogAction = (event) => {\r\n if (event === 'ok') {\r\n if (reasonForChange.length < minReasonLength) {\r\n setIsErrorReasonForChange(true);\r\n } else if (\r\n addressLineOne === newAddressLineOne &&\r\n addressLineTwo === newAddressLineTwo &&\r\n addressCity === newAddressCity &&\r\n addressStateOrProvince === newAddressStateOrProvince &&\r\n addressPostalCode === newAddressPostalCode\r\n ) {\r\n toast.error('Nothing changed.');\r\n } else {\r\n setIsErrorReasonForChange(false);\r\n setShowChangeRequestDialog(false);\r\n\r\n // Reset the dialog\r\n setReasonForChange('');\r\n\r\n const changeRequest = {\r\n propertyGroup: 'address',\r\n currentValue: `${addressLineOne} ${addressLineTwo} ${addressCity} ${addressStateOrProvince} ${addressPostalCode}`,\r\n requestedValue: `${newAddressLineOne} ${newAddressLineTwo} ${newAddressCity} ${newAddressStateOrProvince} ${newAddressPostalCode}`,\r\n reasonForChange,\r\n };\r\n advisorApi\r\n .createAccountChangeRequest(advisorId, changeRequest)\r\n .then((response) => {\r\n onCreateChangeRequest(response.data);\r\n toast.success(\r\n `Change request submitted to change account information.`\r\n );\r\n })\r\n .catch((error) => {\r\n toast.error(\r\n ,\r\n {\r\n autoClose: false,\r\n }\r\n );\r\n });\r\n }\r\n } else {\r\n setReasonForChange('');\r\n setShowChangeRequestDialog(false);\r\n }\r\n };\r\n\r\n const onChangeNewAddressLineOne = (event) => {\r\n setNewAddressLineOne(event.target.value);\r\n };\r\n\r\n const onChangeNewAddressLineTwo = (event) => {\r\n setNewAddressLineTwo(event.target.value);\r\n };\r\n\r\n const onChangeNewAddressCity = (event) => {\r\n setNewAddressCity(event.target.value);\r\n };\r\n\r\n const onChangeNewAddressStateOrProvince = (event) => {\r\n setNewAddressStateOrProvince(event.target.value);\r\n };\r\n\r\n const onChangeNewAddressPostalCode = (event) => {\r\n setNewAddressPostalCode(event.target.value);\r\n };\r\n\r\n const onChangeReasonForChange = (event) => {\r\n if (event.target.value.length <= maxReasonLength) {\r\n setReasonForChange(event.target.value);\r\n }\r\n };\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {changeRequests && (\r\n \r\n {`${changeRequests.length} change ${\r\n changeRequests.length !== 1 ? 'requests' : 'request'\r\n }`}\r\n \r\n )}\r\n {changeRequests && changeRequests.length > 0 && (\r\n \r\n \r\n \r\n \r\n Property Group\r\n Current Value\r\n Requested Values\r\n Reason\r\n Submitted\r\n Status\r\n Notes\r\n \r\n \r\n \r\n {orderBy(changeRequests, 'submittedStamp', ['desc']).map(\r\n (item) => (\r\n \r\n {item.propertyGroup}\r\n {item.currentValue}\r\n {item.requestedValue}\r\n {item.reasonForChange}\r\n {`${moment(item.submittedStamp).format(\r\n 'MM/DD/YYYY hh:mm'\r\n )}`}\r\n {item.status}\r\n {item.notes}\r\n \r\n )\r\n )}\r\n \r\n
\r\n
\r\n )}\r\n \r\n \r\n \r\n Address Change Request - Address\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n onClickDialogAction('cancel')}\r\n color='primary'\r\n value='cancel'\r\n variant='outlined'\r\n >\r\n Cancel\r\n \r\n onClickDialogAction('ok')}\r\n color='primary'\r\n value='ok'\r\n autoFocus\r\n variant='contained'\r\n >\r\n Ok\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nAddress.propTypes = {\r\n advisorId: PropTypes.string.isRequired,\r\n addressLineOne: PropTypes.string.isRequired,\r\n addressLineTwo: PropTypes.string,\r\n addressCity: PropTypes.string.isRequired,\r\n addressStateOrProvince: PropTypes.string.isRequired,\r\n addressPostalCode: PropTypes.string.isRequired,\r\n changeRequests: PropTypes.arrayOf(\r\n PropTypes.shape({\r\n id: PropTypes.string,\r\n submittedStamp: PropTypes.string,\r\n currentValue: PropTypes.string,\r\n requestedValue: PropTypes.string,\r\n reasonForChange: PropTypes.string,\r\n status: PropTypes.string,\r\n notes: PropTypes.string,\r\n propertyGroup: PropTypes.string,\r\n })\r\n ),\r\n onCreateChangeRequest: PropTypes.func.isRequired,\r\n};\r\n\r\nAddress.defaultProps = {\r\n addressLineTwo: '',\r\n changeRequests: [],\r\n};\r\n\r\nexport default Address;\r\n","/* eslint max-lines: [2, {\"max\": 275, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useState } from 'react';\r\nimport {\r\n Button,\r\n Dialog,\r\n DialogActions,\r\n DialogContent,\r\n DialogTitle,\r\n Grid,\r\n Table,\r\n TableBody,\r\n TableCell,\r\n TableHead,\r\n TableRow,\r\n TextField,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport PropTypes from 'prop-types';\r\nimport { toast } from 'react-toastify';\r\nimport { orderBy } from 'lodash';\r\nimport moment from 'moment';\r\n\r\nimport * as advisorApi from 'api/advisor';\r\nimport { shapeErrorsForToast } from 'lib/utils/errorUtil';\r\nimport { ErrorToast } from 'lib/components/ErrorToast';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n maxWidth: theme.maxWidth,\r\n padding: theme.spacing(3, 3),\r\n },\r\n content: {\r\n padding: theme.spacing(1),\r\n },\r\n tableBanner: {\r\n fontSize: '1.5em',\r\n padding: theme.spacing(1, 3),\r\n },\r\n table: {\r\n padding: theme.spacing(1, 3),\r\n },\r\n}));\r\n\r\nconst EmailAddresses = ({\r\n advisorId,\r\n emailAddress,\r\n changeRequests,\r\n onCreateChangeRequest,\r\n}) => {\r\n const classes = useStyles();\r\n const [newEmailAddress, setNewEmailAddress] = useState(emailAddress);\r\n const [reasonForChange, setReasonForChange] = useState('');\r\n const [showChangeRequestDialog, setShowChangeRequestDialog] = useState(false);\r\n const [isErrorReasonForChange, setIsErrorReasonForChange] = useState(false);\r\n const maxReasonLength = 1000;\r\n const minReasonLength = 12;\r\n\r\n const onClickChange = () => {\r\n setShowChangeRequestDialog(true);\r\n };\r\n\r\n const onClickDialogAction = (event) => {\r\n if (event === 'ok') {\r\n if (reasonForChange.length < minReasonLength) {\r\n setIsErrorReasonForChange(true);\r\n } else if (emailAddress === newEmailAddress) {\r\n toast.error('Nothing changed.');\r\n } else {\r\n setIsErrorReasonForChange(false);\r\n setShowChangeRequestDialog(false);\r\n\r\n // Reset the dialog.\r\n setReasonForChange('');\r\n\r\n const changeRequest = {\r\n propertyGroup: 'emailaddress',\r\n currentValue: emailAddress,\r\n requestedValue: newEmailAddress,\r\n reasonForChange,\r\n };\r\n advisorApi\r\n .createAccountChangeRequest(advisorId, changeRequest)\r\n .then((response) => {\r\n onCreateChangeRequest(response.data);\r\n toast.success(\r\n `Change request submitted to change account information.`\r\n );\r\n })\r\n .catch((error) => {\r\n toast.error(\r\n ,\r\n {\r\n autoClose: false,\r\n }\r\n );\r\n });\r\n }\r\n } else {\r\n setReasonForChange('');\r\n setShowChangeRequestDialog(false);\r\n }\r\n };\r\n\r\n const onChangeNewEmailAddress = (event) => {\r\n setNewEmailAddress(event.target.value);\r\n };\r\n\r\n const onChangeReasonForChange = (event) => {\r\n if (event.target.value.length <= maxReasonLength) {\r\n setReasonForChange(event.target.value);\r\n }\r\n };\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {changeRequests && (\r\n \r\n {`${changeRequests.length} change ${\r\n changeRequests.length !== 1 ? 'requests' : 'request'\r\n }`}\r\n \r\n )}\r\n {changeRequests && changeRequests.length > 0 && (\r\n \r\n \r\n \r\n \r\n Property Group\r\n Current Value\r\n Requested Values\r\n Reason\r\n Submitted\r\n Status\r\n Notes\r\n \r\n \r\n \r\n {orderBy(changeRequests, 'submittedStamp', ['desc']).map(\r\n (item) => (\r\n \r\n {item.propertyGroup}\r\n {item.currentValue}\r\n {item.requestedValue}\r\n {item.reasonForChange}\r\n {`${moment(item.submittedStamp).format(\r\n 'MM/DD/YYYY hh:mm'\r\n )}`}\r\n {item.status}\r\n {item.notes}\r\n \r\n )\r\n )}\r\n \r\n
\r\n
\r\n )}\r\n \r\n \r\n \r\n Account Change Request - Email Address\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n onClickDialogAction('cancel')}\r\n color='primary'\r\n value='cancel'\r\n variant='outlined'\r\n >\r\n Cancel\r\n \r\n onClickDialogAction('ok')}\r\n color='primary'\r\n value='ok'\r\n autoFocus\r\n variant='contained'\r\n >\r\n Ok\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nEmailAddresses.propTypes = {\r\n advisorId: PropTypes.string.isRequired,\r\n emailAddress: PropTypes.string.isRequired,\r\n changeRequests: PropTypes.arrayOf(\r\n PropTypes.shape({\r\n id: PropTypes.string,\r\n submittedStamp: PropTypes.string,\r\n currentValue: PropTypes.string,\r\n requestedValue: PropTypes.string,\r\n reasonForChange: PropTypes.string,\r\n status: PropTypes.string,\r\n notes: PropTypes.string,\r\n propertyGroup: PropTypes.string,\r\n })\r\n ),\r\n onCreateChangeRequest: PropTypes.func.isRequired,\r\n};\r\n\r\nEmailAddresses.defaultProps = {\r\n changeRequests: [],\r\n};\r\n\r\nexport default EmailAddresses;\r\n","/* eslint max-lines: [2, {\"max\": 275, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useState } from 'react';\r\nimport {\r\n Button,\r\n Dialog,\r\n DialogActions,\r\n DialogContent,\r\n DialogTitle,\r\n Grid,\r\n Table,\r\n TableBody,\r\n TableCell,\r\n TableHead,\r\n TableRow,\r\n TextField,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport PropTypes from 'prop-types';\r\nimport { toast } from 'react-toastify';\r\nimport { orderBy } from 'lodash';\r\nimport moment from 'moment';\r\n\r\nimport * as advisorApi from 'api/advisor';\r\nimport { shapeErrorsForToast } from 'lib/utils/errorUtil';\r\nimport { ErrorToast } from 'lib/components/ErrorToast';\r\nimport { phoneNumberFormatter } from 'lib/utils/format';\r\n\r\nimport { isValidPhoneNumberUnadorned } from 'lib/utils/validation';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n maxWidth: theme.maxWidth,\r\n padding: theme.spacing(3, 3),\r\n },\r\n content: {\r\n padding: theme.spacing(1),\r\n },\r\n tableBanner: {\r\n fontSize: '1.5em',\r\n padding: theme.spacing(1, 3),\r\n },\r\n table: {\r\n padding: theme.spacing(1, 3),\r\n },\r\n}));\r\n\r\nconst PhoneNumber = ({\r\n advisorId,\r\n phoneNumber,\r\n changeRequests,\r\n onCreateChangeRequest,\r\n}) => {\r\n const classes = useStyles();\r\n const [newPhoneNumber, setNewPhoneNumber] = useState(phoneNumber);\r\n const [reasonForChange, setReasonForChange] = useState('');\r\n const [showChangeRequestDialog, setShowChangeRequestDialog] = useState(false);\r\n const [isErrorReasonForChange, setIsErrorReasonForChange] = useState(false);\r\n const maxReasonLength = 1000;\r\n const minReasonLength = 12;\r\n\r\n const onClickChange = () => {\r\n setShowChangeRequestDialog(true);\r\n };\r\n\r\n const onClickDialogAction = (event) => {\r\n if (event === 'ok') {\r\n if (reasonForChange.length < minReasonLength) {\r\n setIsErrorReasonForChange(true);\r\n } else if (phoneNumber === newPhoneNumber) {\r\n toast.error('Nothing changed.');\r\n } else {\r\n setIsErrorReasonForChange(false);\r\n setShowChangeRequestDialog(false);\r\n\r\n // Reset the dialog.\r\n setReasonForChange('');\r\n\r\n const changeRequest = {\r\n propertyGroup: 'phonenumber',\r\n currentValue: phoneNumber,\r\n requestedValue: newPhoneNumber,\r\n reasonForChange,\r\n };\r\n\r\n // Sanitize phone number to ensure no adornments.\r\n if (!isValidPhoneNumberUnadorned(newPhoneNumber)) {\r\n const error =\r\n 'Phone number must be ten digits with no adornments. e.g. 9065551212';\r\n toast.error(\r\n ,\r\n {\r\n autoClose: false,\r\n }\r\n );\r\n } else {\r\n advisorApi\r\n .createAccountChangeRequest(advisorId, changeRequest)\r\n .then((response) => {\r\n onCreateChangeRequest(response.data);\r\n toast.success(\r\n `Change request submitted to change account information.`\r\n );\r\n })\r\n .catch((error) => {\r\n toast.error(\r\n ,\r\n {\r\n autoClose: false,\r\n }\r\n );\r\n });\r\n }\r\n }\r\n } else {\r\n setReasonForChange('');\r\n setShowChangeRequestDialog(false);\r\n }\r\n };\r\n\r\n const onChangeNewPhoneNumber = (event) => {\r\n setNewPhoneNumber(event.target.value);\r\n };\r\n\r\n const onChangeReasonForChange = (event) => {\r\n if (event.target.value.length <= maxReasonLength) {\r\n setReasonForChange(event.target.value);\r\n }\r\n };\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {changeRequests && (\r\n \r\n {`${changeRequests.length} change ${\r\n changeRequests.length !== 1 ? 'requests' : 'request'\r\n }`}\r\n \r\n )}\r\n {changeRequests && changeRequests.length > 0 && (\r\n \r\n \r\n \r\n \r\n Property Group\r\n Current Value\r\n Requested Values\r\n Reason\r\n Submitted\r\n Status\r\n Notes\r\n \r\n \r\n \r\n {orderBy(changeRequests, 'submittedStamp', ['desc']).map(\r\n (item) => (\r\n \r\n {item.propertyGroup}\r\n {item.currentValue}\r\n {item.requestedValue}\r\n {item.reasonForChange}\r\n {`${moment(item.submittedStamp).format(\r\n 'MM/DD/YYYY hh:mm'\r\n )}`}\r\n {item.status}\r\n {item.notes}\r\n \r\n )\r\n )}\r\n \r\n
\r\n
\r\n )}\r\n \r\n \r\n \r\n Account Change Request - Phone Number\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n onClickDialogAction('cancel')}\r\n color='primary'\r\n value='cancel'\r\n variant='outlined'\r\n >\r\n Cancel\r\n \r\n onClickDialogAction('ok')}\r\n color='primary'\r\n value='ok'\r\n autoFocus\r\n variant='contained'\r\n >\r\n Ok\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nPhoneNumber.propTypes = {\r\n advisorId: PropTypes.string.isRequired,\r\n phoneNumber: PropTypes.string.isRequired,\r\n changeRequests: PropTypes.arrayOf(\r\n PropTypes.shape({\r\n id: PropTypes.string,\r\n submittedStamp: PropTypes.string,\r\n currentValue: PropTypes.string,\r\n requestedValue: PropTypes.string,\r\n reasonForChange: PropTypes.string,\r\n status: PropTypes.string,\r\n notes: PropTypes.string,\r\n propertyGroup: PropTypes.string,\r\n })\r\n ),\r\n onCreateChangeRequest: PropTypes.func.isRequired,\r\n};\r\n\r\nPhoneNumber.defaultProps = {\r\n changeRequests: [],\r\n};\r\n\r\nexport default PhoneNumber;\r\n","import React from 'react';\r\nimport {\r\n Grid,\r\n Table,\r\n TableBody,\r\n TableCell,\r\n TableHead,\r\n TableRow,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport PropTypes from 'prop-types';\r\nimport { orderBy } from 'lodash';\r\nimport moment from 'moment';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n maxWidth: theme.maxWidth,\r\n padding: theme.spacing(3, 3),\r\n },\r\n content: {\r\n padding: theme.spacing(1),\r\n },\r\n tableBanner: {\r\n fontSize: '1.5em',\r\n padding: theme.spacing(1, 3),\r\n },\r\n table: {\r\n padding: theme.spacing(1, 3),\r\n },\r\n}));\r\n\r\nconst ChangeRequests = ({ changeRequests }) => {\r\n const classes = useStyles();\r\n\r\n return (\r\n \r\n \r\n {`${changeRequests.length} change ${\r\n changeRequests.length !== 1 ? 'requests' : 'request'\r\n }`}\r\n \r\n \r\n \r\n \r\n \r\n Property Group\r\n Current Value\r\n Requested Values\r\n Reason\r\n Submitted\r\n Status\r\n Notes\r\n \r\n \r\n \r\n {orderBy(changeRequests, 'submittedStamp', ['desc']).map((item) => (\r\n \r\n {item.propertyGroup}\r\n {item.currentValue}\r\n {item.requestedValue}\r\n {item.reasonForChange}\r\n {`${moment(item.submittedStamp).format(\r\n 'MM/DD/YYYY hh:mm'\r\n )}`}\r\n {item.status}\r\n {item.notes}\r\n \r\n ))}\r\n \r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nChangeRequests.propTypes = {\r\n changeRequests: PropTypes.arrayOf(\r\n PropTypes.shape({\r\n id: PropTypes.string,\r\n submittedStamp: PropTypes.string,\r\n currentValue: PropTypes.string,\r\n requestedValue: PropTypes.string,\r\n reasonForChange: PropTypes.string,\r\n status: PropTypes.string,\r\n notes: PropTypes.string,\r\n propertyGroup: PropTypes.string,\r\n })\r\n ),\r\n};\r\n\r\nChangeRequests.defaultProps = {\r\n changeRequests: [],\r\n};\r\n\r\nexport default ChangeRequests;\r\n","/* eslint semi: [\"error\", \"always\", { \"omitLastInOneLineBlock\": true}] */\r\n/* eslint max-lines: [2, {\"max\": 400, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useEffect, useState } from 'react';\r\nimport {\r\n Backdrop,\r\n Grid,\r\n Paper,\r\n Tab,\r\n Tabs,\r\n Typography,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport { Redirect } from 'react-router-dom';\r\n\r\nimport { useSelector } from 'react-redux';\r\nimport { toast } from 'react-toastify';\r\nimport { FSTabPanel } from 'lib/components/Tabs';\r\nimport { filter } from 'lodash';\r\n\r\nimport * as advisorApi from 'api/advisor';\r\nimport { shapeErrorsForToast } from 'lib/utils/errorUtil';\r\nimport { ErrorToast } from 'lib/components/ErrorToast';\r\nimport loading from 'assets/img/BouncingBarsBlack.png';\r\nimport { accountStatusIsActiveOrUnexpiredTrial } from 'lib/utils/account';\r\n\r\nimport Summary from './Summary';\r\n// import auth from 'store/slices/auth';\r\nimport Disclosures from './Disclosures';\r\nimport Designations from './Designations';\r\nimport Account from './Account';\r\nimport Address from './Address';\r\nimport EmailAddresses from './EmailAddresses';\r\nimport PhoneNumber from './PhoneNumber';\r\nimport ChangeRequests from './ChangeRequests';\r\n// import Billing from './ClientSpouse';\r\n// import Security from './Security';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n maxWidth: theme.maxWidth,\r\n padding: theme.spacing(1, 3),\r\n },\r\n paper: {\r\n marginTop: theme.spacing(1),\r\n },\r\n header: {\r\n fontWeight: 'bold',\r\n padding: theme.spacing(3),\r\n },\r\n tab: {\r\n padding: theme.spacing(3, 1), // Shift the tabs to align vertically with the content\r\n },\r\n wrapper: {\r\n alignItems: 'flex-end',\r\n textAlign: 'right',\r\n display: 'inline-flex',\r\n justifyContent: 'right',\r\n margin: 0,\r\n },\r\n backdrop: {\r\n zIndex: theme.zIndex.drawer + 1,\r\n color: '#fff',\r\n },\r\n}));\r\n\r\nconst Advisor = () => {\r\n const classes = useStyles();\r\n const [isLoading, setIsLoading] = useState(true);\r\n const affiliateId = useSelector(({ auth }) => auth.account.affiliateId);\r\n const advisorId = useSelector(({ auth }) => auth.account.id);\r\n const [advisor, setAdvisor] = useState();\r\n const [currentTab, setCurrentTab] = useState(0);\r\n const [changeRequests, setChangeRequests] = useState([]);\r\n const [currentTabTitle, setCurrentTabTitle] = useState('Summary');\r\n const account = useSelector(({ auth }) => auth.account);\r\n\r\n useEffect(() => {\r\n document.title = 'TaxCast - Account';\r\n }, []);\r\n\r\n const handleChangeTab = (_, newTab) => {\r\n setCurrentTab(newTab);\r\n switch (newTab) {\r\n case 0:\r\n setCurrentTabTitle('Summary');\r\n break;\r\n case 1:\r\n setCurrentTabTitle('Disclosures');\r\n break;\r\n case 2:\r\n setCurrentTabTitle('Designations');\r\n break;\r\n case 3:\r\n setCurrentTabTitle('Account');\r\n break;\r\n case 4:\r\n setCurrentTabTitle('Address');\r\n break;\r\n case 5:\r\n setCurrentTabTitle('Email');\r\n break;\r\n case 6:\r\n setCurrentTabTitle('Phone');\r\n break;\r\n case 7:\r\n setCurrentTabTitle('Change Requests');\r\n break;\r\n case 8:\r\n setCurrentTabTitle('Billing');\r\n break;\r\n case 9:\r\n setCurrentTabTitle('Security');\r\n break;\r\n default:\r\n setCurrentTabTitle('');\r\n break;\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n setIsLoading(true);\r\n if (\r\n affiliateId &&\r\n advisorId &&\r\n account &&\r\n account.accountStatus === 'active'\r\n ) {\r\n advisorApi\r\n .getAdvisorAccount(affiliateId, advisorId)\r\n .then((response) => {\r\n setAdvisor(response.data.advisor);\r\n setChangeRequests(response.data.changeRequests ?? []);\r\n setIsLoading(false);\r\n })\r\n .catch((error) => {\r\n setIsLoading(false);\r\n toast.error(\r\n ,\r\n {\r\n autoClose: false,\r\n }\r\n );\r\n })\r\n .finally(() => {\r\n setIsLoading(false);\r\n });\r\n }\r\n }, [affiliateId, advisorId, account]);\r\n\r\n const onSaveDisclosures = (updatedDisclosures) => {\r\n setAdvisor({ ...advisor, ...updatedDisclosures });\r\n };\r\n\r\n const onSaveDesignations = (updatedDesignationsList) => {\r\n setAdvisor({\r\n ...advisor,\r\n designationsList: updatedDesignationsList.join(),\r\n });\r\n };\r\n\r\n const onCreateChangeRequest = (changeRequest) => {\r\n const updatedChangeRequests = [...changeRequests];\r\n updatedChangeRequests.push(changeRequest);\r\n setChangeRequests(updatedChangeRequests);\r\n };\r\n\r\n if (!accountStatusIsActiveOrUnexpiredTrial(account)) {\r\n return ;\r\n }\r\n\r\n if (!advisor) {\r\n return null;\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Account Maintenance - {currentTabTitle}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {/* */}\r\n {/* */}\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n {\r\n return o.propertyGroup === 'account';\r\n })}\r\n onCreateChangeRequest={onCreateChangeRequest}\r\n />\r\n \r\n\r\n \r\n {\r\n return o.propertyGroup === 'address';\r\n })}\r\n onCreateChangeRequest={onCreateChangeRequest}\r\n />\r\n \r\n\r\n \r\n {\r\n return o.propertyGroup === 'emailaddress';\r\n })}\r\n onCreateChangeRequest={onCreateChangeRequest}\r\n />\r\n \r\n\r\n \r\n {\r\n return o.propertyGroup === 'phonenumber';\r\n })}\r\n onCreateChangeRequest={onCreateChangeRequest}\r\n />\r\n \r\n\r\n \r\n \r\n \r\n\r\n {/* \r\n \r\n */}\r\n\r\n {/* \r\n \r\n */}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default Advisor;\r\n","import React, { useEffect } from 'react';\r\nimport { Button, Grid, Paper, Typography, makeStyles } from '@material-ui/core';\r\nimport { useHistory } from 'react-router-dom';\r\nimport {\r\n AuthenticatedTemplate,\r\n UnauthenticatedTemplate,\r\n useMsal,\r\n} from '@azure/msal-react';\r\nimport TaxCastLogo from 'assets/img/Logo512x512.png';\r\nimport * as authActions from 'store/asyncActions/auth';\r\nimport { useDispatch } from 'react-redux';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n maxWidth: theme.maxWidth,\r\n [theme.breakpoints.down('lg')]: {\r\n margin: theme.spacing(1, 3),\r\n },\r\n [theme.breakpoints.up('lg')]: {\r\n margin: theme.spacing(1, 'auto'),\r\n },\r\n },\r\n header: {\r\n marginBottom: theme.spacing(1),\r\n marginTop: theme.spacing(1),\r\n marginLeft: theme.spacing(1),\r\n marginRight: theme.spacing(1),\r\n padding: theme.spacing(1),\r\n },\r\n content: {\r\n padding: theme.spacing(1),\r\n },\r\n divider: {\r\n borderRight: `1px solid ${theme.palette.primary.main}`,\r\n padding: theme.spacing(1),\r\n },\r\n rightCell: {\r\n marginBottom: theme.spacing(1),\r\n marginTop: theme.spacing(1),\r\n marginLeft: theme.spacing(1),\r\n marginRight: theme.spacing(1),\r\n padding: theme.spacing(1),\r\n },\r\n leftCell: {\r\n marginBottom: theme.spacing(1),\r\n marginTop: theme.spacing(1),\r\n marginLeft: theme.spacing(1),\r\n marginRight: theme.spacing(1),\r\n padding: theme.spacing(1),\r\n borderRight: `1px solid ${theme.palette.primary.main}`,\r\n },\r\n}));\r\n\r\nconst Logout = () => {\r\n const classes = useStyles();\r\n const dispatch = useDispatch();\r\n const history = useHistory();\r\n const { instance } = useMsal();\r\n\r\n useEffect(() => {\r\n document.title = 'TaxCast - Logout';\r\n }, []);\r\n\r\n const handleLogoutClick = () => {\r\n instance.logoutPopup();\r\n dispatch(authActions.LOGOUT());\r\n };\r\n\r\n const handleGoBackClick = () => {\r\n history.goBack();\r\n };\r\n\r\n const handleGoToLoginPageClick = () => {\r\n history.push('/login');\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Logout?\r\n \r\n
\r\n \r\n Confirm you want to logout by clicking "Logout"\r\n below.\r\n \r\n
\r\n \r\n \r\n Logout\r\n \r\n  \r\n \r\n Go Back\r\n \r\n \r\n
\r\n \r\n \r\n \r\n Logged Out\r\n \r\n
\r\n \r\n You are logged out of TaxCast. Go to the login page to\r\n login.\r\n \r\n
\r\n \r\n \r\n Go To Login Page\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n TaxCast Logo\r\n \r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default Logout;\r\n","/* eslint max-lines: [2, {\"max\": 500, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useCallback, useEffect, useState } from 'react';\r\nimport { Backdrop, Grid, makeStyles } from '@material-ui/core';\r\nimport {\r\n Point,\r\n VictoryAxis,\r\n VictoryBar,\r\n VictoryChart,\r\n VictoryLabel,\r\n VictoryLegend,\r\n VictoryPortal,\r\n VictoryStack,\r\n VictoryTheme,\r\n} from 'victory';\r\n\r\nimport PropTypes from 'prop-types';\r\nimport axios from 'axios';\r\nimport { filter, findIndex, forEach, range, sortBy } from 'lodash';\r\n\r\nimport loading from 'assets/img/BouncingBarsBlack.png';\r\nimport { baseUrl } from 'constants/api';\r\nimport { currencyFormatter } from 'lib/utils/format';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n padding: theme.spacing(2),\r\n backgroundColor: '#9C9EA1',\r\n },\r\n}));\r\n\r\nconst UnusedOrdinaryBracketCapacity = ({\r\n clientProfileId,\r\n forecastId,\r\n forecast,\r\n calculations,\r\n advisorGivenName,\r\n advisorSurname,\r\n disclosureA,\r\n disclosureB,\r\n disclosureC,\r\n clientGivenName,\r\n clientSurname,\r\n}) => {\r\n const classes = useStyles();\r\n const [brackets, setBrackets] = useState({});\r\n const [effectiveRateYValues, setEffectiveRateYValues] = useState({});\r\n const [isBusyBracketsLoading, setIsBusyBracketsLoading] = useState(true);\r\n const [isBusyComputingOffsets, setIsBusyComputingOffsets] = useState(true);\r\n const [\r\n taxWithinBracketDeltaYValues,\r\n setTaxWithinBracketDeltaYValues,\r\n ] = useState({});\r\n const [fullBracketCountValues, setFullBracketCountValues] = useState({});\r\n const chartHeight = 300;\r\n const forecastYearListSubset = forecast.yearList.slice(\r\n forecast.yearList.indexOf(new Date().getFullYear().toString())\r\n );\r\n\r\n const loadTaxBrackets = useCallback(() => {\r\n axios\r\n .get(\r\n `${baseUrl}/api/client-profiles/${clientProfileId}/forecasts/${forecastId}/ordinary-tax-brackets`\r\n )\r\n .then((response) => {\r\n // ASSUMPTION: forecast.yearList is in increasing order.\r\n let newBrackets = {};\r\n const currentYear = new Date().getFullYear();\r\n for (let i = 0; i < forecast.yearList.length; i += 1) {\r\n if (forecast.yearList[i] >= currentYear) {\r\n const bracketsForTaxYear = filter(response.data, (taxBracket) => {\r\n return taxBracket.taxYear.toString() === forecast.yearList[i];\r\n });\r\n const sortedBracket = sortBy(bracketsForTaxYear, [\r\n (taxBracket) => {\r\n return taxBracket.value;\r\n },\r\n ]);\r\n const bracketEntry = {};\r\n bracketEntry[forecast.yearList[i]] = sortedBracket;\r\n newBrackets = { ...newBrackets, ...bracketEntry };\r\n setBrackets(newBrackets);\r\n }\r\n }\r\n })\r\n .catch(() => {\r\n // TODO: Handle errors\r\n });\r\n setIsBusyBracketsLoading(false);\r\n }, [clientProfileId, forecast.yearList, forecastId]);\r\n\r\n useEffect(() => {\r\n // axios\r\n // .get(\r\n // `${baseUrl}/api/client-profiles/${clientProfileId}/forecasts/${forecastId}/ordinary-tax-brackets`\r\n // )\r\n // .then((response) => {\r\n // // ASSUMPTION: forecast.yearList is in increasing order.\r\n // let newBrackets = {};\r\n // for (let i = 0; i < forecast.yearList.length; i += 1) {\r\n // const bracketsForTaxYear = filter(response.data, (\r\n // taxBracket\r\n // ) => {\r\n // return taxBracket.taxYear.toString() === forecast.yearList[i];\r\n // });\r\n // const sortedBracket = sortBy(bracketsForTaxYear, [\r\n // (taxBracket) => {\r\n // return taxBracket.value;\r\n // },\r\n // ]);\r\n // const bracketEntry = {};\r\n // bracketEntry[forecast.yearList[i]] = sortedBracket;\r\n // newBrackets = { ...newBrackets, ...bracketEntry };\r\n // setBrackets(newBrackets);\r\n // }\r\n // })\r\n // .catch(() => {\r\n // // TODO: Handle errors\r\n // });\r\n // console.log('ue');\r\n loadTaxBrackets();\r\n setIsBusyBracketsLoading(false);\r\n }, [clientProfileId, forecast.yearList, forecastId, loadTaxBrackets]);\r\n\r\n const computeBarHeightInBracket = useCallback(\r\n (taxYear, totalAmount) => {\r\n let result = 0;\r\n if (taxYear && totalAmount) {\r\n // a) Obtain the bracket for the ordinary taxable income.\r\n const bracketIndex = findIndex(brackets[taxYear], (taxBracket) => {\r\n return (\r\n taxBracket.maximum > totalAmount && taxBracket.minimum < totalAmount\r\n );\r\n });\r\n\r\n if (bracketIndex !== -1) {\r\n const bracket = brackets[taxYear][bracketIndex];\r\n\r\n // b) Calculate the amount of tax within the bracket.\r\n const taxAmountWithinBracket = totalAmount - bracket.minimum;\r\n\r\n // c) Determine fraction of amount within the bracket.\r\n const taxFractionWithinBracket =\r\n taxAmountWithinBracket / (bracket.maximum - bracket.minimum);\r\n const tickFractionWithinBracket = taxFractionWithinBracket;\r\n const tickPosition = tickFractionWithinBracket;\r\n\r\n result = tickPosition;\r\n } else {\r\n result = 0; // This is a scenario in which the client pays no taxes.\r\n }\r\n }\r\n return result;\r\n },\r\n [brackets]\r\n );\r\n\r\n const getFullBracketCount = useCallback(\r\n (taxYear, totalAmount) => {\r\n let result = 0;\r\n if (taxYear && totalAmount) {\r\n // a) Obtain the bracket for the ordinary taxable income.\r\n const bracketIndex = findIndex(brackets[taxYear], (taxBracket) => {\r\n return (\r\n taxBracket.maximum > totalAmount && taxBracket.minimum < totalAmount\r\n );\r\n });\r\n\r\n if (bracketIndex !== -1) {\r\n result = bracketIndex;\r\n } else {\r\n result = 0; // This is a scenario in which the client pays no taxes.\r\n }\r\n }\r\n return result;\r\n },\r\n [brackets]\r\n );\r\n\r\n const computeEffectiveRateTick = useCallback(\r\n (taxYear, effectiveRate, filingStatus) => {\r\n let result = chartHeight;\r\n if (taxYear && effectiveRate && filingStatus) {\r\n // a) Obtain the bracket for the ordinary taxable income.\r\n let lowerBracketValue = -1;\r\n let upperBracketValue = -1;\r\n let bracketsBelow = 0;\r\n const bracket = brackets[taxYear];\r\n if (bracket) {\r\n const filingStatusBracket = bracket.filter(\r\n (tb) => tb.filingStatus === filingStatus\r\n );\r\n let withinBracketIndex = 0;\r\n let bracketFound = false;\r\n for (let index = 0; index < filingStatusBracket.length; index += 1) {\r\n if (\r\n !bracketFound &&\r\n effectiveRate <= filingStatusBracket[index].value\r\n ) {\r\n withinBracketIndex = index;\r\n bracketFound = true;\r\n }\r\n if (withinBracketIndex === 0) {\r\n // Lowest Bracket\r\n upperBracketValue = filingStatusBracket[0].value;\r\n lowerBracketValue = 0;\r\n bracketsBelow = 0;\r\n } else {\r\n // All other brackets, including the highest bracket also.\r\n upperBracketValue = filingStatusBracket[withinBracketIndex].value;\r\n lowerBracketValue =\r\n filingStatusBracket[withinBracketIndex - 1].value;\r\n bracketsBelow = withinBracketIndex;\r\n }\r\n }\r\n\r\n // console.log('result', effectiveRate, lowerBracketValue, upperBracketValue, bracketsBelow, withinBracketIndex);\r\n\r\n // b) Calculate the amount of tax within the bracket.\r\n const percentWithinBracket = effectiveRate - lowerBracketValue;\r\n\r\n // c) Determine fraction of amount within the bracket.\r\n const percentFractionWithinBracket =\r\n percentWithinBracket / (upperBracketValue - lowerBracketValue);\r\n const tickFractionWithinBracket =\r\n bracketsBelow + percentFractionWithinBracket;\r\n // console.log('interim values', percentWithinBracket, percentFractionWithinBracket, tickFractionWithinBracket);\r\n\r\n const tickPosition = tickFractionWithinBracket;\r\n\r\n // 8 ticks === {chartHeight} pixels\r\n // {chartHeight}/8 * tickPosition\r\n const pixelPosition = chartHeight - (chartHeight / 8) * tickPosition;\r\n\r\n // console.log('effectiveRate', effectiveRate, pixelPosition, tickPosition, taxYear);\r\n result = pixelPosition;\r\n }\r\n }\r\n return result;\r\n },\r\n [brackets]\r\n );\r\n\r\n // const computeTotalTaxLabelDeltaY = useCallback(\r\n // (taxYear, totalAmount) => {\r\n // let result = 0;\r\n // if (taxYear && totalAmount) {\r\n // const barHeightInPixels = chartHeight; // Represents y-axis value 0\r\n // const maxBracketAmount = 8; // Represents $550,000\r\n // const maxChartDollarAmount = 550000; // Represents 8 ticks\r\n\r\n // // a) Obtain the bracket for the ordinary taxable income.\r\n // const bracketIndex = findIndex(brackets[taxYear], (\r\n // taxBracket\r\n // ) => {\r\n // return (\r\n // taxBracket.maximum > totalAmount && taxBracket.minimum < totalAmount\r\n // );\r\n // });\r\n\r\n // if (bracketIndex !== -1) {\r\n // let tickCount = -1;\r\n // const bracket = brackets[taxYear][bracketIndex];\r\n\r\n // // b) Determine the number of ticks across the bracket.\r\n // // If bracket from a) is NOT lowest bracket AND NOT highest bracket\r\n // // Then tickCount <- currentBracketValue - previousBracketValue (e.g. 32 - 24)\r\n // // If bracket from a) is lowest bracket\r\n // // Then tickCount <- bracketValue (e.g. 10)\r\n // // If bracket fgrom a) is highest bracket\r\n // // Then tickCount <- {maxBracketAmount} - bracketValue (e.g. 50 - 37)\r\n // // Highest\r\n // if (bracketIndex === brackets[taxYear].length - 1) {\r\n // tickCount = maxBracketAmount - bracket.value;\r\n // }\r\n // // Lowest\r\n // else if (bracketIndex === 0) {\r\n // tickCount = bracket.value;\r\n // } else {\r\n // tickCount =\r\n // bracket.value - brackets[taxYear][bracketIndex - 1].value;\r\n // }\r\n\r\n // // c) Convert ordinary taxable income amount to ticks:\r\n // // If bracket from a) is NOT highest bracket\r\n // // Then (dollars per tick) <- (bracketMax - bracketMin) / {tickCount}\r\n // // Else\r\n // // Then (dollarsPerTick) <- ({maxChartDollarAmount} - bracketMin) / {tickCount}\r\n // let dollarsPerTick = 0;\r\n // if (bracketIndex !== brackets[taxYear].length - 1) {\r\n // dollarsPerTick = (bracket.maximum - bracket.minimum) / tickCount;\r\n // } else {\r\n // dollarsPerTick =\r\n // (maxChartDollarAmount - bracket.minimum) / tickCount;\r\n // }\r\n\r\n // // d) Convert tick value to pixels:\r\n // const dollarsPerPixel =\r\n // dollarsPerTick / (maxBracketAmount / barHeightInPixels);\r\n\r\n // // e) Determine the pixel offset.\r\n // // Incorporate the bracket minimum tick value.\r\n // let tickOffset = 0;\r\n // if (bracketIndex !== 0) {\r\n // tickOffset =\r\n // brackets[taxYear][bracketIndex - 1].value *\r\n // (barHeightInPixels / maxBracketAmount);\r\n // }\r\n // const pixelOffset =\r\n // barHeightInPixels - (tickOffset + totalAmount / dollarsPerPixel);\r\n\r\n // result = pixelOffset;\r\n // } else {\r\n // result = barHeightInPixels; // This is a scenario in which the client pays no taxes.\r\n // }\r\n // }\r\n // return result - 5; // Adjust the result by 5 pixels for presentation purposes.\r\n // },\r\n // [brackets]\r\n // );\r\n\r\n useEffect(() => {\r\n const deltaYTickList = {};\r\n const effectiveRateList = {};\r\n const fullBracketCountList = {};\r\n const currentYear = new Date().getFullYear();\r\n forEach(Object.keys(calculations), (taxYear) => {\r\n if (taxYear >= currentYear) {\r\n deltaYTickList[taxYear] = computeBarHeightInBracket(\r\n taxYear,\r\n calculations[taxYear].ordinaryTaxableIncome\r\n );\r\n fullBracketCountList[taxYear] = getFullBracketCount(\r\n taxYear,\r\n calculations[taxYear].ordinaryTaxableIncome\r\n );\r\n effectiveRateList[taxYear] = computeEffectiveRateTick(\r\n taxYear,\r\n calculations[taxYear].effectiveTaxRate,\r\n calculations[taxYear].filingStatus\r\n );\r\n }\r\n });\r\n setEffectiveRateYValues(effectiveRateList);\r\n setIsBusyComputingOffsets(false);\r\n setTaxWithinBracketDeltaYValues(deltaYTickList);\r\n setFullBracketCountValues(fullBracketCountList);\r\n }, [\r\n clientProfileId,\r\n forecast.yearList,\r\n forecastId,\r\n calculations,\r\n computeBarHeightInBracket,\r\n computeEffectiveRateTick,\r\n getFullBracketCount,\r\n ]);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n

\r\n This report is not quite ready but we are giving you a small taste of\r\n what we are working to build.\r\n

\r\n

\r\n Exclusively Prepared for {clientGivenName} {clientSurname} by{' '}\r\n {advisorGivenName} {advisorSurname}\r\n

\r\n {!isBusyBracketsLoading && !isBusyComputingOffsets && (\r\n
\r\n \r\n \r\n \r\n }\r\n />\r\n {forecastYearListSubset.map((taxYear, index) => (\r\n \r\n \r\n \r\n `${currencyFormatter.format(\r\n calculations[taxYear].ordinaryTaxableIncome\r\n )}`\r\n }\r\n labelComponent={\r\n \r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n

\r\n TaxCast Disclosures\r\n

\r\n

\r\n The TaxCast™ visualization allows taxpayers to consider the\r\n potential effects of transaction timing across multiple year\r\n horizons in the hope of optimizing for reduced tax liability. This\r\n optimization process requires a number of assumptions any one of\r\n which may or may not be realized. As a result, actual and expected\r\n results will frequently differ, and those differences may be\r\n material and significant.\r\n

\r\n

\r\n TaxCast™ makes efforts to use what its authors believe to be\r\n accepted interpretations of relevant tax provisions in the\r\n visualizations. However, tax law is subject to amendment in part\r\n or whole at any time and these amendments can apply both\r\n prospectively and retroactively. In addition, there can be no\r\n guarantee the Internal Revenue Service, US Tax Court, or other\r\n body with jurisdictional authority will continue to follow\r\n previously issued guidance or concur with what TaxCast™\r\n understands to be consensus among practitioners. As such, the\r\n Internal Revenue Code and supporting regulations, rulings, court\r\n decisions, and other Internal Revenue Service or US Treasury\r\n Department guidance represent the final authority on the federal\r\n tax consequences of any given transaction. Any U.S. tax advice\r\n contained in TaxCast™ screen visualizations or printed\r\n reports was not intended or written to be used, and cannot be\r\n used, for the purpose of avoiding penalties that may be imposed\r\n under the Internal Revenue Code or applicable federal, state, or\r\n local law.\r\n

\r\n

\r\n TaxCast™’s SmartAudit™ performs a number of validation\r\n checks on selected individual transactions. However,\r\n TaxCast™ makes no guarantee as to the legality or illegality\r\n of any specific transaction or group of transactions regardless of\r\n whether TaxCast™ allows or suppresses those transactions\r\n within the visualization and calculations. TaxCast™ is not\r\n intended to replace and should not be viewed as a substitute for\r\n tax, legal, investment, or financial planning advice rendered by\r\n competent professionals.\r\n

\r\n

\r\n \r\n {advisorGivenName} {advisorSurname} Disclosures\r\n \r\n

\r\n

{disclosureA}

\r\n

{disclosureB}

\r\n

{disclosureC}

\r\n
\r\n )}\r\n
\r\n
\r\n );\r\n};\r\n\r\nUnusedOrdinaryBracketCapacity.propTypes = {\r\n clientProfileId: PropTypes.string.isRequired,\r\n forecastId: PropTypes.string.isRequired,\r\n forecast: PropTypes.objectOf(PropTypes.any).isRequired,\r\n calculations: PropTypes.objectOf(PropTypes.any).isRequired,\r\n advisorGivenName: PropTypes.string.isRequired,\r\n advisorSurname: PropTypes.string.isRequired,\r\n disclosureA: PropTypes.string,\r\n disclosureB: PropTypes.string,\r\n disclosureC: PropTypes.string,\r\n clientGivenName: PropTypes.string.isRequired,\r\n clientSurname: PropTypes.string.isRequired,\r\n};\r\n\r\nUnusedOrdinaryBracketCapacity.defaultProps = {\r\n disclosureA: undefined,\r\n disclosureB: undefined,\r\n disclosureC: undefined,\r\n};\r\n\r\nexport default UnusedOrdinaryBracketCapacity;\r\n","/* eslint react/prop-types: 0 */\r\nimport React, { useEffect, useState } from 'react';\r\nimport { Backdrop, Grid, makeStyles } from '@material-ui/core';\r\nimport { useSelector } from 'react-redux';\r\n// import axios from 'axios';\r\n\r\nimport { Viewer, Worker } from '@react-pdf-viewer/core';\r\nimport '@react-pdf-viewer/core/lib/styles/index.css';\r\n\r\nimport { toolbarPlugin } from '@react-pdf-viewer/toolbar';\r\nimport '@react-pdf-viewer/toolbar/lib/styles/index.css';\r\n\r\nimport loading from 'assets/img/BouncingBarsBlack.png';\r\nimport { baseReportingUrl } from 'constants/api';\r\nimport UnusedOrdinaryBracketCapacity from './UnusedOrdinaryBracketCapacity';\r\n\r\n\r\n// import PDFObject from 'pdfobject';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n marginTop: theme.spacing(1),\r\n },\r\n}));\r\n\r\nconst ReportViewer = () => {\r\n const classes = useStyles();\r\n const [isLocalStorageLoaded, setIsLocalStorageLoaded] = useState(false);\r\n const reportingBaseUrl = `${baseReportingUrl}/api`;\r\n // const reportingBaseUrl =\r\n // 'http://localhost:7071/api';\r\n const [reportState, setReportState] = useState({});\r\n const [isBusy, setIsBusy] = useState(true);\r\n // const [numPages, setNumPages] = useState(null);\r\n const functionsKey =\r\n 'twvFT/INZxwdwV7bYp7Bik0io5GcJJdzt1u/FHPWj2u3g75HDnMC1g==';\r\n const taxCastUserId = useSelector(({ auth }) => auth.account.id);\r\n const accessToken = window.sessionStorage.getItem('taxcast.auth.accessToken');\r\n // const [fileUrl, setFileUrl] = useState(`${reportingBaseUrl}/reports/${reportState.reportName}/advisors/${reportState.advisorId}/client-profiles/${reportState.clientProfileId}/forecasts/${reportState.forecastId}`);\r\n // const [rawPdf, setRawPdf] = useState();\r\n\r\n // const base64ToArrayBuffer = (data) => {\r\n // console.log(data);\r\n // var input = window.btoa(unescape(encodeURIComponent(data))); //.substring(data.indexOf(',') + 1);\r\n // // var input = data.substring(data.indexOf(',') + 1);\r\n // console.log(input);\r\n // return input;\r\n // var binaryString = decodeURIComponent(escape(window.atob(input))); // window.atob(encodeURIComponent(input)); // unescape(decodeURIComponent(input)));\r\n // console.log(binaryString);\r\n // return binaryString;\r\n // var binaryLen = data.length;\r\n // var bytes = new Uint8Array(binaryLen);\r\n // for (var i = 0; i < binaryLen; i++) {\r\n // var ascii = binaryString.charCodeAt(i);\r\n // bytes[i] = ascii;\r\n // }\r\n // console.log(bytes);\r\n // return bytes;\r\n // };\r\n\r\n const onDocumentLoadSuccess = () => {\r\n // // console.log(documentProxy);\r\n // setNumPages(7);\r\n // // setFileUrl(base64ToArrayBuffer(documentProxy));\r\n setIsBusy(false);\r\n };\r\n\r\n const deserializeStateFromLocalStorage = () => {\r\n const state = localStorage.getItem('report-state');\r\n const deserializedState = JSON.parse(state);\r\n setReportState(deserializedState);\r\n setIsLocalStorageLoaded(true);\r\n // setFileUrl(`${reportingBaseUrl}/repodrts/${deserializedState.reportName}/advisors/${deserializedState.advisorId}/client-profiles/${deserializedState.clientProfileId}/forecasts/${deserializedState.forecastId}`);\r\n };\r\n\r\n useEffect(() => {\r\n if (!isLocalStorageLoaded) {\r\n deserializeStateFromLocalStorage();\r\n }\r\n // else {\r\n // axios.get(`${reportingBaseUrl}/reports/${reportState.reportName}/advisors/${reportState.advisorId}/client-profiles/${reportState.clientProfileId}/forecasts/${reportState.forecastId}`)\r\n // .then((response) => {\r\n // if (response.status === 200) {\r\n // // console.log(response);\r\n // // const embedValue = `data:application/pdf;base64,${response.data}`;\r\n // // console.log(embedValue);\r\n // // setFileUrl(base64ToArrayBuffer(response.data));\r\n // // PDFObject.embed(`${embedValue}`, \"#pdfViewer\");\r\n // } else {\r\n // console.log(response.status);\r\n // }\r\n // })\r\n // .catch((error) => {\r\n // console.error(error);\r\n // });\r\n\r\n // }\r\n }, [isLocalStorageLoaded]);\r\n\r\n const toolbarPluginInstance = toolbarPlugin({});\r\n const { Toolbar } = toolbarPluginInstance;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {reportState &&\r\n reportState.reportType === 'application/pdf' &&\r\n isLocalStorageLoaded && (\r\n \r\n {/*
*/}\r\n \r\n {(props) => {\r\n const {\r\n EnterFullScreen,\r\n Print,\r\n Zoom,\r\n ZoomIn,\r\n ZoomOut,\r\n } = props;\r\n return (\r\n <>\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n );\r\n }}\r\n
\r\n \r\n
\r\n )}\r\n {reportState && reportState.reportType === 'visualization' && (\r\n \r\n \r\n \r\n )}\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default ReportViewer;\r\n","import React, { useEffect } from 'react';\r\nimport {\r\n AuthenticatedTemplate,\r\n UnauthenticatedTemplate,\r\n} from '@azure/msal-react';\r\nimport { Redirect, useLocation } from 'react-router-dom';\r\nimport { useDispatch } from 'react-redux';\r\nimport { prefActions } from 'store/slices/pref';\r\n\r\nconst LandingPage = () => {\r\n const dispatch = useDispatch();\r\n const queryString = new URLSearchParams(useLocation().search);\r\n\r\n useEffect(() => {\r\n // options: try | buy\r\n dispatch(\r\n prefActions.SET_WEB_SITE_CHOICE(\r\n queryString.has('choice') ? queryString.get('choice') : 'app'\r\n )\r\n );\r\n });\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default LandingPage;\r\n","import React from 'react';\r\nimport { Button, Grid, Paper, Typography, makeStyles } from '@material-ui/core';\r\nimport ArrowBackIcon from '@material-ui/icons/ArrowBack';\r\nimport TaxCastLogo from 'assets/img/Logo512x512.png';\r\nimport { useHistory } from 'react-router-dom';\r\nimport { TaxCastWebVersion } from 'constants/settings';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n width: '100%',\r\n padding: theme.spacing(4),\r\n },\r\n}));\r\n\r\nconst About = () => {\r\n const classes = useStyles();\r\n const history = useHistory();\r\n\r\n const handleClickBack = () => history.goBack();\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n TaxCast version {TaxCastWebVersion}\r\n \r\n \r\n \r\n TaxCast Logo\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default About;\r\n","import React, { useRef, useState } from 'react';\nimport { IconButton, TextField, makeStyles } from '@material-ui/core';\nimport { Clear as ClearIcon, Search as SearchIcon } from '@material-ui/icons';\nimport debounce from 'lodash/debounce';\nimport PropTypes from 'prop-types';\n\nconst useStyles = makeStyles(() => ({\n root: { width: '100%' },\n}));\n\nconst FSSearchBar = ({ id, placeholder, onChange }) => {\n const classes = useStyles();\n const inputEl = useRef(null);\n const [isEmpty, setEmpty] = useState(true);\n\n const search = () => {\n setEmpty(!inputEl.current.value);\n onChange(inputEl.current.value);\n };\n const clear = () => {\n inputEl.current.value = '';\n inputEl.current.focus();\n search();\n };\n\n const bouncedSearch = debounce(search, 300);\n\n return (\n <>\n \n \n \n ) : (\n \n \n \n ),\n }}\n onChange={bouncedSearch}\n inputRef={inputEl}\n />\n \n );\n};\n\nFSSearchBar.propTypes = {\n placeholder: PropTypes.string,\n id: PropTypes.string.isRequired,\n onChange: PropTypes.func.isRequired,\n};\n\nFSSearchBar.defaultProps = {\n placeholder: 'Search',\n};\n\nexport default FSSearchBar;\n","/* eslint max-lines: [2, {\"max\": 250, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useEffect, useState } from 'react';\r\nimport {\r\n Backdrop,\r\n Box,\r\n Button,\r\n ButtonGroup,\r\n CircularProgress,\r\n Collapse,\r\n Grid,\r\n IconButton,\r\n Paper,\r\n Table,\r\n TableBody,\r\n TableCell,\r\n TableContainer,\r\n TableHead,\r\n TableRow,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport ArrowBackIcon from '@material-ui/icons/ArrowBack';\r\nimport KeyboardArrowDownIcon from '@material-ui/icons/KeyboardArrowDown';\r\nimport KeyboardArrowUpIcon from '@material-ui/icons/KeyboardArrowUp';\r\nimport { useHistory } from 'react-router-dom';\r\n\r\nimport { countBy, sortBy, sortedUniqBy } from 'lodash';\r\nimport axios from 'axios';\r\nimport { toast } from 'react-toastify';\r\n\r\nimport SearchBar from 'lib/components/SearchBar';\r\nimport * as glossaryApi from 'api/glossary';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n maxWidth: theme.maxWidth,\r\n [theme.breakpoints.down('lg')]: {\r\n margin: theme.spacing(1, 1),\r\n },\r\n [theme.breakpoints.up('lg')]: {\r\n margin: theme.spacing(1, 'auto'),\r\n },\r\n },\r\n backdrop: {\r\n zIndex: theme.zIndex.drawer + 1,\r\n color: '#fff',\r\n },\r\n row: {\r\n '& > *': {\r\n borderBottom: 'unset',\r\n },\r\n },\r\n}));\r\n\r\nconst Glossary = () => {\r\n const classes = useStyles();\r\n const history = useHistory();\r\n const [glossaryEntries, setGlossaryEntries] = useState([]);\r\n const [selectedEntry, setSelectedEntry] = useState();\r\n const [filteredEntries, setFilteredEntries] = useState([]);\r\n const [quickFilterList, setQuickFilterList] = useState([]);\r\n const [isLoading, setIsLoading] = useState(true);\r\n\r\n const buildQuickFilterList = (entries) => {\r\n const firstValueList = entries\r\n .map((entry) => {\r\n return Number(entry.term.substring(0, 1))\r\n ? '#'\r\n : entry.term.substring(0, 1).toUpperCase();\r\n })\r\n .sort();\r\n let sortedUniqueList = sortedUniqBy(firstValueList);\r\n if (sortedUniqueList.length > 28) {\r\n // 28 === \"All\", \"#\", plus all 26 letters of the Phoenician alphabet.\r\n const occurrenceCountObject = countBy(firstValueList);\r\n const sortedOccurrenceCountList = Object.keys(occurrenceCountObject).sort(\r\n (x, y) => occurrenceCountObject[y] - occurrenceCountObject[x]\r\n );\r\n sortedOccurrenceCountList.splice(9);\r\n sortedUniqueList = [...sortedOccurrenceCountList.sort()];\r\n }\r\n sortedUniqueList.splice(0, 0, 'All');\r\n setQuickFilterList(sortedUniqueList);\r\n };\r\n\r\n useEffect(() => {\r\n let unmounted = false;\r\n const tokenSource = axios.CancelToken.source();\r\n // Load the glossary from the server.\r\n glossaryApi\r\n .getGlossaryEntryList()\r\n .then((response) => {\r\n if (!unmounted) {\r\n // Sort the glossary by term.\r\n const entries = sortBy(response.data, (item) => {\r\n return item.term.toLowerCase();\r\n });\r\n setGlossaryEntries(entries);\r\n setFilteredEntries(entries);\r\n buildQuickFilterList(entries);\r\n setIsLoading(false);\r\n }\r\n })\r\n .catch((error) => {\r\n if (!unmounted) {\r\n toast.error(`An error occurred: ${error}`, { autoClose: false });\r\n setIsLoading(false);\r\n }\r\n });\r\n\r\n return () => {\r\n unmounted = true;\r\n tokenSource.cancel('unmounted');\r\n };\r\n }, []);\r\n\r\n // A helper function to allow interactive filtering by typing in the 'search' field.\r\n // NOTE: This algorithm performs a 'startsWith' comparison.\r\n const filterGlossaryEntries = (filterValue) => {\r\n let filteredList = [...glossaryEntries];\r\n if (filterValue && filterValue.length > 0) {\r\n if (filterValue === '#') {\r\n filteredList = glossaryEntries.filter((entry) => {\r\n return Number(entry.term.substring(0, 1));\r\n });\r\n } else {\r\n filteredList = glossaryEntries.filter((entry) => {\r\n return entry.term.toLowerCase().startsWith(filterValue.toLowerCase());\r\n });\r\n }\r\n }\r\n setFilteredEntries([\r\n ...sortBy(filteredList, (item) => item.term.toLowerCase()),\r\n ]);\r\n };\r\n\r\n const handleQuickFilterButtonClick = (quickFilter) => {\r\n filterGlossaryEntries(quickFilter === 'All' ? '' : quickFilter);\r\n };\r\n\r\n const handleListItemClick = (id) => {\r\n const foundEntry = glossaryEntries.find((entry) => {\r\n return entry.id === id;\r\n });\r\n if (foundEntry && selectedEntry) {\r\n if (foundEntry.id === selectedEntry.id) {\r\n // Close\r\n setSelectedEntry(null);\r\n } else {\r\n // Open\r\n setSelectedEntry(foundEntry);\r\n }\r\n } else {\r\n setSelectedEntry(foundEntry);\r\n }\r\n };\r\n\r\n const handleClickBack = () => history.goBack();\r\n\r\n return (\r\n <>\r\n {isLoading && (\r\n \r\n \r\n \r\n )}\r\n {!isLoading && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {quickFilterList.map((item) => (\r\n handleQuickFilterButtonClick(item)}\r\n >\r\n {item}\r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Term\r\n \r\n \r\n \r\n {filteredEntries.map((item) => (\r\n \r\n \r\n \r\n handleListItemClick(item.id)}\r\n >\r\n {selectedEntry && selectedEntry.id === item.id ? (\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n {item.term}\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n {item.description}\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default Glossary;\r\n","import axios from 'axios';\r\n\r\nimport { baseUrl } from 'constants/api';\r\n\r\nexport const getGlossaryEntryList = () =>\r\n axios.get(`${baseUrl}/api/glossary-entries/`);\r\n\r\nexport const getGlossaryEntry = (entryId) =>\r\n axios.get(`${baseUrl}/api/glossary-entries/${entryId}`);\r\n","/* eslint-disable import/prefer-default-export */\r\n/* eslint max-lines: [2, {\"max\": 500, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nexport const provisions = {\r\n currentProvisions: [\r\n {\r\n provision: 'Alimony Received',\r\n section: '1-Ordinary Income',\r\n taxReturnReference: 'Schedule 1 Item 2a',\r\n notes: '',\r\n },\r\n {\r\n provision: 'Annuities',\r\n section: '1-Ordinary Income',\r\n taxReturnReference: 'Form 1040 Item 5B',\r\n notes:\r\n 'Enter taxable amount of non-qualified annuity distributions. The insurer should report this information on a Form 1099-R',\r\n },\r\n {\r\n provision: 'Farm Income',\r\n section: '1-Ordinary Income',\r\n taxReturnReference: 'Schedule 1 Item 6',\r\n notes:\r\n 'Drag a Farm Income transaction tile into the desired year of the Canvas in the Ordinary Income section. On the tax return, this amount will be supported by a Schedule F and it can be a gain or loss.',\r\n },\r\n {\r\n provision: 'Interest',\r\n section: '1-Ordinary Income',\r\n taxReturnReference: 'Form 1040 Item 2B',\r\n notes:\r\n 'Enter amount of interest income in the Ordinary Income section using an Interest Income transaction tile. Drag the transaction tile into the desired Ordinary Income year. The bank or other financial institution should report this information on a Form 1099-INT',\r\n },\r\n {\r\n provision: 'IRA & Retirement Distributions',\r\n section: '1-Ordinary Income',\r\n taxReturnReference: 'Form 1040 Item 4B',\r\n notes:\r\n 'Enter taxable amount of retirement distributions. The retirement custodian should report this information on a Form 1099-R',\r\n },\r\n {\r\n provision: 'Ordinary Dividends',\r\n section: '1-Ordinay Income',\r\n taxReturnReference: 'Form 1040 Item 2B',\r\n notes: '',\r\n },\r\n {\r\n provision: 'Pensions',\r\n section: '1-Ordinary Income',\r\n taxReturnReference: 'Form 1040 Item 4B',\r\n notes: '',\r\n },\r\n {\r\n provision: 'S Corp Distributions',\r\n section: '1-Ordinary Income',\r\n taxReturnReference: 'Schedule 1 Item 5',\r\n notes:\r\n 'Drag an S Corp Distribution tile into the Ordinary Income section of the applicable year. The TaxCast dialog box will include prompts to duplicate/spread the transaction and to calculate the allowable QBID.',\r\n },\r\n {\r\n provision: 'Short-term Capital Gains',\r\n section: '1-Ordinary Income',\r\n taxReturnReference: 'Form 1040 Line 3b',\r\n notes: '',\r\n },\r\n {\r\n provision: 'Social Security',\r\n section: '1-Ordinary Income',\r\n taxReturnReference: 'Form 1040 Item 6A',\r\n notes:\r\n 'Drag a transaction tile from the left toolbox (Ordinary Income section) into the desired year on the canvas. Enter the gross annual Social Security benefit prior to any Medicare premium deductions in the dialog box. A user can manually enter Social Security amounts for each year on the canvas or use the “Distribute/Split” option to have TaxCast adjust subsequent benefit amounts by a desired percentage or fixed dollar amount. TaxCast will calculate the taxation of the gross Social Security benefit using the other income information entered onto the canvas.',\r\n },\r\n {\r\n provision: 'Sole Proprietorship Income',\r\n section: '1-Ordinary Income',\r\n taxReturnReference: 'Schedule 1 Item 3',\r\n notes:\r\n 'Drag a Sole Proprietorship Income tile into the Ordinary Income section of the applicable year. The TaxCast dialog box will include prompts to duplicate/spread the transaction and to calculate the allowable QBID.',\r\n },\r\n {\r\n provision: 'Wages',\r\n section: '1-Ordinary Income',\r\n taxReturnReference: 'Form 1040 Item 1',\r\n notes:\r\n 'Drag a Wages transaction tile into the desired year on the Canvas. The TaxCast dialog bix will allow you to designate whether the wages were earned by the taxpayer or the spouse. The dialog box will also allow quick entry for multiple years.',\r\n },\r\n {\r\n provision: 'Long-term Capital Gains',\r\n section: '2-Capital Gains',\r\n taxReturnReference: '',\r\n notes: '',\r\n },\r\n {\r\n provision: 'Qualified Dividends',\r\n section: '2-Capital Gains',\r\n taxReturnReference: 'Form 1040 Line 3a',\r\n notes: '',\r\n },\r\n {\r\n provision: 'Alimony Deduction',\r\n section: '3-ATL Deductions',\r\n taxReturnReference: '',\r\n notes: '',\r\n },\r\n {\r\n provision: 'Health Savings Accounts',\r\n section: '3-ATL Deductions',\r\n taxReturnReference: '',\r\n notes: '',\r\n },\r\n {\r\n provision: 'Retirement Contributions',\r\n section: '3-ATL Deductions',\r\n taxReturnReference: '',\r\n notes: '',\r\n },\r\n {\r\n provision: 'Student Loan Interest Deduction',\r\n section: '3-ATL Deductions',\r\n taxReturnReference: '',\r\n notes: '',\r\n },\r\n {\r\n provision: 'Charitable Cash Contributions',\r\n section: '4-Itemized Deductions',\r\n taxReturnReference: 'Schedule A Line 11',\r\n notes:\r\n 'Drag a Charitable Contribution tile from the toolbox into the desired year on the canvas. In the dialog box, enter the gross value of the contribution. Using the dropdown menu, select “cash” as the type of contribution. TaxCast will automatically calculate the allowable deduction given the taxpayers’s reported income and carryover any unused deduction as a system transaction tile. TaxCast will include this deduction in the total of all itemized deductions and then automatically use the higher of the standard or itemized deductions.',\r\n },\r\n {\r\n provision: 'Charitable Contributions Carryover',\r\n section: '4-Itemized Deductions',\r\n taxReturnReference: 'Schedule A Line 13',\r\n notes:\r\n 'Drag a Charitable Contribution tile from the toolbox into the beginning year on the canvas for any charitable contribution carryover. In the dialog box, enter the gross value of the contribution. Using the dropdown menu, select the type of contribution. TaxCast will automatically calculate the allowable deduction given the taxpayers’s reported income and carryover any unused deduction as a system transaction tile.',\r\n },\r\n {\r\n provision: 'Charitable Non-Cash Deductions',\r\n section: '4-Itemized Deductions',\r\n taxReturnReference: 'Schedule A Line 12',\r\n notes:\r\n 'Drag a Charitable Contribution tile from the toolbox into the desired year on the canvas. In the dialog box, enter the gross value of the contribution. Using the dropdown menu, select the specific type of non-cash contribution. TaxCast will automatically calculate the allowable deduction given the taxpayers’s reported income and carryover any unused deduction as a system transaction tile. TaxCast will include this deduction in the total of all itemized deductions and then automatically use the higher of the standard or itemized deductions.',\r\n },\r\n {\r\n provision: 'Medical Expense Deduction',\r\n section: '4-Itemized Deductions',\r\n taxReturnReference: 'Schedule A Line 1',\r\n notes:\r\n 'Drag a Medical Expense tile from the toolbox into the applicable year on the canvas. A user can enter either an aggregate of all unreimbursed medical expenses (i.e., not paid by insurance) or individual unreimbursed medical expenses. TaxCast will calculate the maximum allowable Medical Expense itemized deduction relative to the taxpayer’s adjusted gross income (AGI). TaxCast will include this deduction in the total of all itemized deductions and then automatically use the higher of the standard or itemized deductions.',\r\n },\r\n {\r\n provision: 'Mortgage Interest Deduction',\r\n section: '4-Itemized Deductions',\r\n taxReturnReference: 'Schedule A Line 8',\r\n notes:\r\n 'Drag a mortgage interest transaction tile into the desired year on the canvas. TaxCast will include the interest in the total of all itemized deductions and then compare that total to the standard deduction. TaxCast will automatically use the higher of the standard or itemized deductions.',\r\n },\r\n {\r\n provision: 'Other Itemized Deductions',\r\n section: '4-Itemized Deductions',\r\n taxReturnReference: 'Schedule A Line 16',\r\n notes:\r\n \"Drag an 'other' transaction tile into the desired year on the canvas. TaxCast will include the reported deduction amount in the total of all itemized deductions and then compare that total to the standard deduction. TaxCast will automatically use the higher of the standard or itemized deductions. Note TaxCast does not perform other validation tests on entered Other Itemized Deduction transactions.\",\r\n },\r\n {\r\n provision: 'Qualified Business Income Deduction',\r\n section: '5-System Calculation',\r\n taxReturnReference: 'Form 1040 Line 13; Form 8995; Form 8995A;',\r\n notes:\r\n 'Drag a transaction tile for an S Corp Distribution or Sole Proprietorship onto the desired year of the Canvas. The TaxCast dialog box will include the necessary prompts for the additional information required to calculate both the individual QBID and aggregate QBID if there are multiple sources of QBI income.',\r\n },\r\n {\r\n provision: 'Tax Cut & Jobs Act Sunset',\r\n section: '5-System Calculation',\r\n taxReturnReference: '',\r\n notes:\r\n 'This enhancement will allow the user to select sunset of the TCJA rates or continued inflation of the brackets and thresholds.',\r\n },\r\n ],\r\n futureProvisions: [\r\n {\r\n provision: 'Casualty and Theft Losses',\r\n availability: 'Beta',\r\n notes:\r\n 'Drag a casualty/theft loss transaction tile onto the canvas for the year of loss. Note each casualty or theft loss should have a separate tile to allow TaxCast to calculate the individual and aggregate limits for casualty and theft losses. TaxCast does not verify that the casualty loss qualifies under the tax code’s disaster declaration provisions.',\r\n },\r\n {\r\n provision: 'American Opportunity Credit',\r\n availability: 'GA',\r\n notes:\r\n \"This enhancement will ask questions within a new 'college cost' dialogue box to determine whether higher education expenses qualify for this credit. TaxCast will then calculate income eligibility using other information already entered onto the canvas for that year and use any allowable credit to reduce ordinary tax liability.\",\r\n },\r\n {\r\n provision: 'Bracket Inflation',\r\n availability: 'GA',\r\n notes:\r\n 'TaxCast currently assumes future tax brackets and thresholds (i.e., standard deduction amounts, IRA contribution amounts, etc.,) are the same as the 2021 amounts. This enhancement will allow the advisor to use either a system assumption or a custom inflation assumption amount for future amounts.',\r\n },\r\n {\r\n provision: 'Capital Loss Carryforward',\r\n availability: 'GA',\r\n notes: '',\r\n },\r\n {\r\n provision: 'Capital Loss Carryover',\r\n availability: 'GA',\r\n notes: 'Track the expiration of Capital Loss carryovers',\r\n },\r\n {\r\n provision: 'Child Tax Credit',\r\n availability: 'GA',\r\n notes:\r\n 'TaxCast will calculate eligible child credit based upon income information entered onto the canvas and family information as entered for the client’s profile. Eligible credit amounts will be reflected as reductions of the calculated federal tax liability.',\r\n },\r\n {\r\n provision: 'Lifetime Learning Credit',\r\n availability: 'GA',\r\n notes:\r\n 'This enhancement will ask questions within a new “college cost” dialogue box to determine whether higher education expenses qualify for this credit. TaxCast will then calculate income eligibility using other information already entered onto the canvas for that year and use any allowable credit to reduce ordinary tax liability.',\r\n },\r\n {\r\n provision: 'Qualified Small Business Deduction',\r\n availability: 'GA',\r\n notes:\r\n 'Initial functionality will include a toggle within the dialogue box asking users about eligibility. For eligible entities, TaxCast will then apply any applicable income limits. Future releases will contain more detailed questionnaires to guide users unfamiliar with this deduction through the determination of eligibility.',\r\n },\r\n {\r\n provision: 'Tax Exempt Income',\r\n availability: 'GA',\r\n notes:\r\n 'Although exempt from federal income taxes, municipal bond income does affect the taxation of Social Security benefits. This enhancement will allow the user to enter tax exempt bond income as a transaction tile that will be used in that calculation.',\r\n },\r\n {\r\n provision: 'Medicare Surtax on Wages and Self-Employment Income',\r\n availability: 'Q1 2022',\r\n notes:\r\n 'This enhancement will calculate the Medicare Surtax on Wages and Self-Employment Income using transaction tiles of a given year and include that amount as a “surtax” in the Summary section.',\r\n },\r\n {\r\n provision: 'Net Investment Income Tax',\r\n availability: 'Q1 2022',\r\n notes:\r\n 'This enhancement will calculate the NIIT using transaction tiles of a given year and include that amount as a “surtax” in the Summary section.',\r\n },\r\n {\r\n provision: 'Net Operating Loss Carryforward',\r\n availability: 'Q2 2022',\r\n notes:\r\n 'TaxCast presently assumes any unused losses within a given tax year “expire” but users can manually set new transaction tiles for the amounts of any net operating loss carryforwards. This enhancement will create system tiles for these unused losses and carry them forward after validation checks for any limits (normally limited to 80% of taxable income).',\r\n },\r\n {\r\n provision: 'Roth IRA',\r\n availability: 'Q2 2022',\r\n notes:\r\n 'Tax Cast does not presently reflect Roth IRA contributions because Roth IRAs do not result in a current tax benefit. This enhancement will allow users to toggle between Roth IRA and traditional IRA within the transaction tile dialogue box so that the current cash flow effect of Roth vs traditional contributions can be validated. The enhancement will also include testing to verify Roth IRA contribution eligibility.',\r\n },\r\n {\r\n provision: 'Self-employed Retirement Plans',\r\n availability: 'Q2 2022',\r\n notes: '',\r\n },\r\n {\r\n provision: 'US Savings Bond Exclusion for Higher Education',\r\n availability: 'Q2 2022',\r\n notes:\r\n 'This enhancement will include a section on the transaction tile dialogue box asking the user whether the US Savings Bonds proceeds were used for qualified higher education expenses. If the user provides a positive answer, TaxCast will validate the exclusion based upon the taxpayer’s income.',\r\n },\r\n {\r\n provision: 'Farm Loss Carryover',\r\n availability: 'Q3 2022',\r\n notes:\r\n 'TaxCast presently requires the user to manually enter the amount of any desired Farm Loss carryover as a separate transaction tile. In this enhancement, TaxCast will include a toggle within the transaction tile dialogue box to allow the user to choose whether the loss is carried back or forward. TaxCast will then calculate the allowable loss carryover and create a system tile(s) within the affected years. To edit the Farm loss, the user will adjust the transaction tile in the original year of loss.',\r\n },\r\n {\r\n provision: 'Medicare Income Related Monthly Adjustment Amount',\r\n availability: 'Q3 2022',\r\n notes:\r\n \"This enhancement will calculate the Medicare IRMAA rates and include them as a 'surtax' within the Summary section.\",\r\n },\r\n {\r\n provision: 'Self-employed Health Insurance',\r\n availability: 'Q3 2022',\r\n notes: '',\r\n },\r\n {\r\n provision: 'Alimony Income & Deduction',\r\n availability: 'Q3 2022',\r\n notes:\r\n 'TaxCast presently allows users to enter alimony income and deductions without error checking although it does include a cautionary reminder that only divorces from 2018 or prior are considered for income tax purposes. This enhancement will include questions within the transaction tile dialogue box to error check this entry.',\r\n },\r\n {\r\n provision: 'Depreciation Recapture',\r\n availability: 'Q4 2022',\r\n notes:\r\n 'TaxCast presently accounts for short and long-term capital gains. This enhancement will add a questionnaire to the transaction tile dialogue box to request recapture basis so that the differential tax can be calculated.',\r\n },\r\n {\r\n provision: 'IRA Deduction Eligibility',\r\n availability: 'Q4 2022',\r\n notes:\r\n 'TaxCast presently allows users to input IRA deduction without error checking eligibility. This enhancement will include a questionnaire within the transaction tile dialogue box asking a series of questions to verify IRA deduction eligibility.',\r\n },\r\n {\r\n provision: 'Passive Loss Limits',\r\n availability: '2023',\r\n notes:\r\n 'TaxCast does not presently limit passive loss activities if the user enters a transaction tile for such losses. This enhancement will include a series of questions within the transaction tile dialogue box to determine whether a loss should be partially or fully disallowed given the nature of the activity and the taxpayer’s income.',\r\n },\r\n {\r\n provision: 'Retirement Plan Early Distribution Penalty',\r\n availability: '2023',\r\n notes:\r\n \"TaxCast presently assumes that all retirement plan withdrawals are free of the premature distribution penalty regardless of the taxpayer’s age. This enhancement will consider the taxpayer’s age and include a dropdown menu that allows users to negate a possible penalty by selecting one of the available exceptions. For withdrawals not eligible for an exception to the penalty, TaxCast will calculate a premature distribution penalty and include it within the 'surtax' section.\",\r\n },\r\n {\r\n provision: 'S Corp Shareholder Health Insurance Premiums',\r\n availability: '2023',\r\n notes:\r\n 'TaxCast does not presently include either the imputed income related to S Corp shareholder premiums or the deduction. This enhancement will include the necessary tile to allow TaxCast to calculate both items.',\r\n },\r\n {\r\n provision: 'Self Employed Retirement Plan',\r\n availability: '2023',\r\n notes:\r\n 'TaxCast presently allows users to input amounts for retirement plan contributions without error checking. This enhancement will include several questions within the transaction tile dialogue box to determine maximum deductible retirement plan contributions for self-employed individuals.',\r\n },\r\n {\r\n provision: 'Alternative Minimum Tax',\r\n availability: '2023',\r\n notes: '',\r\n },\r\n {\r\n provision: 'Premature Retirement Plan Distribution Penalty',\r\n availability: '2023',\r\n notes:\r\n \"TaxCast presently allows users to enter this penalty as an 'Other' above-the-line deduction but does not calculate penalties on any premature distributions. The enhancement will include questions within the transaction tile dialogue box to determine whether the retirement plan distribution qualifies for an exception. Any penalty will be included as a “surtax” within the Summary section.\",\r\n },\r\n {\r\n provision: 'Adoption Credit',\r\n availability: '2023',\r\n notes: '',\r\n },\r\n {\r\n provision: 'Foreign Taxes, Credits & Offsets',\r\n availability: '2023',\r\n notes:\r\n 'TaxCast does not calculate credits or offsets related to foreign taxes or the effect of foreign transactions on such items as the Net Investment Income Tax',\r\n },\r\n {\r\n provision: 'Gross Income Under Section 911, 931, or 933',\r\n availability: '2023',\r\n notes: '',\r\n },\r\n {\r\n provision: 'Qualified Business Income Deduction Qualified Property',\r\n availability: '2023',\r\n notes:\r\n \"For certain 'favored' pass-through businesses whose owners exceed the income phase-out thresholds, the Qualified Business Income Deduction (the 'QBID' under Section 199A) considers 'qualified property' owned by the business when calculating the maximum deduction. Qualified Property is generally the cost basis prior to depreciation for property placed into service within the prior ten years. TaxCast does not track the ages, acquisition cost, or accumulated depreciation of capital assets. TaxCast does all users to input gross capital asset amounts for inclusion in the QBID calculation.\",\r\n },\r\n {\r\n provision: 'Refundable Tax Credits',\r\n availability: '2023',\r\n notes:\r\n 'Various tax credits including portions of the Child Tax Credit or American Opportunity Credit are refundable meaning a taxpayer can receive a refund that exceeds their respective tax liability. TaxCast will calculate a zero liability in these circumstances.',\r\n },\r\n {\r\n provision: \"Retirement Savers' Credit\",\r\n availability: '2023',\r\n notes: '',\r\n },\r\n {\r\n provision: 'Earned Income Tax Credit',\r\n availability: '2023',\r\n notes: '',\r\n },\r\n {\r\n provision: 'State Income Taxes',\r\n availability: '2023',\r\n notes:\r\n 'The TaxCast calculation engine evaluates federal income tax obligations. Individual state income tax calculations are not included within TaxCast’s functionality.',\r\n },\r\n {\r\n provision: '',\r\n availability: '',\r\n notes: '',\r\n },\r\n ],\r\n};\r\n","/* eslint max-lines: [2, {\"max\": 100, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React from 'react';\r\nimport {\r\n Button,\r\n Grid,\r\n Paper,\r\n Table,\r\n TableBody,\r\n TableCell,\r\n TableContainer,\r\n TableHead,\r\n TableRow,\r\n Typography,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport ArrowBackIcon from '@material-ui/icons/ArrowBack';\r\nimport { useHistory } from 'react-router-dom';\r\nimport { provisions } from './provisionsData';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n maxWidth: theme.maxWidth,\r\n [theme.breakpoints.down('lg')]: {\r\n margin: theme.spacing(1, 1),\r\n },\r\n [theme.breakpoints.up('lg')]: {\r\n margin: theme.spacing(1, 'auto'),\r\n },\r\n },\r\n}));\r\n\r\nconst CurrentProvisions = () => {\r\n const classes = useStyles();\r\n const history = useHistory();\r\n\r\n const handleClickBack = () => history.goBack();\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n Current Tax Code Provisions\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n PROVISION\r\n SECTION\r\n TAX RETURN REFERENCE\r\n NOTES\r\n \r\n \r\n \r\n {provisions.currentProvisions.map((item) => (\r\n \r\n {item.provision}\r\n {item.section}\r\n {item.taxReturnReference}\r\n {item.notes}\r\n \r\n ))}\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default CurrentProvisions;\r\n","/* eslint max-lines: [2, {\"max\": 100, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React from 'react';\r\nimport {\r\n Button,\r\n Grid,\r\n Paper,\r\n Table,\r\n TableBody,\r\n TableCell,\r\n TableContainer,\r\n TableHead,\r\n TableRow,\r\n Typography,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport ArrowBackIcon from '@material-ui/icons/ArrowBack';\r\nimport { useHistory } from 'react-router-dom';\r\nimport { provisions } from './provisionsData';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n maxWidth: theme.maxWidth,\r\n [theme.breakpoints.down('lg')]: {\r\n margin: theme.spacing(1, 1),\r\n },\r\n [theme.breakpoints.up('lg')]: {\r\n margin: theme.spacing(1, 'auto'),\r\n },\r\n },\r\n}));\r\n\r\nconst FutureProvisions = () => {\r\n const classes = useStyles();\r\n const history = useHistory();\r\n\r\n const handleClickBack = () => history.goBack();\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n Roadmap for Additional Tax Code Provisions\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n PROVISION\r\n AVAILABILITY\r\n NOTES\r\n \r\n \r\n \r\n {provisions.futureProvisions.map((item) => (\r\n \r\n {item.provision}\r\n {item.availability}\r\n {item.notes}\r\n \r\n ))}\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default FutureProvisions;\r\n","import React from 'react';\r\nimport { Grid, Paper, Typography, makeStyles } from '@material-ui/core';\r\nimport PropTypes from 'prop-types';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n minHeight: '95vh',\r\n maxWidth: 1000,\r\n [theme.breakpoints.down('md')]: {\r\n margin: theme.spacing(1, 'auto'),\r\n },\r\n [theme.breakpoints.down('lg')]: {\r\n margin: theme.spacing(1, 3),\r\n },\r\n [theme.breakpoints.up('lg')]: {\r\n margin: theme.spacing(1, 'auto'),\r\n },\r\n },\r\n title: {\r\n fontWeight: 'bold',\r\n textAlign: 'center',\r\n padding: theme.spacing(3),\r\n backgroundColor: theme.palette.secondary.main,\r\n },\r\n form: {\r\n padding: theme.spacing(2),\r\n },\r\n field: {\r\n [theme.breakpoints.up('sm')]: {\r\n minHeight: theme.spacing(6),\r\n },\r\n },\r\n}));\r\n\r\nconst ContactUsAboutStatus = ({ status, reason }) => {\r\n const classes = useStyles();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n Account Locked\r\n \r\n \r\n Your account was found in the system but is locked. The reason\r\n is listed below. We apologize for any inconveniences. If this is\r\n in error, please contact us to resolve the situation at your\r\n earliest convenience. Alternately, send an email to us with\r\n suggested dates and times we can contact you and we will give\r\n you a call. Thank you for using TaxCast.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n  \r\n \r\n \r\n \r\n 888.482.9227 (888-4-TAXCAST)\r\n \r\n \r\n \r\n  \r\n \r\n \r\n \r\n \r\n support@taxcastplan.com\r\n \r\n \r\n \r\n \r\n  \r\n \r\n {status !== 'unspecified' && (\r\n \r\n \r\n Status: {status}\r\n \r\n \r\n )}\r\n \r\n  \r\n \r\n {reason !== 'none provided' && (\r\n \r\n \r\n Reason: {reason}\r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nContactUsAboutStatus.propTypes = {\r\n status: PropTypes.string,\r\n reason: PropTypes.string,\r\n};\r\n\r\nContactUsAboutStatus.defaultProps = {\r\n status: 'unspecified',\r\n reason: 'none provided',\r\n};\r\n\r\nexport default ContactUsAboutStatus;\r\n","/* eslint max-lines: [2, {\"max\": 375, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useState } from 'react';\r\nimport {\r\n Button,\r\n Checkbox,\r\n Dialog,\r\n DialogActions,\r\n DialogContent,\r\n DialogContentText,\r\n DialogTitle,\r\n FormControlLabel,\r\n Grid,\r\n Paper,\r\n Typography,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport { useHistory } from 'react-router-dom';\r\nimport { toast } from 'react-toastify';\r\n\r\nimport { useMsal } from '@azure/msal-react';\r\n\r\nimport { shapeErrorsForToast } from 'lib/utils/errorUtil';\r\nimport { ErrorToast } from 'lib/components/ErrorToast';\r\nimport * as authActions from 'store/asyncActions/auth';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport * as advisorApi from 'api/advisor';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n minHeight: '95vh',\r\n maxWidth: 1000,\r\n [theme.breakpoints.down('md')]: {\r\n margin: theme.spacing(1, 'auto'),\r\n },\r\n [theme.breakpoints.down('lg')]: {\r\n margin: theme.spacing(1, 3),\r\n },\r\n [theme.breakpoints.up('lg')]: {\r\n margin: theme.spacing(1, 'auto'),\r\n },\r\n },\r\n title: {\r\n fontWeight: 'bold',\r\n textAlign: 'center',\r\n padding: theme.spacing(3),\r\n backgroundColor: theme.palette.secondary.main,\r\n },\r\n form: {\r\n padding: theme.spacing(2),\r\n },\r\n field: {\r\n [theme.breakpoints.up('sm')]: {\r\n minHeight: theme.spacing(6),\r\n },\r\n },\r\n}));\r\n\r\nconst AcceptUsagePolicies = () => {\r\n const classes = useStyles();\r\n const dispatch = useDispatch();\r\n const affiliateId = useSelector(({ auth }) => auth.account.affiliateId);\r\n const advisorId = useSelector(({ auth }) => auth.account.id);\r\n const history = useHistory();\r\n const { instance } = useMsal();\r\n const [confirmEula, setConfirmEula] = useState(false);\r\n const [confirmPrivacyPolicy, setConfirmPrivacyPolicy] = useState(false);\r\n const [isSaving, setIsSaving] = useState(false);\r\n const [isCancelled, setIsCancelled] = useState(false);\r\n\r\n const handleConfirmEulaClick = () => {\r\n setConfirmEula(!confirmEula);\r\n };\r\n\r\n const handleConfirmPrivacyPolicyClick = () => {\r\n setConfirmPrivacyPolicy(!confirmPrivacyPolicy);\r\n };\r\n\r\n const handleClickSave = () => {\r\n // Update account status and\r\n // write an event to the account history.\r\n setIsSaving(true);\r\n advisorApi\r\n .updateAccountStatusWithEventEntry(\r\n affiliateId,\r\n advisorId,\r\n 'active',\r\n 'Accepted usage policies',\r\n 'Accept Usage Policies',\r\n `Eula:${confirmEula}|PrivacyPolicy:${confirmPrivacyPolicy}`\r\n )\r\n .then(() => {\r\n dispatch(authActions.ACCOUNT_STATUS_CHANGED('active'));\r\n toast.success(\r\n `Congratulations! You successfully joined as an early adopter.`\r\n );\r\n history.push('/clients/search');\r\n })\r\n .catch((error) => {\r\n toast.error(, {\r\n autoClose: false,\r\n });\r\n })\r\n .finally(() => {\r\n setIsSaving(false);\r\n });\r\n\r\n // advisorApi.setAccountStatus(affiliateId, advisorId, 'active')\r\n // .then(() => {\r\n // // Write account history entry\r\n // advisorApi.createAccountEventEntry(advisorId, {\r\n // \"status\": \"active\",\r\n // \"reason\": \"User agrees to usage policies\"\r\n // })\r\n // .then(() => {\r\n // setIsSaving(true);\r\n // // Redirect to home page.\r\n // history.push('/clients/search');\r\n // })\r\n // .catch((error) => {\r\n // toast.error(, {\r\n // autoClose: false,\r\n // });\r\n // })\r\n // .finally(() => {\r\n // setIsSaving(false);\r\n // });\r\n // })\r\n // .catch((error) => {\r\n // toast.error(, {\r\n // autoClose: false,\r\n // });\r\n // });\r\n };\r\n\r\n const handleClickDoNotAgree = () => {\r\n setIsSaving(true);\r\n // Update account status\r\n advisorApi\r\n .updateAccountStatusWithEventEntry(\r\n affiliateId,\r\n advisorId,\r\n 'incomplete',\r\n 'Did not accept usage policies',\r\n 'Accept Usage Policies',\r\n `Eula:${confirmEula}|PrivacyPolicy:${confirmPrivacyPolicy}`\r\n )\r\n .then(() => {\r\n dispatch(authActions.ACCOUNT_STATUS_CHANGED('incomplete'));\r\n toast.success(`TaxCast successfully recorded your decision.`);\r\n instance.logoutPopup();\r\n dispatch(authActions.LOGOUT());\r\n history.push('/login');\r\n })\r\n .catch((error) => {\r\n toast.error(, {\r\n autoClose: false,\r\n });\r\n })\r\n .finally(() => {\r\n setIsSaving(false);\r\n });\r\n\r\n // advisorApi.setAccountStatus(affiliateId, advisorId, 'locked')\r\n // .then(() => {\r\n // // Write account history entry\r\n // advisorApi.createAccountEventEntry(advisorId, {\r\n // \"status\": \"locked\",\r\n // \"reason\": \"User does not agree to usage policies\"\r\n // })\r\n // .then(() => {\r\n // setIsSaving(true);\r\n // // Logout\r\n // instance.logoutPopup();\r\n // dispatch(authActions.LOGOUT());\r\n // // Redirect to login\r\n // history.push('/login');\r\n // })\r\n // .catch((error) => {\r\n // toast.error(, {\r\n // autoClose: false,\r\n // });\r\n // })\r\n // .finally(() => {\r\n // setIsSaving(false);\r\n // });\r\n // })\r\n // .catch((error) => {\r\n // toast.error(, {\r\n // autoClose: false,\r\n // });\r\n // });\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n EULA & Privacy Policy\r\n \r\n \r\n To remain current, we occasionally update our EULA and Privacy\r\n Policies. Please re-read and reaffirm your agreement before\r\n continuing. By using TaxCast™ you agree to the following:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n label='I have read, understand, and agree to the TaxCast™ End User License Agreement (EULA).'\r\n />\r\n \r\n window.open(\r\n '/Terms_and_Conditions_HTML_20201128.html',\r\n '_blank'\r\n )\r\n }\r\n >\r\n View\r\n \r\n \r\n \r\n \r\n }\r\n label='I have read, understand, and agree to the TaxCast™ Privacy Policy.'\r\n />\r\n \r\n window.open('/Privacy_Policy_HTML_20201128.html', '_blank')\r\n }\r\n >\r\n View\r\n \r\n \r\n \r\n\r\n \r\n setIsCancelled(true)}\r\n >\r\n Cancel - I do not agree to the terms\r\n \r\n \r\n Continue planning!\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Cancel Your Subscription?\r\n \r\n \r\n \r\n This action will lock your account. Are you certain?\r\n \r\n \r\n \r\n setIsCancelled(false)}\r\n color='primary'\r\n value='cancel'\r\n >\r\n Oops! I clicked the wrong button!\r\n \r\n \r\n Yes, I really do want to stop using TaxCast™.\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default AcceptUsagePolicies;\r\n","import axios from 'axios';\r\n\r\nimport { baseUrl } from 'constants/api';\r\n\r\nexport const getAmountDue = (affiliateId, advisorId) =>\r\n axios.get(\r\n `${baseUrl}/api/affiliates/${affiliateId}/advisors/${advisorId}/payments/amount-due`\r\n );\r\n\r\nexport const applyDiscountCode = (affiliateId, advisorId, discountCodeId) =>\r\n axios.patch(\r\n `${baseUrl}/api/affiliates/${affiliateId}/advisors/${advisorId}/discount-codes/${discountCodeId}`\r\n );\r\n\r\nexport const createPaymentAuthorization = (\r\n affiliateId,\r\n advisorId,\r\n authorizationInfo\r\n) =>\r\n axios.post(\r\n `${baseUrl}/api/affiliates/${affiliateId}/advisors/${advisorId}/payment-authorizations`,\r\n authorizationInfo\r\n );\r\n\r\nexport const createPayment = (affiliateId, advisorId, paymentInfo) =>\r\n axios.post(\r\n `${baseUrl}/api/affiliates/${affiliateId}/advisors/${advisorId}/initial-payments`,\r\n paymentInfo\r\n );\r\n\r\nexport const createPaymentRecurring = (affiliateId, advisorId, paymentInfo) =>\r\n axios.post(\r\n `${baseUrl}/api/affiliates/${affiliateId}/advisors/${advisorId}/recurring-payments`,\r\n paymentInfo\r\n );\r\n\r\n// 400 - discount found but is not applicable\r\n// 404 - discount code not found by name\r\nexport const getDiscountCodeInfo = (discountCode) =>\r\n axios.get(`${baseUrl}/api/payments/discount-codes/${discountCode}`);\r\n\r\nexport const getPublicDiscountCodeInfo = (affiliateId, advisorId) =>\r\n axios.get(\r\n `${baseUrl}/api/affiliates/${affiliateId}/advisors/${advisorId}/discount-codes?public`\r\n );\r\n\r\nexport const getPayments = (affiliateId, advisorId) =>\r\n axios.get(\r\n `${baseUrl}/api/affiliates/${affiliateId}/advisors/${advisorId}/payments/`\r\n );\r\n","/* eslint max-lines: [2, {\"max\": 500, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useEffect, useState } from 'react';\r\nimport {\r\n Backdrop,\r\n Button,\r\n Checkbox,\r\n Dialog,\r\n DialogActions,\r\n DialogContent,\r\n DialogContentText,\r\n DialogTitle,\r\n FormControlLabel,\r\n Grid,\r\n Paper,\r\n TextField,\r\n Typography,\r\n makeStyles,\r\n} from '@material-ui/core';\r\nimport { Redirect, useHistory } from 'react-router-dom';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\n\r\nimport {\r\n AuthenticatedTemplate,\r\n UnauthenticatedTemplate,\r\n} from '@azure/msal-react';\r\n\r\nimport { toast } from 'react-toastify';\r\nimport { shapeErrorsForToast } from 'lib/utils/errorUtil';\r\nimport { ErrorToast } from 'lib/components/ErrorToast';\r\nimport { currencyFormatter } from 'lib/utils/format';\r\nimport loading from 'assets/img/BouncingBarsBlack.png';\r\nimport * as authActions from 'store/asyncActions/auth';\r\n\r\nimport * as paymentApi from 'api/payment';\r\nimport * as advisorApi from 'api/advisor';\r\nimport { basePaymentVendorUrl } from 'constants/api';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n // minHeight: '95vh',\r\n maxWidth: 1000,\r\n [theme.breakpoints.down('md')]: {\r\n margin: theme.spacing(1, 'auto'),\r\n },\r\n [theme.breakpoints.down('lg')]: {\r\n margin: theme.spacing(1, 3),\r\n },\r\n [theme.breakpoints.up('lg')]: {\r\n margin: theme.spacing(1, 'auto'),\r\n },\r\n },\r\n title: {\r\n fontWeight: 'bold',\r\n textAlign: 'center',\r\n padding: theme.spacing(3),\r\n backgroundColor: theme.palette.secondary.main,\r\n },\r\n form: {\r\n padding: theme.spacing(2),\r\n },\r\n field: {\r\n [theme.breakpoints.up('sm')]: {\r\n minHeight: theme.spacing(6),\r\n },\r\n },\r\n backdrop: {\r\n zIndex: theme.zIndex.drawer + 1,\r\n color: '#fff',\r\n },\r\n}));\r\n\r\nconst Payment = () => {\r\n const classes = useStyles();\r\n const dispatch = useDispatch();\r\n const history = useHistory();\r\n const params =\r\n 'useexpiry=true&useexpiryfield=true&usecvv=true&formatinput=true&enhancedresponse=true&cardnumbernumericonly=true';\r\n const css = encodeURI(\r\n 'css=.error{color:red;border-color:red;}label{font-family:\"Roboto\", \"Helvetica\", \"Arial\", sans-serif;font-size:1.25rem;}input{height:1.5rem;font-size:1rem;}body{margin:0px;height:100%}select{height:18px;}'\r\n );\r\n const account = useSelector(({ auth }) => auth.account);\r\n const [paymentData, setPaymentData] = useState();\r\n const [isSubmitting, setIsSubmitting] = useState(false);\r\n // const [isCancelled, setIsCancelled] = useState(false);\r\n const [newDiscountCodeId, setNewDiscountCodeId] = useState('');\r\n const [discountCodeAmount, setDiscountCodeAmount] = useState('');\r\n const retailPrice = 149;\r\n const [hasConsented, setHasConsented] = useState(false);\r\n const [amountDue, setAmountDue] = useState('');\r\n const [appliedDiscountCodeId, setAppliedDiscountCodeId] = useState('');\r\n const [isLoading, setIsLoading] = useState(true);\r\n const [expiry, setExpiry] = useState();\r\n const [paymentSucceeded, setPaymentSucceeded] = useState(false);\r\n\r\n useEffect(() => {\r\n if (amountDue === '' && !paymentSucceeded) {\r\n paymentApi\r\n .getAmountDue(account.affiliateId, account.id)\r\n .then((response) => {\r\n setAmountDue(response.data);\r\n paymentApi\r\n .getPublicDiscountCodeInfo(account.affiliateId, account.id)\r\n .then((responseDiscountCodes) => {\r\n if (responseDiscountCodes.data.length === 1) {\r\n const discountCodeInfo = responseDiscountCodes.data[0];\r\n setAppliedDiscountCodeId(discountCodeInfo.id);\r\n if (discountCodeInfo) {\r\n if (discountCodeInfo.amountUnits === 'dollars') {\r\n setDiscountCodeAmount(\r\n currencyFormatter.format(discountCodeInfo.amount)\r\n );\r\n } else {\r\n setDiscountCodeAmount(`${discountCodeInfo.amount}%`);\r\n }\r\n }\r\n }\r\n })\r\n .catch((error) => {\r\n const shapedErrors = shapeErrorsForToast(error);\r\n toast.error(, {\r\n autoClose: false,\r\n });\r\n });\r\n })\r\n .catch((error) => {\r\n const shapedErrors = shapeErrorsForToast(error);\r\n toast.error(, {\r\n autoClose: false,\r\n });\r\n })\r\n .finally(() => {\r\n setIsLoading(false);\r\n });\r\n }\r\n }, [amountDue, account.affiliateId, account.id, paymentSucceeded]);\r\n\r\n const handleTokenEvent = () => {\r\n window.addEventListener(\r\n 'message',\r\n function (event) {\r\n if (!event.data.payload) {\r\n const token = JSON.parse(event.data);\r\n const cardPointeToken = document.getElementById('cardPointeToken');\r\n cardPointeToken.value = token.message;\r\n setExpiry(token.expiry);\r\n setPaymentData(event.data);\r\n event.preventDefault();\r\n }\r\n },\r\n false\r\n );\r\n };\r\n\r\n const handleClickConsent = () => {\r\n setHasConsented(!hasConsented);\r\n };\r\n\r\n const handleSubmitPaymentClick = () => {\r\n setIsSubmitting(true);\r\n setIsLoading(true);\r\n const paymentJson = {\r\n amount: amountDue,\r\n expiry,\r\n token: document.getElementById('cardPointeToken').value,\r\n cvv: '',\r\n };\r\n paymentApi\r\n .createPayment(\r\n account.affiliateId,\r\n account.id,\r\n { ...paymentJson },\r\n newDiscountCodeId\r\n )\r\n .then(() => {\r\n dispatch(\r\n authActions.ACCOUNT_STATUS_CHANGED(\r\n 'active',\r\n 'Initial Payment successful'\r\n )\r\n );\r\n setPaymentSucceeded(true);\r\n })\r\n .catch((error) => {\r\n const shapedErrors = shapeErrorsForToast(error);\r\n toast.error(, {\r\n autoClose: false,\r\n });\r\n })\r\n .finally(() => {\r\n setIsLoading(false);\r\n setIsSubmitting(false);\r\n });\r\n };\r\n\r\n const handleInputChangeDiscountCode = (event) => {\r\n setNewDiscountCodeId(event.target.value);\r\n };\r\n\r\n // const handleCancelPaymentClick = () => {\r\n // // TODO: implement this\r\n // };\r\n\r\n const handleClickStartTrial = () => {\r\n setIsSubmitting(true);\r\n setIsLoading(true);\r\n advisorApi\r\n .setAccountStatus(account.affiliateId, account.id, 'trial')\r\n .then(() => {\r\n // Write account history entry\r\n advisorApi\r\n .createAccountEventEntry(\r\n account.affiliateId,\r\n account.id,\r\n 'trial',\r\n 'User started trial'\r\n )\r\n .then(() => {\r\n dispatch(\r\n authActions.ACCOUNT_STATUS_CHANGED('trial', 'User started trial')\r\n );\r\n history.push('/auth');\r\n })\r\n .catch((error) => {\r\n toast.error(\r\n ,\r\n {\r\n autoClose: false,\r\n }\r\n );\r\n });\r\n })\r\n .catch((error) => {\r\n toast.error(, {\r\n autoClose: false,\r\n });\r\n })\r\n .finally(() => {\r\n setIsLoading(false);\r\n setIsSubmitting(false);\r\n });\r\n };\r\n\r\n const handleApplyDiscountCodeClick = () => {\r\n setIsLoading(true);\r\n paymentApi\r\n .getDiscountCodeInfo(newDiscountCodeId)\r\n .then((response) => {\r\n setAppliedDiscountCodeId(response.data.id);\r\n if (response.data.amountUnits === 'dollars') {\r\n setDiscountCodeAmount(currencyFormatter.format(response.data.amount));\r\n } else {\r\n setDiscountCodeAmount(`${response.data.amount}%`);\r\n }\r\n // Apply the discount code to the user's account.\r\n paymentApi\r\n .applyDiscountCode(account.affiliateId, account.id, response.data.id)\r\n .then(() => {\r\n // 204 === success\r\n // Get the updated amount due.\r\n paymentApi\r\n .getAmountDue(account.affiliateId, account.id)\r\n .then((amountDueResponse) => {\r\n setAmountDue(amountDueResponse.data);\r\n })\r\n .catch((applyError) => {\r\n const shapedErrors = shapeErrorsForToast(applyError);\r\n toast.error(, {\r\n autoClose: false,\r\n });\r\n });\r\n })\r\n .catch((getAmountDueError) => {\r\n setAmountDue('');\r\n setAppliedDiscountCodeId('');\r\n setDiscountCodeAmount('');\r\n const shapedErrors = shapeErrorsForToast(getAmountDueError);\r\n toast.error(, {\r\n autoClose: false,\r\n });\r\n });\r\n })\r\n .catch((getDiscountCodeError) => {\r\n const shapedErrors = shapeErrorsForToast(getDiscountCodeError);\r\n toast.error(, {\r\n autoClose: false,\r\n });\r\n })\r\n .finally(() => {\r\n setIsLoading(false);\r\n });\r\n };\r\n\r\n const handleClickPaymentSuccessful = () => {\r\n history.push('/auth');\r\n };\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Payment Information\r\n \r\n \r\n TaxCast uses Card Pointe to process payments. We never see\r\n your credit card number and do not store your credit card\r\n information.\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n }\r\n label='I consent to allowing Card Pointe store and reuse payment information, and TaxCast to bill me monthly.'\r\n />\r\n
\r\n \r\n \r\n \r\n {`Monthly Subscription: ${currencyFormatter.format(\r\n retailPrice\r\n )}`}\r\n \r\n \r\n \r\n \r\n \r\n \r\n  \r\n \r\n \r\n \r\n Apply\r\n \r\n \r\n \r\n  \r\n \r\n {amountDue !== retailPrice && (\r\n \r\n \r\n {`Discount Amount: ${discountCodeAmount}`}\r\n \r\n \r\n {`Code: ${appliedDiscountCodeId}`}\r\n \r\n \r\n )}\r\n \r\n \r\n You {retailPrice > amountDue ? `Only` : ``} Pay:{' '}\r\n {currencyFormatter.format(amountDue)}\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n  \r\n \r\n \r\n {/* setIsCancelled(true)}\r\n >\r\n Cancel\r\n */}\r\n {/* Only show the trial option if the account status is not 'suspended'. */}\r\n {account.accountStatus !== 'suspended' && (\r\n \r\n Start Trial\r\n \r\n )}\r\n \r\n Submit\r\n \r\n \r\n
\r\n \r\n \r\n {/* \r\n Cancel Payment?\r\n \r\n \r\n {isEligibleForTrialPeriod\r\n ? `Cancelling payment now will enroll you in a free 14-day trial.`\r\n : `Your account is not eligible for a trial subscription. Cancelling payment will lock your account. Are you certain?`}\r\n \r\n \r\n \r\n \r\n {isEligibleForTrialPeriod ? `Take The Trial` : `Leave TaxCast`}\r\n \r\n setIsCancelled(false)}\r\n color='primary'\r\n value='cancel'\r\n >\r\n Provide Payment Now\r\n \r\n \r\n */}\r\n \r\n Payment Successful\r\n \r\n \r\n Thank you for joining TaxCast!\r\n \r\n \r\n \r\n \r\n Ok\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default Payment;\r\n","/* eslint max-lines: [2, {\"max\": 625, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useEffect, useState } from 'react';\r\nimport {\r\n Backdrop,\r\n Button,\r\n Checkbox,\r\n Dialog,\r\n DialogActions,\r\n DialogContent,\r\n DialogContentText,\r\n DialogTitle,\r\n FormControlLabel,\r\n Grid,\r\n Paper,\r\n Table,\r\n TableBody,\r\n TableCell,\r\n TableHead,\r\n TableRow,\r\n Typography,\r\n makeStyles,\r\n} from '@material-ui/core';\r\n\r\nimport { useHistory, useLocation, useParams } from 'react-router-dom';\r\nimport { useDispatch } from 'react-redux';\r\n\r\nimport { forEach, map } from 'lodash';\r\nimport { toast } from 'react-toastify';\r\n\r\nimport {\r\n categoryDisplayMap,\r\n subcategoryDisplayMap,\r\n} from 'constants/categories';\r\nimport { shapeErrorsForToast } from 'lib/utils/errorUtil';\r\nimport { ErrorToast } from 'lib/components/ErrorToast';\r\nimport loading from 'assets/img/BouncingBarsBlack.png';\r\nimport { numberOfYearsToCatchUp } from 'lib/utils/forecastUtils';\r\nimport { currencyFormatter } from 'lib/utils/format';\r\nimport * as taxCastApi from 'api/taxCast';\r\nimport { NEW_TRANSACTION } from 'store/asyncActions/taxCast';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n maxWidth: theme.maxWidth,\r\n [theme.breakpoints.down('lg')]: {\r\n margin: theme.spacing(1, 3),\r\n },\r\n [theme.breakpoints.up('lg')]: {\r\n margin: theme.spacing(1, 'auto'),\r\n },\r\n },\r\n table: {\r\n padding: theme.spacing(2),\r\n },\r\n}));\r\n\r\nconst ExtendForecast = () => {\r\n const history = useHistory();\r\n const classes = useStyles();\r\n const params = useParams();\r\n const dispatch = useDispatch();\r\n const [isLoading, setIsLoading] = useState(true);\r\n const queryString = new URLSearchParams(useLocation().search);\r\n const selectedOption = useState(queryString.get('option'))[0];\r\n const [forecast, setForecast] = useState();\r\n const [transactions, setTransactions] = useState();\r\n const [\r\n copyLatestYearTransactionsToNewYears,\r\n setCopyLatestYearTransactionsToNewYears,\r\n ] = useState(true);\r\n const [\r\n extendingCompletedSuccessfully,\r\n setExtendingCompletedSuccessfully,\r\n ] = useState(false);\r\n const [\r\n cloningCompletedSuccessfully,\r\n setCloningCompletedSuccessfully,\r\n ] = useState(false);\r\n const [errorCount, setErrorCount] = useState(0);\r\n\r\n useEffect(() => {\r\n document.title = 'TaxCast - Extend Forecast';\r\n });\r\n\r\n useEffect(() => {\r\n const clientProfileId = params.id;\r\n taxCastApi\r\n .getClientData(clientProfileId)\r\n .then((response) => {\r\n setForecast(response.forecast);\r\n const latestYear =\r\n response.forecast.yearList[response.forecast.yearList.length - 1];\r\n setTransactions([\r\n ...response.forecast.years[latestYear].ordinaryIncome,\r\n ...response.forecast.years[latestYear].capitalGains,\r\n ...response.forecast.years[latestYear].deductions,\r\n ]);\r\n })\r\n .catch((error) => {\r\n toast.error(, {\r\n autoClose: false,\r\n });\r\n })\r\n .finally(() => {\r\n setIsLoading(false);\r\n });\r\n }, [params.id]);\r\n\r\n const handleInputChangeCopyTransactions = () => {\r\n setCopyLatestYearTransactionsToNewYears(\r\n !copyLatestYearTransactionsToNewYears\r\n );\r\n };\r\n\r\n const parseOptionForDisplay = (option) => {\r\n if (option === 'catchup') {\r\n return 'Catch-up';\r\n }\r\n if (option === 'rollover') {\r\n return 'Rollover';\r\n }\r\n return 'Extend';\r\n };\r\n\r\n const getExtendedToYear = (option) => {\r\n const currentYear = new Date().getFullYear();\r\n if (option === 'catchup') {\r\n return currentYear + 9;\r\n }\r\n return currentYear + 1;\r\n };\r\n\r\n const handleClickOk = () => {\r\n setIsLoading(true);\r\n let numberOfYearsToAdd = 0;\r\n const latestYear = +forecast.yearList[forecast.yearList.length - 1];\r\n\r\n if (selectedOption === 'catchup') {\r\n numberOfYearsToAdd = numberOfYearsToCatchUp(forecast);\r\n }\r\n\r\n if (selectedOption === 'rollover') {\r\n // This operation always adds a single year only.\r\n numberOfYearsToAdd = 1;\r\n }\r\n\r\n // Update the forecast to include new years and filing statuses.\r\n const latestFilingStatus =\r\n forecast.filingStatusByYearList[\r\n forecast.filingStatusByYearList.length - 1\r\n ];\r\n for (let i = 1; i <= numberOfYearsToAdd; i += 1) {\r\n forecast.yearList.push(latestYear + i);\r\n forecast.filingStatusByYearList.push(latestFilingStatus);\r\n }\r\n // Update the entire forecast.\r\n // The forecast provided by the API utility is normalized.\r\n // Normalizing removes certain elements and reformats other elements.\r\n // Therefore, in order to make PUT work properly, the forecast must be\r\n // fetched without normalizing.\r\n taxCastApi\r\n .getForecast(params.id, forecast.id)\r\n .then((response) => {\r\n const newForecast = { ...response.data };\r\n newForecast.yearList = forecast.yearList.join(',');\r\n newForecast.filingStatusByYearList = forecast.filingStatusByYearList.join(\r\n ','\r\n );\r\n // BUG: There is a defect in the template subsystem.\r\n newForecast.clientProfileId = params.id;\r\n taxCastApi\r\n .putForecast(newForecast)\r\n .then(() => {\r\n toast.success(\r\n `Canvas updated with new year(s) and filing status(es).`\r\n );\r\n setExtendingCompletedSuccessfully(true);\r\n })\r\n .catch((error) => {\r\n setErrorCount(errorCount + 1);\r\n toast.error(\r\n ,\r\n {\r\n autoClose: false,\r\n }\r\n );\r\n });\r\n })\r\n .catch((error) => {\r\n setErrorCount(errorCount + 1);\r\n toast.error(, {\r\n autoClose: false,\r\n });\r\n });\r\n\r\n // Clone transactions.\r\n // NOTE: This operation can be done independently of\r\n // updating the forecast. The two tables are\r\n // loosely linked. Therefore, even if the forecast\r\n // update fails, the new transactions may be\r\n // created successfully.\r\n if (copyLatestYearTransactionsToNewYears) {\r\n for (let i = 1; i <= numberOfYearsToAdd; i += 1) {\r\n forEach(transactions, (tx) => {\r\n const newTx = { ...tx };\r\n newTx.taxYear = latestYear + i;\r\n dispatch(NEW_TRANSACTION(newTx));\r\n });\r\n }\r\n setCloningCompletedSuccessfully(true); // This is NOT actually accurate.\r\n } else {\r\n setIsLoading(false);\r\n setCloningCompletedSuccessfully(true);\r\n }\r\n };\r\n\r\n const handleClickCancel = () => {\r\n history.push(`/clients/${params.id}`);\r\n };\r\n\r\n if (!forecast || !transactions) {\r\n return null;\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {parseOptionForDisplay(selectedOption)} Canvas\r\n \r\n \r\n The latest tax year for the selected canvas\r\n is {forecast.yearList[forecast.yearList.length - 1]}. This\r\n canvas will be extended to {getExtendedToYear(selectedOption)}.\r\n \r\n \r\n \r\n {transactions.length > 0 && (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n Category\r\n Sub-Category\r\n Name\r\n Value\r\n \r\n \r\n \r\n {map(transactions, (item) => (\r\n \r\n \r\n {categoryDisplayMap[item.category]}\r\n \r\n \r\n {subcategoryDisplayMap[item.subcategory]}\r\n \r\n {item.name}\r\n \r\n {currencyFormatter.format(item.value)}\r\n \r\n \r\n ))}\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n }\r\n label={`Copy ${\r\n forecast.yearList[forecast.yearList.length - 1]\r\n } transactions to new tax year(s).`}\r\n />\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n Cancel\r\n \r\n \r\n Ok\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n Success\r\n \r\n {errorCount === 0 && (\r\n \r\n {copyLatestYearTransactionsToNewYears\r\n ? `The canvas was extended and transactions were cloned successfully.`\r\n : `The canvas was extended successfully.`}\r\n \r\n )}\r\n {errorCount !== 0 && (\r\n \r\n At least some of the operations did not complete successfully.\r\n Please note the error toasts and contact support by email\r\n (support@taxcastplan.com) or phone (888.482.9227 (888-4-TAXCAST))\r\n to report the issues.\r\n \r\n )}\r\n \r\n \r\n \r\n Return to Canvas\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default ExtendForecast;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { makeStyles } from '@material-ui/core';\r\n\r\nconst useStyles = makeStyles(() => ({\r\n videoResponsive: {\r\n overflow: 'hidden',\r\n paddingBottom: '56.25%',\r\n position: 'relative',\r\n height: 0,\r\n },\r\n videoResponseIframe: {\r\n left: 0,\r\n top: 0,\r\n height: '100%',\r\n width: '100%',\r\n position: 'absolute',\r\n },\r\n}));\r\n\r\n/* \r\n This component courtesy: \r\n https://dev.to/bravemaster619/simplest-way-to-embed-a-youtube-video-in-your-react-app-3bk2 \r\n*/\r\n\r\nconst YouTubeEmbed = ({ embedId }) => {\r\n const classes = useStyles();\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nYouTubeEmbed.propTypes = {\r\n embedId: PropTypes.string.isRequired,\r\n};\r\n\r\nexport default YouTubeEmbed;\r\n","/* eslint max-lines: [2, {\"max\": 5000, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React, { useEffect, useState } from 'react';\r\nimport { Button, Grid, Typography, makeStyles } from '@material-ui/core';\r\nimport { useDispatch } from 'react-redux';\r\nimport { useHistory } from 'react-router-dom';\r\n\r\nimport { EventType } from '@azure/msal-browser';\r\nimport { useMsal } from '@azure/msal-react';\r\nimport { loginRequest } from 'lib/utils/authConfig';\r\nimport axios from 'axios';\r\n\r\nimport { baseUrl } from 'constants/api';\r\n\r\nimport YouTubeEmbed from 'lib/components/YouTubeEmbed';\r\n\r\nimport * as authActions from 'store/asyncActions/auth';\r\n\r\nimport TaxCastLogo from 'assets/img/Logo512x512.png';\r\nimport PreviewGif from 'assets/img/VSL_TaxCast_Screen_Images_20220328_3mb_pancrop.gif';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n minWidth: '100%',\r\n },\r\n rootOg: {\r\n maxWidth: theme.maxWidth,\r\n [theme.breakpoints.down('lg')]: {\r\n margin: theme.spacing(1, 'auto'),\r\n },\r\n [theme.breakpoints.up('lg')]: {\r\n margin: theme.spacing(1, 'auto'),\r\n },\r\n [theme.breakpoints.down('md')]: {\r\n margin: theme.spacing(1, 3),\r\n },\r\n [theme.breakpoints.down('md')]: {\r\n margin: theme.spacing(1, 1),\r\n },\r\n [theme.breakpoints.down('sm')]: {\r\n margin: theme.spacing('auto', 'auto'),\r\n },\r\n },\r\n paper: {\r\n minWidth: '95%',\r\n },\r\n headerPanel: {\r\n borderBottom: `5px solid ${theme.palette.primary.main}`,\r\n },\r\n header: {\r\n marginBottom: theme.spacing(1),\r\n marginTop: theme.spacing(1),\r\n marginLeft: theme.spacing(1),\r\n marginRight: theme.spacing(1),\r\n padding: theme.spacing(1),\r\n },\r\n content: {\r\n padding: theme.spacing(1),\r\n },\r\n divider: {\r\n borderRight: `1px solid ${theme.palette.primary.main}`,\r\n padding: theme.spacing(1),\r\n },\r\n rightCell: {\r\n marginBottom: theme.spacing(1),\r\n marginTop: theme.spacing(1),\r\n marginLeft: theme.spacing(1),\r\n marginRight: theme.spacing(1),\r\n padding: theme.spacing(1),\r\n },\r\n leftCell: {\r\n marginBottom: theme.spacing(1),\r\n marginTop: theme.spacing(1),\r\n marginLeft: theme.spacing(1),\r\n marginRight: theme.spacing(1),\r\n padding: theme.spacing(1),\r\n // borderRight: `1px solid ${theme.palette.primary.main}`,\r\n },\r\n leftPanel: {\r\n marginBottom: theme.spacing(1),\r\n marginTop: theme.spacing(1),\r\n marginLeft: theme.spacing(1),\r\n marginRight: theme.spacing(1),\r\n padding: theme.spacing(1),\r\n },\r\n logo: {\r\n height: '25%',\r\n width: '25%',\r\n },\r\n field: {\r\n [theme.breakpoints.up('sm')]: {\r\n minHeight: theme.spacing(1),\r\n },\r\n },\r\n dialog: {\r\n minHeight: '60vh',\r\n },\r\n}));\r\n\r\nconst Campaign = () => {\r\n const classes = useStyles();\r\n const dispatch = useDispatch();\r\n const history = useHistory();\r\n const { instance } = useMsal();\r\n const [bookingsUrl, setBookingsUrl] = useState('');\r\n\r\n useEffect(() => {\r\n document.title = 'TaxCast - SignUp';\r\n axios\r\n .get(\r\n `${baseUrl}/api/settings/TaxCastSetting/setting/TaxCastDemoBookingsLink`\r\n )\r\n .then((response) => {\r\n setBookingsUrl(response.data);\r\n })\r\n .catch(() => {\r\n setBookingsUrl(\r\n 'https://outlook.office365.com/owa/calendar/TaxCast@taxcastplan.com/bookings/s/MM7SEJpRQEu2P_9Wagi_SA2'\r\n );\r\n });\r\n }, [bookingsUrl, setBookingsUrl]);\r\n\r\n useEffect(() => {\r\n const callbackId = instance.addEventCallback((event) => {\r\n // switch (event.eventType) {\r\n // case EventType.LOGIN_SUCCESS:\r\n // console.log(\"login-success\", event);\r\n // break;\r\n // case EventType.LOGIN_FAILURE:\r\n // console.log(\"login-failure\", event);\r\n // break;\r\n // case EventType.LOGOUT_SUCCESS:\r\n // console.log(\"logout-success\", event);\r\n // break;\r\n // case EventType.LOGOUT_FAILURE:\r\n // console.log(\"logout-failure\", event);\r\n // break;\r\n // case EventType.HANDLE_REDIRECT_START:\r\n // console.log(\"redirect-start\", event);\r\n // break;\r\n // case EventType.HANDLE_REDIRECT_END:\r\n // console.log(\"redirect-end\", event);\r\n // break;\r\n // default:\r\n // break;\r\n // }\r\n if (event.eventType === EventType.ACQUIRE_TOKEN_SUCCESS) {\r\n window.sessionStorage.setItem(\r\n 'taxcast.auth.accessToken',\r\n event.payload.accessToken\r\n );\r\n dispatch(authActions.AADB2C_LOGIN_SUCCESS(event.payload.idTokenClaims));\r\n history.push('/auth');\r\n }\r\n\r\n if (event.eventType === EventType.LOGIN_SUCCESS) {\r\n instance.setActiveAccount(event.payload.account);\r\n instance\r\n .acquireTokenSilent({ ...loginRequest })\r\n .then((response) => {\r\n window.sessionStorage.setItem(\r\n 'taxcast.auth.accessToken',\r\n response.accessToken\r\n );\r\n dispatch(\r\n authActions.AADB2C_LOGIN_SUCCESS(event.payload.idTokenClaims)\r\n );\r\n history.push('/auth');\r\n })\r\n .catch(() => {\r\n // acquireTokenSilent can fail for a number of reasons, fallback to interaction\r\n instance.acquireTokenPopup({ ...loginRequest }).then((response) => {\r\n window.sessionStorage.setItem(\r\n 'taxcast.auth.accessToken',\r\n response.accessToken\r\n );\r\n dispatch(\r\n authActions.AADB2C_LOGIN_SUCCESS(event.payload.idTokenClaims)\r\n );\r\n history.push('/auth');\r\n });\r\n });\r\n }\r\n });\r\n\r\n return () => {\r\n if (callbackId) {\r\n instance.removeEventCallback(callbackId);\r\n }\r\n };\r\n }, [dispatch, history, instance]);\r\n\r\n const handleRequestDemoClick = () => {\r\n window.location.href = bookingsUrl;\r\n };\r\n\r\n const handleLoginClick = () => {\r\n instance.loginPopup(loginRequest);\r\n };\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n The world's easiest visual tax-planning software\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n  \r\n \r\n \r\n  \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n  \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n 14 Day Free Trial\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n No credit card needed\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n Sign-up Today!\r\n \r\n \r\n
\r\n \r\n TaxCast Demo\r\n \r\n \r\n  \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n  \r\n \r\n \r\n \r\n \r\n Tax Planning Made Simple™\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n TaxCast™ is the world's easiest visual tax-planning\r\n software. Our process allows every advisor to construct\r\n multi-year visual tax plans with no advanced tax expertise.\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n Get your 14 day free trial\r\n \r\n \r\n
\r\n \r\n  \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n  \r\n \r\n \r\n \r\n Why TaxCast™\r\n \r\n \r\n \r\n \r\n \r\n  \r\n \r\n \r\n \r\n \r\n \r\n Easy Entry & Editing\r\n \r\n
\r\n \r\n With our DragDropDeduct™ user interface,\r\n transaction "tiles" are moved from the toolbar\r\n onto the work surface or "canvas" where they can\r\n be easily modified, duplicated, or moved between years.\r\n \r\n
\r\n \r\n \r\n Multi-Year\r\n \r\n
\r\n \r\n Since a goal of tax planning should be to minimize the\r\n client's tax burdens across multiple years,\r\n TaxCast™ displays and calculates taxable transactions\r\n across a 10-year window.\r\n \r\n
\r\n
\r\n \r\n \r\n  \r\n \r\n \r\n \r\n \r\n  \r\n \r\n \r\n \r\n \r\n \r\n Client-Facing & Interactive\r\n \r\n
\r\n \r\n TaxCast™ provides a graphic, easy-to-understand\r\n interface that allows tax plans to be created during\r\n face-to-face discussions with clients.\r\n \r\n
\r\n \r\n \r\n More Control\r\n \r\n
\r\n \r\n TaxCast™'s robust calculation engine performs\r\n validation checks to prevent clients from planning\r\n disallowed transactions.\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n  \r\n \r\n \r\n \r\n \r\n \r\n  \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n Want to learn more?\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n Schedule your free demo\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n  \r\n \r\n \r\n © 2022 Canvilytics, LLC\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n );\r\n};\r\n\r\nexport default Campaign;\r\n","/* eslint max-lines: [2, {\"max\": 200, \"skipComments\": true, \"skipBlankLines\": true}] */\r\nimport React from 'react';\r\nimport { BrowserRouter, Route, Switch } from 'react-router-dom';\r\nimport { Grid, makeStyles } from '@material-ui/core';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { MsalProvider } from '@azure/msal-react';\r\n\r\nimport { ProtectedRoute } from 'lib/router/routes';\r\nimport Auth from 'modules/Auth';\r\nimport NavDrawer from 'modules/NavDrawer';\r\nimport Login from 'modules/Login';\r\nimport TaxCast from 'modules/TaxCast';\r\nimport ClientSearch from 'modules/ClientSearch';\r\nimport NewClientForm from 'modules/Forms/NewClientForm';\r\nimport NewAdvisorForm from 'modules/Forms/NewAdvisorForm';\r\n// import EarlyAdopter from 'modules/Payment/EarlyAdopter';\r\nimport HelpAndSupport from 'modules/Help';\r\nimport HelpContactUs from 'modules/Help/ContactUs';\r\nimport Advisor from 'modules/Advisor';\r\nimport Logout from 'modules/Logout';\r\nimport ReportViewer from 'modules/TaxCast/components/Analytics/ReportViewer';\r\nimport LandingPage from 'modules/LandingPage';\r\nimport About from 'modules/Help/About';\r\nimport Glossary from 'modules/Help/Glossary';\r\nimport CurrentProvisions from 'modules/Help/CurrentProvisions';\r\nimport FutureProvisions from 'modules/Help/FutureProvisions';\r\nimport ItsDeadJim from 'modules/ItsDeadJim';\r\nimport ContactUsAboutStatus from 'modules/Auth/components/ContactUsAboutStatus';\r\nimport AcceptUsagePolicies from 'modules/Auth/components/AcceptUsagePolicies';\r\n// import Trial from 'modules/Payment/components/Trial';\r\nimport Payment from 'modules/Payment';\r\nimport ExtendForecast from 'modules/ExtendForecast';\r\nimport Campaign from 'modules/Campaign';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n content: {\r\n [theme.breakpoints.down('xs')]: {\r\n paddingLeft: theme.spacing(1),\r\n },\r\n },\r\n reports: {\r\n [theme.breakpoints.down('xs')]: {\r\n paddingLeft: theme.spacing(3),\r\n },\r\n },\r\n}));\r\n\r\nconst App = ({ pca }) => {\r\n const classes = useStyles();\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n {/* */}\r\n \r\n \r\n {/* */}\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
404 not found
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n );\r\n};\r\n\r\nApp.propTypes = {\r\n pca: PropTypes.objectOf(PropTypes.shape).isRequired,\r\n};\r\n\r\nexport default App;\r\n","import { createMuiTheme } from '@material-ui/core/styles';\r\n\r\nconst colors = {\r\n powderYellow: '#FEFFEA',\r\n powderGreen: '#dcedc8',\r\n powderBlue: '#B8E4FF',\r\n powderOrange: '#FEE6B3',\r\n powderPink: '#FFB8B8',\r\n powderGrey: '#9C9EA1',\r\n lightGreen: '#9ccc65',\r\n white: '#FFF',\r\n red: '#f44336',\r\n yellow: '#eeff41',\r\n green: '#54b337',\r\n darkGreen: '#004D40',\r\n darkBackground: '#333',\r\n greyBackground: '#424242',\r\n grey: 'grey',\r\n};\r\n\r\nconst getTheme = (theme) => {\r\n const darkMode = theme === 'dark';\r\n\r\n return createMuiTheme({\r\n maxWidth: 1300,\r\n palette: {\r\n type: darkMode ? 'dark' : 'light',\r\n primary: {\r\n main: darkMode ? colors.lightGreen : colors.darkGreen,\r\n },\r\n secondary: {\r\n main: darkMode ? colors.darkGreen : colors.lightGreen,\r\n },\r\n background: {\r\n default: darkMode ? colors.darkBackground : colors.powderGreen,\r\n },\r\n primaryBackground: darkMode ? colors.greyBackground : colors.white,\r\n danger: colors.red,\r\n },\r\n navDrawer: {\r\n openWidth: 240,\r\n closeWidth: 56,\r\n expandButtonColor: darkMode ? colors.powderGreen : colors.yellow,\r\n backgroundColor: darkMode ? colors.greyBackground : colors.lightGreen,\r\n },\r\n taxCast: {\r\n yearContainer: darkMode ? colors.powderGrey : colors.powderYellow,\r\n canvasExpando: darkMode ? colors.powderGrey : colors.powderYellow,\r\n primaryTextColor: colors.darkGreen,\r\n summaryText: colors.darkGreen,\r\n tiles: {\r\n incomeColor: colors.powderBlue,\r\n capitalGainsColor: colors.powderOrange,\r\n deductionsColor: colors.powderPink,\r\n moreIcon: colors.grey,\r\n },\r\n },\r\n });\r\n};\r\n\r\nexport default getTheme;\r\n","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { CssBaseline, MuiThemeProvider } from '@material-ui/core';\nimport PropTypes from 'prop-types';\n\nimport getTheme from './theme';\n\nconst ThemeProvider = ({ children }) => {\n const theme = useSelector(({ preference }) => preference.theme);\n\n return (\n \n \n {children}\n \n );\n};\n\nThemeProvider.propTypes = {\n children: PropTypes.element.isRequired,\n};\n\nexport default ThemeProvider;\n","/* eslint-disable */\n// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(/^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then((registration) => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch((error) => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then((response) => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then((registration) => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log('No internet connection found. App is running in offline mode.');\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then((registration) => {\n registration.unregister();\n });\n }\n}\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport { Provider } from 'react-redux';\r\nimport { PersistGate } from 'redux-persist/integration/react';\r\nimport { ToastContainer } from 'react-toastify';\r\n\r\nimport axios from 'axios';\r\n\r\nimport { PublicClientApplication } from '@azure/msal-browser';\r\nimport { loginRequest, msalConfig } from './lib/utils/authConfig';\r\n\r\nimport configureStore from './store';\r\n\r\nimport App from './App';\r\nimport ThemeProvider from './theme';\r\n\r\nimport * as serviceWorker from './serviceWorker';\r\nimport 'react-toastify/dist/ReactToastify.css';\r\nimport 'index.css';\r\n\r\nconst msalInstance = new PublicClientApplication(msalConfig);\r\n\r\nconst { store, persistor } = configureStore();\r\n\r\naxios.defaults.headers.common['x-functions-key'] =\r\n 'twvFT/INZxwdwV7bYp7Bik0io5GcJJdzt1u/FHPWj2u3g75HDnMC1g==';\r\n\r\naxios.interceptors.request.use(\r\n (request) => {\r\n request.headers.Authorization = `Bearer ${window.sessionStorage.getItem(\r\n 'taxcast.auth.accessToken'\r\n )}`;\r\n request.headers['x-taxcast-user-id'] = store.getState().auth.account.id;\r\n return request;\r\n },\r\n (error) => {\r\n return Promise.reject(error);\r\n }\r\n);\r\n\r\n// https://thedutchlab.com/blog/using-axios-interceptors-for-refreshing-your-api-token\r\naxios.interceptors.response.use(\r\n (response) => {\r\n return response;\r\n },\r\n (error) => {\r\n if (error.response?.status === 401) {\r\n const requestConfig = error.config;\r\n return msalInstance\r\n .acquireTokenSilent({ ...loginRequest })\r\n .then((msalResponse) => {\r\n window.sessionStorage.setItem(\r\n 'taxcast.auth.accessToken',\r\n msalResponse.accessToken\r\n );\r\n // ['Authorization'];\r\n delete requestConfig.headers.Authorization;\r\n delete requestConfig.headers['x-taxcast-user-id'];\r\n return axios.request(requestConfig);\r\n })\r\n .catch(() => {\r\n // acquireTokenSilent can fail for a number of reasons, fallback to interaction\r\n msalInstance\r\n .acquireTokenPopup({ ...loginRequest })\r\n .then((msalResponse) => {\r\n msalInstance.setActiveAccount(msalResponse.account);\r\n window.sessionStorage.setItem(\r\n 'taxcast.auth.accessToken',\r\n msalResponse.accessToken\r\n );\r\n delete requestConfig.headers.Authorization;\r\n delete requestConfig.headers['x-taxcast-user-id'];\r\n return axios.request(requestConfig);\r\n });\r\n });\r\n }\r\n return Promise.reject(error);\r\n }\r\n);\r\n\r\nReactDOM.render(\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ,\r\n document.getElementById('root')\r\n);\r\n\r\nserviceWorker.register();\r\n","module.exports = __webpack_public_path__ + \"static/media/Logo192x192.ab7775a4.png\";","module.exports = __webpack_public_path__ + \"static/media/Help-About.71cea16d.jpg\";","module.exports = __webpack_public_path__ + \"static/media/Help-AccountMaintenance.3f61ce8c.jpg\";","module.exports = __webpack_public_path__ + \"static/media/Help-ContactUsSupport.cb5544df.jpg\";","module.exports = __webpack_public_path__ + \"static/media/Help-CurrentProvisions.2f80f076.jpg\";","module.exports = __webpack_public_path__ + \"static/media/Help-Glossary.7fbb5aa6.jpg\";","module.exports = __webpack_public_path__ + \"static/media/Help-Roadmap.90a8accb.jpg\";","module.exports = __webpack_public_path__ + \"static/media/Help-TaxPlanningWithTaxCast.d64f5719.jpg\";","module.exports = __webpack_public_path__ + \"static/media/VSL_TaxCast_Screen_Images_20220328_3mb_pancrop.dbfbbc8c.gif\";","module.exports = __webpack_public_path__ + \"static/media/BouncingBarsBlack.d678e8d1.png\";","module.exports = __webpack_public_path__ + \"static/media/Logo512x512.17878142.png\";"],"sourceRoot":""}