{"version":3,"sources":["components/ValidatedFormGroup.tsx","config/elements.ts","enums/NotificationType.ts","enums/LogoutReason.ts","ovations-portal-api/constants.ts","config/routes.ts","serializers/logoutQuerySerializer.ts","ovations-portal-api/portalFetch.ts","ovations-portal-api/Account.ts","ovations-portal-api/AddressValidation.ts","ovations-portal-api/AppSettings.ts","ovations-portal-api/Claim.ts","ovations-portal-api/Contact.ts","ovations-portal-api/CustomerPromotion.ts","ovations-portal-api/Dashboard.ts","ovations-portal-api/DataSet.ts","ovations-portal-api/FAQ.ts","ovations-portal-api/Global.ts","ovations-portal-api/Home.ts","ovations-portal-api/PointLedger.ts","ovations-portal-api/ProfileSettings.ts","ovations-portal-api/Promotion.ts","ovations-portal-api/Referral.ts","ovations-portal-api/Report.ts","ovations-portal-api/PortalCardRewardDetail.ts","ovations-portal-api/RewardsLimit.ts","ovations-portal-api/YearOverYearSummary.ts","components/ChangePasswordModal.tsx","components/Favicon.tsx","components/Footer.tsx","enums/CustomerRewardType.ts","components/LiveChat.tsx","components/LoginModal.tsx","components/Notification.tsx","components/NotificationArea.tsx","components/LocalizedTitle.tsx","containers/AuthRedirectContainer.tsx","components/AlternatePayeeForm.tsx","enums/FormConfigType.ts","enums/ModalType.ts","components/Spinner.tsx","lib/withData.tsx","redux-modules/promotion.ts","ovations-portal-api/__mocks__/Promotion.ts","redux-modules/__mocks__/claimState.ts","redux-modules/claim.ts","loaders/claimLoaders.ts","redux-modules/customerPromotion.ts","loaders/promotionLoaders.ts","redux-modules/notification.ts","redux-modules/pointLedger.ts","redux-modules/account.ts","loaders/accountLoaders.ts","redux-modules/profileSettings.ts","loaders/profileSettingsLoader.ts","components/form-steps/StepEnums.ts","redux-modules/layout.ts","redux-modules/customer.ts","components/form-steps/claim-steps/ClaimDetailsStep.tsx","components/form-steps/claim-steps/CustomerInfoStep.tsx","components/form-steps/claim-steps/CustomerInfoReviewStep.tsx","components/form-steps/claim-steps/PurchaseTypeStep.tsx","components/form-steps/claim-steps/RewardOptionsStep.tsx","components/form-steps/claim-steps/RewardOptionSelectionStep.tsx","components/form-steps/claim-steps/StepNavigation.tsx","enums/ContactMethods.ts","components/form-steps/ProgressWrapper.tsx","components/form-steps/claim-steps/ClaimFormSteps.tsx","components/profile/ProfileAccountInformationCard.tsx","components/profile/ProfileAddressInformationCard.tsx","components/profile/ProfileCommPreferenceCard.tsx","components/profile/ProfileCustomFields.tsx","components/profile/ProfilePersonalInformationCard.tsx","components/profile/ProfileTaxIncomeCard.tsx","components/profile/ProfileFields.tsx","redux-modules/global.ts","containers/profile/withProfileHandlers.tsx","containers/ClaimContainer.tsx","components/claims/ValidatedClaimAmountHeader.tsx","containers/ClaimDetailContainer.tsx","components/promotions/PromotionOptionsList.tsx","containers/ClaimListContainer.tsx","redux-modules/contact.ts","loaders/contactLoaders.ts","config/eventTracking.ts","enums/QuestionCategory.ts","containers/ContactContainer.tsx","components/dashparts/PointBalance.tsx","components/dashparts/PointTracker.tsx","config/global.ts","components/dashparts/RecentRewards.tsx","components/dashparts/RewardsLimitTracker.tsx","components/dashparts/RewardsTotal.tsx","redux-modules/yearOverYearSummary.ts","components/dashparts/YearOverYearTracker.tsx","components/dashparts/SubmitClaimCard.tsx","containers/PromotionContainer.tsx","redux-modules/dashboard.ts","redux-modules/reward.ts","redux-modules/rewardsLimit.ts","loaders/dashboardLoaders.ts","components/dashparts/RedeemClaim.tsx","containers/DashboardContainer.tsx","config/breakpoints.ts","components/FAQItem.tsx","redux-modules/FAQ.ts","loaders/faqLoaders.ts","containers/FAQContainer.tsx","components/FAQPanel.tsx","components/CardTypeMatcher.tsx","components/Greeter.tsx","redux-modules/pageSettings.ts","loaders/homeLoaders.ts","containers/HomeContainer.tsx","containers/profile/ProfileCreateContainer.tsx","containers/profile/ProfileEditContainer.tsx","containers/ReconciliationContainer.tsx","components/PowerBIReportViewer.tsx","containers/ReportContainer.tsx","containers/ResetPasswordContainer.tsx","containers/SelectClaimTypeContainer.tsx","components/Routes.tsx","lib/toCss.ts","components/ThemeStyle.tsx","containers/FinalizeLoginContainer.tsx","containers/LoginContainer.tsx","containers/LogoutContainer.tsx","containers/LogoutSamlContainer.tsx","containers/LogoutSuccessContainer.tsx","containers/ReferralContainer.tsx","components/dashparts/RewardCatalogButton.tsx","enums/LanguageDisplayName.ts","lib/TagManager.ts","redux-modules/report.ts","loaders/reportLoaders.ts","redux-modules/l10n.ts","redux-modules/settings.ts","redux-modules/root.ts","containers/MastheadContainer.tsx","App.tsx","index.tsx","lib/configureStore.ts"],"names":["ValidatedFormGroup","onBlur","e","status","props","onStatusChange","wasBlurred","onChange","wasChanged","this","children","className","formGroupProps","mergedClassNames","classNames","React","Component","defaultProps","NotificationType","class","report","accountLink","id","contactUs","createProfile","faq","login","logo","mobileMenuToggler","dashboard","claims","logout","topBanner","reportDropdown","languageSelector","loginPrimaryTier","logoutPrimaryTier","text","groupOBranding","link","socialMediaLink","banner","submitClaimTitle","submitClaimSubtitle","submitClaimButton","loginLinkButton","ad","adTitle","adSubtitle","adImage","adBody","adAnchor","detailBreadcrumbContainer","detailBreadcrumbParent","detailBreadcrumbChild","countContainer","endDateFilter","listContainer","promotionFilter","startDateFilter","claimDate","promotionInfo","rewardInfo","questionAnswers","claimCard","claimCardActionRequired","claimCardDark","claimCardFirst","claimCardLinkBody","claimListEndMsg","cardCopy","claimFilterLabel","dateFilterColumn","dateFilterContainer","dateFilterCopy","navigation","cancelBtn","continueBtn","backBtn","form","cancel","submit","errorBanner","esignErrorBanner","apFirstName","apLastName","apPhoneNumber","apCountry","apAddress1","apAddress2","apCity","apState","apZip","overlappedQuestions","confirmAndContinue","completedPurchasePicker","continue","plannedPurchasePicker","dateOfBirth","email","emailConfirm","password","passwordConfirm","changePasswordTrigger","firstName","lastName","legalName","taxFormTooltip","socialSecurityNumber","mailingAddressEnabled","phone","address1","address2","city","state","zipCode","country","optIn","preferredLanguage","preferredContactMethod","preferredEmail","preferredPhone","dealerNumber","nonTaxableSocialSecurityNumber","ssnTooltip","ssnLockTooltip","sectionTitle","faqTitle","faqResponse","contactMethod","questionCategory","message","loginError","forgotPassword","newPassword","confirmNewPassword","submitNewPassword","claimStatusTrigger","error","FAQTrigger","recentRewardsItem","recentRewardsDescription","recentRewardsAction","rewardsLimitTrackerItem","rewardsLimitTrackerPromoGroupFooter","actionRequiredModal","redeemClaimGetReward","recentRewards","totalRewards","totalRewardsEarnings","recentRewardsNoResults","rotator","submitClaimCard","submitClaimSelect","submitClaimTrigger","editProfileTrigger","pointBalance","pointBalancePoints","pointBalanceShopTheCatalog","pointTrackerIcon","pointTrackerPoints","trackerSectionBackground","yearOverYearTracker","yearOverYearTrackerDropdown","yearOverYearTrackerTitle","yearOverYearPriorGrossUnits","yearOverYearLastUpdated","yearOverYearCurrentGrossUnits","yearOverYearCalculatedDifferential","currentPassword","closeButton","submitButton","changePasswordError","powerBIViewer","section","loginCta","image","LogoutReason","PORTAL_API_URL","process","REACT_APP_PORTAL_API_URL","window","location","host","rewardCatalogEndpoint","LOGOUT","LOGOUT_SUCCESS","LOGOUT_SAML","DASHBOARD","REGISTER","EDIT_PROFILE","CREATE_CLAIM","EDIT_CLAIM","CREATE_RECONCILIATION","EDIT_RECONCILIATION","CLAIMS","CLAIM_DETAIL","VIEW_REPORT","FAQ","CONTACT_US","LOGIN","ACCESS_VIOLATION","FINALIZE_LOGIN","logoutQuerySerializer","makeQueryStringSerializer","reason","Deserializer","Int","portalFetch","url","init","a","parsePath","pathname","locale","localizedUrl","injectCulture","fetch","getApiRequestInit","response","query","serialize","ExpiredToken","href","origin","getPath","rest","routes","stall","Promise","noop","ok","ApiError","Account","newUser","user","omit","headers","method","body","JSON","stringify","json","newUserId","success","errors","profile","account","resetRequest","requestPasswordReset","changePasswordRequest","credentials","redirectUrl","AddressValidation","address","addressResult","AppSettings","appSettings","serializer","Claim","claimNumber","customerId","request","serializeRequest","claimRequest","toFormData","newClaimId","claim","errorResponse","errorMessage","deserializeRequest","deserialize","Contact","contact","contactForm","CustomerPromotion","Dashboard","DataSet","dataSetId","propertyId","filters","Global","portal","Home","portalHome","PointLedger","ProfileSettings","profileSettings","Promotion","promos","map","p","limitReached","Referral","claimId","referral","confirmation","responseValue","Report","powerBiId","PortalCardRewardDetail","reward","rewardPackageType","Enums","ReloadableCAN","ReloadableUSA","RewardsLimit","YearOverYearSummary","year","emptyPasswordChangeRequest","ChangePasswordModal","passwordInput","onPasswordInputChange","currentTarget","name","value","setState","passwordRequest","inputStatus","inputStatuses","onFormSubmit","preventDefault","checkValidity","wasValidated","isSavingChanges","PortalApi","changePassword","messageId","addNotification","type","Error","Success","toggle","getInitialState","getIconAndClassnames","bind","togglePasswordFieldFocus","toggleShowPassword","errorStatus","undefined","showPassword","passwordFieldLostFocus","prevProps","validationMessage","passwordMatchesLogin","setCustomValidity","isOpen","isPatternMatching","classes","icon","faCircle","faCheckCircle","push","faTimesCircle","join","prevState","toLowerCase","passwordMatchesEmail","l10n","elements","for","required","placeholder","localizeMessage","autoFocus","innerRef","input","pattern","PASSWORD_WITH_ONEUPPERCASE_ONENUMBER","autoComplete","onClick","newPasswordValidationRules","vr","index","result","RegExp","test","FAIcon","size","noValidate","onSubmit","tag","renderModalBody","color","outline","disabled","faCircleNotch","Favicon","document","createElement","rel","update","removeLink","head","getElementsByTagName","appendChild","removeChild","externalLinkProps","target","Footer","filteredLinks","footerLinks","filter","isEnabled","orderBy","x","sortOrder","socialMediaLinks","mapValues","socialMediaIcons","_","key","iconToLinkMappings","enabledLinks","pickBy","isEmpty","title","brandName","contactPage","contactNumber","receivingEmailAddress","getFilteredFooterLinks","i","displayForReferral","renderContactUs","renderPortalLinks","renderLeftFooterContent","renderSocialMediaIcons","moment","format","footerText","enablePoweredByGroupOLink","groupOLink","values","liveChatEnabled","renderLeftFooter","renderRightFooter","facebook","instagram","linkedIn","pinterest","twitter","yelp","youTube","wordPress","CustomerRewardType","LiveChat","poc","widgetId","parentJs","chatJs","chatJsContent","src","customer","phoneNumber","innerText","parentNode","insertBefore","onload","nextSibling","emptyCredential","emptyCustomCredential","loginFieldValues","LoginModal","onCredentialsInputChange","onCustomFieldChange","customAttributeId","Number","getAttribute","fieldType","loginField","removeFirst","customCredentials","option","onPasswordResetSubmit","hasResetError","isLoggingIn","onRequestPasswordReset","hasLoginError","onLoginSubmit","disableManualProfileCreation","enablePasswordRequired","onCustomLogin","onLogin","onRegisterClick","isInResetMode","isInRegisterMode","toggleResetMode","isRequestingReset","customFields","find","obj","label","determineMessageId","xs","lg","to","toPath","pageNumber","hereText","submitText","submittingText","htmlFor","EMAIL_ADDRESS_LOGIN","renderLoginError","customLoginFields","loginFields","Fragment","getCustomFieldLabel","replace","trim","String","noAccessErrorEnabled","renderCustomLoginFields","renderLoginFields","renderNewUserBlockForNoRegistration","renderCreateProfileBlock","Notification","prevTime","afId","onAnimationFrame","time","pauseTimeout","requestAnimationFrame","delta","timeout","queueRemoval","onMouseEnter","onMouseLeave","onClose","isClosing","cancelAnimationFrame","setTimeout","remove","showClose","timerStyle","width","Math","round","closing","alertType","role","renderCloseButton","renderMessage","style","NotificationArea","items","notification","getAlertType","removeItem","notificationType","Warning","Title","compact","subtitle","main","default","LocalizedTitle","connect","ownProps","global","AuthRedirectContainer","noAccessError","imageUrl","alt","altText","height","AlternatePayeeForm","check","checked","alternatePayee","onAlternatePayeeRadioChange","readOnly","renderAlternatePayeeFields","FIRST_NAME","handleAddressFieldChange","FIRST_NAME_OR_LAST_NAME","renderAddressFields","enabledCountries","countryConfig","isCountryCode","countryConfigs","length","countryCode","subdivisions","abbreviation","postalCode","zip","renderAlternatePayeeRadioSelection","FormConfigType","ModalType","Spinner","withDataErrorConfig","handleError","showError","renderError","withData","configureWithData","fallback","withDataNoSpinner","emptyPromotion","OvationsApi","QuestionType","None","Date","toISOString","number","termsAndConditions","termsAndConditionsHeading","eSignAgreementUrl","questions","rewardCalculations","RewardCalculationType","Static","amount","alternatePayeeRewardPackageId","alternatePayeeRewardPackageType","rewardPackageName","rewardPackages","rewardPrefundEnabled","hasAlternatePayee","isTaxable","createReducer","list","reducer","promotionReducer","actions","dispatch","OvationsPortalApi","fetchAll","newList","selectors","hasReloadableRewardPackage","createSelector","promotion","reloadableRewardPackageType","RewardPackageType","ReloadableUSAGalileo","ReloadableCANVisa","some","r","includes","isRequireSSNForGalileo","requiresSecurityNumber","isRequireDOBForGalileo","requiresDateOfBirth","mockChoiceRewardCalculation","Choice","choices","mockPortalPromotion","promotionQuestion","generateMockRewardSummary","claimDetail","date","submissionDate","mockClaimDetail","ClaimStatus","PendingValidation","mockPromotionTextQuestionAnswer","mockPromotionNumberQuestionAnswer","mockPromotionDropdownQuestionAnswer","mockPromotionCascadingDropdownQuestionAnswer","mockPromotionDateTimeQuestionAnswer","mockPromotionFileUploadQuestionAnswer","ReconciliationStatus","PendingSubmission","rewardAmountTotal","answers","eSignAgreementAcceptance","isForPrefund","isPartialReward","reconciliationStatus","payeeDetails","expirationDate","rewardPointTotal","rewards","emptyClaim","promotionNumber","emptyClaimDetail","results","totalResults","redemptionClaims","claimReducer","fetchRedemptionClaims","fetchAllCustomerRewards","getOverlappedQuestions","q1","q2","question","isForPreFund","toProofOfPurchaseAnswers","Object","keys","pqid","promoQuestion","q","reconciliationQuestion","toClaim","isCreateReconciliation","resolveCascadingDropdownAnswer","answer","lastLayer","last","layers","lastAnswer","dataSetPropertyId","displayAsCurrency","monetize","parseFloat","resolveAllCascadingDropdownAnswers","claimLoader","memoizer","match","params","needsData","claimValues","claimRewardSummary","getClaimDetail","fetchData","customerPromotionReducer","claimListPagePromotionLoader","promotionLoader","path","customerPromotionLoader","customerPromotion","notificationReducer","getState","n","settings","newNotification","uniqueId","total","totalSalesIncentiveCalculated","pointLedgerReducer","fetchTotal","emptyCertifiableAddress","AddressCertificationStatus","NonCertified","emptyRegistrationRequest","optInToFutureOffers","preferredPhoneNumber","confirmPassword","confirmEmail","dealerRegistration","NotificationChannelType","DEFAULT_LOCALE","isActive","isLegacyUser","ssn","alternateProfiles","emptyProfile","emptyPasswordResetRequest","resetToken","me","accountReducer","pointLedger","register","registrationRequest","create","updateProfile","credential","customLogin","deleteMe","resetPassword","resetPasswordRequest","diff","MAX_AGE","accountLoader","programId","enableTaxableIncomeForm","enableRewardShoppingCatalog","fieldControlOption","coreFieldControlOptions","communicationPreferenceFieldControlOptions","disableSecurityNumberCollection","reviewInformationPage","profileSettingsReducer","profileSettingsLoader","ClaimSteps","initialState","modal","layoutReducer","modalToToggle","layout","getCustomerTaxAddress","profileMatch","altProfiles","alternateProfileType","AlternateProfileType","Tax","hasTaxInformation","disableSSN","taxAddress","k","replaceTaxAddressWithAddress","replacementAddress","altProfile","altProfilesWOTaxes","updatedTaxProfile","isTaxAddressPrimaryAddress","primaryAddress","indexOf","ClaimDetailsStep","md","renderPromoQuestions","renderTermsAndConditions","CustomerInfoStep","renderUserInfo","CustomerInfoReviewStep","PurchaseTypeStep","renderSelectClaimType","RewardOptionsStep","renderAvailibleRewards","renderAlternatePayeeForm","renderESignDisclosure","RewardOptionSelectionStep","renderRewardOptions","StepNavigation","addressWasUpdated","allSteps","current","next","setAddressWasUpdated","useEffect","onClickNextHandler","validateForm","submitAccount","scrollTo","isSaving","prev","ContactMethods","ProgressWrapper","currentStep","step","order","nextStep","getNextStep","maxValue","ClaimFormSteps","activePromotion","selectedFormConfigType","Prefund","questionsForFormConfigType","renderEsign","customerWillReceiveVirtualReward","steps","component","renderAccountInformation","ReviewStep","unshift","RewardStep","DetailStep","isEdit","stepsConfig","navProps","before","progressProps","config","uniq","ProfileAccountInformationCard","displayForReviewClassName","displayForReview","onEmailChange","updates","onInputChange","openIdEnabled","canChangePassword","toggleChangePassword","dealerRegistrationFieldLabel","dealerNumErrors","registrationErrors","isEditProfile","emailAddress","EMAIL_ADDRESS","renderEmailFields","renderPasswordFields","renderChangePasswordButton","dealerRegistrationEnabled","renderDealerNumberField","ProfileAddressInfoCard","handleAddressChange","valid","hasSpecialCharacters","address1Valid","address2Valid","hasNumbers","cityValid","onAddressChange","doesStringContainSpecialCharacters","isProfileFieldEditable","elementId","isFieldReadOnly","ProfileFieldType","FullAddress","renderAddressErrorMessage","currentCountry","stateName","division","renderAddress1Input","renderAddress2Input","subdiv","zipcode","ProfileCommPreferences","onCheckboxChange","handlePreferredPhoneNumberChange","event","renderPreferredEmailAddress","isCommunicationFieldEditable","CommunicationPreferenceFieldType","PreferredEmail","renderPreferredPhoneNumber","guide","showMask","mask","US_PHONE_MASK","PHONE_MASKED_PATTERN","PreferredPhone","PreferredContactMethod","numPrecedingFields","futureOfferOptInPrompt","localeNameKey","SupportedLocale","enUS","esUS","frCA","frFR","languageOptions","enabledLanguages","localeNameRendered","PreferredLanguage","sort","b","localeCompare","languageOption","availableFields","renderPreferredLanguage","enableSms","renderPreferredMethodOfContact","enableFutureOfferOptIn","renderEnableFutureOptIns","ProfileCustomFields","customFieldValues","customField","PersonalInformationCard","onDateOfBirthChange","datetime","getMaskedSSN","onPhoneChange","isSSNFocused","isFocused","onSSNFocus","requireDateOfBirth","hasReloadableCards","dateFormat","localizeDateFormat","isDateOfBirthEmpty","DateTimePicker","accountSelectors","selectedDate","maxDate","dateTimeMaxDateOfBirth","minDate","dateTimeMinDateOfBirthPortal","placeholderText","invalidFeedback","utc","maxAge","ssnValue","InfoIconTooltip","placement","content","faQuestionCircle","isSSNValid","onFocus","updateSSNFocus","isOtherSSNFocused","maskedSSNValue","faLock","FirstName","LastName","PhoneNumber","hasPhoneNumberError","renderDateOfBirthInput","CountryCode","USA","renderSSNInput","ProfileTaxIncomeCard","onMailingAddressToggle","newAlternateProfileArray","onMailingAsTaxToggle","regRequest","_getTaxAddress","taxAddress1","userHasTaxData","onTaxAddressChange","taxAddress2","renderTaxAddress1Input","renderTaxAddress2Input","getStateNameByCode","maxLength","renderTaxAddressCard","ProfileFields","updatedAltProfileArray","_updateAltProfileTaxAddress","profileFieldType","field","fieldName","customerEdit","communicationFieldType","communicationPreferenceFieldType","generateMaskedSSNValue","unmaskedSSN","sanitizedSSNValue","split","MASKED_VALUE_TEMPLATE","unmaskedSSNLength","substr","maskedValue","SOCIAL_SECURITY_NUMBER_USA","SOCIAL_SECURITY_NUMBER_CAN","createUserTaxData","clonedTaxAddress","updatedAltProfiles","isForReview","directPhoneNumberError","useMailingAsTaxAddress","rewardPackageTypes","renderAccountInformationCard","renderPersonalInformationCard","renderAddressInformationCard","renderTaxableIncomeCard","renderCommunicationPreferencesCard","renderCustomProfileFields","globalReducer","getLiveChatSettings","memoize","liveChatWidgetId","liveChatAppId","liveChatAppSecret","enableLiveChat","hasChanges","initial","isEqual","withProfileHandlers","transformProfileToRegistration","getProfile","openAddressValidationModal","showAddressValidationModal","openTaxAddressValidationModal","showTaxAddressValidationModal","updateMailingAsTaxAddress","newValue","callback","onProfileChange","phoneNumberFieldControl","validatePhoneNumber","updateIsAccountSaving","isSavingChangesAccount","updateValidatedAccount","wasValidatedAccount","onCancelClick","isValid","phoneNumberError","formatProfileWithTaxAddessAndSubmit","saveCallback","formatProfileAndSubmit","saveChangesCallback","transformRegistrationToProfile","validateAddress","renderTaxAddressValidationModal","AddressValidationModal","onCancel","onSave","renderAddressValidationModal","renderProfileFields","options","hideSubmitCancelButton","history","goBack","onKeyDown","element","code","emptyAlternatePayee","certificationState","ClaimContainer","fetchCascadingDropdownOptions","fetchPropertyValues","editSubmit","editedClaim","createSubmit","createClaimRequest","alternatePayeeSelected","getElementById","focus","querySelector","displayServerError","submitClaim","isEditing","navigationAction","addRewardsToClaim","getOnAnswerChange","promotionQuestionId","newClaim","onESignDisclosureLinkClick","eSignDisclosureHasBeenReviewed","setClaimState","touchedReward","onRewardChange","parentChoiceCalcId","selectedRewardCalcId","getActivePromotion","updateClaimReward","renderPromotionQuestions","QuestionField","claimStatus","inputProperties","defaultChecked","renderESignDisclosureHasNotBeenReviewed","ESignDisclosure","onLinkClick","linkText","showAcceptDisclosure","inputProps","Terms","heading","renderAvailableRewardsErrorBanner","alternatePayeeRadioSelected","toBool","updatedClaim","Validated","choiceRewardCalcs","calc","AvailableRewards","rewardCalculation","newSelection","selectedReward","getSelectedClaimReward","renderErrorBanner","columnWidths","isRequired","showErrorBanner","choiceRewardNumber","shouldRenderCustomerNote","onFormConfigTypeChange","renderClaimTypeRadio","renderClaimTypeError","doesInitialUserStateHaveTaxData","saveAccountChanges","setAddressUpdated","updated","PasswordChange","forEach","rp","when","changeRewardOption","rewardPackage","selectedRewardOptions","findIndex","rewardIndex","cardRewardDetail","RewardStatus","Inactive","validatedAmount","rewardStatusHistory","rewardOptionIsChecked","selectedRewardOption","renderRewardOptionSelectionErrorBanner","coreElements","availableRewards","rewardErrorBanner","faExclamationTriangle","renderRewardOptionSelection","validRewardCalcs","RewardOptionSelect","nextClaimDetail","setSelectedRewardOptions","wasValidatedFormTypeConfig","promotionFromRoute","VirtualUSA","renderRewardsErrorBanner","doesUserHaveTaxAddress","doesTaxAddressMatchPrimary","getTitleDescriptors","renderClaimForm","claimBeingEdited","ClaimContainerWithData","ValidatedClaimAmountHeader","isRedemptionDashpart","getCustomerFacingName","customerFacingName","displayValue","choiceCalcs","Exported","Issued","Fulfilled","Executing","calcNum","dashpartChoiceDisplayVlue","choice","Points","displayName","getHeader","ClaimDetailContainer","Submitted","PendingExport","PotentialDuplicate","NeedsReview","Incomplete","Disqualified","Mailed","PendingRedemption","ConfirmingReferral","rewardStatus","Activated","Deactivated","Expired","Processed","Replaced","Undeliverable","UnclaimedProperty","isCreatingReconciliation","rewardType","RetailCard","SingleLoadUSA","SingleLoadCAN","SingleLoadUSAGalileo","CheckUSA","answerList","Text","promotionTextQuestionAnswer","promotionNumberQuestionAnswer","DateTime","promotionDateTimeQuestionAnswer","FileUpload","promotionFileUploadQuestionAnswer","fileUrl","fileName","Dropdown","promotionDropdownQuestionAnswer","CascadingDropdown","MultiSelect","promotionMultiSelectQuestionAnswer","selections","found","truthyStatuses","isEditingReconciliation","isReconciliationClaimEditable","claimFormDetails","hasProofOfPurchaseAnswer","prefundQuestions","getPrefundQuestions","prefundFormDetails","generateClaimFormQuestionResponses","reconcilationLink","generateReconciliationLink","friendlyReconciliationStatus","getFriendlyReconciliationStatus","getFriendlyClaimStatus","getFriendlyPOPButtonText","getRewardStatus","rewardPackagePoints","getFriendlyRewardStatus","nonPrefundQuestions","getNonPrefundQuestions","generateBreadcrumbs","renderClaimDetails","renderPrefundForm","renderProofOfPurchase","ClaimDetailContainerWithData","PromotionOptionsList","initialOptionLabel","promotions","limitReachedLabel","isSubmitClaim","emptyOptionsLabel","ClaimListContainer","onDropdownChange","search","newRequest","setRequest","onDateChange","dates","rangeStart","rangeEnd","submissionEndDate","setHours","submissionStartDate","requestWithoutRangeBounds","displayQuestionAnswer","ReferredIndividualEmail","promotionReferredIndvEmailQuestionAnswer","ReferredIndividualName","promotionReferredIndvNameQuestionAnswer","hasFetchError","isFetchingData","getClaims","notifications","summaryList","claimsList","ungroupedRewardsList","summaryItem","rewardByOrderNumberMap","orderNumberKey","orderNumber","rewardOrderNumbers","singleRewardslist","groupedRewardsList","rewardNumber","rewardMatchGroup","formattedGroupRewardsList","rewardGroup","indexItem","RewardGroup","orderDate","totalItems","mergedFormattedSummaryList","sortBy","reverse","isClaimEditable","formConfigType","claimLink","generateClaimBodyLink","renderSubmissionMetadata","faExclamationCircle","renderClaimDetailStatus","faChevronRight","filteredQuestions","displayOnPortalHistory","actionRequired","friendlyStatus","getFriendlyStatus","shouldDisplayReconciliationTask","rewardDetail","renderCatalogRewardTitle","claimCards","isOdd","renderClaimCardBody","renderRewardCardBody","renderActionRequiredCardBody","row","selectsRange","endDate","getCountMessageId","renderCount","renderCards","groupRewardsData","customerClaims","actionRequiredClaims","renderActionRequiredCards","renderActionRequiredItems","renderFilterDependentItems","renderFilters","renderSpinner","renderCardsToDisplay","ClaimListContainerWithData","contactReducer","contactUsFormEntry","contactLoader","EventCategory","MultiLanguageAction","QuestionCategory","Other","ContactContainer","onTextAreaChange","questionCategories","translatedCategories","c","category","qc","contactNumberLink","hoursOfOperation","PHONE","getLocalizedSortedCategories","renderFirstNameInput","renderLastNameInput","renderPhoneInput","renderEmailInput","valueId","renderQuestionCategoryDropdown","rows","offset","renderContactByPhone","renderHoursOfOperation","ContactContainerWithData","renderShoppingButton","onShopCatalogClick","PointBalance","PointTracker","trackerIcon","iconKey","DEFAULT_TRACKER_ICON","pointTrackerGoal","percent","pointLedgerTotal","clamp","renderFormattedNumber","unformattedNumber","toLocaleString","valueTranslation","pointTrackerTitle","isTranslucent","transform","backgroundColor","progressBarColor","iconMap","pointLedgerDate","checkBalanceUrls","getHeadingText","headingText","isInitialCard","getCardAction","numberOfClaims","isReloadable","associatedItems","renderReward","sentDate","RecentRewards","renderGroupRewardLimitFooter","promotionGroupRewardLimit","renderRewardsLimit","dollarRewardLimit","used","quantityRewardLimit","itemName","RewardsLimitTracker","rewardsLimits","RewardsTotal","emptyYearOverYearSummary","currentYearGrossUnits","priorYearGrossUnits","lastUploadedDate","yearOverYearSummaryReducer","fetchSummary","YearOverYearTracker","onChangeYear","selectedYear","firstKey","first","getSortedYears","selectedYearOverYearSummary","yearOverYearSummaries","getSelectedYearOverYearSummary","wholePriorGrossUnits","wholeCurrentGrossUnits","yoyVariance","yoyPercentValue","abs","yoyTrendIsUp","yoyPercentFormatted","toFixed","legibleCurrentGross","yearOverYearTrackerUnits","sortedYears","legiblePriorGross","yearOverYearTrackerGoal","renderYearDropdown","renderStatus","SubmitClaimCard","onSubmitClaim","stopPropagation","onSelectPromotion","renderPromotionSelect","PromotionContainer","isDateOfBirthRequired","promotionSelectors","isTaxableFieldsRequired","isFieldRequiredForGalileo","parseInt","toggleActionRequired","submitClaimUrl","isActionRequired","renderActionRequiredModal","PromotionContainerWithData","imageRotatorTitle","imageRotatorImages","enableYearOverYearTracker","enablePointTracker","trackerBackgroundUrl","viewPointBalance","dashboardReducer","rewardReducer","rewardsLimitReducer","rewardsLimit","dashboardPageLoader","cache","clear","currentYear","getFullYear","all","yearOverYearSummary","renderButton","RedeemClaim","mq","matchMedia","DashboardContainer","open","isDesktop","matches","addListener","removeListener","navbarColor","navBarColor","navBarRGB","getRGB","gradientStart","gradientStop","gradientDirection","gradientDefinition","backgroundImage","hasBackground","shouldSplitLayout","trackerColumnWidths","renderTrackerEnhancements","renderPointTracker","renderYearOverYearTracker","pointLedgerTotalSalesIncentiveCalculated","secondaryButtonColor","hasPromotions","pointTotal","hasCurrencyRewards","rotatorImage","img","linkUrl","renderPageTitle","renderRedeemClaim","renderTrackers","renderClaimSubmitter","renderRewardsTotal","renderPointBalance","renderRecentRewards","renderImageRotator","DashboardContainerWithData","FAQItem","trigger","getIdentifierString","setAttribute","isQuestion","answerIndex","sectionIndex","queryPart","item","dangerouslySetInnerHTML","__html","responseText","faqReducer","FAQLoader","FAQContainer","faqSections","renderQuestions","activeFAQ","renderSections","FAQPanel","CardTypeMatcher","cardDigits","cardServicesUrl","onMatch","cardNotRecognized","minWidth","buttonText","actionConfigurator","faCreditCard","header","description","cta","onRewardPackageMatch","faListAlt","toggleLogin","faAngleDoubleRight","Greeter","home","submitClaimButtonText","action","advertisements","pageSettingsReducer","homeLoader","pageSettings","HomeContainer","Login","getCardActivationUrl","activationUrls","cardActivationUrls","cardNumber","renderAdvertisement","columnClasses","renderAnchoredAdvertisement","renderAdvertisementAsColumn","router","renderBannerImage","renderAdvertisements","ProfileCreateContainer","hasValidAddress","saveChanges","profileWithFormattedSSN","registrationResult","createRef","ProfileCreateContainerWithData","ProfileEditContainer","getCustomFieldsFiltered","displayedInProfile","ProfileEditContainerWithData","ReconciliationContainer","rewardCalculationId","onClaimAmountChangeClick","isOverlapFieldsEditable","isConfirmAndContinue","onConfirmAndContinue","editedReconciliation","isFormReady","questionId","promoQuestions","renderQuestionAnswerPairsAnswer","questionsToBerendered","differenceWith","renderOverlappedQuestions","renderClaimInfo","renderQuestionsBlock","renderSubmissionButtons","ReconciliationContainerWithData","powerbi","pbi","Service","hpmFactory","wpmpFactory","routerFactory","PowerBIReportViewer","powerbiRoot","staticEmbedOpts","tokenType","TokenType","Embed","embed","isMobile","LayoutType","MobilePortrait","Master","reportId","embedUrl","accessToken","layoutType","getLayoutType","validateReportLoad","configOptions","getEmbedConfigOptions","ref","node","ReportContainer","reportConfig","fetchConfig","ResetPasswordContainer","updatedRequest","passwordResetRequest","initializedReset","parsedURLQuery","qs","propertiesFromQuery","decodeURI","escapeStringRegexp","SelectClaimTypeContainer","selectedPromotion","renderSelectClaimTypeForm","SelectClaimTypeContainerWithData","NotFound","AnimatedRoute","rootState","redirect","render","childProps","PrivateRoute","routeProps","getHomeRedirect","getClaimRedirect","withRouter","extraProps","exact","toCss","cssConfig","declaration","selector","properties","omitBy","property","kebabCase","getBoxShadow","base16String","toColor","important","cssRule","ThemeStyle","fontLink","getFontLink","updateFont","nextProps","isShallowEqual","font","navLinkTextColor","buttonDefs","fillColor","primaryButtonColor","hoverColor","primaryButtonHoverColor","secondaryButtonHoverColor","assign","buttonDef","borderColor","getRelativeTextColor","boxShadow","shade","fontFamily","justifyContent","navLinkHoverTextColor","navLinkHoverBackgroundColor","fontWeight","textDecoration","textDecorationThickness","borderTop","fontUrl","getFontUrl","getUtilityStyles","getButtonStyles","getFont","getHeaderStyles","getOverlayBgStyles","getLiveChatStyles","getTextStyles","renderCss","FinalizeLoginContainer","isFetchingAccount","hasError","LoginContainer","protocol","loginWithOpenId","LogoutContainer","logoutWithOpenId","samlEnabled","logoutWithSAML","getReason","LogoutSamlContainer","logoUrl","clickHereLinkText","ReferralContainer","isReferred","questionText","confirmationText","declineText","alreadyResponded","expired","isDisqualified","isLoading","claimGlobalKey","confirm","successfulSubmission","submitSelection","renderRadioSelection","localizedMessageKey","renderReferralExceptionBody","referralConfirmationBody","renderReferralSelectionBody","renderReferralBody","ReferralContainerWithData","onRewardCatalogClick","RewardsCatalogButton","roundedPtsBalance","faStar","LanguageDisplayName","TagManager","w","dataLayer","getTime","firstScript","gtmScript","async","eventArgs","CUSTOM_TRACKING_EVENT_NAME","reportReducer","reportsLoader","loadMessages","enMessages","loadLocaleData","messages","l10nReducer","acceptLanguage","featureFlags","settingsReducer","rootSelectors","Boolean","legacyUrl","MastheadContainer","onLoginClick","closeMenu","onLogoutClick","toggleScrollLock","classList","isMenuOpen","toggleMenu","getLanguageSelectionHandler","normalizedLocale","normalizeLocale","getCurrentLocale","cultureCode","trackEvent","MultiLanguage","LanguageOverride","setLocaleOverride","localizedPath","hash","isLogoutModalOpen","reports","dropdownContents","active","Link","nav","inNavbar","caret","startsWith","display","currentLocale","end","without","ghost","isLoggedIn","isUserLoggedIn","isSSO","isRewardCatalogEnabled","displayLogoutModal","renderMobileLanguageSelector","hasReports","navbar","getReportsNavMarkup","renderMobileNavItems","logoLink","faInfoCircle","hostname","renderDesktopLanguageSelector","renderTopBanner","expand","renderPrimaryTier","ScrollbarSpacer","renderLogoImage","renderNavItems","ConfirmationModal","onDismissModal","onContinueClick","headerText","bodyText","cancelButtonText","continueButtonText","continueDangerColor","isCancelOutlined","MastheadContainerWithData","App","enabled","onRemoveNotification","notice","localeRedirect","getLocaleRedirect","l10nActions","documentElement","lang","updateAnalytics","prevPortal","isChanged","applicationInsightsInstrumentationKey","AIAnalytics","configure","trackPageView","listen","tagManagerId","initialize","liveChatSettings","appId","appSecret","LogoutSuccessContainer","favIconUrl","renderLiveChat","pathParseResult","userLocale","getUserLocale","createBrowserHistory","basename","store","mergePersistedState","combineReducers","connectRouter","createRootReducer","storage","adapter","localStorage","enhancer","composeEnhancers","compose","applyMiddleware","routerMiddleware","thunk","persistState","createStore","configureStore","ReactDOM"],"mappings":"uaAcqBA,E,4MAMjBC,OAAkD,SAACC,GAC/C,IAAMC,EAAS,EAAKC,MAAMD,OAC1B,EAAKC,MAAMC,eAAX,2BAA+BF,GAA/B,IAAuCG,YAAY,KAC/C,EAAKF,MAAMH,QACX,EAAKG,MAAMH,OAAOC,I,EAI1BK,SAAqD,SAACL,GAClD,IAAMC,EAAS,EAAKC,MAAMD,OAC1B,EAAKC,MAAMC,eAAX,2BAA+BF,GAA/B,IAAuCK,YAAY,KAC/C,EAAKJ,MAAMG,UACX,EAAKH,MAAMG,SAASL,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AAKinD,GAAN,IAAuB5nD,OAAQ6nD,UA3C7D,GAAyBp0D,IAAMC,WA+LhB8hB,gBAAmC,SAAC5b,GAAD,OAAWA,IAA9C4b,CAAqD2wC,I,mFCtN9DpwB,I,cAAUgyB,YAAqB,CAAEC,SAAUloD,aAAU/B,OAAOC,SAAS+B,UAAUC,UAC/EioD,GCPS,SAAClyB,GACZ,IAAMrc,EAAUwuC,iCJaa,SAACnyB,GAAD,OAC7BoyB,2BAAgB,CACZlmD,QAAS2f,GACTve,MAAO+Z,GACPzZ,QAAS0jC,GACTvnB,kBAAmBL,GACnBlrB,UAAW06C,GACX96C,IAAK++C,GACLx9B,OAAQyd,GACRnqB,KAAM64C,GACNp+B,OAAQF,GACR1O,aAAckL,GACdk1B,aAAcF,GACdlzB,YAAatB,GACbnG,UAAWT,GACXlV,gBAAiBye,GACjBpvB,OAAQytD,GACRh8C,OAAQ2pC,GACRE,aAAcD,GACdyG,OAAQwS,YAAcryB,GACtB7V,SAAU8hC,GACVrS,oBAAqB1D,KIlCaoc,CAAkBtyB,IAClDuyB,EAAU18C,KAAO,CAAC,WAARA,CAAoB28C,KAAQxqD,OAAOyqD,eASnD,IAAMC,GAAWC,EARMC,YASnBC,2BAAgBC,aAAiB9yB,GAAU+yB,MAC3CC,KAAaT,EAAS,sBAE1B,OAAOU,uBAA8CtvC,EAAkC+uC,GDR7EQ,CAAelzB,IAE7BmzB,IAASvO,OAEL,cAAC,IAAD,CAAUsN,MAAOA,GAAjB,SACI,cAAC,IAAD,CAAiBlyB,QAASA,GAA1B,SACI,cAAC,IAAD,CAAOvO,UAAW2+B,SAG1Br7C,SAASgsB,eAAe,W","file":"static/js/main.06fe7479.chunk.js","sourcesContent":["import classNames from 'classnames';\r\nimport React from 'react';\r\nimport { FormGroup, FormGroupProps } from 'reactstrap';\r\n\r\nexport interface InputStatus {\r\n wasBlurred: boolean;\r\n wasChanged: boolean;\r\n}\r\n\r\nexport interface ValidatedFormGroupProps extends FormGroupProps {\r\n onStatusChange: (inputStatus: InputStatus) => void;\r\n status?: InputStatus;\r\n}\r\n\r\nexport default class ValidatedFormGroup extends React.Component {\r\n // eslint-disable-next-line react/static-property-placement\r\n static defaultProps: Partial = {\r\n status: { wasBlurred: false, wasChanged: false },\r\n };\r\n\r\n onBlur: React.FocusEventHandler = (e) => {\r\n const status = this.props.status as InputStatus;\r\n this.props.onStatusChange({ ...status, wasBlurred: true });\r\n if (this.props.onBlur) {\r\n this.props.onBlur(e);\r\n }\r\n };\r\n\r\n onChange: React.ChangeEventHandler = (e) => {\r\n const status = this.props.status as InputStatus;\r\n this.props.onStatusChange({ ...status, wasChanged: true });\r\n if (this.props.onChange) {\r\n this.props.onChange(e);\r\n }\r\n };\r\n\r\n render() {\r\n const { children, status, onStatusChange, className, ...formGroupProps } = this.props;\r\n const mergedClassNames = classNames(className, {\r\n 'was-validated': status && status.wasBlurred && status.wasChanged,\r\n });\r\n\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n }\r\n}\r\n","export default {\r\n metadata: {\r\n cssSelector: {\r\n favicon: 'link[rel=icon]',\r\n },\r\n },\r\n globalHeader: {\r\n class: {\r\n report: 'global-header__report',\r\n accountLink: 'global-header__account-link',\r\n },\r\n id: {\r\n contactUs: 'global-header__contact-us',\r\n createProfile: 'global-header__create-profile',\r\n faq: 'global-header__faq',\r\n login: 'global-header__login',\r\n logo: 'global-header__logo',\r\n mobileMenuToggler: 'global-header__mobile-menu-toggler',\r\n dashboard: 'global-header__dashboard',\r\n claims: 'global-header__claims',\r\n logout: 'global-header__logout',\r\n topBanner: 'global-header__top-banner',\r\n reportDropdown: 'global-header__report-dropdown',\r\n languageSelector: 'global-header__language-selector',\r\n loginPrimaryTier: 'global-header__login-primary-tier',\r\n logoutPrimaryTier: 'global-header__logout-primary-tier',\r\n },\r\n },\r\n globalFooter: {\r\n id: {\r\n text: 'global-footer__text',\r\n groupOBranding: 'global-footer__group-o-branding',\r\n },\r\n class: {\r\n link: 'global-footer__link',\r\n socialMediaLink: 'global-footer__social-media-link',\r\n },\r\n },\r\n home: {\r\n id: {\r\n banner: 'home__banner',\r\n submitClaimTitle: 'home__submit-claim--title',\r\n submitClaimSubtitle: 'home__submit-claim--subtitle',\r\n submitClaimButton: 'home__submit-claim--button',\r\n loginLinkButton: 'home__login-link',\r\n },\r\n class: {\r\n ad: 'home__ad',\r\n adTitle: 'home__ad-title',\r\n adSubtitle: 'home__ad-subtitle',\r\n adImage: 'home__ad-image',\r\n adBody: 'home__ad-body',\r\n adAnchor: 'home__ad-anchor',\r\n },\r\n },\r\n claimDetail: {\r\n class: {\r\n detailBreadcrumbContainer: 'claim-detail__breadcrumb-container',\r\n detailBreadcrumbParent: 'claim-detail__breadcrumb-parent-item',\r\n detailBreadcrumbChild: 'claim-detail_breadcrumb-child-item',\r\n },\r\n },\r\n claimList: {\r\n id: {\r\n countContainer: 'claim-list__count-container',\r\n endDateFilter: 'claim-list__end-date-filter',\r\n listContainer: 'claim-list__list-container',\r\n promotionFilter: 'claim-list__promotion-filter',\r\n startDateFilter: 'claim-list__start-date-filter',\r\n },\r\n class: {\r\n claimDate: 'claim-list__claim-date',\r\n promotionInfo: 'claim-list__promotion-info',\r\n rewardInfo: 'claim-list__reward-info',\r\n questionAnswers: 'claim-list__question-answers',\r\n claimCard: 'claim-list__claim-card',\r\n claimCardActionRequired: 'claim-list__claim-card-action-required',\r\n claimCardDark: 'claim-list__claim-card claim-list__claim-card--dark',\r\n claimCardFirst: 'claim-list__claim-card--first',\r\n claimCardLinkBody: 'claim-list__claim-card__link-body',\r\n claimListEndMsg: 'claim-list__end-msg',\r\n cardCopy: 'claim-list__claim-card__copy',\r\n claimFilterLabel: 'claim-list__claim-filter-label',\r\n dateFilterColumn: 'claim-list__date-filter-column',\r\n dateFilterContainer: 'claim-list__date-filter-container',\r\n dateFilterCopy: 'claim-list__date-filter-text',\r\n },\r\n },\r\n claimStep: {\r\n navigation: {\r\n cancelBtn: 'claim-step__nav__cancelBtn',\r\n continueBtn: 'claim-step__nav__continueBtn',\r\n backBtn: 'claim-step__nav__backBtn',\r\n },\r\n },\r\n createClaim: {\r\n id: {\r\n form: 'create-new-claim__form',\r\n cancel: 'create-new-claim__cancel',\r\n submit: 'create-new-claim__submit',\r\n errorBanner: 'create-new-claim__error-banner',\r\n esignErrorBanner: 'create-new-claim__esign-error-banner',\r\n apFirstName: 'create-new-claim-alternate-payee__first-name',\r\n apLastName: 'create-new-claim-alternate-payee__last-name',\r\n apPhoneNumber: 'create-new-claim-alternate-payee__phone',\r\n apCountry: 'create-new-claim-alternate-payee__country',\r\n apAddress1: 'create-new-claim-alternate-payee__address-1',\r\n apAddress2: 'create-new-claim-alternate-payee__address-2',\r\n apCity: 'create-new-claim-alternate-payee__city',\r\n apState: 'create-new-claim-alternate-payee__state',\r\n apZip: 'create-new-claim-alternate-payee__zip',\r\n },\r\n },\r\n createReconciliation: {\r\n class: {\r\n overlappedQuestions: 'create-reconciliation__overlapped-questions',\r\n },\r\n id: {\r\n form: 'create-reconciliation__form',\r\n confirmAndContinue: 'create-reconciliation__confirm-and-continue',\r\n errorBanner: 'create-reconciliation__error-banner',\r\n cancel: 'create-reconciliation__cancel',\r\n submit: 'create-reconciliation__submit',\r\n },\r\n },\r\n selectClaimType: {\r\n id: {\r\n completedPurchasePicker: 'select-claim-type__completed-purchase-picker',\r\n cancel: 'select-claim-type__cancel',\r\n continue: 'select-claim-type__continue',\r\n form: 'select-claim-type__form',\r\n plannedPurchasePicker: 'select-claim-type__planned-purchase-picker',\r\n },\r\n },\r\n createNewProfile: {\r\n id: {\r\n dateOfBirth: 'create-new-profile__date-of-birth',\r\n email: 'create-new-profile__email',\r\n emailConfirm: 'create-new-profile__email-confirm',\r\n password: 'create-new-profile__password',\r\n passwordConfirm: 'create-new-profile__password-confirm',\r\n changePasswordTrigger: 'create-new-profile__change-password-trigger',\r\n firstName: 'create-new-profile__first-name',\r\n lastName: 'create-new-profile__last-name',\r\n legalName: 'create-new-profile__legal-name',\r\n taxFormTooltip: 'create-new-profile__tax-form-tooltip',\r\n socialSecurityNumber: 'create-new-profile__social-security-number',\r\n mailingAddressEnabled: 'create-new-profile__mailing-address-enabled',\r\n phone: 'create-new-profile__phone',\r\n address1: 'create-new-profile__address1',\r\n address2: 'create-new-profile__address2',\r\n city: 'create-new-profile__city',\r\n state: 'create-new-profile__state',\r\n zipCode: 'create-new-profile__zip-code',\r\n country: 'create-new-profile__country',\r\n optIn: 'create-new-profile__opt-in',\r\n preferredLanguage: 'create-new-profile__preferred-language',\r\n preferredContactMethod: 'create-new-profile__preferred-contact-method',\r\n preferredEmail: 'create-new-profile__preferred-email',\r\n preferredPhone: 'create-new-profile__preferred-phone',\r\n dealerNumber: 'create-new-profile__dealer-number',\r\n nonTaxableSocialSecurityNumber: 'create-new-profile__non-taxable-social-security-number',\r\n ssnTooltip: 'create-new-profile__ssn-tooltip',\r\n ssnLockTooltip: 'create-new-ssn-lock-tooltip',\r\n },\r\n },\r\n FAQ: {\r\n class: {\r\n sectionTitle: 'faq__section-title',\r\n faqTitle: 'faq__faq-title',\r\n faqResponse: 'faq__faq-response',\r\n },\r\n },\r\n contactUs: {\r\n id: {\r\n firstName: 'contact-us__first-name',\r\n lastName: 'contact-us__last-name',\r\n phone: 'contact-us__phone',\r\n email: 'contact-us__email',\r\n contactMethod: 'contact-us__contact-method',\r\n questionCategory: 'contact-us__question-category',\r\n message: 'contact-us__message',\r\n },\r\n },\r\n loginModal: {\r\n id: {\r\n email: 'login-modal__email',\r\n password: 'login-modal__password',\r\n login: 'login-modal__login',\r\n loginError: 'login-modal__login-error',\r\n forgotPassword: 'login-modal__forgot-password',\r\n createProfile: 'login-modal__create-profile',\r\n },\r\n },\r\n resetPassword: {\r\n id: {\r\n newPassword: 'reset-password__new-password',\r\n confirmNewPassword: 'reset-password__confirm-new-password',\r\n submitNewPassword: 'reset-password__submit-new-password,',\r\n },\r\n },\r\n callsToAction: {\r\n class: {\r\n claimStatusTrigger: 'call-to-action__claim-status',\r\n },\r\n },\r\n cardTypeMatcher: {\r\n class: {\r\n form: 'card-type-matcher__form',\r\n error: 'card-type-matcher__error',\r\n },\r\n },\r\n FAQPanel: {\r\n class: {\r\n FAQTrigger: 'faq-panel__faq',\r\n },\r\n },\r\n dashboard: {\r\n class: {\r\n recentRewardsItem: 'dashboard__recent-rewards--item',\r\n recentRewardsDescription: 'dashboard__recent-rewards--description',\r\n recentRewardsAction: 'dashboard__recent-rewards--action',\r\n rewardsLimitTrackerItem: 'dashboard__rewards-limit-tracker--item',\r\n rewardsLimitTrackerPromoGroupFooter: 'dashboard__rewards-limit-tracker--Promo-group-footer',\r\n },\r\n id: {\r\n actionRequiredModal: 'dashboard__action-required-modal',\r\n redeemClaimGetReward: 'dashboard__get-reward',\r\n recentRewards: 'dashboard__recent-rewards',\r\n totalRewards: 'dashboard__total-rewards',\r\n totalRewardsEarnings: 'dashboard__total-rewards-earnings',\r\n recentRewardsNoResults: 'dashboard__recent-rewards-no-results',\r\n rotator: 'dashboard__rotator',\r\n submitClaimCard: 'dashboard__submit-claim',\r\n submitClaimSelect: 'dashboard__submit-claim--select',\r\n submitClaimTrigger: 'dashboard__submit-claim--trigger',\r\n editProfileTrigger: 'dashboard__my-profile--edit-trigger',\r\n pointBalance: 'dashboard__point-balance',\r\n pointBalancePoints: 'dashboard__point-balance-points',\r\n pointBalanceShopTheCatalog: 'dashboard__point-balance--shop-the-catalog',\r\n pointTrackerIcon: 'dashboard_point-tracker-icon',\r\n pointTrackerPoints: 'dashboard__point-tracker-progress-points',\r\n trackerSectionBackground: 'dashboard__tracker-section-background',\r\n yearOverYearTracker: 'dashboard__yoy-tracker',\r\n yearOverYearTrackerDropdown: 'dashboard__yoy-tracker--dropdown',\r\n yearOverYearTrackerTitle: 'dashboard__yoy-tracker--title',\r\n yearOverYearPriorGrossUnits: 'dashboard__yoy-tracker--prior-gross-units',\r\n yearOverYearLastUpdated: 'dashboard__yoy-tracker--last-updated',\r\n yearOverYearCurrentGrossUnits: 'dashboard__yoy-tracker--current-gross-units',\r\n yearOverYearCalculatedDifferential: 'dashboard__yoy-tracker--calculated-differential',\r\n },\r\n },\r\n changePasswordModal: {\r\n id: {\r\n currentPassword: 'change-password-modal__current-password',\r\n newPassword: 'change-password-modal__new-password',\r\n confirmNewPassword: 'change-password-modal__confirm-new-password',\r\n closeButton: 'change-password-modal__close',\r\n submitButton: 'change-password-modal__submit',\r\n changePasswordError: 'change-password-modal__error',\r\n },\r\n },\r\n report: {\r\n id: {\r\n powerBIViewer: 'report__power-bi-viewer',\r\n },\r\n },\r\n logout: {\r\n class: {\r\n section: 'logout__section',\r\n loginCta: 'logout__login-cta',\r\n },\r\n },\r\n authRedirect: {\r\n id: {\r\n image: 'auth-redirect__image',\r\n },\r\n },\r\n};\r\n","enum NotificationType {\r\n Error = 'Error',\r\n Success = 'Success',\r\n Warning = 'Warning',\r\n}\r\n\r\nexport default NotificationType;\r\n","enum LogoutReason {\r\n ExpiredToken,\r\n UserInitiated,\r\n}\r\n\r\nexport default LogoutReason;\r\n","export const PORTAL_API_URL = process.env.REACT_APP_PORTAL_API_URL || `//${window.location.host}`;\r\nexport const rewardCatalogEndpoint = `${PORTAL_API_URL}/api/v1/RewardCatalog/Connect`;\r\n","// Routes ported from v1 Portal for backwards compatibility\r\nexport const HOME = '/';\r\nexport const RESET_PASSWORD = '/ResetPassword';\r\nexport const LOGOUT = '/Logout';\r\nexport const LOGOUT_SUCCESS = '/Logout/Success';\r\nexport const LOGOUT_SAML = '/Logout/SAML';\r\nexport const DASHBOARD = '/Dashboard';\r\nexport const REGISTER = '/Register/:pageNumber';\r\nexport const EDIT_PROFILE = '/EditProfile';\r\nexport const SELECT_CLAIM_TYPE = '/Claims/Type/:promotionNumber';\r\nexport const CREATE_CLAIM = '/Claims/Create/:promotionNumber/:formConfigType?';\r\nexport const EDIT_CLAIM = '/Claims/Edit/:claimNumber/:formConfigType?';\r\nexport const CREATE_RECONCILIATION = '/Reconciliation/Create/:claimNumber';\r\nexport const EDIT_RECONCILIATION = '/Reconciliation/Edit/:claimNumber';\r\nexport const CLAIMS_LEGACY_REDIRECT = '/Claims/List';\r\nexport const CLAIMS = '/Claims';\r\nexport const CLAIM_DETAIL = '/Claims/Detail/:claimNumber';\r\nexport const REPORT = '/Report';\r\nexport const VIEW_REPORT = '/Report/:reportId';\r\nexport const FAQ = '/FAQ';\r\nexport const CONTACT_US = '/ContactUs';\r\nexport const LOGIN = '/Login';\r\nexport const ACCESS_VIOLATION = '/auth-redirect';\r\nexport const FINALIZE_LOGIN = '/FinalizeLogin';\r\nexport const REFERRAL = '/Referral/:claimGlobalKey';\r\n","import { Deserializer, makeQueryStringSerializer } from 'core/lib/serializer';\r\nimport LogoutReason from 'enums/LogoutReason';\r\n\r\ninterface LogoutQueryParams {\r\n reason?: LogoutReason;\r\n}\r\n\r\nconst logoutQuerySerializer = makeQueryStringSerializer({}, { reason: Deserializer.Int });\r\nexport default logoutQuerySerializer;\r\n","import { noop } from 'lodash';\r\n\r\nimport * as routes from 'config/routes';\r\nimport { getPath, parsePath } from 'core/l10n/locales';\r\nimport ApiError from 'core/ovations-api/ApiError';\r\nimport { getApiRequestInit, injectCulture } from 'core/ovations-api/apiFetch';\r\nimport LogoutReason from 'enums/LogoutReason';\r\nimport logoutQuerySerializer from 'serializers/logoutQuerySerializer';\r\n\r\nconst portalFetch: WindowOrWorkerGlobalScope['fetch'] = async (url: string, init?) => {\r\n const { locale } = parsePath(window.location.pathname);\r\n const localizedUrl = injectCulture(url, locale);\r\n const response = await fetch(localizedUrl, getApiRequestInit(init));\r\n if (response.status === 401) {\r\n const query = logoutQuerySerializer.serialize({ reason: LogoutReason.ExpiredToken });\r\n window.location.href = window.location.origin + getPath({ locale, rest: `${routes.LOGOUT}?${query}` });\r\n\r\n const stall = new Promise(noop);\r\n // Don't resolve or reject here since we're redirecting to login page\r\n // and we don't want to flash an error or cause unnecessary re-renders.\r\n return await stall;\r\n }\r\n if (!response.ok) {\r\n throw new ApiError(response);\r\n }\r\n return response;\r\n};\r\n\r\nexport default portalFetch;\r\n","import { Types } from 'core/ovations-api';\r\nimport { omit } from 'lodash';\r\nimport { stringify } from 'query-string';\r\n\r\nimport { PORTAL_API_URL } from './constants';\r\nimport portalFetch from './portalFetch';\r\n\r\ninterface RegistrationSuccess {\r\n success: true;\r\n newUserId: string;\r\n}\r\ninterface RegistrationFailure {\r\n success: false;\r\n errors: Types.ErrorSummary;\r\n}\r\n\r\nexport type RegistrationResult = RegistrationSuccess | RegistrationFailure;\r\n\r\nexport default class Account {\r\n static async create(newUser: Types.RegistrationRequest): Promise {\r\n const user = omit(newUser, 'id');\r\n try {\r\n const response = await portalFetch(`${PORTAL_API_URL}/api/v1/Account`, {\r\n headers: [['Content-Type', 'application/json']],\r\n method: 'POST',\r\n body: JSON.stringify(user),\r\n });\r\n const newUserId: string = await response.json();\r\n return { success: true, newUserId };\r\n } catch (e) {\r\n if (e && e.response.status === 400) {\r\n const errors = (await e.response.json()) as Types.ErrorSummary;\r\n return { success: false, errors };\r\n }\r\n throw e;\r\n }\r\n }\r\n\r\n static async updateProfile(profile: Types.Customer) {\r\n return await portalFetch(`${PORTAL_API_URL}/api/v1/Account`, {\r\n headers: [['Content-Type', 'application/json']],\r\n method: 'PUT',\r\n body: JSON.stringify(profile),\r\n });\r\n }\r\n\r\n static async fetch() {\r\n const response = await portalFetch(`${PORTAL_API_URL}/api/v1/Account`);\r\n if (response.status === 404) {\r\n return;\r\n }\r\n const account: Types.Customer = await response.json();\r\n return account;\r\n }\r\n\r\n static async requestPasswordReset(resetRequest: { email: string }) {\r\n await portalFetch(`${PORTAL_API_URL}/api/v1/Account/requestPasswordReset`, {\r\n headers: [['Content-Type', 'application/json']],\r\n method: 'POST',\r\n body: JSON.stringify(resetRequest),\r\n });\r\n }\r\n\r\n static async resetPassword(requestPasswordReset: Types.PasswordResetRequest) {\r\n await portalFetch(`${PORTAL_API_URL}/api/v1/Account/resetPassword`, {\r\n headers: [['Content-Type', 'application/json']],\r\n method: 'POST',\r\n body: JSON.stringify(requestPasswordReset),\r\n });\r\n }\r\n\r\n static async changePassword(changePasswordRequest: Types.PasswordChangeRequest) {\r\n await portalFetch(`${PORTAL_API_URL}/api/v1/Account/changePassword`, {\r\n headers: [['Content-Type', 'application/json']],\r\n method: 'POST',\r\n body: JSON.stringify(changePasswordRequest),\r\n });\r\n }\r\n\r\n static async login(credentials: Types.Credential) {\r\n await portalFetch(`${PORTAL_API_URL}/api/v1/Account/login`, {\r\n headers: [['Content-Type', 'application/json']],\r\n method: 'POST',\r\n body: JSON.stringify(credentials),\r\n });\r\n }\r\n\r\n static async customLogin(credentials: Types.CustomCredential) {\r\n await portalFetch(`${PORTAL_API_URL}/api/v1/Account/login/custom`, {\r\n headers: [['Content-Type', 'application/json']],\r\n method: 'POST',\r\n body: JSON.stringify(credentials),\r\n });\r\n }\r\n\r\n static async loginWithOpenId(redirectUrl?: string) {\r\n window.location.href = `${PORTAL_API_URL}/api/v1/Account/login/openId?${stringify({ redirectUrl })}`;\r\n }\r\n\r\n static async logout() {\r\n await portalFetch(`${PORTAL_API_URL}/api/v1/Account/logout`, {\r\n headers: [['Content-Type', 'application/json']],\r\n method: 'POST',\r\n });\r\n }\r\n\r\n static logoutWithOpenId(redirectUrl?: string) {\r\n window.location.href = `${PORTAL_API_URL}/api/v1/Account/logout/openId?${stringify({ redirectUrl })}`;\r\n }\r\n\r\n static logoutWithSAML(redirectUrl?: string) {\r\n window.location.href = `${PORTAL_API_URL}/api/v1/account/auth/saml/slo?${stringify({ redirectUrl })}`;\r\n }\r\n}\r\n","import * as Types from 'core/ovations-api/definitions';\r\n\r\nimport { PORTAL_API_URL } from './constants';\r\nimport portalFetch from './portalFetch';\r\n\r\nexport default class AddressValidation {\r\n static async fetch(address: Types.Address): Promise {\r\n const response = await portalFetch(`${PORTAL_API_URL}/api/v1/AddressValidation`, {\r\n headers: [['Content-Type', 'application/json']],\r\n method: 'POST',\r\n body: JSON.stringify(address),\r\n });\r\n\r\n if (response.status !== 200) {\r\n return null;\r\n }\r\n\r\n const addressResult: Types.AddressValidationResult = await response.json();\r\n return addressResult;\r\n }\r\n}\r\n","import { PORTAL_API_URL } from './constants';\r\nimport * as Types from './definitions';\r\nimport portalFetch from './portalFetch';\r\n\r\nexport default class AppSettings {\r\n static async fetch() {\r\n const response = await portalFetch(`${PORTAL_API_URL}/api/v1/AppSettings`);\r\n const appSettings: Types.AppSettings = await response.json();\r\n\r\n return appSettings;\r\n }\r\n}\r\n","import { makeQueryStringSerializer } from 'core/lib/serializer';\r\nimport * as OvationsApi from 'core/ovations-api';\r\nimport { toFormData } from 'core/util/objects';\r\n\r\nimport * as OvationsPortalApi from '.';\r\nimport { PORTAL_API_URL } from './constants';\r\nimport portalFetch from './portalFetch';\r\n\r\nconst serializer = makeQueryStringSerializer();\r\n\r\ninterface ClaimUpdateSuccess {\r\n success: true;\r\n}\r\ninterface ClaimUpdateFailure {\r\n success: false;\r\n error: '';\r\n}\r\n\r\nexport type ClaimUpdateResult = ClaimUpdateSuccess | ClaimUpdateFailure;\r\n\r\nexport default class Claim {\r\n static serializeRequest = serializer.serialize;\r\n\r\n static deserializeRequest = serializer.deserialize;\r\n\r\n static async fetch(claimNumber: number): Promise {\r\n const response = await portalFetch(`${PORTAL_API_URL}/api/v1/Claim/${claimNumber}`);\r\n const json = await response.json();\r\n return json;\r\n }\r\n\r\n static async fetchRedemptionClaims(customerId: string): Promise<[OvationsPortalApi.Types.ClaimDetail] | undefined> {\r\n const response = await portalFetch(`${PORTAL_API_URL}/api/v1/Claim/redemptions/${customerId}`);\r\n const json = await response.json();\r\n return json;\r\n }\r\n\r\n static async fetchAll(\r\n request: OvationsPortalApi.Types.ClaimRequest,\r\n ): Promise> {\r\n const query = Claim.serializeRequest(request);\r\n const url = `${PORTAL_API_URL}/api/v1/claim?${query}`;\r\n const response = await portalFetch(url);\r\n const json = await response.json();\r\n return json;\r\n }\r\n\r\n static async create(claimRequest: OvationsPortalApi.Types.CreateClaimRequest): Promise {\r\n const response = await portalFetch(`${PORTAL_API_URL}/api/v1/claim/`, {\r\n method: 'POST',\r\n body: toFormData(claimRequest),\r\n });\r\n const newClaimId: number = await response.json();\r\n return newClaimId;\r\n }\r\n\r\n static async update(claim: OvationsPortalApi.Types.Claim): Promise {\r\n try {\r\n await portalFetch(`${PORTAL_API_URL}/api/v1/claim`, {\r\n method: 'PUT',\r\n body: toFormData(claim),\r\n });\r\n return { success: true };\r\n } catch (error) {\r\n if (error && error.response.status === 400) {\r\n const errorResponse = await error.response;\r\n // This comes from something like a BadResponse(result) on the server.\r\n // Normally on the portal we use stock translated issues, but there are\r\n // instances where we send translated responses from the server.\r\n const errorMessage = await errorResponse.text();\r\n return { success: false, error: errorMessage };\r\n }\r\n throw error;\r\n }\r\n }\r\n}\r\n","import * as OvationsPortalApi from 'ovations-portal-api';\r\n\r\nimport { PORTAL_API_URL } from './constants';\r\nimport portalFetch from './portalFetch';\r\n\r\nexport default class Contact {\r\n static async fetch() {\r\n const response = await portalFetch(`${PORTAL_API_URL}/api/v1/Contact`);\r\n const contact: OvationsPortalApi.Types.ContactPage = await response.json();\r\n\r\n return contact;\r\n }\r\n\r\n static async submit(contactForm: OvationsPortalApi.Types.ContactForm) {\r\n await portalFetch(`${PORTAL_API_URL}/api/v1/Contact`, {\r\n headers: [['Content-Type', 'application/json']],\r\n method: 'POST',\r\n body: JSON.stringify(contactForm),\r\n });\r\n }\r\n}\r\n","import { PORTAL_API_URL } from './constants';\r\nimport * as Types from './definitions';\r\nimport portalFetch from './portalFetch';\r\n\r\nexport default class CustomerPromotion {\r\n static async fetchAll() {\r\n const response = await portalFetch(`${PORTAL_API_URL}/api/v1/Promotion/menuItems/customer`);\r\n const json: Types.CustomerPromotion[] = await response.json();\r\n return json;\r\n }\r\n}\r\n","import { Types } from 'ovations-portal-api';\r\n\r\nimport { PORTAL_API_URL } from './constants';\r\nimport portalFetch from './portalFetch';\r\n\r\nexport default class Dashboard {\r\n static async fetch() {\r\n const response = await portalFetch(`${PORTAL_API_URL}/api/v1/Dashboard`);\r\n const dashboard: Types.Dashboard = await response.json();\r\n\r\n return dashboard;\r\n }\r\n}\r\n","import { PORTAL_API_URL } from './constants';\r\nimport portalFetch from './portalFetch';\r\n\r\nexport default class DataSet {\r\n static async fetchPropertyValues(\r\n dataSetId: string,\r\n propertyId: number,\r\n filters: { [dataSetPropertyId: number]: string },\r\n ): Promise {\r\n const url = `${PORTAL_API_URL}/api/v1/DataSet/${dataSetId}/property/${propertyId}/values`;\r\n const response = await portalFetch(url, {\r\n headers: [['Content-Type', 'application/json']],\r\n method: 'POST',\r\n body: JSON.stringify(filters),\r\n });\r\n const json = await response.json();\r\n return json;\r\n }\r\n}\r\n","import { PORTAL_API_URL } from './constants';\r\nimport portalFetch from './portalFetch';\r\n\r\nexport default class FAQ {\r\n static async fetch() {\r\n const response = await portalFetch(`${PORTAL_API_URL}/api/v1/Faq`);\r\n return await response.json();\r\n }\r\n}\r\n","import { Types } from 'core/ovations-api';\r\n\r\nimport { PORTAL_API_URL } from './constants';\r\nimport portalFetch from './portalFetch';\r\n\r\nexport default class Global {\r\n static async fetch() {\r\n const response = await portalFetch(`${PORTAL_API_URL}/api/v1/Global`);\r\n if (response.status === 404) {\r\n return;\r\n }\r\n const portal: Types.Portal = await response.json();\r\n return portal;\r\n }\r\n}\r\n","import { Types } from 'ovations-portal-api';\r\n\r\nimport { PORTAL_API_URL } from './constants';\r\nimport portalFetch from './portalFetch';\r\n\r\nexport default class Home {\r\n static async fetch() {\r\n const response = await portalFetch(`${PORTAL_API_URL}/api/v1/Home`);\r\n const portalHome: Types.HomePage = await response.json();\r\n return portalHome;\r\n }\r\n}\r\n","import * as OvationsPortalApi from '.';\r\nimport { PORTAL_API_URL } from './constants';\r\nimport portalFetch from './portalFetch';\r\n\r\nexport default class PointLedger {\r\n static async fetchTotal(): Promise {\r\n const response = await portalFetch(`${PORTAL_API_URL}/api/v1/PointLedger/Total`);\r\n if (response.status === 204) {\r\n return null;\r\n }\r\n const json = await response.json();\r\n return json;\r\n }\r\n}\r\n","import { Types } from 'core/ovations-api';\r\n\r\nimport { PORTAL_API_URL } from './constants';\r\nimport portalFetch from './portalFetch';\r\n\r\nexport default class ProfileSettings {\r\n static async fetch() {\r\n const response = await portalFetch(`${PORTAL_API_URL}/api/v1/ProfileSettings`);\r\n const profileSettings: Types.ProfileSettings = await response.json();\r\n return profileSettings;\r\n }\r\n}\r\n","import { PORTAL_API_URL } from './constants';\r\nimport * as Types from './definitions';\r\nimport portalFetch from './portalFetch';\r\n\r\nexport default class Promotion {\r\n static async fetchAll() {\r\n const response = await portalFetch(`${PORTAL_API_URL}/api/v1/Promotion`);\r\n const json: Types.Promotion[] = await response.json();\r\n const promotion = 'promotion';\r\n const limitReached = 'limitReached';\r\n const promos = json.map((p) => {\r\n return {\r\n ...p[promotion],\r\n limitReached: p[limitReached],\r\n };\r\n });\r\n return promos;\r\n }\r\n}\r\n","import * as OvationsPortalApi from 'ovations-portal-api';\r\n\r\nimport { PORTAL_API_URL } from './constants';\r\nimport portalFetch from './portalFetch';\r\n\r\nexport default class Referral {\r\n static async fetch(claimId: string) {\r\n let referral: OvationsPortalApi.Types.Referral | null;\r\n try {\r\n const response = await portalFetch(`${PORTAL_API_URL}/api/v1/Referral/${claimId}`);\r\n referral = await response.json();\r\n\r\n return referral;\r\n } catch (error) {\r\n return null;\r\n }\r\n }\r\n\r\n static async confirm(claimId: string, confirmation: boolean): Promise {\r\n let responseValue;\r\n try {\r\n const response = await portalFetch(`${PORTAL_API_URL}/api/v1/Referral/${claimId}/Confirm/${confirmation}`, {\r\n method: 'POST',\r\n body: '',\r\n });\r\n responseValue = await response.json();\r\n return responseValue;\r\n } catch (error) {\r\n return false;\r\n }\r\n }\r\n}\r\n","import { PORTAL_API_URL } from 'ovations-portal-api/constants';\r\nimport * as Types from 'ovations-portal-api/definitions';\r\nimport portalFetch from 'ovations-portal-api/portalFetch';\r\n\r\nexport default class Report {\r\n static async fetchAll(): Promise {\r\n const response = await portalFetch(`${PORTAL_API_URL}/api/v1/Report`);\r\n return await response.json();\r\n }\r\n\r\n static async fetchConfig(powerBiId: string): Promise {\r\n const response = await portalFetch(`${PORTAL_API_URL}/api/v1/Report/${powerBiId}/config`);\r\n return await response.json();\r\n }\r\n}\r\n","import * as Enums from 'core/ovations-api/enums';\r\nimport { makeQueryStringSerializer } from 'core/lib/serializer';\r\n\r\nimport * as OvationsApi from 'core/ovations-api';\r\nimport { PORTAL_API_URL } from './constants';\r\nimport * as Types from './definitions';\r\nimport portalFetch from './portalFetch';\r\nimport * as OvationsPortalApi from '.';\r\n\r\nconst serializer = makeQueryStringSerializer();\r\n\r\nexport default class PortalCardRewardDetail {\r\n static isReloadable(reward: Types.PortalCardRewardDetail): boolean {\r\n return (\r\n reward.rewardPackageType === Enums.RewardPackageType.ReloadableCAN ||\r\n reward.rewardPackageType === Enums.RewardPackageType.ReloadableUSA\r\n );\r\n }\r\n\r\n static serializeRequest = serializer.serialize;\r\n\r\n static async fetchAllCustomerRewards(\r\n request: OvationsPortalApi.Types.ClaimRequest,\r\n ): Promise> {\r\n const query = PortalCardRewardDetail.serializeRequest(request);\r\n const url = `${PORTAL_API_URL}/api/v1/CardRewardDetail/Summary?${query}`;\r\n const response = await portalFetch(url);\r\n const json = await response.json();\r\n return json;\r\n }\r\n\r\n static async fetchAll(): Promise {\r\n const response = await portalFetch(`${PORTAL_API_URL}/api/v1/CardRewardDetail`);\r\n const json: Types.PortalCardRewardDetail[] = await response.json();\r\n return json;\r\n }\r\n\r\n static async fetchTotal(): Promise {\r\n const response = await portalFetch(`${PORTAL_API_URL}/api/v1/CardRewardDetail/Total`);\r\n const json = await response.json();\r\n return json;\r\n }\r\n}\r\n","import { PORTAL_API_URL } from './constants';\r\nimport * as Types from './definitions';\r\nimport portalFetch from './portalFetch';\r\n\r\nexport default class RewardsLimit {\r\n static async fetch(): Promise {\r\n const response = await portalFetch(`${PORTAL_API_URL}/api/v1/PromotionLimit/limit`);\r\n const json: Types.PromotionRewardsLimit[] = await response.json();\r\n return json;\r\n }\r\n}\r\n","import { PORTAL_API_URL } from './constants';\r\nimport portalFetch from './portalFetch';\r\n\r\nexport default class YearOverYearSummary {\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n static async fetchSummary(year: number) {\r\n const response = await portalFetch(`${PORTAL_API_URL}/api/v1/YearOverYearSummary`);\r\n return await response.json();\r\n }\r\n}\r\n","import { faCheckCircle, faCircle, faCircleNotch, faTimesCircle } from '@fortawesome/free-solid-svg-icons';\r\nimport classNames from 'classnames';\r\nimport React from 'react';\r\nimport {\r\n Button,\r\n Input,\r\n InputGroup,\r\n InputGroupText,\r\n Label,\r\n Modal,\r\n ModalBody,\r\n ModalFooter,\r\n ModalHeader,\r\n} from 'reactstrap';\r\n\r\nimport ValidatedFormGroup, { InputStatus } from 'components/ValidatedFormGroup';\r\nimport elements from 'config/elements';\r\nimport { newPasswordValidationRules, PASSWORD_WITH_ONEUPPERCASE_ONENUMBER } from 'core/config/patterns';\r\nimport { L10nConsumer, L10nMessages, LocalizedMessage } from 'core/l10n/components';\r\nimport * as OvationsApi from 'core/ovations-api';\r\nimport FAIcon from 'core/ovations-components/FAIcon';\r\nimport Notification from 'definitions/Notification';\r\nimport NotificationType from 'enums/NotificationType';\r\nimport * as PortalApi from 'ovations-portal-api';\r\nimport { ProfileAccountInformationCardState } from './profile/ProfileAccountInformationCard';\r\n\r\ninterface ChangePasswordModalProps {\r\n profile: OvationsApi.Types.Customer;\r\n toggle: () => void;\r\n addNotification: (notification: Partial) => void;\r\n isOpen?: boolean;\r\n}\r\n\r\ninterface ChangePasswordModalState {\r\n errorStatus: number | undefined;\r\n wasValidated: boolean;\r\n isSavingChanges: boolean;\r\n passwordRequest: OvationsApi.Types.PasswordChangeRequest;\r\n inputStatuses: { [name: string]: InputStatus };\r\n showPassword: boolean;\r\n passwordFieldLostFocus: boolean;\r\n}\r\n\r\nexport const emptyPasswordChangeRequest: OvationsApi.Types.PasswordChangeRequest = {\r\n currentPassword: '',\r\n newPassword: '',\r\n};\r\n\r\nexport default class ChangePasswordModal extends React.Component {\r\n passwordInput: HTMLInputElement | HTMLTextAreaElement | null;\r\n\r\n constructor(props: ChangePasswordModalProps) {\r\n super(props);\r\n\r\n this.state = this.getInitialState();\r\n this.getIconAndClassnames = this.getIconAndClassnames.bind(this);\r\n this.togglePasswordFieldFocus = this.togglePasswordFieldFocus.bind(this);\r\n this.toggleShowPassword = this.toggleShowPassword.bind(this);\r\n }\r\n\r\n getInitialState(): ChangePasswordModalState {\r\n return {\r\n inputStatuses: {},\r\n passwordRequest: emptyPasswordChangeRequest,\r\n errorStatus: undefined,\r\n wasValidated: false,\r\n isSavingChanges: false,\r\n showPassword: false,\r\n passwordFieldLostFocus: false,\r\n };\r\n }\r\n\r\n componentDidUpdate(prevProps: ChangePasswordModalProps) {\r\n if (this.passwordInput) {\r\n const validationMessage = this.passwordMatchesLogin() ? 'invalid' : '';\r\n this.passwordInput.setCustomValidity(validationMessage);\r\n }\r\n if (this.props.isOpen && !prevProps.isOpen) {\r\n this.setState(this.getInitialState());\r\n }\r\n }\r\n\r\n getIconAndClassnames(isPatternMatching: boolean) {\r\n const classes = ['d-block'];\r\n let icon = faCircle;\r\n if (isPatternMatching) {\r\n icon = faCheckCircle;\r\n classes.push('valid-feedback');\r\n } else if (this.state.passwordFieldLostFocus) {\r\n classes.push('invalid-feedback');\r\n icon = faTimesCircle;\r\n } else {\r\n classes.push('grey-feedback');\r\n }\r\n return {\r\n icon,\r\n classes: classes.join(' '),\r\n };\r\n }\r\n\r\n onPasswordInputChange: React.ChangeEventHandler = (e) => {\r\n const { name, value } = e.currentTarget;\r\n this.setState({\r\n passwordRequest: {\r\n ...this.state.passwordRequest,\r\n [name]: value,\r\n },\r\n });\r\n };\r\n\r\n onStatusChange = (name: string) => (inputStatus: InputStatus) => {\r\n const { inputStatuses } = this.state;\r\n this.setState({ inputStatuses: { ...inputStatuses, [name]: inputStatus } });\r\n };\r\n\r\n onFormSubmit: React.FormEventHandler = async (e) => {\r\n e.preventDefault();\r\n\r\n const isValid = e.currentTarget.checkValidity();\r\n if (!isValid) {\r\n this.setState({ wasValidated: true });\r\n return;\r\n }\r\n\r\n this.setState({ isSavingChanges: true });\r\n try {\r\n await PortalApi.Account.changePassword(this.state.passwordRequest);\r\n } catch (e) {\r\n let messageId: keyof L10nMessages = 'errorMessage_generic';\r\n if (e.response && e.response.status === 400) {\r\n messageId = 'errorMessage_currentPasswordError';\r\n }\r\n this.setState({ isSavingChanges: false });\r\n this.props.addNotification({\r\n type: NotificationType.Error,\r\n message: messageId,\r\n });\r\n return;\r\n }\r\n this.props.addNotification({\r\n type: NotificationType.Success,\r\n message: 'notification_passwordChangeSuccess',\r\n });\r\n this.props.toggle();\r\n };\r\n\r\n toggleShowPassword() {\r\n this.setState((prevState: ProfileAccountInformationCardState) => ({\r\n showPassword: !prevState.showPassword,\r\n }));\r\n }\r\n\r\n togglePasswordFieldFocus() {\r\n this.setState({\r\n passwordFieldLostFocus: true,\r\n });\r\n }\r\n\r\n passwordMatchesLogin(): boolean {\r\n const { profile } = this.props;\r\n return this.state.passwordRequest.newPassword.toLowerCase() === profile.email.toLowerCase();\r\n }\r\n\r\n renderModalBody() {\r\n const { state } = this;\r\n const passwordMatchesEmail = this.passwordMatchesLogin();\r\n return (\r\n \r\n \r\n {(l10n) => (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n (this.passwordInput = input)}\r\n type={this.state.showPassword ? 'text' : 'password'}\r\n name=\"newPassword\"\r\n placeholder={l10n.localizeMessage('changePasswordModal_label_newPassword')}\r\n required\r\n value={this.state.passwordRequest.newPassword}\r\n onChange={this.onPasswordInputChange}\r\n onBlur={this.togglePasswordFieldFocus}\r\n pattern={PASSWORD_WITH_ONEUPPERCASE_ONENUMBER}\r\n autoComplete=\"new-password\"\r\n className=\"form-control\"\r\n />\r\n \r\n {!this.state.showPassword ? (\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n \r\n\r\n {newPasswordValidationRules.map((vr, index) => {\r\n const re = new RegExp(vr.pattern);\r\n const result = re.test(this.state.passwordRequest.newPassword);\r\n const { icon, classes } = this.getIconAndClassnames(result);\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 render() {\r\n const { props, state } = this;\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {this.renderModalBody()}\r\n \r\n \r\n \r\n \r\n \r\n {this.state.isSavingChanges ? (\r\n \r\n Updating Password... \r\n \r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import React from 'react';\r\n\r\n/**\r\n * @source - https://gist.github.com/richjenks/6410498\r\n */\r\n/* tslint:disable-next-line max-line-length */\r\nexport const emptyFavicon =\r\n 'data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQEAYAAABPYyMiAAAABmJLR0T///////8JWPfcAAAACXBIWXMAAABIAAAASABGyWs+AAAAF0lEQVRIx2NgGAWjYBSMglEwCkbBSAcACBAAAeaR9cIAAAAASUVORK5CYII=';\r\n\r\nexport interface FaviconProps {\r\n url?: string | null;\r\n}\r\n\r\nclass Favicon extends React.Component {\r\n link: HTMLLinkElement;\r\n\r\n constructor(props: FaviconProps) {\r\n super(props);\r\n\r\n this.link = document.createElement('link');\r\n this.link.type = 'image/x-icon';\r\n this.link.rel = 'icon';\r\n }\r\n\r\n componentDidMount() {\r\n this.update();\r\n }\r\n\r\n componentDidUpdate(prevProps: FaviconProps) {\r\n if (prevProps.url === this.props.url) {\r\n return;\r\n }\r\n\r\n this.update();\r\n }\r\n\r\n componentWillUnmount() {\r\n this.removeLink();\r\n }\r\n\r\n update() {\r\n const head = document.getElementsByTagName('head')[0];\r\n this.link.href = this.props.url || emptyFavicon;\r\n head.appendChild(this.link);\r\n }\r\n\r\n removeLink() {\r\n const head = document.getElementsByTagName('head')[0];\r\n head.removeChild(this.link);\r\n }\r\n\r\n render() {\r\n return null;\r\n }\r\n}\r\n\r\nexport default Favicon;\r\n","import classNames from 'classnames';\r\nimport { orderBy } from 'lodash';\r\nimport isEmpty from 'lodash/isEmpty';\r\nimport map from 'lodash/map';\r\nimport mapValues from 'lodash/mapValues';\r\nimport pickBy from 'lodash/pickBy';\r\nimport moment from 'moment-timezone';\r\nimport React from 'react';\r\n\r\nimport elements from 'config/elements';\r\nimport { socialMediaIcons, SocialMediaKey } from 'core/config/icons';\r\nimport { LocalizedMessage } from 'core/l10n/components';\r\nimport * as OvationsApi from 'core/ovations-api';\r\nimport FAIcon from 'core/ovations-components/FAIcon';\r\nimport ContactPage from 'ovations-portal-api/definitions/ContactPage';\r\n\r\nexport interface FooterProps {\r\n portal: OvationsApi.Types.Portal;\r\n liveChatEnabled?: boolean;\r\n displayForReferral?: boolean;\r\n contactPage?: ContactPage | null;\r\n}\r\n\r\ninterface SocialMediaLinkGetter {\r\n (portal: OvationsApi.Types.Portal): OvationsApi.Types.SocialMediaLink;\r\n}\r\n\r\nconst externalLinkProps: React.AnchorHTMLAttributes = {\r\n target: '_blank',\r\n rel: 'noopener noreferrer',\r\n};\r\n\r\nclass Footer extends React.Component {\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n static iconToLinkMappings: { [K in SocialMediaKey]: SocialMediaLinkGetter } = {\r\n facebook: (portal) => portal.facebook,\r\n instagram: (portal) => portal.instagram,\r\n linkedIn: (portal) => portal.linkedIn,\r\n pinterest: (portal) => portal.pinterest,\r\n twitter: (portal) => portal.twitter,\r\n yelp: (portal) => portal.yelp,\r\n youTube: (portal) => portal.youTube,\r\n wordPress: (portal) => portal.wordPress,\r\n };\r\n\r\n getFilteredFooterLinks() {\r\n const links = this.props.portal.footerLinks;\r\n const filteredLinks = links.filter((link) => link.isEnabled);\r\n return orderBy(filteredLinks, [(x) => x.sortOrder], 'asc');\r\n }\r\n\r\n renderSocialMediaIcons() {\r\n const socialMediaLinks = mapValues(socialMediaIcons, (_, key: SocialMediaKey) =>\r\n Footer.iconToLinkMappings[key](this.props.portal),\r\n );\r\n const enabledLinks = pickBy(socialMediaLinks, (link) => link.isEnabled);\r\n if (isEmpty(enabledLinks)) {\r\n return;\r\n }\r\n return (\r\n
    \r\n {map(enabledLinks, (link, key) => (\r\n
  • \r\n \r\n \r\n \r\n
  • \r\n ))}\r\n
\r\n );\r\n }\r\n\r\n renderContactUs() {\r\n if (!this.props.contactPage) {\r\n return;\r\n }\r\n return (\r\n
\r\n Contact us
\r\n {this.props.contactPage.contactNumber} \r\n
\r\n {this.props.contactPage.receivingEmailAddress} \r\n
\r\n );\r\n }\r\n\r\n renderPortalLinks() {\r\n const filteredLinks = this.getFilteredFooterLinks();\r\n\r\n return (\r\n
    \r\n {filteredLinks.map((link, i) =>\r\n link.url ? (\r\n // eslint-disable-next-line react/no-array-index-key\r\n
  • \r\n \r\n {link.text}\r\n \r\n
  • \r\n ) : (\r\n
  • \r\n {link.text}\r\n
  • \r\n ),\r\n )}\r\n
\r\n );\r\n }\r\n\r\n renderLeftFooterContent() {\r\n if (this.props.displayForReferral) {\r\n return this.renderContactUs();\r\n }\r\n return this.renderPortalLinks();\r\n }\r\n\r\n renderLeftFooter() {\r\n return (\r\n
\r\n {this.renderLeftFooterContent()}\r\n {this.renderSocialMediaIcons()}\r\n
\r\n © {moment().format('YYYY')} {this.props.portal.footerText}\r\n
\r\n
\r\n );\r\n }\r\n\r\n renderRightFooter() {\r\n if (!this.props.portal.enablePoweredByGroupOLink) {\r\n return;\r\n }\r\n\r\n const groupOLink = (\r\n <>\r\n \r\n Group O\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 render() {\r\n return (\r\n \r\n
\r\n
\r\n {this.renderLeftFooter()}\r\n {this.renderRightFooter()}\r\n
\r\n
\r\n \r\n );\r\n }\r\n}\r\n\r\nexport default Footer;\r\n","enum CustomerRewardType {\r\n RewardGroup = 'RewardGroup',\r\n Reward = 'Reward',\r\n Claim = 'Claim',\r\n}\r\n\r\nexport default CustomerRewardType;\r\n","import React from 'react';\r\n\r\nimport * as Types from 'core/ovations-api/definitions';\r\n\r\nexport interface LiveChatProps {\r\n widgetId: string | null;\r\n appId: string | null;\r\n appSecret: string | null;\r\n customer: Types.Customer | null;\r\n buttonText: string;\r\n}\r\nclass LiveChat extends React.Component {\r\n componentDidMount() {\r\n const busNo = 4598774;\r\n const poc = this.props.widgetId;\r\n const parentJs = document.getElementsByTagName('script')[0] as HTMLScriptElement;\r\n\r\n const chatJs = document.createElement('script') as HTMLScriptElement;\r\n const chatJsContent = document.createElement('script') as HTMLScriptElement;\r\n\r\n chatJs.src = 'https://home-c12.incontact.com/inContact/ChatClient/js/embed.min.js';\r\n\r\n const { customer } = this.props;\r\n const email = customer ? customer.email : null;\r\n const firstName = customer ? customer.firstName : null;\r\n const lastName = customer ? customer.lastName : null;\r\n const phone = customer ? customer.phoneNumber : null;\r\n\r\n chatJsContent.innerText = `icPatronChat.init(\r\n {\r\n serverHost: 'https://home-c12.incontact.com',\r\n bus_no: '${busNo}',\r\n poc: '${poc}',\r\n params:['${firstName}','${lastName}','${email}','${phone}']}\r\n );`;\r\n\r\n if (parentJs.parentNode) {\r\n parentJs.parentNode.insertBefore(chatJs, parentJs);\r\n chatJs.onload = () => {\r\n if (chatJs.parentNode) {\r\n chatJs.parentNode.insertBefore(chatJsContent, chatJs.nextSibling);\r\n }\r\n };\r\n }\r\n }\r\n\r\n render() {\r\n return null;\r\n }\r\n}\r\n\r\nexport default LiveChat;\r\n","import { faCircleNotch } from '@fortawesome/free-solid-svg-icons';\r\nimport classNames from 'classnames';\r\nimport React from 'react';\r\nimport { Link } from 'react-router-dom';\r\nimport { Button, Col, FormGroup, Input, Label, Modal, ModalBody, ModalHeader, Row } from 'reactstrap';\r\n\r\nimport elements from 'config/elements';\r\nimport * as routes from 'config/routes';\r\nimport { EMAIL_ADDRESS_LOGIN } from 'core/config/patterns';\r\nimport { LocalizedMessage } from 'core/l10n/components';\r\nimport toPath from 'core/lib/toPath';\r\nimport * as OvationsApi from 'core/ovations-api';\r\nimport { CustomField, LoginField } from 'core/ovations-api/definitions';\r\nimport LoginFieldType from 'core/ovations-api/enums/LoginFieldType';\r\nimport FAIcon from 'core/ovations-components/FAIcon';\r\nimport { removeFirst } from 'core/util/arrays';\r\nimport Notification from 'definitions/Notification';\r\nimport NotificationType from 'enums/NotificationType';\r\n\r\ninterface LoginModalProps {\r\n toggle: () => void;\r\n addNotification: (notice: Partial) => void;\r\n isOpen?: boolean;\r\n onLogin: (credentials: OvationsApi.Types.Credential) => Promise;\r\n onRequestPasswordReset: (email: { email: string }) => Promise;\r\n disableManualProfileCreation: boolean;\r\n customLoginFields: (LoginField | undefined)[];\r\n customFields: CustomField[];\r\n onCustomLogin: (customCredentials: OvationsApi.Types.CustomCredential) => Promise;\r\n noAccessErrorEnabled: boolean;\r\n enablePasswordRequired: boolean;\r\n}\r\n\r\ninterface LoginModalState {\r\n errorStatus: number | undefined;\r\n wasValidated: boolean;\r\n hasLoginError: boolean;\r\n hasResetError: boolean;\r\n isInResetMode: boolean;\r\n isLoggingIn: boolean;\r\n isRequestingReset: boolean;\r\n credentials: OvationsApi.Types.Credential;\r\n customCredentials: OvationsApi.Types.CustomCredential;\r\n isInRegisterMode: boolean;\r\n}\r\n\r\nconst emptyCredential: OvationsApi.Types.Credential = {\r\n email: '',\r\n password: '',\r\n};\r\n\r\nconst emptyCustomCredential: OvationsApi.Types.CustomCredential = {\r\n loginFieldValues: [],\r\n};\r\n\r\nexport default class LoginModal extends React.Component {\r\n constructor(props: LoginModalProps) {\r\n super(props);\r\n\r\n this.state = this.getInitialState();\r\n }\r\n\r\n getInitialState(): LoginModalState {\r\n return {\r\n errorStatus: undefined,\r\n wasValidated: false,\r\n hasLoginError: false,\r\n hasResetError: false,\r\n isInResetMode: false,\r\n isLoggingIn: false,\r\n isRequestingReset: false,\r\n credentials: emptyCredential,\r\n customCredentials: emptyCustomCredential,\r\n isInRegisterMode: false,\r\n };\r\n }\r\n\r\n componentDidUpdate(prevProps: LoginModalProps) {\r\n if (!prevProps.isOpen && this.props.isOpen) {\r\n this.setState(this.getInitialState());\r\n }\r\n }\r\n\r\n getCustomFieldLabel(customAttributeId: number) {\r\n const result = this.props.customFields.find((obj) => {\r\n return obj.id === customAttributeId;\r\n });\r\n if (result) {\r\n return result.label;\r\n }\r\n // shouldn't hit this condition, didn't want to return null\r\n return 'No label available';\r\n }\r\n\r\n onCredentialsInputChange: React.ChangeEventHandler = (e) => {\r\n const { name, value } = e.currentTarget;\r\n this.setState({\r\n credentials: {\r\n ...this.state.credentials,\r\n [name]: value,\r\n },\r\n });\r\n };\r\n\r\n onCustomFieldChange: React.ChangeEventHandler = (e) => {\r\n const { value } = e.currentTarget;\r\n const customAttributeId = Number(e.currentTarget.getAttribute('data-id'));\r\n const fieldType = e.currentTarget.getAttribute('data-type');\r\n const loginField: LoginField =\r\n e.currentTarget.getAttribute('data-type') === 'Custom'\r\n ? { type: 'Custom', customAttributeId }\r\n : { type: fieldType as LoginFieldType, customAttributeId: null };\r\n const loginFieldValues = removeFirst(\r\n this.state.customCredentials.loginFieldValues,\r\n (option) =>\r\n option.loginField.customAttributeId === customAttributeId ||\r\n (option.loginField.type !== 'Custom' && option.loginField.type === fieldType),\r\n );\r\n this.setState({\r\n customCredentials: {\r\n loginFieldValues: [...loginFieldValues, { loginField, value }],\r\n },\r\n });\r\n };\r\n\r\n onPasswordResetSubmit: React.FormEventHandler = async (e) => {\r\n e.preventDefault();\r\n\r\n // eslint-disable-next-line react/no-unused-state\r\n this.setState({ hasResetError: false });\r\n\r\n const isValid = e.currentTarget.checkValidity();\r\n if (!isValid) {\r\n this.setState({ wasValidated: true });\r\n return;\r\n }\r\n\r\n const { props } = this;\r\n this.setState({ isLoggingIn: true });\r\n\r\n try {\r\n await props.onRequestPasswordReset({ email: this.state.credentials.email });\r\n } catch (e) {\r\n const errorStatus = e.response && e.response.status;\r\n if (errorStatus !== 404) {\r\n this.setState({\r\n errorStatus,\r\n hasLoginError: true,\r\n isLoggingIn: false,\r\n });\r\n return;\r\n }\r\n }\r\n this.props.addNotification({\r\n type: NotificationType.Success,\r\n message: 'notification_passwordResetRequest',\r\n });\r\n this.props.toggle();\r\n };\r\n\r\n onLoginSubmit: React.FormEventHandler = async (e) => {\r\n e.preventDefault();\r\n\r\n this.setState({ hasLoginError: false });\r\n\r\n const isValid = e.currentTarget.checkValidity();\r\n if (!isValid) {\r\n this.setState({ wasValidated: true });\r\n return;\r\n }\r\n\r\n const { props } = this;\r\n this.setState({ isLoggingIn: true });\r\n\r\n try {\r\n if (props.disableManualProfileCreation && !props.enablePasswordRequired) {\r\n await props.onCustomLogin(this.state.customCredentials);\r\n } else {\r\n await props.onLogin(this.state.credentials);\r\n }\r\n } catch (e) {\r\n const errorStatus = e.response.status;\r\n this.setState({\r\n errorStatus,\r\n hasLoginError: true,\r\n isLoggingIn: false,\r\n });\r\n return;\r\n }\r\n\r\n this.props.toggle();\r\n };\r\n\r\n onRegisterClick = () => {\r\n this.setState({\r\n isInResetMode: true,\r\n isInRegisterMode: true,\r\n });\r\n };\r\n\r\n toggleResetMode = () => {\r\n this.setState({\r\n isInResetMode: !this.state.isInResetMode,\r\n isInRegisterMode: false,\r\n });\r\n };\r\n\r\n determineMessageId(errorStatus: number | undefined) {\r\n switch (errorStatus) {\r\n case 429:\r\n return 'errorMessage_tooManyRequests';\r\n case 400:\r\n return 'errorMessage_loginError';\r\n case 403:\r\n return 'errorMessage_accountDisabled';\r\n default:\r\n return 'errorMessage_generic';\r\n }\r\n }\r\n\r\n renderLoginError() {\r\n const { errorStatus } = this.state;\r\n if (this.state.hasLoginError) {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n }\r\n\r\n renderCreateProfileBlock() {\r\n const { disableManualProfileCreation } = this.props;\r\n if (!disableManualProfileCreation) {\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 renderNewUserBlockForNoRegistration() {\r\n if (this.state.isInRegisterMode) {\r\n return;\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 renderLoginFields() {\r\n const { state } = this;\r\n let submitText = state.isInResetMode ? (\r\n \r\n ) : (\r\n \r\n );\r\n let submittingText = state.isInResetMode ? (\r\n \r\n ) : (\r\n \r\n );\r\n\r\n if (this.props.enablePasswordRequired && this.state.isInRegisterMode) {\r\n submitText = ;\r\n submittingText = ;\r\n }\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!state.isInResetMode && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n {this.renderLoginError()}\r\n \r\n \r\n {state.isLoggingIn ? (\r\n \r\n {submittingText} \r\n \r\n ) : (\r\n submitText\r\n )}\r\n \r\n \r\n \r\n );\r\n }\r\n\r\n renderCustomLoginFields() {\r\n const { state } = this;\r\n if (!this.props.customLoginFields) {\r\n return;\r\n }\r\n\r\n const loginFields = this.props.customLoginFields.map((loginField, index) =>\r\n loginField ? (\r\n // eslint-disable-next-line react/no-array-index-key\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ) : null,\r\n );\r\n return (\r\n <>\r\n {loginFields}\r\n {!this.props.noAccessErrorEnabled && this.state.hasLoginError && (\r\n
\r\n \r\n
\r\n )}\r\n \r\n \r\n {state.isLoggingIn ? (\r\n \r\n \r\n \r\n \r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n );\r\n }\r\n\r\n render() {\r\n const { props, state } = this;\r\n const { disableManualProfileCreation, enablePasswordRequired } = this.props;\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {disableManualProfileCreation && !enablePasswordRequired\r\n ? this.renderCustomLoginFields()\r\n : this.renderLoginFields()}\r\n \r\n {(!disableManualProfileCreation ||\r\n (disableManualProfileCreation && enablePasswordRequired)) && (\r\n \r\n {state.isInResetMode ? (\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n )}\r\n \r\n {disableManualProfileCreation && enablePasswordRequired\r\n ? this.renderNewUserBlockForNoRegistration()\r\n : this.renderCreateProfileBlock()}\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import classNames from 'classnames';\r\nimport React from 'react';\r\nimport { MessageValue } from 'core/l10n/types';\r\n\r\nimport { L10nMessages, LocalizedMessage } from 'core/l10n/components';\r\n\r\ninterface NotificationProps {\r\n alertType: string;\r\n remove: () => void;\r\n timeout: number;\r\n message?: keyof L10nMessages; // Normal portal translated messages\r\n body?: string; // Translated error messages from the server.\r\n values?: { [key: string]: MessageValue | JSX.Element };\r\n showClose?: boolean;\r\n}\r\n\r\ninterface NotificationState {\r\n timeout: number;\r\n pauseTimeout: boolean;\r\n isClosing: boolean;\r\n}\r\n\r\nclass Notification extends React.Component {\r\n prevTime: number | null;\r\n\r\n afId: number;\r\n\r\n constructor(props: NotificationProps) {\r\n super(props);\r\n\r\n this.prevTime = null;\r\n\r\n this.state = {\r\n timeout: props.timeout,\r\n pauseTimeout: false,\r\n isClosing: false,\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n this.afId = requestAnimationFrame(this.onAnimationFrame);\r\n }\r\n\r\n onAnimationFrame: FrameRequestCallback = (time) => {\r\n if (!this.prevTime) {\r\n this.prevTime = time;\r\n }\r\n if (this.state.pauseTimeout) {\r\n this.prevTime = time;\r\n this.afId = requestAnimationFrame(this.onAnimationFrame);\r\n return;\r\n }\r\n const delta = time - this.prevTime;\r\n const timeout = this.state.timeout - delta;\r\n if (timeout < 0) {\r\n this.queueRemoval();\r\n return;\r\n }\r\n this.prevTime = time;\r\n this.afId = requestAnimationFrame(this.onAnimationFrame);\r\n this.setState({ timeout });\r\n };\r\n\r\n onMouseEnter: React.MouseEventHandler = () => {\r\n this.setState({ timeout: this.props.timeout, pauseTimeout: true });\r\n };\r\n\r\n onMouseLeave: React.MouseEventHandler = () => {\r\n this.setState({ pauseTimeout: false });\r\n };\r\n\r\n onClose: React.MouseEventHandler = () => {\r\n this.queueRemoval();\r\n };\r\n\r\n queueRemoval() {\r\n cancelAnimationFrame(this.afId);\r\n this.setState({ isClosing: true });\r\n const leaveDuration = 500;\r\n setTimeout(this.props.remove, leaveDuration);\r\n }\r\n\r\n renderMessage() {\r\n const { message, values, body } = this.props;\r\n if (message == null && body == null) {\r\n return;\r\n }\r\n if (message != null) {\r\n return ;\r\n }\r\n if (body != null) {\r\n return
{body}
;\r\n }\r\n }\r\n\r\n renderCloseButton() {\r\n if (this.props.showClose) {\r\n return (\r\n \r\n );\r\n }\r\n }\r\n\r\n render() {\r\n const timerStyle = {\r\n width: `${Math.round((this.state.timeout / this.props.timeout) * 100)}%`,\r\n };\r\n\r\n return (\r\n \r\n
\r\n {this.renderCloseButton()}\r\n {this.renderMessage()}\r\n
\r\n {this.props.timeout > 0 &&
}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default Notification;\r\n","import React from 'react';\r\n\r\nimport Notification from 'components/Notification';\r\nimport NotificationDef from 'definitions/Notification';\r\nimport NotificationType from 'enums/NotificationType';\r\n\r\ninterface NotificationAreaProps {\r\n items: NotificationDef[];\r\n removeItem: (id: string) => void;\r\n}\r\n\r\nclass NotificationArea extends React.Component {\r\n static getAlertType(notificationType: NotificationType): string {\r\n switch (notificationType) {\r\n case NotificationType.Error:\r\n return 'alert-danger';\r\n case NotificationType.Warning:\r\n return 'alert-warning';\r\n case NotificationType.Success:\r\n return 'alert-success';\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n {this.props.items.map((notification) => (\r\n this.props.removeItem(notification.id)}\r\n body={notification.body}\r\n />\r\n ))}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default NotificationArea;\r\n","import { compact, Dictionary } from 'lodash';\r\nimport React from 'react';\r\nimport { connect } from 'react-redux';\r\n\r\nimport { L10nConsumer, L10nMessages, MessageValue } from 'core/l10n/components';\r\nimport S from 'redux-modules/definitions/RootState';\r\n\r\nexport interface TitleProps {\r\n main?: string;\r\n subtitle?: string;\r\n default?: string;\r\n}\r\n\r\nconst Title: React.SFC = (props) => {\r\n document.title = compact([props.subtitle, props.main]).join(' | ') || props.default || document.title;\r\n return null;\r\n};\r\n\r\nexport interface LocalizedTitleProps {\r\n main?: string;\r\n id?: keyof L10nMessages;\r\n values?: Dictionary;\r\n}\r\n\r\nexport const LocalizedTitle: React.SFC = (props) => (\r\n \r\n {(l10n) => (\r\n \r\n )}\r\n \r\n);\r\n\r\nexport const mapStateToProps = (state: S, ownProps: LocalizedTitleProps): LocalizedTitleProps => ({\r\n main: (state.global.portal && state.global.portal.title) || undefined,\r\n ...ownProps,\r\n});\r\n\r\nexport default connect(mapStateToProps)(LocalizedTitle);\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\n\r\nimport LocalizedTitle from 'components/LocalizedTitle';\r\nimport elements from 'config/elements';\r\nimport ContainerProps from 'containers/definitions/ContainerProps';\r\nimport { LocalizedMessage } from 'core/l10n/components';\r\n\r\nexport class AuthRedirectContainer extends React.Component {\r\n render() {\r\n const { portal } = this.props.global;\r\n return (\r\n
\r\n
\r\n
\r\n \r\n

\r\n \r\n

\r\n {portal && portal.noAccessError.message &&

{portal.noAccessError.message}

}\r\n
\r\n {portal && portal.noAccessError.imageUrl && (\r\n
\r\n \r\n
\r\n )}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(/* istanbul ignore next */ (state) => state)(AuthRedirectContainer);\r\n","import React from 'react';\r\nimport { FormGroup, Input, Label } from 'reactstrap';\r\n\r\nimport elements from 'config/elements';\r\nimport { countryConfigs, isCountryCode } from 'core/config/addresses';\r\nimport { FIRST_NAME, FIRST_NAME_OR_LAST_NAME } from 'core/config/patterns';\r\nimport { L10nConsumer, LocalizedMessage } from 'core/l10n/components';\r\nimport { L10nContext } from 'core/l10n/types';\r\nimport * as OvationsApi from 'core/ovations-api';\r\n\r\nexport interface AlternatePayeeFormProps {\r\n alternatePayee: OvationsApi.Types.AlternatePayee | null;\r\n enabledCountries: OvationsApi.Types.Country[];\r\n readOnly?: boolean;\r\n alternatePayeeSelected?: boolean;\r\n handleAddressFieldChange: (event: React.ChangeEvent) => void;\r\n onAlternatePayeeRadioChange: (event: React.ChangeEvent) => void;\r\n rewardPackageType?: OvationsApi.Enums.RewardPackageType;\r\n}\r\n\r\nclass AlternatePayeeForm extends React.Component {\r\n renderAlternatePayeeRadioSelection() {\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 {this.props.alternatePayee && this.renderAlternatePayeeFields()}\r\n \r\n );\r\n }\r\n\r\n renderAlternatePayeeFields() {\r\n const { alternatePayee } = this.props;\r\n\r\n if (!alternatePayee) {\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 {(l10n) => <>{this.renderAddressFields(alternatePayee, l10n)}}\r\n
\r\n );\r\n }\r\n\r\n renderAddressFields(alternatePayee: OvationsApi.Types.AlternatePayee, l10n: L10nContext) {\r\n const { enabledCountries } = this.props;\r\n const countryConfig = isCountryCode(alternatePayee.country)\r\n ? countryConfigs[alternatePayee.country]\r\n : undefined;\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 render() {\r\n return <>{this.renderAlternatePayeeRadioSelection()};\r\n }\r\n}\r\n\r\nexport default AlternatePayeeForm;\r\n","enum FormConfigType {\r\n Claim = 'Claim',\r\n Prefund = 'Prefund',\r\n}\r\n\r\nexport default FormConfigType;\r\n","enum ModalType {\r\n None,\r\n Login,\r\n PasswordChange,\r\n}\r\n\r\nexport default ModalType;\r\n","import React from 'react';\r\n\r\nconst Spinner = () => (\r\n
\r\n
\r\n
\r\n
\r\n
Loading...
\r\n
\r\n);\r\n\r\nexport default Spinner;\r\n","import React from 'react';\r\n\r\nimport Spinner from 'components/Spinner';\r\nimport { L10nMessages, LocalizedMessage } from 'core/l10n/components';\r\nimport configureWithData, { LoaderConfig as LoaderConfigWithData, WithDataConfig } from 'core/lib/configureWithData';\r\n\r\nexport type LoaderConfig = LoaderConfigWithData;\r\n\r\nconst genericErrorMessageId: keyof L10nMessages = 'errorMessage_generic';\r\n\r\nconst withDataErrorConfig: WithDataConfig = {\r\n handleError: (e, showError) => showError(genericErrorMessageId),\r\n renderError: (error) => (\r\n
\r\n \r\n
\r\n ),\r\n};\r\n\r\nconst withData = configureWithData({\r\n ...withDataErrorConfig,\r\n fallback: () => (\r\n
\r\n \r\n
\r\n ),\r\n});\r\n\r\nexport const withDataNoSpinner = configureWithData(withDataErrorConfig);\r\n\r\nexport default withData;\r\n","import { find, includes } from 'lodash';\r\nimport { Action } from 'redux';\r\nimport { ThunkAction } from 'redux-thunk';\r\nimport { createSelector } from 'reselect';\r\n\r\nimport createReducer from 'core/lib/createReducer';\r\nimport { RewardCalculation } from 'core/ovations-api/definitions';\r\nimport { RewardCalculationType } from 'core/ovations-api/enums';\r\nimport PromotionState from 'redux-modules/definitions/PromotionState';\r\nimport S from 'redux-modules/definitions/RootState';\r\n\r\nimport * as OvationsApi from 'core/ovations-api';\r\nimport * as OvationsPortalApi from '../ovations-portal-api';\r\n\r\ntype Promotion = OvationsPortalApi.Types.Promotion;\r\n\r\ntype Question = OvationsApi.Types.Question;\r\n\r\nexport const emptyQuestion: Question = {\r\n id: '',\r\n title: '',\r\n description: '',\r\n helpText: '',\r\n programId: '',\r\n internalDescription: '',\r\n reportingGroup: '',\r\n type: OvationsApi.Enums.QuestionType.None,\r\n createDate: new Date().toISOString(),\r\n};\r\n\r\nexport const emptyRewardCalculation: RewardCalculation = {\r\n id: 0,\r\n type: RewardCalculationType.Static,\r\n label: '',\r\n amount: 0,\r\n alternatePayeeRewardPackageId: '',\r\n alternatePayeeRewardPackageType: null,\r\n rewardPackageName: 'Static package name',\r\n rewardPackages: [],\r\n sortOrder: 0,\r\n};\r\n\r\nexport const emptyPromotion: Promotion = {\r\n id: '',\r\n number: 0,\r\n name: '',\r\n termsAndConditions: '',\r\n termsAndConditionsHeading: '',\r\n eSignAgreementUrl: '',\r\n questions: [],\r\n rewardCalculations: [emptyRewardCalculation],\r\n rewardPrefundEnabled: false,\r\n hasAlternatePayee: false,\r\n isTaxable: false,\r\n limitReached: false,\r\n};\r\n\r\nexport const initialState: PromotionState = {\r\n list: [],\r\n};\r\n\r\nconst { reducer, update } = createReducer('Promotion/UPDATE', initialState);\r\nexport const promotionReducer = reducer;\r\n\r\nexport const actions = {\r\n update,\r\n\r\n fetchAll: (): ThunkAction, S, void, Action> => {\r\n return async (dispatch) => {\r\n const list = await OvationsPortalApi.Promotion.fetchAll();\r\n dispatch(update({ list }));\r\n const promotion = 'promotion';\r\n const limitReached = 'limitReached';\r\n const newList = list.map((p) => {\r\n return {\r\n ...p[promotion],\r\n limitReached: p[limitReached],\r\n };\r\n });\r\n return newList;\r\n };\r\n },\r\n};\r\n\r\nexport const selectors = {\r\n hasReloadableRewardPackage: createSelector(\r\n (promotion: OvationsPortalApi.Types.Promotion) => promotion,\r\n (promotion) => {\r\n const reloadableRewardPackageType = [\r\n OvationsApi.Enums.RewardPackageType.ReloadableCAN,\r\n OvationsApi.Enums.RewardPackageType.ReloadableUSA,\r\n OvationsApi.Enums.RewardPackageType.ReloadableUSAGalileo,\r\n OvationsApi.Enums.RewardPackageType.ReloadableCANVisa,\r\n ];\r\n\r\n return promotion.rewardCalculations.some((r) =>\r\n r.rewardPackages.some((x) => includes(reloadableRewardPackageType, x.rewardPackageType)),\r\n );\r\n },\r\n ),\r\n\r\n isRequireSSNForGalileo: createSelector(\r\n (promotion: OvationsPortalApi.Types.Promotion[]) => promotion,\r\n (promotion) => {\r\n if (!promotion) {\r\n return false;\r\n }\r\n const promotionRequireSSN = find(promotion, (p) => p.requiresSecurityNumber);\r\n if (promotionRequireSSN) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n ),\r\n\r\n isRequireDOBForGalileo: createSelector(\r\n (promotion: OvationsPortalApi.Types.Promotion[]) => promotion,\r\n (promotion) => {\r\n if (!promotion) {\r\n return false;\r\n }\r\n const promotionRequireDOB = find(promotion, (p) => p.requiresDateOfBirth);\r\n if (promotionRequireDOB) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n ),\r\n};\r\n","import * as promotionQuestion from 'core/ovations-api/__mocks__';\r\nimport { ChoiceRewardCalculation } from 'core/ovations-api/definitions';\r\nimport RewardCalculationType from 'core/ovations-api/enums/RewardCalculationType';\r\nimport * as OvationsPortalApi from 'ovations-portal-api';\r\n\r\nexport const mockChoiceRewardCalculation: ChoiceRewardCalculation = {\r\n id: 1,\r\n type: RewardCalculationType.Choice,\r\n label: null,\r\n alternatePayeeRewardPackageId: null,\r\n alternatePayeeRewardPackageType: null,\r\n rewardPackageName: 'Choice package name',\r\n rewardPackages: [],\r\n sortOrder: 0,\r\n choices: [\r\n {\r\n id: 2,\r\n type: RewardCalculationType.Static,\r\n label: 'Label1',\r\n amount: 10,\r\n alternatePayeeRewardPackageId: null,\r\n alternatePayeeRewardPackageType: null,\r\n rewardPackageName: 'Single load package name',\r\n rewardPackages: [],\r\n sortOrder: 0,\r\n },\r\n {\r\n id: 3,\r\n type: RewardCalculationType.Static,\r\n label: 'Label2',\r\n amount: 20,\r\n alternatePayeeRewardPackageId: null,\r\n alternatePayeeRewardPackageType: null,\r\n rewardPackageName: 'Reloadable package name',\r\n rewardPackages: [],\r\n sortOrder: 1,\r\n },\r\n ],\r\n};\r\n\r\nexport const mockPortalPromotion: OvationsPortalApi.Types.Promotion = {\r\n id: 'portal-promotion-1',\r\n number: 1,\r\n name: 'Mock Portal Promotion',\r\n termsAndConditions: 'Terms text',\r\n termsAndConditionsHeading: 'Terms Heading',\r\n eSignAgreementUrl: 'eSign agreement url',\r\n questions: [\r\n promotionQuestion.mockPortalPromotionQuestion,\r\n promotionQuestion.mockNumberPortalPromotionQuestion,\r\n promotionQuestion.mockDropdownPortalPromotionQuestion,\r\n promotionQuestion.mockCascadingDropdownPortalPromotionQuestion,\r\n promotionQuestion.mockDatetimePortalPromotionQuestion,\r\n promotionQuestion.mockFileUploadPortalPromotionQuestion,\r\n ],\r\n rewardCalculations: [mockChoiceRewardCalculation],\r\n rewardPrefundEnabled: false,\r\n hasAlternatePayee: false,\r\n isTaxable: false,\r\n limitReached: false,\r\n};\r\n","import {\r\n mockPromotionCascadingDropdownQuestionAnswer,\r\n mockPromotionDateTimeQuestionAnswer,\r\n mockPromotionDropdownQuestionAnswer,\r\n mockPromotionFileUploadQuestionAnswer,\r\n mockPromotionNumberQuestionAnswer,\r\n mockPromotionTextQuestionAnswer,\r\n} from 'core/ovations-api/__mocks__';\r\nimport { ClaimStatus, ReconciliationStatus } from 'core/ovations-api/enums';\r\nimport CustomerRewardType from 'enums/CustomerRewardType';\r\nimport * as OvationsPortalApi from 'ovations-portal-api';\r\nimport { mockPortalPromotion } from 'ovations-portal-api/__mocks__/Promotion';\r\nimport ClaimState from 'redux-modules/definitions/ClaimState';\r\n\r\nexport const generateMockRewardSummary = (\r\n claimDetail: OvationsPortalApi.Types.ClaimDetail,\r\n): OvationsPortalApi.Types.CustomerRewardSummary => {\r\n return {\r\n type: CustomerRewardType.Claim,\r\n date: claimDetail.submissionDate,\r\n claim: claimDetail,\r\n };\r\n};\r\n\r\nexport const mockClaim: OvationsPortalApi.Types.Claim = {\r\n id: '0',\r\n number: 0,\r\n customerId: '0',\r\n promotionNumber: 0,\r\n customer: null,\r\n submissionDate: '',\r\n status: ClaimStatus.PendingValidation,\r\n answers: {\r\n 0: mockPromotionTextQuestionAnswer,\r\n 1: mockPromotionNumberQuestionAnswer,\r\n 2: mockPromotionDropdownQuestionAnswer,\r\n 3: mockPromotionCascadingDropdownQuestionAnswer,\r\n 4: mockPromotionDateTimeQuestionAnswer,\r\n 5: mockPromotionFileUploadQuestionAnswer,\r\n },\r\n isForPrefund: false,\r\n alternatePayee: null,\r\n reconciliationStatus: ReconciliationStatus.PendingSubmission,\r\n rewards: null,\r\n};\r\n\r\nexport const mockClaimDetail: OvationsPortalApi.Types.ClaimDetail = {\r\n id: '0',\r\n number: 0,\r\n promotion: mockPortalPromotion,\r\n rewardAmountTotal: 0,\r\n submissionDate: '',\r\n status: ClaimStatus.PendingValidation,\r\n answers: {\r\n 0: mockPromotionTextQuestionAnswer,\r\n 1: mockPromotionNumberQuestionAnswer,\r\n 2: mockPromotionDropdownQuestionAnswer,\r\n 3: mockPromotionCascadingDropdownQuestionAnswer,\r\n 4: mockPromotionDateTimeQuestionAnswer,\r\n 5: mockPromotionFileUploadQuestionAnswer,\r\n },\r\n eSignAgreementAcceptance: false,\r\n isForPrefund: false,\r\n isPartialReward: false,\r\n alternatePayee: null,\r\n reconciliationStatus: ReconciliationStatus.PendingSubmission,\r\n reason: null,\r\n payeeDetails: null,\r\n expirationDate: '2023-11-18T20:50:00.8518059Z',\r\n rewardPointTotal: 0,\r\n rewards: null,\r\n};\r\n\r\nconst claimState: ClaimState = {\r\n results: [generateMockRewardSummary(mockClaimDetail)],\r\n totalResults: 1,\r\n redemptionClaims: [],\r\n};\r\n\r\nexport default claimState;\r\n","import createReducer from 'core/lib/createReducer';\r\nimport * as OvationsApi from 'core/ovations-api';\r\nimport { filter, find, last } from 'lodash';\r\nimport { Action } from 'redux';\r\nimport { ThunkAction } from 'redux-thunk';\r\nimport { createSelector } from 'reselect';\r\n\r\nimport { ClaimStatus, ReconciliationStatus } from 'core/ovations-api/enums';\r\nimport * as OvationsPortalApi from 'ovations-portal-api';\r\nimport ClaimState from 'redux-modules/definitions/ClaimState';\r\nimport S from 'redux-modules/definitions/RootState';\r\nimport { emptyPromotion } from 'redux-modules/promotion';\r\nimport { monetize } from 'core/util/strings';\r\nimport { generateMockRewardSummary } from './__mocks__/claimState';\r\n\r\nexport const initialState: ClaimState = {\r\n results: [],\r\n totalResults: 0,\r\n redemptionClaims: [],\r\n};\r\n\r\nexport const emptyClaim: OvationsPortalApi.Types.Claim = {\r\n id: '',\r\n number: 0,\r\n customerId: '',\r\n promotionNumber: 0,\r\n customer: null,\r\n submissionDate: '',\r\n status: ClaimStatus.PendingValidation,\r\n answers: {},\r\n isForPrefund: null,\r\n alternatePayee: null,\r\n reconciliationStatus: ReconciliationStatus.PendingSubmission,\r\n rewards: null,\r\n};\r\n\r\nexport const emptyClaimDetail: OvationsPortalApi.Types.ClaimDetail = {\r\n id: '',\r\n number: 0,\r\n promotion: emptyPromotion,\r\n submissionDate: '',\r\n status: ClaimStatus.PendingValidation,\r\n answers: {},\r\n eSignAgreementAcceptance: false,\r\n isForPrefund: false,\r\n isPartialReward: false,\r\n alternatePayee: null,\r\n reconciliationStatus: ReconciliationStatus.PendingSubmission,\r\n reason: null,\r\n payeeDetails: null,\r\n rewards: null,\r\n rewardAmountTotal: 0,\r\n rewardPointTotal: 0,\r\n};\r\n\r\nconst { reducer, update } = createReducer('claim/UPDATE', initialState);\r\nexport const claimReducer = reducer;\r\n\r\nexport const actions = {\r\n fetch(claimNumber: number): ThunkAction, S, null, Action> {\r\n return async (dispatch) => {\r\n const claim = await OvationsPortalApi.Claim.fetch(claimNumber);\r\n if (!claim) {\r\n return;\r\n }\r\n // TODO: CQ Task to Refactor Claims Across Portal\r\n const results = [generateMockRewardSummary(claim)];\r\n dispatch(update({ results }));\r\n };\r\n },\r\n\r\n fetchRedemptionClaims(customerId: string): ThunkAction, S, null, Action> {\r\n return async (dispatch) => {\r\n const redemptionClaims = await OvationsPortalApi.Claim.fetchRedemptionClaims(customerId);\r\n if (!redemptionClaims) {\r\n return;\r\n }\r\n dispatch(update({ redemptionClaims }));\r\n };\r\n },\r\n\r\n fetchAll(\r\n claimRequest: Partial,\r\n ): ThunkAction<\r\n Promise>,\r\n S,\r\n null,\r\n Action\r\n > {\r\n return async (dispatch) => {\r\n const response = await OvationsPortalApi.PortalCardRewardDetail.fetchAllCustomerRewards(claimRequest);\r\n dispatch(update(response));\r\n return response;\r\n };\r\n },\r\n};\r\n\r\nexport const selectors = {\r\n getOverlappedQuestions: createSelector(\r\n (questions: OvationsApi.Types.PortalPromotionQuestion[]) => questions,\r\n (questions: OvationsApi.Types.PortalPromotionQuestion[]) => {\r\n const overlappedQuestion = filter(questions, (q1) => {\r\n return find(questions, (q2) => {\r\n return q1.question.id === q2.question.id && q1.id !== q2.id && !q1.isForPreFund;\r\n });\r\n }) as OvationsApi.Types.PortalPromotionQuestion[];\r\n return overlappedQuestion;\r\n },\r\n ),\r\n\r\n toProofOfPurchaseAnswers: createSelector(\r\n (claimDetail: OvationsPortalApi.Types.ClaimDetail) => claimDetail,\r\n (claimDetail: OvationsPortalApi.Types.ClaimDetail) => {\r\n let { answers } = claimDetail;\r\n Object.keys(claimDetail.answers).map((pqid) => {\r\n const promoQuestion = claimDetail.promotion.questions.find((q) => q.id === pqid);\r\n if (promoQuestion) {\r\n const reconciliationQuestion = claimDetail.promotion.questions.find(\r\n (q) => q.question.id === promoQuestion.question.id && !q.isForPreFund,\r\n );\r\n if (reconciliationQuestion) {\r\n answers = {\r\n ...answers,\r\n [reconciliationQuestion.id]: claimDetail.answers[pqid],\r\n };\r\n }\r\n }\r\n return answers;\r\n });\r\n return answers;\r\n },\r\n ),\r\n\r\n toClaim: (\r\n claimDetail: OvationsPortalApi.Types.ClaimDetail,\r\n isCreateReconciliation?: boolean,\r\n ): OvationsPortalApi.Types.Claim => {\r\n let { answers } = claimDetail;\r\n if (isCreateReconciliation) {\r\n answers = selectors.toProofOfPurchaseAnswers(claimDetail);\r\n }\r\n return {\r\n ...emptyClaim,\r\n id: claimDetail.id,\r\n number: claimDetail.number,\r\n promotionNumber: claimDetail.promotion.number,\r\n answers,\r\n isForPrefund: claimDetail.isForPrefund,\r\n reconciliationStatus: claimDetail.reconciliationStatus,\r\n alternatePayee: claimDetail.alternatePayee,\r\n rewards: claimDetail.rewards,\r\n };\r\n },\r\n\r\n resolveCascadingDropdownAnswer(\r\n promotionQuestion: OvationsApi.Types.PromotionCascadingDropdownQuestion,\r\n answer: OvationsApi.Types.PromotionCascadingDropdownQuestionAnswer,\r\n ) {\r\n const lastLayer = last(promotionQuestion.question.layers);\r\n if (lastLayer) {\r\n const lastAnswer = answer.values[lastLayer.dataSetPropertyId];\r\n const displayedAnswer = lastLayer.displayAsCurrency ? monetize(parseFloat(lastAnswer)) : lastAnswer;\r\n return displayedAnswer;\r\n }\r\n },\r\n\r\n resolveAllCascadingDropdownAnswers(answer: OvationsApi.Types.PromotionCascadingDropdownQuestionAnswer) {\r\n return Object.keys(answer.values)\r\n .map((key) => answer.values[key])\r\n .join(', ');\r\n },\r\n};\r\n","import ContainerProps from 'containers/definitions/ContainerProps';\r\nimport CustomerRewardType from 'enums/CustomerRewardType';\r\nimport { LoaderConfig } from 'lib/withData';\r\nimport ClaimDetail from 'ovations-portal-api/definitions/claims/ClaimDetail';\r\nimport { CustomerClaim } from 'ovations-portal-api/definitions/CustomerRewardSummary';\r\nimport * as claim from 'redux-modules/claim';\r\n\r\nconst getClaimDetail = (\r\n props: ContainerProps<{\r\n claimNumber?: string;\r\n }>,\r\n): ClaimDetail | undefined => {\r\n const { claimNumber } = props.match.params;\r\n if (claimNumber) {\r\n const claimsFromRewards = props.claim.results.filter(\r\n (claimValues) => claimValues.type === CustomerRewardType.Claim,\r\n ) as CustomerClaim[];\r\n\r\n return claimsFromRewards\r\n .map((claimRewardSummary) => claimRewardSummary.claim)\r\n .find((claimDetail) => claimDetail.number === Number(claimNumber));\r\n }\r\n return undefined;\r\n};\r\n\r\nexport const claimLoader: LoaderConfig<\r\n ContainerProps<{\r\n claimNumber?: string;\r\n }>\r\n> = {\r\n memoizer: (props) => props.match.params.claimNumber,\r\n needsData: (props) => {\r\n const { claimNumber } = props.match.params;\r\n return claimNumber != null && !getClaimDetail(props);\r\n },\r\n fetchData: (props) => props.dispatch(claim.actions.fetch(Number(props.match.params.claimNumber))),\r\n};\r\n","import { Action } from 'redux';\r\nimport { ThunkAction } from 'redux-thunk';\r\n\r\nimport createReducer from 'core/lib/createReducer';\r\nimport CustomerPromotionState from 'redux-modules/definitions/CustomerPromotionState';\r\nimport S from 'redux-modules/definitions/RootState';\r\n\r\nimport * as OvationsPortalApi from '../ovations-portal-api';\r\n\r\ntype CustomerPromotion = OvationsPortalApi.Types.CustomerPromotion;\r\n\r\nexport const emptyCustomerPromotion: CustomerPromotion = {\r\n number: 0,\r\n name: '',\r\n};\r\n\r\nexport const initialState: CustomerPromotionState = {\r\n list: [],\r\n};\r\n\r\nconst { reducer, update } = createReducer('customerPromotion/UPDATE', initialState);\r\nexport const customerPromotionReducer = reducer;\r\n\r\nexport const actions = {\r\n update,\r\n\r\n fetchAll: (): ThunkAction, S, void, Action> => {\r\n return async (dispatch) => {\r\n const list = await OvationsPortalApi.CustomerPromotion.fetchAll();\r\n dispatch(update({ list }));\r\n return list;\r\n };\r\n },\r\n};\r\n","import { find } from 'lodash';\r\n\r\nimport { EDIT_PROFILE } from 'config/routes';\r\nimport ContainerProps from 'containers/definitions/ContainerProps';\r\nimport { LoaderConfig } from 'lib/withData';\r\nimport * as customerPromotion from 'redux-modules/customerPromotion';\r\nimport * as promotion from 'redux-modules/promotion';\r\n\r\nexport const claimListPagePromotionLoader: LoaderConfig = {\r\n memoizer: () => 'promotion',\r\n needsData: () => true,\r\n fetchData: async (props) => {\r\n await props.dispatch(promotion.actions.fetchAll());\r\n },\r\n};\r\n\r\nexport const promotionLoader: LoaderConfig<\r\n ContainerProps<{\r\n promotionNumber?: string;\r\n }>\r\n> = {\r\n memoizer: (props) => props.match.params.promotionNumber,\r\n needsData: (props) => {\r\n const { promotionNumber } = props.match.params;\r\n return (\r\n (promotionNumber != null && !find(props.promotion.list, { number: +promotionNumber })) ||\r\n props.match.path === EDIT_PROFILE\r\n );\r\n },\r\n fetchData: (props) => props.dispatch(promotion.actions.fetchAll()),\r\n};\r\n\r\nexport const customerPromotionLoader: LoaderConfig<\r\n ContainerProps<{\r\n promotionNumber?: string;\r\n }>\r\n> = {\r\n memoizer: (props) => props.match.params.promotionNumber,\r\n needsData: () => true,\r\n fetchData: (props) => props.dispatch(customerPromotion.actions.fetchAll()),\r\n};\r\n","import { uniqueId } from 'lodash';\r\nimport { AnyAction, Dispatch } from 'redux';\r\n\r\nimport createReducer from 'core/lib/createReducer';\r\nimport { removeFirst } from 'core/util/arrays';\r\nimport Notification from 'definitions/Notification';\r\nimport NotificationType from 'enums/NotificationType';\r\nimport NotificationState from 'redux-modules/definitions/NotificationState';\r\nimport S from 'redux-modules/definitions/RootState';\r\n\r\nconst initialState: NotificationState = {\r\n items: [],\r\n};\r\n\r\nconst { reducer, update } = createReducer('notification/UPDATE', initialState);\r\nexport const notificationReducer = reducer;\r\n\r\nexport const actions = {\r\n remove: (id: string) => (dispatch: Dispatch, getState: () => S) => {\r\n const { items } = getState().notification;\r\n return dispatch(update({ items: removeFirst(items, (n) => n.id === id) }));\r\n },\r\n\r\n add: (settings: Partial) => (dispatch: Dispatch, getState: () => S) => {\r\n const { items } = getState().notification;\r\n const newNotification = {\r\n type: NotificationType.Success,\r\n timeout: 5000,\r\n showClose: true,\r\n ...settings,\r\n id: uniqueId(),\r\n };\r\n return dispatch(update({ items: [...items, newNotification] }));\r\n },\r\n};\r\n","import { Action } from 'redux';\r\nimport { ThunkAction } from 'redux-thunk';\r\n\r\nimport createReducer from 'core/lib/createReducer';\r\nimport PointLedgerState from 'redux-modules/definitions/PointLedgerState';\r\nimport S from 'redux-modules/definitions/RootState';\r\n\r\nimport * as OvationsPortalApi from 'ovations-portal-api';\r\n\r\nexport const initialState: PointLedgerState = {\r\n total: null,\r\n date: '',\r\n totalSalesIncentiveCalculated: null,\r\n};\r\n\r\nconst { reducer, update } = createReducer('PointLedger/UPDATE', initialState);\r\nexport const pointLedgerReducer = reducer;\r\n\r\nexport const actions = {\r\n update,\r\n\r\n fetchTotal: (): ThunkAction, S, void, Action> => {\r\n return async (dispatch) => {\r\n const result = await OvationsPortalApi.PointLedger.fetchTotal();\r\n if (result) {\r\n dispatch(update(result));\r\n }\r\n };\r\n },\r\n};\r\n","import { DEFAULT_LOCALE } from 'core/l10n/locales';\r\nimport createReducer from 'core/lib/createReducer';\r\nimport * as OvationsApi from 'core/ovations-api';\r\nimport * as Types from 'core/ovations-api/definitions';\r\nimport AddressCertificationStatus from 'core/ovations-api/enums/AddressCertificationStatus';\r\nimport { MAX_AGE } from 'core/util/datetime';\r\nimport moment from 'moment';\r\nimport { ThunkAction } from 'redux-thunk';\r\nimport { Action } from 'redux';\r\n\r\nimport * as PortalApi from 'ovations-portal-api';\r\nimport { RegistrationResult } from 'ovations-portal-api/Account';\r\nimport AccountState from 'redux-modules/definitions/AccountState';\r\nimport S from 'redux-modules/definitions/RootState';\r\nimport * as pointLedger from 'redux-modules/pointLedger';\r\n\r\nexport const emptyCertifiableAddress: Types.CertifiableAddress = {\r\n address1: '',\r\n address2: '',\r\n city: '',\r\n state: '',\r\n zip: '',\r\n status: AddressCertificationStatus.NonCertified,\r\n country: '',\r\n};\r\n\r\nexport const emptyRegistrationRequest: Types.RegistrationRequest = {\r\n id: '',\r\n email: '',\r\n firstName: '',\r\n optInToFutureOffers: false,\r\n lastName: '',\r\n phoneNumber: null,\r\n preferredEmail: '',\r\n preferredPhoneNumber: null,\r\n address: emptyCertifiableAddress,\r\n password: '',\r\n confirmPassword: '',\r\n confirmEmail: '',\r\n dealerRegistration: '',\r\n preferredContactMethod: OvationsApi.Enums.NotificationChannelType.None,\r\n preferredLanguage: DEFAULT_LOCALE,\r\n isActive: true,\r\n isLegacyUser: false,\r\n ssn: '',\r\n legalName: null,\r\n alternateProfiles: [],\r\n customFields: {},\r\n};\r\n\r\nexport const emptyProfile: Types.Customer = {\r\n id: '',\r\n email: '',\r\n firstName: '',\r\n optInToFutureOffers: false,\r\n lastName: '',\r\n phoneNumber: null,\r\n preferredEmail: '',\r\n preferredPhoneNumber: null,\r\n address: emptyCertifiableAddress,\r\n preferredContactMethod: OvationsApi.Enums.NotificationChannelType.None,\r\n preferredLanguage: DEFAULT_LOCALE,\r\n isActive: true,\r\n isLegacyUser: false,\r\n legalName: null,\r\n alternateProfiles: [],\r\n customFields: {},\r\n};\r\n\r\nexport const initialState: AccountState = {\r\n me: null,\r\n};\r\n\r\nexport const emptyPasswordResetRequest: Types.PasswordResetRequest = {\r\n email: '',\r\n newPassword: '',\r\n confirmNewPassword: '',\r\n resetToken: '',\r\n};\r\n\r\nconst { reducer, update } = createReducer('account/UPDATE', initialState);\r\nexport const accountReducer = reducer;\r\n\r\nexport const actions = {\r\n update,\r\n\r\n fetch(): ThunkAction, S, void, Action> {\r\n return async (dispatch) => {\r\n const me = await PortalApi.Account.fetch();\r\n if (!me) {\r\n return;\r\n }\r\n dispatch(update({ me }));\r\n dispatch(pointLedger.actions.fetchTotal());\r\n };\r\n },\r\n\r\n register(\r\n registrationRequest: Types.RegistrationRequest,\r\n ): ThunkAction, S, void, Action> {\r\n return async (dispatch) => {\r\n const result = await PortalApi.Account.create(registrationRequest);\r\n if (result.success) {\r\n const me: OvationsApi.Types.Customer = {\r\n id: result.newUserId,\r\n email: registrationRequest.email,\r\n firstName: registrationRequest.firstName,\r\n optInToFutureOffers: registrationRequest.optInToFutureOffers,\r\n lastName: registrationRequest.lastName,\r\n phoneNumber: registrationRequest.phoneNumber,\r\n preferredEmail: registrationRequest.preferredEmail,\r\n preferredPhoneNumber: registrationRequest.preferredPhoneNumber,\r\n address: registrationRequest.address,\r\n preferredContactMethod: registrationRequest.preferredContactMethod,\r\n preferredLanguage: registrationRequest.preferredLanguage,\r\n isActive: registrationRequest.isActive,\r\n isLegacyUser: registrationRequest.isLegacyUser,\r\n dateOfBirth: registrationRequest.dateOfBirth,\r\n customFields: registrationRequest.customFields,\r\n ssn: registrationRequest.ssn,\r\n legalName: registrationRequest.legalName,\r\n alternateProfiles: registrationRequest.alternateProfiles,\r\n };\r\n dispatch(update({ me }));\r\n }\r\n return result;\r\n };\r\n },\r\n\r\n updateProfile(me: Types.Customer): ThunkAction {\r\n return async (dispatch) => {\r\n await PortalApi.Account.updateProfile(me);\r\n dispatch(update({ me }));\r\n };\r\n },\r\n\r\n login(credential: Types.Credential): ThunkAction, S, void, Action> {\r\n return async (dispatch) => {\r\n await PortalApi.Account.login(credential);\r\n await dispatch(actions.fetch());\r\n };\r\n },\r\n\r\n customLogin(credential: Types.CustomCredential): ThunkAction, S, void, Action> {\r\n return async (dispatch) => {\r\n await PortalApi.Account.customLogin(credential);\r\n await dispatch(actions.fetch());\r\n };\r\n },\r\n\r\n logout(): ThunkAction, S, void, Action> {\r\n return async (dispatch) => {\r\n dispatch(update({ me: null }));\r\n await PortalApi.Account.logout();\r\n };\r\n },\r\n\r\n deleteMe(): ThunkAction, S, void, Action> {\r\n return async (dispatch) => {\r\n dispatch(update({ me: null }));\r\n };\r\n },\r\n\r\n requestPasswordReset(resetRequest: { email: string }): ThunkAction, S, void, Action> {\r\n return async () => {\r\n await PortalApi.Account.requestPasswordReset(resetRequest);\r\n };\r\n },\r\n\r\n resetPassword(resetPasswordRequest: Types.PasswordResetRequest): ThunkAction, S, void, Action> {\r\n return async () => {\r\n await PortalApi.Account.resetPassword(resetPasswordRequest);\r\n };\r\n },\r\n};\r\n\r\nexport const selectors = {\r\n hasDateOfBirth: (state: AccountState): boolean => {\r\n if (state.me == null || state.me.dateOfBirth == null || state.me.dateOfBirth === '') {\r\n return false;\r\n }\r\n return true;\r\n },\r\n\r\n isLoggedIn: (state: AccountState): boolean => {\r\n return state.me !== null;\r\n },\r\n\r\n isDateOfBirthValid: (customer: OvationsApi.Types.Customer | null): boolean => {\r\n if (!customer) {\r\n return false;\r\n }\r\n const years = moment().diff(customer.dateOfBirth, 'years', true);\r\n if (years > MAX_AGE) {\r\n return false;\r\n }\r\n return true;\r\n },\r\n};\r\n","import ContainerProps from 'containers/definitions/ContainerProps';\r\nimport { LoaderConfig } from 'lib/withData';\r\nimport * as account from 'redux-modules/account';\r\n\r\nexport const accountLoader: LoaderConfig = {\r\n memoizer: () => false,\r\n needsData: (props, prevProps) => !prevProps && account.selectors.isLoggedIn(props.account),\r\n fetchData: (props) => props.dispatch(account.actions.fetch()),\r\n};\r\n","import { Action } from 'redux';\r\nimport { ThunkAction } from 'redux-thunk';\r\n\r\nimport createReducer from 'core/lib/createReducer';\r\nimport * as Types from 'core/ovations-api/definitions';\r\nimport * as OvationsPortalApi from 'ovations-portal-api';\r\nimport S from 'redux-modules/definitions/RootState';\r\n\r\nexport const initialState: Types.ProfileSettings = {\r\n programId: '',\r\n customFields: [],\r\n enableTaxableIncomeForm: false,\r\n enableRewardShoppingCatalog: false,\r\n fieldControlOption: {\r\n coreFieldControlOptions: [],\r\n communicationPreferenceFieldControlOptions: [],\r\n },\r\n disableSecurityNumberCollection: false,\r\n reviewInformationPage: false,\r\n};\r\n\r\nconst { reducer, update } = createReducer('profileSettings/UPDATE', initialState);\r\nexport const profileSettingsReducer = reducer;\r\n\r\nexport const actions = {\r\n fetchProfileSettings(): ThunkAction, S, null, Action> {\r\n return async (dispatch) => {\r\n const profileSettings = await OvationsPortalApi.ProfileSettings.fetch();\r\n dispatch(update(profileSettings));\r\n };\r\n },\r\n};\r\n","import ContainerProps from 'containers/definitions/ContainerProps';\r\nimport { LoaderConfig } from 'lib/withData';\r\nimport * as profileSettings from 'redux-modules/profileSettings';\r\n\r\nexport const profileSettingsLoader: LoaderConfig = {\r\n memoizer: () => false,\r\n needsData: (props, prevProps) => !prevProps,\r\n fetchData: (props) => props.dispatch(profileSettings.actions.fetchProfileSettings()),\r\n};\r\n","export enum ClaimSteps {\r\n CustomerInfoStep = 'claimFormStep_title_CustomerInfoStep',\r\n ConfirmationStep = 'claimFormStep_title_ConfirmationStep',\r\n RewardStep = 'claimFormStep_title_RewardOptionsStep',\r\n DetailStep = 'claimFormStep_title_DetailStep',\r\n PurchaseTypeStep = 'claimFormStep_title_PurchaseTypeStep',\r\n ReviewStep = 'claimFormStep_title_ReviewStep',\r\n RewardOptionSelectionStep = 'claimFormStep_title_RewardOptionSelectionStep',\r\n}\r\n","import { ThunkAction } from 'redux-thunk';\r\nimport { Action } from 'redux';\r\n\r\nimport createReducer from 'core/lib/createReducer';\r\nimport ModalType from 'enums/ModalType';\r\nimport LayoutState from 'redux-modules/definitions/LayoutState';\r\nimport S from 'redux-modules/definitions/RootState';\r\n\r\nconst initialState: LayoutState = {\r\n modal: ModalType.None,\r\n};\r\n\r\nconst { reducer, update } = createReducer('layout/UPDATE', initialState);\r\nexport const layoutReducer = reducer;\r\n\r\nexport const actions = {\r\n toggleModal:\r\n (modalToToggle: ModalType): ThunkAction =>\r\n (dispatch, getState) => {\r\n const modal = modalToToggle === getState().layout.modal ? ModalType.None : modalToToggle;\r\n dispatch(update({ modal }));\r\n },\r\n};\r\n","import { DEFAULT_LOCALE } from 'core/l10n/locales';\r\nimport * as OvationsApi from 'core/ovations-api';\r\n\r\nexport const emptyCertifiableAddress: OvationsApi.Types.CertifiableAddress = {\r\n address1: '',\r\n address2: '',\r\n city: '',\r\n state: '',\r\n zip: '',\r\n status: OvationsApi.Enums.AddressCertificationStatus.NonCertified,\r\n country: '',\r\n};\r\n\r\nexport const emptyCustomer: OvationsApi.Types.Customer = {\r\n id: '',\r\n email: '',\r\n firstName: '',\r\n optInToFutureOffers: false,\r\n lastName: '',\r\n phoneNumber: null,\r\n preferredEmail: '',\r\n preferredPhoneNumber: null,\r\n address: emptyCertifiableAddress,\r\n preferredContactMethod: OvationsApi.Enums.NotificationChannelType.None,\r\n preferredLanguage: DEFAULT_LOCALE,\r\n isActive: true,\r\n isLegacyUser: false,\r\n ssn: '',\r\n legalName: '',\r\n alternateProfiles: [],\r\n customFields: {},\r\n};\r\n\r\nexport const getCustomerTaxAddress = (\r\n customer: OvationsApi.Types.Customer | OvationsApi.Types.RegistrationRequest | null,\r\n): OvationsApi.Types.AlternateProfile | null => {\r\n if (customer == null) {\r\n return null;\r\n }\r\n\r\n const { alternateProfiles } = customer;\r\n\r\n if (!alternateProfiles) {\r\n return null;\r\n }\r\n\r\n const profileMatch = alternateProfiles.find((altProfiles) => {\r\n return altProfiles.alternateProfileType === OvationsApi.Enums.AlternateProfileType.Tax;\r\n });\r\n\r\n if (profileMatch) {\r\n return profileMatch;\r\n }\r\n\r\n return null;\r\n};\r\n\r\nexport const hasTaxInformation = (\r\n customer: OvationsApi.Types.Customer | OvationsApi.Types.RegistrationRequest | null,\r\n disableSSN: boolean,\r\n): boolean => {\r\n if (!customer) {\r\n return false;\r\n }\r\n\r\n if (!customer.ssn && !disableSSN) {\r\n return false;\r\n }\r\n\r\n if (!customer.legalName) {\r\n return false;\r\n }\r\n const taxAddress = getCustomerTaxAddress(customer);\r\n if (taxAddress == null) {\r\n return false;\r\n }\r\n const hasAllAddressValues = Object.keys(taxAddress)\r\n .filter((k) => k !== 'address2')\r\n .some((k) => {\r\n return !taxAddress[k];\r\n });\r\n return !hasAllAddressValues;\r\n};\r\n\r\nexport const replaceTaxAddressWithAddress = (\r\n alternateProfiles: OvationsApi.Types.AlternateProfile[] = [],\r\n replacementAddress: OvationsApi.Types.CertifiableAddress,\r\n): OvationsApi.Types.AlternateProfile[] => {\r\n const taxAddress = alternateProfiles.find((altProfile) => {\r\n return altProfile.alternateProfileType === OvationsApi.Enums.AlternateProfileType.Tax;\r\n });\r\n\r\n if (!taxAddress) {\r\n return alternateProfiles;\r\n }\r\n\r\n const altProfilesWOTaxes = alternateProfiles.filter((altProfile) => {\r\n return altProfile.alternateProfileType !== OvationsApi.Enums.AlternateProfileType.Tax;\r\n });\r\n\r\n const updatedTaxProfile: OvationsApi.Types.AlternateProfile = {\r\n ...replacementAddress,\r\n alternateProfileType: OvationsApi.Enums.AlternateProfileType.Tax,\r\n };\r\n\r\n return [...altProfilesWOTaxes, updatedTaxProfile];\r\n};\r\n\r\nexport const isTaxAddressPrimaryAddress = (\r\n profile: OvationsApi.Types.Customer | OvationsApi.Types.RegistrationRequest | null,\r\n) => {\r\n if (profile == null) {\r\n return false;\r\n }\r\n\r\n const taxAddress = getCustomerTaxAddress(profile);\r\n const primaryAddress = profile.address;\r\n\r\n if (taxAddress == null) {\r\n return false;\r\n }\r\n\r\n const evalArray = [\r\n taxAddress.address1 === primaryAddress.address1,\r\n taxAddress.address2 === primaryAddress.address2,\r\n taxAddress.city === primaryAddress.city,\r\n taxAddress.state === primaryAddress.state,\r\n taxAddress.zip === primaryAddress.zip,\r\n ];\r\n\r\n if (evalArray.indexOf(false) !== -1) {\r\n return false;\r\n }\r\n\r\n return true;\r\n};\r\n","import React from 'react';\r\nimport { StepComponentProps } from 'react-step-builder';\r\nimport * as OvationsApi from 'core/ovations-api';\r\nimport { Row, Col } from 'reactstrap';\r\n\r\nexport interface ClaimDetialStepProps extends StepComponentProps {\r\n renderPromoQuestions: (questions: OvationsApi.Types.PortalPromotionQuestion[]) => JSX.Element[];\r\n renderTermsAndConditions: (heading: string | undefined, termsAndConditions: string) => JSX.Element | undefined;\r\n}\r\n\r\nexport const ClaimDetailsStep: React.FC = (props): React.ReactElement => {\r\n return (\r\n \r\n \r\n {props.renderPromoQuestions}\r\n {props.renderTermsAndConditions}\r\n \r\n \r\n );\r\n};\r\n","import React from 'react';\r\nimport { StepComponentProps } from 'react-step-builder';\r\nimport { Col, Row } from 'reactstrap';\r\n\r\nexport interface CustomerInfoStepProps extends StepComponentProps {\r\n name?: string;\r\n renderUserInfo: () => JSX.Element;\r\n}\r\n\r\nexport const CustomerInfoStep: React.FC = (props): React.ReactElement => {\r\n return (\r\n \r\n \r\n {props.renderUserInfo}\r\n \r\n \r\n );\r\n};\r\n","import React from 'react';\r\nimport { StepComponentProps } from 'react-step-builder';\r\nimport { Col, Row } from 'reactstrap';\r\n\r\nexport interface CustomerInfoReviewStepProps extends StepComponentProps {\r\n name?: string;\r\n renderUserInfo: () => JSX.Element;\r\n}\r\n\r\nexport const CustomerInfoReviewStep: React.FC = (props): React.ReactElement => {\r\n return (\r\n \r\n \r\n {props.renderUserInfo}\r\n \r\n \r\n );\r\n};\r\n","import React from 'react';\r\nimport { StepComponentProps } from 'react-step-builder';\r\nimport { JSXElement } from '@babel/types';\r\nimport { Row, Col } from 'reactstrap';\r\n\r\nexport interface PurchaseStepProps extends StepComponentProps {\r\n name?: string;\r\n renderSelectClaimType: () => JSXElement;\r\n}\r\n\r\nexport const PurchaseTypeStep: React.FC = (props): React.ReactElement => {\r\n return (\r\n \r\n \r\n {props.renderSelectClaimType}\r\n \r\n \r\n );\r\n};\r\n","import React from 'react';\r\nimport { StepComponentProps } from 'react-step-builder';\r\nimport { Row, Col } from 'reactstrap';\r\n\r\nexport interface RewardOptionStepProps extends StepComponentProps {\r\n renderAvailibleRewards: () => JSX.Element;\r\n renderESignDisclosure: (eSignAgreementUrl: string | undefined) => JSX.Element | undefined;\r\n renderAlternatePayeeForm: (hasAlternatePayee: boolean) => JSX.Element | undefined;\r\n}\r\n\r\nexport const RewardOptionsStep: React.FC = (props): React.ReactElement => {\r\n return (\r\n \r\n \r\n {props.renderAvailibleRewards}\r\n {props.renderAlternatePayeeForm}\r\n {props.renderESignDisclosure}\r\n \r\n \r\n );\r\n};\r\n","import React from 'react';\r\nimport { StepComponentProps } from 'react-step-builder';\r\nimport { Row, Col } from 'reactstrap';\r\n\r\nexport interface RewardOptionSelectionStepProps extends StepComponentProps {\r\n renderAvailibleRewards: () => JSX.Element;\r\n renderESignDisclosure: (eSignAgreementUrl: string | undefined) => JSX.Element | undefined;\r\n renderAlternatePayeeForm: (hasAlternatePayee: boolean) => JSX.Element | undefined;\r\n renderRewardOptions: () => JSX.Element;\r\n}\r\n\r\nexport const RewardOptionSelectionStep: React.FC = (props): React.ReactElement => {\r\n return (\r\n \r\n \r\n {props.renderRewardOptions}\r\n \r\n \r\n );\r\n};\r\n","import React, { useEffect } from 'react';\r\nimport { NavigationComponentProps } from 'react-step-builder';\r\nimport * as routes from 'config/routes';\r\nimport { Link } from 'react-router-dom';\r\nimport FAIcon from 'core/ovations-components/FAIcon';\r\nimport { faCircleNotch } from '@fortawesome/free-solid-svg-icons';\r\nimport { Button } from 'reactstrap';\r\nimport { LocalizedMessage } from 'core/l10n/components';\r\nimport elements from 'config/elements';\r\n\r\n// Add any extra props here\r\nexport interface NavProps extends NavigationComponentProps {\r\n isSaving: boolean;\r\n validateForm: () => boolean;\r\n submitAccount: () => Promise;\r\n addressWasUpdated: boolean;\r\n setAddressWasUpdated: (updated: boolean) => void;\r\n reviewInformationPage: boolean;\r\n}\r\n\r\nexport const StepNavigation = (props: NavProps): JSX.Element => {\r\n const { addressWasUpdated, allSteps, current, next, setAddressWasUpdated, reviewInformationPage } = props;\r\n useEffect(() => {\r\n if (current === allSteps.length - 1 && reviewInformationPage) {\r\n if (addressWasUpdated) {\r\n setAddressWasUpdated(false);\r\n next();\r\n }\r\n }\r\n }, [addressWasUpdated, allSteps, current, next, setAddressWasUpdated, reviewInformationPage]);\r\n\r\n const renderCancelAndReturnToDash = () => {\r\n return (\r\n \r\n \r\n \r\n );\r\n };\r\n\r\n const onClickNextHandler = async () => {\r\n if (props.validateForm()) {\r\n if (props.current === props.allSteps.length - 1 && reviewInformationPage) {\r\n if (!props.addressWasUpdated) {\r\n await props.submitAccount();\r\n } else {\r\n props.next();\r\n }\r\n } else {\r\n props.next();\r\n }\r\n window.scrollTo(0, 0);\r\n }\r\n };\r\n\r\n const renderPrimaryButton = () => {\r\n if (props.current < props.allSteps.length) {\r\n return (\r\n \r\n \r\n \r\n \r\n {props.isSaving && (\r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n }\r\n\r\n if (props.current === props.allSteps.length) {\r\n return (\r\n \r\n {props.isSaving ? (\r\n \r\n \r\n \r\n \r\n \r\n \r\n ) : (\r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n }\r\n };\r\n\r\n const renderSecondaryButton = () => {\r\n if (props.current === 1) {\r\n return renderCancelAndReturnToDash();\r\n }\r\n\r\n return (\r\n {\r\n props.prev();\r\n window.scrollTo(0, 0);\r\n }}\r\n >\r\n \r\n \r\n );\r\n };\r\n\r\n return (\r\n
\r\n
\r\n {renderSecondaryButton()}\r\n {renderPrimaryButton()}\r\n
\r\n
\r\n );\r\n};\r\n","enum ContactMethods {\r\n Phone = 'contactMethods_phone',\r\n Email = 'contactMethods_email',\r\n}\r\n\r\nexport default ContactMethods;\r\n","import React from 'react';\r\nimport { CircularProgressbar } from 'react-circular-progressbar';\r\nimport 'react-circular-progressbar/dist/styles.css';\r\nimport { NavigationComponentProps } from 'react-step-builder';\r\nimport { Row, Col } from 'reactstrap';\r\nimport { L10nConsumer, LocalizedMessage, L10nMessages } from 'core/l10n/components';\r\n\r\nexport interface ProgressProps extends NavigationComponentProps {\r\n name?: string;\r\n claimNumber: string | undefined;\r\n}\r\n\r\nexport const ProgressWrapper: React.FC = ({ current, allSteps, name, claimNumber }) => {\r\n const currentStep = allSteps.find((step) => step.order === current);\r\n\r\n const getNextStep = () => {\r\n let nextStep = null;\r\n if (currentStep) {\r\n const index = allSteps.indexOf(currentStep);\r\n if (index !== undefined) {\r\n if (index + 1 <= allSteps.length) {\r\n nextStep = allSteps[index + 1];\r\n }\r\n }\r\n }\r\n return nextStep;\r\n };\r\n\r\n const nextStep = getNextStep();\r\n\r\n return (\r\n \r\n {(l10n) => (\r\n <>\r\n \r\n \r\n {allSteps && (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n {currentStep && }\r\n \r\n \r\n \r\n \r\n {nextStep ? (\r\n
\r\n :{' '}\r\n {' '}\r\n
\r\n ) : (\r\n ''\r\n )}\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
{name}
\r\n {claimNumber && (\r\n
\r\n {claimNumber}\r\n
\r\n )}\r\n
\r\n \r\n
\r\n \r\n )}\r\n
\r\n );\r\n};\r\n","import React from 'react';\r\nimport { Steps, Step, NavigationComponentProps } from 'react-step-builder';\r\nimport * as OvationsApi from 'core/ovations-api';\r\nimport * as OvationsPortalApi from 'ovations-portal-api';\r\nimport { uniq } from 'lodash';\r\nimport { RewardCalculationType } from 'core/ovations-api/enums';\r\nimport FormConfigType from 'enums/FormConfigType';\r\nimport { ClaimDetailsStep } from './ClaimDetailsStep';\r\nimport { CustomerInfoStep } from './CustomerInfoStep';\r\nimport { CustomerInfoReviewStep } from './CustomerInfoReviewStep';\r\nimport { PurchaseTypeStep } from './PurchaseTypeStep';\r\nimport { RewardOptionsStep } from './RewardOptionsStep';\r\nimport { RewardOptionSelectionStep } from './RewardOptionSelectionStep';\r\nimport { StepNavigation } from './StepNavigation';\r\nimport { ClaimSteps } from '../StepEnums';\r\nimport { ProgressWrapper } from '../ProgressWrapper';\r\n\r\nexport interface NavigationConfig {\r\n component: (props: NavigationComponentProps) => JSX.Element;\r\n location?: 'before' | 'after';\r\n}\r\n\r\nexport interface StepsConfig {\r\n navigation: NavigationConfig;\r\n before: (props: NavigationComponentProps) => JSX.Element;\r\n}\r\n\r\nexport interface ClaimFormStepsProps {\r\n activePromotion: OvationsPortalApi.Types.Promotion;\r\n renderPromoQuestions: (questions: OvationsApi.Types.PortalPromotionQuestion[]) => JSX.Element[];\r\n renderTermsAndConditions: (heading: string | undefined, termsAndConditions: string) => JSX.Element | undefined;\r\n renderESignDisclosure: (eSignAgreementUrl: string | undefined) => JSX.Element | undefined;\r\n renderAccountInformation: (isForReview: boolean) => JSX.Element;\r\n renderAlternatePayeeForm: (hasAlternatePayee: boolean) => JSX.Element | undefined;\r\n renderAvailibleRewards: () => JSX.Element;\r\n renderSelectClaimType: () => JSX.Element;\r\n renderRewardOptions: () => JSX.Element;\r\n isSavingChanges: boolean;\r\n isEdit: boolean;\r\n claimNumber: string | undefined;\r\n validateForm: () => boolean;\r\n submitAccount: () => Promise;\r\n selectedFormConfigType: FormConfigType;\r\n customerWillReceiveVirtualReward: boolean | null;\r\n addressWasUpdated: boolean;\r\n setAddressWasUpdated: (updated: boolean) => void;\r\n reviewInformationPage: boolean;\r\n renderRewardsErrorBanner?: (banner: JSX.Element) => JSX.Element;\r\n}\r\n\r\nexport const ClaimFormSteps: React.FC = (props): React.ReactElement => {\r\n const {\r\n name,\r\n rewardCalculations,\r\n questions,\r\n eSignAgreementUrl,\r\n termsAndConditionsHeading,\r\n termsAndConditions,\r\n rewardPrefundEnabled,\r\n hasAlternatePayee,\r\n } = props.activePromotion;\r\n\r\n const isForPrefund = rewardPrefundEnabled && props.selectedFormConfigType === FormConfigType.Prefund;\r\n const questionsForFormConfigType = questions.filter((q) => q.isForPreFund === isForPrefund);\r\n const renderEsign = props.customerWillReceiveVirtualReward === true && eSignAgreementUrl;\r\n\r\n // always have this step\r\n const steps = [\r\n ,\r\n ];\r\n\r\n if (props.reviewInformationPage) {\r\n steps.push(\r\n ,\r\n );\r\n }\r\n\r\n if (hasAlternatePayee || rewardCalculations.some((r) => r.type === RewardCalculationType.Choice) || renderEsign) {\r\n steps.unshift(\r\n ,\r\n );\r\n }\r\n\r\n if (rewardCalculations.some((r) => r.rewardPackages.length > 1)) {\r\n steps.unshift(\r\n ,\r\n );\r\n }\r\n\r\n if (questions.length > 0) {\r\n steps.unshift(\r\n ,\r\n );\r\n }\r\n\r\n if (rewardPrefundEnabled && !props.isEdit) {\r\n steps.unshift(\r\n ,\r\n );\r\n }\r\n\r\n const stepsConfig = {\r\n navigation: {\r\n // you can add extra custom props into StepNavigation. Just update the interface too\r\n component: (navProps: NavigationComponentProps) => (\r\n \r\n ),\r\n location: 'after',\r\n } as NavigationConfig,\r\n before: (progressProps: NavigationComponentProps) => (\r\n \r\n ),\r\n } as StepsConfig;\r\n\r\n return {uniq(steps).map((step) => step)};\r\n};\r\n","import { faCheckCircle, faCircle, faTimesCircle } from '@fortawesome/free-solid-svg-icons';\r\nimport classNames from 'classnames';\r\nimport React from 'react';\r\nimport { Button, Input, InputGroup, InputGroupText, Label, Row } from 'reactstrap';\r\n\r\nimport ValidatedFormGroup, { InputStatus } from 'components/ValidatedFormGroup';\r\nimport elements from 'config/elements';\r\nimport { EMAIL_ADDRESS, newPasswordValidationRules, PASSWORD_WITH_ONEUPPERCASE_ONENUMBER } from 'core/config/patterns';\r\nimport { L10nContext, LocalizedMessage } from 'core/l10n/components';\r\nimport * as OvationsApi from 'core/ovations-api';\r\nimport FAIcon from 'core/ovations-components/FAIcon';\r\n\r\nexport interface ProfileAccountInformationCardProps {\r\n inputStatuses: { [name: string]: InputStatus };\r\n isEditProfile: boolean;\r\n l10n: L10nContext;\r\n onChange: (profile: OvationsApi.Types.RegistrationRequest) => void;\r\n onStatusChange: (name: string) => (inputStatus: InputStatus) => void;\r\n portal: OvationsApi.Types.Portal;\r\n profile: OvationsApi.Types.RegistrationRequest;\r\n registrationErrors: OvationsApi.Types.ErrorSummary;\r\n toggleChangePassword?: () => void;\r\n displayForReview: boolean;\r\n}\r\n\r\nexport interface ProfileAccountInformationCardState {\r\n showPassword: boolean;\r\n passwordFieldLostFocus: boolean;\r\n}\r\n\r\nexport default class ProfileAccountInformationCard extends React.Component<\r\n ProfileAccountInformationCardProps,\r\n ProfileAccountInformationCardState\r\n> {\r\n passwordInput: HTMLInputElement | HTMLTextAreaElement | null;\r\n\r\n displayForReviewClassName = this.props.displayForReview ? 'input-readonly' : '';\r\n\r\n constructor(props: ProfileAccountInformationCardProps) {\r\n super(props);\r\n\r\n this.state = {\r\n showPassword: false,\r\n passwordFieldLostFocus: false,\r\n };\r\n\r\n this.getIconAndClassnames = this.getIconAndClassnames.bind(this);\r\n this.togglePasswordFieldFocus = this.togglePasswordFieldFocus.bind(this);\r\n this.toggleShowPassword = this.toggleShowPassword.bind(this);\r\n }\r\n\r\n componentDidUpdate() {\r\n if (this.passwordInput) {\r\n const validationMessage = this.passwordMatchesLogin() ? 'invalid' : '';\r\n this.passwordInput.setCustomValidity(validationMessage);\r\n }\r\n }\r\n\r\n onEmailChange: React.ChangeEventHandler = (e) => {\r\n const { name, value } = e.currentTarget;\r\n const { props } = this;\r\n const updates = {\r\n preferredEmail: value,\r\n [name]: value,\r\n };\r\n\r\n props.onChange({ ...props.profile, ...updates });\r\n };\r\n\r\n onInputChange: React.ChangeEventHandler = (e) => {\r\n const { name, value } = e.currentTarget;\r\n const { props } = this;\r\n\r\n props.onChange({ ...props.profile, [name]: value });\r\n };\r\n\r\n getIconAndClassnames(isPatternMatching: boolean) {\r\n const classes = ['d-block'];\r\n let icon = faCircle;\r\n if (isPatternMatching) {\r\n icon = faCheckCircle;\r\n classes.push('valid-feedback');\r\n } else if (this.state.passwordFieldLostFocus) {\r\n classes.push('invalid-feedback');\r\n icon = faTimesCircle;\r\n } else {\r\n classes.push('grey-feedback');\r\n }\r\n return {\r\n icon,\r\n classes: classes.join(' '),\r\n };\r\n }\r\n\r\n canChangePassword() {\r\n const { portal } = this.props;\r\n return (\r\n (!portal.openIdEnabled && !portal.disableManualProfileCreation) ||\r\n (portal.disableManualProfileCreation && portal.enablePasswordRequired)\r\n );\r\n }\r\n\r\n passwordMatchesLogin(): boolean {\r\n const { profile } = this.props;\r\n return profile.password.toLowerCase() === profile.email.toLowerCase();\r\n }\r\n\r\n toggleShowPassword() {\r\n this.setState((prevState: ProfileAccountInformationCardState) => ({\r\n showPassword: !prevState.showPassword,\r\n }));\r\n }\r\n\r\n togglePasswordFieldFocus() {\r\n this.setState({\r\n passwordFieldLostFocus: true,\r\n });\r\n }\r\n\r\n renderChangePasswordButton() {\r\n if (!this.canChangePassword() || this.props.displayForReview) {\r\n return;\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 renderPasswordFields(l10n: L10nContext) {\r\n const { props } = this;\r\n const passwordMatchesEmail = this.passwordMatchesLogin();\r\n return (\r\n
\r\n \r\n \r\n\r\n \r\n (this.passwordInput = input)}\r\n type={this.state.showPassword ? 'text' : 'password'}\r\n id=\"password\"\r\n name=\"password\"\r\n placeholder={l10n.localizeMessage('profileEditCreate_placeholder_password')}\r\n required\r\n value={props.profile.password}\r\n onChange={this.onInputChange}\r\n onBlur={this.togglePasswordFieldFocus}\r\n pattern={PASSWORD_WITH_ONEUPPERCASE_ONENUMBER}\r\n autoComplete=\"new-password\"\r\n className={classNames('form-control', this.displayForReviewClassName)}\r\n />\r\n \r\n {!this.state.showPassword ? (\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n \r\n\r\n {newPasswordValidationRules.map((vr, index) => {\r\n const re = new RegExp(vr.pattern);\r\n const result = re.test(this.props.profile.password);\r\n const { icon, classes } = this.getIconAndClassnames(result);\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 renderDealerNumberField() {\r\n const { props } = this;\r\n const { dealerRegistrationFieldLabel } = props.portal;\r\n const dealerNumErrors = props.registrationErrors.dealerRegistration;\r\n return (\r\n
\r\n
\r\n \r\n \r\n 0,\r\n })}\r\n disabled={this.props.isEditProfile}\r\n />\r\n {dealerNumErrors && dealerNumErrors.length > 0 ? (\r\n \r\n \r\n \r\n ) : (\r\n \r\n \r\n \r\n )}\r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n renderEmailFields() {\r\n const { props } = this;\r\n const { l10n } = 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 render() {\r\n const { props } = this;\r\n const { l10n } = props;\r\n\r\n return (\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n {this.renderEmailFields()}\r\n {!props.isEditProfile && this.renderPasswordFields(l10n)}\r\n \r\n {props.isEditProfile && this.renderChangePasswordButton()}\r\n {props.portal.dealerRegistrationEnabled && this.renderDealerNumberField()}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n","import React from 'react';\r\nimport { Input, Label } from 'reactstrap';\r\n\r\nimport ValidatedFormGroup, { InputStatus } from 'components/ValidatedFormGroup';\r\nimport elements from 'config/elements';\r\nimport { countryConfigs } from 'core/config/addresses';\r\nimport CountryCode from 'core/enums/CountryCode';\r\nimport { L10nContext, LocalizedMessage } from 'core/l10n/components';\r\nimport * as OvationsApi from 'core/ovations-api';\r\nimport { ProfileFieldType } from 'core/ovations-api/enums';\r\nimport * as OvationsPortalApi from 'ovations-portal-api';\r\nimport { doesStringContainSpecialCharacters } from 'core/util/strings';\r\n\r\nexport interface ProfileAddressInfoCardProps {\r\n appSettings: OvationsPortalApi.Types.AppSettings;\r\n inputStatuses: { [name: string]: InputStatus };\r\n isEditProfile: boolean;\r\n l10n: L10nContext;\r\n onAddressChange: (event: React.ChangeEvent) => void;\r\n onStatusChange: (name: string) => (inputStatus: InputStatus) => void;\r\n portal: OvationsApi.Types.Portal;\r\n profile: OvationsApi.Types.RegistrationRequest;\r\n isProfileFieldEditable: (profileFieldType: OvationsApi.Enums.ProfileFieldType) => boolean;\r\n displayForReview: boolean;\r\n rewardPackageTypes?: OvationsApi.Enums.RewardPackageType[];\r\n}\r\n\r\ninterface ProfileAddressInfoCardState {\r\n address1Valid: boolean;\r\n address2Valid: boolean;\r\n cityValid: boolean;\r\n}\r\n\r\nexport default class ProfileAddressInfoCard extends React.Component<\r\n ProfileAddressInfoCardProps,\r\n ProfileAddressInfoCardState\r\n> {\r\n displayForReviewClassName = this.props.displayForReview ? 'input-readonly' : '';\r\n\r\n constructor(props: ProfileAddressInfoCardProps) {\r\n super(props);\r\n this.state = {\r\n address1Valid: true, // Initial state\r\n address2Valid: true, // Initial state\r\n cityValid: true, // Initial state\r\n };\r\n }\r\n\r\n handleAddressChange = (e: React.FocusEvent) => {\r\n const { props } = this;\r\n const { name, value } = e.target;\r\n\r\n let valid = !this.hasSpecialCharacters(value);\r\n\r\n if (name === 'address1') {\r\n this.setState({ address1Valid: valid });\r\n } else if (name === 'address2') {\r\n this.setState({ address2Valid: valid });\r\n } else if (name === 'city') {\r\n const hasNumbers = /\\d/.test(value);\r\n valid = valid && !hasNumbers;\r\n this.setState({ cityValid: valid });\r\n }\r\n\r\n // setting the customValidity string here to something other than '' will cause the\r\n // checkValidity to fail (containers\\profile\\ProfileEditContainer).\r\n e.target.setCustomValidity(valid ? '' : 'Error');\r\n\r\n // do the addressChange function that was passed in.\r\n props.onAddressChange(e);\r\n };\r\n\r\n hasSpecialCharacters(value: string) {\r\n return doesStringContainSpecialCharacters(value);\r\n }\r\n\r\n isFieldReadOnly(fieldType: ProfileFieldType): boolean {\r\n const { props } = this;\r\n if (this.props.isEditProfile) {\r\n return !props.isProfileFieldEditable(fieldType);\r\n }\r\n return false;\r\n }\r\n\r\n renderAddressErrorMessage(elementId: string) {\r\n // making a variable 'message' and dynamically putting a string didn't work, got type errors.\r\n const { address } = this.props.profile;\r\n\r\n switch (elementId) {\r\n case elements.createNewProfile.id.address1:\r\n if (!address.address1) {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n if (!this.state.address1Valid) {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n break;\r\n case elements.createNewProfile.id.address2:\r\n if (!this.state.address2Valid) {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n break;\r\n case elements.createNewProfile.id.city:\r\n if (!address.city) {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n if (!this.state.cityValid) {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n break;\r\n }\r\n }\r\n\r\n renderAddress1Input() {\r\n const { props } = this;\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n {this.renderAddressErrorMessage(elements.createNewProfile.id.address1)}\r\n \r\n
\r\n );\r\n }\r\n\r\n renderAddress2Input() {\r\n const { props } = this;\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n {this.renderAddressErrorMessage(elements.createNewProfile.id.address2)}\r\n \r\n
\r\n );\r\n }\r\n\r\n render() {\r\n const { props } = this;\r\n const currentCountry = props.profile.address.country as CountryCode;\r\n const stateName =\r\n (currentCountry &&\r\n countryConfigs[currentCountry].subdivisions.find(\r\n (division) => division.abbreviation === this.props.profile.address.state,\r\n )) ||\r\n null;\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 {!this.props.displayForReview && (\r\n
\r\n \r\n \r\n {this.props.appSettings.enabledCountries.map((country) => (\r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n
\r\n )}\r\n {this.props.displayForReview &&
{this.props.profile.address.country}
}\r\n \r\n
\r\n {this.renderAddress1Input()}\r\n {this.renderAddress2Input()}\r\n
\r\n \r\n \r\n \r\n {this.renderAddressErrorMessage(elements.createNewProfile.id.city)}\r\n \r\n
\r\n
\r\n \r\n \r\n\r\n {!this.props.displayForReview && (\r\n
\r\n \r\n \r\n {currentCountry &&\r\n countryConfigs[currentCountry].subdivisions.map((subdiv) => (\r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n
\r\n )}\r\n {this.props.displayForReview &&
{stateName && stateName.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","import React from 'react';\r\n\r\nimport ValidatedFormGroup, { InputStatus } from 'components/ValidatedFormGroup';\r\nimport elements from 'config/elements';\r\nimport { EMAIL_ADDRESS, US_PHONE_MASK, PHONE_MASKED_PATTERN } from 'core/config/patterns';\r\nimport { LocalizedMessage } from 'core/l10n/components';\r\nimport { DEFAULT_LOCALE, SupportedLocale } from 'core/l10n/locales';\r\nimport { L10nContext, L10nMessages } from 'core/l10n/types';\r\nimport * as OvationsApi from 'core/ovations-api';\r\nimport * as OvationsPortalApi from 'ovations-portal-api';\r\nimport { FormGroup, Input, Label } from 'reactstrap';\r\nimport MaskedInput from 'react-text-mask';\r\nimport classNames from 'classnames';\r\n\r\nexport interface ProfileCommPreferencesProps {\r\n appSettings: OvationsPortalApi.Types.AppSettings;\r\n inputStatuses: { [name: string]: InputStatus };\r\n l10n: L10nContext;\r\n onChange: (profile: OvationsApi.Types.RegistrationRequest) => void;\r\n onStatusChange: (name: string) => (inputStatus: InputStatus) => void;\r\n portal: OvationsApi.Types.Portal;\r\n profile: OvationsApi.Types.RegistrationRequest;\r\n isCommunicationFieldEditable: (\r\n communicationFieldType: OvationsApi.Enums.CommunicationPreferenceFieldType,\r\n ) => boolean;\r\n displayForReview: boolean;\r\n}\r\n\r\nexport default class ProfileCommPreferences extends React.Component {\r\n displayForReviewClassName = this.props.displayForReview ? 'input-readonly' : '';\r\n\r\n onInputChange: React.ChangeEventHandler = (e) => {\r\n const { name, value } = e.currentTarget;\r\n const { props } = this;\r\n\r\n props.onChange({ ...props.profile, [name]: value });\r\n };\r\n\r\n onCheckboxChange: React.ChangeEventHandler = (e) => {\r\n const { name, checked } = e.currentTarget;\r\n const { props } = this;\r\n\r\n props.onChange({ ...props.profile, [name]: checked });\r\n };\r\n\r\n handlePreferredPhoneNumberChange: React.ChangeEventHandler = (event) => {\r\n let { value } = event.currentTarget;\r\n\r\n // must strip out non numeric characters\r\n value = value.replace(/\\D/g, '');\r\n\r\n // remove the hardcoded 1 if there is nothing else\r\n if (value === '1') {\r\n value = '';\r\n }\r\n\r\n this.props.onChange({\r\n ...this.props.profile,\r\n [event.currentTarget.name]: value,\r\n });\r\n };\r\n\r\n renderPreferredMethodOfContact() {\r\n const { props } = this;\r\n const { profile } = this.props;\r\n\r\n return (\r\n
\r\n \r\n \r\n\r\n {!this.props.displayForReview && (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n )}\r\n {this.props.displayForReview &&
{profile.preferredContactMethod}
}\r\n \r\n
\r\n );\r\n }\r\n\r\n renderPreferredEmailAddress = () => {\r\n const { props } = this;\r\n const { profile } = this.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 renderPreferredPhoneNumber = () => {\r\n const { props } = this;\r\n const { profile } = this.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 renderEnableFutureOptIns(numPrecedingFields: number) {\r\n const { portal, profile } = this.props;\r\n return (\r\n
\r\n \r\n {numPrecedingFields % 3 !== 0 && }\r\n \r\n \r\n
\r\n );\r\n }\r\n\r\n renderPreferredLanguage() {\r\n const { props } = this;\r\n const localeNameKey: { [K in SupportedLocale]: keyof L10nMessages } = {\r\n [SupportedLocale.enUS]: 'profileEditCreate_preferredLanguageOption_en-US',\r\n [SupportedLocale.esUS]: 'profileEditCreate_preferredLanguageOption_es-US',\r\n [SupportedLocale.frCA]: 'profileEditCreate_preferredLanguageOption_fr-CA',\r\n [SupportedLocale.frFR]: 'profileEditCreate_preferredLanguageOption_fr-FR',\r\n };\r\n\r\n const { profile, appSettings } = props;\r\n const enabledLanguages = [DEFAULT_LOCALE, ...appSettings.enabledLanguages];\r\n const languageOptions = enabledLanguages.map((locale) => {\r\n return {\r\n locale,\r\n localeNameRendered: props.l10n.localizeMessage(localeNameKey[locale]),\r\n };\r\n });\r\n const preferredLanguage = languageOptions.find((locale) => locale.locale === profile.preferredLanguage) || null;\r\n\r\n return (\r\n
\r\n \r\n \r\n\r\n {!this.props.displayForReview && (\r\n
\r\n \r\n {languageOptions\r\n .sort((a, b) => {\r\n return a.localeNameRendered.localeCompare(b.localeNameRendered);\r\n })\r\n .map((languageOption, key) => {\r\n return (\r\n // eslint-disable-next-line react/no-array-index-key\r\n \r\n );\r\n })}\r\n \r\n \r\n \r\n \r\n
\r\n )}\r\n {this.props.displayForReview && (\r\n
{(preferredLanguage && preferredLanguage.localeNameRendered) || DEFAULT_LOCALE}
\r\n )}\r\n \r\n
\r\n );\r\n }\r\n\r\n render() {\r\n const { appSettings, portal } = this.props;\r\n const availableFields: JSX.Element[] = [];\r\n if (appSettings.enabledLanguages.length > 0) {\r\n availableFields.push(this.renderPreferredLanguage());\r\n }\r\n if (portal.enableSms) {\r\n availableFields.push(this.renderPreferredMethodOfContact());\r\n availableFields.push(this.renderPreferredEmailAddress());\r\n availableFields.push(this.renderPreferredPhoneNumber());\r\n }\r\n if (portal.enableFutureOfferOptIn) {\r\n availableFields.push(this.renderEnableFutureOptIns(availableFields.length));\r\n }\r\n if (!availableFields.length) {\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
{availableFields}
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n","import { map } from 'lodash';\r\nimport React from 'react';\r\nimport { Card, CardBody, CardTitle, FormGroup, Input, Label } from 'reactstrap';\r\n\r\nimport { LocalizedMessage } from 'core/l10n/components';\r\nimport * as OvationsApi from 'core/ovations-api';\r\nimport CustomField from 'core/ovations-api/definitions/portal/CustomField';\r\n\r\nexport interface ProfileCustomFieldsProps {\r\n isEditProfile: boolean;\r\n portal: OvationsApi.Types.Portal;\r\n customFields?: CustomField[];\r\n customFieldValues?: { [customFieldKey: string]: string };\r\n}\r\n\r\nexport default class ProfileCustomFields extends React.Component {\r\n render() {\r\n if (!this.props.customFields || this.props.customFields.length < 1) {\r\n return null;\r\n }\r\n const { customFieldValues } = this.props;\r\n\r\n return (\r\n this.props.customFields && (\r\n \r\n \r\n \r\n \r\n \r\n
\r\n {map(this.props.customFields, (customField) => {\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","import { faLock, faQuestionCircle } from '@fortawesome/free-solid-svg-icons';\r\nimport React from 'react';\r\nimport MaskedInput from 'react-text-mask';\r\n\r\nimport classNames from 'classnames';\r\nimport moment from 'moment';\r\nimport { Input, Label } from 'reactstrap';\r\n\r\nimport ValidatedFormGroup, { InputStatus } from 'components/ValidatedFormGroup';\r\nimport elements from 'config/elements';\r\nimport { FIRST_NAME, FIRST_NAME_OR_LAST_NAME, US_PHONE_MASK, PHONE_MASKED_PATTERN } from 'core/config/patterns';\r\nimport CountryCode from 'core/enums/CountryCode';\r\nimport { L10nConsumer, LocalizedMessage } from 'core/l10n/components';\r\nimport { L10nContext } from 'core/l10n/types';\r\nimport * as OvationsApi from 'core/ovations-api';\r\nimport { ProfileFieldType } from 'core/ovations-api/enums';\r\nimport FAIcon from 'core/ovations-components/FAIcon';\r\nimport InfoIconTooltip from 'core/ovations-components/InfoIconTooltip';\r\nimport { DateTimePicker } from 'core/ovations-components/DateTimePicker';\r\nimport { dateTimeMaxDateOfBirth, dateTimeMinDateOfBirthPortal, MAX_AGE } from 'core/util/datetime';\r\nimport { selectors as accountSelectors } from 'redux-modules/account';\r\n\r\nexport interface PersonalInformationCardProps {\r\n hasReloadableCards: boolean;\r\n inputStatuses: { [name: string]: InputStatus };\r\n isEditProfile: boolean;\r\n l10n: L10nContext;\r\n onChange: (profile: OvationsApi.Types.RegistrationRequest) => void;\r\n onStatusChange: (name: string) => (inputStatus: InputStatus) => void;\r\n portal: OvationsApi.Types.Portal;\r\n profile: OvationsApi.Types.RegistrationRequest;\r\n hasPhoneNumberError?: boolean;\r\n isRequireDOBForGalileo?: boolean;\r\n isRequireSSNForGalileo?: boolean;\r\n isOtherSSNFocused?: boolean;\r\n onSSNFocus: (value: boolean) => void;\r\n getMaskedSSN: (value: string) => void;\r\n maskedSSNValue?: string;\r\n isProfileFieldEditable: (profileFieldType: OvationsApi.Enums.ProfileFieldType) => boolean;\r\n displayForReview?: boolean;\r\n isSSNValid: boolean;\r\n disableSSN: boolean;\r\n}\r\n\r\ninterface PersonalInformationCardState {\r\n isSSNFocused: boolean;\r\n}\r\n\r\nexport default class PersonalInformationCard extends React.Component<\r\n PersonalInformationCardProps,\r\n PersonalInformationCardState\r\n> {\r\n displayForReviewClassName = this.props.displayForReview ? 'input-readonly' : '';\r\n\r\n constructor(props: PersonalInformationCardProps) {\r\n super(props);\r\n\r\n this.state = {\r\n isSSNFocused: false,\r\n };\r\n }\r\n\r\n onDateOfBirthChange = (datetime: string | null) => {\r\n this.props.onChange({\r\n ...this.props.profile,\r\n dateOfBirth: datetime || undefined,\r\n });\r\n };\r\n\r\n onInputChange: React.ChangeEventHandler = (e) => {\r\n const { name, value } = e.currentTarget;\r\n const { props } = this;\r\n if (name === 'ssn') {\r\n if (value.indexOf('X') !== -1) {\r\n return;\r\n }\r\n this.props.getMaskedSSN(value);\r\n }\r\n props.onChange({ ...props.profile, [name]: value });\r\n };\r\n\r\n onPhoneChange: React.ChangeEventHandler = (e) => {\r\n let { value } = e.currentTarget;\r\n const { props } = this;\r\n\r\n // must strip out non numeric characters\r\n value = value.replace(/\\D/g, '');\r\n\r\n // remove the hardcoded 1 if there is nothing else\r\n if (value === '1') {\r\n value = '';\r\n }\r\n\r\n const updates = {\r\n preferredPhoneNumber: value,\r\n [e.currentTarget.name]: value,\r\n };\r\n\r\n props.onChange({ ...props.profile, ...updates });\r\n };\r\n\r\n updateSSNFocus(isFocused: boolean): void {\r\n this.setState({\r\n isSSNFocused: isFocused,\r\n });\r\n this.props.onSSNFocus(isFocused);\r\n }\r\n\r\n isFieldReadOnly(fieldType: ProfileFieldType): boolean {\r\n const { props } = this;\r\n if (this.props.isEditProfile) {\r\n return !props.isProfileFieldEditable(fieldType);\r\n }\r\n return false;\r\n }\r\n\r\n renderDateOfBirthInput(l10n: L10nContext) {\r\n const { props } = this;\r\n const requireDateOfBirth = props.hasReloadableCards || props.isRequireDOBForGalileo;\r\n const dateFormat = l10n.localizeDateFormat();\r\n\r\n const isDateOfBirthEmpty = this.props.profile.dateOfBirth == null || this.props.profile.dateOfBirth === '';\r\n\r\n // 43317 Require DOB information on registration if reloadable cards are configured\r\n return requireDateOfBirth ? (\r\n
\r\n \r\n \r\n {!this.props.displayForReview && (\r\n \r\n }\r\n />\r\n )}\r\n {this.props.displayForReview && (\r\n
{moment.utc(this.props.profile.dateOfBirth).format(dateFormat)}
\r\n )}\r\n \r\n
\r\n ) : null;\r\n }\r\n\r\n renderSSNInput() {\r\n const { props } = this;\r\n const { ssn } = props.profile;\r\n const ssnValue = ssn || '';\r\n const socialSecurityNumberUSAMask = [\r\n /(\\d)|(X)/,\r\n /(\\d)|(X)/,\r\n /(\\d)|(X)/,\r\n '-',\r\n /(\\d)|(X)/,\r\n /(\\d)|(X)/,\r\n '-',\r\n /\\d/,\r\n /\\d/,\r\n /\\d/,\r\n /\\d/,\r\n ];\r\n return (\r\n
\r\n \r\n \r\n
\r\n {\r\n this.updateSSNFocus(true);\r\n }}\r\n onBlur={() => {\r\n this.updateSSNFocus(false);\r\n }}\r\n value={\r\n this.state.isSSNFocused || this.props.isOtherSSNFocused\r\n ? ssnValue\r\n : this.props.maskedSSNValue\r\n }\r\n onChange={this.onInputChange}\r\n required\r\n />\r\n \r\n {() => (\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n {!props.isSSNValid && (\r\n \r\n )}\r\n
\r\n \r\n
\r\n );\r\n }\r\n\r\n render() {\r\n const { props } = this;\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 {this.renderDateOfBirthInput(props.l10n)}\r\n {props.profile.address.country === CountryCode.USA &&\r\n props.isRequireSSNForGalileo &&\r\n !props.disableSSN &&\r\n this.renderSSNInput()}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n","import classNames from 'classnames';\r\nimport React from 'react';\r\nimport MaskedInput from 'react-text-mask';\r\nimport { FormGroup, Input, Label, Row } from 'reactstrap';\r\n\r\nimport ValidatedFormGroup, { InputStatus } from 'components/ValidatedFormGroup';\r\nimport elements from 'config/elements';\r\nimport { countryConfigs, getStateNameByCode } from 'core/config/addresses';\r\nimport { FIRST_NAME_OR_LAST_NAME } from 'core/config/patterns';\r\nimport CountryCode from 'core/enums/CountryCode';\r\nimport { L10nConsumer, L10nContext, LocalizedMessage } from 'core/l10n/components';\r\nimport * as OvationsApi from 'core/ovations-api';\r\nimport AlternateProfile from 'core/ovations-api/definitions/address/AlternateProfile';\r\nimport InfoIconTooltip from 'core/ovations-components/InfoIconTooltip';\r\nimport { getCustomerTaxAddress, replaceTaxAddressWithAddress } from 'redux-modules/customer';\r\n\r\nexport interface ProfileTaxIncomeCardProps {\r\n inputStatuses: { [name: string]: InputStatus };\r\n isEditProfile: boolean;\r\n l10n: L10nContext;\r\n onChange: (profile: OvationsApi.Types.RegistrationRequest) => void;\r\n onMailingAsTaxToggle: (value: boolean) => void;\r\n onTaxAddressChange: (event: React.ChangeEvent) => void;\r\n onStatusChange: (name: string) => (inputStatus: InputStatus) => void;\r\n portal: OvationsApi.Types.Portal;\r\n profile: OvationsApi.Types.RegistrationRequest;\r\n userHasTaxData: boolean;\r\n mailingAddressEnabled: boolean;\r\n onSSNFocus: (value: boolean) => void;\r\n isOtherSSNFocused?: boolean;\r\n getMaskedSSN: (value: string, country?: string) => void;\r\n maskedSSNValue?: string;\r\n displayForReview: boolean;\r\n rewardPackageTypes?: OvationsApi.Enums.RewardPackageType[];\r\n isSSNValid: boolean;\r\n disableSSN: boolean;\r\n}\r\n\r\ninterface ProfileTaxIncomeCardState {\r\n isSSNFocused: boolean;\r\n}\r\n\r\nexport default class ProfileTaxIncomeCard extends React.Component<\r\n ProfileTaxIncomeCardProps,\r\n ProfileTaxIncomeCardState\r\n> {\r\n displayForReviewClassName = this.props.displayForReview ? 'input-readonly' : '';\r\n\r\n constructor(props: ProfileTaxIncomeCardProps) {\r\n super(props);\r\n this.state = {\r\n isSSNFocused: false,\r\n };\r\n }\r\n\r\n onInputChange: React.ChangeEventHandler = (e) => {\r\n const { name, value } = e.currentTarget;\r\n const { props } = this;\r\n if (name === 'ssn') {\r\n if (value.indexOf('X') !== -1) {\r\n return;\r\n }\r\n this.props.getMaskedSSN(value, this.props.profile.address.country);\r\n }\r\n\r\n props.onChange({ ...props.profile, [name]: value });\r\n };\r\n\r\n onMailingAddressToggle: React.ChangeEventHandler = (e) => {\r\n const { checked } = e.currentTarget;\r\n const { props } = this;\r\n\r\n const newAlternateProfileArray = replaceTaxAddressWithAddress(\r\n props.profile.alternateProfiles,\r\n props.profile.address,\r\n );\r\n\r\n // this.setState({ mailingAddressEnabled: checked });\r\n\r\n props.onMailingAsTaxToggle(checked);\r\n\r\n props.onChange({\r\n ...props.profile,\r\n alternateProfiles: newAlternateProfileArray,\r\n });\r\n };\r\n\r\n updateSSNFocus(isFocused: boolean): void {\r\n this.setState({\r\n isSSNFocused: isFocused,\r\n });\r\n this.props.onSSNFocus(isFocused);\r\n }\r\n\r\n private _getTaxAddress(regRequest: OvationsApi.Types.RegistrationRequest): AlternateProfile {\r\n const taxAddress = getCustomerTaxAddress(regRequest);\r\n\r\n if (taxAddress) {\r\n return taxAddress;\r\n }\r\n\r\n return {} as AlternateProfile;\r\n }\r\n\r\n renderTaxAddress1Input() {\r\n const { props } = this;\r\n const taxAddress = this._getTaxAddress(props.profile);\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n {!this.props.profile.address.address1 ? (\r\n \r\n ) : (\r\n ''\r\n )}\r\n \r\n \r\n
\r\n );\r\n }\r\n\r\n renderTaxAddress2Input() {\r\n const { props } = this;\r\n const taxAddress = this._getTaxAddress(props.profile);\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n\r\n renderSSNInput() {\r\n const { props } = this;\r\n const { address, ssn } = props.profile;\r\n const { country } = address;\r\n const ssnValue = ssn || '';\r\n const socialSecurityNumberUSAMask = [\r\n /(\\d)|(X)/,\r\n /(\\d)|(X)/,\r\n /(\\d)|(X)/,\r\n '-',\r\n /(\\d)|(X)/,\r\n /(\\d)|(X)/,\r\n '-',\r\n /\\d/,\r\n /\\d/,\r\n /\\d/,\r\n /\\d/,\r\n ];\r\n const socialSecurityNumberCANMask = [\r\n /(\\d)|(X)/,\r\n /(\\d)|(X)/,\r\n /(\\d)|(X)/,\r\n '-',\r\n /(\\d)|(X)/,\r\n /(\\d)|(X)/,\r\n /(\\d)|(X)/,\r\n '-',\r\n /\\d/,\r\n /\\d/,\r\n /\\d/,\r\n ];\r\n\r\n return (\r\n
\r\n \r\n \r\n {\r\n this.updateSSNFocus(true);\r\n }}\r\n onBlur={() => {\r\n this.updateSSNFocus(false);\r\n }}\r\n value={\r\n this.state.isSSNFocused || this.props.isOtherSSNFocused\r\n ? ssnValue\r\n : this.props.maskedSSNValue\r\n }\r\n onChange={this.onInputChange}\r\n required\r\n />\r\n \r\n {country === 'CAN' ? (\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n {!props.isSSNValid && }\r\n \r\n
\r\n );\r\n }\r\n\r\n renderTaxAddressCard() {\r\n const { props } = this;\r\n const taxAddress = this._getTaxAddress(props.profile);\r\n const currentCountry = props.profile.address.country as CountryCode;\r\n\r\n return (\r\n
\r\n {this.renderTaxAddress1Input()}\r\n {this.renderTaxAddress2Input()}\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n {!this.props.displayForReview && (\r\n
\r\n \r\n \r\n {currentCountry &&\r\n countryConfigs[currentCountry].subdivisions.map((subdiv) => (\r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n
\r\n )}\r\n {this.props.displayForReview && (\r\n
{getStateNameByCode(currentCountry, taxAddress.state)}
\r\n )}\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n render() {\r\n const { props } = this;\r\n const { address } = props.profile;\r\n const { country } = address;\r\n const MAX_LENGTH_LEGAL_NAME = 100;\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 {!props.disableSSN && this.renderSSNInput()}\r\n
\r\n {!props.mailingAddressEnabled && this.renderTaxAddressCard()}\r\n
\r\n );\r\n }\r\n}\r\n","import React from 'react';\r\n\r\nimport { InputStatus } from 'components/ValidatedFormGroup';\r\nimport { SOCIAL_SECURITY_NUMBER_CAN, SOCIAL_SECURITY_NUMBER_USA } from 'core/config/patterns';\r\nimport { L10nConsumer, L10nContext } from 'core/l10n/components';\r\nimport * as OvationsApi from 'core/ovations-api';\r\nimport { AlternateProfile } from 'core/ovations-api/definitions';\r\nimport CustomField from 'core/ovations-api/definitions/portal/CustomField';\r\nimport FieldControlOption from 'core/ovations-api/definitions/portal/FieldControlOption';\r\nimport * as OvationsPortalApi from 'ovations-portal-api';\r\nimport ProfileAccountInformationCard from './ProfileAccountInformationCard';\r\nimport ProfileAddressInfoCard from './ProfileAddressInformationCard';\r\nimport ProfileCommPreferences from './ProfileCommPreferenceCard';\r\nimport ProfileCustomFields from './ProfileCustomFields';\r\nimport PersonalInformationCard from './ProfilePersonalInformationCard';\r\nimport ProfileTaxIncomeCard from './ProfileTaxIncomeCard';\r\n\r\nexport interface ProfileFieldsProps {\r\n portal: OvationsApi.Types.Portal;\r\n profile: OvationsApi.Types.RegistrationRequest;\r\n registrationErrors: OvationsApi.Types.ErrorSummary;\r\n appSettings: OvationsPortalApi.Types.AppSettings;\r\n onChange: (profile: OvationsApi.Types.RegistrationRequest) => void;\r\n onMailingAsTaxToggle: (value: boolean) => void;\r\n isEditProfile?: boolean;\r\n toggleChangePassword?: () => void;\r\n hasReloadableCards: boolean;\r\n customFields?: CustomField[];\r\n customFieldValues?: { [customFieldKey: string]: string };\r\n createUserTaxData?: boolean;\r\n userHasTaxData?: boolean;\r\n useMailingAsTaxAddress?: boolean;\r\n directPhoneNumberError?: boolean;\r\n isRequireSSNForGalileo?: boolean;\r\n isRequireDOBForGalileo?: boolean;\r\n fieldControlOption?: FieldControlOption;\r\n displayCustomProfileFields?: boolean;\r\n isForReview?: boolean;\r\n rewardPackageTypes?: OvationsApi.Enums.RewardPackageType[];\r\n isTaxable: boolean;\r\n disableSSN: boolean;\r\n}\r\ninterface ProfileFieldsState {\r\n inputStatuses: { [name: string]: InputStatus };\r\n isOtherSSNFocused: boolean;\r\n maskedSSNValue: string;\r\n isSSNValid: boolean;\r\n}\r\n\r\nexport default class ProfileFields extends React.Component {\r\n constructor(props: ProfileFieldsProps) {\r\n super(props);\r\n const { country } = this.props.profile.address;\r\n this.state = {\r\n inputStatuses: {},\r\n isOtherSSNFocused: false,\r\n maskedSSNValue: this.generateMaskedSSNValue(this.props.profile.ssn || '', country),\r\n isSSNValid: true,\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n if (this.props.createUserTaxData && this.props.portal.enableTaxableIncomeForm) {\r\n const { props } = this;\r\n const { alternateProfiles } = props.profile;\r\n const clonedTaxAddress = {\r\n ...props.profile.address,\r\n alternateProfileType: OvationsApi.Enums.AlternateProfileType.Tax,\r\n };\r\n const updatedAltProfiles = alternateProfiles\r\n ? [...alternateProfiles, clonedTaxAddress]\r\n : [clonedTaxAddress];\r\n\r\n // Creates blank address, and legalName & ssn values so we don't get \"null input\" errors\r\n // May update this in the future\r\n props.onChange({\r\n ...props.profile,\r\n legalName: null,\r\n ssn: '',\r\n alternateProfiles: updatedAltProfiles,\r\n });\r\n }\r\n }\r\n\r\n onStatusChange = (name: string) => (inputStatus: InputStatus) => {\r\n const { inputStatuses } = this.state;\r\n this.setState({ inputStatuses: { ...inputStatuses, [name]: inputStatus } });\r\n };\r\n\r\n onAddressChange: React.ChangeEventHandler = (e) => {\r\n const { name, value } = e.currentTarget;\r\n const { props } = this;\r\n const COUNTRY_NAME = 'country';\r\n\r\n // Always update country for both tax address and mailing address when changed\r\n // if tax income form is enabled\r\n if (name === COUNTRY_NAME && props.portal.enableTaxableIncomeForm) {\r\n const updatedAltProfileArray = this._updateAltProfileTaxAddress(\r\n props.profile.alternateProfiles,\r\n name,\r\n value,\r\n );\r\n props.onChange({\r\n ...props.profile,\r\n address: {\r\n ...props.profile.address,\r\n [name]: value,\r\n },\r\n alternateProfiles: updatedAltProfileArray,\r\n });\r\n }\r\n\r\n props.onChange({\r\n ...props.profile,\r\n address: {\r\n ...props.profile.address,\r\n [name]: value,\r\n },\r\n });\r\n };\r\n\r\n onTaxAddressChange: React.ChangeEventHandler = (e) => {\r\n const { name, value } = e.currentTarget;\r\n const { props } = this;\r\n const { alternateProfiles } = props.profile;\r\n\r\n if (!alternateProfiles) {\r\n return;\r\n }\r\n\r\n const updatedAltProfileArray = this._updateAltProfileTaxAddress(alternateProfiles, name, value);\r\n\r\n props.onChange({\r\n ...props.profile,\r\n alternateProfiles: updatedAltProfileArray,\r\n });\r\n };\r\n\r\n isProfileFieldEditable = (profileFieldType: OvationsApi.Enums.ProfileFieldType) => {\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (!this.props.fieldControlOption!.coreFieldControlOptions) {\r\n return true;\r\n }\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n const field = this.props.fieldControlOption!.coreFieldControlOptions.find(\r\n (x) => x.fieldName === profileFieldType,\r\n );\r\n\r\n return field ? field.customerEdit : true;\r\n };\r\n\r\n isCommunicationFieldEditable = (communicationFieldType: OvationsApi.Enums.CommunicationPreferenceFieldType) => {\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (!this.props.fieldControlOption!.communicationPreferenceFieldControlOptions) {\r\n return true;\r\n }\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n const field = this.props.fieldControlOption!.communicationPreferenceFieldControlOptions.find(\r\n (x) => x.communicationPreferenceFieldType === communicationFieldType,\r\n );\r\n\r\n return field ? field.customerEdit : true;\r\n };\r\n\r\n onSSNFocus = (isFocused: boolean): void => {\r\n this.setState({\r\n isOtherSSNFocused: isFocused,\r\n });\r\n };\r\n\r\n generateMaskedSSNValue = (unmaskedSSN = '', country?: string) => {\r\n const sanitizedSSNValue = unmaskedSSN.split('-').join('');\r\n const MASKED_VALUE_TEMPLATE = country === 'CAN' ? 'XXX-XXX-' : 'XXX-XX-';\r\n const unmaskedSSNLength = sanitizedSSNValue.length;\r\n if (unmaskedSSN.length < MASKED_VALUE_TEMPLATE.length) {\r\n return MASKED_VALUE_TEMPLATE.substr(0, unmaskedSSNLength);\r\n }\r\n const maskedValue = `${\r\n MASKED_VALUE_TEMPLATE\r\n // Removes two from length to account for lack of hyphens in raw value\r\n }${sanitizedSSNValue.substr(MASKED_VALUE_TEMPLATE.length - 2, unmaskedSSNLength)}`;\r\n return maskedValue;\r\n };\r\n\r\n getMaskedSSN = (unmaskedSSN = '', country?: string) => {\r\n const maskedSSNValue = this.generateMaskedSSNValue(unmaskedSSN, country);\r\n let isSSNValid = new RegExp(SOCIAL_SECURITY_NUMBER_USA).test(unmaskedSSN);\r\n if (country === 'CAN') {\r\n isSSNValid = new RegExp(SOCIAL_SECURITY_NUMBER_CAN).test(unmaskedSSN);\r\n }\r\n\r\n this.setState({ maskedSSNValue, isSSNValid });\r\n };\r\n\r\n private _updateAltProfileTaxAddress(\r\n alternateProfiles: AlternateProfile[] = [],\r\n name: string,\r\n value: string,\r\n ): AlternateProfile[] {\r\n const taxAddress = alternateProfiles.find((altProfile) => {\r\n return altProfile.alternateProfileType === OvationsApi.Enums.AlternateProfileType.Tax;\r\n });\r\n\r\n if (!taxAddress) {\r\n return alternateProfiles;\r\n }\r\n\r\n const altProfilesWOTaxes = alternateProfiles.filter((altProfile) => {\r\n return altProfile.alternateProfileType !== OvationsApi.Enums.AlternateProfileType.Tax;\r\n });\r\n\r\n const updatedTaxProfile = {\r\n ...taxAddress,\r\n [name]: value,\r\n };\r\n\r\n return [...altProfilesWOTaxes, updatedTaxProfile];\r\n }\r\n\r\n renderAccountInformationCard(l10n: L10nContext) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n renderPersonalInformationCard(l10n: L10nContext) {\r\n const { props, state } = this;\r\n return (\r\n \r\n );\r\n }\r\n\r\n renderTaxableIncomeCard(l10n: L10nContext) {\r\n const { state, props } = this;\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n renderAddressInformationCard(l10n: L10nContext) {\r\n const { props, state } = this;\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n renderCommunicationPreferencesCard(l10n: L10nContext) {\r\n const { props, state } = this;\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n renderCustomProfileFields() {\r\n const { props } = this;\r\n return (\r\n \r\n );\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n \r\n {(l10n) => (\r\n <>\r\n {this.renderAccountInformationCard(l10n)}\r\n {this.renderPersonalInformationCard(l10n)}\r\n {this.renderAddressInformationCard(l10n)}\r\n {this.props.isTaxable && this.renderTaxableIncomeCard(l10n)}\r\n {this.renderCommunicationPreferencesCard(l10n)}\r\n {this.renderCustomProfileFields()}\r\n \r\n )}\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import { includes, memoize } from 'lodash';\r\nimport { Action } from 'redux';\r\nimport { ThunkAction } from 'redux-thunk';\r\nimport { createSelector } from 'reselect';\r\n\r\nimport createReducer from 'core/lib/createReducer';\r\nimport { RewardPackageType } from 'core/ovations-api/enums';\r\nimport * as PortalApi from 'ovations-portal-api';\r\nimport GlobalState from 'redux-modules/definitions/GlobalState';\r\nimport S from 'redux-modules/definitions/RootState';\r\n\r\ninterface LiveChatSettings {\r\n liveChatWidgetId: string;\r\n liveChatAppId: string;\r\n liveChatAppSecret: string;\r\n}\r\n\r\nexport const initialState: GlobalState = {\r\n portal: null,\r\n};\r\n\r\nconst { reducer, update } = createReducer('global/UPDATE', initialState);\r\nexport const globalReducer = reducer;\r\n\r\nexport const actions = {\r\n update,\r\n\r\n fetch(): ThunkAction, S, void, Action> {\r\n return async (dispatch) => {\r\n const portal = await PortalApi.Global.fetch();\r\n if (!portal) {\r\n return;\r\n }\r\n dispatch(update({ portal }));\r\n };\r\n },\r\n};\r\n\r\nexport const selectors = {\r\n getLiveChatSettings: memoize((global: GlobalState): LiveChatSettings | undefined => {\r\n if (!global.portal) {\r\n return;\r\n }\r\n const { liveChatWidgetId, liveChatAppId, liveChatAppSecret } = global.portal;\r\n if (global.portal.enableLiveChat && liveChatWidgetId && liveChatAppId && liveChatAppSecret) {\r\n return { liveChatWidgetId, liveChatAppId, liveChatAppSecret };\r\n }\r\n }),\r\n\r\n hasReloadableCards: createSelector(\r\n (global: GlobalState) => global.portal,\r\n (portal) => {\r\n if (!portal) {\r\n return false;\r\n }\r\n return (\r\n includes(portal.rewardPackageTypes, RewardPackageType.ReloadableCAN) ||\r\n includes(portal.rewardPackageTypes, RewardPackageType.ReloadableUSA) ||\r\n includes(portal.rewardPackageTypes, RewardPackageType.ReloadableUSAGalileo) ||\r\n includes(portal.rewardPackageTypes, RewardPackageType.ReloadableCANVisa)\r\n );\r\n },\r\n ),\r\n};\r\n","/* eslint-disable react/no-unused-state */\r\nimport React from 'react';\r\nimport { parsePath } from 'core/l10n/locales';\r\nimport * as OvationsPortalApi from 'ovations-portal-api';\r\nimport * as OvationsApi from 'core/ovations-api';\r\nimport { getCustomerTaxAddress, hasTaxInformation, replaceTaxAddressWithAddress } from 'redux-modules/customer';\r\nimport * as account from 'redux-modules/account';\r\nimport ContainerProps from 'containers/definitions/ContainerProps';\r\nimport { Comparison } from 'core/definitions/HasChangesSelector';\r\nimport AddressValidationModal from 'core/ovations-components/AddressValidationModal';\r\nimport { createSelector } from 'reselect';\r\nimport { AddressValidationResult, Customer } from 'core/ovations-api/definitions';\r\nimport { Button } from 'reactstrap';\r\nimport { LocalizedMessage } from 'core/l10n/components';\r\nimport ProfileFields, { ProfileFieldsProps } from 'components/profile/ProfileFields';\r\nimport * as global from 'redux-modules/global';\r\nimport FAIcon from 'core/ovations-components/FAIcon';\r\nimport { faCircleNotch } from '@fortawesome/free-solid-svg-icons';\r\nimport { isEqual } from 'lodash';\r\n\r\nexport interface ProfileContainerState {\r\n showAddressValidationModal: boolean;\r\n showTaxAddressValidationModal: boolean;\r\n useMailingAsTaxAddress: boolean;\r\n profile: OvationsApi.Types.RegistrationRequest;\r\n phoneNumberError: boolean;\r\n isSavingChangesAccount: boolean;\r\n wasValidatedAccount: boolean;\r\n}\r\n\r\nexport type ProfileFieldsOptions = Omit<\r\n ProfileFieldsProps,\r\n | 'profile'\r\n | 'onChange'\r\n | 'onMailingAsTaxToggle'\r\n | 'portal'\r\n | 'appSettings'\r\n | 'hasReloadableCards'\r\n | 'useMailingAsTaxAddress'\r\n>;\r\n\r\nexport interface WithProfileHandlerProps extends ContainerProps {\r\n openAddressValidationModal(): void;\r\n openTaxAddressValidationModal(): void;\r\n updateMailingAsTaxAddress(newValue: boolean): void;\r\n onCancelClick(): void;\r\n getProfile(): OvationsApi.Types.RegistrationRequest;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n transformProfileToRegistration: any;\r\n showAddressValidationModal: boolean;\r\n showTaxAddressValidationModal: boolean;\r\n useMailingAsTaxAddress: boolean;\r\n validateAddress: (address: OvationsApi.Types.Address) => Promise;\r\n profile: OvationsApi.Types.RegistrationRequest;\r\n updateProfile(profile: OvationsApi.Types.RegistrationRequest, callback?: () => void): void;\r\n renderTaxAddressValidationModal(saveChangesCallback: () => void): JSX.Element | undefined;\r\n renderAddressValidationModal(saveChangesCallback: () => void): JSX.Element | undefined;\r\n phoneNumberError: boolean;\r\n validatePhoneNumber(phoneNumber: string | null): boolean;\r\n isSavingChangesAccount: boolean;\r\n updateIsAccountSaving(isAccountSaving: boolean): void;\r\n wasValidatedAccount: boolean;\r\n updateValidatedAccount(isValid: boolean, callback?: () => void): void;\r\n transformRegistrationToProfile(registrationRequest: OvationsApi.Types.RegistrationRequest): Customer;\r\n hasChanges(): boolean;\r\n onKeyDown(e: React.KeyboardEvent): void;\r\n renderProfileFields(\r\n saveChangesCallback: () => Promise,\r\n options?: Partial,\r\n hideSubmitCancelButton?: boolean,\r\n ): JSX.Element;\r\n}\r\n\r\nconst hasChanges = createSelector(\r\n (state: Comparison) => state.initial,\r\n (state: Comparison) => state.current,\r\n (initial, current) => !isEqual(initial, current),\r\n);\r\n\r\nexport const withProfileHandlers =

>(Component: React.ComponentType

) => {\r\n return class extends React.Component {\r\n transformProfileToRegistration = createSelector(\r\n (profile: OvationsApi.Types.Customer) => profile,\r\n (profile) => {\r\n if (\r\n this.props.profileSettings.enableTaxableIncomeForm &&\r\n !hasTaxInformation(profile, this.props.profileSettings.disableSecurityNumberCollection)\r\n ) {\r\n const { alternateProfiles } = profile;\r\n const clonedTaxAddress = {\r\n ...profile.address,\r\n alternateProfileType: OvationsApi.Enums.AlternateProfileType.Tax,\r\n };\r\n const updatedAltProfiles = alternateProfiles\r\n ? [...alternateProfiles, clonedTaxAddress]\r\n : [clonedTaxAddress];\r\n\r\n profile.alternateProfiles = updatedAltProfiles;\r\n }\r\n\r\n return {\r\n ...account.emptyRegistrationRequest,\r\n confirmEmail: profile.email,\r\n ...profile,\r\n preferredLanguage: parsePath(location.pathname).locale || profile.preferredLanguage,\r\n };\r\n },\r\n );\r\n\r\n constructor(props: P) {\r\n super(props);\r\n this.state = {\r\n profile: this.getProfile(),\r\n showAddressValidationModal: false,\r\n showTaxAddressValidationModal: false,\r\n useMailingAsTaxAddress: true,\r\n phoneNumberError: false,\r\n isSavingChangesAccount: false,\r\n wasValidatedAccount: false,\r\n };\r\n }\r\n\r\n getProfile = () => {\r\n const profile = this.props.account.me ? this.props.account.me : account.emptyProfile;\r\n return this.transformProfileToRegistration(profile);\r\n };\r\n\r\n openAddressValidationModal = () => {\r\n this.setState({ showAddressValidationModal: true });\r\n };\r\n\r\n openTaxAddressValidationModal = () => {\r\n this.setState({ showAddressValidationModal: false, showTaxAddressValidationModal: true });\r\n };\r\n\r\n updateMailingAsTaxAddress = (newValue: boolean) => {\r\n this.setState({ useMailingAsTaxAddress: newValue });\r\n };\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n updateProfile = (profile: OvationsApi.Types.RegistrationRequest, callback?: () => any) => {\r\n this.setState({ profile }, () => {\r\n if (callback) {\r\n callback();\r\n }\r\n });\r\n };\r\n\r\n onProfileChange = (profile: OvationsApi.Types.RegistrationRequest) => {\r\n const phoneNumberFieldControl = this.props.profileSettings.fieldControlOption.coreFieldControlOptions.find(\r\n (x) => x.fieldName === OvationsApi.Enums.ProfileFieldType.PhoneNumber,\r\n );\r\n\r\n const canEditPhone = phoneNumberFieldControl ? phoneNumberFieldControl.customerEdit : false;\r\n\r\n if (canEditPhone) {\r\n this.validatePhoneNumber(profile.phoneNumber);\r\n }\r\n this.updateProfile(profile);\r\n };\r\n\r\n updateIsAccountSaving = (isSavingChangesAccount: boolean) => {\r\n this.setState({ isSavingChangesAccount });\r\n };\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n updateValidatedAccount = (wasValidatedAccount: boolean, callback?: () => any) => {\r\n this.setState({ wasValidatedAccount }, () => {\r\n if (callback) {\r\n callback();\r\n }\r\n });\r\n };\r\n\r\n onCancelClick = () => {\r\n this.setState({ showAddressValidationModal: false, showTaxAddressValidationModal: false });\r\n };\r\n\r\n validatePhoneNumber = (phoneNumber: string | null) => {\r\n let isValid = false;\r\n\r\n if ((phoneNumber && phoneNumber.length === 10) || (phoneNumber && phoneNumber.length === 11)) {\r\n this.setState({ phoneNumberError: false });\r\n isValid = true;\r\n } else {\r\n this.setState({ phoneNumberError: true });\r\n isValid = false;\r\n }\r\n return isValid;\r\n };\r\n\r\n formatProfileWithTaxAddessAndSubmit = (\r\n taxAddress: OvationsApi.Types.CertifiableAddress,\r\n saveCallback: () => void,\r\n ) => {\r\n const alternateProfiles = replaceTaxAddressWithAddress(this.state.profile.alternateProfiles, taxAddress);\r\n\r\n this.updateProfile({ ...this.state.profile, alternateProfiles }, saveCallback);\r\n };\r\n\r\n formatProfileAndSubmit = (address: OvationsApi.Types.CertifiableAddress, saveChangesCallback: () => void) => {\r\n const updatedAltProfiles = this.state.useMailingAsTaxAddress\r\n ? replaceTaxAddressWithAddress(this.state.profile.alternateProfiles, address)\r\n : this.state.profile.alternateProfiles;\r\n\r\n this.setState({ showAddressValidationModal: false });\r\n this.updateProfile(\r\n {\r\n ...this.state.profile,\r\n address,\r\n alternateProfiles: updatedAltProfiles,\r\n },\r\n () => {\r\n if (saveChangesCallback) {\r\n return saveChangesCallback();\r\n }\r\n },\r\n );\r\n };\r\n\r\n transformRegistrationToProfile = (registrationRequest: OvationsApi.Types.RegistrationRequest) => {\r\n const { password, confirmPassword, confirmEmail, ...customer } = registrationRequest;\r\n const profile: OvationsApi.Types.Customer = {\r\n ...customer,\r\n legalName: customer.legalName || null,\r\n ssn: customer.ssn ? customer.ssn.split('-').join('') : undefined,\r\n };\r\n\r\n return profile;\r\n };\r\n\r\n hasChanges = () => {\r\n if (!this.props.account.me) {\r\n return false;\r\n }\r\n\r\n return hasChanges({\r\n initial: this.transformProfileToRegistration(this.props.account.me),\r\n current: this.state.profile,\r\n });\r\n };\r\n\r\n validateAddress = async (address: OvationsApi.Types.Address) =>\r\n await OvationsPortalApi.AddressValidation.fetch(address);\r\n\r\n renderTaxAddressValidationModal = (saveChangesCallback: () => void) => {\r\n if (hasTaxInformation(this.state.profile, this.props.profileSettings.disableSecurityNumberCollection)) {\r\n const taxAddress = getCustomerTaxAddress(this.state.profile);\r\n return (\r\n this.formatProfileWithTaxAddessAndSubmit(e, saveChangesCallback)}\r\n validateAddress={this.validateAddress}\r\n />\r\n );\r\n }\r\n };\r\n\r\n renderAddressValidationModal = (saveChangesCallback: () => void) => {\r\n return (\r\n this.formatProfileAndSubmit(e, saveChangesCallback)}\r\n validateAddress={this.validateAddress}\r\n />\r\n );\r\n };\r\n\r\n renderProfileFields = (\r\n saveChangesCallback: () => Promise,\r\n options?: ProfileFieldsOptions,\r\n hideSubmitCancelButton?: boolean,\r\n ) => {\r\n if (!this.props.global.portal) {\r\n return null;\r\n }\r\n return (\r\n <>\r\n \r\n {this.renderAddressValidationModal(saveChangesCallback)}\r\n {this.renderTaxAddressValidationModal(saveChangesCallback)}\r\n {hideSubmitCancelButton ? (\r\n ''\r\n ) : (\r\n

\r\n
\r\n this.props.history.goBack()}\r\n >\r\n \r\n \r\n
\r\n
\r\n \r\n {this.state.isSavingChangesAccount ? (\r\n \r\n {' '}\r\n \r\n \r\n ) : (\r\n \r\n )}\r\n \r\n
\r\n
\r\n )}\r\n \r\n );\r\n };\r\n\r\n onKeyDown = (e: React.KeyboardEvent) => {\r\n const element = e.target as HTMLInputElement;\r\n if (e.code === 'Enter' && element.type && element.type !== 'button' && element.type !== 'submit') {\r\n e.preventDefault();\r\n }\r\n };\r\n\r\n render() {\r\n // ... and renders the wrapped component with the fresh data!\r\n // Notice that we pass through any additional props\r\n const { ...props } = this.props;\r\n\r\n return (\r\n \r\n );\r\n }\r\n };\r\n};\r\n","/* eslint-disable react/sort-comp */\r\nimport { faExclamationTriangle } from '@fortawesome/free-solid-svg-icons';\r\nimport classNames from 'classnames';\r\nimport { goBack, push } from 'connected-react-router';\r\nimport { Dictionary, find, isEqual, uniq } from 'lodash';\r\nimport React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { Form, Container, Row, Col, FormGroup, Input, Label } from 'reactstrap';\r\n\r\nimport { LocalizedMessage, L10nMessages, MessageValue, L10nConsumer } from 'core/l10n/components';\r\n\r\nimport AlternatePayeeForm from 'components/AlternatePayeeForm';\r\nimport LocalizedTitle from 'components/LocalizedTitle';\r\nimport elements from 'config/elements';\r\nimport * as routes from 'config/routes';\r\n\r\nimport coreElements from 'core/config/elements';\r\nimport * as OvationsApi from 'core/ovations-api';\r\nimport AvailableRewards from 'core/ovations-components/AvailableRewards';\r\nimport ESignDisclosure from 'core/ovations-components/ESignDisclosure';\r\nimport FAIcon from 'core/ovations-components/FAIcon';\r\nimport QuestionField from 'core/ovations-components/QuestionField';\r\nimport Terms from 'core/ovations-components/Terms';\r\nimport { focus } from 'core/util/dom';\r\nimport { toBool } from 'core/util/strings';\r\nimport CustomerRewardType from 'enums/CustomerRewardType';\r\nimport FormConfigType from 'enums/FormConfigType';\r\nimport {\r\n AddressCertificationStatus,\r\n ClaimStatus,\r\n RewardCalculationType,\r\n RewardPackageType,\r\n} from 'core/ovations-api/enums';\r\nimport NotificationType from 'enums/NotificationType';\r\nimport withData from 'lib/withData';\r\nimport { claimLoader } from 'loaders/claimLoaders';\r\nimport { promotionLoader } from 'loaders/promotionLoaders';\r\nimport * as OvationsPortalApi from 'ovations-portal-api';\r\nimport { CustomerClaim } from 'ovations-portal-api/definitions/CustomerRewardSummary';\r\nimport { Prompt } from 'react-router-dom';\r\nimport * as claim from 'redux-modules/claim';\r\nimport * as notification from 'redux-modules/notification';\r\nimport { ChoiceRewardCalculation, RewardPackage } from 'core/ovations-api/definitions';\r\nimport { accountLoader } from 'loaders/accountLoaders';\r\nimport { profileSettingsLoader } from 'loaders/profileSettingsLoader';\r\nimport * as account from 'redux-modules/account';\r\nimport * as layout from 'redux-modules/layout';\r\nimport ModalType from 'enums/ModalType';\r\nimport * as promotion from 'redux-modules/promotion';\r\n\r\nimport { hasTaxInformation, isTaxAddressPrimaryAddress } from 'redux-modules/customer';\r\n\r\nimport RewardCalculation from 'core/ovations-api/definitions/rewards/RewardCalculation';\r\nimport RewardOptionSelect from 'core/ovations-components/RewardOptionSelect';\r\nimport { ClaimFormSteps } from '../components/form-steps/claim-steps/ClaimFormSteps';\r\nimport { withProfileHandlers, WithProfileHandlerProps, ProfileFieldsOptions } from './profile/withProfileHandlers';\r\n\r\nexport interface ClaimContainerProps\r\n extends WithProfileHandlerProps<{\r\n claimNumber?: string;\r\n promotionNumber?: string;\r\n formConfigType?: FormConfigType;\r\n }> {}\r\n\r\ninterface ClaimContainerState {\r\n claim: OvationsPortalApi.Types.Claim;\r\n isSavingChanges: boolean;\r\n wasValidated: boolean;\r\n touchedReward: boolean;\r\n eSignDisclosureHasBeenReviewed: boolean;\r\n alternatePayeeSelected: boolean;\r\n selectedFormConfigType: FormConfigType;\r\n wasValidatedFormTypeConfig: boolean | null;\r\n submitAccount: boolean;\r\n addressWasUpdated: boolean;\r\n selectedRewardOptions: SelectedRewardOption[];\r\n}\r\nexport const emptyAlternatePayee: OvationsApi.Types.AlternatePayee = {\r\n firstName: '',\r\n lastName: '',\r\n address1: '',\r\n address2: '',\r\n country: '',\r\n city: '',\r\n state: '',\r\n zip: '',\r\n certificationState: {\r\n status: OvationsApi.Enums.AddressCertificationStatus.NonCertified,\r\n },\r\n};\r\n\r\nexport interface SelectedRewardOption {\r\n [rewardCalculationId: string]: RewardPackage;\r\n}\r\n\r\nexport class ClaimContainer extends React.Component {\r\n static getActivePromotion(props: ClaimContainerProps): OvationsPortalApi.Types.Promotion | undefined {\r\n const { promotionNumber } = props.match.params;\r\n if (promotionNumber) {\r\n return find(props.promotion.list, { number: +promotionNumber });\r\n }\r\n const claimBeingEdited = ClaimContainer.getClaimDetail(props);\r\n if (claimBeingEdited) {\r\n return claimBeingEdited.promotion;\r\n }\r\n }\r\n\r\n static getClaimDetail(props: ClaimContainerProps): OvationsPortalApi.Types.ClaimDetail | undefined {\r\n const { claimNumber } = props.match.params;\r\n if (claimNumber) {\r\n const claimsFromRewards = props.claim.results.filter(\r\n (claimValues) => claimValues.type === CustomerRewardType.Claim,\r\n ) as CustomerClaim[];\r\n\r\n return claimsFromRewards\r\n .map((claimRewardSummary) => claimRewardSummary.claim)\r\n .find((claimDetail) => claimDetail.number === Number(claimNumber));\r\n }\r\n\r\n return;\r\n }\r\n\r\n constructor(props: ClaimContainerProps) {\r\n super(props);\r\n this.state = this.getInitialState();\r\n }\r\n\r\n componentDidUpdate(prevProps: ClaimContainerProps) {\r\n const { claimNumber } = this.props.match.params;\r\n const nextClaimDetail = ClaimContainer.getClaimDetail(this.props);\r\n if (claimNumber && nextClaimDetail && ClaimContainer.getClaimDetail(prevProps) !== nextClaimDetail) {\r\n // eslint-disable-next-line react/no-did-update-set-state\r\n this.setState({\r\n claim: claim.selectors.toClaim(nextClaimDetail),\r\n eSignDisclosureHasBeenReviewed: nextClaimDetail.eSignAgreementAcceptance,\r\n selectedFormConfigType: nextClaimDetail.isForPrefund ? FormConfigType.Prefund : FormConfigType.Claim,\r\n });\r\n }\r\n if (this.props.account.me !== prevProps.account.me) {\r\n const profile = this.props.getProfile();\r\n this.props.updateProfile(profile);\r\n }\r\n if (\r\n !this.props.profileSettings.reviewInformationPage &&\r\n this.state.addressWasUpdated &&\r\n !this.state.submitAccount\r\n ) {\r\n this.submitClaim();\r\n this.setState({ submitAccount: true });\r\n }\r\n const isEditing = this.props.match.path === routes.EDIT_CLAIM;\r\n if (\r\n isEditing &&\r\n this.state.selectedRewardOptions.length < 1 &&\r\n this.state.claim.rewards &&\r\n this.state.claim.rewards.length > 0 &&\r\n !this.state.claim.rewards.some((x) => x.rewardPackage === null)\r\n ) {\r\n this.setSelectedRewardOptions();\r\n }\r\n }\r\n\r\n fetchCascadingDropdownOptions = (dataSetId: string, propertyId: number, filters: Dictionary) => {\r\n return OvationsPortalApi.DataSet.fetchPropertyValues(dataSetId, propertyId, filters);\r\n };\r\n\r\n editSubmit = async () => {\r\n const editedClaim: OvationsPortalApi.Types.Claim = {\r\n ...this.state.claim,\r\n status: OvationsApi.Enums.ClaimStatus.PendingValidation,\r\n };\r\n const result = await OvationsPortalApi.Claim.update(editedClaim);\r\n return result;\r\n };\r\n\r\n createSubmit = async () => {\r\n const { selectedFormConfigType } = this.state;\r\n const createClaimRequest: OvationsPortalApi.Types.CreateClaimRequest = {\r\n answers: this.state.claim.answers,\r\n promotionNumber: Number(this.props.match.params.promotionNumber),\r\n rewards: this.state.claim.rewards,\r\n isForPrefund: selectedFormConfigType === FormConfigType.Prefund,\r\n alternatePayee: this.state.alternatePayeeSelected ? this.state.claim.alternatePayee : null,\r\n };\r\n const claimNumber = await OvationsPortalApi.Claim.create(createClaimRequest);\r\n return claimNumber;\r\n };\r\n\r\n validateForm = () => {\r\n const form = document.getElementById(elements.createClaim.id.form) as HTMLFormElement;\r\n let isValid = false;\r\n if (!form) {\r\n return false;\r\n }\r\n isValid = form.checkValidity();\r\n if (!isValid) {\r\n this.setState({ wasValidated: true }, () => focus(form.querySelector('.form-control:invalid')));\r\n } else {\r\n this.setState({ wasValidated: false });\r\n }\r\n return isValid;\r\n };\r\n\r\n displayServerError = (errorMessage: string) => {\r\n // Normally we want to use translated error messages, but this message comes translated from the server.\r\n const body = errorMessage;\r\n const type = NotificationType.Error;\r\n const timeout = 3 * 1000;\r\n this.props.dispatch(notification.actions.add({ type, body, timeout }));\r\n };\r\n\r\n submitClaim = async () => {\r\n const isEditing = this.props.match.path === routes.EDIT_CLAIM;\r\n let claimNumber = Number(this.props.match.params.claimNumber);\r\n let navigationAction;\r\n this.setState({ isSavingChanges: true });\r\n if (isEditing) {\r\n const result = await this.editSubmit();\r\n if (result && result.success) {\r\n navigationAction = goBack();\r\n } else {\r\n this.displayServerError(result.error);\r\n this.setState({\r\n isSavingChanges: false,\r\n });\r\n return;\r\n }\r\n } else {\r\n claimNumber = await this.createSubmit();\r\n navigationAction = push(routes.CLAIMS);\r\n }\r\n this.props.dispatch(\r\n notification.actions.add({\r\n type: NotificationType.Success,\r\n message: 'notification_claimSubmitSuccess',\r\n values: { claimId: claimNumber },\r\n timeout: 3 * 1000,\r\n }),\r\n );\r\n this.props.dispatch(navigationAction);\r\n return;\r\n };\r\n\r\n onFormSubmit: React.FormEventHandler = async (e) => {\r\n e.preventDefault();\r\n\r\n const isValid = this.validateForm();\r\n if (!isValid) {\r\n return;\r\n }\r\n\r\n try {\r\n if (\r\n !this.state.claim.rewards ||\r\n (this.state.claim.rewards?.length === 0 && this.state.claim.status === ClaimStatus.PendingValidation)\r\n ) {\r\n this.addRewardsToClaim();\r\n }\r\n\r\n if (!this.props.profileSettings.reviewInformationPage) {\r\n await this.submitAccount();\r\n return;\r\n }\r\n await this.submitClaim();\r\n } catch (err) {\r\n this.props.dispatch(\r\n notification.actions.add({\r\n type: NotificationType.Error,\r\n message: 'notification_claimSubmitError',\r\n timeout: 3 * 1000,\r\n }),\r\n );\r\n this.setState({\r\n isSavingChanges: false,\r\n });\r\n }\r\n };\r\n\r\n getOnAnswerChange = (promotionQuestionId: string) => {\r\n return (answer: OvationsApi.Types.PromotionQuestionAnswer) => {\r\n const newClaim = {\r\n ...this.state.claim,\r\n answers: {\r\n ...this.state.claim.answers,\r\n [promotionQuestionId]: answer,\r\n },\r\n };\r\n this.setState({ claim: newClaim });\r\n };\r\n };\r\n\r\n onESignDisclosureLinkClick = () => {\r\n this.setState({ eSignDisclosureHasBeenReviewed: true });\r\n };\r\n\r\n setClaimState = (claim: OvationsPortalApi.Types.Claim) => {\r\n this.setState({ claim, touchedReward: true });\r\n };\r\n\r\n onRewardChange = (parentChoiceCalcId: number, selectedRewardCalcId: number) => {\r\n const activePromotion = ClaimContainer.getActivePromotion(this.props);\r\n if (!activePromotion) {\r\n return;\r\n }\r\n\r\n OvationsApi.Claim.updateClaimReward(\r\n this.setClaimState,\r\n this.state.claim,\r\n activePromotion,\r\n parentChoiceCalcId,\r\n selectedRewardCalcId,\r\n );\r\n };\r\n\r\n getInitialState(): ClaimContainerState {\r\n const claimDetail = ClaimContainer.getClaimDetail(this.props) || claim.emptyClaimDetail;\r\n return {\r\n claim: claim.selectors.toClaim(claimDetail),\r\n isSavingChanges: false,\r\n wasValidated: false,\r\n touchedReward: false,\r\n eSignDisclosureHasBeenReviewed: claimDetail.eSignAgreementAcceptance,\r\n alternatePayeeSelected: false,\r\n selectedFormConfigType: claimDetail.isForPrefund ? FormConfigType.Prefund : FormConfigType.Claim,\r\n wasValidatedFormTypeConfig: false,\r\n submitAccount: false,\r\n addressWasUpdated: false,\r\n selectedRewardOptions: [],\r\n };\r\n }\r\n\r\n renderError() {\r\n return (\r\n

\r\n \r\n

\r\n );\r\n }\r\n\r\n renderPromotionQuestions = (questions: OvationsApi.Types.PortalPromotionQuestion[]) => {\r\n const promoQuestions = questions.map((promotionQuestion) => (\r\n \r\n ));\r\n return promoQuestions;\r\n };\r\n\r\n renderESignDisclosure = (eSignAgreementUrl: string | undefined) => {\r\n if (!eSignAgreementUrl) {\r\n return;\r\n }\r\n const claimDetail = ClaimContainer.getClaimDetail(this.props) || claim.emptyClaimDetail;\r\n const inputProperties = {\r\n key: claimDetail.id,\r\n defaultChecked: claimDetail.eSignAgreementAcceptance,\r\n required: true,\r\n };\r\n\r\n return (\r\n
\r\n
\r\n
{this.renderESignDisclosureHasNotBeenReviewed()}
\r\n
\r\n
\r\n

\r\n \r\n

\r\n
\r\n \r\n
\r\n );\r\n };\r\n\r\n renderTermsAndConditions = (termsAndConditionsHeading: string | undefined, termsAndConditions: string) => {\r\n const isEditing = this.props.match.path === routes.EDIT_CLAIM;\r\n const defaultChecked = isEditing && !this.state.touchedReward;\r\n const inputProperties = {\r\n key: defaultChecked, // triggers to re-render when defaultChecked changes\r\n defaultChecked,\r\n required: true,\r\n };\r\n\r\n if (!termsAndConditions) {\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 renderESignDisclosureHasNotBeenReviewed() {\r\n return !this.state.eSignDisclosureHasBeenReviewed && this.state.wasValidated ? (\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n ) : null;\r\n }\r\n\r\n renderAvailableRewardsErrorBanner = (banner: JSX.Element) => (\r\n
\r\n
{banner}
\r\n
\r\n );\r\n\r\n onAlternatePayeeRadioChange: React.ChangeEventHandler = (e) => {\r\n const alternatePayeeRadioSelected = !!toBool(e.currentTarget.value);\r\n this.setState({ alternatePayeeSelected: alternatePayeeRadioSelected });\r\n const { alternatePayee } = this.state.claim;\r\n if (!alternatePayeeRadioSelected) {\r\n const updatedClaim = {\r\n ...this.state.claim,\r\n alternatePayee: null,\r\n };\r\n return this.setState({ claim: updatedClaim });\r\n }\r\n\r\n if (!alternatePayee && alternatePayeeRadioSelected) {\r\n const updatedClaim = {\r\n ...this.state.claim,\r\n alternatePayee: { ...emptyAlternatePayee },\r\n };\r\n this.setState({ claim: updatedClaim });\r\n }\r\n };\r\n\r\n handleAddressFieldChange: React.ChangeEventHandler = (event) => {\r\n const { name: field, value } = event.currentTarget;\r\n const { alternatePayee } = this.state.claim;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n alternatePayee![field] = value;\r\n const updatedClaim = {\r\n ...this.state.claim,\r\n alternatePayee,\r\n };\r\n this.setState({ claim: updatedClaim });\r\n };\r\n\r\n renderAlternatePayeeForm = (hasAlternatePayee: boolean) => {\r\n if (!hasAlternatePayee) {\r\n return;\r\n }\r\n\r\n const activePromotion = ClaimContainer.getActivePromotion(this.props);\r\n\r\n // alt payee can not have multiple rewards\r\n // you must default to the first reward\r\n const rewardPackageType =\r\n activePromotion && activePromotion.rewardCalculations[0].alternatePayeeRewardPackageType\r\n ? activePromotion.rewardCalculations[0].alternatePayeeRewardPackageType\r\n : undefined;\r\n return (\r\n
\r\n \r\n
\r\n );\r\n };\r\n\r\n renderAvailibleRewards = () => {\r\n const promotion = ClaimContainer.getActivePromotion(this.props);\r\n\r\n const choiceRewardCalcs = promotion?.rewardCalculations.filter(\r\n (calc) => calc.type === RewardCalculationType.Choice,\r\n ) as ChoiceRewardCalculation[];\r\n\r\n return (\r\n <>\r\n {choiceRewardCalcs.map((calc, i) => (\r\n \r\n this.onRewardChange(calc.id, newSelection)}\r\n wasValidated={this.state.wasValidated}\r\n selectedReward={OvationsApi.Claim.getSelectedClaimReward(calc, this.state.claim.rewards)}\r\n renderErrorBanner={this.renderAvailableRewardsErrorBanner}\r\n columnWidths={{ xs: 12, lg: 4 }}\r\n isRequired\r\n showErrorBanner\r\n choiceRewardNumber={i + 1}\r\n shouldRenderCustomerNote\r\n />\r\n {i + 1 !== choiceRewardCalcs.length &&
}\r\n
\r\n ))}\r\n \r\n );\r\n };\r\n\r\n renderClaimForm(promotionFromRoute: OvationsPortalApi.Types.Promotion) {\r\n const { claimNumber } = this.props.match.params;\r\n const isEdit = !!claimNumber;\r\n const customerWillReceiveVirtualReward =\r\n promotionFromRoute.rewardCalculations.some((r) =>\r\n r.rewardPackages.some((rp) => rp.rewardPackageType === OvationsApi.Enums.RewardPackageType.VirtualUSA),\r\n ) ||\r\n (this.state.claim.rewards &&\r\n this.state.claim.rewards?.some((r) =>\r\n r.rewardCalculation.rewardPackages.some(\r\n (rp) => rp.rewardPackageType === OvationsApi.Enums.RewardPackageType.VirtualUSA,\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 // --------------------------------------------- SELECT CLAIM TYPE STUFF ----------------------------------------------------------------------\r\n\r\n onFormConfigTypeChange: React.ChangeEventHandler = (e) => {\r\n const { value } = e.currentTarget;\r\n const selectedFormConfigType = FormConfigType[value];\r\n this.setState({ selectedFormConfigType });\r\n };\r\n\r\n renderClaimTypeError() {\r\n return ;\r\n }\r\n\r\n renderClaimTypeRadio() {\r\n const { selectedFormConfigType } = this.state;\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 Purchase type selection is required\r\n \r\n
\r\n );\r\n }\r\n\r\n renderSelectClaimType = () => {\r\n const activePromotion = ClaimContainer.getActivePromotion(this.props);\r\n\r\n return (\r\n
{activePromotion ? this.renderClaimTypeRadio() : this.renderClaimTypeError()}
\r\n );\r\n };\r\n // --------------------------------------------- END CLAIM TYPE STUFF ------------------------------------------------------------------------\r\n\r\n // -------------------------------------------- ACCOUNT EDIT AND REVIEW STUFF ----------------------------------------------------------------\r\n\r\n doesInitialUserStateHaveTaxData = false;\r\n\r\n componentDidMount() {\r\n const doesUserHaveTaxAddress = hasTaxInformation(\r\n this.props.account.me,\r\n this.props.profileSettings.disableSecurityNumberCollection,\r\n );\r\n this.doesInitialUserStateHaveTaxData = doesUserHaveTaxAddress;\r\n\r\n const doesTaxAddressMatchPrimary = isTaxAddressPrimaryAddress(this.props.account.me);\r\n this.props.updateMailingAsTaxAddress(doesTaxAddressMatchPrimary);\r\n this.props.updateProfile(this.props.getProfile());\r\n\r\n const isEditing = this.props.match.path === routes.EDIT_CLAIM;\r\n if (!isEditing) {\r\n this.addRewardsToClaim();\r\n }\r\n }\r\n\r\n submitAccount = async () => {\r\n const { props } = this;\r\n const isPhoneNumberValid = this.props.validatePhoneNumber(props.profile.phoneNumber);\r\n\r\n if (!isPhoneNumberValid) {\r\n this.setState({ wasValidated: true });\r\n // focus(e.currentTarget.querySelector('#phone'));\r\n return;\r\n }\r\n\r\n if (\r\n (props.account.me && !isEqual(props.account.me.address, props.profile.address)) ||\r\n props.account.me?.address.status === AddressCertificationStatus.NonCertified\r\n ) {\r\n this.props.openAddressValidationModal();\r\n return;\r\n }\r\n await this.saveAccountChanges();\r\n return;\r\n };\r\n\r\n setAddressUpdated = (updated: boolean) => {\r\n this.setState({ addressWasUpdated: updated });\r\n };\r\n\r\n saveAccountChanges = async () => {\r\n try {\r\n const profile = this.props.transformRegistrationToProfile(this.props.profile);\r\n this.setState({ isSavingChanges: true });\r\n await this.props.dispatch(account.actions.updateProfile(profile));\r\n this.setAddressUpdated(true);\r\n } catch (e) {\r\n if (e.response && e.response.status === 409) {\r\n this.props.dispatch(\r\n notification.actions.add({\r\n type: NotificationType.Error,\r\n message: 'notification_profileInformationExists',\r\n }),\r\n );\r\n } else {\r\n this.props.dispatch(\r\n notification.actions.add({\r\n type: NotificationType.Error,\r\n message: 'notification_profileUpdateFailure',\r\n }),\r\n );\r\n }\r\n }\r\n if (this.props.profileSettings.reviewInformationPage) {\r\n this.setState({ isSavingChanges: false });\r\n }\r\n };\r\n\r\n toggleChangePassword = () => {\r\n this.props.dispatch(layout.actions.toggleModal(ModalType.PasswordChange));\r\n };\r\n\r\n renderAccountInformation = (isForReview: boolean) => {\r\n const activePromotion = ClaimContainer.getActivePromotion(this.props);\r\n\r\n const rewardPackageTypes: RewardPackageType[] = [];\r\n\r\n activePromotion?.rewardCalculations\r\n .filter((x) => x.rewardPackages !== null)\r\n .forEach((x) =>\r\n x.rewardPackages.map((rp) => rewardPackageTypes.push(rp.rewardPackageType as RewardPackageType)),\r\n );\r\n\r\n this.state.claim.rewards\r\n ?.filter((x) => x.rewardCalculation.rewardPackages !== null)\r\n .forEach((x) =>\r\n x.rewardCalculation.rewardPackages.map((rp) =>\r\n rewardPackageTypes.push(rp.rewardPackageType as RewardPackageType),\r\n ),\r\n );\r\n\r\n const options: Partial = {\r\n isEditProfile: true,\r\n toggleChangePassword: this.toggleChangePassword,\r\n registrationErrors: {},\r\n userHasTaxData: this.doesInitialUserStateHaveTaxData,\r\n directPhoneNumberError: this.props.phoneNumberError,\r\n isRequireSSNForGalileo: promotion.selectors.isRequireSSNForGalileo(this.props.promotion.list),\r\n isRequireDOBForGalileo: promotion.selectors.isRequireDOBForGalileo(this.props.promotion.list),\r\n fieldControlOption: this.props.profileSettings.fieldControlOption,\r\n isForReview,\r\n rewardPackageTypes: uniq(rewardPackageTypes),\r\n isTaxable: (activePromotion && activePromotion.isTaxable) || false,\r\n disableSSN: this.props.profileSettings.disableSecurityNumberCollection,\r\n };\r\n return (\r\n
\r\n \r\n {(l10n) => (\r\n \r\n )}\r\n \r\n
{this.props.renderProfileFields(this.saveAccountChanges, options, true)}
\r\n
\r\n );\r\n };\r\n // -------------------------------------------------------------------------------------------------------------------------------------------\r\n\r\n getTitleDescriptors(): { id: keyof L10nMessages; values?: Dictionary } {\r\n const { claimNumber } = this.props.match.params;\r\n return claimNumber ? { id: 'pageTitle_claim_edit', values: { claimNumber } } : { id: 'pageTitle_claim_submit' };\r\n }\r\n\r\n changeRewardOption = (rewardCalculation: RewardCalculation, rewardPackage: RewardPackage) => {\r\n const index = this.state.selectedRewardOptions?.findIndex((x) => x[rewardCalculation.id]);\r\n const selectedRewardOptions = [...(this.state.selectedRewardOptions || [])];\r\n\r\n if (index !== undefined && index !== -1) {\r\n if (selectedRewardOptions) {\r\n selectedRewardOptions[index][rewardCalculation.id] = rewardPackage;\r\n this.setState({ selectedRewardOptions });\r\n }\r\n } else {\r\n selectedRewardOptions.push({ [rewardCalculation.id]: rewardPackage });\r\n this.setState({ selectedRewardOptions });\r\n }\r\n\r\n const claim = { ...this.state.claim };\r\n const rewardIndex = claim.rewards?.findIndex((x) => x.rewardCalculation.id === rewardCalculation.id);\r\n\r\n if (rewardIndex !== undefined && rewardIndex !== -1) {\r\n if (claim.rewards) {\r\n claim.rewards[rewardIndex].rewardPackage = rewardPackage;\r\n this.setState({ claim });\r\n }\r\n } else {\r\n // new reward in a reward option scenario\r\n const reward: OvationsApi.Types.Reward = {\r\n rewardCalculation,\r\n claimId: claim.id,\r\n cardRewardDetail: null,\r\n status: OvationsApi.Enums.RewardStatus.Inactive,\r\n validatedAmount: 0,\r\n id: null,\r\n rewardStatusHistory: [],\r\n rewardPackage,\r\n };\r\n if (!claim.rewards) {\r\n claim.rewards = [];\r\n }\r\n claim.rewards?.push(reward);\r\n this.setState({ claim });\r\n }\r\n };\r\n\r\n addRewardsToClaim = () => {\r\n const promotion = ClaimContainer.getActivePromotion(this.props);\r\n const claim = { ...this.state.claim };\r\n if (!promotion) {\r\n return claim;\r\n }\r\n if (promotion.rewardCalculations) {\r\n claim.rewards = [];\r\n promotion.rewardCalculations?.forEach((rewardCalculation) => {\r\n if (rewardCalculation.type !== RewardCalculationType.Choice) {\r\n const reward: OvationsApi.Types.Reward = {\r\n rewardCalculation,\r\n claimId: claim.id,\r\n cardRewardDetail: null,\r\n status: OvationsApi.Enums.RewardStatus.Inactive,\r\n validatedAmount: 0,\r\n id: null,\r\n rewardStatusHistory: [],\r\n rewardPackage:\r\n rewardCalculation.rewardPackages.length > 1 ? null : rewardCalculation.rewardPackages[0],\r\n };\r\n claim.rewards?.push(reward);\r\n }\r\n });\r\n }\r\n this.setState({ claim });\r\n };\r\n\r\n setSelectedRewardOptions() {\r\n // IF REWARD ALREADY HAS REWARD PACKAGE SELECTION, MAKE LIST REFLECT IT\r\n\r\n const selectedRewardOptions: SelectedRewardOption[] = [];\r\n\r\n if (this.state.claim.rewards) {\r\n this.state.claim.rewards.forEach((reward) => {\r\n if (reward.rewardPackage) {\r\n const selectedRewardOption: SelectedRewardOption = {};\r\n const rewardPackage = { ...reward.rewardPackage };\r\n selectedRewardOption[reward.rewardCalculation.id] = rewardPackage;\r\n selectedRewardOptions.push(selectedRewardOption);\r\n }\r\n });\r\n\r\n if (this.state.selectedRewardOptions && this.state.selectedRewardOptions?.length < 1) {\r\n this.setState({ selectedRewardOptions });\r\n }\r\n }\r\n }\r\n\r\n rewardOptionIsChecked = (rewardCalculation: RewardCalculation, rewardPackage: RewardPackage) => {\r\n const selectedRewardOption = this.state.selectedRewardOptions?.find((x) => x[rewardCalculation.id]);\r\n\r\n if (!selectedRewardOption) {\r\n return false;\r\n }\r\n\r\n if (selectedRewardOption[rewardCalculation.id].id === rewardPackage.id) {\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n renderRewardOptionSelectionErrorBanner = () => {\r\n const hasNullRewardPackage = this.state.claim.rewards?.find((x) => x.rewardPackage === null);\r\n\r\n return hasNullRewardPackage && this.state.wasValidated ? (\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n ) : null;\r\n };\r\n\r\n renderRewardOptionSelection = () => {\r\n const promotion = ClaimContainer.getActivePromotion(this.props);\r\n const validRewardCalcs = promotion\r\n ? promotion.rewardCalculations.filter((x) => x.rewardPackages.length > 1)\r\n : [];\r\n return (\r\n \r\n );\r\n };\r\n\r\n render() {\r\n const activePromotion = ClaimContainer.getActivePromotion(this.props);\r\n const title = this.getTitleDescriptors();\r\n return (\r\n
\r\n \r\n

\r\n \r\n

\r\n {!activePromotion ? this.renderError() : this.renderClaimForm(activePromotion)}\r\n
\r\n );\r\n }\r\n}\r\n\r\nconst ClaimContainerWithData = withData(\r\n claimLoader,\r\n promotionLoader,\r\n accountLoader,\r\n profileSettingsLoader,\r\n)(withProfileHandlers(ClaimContainer));\r\nexport default connect(/* istanbul ignore next */ (state) => state)(ClaimContainerWithData);\r\n","import React from 'react';\r\nimport ClaimDetail from 'ovations-portal-api/definitions/claims/ClaimDetail';\r\nimport { LocalizedMessage } from 'core/l10n/components';\r\nimport { monetize } from 'core/util/strings';\r\nimport { ClaimStatus, RewardCalculationType } from 'core/ovations-api/enums';\r\nimport { Enums } from 'core/ovations-api';\r\nimport { ChoiceRewardCalculation } from 'core/ovations-api/definitions';\r\n\r\ninterface ValidatedClaimAmountHeaderProps {\r\n claimDetail: ClaimDetail;\r\n isRedemptionDashpart?: boolean;\r\n}\r\n\r\nconst ValidatedClaimAmountHeader: React.FC = ({\r\n claimDetail,\r\n isRedemptionDashpart,\r\n}) => {\r\n const getCustomerFacingName = (customerFacingName: String | null) => {\r\n if (customerFacingName && customerFacingName.length > 0) {\r\n return customerFacingName;\r\n }\r\n return null;\r\n };\r\n\r\n const getHeader = () => {\r\n const displayValue: React.ReactElement[] = [];\r\n const choiceCalcs = claimDetail.promotion.rewardCalculations.filter(\r\n (x) => x.type === Enums.RewardCalculationType.Choice,\r\n );\r\n\r\n if (\r\n claimDetail.status === ClaimStatus.Validated ||\r\n claimDetail.status === ClaimStatus.Exported ||\r\n claimDetail.status === ClaimStatus.Issued ||\r\n claimDetail.status === ClaimStatus.Fulfilled ||\r\n claimDetail.status === ClaimStatus.Executing ||\r\n isRedemptionDashpart\r\n ) {\r\n // redemption dashpart choice specific\r\n if (isRedemptionDashpart && choiceCalcs.length > 0) {\r\n choiceCalcs.forEach((calc: ChoiceRewardCalculation, calcNum) => {\r\n const dashpartChoiceDisplayVlue: React.ReactElement[] = [];\r\n\r\n calc.choices.forEach((choice, i) => {\r\n if (\r\n !choice.rewardPackages.some((x) => x.rewardPackageType === Enums.RewardPackageType.Points)\r\n ) {\r\n dashpartChoiceDisplayVlue.push(\r\n \r\n ${choice.amount} {choice.label}\r\n ,\r\n );\r\n } else {\r\n dashpartChoiceDisplayVlue.push(\r\n \r\n {choice.amount} \r\n ,\r\n );\r\n }\r\n if (i < calc.choices.length - 1) {\r\n dashpartChoiceDisplayVlue.push(\r\n or ,\r\n );\r\n }\r\n });\r\n displayValue.push(\r\n \r\n
  • \r\n Choose {dashpartChoiceDisplayVlue}\r\n
  • \r\n
    ,\r\n );\r\n });\r\n }\r\n\r\n // all other Non Choice headers with the right status and summed rewardAmountTotal and rewardPointTotal\r\n if (claimDetail.rewardAmountTotal || claimDetail.rewardPointTotal) {\r\n if (displayValue.length > 0 && !isRedemptionDashpart) {\r\n displayValue.push( + );\r\n }\r\n if (claimDetail.rewardAmountTotal) {\r\n if (isRedemptionDashpart) {\r\n // displays rewards as bullets on dashpart\r\n displayValue.push(\r\n
  • \r\n \r\n {monetize(claimDetail.rewardAmountTotal)} \r\n \r\n
  • ,\r\n );\r\n } else {\r\n displayValue.push(\r\n \r\n {monetize(claimDetail.rewardAmountTotal)} \r\n ,\r\n );\r\n }\r\n }\r\n if (claimDetail.rewardPointTotal) {\r\n if (displayValue.length > 0 && !isRedemptionDashpart) {\r\n displayValue.push( + );\r\n }\r\n if (isRedemptionDashpart) {\r\n // displays rewards as bullets on dashpart\r\n displayValue.push(\r\n
  • \r\n \r\n {Math.round(claimDetail.rewardPointTotal)} \r\n \r\n
  • ,\r\n );\r\n } else {\r\n displayValue.push(\r\n \r\n {Math.round(claimDetail.rewardPointTotal)} \r\n ,\r\n );\r\n }\r\n }\r\n }\r\n\r\n return (\r\n \r\n {isRedemptionDashpart ?
      {displayValue}
    : <>{displayValue}}\r\n
    \r\n );\r\n }\r\n\r\n // always display Reward Package name(s) if status is < validated\r\n return claimDetail.promotion.rewardCalculations.map((x, i) => {\r\n let displayName = '';\r\n x.rewardPackages.forEach(\r\n (rp, i) =>\r\n (displayName +=\r\n i === x.rewardPackages.length - 1\r\n ? getCustomerFacingName(rp.customerFacingName) ?? rp.name\r\n : `${getCustomerFacingName(rp.customerFacingName) ?? rp.name}, `),\r\n );\r\n\r\n if (x.type === RewardCalculationType.Choice) {\r\n displayName = x.type;\r\n }\r\n return `${displayName}${i !== claimDetail.promotion.rewardCalculations.length - 1 ? ' + ' : ''}`;\r\n });\r\n };\r\n\r\n return (\r\n \r\n {getHeader()}\r\n {claimDetail.isPartialReward ? '*' : ''}\r\n \r\n );\r\n};\r\n\r\nexport default ValidatedClaimAmountHeader;\r\n","/* eslint-disable no-case-declarations */\r\nimport elements from 'config/elements';\r\nimport * as routes from 'config/routes';\r\nimport ContainerProps from 'containers/definitions/ContainerProps';\r\nimport toPath from 'core/lib/toPath';\r\n\r\nimport { L10nMessages, LocalizedDate, LocalizedMessage } from 'core/l10n/components';\r\nimport * as OvationsApi from 'core/ovations-api';\r\nimport { ClaimStatus, ReconciliationStatus, RewardPackageType } from 'core/ovations-api/enums';\r\nimport { monetize } from 'core/util/strings';\r\nimport CustomerRewardType from 'enums/CustomerRewardType';\r\nimport FormConfigType from 'enums/FormConfigType';\r\nimport withData from 'lib/withData';\r\nimport { claimLoader } from 'loaders/claimLoaders';\r\nimport { promotionLoader } from 'loaders/promotionLoaders';\r\nimport { find, includes } from 'lodash';\r\nimport * as OvationsPortalApi from 'ovations-portal-api';\r\nimport { CustomerClaim } from 'ovations-portal-api/definitions/CustomerRewardSummary';\r\nimport React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { Link } from 'react-router-dom';\r\nimport { Button, Card, CardBody, Col, Row } from 'reactstrap';\r\nimport * as claim from 'redux-modules/claim';\r\nimport ValidatedClaimAmountHeader from 'components/claims/ValidatedClaimAmountHeader';\r\nimport Reward from 'core/ovations-api/definitions/rewards/Reward';\r\n\r\nexport type ClaimDetailContainerProps = ContainerProps<{\r\n claimNumber?: string;\r\n promotionNumber?: string;\r\n formConfigType?: FormConfigType;\r\n}>;\r\n\r\ninterface ClaimDetailContainerState {\r\n claim: OvationsPortalApi.Types.ClaimDetail;\r\n isSavingChanges: boolean;\r\n wasValidated: boolean;\r\n touchedReward: boolean;\r\n eSignDisclosureHasBeenReviewed: boolean;\r\n alternatePayeeSelected: boolean;\r\n}\r\n\r\nexport class ClaimDetailContainer extends React.Component {\r\n constructor(props: ClaimDetailContainerProps) {\r\n super(props);\r\n this.state = this.getInitialState();\r\n }\r\n\r\n getInitialState(): ClaimDetailContainerState {\r\n const claimDetail = ClaimDetailContainer.getClaimDetail(this.props) || claim.emptyClaimDetail;\r\n return {\r\n claim: claimDetail,\r\n isSavingChanges: false,\r\n wasValidated: false,\r\n touchedReward: false,\r\n eSignDisclosureHasBeenReviewed: claimDetail.eSignAgreementAcceptance,\r\n alternatePayeeSelected: false,\r\n };\r\n }\r\n\r\n componentDidUpdate(prevProps: ClaimDetailContainerProps) {\r\n const { claimNumber } = this.props.match.params;\r\n const nextClaimDetail = ClaimDetailContainer.getClaimDetail(this.props);\r\n\r\n if (claimNumber && nextClaimDetail && ClaimDetailContainer.getClaimDetail(prevProps) !== nextClaimDetail) {\r\n this.setState({\r\n claim: nextClaimDetail,\r\n });\r\n }\r\n }\r\n\r\n static getActivePromotion(props: ClaimDetailContainerProps): OvationsPortalApi.Types.Promotion | undefined {\r\n const { promotionNumber } = props.match.params;\r\n if (promotionNumber) {\r\n return find(props.promotion.list, { number: +promotionNumber });\r\n }\r\n const claimBeingEdited = ClaimDetailContainer.getClaimDetail(props);\r\n if (claimBeingEdited) {\r\n return claimBeingEdited.promotion;\r\n }\r\n }\r\n\r\n static getClaimDetail(props: ClaimDetailContainerProps): OvationsPortalApi.Types.ClaimDetail | undefined {\r\n const { claimNumber } = props.match.params;\r\n if (claimNumber) {\r\n const claimsFromRewards = props.claim.results.filter(\r\n (claimValues) => claimValues.type === CustomerRewardType.Claim,\r\n ) as CustomerClaim[];\r\n\r\n return claimsFromRewards\r\n .map((claimRewardSummary) => claimRewardSummary.claim)\r\n .find((claimDetail) => claimDetail.number === Number(claimNumber));\r\n }\r\n return;\r\n }\r\n\r\n getFriendlyClaimStatus(claimStatus: OvationsApi.Enums.ClaimStatus): keyof L10nMessages {\r\n switch (claimStatus) {\r\n case ClaimStatus.Submitted:\r\n case ClaimStatus.PendingValidation:\r\n case ClaimStatus.Validated:\r\n case ClaimStatus.PendingExport:\r\n case ClaimStatus.PotentialDuplicate:\r\n case ClaimStatus.Executing:\r\n case ClaimStatus.NeedsReview:\r\n return 'claimsPage_statusProcessing';\r\n case ClaimStatus.Exported:\r\n case ClaimStatus.Fulfilled:\r\n return 'claimsPage_statusProcessed';\r\n case ClaimStatus.Incomplete:\r\n return 'claimsPage_statusIncomplete';\r\n case ClaimStatus.Disqualified:\r\n return 'claimsPage_statusDisqualified';\r\n case ClaimStatus.Mailed:\r\n return 'claimsPage_statusMailed';\r\n case ClaimStatus.Issued:\r\n return 'claimsPage_statusIssued';\r\n case ClaimStatus.PendingRedemption:\r\n return 'claimsPage_statusReadyToRedeem';\r\n case ClaimStatus.ConfirmingReferral:\r\n return 'claimsPage_statusConfirmingReferral';\r\n }\r\n }\r\n\r\n getFriendlyReconciliationStatus(\r\n reconciliationStatus: OvationsApi.Enums.ReconciliationStatus,\r\n ): keyof L10nMessages | null {\r\n switch (reconciliationStatus) {\r\n case OvationsApi.Enums.ReconciliationStatus.Disqualified:\r\n case OvationsApi.Enums.ReconciliationStatus.Incomplete:\r\n case OvationsApi.Enums.ReconciliationStatus.Validated:\r\n return null;\r\n case OvationsApi.Enums.ReconciliationStatus.PendingSubmission:\r\n return 'claimsPage_label_requiresProofOfPurchase';\r\n case OvationsApi.Enums.ReconciliationStatus.PendingValidation:\r\n return 'claimsPage_label_validatingProofOfPurchase';\r\n default:\r\n return null;\r\n }\r\n }\r\n\r\n getRewardStatus(reward: Reward) {\r\n let rewardStatus = reward.status;\r\n if (reward.cardRewardDetail && reward.cardRewardDetail.status) {\r\n rewardStatus = reward.cardRewardDetail.status;\r\n }\r\n return rewardStatus;\r\n }\r\n\r\n getFriendlyRewardStatus(rewardStatus: OvationsApi.Enums.RewardStatus): keyof L10nMessages {\r\n switch (rewardStatus) {\r\n case OvationsApi.Enums.RewardStatus.Activated:\r\n return 'claimsPage_rewardStatusActivated';\r\n case OvationsApi.Enums.RewardStatus.Deactivated:\r\n return 'claimsPage_rewardStatusDeactivated';\r\n case OvationsApi.Enums.RewardStatus.Expired:\r\n return 'claimsPage_rewardStatusExpired';\r\n case OvationsApi.Enums.RewardStatus.Exported:\r\n return 'claimsPage_rewardStatusProcessed';\r\n case OvationsApi.Enums.RewardStatus.Inactive:\r\n return 'claimsPage_rewardStatusInactive';\r\n case OvationsApi.Enums.RewardStatus.Issued:\r\n return 'claimsPage_rewardStatusIssued';\r\n case OvationsApi.Enums.RewardStatus.Mailed:\r\n return 'claimsPage_rewardStatusMailed';\r\n case OvationsApi.Enums.RewardStatus.PendingExport:\r\n return 'claimsPage_rewardStatusPendingExport';\r\n case OvationsApi.Enums.RewardStatus.Processed:\r\n return 'claimsPage_rewardStatusProcessed';\r\n case OvationsApi.Enums.RewardStatus.Replaced:\r\n return 'claimsPage_rewardStatusReplaced';\r\n case OvationsApi.Enums.RewardStatus.Undeliverable:\r\n return 'claimsPage_rewardStatusUndeliverable';\r\n case OvationsApi.Enums.RewardStatus.Validated:\r\n return 'claimsPage_rewardStatusValidated';\r\n case OvationsApi.Enums.RewardStatus.UnclaimedProperty:\r\n return 'claimsPage_rewardStatusUnclaimedProperty';\r\n }\r\n }\r\n\r\n getFriendlyPOPButtonText(claimDetail: OvationsPortalApi.Types.ClaimDetail): keyof L10nMessages {\r\n if (this.isCreatingReconciliation(claimDetail)) {\r\n return 'claimsPage_action_provideProofOfPurchase';\r\n }\r\n return 'claimsPage_action_editProofOfPurchase';\r\n }\r\n\r\n getPrefundQuestions() {\r\n const { promotion } = this.state.claim;\r\n return promotion.questions.filter((question) => question.isForPreFund);\r\n }\r\n\r\n getNonPrefundQuestions() {\r\n const { promotion } = this.state.claim;\r\n return promotion.questions.filter((question) => !question.isForPreFund);\r\n }\r\n\r\n // eslint-disable-next-line react/no-unused-class-component-methods\r\n getRewardType(rewardType: OvationsApi.Enums.RewardPackageType): keyof L10nMessages {\r\n switch (rewardType) {\r\n case OvationsApi.Enums.RewardPackageType.RetailCard:\r\n case OvationsApi.Enums.RewardPackageType.SingleLoadUSA:\r\n case OvationsApi.Enums.RewardPackageType.SingleLoadCAN:\r\n case OvationsApi.Enums.RewardPackageType.ReloadableUSA:\r\n case OvationsApi.Enums.RewardPackageType.ReloadableCAN:\r\n case OvationsApi.Enums.RewardPackageType.SingleLoadUSAGalileo:\r\n case OvationsApi.Enums.RewardPackageType.ReloadableUSAGalileo:\r\n case OvationsApi.Enums.RewardPackageType.ReloadableCANVisa:\r\n return 'claimsPage_rewardType__card';\r\n case OvationsApi.Enums.RewardPackageType.VirtualUSA:\r\n return 'claimsPage_rewardType__virtualCard';\r\n case OvationsApi.Enums.RewardPackageType.CheckUSA:\r\n return 'claimsPage_rewardType__check';\r\n case OvationsApi.Enums.RewardPackageType.Points:\r\n return 'claimsPage_rewardType__points';\r\n default:\r\n return 'claimsPage_rewardType__card';\r\n }\r\n }\r\n\r\n generateClaimFormQuestionResponses(questions: OvationsPortalApi.Types.PromotionQuestion[]) {\r\n if (questions.length === 0) {\r\n return null;\r\n }\r\n\r\n const { answers } = this.state.claim;\r\n\r\n const answerList = questions\r\n .filter((question) => !!answers[question.id])\r\n .map((question) => {\r\n const answer = answers[question.id];\r\n switch (answer.type) {\r\n case OvationsApi.Enums.QuestionType.Text:\r\n const promotionTextQuestionAnswer =\r\n answer as {} as OvationsApi.Types.PromotionTextQuestionAnswer;\r\n return (\r\n \r\n
    {question.question.title}
    \r\n
    {promotionTextQuestionAnswer.value}
    \r\n
    \r\n );\r\n\r\n case OvationsApi.Enums.QuestionType.Number:\r\n const promotionNumberQuestionAnswer =\r\n answer as {} as OvationsApi.Types.PromotionNumberQuestionAnswer;\r\n return (\r\n \r\n
    {question.question.title}
    \r\n
    {promotionNumberQuestionAnswer.value}
    \r\n
    \r\n );\r\n\r\n case OvationsApi.Enums.QuestionType.DateTime:\r\n const promotionDateTimeQuestionAnswer =\r\n answer as {} as OvationsApi.Types.PromotionDateTimeQuestionAnswer;\r\n return (\r\n \r\n
    {question.question.title}
    \r\n
    \r\n {promotionDateTimeQuestionAnswer.value ? (\r\n \r\n ) : (\r\n 'N/A'\r\n )}\r\n
    \r\n
    \r\n );\r\n\r\n case OvationsApi.Enums.QuestionType.FileUpload:\r\n const promotionFileUploadQuestionAnswer =\r\n answer as {} as OvationsApi.Types.PromotionFileUploadQuestionAnswer;\r\n\r\n return (\r\n \r\n
    {question.question.title}
    \r\n
    \r\n \r\n {promotionFileUploadQuestionAnswer.fileName}\r\n \r\n
    \r\n
    \r\n );\r\n\r\n case OvationsApi.Enums.QuestionType.Dropdown:\r\n const promotionDropdownQuestionAnswer =\r\n answer as {} as OvationsApi.Types.PromotionDropDownQuestionAnswer;\r\n return (\r\n \r\n
    {question.question.title}
    \r\n
    {promotionDropdownQuestionAnswer.value}
    \r\n
    \r\n );\r\n\r\n case OvationsApi.Enums.QuestionType.CascadingDropdown:\r\n return (\r\n \r\n
    {question.question.title}
    \r\n
    \r\n {claim.selectors.resolveCascadingDropdownAnswer(\r\n question as OvationsApi.Types.PromotionCascadingDropdownQuestion,\r\n answer as OvationsApi.Types.PromotionCascadingDropdownQuestionAnswer,\r\n )}\r\n
    \r\n
    \r\n );\r\n case OvationsApi.Enums.QuestionType.MultiSelect:\r\n const promotionMultiSelectQuestionAnswer =\r\n answer as {} as OvationsApi.Types.PromotionMultiSelectQuestionAnswer;\r\n\r\n return (\r\n \r\n
    {question.question.title}
    \r\n
    {promotionMultiSelectQuestionAnswer.selections.join(', ')}
    \r\n
    \r\n );\r\n\r\n default:\r\n return null;\r\n }\r\n });\r\n\r\n if (answerList.length === 0) {\r\n return null;\r\n }\r\n\r\n return
    {answerList}
    ;\r\n }\r\n\r\n hasProofOfPurchaseAnswer(claimDetail: OvationsPortalApi.Types.ClaimDetail) {\r\n // this method can be removed/refactored after code\r\n // quality task on BE to return isForPrefund bool in answer object\r\n const questions = claimDetail.promotion.questions.filter((q) => q.isForPreFund === false);\r\n\r\n let found = false;\r\n questions.forEach((q) => {\r\n if (!found && q.id in claimDetail.answers) {\r\n found = true;\r\n }\r\n });\r\n return found;\r\n }\r\n\r\n isCreatingReconciliation(claimDetail: OvationsPortalApi.Types.ClaimDetail) {\r\n return (\r\n claimDetail.isForPrefund &&\r\n claimDetail.reconciliationStatus === ReconciliationStatus.PendingSubmission &&\r\n (ClaimStatus[claimDetail.status] === ClaimStatus.Validated ||\r\n ClaimStatus[claimDetail.status] === ClaimStatus.PendingExport ||\r\n ClaimStatus[claimDetail.status] === ClaimStatus.Exported ||\r\n ClaimStatus[claimDetail.status] === ClaimStatus.Mailed ||\r\n ClaimStatus[claimDetail.status] === ClaimStatus.Issued ||\r\n ClaimStatus[claimDetail.status] === ClaimStatus.Fulfilled)\r\n );\r\n }\r\n\r\n isEditingReconciliation(claimDetail: OvationsPortalApi.Types.ClaimDetail) {\r\n return (\r\n claimDetail.isForPrefund &&\r\n includes(\r\n [ReconciliationStatus.PendingValidation, ReconciliationStatus.Incomplete],\r\n claimDetail.reconciliationStatus,\r\n )\r\n );\r\n }\r\n\r\n isReconciliationClaimEditable(reconciliationStatus: ReconciliationStatus) {\r\n const truthyStatuses = [ReconciliationStatus.Incomplete, ReconciliationStatus.PendingValidation];\r\n return includes(truthyStatuses, reconciliationStatus);\r\n }\r\n\r\n generateReconciliationLink(claimDetail: OvationsPortalApi.Types.ClaimDetail) {\r\n if (this.isCreatingReconciliation(claimDetail)) {\r\n return toPath(routes.CREATE_RECONCILIATION, {\r\n claimNumber: claimDetail.number,\r\n });\r\n }\r\n if (\r\n this.isEditingReconciliation(claimDetail) &&\r\n this.isReconciliationClaimEditable(claimDetail.reconciliationStatus)\r\n ) {\r\n return toPath(routes.EDIT_RECONCILIATION, {\r\n claimNumber: claimDetail.number,\r\n });\r\n }\r\n return null;\r\n }\r\n\r\n generateBreadcrumbs(claimDetail: OvationsPortalApi.Types.ClaimDetail) {\r\n return (\r\n
    \r\n \r\n All Rewards\r\n \r\n  / \r\n Claim {claimDetail.number}\r\n
    \r\n );\r\n }\r\n\r\n renderProofOfPurchase(claimDetail: OvationsPortalApi.Types.ClaimDetail, claimFormDetails: JSX.Element | null) {\r\n if (this.hasProofOfPurchaseAnswer(claimDetail) && claimDetail.isForPrefund) {\r\n return (\r\n
    \r\n
    \r\n
    \r\n
    Proof Of Purchase
    \r\n {claimFormDetails}\r\n
    \r\n
    \r\n );\r\n }\r\n }\r\n\r\n renderPrefundForm() {\r\n const prefundQuestions = this.getPrefundQuestions();\r\n const prefundFormDetails = this.generateClaimFormQuestionResponses(prefundQuestions);\r\n\r\n if (prefundFormDetails) {\r\n return (\r\n
    \r\n
    \r\n
    \r\n
    Claim Form
    \r\n {prefundFormDetails}\r\n
    \r\n
    \r\n );\r\n }\r\n\r\n return null;\r\n }\r\n\r\n renderClaimForm(claimDetail: OvationsPortalApi.Types.ClaimDetail, claimFormDetails: JSX.Element | null) {\r\n if (!claimDetail.isForPrefund) {\r\n return (\r\n
    \r\n
    \r\n
    \r\n
    Claim Form
    \r\n {claimFormDetails}\r\n
    \r\n
    \r\n );\r\n }\r\n }\r\n\r\n renderClaimDetails(claimDetail: OvationsPortalApi.Types.ClaimDetail) {\r\n const reconcilationLink = this.generateReconciliationLink(claimDetail);\r\n const { payeeDetails } = claimDetail;\r\n const friendlyReconciliationStatus = this.getFriendlyReconciliationStatus(claimDetail.reconciliationStatus);\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
    {claimDetail.promotion.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 {friendlyReconciliationStatus && (\r\n <>\r\n {' - '} \r\n \r\n )}\r\n
    \r\n {payeeDetails && (\r\n
    \r\n
    \r\n :\r\n
    \r\n
    \r\n {payeeDetails.firstName} {payeeDetails.lastName}\r\n
    \r\n
    {payeeDetails.address1}
    \r\n
    \r\n {payeeDetails.city}, {payeeDetails.state} {payeeDetails.zip}\r\n
    \r\n
    \r\n )}\r\n {reconcilationLink && (\r\n \r\n \r\n \r\n )}\r\n
    \r\n {claimDetail.isPartialReward && (\r\n

    \r\n \r\n

    \r\n )}\r\n \r\n \r\n \r\n :\r\n \r\n {claimDetail.rewards?.map((x, i) => {\r\n const rewardStatus = this.getRewardStatus(x);\r\n const rewardPackagePoints = x.rewardCalculation.rewardPackages.find((rp) => {\r\n return rp.rewardPackageType === RewardPackageType.Points;\r\n });\r\n if (rewardPackagePoints) {\r\n return (\r\n
    \r\n {`${x.validatedAmount}`} {`${rewardPackagePoints.rewardPackageType}`}\r\n {rewardStatus ? (\r\n \r\n {' - '}\r\n \r\n \r\n ) : (\r\n ''\r\n )}\r\n
    \r\n );\r\n }\r\n return (\r\n
    \r\n {`${monetize(x.validatedAmount)} ${\r\n x.rewardCalculation.rewardPackages[0].rewardPackageType\r\n }`}\r\n {rewardStatus ? (\r\n \r\n {' - '}\r\n \r\n \r\n ) : (\r\n ''\r\n )}\r\n
    \r\n );\r\n })}\r\n \r\n
    \r\n \r\n );\r\n }\r\n\r\n render() {\r\n const claimDetail = this.state.claim;\r\n const nonPrefundQuestions = this.getNonPrefundQuestions();\r\n const claimFormDetails = this.generateClaimFormQuestionResponses(nonPrefundQuestions);\r\n return (\r\n
    \r\n {this.generateBreadcrumbs(claimDetail)}\r\n \r\n \r\n {this.renderClaimDetails(claimDetail)}\r\n {this.renderClaimForm(claimDetail, claimFormDetails)}\r\n {this.renderPrefundForm()}\r\n {this.renderProofOfPurchase(claimDetail, claimFormDetails)}\r\n \r\n \r\n
    \r\n );\r\n }\r\n}\r\n\r\nconst ClaimDetailContainerWithData = withData(\r\n claimLoader,\r\n promotionLoader,\r\n)(ClaimDetailContainer);\r\nexport default connect(/* istanbul ignore next */ (state) => state)(ClaimDetailContainerWithData);\r\n","import React from 'react';\r\n\r\nimport * as OvationsPortalApi from 'ovations-portal-api';\r\n\r\ninterface PromotionOptionsListProps {\r\n initialOptionLabel: string;\r\n emptyOptionsLabel: string;\r\n limitReachedLabel: string;\r\n promotions: OvationsPortalApi.Types.Promotion[];\r\n isSubmitClaim: boolean;\r\n}\r\n\r\nexport const renderOptions = (\r\n promotions: OvationsPortalApi.Types.Promotion[],\r\n limitReachedLabel: string,\r\n isSubmitClaim: boolean,\r\n) => {\r\n if (isSubmitClaim) {\r\n return promotions.map((promotion) => (\r\n \r\n {promotion.limitReached ? `${promotion.name}${limitReachedLabel}` : promotion.name}\r\n \r\n ));\r\n }\r\n return promotions.map((promotion) => (\r\n \r\n ));\r\n};\r\n\r\nconst PromotionOptionsList: React.SFC = (props) => (\r\n <>\r\n \r\n {props.promotions.length ? (\r\n renderOptions(props.promotions, props.limitReachedLabel, props.isSubmitClaim)\r\n ) : (\r\n \r\n )}\r\n \r\n);\r\n\r\nexport default PromotionOptionsList;\r\n","/* eslint-disable no-case-declarations */\r\n/* eslint-disable react/no-unused-state */\r\nimport { faChevronRight, faExclamationCircle } from '@fortawesome/free-solid-svg-icons';\r\nimport { replace } from 'connected-react-router';\r\nimport toPath from 'core/lib/toPath';\r\nimport * as OvationsApi from 'core/ovations-api';\r\nimport { includes, map, omit, sortBy } from 'lodash';\r\nimport React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { Link } from 'react-router-dom';\r\nimport { Card, CardBody, Col, Form, FormGroup, Input, Label, Row } from 'reactstrap';\r\n\r\n// import { mockRewardSummaryItems } from 'core/ovations-api/__mocks__';\r\n\r\nimport LocalizedTitle from 'components/LocalizedTitle';\r\nimport PromotionOptionsList from 'components/promotions/PromotionOptionsList';\r\nimport Spinner from 'components/Spinner';\r\nimport elements from 'config/elements';\r\nimport * as routes from 'config/routes';\r\nimport ContainerProps from 'containers/definitions/ContainerProps';\r\nimport { L10nConsumer, L10nMessages, LocalizedDate, LocalizedMessage } from 'core/l10n/components';\r\nimport { ClaimStatus, QuestionType, ReconciliationStatus } from 'core/ovations-api/enums';\r\nimport { DateRange, DateTimePicker } from 'core/ovations-components/DateTimePicker';\r\nimport FAIcon from 'core/ovations-components/FAIcon';\r\nimport CustomerRewardType from 'enums/CustomerRewardType';\r\nimport FormConfigType from 'enums/FormConfigType';\r\nimport NotificationType from 'enums/NotificationType';\r\nimport withData from 'lib/withData';\r\nimport { claimListPagePromotionLoader, customerPromotionLoader } from 'loaders/promotionLoaders';\r\nimport * as OvationsPortalApi from 'ovations-portal-api';\r\nimport {\r\n CustomerClaim,\r\n CustomerReward,\r\n CustomerRewardGroup,\r\n} from 'ovations-portal-api/definitions/CustomerRewardSummary';\r\nimport * as claim from 'redux-modules/claim';\r\nimport * as notifications from 'redux-modules/notification';\r\nimport ClaimDetail from 'ovations-portal-api/definitions/claims/ClaimDetail';\r\nimport PromotionQuestion from 'ovations-portal-api/definitions/PromotionQuestion';\r\nimport classNames from 'classnames';\r\nimport ValidatedClaimAmountHeader from 'components/claims/ValidatedClaimAmountHeader';\r\n\r\nexport type ClaimListContainerProps = ContainerProps<{\r\n promotionId?: string;\r\n submissionStartDate?: string;\r\n submissionEndDate?: string;\r\n}>;\r\n\r\ninterface ClaimListContainerState {\r\n hasFetchError: boolean;\r\n isFetchingData: boolean;\r\n isSubmitClaim: boolean;\r\n}\r\n\r\nexport class ClaimListContainer extends React.Component {\r\n constructor(props: ClaimListContainerProps) {\r\n super(props);\r\n\r\n this.state = this.getInitialState();\r\n }\r\n\r\n getInitialState(): ClaimListContainerState {\r\n return {\r\n hasFetchError: false,\r\n isFetchingData: false,\r\n isSubmitClaim: false,\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n this.getClaims();\r\n }\r\n\r\n componentDidUpdate(prevProps: ClaimListContainerProps) {\r\n if (prevProps.location.search !== this.props.location.search) {\r\n this.getClaims(this.props);\r\n }\r\n }\r\n\r\n getFriendlyStatus(claimStatus: ClaimStatus): keyof L10nMessages {\r\n switch (claimStatus) {\r\n case ClaimStatus.NeedsReview:\r\n case ClaimStatus.Submitted:\r\n case ClaimStatus.PendingValidation:\r\n case ClaimStatus.Validated:\r\n case ClaimStatus.PendingExport:\r\n case ClaimStatus.PotentialDuplicate:\r\n case ClaimStatus.Executing:\r\n return 'claimsPage_statusProcessing';\r\n case ClaimStatus.Exported:\r\n case ClaimStatus.Fulfilled:\r\n return 'claimsPage_statusProcessed';\r\n case ClaimStatus.Incomplete:\r\n return 'claimsPage_statusIncomplete';\r\n case ClaimStatus.Disqualified:\r\n return 'claimsPage_statusDisqualified';\r\n case ClaimStatus.Mailed:\r\n return 'claimsPage_statusMailed';\r\n case ClaimStatus.Issued:\r\n return 'claimsPage_statusIssued';\r\n case ClaimStatus.PendingRedemption:\r\n return 'claimsPage_statusReadyToRedeem';\r\n case ClaimStatus.ConfirmingReferral:\r\n return 'claimsPage_statusConfirmingReferral';\r\n }\r\n }\r\n\r\n getFriendlyReconciliationStatus(\r\n reconciliationStatus: OvationsApi.Enums.ReconciliationStatus,\r\n ): keyof L10nMessages | null {\r\n switch (reconciliationStatus) {\r\n case OvationsApi.Enums.ReconciliationStatus.Disqualified:\r\n case OvationsApi.Enums.ReconciliationStatus.Incomplete:\r\n case OvationsApi.Enums.ReconciliationStatus.Validated:\r\n return null;\r\n case OvationsApi.Enums.ReconciliationStatus.PendingSubmission:\r\n return 'claimsPage_label_requiresProofOfPurchase';\r\n case OvationsApi.Enums.ReconciliationStatus.PendingValidation:\r\n return 'claimsPage_label_validatingProofOfPurchase';\r\n default:\r\n return null;\r\n }\r\n }\r\n\r\n async getClaims(props: ClaimListContainerProps = this.props) {\r\n const request = OvationsPortalApi.Claim.deserializeRequest(props.location.search);\r\n this.setState({\r\n isFetchingData: true,\r\n });\r\n try {\r\n await props.dispatch(claim.actions.fetchAll(request));\r\n this.setState({\r\n isFetchingData: false,\r\n });\r\n } catch {\r\n this.setState({\r\n hasFetchError: true,\r\n isFetchingData: false,\r\n });\r\n this.props.dispatch(\r\n notifications.actions.add({\r\n type: NotificationType.Error,\r\n message: 'errorMessage_generic',\r\n timeout: 3 * 1000,\r\n }),\r\n );\r\n }\r\n }\r\n\r\n onDropdownChange: React.ChangeEventHandler = (e) => {\r\n const { name, value } = e.currentTarget;\r\n const request = OvationsPortalApi.Claim.deserializeRequest(this.props.location.search);\r\n const newRequest = { ...request, [name]: value };\r\n this.setRequest(newRequest);\r\n };\r\n\r\n onDateChange = (dates: DateRange) => {\r\n const request = OvationsPortalApi.Claim.deserializeRequest(this.props.location.search);\r\n\r\n if (dates?.rangeStart && dates?.rangeEnd) {\r\n const submissionEndDate = new Date(dates.rangeEnd).setHours(23, 59, 59, 999);\r\n this.setRequest({\r\n ...request,\r\n submissionStartDate: dates.rangeStart,\r\n submissionEndDate: new Date(submissionEndDate).toISOString(),\r\n });\r\n } else {\r\n // When we clear a date selection, we need to clear the param keys as well\r\n const requestWithoutRangeBounds = omit(request, ['submissionStartDate', 'submissionEndDate']);\r\n this.setRequest({ ...requestWithoutRangeBounds });\r\n }\r\n };\r\n\r\n getCountMessageId() {\r\n switch (this.props.claim.totalResults) {\r\n case 0:\r\n return 'claimsPage_noResults';\r\n case 1:\r\n return 'claimsPage_resultSingular';\r\n default:\r\n return 'claimsPage_resultsPlural';\r\n }\r\n }\r\n\r\n setRequest(request: OvationsPortalApi.Types.ClaimRequest) {\r\n this.props.dispatch(replace(`?${OvationsPortalApi.Claim.serializeRequest(request)}`));\r\n }\r\n\r\n displayQuestionAnswer = (question: PromotionQuestion, claimDetail: ClaimDetail) => {\r\n const answer = claimDetail.answers[question.id];\r\n switch (answer.type) {\r\n case OvationsApi.Enums.QuestionType.Text:\r\n const promotionTextQuestionAnswer = answer as {} as OvationsApi.Types.PromotionTextQuestionAnswer;\r\n return (\r\n \r\n {question.question.title}: {promotionTextQuestionAnswer.value}\r\n \r\n );\r\n\r\n case OvationsApi.Enums.QuestionType.ReferredIndividualEmail:\r\n const promotionReferredIndvEmailQuestionAnswer =\r\n answer as {} as OvationsApi.Types.PromotionReferredIndividualEmailQuestionAnswer;\r\n return (\r\n \r\n {question.question.title}: {promotionReferredIndvEmailQuestionAnswer.value}\r\n \r\n );\r\n\r\n case OvationsApi.Enums.QuestionType.ReferredIndividualName:\r\n const promotionReferredIndvNameQuestionAnswer =\r\n answer as {} as OvationsApi.Types.PromotionReferredIndividualNameQuestionAnswer;\r\n return (\r\n \r\n {question.question.title}: {promotionReferredIndvNameQuestionAnswer.value}\r\n \r\n );\r\n\r\n case OvationsApi.Enums.QuestionType.Number:\r\n const promotionNumberQuestionAnswer = answer as {} as OvationsApi.Types.PromotionNumberQuestionAnswer;\r\n return (\r\n \r\n {question.question.title}: {promotionNumberQuestionAnswer.value}\r\n \r\n );\r\n\r\n case OvationsApi.Enums.QuestionType.DateTime:\r\n const promotionDateTimeQuestionAnswer =\r\n answer as {} as OvationsApi.Types.PromotionDateTimeQuestionAnswer;\r\n return (\r\n \r\n {question.question.title}: \r\n {promotionDateTimeQuestionAnswer.value ? (\r\n \r\n ) : (\r\n 'N/A'\r\n )}\r\n \r\n );\r\n\r\n case OvationsApi.Enums.QuestionType.Dropdown:\r\n const promotionDropdownQuestionAnswer =\r\n answer as {} as OvationsApi.Types.PromotionDropDownQuestionAnswer;\r\n return (\r\n \r\n {question.question.title}: {promotionDropdownQuestionAnswer.value}\r\n \r\n );\r\n\r\n case OvationsApi.Enums.QuestionType.CascadingDropdown:\r\n return (\r\n \r\n {question.question.title}: \r\n {claim.selectors.resolveAllCascadingDropdownAnswers(\r\n answer as OvationsApi.Types.PromotionCascadingDropdownQuestionAnswer,\r\n )}\r\n \r\n );\r\n case OvationsApi.Enums.QuestionType.MultiSelect:\r\n const promotionMultiSelectQuestionAnswer =\r\n answer as {} as OvationsApi.Types.PromotionMultiSelectQuestionAnswer;\r\n\r\n return (\r\n \r\n {question.question.title}: {promotionMultiSelectQuestionAnswer.selections.join(', ')}\r\n \r\n );\r\n\r\n default:\r\n return null;\r\n }\r\n };\r\n\r\n isClaimEditable(claimStatus: ClaimStatus) {\r\n const truthyStatuses = [\r\n ClaimStatus.Incomplete,\r\n ClaimStatus.PendingValidation,\r\n ClaimStatus.Submitted,\r\n ClaimStatus.PendingRedemption,\r\n ];\r\n return includes(truthyStatuses, claimStatus);\r\n }\r\n\r\n groupRewardsData(summaryList: OvationsPortalApi.Types.CustomerRewardSummary[]) {\r\n const claimsList: CustomerClaim[] = [];\r\n const ungroupedRewardsList: CustomerReward[] = [];\r\n\r\n // Filter summarylist into claims and rewards\r\n summaryList.forEach((summaryItem) => {\r\n if (summaryItem.type === CustomerRewardType.Claim) {\r\n claimsList.push(summaryItem);\r\n } else {\r\n ungroupedRewardsList.push(summaryItem as CustomerReward);\r\n }\r\n });\r\n\r\n // Map out all rewards by reward number\r\n const rewardByOrderNumberMap: { [rewardNumber: string]: CustomerReward[] } = {};\r\n ungroupedRewardsList.forEach((reward) => {\r\n const orderNumberKey = rewardByOrderNumberMap[reward.rewards.orderNumber];\r\n if (orderNumberKey && orderNumberKey.length > 0) {\r\n rewardByOrderNumberMap[reward.rewards.orderNumber].push(reward as CustomerReward);\r\n } else {\r\n rewardByOrderNumberMap[reward.rewards.orderNumber] = [reward as CustomerReward];\r\n }\r\n });\r\n\r\n // Separate out singular/grouped rewards\r\n const rewardOrderNumbers = Object.keys(rewardByOrderNumberMap);\r\n const singleRewardslist: CustomerReward[] = [];\r\n const groupedRewardsList: CustomerReward[][] = [];\r\n\r\n rewardOrderNumbers.forEach((rewardNumber) => {\r\n const rewardMatchGroup = rewardByOrderNumberMap[rewardNumber];\r\n if (rewardMatchGroup.length === 1) {\r\n singleRewardslist.push(rewardMatchGroup[0]);\r\n } else if (rewardMatchGroup.length > 1) {\r\n groupedRewardsList.push(rewardMatchGroup);\r\n }\r\n });\r\n\r\n // Create Formatted Group Rewards\r\n const formattedGroupRewardsList: CustomerRewardGroup[] = groupedRewardsList.map((rewardGroup) => {\r\n const indexItem = rewardGroup[0];\r\n return {\r\n date: indexItem.date,\r\n type: CustomerRewardType.RewardGroup,\r\n rewards: {\r\n orderDate: indexItem.rewards.orderDate,\r\n orderNumber: indexItem.rewards.orderNumber,\r\n totalItems: rewardGroup.length,\r\n items: rewardGroup.map((reward) => reward.rewards),\r\n },\r\n };\r\n });\r\n\r\n // Combine all rewards back into one list:\r\n const mergedFormattedSummaryList: OvationsPortalApi.Types.CustomerRewardSummary[] = [\r\n ...claimsList,\r\n ...singleRewardslist,\r\n ...formattedGroupRewardsList,\r\n ];\r\n\r\n // Order all items by date, descending (sortBy always defaults to ascending, so we reverse)\r\n return sortBy(mergedFormattedSummaryList, 'date').reverse();\r\n }\r\n\r\n shouldDisplayReconciliationTask(claimDetail: OvationsPortalApi.Types.ClaimDetail) {\r\n return (\r\n claimDetail.isForPrefund &&\r\n (claimDetail.status === ClaimStatus.Validated ||\r\n claimDetail.status === ClaimStatus.PendingExport ||\r\n claimDetail.status === ClaimStatus.Exported ||\r\n claimDetail.status === ClaimStatus.Executing ||\r\n claimDetail.status === ClaimStatus.Fulfilled ||\r\n claimDetail.status === ClaimStatus.Mailed)\r\n );\r\n }\r\n\r\n generateClaimBodyLink(claimDetail: OvationsPortalApi.Types.ClaimDetail) {\r\n if (this.isClaimEditable(ClaimStatus[claimDetail.status])) {\r\n return toPath(routes.EDIT_CLAIM, {\r\n claimNumber: claimDetail.number,\r\n formConfigType: claimDetail.isForPrefund ? FormConfigType.Prefund : FormConfigType.Claim,\r\n });\r\n }\r\n if (claimDetail.isForPrefund) {\r\n return toPath(routes.CLAIM_DETAIL, {\r\n claimNumber: claimDetail.number,\r\n });\r\n }\r\n return toPath(routes.CLAIM_DETAIL, {\r\n claimNumber: claimDetail.number,\r\n });\r\n }\r\n\r\n renderClaimCardBody(claimDetail: OvationsPortalApi.Types.ClaimDetail) {\r\n const claimLink = this.generateClaimBodyLink(claimDetail);\r\n return (\r\n \r\n
    \r\n

    \r\n \r\n

    \r\n {this.renderSubmissionMetadata(claimDetail)}\r\n {claimDetail.reconciliationStatus === ReconciliationStatus.PendingSubmission && (\r\n <>\r\n {' '}\r\n \r\n )}\r\n {this.renderClaimDetailStatus(claimDetail)}\r\n
    \r\n
    \r\n {' '}\r\n {' '}\r\n
    \r\n \r\n );\r\n }\r\n\r\n renderSubmissionMetadata(claimDetail: OvationsPortalApi.Types.ClaimDetail): JSX.Element {\r\n const filteredQuestions = claimDetail.promotion.questions.filter(\r\n (q) =>\r\n q.question.type !== QuestionType.FileUpload && q.displayOnPortalHistory && !!claimDetail.answers[q.id],\r\n );\r\n\r\n return (\r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n \r\n #{claimDetail.number}\r\n \r\n  • {claimDetail.promotion.name}\r\n
    \r\n
    \r\n {filteredQuestions.length > 0 &&\r\n filteredQuestions.map((question) => (\r\n \r\n {this.displayQuestionAnswer(question, claimDetail)}\r\n
    \r\n ))}\r\n
    \r\n );\r\n }\r\n\r\n renderClaimDetailStatus(claimDetail: OvationsPortalApi.Types.ClaimDetail, actionRequired = false) {\r\n const friendlyStatus = this.getFriendlyStatus(claimDetail.status);\r\n if (this.shouldDisplayReconciliationTask(claimDetail)) {\r\n const friendlyReconciliationStatus = this.getFriendlyReconciliationStatus(claimDetail.reconciliationStatus);\r\n return (\r\n \r\n {friendlyReconciliationStatus !== null ? (\r\n <>\r\n <>{!actionRequired && }\r\n {!actionRequired && <> - }\r\n \r\n \r\n ) : (\r\n \r\n )}\r\n \r\n );\r\n }\r\n return (\r\n \r\n {claimDetail.reason &&\r\n (claimDetail.status === ClaimStatus.Disqualified || claimDetail.status === ClaimStatus.Incomplete) ? (\r\n <>\r\n - {claimDetail.reason}\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n );\r\n }\r\n\r\n renderCatalogRewardTitle(rewardDetail: OvationsApi.Types.RewardCatalogItem | OvationsApi.Types.RewardCatalogGroup) {\r\n if ((rewardDetail as OvationsApi.Types.RewardCatalogGroup).totalItems) {\r\n return `${(rewardDetail as OvationsApi.Types.RewardCatalogGroup).totalItems} Items`;\r\n }\r\n\r\n // TODO: Re-enable title logic once we've fixed the broken titles from vendor\r\n // return rewardDetail.title;\r\n return ;\r\n }\r\n\r\n renderRewardCardBody(rewardDetail: OvationsApi.Types.RewardCatalogItem | OvationsApi.Types.RewardCatalogGroup) {\r\n // TODO: Add this when we have links for reward catalog detail pages on FE US76138\r\n // const claimLink = this.generateClaimBodyLink(rewardDetail);\r\n\r\n return (\r\n
    \r\n
    \r\n

    \r\n \r\n

    \r\n
    \r\n
    \r\n {this.renderCatalogRewardTitle(rewardDetail)}\r\n
    \r\n
    \r\n #{rewardDetail.orderNumber}\r\n
    \r\n
    \r\n
    \r\n
    \r\n {/* TODO: Add this back in when US76138 is done */}\r\n {/* */}\r\n
    \r\n
    \r\n );\r\n }\r\n\r\n renderCards(claims: Array) {\r\n const columnWidths = { xs: 12 };\r\n const claimCards = map(claims, (value, i) => {\r\n const isOdd = !!(i % 2);\r\n\r\n return (\r\n \r\n \r\n \r\n {value.type === CustomerRewardType.Claim\r\n ? this.renderClaimCardBody(value.claim)\r\n : this.renderRewardCardBody(value.rewards)}\r\n \r\n \r\n \r\n );\r\n });\r\n return (\r\n \r\n {claimCards}\r\n {claimCards.length > 0 && (\r\n \r\n

    \r\n \r\n

    \r\n \r\n )}\r\n
    \r\n );\r\n }\r\n\r\n renderActionRequiredCardBody(claimDetail: OvationsPortalApi.Types.ClaimDetail) {\r\n const claimLink = this.generateClaimBodyLink(claimDetail);\r\n return (\r\n \r\n
    \r\n \r\n #\r\n {claimDetail.number}\r\n  • \r\n {this.renderClaimDetailStatus(claimDetail, true)}\r\n \r\n
    \r\n \r\n \r\n );\r\n }\r\n\r\n renderActionRequiredCards(claims: OvationsPortalApi.Types.ClaimDetail[]) {\r\n const columnWidths = { xs: 12 };\r\n const claimCards = map(claims, (value) => {\r\n return (\r\n \r\n
    \r\n {this.renderActionRequiredCardBody(value)}\r\n
    \r\n \r\n );\r\n });\r\n return {claimCards};\r\n }\r\n\r\n renderFilters(request: Partial) {\r\n return (\r\n
    \r\n \r\n {(l10n) => (\r\n \r\n \r\n \r\n \r\n \r\n {\r\n this.onDropdownChange(e);\r\n }}\r\n type=\"select\"\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n \r\n \r\n \r\n \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n )}\r\n
    \r\n
    \r\n );\r\n }\r\n\r\n renderCount() {\r\n const { totalResults } = this.props.claim;\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n\r\n renderFilterDependentItems() {\r\n return (\r\n <>\r\n {this.renderCount()}\r\n {this.renderCards(this.groupRewardsData(this.props.claim.results))}\r\n \r\n );\r\n }\r\n\r\n renderActionRequiredItems() {\r\n const customerClaims = this.props.claim.results.filter(\r\n (x) => x.type === CustomerRewardType.Claim,\r\n ) as CustomerClaim[];\r\n\r\n const actionRequiredClaims = customerClaims\r\n .filter(\r\n (x) =>\r\n x.claim.status === ClaimStatus.Incomplete ||\r\n x.claim.reconciliationStatus === ReconciliationStatus.PendingSubmission,\r\n )\r\n .map((x) => x.claim);\r\n\r\n if (!customerClaims) {\r\n return;\r\n }\r\n\r\n return <>{this.renderActionRequiredCards(actionRequiredClaims)};\r\n }\r\n\r\n renderSpinner() {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n\r\n renderCardsToDisplay() {\r\n return (\r\n <>\r\n {this.renderActionRequiredItems()}\r\n {this.renderFilterDependentItems()}\r\n \r\n );\r\n }\r\n\r\n render() {\r\n const request = OvationsPortalApi.Claim.deserializeRequest(this.props.location.search);\r\n return (\r\n
    \r\n \r\n

    \r\n \r\n

    \r\n {this.renderFilters(request)}\r\n {!this.state.isFetchingData ? this.renderCardsToDisplay() : this.renderSpinner()}\r\n
    \r\n );\r\n }\r\n}\r\n\r\nconst ClaimListContainerWithData = withData(claimListPagePromotionLoader, customerPromotionLoader)(ClaimListContainer);\r\nexport default connect(/* istanbul ignore next */ (state) => state)(ClaimListContainerWithData);\r\n","import { Action } from 'redux';\r\nimport { ThunkAction } from 'redux-thunk';\r\n\r\nimport createReducer from 'core/lib/createReducer';\r\nimport * as PortalApi from 'ovations-portal-api';\r\nimport ContactState from 'redux-modules/definitions/ContactState';\r\nimport S from 'redux-modules/definitions/RootState';\r\n\r\nexport const initialState: ContactState = {\r\n contactPage: null,\r\n};\r\n\r\nconst { reducer, update } = createReducer('contact/UPDATE', initialState);\r\nexport const contactReducer = reducer;\r\n\r\nexport const actions = {\r\n update,\r\n\r\n fetch(): ThunkAction, S, void, Action> {\r\n return async (dispatch) => {\r\n const contactPage = await PortalApi.Contact.fetch();\r\n if (!contactPage) {\r\n return;\r\n }\r\n dispatch(update({ contactPage }));\r\n };\r\n },\r\n\r\n submit(contactUsFormEntry: PortalApi.Types.ContactForm): ThunkAction, S, void, Action> {\r\n return async () => {\r\n await PortalApi.Contact.submit(contactUsFormEntry);\r\n };\r\n },\r\n};\r\n","import ContainerProps from 'containers/definitions/ContainerProps';\r\nimport { LoaderConfig } from 'lib/withData';\r\nimport * as contact from 'redux-modules/contact';\r\n\r\nexport const contactLoader: LoaderConfig = {\r\n memoizer: () => 'contact',\r\n needsData: () => true,\r\n fetchData: (props: ContainerProps) => props.dispatch(contact.actions.fetch()),\r\n};\r\n","import { TagManagerEventArgs } from 'lib/TagManager';\r\n\r\nenum EventCategory {\r\n MultiLanguage = 'Multi-language',\r\n}\r\n\r\nenum MultiLanguageAction {\r\n LanguageOverride = 'Language override',\r\n}\r\n\r\nexport const getLanguageOverrideEvent = (cultureCode: string): TagManagerEventArgs => {\r\n return {\r\n category: EventCategory.MultiLanguage,\r\n action: MultiLanguageAction.LanguageOverride,\r\n label: cultureCode,\r\n };\r\n};\r\n","import { L10nMessages } from 'core/l10n/types';\r\n\r\nconst QuestionCategory: { [category: string]: keyof L10nMessages } = {\r\n 'Card Activations': 'contactUs_questionCategory_cardActivations',\r\n 'Promotions or Rewards': 'contactUs_questionCategory_PromotionsOrRewards',\r\n 'Point Accrual': 'contactUs_questionCategory_PointAccrual',\r\n 'Website Help': 'contactUs_questionCategory_WebsiteHelp',\r\n Other: 'contactUs_questionCategory_Other',\r\n};\r\n\r\nexport default QuestionCategory;\r\n","import { faCircleNotch } from '@fortawesome/free-solid-svg-icons';\r\nimport classNames from 'classnames';\r\nimport { push } from 'connected-react-router';\r\nimport { EMAIL_ADDRESS, FIRST_NAME, FIRST_NAME_OR_LAST_NAME, PHONE } from 'core/config/patterns';\r\nimport * as OvationsApi from 'core/ovations-api';\r\nimport sortBy from 'lodash/sortBy';\r\nimport React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { Button, Card, CardBody, Col, Container, Form, Input, Label, Row } from 'reactstrap';\r\n\r\nimport elements from 'config/elements';\r\nimport * as routes from 'config/routes';\r\nimport ContainerProps from 'containers/definitions/ContainerProps';\r\nimport { L10nConsumer, L10nMessages, LocalizedMessage } from 'core/l10n/components';\r\nimport { L10nContext } from 'core/l10n/types';\r\nimport FAIcon from 'core/ovations-components/FAIcon';\r\nimport { removeFirst } from 'core/util/arrays';\r\nimport NotificationType from 'enums/NotificationType';\r\nimport withData from 'lib/withData';\r\nimport { contactLoader } from 'loaders/contactLoaders';\r\nimport * as OvationsPortalApi from 'ovations-portal-api';\r\nimport { emptyProfile } from 'redux-modules/account';\r\nimport * as contact from 'redux-modules/contact';\r\nimport * as notification from 'redux-modules/notification';\r\n\r\nimport ContactMethods from '../enums/ContactMethods';\r\nimport QuestionCategory from '../enums/QuestionCategory';\r\n\r\nexport type ContactContainerProps = ContainerProps;\r\n\r\ninterface SelectOption {\r\n value: string;\r\n label: string;\r\n}\r\n\r\ninterface ContactContainerState {\r\n contactForm: OvationsPortalApi.Types.ContactForm;\r\n isSavingChanges: boolean;\r\n wasValidated: boolean;\r\n}\r\n\r\nexport class ContactContainer extends React.Component {\r\n constructor(props: ContactContainerProps) {\r\n super(props);\r\n this.state = this.getInitialState();\r\n }\r\n\r\n getInitialState() {\r\n const me = this.props.account.me ? this.props.account.me : emptyProfile;\r\n\r\n const contactForm: OvationsPortalApi.Types.ContactForm = {\r\n firstName: me.firstName || '',\r\n lastName: me.lastName || '',\r\n email: me.preferredEmail || '',\r\n phone: me.phoneNumber || '',\r\n contactMethod: me.preferredContactMethod || OvationsApi.Enums.NotificationChannelType.None,\r\n questionCategory: '',\r\n message: '',\r\n };\r\n\r\n return {\r\n contactForm,\r\n isSavingChanges: false,\r\n wasValidated: false,\r\n };\r\n }\r\n\r\n getLocalizedSortedCategories(l10n: L10nContext, questionCategories: string[]): SelectOption[] {\r\n const categoriesSansOther = removeFirst(questionCategories, (c) => c === 'Other');\r\n const translatedCategories: SelectOption[] = categoriesSansOther.map((category) => ({\r\n value: category,\r\n label: l10n.localizeMessage(QuestionCategory[category]),\r\n }));\r\n return [\r\n ...sortBy(translatedCategories, (qc) => qc.label),\r\n { value: 'Other', label: l10n.localizeMessage(QuestionCategory.Other) },\r\n ];\r\n }\r\n\r\n onInputChange: React.ChangeEventHandler = (event) => {\r\n const { name, value } = event.currentTarget;\r\n const contactForm: OvationsPortalApi.Types.ContactForm = {\r\n ...this.state.contactForm,\r\n [name]: value,\r\n };\r\n this.setState({ contactForm });\r\n };\r\n\r\n onTextAreaChange: React.ChangeEventHandler = (event) => {\r\n const { name, value } = event.currentTarget;\r\n const contactForm: OvationsPortalApi.Types.ContactForm = {\r\n ...this.state.contactForm,\r\n [name]: value,\r\n };\r\n this.setState({ contactForm });\r\n };\r\n\r\n onFormSubmit: React.FormEventHandler = async (event) => {\r\n event.preventDefault();\r\n\r\n const isValid = event.currentTarget.checkValidity();\r\n if (isValid) {\r\n try {\r\n this.setState({ isSavingChanges: true });\r\n await this.props.dispatch(contact.actions.submit(this.state.contactForm));\r\n } catch (error) {\r\n this.props.dispatch(\r\n notification.actions.add({\r\n type: NotificationType.Error,\r\n message: 'notification_contactSubmitError',\r\n }),\r\n );\r\n\r\n this.setState({\r\n isSavingChanges: false,\r\n });\r\n return;\r\n }\r\n\r\n this.setState({\r\n isSavingChanges: false,\r\n });\r\n\r\n this.props.dispatch(push(routes.DASHBOARD));\r\n this.props.dispatch(\r\n notification.actions.add({\r\n type: NotificationType.Success,\r\n message: 'notification_contactSubmitSuccess',\r\n }),\r\n );\r\n } else {\r\n this.setState({ wasValidated: true });\r\n }\r\n };\r\n\r\n renderContactByPhone() {\r\n const { contactPage } = this.props.contact;\r\n if (!contactPage) {\r\n return;\r\n }\r\n\r\n const contactNumberLink = `tel:${contactPage.contactNumber}`;\r\n const { contactNumber } = contactPage;\r\n\r\n return (\r\n
    \r\n

    \r\n \r\n

    \r\n {contactNumber}\r\n
    \r\n );\r\n }\r\n\r\n renderHoursOfOperation() {\r\n const { contactPage } = this.props.contact;\r\n if (!contactPage) {\r\n return;\r\n }\r\n\r\n const { hoursOfOperation } = contactPage;\r\n return (\r\n
    \r\n

    \r\n \r\n

    \r\n
    {hoursOfOperation}
    \r\n
    \r\n );\r\n }\r\n\r\n renderFirstNameInput() {\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 renderLastNameInput() {\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 renderPhoneInput() {\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 renderEmailInput() {\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 renderQuestionCategoryDropdown() {\r\n const { contactPage } = this.props.contact;\r\n return (\r\n <>\r\n \r\n \r\n {(l10n) => (\r\n \r\n \r\n {contactPage &&\r\n this.getLocalizedSortedCategories(l10n, contactPage.questionCategories).map(\r\n (category) => (\r\n \r\n ),\r\n )}\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n\r\n render() {\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 {this.renderFirstNameInput()}\r\n {this.renderLastNameInput()}\r\n \r\n \r\n {this.renderPhoneInput()}\r\n {this.renderEmailInput()}\r\n \r\n \r\n \r\n
    \r\n \r\n \r\n {(l10n) => (\r\n \r\n \r\n {Object.keys(ContactMethods).map((key) => {\r\n const valueId: keyof L10nMessages = ContactMethods[key];\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 {this.renderQuestionCategoryDropdown()}\r\n \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n \r\n {this.state.isSavingChanges ? (\r\n \r\n \r\n \r\n \r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.renderContactByPhone()}\r\n {this.renderHoursOfOperation()}\r\n \r\n \r\n \r\n
    \r\n
    \r\n );\r\n }\r\n}\r\n\r\nconst ContactContainerWithData = withData(contactLoader)(ContactContainer);\r\nexport default connect(/* istanbul ignore next */ (state) => state)(ContactContainerWithData);\r\n","import React from 'react';\r\n\r\nimport elements from 'config/elements';\r\nimport { LocalizedMessage } from 'core/l10n/components';\r\nimport { Button, Card, CardBody } from 'reactstrap';\r\n\r\nexport interface PointBalanceProps {\r\n pointBalance: number;\r\n onShopCatalogClick: () => Promise;\r\n}\r\n\r\nconst renderShoppingButton = (props: PointBalanceProps) => {\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst PointBalance: React.SFC = (props) => {\r\n return (\r\n
    \r\n \r\n \r\n

    \r\n \r\n

    \r\n
    \r\n
    \r\n \r\n {Math.round(props.pointBalance)}\r\n \r\n
    \r\n
    {renderShoppingButton(props)}
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default PointBalance;\r\n","import classNames from 'classnames';\r\nimport clamp from 'lodash/clamp';\r\nimport React from 'react';\r\n\r\nimport elements from 'config/elements';\r\nimport { DEFAULT_TRACKER_ICON, iconMap } from 'core/config/icons';\r\nimport DateTime from 'core/definitions/DateTime';\r\nimport { LocalizedDate, LocalizedMessage } from 'core/l10n/components';\r\nimport FAIcon from 'core/ovations-components/FAIcon';\r\n\r\nexport interface PointTrackerProps {\r\n iconKey: string | null;\r\n isTranslucent: boolean | null;\r\n pointLedgerDate: DateTime | null;\r\n pointTrackerTitle: string | null;\r\n pointLedgerTotal: number | null;\r\n pointTrackerGoal: number | null;\r\n progressBarColor: string | null;\r\n}\r\n\r\nconst PointTracker: React.SFC = (props) => {\r\n const trackerIcon = props.iconKey ? props.iconKey : DEFAULT_TRACKER_ICON;\r\n if (props.pointTrackerGoal == null) {\r\n return null;\r\n }\r\n const percent =\r\n props.pointLedgerTotal == null ? 0 : clamp(props.pointLedgerTotal / props.pointTrackerGoal, 0, 1) * 100;\r\n\r\n const renderFormattedNumber = (unformattedNumber: number) => unformattedNumber.toLocaleString('en-US');\r\n\r\n const valueTranslation = `translateX(${percent}%)`;\r\n\r\n return (\r\n
    \r\n

    {props.pointTrackerTitle}

    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n

    \r\n {props.pointLedgerTotal == null ? (\r\n \r\n ) : (\r\n <>\r\n {renderFormattedNumber(props.pointLedgerTotal)} /{' '}\r\n {renderFormattedNumber(props.pointTrackerGoal)}{' '}\r\n \r\n \r\n )}\r\n

    \r\n

    \r\n {props.pointLedgerDate && (\r\n <>\r\n {' '}\r\n \r\n \r\n )}\r\n

    \r\n
    \r\n );\r\n};\r\n\r\nexport default PointTracker;\r\n","import { RewardPackageType } from 'core/ovations-api/enums';\r\n\r\nexport const VIRTUAL_CARD_URL = 'https://login.wirecard.com/payments/attrewards';\r\n\r\nexport const checkBalanceUrls: { [K in RewardPackageType]: string } = {\r\n [RewardPackageType.ReloadableCAN]: 'https://www.myincentivescard.com/',\r\n [RewardPackageType.ReloadableUSA]: 'https://www.usbankfocus.com/',\r\n [RewardPackageType.SingleLoadCAN]: 'https://yourrewardcard.com/',\r\n [RewardPackageType.SingleLoadUSA]: 'https://portal.cardaccesssite.com/web/GOCardServices',\r\n [RewardPackageType.VirtualUSA]: 'https://www.cardactivationservices.com/',\r\n [RewardPackageType.CheckUSA]: '',\r\n [RewardPackageType.Points]: '',\r\n [RewardPackageType.SingleLoadUSAGalileo]: 'https://www.cardactivationservices.com/',\r\n [RewardPackageType.ReloadableUSAGalileo]: 'https://www.cardactivationservices.com/',\r\n [RewardPackageType.RetailCard]: '',\r\n [RewardPackageType.ReloadableCANVisa]: '',\r\n};\r\n","import React from 'react';\r\nimport { Card, CardBody, Col, Row } from 'reactstrap';\r\n\r\nimport elements from 'config/elements';\r\nimport { checkBalanceUrls } from 'config/global';\r\nimport { L10nConsumer, L10nContext, L10nMessages, LocalizedDate, LocalizedMessage } from 'core/l10n/components';\r\nimport { RewardPackageType } from 'core/ovations-api/enums';\r\nimport { monetize } from 'core/util/strings';\r\nimport * as PortalApi from 'ovations-portal-api';\r\n\r\nexport interface RecentRewardsProps {\r\n rewards: PortalApi.Types.PortalCardRewardDetail[];\r\n}\r\n\r\n// tslint:disable-next-line cyclomatic-complexity\r\nconst getCardAction = (reward: PortalApi.Types.PortalCardRewardDetail): keyof L10nMessages => {\r\n switch (reward.rewardPackageType) {\r\n case RewardPackageType.SingleLoadUSA:\r\n case RewardPackageType.SingleLoadCAN:\r\n return 'dashboard_recentRewards_label_initialCard';\r\n case RewardPackageType.ReloadableUSA:\r\n case RewardPackageType.ReloadableCAN:\r\n if (!reward.isInitialCard) {\r\n return 'dashboard_recentRewards_label_cardReload';\r\n }\r\n return 'dashboard_recentRewards_label_initialCard';\r\n case RewardPackageType.ReloadableUSAGalileo:\r\n if (!reward.isInitialCard) {\r\n return 'dashboard_recentRewards_label_galileoReloadableReload';\r\n }\r\n return 'dashboard_recentRewards_label_galileoReloadableInitial';\r\n case RewardPackageType.VirtualUSA:\r\n return 'dashboard_recentRewards_label_virtualCard';\r\n case RewardPackageType.CheckUSA:\r\n return 'dashboard_recentRewards_label_virtualCard';\r\n case RewardPackageType.Points:\r\n return 'dashboard_recentRewards_label_virtualCard';\r\n case RewardPackageType.SingleLoadUSAGalileo:\r\n return 'dashboard_recentRewards_label_singleLoadUSAGalileo';\r\n default:\r\n return 'dashboard_recentRewards_label_initialCard';\r\n }\r\n};\r\n\r\nconst getHeadingText = (reward: PortalApi.Types.PortalCardRewardDetail, l10n: L10nContext): string => {\r\n let headingText = `${monetize(reward.amount)} ${l10n.localizeMessage(getCardAction(reward))}`;\r\n\r\n if (reward.rewardPackageType === RewardPackageType.RetailCard) {\r\n headingText = `${monetize(reward.amount)} ${reward.rewardPackageName}`;\r\n }\r\n\r\n if (reward.numberOfClaims > 0 && PortalApi.PortalCardRewardDetail.isReloadable(reward)) {\r\n const associatedItems: keyof L10nMessages =\r\n reward.numberOfClaims > 1\r\n ? 'dashboard_recentRewards_associatedItem_plural'\r\n : 'dashboard_recentRewards_associatedItem';\r\n headingText += ` (${reward.numberOfClaims} ${l10n.localizeMessage(associatedItems)})`;\r\n }\r\n\r\n return headingText;\r\n};\r\n\r\nconst renderReward = (reward: PortalApi.Types.PortalCardRewardDetail, index: number) => {\r\n const { recentRewardsDescription } = elements.dashboard.class;\r\n\r\n return (\r\n \r\n \r\n \r\n
    \r\n \r\n {(l10n) => {\r\n const headingText = getHeadingText(reward, l10n);\r\n return (\r\n

    \r\n {headingText}\r\n

    \r\n );\r\n }}\r\n
    \r\n \r\n {' '}\r\n \r\n \r\n
    \r\n
    \r\n {reward.rewardPackageType !== RewardPackageType.RetailCard && (\r\n \r\n \r\n \r\n )}\r\n {reward.rewardPackageType !== (RewardPackageType.VirtualUSA && RewardPackageType.RetailCard) ? (\r\n \r\n \r\n \r\n ) : (\r\n
     
    \r\n )}\r\n
    \r\n
    \r\n
    \r\n \r\n );\r\n};\r\n\r\nconst RecentRewards: React.SFC = (props) => {\r\n return (\r\n <>\r\n

    \r\n \r\n

    \r\n {props.rewards.length > 0 ? (\r\n {props.rewards.map(renderReward)}\r\n ) : (\r\n

    \r\n \r\n

    \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default RecentRewards;\r\n","import classNames from 'classnames';\r\nimport React from 'react';\r\nimport { Card, CardBody, CardFooter, Col, Row } from 'reactstrap';\r\n\r\nimport elements from 'config/elements';\r\nimport { LocalizedDate, LocalizedMessage } from 'core/l10n/components';\r\nimport { monetize } from 'core/util/strings';\r\nimport * as PortalApi from 'ovations-portal-api';\r\n\r\nexport interface RewardsLimitTrackerProps {\r\n rewardsLimits: PortalApi.Types.PromotionRewardsLimit[];\r\n}\r\n\r\nconst renderGroupRewardLimitFooter = (reward: PortalApi.Types.PromotionRewardsLimit) => {\r\n if (!reward.promotionGroupRewardLimit || !reward.promotionGroupRewardLimit.endDate) {\r\n return;\r\n }\r\n return (\r\n \r\n {' '}\r\n \r\n \r\n );\r\n};\r\n\r\nconst renderRewardsLimit = (reward: PortalApi.Types.PromotionRewardsLimit, index: number) => {\r\n return (\r\n \r\n \r\n \r\n
    \r\n
    {reward.name}
    \r\n {reward.dollarRewardLimit != null && (\r\n
    \r\n
    \r\n {monetize(reward.dollarRewardLimit.total - reward.dollarRewardLimit.used)}{' '}\r\n \r\n \r\n \r\n
    \r\n
    \r\n {monetize(reward.dollarRewardLimit.total)}{' '}\r\n \r\n
    \r\n
    \r\n )}\r\n {reward.quantityRewardLimit != null && (\r\n <>\r\n
    \r\n \r\n {reward.quantityRewardLimit.total - reward.quantityRewardLimit.used}\r\n {' '}\r\n {reward.quantityRewardLimit.itemName}{' '}\r\n \r\n \r\n \r\n
    \r\n
    \r\n {reward.quantityRewardLimit.total} {reward.quantityRewardLimit.itemName}{' '}\r\n \r\n
    \r\n \r\n )}\r\n {reward.promotionGroupRewardLimit != null && (\r\n <>\r\n
    \r\n \r\n {monetize(\r\n reward.promotionGroupRewardLimit.total -\r\n reward.promotionGroupRewardLimit.used,\r\n )}\r\n {' '}\r\n \r\n \r\n \r\n
    \r\n
    \r\n {monetize(reward.promotionGroupRewardLimit.total)}{' '}\r\n \r\n
    \r\n \r\n )}\r\n
    \r\n
    \r\n {renderGroupRewardLimitFooter(reward)}\r\n
    \r\n \r\n );\r\n};\r\n\r\nconst RewardsLimitTracker: React.SFC = (props) => {\r\n if (!props.rewardsLimits.length) {\r\n return null;\r\n }\r\n return (\r\n <>\r\n

    \r\n \r\n

    \r\n {props.rewardsLimits.map(renderRewardsLimit)}\r\n \r\n );\r\n};\r\n\r\nexport default RewardsLimitTracker;\r\n","import React from 'react';\r\n\r\nimport elements from 'config/elements';\r\nimport { LocalizedMessage } from 'core/l10n/components';\r\nimport { monetize } from 'core/util/strings';\r\n\r\nexport interface RewardsTotalProps {\r\n total: number;\r\n}\r\n\r\nconst RewardsTotal: React.SFC = (props) => {\r\n return (\r\n
    \r\n

    \r\n \r\n

    \r\n
    \r\n \r\n {monetize(props.total)}\r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default RewardsTotal;\r\n","import { Action } from 'redux';\r\nimport { ThunkAction } from 'redux-thunk';\r\n\r\nimport createReducer from 'core/lib/createReducer';\r\nimport { PortalYearOverYearSummary } from 'core/ovations-api/definitions';\r\nimport S from 'redux-modules/definitions/RootState';\r\nimport YearOverYearSummaryState from 'redux-modules/definitions/YearOverYearSummaryState';\r\n\r\nimport * as OvationsPortalApi from 'ovations-portal-api';\r\n\r\nexport const emptyYearOverYearSummary: PortalYearOverYearSummary = {\r\n currentYearGrossUnits: 0,\r\n priorYearGrossUnits: 0,\r\n lastUploadedDate: null,\r\n};\r\n\r\nexport const initialState: YearOverYearSummaryState = {\r\n map: {},\r\n};\r\n\r\nconst { reducer, update } = createReducer('YearOverYearSummary/UPDATE', initialState);\r\nexport const yearOverYearSummaryReducer = reducer;\r\n\r\nexport const actions = {\r\n update,\r\n\r\n fetchSummary(year: number): ThunkAction, S, void, Action> {\r\n return async (dispatch) => {\r\n const map = await OvationsPortalApi.YearOverYearSummary.fetchSummary(year);\r\n dispatch(update({ map }));\r\n };\r\n },\r\n};\r\n","import { Dictionary, first } from 'lodash';\r\nimport React from 'react';\r\nimport { Input, Label } from 'reactstrap';\r\n\r\nimport elements from 'config/elements';\r\nimport { LocalizedDate, LocalizedMessage } from 'core/l10n/components';\r\nimport * as OvationsApi from 'core/ovations-api';\r\nimport { emptyYearOverYearSummary } from 'redux-modules/yearOverYearSummary';\r\n\r\nexport interface YearOverYearTrackerProps {\r\n yearOverYearSummaries: Dictionary;\r\n yearOverYearTrackerGoal: number | null;\r\n yearOverYearTrackerTitle: string | null;\r\n yearOverYearTrackerUnits: string | null;\r\n}\r\n\r\nexport interface YearOverYearTrackerState {\r\n selectedYear: string;\r\n}\r\n\r\nexport default class YearOverYearTracker extends React.Component {\r\n constructor(props: YearOverYearTrackerProps) {\r\n super(props);\r\n this.state = this.getInitialState();\r\n }\r\n\r\n getInitialState(): YearOverYearTrackerState {\r\n const firstKey = first(this.getSortedYears());\r\n const selectedYear = firstKey == null ? '' : firstKey;\r\n return { selectedYear };\r\n }\r\n\r\n getSelectedYearOverYearSummary(): OvationsApi.Types.PortalYearOverYearSummary {\r\n const selectedYearOverYearSummary = this.props.yearOverYearSummaries[this.state.selectedYear];\r\n return selectedYearOverYearSummary == null ? emptyYearOverYearSummary : selectedYearOverYearSummary;\r\n }\r\n\r\n getSortedYears(): string[] {\r\n return Object.keys(this.props.yearOverYearSummaries).sort().reverse();\r\n }\r\n\r\n onChangeYear: React.ChangeEventHandler = (e) => {\r\n const selectedYear = e.currentTarget.value;\r\n this.setState({ selectedYear });\r\n };\r\n\r\n renderStatus() {\r\n const { props } = this;\r\n const selectedYearOverYearSummary = this.getSelectedYearOverYearSummary();\r\n const wholePriorGrossUnits = Math.round(selectedYearOverYearSummary.priorYearGrossUnits);\r\n const wholeCurrentGrossUnits = Math.round(selectedYearOverYearSummary.currentYearGrossUnits);\r\n const yoyVariance = (wholePriorGrossUnits - wholeCurrentGrossUnits) / wholePriorGrossUnits;\r\n const yoyPercentValue = Math.abs(yoyVariance * 100);\r\n const yoyTrendIsUp = wholeCurrentGrossUnits >= wholePriorGrossUnits && yoyPercentValue >= 0;\r\n const yoyPercentFormatted = yoyPercentValue.toFixed(2);\r\n\r\n const legibleCurrentGross = this.renderFormattedNumber(wholeCurrentGrossUnits);\r\n if (selectedYearOverYearSummary.priorYearGrossUnits === 0) {\r\n return (\r\n

    \r\n \r\n

    \r\n );\r\n }\r\n return (\r\n <>\r\n \r\n {yoyTrendIsUp ? '+' : '-'}\r\n {yoyPercentFormatted}%\r\n \r\n
    \r\n {legibleCurrentGross} {props.yearOverYearTrackerUnits}\r\n
    \r\n \r\n );\r\n }\r\n\r\n renderFormattedNumber = (unformattedNumber: number) => unformattedNumber.toLocaleString('en-US');\r\n\r\n renderYearDropdown() {\r\n const sortedYears = this.getSortedYears();\r\n return (\r\n
    \r\n \r\n \r\n \r\n {sortedYears.map((key) => (\r\n \r\n ))}\r\n \r\n
    \r\n );\r\n }\r\n\r\n render() {\r\n const { props } = this;\r\n const selectedYearOverYearSummary = this.getSelectedYearOverYearSummary();\r\n const wholePriorGrossUnits = Math.round(selectedYearOverYearSummary.priorYearGrossUnits);\r\n const legiblePriorGross = this.renderFormattedNumber(wholePriorGrossUnits);\r\n\r\n return (\r\n
    \r\n

    \r\n {props.yearOverYearTrackerTitle}\r\n {': '}\r\n \r\n {props.yearOverYearTrackerGoal}\r\n {'% '}\r\n \r\n \r\n

    \r\n {this.renderYearDropdown()}\r\n
    {this.renderStatus()}
    \r\n

    \r\n {legiblePriorGross}{' '}\r\n {props.yearOverYearTrackerUnits}\r\n

    \r\n

    \r\n {' '}\r\n {selectedYearOverYearSummary.lastUploadedDate && (\r\n \r\n )}\r\n

    \r\n
    \r\n );\r\n }\r\n}\r\n","import classNames from 'classnames';\r\nimport React from 'react';\r\nimport { Button, Input, Label } from 'reactstrap';\r\n\r\nimport PromotionOptionsList from 'components/promotions/PromotionOptionsList';\r\nimport elements from 'config/elements';\r\nimport { L10nConsumer, LocalizedMessage } from 'core/l10n/components';\r\nimport * as OvationsPortalApi from 'ovations-portal-api';\r\n\r\ninterface SubmitClaimCardProps {\r\n onChange: React.ChangeEventHandler;\r\n onSelectPromotion: (promotion: OvationsPortalApi.Types.Promotion) => void;\r\n promotions: OvationsPortalApi.Types.Promotion[];\r\n promotionNumber: number | null;\r\n}\r\n\r\ninterface SubmitClaimCardState {\r\n wasValidated: boolean;\r\n isSubmitClaim: boolean;\r\n}\r\n\r\nexport default class SubmitClaimCard extends React.Component {\r\n constructor(props: SubmitClaimCardProps) {\r\n super(props);\r\n\r\n this.state = this.getInitialState();\r\n }\r\n\r\n getInitialState(): SubmitClaimCardState {\r\n return {\r\n wasValidated: false,\r\n isSubmitClaim: true,\r\n };\r\n }\r\n\r\n onSubmitClaim: React.FormEventHandler = (e) => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n const isValid = e.currentTarget.checkValidity();\r\n if (!isValid) {\r\n this.setState({ wasValidated: true });\r\n return;\r\n }\r\n const promotion = this.props.promotions.find((p) => p.number === this.props.promotionNumber);\r\n if (!promotion) {\r\n return;\r\n }\r\n this.props.onSelectPromotion(promotion);\r\n };\r\n\r\n renderPromotionSelect() {\r\n const { props } = this;\r\n const { promotions } = props;\r\n\r\n return (\r\n \r\n {(l10n) => (\r\n <>\r\n \r\n \r\n \r\n \r\n Selection is required\r\n \r\n )}\r\n \r\n );\r\n }\r\n\r\n render() {\r\n const { props, state } = this;\r\n const { promotions } = props;\r\n\r\n return (\r\n promotions.length > 0 && (\r\n \r\n

    \r\n \r\n

    \r\n
    \r\n {this.renderPromotionSelect()}\r\n
    \r\n
    \r\n \r\n \r\n \r\n
    \r\n \r\n )\r\n );\r\n }\r\n}\r\n","import { push } from 'connected-react-router';\r\nimport React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { Link } from 'react-router-dom';\r\nimport { Modal, ModalBody, ModalFooter, ModalHeader } from 'reactstrap';\r\n\r\nimport SubmitClaimCard from 'components/dashparts/SubmitClaimCard';\r\nimport elements from 'config/elements';\r\nimport * as routes from 'config/routes';\r\nimport ContainerProps from 'containers/definitions/ContainerProps';\r\nimport CountryCode from 'core/enums/CountryCode';\r\nimport { LocalizedMessage } from 'core/l10n/components';\r\nimport toPath from 'core/lib/toPath';\r\nimport FormConfigType from 'enums/FormConfigType';\r\nimport * as OvationsPortalApi from 'ovations-portal-api';\r\nimport { selectors as accountSelectors } from 'redux-modules/account';\r\nimport { hasTaxInformation } from 'redux-modules/customer';\r\nimport { selectors as promotionSelectors } from 'redux-modules/promotion';\r\nimport withData from 'lib/withData';\r\nimport { profileSettingsLoader } from 'loaders/profileSettingsLoader';\r\n\r\nexport type PromotionContainerProps = ContainerProps;\r\n\r\ninterface PromotionContainerState {\r\n promotionNumber: number | null;\r\n isActionRequired: boolean;\r\n}\r\n\r\nexport class PromotionContainer extends React.Component {\r\n constructor(props: PromotionContainerProps) {\r\n super(props);\r\n this.state = this.getInitialState();\r\n }\r\n\r\n getInitialState() {\r\n let promotionNumber: number | null = null;\r\n const promotions = this.props.promotion.list;\r\n if (promotions.length === 1) {\r\n const firstPromotion = promotions[0];\r\n promotionNumber = firstPromotion.number;\r\n }\r\n return {\r\n promotionNumber,\r\n isActionRequired: false,\r\n };\r\n }\r\n\r\n isDateOfBirthRequired = (promotion: OvationsPortalApi.Types.Promotion): boolean => {\r\n return (\r\n !accountSelectors.hasDateOfBirth(this.props.account) &&\r\n promotionSelectors.hasReloadableRewardPackage(promotion)\r\n );\r\n };\r\n\r\n isTaxableFieldsRequired = (promotion: OvationsPortalApi.Types.Promotion): boolean => {\r\n const { global } = this.props;\r\n if (!global.portal) {\r\n return false;\r\n }\r\n return (\r\n global.portal.enableTaxableIncomeForm &&\r\n promotion.isTaxable &&\r\n !hasTaxInformation(this.props.account.me, this.props.profileSettings.disableSecurityNumberCollection)\r\n );\r\n };\r\n\r\n isFieldRequiredForGalileo = (promotion: OvationsPortalApi.Types.Promotion) => {\r\n const { account } = this.props;\r\n if (account.me) {\r\n return (\r\n account.me.address.country === CountryCode.USA &&\r\n ((!accountSelectors.hasDateOfBirth(this.props.account) && promotion.requiresDateOfBirth) ||\r\n (!account.me.ssn &&\r\n promotion.requiresSecurityNumber &&\r\n !this.props.profileSettings.disableSecurityNumberCollection))\r\n );\r\n }\r\n return false;\r\n };\r\n\r\n onChange: React.ChangeEventHandler = (e) => {\r\n const promotionNumber = parseInt(e.currentTarget.value, 10);\r\n this.setState({ promotionNumber });\r\n };\r\n\r\n onSelectPromotion = (promotion: OvationsPortalApi.Types.Promotion) => {\r\n if (\r\n this.isTaxableFieldsRequired(promotion) ||\r\n this.isDateOfBirthRequired(promotion) ||\r\n this.isFieldRequiredForGalileo(promotion) ||\r\n !accountSelectors.isDateOfBirthValid(this.props.account.me)\r\n ) {\r\n this.toggleActionRequired();\r\n } else {\r\n const submitClaimUrl = // promotion.rewardPrefundEnabled\r\n // ? toPath(routes.SELECT_CLAIM_TYPE, { promotionNumber: promotion.number })\r\n toPath(routes.CREATE_CLAIM, {\r\n promotionNumber: promotion.number,\r\n formConfigType: FormConfigType.Claim,\r\n });\r\n this.props.dispatch(push(submitClaimUrl));\r\n }\r\n };\r\n\r\n toggleActionRequired = () => {\r\n this.setState({\r\n isActionRequired: !this.state.isActionRequired,\r\n });\r\n };\r\n\r\n renderActionRequiredModal() {\r\n return (\r\n \r\n this.toggleActionRequired()}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n this.toggleActionRequired()}\r\n className=\"btn btn-primary\"\r\n >\r\n \r\n \r\n \r\n \r\n );\r\n }\r\n\r\n render() {\r\n return (\r\n <>\r\n \r\n {this.renderActionRequiredModal()}\r\n \r\n );\r\n }\r\n}\r\nconst PromotionContainerWithData = withData(profileSettingsLoader)(PromotionContainer);\r\nexport default connect(/* istanbul ignore next */ (state) => state)(PromotionContainerWithData);\r\n","import { Action } from 'redux';\r\nimport { ThunkAction } from 'redux-thunk';\r\n\r\nimport createReducer from 'core/lib/createReducer';\r\nimport * as PortalApi from 'ovations-portal-api';\r\nimport DashboardState from 'redux-modules/definitions/DashboardState';\r\nimport S from 'redux-modules/definitions/RootState';\r\n\r\nexport const emptyDashboardItems: PortalApi.Types.Dashboard = {\r\n imageRotatorTitle: null,\r\n imageRotatorImages: [],\r\n enableYearOverYearTracker: false,\r\n enablePointTracker: false,\r\n pointTrackerTitle: null,\r\n pointTrackerGoal: null,\r\n trackerBackgroundUrl: null,\r\n trackerIcon: null,\r\n yearOverYearTrackerGoal: null,\r\n yearOverYearTrackerTitle: null,\r\n yearOverYearTrackerUnits: null,\r\n viewPointBalance: null,\r\n};\r\n\r\nexport const initialState: DashboardState = {\r\n items: emptyDashboardItems,\r\n};\r\n\r\nconst { reducer, update } = createReducer('dashboard/UPDATE', initialState);\r\nexport const dashboardReducer = reducer;\r\n\r\nexport const actions = {\r\n update,\r\n\r\n fetch(): ThunkAction, S, void, Action> {\r\n return async (dispatch) => {\r\n const items = await PortalApi.Dashboard.fetch();\r\n dispatch(update({ items }));\r\n };\r\n },\r\n};\r\n","import { Action } from 'redux';\r\nimport { ThunkAction } from 'redux-thunk';\r\n\r\nimport createReducer from 'core/lib/createReducer';\r\nimport * as OvationsPortalApi from 'ovations-portal-api';\r\nimport RewardState from 'redux-modules/definitions/RewardState';\r\nimport S from 'redux-modules/definitions/RootState';\r\n\r\nexport const initialState: RewardState = {\r\n items: [],\r\n total: 0,\r\n};\r\n\r\nconst { reducer, update } = createReducer('reward/UPDATE', initialState);\r\nexport const rewardReducer = reducer;\r\n\r\nexport const actions = {\r\n update,\r\n\r\n fetchAll: (): ThunkAction, S, void, Action> => {\r\n return async (dispatch) => {\r\n const items = await OvationsPortalApi.PortalCardRewardDetail.fetchAll();\r\n dispatch(update({ items }));\r\n };\r\n },\r\n\r\n fetchTotal: (): ThunkAction, S, void, Action> => {\r\n return async (dispatch) => {\r\n const total = await OvationsPortalApi.PortalCardRewardDetail.fetchTotal();\r\n dispatch(update({ total }));\r\n };\r\n },\r\n};\r\n","import { Action } from 'redux';\r\nimport { ThunkAction } from 'redux-thunk';\r\n\r\nimport createReducer from 'core/lib/createReducer';\r\nimport * as OvationsPortalApi from 'ovations-portal-api';\r\nimport RewardsLimitState from 'redux-modules/definitions/RewardsLimitState';\r\nimport S from 'redux-modules/definitions/RootState';\r\n\r\nexport const initialState: RewardsLimitState = {\r\n list: [],\r\n};\r\n\r\nconst { reducer, update } = createReducer('reward/UPDATE', initialState);\r\nexport const rewardsLimitReducer = reducer;\r\n\r\nexport const actions = {\r\n update,\r\n\r\n fetchRewardsLimit: (): ThunkAction, S, void, Action> => {\r\n return async (dispatch) => {\r\n const rewardsLimit = await OvationsPortalApi.RewardsLimit.fetch();\r\n dispatch(update({ list: rewardsLimit }));\r\n };\r\n },\r\n};\r\n","import ContainerProps from 'containers/definitions/ContainerProps';\r\nimport { LoaderConfig } from 'lib/withData';\r\nimport * as dashboard from 'redux-modules/dashboard';\r\nimport * as promotion from 'redux-modules/promotion';\r\nimport * as claim from 'redux-modules/claim';\r\nimport * as reward from 'redux-modules/reward';\r\nimport * as rewardsLimit from 'redux-modules/rewardsLimit';\r\nimport * as yearOverYearSummary from 'redux-modules/yearOverYearSummary';\r\n\r\nexport const dashboardPageLoader: LoaderConfig = {\r\n memoizer: (props) => props.account.me && props.account.me.id,\r\n needsData: () => true,\r\n fetchData: async (props, showError, cache) => {\r\n if (cache) {\r\n cache.clear();\r\n }\r\n const currentYear = new Date().getFullYear();\r\n const customerId = (props.account.me && props.account.me.id) || '';\r\n await Promise.all([\r\n props.dispatch(dashboard.actions.fetch()),\r\n props.dispatch(promotion.actions.fetchAll()),\r\n props.dispatch(reward.actions.fetchAll()),\r\n props.dispatch(reward.actions.fetchTotal()),\r\n props.dispatch(yearOverYearSummary.actions.fetchSummary(currentYear)),\r\n props.dispatch(rewardsLimit.actions.fetchRewardsLimit()),\r\n props.dispatch(claim.actions.fetchRedemptionClaims(customerId)),\r\n ]);\r\n },\r\n};\r\n","import React from 'react';\r\n\r\nimport elements from 'config/elements';\r\nimport { Button, Card, CardBody, Row, Col } from 'reactstrap';\r\nimport { ClaimDetail } from 'ovations-portal-api/definitions';\r\nimport { LocalizedMessage, LocalizedDate } from 'core/l10n/components';\r\nimport { Link } from 'react-router-dom';\r\nimport * as routes from 'config/routes';\r\nimport toPath from 'core/lib/toPath';\r\nimport ValidatedClaimAmountHeader from 'components/claims/ValidatedClaimAmountHeader';\r\n\r\nexport interface RedeemClaimProps {\r\n claim: ClaimDetail;\r\n}\r\n\r\nconst renderButton = (claimNumber: number) => {\r\n const path = toPath(routes.EDIT_CLAIM, {\r\n claimNumber,\r\n });\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst RedeemClaim: React.FC = (props) => {\r\n const { claim } = props;\r\n const expirationDate = claim.expirationDate || '';\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n

    {claim.promotion.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
    {renderButton(claim.number)}
    \r\n
    \r\n #{claim.number}\r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default RedeemClaim;\r\n","/* eslint-disable @typescript-eslint/no-non-null-assertion */\r\nimport classNames from 'classnames';\r\nimport React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { Col, ColProps, Row } from 'reactstrap';\r\n\r\nimport PointBalance from 'components/dashparts/PointBalance';\r\nimport PointTracker from 'components/dashparts/PointTracker';\r\nimport RecentRewards from 'components/dashparts/RecentRewards';\r\nimport RewardsLimitTracker from 'components/dashparts/RewardsLimitTracker';\r\nimport RewardsTotal from 'components/dashparts/RewardsTotal';\r\nimport YearOverYearTracker from 'components/dashparts/YearOverYearTracker';\r\nimport LocalizedTitle from 'components/LocalizedTitle';\r\nimport * as breakpoints from 'config/breakpoints';\r\nimport elements from 'config/elements';\r\nimport ContainerProps from 'containers/definitions/ContainerProps';\r\nimport PromotionContainer from 'containers/PromotionContainer';\r\nimport { LocalizedMessage } from 'core/l10n/components';\r\nimport { getRGB } from 'core/util/colors';\r\nimport withData from 'lib/withData';\r\nimport { dashboardPageLoader } from 'loaders/dashboardLoaders';\r\nimport { rewardCatalogEndpoint } from 'ovations-portal-api/constants';\r\nimport { emptyProfile } from 'redux-modules/account';\r\nimport * as claim from 'redux-modules/claim';\r\nimport RedeemClaim from 'components/dashparts/RedeemClaim';\r\nimport { ClaimDetail } from 'ovations-portal-api/definitions';\r\nimport { orderBy } from 'lodash';\r\n\r\nconst mq = window.matchMedia(breakpoints.BP_BOOTSTRAP_LG);\r\nconst columnWidths: ColProps = { xs: 12, lg: 6 };\r\n\r\ninterface DashboardContainerState {\r\n isDesktop: boolean;\r\n}\r\n\r\nexport class DashboardContainer extends React.Component {\r\n constructor(props: ContainerProps) {\r\n super(props);\r\n this.state = this.getInitialState();\r\n }\r\n\r\n getInitialState(): DashboardContainerState {\r\n return {\r\n isDesktop: false,\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n mq.addListener(this.isDesktop);\r\n this.setState({\r\n isDesktop: mq.matches,\r\n });\r\n if (this.props.account.me && this.props.account.me.id) {\r\n this.props.dispatch(claim.actions.fetchRedemptionClaims(this.props.account.me.id));\r\n }\r\n }\r\n\r\n componentWillUnmount() {\r\n mq.removeListener(this.isDesktop);\r\n }\r\n\r\n onShopCatalogClick = async () => {\r\n window.open(rewardCatalogEndpoint, '_blank');\r\n };\r\n\r\n isDesktop = (e: MediaQueryListEvent): void => {\r\n this.setState({\r\n isDesktop: e.matches,\r\n });\r\n };\r\n\r\n renderTrackerEnhancements() {\r\n const { trackerBackgroundUrl } = this.props.dashboard.items;\r\n const { portal } = this.props.global;\r\n const navbarColor = portal && portal.navBarColor ? portal.navBarColor : 'ffffff';\r\n const navBarRGB = getRGB(parseInt(`${navbarColor}`, 16));\r\n const gradientStart = `rgba(${navBarRGB[0]}, ${navBarRGB[1]}, ${navBarRGB[2]}, 1)`;\r\n const gradientStop = `rgba(${navBarRGB[0]}, ${navBarRGB[1]}, ${navBarRGB[2]}, .2)`;\r\n const gradientDirection = this.state.isDesktop ? 'right' : 'bottom';\r\n const gradientDefinition = {\r\n backgroundImage: `linear-gradient(to ${gradientDirection}, ${gradientStart} 15%, ${gradientStop})`,\r\n };\r\n\r\n if (!trackerBackgroundUrl) {\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 renderTrackers() {\r\n const { trackerBackgroundUrl, enablePointTracker, enableYearOverYearTracker } = this.props.dashboard.items;\r\n const hasBackground = !!trackerBackgroundUrl;\r\n const shouldSplitLayout = enablePointTracker && enableYearOverYearTracker;\r\n const trackerColumnWidths: ColProps = {\r\n ...columnWidths,\r\n lg: shouldSplitLayout ? 6 : 12,\r\n };\r\n\r\n if (!enablePointTracker && !enableYearOverYearTracker) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n
    \r\n {this.renderTrackerEnhancements()}\r\n \r\n {enablePointTracker && (\r\n \r\n
    {this.renderPointTracker()}
    \r\n \r\n )}\r\n {enableYearOverYearTracker && (\r\n \r\n
    {this.renderYearOverYearTracker()}
    \r\n \r\n )}\r\n
    \r\n
    \r\n \r\n );\r\n }\r\n\r\n renderPageTitle() {\r\n const me = this.props.account.me ? this.props.account.me : emptyProfile;\r\n return (\r\n
    \r\n \r\n

    \r\n \r\n

    \r\n
    \r\n );\r\n }\r\n\r\n renderPointTracker() {\r\n const { pointTrackerGoal, pointTrackerTitle, trackerIcon, trackerBackgroundUrl } = this.props.dashboard.items;\r\n const { portal } = this.props.global;\r\n const pointLedgerTotalSalesIncentiveCalculated = this.props.pointLedger.totalSalesIncentiveCalculated;\r\n const pointLedgerDate = this.props.pointLedger.date;\r\n const hasBackground = !!trackerBackgroundUrl;\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n renderYearOverYearTracker() {\r\n const { yearOverYearTrackerGoal, yearOverYearTrackerTitle, yearOverYearTrackerUnits } =\r\n this.props.dashboard.items;\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n renderClaimSubmitter() {\r\n const { portal } = this.props.global;\r\n return (\r\n !!portal &&\r\n portal.hasPromotions && (\r\n \r\n
    \r\n \r\n
    \r\n \r\n )\r\n );\r\n }\r\n\r\n renderRedeemClaim() {\r\n const { redemptionClaims } = this.props.claim;\r\n const orderedRedemptionClaims = orderBy(redemptionClaims, (x) => x.expirationDate, 'asc');\r\n\r\n const claims = orderedRedemptionClaims.map((claim: ClaimDetail) => {\r\n return (\r\n \r\n \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n );\r\n });\r\n return claims;\r\n }\r\n\r\n renderPointBalance() {\r\n const pointTotal = this.props.pointLedger.total ? this.props.pointLedger.total : 0;\r\n const displayPointBalance = this.props.dashboard.items.viewPointBalance\r\n ? this.props.dashboard.items.viewPointBalance\r\n : false;\r\n\r\n return (\r\n displayPointBalance && (\r\n \r\n \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n )\r\n );\r\n }\r\n\r\n renderRecentRewards() {\r\n const { portal } = this.props.global;\r\n return (\r\n !!portal &&\r\n portal.hasCurrencyRewards && (\r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n )\r\n );\r\n }\r\n\r\n renderRewardsTotal() {\r\n const { portal } = this.props.global;\r\n return (\r\n !!portal &&\r\n portal.hasCurrencyRewards && (\r\n \r\n
    \r\n \r\n
    \r\n \r\n )\r\n );\r\n }\r\n\r\n renderImageRotator() {\r\n const { imageRotatorTitle, imageRotatorImages } = this.props.dashboard.items;\r\n const shouldRenderRotator = imageRotatorImages.length > 0;\r\n\r\n return (\r\n shouldRenderRotator && (\r\n
    \r\n {imageRotatorTitle && (\r\n

    {this.props.dashboard.items.imageRotatorTitle}

    \r\n )}\r\n \r\n {imageRotatorImages.map((rotatorImage, i) => {\r\n const img = (\r\n {rotatorImage.altText\r\n );\r\n return (\r\n // eslint-disable-next-line react/no-array-index-key\r\n \r\n {!rotatorImage.linkUrl ? (\r\n img\r\n ) : (\r\n \r\n {img}\r\n \r\n )}\r\n \r\n );\r\n })}\r\n \r\n
    \r\n )\r\n );\r\n }\r\n\r\n render() {\r\n return (\r\n
    \r\n {this.renderPageTitle()}\r\n
    {this.renderRedeemClaim()}
    \r\n {this.renderTrackers()}\r\n
    \r\n \r\n
    \r\n
    \r\n \r\n {this.renderClaimSubmitter()}\r\n {this.renderRewardsTotal()}\r\n \r\n {this.renderPointBalance()}\r\n
    \r\n {this.renderRecentRewards()}\r\n {this.renderImageRotator()}\r\n
    \r\n );\r\n }\r\n}\r\n\r\nconst DashboardContainerWithData = withData(dashboardPageLoader)(DashboardContainer);\r\nexport default connect(/* istanbul ignore next */ (state) => state)(DashboardContainerWithData);\r\n","export const BP_BOOTSTRAP_LG = '(min-width: 992px)';\r\nexport const BP_REPORT_DESKTOP = '(min-width: 800px)';\r\n","/* eslint-disable react/no-danger */\r\nimport * as OvationsPortalApi from 'ovations-portal-api';\r\nimport React from 'react';\r\nimport { Button, Collapse } from 'reactstrap';\r\n\r\ninterface FAQItemProps {\r\n answerIndex: number;\r\n sectionIndex: number;\r\n item: OvationsPortalApi.Types.FAQSectionItem;\r\n}\r\n\r\ninterface FAQItemState {\r\n isOpen: boolean;\r\n}\r\n\r\nexport default class FAQItem extends React.Component {\r\n constructor(props: FAQItemProps) {\r\n super(props);\r\n\r\n this.state = this.getInitialState();\r\n }\r\n\r\n getInitialState() {\r\n return {\r\n isOpen: false,\r\n };\r\n }\r\n\r\n getIdentifierString(isQuestion = true) {\r\n const { answerIndex, sectionIndex } = this.props;\r\n const queryPart = isQuestion ? 'question' : 'answer';\r\n return `section${sectionIndex}${queryPart}${answerIndex}`;\r\n }\r\n\r\n toggle = () => {\r\n const { isOpen } = this.state;\r\n const trigger = document.querySelector(`#${this.getIdentifierString()}`);\r\n if (trigger) {\r\n // reactstrap's Control component doesn't toggle aria-expanded\r\n trigger.setAttribute('aria-expanded', `${!isOpen}`);\r\n }\r\n this.setState({ isOpen: !isOpen });\r\n };\r\n\r\n render() {\r\n const { item } = this.props;\r\n\r\n return (\r\n
    \r\n \r\n

    {item.title}

    \r\n \r\n \r\n
    \r\n \r\n
    \r\n );\r\n }\r\n}\r\n","import { Action } from 'redux';\r\nimport { ThunkAction } from 'redux-thunk';\r\n\r\nimport createReducer from 'core/lib/createReducer';\r\nimport * as PortalApi from 'ovations-portal-api';\r\nimport FAQState from 'redux-modules/definitions/FAQState';\r\nimport S from 'redux-modules/definitions/RootState';\r\n\r\nexport const initialState = {};\r\n\r\nconst { reducer, update } = createReducer('faq/UPDATE', initialState);\r\nexport const faqReducer = reducer;\r\n\r\nexport const actions = {\r\n update,\r\n\r\n fetch(): ThunkAction, S, void, Action> {\r\n return async (dispatch) => {\r\n const items: FAQState = await PortalApi.FAQ.fetch();\r\n dispatch(update({ items }));\r\n };\r\n },\r\n};\r\n","import ContainerProps from 'containers/definitions/ContainerProps';\r\nimport { LoaderConfig } from 'lib/withData';\r\nimport * as faq from 'redux-modules/FAQ';\r\n\r\nexport const FAQLoader: LoaderConfig = {\r\n memoizer: () => 'faq',\r\n needsData: () => true,\r\n fetchData: (props) => props.dispatch(faq.actions.fetch()),\r\n};\r\n","/* eslint-disable react/no-array-index-key */\r\nimport React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { Card, CardBody, CardHeader } from 'reactstrap';\r\n\r\nimport FAQItem from 'components/FAQItem';\r\nimport LocalizedTitle from 'components/LocalizedTitle';\r\nimport ContainerProps from 'containers/definitions/ContainerProps';\r\nimport { LocalizedMessage } from 'core/l10n/components';\r\nimport withData from 'lib/withData';\r\nimport { FAQLoader } from 'loaders/faqLoaders';\r\nimport * as OvationsPortalApi from 'ovations-portal-api';\r\n\r\nexport type FAQContainerProps = ContainerProps<{}>;\r\n\r\nexport class FAQContainer extends React.Component {\r\n renderQuestions(items: OvationsPortalApi.Types.FAQSectionItem[], sectionIndex: number) {\r\n return items.map((item, index) => {\r\n return ;\r\n });\r\n }\r\n\r\n renderSections(faqSections: OvationsPortalApi.Types.FAQSection[]) {\r\n return faqSections.map((section, index) => {\r\n return (\r\n \r\n \r\n

    {section.title}

    \r\n
    \r\n {this.renderQuestions(section.items, index)}\r\n
    \r\n );\r\n });\r\n }\r\n\r\n renderError() {\r\n return (\r\n
    \r\n \r\n
    \r\n );\r\n }\r\n\r\n render() {\r\n let activeFAQ: OvationsPortalApi.Types.FAQSection[] = [];\r\n if (this.props.faq.items) {\r\n activeFAQ = this.props.faq.items.faqSections;\r\n }\r\n\r\n return (\r\n
    \r\n \r\n

    \r\n \r\n

    \r\n {activeFAQ.length ? this.renderSections(activeFAQ) : this.renderError()}\r\n
    \r\n );\r\n }\r\n}\r\n\r\nexport default connect(/* istanbul ignore next */ (state) => state)(withData(FAQLoader)(FAQContainer));\r\n","import React from 'react';\r\nimport { Link } from 'react-router-dom';\r\n\r\nimport elements from 'config/elements';\r\nimport * as routes from 'config/routes';\r\nimport { LocalizedMessage } from 'core/l10n/components';\r\n\r\nconst FAQPanel: React.SFC = () => (\r\n
    \r\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 FAQPanel;\r\n","import elements from 'config/elements';\r\nimport React from 'react';\r\nimport { Button, Input } from 'reactstrap';\r\n\r\nexport interface CardTypeMatcherProps {\r\n onMatch: (digits: string) => string | undefined;\r\n placeholder: string;\r\n buttonText: string;\r\n validationMessage: string;\r\n}\r\n\r\nexport interface CardTypeMatcherState {\r\n cardDigits: string;\r\n cardNotRecognized: boolean;\r\n}\r\nexport default class CardTypeMatcher extends React.Component {\r\n constructor(props: CardTypeMatcherProps) {\r\n super(props);\r\n this.state = {\r\n cardDigits: '',\r\n cardNotRecognized: false,\r\n };\r\n }\r\n\r\n onChange: React.ChangeEventHandler = (e) => {\r\n this.setState({ cardDigits: e.currentTarget.value });\r\n };\r\n\r\n onSubmit: React.FormEventHandler = (e) => {\r\n e.preventDefault();\r\n if (!this.state.cardDigits) {\r\n return;\r\n }\r\n const cardServicesUrl = this.props.onMatch(this.state.cardDigits);\r\n this.setState({ cardNotRecognized: !cardServicesUrl });\r\n };\r\n\r\n render() {\r\n return (\r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n {this.state.cardNotRecognized && (\r\n
    \r\n {this.props.validationMessage}\r\n
    \r\n )}\r\n
    \r\n );\r\n }\r\n}\r\n","import { faCreditCard, faListAlt } from '@fortawesome/free-regular-svg-icons';\r\nimport { faAngleDoubleRight, IconDefinition } from '@fortawesome/free-solid-svg-icons';\r\nimport React from 'react';\r\nimport { Button, Col, Row } from 'reactstrap';\r\n\r\nimport CardTypeMatcher from 'components/CardTypeMatcher';\r\nimport elements from 'config/elements';\r\nimport { L10nConsumer, LocalizedMessage } from 'core/l10n/components';\r\nimport FAIcon from 'core/ovations-components/FAIcon';\r\nimport * as PortalApi from 'ovations-portal-api';\r\n\r\nexport interface GreeterProps {\r\n home: PortalApi.Types.HomePage;\r\n toggleLogin: () => void;\r\n onRewardPackageMatch: (cardDigits: string) => string | undefined;\r\n}\r\n\r\ninterface ActionConfigurator {\r\n id: string;\r\n icon: IconDefinition;\r\n header: () => JSX.Element;\r\n description: () => JSX.Element;\r\n cta: (props: GreeterProps) => JSX.Element;\r\n}\r\n\r\nconst actionConfigurator: ActionConfigurator[] = [\r\n {\r\n id: 'existing-reward-cards',\r\n icon: faCreditCard,\r\n header: () => ,\r\n description: () => ,\r\n cta: (props: GreeterProps) => (\r\n \r\n {(l10n) => (\r\n \r\n )}\r\n \r\n ),\r\n },\r\n {\r\n id: 'check-claim-status',\r\n icon: faListAlt,\r\n header: () => ,\r\n description: () => ,\r\n cta: (props: GreeterProps) => (\r\n \r\n \r\n \r\n \r\n ),\r\n },\r\n];\r\n\r\nconst Greeter: React.FC = (props) => {\r\n const { home } = props;\r\n return (\r\n \r\n \r\n
    \r\n

    \r\n {home.submitClaimTitle}\r\n

    \r\n

    \r\n {home.submitClaimSubtitle}\r\n

    \r\n \r\n {home.submitClaimButtonText}\r\n \r\n

    \r\n \r\n \r\n \r\n \r\n \r\n \r\n

    \r\n
    \r\n \r\n \r\n {actionConfigurator.map((action, i) => (\r\n \r\n {i > 0 &&
    }\r\n \r\n \r\n
    \r\n \r\n
    \r\n \r\n \r\n

    {action.header()}

    \r\n
    {action.description()}
    \r\n
    {action.cta(props)}
    \r\n \r\n
    \r\n
    \r\n ))}\r\n \r\n
    \r\n );\r\n};\r\n\r\nexport default Greeter;\r\n","import { Action } from 'redux';\r\nimport { ThunkAction } from 'redux-thunk';\r\n\r\nimport createReducer from 'core/lib/createReducer';\r\nimport * as PortalApi from 'ovations-portal-api';\r\nimport PageSettingsState from 'redux-modules/definitions/PageSettingsState';\r\nimport S from 'redux-modules/definitions/RootState';\r\n\r\nexport const emptyPortalHome: PortalApi.Types.HomePage = {\r\n banner: {\r\n url: null,\r\n altText: null,\r\n },\r\n advertisements: [],\r\n submitClaimTitle: null,\r\n submitClaimSubtitle: null,\r\n submitClaimButtonText: null,\r\n};\r\n\r\nexport const initialState: PageSettingsState = {\r\n home: emptyPortalHome,\r\n};\r\n\r\nconst { reducer, update } = createReducer('pageSettings/UPDATE', initialState);\r\nexport const pageSettingsReducer = reducer;\r\n\r\nexport const actions = {\r\n update,\r\n\r\n fetchHome(): ThunkAction, S, void, Action> {\r\n return async (dispatch) => {\r\n const home = await PortalApi.Home.fetch();\r\n dispatch(update({ home }));\r\n };\r\n },\r\n};\r\n","import ContainerProps from 'containers/definitions/ContainerProps';\r\nimport { LoaderConfig } from 'lib/withData';\r\nimport * as pageSettings from 'redux-modules/pageSettings';\r\n\r\nexport const homeLoader: LoaderConfig = {\r\n memoizer: () => 'home',\r\n needsData: (props, prevProps) => !prevProps,\r\n fetchData: (props) => props.dispatch(pageSettings.actions.fetchHome()),\r\n};\r\n","import classNames from 'classnames';\r\nimport React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { Redirect } from 'react-router';\r\nimport { Col, Row } from 'reactstrap';\r\n\r\nimport FAQPanel from 'components/FAQPanel';\r\nimport Greeter from 'components/Greeter';\r\nimport elements from 'config/elements';\r\nimport * as routes from 'config/routes';\r\nimport ContainerProps from 'containers/definitions/ContainerProps';\r\nimport { LocalizedMessage } from 'core/l10n/components';\r\nimport ModalType from 'enums/ModalType';\r\nimport withData from 'lib/withData';\r\nimport { homeLoader } from 'loaders/homeLoaders';\r\nimport find from 'lodash/find';\r\nimport Advertisement from 'ovations-portal-api/definitions/Advertisement';\r\nimport * as account from 'redux-modules/account';\r\nimport * as layout from 'redux-modules/layout';\r\n\r\nexport class HomeContainer extends React.Component {\r\n toggleLogin = () => {\r\n this.props.dispatch(layout.actions.toggleModal(ModalType.Login));\r\n };\r\n\r\n getCardActivationUrl = (cardDigits: string) => {\r\n const { portal } = this.props.global;\r\n const activationUrls = find(portal?.cardActivationUrls, (url) => url.cardNumber === cardDigits);\r\n return activationUrls?.url;\r\n };\r\n\r\n onRewardPackageMatch = (cardDigits: string) => {\r\n const url = this.getCardActivationUrl(cardDigits);\r\n if (url) {\r\n window.open(url, '_blank');\r\n return url;\r\n }\r\n };\r\n\r\n renderBannerImage() {\r\n const { banner } = this.props.pageSettings.home;\r\n if (!banner.url) {\r\n return;\r\n }\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n renderAdvertisement(ad: Advertisement) {\r\n return (\r\n <>\r\n {ad.url && (\r\n \r\n )}\r\n
    \r\n

    {ad.title}

    \r\n {ad.subtitle &&

    {ad.subtitle}

    }\r\n {ad.body &&

    {ad.body}

    }\r\n
    \r\n \r\n );\r\n }\r\n\r\n renderAdvertisementAsColumn(ad: Advertisement, key: string, classes?: string) {\r\n return (\r\n
    \r\n {this.renderAdvertisement(ad)}\r\n
    \r\n );\r\n }\r\n\r\n renderAnchoredAdvertisement(ad: Advertisement, key: string, classes?: string) {\r\n return (\r\n \r\n {this.renderAdvertisement(ad)}\r\n \r\n );\r\n }\r\n\r\n renderAdvertisements() {\r\n const { advertisements } = this.props.pageSettings.home;\r\n const columnClasses = classNames(\r\n 'col-12 col-sm-6 flex-column flex-sm-column-reverse outline theme-highlight',\r\n elements.home.class.ad,\r\n );\r\n return (\r\n <>\r\n

    \r\n \r\n

    \r\n \r\n {advertisements.map((ad, i) =>\r\n ad.linkUrl\r\n ? this.renderAnchoredAdvertisement(ad, `ad-${i}`, columnClasses)\r\n : this.renderAdvertisementAsColumn(ad, `ad-${i}`, columnClasses),\r\n )}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n\r\n render() {\r\n if (account.selectors.isLoggedIn(this.props.account)) {\r\n const { location } = this.props.router;\r\n if (!location || location.pathname !== routes.DASHBOARD) {\r\n return ;\r\n }\r\n }\r\n const { portal } = this.props.global;\r\n return (\r\n
    \r\n

    {portal && portal.title ? portal.title : 'Reward Center'}

    \r\n {this.renderBannerImage()}\r\n \r\n {this.renderAdvertisements()}\r\n
    \r\n );\r\n }\r\n}\r\n\r\nexport default connect(/* istanbul ignore next */ (state) => state)(withData(homeLoader)(HomeContainer));\r\n","import { push } from 'connected-react-router';\r\nimport React from 'react';\r\nimport { connect } from 'react-redux';\r\n\r\nimport * as routes from 'config/routes';\r\nimport * as OvationsApi from 'core/ovations-api';\r\nimport { focus } from 'core/util/dom';\r\nimport NotificationType from 'enums/NotificationType';\r\nimport * as account from 'redux-modules/account';\r\nimport * as notification from 'redux-modules/notification';\r\nimport { profileSettingsLoader } from 'loaders/profileSettingsLoader';\r\nimport withData from 'lib/withData';\r\nimport { Form } from 'reactstrap';\r\nimport classNames from 'classnames';\r\nimport { LocalizedMessage } from 'core/l10n/components';\r\nimport { withProfileHandlers, WithProfileHandlerProps, ProfileFieldsOptions } from './withProfileHandlers';\r\n\r\nexport interface ProfileCreateProps extends WithProfileHandlerProps<{}> {}\r\n\r\ninterface ProfileCreateContainerState {\r\n registrationErrors: OvationsApi.Types.ErrorSummary;\r\n}\r\n\r\nexport class ProfileCreateContainer extends React.Component {\r\n form: React.RefObject;\r\n\r\n constructor(props: ProfileCreateProps) {\r\n super(props);\r\n\r\n this.form = React.createRef();\r\n this.state = {\r\n registrationErrors: {},\r\n };\r\n }\r\n\r\n onFormSubmit: React.FormEventHandler = async (e) => {\r\n e.preventDefault();\r\n\r\n const isValid = e.currentTarget.checkValidity();\r\n if (isValid) {\r\n if (this.hasValidAddress()) {\r\n this.props.openAddressValidationModal();\r\n } else {\r\n await this.saveChanges();\r\n }\r\n } else {\r\n const form = e.currentTarget; // Can't access synthetic event `e` in callback\r\n this.props.updateValidatedAccount(true, () => focus(form.querySelector(':invalid')));\r\n }\r\n };\r\n\r\n saveChanges = async () => {\r\n try {\r\n const { profile } = this.props;\r\n const profileWithFormattedSSN = {\r\n ...profile,\r\n ssn: profile.ssn ? profile.ssn.split('-').join('') : undefined,\r\n };\r\n this.props.updateIsAccountSaving(true);\r\n const registrationResult = await this.props.dispatch(account.actions.register(profileWithFormattedSSN));\r\n if (registrationResult.success) {\r\n this.props.dispatch(push(routes.DASHBOARD));\r\n } else {\r\n this.setState({ registrationErrors: registrationResult.errors }, () =>\r\n focus(this.form.current && this.form.current.querySelector('.force-invalid')),\r\n );\r\n }\r\n } catch (e) {\r\n if (e.response && e.response.status === 409) {\r\n this.props.dispatch(\r\n notification.actions.add({\r\n type: NotificationType.Error,\r\n message: 'notification_profileInformationExists',\r\n }),\r\n );\r\n } else {\r\n this.props.dispatch(\r\n notification.actions.add({\r\n type: NotificationType.Error,\r\n message: 'notification_profileRegistrationError',\r\n }),\r\n );\r\n }\r\n }\r\n\r\n this.props.updateIsAccountSaving(false);\r\n };\r\n\r\n hasValidAddress() {\r\n const { address } = this.props.profile;\r\n return (\r\n address.address1.length > 0 &&\r\n address.city.length > 0 &&\r\n address.country.length > 0 &&\r\n address.state.length > 0 &&\r\n address.zip.length > 0\r\n );\r\n }\r\n\r\n render() {\r\n const options: Partial = {\r\n registrationErrors: this.state.registrationErrors,\r\n createUserTaxData: true,\r\n userHasTaxData: false,\r\n fieldControlOption: this.props.profileSettings.fieldControlOption,\r\n isTaxable: (this.props.global.portal && this.props.global.portal.enableTaxableIncomeForm) || false,\r\n disableSSN: this.props.profileSettings.disableSecurityNumberCollection,\r\n };\r\n\r\n return (\r\n
    \r\n void} // reactstrap types are wrong\r\n id=\"profileCreate_form\"\r\n onKeyDown={this.props.onKeyDown}\r\n >\r\n

    \r\n \r\n

    \r\n\r\n {this.props.renderProfileFields(this.saveChanges, options)}\r\n \r\n
    \r\n );\r\n }\r\n}\r\n\r\nconst ProfileCreateContainerWithData = withData(profileSettingsLoader)(withProfileHandlers(ProfileCreateContainer));\r\n\r\nexport default connect(/* istanbul ignore next */ (state) => state)(ProfileCreateContainerWithData);\r\n","import { isEqual } from 'lodash';\r\nimport React from 'react';\r\nimport { connect } from 'react-redux';\r\n\r\nimport { focus } from 'core/util/dom';\r\nimport ModalType from 'enums/ModalType';\r\nimport NotificationType from 'enums/NotificationType';\r\nimport withData from 'lib/withData';\r\nimport { accountLoader } from 'loaders/accountLoaders';\r\nimport { profileSettingsLoader } from 'loaders/profileSettingsLoader';\r\nimport { promotionLoader } from 'loaders/promotionLoaders';\r\nimport * as account from 'redux-modules/account';\r\nimport { hasTaxInformation, isTaxAddressPrimaryAddress } from 'redux-modules/customer';\r\nimport * as layout from 'redux-modules/layout';\r\nimport * as notification from 'redux-modules/notification';\r\nimport * as promotion from 'redux-modules/promotion';\r\nimport { L10nConsumer, LocalizedMessage } from 'core/l10n/components';\r\nimport { Prompt } from 'react-router-dom';\r\nimport classNames from 'classnames';\r\nimport { Form } from 'reactstrap';\r\nimport { AddressCertificationStatus } from 'core/ovations-api/enums';\r\nimport { withProfileHandlers, WithProfileHandlerProps, ProfileFieldsOptions } from './withProfileHandlers';\r\n\r\nexport interface ProfileEditProps extends WithProfileHandlerProps<{}> {}\r\n\r\ninterface ProfileEditContainerState {}\r\n\r\nexport class ProfileEditContainer extends React.Component {\r\n doesInitialUserStateHaveTaxData = false;\r\n\r\n componentDidMount() {\r\n const doesUserHaveTaxAddress = hasTaxInformation(\r\n this.props.account.me,\r\n this.props.profileSettings.disableSecurityNumberCollection,\r\n );\r\n this.doesInitialUserStateHaveTaxData = doesUserHaveTaxAddress;\r\n const doesTaxAddressMatchPrimary = isTaxAddressPrimaryAddress(this.props.account.me);\r\n this.props.updateMailingAsTaxAddress(doesTaxAddressMatchPrimary);\r\n this.props.updateProfile(this.props.getProfile());\r\n }\r\n\r\n componentDidUpdate(prevProps: ProfileEditProps) {\r\n if (this.props.account.me !== prevProps.account.me) {\r\n const profile = this.props.getProfile();\r\n this.props.updateProfile(profile);\r\n }\r\n }\r\n\r\n getCustomFieldsFiltered = () => {\r\n const { profileSettings } = this.props;\r\n\r\n if (!profileSettings || !profileSettings.customFields) {\r\n return null;\r\n }\r\n\r\n const customFieldsFiltered = profileSettings.customFields\r\n .map((x) => ({ ...x }))\r\n .filter((customField) => customField.displayedInProfile);\r\n\r\n return customFieldsFiltered;\r\n };\r\n\r\n onFormSubmit: React.FormEventHandler = async (e) => {\r\n const { props } = this;\r\n e.preventDefault();\r\n const isValid = e.currentTarget.checkValidity();\r\n\r\n const isPhoneNumberValid = this.props.validatePhoneNumber(props.profile.phoneNumber);\r\n if (!isPhoneNumberValid) {\r\n this.props.updateValidatedAccount(true);\r\n focus(e.currentTarget.querySelector('#phone'));\r\n return;\r\n }\r\n\r\n if (isValid) {\r\n if (\r\n (props.account.me &&\r\n !isEqual(props.account.me.address, props.profile.address) &&\r\n this.hasValidAddress()) ||\r\n props.account.me?.address.status === AddressCertificationStatus.NonCertified\r\n ) {\r\n this.props.openAddressValidationModal();\r\n // } else if (\r\n // props.account.me &&\r\n // !isEqual(props.account.me.alternateProfiles, state.profile.alternateProfiles)\r\n // ) {\r\n // TODO: Re-enable this in future story US70810\r\n // this.openTaxAddressValidationModal();\r\n } else {\r\n await this.saveChanges();\r\n }\r\n } else {\r\n const form = e.currentTarget; // Can't access synthetic event `e` in callback\r\n this.props.updateValidatedAccount(true, () => focus(form.querySelector(':invalid')));\r\n }\r\n };\r\n\r\n saveChanges = async () => {\r\n try {\r\n const profile = this.props.transformRegistrationToProfile(this.props.profile);\r\n this.props.updateIsAccountSaving(true);\r\n await this.props.dispatch(account.actions.updateProfile(profile));\r\n this.props.dispatch(\r\n notification.actions.add({\r\n type: NotificationType.Success,\r\n message: 'notification_profileUpdateSuccess',\r\n }),\r\n );\r\n } catch (e) {\r\n if (e.response && e.response.status === 409) {\r\n this.props.dispatch(\r\n notification.actions.add({\r\n type: NotificationType.Error,\r\n message: 'notification_profileInformationExists',\r\n }),\r\n );\r\n } else {\r\n this.props.dispatch(\r\n notification.actions.add({\r\n type: NotificationType.Error,\r\n message: 'notification_profileUpdateFailure',\r\n }),\r\n );\r\n }\r\n }\r\n\r\n this.props.updateIsAccountSaving(false);\r\n };\r\n\r\n toggleChangePassword = () => {\r\n this.props.dispatch(layout.actions.toggleModal(ModalType.PasswordChange));\r\n };\r\n\r\n hasValidAddress() {\r\n const { address } = this.props.profile;\r\n return (\r\n address.address1.length > 0 &&\r\n address.city.length > 0 &&\r\n address.country.length > 0 &&\r\n address.state.length > 0 &&\r\n address.zip.length > 0\r\n );\r\n }\r\n\r\n render() {\r\n const customFields = this.getCustomFieldsFiltered();\r\n const options: Partial = {\r\n isEditProfile: true,\r\n customFields: customFields || undefined,\r\n customFieldValues: this.props.profile.customFields || undefined,\r\n toggleChangePassword: this.toggleChangePassword,\r\n registrationErrors: {},\r\n userHasTaxData: this.doesInitialUserStateHaveTaxData,\r\n directPhoneNumberError: this.props.phoneNumberError,\r\n isRequireSSNForGalileo: promotion.selectors.isRequireSSNForGalileo(this.props.promotion.list),\r\n isRequireDOBForGalileo: promotion.selectors.isRequireDOBForGalileo(this.props.promotion.list),\r\n fieldControlOption: this.props.profileSettings.fieldControlOption,\r\n isTaxable: (this.props.global.portal && this.props.global.portal.enableTaxableIncomeForm) || false,\r\n disableSSN: this.props.profileSettings.disableSecurityNumberCollection,\r\n };\r\n return (\r\n
    \r\n \r\n {(l10n) => (\r\n \r\n )}\r\n \r\n \r\n

    \r\n \r\n

    \r\n {this.props.renderProfileFields(this.saveChanges, options)}\r\n \r\n
    \r\n );\r\n }\r\n}\r\n\r\nconst ProfileEditContainerWithData = withData(\r\n accountLoader,\r\n profileSettingsLoader,\r\n promotionLoader,\r\n)(withProfileHandlers(ProfileEditContainer));\r\nexport default connect(/* istanbul ignore next */ (state) => state)(ProfileEditContainerWithData);\r\n","/* eslint-disable react/no-unused-state */\r\nimport { faCircleNotch, faExclamationTriangle } from '@fortawesome/free-solid-svg-icons';\r\nimport classNames from 'classnames';\r\nimport { goBack } from 'connected-react-router';\r\nimport { Dictionary, differenceWith, find, includes, isEqual } from 'lodash';\r\nimport React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { Button, Card, CardBody, Form } from 'reactstrap';\r\n\r\nimport LocalizedTitle from 'components/LocalizedTitle';\r\nimport elements from 'config/elements';\r\nimport * as routes from 'config/routes';\r\nimport ContainerProps from 'containers/definitions/ContainerProps';\r\nimport { L10nMessages, LocalizedDate, LocalizedMessage, MessageValue } from 'core/l10n/components';\r\nimport * as OvationsApi from 'core/ovations-api';\r\nimport AvailableRewards from 'core/ovations-components/AvailableRewards';\r\nimport FAIcon from 'core/ovations-components/FAIcon';\r\nimport QuestionField from 'core/ovations-components/QuestionField';\r\nimport { focus } from 'core/util/dom';\r\nimport CustomerRewardType from 'enums/CustomerRewardType';\r\nimport NotificationType from 'enums/NotificationType';\r\nimport withData from 'lib/withData';\r\nimport { claimLoader } from 'loaders/claimLoaders';\r\nimport { promotionLoader } from 'loaders/promotionLoaders';\r\nimport * as OvationsPortalApi from 'ovations-portal-api';\r\nimport { CustomerClaim } from 'ovations-portal-api/definitions/CustomerRewardSummary';\r\nimport * as claim from 'redux-modules/claim';\r\nimport * as notification from 'redux-modules/notification';\r\nimport { ChoiceRewardCalculation } from 'core/ovations-api/definitions';\r\nimport { RewardCalculationType } from 'core/ovations-api/enums';\r\nimport ValidatedClaimAmountHeader from 'components/claims/ValidatedClaimAmountHeader';\r\n\r\nexport type ReconciliationContainerProps = ContainerProps<{\r\n claimNumber?: string;\r\n promotionNumber?: string;\r\n}>;\r\n\r\ninterface ReconciliationContainerState {\r\n claim: OvationsPortalApi.Types.Claim;\r\n isSavingChanges: boolean;\r\n wasValidated: boolean;\r\n touchedReward: boolean;\r\n eSignDisclosureHasBeenReviewed: boolean;\r\n isOverlapFieldsEditable: boolean;\r\n isConfirmAndContinue: boolean;\r\n}\r\n\r\nexport class ReconciliationContainer extends React.Component<\r\n ReconciliationContainerProps,\r\n ReconciliationContainerState\r\n> {\r\n constructor(props: ReconciliationContainerProps) {\r\n super(props);\r\n this.state = this.getInitialState();\r\n }\r\n\r\n getInitialState(): ReconciliationContainerState {\r\n const claimDetail = ReconciliationContainer.getClaimDetail(this.props) || claim.emptyClaimDetail;\r\n return {\r\n claim: claim.selectors.toClaim(claimDetail, this.props.match.path === routes.CREATE_RECONCILIATION),\r\n isSavingChanges: false,\r\n wasValidated: false,\r\n touchedReward: false,\r\n eSignDisclosureHasBeenReviewed: claimDetail.eSignAgreementAcceptance,\r\n isOverlapFieldsEditable: false,\r\n isConfirmAndContinue: !!this.isReconciliationClaimEditable(claimDetail.reconciliationStatus),\r\n };\r\n }\r\n\r\n componentDidUpdate(prevProps: ReconciliationContainerProps) {\r\n const { claimNumber } = this.props.match.params;\r\n const nextClaimDetail = ReconciliationContainer.getClaimDetail(this.props);\r\n\r\n if (claimNumber && nextClaimDetail && ReconciliationContainer.getClaimDetail(prevProps) !== nextClaimDetail) {\r\n this.setState({\r\n claim: claim.selectors.toClaim(nextClaimDetail, this.props.match.path === routes.CREATE_RECONCILIATION),\r\n eSignDisclosureHasBeenReviewed: nextClaimDetail.eSignAgreementAcceptance,\r\n });\r\n }\r\n }\r\n\r\n static getActivePromotion(props: ReconciliationContainerProps): OvationsPortalApi.Types.Promotion | undefined {\r\n const { promotionNumber } = props.match.params;\r\n if (promotionNumber) {\r\n return find(props.promotion.list, { number: +promotionNumber });\r\n }\r\n const claimBeingEdited = ReconciliationContainer.getClaimDetail(props);\r\n if (claimBeingEdited) {\r\n return claimBeingEdited.promotion;\r\n }\r\n }\r\n\r\n static getClaimDetail(props: ReconciliationContainerProps): OvationsPortalApi.Types.ClaimDetail | undefined {\r\n const { claimNumber } = props.match.params;\r\n if (claimNumber) {\r\n const claimsFromRewards = props.claim.results.filter(\r\n (claimValues) => claimValues.type === CustomerRewardType.Claim,\r\n ) as CustomerClaim[];\r\n\r\n return claimsFromRewards\r\n .map((claimRewardSummary) => claimRewardSummary.claim)\r\n .find((claimDetail) => claimDetail.number === Number(claimNumber));\r\n }\r\n\r\n return;\r\n }\r\n\r\n onFormSubmit: React.FormEventHandler = async (e) => {\r\n e.preventDefault();\r\n const isValid = this.validateForm(e.currentTarget);\r\n if (!isValid) {\r\n return;\r\n }\r\n\r\n try {\r\n const claimNumber = Number(this.props.match.params.claimNumber);\r\n this.setState({ isSavingChanges: true });\r\n await this.editSubmit();\r\n const navigationAction = goBack();\r\n\r\n await this.props.dispatch(claim.actions.fetch(claimNumber));\r\n\r\n this.props.dispatch(\r\n notification.actions.add({\r\n type: NotificationType.Success,\r\n message: 'notification_claimSubmitSuccess',\r\n values: { claimId: claimNumber },\r\n timeout: 3 * 1000,\r\n }),\r\n );\r\n this.props.dispatch(navigationAction);\r\n } catch (e) {\r\n this.props.dispatch(\r\n notification.actions.add({\r\n type: NotificationType.Error,\r\n message: 'notification_claimSubmitError',\r\n timeout: 3 * 1000,\r\n }),\r\n );\r\n this.setState({\r\n isSavingChanges: false,\r\n });\r\n }\r\n };\r\n\r\n getOnAnswerChange = (promotionQuestionId: string) => {\r\n return (answer: OvationsApi.Types.PromotionQuestionAnswer) => {\r\n const newClaim = {\r\n ...this.state.claim,\r\n answers: {\r\n ...this.state.claim.answers,\r\n [promotionQuestionId]: answer,\r\n },\r\n };\r\n this.setState({ claim: newClaim });\r\n };\r\n };\r\n\r\n onRewardChange = (rewardCalculationId: number) => {\r\n const updatedClaim = {\r\n ...this.state.claim,\r\n rewardCalculationId,\r\n };\r\n this.setState({ claim: updatedClaim, touchedReward: true });\r\n };\r\n\r\n getTitleDescriptors(): { id: keyof L10nMessages; values?: Dictionary } {\r\n const { claimNumber } = this.props.match.params;\r\n return claimNumber ? { id: 'pageTitle_claim_edit', values: { claimNumber } } : { id: 'pageTitle_claim_submit' };\r\n }\r\n\r\n onClaimAmountChangeClick = () => {\r\n this.setState({ isOverlapFieldsEditable: true, isConfirmAndContinue: false });\r\n };\r\n\r\n onConfirmAndContinue = () => {\r\n this.setState({ isOverlapFieldsEditable: false, isConfirmAndContinue: true });\r\n };\r\n\r\n fetchCascadingDropdownOptions = (dataSetId: string, propertyId: number, filters: Dictionary) => {\r\n return OvationsPortalApi.DataSet.fetchPropertyValues(dataSetId, propertyId, filters);\r\n };\r\n\r\n editSubmit = async () => {\r\n let editedReconciliation: OvationsPortalApi.Types.Claim = { ...this.state.claim };\r\n editedReconciliation = {\r\n ...editedReconciliation,\r\n reconciliationStatus: OvationsApi.Enums.ReconciliationStatus.PendingValidation,\r\n };\r\n await OvationsPortalApi.Claim.update(editedReconciliation);\r\n };\r\n\r\n isFormReady = (questions: OvationsApi.Types.PortalPromotionQuestion[]): boolean => {\r\n const overlappedQuestions = claim.selectors.getOverlappedQuestions(questions);\r\n return this.state.isConfirmAndContinue || overlappedQuestions.length === 0;\r\n };\r\n\r\n isReconciliationClaimEditable(reconciliationStatus: OvationsApi.Enums.ReconciliationStatus) {\r\n const truthyStatuses = [\r\n OvationsApi.Enums.ReconciliationStatus.Disqualified,\r\n OvationsApi.Enums.ReconciliationStatus.PendingValidation,\r\n ];\r\n return includes(truthyStatuses, reconciliationStatus);\r\n }\r\n\r\n validateForm(form: HTMLFormElement) {\r\n const isValid = form.checkValidity();\r\n if (!isValid) {\r\n this.setState({ wasValidated: true }, () => focus(form.querySelector('.form-control:invalid')));\r\n }\r\n return isValid;\r\n }\r\n\r\n // tslint:disable-next-line cyclomatic-complexity\r\n renderQuestionAnswerPairsAnswer(question: OvationsApi.Types.PortalPromotionQuestion, questionId: string) {\r\n const answer = this.state.claim.answers[questionId];\r\n if (!answer) {\r\n return null;\r\n }\r\n switch (answer.type) {\r\n case OvationsApi.Enums.QuestionType.Text: {\r\n const promotionTextQuestionAnswer = answer as {} as OvationsApi.Types.PromotionTextQuestionAnswer;\r\n return promotionTextQuestionAnswer.value;\r\n }\r\n case OvationsApi.Enums.QuestionType.Number: {\r\n const promotionNumberQuestionAnswer = answer as {} as OvationsApi.Types.PromotionNumberQuestionAnswer;\r\n return promotionNumberQuestionAnswer.value;\r\n }\r\n\r\n case OvationsApi.Enums.QuestionType.DateTime: {\r\n const promotionDateTimeQuestionAnswer =\r\n answer as {} as OvationsApi.Types.PromotionDateTimeQuestionAnswer;\r\n return promotionDateTimeQuestionAnswer.value ? (\r\n \r\n ) : (\r\n ''\r\n );\r\n }\r\n\r\n case OvationsApi.Enums.QuestionType.FileUpload: {\r\n const promotionFileUploadQuestionAnswer =\r\n answer as {} as OvationsApi.Types.PromotionFileUploadQuestionAnswer;\r\n return (\r\n \r\n {promotionFileUploadQuestionAnswer.fileName}\r\n \r\n );\r\n }\r\n case OvationsApi.Enums.QuestionType.Dropdown: {\r\n const promotionDropdownQuestionAnswer =\r\n answer as {} as OvationsApi.Types.PromotionDropDownQuestionAnswer;\r\n return promotionDropdownQuestionAnswer.value;\r\n }\r\n\r\n case OvationsApi.Enums.QuestionType.CascadingDropdown: {\r\n return (\r\n
    \r\n {claim.selectors.resolveCascadingDropdownAnswer(\r\n question as OvationsApi.Types.PromotionCascadingDropdownQuestion,\r\n answer as OvationsApi.Types.PromotionCascadingDropdownQuestionAnswer,\r\n )}\r\n
    \r\n );\r\n }\r\n case OvationsApi.Enums.QuestionType.MultiSelect: {\r\n const promotionMultiSelectQuestionAnswer =\r\n answer as {} as OvationsApi.Types.PromotionMultiSelectQuestionAnswer;\r\n return promotionMultiSelectQuestionAnswer.selections.join(', ');\r\n }\r\n\r\n default:\r\n return null;\r\n }\r\n }\r\n\r\n renderError() {\r\n return (\r\n

    \r\n \r\n

    \r\n );\r\n }\r\n\r\n renderClaimInfo(promotion: OvationsPortalApi.Types.Promotion) {\r\n const claimDetail = ReconciliationContainer.getClaimDetail(this.props) || claim.emptyClaimDetail;\r\n const overlappedQuestions = claim.selectors.getOverlappedQuestions(promotion.questions);\r\n return (\r\n <>\r\n
    Claim {this.state.claim.number}
    \r\n

    \r\n {' '}\r\n {!this.state.isOverlapFieldsEditable && !!overlappedQuestions.length && (\r\n \r\n )}\r\n

    \r\n \r\n );\r\n }\r\n\r\n renderOverlappedQuestions(promotion: OvationsPortalApi.Types.Promotion) {\r\n const overlappedQuestions = claim.selectors.getOverlappedQuestions(promotion.questions);\r\n if (overlappedQuestions.length === 0) {\r\n return null;\r\n }\r\n const promoQuestions = this.state.isOverlapFieldsEditable\r\n ? this.renderPromotionQuestions(overlappedQuestions)\r\n : overlappedQuestions.map((promotionQuestion) => (\r\n
    \r\n \r\n
    {this.renderQuestionAnswerPairsAnswer(promotionQuestion, promotionQuestion.id)}
    \r\n
    \r\n ));\r\n return
    {promoQuestions}
    ;\r\n }\r\n\r\n renderPromotionQuestions(questions: OvationsApi.Types.PortalPromotionQuestion[]) {\r\n const promoQuestions = questions.map((promotionQuestion) => (\r\n \r\n ));\r\n return promoQuestions;\r\n }\r\n\r\n renderErrorBanner() {\r\n return this.state.wasValidated ? (\r\n
    \r\n \r\n
    \r\n \r\n
    \r\n
    \r\n ) : null;\r\n }\r\n\r\n renderAvailableRewardsErrorBanner = (banner: JSX.Element) => (\r\n
    \r\n
    {banner}
    \r\n
    \r\n );\r\n\r\n renderSubmissionButtons(promotion: OvationsPortalApi.Types.Promotion) {\r\n const isFormReady = this.isFormReady(promotion.questions);\r\n return (\r\n
    \r\n
    \r\n this.props.history.goBack()}\r\n >\r\n \r\n \r\n
    \r\n {isFormReady && (\r\n
    \r\n \r\n {this.state.isSavingChanges ? (\r\n \r\n \r\n \r\n \r\n \r\n \r\n ) : (\r\n \r\n \r\n \r\n )}\r\n \r\n
    \r\n )}\r\n
    \r\n );\r\n }\r\n\r\n renderQuestionsBlock(promotion: OvationsPortalApi.Types.Promotion) {\r\n const { questions } = promotion;\r\n let questionsToBerendered = questions.filter((q) => q.isForPreFund === false);\r\n\r\n const overlappedQuestions = claim.selectors.getOverlappedQuestions(questions);\r\n questionsToBerendered = differenceWith(questionsToBerendered, overlappedQuestions, isEqual);\r\n\r\n return (\r\n <>\r\n {this.renderOverlappedQuestions(promotion)}\r\n {this.isFormReady(questions) && this.renderPromotionQuestions(questionsToBerendered)}\r\n \r\n );\r\n }\r\n\r\n renderClaimForm(promotionFromRoute: OvationsPortalApi.Types.Promotion) {\r\n const { rewardCalculations } = promotionFromRoute;\r\n\r\n const choiceRewardCalcs = rewardCalculations.filter(\r\n (calc) => calc.type === RewardCalculationType.Choice,\r\n ) as ChoiceRewardCalculation[];\r\n\r\n return (\r\n \r\n \r\n \r\n
    \r\n
    \r\n
    {this.renderClaimInfo(promotionFromRoute)}
    \r\n {this.renderErrorBanner()}\r\n {this.renderQuestionsBlock(promotionFromRoute)}\r\n {!this.isFormReady(promotionFromRoute.questions) && (\r\n
    \r\n \r\n \r\n \r\n
    \r\n )}\r\n
    \r\n {choiceRewardCalcs.map((calc, i) => (\r\n \r\n \r\n {i + 1 !== choiceRewardCalcs.length &&
    }\r\n
    \r\n ))}\r\n
    \r\n
    \r\n
    \r\n {this.renderSubmissionButtons(promotionFromRoute)}\r\n \r\n );\r\n }\r\n\r\n render() {\r\n const activePromotion = ReconciliationContainer.getActivePromotion(this.props);\r\n const title = this.getTitleDescriptors();\r\n return (\r\n
    \r\n \r\n

    \r\n \r\n

    \r\n {!activePromotion ? this.renderError() : this.renderClaimForm(activePromotion)}\r\n
    \r\n );\r\n }\r\n}\r\n\r\nconst ReconciliationContainerWithData = withData(\r\n claimLoader,\r\n promotionLoader,\r\n)(ReconciliationContainer);\r\nexport default connect(/* istanbul ignore next */ (state) => state)(ReconciliationContainerWithData);\r\n","import * as pbi from 'powerbi-client';\r\nimport React from 'react';\r\n\r\nexport interface PowerBIReportViewerProps {\r\n reportId: string;\r\n embedUrl: string;\r\n accessToken: string;\r\n isMobile?: boolean;\r\n}\r\n\r\n// Models - https://github.com/Microsoft/powerbi-models/blob/master/src/models.ts\r\n// Service - https://github.com/Microsoft/PowerBI-JavaScript/blob/master/src/service.ts\r\n\r\nexport const powerbi = new pbi.service.Service(\r\n pbi.factories.hpmFactory,\r\n pbi.factories.wpmpFactory,\r\n pbi.factories.routerFactory,\r\n);\r\n\r\nexport default class PowerBIReportViewer extends React.Component {\r\n powerbiRoot: HTMLElement | null;\r\n\r\n staticEmbedOpts = {\r\n type: 'report',\r\n tokenType: pbi.models.TokenType.Embed,\r\n };\r\n\r\n componentDidMount() {\r\n this.embed();\r\n }\r\n\r\n getLayoutType() {\r\n return this.props.isMobile ? pbi.models.LayoutType.MobilePortrait : pbi.models.LayoutType.Master;\r\n }\r\n\r\n getEmbedConfigOptions() {\r\n const { reportId, embedUrl, accessToken } = this.props;\r\n const config: pbi.IEmbedConfiguration = { id: reportId, embedUrl, accessToken };\r\n const settings: pbi.IEmbedSettings = { layoutType: this.getLayoutType() };\r\n\r\n return { ...this.staticEmbedOpts, ...config, settings };\r\n }\r\n\r\n validateReportLoad(config: pbi.IEmbedConfiguration) {\r\n const errors = pbi.models.validateReportLoad(config);\r\n return !errors;\r\n }\r\n\r\n embed() {\r\n if (!this.powerbiRoot) {\r\n return;\r\n }\r\n\r\n const configOptions = this.getEmbedConfigOptions();\r\n if (this.validateReportLoad(configOptions)) {\r\n powerbi.embed(this.powerbiRoot, configOptions);\r\n }\r\n }\r\n\r\n render() {\r\n return
    (this.powerbiRoot = node)} style={{ height: '100%' }} />;\r\n }\r\n}\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\n\r\nimport PowerBIReportViewer from 'components/PowerBIReportViewer';\r\nimport Spinner from 'components/Spinner';\r\nimport * as breakpoints from 'config/breakpoints';\r\nimport elements from 'config/elements';\r\nimport ContainerProps from 'containers/definitions/ContainerProps';\r\nimport * as PortalApi from 'ovations-portal-api';\r\n\r\nexport type ReportContainerProps = ContainerProps<{ reportId: string }>;\r\n\r\ninterface ReportContainerState {\r\n reportConfig: PortalApi.Types.ReportConfig | null;\r\n}\r\nexport class ReportContainer extends React.Component {\r\n constructor(props: ReportContainerProps) {\r\n super(props);\r\n this.state = { reportConfig: null };\r\n }\r\n\r\n async componentDidMount() {\r\n const reportConfig = await PortalApi.Report.fetchConfig(this.props.match.params.reportId);\r\n this.setState({ reportConfig });\r\n }\r\n\r\n isDesktop(): boolean {\r\n return window.matchMedia(breakpoints.BP_REPORT_DESKTOP).matches;\r\n }\r\n\r\n renderSpinner() {\r\n return (\r\n
    \r\n \r\n
    \r\n );\r\n }\r\n\r\n render() {\r\n const { reportConfig } = this.state;\r\n if (!reportConfig) {\r\n return this.renderSpinner();\r\n }\r\n\r\n const { reportId } = this.props.match.params;\r\n const { accessToken, embedUrl } = reportConfig;\r\n\r\n return (\r\n
    \r\n \r\n
    \r\n );\r\n }\r\n}\r\n\r\nexport default connect(/* istanbul ignore next */ (state) => state)(ReportContainer);\r\n","/* eslint-disable react/no-unused-state */\r\nimport { faCircleNotch } from '@fortawesome/free-solid-svg-icons';\r\nimport classNames from 'classnames';\r\nimport elements from 'config/elements';\r\nimport * as routes from 'config/routes';\r\nimport { push } from 'connected-react-router';\r\nimport escapeStringRegexp from 'escape-string-regexp';\r\nimport * as qs from 'query-string';\r\nimport React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { Button, Card, CardBody, Form, Input, Label } from 'reactstrap';\r\n\r\nimport LocalizedTitle from 'components/LocalizedTitle';\r\nimport ValidatedFormGroup, { InputStatus } from 'components/ValidatedFormGroup';\r\nimport ContainerProps from 'containers/definitions/ContainerProps';\r\nimport { newPasswordValidationRules, PASSWORD_WITH_ONEUPPERCASE_ONENUMBER } from 'core/config/patterns';\r\nimport { L10nConsumer, LocalizedMessage } from 'core/l10n/components';\r\nimport * as OvationsApi from 'core/ovations-api';\r\nimport FAIcon from 'core/ovations-components/FAIcon';\r\nimport NotificationType from 'enums/NotificationType';\r\nimport * as account from 'redux-modules/account';\r\nimport * as notification from 'redux-modules/notification';\r\n\r\nexport type ResetPasswordContainerProps = ContainerProps<{}>;\r\n\r\ninterface ResetPasswordContainerState {\r\n hasResetError: boolean;\r\n inputStatuses: { [name: string]: InputStatus };\r\n isSavingChanges: boolean;\r\n passwordResetRequest: OvationsApi.Types.PasswordResetRequest;\r\n wasValidated: boolean;\r\n}\r\n\r\nexport class ResetPasswordContainer extends React.Component {\r\n constructor(props: ResetPasswordContainerProps) {\r\n super(props);\r\n\r\n const parsedURLQuery = qs.parse(props.location.search);\r\n let initializedReset;\r\n if (parsedURLQuery.code && parsedURLQuery.email) {\r\n const propertiesFromQuery = {\r\n email: decodeURI(parsedURLQuery.email as string),\r\n resetToken: parsedURLQuery.code as string,\r\n };\r\n initializedReset = { ...account.emptyPasswordResetRequest, ...propertiesFromQuery };\r\n } else {\r\n initializedReset = null;\r\n }\r\n\r\n this.state = {\r\n hasResetError: false,\r\n inputStatuses: {},\r\n isSavingChanges: false,\r\n passwordResetRequest: initializedReset || account.emptyPasswordResetRequest,\r\n wasValidated: false,\r\n };\r\n }\r\n\r\n onStatusChange = (name: string) => (inputStatus: InputStatus) => {\r\n const { inputStatuses } = this.state;\r\n this.setState({ inputStatuses: { ...inputStatuses, [name]: inputStatus } });\r\n };\r\n\r\n onInputChange: React.ChangeEventHandler = (e) => {\r\n const { name, value } = e.currentTarget;\r\n const updatedRequest = { ...this.state.passwordResetRequest, [name]: value };\r\n this.setState({ passwordResetRequest: updatedRequest });\r\n };\r\n\r\n onFormSubmit: React.FormEventHandler = async (e) => {\r\n e.preventDefault();\r\n\r\n const isValid = e.currentTarget.checkValidity();\r\n if (isValid) {\r\n if (\r\n this.state.passwordResetRequest.email.toLowerCase() ===\r\n this.state.passwordResetRequest.newPassword.toLowerCase()\r\n ) {\r\n this.props.dispatch(\r\n notification.actions.add({\r\n type: NotificationType.Error,\r\n message: 'notification_passwordCannotMatchLogin',\r\n }),\r\n );\r\n\r\n this.setState({\r\n hasResetError: true,\r\n isSavingChanges: false,\r\n });\r\n\r\n return;\r\n }\r\n try {\r\n this.setState({ isSavingChanges: true });\r\n await this.props.dispatch(account.actions.resetPassword(this.state.passwordResetRequest));\r\n } catch (e) {\r\n if (e.response && e.response.status === 400) {\r\n this.props.dispatch(\r\n notification.actions.add({\r\n type: NotificationType.Error,\r\n message: 'notification_passwordResetInvalidToken',\r\n }),\r\n );\r\n } else {\r\n this.props.dispatch(\r\n notification.actions.add({\r\n type: NotificationType.Error,\r\n message: 'notification_passwordResetError',\r\n }),\r\n );\r\n }\r\n this.setState({\r\n hasResetError: true,\r\n isSavingChanges: false,\r\n });\r\n\r\n return;\r\n }\r\n\r\n this.setState({\r\n hasResetError: false,\r\n isSavingChanges: false,\r\n });\r\n this.props.dispatch(push(routes.DASHBOARD));\r\n this.props.dispatch(\r\n notification.actions.add({\r\n type: NotificationType.Success,\r\n message: 'notification_passwordResetSuccess',\r\n }),\r\n );\r\n } else {\r\n this.setState({ wasValidated: true });\r\n }\r\n };\r\n\r\n render() {\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 {(l10n) => (\r\n <>\r\n
    \r\n \r\n \r\n \r\n {newPasswordValidationRules\r\n .filter((vr) => {\r\n const re = new RegExp(vr.pattern);\r\n return !re.test(\r\n this.state.passwordResetRequest.newPassword,\r\n );\r\n })\r\n .map((vr, index) => (\r\n \r\n {l10n.localizeMessage(vr.message)}\r\n \r\n ))}\r\n \r\n
    \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n \r\n )}\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n {this.state.isSavingChanges ? (\r\n \r\n {' '}\r\n \r\n \r\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 connect(/* istanbul ignore next */ (state) => state)(ResetPasswordContainer);\r\n","import classNames from 'classnames';\r\nimport { push } from 'connected-react-router';\r\nimport { find } from 'lodash';\r\nimport React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { Button, Card, CardBody, CardTitle, Form, FormGroup, Input, Label } from 'reactstrap';\r\n\r\nimport { LocalizedMessage } from 'core/l10n/components';\r\nimport toPath from 'core/lib/toPath';\r\n\r\nimport elements from 'config/elements';\r\nimport * as routes from 'config/routes';\r\nimport FormConfigType from 'enums/FormConfigType';\r\nimport { LocalizedTitle } from '../components/LocalizedTitle';\r\nimport withData from '../lib/withData';\r\nimport { promotionLoader } from '../loaders/promotionLoaders';\r\nimport * as OvationsPortalApi from '../ovations-portal-api';\r\nimport ContainerProps from './definitions/ContainerProps';\r\n\r\nexport type SelectClaimTypeContainerProps = ContainerProps<{ promotionNumber?: string }>;\r\n\r\ninterface SelectClaimTypeContainerState {\r\n wasValidated: boolean;\r\n selectedFormConfigType: FormConfigType | null;\r\n}\r\n\r\nexport class SelectClaimTypeContainer extends React.Component<\r\n SelectClaimTypeContainerProps,\r\n SelectClaimTypeContainerState\r\n> {\r\n static getActivePromotion(props: SelectClaimTypeContainerProps): OvationsPortalApi.Types.Promotion | undefined {\r\n const { promotionNumber } = props.match.params;\r\n if (promotionNumber) {\r\n return find(props.promotion.list, { number: +promotionNumber });\r\n }\r\n }\r\n\r\n constructor(props: SelectClaimTypeContainerProps) {\r\n super(props);\r\n this.state = {\r\n wasValidated: false,\r\n selectedFormConfigType: null,\r\n };\r\n }\r\n\r\n onFormSubmit: React.FormEventHandler = async (e) => {\r\n e.preventDefault();\r\n\r\n const isValid = e.currentTarget.checkValidity();\r\n\r\n if (!isValid) {\r\n this.setState({ wasValidated: true });\r\n return;\r\n }\r\n const { promotionNumber } = this.props.match.params;\r\n if (!promotionNumber) {\r\n return;\r\n }\r\n return this.props.dispatch(\r\n push(\r\n toPath(routes.CREATE_CLAIM, {\r\n promotionNumber,\r\n formConfigType: this.state.selectedFormConfigType,\r\n }),\r\n ),\r\n );\r\n };\r\n\r\n onFormConfigTypeChange: React.ChangeEventHandler = (e) => {\r\n const { value } = e.currentTarget;\r\n const selectedFormConfigType = FormConfigType[value];\r\n this.setState({ selectedFormConfigType });\r\n };\r\n\r\n renderError() {\r\n return ;\r\n }\r\n\r\n renderClaimTypeRadio() {\r\n const { selectedFormConfigType } = this.state;\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 Purchase type selection is required\r\n \r\n
    \r\n );\r\n }\r\n\r\n renderSelectClaimTypeForm(promotionFromRoute: OvationsPortalApi.Types.Promotion) {\r\n const { name } = promotionFromRoute;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n {name}\r\n \r\n
    \r\n
    {this.renderClaimTypeRadio()}
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n
    \r\n
    \r\n this.props.dispatch(push(routes.DASHBOARD))}\r\n >\r\n \r\n \r\n
    \r\n
    \r\n \r\n );\r\n }\r\n\r\n render() {\r\n const selectedPromotion = SelectClaimTypeContainer.getActivePromotion(this.props);\r\n return (\r\n
    \r\n \r\n

    \r\n \r\n

    \r\n {selectedPromotion ? this.renderSelectClaimTypeForm(selectedPromotion) : this.renderError()}\r\n
    \r\n );\r\n }\r\n}\r\n\r\nconst SelectClaimTypeContainerWithData =\r\n withData(promotionLoader)(SelectClaimTypeContainer);\r\nexport default connect(/* istanbul ignore next */ (state) => state)(SelectClaimTypeContainerWithData);\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { Redirect, Route, RouteComponentProps, RouteProps, Switch, withRouter } from 'react-router-dom';\r\n\r\nimport LocalizedTitle from 'components/LocalizedTitle';\r\nimport * as routes from 'config/routes';\r\nimport AuthRedirectContainer from 'containers/AuthRedirectContainer';\r\nimport ClaimContainer from 'containers/ClaimContainer';\r\nimport ClaimDetailContainer from 'containers/ClaimDetailContainer';\r\nimport ClaimListContainer from 'containers/ClaimListContainer';\r\nimport ContactContainer from 'containers/ContactContainer';\r\nimport DashboardContainer from 'containers/DashboardContainer';\r\nimport FAQContainer from 'containers/FAQContainer';\r\nimport HomeContainer from 'containers/HomeContainer';\r\nimport ProfileCreateContainer from 'containers/profile/ProfileCreateContainer';\r\nimport ProfileEditContainer from 'containers/profile/ProfileEditContainer';\r\nimport ReconciliationContainer from 'containers/ReconciliationContainer';\r\nimport ReportContainer from 'containers/ReportContainer';\r\nimport ResetPasswordContainer from 'containers/ResetPasswordContainer';\r\nimport SelectClaimTypeContainer from 'containers/SelectClaimTypeContainer';\r\nimport * as account from 'redux-modules/account';\r\nimport S from 'redux-modules/definitions/RootState';\r\n\r\nexport interface AnimatedRouteProps extends RouteProps {\r\n component: React.ComponentType> | React.ComponentType<{}>;\r\n redirect?: (props: AnimatedRouteProps) => string | undefined;\r\n rootState: S;\r\n}\r\n\r\ninterface PrivateRouteProps extends AnimatedRouteProps {}\r\n\r\nconst NotFound = () => (\r\n
    \r\n

    Page Not Found

    \r\n
    \r\n);\r\n\r\nexport const AnimatedRoute = connect((rootState) => ({ rootState }))((props: AnimatedRouteProps) => {\r\n const { component, rootState, redirect, ...rest } = props;\r\n const redirectUrl = redirect && redirect(props);\r\n\r\n if (redirectUrl) {\r\n return ;\r\n }\r\n\r\n return (\r\n (\r\n
    \r\n {/* This div gets the CSS transition classes */}\r\n \r\n
    \r\n )}\r\n />\r\n );\r\n});\r\n\r\nconst PrivateRoute = connect((rootState) => ({ rootState }))((props: PrivateRouteProps) => {\r\n const { rootState, ...routeProps } = props;\r\n if (!account.selectors.isLoggedIn(rootState.account)) {\r\n return ;\r\n }\r\n return ;\r\n});\r\n\r\nconst getHomeRedirect = (props: PrivateRouteProps): string | undefined => {\r\n const { portal } = props.rootState.global;\r\n if (portal && portal.openIdEnabled) {\r\n return routes.LOGIN;\r\n }\r\n};\r\n\r\nconst getClaimRedirect = (props: PrivateRouteProps): string | undefined => {\r\n const { portal } = props.rootState.global;\r\n if (portal && !portal.hasPromotions) {\r\n return routes.DASHBOARD;\r\n }\r\n return undefined;\r\n};\r\n\r\nexport const Routes: React.SFC> = ({ location }) => {\r\n const extraProps = { redirect: getHomeRedirect };\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\nexport default withRouter(Routes);\r\n","import { kebabCase, map, omitBy } from 'lodash';\r\n\r\nexport interface CSSConfig {\r\n [selector: string]: Partial;\r\n}\r\n\r\nconst toCss = (cssConfig: CSSConfig): string => {\r\n const rulesets = map(cssConfig, (declaration, selector) => {\r\n const properties = omitBy(declaration, (value) => !value);\r\n const rulesetLines = [\r\n `${selector} {`,\r\n ...map(properties, (value, property) => ` ${kebabCase(property)}: ${value};`),\r\n '}',\r\n ];\r\n return rulesetLines.join('\\n');\r\n });\r\n return rulesets.join('\\n');\r\n};\r\n\r\nexport default toCss;\r\n","import { assign, compact } from 'lodash';\r\nimport React from 'react';\r\n\r\nimport * as OvationsApi from 'core/ovations-api';\r\nimport { getRelativeTextColor, getRGB, shade } from 'core/util/colors';\r\nimport { isShallowEqual } from 'core/util/objects';\r\nimport toCss, { CSSConfig } from 'lib/toCss';\r\n\r\nexport interface ThemeStyleProps {\r\n portal: OvationsApi.Types.Portal;\r\n}\r\n\r\ninterface ButtonDef {\r\n className: string;\r\n fillColor: string | null;\r\n hoverColor: string | null;\r\n}\r\n\r\nconst getBoxShadow = (base16String?: string | null): string | undefined => {\r\n if (!base16String) {\r\n return;\r\n }\r\n return `0 0 0 0.2rem rgba(${getRGB(parseInt(base16String, 16))}, 0.5) !important`;\r\n};\r\n\r\nconst toColor = (base16String?: string | null): string | undefined => {\r\n if (!base16String) {\r\n return;\r\n }\r\n return `#${base16String} !important`;\r\n};\r\n\r\nconst important = (cssRule?: string) => {\r\n if (cssRule) {\r\n return `${cssRule} !important`;\r\n }\r\n};\r\n\r\nclass ThemeStyle extends React.Component {\r\n fontLink: HTMLLinkElement;\r\n\r\n static getFontLink(): HTMLLinkElement {\r\n const link = document.createElement('link');\r\n link.rel = 'stylesheet';\r\n return link;\r\n }\r\n\r\n constructor(props: ThemeStyleProps) {\r\n super(props);\r\n this.fontLink = ThemeStyle.getFontLink();\r\n }\r\n\r\n componentDidMount() {\r\n this.updateFont();\r\n }\r\n\r\n shouldComponentUpdate(nextProps: ThemeStyleProps) {\r\n return !isShallowEqual(this.props, nextProps);\r\n }\r\n\r\n componentDidUpdate(prevProps: ThemeStyleProps) {\r\n if (prevProps.portal.font !== this.props.portal.font) {\r\n this.updateFont();\r\n }\r\n }\r\n\r\n getFontUrl(): string | undefined {\r\n switch (this.props.portal.font) {\r\n case 'Open Sans':\r\n return 'https://fonts.googleapis.com/css?family=Open+Sans:400,400i,600,600i,700,700i';\r\n }\r\n }\r\n\r\n getUtilityStyles(): CSSConfig {\r\n const { portal } = this.props;\r\n return {\r\n '.theme-highlight': {\r\n backgroundColor: toColor(portal.navBarColor),\r\n color: toColor(portal.navLinkTextColor),\r\n },\r\n };\r\n }\r\n\r\n getButtonStyles(): CSSConfig {\r\n const { portal } = this.props;\r\n const buttonDefs: ButtonDef[] = [\r\n {\r\n className: 'btn-primary',\r\n fillColor: portal.primaryButtonColor,\r\n hoverColor: portal.primaryButtonHoverColor,\r\n },\r\n {\r\n className: 'btn-secondary',\r\n fillColor: portal.secondaryButtonColor,\r\n hoverColor: portal.secondaryButtonHoverColor,\r\n },\r\n ];\r\n\r\n return {\r\n ...assign(\r\n {},\r\n ...buttonDefs.map((buttonDef) => ({\r\n [`.${buttonDef.className}`]: {\r\n backgroundColor: toColor(buttonDef.fillColor),\r\n borderColor: toColor(buttonDef.fillColor),\r\n color: important(getRelativeTextColor(buttonDef.fillColor)),\r\n },\r\n [`.${buttonDef.className}:hover`]: {\r\n backgroundColor: toColor(buttonDef.hoverColor),\r\n borderColor: toColor(buttonDef.hoverColor),\r\n color: important(getRelativeTextColor(buttonDef.fillColor)),\r\n },\r\n [`.${buttonDef.className}:focus`]: {\r\n backgroundColor: toColor(buttonDef.fillColor),\r\n borderColor: toColor(buttonDef.fillColor),\r\n color: important(getRelativeTextColor(buttonDef.fillColor)),\r\n boxShadow: getBoxShadow(buttonDef.fillColor),\r\n },\r\n [`.${buttonDef.className}:not([disabled]):not(.disabled):active`]: {\r\n backgroundColor: toColor(shade(buttonDef.hoverColor, -0.2)),\r\n borderColor: toColor(shade(buttonDef.hoverColor, -0.2)),\r\n boxShadow: getBoxShadow(shade(buttonDef.hoverColor, -0.2)),\r\n color: important(getRelativeTextColor(buttonDef.fillColor)),\r\n },\r\n [`.${buttonDef.className}:disabled, .${buttonDef.className}.disabled`]: {\r\n backgroundColor: toColor(shade(buttonDef.fillColor, 0.2)),\r\n borderColor: toColor(shade(buttonDef.fillColor, 0.2)),\r\n },\r\n })),\r\n ),\r\n '.btn-tertiary': {\r\n backgroundColor: toColor(portal.navBarColor),\r\n color: toColor(portal.navLinkTextColor),\r\n },\r\n '.btn-tertiary:hover': {\r\n backgroundColor: toColor(portal.navLinkTextColor),\r\n color: toColor(portal.navBarColor),\r\n },\r\n '.btn-tertiary:focus': {\r\n boxShadow: getBoxShadow(portal.navLinkTextColor),\r\n },\r\n };\r\n }\r\n\r\n getFont(): CSSConfig {\r\n const { portal } = this.props;\r\n const portalFonts = compact([portal.font, 'Arial', 'Helvetica', 'sans-serif']).join(', ');\r\n return {\r\n body: {\r\n fontFamily: portalFonts,\r\n },\r\n };\r\n }\r\n\r\n getOverlayBgStyles(): CSSConfig {\r\n const { portal } = this.props;\r\n return {\r\n '.bg-light-overlay': {\r\n color: important(getRelativeTextColor(portal.navBarColor)),\r\n },\r\n '.container--enhanced': {\r\n backgroundColor: toColor(portal.navBarColor),\r\n },\r\n };\r\n }\r\n\r\n getHeaderStyles(): CSSConfig {\r\n const { portal } = this.props;\r\n return {\r\n '.navbar-nav': {\r\n justifyContent: 'end',\r\n },\r\n '.navbar--header': {\r\n backgroundColor: toColor(portal.navBarColor),\r\n },\r\n '.navbar--header .nav-link': {\r\n color: toColor(portal.navLinkTextColor),\r\n },\r\n '.navbar--header .nav-link:hover, .navbar--header .dropdown.show .nav-link': {\r\n color: toColor(portal.navLinkHoverTextColor),\r\n backgroundColor: toColor(portal.navLinkHoverBackgroundColor),\r\n },\r\n '.navbar--header .nav-link.active': {\r\n color: toColor(shade(portal.navLinkHoverTextColor, 0.33)),\r\n backgroundColor: toColor(portal.navLinkHoverBackgroundColor),\r\n fontWeight: 'bold',\r\n textDecoration: 'underline',\r\n textDecorationThickness: '3px',\r\n },\r\n '.navbar--header .navbar-toggler:focus': {\r\n boxShadow: getBoxShadow(portal.navLinkTextColor),\r\n },\r\n '.navbar--header .icon-bar': {\r\n backgroundColor: toColor(portal.navLinkTextColor),\r\n },\r\n '.navbar--header .navbar-collapse': {\r\n borderColor: toColor(portal.navLinkTextColor),\r\n },\r\n '.navbar--header .dropdown-menu': {\r\n backgroundColor: toColor(portal.navLinkHoverBackgroundColor),\r\n },\r\n '.navbar--header .dropdown-menu.active': {\r\n color: toColor(shade(portal.navLinkHoverTextColor, 0.33)),\r\n backgroundColor: toColor(portal.navLinkHoverBackgroundColor),\r\n },\r\n '.navbar--header .dropdown-menu .dropdown-item': {\r\n color: toColor(portal.navLinkHoverTextColor),\r\n },\r\n '.navbar--header .dropdown-menu .dropdown-item:hover': {\r\n color: toColor(portal.navLinkHoverTextColor),\r\n backgroundColor: toColor(portal.navLinkHoverBackgroundColor),\r\n },\r\n '.navbar--header .dropdown-menu .dropdown-item.active': {\r\n color: toColor(shade(portal.navLinkHoverTextColor, 0.33)),\r\n backgroundColor: toColor(portal.navLinkHoverBackgroundColor),\r\n },\r\n '.navbar--primary-tier .dropdown-menu .dropdown-item:active': {\r\n color: important(getRelativeTextColor(portal.primaryButtonColor)),\r\n backgroundColor: toColor(portal.primaryButtonColor),\r\n },\r\n '.claim-list__claim-card-action-required': {\r\n color: important(getRelativeTextColor(portal.primaryButtonColor)),\r\n backgroundColor: toColor(portal.primaryButtonColor),\r\n },\r\n '.claim-list__claim-card-action-required__link': {\r\n color: important(getRelativeTextColor(portal.primaryButtonColor)),\r\n },\r\n '.claim-list__claim-card-action-required__link .text-danger': {\r\n color: important(getRelativeTextColor(portal.primaryButtonColor)),\r\n },\r\n '.claim - list__claim - card - action - required__link: hover': {\r\n color: important(getRelativeTextColor(portal.primaryButtonColor)),\r\n },\r\n '.reward-catalog-button': {\r\n borderTop: `36px solid ${toColor(portal.primaryButtonColor)}`,\r\n },\r\n '.reward-catalog-button__inner': {\r\n color: important(getRelativeTextColor(portal.primaryButtonColor)),\r\n },\r\n '.reward-catalog--collapse-item': {\r\n borderTop: `1px solid ${toColor(portal.navLinkTextColor)}`,\r\n },\r\n '.reward-catalog--collapse-item .reward-catalog-button__inner': {\r\n color: toColor(portal.navLinkTextColor),\r\n },\r\n '.reward-catalog--collapse-item .reward-catalog-button:hover': {\r\n color: toColor(portal.navLinkHoverTextColor),\r\n backgroundColor: toColor(portal.navLinkHoverBackgroundColor),\r\n },\r\n };\r\n }\r\n\r\n getLiveChatStyles(): CSSConfig {\r\n if (!this.props.portal.enableLiveChat) {\r\n return {};\r\n }\r\n // `!important`s override livehelpnow's extremely high specificity\r\n return {\r\n '#lhnHelpOutCenter div.lhnWindow-header': {\r\n backgroundColor: toColor(this.props.portal.navBarColor),\r\n color: toColor(this.props.portal.navLinkTextColor),\r\n },\r\n '#lhnHelpOutCenter div.lhnChatActionsMenu img': {\r\n backgroundColor: toColor(this.props.portal.primaryButtonColor),\r\n },\r\n '.lhnHocChatBtnCont, .lhnFormButton, .lhnSendButton, .lhnstart': {\r\n backgroundColor: toColor(this.props.portal.primaryButtonColor),\r\n color: important(getRelativeTextColor(this.props.portal.primaryButtonColor)),\r\n },\r\n '.lhnHocChatBtnCont:hover, .lhnFormButton:hover, .lhnSendButton:hover, .lhnstart:hover': {\r\n backgroundColor: toColor(this.props.portal.primaryButtonHoverColor),\r\n },\r\n '.lhnPromptDecline, .lhncancel': {\r\n backgroundColor: toColor(this.props.portal.secondaryButtonColor),\r\n color: important(getRelativeTextColor(this.props.portal.secondaryButtonColor)),\r\n },\r\n '.lhnPromptDecline:hover, .lhncancel:hover': {\r\n backgroundColor: toColor(this.props.portal.secondaryButtonHoverColor),\r\n color: important(getRelativeTextColor(this.props.portal.secondaryButtonHoverColor)),\r\n },\r\n };\r\n }\r\n\r\n getTextStyles(): CSSConfig {\r\n const { portal } = this.props;\r\n return {\r\n '.text-primary, a.text-primary:focus': {\r\n color: toColor(portal.primaryButtonColor),\r\n },\r\n 'a.text-primary:hover': {\r\n color: toColor(portal.primaryButtonHoverColor),\r\n },\r\n '.text-secondary, a.text-secondary:focus': {\r\n color: toColor(portal.secondaryButtonColor),\r\n },\r\n 'a.text-secondary:hover': {\r\n color: toColor(portal.secondaryButtonHoverColor),\r\n },\r\n };\r\n }\r\n\r\n updateFont() {\r\n const fontUrl = this.getFontUrl();\r\n if (!fontUrl) {\r\n return;\r\n }\r\n this.fontLink.href = fontUrl;\r\n const head = document.querySelector('head') as HTMLHeadElement;\r\n head.appendChild(this.fontLink);\r\n }\r\n\r\n renderCss(): string {\r\n return toCss({\r\n ...this.getUtilityStyles(),\r\n ...this.getButtonStyles(),\r\n ...this.getFont(),\r\n ...this.getHeaderStyles(),\r\n ...this.getOverlayBgStyles(),\r\n ...this.getLiveChatStyles(),\r\n ...this.getTextStyles(),\r\n });\r\n }\r\n\r\n render() {\r\n // eslint-disable-next-line react/no-danger\r\n return