{"version":3,"sources":["IdentityServer/utils/axiosHeaders.tsx","IdentityServer/store/actions/actionTypes.ts","IdentityServer/store/actions/authActions.ts","IdentityServer/utils/identityServer/authProvider.ts","environment.js","IdentityServer/utils/identityServer/oidcService.tsx","IdentityServer/store/reducers/authReducer.ts","IdentityServer/store/reducers/index.ts","IdentityServer/store/index.ts","Redux/Actions.js","Redux/Reducer.js","Redux/Storkunde/StorkundeActions.js","Redux/Storkunde/StorkundeReducer.js","Redux/Store.js","utils/RegexLib.js","Components/PersonalInformation/Input.js","Components/PersonalInformation/InputPostBox.js","utils/Methods.js","Redux/ApiCalls.js","utils/helperFunctions.js","Components/PersonalInformation/PersonalInformation.js","Components/CustomerResidences/AddResidenceInput.js","Components/CustomerResidences/AddResidenceResult.js","Components/CustomerResidences/AddResidence.js","Components/CustomerResidences/CustomerResidences.js","Components/CurrentProducts/OtherProductsContainer.js","Components/AddMobileProducts/AddUser.js","Components/CurrentProducts/CurrentProducts.js","Components/AddProducts/ResidenceContainerModal.js","Components/ForutsigbarBetalingEstimate.js","Components/AddProducts/AddonProductContainer.js","Components/AddProducts/CampaignContainerModal.js","Components/AddProducts/InvoiceContainerModal.js","Components/AddProducts/StartDateContainerModal.js","Components/AddProducts/AccountIdContainerModal.js","Components/AddProducts/AddonProductCampaignContainerModal.js","Components/RadioCheckbox.js","Components/AddProducts/InputSelectComponent.js","Components/AddProducts/FixedPriceComponent.js","Components/AddProducts/TOBB.js","Components/AddProducts/Freetext.js","constants/product-constants.ts","Components/AddProducts/AddonProductPriceElementModal.js","Components/AddProducts/AddonProductPriceDialog.tsx","Components/AddProducts/AddonPulsContainerModal.js","Components/AddProducts/AddPowerOrder.js","Components/AddMobileProducts/ExtraProductSelector.js","Components/AddMobileProducts/ExtraProductList.js","Components/AddMobileProducts/CampaignSelector.js","Components/AddMobileProducts/CampaignList.js","utils/Prices.js","Components/AddMobileProducts/AddMobileOrder.js","Components/AddProducts/AddAddonOrder.js","Components/AddProducts/AddMarketplaceOrder.js","Components/AddProducts/AddOrder.js","Components/AddProducts/ShowDetails.js","Components/AddProducts/ListItem.js","Components/AddProducts/DropdownList.js","Components/AddProducts/AddProducts.js","Components/Order/Confirm.js","Components/Order/OrderValidationError.js","Components/Order/AddonPriceSummary.tsx","Components/Order/PriceSummaryBedrift.tsx","Components/Order/PriceSummary.js","Components/Order/PowerOrderSummary.js","Components/Order/AddonOrderSummary.tsx","Components/Order/SellerAndStoreSummary.tsx","Components/Order/ForutsigbarBetalingConvertsationTemplate.tsx","Components/Order/Summary.js","Components/Order/CalculateFastpris.js","Components/Order/OrderPowerOrder.js","Components/Order/OrderMobileOrder.js","Components/AddonProduct/OrderMarketplaceOrder.js","Components/Order/Order.js","Components/SelectStore.js","Images/Fjordkraft_logo.png","Components/PlacingOrderPowerOrder.js","Components/PlacingOrder.js","Images/Trondelagkraft_logo.png","Components/AddedChanges.js","Components/StatusSidebar.js","Components/HomeContent.js","Components/Statistics/StatisticsAccordionElement.js","Components/Statistics/Content.js","Components/Statistics/Options.js","Components/Statistics/SellerOrStoreOwner.js","Components/Statistics/Import/ImportStatistics.js","Components/Statistics/ImprovedStatistics.js","Components/Storkunde/StorkundeItems/StorkundeList.js","Components/Storkunde/StorkundeItems/StorkundeSalgsId.js","Components/Storkunde/Sidebar/StorkundeWarningItem.js","Components/Storkunde/Items/InputField.js","Components/Storkunde/StorkundeItems/StorkundeSellerSearch.js","Components/Storkunde/StorkundeItems/StorkundeProductSearch.js","Components/Storkunde/StorkundeItems/StorkundeStoreSelect.js","Components/Storkunde/StorkundeItems/StorkundeData.js","Components/Storkunde/Sidebar/StorkundeChanges.js","Components/Storkunde/OrderFeedback/OrderFailItem.js","Components/Storkunde/OrderFeedback/OrderCreatedItem.js","Components/Storkunde/StorkundeItems/StorkundeOrder.js","Components/Storkunde/StorkundeTutorial.js","Components/Storkunde/StorkundeItems/StorkundeAddSingleAnlegg.js","Components/Storkunde/Storkunde.js","Components/ReactRouter.js","Components/Home.js","IdentityServer/pages/FrontPage.tsx","IdentityServer/pages/signinOidc.tsx","IdentityServer/pages/signoutOidc.tsx","Components/SigninError.js","IdentityServer/routes/privateRoute.jsx","IdentityServer/routes/routes.tsx","App.js","reportWebVitals.js","index.js"],"names":["setAuthHeader","token","axios","defaults","headers","common","STORE_USER","USER_SIGNED_OUT","USER_EXPIRED","STORE_USER_ERROR","LOADING_USER","storeUser","user","access_token","console","log","type","payload","loadingUser","isLoading","storeUserError","AuthProvider","manager","userManager","store","children","useRef","useEffect","current","onUserLoaded","dispatch","onUserUnloaded","onAccessTokenExpiring","startSilentRenew","onAccessTokenExpired","onUserSignedOut","onSilentRenewError","events","addUserLoaded","addUserUnloaded","addAccessTokenExpiring","addAccessTokenExpired","addUserSignedOut","addSilentRenewError","removeUserLoaded","removeUserUnloaded","removeAccessTokenExpiring","removeAccessTokenExpired","removeUserSignedOut","removeSilentRenewError","React","Children","only","environment","env","window","stage","rootUrl","process","identityServerUrl","client","orderModuleApiClient","orderModuleApiUrl","conductorUrl","sendAfiUrl","creditUrl","isBedrift","stormwindUrl","steddiUrl","REACT_APP_STORMWIND_TEST","key","hasOwnProperty","undefined","error","config","authority","client_id","redirect_uri","response_type","grantType","userStore","WebStorageStateStore","localStorage","automaticSilentRenew","silent_redirect_uri","scope","post_logout_redirect_uri","makeUserManager","loadUserFromStorage","a","getUser","expired","signinRedirect","sessionStorage","setItem","location","pathname","signoutRedirect","signoutRedirectCallback","clearStaleState","removeUser","initialState","isLoadingUser","authReducer","state","action","rootReducer","combineReducers","auth","createStore","composeWithDevToolsDevOnly","ACTIONS","SET_SSN","SET_NAME","SET_PHONE","SET_EMAIL","SET_NO_EMAIL","SET_INVOICE_EMAIL","SET_OTHER_EMAIL_RECIPIENT","SET_PRODUCT_LIST","RESET_PRODUCT_LIST","SET_POWER_PRODUCTS","SET_ALL_BRANDS_PRODUCTS","FILTER_LISTS","SET_ADDON_PRODUCTS","SET_ORDER_INITIATED","ADD_TO_POWER_ORDERS","UPDATE_POWER_ORDER","REMOVE_POWER_ORDER","REMOVE_ADDON_ORDER","SET_RESIDENCE","ADD_TO_RESIDENCE","UPDATE_RESIDENCE","REMOVE_FROM_RESIDENCE","RESET_RESIDENCE","SET_RESIDENCE_ZIPCODE","SET_INVOICE","SET_START_DATE","SET_ADD_RESIDENCE","SET_ADD_RESIDENCE_LOADING","SET_ADD_METER_NUMBER","SET_ONYX_RESPONSE","SET_ONYX_RESULT","SET_ONYX_ERROR","ADD_TO_ANLEGG","SET_ORDERS_BY_SSN","SET_PLACING_ORDER_LOADING","SET_PLACING_ORDER","SET_SALESMODULE_SALES","UPDATE_ANLEGG","SET_SALESMODULE_SALE_RESULT","ADD_TO_CHOSEN_ADDON_PRODUCTS","REMOVE_FROM_CHOSEN_ADDON_PRODUCTS","SET_CHOSEN_ADDON_PRODUCTS","RESET_CHOSEN_ADDON_PRODUCTS","SET_ERROR_CREATE_ORDER","CLEAR_ERROR_CREATE_ORDER","SET_SELLER","SET_STORE_NAME","SET_SELLER_STORE_NAMES","SET_STORE_NAMES","SET_ACTIVE_STORE","SET_BRAND","RESET_CHOICES","RESET_CHOICES_FOR_MARKETPLACE","SET_PRODUCT_PRICES","RESET_PRODUCT_PRICES","BACK_FROM_RECEIPT","ADD_TO_MANUALLY_ADDED_SITES","SET_SHOW_DETAILS","SET_SHOW_DETAILS_LOADING","SET_PRODUCT_CAMPAIGN","REMOVE_FROM_PRODUCT_CAMPAIGNS","UPDATE_PRODUCT_CAMPAIGNS","RESET_PRODUCT_CAMPAIGN","SET_ACCOUNT_IDS","ADD_TO_ACCOUNT_ID","IS_CREATING_ENERGIKONTO","ADD_TO_SUMMARY_DETAILS","RESET_SUMMARY_DETAILS","ADD_TO_ADDON_SUMMARY_DETAILS","RESET_ADDON_SUMMARY_DETAILS","REMOVE_FROM_ANLEGG_BY_INDEX","SET_STATISTICS","SET_CREDIT_CHECK","SET_CREDIT_CHECK_MOBILE","SET_BONUS_CAMPAIGNS","SET_INVOICE_ADDRESS","SET_INVOICE_POST_CODE","ADD_CAMPAIGN_TO_ADDON_PRODUCTS","REMOVE_CAMPAIGN_FROM_ADDON_PRODUCTS","SET_CHOSEN_DISTRIBUTION_METHOD","SET_E_INVOICE_OBJECT","SET_SITE_LIST","SET_SITE_LOADING","UPDATE_SITE","SET_COMMISSION_CAMPAIGNS","SET_SELLER_COUNT","SET_SELLER_COUNT_OPEN","SET_PRODUCT_PRICEINFO","SET_PRODUCT_PRICEINFO_EL_CERT","SET_CONTRACT_BY_MAIL","SET_BINDING_TIME","SET_PRICELIST_LOADING","SET_STATISTICS_LOADING","SET_OVERRIDE_CREDIT","SET_OVERRIDE_ACCEPT","SET_OVERRIDE_FREEZE","SET_POSTBOX_ADDRESS","SET_CO_ADDRESS","SET_ATT_ADDRESS","SET_MOBILE_PRODUCTS","SET_MOBILE_EXTRA_PRODUCTS","SET_CONTACT_PERSON","SET_ADDON_PRODUCT_PRICE_INFO_LOADING","SET_ADDON_PRODUCT_PRICE_INFO","SET_ADDON_PRODUCT_PRICE_INFO_ERROR","SET_CHOSEN_ADDON_PRODUCT_PRICE","SET_CHOSEN_ADDON_PRODUCT_MINIMUM_TERM_DAYS","SET_ADDON_PRODUCT_CAMPAIGNS","SET_PRODUCT_HUB_CAMPAIGNS","RESET_ACCOUNT_ID","SET_SHOW_ADDEDCHANGES","SET_ADDEDCHANGES_LIST","SET_ERATE_ACCOUNT","SET_ERATE_ACCOUNT_INFO","ADD_TO_ADDON_ORDERS","ADD_TO_MOBILE_ORDERS","REMOVE_MOBILE_ORDER","ADD_TO_SUMMARY_DETAILS_MOBILE","RESET_SUMMARY_DETAILS_MOBILE","SET_OVERRIDE_RECEIPTSMS","SET_IS_STORKUNDE","SET_ADDED_CHANGES_SEEN","SET_ADDED_CHANGES_LOADED","ADD_TO_MOBILE_USERS","UPDATE_MOBILE_USER","DELETE_MOBILE_USER","SET_FILTERED_CAMPAIGNS","SET_ALL_STORES","SET_IS_POWER_STORE","SET_ACTIVE_DELIVERYPOINTS","SET_MOBILE_CAMPAIGNS","SET_IRISK_DEALID","SET_IRISK_GROUPID","GET_IRISK_DEALID","GET_IRISK_GROUPID","SET_IRISK_LOADING","ADD_IRISK_TO_EXISTING","SET_IRISK_ALERT","SET_DEFAULT_PORTINGDATE","SET_OWNER_STORES","SET_CREDIT_CHECK_LOADING","RESET_COUNT","ADD_TO_SITE_LIST","SET_IS_TOO_YOUNG_TO_ORDER","SET_ERROR_CHECK_PH","SET_ERROR_CHECK_ODM","SET_MOMENT_PRODUCT","SET_MOMENT_PRODUCT_PRESENTATION","ADD_ONYX_ARRAY","ERROR_EXCEL_EXPORT","ADD_TO_FORUTSIGBAR_BETALING_CACHE","SET_INVOICE_CITY","SET_BEDRIFT_INVOICE_ADDRESS","SET_TOBB_MEMBERSHIP","ADD_SUMMARY_MOBILE_ORDER","ADD_SUMMARY_POWER_ORDER","RESET_SUMMARY_ORDER","ADD_MARKETPLACE_ORDER","REMOVE_MARKETPLACE_ORDER","anlegg","manuallyAddedSites","customerDetail","ssn","name","phone","email","noEmail","invoiceEmail","otherEmailRecipient","invoiceAddress","invoicePostCode","productList","powerProducts","allBrandsProducts","filteredPowerProducts","filteredMobileProducts","filteredAddOnProducts","addonProducts","orderInitiated","powerOrders","powerOrder","id","product","residence","faktura","startDate","residenceZipCode","invoice","addResidence","address","zipCode","postArea","meterNumber","meterPointId","addResidenceLoading","onyxResponse","onyxResult","onyxError","ordersBySsn","placingOrder","placingOrderLoading","salesModuleSales","salesModuleSaleResult","chosenAddonProducts","errorCreateOrder","seller","activeStore","stores","sellerStores","brand","productPrices","showDetails","showDetailsIsLoading","productCampaign","accountIds","accountId","isCreatingEnergikonto","summaryDetails","summaryAddonDetails","statistics","storeLeaderStatistics","creditCheck","creditCheckMobile","chosenDistributionMethod","eInvoice","bonusCampaigns","addonProductCampaigns","siteList","siteLoading","brRegInfo","commissionCampaigns","sellerCount","sellerCountOpen","productPriceinfo","productPriceInfoElCert","contractByMail","bindingTime","priceListLoading","statisticsLoading","overrideCredit","overrideAccept","overrideFreeze","postBoxAddress","coAddress","attAddress","contactPerson","addedChanges","addedChangesList","addedChangesSeen","addedChangesLoading","allStores","ownerStores","isPowerStore","activeDeliveryPoints","hitFolkeRegister","filteredCampaigns","iRiskDealId","iRiskGroupId","retrievedIRiskGroupId","iRiskLoading","iRiskAlert","mobileProducts","mobileExtraProducts","erateAccount","erateAccountInfo","salesModulMobileResult","salesModuleMobileError","salesModuleMobileLoading","addonOrders","mobileOrders","mobileSales","mobileSaleResult","summaryDetailsMobile","mobileUsers","mobileCampaigns","defaultPortingDate","creditCheckLoading","momentProduct","momentProductPresentation","isTooYoungToOrder","errorPH","status","ping","errorODM","errorExcel","onyxArray","forutsigbarBetalingCache","invoiceCity","tobbMembershipNumber","summaryMobileOrders","summaryPowerOrders","marketplaceOrders","marketplaceOrder","sku","amount","shippingAddress","shippingPostCode","shippingCity","updateObjectInArray","array","map","item","index","flipName","tmp","split","flippedName","i","length","toUpperCase","slice","toLowerCase","toLowerCaseBedrift","companyName","reducer","bool","filter","powerProduct","includes","value","mobileProduct","addon","ap","productHubId","isPriceInfoLoading","priceInfo","data","_","invoiceLabel","newItem","chosenAddonProduct","identityServerId","o","storeId","manualCopyAnlegg","campaign","productCampaigns","addonProductId","campaigns","concat","campaignId","addonProductCampaignId","campaignName","priceElements","minimumTermDays","element","some","find","elhubHit","bregHit","foundInPublicRegistry","manuallyAdded","content","elhubDataCore","open","productHubCampaigns","mobileUser","newArray","closed","organizationName","invoiceZipCode","order","UPDATE_ALL_FAKTURAMERKE","REMOVE_STORKUNDE_KUNDENUMMER","ADD_STORKUNDE","RESET_STORKUNDE","SET_WARNING_STORKUNDE","SET_WARNING_STORKUNDE_ITEM","SET_SHOW_STORKUNDE_ITEM","RESET_SHOW_STORKUNDE_ITEM","SET_STORKUNDE_TOGGLE","UPDATE_STORKUNDE_ITEM","UPDATE_WARNING_STORKUNDE","ADD_FAILED_ORDER","ADD_CREATED_ORDER","SEARCH_KUNDELIST","SET_ANLEGG_LIST","RESET_SEARCHLIST","SET_PAGINATION_CURRENT","SET_PAGINATION_TOTAL","SET_PAGINATION_SEARCH","SET_STORKUNDE_LOADING","UPDATE_SINGLE_ANLEGG","ADD_TO_EXISTING_STORKUNDE","SET_STANDARD_PRODUCT","SHOW_ORDER_PAGE","TOGGLE_SINGLE_ANLEGG_MODAL","SET_IMPORT_NAME","isStorkunde","storkunde","storkundeWarning","storkundeWarningItem","storkundeItemSelected","storkundeToggle","failedOrders","createdOrders","anleggList","searchList","pagination","paginationTotal","storkundeLoading","singleAnlegg","standardProduct","showOrderPage","toggleSingleAnlegg","importname","addToAnleggStorkunde","salgsIDen","anleggene","push","updateWarnings","warnings","update","SalgsID","swID","isMissing","updateStorkunde","salgsID","searchAnlegg","searchParams","anleggArray","forEach","anl","StorkundeReducer","ele","Math","ceil","importName","appReducers","logger","createLogger","applyMiddleware","thunk","emailRegex","Input","width","label","placeholder","queryString","disabled","isOverridden","useState","setValue","setError","useDispatch","handleChange","e","changeValue","target","match","replace","toString","handleOnBlur","className","style","border","InputBase","fullWidth","inputProps","onBlur","onChange","InputPostBox","setPostBoxAddress","setCoAddress","att","setAtt","Grid","container","spacing","calculateFornybar","list","total","pricing","price","findLivePrices","firstGroupTotal","reduce","parseFloat","factor","secondGroupTotal","getBirthDateFromSSN","currentYear","day","year","Date","getFullYear","isLive","productId","isStromSmart","shouldShowPuls","isPuls","isForutsigbarBetaling","isMinBedrift","isMinBedriftPriceElement","priceElementId","minBedriftPriceElementIdFk","minBedriftPriceElementIdTk","isMarketplaceExtraProduct","sites","amountOfFreeMonths","invoiceType","cancelSource","post","deliveryPoints","cancelToken","estimateRes","createSystemLogs","url","title","info","timestamp","getProducthubProductById","get","res","getProductInfo","isMobile","isMobileExtraProduct","isAddon","channelId","textGroupId","res2","getAssumedProductsBySSN","getFilteredPowerProducts","customerType","ids","Array","isArray","productCategories","storeIds","getFilteredCampaigns","getAddonProductPriceInfo","getFilteredAddonProducts","search","getItem","brandSearch","URLSearchParams","forutsigbarRes","p","addonproduct","productCategory","getPostArea","mobile","fetchPostArea","fetch","then","response","ok","json","result","createOrders","body","User","Payload","JSON","stringify","Error","createStorkundeOrders","parse","getStatistics","getBonusCampaignsByTags","producthubTags","tagParams","tag","params","getSiteList","firstName","lastName","getProductFromMoment","momentId","getProductPresentationFromMoment","getProductPriceListElCert","searchSeller","searchParam","checkOrgNr","orgNr","addToExistingIrisk","dealID","groupID","DealIds","parseInt","getIsActiveMobile","phoneNr","active","sanitizeString","string","sanitizedString","trim","addSaleStatsQueue","options","Accept","saleStats","getAccountAndEnergiKonto","SsnOrOrgNr","IsBedrift","Brand","GetImportStatistics","GetImportStatisticOrders","importId","ValidateTobbMembershipNumber","medlemsnummer","CHOSEN_DISTRIBUTION_METHOD","isCampaignProduct","availableCampaigns","getAdressesInSameAccount","allAddresses","selectedAccount","reference","malepunktID","energiKontoNummer","Object","keys","join","getPingColor","getStatusColor","statusID","FormatOrgnameToLowerCase","str","words","word","charAt","getStatusMessage","calcWorkingDays","fromDate","days","count","setDate","getDate","getDay","isHoliday","date","dayOfEaster","getDateOfEaster","getMonth","getDayOfYear","b","floor","c","d","f","h","l","m","n","now","start","diff","calculatePrices","monthly","denomination","no4","priceInfoElCert","vatExclusivePrice","vatInclusivePrice","PersonalInformation","useSelector","setOverrideCredit","setOverrideAccept","setOverrideFreeze","emailCheckBoxChecked","setEmailCheckBoxChecked","substring","personnummer","pno","ind","yearno","Number","extractBirthYear","eighteenYearsAgo","moment","subtract","stringAge","formattedValue","isAfter","Box","sx","display","flexWrap","height","Paper","elevation","Typography","variant","mt","mb","fontWeight","identityServerStore","getState","profile","storeleader","role","FormGroup","FormControlLabel","control","Checkbox","color","size","transform","CircularProgress","ml","Button","onClick","checked","Alert","severity","maxWidth","Divider","AddResidenceInput","setZipCode","initialValue","checkDispatch","autoFocus","AddResidenceResult","handleClose","currentAddress","currentIndex","currentlyManuallyAdded","verifyElhub","Fragment","xs","addressV1","streetName","buildingNumber","buildingLetter","city","meterIdentification","meteringPointIdentification","updateSite","addNewResidence","AddResidence","currentZipCode","currentMeterNumber","matches","goBack","Dialog","onClose","aria-labelledby","aria-describedby","disableBackdropClick","sm","md","DialogTitle","fontSize","DialogContent","styles","marginBottom","sanitizedStreetName","loading","buildingNumberParam","verifyElhubApiCall","findResidence","CustomerResidences","setOpen","setCurrentAddress","setCurrentZipCode","setCurrentIndex","setCurrentlyManuallyAdded","setCurrentMeterNumber","setVerifyElhub","handleClickOpen","eInvoiceReference","message","getEInvoiceReference","marginTop","TableContainer","component","Table","minWidth","aria-label","TableHead","TableRow","TableCell","align","TableBody","background","borderRadius","openAddMeterNumber","activeOnBrand","handleVerifyElhub","orderStatus","textAlign","OtherProductsContainer","margin","paddingTop","paddingBottom","header","float","cursor","birthDate","newNumber","phoneNumber","ratePlanName","serviceStatus","CustomizedDialogs","isOwner","setUser","birthDateRegex","phoneRegex","userValidated","setUserValidated","setChecked","handleUserChange","event","defaultValue","test","IconButton","position","right","top","theme","palette","grey","noValidate","autoComplete","TextField","column","DialogActions","CurrentProducts","owner","openAddUser","setOpenAddUser","ownerFirstName","ownerLastName","isAccountOwner","ownerEmail","birthday","elem","findIndex","maxHeight","paddingRight","ResidenceContainerModal","malernummer","updateItem","producthubId","freg","preg","chosen","setChosen","setAvtale","setInvoiceLabel","aarsforbruk","setAarsforbruk","estimate","aafk","estimatedAnnualConsumption","found","handleChangeInvoiceLabel","backgroundColor","ForutsigbarBetalingEstimate","setLoading","setEstimate","CancelToken","source","findEk","dp","ad","cancel","meterPoints","r","manualSites","s","activeEks","otherActiveSites","getSitesFromResidences","estimatedConsumption","priceAreaName","missingElhubData","foundCache","getForutsigbarEstimatedPrice","v","catch","finally","AddonProductContainer","setCampaignOpen","setChosenAddonProductId","setPriceInfoOpen","autoSelect","setPulsOpen","extraProducts","addonObject","isAddonProductForutsigbarBetaling","choose","puls","latestResidence","editable","optional","findLivePrice","isLoadingPriceInfo","alignItems","justifyContent","findMinBedriftPrice","toFixed","CampaignContainerModal","months","InvoiceContainerModal","setSeparateInvoice","refID","refId","iscuId","StartDateContainerModal","AccountIdContainerModal","account","customerId","externalId","AddonProductsCampaignContainerModal","Map","values","RadioCheckbox","subtitle","selected","useMemo","InputSelectComponent","changedValue","selectedValue","hidden","ConsumptionProfileName","FixedPriceComponent","extraInfo","onSelect","locale","dateFormat","Valid","valid","TOBB","membershipNumber","setMembershipNumber","verificationResult","setVerificationResult","isValidated","setIsValidated","verifyTobbId","tobbId","validTobb","handleValidateClick","isValid","shouldShowButton","bgcolor","Freetext","setFreeText","show","setShow","Switch","multiline","rows","maxLength","PRODUCT_CONSTANTS","MIN","MAX","PriceInfoInput","priceElement","max","AddonProductsPriceElementModal","onConfirm","addonProduct","initialMinBedriftPricing","priceElementDefinitionId","getInitialMinBedriftPricing","defaultTermDays","minimumTermMonths","getInitialPricing","setPriceElements","setMinimumTermDays","targetValue","startsWith","newPriceElements","onSubmit","preventDefault","handleContinue","Select","MenuItem","handleChoose","overrideMinimumTerm","AddonProductPriceDialog","isOpen","chosenAddonProductId","handleConfirmPriceInfo","AddonPulsContainerModal","chosenItems","setChosenItems","pulsId","isSelected","updatedChosenItems","selectedItem","registerLocale","nb","styleOutline","borderColor","marginRight","left","boxShadow","iriskTheme","createTheme","components","MuiButton","styleOverrides","root","marginLeft","textTransform","AddPowerOrder","updateIndex","setStartDate","selectedProduct","eBNumber","setEbNumber","isSasBonusProduct","bc","bonusTypeId","campaignOpen","addonPriceInfoOpen","setAddonPriceInfoOpen","distributionMethod","eInvoiceRefFound","priceInfoList","setPriceInfoList","fornybar","setFornybar","setBindingTime","overrideBindingTimeValue","setOverrideBindingTimeValue","ehfRecipient","setEhfRecipient","ehfRecipientError","setEhfRecipientError","iRiskDealID","setIRiskDealID","iRiskGroupID","setIRiskGroupID","fixedPriceEndDate","setFixedPriceEndDate","fixedPriceVolume","setFixedPriceVolume","fixedPriceComment","setFixedPriceComment","ConsumptionProfileId","ConsumptionProfileDescription","fixedPriceUsageProfileValues","fixedPriceUsageProfile","setFixedPriceUsageProfile","showAsVariable","setShowAsVariable","separateInvoice","freeText","priceError","setPriceError","livePrices","setLivePrices","stromSmartPrices","setStromSmartPrices","pulsOpen","tags","agreement","getProductWithPrices","removeFornybar","priceElementDefinitions","addFornybar","iriskChange","addToExistingPlis","handleDistributionMethodChange","selectedIndex","handlePriceinfoChange","blur","inputValue","classList","add","remove","min","maxPrice","minPrice","newList","splice","theList","getAgeFromPersonNr","month","ageInMilliseconds","isDisabled","powerProductAvailableCampaigns","acc","matchingFilteredCampaign","disablebackdropclick","meterId","Tooltip","arrow","tooOldForTrippel","Modal","AddonProductCampaignContainerModal","transformedPriceElements","handleStromSmartPrices","handleLivePrice","productDefinitionId","isNaN","handleFixedPriceVolume","handleFixedPriceComment","handleSelectedComponent","InputLabelProps","shrink","disableAnimation","ThemeProvider","tradeCollectionId","borderStyle","handleDateSelect","bonusCampaignDtos","priceElementList","priceInfoMoment","thirdPartyEhf","fixedPrice","agreedVolume","consumptionProfileId","consumptionProfileName","consumptionProfileDescription","endDate","comment","getProductPriceListById","ExtraProductSelector","setExtraProducts","FormControl","InputLabel","labelId","extraProduct","recPrice","initPrice","ExtraProductList","List","dense","secondaryAction","edge","deleteExtraProduct","ListItemAvatar","Avatar","ListItemText","primary","CampaignSelector","setCampaigns","onlyOneAlert","setOnlyOneAlert","campaignGb","isCampaignWithStromfordel","isMobileProductWithStromfordel","CampaignList","deleteCampaign","InvoicePrices","AddMobileOrder","openMobile","handleCloseMobile","users","setUsers","filterList","setFilterList","DistributionMethodEnum","choosenDistribution","setChoosenDistribution","showUngAlert","setShowUngAlert","today","thirtyYearsAgo","setYear","portingDate","setPortingDate","isAlreadyActive","setIsAlreadyActive","isAlreadyActiveLoading","setIsAlreadyActiveLoading","close","TrapFocus","disableEnforceFocus","disableTypography","addUser","object","secondary","gutterBottom","RadioGroup","row","Radio","popperPlacement","maxDate","minDate","filterDate","isWeekday","format","switchDistributionEnum","invoiceAdress","site","SSN","FullName","FirstName","LastName","Phone","Email","Address","ZipCode","City","InvoiceCity","Users","BirthDate","Product","Campaigns","MobileNumber","ExtraProducts","PortingDate","Name","NewNumber","BrandID","Seller","Store","SalesTypeId","EInvoiceReference","AddAddonOrder","getAgeFromSSN","tooOld","addonContainer","every","onlySteddi","foundSiteList","siteInfo","AddMarketplaceOrder","AddOrder","openAddon","handleCloseAddon","openMarketplace","handleCloseMarketplace","ShowDetails","dangerouslySetInnerHTML","__html","ListItem","internalName","isBookmarked","toggleBookmark","setOpenMobile","openDetails","setOpenDetails","setOpenAddon","setOpenMarketplace","scrollTo","DropdownList","method","filteredList","expand","setExpand","bookmarked","setBookmarked","filteredListNoMarketplace","filteredListMarketplace","sortPowerProducts","indexOf","itemId","newBookmarked","overflow","zIndex","sort","tagA","tagB","priceIncVat","AddProducts","withPrices","products","getFilteredMobileExtraProducts","isAnyMarketplace","setIsMarketplace","hasMarketplaceProducts","Confirm","deleteType","isValidOrder","hasSteddi","updateInvoiceAddressValid","checkedOrCorrectEmail","contactPersonEmail","OrderValidationError","setHasSteddi","Grow","in","appear","unmountOnExit","timeout","AddonPriceSummary","renderLivePrices","PriceSummaryBedrift","number1","number2","number3","elCert","facilityVolume","PriceSummary","extraProductPrice","onPriceChange","addToSummary","chosenAddons","productTags","monthlyPrice","surcharge","handleAddToSummary","useCallback","power","priceSur","denomination1","denomination2","priceType","deno1","deno2","flexDirection","toLocaleDateString","pr","textDecoration","monthlyFeeIncVat","matchingPrice","priceProduct","priceelements","prod","pulsProduct","pulsPriceElements","PowerOrderSummary","items","category","distributionMethodEnum","num","totalMonthlyPrice","extraProductPrices","noMVA","totalSurcharge","sur","round","borderBottom","fontStyle","extraProductId","pb","borderTop","AddonOrderSummary","hasStartDay","SellerAndStoreSummaryItem","SellerAndStoreSummary","sellerName","sellerEmail","isFkas","sub","ForutsigbarBetalingConvertsationTemplate","foundInPowerOrders","ep","foundInAddonOrders","hasOrderedForutsigbarBetaling","Summary","selectedCommissionCampaign","setSelectedCommissionCampaign","showCommissionCampaignError","setShowCommissionCampaignError","isTMStore","setIsTMStore","currentExtraProduct","setCurrentExtraProduct","dialogRef","createRef","requireCommissionCampaign","chosenConfirm","signaturePadComp","imageURL","setImageURL","submitOrder","addOrders","toDataURL","preparePowerOrders","sale","checkDate","momentDate","clone","x","shala","campaignList","deliveryPoint","startUpDate","iSCUCustomerId","momentCustomerId","rightOfWithDrawal","isSame","invoiceDetailsCore","co","fixedPriceCore","contractMail","behavior","sales","addonSales","marketplaceSales","prepareMarketplaceOrders","mobileSalesList","u","IsOwner","ProductHubId","Campaign","mobileSale","ProductId","Fullname","ChosenDistributionMethod","Accepted","OverrideCredit","CreditCheckResult","creditStatus","firstOrder","commissionCampaign","fullName","organizationNumber","brandId","addonSale","mdmId","accepted","creditCheckResult","salesTypeId","digitalSignature","marketplaceSale","setSalesModuleSales","totMo","totalM","totalS","addonName","addonPrice","extraDeno","epLIST","lade","extraProductObj","campaignTexts","quantity","priceMonthly","priceSurcharge","denominationMonthly","denominationSurcharge","totalMonthly","totalSurcharges","totalPowerPrice","distribution","fixed","ref","required","FormHelperText","showExtraProductInfoMobile","initialFeeIncVat","padding","FormLabel","selectedWay","canvasProps","clear","CalculateFastpris","onlyNumbersRegex","estimatedAnnualConsumptionList","annualConsumption","percentage","yearlyVolume","powerOrderIndex","Infinity","calculate","dividers","FilledInput","endAdornment","InputAdornment","OrderPowerOrder","orders","onDelete","bonusCampaign","OrderMobileOrder","userIndex","OrderMarketplaceOrder","orderOffers","Order","openConfirm","setOpenConfirm","openSummary","setOpenSummary","openCalculateFastpris","setOpenCalculateFastpris","deleteItem","setDeleteItem","deleteIndex","setDeleteIndex","setDeleteType","fixedPriceButton","setFixedPriceButton","handleClickOpenConfirm","handleClickOpenCalculateFastpris","zip","joinedPowerOrders","campaignRes","extraProductTexts","textRes","getProductInfoSummary","SelectStore","classes","useStyles","SelectStoreAnchorEl","SetSelectStoreAnchorEl","Boolean","handleMenuItemClick","new_store","changeActiveStore","button","aria-haspopup","aria-controls","aria-expanded","currentTarget","Menu","anchorEl","anchorOrigin","vertical","horizontal","transformOrigin","paper","menuList","MenuListProps","makeStyles","PlacingOrderPowerOrder","borderBottomStyle","paddingLeft","PlacingOrder","direction","Image","src","Fjordkraft_logo","alt","pl","reload","yellow","AddedChanges","displayText","setDisplayText","currentText","setCurrentText","createdAt","setCreatedAt","createdAtIndex","setCreatedAtIndex","currentPage","setCurrentPage","setIsBedrift","textUrl","getAndSetChanges","textAndDateSplitter","err","paginate","pageSize","pageNumber","textHolder","dateHolder","textResult","dateResult","text","setterHelper","tArray","dArray","ClickAwayListener","onClickAway","scrollbarWidth","shift","reverse","dateTimeHelper","viewedBool","StatusSidebar","faq","hover","setHover","errors","setErrors","handleShow","checkPing","end","errorOrdermodule","Slide","mountOnEnter","Badge","badgeContent","overlap","invisible","onMouseEnter","onMouseLeave","HomeContent","hasFetchedSellerStoreNames","showMenuItems","setShowMenuItems","menuAnchor","setMenuAnchor","changeBrand","changeUrl","newUrl","checkIfPowerStore","parentId","getActiveDeliveryPoints","Popover","MenuList","to","ListItemIcon","startIcon","StatisticsAccordionElement","statsObject","storeIdSales","Accordion","orderIds","AccordionSummary","expandIcon","statisticStyle","iconStyling","AccordionDetails","justifyItems","orderId","StatisticsAccordionElementStoreId","newSale","toDate","setMatch","showSeller","setShowSeller","currentSeller","setCurrentSeller","fire","expanded","getSellerCount","set","hour","minute","second","millisecond","showOrderIds","StatisticsAccordionExtraProduct","numStyling","CopyOrderIdButton","useSWR","href","rel","Content","props","setIsDisabled","showSuccessText","setShowSuccessText","showButton","setShowButton","salesType","onDisableButton","setTimeout","sendExcel","salesTypeFilter","t","sellerOrStoreOwner","statsResp","handleFromDate","showTimeSelect","handleToDate","grossSalesHosEtablering","countNewSale","newSaleOrderIds","grossSalesManglerKontrakt","grossSalesManglerElhubtreff","grossSalesBadCredit","grossSalesSendtToTm","grossSalesSendtToTmMissingContract","grossSalesAngret","grossSalesFerdig","grossSales","grossSalesAccepted","acceptedCountNewSale","countProductExchange","productExchangeOrderIds","grossSalesExchangeAccepted","acceptedCountProductExchange","extraProductsHosEtablering","extraProductNewSaleCount","extraProductsManglerKontrakt","extraProductsManglerElhubtreff","extraProductsBadCredit","extraProductsSendtToTm","extraProductsSendtToTmMissingContract","extraProductsAngret","extraProductsFerdig","extraProductsSellerAccepted","acceptedCountEPNewSale","extraProductNewSaleOrderIds","extraProductProductExchangeCount","extraProductExchangeAccepted","extraProductExchangeOrderIds","grossMobileSalesHosEtablering","countNewMobileSale","newMobileSaleOrderIds","mobileSaleBadCredit","awaitingMobileCustomerApproval","mobileSaleCancelled","mobileSaleDone","grossMobileSales","grossSellerMobileSalesAccepted","storeIdSalesHosEtablering","storeIdSalesManglerKontrakt","storeIdSalesManglerElhubtreff","storeIdSalesBadCredit","storeIdSalesSendtToTm","storeIdSalesSendtToTmMissingContract","storeIdSalesAngret","storeIdSalesFerdig","acceptedStoreIdSales","storeIdSalesExchangeAccepted","storeIdExtraProductsHosEtablering","storeIdExtraProductsManglerKontrakt","storeIdExtraProductsManglerElhubtreff","storeIdExtraProductsBadCredit","storeIdExtraProductsSendtToTm","storeIdExtraProductsSendtToTmMissingContract","storeIdExtraProductsAngret","storeIdExtraProductsFerdig","storeIdExtraProducts","storeIdExtraProductsAccepted","acceptedExtraProductNewSaleCount","storeIdExtraProductsExchangeAccepted","acceptedExtraProductProductExchangeCount","mobileSaleHosEtablering","storeIdMobileSales","storeIdMobileSalesAccepted","Options","setStore","enum","image","updateSalesType","filteredStores","setChosenStores","handleStore","SellerOrStoreOwner","setSellerOrStoreOwner","setSalesType","importRole","setImport","showImport","ImportStatistics","importData","selectedImportOrders","setSelectedImportOrders","selectedImport","setSelectedImport","showPrivate","setShowPrivate","columns","field","headerName","renderCell","hide","handleSelectImport","importSelected","importD","created","orderCount","DataGrid","rowsPerPageOptions","onCellClick","param","ImprovedStatistics","chosenStores","initialFromDate","startOf","setFromDate","setToDate","setShowImport","setImportData","handleImportSet","childStores","getImportStatistics","salesTypeEnum","callStatistics","number","storkundeListStyle","typographyPStyle","typographyPLargerStyle","paperStyle","fontFamily","headerStyle","StorkundeList","listData","adresseShow","setAdresseShow","storkundeStyle","storkundeItem","StorkundeSalgsId","salgsData","stateStorkunde","Firmanavn","WarningToolTip","styled","popper","tooltipClasses","tooltip","typography","pxToRem","listItemStyle","dialogStyle","StorkundeWarningItem","handleWarningClick","InputField","searchButton","clicked","labelData","changed","optionsArray","popperClassName","placeholderText","storkundeSingleStyle","dividerStyle","boxStyle","textFieldStyle","buttonStyle","sellerSearchListItem","buttonNextStyle","formStyle","boxComponentStyle","overflowY","StorkundeSellerSearch","sellerMail","sellerCode","selectedSeller","sellerSearch","setSellerSearch","sellerSearchText","setSellerSearchText","handleInputFieldClick","StorkundeProductSearch","productName","productSearch","setProductSearch","searchField","setSearchField","notFoundProducts","setNotFoundProducts","assumedProducts","setAssumedProducts","localProductList","setLocalProductList","toggleSelected","setToggleSelected","productTried","setProductTried","storeHolder","setStoreHolder","handleGetAssumed","handleProductSearchByStore","storeArray","ToggleButtonGroup","orientation","exclusive","ToggleButton","searchString","localArray","disableUnderline","StorkundeStoreSelect","storeName","storeCode","selectedStore","storkundeDataStyle","buttonStyleSeller","gridItemContainerStyle","StorkundeData","storkundeSelected","saved","setSaved","showSalgsIdData","setShowSalgsIData","invoiceText","setInvoiceText","invoiceGroup","setInvoiceGroup","anleggAddress","setAnleggAdress","anleggPostnr","setAnleggPostnr","meterNr","setMeterNr","setMeterId","setProduct","setProductName","startupDate","setStartupDate","mailRef","setMailReference","setFixedPrice","setSurcharge","customerNr","setCustomerNr","energiKonto","setEnergiKonto","setInvoiceAddress","invoicePostnr","setInvoicePostnr","setSellerCode","setSellerName","setSellerMail","setStoreName","setStoreCode","setInvoiceType","invoiceCategory","setInvoiceCategory","setBrand","invoiceCategoryChoices","brandChoices","invoiceTypeChoices","handleChanged","searchForProduct","Container","handleEditProduct","StorkundeChanges","fakMerke","setFakMerke","fakForfall","setfakForfall","oppstartsDato","setOppstartsDato","fakGruppe","setFakGruppe","merkeUpdate","setMerkeUpdate","forfallUpdate","setForfallUpdate","oppstartUpdate","setOppstartUpdate","sellerUpdate","setSellerUpdate","gruppeUpdate","setGruppeUpdate","selectedSearch","setSelectedSearch","handleSellerSearch","storkundeChangesStyle","minHeight","OrderFailItem","orderFail","Message","OrderCreatedItem","orderSucc","nameOrg","setNameOrg","customer","orderStatusId","StorkundeOrder","packedOrders","setPackedOrders","errorOrder","totalCreated","setTotalCreated","totalError","setTotalError","orderStagesCompleted","setOrderStagesCompleted","salgsIdBlokk","handlePackingOrders","delay","ms","Promise","resolve","createOrder","sellerId","CreateImportStatistic","fakturaType","salg","ordren","datoen","MomentCustomerId","overrideReceiptOrSms","heigth","index2","StorkundeTutorial","tutorialStage","setTutorialStage","storkundeTutorial","arrowIcon","download","Pagination","shape","storkundeOrdreCreatedStyle","expandIconsStyle","storkundeOrderFailItem","Collapse","StorkundeAddSingleAnlegg","salgsIder","setStage","latestSwId","setLatestSwId","setCreated","loadingBrReg","setLoadingBrReg","brRegError","setBrRegError","contact","adress","postnr","tlf","meternr","anleggAdress","customerNumber","energyAccount","salgsId","isNewSalgsID","newAnleggObj","setNewAnleggObj","handleSaveToStateObj","handleAddStorkunde","PELArray","Adresse","Anleggsadresse","Anleggspostnr","Butikkkode","Butikknavn","Epost","Fakturamerke","Fakturagruppe","Kundenummer","Energikonto","Mailreferanse","Oppstartsdato","Fornavn","Etternavn","Målernummer","MålepktId","Mobilnummer","Postnr","ProduktHub","Sellerkode","Sellernavn","handleSearchByOrgnr","navn","forretningsadresse","adresse","postnummer","handleCheckMomentId","storkunden","regged","overflowX","orderWorking","single","Storkunde","productGroup","setProductGroups","productLoading","setProductLoading","showingAnlegg","setShowingAnlegg","openWarning","setOpenWarning","anleggLoading","setAnleggLoading","openEdit","setOpenEdit","showTut","setShowTut","salgsIdForcer","setSalgsIdForcer","setSearchAnlegg","anleggHolder","setAnleggHolder","importHolder","setImportHolder","counterId","setCounterId","varselArray","setVarselArray","lastSalgsIdHolder","setLastSalgsIdHolder","invoiceAdressMap","setInvoiceAdressMap","mdmMap","setMdmMap","storeMap","setStoreMap","sellerMap","setSellerMap","searchSellersMap","setSearchedSellersMap","sitesBySalgsIdMap","pg","handleCreateSales","handleCreateToMap","handleCheckForInvoiceAddress","has","handleCheckStore","handleCheckSeller","objWarning","isMissingCrit","Orgnummer","Personnummer","checkForWarings","mid","setFromImport","files","arrayBuffer","workbook","XLSX","cellDates","first_worksheet","Sheets","SheetNames","sheet_to_json","endRange","startRange","handleItemSave","kunde","Drawer","anchor","warning","checkWarning","ReactRouter","sellerHasMultipleStores","getAllStores","getDefaultPortingDate","exact","path","Home","Frontpage","SigninOidc","history","useHistory","signinRedirectCallback","signinAsync","SignoutOidc","signoutAsync","SigninError","timer","clearTimeout","PrivateRoute","Component","rest","useLocation","render","routes","signinOidc","signoutOidc","FrontPage","App","reportWebVitals","onPerfEntry","Function","getCLS","getFID","getFCP","getLCP","getTTFB","ReactDOM","document","getElementById"],"mappings":"64BAEaA,EAAgB,SAACC,GAC5BC,IAAMC,SAASC,QAAQC,OAAvB,cAAiDJ,EAAQ,UAAYA,EAAQ,ICFlEK,EAAa,aACbC,EAAkB,kBAClBC,EAAe,eACfC,EAAmB,mBACnBC,EAAe,eCKrB,SAASC,EAAUC,GAGxB,OAFAZ,EAAcY,EAAKC,cACnBC,QAAQC,IAAI,gBACL,CACLC,KAAMV,EACNW,QAASL,GAIN,SAASM,EAAYC,GAC1B,MAAO,CACLH,KAAMN,EACNO,QAASE,GAIN,SAASC,IACd,MAAO,CACLJ,KAAMP,GCpBK,SAASY,EAAT,GAAoF,IAA/CC,EAA8C,EAA3DC,YAAsBC,EAAqC,EAArCA,MAAOC,EAA8B,EAA9BA,SAC9DF,EAAcG,iBAAOJ,GAmDzB,OAjDAK,qBAAU,WACRJ,EAAYK,QAAUN,EAEtB,IAAMO,EAAe,SAACjB,GAEpBY,EAAMM,SAASnB,EAAU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B,OAAK,EAACC,KAAK,KAAKjzC,UAAWs0C,QCDvC/gD,GAAS,IAAI5B,gBAAgBhlB,OAAOwC,SAASqiB,QACnDloB,IAAMC,SAASC,QAAQC,OAAvB,MAAyC8pB,GAAO09C,IAAI,SAAW19C,GAAOnD,IAAI,SAAW,OActEmkD,OAZf,WACE,OACE,sBAAK9nD,UAAU,MAAf,SACE,eAAC,IAAD,CAAU7hB,MAAOA,EAAjB,SACE,eAACH,EAAD,CAAcE,YAAaA,EAAaC,MAAOA,EAA/C,SACE,eAAC,IAAD,CAAeC,SAAUspE,YCLpBK,GAZS,SAACC,GACnBA,GAAeA,aAAuBC,UACxC,8BAAqBtiD,MAAK,YAAkD,IAA/CuiD,EAA8C,EAA9CA,OAAQC,EAAsC,EAAtCA,OAAQC,EAA8B,EAA9BA,OAAQC,EAAsB,EAAtBA,OAAQC,EAAc,EAAdA,QAC3DJ,EAAOF,GACPG,EAAOH,GACPI,EAAOJ,GACPK,EAAOL,GACPM,EAAQN,OCDdO,IAASd,OAAO,eAAC,GAAD,IAASe,SAASC,eAAe,SAKjDV,M","file":"static/js/main.1d5b806a.chunk.js","sourcesContent":["import axios from 'axios';\n\nexport const setAuthHeader = (token: string | null) => {\n axios.defaults.headers.common['Authorization'] = token ? 'Bearer ' + token : '';\n};\n","//auth\nexport const STORE_USER = 'STORE_USER';\nexport const USER_SIGNED_OUT = 'USER_SIGNED_OUT';\nexport const USER_EXPIRED = 'USER_EXPIRED';\nexport const STORE_USER_ERROR = 'STORE_USER_ERROR';\nexport const LOADING_USER = 'LOADING_USER';\n","import {\n STORE_USER,\n USER_SIGNED_OUT,\n USER_EXPIRED,\n STORE_USER_ERROR,\n LOADING_USER,\n} from './actionTypes';\nimport { setAuthHeader } from '../../utils/axiosHeaders';\nimport { User } from 'oidc-client';\n\nexport function storeUser(user: User) {\n setAuthHeader(user.access_token);\n console.log('Storing user');\n return {\n type: STORE_USER,\n payload: user,\n };\n}\n\nexport function loadingUser(isLoading: boolean) {\n return {\n type: LOADING_USER,\n payload: isLoading,\n };\n}\n\nexport function storeUserError() {\n return {\n type: STORE_USER_ERROR,\n };\n}\n\nexport function userExpired() {\n return {\n type: USER_EXPIRED,\n };\n}\n\nexport function userSignedOut() {\n return {\n type: USER_SIGNED_OUT,\n };\n}\n","import React, { useEffect, useRef } from 'react';\nimport { setAuthHeader } from '../axiosHeaders';\nimport { User, UserManager } from 'oidc-client';\nimport { StoreType } from '../../store';\nimport { storeUser } from '../../store/actions/authActions';\n\ntype authProviderType = { userManager: UserManager; store: StoreType; children: any };\n\nexport default function AuthProvider({ userManager: manager, store, children }: authProviderType) {\n let userManager = useRef(manager);\n\n useEffect(() => {\n userManager.current = manager;\n\n const onUserLoaded = (user: User) => {\n //console.log(`user loaded: ${user}`)\n store.dispatch(storeUser(user)); // <-- this causes components to mount prematurely, causing the change state before mount error\n };\n\n const onUserUnloaded = () => {\n setAuthHeader(null);\n //console.log(`user unloaded`)\n };\n\n const onAccessTokenExpiring = () => {\n console.log(`user token expiring`);\n userManager.current.startSilentRenew();\n };\n\n const onAccessTokenExpired = () => {\n console.log(`user token expired`);\n };\n\n const onUserSignedOut = () => {\n //console.log(`user signed out`)\n };\n\n const onSilentRenewError = () => {\n console.log('silent renew error');\n };\n\n // events for user\n userManager.current.events.addUserLoaded(onUserLoaded);\n userManager.current.events.addUserUnloaded(onUserUnloaded);\n userManager.current.events.addAccessTokenExpiring(onAccessTokenExpiring);\n userManager.current.events.addAccessTokenExpired(onAccessTokenExpired);\n userManager.current.events.addUserSignedOut(onUserSignedOut);\n userManager.current.events.addSilentRenewError(onSilentRenewError);\n\n // Specify how to clean up after this effect:\n return function cleanup() {\n userManager.current.events.removeUserLoaded(onUserLoaded);\n userManager.current.events.removeUserUnloaded(onUserUnloaded);\n userManager.current.events.removeAccessTokenExpiring(onAccessTokenExpiring);\n userManager.current.events.removeAccessTokenExpired(onAccessTokenExpired);\n userManager.current.events.removeUserSignedOut(onUserSignedOut);\n userManager.current.events.removeSilentRenewError(onSilentRenewError);\n };\n }, [manager, store]);\n\n return React.Children.only(children);\n}\n","const environment = () => {\n let env\n //@ts-ignore\n switch (window.stage) {\n case (\"DEV\"):\n env = {\n rootUrl: process.env.REACT_APP_ROOT_URL,\n identityServerUrl: process.env.REACT_APP_AUTH_URL,\n client: process.env.REACT_APP_AUTH_CLIENT,\n orderModuleApiClient: process.env.REACT_APP_ORDER_MODULE_API_CLIENT,\n orderModuleApiUrl: process.env.REACT_APP_ORDER_MODULE_API_URL,\n conductorUrl: process.env.REACT_APP_CONDUCTOR_URL,\n sendAfiUrl: process.env.REACT_APP_SEND_AFI_URL,\n creditUrl: process.env.REACT_APP_CREDIT_URL,\n isBedrift: process.env.REACT_APP_IS_BEDRIFT,\n stormwindUrl: process.env.REACT_APP_STORMWIND,\n steddiUrl: process.env.REACT_APP_STEDDI_URL\n }\n break;\n case (\"DEVBEDRIFT\"):\n env = {\n rootUrl: process.env.REACT_APP_ROOT_URL_DEVBEDRIFT,\n identityServerUrl: process.env.REACT_APP_AUTH_URL,\n client: process.env.REACT_APP_AUTH_CLIENT,\n orderModuleApiClient: process.env.REACT_APP_ORDER_MODULE_API_CLIENT,\n orderModuleApiUrl: process.env.REACT_APP_ORDER_MODULE_API_URL,\n conductorUrl: process.env.REACT_APP_CONDUCTOR_URL,\n sendAfiUrl: process.env.REACT_APP_SEND_AFI_URL,\n creditUrl: process.env.REACT_APP_CREDIT_URL,\n isBedrift: process.env.REACT_APP_IS_BEDRIFT_TRUE,\n stormwindUrl: process.env.REACT_APP_STORMWIND,\n steddiUrl: process.env.REACT_APP_STEDDI_URL\n }\n break;\n case (\"TEST\"):\n env = {\n rootUrl: process.env.REACT_APP_ROOT_URL_TEST,\n identityServerUrl: process.env.REACT_APP_AUTH_URL_TEST,\n client: process.env.REACT_APP_AUTH_CLIENT_TEST,\n orderModuleApiClient: process.env.REACT_APP_ORDER_MODULE_API_CLIENT_TEST,\n orderModuleApiUrl: process.env.REACT_APP_ORDER_MODULE_API_URL_TEST,\n conductorUrl: process.env.REACT_APP_CONDUCTOR_URL_TEST,\n sendAfiUrl: process.env.REACT_APP_SEND_AFI_URL_TEST,\n creditUrl: process.env.REACT_APP_CREDIT_URL_TEST,\n isBedrift: process.env.REACT_APP_IS_BEDRIFT,\n stormwindUrl: process.env.REACT_APP_STORMWIND,\n steddiUrl: process.env.REACT_APP_STEDDI_URL\n }\n break;\n case (\"PROD\"):\n env = {\n rootUrl: process.env.REACT_APP_ROOT_URL_PROD,\n identityServerUrl: process.env.REACT_APP_AUTH_URL_PROD,\n client: process.env.REACT_APP_AUTH_CLIENT_PROD,\n orderModuleApiClient: process.env.REACT_APP_ORDER_MODULE_API_CLIENT_PROD,\n orderModuleApiUrl: process.env.REACT_APP_ORDER_MODULE_API_URL_PROD,\n conductorUrl: process.env.REACT_APP_CONDUCTOR_URL_PROD,\n sendAfiUrl: process.env.REACT_APP_SEND_AFI_URL_PROD,\n creditUrl: process.env.REACT_APP_CREDIT_URL_PROD,\n stormwindUrl: process.env.REACT_APP_STORMWIND_PROD,\n isBedrift: process.env.REACT_APP_IS_BEDRIFT,\n steddiUrl: process.env.REACT_APP_STEDDI_URL_PROD\n }\n break;\n case (\"PRODV2\"):\n env = {\n rootUrl: process.env.REACT_APP_ROOT_URL_PROD_V2,\n identityServerUrl: process.env.REACT_APP_AUTH_URL_PROD,\n client: process.env.REACT_APP_AUTH_CLIENT_PROD,\n orderModuleApiClient: process.env.REACT_APP_ORDER_MODULE_API_CLIENT_PROD,\n orderModuleApiUrl: process.env.REACT_APP_ORDER_MODULE_API_URL_BETA,\n conductorUrl: process.env.REACT_APP_CONDUCTOR_URL_BETA,\n sendAfiUrl: process.env.REACT_APP_SEND_AFI_URL_PROD,\n creditUrl: process.env.REACT_APP_CREDIT_URL_PROD,\n stormwindUrl: process.env.REACT_APP_STORMWIND_PROD,\n isBedrift: process.env.REACT_APP_IS_BEDRIFT,\n steddiUrl: process.env.REACT_APP_STEDDI_URL_PROD\n }\n break;\n case (\"TESTBEDRIFT\"):\n env = {\n rootUrl: process.env.REACT_APP_ROOT_URL_TESTBEDRIFT,\n identityServerUrl: process.env.REACT_APP_AUTH_URL_TEST,\n client: process.env.REACT_APP_AUTH_CLIENT_TEST,\n orderModuleApiClient: process.env.REACT_APP_ORDER_MODULE_API_CLIENT_TEST,\n orderModuleApiUrl: process.env.REACT_APP_ORDER_MODULE_API_URL_TEST,\n conductorUrl: process.env.REACT_APP_CONDUCTOR_URL_TEST,\n sendAfiUrl: process.env.REACT_APP_SEND_AFI_URL_TEST,\n creditUrl: process.env.REACT_APP_CREDIT_URL_TEST,\n stormwindUrl: process.env.REACT_APP_STORMWIND_TEST,\n isBedrift: process.env.REACT_APP_IS_BEDRIFT_TRUE,\n steddiUrl: process.env.REACT_APP_STEDDI_URL\n }\n break;\n case (\"BEDRIFT\"):\n env = {\n rootUrl: process.env.REACT_APP_ROOT_URL_BEDRIFT,\n identityServerUrl: process.env.REACT_APP_AUTH_URL_PROD,\n client: process.env.REACT_APP_AUTH_CLIENT_PROD,\n orderModuleApiClient: process.env.REACT_APP_ORDER_MODULE_API_CLIENT_PROD,\n orderModuleApiUrl: process.env.REACT_APP_ORDER_MODULE_API_URL_PROD,\n conductorUrl: process.env.REACT_APP_CONDUCTOR_URL_PROD,\n sendAfiUrl: process.env.REACT_APP_SEND_AFI_URL_PROD,\n creditUrl: process.env.REACT_APP_CREDIT_URL_PROD,\n stormwindUrl: process.env.REACT_APP_STORMWIND_PROD,\n isBedrift: process.env.REACT_APP_IS_BEDRIFT_TRUE,\n steddiUrl: process.env.REACT_APP_STEDDI_URL_PROD\n }\n break;\n case (\"BEDRIFTBETA\"):\n env = {\n rootUrl: process.env.REACT_APP_ROOT_URL_BEDRIFTBETA,\n identityServerUrl: process.env.REACT_APP_AUTH_URL_PROD,\n client: process.env.REACT_APP_AUTH_CLIENT_PROD,\n orderModuleApiClient: process.env.REACT_APP_ORDER_MODULE_API_CLIENT_PROD,\n orderModuleApiUrl: process.env.REACT_APP_ORDER_MODULE_API_URL_PROD,\n conductorUrl: process.env.REACT_APP_CONDUCTOR_URL_BETA,\n sendAfiUrl: process.env.REACT_APP_SEND_AFI_URL_PROD,\n creditUrl: process.env.REACT_APP_CREDIT_URL_PROD,\n stormwindUrl: process.env.REACT_APP_STORMWIND_PROD,\n isBedrift: process.env.REACT_APP_IS_BEDRIFT_TRUE,\n steddiUrl: process.env.REACT_APP_STEDDI_URL_PROD\n }\n break;\n default:\n env = {\n rootUrl: process.env.REACT_APP_ROOT_URL,\n identityServerUrl: process.env.REACT_APP_AUTH_URL,\n client: process.env.REACT_APP_AUTH_CLIENT,\n orderModuleApiClient: process.env.REACT_APP_ORDER_MODULE_API_CLIENT,\n orderModuleApiUrl: process.env.REACT_APP_ORDER_MODULE_API_URL,\n conductorUrl: process.env.REACT_APP_CONDUCTOR_URL,\n sendAfiUrl: process.env.REACT_APP_SEND_AFI_URL,\n creditUrl: process.env.REACT_APP_CREDIT_URL,\n isBedrift: process.env.REACT_APP_IS_BEDRIFT,\n stormwindUrl: process.env.REACT_APP_STORMWIND,\n steddiUrl: process.env.REACT_APP_STEDDI_URL\n }\n }\n for (var key in env) {\n if (env.hasOwnProperty(key) && env[key] === undefined) {\n console.error(\"Environment: \" + key + \" is missing from environment\");\n }\n }\n\n return env;\n};\n\nexport default environment();\n","import environment from '../../../environment';\nimport { makeUserManager } from 'react-oidc';\nimport { storeUserError, storeUser, loadingUser } from '../../store/actions/authActions';\nimport { WebStorageStateStore } from 'oidc-client';\n//import { Log } from \"oidc-client\";\n\n//Log.logger = console;\n//Log.level = Log.DEBUG;\n\nconst config = {\n // the URL of our identity server\n authority: environment.identityServerUrl,\n // this ID maps to the client ID in the identity client configuration\n client_id: environment.client,\n // URL to redirect to after login\n redirect_uri: `${environment.rootUrl}/signin-oidc`,\n response_type: 'code',\n grantType: 'authorization_code',\n userStore: new WebStorageStateStore({ store: window.localStorage }),\n automaticSilentRenew: true,\n silent_redirect_uri: `${environment.rootUrl}/silent_renew.html`,\n // the scopes or resources we would like access to\n scope: `openid fullname ${environment.orderModuleApiClient} roles sales`,\n // URL to redirect to after logout\n post_logout_redirect_uri: `${environment.rootUrl}/signout-oidc`,\n};\n\n// initialise!\nconst userManager = makeUserManager(config);\n\nexport const loadUserFromStorage = async (store: {\n dispatch: (arg0: { type: string; payload?: any }) => void;\n}) => {\n store.dispatch(loadingUser(true));\n try {\n let user = await userManager.getUser();\n if (!user || user.expired) {\n signinRedirect();\n return store.dispatch(storeUserError());\n }\n store.dispatch(storeUser(user));\n } catch (e) {\n console.error(`User not found: ${e}`);\n store.dispatch(storeUserError());\n } finally {\n store.dispatch(loadingUser(false));\n }\n};\n\nexport const startSilentRenew = () => {\n console.log('Starting silent renew...');\n return userManager.startSilentRenew;\n};\n\nexport const querySessionStatus = () => {\n return userManager.querySessionStatus();\n};\n\nexport function signinRedirect() {\n sessionStorage.setItem('lastRoute', window.location.pathname);\n return userManager.signinRedirect();\n}\n\nexport function signinRedirectCallback() {\n return userManager.signinRedirectCallback();\n}\n\nexport function signoutRedirect() {\n return userManager.signoutRedirect();\n}\n\nexport function signoutRedirectCallback() {\n userManager.clearStaleState();\n userManager.removeUser();\n return userManager.signoutRedirectCallback();\n}\n\nexport function silentSignIn() {\n console.log('Attempting silent sign in');\n return userManager.signinSilent();\n}\n\nexport default userManager;\n","import {\n USER_SIGNED_OUT,\n STORE_USER_ERROR,\n USER_EXPIRED,\n STORE_USER,\n LOADING_USER,\n} from '../actions/actionTypes';\n\nconst initialState = {\n user: null,\n isLoadingUser: true,\n};\n\nconst authReducer = (state = initialState, action: { type: any; payload: any }) => {\n switch (action.type) {\n case STORE_USER:\n return {\n ...state,\n isLoadingUser: false,\n user: action.payload,\n };\n case LOADING_USER:\n return {\n ...state,\n isLoadingUser: action.payload,\n };\n case USER_EXPIRED:\n case STORE_USER_ERROR:\n case USER_SIGNED_OUT:\n return {\n ...state,\n user: null,\n isLoadingUser: false,\n };\n default:\n return state;\n }\n};\n\nexport default authReducer;\n","import { combineReducers } from 'redux';\nimport authReducer from './authReducer';\n\nexport const rootReducer = combineReducers({\n auth: authReducer,\n});\n\nexport type RootState = ReturnType;\n","import { createStore } from 'redux';\nimport { composeWithDevTools as composeWithDevToolsDevOnly } from 'redux-devtools-extension/developmentOnly';\n\nimport { rootReducer } from './reducers';\n\nconst store = createStore(rootReducer, composeWithDevToolsDevOnly());\n\nexport default store;\n\nexport type StoreType = typeof store;\n","const ACTIONS = {\n SET_SSN: 'SET_SSN',\n SET_NAME: 'SET_NAME',\n SET_PHONE: 'SET_PHONE',\n SET_EMAIL: 'SET_EMAIL',\n SET_NO_EMAIL: 'SET_NO_EMAIL',\n SET_INVOICE_EMAIL: 'SET_INVOICE_EMAIL',\n SET_OTHER_EMAIL_RECIPIENT: 'SET_OTHER_EMAIL_RECIPIENT',\n SET_PRODUCT_LIST: 'SET_PRODUCT_LIST',\n RESET_PRODUCT_LIST: 'RESET_PRODUCT_LIST',\n SET_POWER_PRODUCTS: 'SET_POWER_PRODUCTS',\n SET_ALL_BRANDS_PRODUCTS: 'SET_ALL_BRANDS_PRODUCTS',\n FILTER_LISTS: 'FILTER_LISTS',\n SET_ADDON_PRODUCTS: 'SET_ADDON_PRODUCTS',\n SET_ORDER_INITIATED: 'SET_ORDER_INITIATED',\n ADD_TO_POWER_ORDERS: 'ADD_TO_POWER_ORDERS',\n UPDATE_POWER_ORDER: 'UPDATE_POWER_ORDER',\n REMOVE_POWER_ORDER: 'REMOVE_POWER_ORDER',\n REMOVE_ADDON_ORDER: 'REMOVE_ADDON_ORDER',\n SET_RESIDENCE: 'SET_RESIDENCE',\n ADD_TO_RESIDENCE: 'ADD_TO_RESIDENCE',\n UPDATE_RESIDENCE: 'UPDATE_RESIDENCE',\n REMOVE_FROM_RESIDENCE: 'REMOVE_FROM_RESIDENCE',\n RESET_RESIDENCE: 'RESET_RESIDENCE',\n SET_RESIDENCE_ZIPCODE: 'SET_RESIDENCE_ZIPCODE',\n SET_INVOICE: 'SET_INVOICE',\n SET_START_DATE: 'SET_START_DATE',\n SET_ADD_RESIDENCE: 'SET_ADD_RESIDENCE',\n SET_ADD_RESIDENCE_LOADING: 'SET_ADD_RESIDENCE_LOADING',\n SET_ADD_METER_NUMBER: 'SET_ADD_METER_NUMBER',\n SET_ONYX_RESPONSE: 'SET_ONYX_RESPONSE',\n SET_ONYX_RESULT: 'SET_ONYX_RESULT',\n SET_ONYX_ERROR: 'SET_ONYX_ERROR',\n ADD_TO_ANLEGG: 'ADD_TO_ANLEGG',\n SET_ORDERS_BY_SSN: 'SET_ORDERS_BY_SSN',\n SET_PLACING_ORDER_LOADING: 'SET_PLACING_ORDER_LOADING',\n SET_PLACING_ORDER: 'SET_PLACING_ORDER',\n SET_SALESMODULE_SALES: 'SET_SALESMODULE_SALES',\n UPDATE_ANLEGG: 'UPDATE_ANLEGG',\n SET_SALESMODULE_SALE_RESULT: 'SET_SALESMODULE_SALE_RESULT',\n ADD_TO_CHOSEN_ADDON_PRODUCTS: 'ADD_TO_CHOSEN_ADDON_PRODUCTS',\n REMOVE_FROM_CHOSEN_ADDON_PRODUCTS: 'REMOVE_FROM_CHOSEN_ADDON_PRODUCTS',\n SET_CHOSEN_ADDON_PRODUCTS: 'SET_CHOSEN_ADDON_PRODUCTS',\n RESET_CHOSEN_ADDON_PRODUCTS: 'RESET_CHOSEN_ADDON_PRODUCTS',\n SET_ERROR_CREATE_ORDER: 'SET_ERROR_CREATE_ORDER',\n CLEAR_ERROR_CREATE_ORDER: 'CLEAR_ERROR_CREATE_ORDER',\n SET_SELLER: 'SET_SELLER',\n SET_STORE_NAME: 'SET_STORE_NAME',\n SET_SELLER_STORE_NAMES: 'SET_SELLER_STORE_NAMES',\n SET_STORE_NAMES: 'SET_STORE_NAMES',\n SET_ACTIVE_STORE: 'SET_ACTIVE_STORE',\n SET_BRAND: 'SET_BRAND',\n RESET_CHOICES: 'RESET_CHOICES',\n RESET_CHOICES_FOR_MARKETPLACE: 'RESET_CHOICES_FOR_MARKETPLACE',\n SET_PRODUCT_PRICES: 'SET_PRODUCT_PRICES',\n RESET_PRODUCT_PRICES: 'RESET_PRODUCT_PRICES',\n BACK_FROM_RECEIPT: 'BACK_FROM_RECEIPT',\n ADD_TO_MANUALLY_ADDED_SITES: 'ADD_TO_MANUALLY_ADDED_SITES',\n SET_SHOW_DETAILS: 'SET_SHOW_DETAILS',\n SET_SHOW_DETAILS_LOADING: 'SET_SHOW_DETAILS_LOADING',\n SET_PRODUCT_CAMPAIGN: 'SET_PRODUCT_CAMPAIGN',\n REMOVE_FROM_PRODUCT_CAMPAIGNS: 'REMOVE_FROM_PRODUCT_CAMPAIGNS',\n UPDATE_PRODUCT_CAMPAIGNS: 'UPDATE_PRODUCT_CAMPAIGNS',\n RESET_PRODUCT_CAMPAIGN: 'RESET_PRODUCT_CAMPAIGN',\n SET_ACCOUNT_IDS: 'SET_ACCOUNT_IDS',\n ADD_TO_ACCOUNT_ID: 'ADD_TO_ACCOUNT_ID',\n IS_CREATING_ENERGIKONTO: 'IS_CREATING_ENERGIKONTO',\n ADD_TO_SUMMARY_DETAILS: 'ADD_TO_SUMMARY_DETAILS',\n RESET_SUMMARY_DETAILS: 'RESET_SUMMARY_DETAILS',\n ADD_TO_ADDON_SUMMARY_DETAILS: 'ADD_TO_ADDON_SUMMARY_DETAILS',\n RESET_ADDON_SUMMARY_DETAILS: 'RESET_ADDON_SUMMARY_DETAILS',\n REMOVE_FROM_ANLEGG_BY_INDEX: 'REMOVE_FROM_ANLEGG_BY_INDEX',\n SET_STATISTICS: 'SET_STATISTICS',\n SET_CREDIT_CHECK: 'SET_CREDIT_CHECK',\n SET_CREDIT_CHECK_MOBILE: 'SET_CREDIT_CHECK_MOBILE',\n SET_BONUS_CAMPAIGNS: 'SET_BONUS_CAMPAIGNS',\n SET_INVOICE_ADDRESS: 'SET_INVOICE_ADDRESS',\n SET_INVOICE_POST_CODE: 'SET_INVOICE_POST_CODE',\n ADD_CAMPAIGN_TO_ADDON_PRODUCTS: 'ADD_CAMPAIGN_TO_ADDON_PRODUCTS',\n REMOVE_CAMPAIGN_FROM_ADDON_PRODUCTS: 'REMOVE_CAMPAIGN_FROM_ADDON_PRODUCTS',\n SET_CHOSEN_DISTRIBUTION_METHOD: 'SET_CHOSEN_DISTRIBUTION_METHOD',\n SET_E_INVOICE_OBJECT: 'SET_E_INVOICE_OBJECT',\n SET_SITE_LIST: 'SET_SITE_LIST',\n SET_SITE_LOADING: 'SET_SITE_LOADING',\n UPDATE_SITE: 'UPDATE_SITE',\n SET_COMMISSION_CAMPAIGNS: 'SET_COMMISSION_CAMPAIGNS',\n SET_SELLER_COUNT: 'SET_SELLER_COUNT',\n SET_SELLER_COUNT_OPEN: 'SET_SELLER_COUNT_OPEN',\n SET_PRODUCT_PRICEINFO: 'SET_PRODUCT_PRICEINFO',\n SET_PRODUCT_PRICEINFO_EL_CERT: 'SET_PRODUCT_PRICEINFO_EL_CERT',\n SET_CONTRACT_BY_MAIL: 'SET_CONTRACT_BY_MAIL',\n SET_BINDING_TIME: 'SET_BINDING_TIME',\n SET_PRICELIST_LOADING: 'SET_PRICELIST_LOADING',\n SET_STATISTICS_LOADING: 'SET_STATISTICS_LOADING',\n SET_OVERRIDE_CREDIT: 'SET_OVERRIDE_CREDIT',\n SET_OVERRIDE_ACCEPT: 'SET_OVERRIDE_ACCEPT',\n SET_OVERRIDE_FREEZE: 'SET_OVERRIDE_FREEZE',\n SET_POSTBOX_ADDRESS: 'SET_POSTBOX_ADDRESS',\n SET_CO_ADDRESS: 'SET_CO_ADDRESS',\n SET_ATT_ADDRESS: 'SET_ATT_ADDRESS',\n SET_MOBILE_PRODUCTS: 'SET_MOBILE_PRODUCTS',\n SET_MOBILE_EXTRA_PRODUCTS: 'SET_MOBILE_EXTRA_PRODUCTS',\n SET_CONTACT_PERSON: 'SET_CONTACT_PERSON',\n SET_ADDON_PRODUCT_PRICE_INFO_LOADING: 'SET_ADDON_PRODUCT_PRICE_INFO_LOADING',\n SET_ADDON_PRODUCT_PRICE_INFO: 'SET_ADDON_PRODUCT_PRICE_INFO',\n SET_ADDON_PRODUCT_PRICE_INFO_ERROR: 'SET_ADDON_PRODUCT_PRICE_INFO_ERROR',\n SET_CHOSEN_ADDON_PRODUCT_PRICE: 'SET_CHOSEN_ADDON_PRODUCT_PRICE',\n SET_CHOSEN_ADDON_PRODUCT_MINIMUM_TERM_DAYS: 'SET_CHOSEN_ADDON_MINIMUM_TERM_DAYS',\n SET_ADDON_PRODUCT_CAMPAIGNS: 'SET_ADDON_PRODUCT_CAMPAIGNS',\n SET_PRODUCT_HUB_CAMPAIGNS: 'SET_PRODUCT_HUB_CAMPAIGNS',\n RESET_ACCOUNT_ID: 'RESET_ACCOUNT_ID',\n SET_SHOW_ADDEDCHANGES: 'SET_SHOW_ADDEDCHANGES',\n SET_ADDEDCHANGES_LIST: 'SET_ADDEDCHANGES_LIST',\n SET_ERATE_ACCOUNT: 'SET_ERATE_ACCOUNT',\n SET_ERATE_ACCOUNT_INFO: 'SET_ERATE_ACCOUNT_INFO',\n ADD_TO_ADDON_ORDERS: 'ADD_TO_ADDON_ORDERS',\n ADD_TO_MOBILE_ORDERS: 'ADD_TO_MOBILE_ORDERS',\n REMOVE_MOBILE_ORDER: 'REMOVE_MOBILE_ORDER',\n ADD_TO_SUMMARY_DETAILS_MOBILE: 'ADD_TO_SUMMARY_DETAILS_MOBILE',\n RESET_SUMMARY_DETAILS_MOBILE: 'RESET_SUMMARY_DETAILS_MOBILE',\n SET_OVERRIDE_RECEIPTSMS: 'SET_OVERRIDE_RECEIPTSMS',\n SET_IS_STORKUNDE: 'SET_IS_STORKUNDE',\n SET_ADDED_CHANGES_SEEN: 'SET_ADDED_CHANGES_SEEN',\n SET_ADDED_CHANGES_LOADED: 'SET_ADDED_CHANGES_LOADED',\n ADD_TO_MOBILE_USERS: 'ADD_TO_MOBILE_USERS',\n UPDATE_MOBILE_USER: 'UPDATE_MOBILE_USER',\n DELETE_MOBILE_USER: 'DELETE_MOBILE_USER',\n SET_FILTERED_CAMPAIGNS: 'SET_FILTERED_CAMPAIGNS',\n SET_ALL_STORES: 'SET_ALL_STORES',\n SET_IS_POWER_STORE: 'SET_IS_POWER_STORE',\n SET_ACTIVE_DELIVERYPOINTS: 'SET_ACTIVE_DELIVERYPOINTS',\n SET_MOBILE_CAMPAIGNS: 'SET_MOBILE_CAMPAIGNS',\n SET_IRISK_DEALID: 'SET_IRISK_DEALID',\n SET_IRISK_GROUPID: 'SET_IRISK_GROUPID',\n GET_IRISK_DEALID: 'GET_IRISK_DEALID',\n GET_IRISK_GROUPID: 'GET_IRISK_GROUPID',\n SET_IRISK_LOADING: 'SET_IRISK_LOADING',\n ADD_IRISK_TO_EXISTING: 'ADD_IRISK_TO_EXISTING',\n SET_IRISK_ALERT: 'SET_IRISK_ALERT',\n SET_DEFAULT_PORTINGDATE: 'SET_DEFAULT_PORTINGDATE',\n SET_OWNER_STORES: 'SET_OWNER_STORES',\n SET_CREDIT_CHECK_LOADING: 'SET_CREDIT_CHECK_LOADING',\n RESET_COUNT: 'RESET_COUNT',\n ADD_TO_SITE_LIST: 'ADD_TO_SITE_LIST',\n SET_IS_TOO_YOUNG_TO_ORDER: 'SET_IS_TOO_YOUNG_TO_ORDER',\n SET_ERROR_CHECK_PH: 'SET_ERROR_CHECK_PH',\n SET_ERROR_CHECK_ODM: 'SET_ERROR_CHECK_ODM',\n SET_MOMENT_PRODUCT: 'SET_MOMENT_PRODUCT',\n SET_MOMENT_PRODUCT_PRESENTATION: 'SET_MOMENT_PRODUCT_PRESENTATION',\n ADD_ONYX_ARRAY: 'ADD_ONYX_ARRAY',\n ERROR_EXCEL_EXPORT: 'ERROR_EXCEL_EXPORT',\n ADD_TO_FORUTSIGBAR_BETALING_CACHE: 'ADD_TO_FORUTSIGBAR_BETALING_CACHE',\n SET_INVOICE_CITY: 'SET_INVOICE_CITY',\n SET_BEDRIFT_INVOICE_ADDRESS: 'SET_BEDRIFT_INVOICE_ADDRESS',\n SET_TOBB_MEMBERSHIP: 'SET_TOBB_MEMBERSHIP',\n ADD_SUMMARY_MOBILE_ORDER: 'ADD_SUMMARY_MOBILE_ORDER',\n ADD_SUMMARY_POWER_ORDER: 'ADD_SUMMARY_POWER_ORDER',\n RESET_SUMMARY_ORDER: 'RESET_SUMMARY_ORDER',\n ADD_MARKETPLACE_ORDER: 'ADD_MARKETPLACE_ORDER',\n REMOVE_MARKETPLACE_ORDER: 'REMOVE_MARKETPLACE_ORDER',\n};\n\nexport default ACTIONS;\n","import ACTIONS from './Actions';\nimport environment from '../environment';\n\nconst initialState = {\n conductorUrl: environment.conductorUrl,\n orderModuleApiUrl: environment.orderModuleApiUrl,\n sendAfiUrl: environment.sendAfiUrl,\n creditUrl: environment.creditUrl,\n stormwindUrl: environment.stormwindUrl,\n anlegg: [],\n manuallyAddedSites: [],\n customerDetail: null,\n ssn: null,\n name: null,\n phone: null,\n email: null,\n noEmail: false,\n invoiceEmail: null,\n otherEmailRecipient: null,\n invoiceAddress: null,\n invoicePostCode: null,\n productList: [],\n powerProducts: null,\n allBrandsProducts: null,\n filteredPowerProducts: null,\n filteredMobileProducts: null,\n filteredAddOnProducts: null,\n addonProducts: null,\n orderInitiated: false,\n powerOrders: [],\n powerOrder: {\n id: null,\n product: null,\n residence: null,\n faktura: null,\n startDate: null,\n },\n residence: [],\n residenceZipCode: null,\n invoice: null,\n startDate: null,\n addResidence: {\n address: null,\n zipCode: null,\n postArea: null,\n meterNumber: null,\n meterPointId: null,\n },\n addResidenceLoading: false,\n onyxResponse: false,\n onyxResult: null,\n onyxError: null,\n ordersBySsn: null,\n placingOrder: false,\n placingOrderLoading: false,\n salesModuleSales: [],\n salesModuleSaleResult: [],\n chosenAddonProducts: [],\n errorCreateOrder: null,\n seller: null,\n activeStore: null,\n stores: null,\n sellerStores: null,\n brand: null,\n productPrices: [],\n showDetails: null,\n showDetailsIsLoading: false,\n productCampaign: null,\n accountIds: [],\n accountId: null,\n isCreatingEnergikonto: false,\n summaryDetails: [],\n summaryAddonDetails: [],\n statistics: null,\n storeLeaderStatistics: null,\n creditCheck: null,\n creditCheckMobile: null,\n chosenDistributionMethod: -1,\n eInvoice: null,\n bonusCampaigns: [],\n addonProductCampaigns: [],\n siteList: [],\n siteLoading: false,\n brRegInfo: null,\n commissionCampaigns: [],\n sellerCount: null,\n sellerCountOpen: null,\n productPriceinfo: null,\n productPriceInfoElCert: null,\n contractByMail: false,\n bindingTime: null,\n priceListLoading: false,\n statisticsLoading: false,\n overrideCredit: false,\n overrideAccept: false,\n overrideFreeze: false,\n postBoxAddress: null,\n coAddress: null,\n attAddress: null,\n contactPerson: null,\n addedChanges: false,\n addedChangesList: null,\n addedChangesSeen: false,\n addedChangesLoading: false,\n allStores: null,\n ownerStores: null,\n isPowerStore: false,\n activeDeliveryPoints: null,\n hitFolkeRegister: null,\n filteredCampaigns: null,\n iRiskDealId: null,\n iRiskGroupId: null,\n retrievedIRiskGroupId: '',\n iRiskLoading: false,\n iRiskAlert: null,\n mobileProducts: null,\n mobileExtraProducts: null,\n erateAccount: null,\n erateAccountInfo: null,\n salesModulMobileResult: [],\n salesModuleMobileError: null,\n salesModuleMobileLoading: false,\n addonOrders: [],\n mobileOrders: [],\n mobileSales: [],\n mobileSaleResult: [],\n summaryDetailsMobile: [],\n mobileUsers: [],\n mobileCampaigns: null,\n defaultPortingDate: null,\n creditCheckLoading: false,\n momentProduct: null,\n momentProductPresentation: null,\n isTooYoungToOrder: false,\n errorPH: [false, { status: 'Laster...', ping: 'N/A' }],\n errorODM: [false, { status: 'Laster...', ping: 'N/A' }],\n errorExcel: false,\n onyxArray: [],\n forutsigbarBetalingCache: {},\n invoiceCity: null,\n tobbMembershipNumber: null,\n summaryMobileOrders: [],\n summaryPowerOrders: [],\n marketplaceOrders: [],\n marketplaceOrder: {\n product: null,\n sku: null,\n amount: 0,\n shippingAddress: null,\n shippingPostCode: null,\n shippingCity: null,\n },\n};\nconst reducer = (state = initialState, action) => {\n switch (action.type) {\n case ACTIONS.SET_SSN:\n return {\n ...state,\n ssn: action.ssn,\n };\n\n case ACTIONS.ADD_TO_FORUTSIGBAR_BETALING_CACHE:\n return {\n ...state,\n forutsigbarBetalingCache: { ...state.forutsigbarBetalingCache, ...action.payload },\n };\n\n case ACTIONS.SET_OWNER_STORES:\n return {\n ...state,\n ownerStores: action.payload,\n };\n\n case ACTIONS.SET_NAME:\n return {\n ...state,\n name: action.name,\n };\n\n case ACTIONS.SET_PHONE:\n return {\n ...state,\n phone: action.phone,\n };\n\n case ACTIONS.SET_EMAIL:\n return {\n ...state,\n email: action.email,\n };\n case ACTIONS.SET_NO_EMAIL:\n return {\n ...state,\n noEmail: action.bool,\n };\n\n case ACTIONS.SET_INVOICE_EMAIL:\n return {\n ...state,\n invoiceEmail: action.invoiceEmail,\n };\n\n case ACTIONS.SET_OTHER_EMAIL_RECIPIENT:\n return {\n ...state,\n otherEmailRecipient: action.email,\n };\n\n case ACTIONS.SET_INVOICE_ADDRESS:\n return {\n ...state,\n invoiceAddress: action.invoiceAddress,\n };\n\n case ACTIONS.SET_INVOICE_POST_CODE:\n return {\n ...state,\n invoicePostCode: action.invoicePostCode,\n };\n\n case ACTIONS.SET_PRODUCT_LIST:\n return {\n ...state,\n productList: action.payload,\n };\n\n case ACTIONS.RESET_PRODUCT_LIST:\n return {\n ...state,\n productList: [],\n };\n\n case ACTIONS.SET_POWER_PRODUCTS:\n return {\n ...state,\n powerProducts: action.payload,\n filteredPowerProducts: action.payload,\n };\n\n case ACTIONS.SET_ALL_BRANDS_PRODUCTS:\n return {\n ...state,\n allBrandsProducts: action.payload,\n };\n\n case ACTIONS.FILTER_LISTS:\n return {\n ...state,\n filteredPowerProducts:\n state.powerProducts &&\n state.powerProducts.filter((powerProduct) =>\n powerProduct.name.toLowerCase().includes(action.value.toLowerCase()),\n ),\n filteredMobileProducts:\n state.mobileProducts &&\n state.mobileProducts.filter((mobileProduct) =>\n mobileProduct.name.toLowerCase().includes(action.value.toLowerCase()),\n ),\n filteredAddOnProducts:\n state.addonProducts &&\n state.addonProducts.filter((addon) =>\n addon.name.toLowerCase().includes(action.value.toLowerCase()),\n ),\n };\n\n case ACTIONS.SET_ADDON_PRODUCTS:\n return {\n ...state,\n addonProducts: action.payload,\n filteredAddOnProducts: action.payload,\n };\n\n case ACTIONS.SET_ADDON_PRODUCT_PRICE_INFO_LOADING:\n return {\n ...state,\n addonProducts: state.addonProducts.map((ap) => {\n if (ap.id === action.payload.productHubId) {\n return { ...ap, isPriceInfoLoading: true };\n } else {\n return ap;\n }\n }),\n };\n\n case ACTIONS.SET_ADDON_PRODUCT_PRICE_INFO:\n return {\n ...state,\n addonProducts: state.addonProducts.map((ap) => {\n if (ap.id === action.payload.productHubId) {\n return {\n ...ap,\n isPriceInfoLoading: false,\n priceInfo: action.payload.data,\n };\n } else {\n return ap;\n }\n }),\n };\n\n case ACTIONS.SET_ORDER_INITIATED:\n return {\n ...state,\n orderInitiated: action.orderInitiated,\n };\n\n case ACTIONS.ADD_TO_POWER_ORDERS:\n return {\n ...state,\n powerOrders: [...state.powerOrders, action.powerOrder],\n };\n\n case ACTIONS.UPDATE_POWER_ORDER:\n return {\n ...state,\n powerOrders: updateObjectInArray(state.powerOrders, action),\n };\n\n case ACTIONS.REMOVE_POWER_ORDER:\n return {\n ...state,\n powerOrders: state.powerOrders.filter((_, i) => i !== action.index),\n productPrices: state.productPrices.filter((_, i) => i !== action.index),\n chosenAddonProducts: [],\n };\n\n case ACTIONS.REMOVE_ADDON_ORDER:\n return {\n ...state,\n addonOrders: state.addonOrders.filter((_, i) => i !== action.index),\n productPrices: state.productPrices.filter((_, i) => i !== action.index),\n chosenAddonProducts: [],\n };\n\n case ACTIONS.REMOVE_MOBILE_ORDER:\n return {\n ...state,\n mobileOrders: state.mobileOrders.filter((_, i) => i !== action.index),\n };\n case ACTIONS.SET_RESIDENCE:\n return {\n ...state,\n residence: action.residence,\n };\n\n case ACTIONS.ADD_TO_RESIDENCE:\n return {\n ...state,\n residence: [...state.residence, action.residence],\n };\n\n case ACTIONS.UPDATE_RESIDENCE:\n return {\n ...state,\n residence: updateObjectInArray(state.residence, action),\n };\n\n case ACTIONS.REMOVE_FROM_RESIDENCE:\n return {\n ...state,\n residence: state.residence.filter((_, i) => i !== action.index),\n };\n\n case ACTIONS.RESET_RESIDENCE:\n return {\n ...state,\n residence: [],\n };\n\n case ACTIONS.SET_RESIDENCE_ZIPCODE:\n return {\n ...state,\n residenceZipCode: action.residenceZipCode,\n };\n\n case ACTIONS.SET_INVOICE:\n return {\n ...state,\n invoice: action.invoice,\n accountId: null,\n };\n\n case ACTIONS.SET_START_DATE:\n return {\n ...state,\n startDate: action.startDate,\n };\n\n case ACTIONS.SET_ADD_RESIDENCE:\n return {\n ...state,\n addResidence: {\n address: action.address ? action.address : state.addResidence.address,\n zipCode: action.zipCode ? action.zipCode : state.addResidence.zipCode,\n postArea: action.postArea ? action.postArea : state.addResidence.postArea,\n meterNumber: action.meterNumber ? action.meterNumber : state.addResidence.meterNumber,\n meterPointId: action.meterPointId ? action.meterPointId : state.addResidence.meterPointId,\n invoiceLabel: action.invoiceLabel,\n },\n };\n\n case ACTIONS.ADD_ONYX_ARRAY:\n return {\n ...state,\n onyxArray: [...state.onyxArray, action.payload],\n };\n\n case ACTIONS.SET_ONYX_RESPONSE:\n return {\n ...state,\n onyxResponse: action.onyxResponse,\n addResidence:\n action.onyxResponse === false\n ? {\n address: null,\n zipCode: null,\n postArea: null,\n meterNumber: null,\n meterPointId: null,\n }\n : state.addResidence,\n };\n\n case ACTIONS.SET_ONYX_RESULT:\n return {\n ...state,\n onyxResult: action.payload,\n };\n\n case ACTIONS.SET_ONYX_ERROR:\n return {\n ...state,\n onyxError: action.error,\n onyxResponse: true,\n addResidenceLoading: false,\n onyxResult: null,\n };\n\n case ACTIONS.ADD_TO_ANLEGG:\n return {\n ...state,\n anlegg: [...state.anlegg, action.newItem],\n };\n\n case ACTIONS.REMOVE_FROM_ANLEGG_BY_INDEX:\n return {\n ...state,\n anlegg: state.anlegg.filter((item) => item !== state.anlegg[action.index]),\n };\n\n case ACTIONS.ADD_TO_MANUALLY_ADDED_SITES:\n return {\n ...state,\n manuallyAddedSites: [...state.manuallyAddedSites, action.newItem],\n };\n\n case ACTIONS.UPDATE_ANLEGG:\n return {\n ...state,\n anlegg: updateObjectInArray(state.anlegg, action),\n };\n\n case ACTIONS.SET_ORDERS_BY_SSN:\n return {\n ...state,\n ordersBySsn: action.payload,\n };\n\n case ACTIONS.SET_PLACING_ORDER:\n return {\n ...state,\n placingOrder: action.placingOrder,\n };\n\n case ACTIONS.SET_SALESMODULE_SALES:\n return {\n ...state,\n salesModuleSales: action.salesModuleSales,\n placingOrderLoading: true,\n placingOrder: true,\n };\n\n case ACTIONS.SET_PLACING_ORDER_LOADING:\n return {\n ...state,\n placingOrderLoading: action.placingOrderLoading,\n };\n\n case ACTIONS.SET_SALESMODULE_SALE_RESULT:\n return {\n ...state,\n salesModuleSaleResult: [...state.salesModuleSaleResult, action.payload],\n errorCreateOrder: null,\n placingOrderLoading: state.mobileSales.length > 0 ? true : false,\n };\n\n case ACTIONS.ADD_TO_CHOSEN_ADDON_PRODUCTS:\n return {\n ...state,\n chosenAddonProducts: [...state.chosenAddonProducts, action.chosenAddonProduct],\n };\n\n case ACTIONS.REMOVE_FROM_CHOSEN_ADDON_PRODUCTS:\n return {\n ...state,\n chosenAddonProducts: state.chosenAddonProducts.filter((item) => item.id !== action.id),\n marketplaceOrders: state.marketplaceOrders.filter((item) => item.id !== action.id),\n };\n\n case ACTIONS.SET_CHOSEN_ADDON_PRODUCTS:\n return {\n ...state,\n chosenAddonProducts: action.chosenAddonProducts,\n };\n\n case ACTIONS.RESET_CHOSEN_ADDON_PRODUCTS:\n return {\n ...state,\n chosenAddonProducts: [],\n };\n\n case ACTIONS.SET_ERROR_CREATE_ORDER:\n return {\n ...state,\n errorCreateOrder: action.payload,\n placingOrderLoading: false,\n };\n\n case ACTIONS.CLEAR_ERROR_CREATE_ORDER:\n return {\n ...state,\n errorCreateOrder: null,\n };\n\n case ACTIONS.SET_SELLER:\n return {\n ...state,\n seller: action.seller,\n activeStore: action.activeStore,\n sellerStores: action.sellerStores,\n };\n\n case ACTIONS.SET_STORE_NAME:\n return {\n ...state,\n store: {\n identityServerId: state.store.identityServerId,\n name: action.name,\n },\n };\n\n case ACTIONS.SET_SELLER_STORE_NAMES:\n return {\n ...state,\n sellerStores: action.payload.map((o) => ({\n identityServerId: o.storeId,\n name: o.name,\n })),\n };\n\n case ACTIONS.SET_STORE_NAMES:\n return {\n ...state,\n stores: action.payload,\n };\n\n case ACTIONS.SET_ACTIVE_STORE:\n return {\n ...state,\n activeStore: action.activeStore,\n };\n\n case ACTIONS.SET_BRAND:\n return {\n ...state,\n brand: action.brand,\n };\n\n case ACTIONS.RESET_CHOICES:\n return {\n ...state,\n residence: [],\n chosenAddonProducts: [],\n invoice: null,\n startDate: null,\n productCampaign: null,\n accountId: null,\n bonusCampaigns: [],\n chosenDistributionMethod: -1,\n bindingTime: null,\n iRiskDealId: null,\n iRiskGroupId: null,\n iRiskAlert: null,\n };\n\n case ACTIONS.RESET_CHOICES_FOR_MARKETPLACE:\n return {\n ...state,\n residence: [],\n chosenAddonProducts: [],\n invoice: null,\n startDate: null,\n productCampaign: null,\n accountId: null,\n bonusCampaigns: [],\n bindingTime: null,\n iRiskDealId: null,\n iRiskGroupId: null,\n iRiskAlert: null,\n };\n\n case ACTIONS.SET_PRODUCT_PRICES:\n return {\n ...state,\n productPrices: [...state.productPrices, action.payload],\n };\n\n case ACTIONS.RESET_PRODUCT_PRICES:\n return {\n ...state,\n productPrices: [],\n };\n\n case ACTIONS.BACK_FROM_RECEIPT:\n return {\n ...state,\n placingOrder: false,\n anlegg: state.manualCopyAnlegg,\n };\n\n case ACTIONS.SET_SHOW_DETAILS:\n return {\n ...state,\n showDetails: action.payload,\n showDetailsIsLoading: false,\n };\n\n case ACTIONS.SET_SHOW_DETAILS_LOADING:\n return {\n ...state,\n showDetailsIsLoading: action.showDetailsIsLoading,\n };\n\n case ACTIONS.SET_PRODUCT_CAMPAIGN:\n return {\n ...state,\n productCampaign: action.campaign,\n };\n\n case ACTIONS.REMOVE_FROM_PRODUCT_CAMPAIGNS:\n return {\n ...state,\n productCampaigns: state.productCampaigns.filter((item) => item.id !== action.id),\n };\n\n case ACTIONS.UPDATE_PRODUCT_CAMPAIGNS:\n return {\n ...state,\n productCampaigns: updateObjectInArray(state.productCampaigns, action),\n };\n\n case ACTIONS.SET_ACCOUNT_IDS:\n return {\n ...state,\n accountIds: action.payload,\n };\n\n case ACTIONS.RESET_ACCOUNT_ID:\n return {\n ...state,\n accountIds: [],\n };\n\n case ACTIONS.IS_CREATING_ENERGIKONTO:\n return {\n ...state,\n isCreatingEnergikonto: action.bool,\n };\n\n case ACTIONS.ADD_TO_SUMMARY_DETAILS:\n return {\n ...state,\n summaryDetails: [...state.summaryDetails, action.payload],\n };\n\n case ACTIONS.RESET_SUMMARY_DETAILS:\n return {\n ...state,\n summaryDetails: [],\n };\n case ACTIONS.ADD_TO_ADDON_SUMMARY_DETAILS:\n return {\n ...state,\n summaryAddonDetails: [...state.summaryAddonDetails, action.payload],\n };\n\n case ACTIONS.RESET_ADDON_SUMMARY_DETAILS:\n return {\n ...state,\n summaryAddonDetails: [],\n };\n\n case ACTIONS.SET_STATISTICS:\n return {\n ...state,\n statistics: action.payload,\n };\n\n case ACTIONS.SET_CREDIT_CHECK:\n return {\n ...state,\n creditCheck: action.payload,\n };\n\n case ACTIONS.SET_CREDIT_CHECK_MOBILE:\n return {\n ...state,\n creditCheckMobile: action.payload,\n };\n\n case ACTIONS.SET_BONUS_CAMPAIGNS:\n return {\n ...state,\n bonusCampaigns: action.payload,\n };\n\n case ACTIONS.ADD_CAMPAIGN_TO_ADDON_PRODUCTS:\n return {\n ...state,\n chosenAddonProducts: state.chosenAddonProducts.map((item, i) =>\n item.id === action.campaign.addonProductId\n ? {\n ...item,\n campaigns: item.campaigns.concat({\n campaignId: action.campaign.addonProductCampaignId,\n campaignName: action.campaign.campaignName,\n }),\n }\n : item,\n ),\n };\n\n case ACTIONS.SET_CHOSEN_ADDON_PRODUCT_PRICE:\n return {\n ...state,\n chosenAddonProducts: state.chosenAddonProducts.map((i) =>\n i.id === action.addonProductId\n ? {\n ...i,\n priceElements: action.priceElements,\n }\n : i,\n ),\n };\n\n case ACTIONS.SET_CHOSEN_ADDON_PRODUCT_MINIMUM_TERM_DAYS:\n return {\n ...state,\n chosenAddonProducts: state.chosenAddonProducts.map((i) =>\n i.id === action.addonProductId\n ? {\n ...i,\n minimumTermDays: action.minimumTermDays,\n }\n : i,\n ),\n };\n\n case ACTIONS.REMOVE_CAMPAIGN_FROM_ADDON_PRODUCTS:\n return {\n ...state,\n chosenAddonProducts: state.chosenAddonProducts.map((item, i) =>\n item.id === action.campaign.addonProductId\n ? {\n ...item,\n campaigns: item.campaigns.filter(\n (element) => element !== action.campaign.addonProductCampaignId,\n ),\n }\n : item,\n ),\n };\n\n case ACTIONS.ADD_TO_SITE_LIST:\n return {\n ...state,\n siteList: [...state.siteList, action.payload],\n };\n\n case ACTIONS.SET_SITE_LIST:\n return {\n ...state,\n siteList: action.payload,\n hitFolkeRegister: action.payload.some((element) => element.name !== null),\n\n name:\n action.payload.find((element) => element.name !== null) !== undefined\n ? environment.isBedrift === 'true'\n ? toLowerCaseBedrift(action.payload.find((element) => element.name !== null).name)\n : flipName(action.payload.find((element) => element.name !== null).name)\n : state.name,\n invoiceAddress:\n state.invoiceAddress === null || state.invoiceAddress === ''\n ? environment.isBedrift === 'true'\n ? action.payload.find((element) => element.elhubHit === true) !== undefined\n ? action.payload.find((element) => element.elhubHit).address\n : action.payload.find((element) => element.bregHit === true) !== undefined\n ? action.payload.find((element) => element.bregHit).address\n : state.invoiceAddress\n : action.payload.find((element) => element.foundInPublicRegistry === true) !==\n undefined\n ? action.payload.find((element) => element.foundInPublicRegistry).address\n : state.invoiceAddress\n : state.invoiceAddress,\n invoicePostCode:\n state.invoicePostCode === null || state.invoicePostCode === ''\n ? environment.isBedrift === 'true'\n ? action.payload.find((element) => element.elhubHit === true) !== undefined\n ? action.payload.find((element) => element.elhubHit).zipCode\n : action.payload.find((element) => element.bregHit === true) !== undefined\n ? action.payload.find((element) => element.bregHit).zipCode\n : state.invoicePostCode\n : action.payload.find((element) => element.foundInPublicRegistry === true) !==\n undefined\n ? action.payload.find((element) => element.foundInPublicRegistry).zipCode\n : state.invoicePostCode\n : state.invoicePostCode,\n };\n\n case ACTIONS.UPDATE_SITE:\n if (!action.newItem.manuallyAdded) {\n return {\n ...state,\n siteList: state.siteList.map((content, i) =>\n i === action.newItem.index\n ? {\n ...content,\n meterNumber: action.newItem.meterNumber,\n meterPointId: action.newItem.meterPointId,\n elhubHit: action.newItem.elhubHit,\n elhubDataCore: action.newItem.elhubDataCore,\n }\n : content,\n ),\n };\n } else {\n return {\n ...state,\n manuallyAddedSites: state.manuallyAddedSites.map((content, i) =>\n i === action.newItem.index - state.siteList.length\n ? {\n ...content,\n meterNumber: action.newItem.meterNumber,\n meterPointId: action.newItem.meterPointId,\n }\n : content,\n ),\n };\n }\n\n case ACTIONS.SET_SITE_LOADING:\n return {\n ...state,\n siteLoading: action.bool,\n };\n\n case ACTIONS.SET_CHOSEN_DISTRIBUTION_METHOD:\n return {\n ...state,\n chosenDistributionMethod: action.payload,\n };\n\n case ACTIONS.SET_E_INVOICE_OBJECT:\n return {\n ...state,\n eInvoice: action.payload,\n };\n\n case ACTIONS.SET_COMMISSION_CAMPAIGNS:\n return {\n ...state,\n commissionCampaigns: action.payload,\n };\n\n case ACTIONS.SET_SELLER_COUNT:\n return {\n ...state,\n sellerCount: action.payload,\n };\n\n case ACTIONS.SET_SELLER_COUNT_OPEN:\n return {\n ...state,\n sellerCountOpen: action.open,\n };\n\n case ACTIONS.SET_PRODUCT_PRICEINFO:\n return {\n ...state,\n productPriceinfo: action.payload,\n };\n\n case ACTIONS.SET_PRODUCT_PRICEINFO_EL_CERT:\n return {\n ...state,\n productPriceInfoElCert: action.payload,\n };\n\n case ACTIONS.SET_CONTRACT_BY_MAIL:\n return {\n ...state,\n contractByMail: true,\n };\n\n case ACTIONS.SET_BINDING_TIME:\n return {\n ...state,\n bindingTime: action.bindingTime,\n };\n\n case ACTIONS.SET_PRICELIST_LOADING:\n return {\n ...state,\n priceListLoading: action.bool,\n };\n\n case ACTIONS.SET_STATISTICS_LOADING:\n return {\n ...state,\n statisticsLoading: action.bool,\n };\n\n case ACTIONS.SET_OVERRIDE_CREDIT:\n return {\n ...state,\n overrideCredit: action.bool,\n };\n\n case ACTIONS.SET_OVERRIDE_ACCEPT:\n return {\n ...state,\n overrideAccept: action.bool,\n };\n case ACTIONS.SET_OVERRIDE_FREEZE:\n return {\n ...state,\n overrideFreeze: action.bool,\n };\n\n case ACTIONS.SET_POSTBOX_ADDRESS:\n return {\n ...state,\n postBoxAddress: action.payload,\n };\n\n case ACTIONS.SET_CO_ADDRESS:\n return {\n ...state,\n coAddress: action.payload,\n attAddress: null,\n };\n\n case ACTIONS.SET_ATT_ADDRESS:\n return {\n ...state,\n attAddress: action.payload,\n coAddress: null,\n };\n\n case ACTIONS.SET_MOBILE_PRODUCTS:\n return {\n ...state,\n mobileProducts: action.payload,\n filteredMobileProducts: action.payload,\n };\n\n case ACTIONS.SET_MOBILE_EXTRA_PRODUCTS:\n return {\n ...state,\n mobileExtraProducts: action.payload,\n };\n\n case ACTIONS.SET_SHOW_ADDEDCHANGES:\n return {\n ...state,\n addedChanges: action.bool,\n };\n\n case ACTIONS.SET_ADDEDCHANGES_LIST:\n return {\n ...state,\n addedChangesList: action.payload,\n };\n\n case ACTIONS.SET_ADDED_CHANGES_SEEN:\n return {\n ...state,\n addedChangesSeen: action.payload,\n };\n\n case ACTIONS.SET_ADDED_CHANGES_LOADED:\n return {\n ...state,\n addedChangesLoading: action.payload,\n };\n\n case ACTIONS.SET_CONTACT_PERSON:\n return {\n ...state,\n contactPerson: action.payload,\n };\n case ACTIONS.SET_ERATE_ACCOUNT:\n return {\n ...state,\n erateAccount: action.payload,\n };\n case ACTIONS.SET_ERATE_ACCOUNT_INFO:\n return {\n ...state,\n erateAccountInfo: action.payload,\n };\n\n case ACTIONS.SET_ADDON_PRODUCT_CAMPAIGNS:\n return {\n ...state,\n addonProductCampaigns: action.payload,\n };\n\n case ACTIONS.SET_PRODUCT_HUB_CAMPAIGNS:\n return {\n ...state,\n productHubCampaigns: action.payload,\n };\n\n case ACTIONS.ADD_TO_ADDON_ORDERS:\n return {\n ...state,\n addonOrders: [...state.addonOrders, action.addonOrders],\n };\n\n case ACTIONS.ADD_TO_MOBILE_ORDERS:\n return {\n ...state,\n mobileOrders: [...state.mobileOrders, action.payload],\n };\n\n case ACTIONS.ADD_TO_SUMMARY_DETAILS_MOBILE:\n return {\n ...state,\n summaryDetailsMobile: [...state.summaryDetailsMobile, action.payload],\n };\n\n case ACTIONS.RESET_SUMMARY_DETAILS_MOBILE:\n return {\n ...state,\n summaryDetailsMobile: [],\n };\n\n case ACTIONS.ADD_TO_MOBILE_USERS:\n return {\n ...state,\n mobileUsers: state.mobileUsers.concat(action.mobileUser),\n };\n\n case ACTIONS.UPDATE_MOBILE_USER:\n const newArray = [...state.mobileUsers];\n newArray[action.index] = action.mobileUser;\n return {\n ...state,\n mobileUsers: newArray,\n };\n\n case ACTIONS.DELETE_MOBILE_USER:\n return {\n ...state,\n mobileUsers: state.mobileUsers.filter((_, i) => i !== action.index),\n };\n\n case ACTIONS.SET_FILTERED_CAMPAIGNS:\n return {\n ...state,\n filteredCampaigns: action.payload,\n };\n\n case ACTIONS.SET_IRISK_DEALID:\n return {\n ...state,\n iRiskDealId: action.payload,\n };\n\n case ACTIONS.SET_IRISK_GROUPID:\n return {\n ...state,\n iRiskGroupId: action.payload,\n };\n case ACTIONS.GET_IRISK_GROUPID:\n return {\n ...state,\n retrievedIRiskGroupId: action.payload,\n };\n case ACTIONS.SET_IRISK_LOADING:\n return {\n ...state,\n iRiskLoading: action.payload,\n };\n case ACTIONS.SET_IRISK_ALERT:\n return {\n ...state,\n iRiskAlert: action.payload,\n };\n\n case ACTIONS.SET_ALL_STORES:\n return {\n ...state,\n allStores: action.payload,\n };\n\n case ACTIONS.SET_IS_POWER_STORE:\n return {\n ...state,\n isPowerStore: action.bool,\n };\n\n case ACTIONS.SET_ACTIVE_DELIVERYPOINTS:\n return {\n ...state,\n activeDeliveryPoints: action.payload,\n };\n\n case ACTIONS.SET_MOBILE_CAMPAIGNS:\n return {\n ...state,\n mobileCampaigns: action.payload,\n };\n\n case ACTIONS.SET_DEFAULT_PORTINGDATE:\n return {\n ...state,\n defaultPortingDate: action.payload,\n };\n\n case ACTIONS.SET_CREDIT_CHECK_LOADING:\n return {\n ...state,\n creditCheckLoading: action.bool,\n };\n case ACTIONS.RESET_COUNT:\n return {\n ...state,\n sellerCount: null,\n sellerCountOpen: action.closed,\n };\n case ACTIONS.SET_MOMENT_PRODUCT:\n return {\n ...state,\n momentProduct: action.payload,\n };\n\n case ACTIONS.SET_MOMENT_PRODUCT_PRESENTATION:\n return {\n ...state,\n momentProductPresentation: action.payload,\n };\n\n case ACTIONS.SET_IS_TOO_YOUNG_TO_ORDER:\n return {\n ...state,\n isTooYoungToOrder: action.bool,\n };\n\n case ACTIONS.SET_ERROR_CHECK_PH:\n return {\n ...state,\n errorPH: action.payload,\n };\n\n case ACTIONS.SET_ERROR_CHECK_ODM:\n return {\n ...state,\n errorODM: action.payload,\n };\n\n case ACTIONS.ERROR_EXCEL_EXPORT:\n return {\n ...state,\n errorExcel: action.bool,\n };\n\n case ACTIONS.SET_INVOICE_CITY:\n return {\n ...state,\n invoiceCity: action.invoiceCity,\n };\n\n case ACTIONS.SET_BEDRIFT_INVOICE_ADDRESS:\n return {\n ...state,\n name: toLowerCaseBedrift(action.payload.organizationName),\n invoiceAddress: action.payload.invoiceAddress,\n invoicePostCode: action.payload.invoiceZipCode,\n };\n case ACTIONS.ADD_SUMMARY_MOBILE_ORDER:\n return {\n ...state,\n summaryMobileOrders: [...state.summaryMobileOrders, action.summaryMobileOrders],\n };\n case ACTIONS.ADD_SUMMARY_POWER_ORDER:\n return {\n ...state,\n summaryPowerOrders: [...state.summaryPowerOrders, action.summaryPowerOrders],\n };\n case ACTIONS.RESET_SUMMARY_ORDER:\n return {\n ...state,\n summaryPowerOrders: [],\n summaryMobileOrders: [],\n };\n\n case ACTIONS.SET_TOBB_MEMBERSHIP:\n return {\n ...state,\n tobbMembershipNumber: action.tobbMembershipNumber,\n };\n\n case ACTIONS.ADD_MARKETPLACE_ORDER:\n return {\n ...state,\n marketplaceOrders: [...state.marketplaceOrders, action.marketplaceOrder],\n };\n\n case ACTIONS.REMOVE_MARKETPLACE_ORDER:\n return {\n ...state,\n marketplaceOrders: [\n ...state.marketplaceOrders.filter((order, index) => index !== action.index),\n ],\n };\n\n default:\n return state;\n }\n};\n\nfunction updateObjectInArray(array, action) {\n return array.map((item, index) => {\n if (index !== action.index) {\n // This isn't the item we care about - keep it as-is\n return item;\n }\n\n // Otherwise, this is the one we want - return an updated value\n return {\n ...item,\n ...action.item,\n };\n });\n}\n\nfunction flipName(name) {\n let tmp = name.split(' ');\n let flippedName = '';\n for (let i = 1; i < tmp.length; i++) {\n tmp[i] = tmp[i][0].toUpperCase() + tmp[i].slice(1).toLowerCase();\n flippedName = flippedName + tmp[i] + ' ';\n }\n tmp[0] = tmp[0][0].toUpperCase() + tmp[0].slice(1).toLowerCase();\n flippedName = flippedName + tmp[0];\n\n return flippedName;\n}\n\nfunction toLowerCaseBedrift(name) {\n let tmp = name.split(' ');\n let companyName = '';\n for (let i = 0; i < tmp.length; i++) {\n tmp[i] = tmp[i][0].toUpperCase() + tmp[i].slice(1).toLowerCase();\n companyName = companyName + tmp[i] + ' ';\n }\n return companyName;\n}\n\nexport default reducer;\n","const ACTIONS = {\n SET_IS_STORKUNDE: 'SET_IS_STORKUNDE',\n SET_OVERRIDE_RECEIPTSMS: 'SET_OVERRIDE_RECEIPTSMS',\n UPDATE_ALL_FAKTURAMERKE: 'UPDATE_ALL_FAKTURAMERKE',\n REMOVE_STORKUNDE_KUNDENUMMER: 'REMOVE_STORKUNDE_KUNDENUMMER',\n ADD_STORKUNDE: 'ADD_STORKUNDE',\n RESET_STORKUNDE: 'RESET_STORKUNDE',\n SET_WARNING_STORKUNDE: 'SET_WARNING_STORKUNDE',\n SET_WARNING_STORKUNDE_ITEM: 'SET_WARNING_STORKUNDE_ITEM',\n SET_SHOW_STORKUNDE_ITEM: 'SET_SHOW_STORKUNDE_ITEM',\n RESET_SHOW_STORKUNDE_ITEM: 'RESET_SHOW_STORKUNDE_ITEM',\n SET_STORKUNDE_TOGGLE: 'SET_STORKUNDE_TOGGLE',\n UPDATE_STORKUNDE_ITEM: 'UPDATE_STORKUNDE_ITEM',\n UPDATE_WARNING_STORKUNDE: 'UPDATE_WARNING_STORKUNDE',\n ADD_FAILED_ORDER: 'ADD_FAILED_ORDER',\n ADD_CREATED_ORDER: 'ADD_CREATED_ORDER',\n SEARCH_KUNDELIST: 'SEARCH_KUNDELIST',\n SET_ANLEGG_LIST: 'SET_ANLEGG_LIST',\n RESET_SEARCHLIST: 'RESET_SEARCHLIST',\n SET_PAGINATION_CURRENT: 'SET_PAGINATION_CURRENT',\n SET_PAGINATION_TOTAL: 'SET_PAGINATION_TOTAL',\n SET_PAGINATION_SEARCH: 'SET_PAGINATION_SEARCH',\n SET_STORKUNDE_LOADING: 'SET_STORKUNDE_LOADING',\n UPDATE_SINGLE_ANLEGG: 'UPDATE_SINGLE_ANLEGG',\n ADD_TO_EXISTING_STORKUNDE: 'ADD_TO_EXISTING_STORKUNDE',\n SET_STANDARD_PRODUCT: 'SET_STANDARD_PRODUCT',\n SHOW_ORDER_PAGE: 'SHOW_ORDER_PAGE',\n TOGGLE_SINGLE_ANLEGG_MODAL: 'TOGGLE_SINGLE_ANLEGG_MODAL',\n SET_IMPORT_NAME: 'SET_IMPORT_NAME',\n};\n\nexport default ACTIONS;\n","import ACTIONS from './StorkundeActions';\n\nconst initialState = {\n isStorkunde: false,\n storkunde: [],\n storkundeWarning: [],\n storkundeWarningItem: [],\n storkundeItemSelected: null,\n storkundeToggle: false,\n failedOrders: [],\n createdOrders: [],\n anleggList: [],\n searchList: [],\n pagination: 1,\n paginationTotal: 1,\n storkundeLoading: false,\n singleAnlegg: {},\n standardProduct: null,\n showOrderPage: false,\n toggleSingleAnlegg: false,\n importname: null,\n};\nconst StorkundeReducer = (state = initialState, action) => {\n switch (action.type) {\n case ACTIONS.UPDATE_STORKUNDE_ITEM:\n return {\n ...state,\n storkunde: updateStorkunde(state.storkunde, action),\n };\n\n case ACTIONS.ADD_STORKUNDE:\n return {\n ...state,\n storkunde: [...state.storkunde, action.payload],\n };\n\n case ACTIONS.RESET_STORKUNDE:\n return {\n ...state,\n storkunde: [],\n storkundeWarning: [],\n createdOrders: [],\n failedOrders: [],\n anleggList: [],\n searchList: [],\n pagination: 1,\n paginationTotal: 1,\n singleAnlegg: {},\n showOrderPage: false,\n };\n\n case ACTIONS.SET_WARNING_STORKUNDE_ITEM:\n return {\n ...state,\n storkundeWarningItem: [action.payload],\n };\n\n case ACTIONS.SET_WARNING_STORKUNDE:\n return {\n ...state,\n storkundeWarning: action.payload,\n };\n\n case ACTIONS.SET_STORKUNDE_TOGGLE:\n return {\n ...state,\n storkundeToggle: action.payload,\n };\n\n case ACTIONS.RESET_SHOW_STORKUNDE_ITEM:\n return {\n ...state,\n storkundeItemSelected: action.payload,\n };\n case ACTIONS.SET_SHOW_STORKUNDE_ITEM: {\n return {\n ...state,\n storkundeItemSelected: state.storkunde\n .find((ele) => ele.SalgsID === action.payload[0])\n .anleggene.find((element) => element.swID === action.payload[1]),\n };\n }\n case ACTIONS.UPDATE_ALL_FAKTURAMERKE:\n return {\n ...state,\n storkunde: (state.storkunde[action.payload.SalgsID - 1] = action.payload),\n };\n case ACTIONS.UPDATE_WARNING_STORKUNDE:\n return {\n ...state,\n storkundeWarning: updateWarnings(state.storkundeWarning, action.payload),\n };\n\n case ACTIONS.SET_IS_STORKUNDE:\n return {\n ...state,\n isStorkunde: action.bool,\n };\n\n case ACTIONS.ADD_FAILED_ORDER:\n return {\n ...state,\n failedOrders: [...state.failedOrders, action.payload],\n };\n case ACTIONS.ADD_CREATED_ORDER:\n return {\n ...state,\n createdOrders: [...state.createdOrders, action.payload],\n };\n\n case ACTIONS.SEARCH_KUNDELIST:\n return {\n ...state,\n searchList: (state.searchList = searchAnlegg(state.anleggList, action.payload)),\n };\n\n case ACTIONS.RESET_SEARCHLIST:\n return {\n ...state,\n searchList: [],\n };\n case ACTIONS.SET_ANLEGG_LIST:\n return {\n ...state,\n anleggList: action.payload,\n };\n\n case ACTIONS.SET_PAGINATION_CURRENT:\n return {\n ...state,\n pagination: action.payload,\n };\n case ACTIONS.SET_PAGINATION_TOTAL:\n return {\n ...state,\n paginationTotal: Math.ceil(state.anleggList.anleggene.length / 15),\n };\n\n case ACTIONS.SET_PAGINATION_SEARCH:\n return {\n ...state,\n paginationTotal: Math.ceil(state.searchList.length / 15),\n };\n\n case ACTIONS.SET_STORKUNDE_LOADING:\n return {\n ...state,\n storkundeLoading: action.payload,\n };\n\n case ACTIONS.UPDATE_SINGLE_ANLEGG:\n return {\n ...state,\n singleAnlegg: action.payload,\n };\n\n case ACTIONS.ADD_TO_EXISTING_STORKUNDE:\n return {\n ...state,\n storkunde: addToAnleggStorkunde(state.storkunde, action),\n };\n\n case ACTIONS.SET_STANDARD_PRODUCT:\n return {\n ...state,\n standardProduct: action.payload,\n };\n\n case ACTIONS.SHOW_ORDER_PAGE:\n return {\n ...state,\n showOrderPage: action.bool,\n };\n\n case ACTIONS.TOGGLE_SINGLE_ANLEGG_MODAL:\n return {\n ...state,\n toggleSingleAnlegg: action.bool,\n };\n\n case ACTIONS.SET_IMPORT_NAME:\n return {\n ...state,\n importName: action.payload,\n };\n default:\n return state;\n }\n};\n\nfunction addToAnleggStorkunde(array, action) {\n let salgsIDen = array[action.payload[0] - 1];\n salgsIDen.anleggene.push(action.payload[1]);\n array[array[action.payload[0] - 1]] = salgsIDen;\n return array;\n}\n\nfunction updateWarnings(warnings, update) {\n for (let i = 0; i < warnings.length; i += 1) {\n if (warnings[i].SalgsID === update.SalgsID && warnings[i].swID === update.swID) {\n warnings[i] = { ...warnings[i], isMissing: update.isMissing };\n }\n }\n return warnings;\n}\n\nfunction updateStorkunde(array, action) {\n let salgsID = array;\n\n // gets the selected salgsID and changes data\n salgsID[action.payload[1] - 1] = action.payload[0];\n\n return salgsID;\n}\n\nfunction searchAnlegg(anleggList, searchParams) {\n let anleggArray = [];\n\n if (typeof anleggList.anleggene !== 'undefined') {\n anleggList.anleggene.forEach((anl) => {\n if (anl['MålepktId'].includes(searchParams)) {\n anleggArray.push(anl);\n }\n });\n }\n\n return anleggArray;\n}\n\nexport default StorkundeReducer;\n","import { createStore, applyMiddleware, combineReducers } from 'redux';\nimport thunk from 'redux-thunk';\nimport { createLogger } from 'redux-logger';\nimport reducer from './Reducer';\nimport StorkundeReducer from './Storkunde/StorkundeReducer';\nimport { composeWithDevTools as composeWithDevToolsDevOnly } from 'redux-devtools-extension/developmentOnly';\n\nconst appReducers = combineReducers({\n reducer,\n StorkundeReducer,\n});\n\nconst rootReducer = (state, action) => appReducers(state, action);\n\nconst logger = createLogger();\n\nexport const store = createStore(\n rootReducer,\n composeWithDevToolsDevOnly(applyMiddleware(thunk, logger)),\n);\n","export const birthDateRegex = /^\\d\\d.\\d\\d.\\d\\d\\d\\d$/g;\nexport const emailRegex =\n /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\nexport const phoneRegex = /^[0-9]{8}$/;\n","import { useState, useEffect } from 'react';\nimport '../../Stylesheets/PersonalInformation/Input.css';\nimport InputBase from '@mui/material/InputBase';\nimport { useDispatch } from 'react-redux';\nimport environment from '../../environment';\nimport { emailRegex } from '../../utils/RegexLib';\n\nfunction Input({\n width,\n label,\n placeholder,\n type,\n queryString,\n disabled = false,\n isOverridden = false,\n}) {\n const isBedrift = environment.isBedrift === 'true';\n //const isBedrift = true\n const [value, setValue] = useState(queryString ? queryString : '');\n // fields types in the error/setError state hook will NOT be required\n const [error, setError] = useState(\n type === 'invoiceAddress' ||\n type === 'invoicePostCode' ||\n type === 'contactPerson' ||\n (type === 'email' && isBedrift)\n ? false\n : true,\n );\n const dispatch = useDispatch();\n\n const handleChange = (e) => {\n let changeValue = e.target ? e.target.value : e;\n if (type === 'phone' || type === 'ssn' || type === 'invoicePostCode') {\n if (type === 'phone' && changeValue.match(/^\\+/)) {\n changeValue = changeValue.replace(/^\\+[0-9]{2}/, '');\n }\n changeValue = changeValue.replace(/\\D/g, '');\n }\n\n if (type === 'phone' && changeValue.length > 8) {\n changeValue = changeValue.slice(0, 8);\n if (value.length >= 8 && changeValue.length >= value.length) {\n return;\n }\n } else if (!isBedrift && type === 'ssn' && changeValue.length > 11) {\n changeValue = changeValue.slice(0, 11);\n if (value.length >= 11 && changeValue.length >= value.length) {\n return;\n }\n } else if (type === 'invoicePostCode' && changeValue.length > 4) {\n changeValue = changeValue.slice(0, 4);\n if (value.length >= 4 && changeValue.length >= value.length) {\n return;\n }\n } else if (isBedrift && type === 'ssn' && changeValue.length > 9) {\n changeValue = changeValue.slice(0, 9);\n if (value.length >= 9 && changeValue.length >= value.length) {\n return;\n }\n }\n\n setValue(changeValue);\n\n if (isBedrift && type === 'ssn' && changeValue.toString().length === 9) {\n setError(false);\n dispatch({ type: 'SET_SSN', ssn: changeValue });\n } else if (type === 'ssn' && changeValue.toString().length === 11) {\n setError(false);\n dispatch({ type: 'SET_SSN', ssn: changeValue });\n } else if (type === 'invoicePostCode') {\n if (changeValue.toString().length === 4 && changeValue.toString() !== '0000') {\n setError(false);\n dispatch({\n type: 'SET_INVOICE_POST_CODE',\n invoicePostCode: changeValue.toString(),\n });\n } else if (\n (changeValue.toString().length > 0 && changeValue.toString().length !== 4) ||\n changeValue.toString() === '0000'\n ) {\n setError(true);\n dispatch({\n type: 'SET_INVOICE_POST_CODE',\n invoicePostCode: changeValue.toString(),\n });\n } else {\n setError(false);\n dispatch({\n type: 'SET_INVOICE_POST_CODE',\n invoicePostCode: changeValue,\n });\n }\n }\n };\n\n const handleOnBlur = (e) => {\n let value = e.target ? e.target.value : e;\n if (isBedrift && type === 'ssn') {\n if (value.toString().length !== 9) {\n setError(true);\n dispatch({ type: 'SET_SSN', ssn: value });\n } else {\n setError(false);\n }\n } else if (type === 'ssn') {\n if (value.toString().length !== 11) {\n setError(true);\n dispatch({ type: 'SET_SSN', ssn: value });\n } else {\n setError(false);\n }\n } else if (type === 'name') {\n value.toString().length > 0 ? setError(false) : setError(true);\n dispatch({ type: 'SET_NAME', name: value });\n } else if (type === 'phone') {\n value.toString().length === 8 ? setError(false) : setError(true);\n dispatch({ type: 'SET_PHONE', phone: value });\n } else if (type === 'email') {\n if (isOverridden && !isBedrift) {\n setError(false);\n } else if (value.match(emailRegex)) {\n setError(false);\n dispatch({ type: 'SET_EMAIL', email: value });\n } else if (value.toString().length === 0) {\n setError(false);\n dispatch({ type: 'SET_EMAIL', email: null });\n } else {\n setError(true);\n dispatch({ type: 'SET_EMAIL', email: value });\n }\n } else if (type === 'otherEmailRecipient') {\n if (value.match(emailRegex)) {\n setError(false);\n dispatch({ type: 'SET_OTHER_EMAIL_RECIPIENT', email: value });\n } else {\n setError(true);\n dispatch({ type: 'SET_OTHER_EMAIL_RECIPIENT', email: value });\n }\n } else if (type === 'invoiceAddress') {\n dispatch({ type: 'SET_INVOICE_ADDRESS', invoiceAddress: value });\n } else if (type === 'contactPerson') {\n dispatch({\n type: 'SET_CONTACT_PERSON',\n payload: value.length === 0 ? null : value,\n });\n } else if (type === 'invoicePostCode') {\n // because we don't like nonsense fake type errors\n } else {\n console.error('TYPE NOT FOUND', type);\n }\n };\n\n useEffect(() => {\n if (!isBedrift && type === 'email') {\n isOverridden && setError(false);\n !isOverridden && setError(true);\n }\n }, [isOverridden, isBedrift, type]);\n\n useEffect(() => {\n queryString && handleChange(queryString);\n queryString && handleOnBlur(queryString);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [queryString]);\n\n return (\n \n
{label}
\n \n \n );\n}\n\nexport default Input;\n","import { useState } from 'react';\nimport '../../Stylesheets/PersonalInformation/Input.css';\nimport InputBase from '@mui/material/InputBase';\nimport { useDispatch } from 'react-redux';\nimport Grid from '@mui/material/Grid';\n\nfunction InputPostBox() {\n const dispatch = useDispatch();\n const [postBoxAddress, setPostBoxAddress] = useState('');\n const [coAddress, setCoAddress] = useState('');\n const [att, setAtt] = useState('');\n\n const handleChange = (e) => {\n if (e.target.name === 'postBoxAddress') {\n setPostBoxAddress(e.target.value);\n } else if (e.target.name === 'coAddress') {\n setCoAddress(e.target.value);\n } else if (e.target.name === 'att') {\n setAtt(e.target.value);\n }\n };\n\n const handleOnBlur = (e) => {\n if (e.target.name === 'postBoxAddress') {\n dispatch({ type: 'SET_POSTBOX_ADDRESS', payload: postBoxAddress });\n } else if (e.target.name === 'coAddress') {\n dispatch({ type: 'SET_CO_ADDRESS', payload: coAddress });\n } else if (e.target.name === 'att') {\n dispatch({ type: 'SET_ATT_ADDRESS', payload: att });\n }\n };\n\n return (\n \n \n
\n
{'Postboks-adresse'}
\n \n
\n
\n\n {att.length === 0 && (\n \n
\n
{'c/o'}
\n \n
\n
\n )}\n\n {coAddress.length === 0 && (\n \n
\n
{'Att.'}
\n \n
\n
\n )}\n
\n );\n}\n\nexport default InputPostBox;\n","export const calculateFornybar = (list) => {\n let total = 0;\n list.map((item) => (total += item.pricing.price * 100));\n return total;\n};\nexport const findLivePrices = (addonProductId, state) => {\n try {\n var priceElements = state.addonProducts.find((a) => a.id === addonProductId)?.priceInfo\n ?.priceElements;\n if (!priceElements) return null;\n //if they suddenly change number of priceelement without letting us know.\n if (priceElements.length < 4) {\n var firstGroupTotal = priceElements.reduce(\n (total, element) => total + parseFloat(element.price) / element.factor,\n 0,\n );\n var secondGroupTotal = priceElements\n .slice(1)\n .reduce((total, element) => total + parseFloat(element.price) / element.factor, 0);\n return { firstGroupTotal, secondGroupTotal };\n }\n // Combine the first two price elements\n var firstGroupTotal = priceElements\n .slice(2)\n .reduce((total, element) => total + parseFloat(element.pricing.price) / element.factor, 0);\n\n // Combine the last two price elements\n var secondGroupTotal = priceElements\n .slice(0, 2)\n .reduce((total, element) => total + parseFloat(element.pricing.price) / element.factor, 0);\n return { firstGroupTotal, secondGroupTotal };\n } catch (e) {\n return null;\n }\n};\nexport const getBirthDateFromSSN = (ssn) => {\n let currentYear;\n currentYear = new Date().getFullYear().toString();\n let day;\n day = ssn.slice(0, 2);\n let month;\n month = ssn.slice(2, 4);\n let year;\n year = ssn.slice(4, 6);\n if (day >= 41) {\n //d-nummer\n day = day - 40;\n }\n if (year < currentYear.slice(2, 4)) {\n year = currentYear.slice(0, 2) + year; //futureproof :)\n } else {\n year = currentYear.slice(0, 2) - 1 + year; //futureproof :)\n }\n let birthDate;\n birthDate = day + '.' + month + '.' + year;\n return birthDate;\n};\nexport function isLive(productId) {\n return productId === 959;\n}\nexport function isStromSmart(productId, brand = 'FKAS') {\n switch (brand.toUpperCase()) {\n case 'FKAS':\n return productId === 1047 || productId === 1048;\n case 'TKAS':\n return productId === 1117 || productId === 1118;\n default:\n return productId === 1047 || productId === 1048;\n }\n}\nexport function shouldShowPuls(productId, brand = 'FKAS') {\n switch (brand.toUpperCase()) {\n case 'FKAS':\n return productId === 1048;\n case 'TKAS':\n return productId === 1118;\n default:\n return productId === 1048;\n }\n}\nexport function isPuls(productId, brand = 'FKAS') {\n // return productId === 256;\n switch (brand.toUpperCase()) {\n case 'FKAS':\n return productId === 256;\n case 'TKAS':\n return productId === 608;\n default:\n return productId === 256;\n }\n}\nexport function isPowerInsurance(productId) {\n return productId === 124 || productId === 71;\n}\n\nexport const getAgeFromSSN = (ssn) => {\n const currentYear = new Date().getFullYear().toString();\n let day = ssn.slice(0, 2);\n const month = ssn.slice(2, 4);\n let year = ssn.slice(4, 6);\n\n if (day >= 41) {\n //d-nummer\n day = day - 40;\n }\n\n if (year < currentYear.slice(2, 4)) {\n year = currentYear.slice(0, 2) + year; //futureproof :)\n } else {\n year = currentYear.slice(0, 2) - 1 + year; //futureproof :)\n }\n const birthDate = new Date(`${year}-${month}-${day}`);\n const ageInMilliseconds = new Date() - new Date(birthDate);\n return Math.floor(ageInMilliseconds / 1000 / 60 / 60 / 24 / 365); // convert to years\n};\n\nfunction clonePriceElements(priceElementList) {\n let clone = JSON.parse(JSON.stringify(priceElementList));\n for (let x = 0; x < clone.length; x++) {\n if (clone[x].factor === 100 && clone[x].externalId !== 'FORNYBAR') {\n let shala = (parseFloat(priceElementList[x].price) / 100).toFixed(4);\n clone[x].price = parseFloat(shala);\n }\n }\n return clone;\n}\n\nfunction parseExtraProducts(initialExtraProducts) {\n let extraProducts = [];\n initialExtraProducts.forEach((element) => {\n let campaignList = [];\n element.campaigns.forEach((campaign) => {\n campaignList.push({ campaignId: campaign.campaignId, campaignName: campaign.campaignName });\n });\n extraProducts.push({\n id: element.id,\n campaigns: campaignList.length === 0 ? null : campaignList,\n priceElementList: element.priceElements,\n minimumTermDays: element.minimumTermDays,\n minimumTermMonths: element.minimumTermMonths,\n });\n });\n return extraProducts;\n}\n\nexport function distinctArray(array, key) {\n return [...new Map(array.map((item) => [item[key], item])).values()];\n}\n\nexport function isForutsigbarBetaling(productId) {\n return productId === 917 || productId === 918;\n}\n\nexport function isMinBedrift(productId) {\n return productId === 949 || productId === 968;\n}\n\nexport function isMinBedriftPriceElement(priceElementId) {\n return (\n priceElementId === minBedriftPriceElementIdFk || priceElementId === minBedriftPriceElementIdTk\n );\n}\n\nexport const minBedriftPriceElementIdFk = 417;\nexport const minBedriftPriceElementIdTk = 232;\n\nexport function isMarketplaceExtraProduct(productId) {\n return productId === 952;\n}\n","import axios from 'axios';\nimport environment from '../environment';\nimport ACTIONS from './Actions';\nimport { isForutsigbarBetaling } from '../utils/Methods';\n\nexport async function getForutsigbarEstimatedPrice(\n sites,\n ssn,\n amountOfFreeMonths,\n invoiceType,\n cancelSource,\n) {\n try {\n const estimateRes = await axios.post(\n environment.conductorUrl + '/api/v1/ironforge/estimateforutsigbarbetaling',\n {\n ssn: ssn,\n amountOfFreeMonths: amountOfFreeMonths,\n invoiceType: invoiceType,\n deliveryPoints: sites,\n },\n { cancelToken: cancelSource.token },\n );\n return estimateRes.data;\n } catch (e) {\n console.log(e);\n }\n}\n\nexport const createSystemLogs = async (url, title, info) => {\n try {\n await axios.post(url + '/api/log', { title: title, info: info, timestamp: new Date() });\n } catch (e) {\n console.log('Error system log');\n }\n};\n\nexport const getProductsByRefId = (url, refId) => async (dispatch) => {\n try {\n dispatch({ type: 'RESET_PRODUCT_LIST' });\n const res = await axios.get(url + '/api/v1/sendAfi/contract?refId=' + refId);\n if (JSON.stringify(res.data) !== JSON.stringify([])) {\n dispatch({\n type: 'SET_PRODUCT_LIST',\n payload: res.data,\n });\n }\n } catch (error) {\n dispatch({\n type: 'SET_ERROR',\n payload: error,\n });\n }\n};\n\nexport const getProducthubProductById = (url, id) => async (dispatch) => {\n try {\n const res = await axios.get(url + '/api/producthub/product/' + id);\n return res.data;\n } catch (error) {\n dispatch({\n type: 'SET_ERROR',\n payload: error,\n });\n }\n};\n\nexport const getProductPriceListById = (url, id) => async (dispatch) => {\n try {\n const res = await axios.get(url + '/api/producthub/product/' + id + '/pricelist');\n dispatch({\n type: 'SET_PRODUCT_PRICES',\n payload: res.data,\n });\n } catch (error) {\n dispatch({\n type: 'SET_ERROR',\n payload: error,\n });\n }\n};\n\n// TODO: Sparkle\nexport const getProductInfo =\n (url, id, brand, isMobile, isMobileExtraProduct, isBedrift, isAddon = false) =>\n async (dispatch) => {\n let channelId = 7;\n let textGroupId;\n if (isMobile) textGroupId = 3;\n else if (isMobileExtraProduct) textGroupId = 5;\n else if (isBedrift || isAddon) textGroupId = 1;\n else textGroupId = 3;\n\n dispatch({\n type: 'SET_SHOW_DETAILS_LOADING',\n showDetailsIsLoading: true,\n });\n try {\n let res = '';\n if (!isAddon) {\n res = await axios.get(\n url +\n '/api/producthub/text?productId=' +\n id +\n '&channelId=' +\n channelId +\n '&textGroupId=' +\n textGroupId +\n '&brand=' +\n brand +\n '&isMobile=' +\n isMobile +\n '&isMobileExtraProduct=' +\n isMobileExtraProduct,\n );\n }\n let res2 = '';\n if (isBedrift || isAddon) {\n const priceInfo = await axios.get(\n url +\n '/api/producthub/text?productId=' +\n id +\n '&channelId=' +\n channelId +\n '&textGroupId=' +\n textGroupId +\n '&brand=' +\n brand,\n );\n res2 = priceInfo.data.content;\n }\n if (isMobile || isMobileExtraProduct) {\n dispatch({\n type: 'SET_SHOW_DETAILS',\n payload: res.data,\n });\n } else if (res.data?.content !== '' && res !== '') {\n dispatch({\n type: 'SET_SHOW_DETAILS',\n payload: res?.data?.content,\n });\n } else if (res2?.data?.content !== '' && res2 !== '') {\n dispatch({\n type: 'SET_SHOW_DETAILS',\n payload: res2,\n });\n } else {\n dispatch({\n type: 'SET_SHOW_DETAILS',\n payload: '

Fant ingen produktinformasjon på dette produktet.

',\n });\n }\n } catch (error) {\n dispatch({\n type: 'SET_SHOW_DETAILS',\n payload: '

Det oppstod en feil ved henting av produktinformasjon.

',\n });\n }\n };\n\nexport const getProductInfoSummary =\n (url, id, brand, campaign, productHubCampaigns, extraProducts, isAddon = false) =>\n async (dispatch) => {\n let channelId = 7;\n try {\n const res = await axios.get(\n url +\n '/api/producthub/text?productId=' +\n id +\n '&channelId=' +\n channelId +\n '&textGroupId=3&brand=' +\n brand,\n );\n let campaignRes = '';\n if (campaign) {\n let productHubId = productHubCampaigns.find((element) => element.name === campaign.name).id;\n campaignRes = await axios.get(\n url +\n '/api/producthub/text?productId=' +\n productHubId +\n '&channelId=' +\n channelId +\n '&textGroupId=1&brand=' +\n brand,\n );\n }\n let extraProductTexts = '';\n if (extraProducts !== null) {\n let textRes = '';\n for (let i = 0; i < extraProducts.length; i++) {\n textRes = await axios.get(\n url +\n '/api/producthub/text?productId=' +\n extraProducts[i].id +\n '&channelId=' +\n channelId +\n '&textGroupId=1&brand=' +\n brand,\n );\n let campaignRes = '';\n if (extraProducts[i]?.campaigns?.length > 0) {\n console.log('kampanje', extraProducts[i]);\n let productHubId = productHubCampaigns.find(\n (element) => element?.name === extraProducts[i]?.campaigns[0]?.campaignName,\n ).id;\n campaignRes = await axios.get(\n url +\n '/api/producthub/text?productId=' +\n productHubId +\n '&channelId=' +\n channelId +\n '&textGroupId=1&brand=' +\n brand,\n );\n extraProductTexts =\n extraProductTexts +\n '

' +\n extraProducts[i].name +\n '

' +\n textRes.data.content +\n '
' +\n extraProducts[i].campaigns[0].campaignName +\n '
' +\n campaignRes.data.content;\n } else {\n console.log(extraProducts[i]);\n extraProductTexts =\n extraProductTexts + '

' + extraProducts[i].name + '

' + textRes.data.content;\n if (extraProducts[i].id === 718) {\n extraProductTexts =\n extraProductTexts +\n '
  • Du får ' +\n extraProducts[i].priceElements[0].price +\n extraProducts[i].priceElements[0].denomination +\n ' i ' +\n extraProducts[i].priceElements[0].name +\n ' på første faktura
  • ';\n }\n if (extraProducts[i].id === 621) {\n extraProductTexts =\n extraProductTexts +\n '
  • Du har ' +\n (extraProducts[i].minimumTermDays === null\n ? '6 måneder'\n : extraProducts[i].minimumTermDays + ' dagers') +\n ' bindingstid' +\n '
  • Brudd av abonnement før bindingstiden utgår gir ' +\n extraProducts[i].priceElements[0].price +\n extraProducts[i].priceElements[0].denomination +\n ' i ' +\n extraProducts[i].priceElements[0].name +\n '
  • ';\n }\n }\n }\n }\n\n if (res.data.content !== '') {\n let payload = res.data.content;\n if (campaign) payload = payload + campaignRes.data.content;\n if (extraProducts) payload = payload + extraProductTexts;\n if (isAddon) {\n dispatch({\n type: 'ADD_TO_ADDON_SUMMARY_DETAILS',\n payload: payload,\n });\n } else {\n dispatch({\n type: 'ADD_TO_SUMMARY_DETAILS',\n payload: payload,\n });\n }\n } else {\n let payload = '

    Fant ingen produktinformasjon på dette produktet.


    ';\n if (campaign) payload = payload + campaignRes.data.content;\n dispatch({\n type: 'ADD_TO_SUMMARY_DETAILS',\n payload: payload,\n });\n }\n } catch (error) {\n console.log(error);\n dispatch({\n type: 'ADD_TO_SUMMARY_DETAILS',\n payload: '

    Det oppstod en feil ved henting av produktinformasjon.

    ',\n });\n }\n };\n\n// TODO: Sparkle || samme som getProductInfo\nexport const getProductInfoSummaryMobile = (url, id, brand) => async (dispatch) => {\n console.log('getProductInfoSummaryMobile');\n let channelId = 7;\n console.log(id);\n try {\n const res = await axios.get(\n url +\n '/api/producthub/text?productId=' +\n id +\n '&channelId=' +\n channelId +\n '&textGroupId=3&brand=' +\n brand +\n '&isMobile=' +\n true,\n );\n\n if (res.data.content !== '') {\n let payload = res.data;\n dispatch({\n type: 'ADD_TO_SUMMARY_DETAILS_MOBILE',\n payload: payload,\n });\n } else {\n let payload = '

    Fant ingen produktinformasjon på dette produktet.


    ';\n dispatch({\n type: 'ADD_TO_SUMMARY_DETAILS_MOBILE',\n payload: payload,\n });\n }\n } catch (error) {\n console.log(error);\n dispatch({\n type: 'ADD_TO_SUMMARY_DETAILS_MOBILE',\n payload: '

    Det oppstod en feil ved henting av produktinformasjon.

    ',\n });\n }\n};\n\nexport const getCampaigns = (url, brand) => async (dispatch) => {\n try {\n const res = await axios.get(`${url}/api/producthub/getCampaigns/${brand}`);\n dispatch({\n type: 'SET_PRODUCT_HUB_CAMPAIGNS',\n payload: res.data,\n });\n } catch (error) {\n dispatch({\n type: 'SET_ERROR',\n payload: error,\n });\n }\n};\n\nexport const getAssumedProductsBySSN = (url, ssn) => async (dispatch) => {\n try {\n const res = await axios.get(url + '/api/v1/ironforge/findAssumedProducts?ssn=' + ssn);\n return res.data;\n } catch (error) {\n console.log(error);\n }\n};\n\nexport const getFilteredPowerProducts =\n (url, brand, identityServerId, customerType) => async (dispatch) => {\n try {\n let ids = Array.isArray(identityServerId) ? identityServerId : [identityServerId];\n const res = await axios.post(url + '/api/producthub/products/storeIds', {\n brand,\n customerType,\n productCategories: ['POWER', 'AGREEMENT'],\n storeIds: ids,\n });\n dispatch({\n type: 'SET_POWER_PRODUCTS',\n payload: res.data,\n });\n } catch (error) {\n console.log(error);\n dispatch({\n type: 'SET_ERROR',\n payload: error,\n });\n }\n };\n\nexport const getFilteredCampaigns =\n (url, brand, identityServerId, customerType) => async (dispatch) => {\n try {\n let ids = Array.isArray(identityServerId) ? identityServerId : [identityServerId];\n const res = await axios.post(url + '/api/producthub/products/storeIds', {\n brand,\n customerType,\n productCategories: ['CAMPAIGN'],\n storeIds: ids,\n });\n dispatch({\n type: 'SET_FILTERED_CAMPAIGNS',\n payload: res.data,\n });\n } catch (error) {\n console.log(error);\n dispatch({\n type: 'SET_ERROR',\n payload: error,\n });\n }\n };\n\nexport const getAddonProductPriceInfo = (url, productHubId) => async (dispatch) => {\n try {\n dispatch({ type: ACTIONS.SET_ADDON_PRODUCT_PRICE_INFO_LOADING, payload: { productHubId } });\n const res = await axios.get(url + `/api/producthub/addonproductwithpriceinfo/${productHubId}`);\n dispatch({\n type: ACTIONS.SET_ADDON_PRODUCT_PRICE_INFO,\n payload: { data: res.data, productHubId },\n });\n } catch (e) {\n console.log(e);\n dispatch({\n type: ACTIONS.SET_ADDON_PRODUCT_PRICE_INFO_ERROR,\n payload: { error: e, productHubId },\n });\n }\n};\nexport const getFilteredAddonProducts =\n (url, brand, identityServerId, customerType) => async (dispatch) => {\n if (brand === 'FK') {\n brand = 'FKAS';\n } else if (brand === 'TK') {\n brand = 'TKAS';\n }\n // Extra check from URL to get the right brand\n // quick fix, find better way\n const search = sessionStorage.getItem('search') ?? '';\n\n const brandSearch = new URLSearchParams(search).get('brand');\n\n if (brandSearch === 'TKAS') {\n brand = brandSearch;\n }\n\n try {\n let ids = Array.isArray(identityServerId) ? identityServerId : [identityServerId];\n const res = await axios.post(url + '/api/producthub/products/storeIds', {\n brand,\n customerType,\n productCategories: ['ADDON', 'GENERIC'],\n storeIds: ids,\n });\n try {\n const forutsigbarRes = await axios.post(url + '/api/producthub/products/', {\n customerType,\n productCategories: ['GENERIC'],\n });\n res.data = res.data.concat(\n forutsigbarRes.data.filter(\n (p) => isForutsigbarBetaling(p.id) && (brand === 'FKAS' ? p.id === 856 : p.id === 857),\n ),\n );\n } catch (e) {\n console.log('FAILURE TO FETCH GENERIC ADDONS');\n console.log(e);\n }\n dispatch({\n type: 'SET_ADDON_PRODUCTS',\n payload: res.data,\n });\n for (let addonproduct of res.data) {\n if (addonproduct.productCategory !== 'GENERIC') {\n dispatch(getAddonProductPriceInfo(url, addonproduct.id));\n }\n }\n } catch (error) {\n console.log(error);\n dispatch({\n type: 'SET_ERROR',\n payload: error,\n });\n }\n };\n\n// TODO: Sparkle\nexport const getFilteredMobileProducts =\n (url, brand, identityServerId, customerType) => async (dispatch) => {\n try {\n const products = await axios.post(url + '/api/producthub/products/storeIds', {\n brand,\n customerType,\n productCategories: ['SPARKLE_PRODUCT'], // PRODUCT_OPTION -> SPARKLE_PRODUCT?\n storeIds: [identityServerId],\n withPrices: true,\n });\n dispatch({\n type: ACTIONS.SET_MOBILE_PRODUCTS,\n payload: products.data,\n });\n } catch (error) {\n console.log(error);\n dispatch({\n type: 'SET_ERROR',\n payload: error,\n });\n }\n };\n\n// TODO: Sparkle\nexport const getFilteredMobileExtraProducts =\n (url, brand, identityServerId, customerType) => async (dispatch) => {\n try {\n const products = await axios.post(url + '/api/producthub/products/storeIds', {\n brand,\n customerType,\n productCategories: ['SPARKLE_ADDON'],\n storeIds: [identityServerId],\n withPrices: true,\n });\n\n dispatch({\n type: 'SET_MOBILE_EXTRA_PRODUCTS',\n payload: products.data,\n });\n } catch (error) {\n console.log(error);\n dispatch({\n type: 'SET_ERROR',\n payload: error,\n });\n }\n };\n\n// TODO: Sparkle\nexport const getMobileCampaigns = (storeId) => async (dispatch) => {\n try {\n const products = await axios.get(\n `${environment.orderModuleApiUrl}/api/producthub/mobileCampaigns/${storeId}`,\n );\n dispatch({ type: 'SET_MOBILE_CAMPAIGNS', payload: products.data });\n } catch (error) {\n console.log(error);\n }\n};\n\nexport const getContractAccountIDs = (url, brand, customerId) => async (dispatch) => {\n try {\n const res = await axios.get(url + '/api/afi/contract/' + customerId + '/' + brand);\n res.data.map((item) =>\n dispatch({ type: 'ADD_TO_ACCOUNT_ID', accountId: item.accountId, refID: customerId }),\n );\n } catch (error) {\n console.log(error);\n dispatch({\n type: 'SET_ERROR',\n payload: error,\n });\n }\n};\n\nexport const createEnergiKonto =\n (url, brand, customerId, invoiceCategory = null, isStorkunde = false) =>\n async (dispatch) => {\n try {\n if (isStorkunde) {\n const res = await axios.post(url + '/api/fusion/energikonto', {\n brand: brand,\n iSCUCustomerId: customerId,\n isStorkunde: isStorkunde,\n kontokategori: invoiceCategory,\n });\n if (res.data.energiKontoNummer) {\n return res.data.energiKontoNummer;\n } else {\n return null;\n }\n } else {\n dispatch({ type: 'IS_CREATING_ENERGIKONTO', bool: true });\n const res = await axios.post(url + '/api/fusion/energikonto', {\n brand: brand,\n iSCUCustomerId: customerId,\n });\n if (res.data.energiKontoNummer) {\n dispatch({\n type: 'SET_INVOICE',\n invoice: {\n name: 'Separat faktura',\n accountId: res.data.energiKontoNummer,\n refId: customerId,\n },\n });\n dispatch({ type: 'IS_CREATING_ENERGIKONTO', bool: false });\n } else {\n dispatch({\n type: 'SET_INVOICE',\n invoice: { name: 'Separat faktura', accountId: null, refId: null },\n });\n dispatch({ type: 'IS_CREATING_ENERGIKONTO', bool: false });\n }\n }\n } catch (error) {\n console.log(error);\n dispatch({ type: 'IS_CREATING_ENERGIKONTO', bool: false });\n dispatch({\n type: 'SET_INVOICE',\n invoice: { name: 'Separat faktura', accountId: null, refId: null },\n });\n }\n };\n\nexport const getPostArea =\n (zipCode, mobile = false) =>\n async (dispatch) => {\n try {\n if (mobile) {\n async function fetchPostArea() {\n await fetch(\n 'https://fraktguide.bring.no/fraktguide/api/postalCode.json?country=no&pnr=' + zipCode,\n )\n .then((response) => {\n if (response.ok) {\n return response.json();\n }\n })\n .then((data) => {\n dispatch({ type: 'SET_INVOICE_CITY', invoiceCity: data.result });\n });\n }\n fetchPostArea();\n }\n async function fetchPostArea() {\n await fetch(\n 'https://fraktguide.bring.no/fraktguide/api/postalCode.json?country=no&pnr=' + zipCode,\n )\n .then((response) => {\n if (response.ok) {\n return response.json();\n }\n })\n .then((data) => {\n dispatch({ type: 'SET_ADD_RESIDENCE', postArea: data.result });\n });\n }\n fetchPostArea();\n } catch (error) {\n dispatch({\n type: 'SET_ERROR',\n payload: error,\n });\n }\n };\n\nexport const findResidence =\n (url, ssn, addResidence, streetName, buildingNumber, meterNumber, zipCode) =>\n async (dispatch) => {\n let sanitizedStreetName = streetName && sanitizeString(streetName);\n if (sanitizedStreetName === null) {\n sanitizedStreetName = streetName;\n }\n dispatch({ type: 'SET_ADD_RESIDENCE_LOADING', loading: true });\n let params = '';\n let buildingNumberParam = '';\n if (addResidence.meterPointId && addResidence.meterPointId !== null) {\n params = '?meteringPointId=' + addResidence.meterPointId;\n } else if (\n addResidence.meterNumber &&\n addResidence.meterNumber !== null &&\n addResidence.zipCode &&\n addResidence.zipCode !== null\n ) {\n params = '?zipCode=' + addResidence.zipCode + '&meterID=' + addResidence.meterNumber;\n } else if (ssn && ssn.length === 11) {\n params =\n '?personID=' +\n ssn +\n (addResidence.zipCode != null ? '&zipCode=' + addResidence.zipCode : '') +\n (sanitizedStreetName ? '&streetName=' + sanitizedStreetName : '');\n\n buildingNumberParam =\n '&buildingNumber=' +\n (buildingNumber !== null && buildingNumber !== undefined ? buildingNumber : '*');\n } else if (ssn && ssn.length === 9) {\n params =\n '?organizationNumber=' +\n ssn +\n (addResidence.zipCode != null ? '&zipCode=' + addResidence.zipCode : '') +\n (sanitizedStreetName ? '&streetName=' + sanitizedStreetName : '');\n\n buildingNumberParam =\n '&buildingNumber=' +\n (buildingNumber !== null && buildingNumber !== undefined ? buildingNumber : '*');\n }\n\n try {\n let res = await axios.get(url + '/api/onyx/meteringpoints' + params + buildingNumberParam);\n if (res.data.length < 1) {\n buildingNumber = '*';\n res = await axios.get(url + '/api/onyx/meteringpoints' + params + buildingNumberParam);\n }\n dispatch({ type: 'SET_ONYX_RESULT', payload: res.data });\n dispatch({ type: 'SET_ONYX_RESPONSE', onyxResponse: true });\n dispatch({ type: 'SET_ADD_RESIDENCE_LOADING', loading: false });\n dispatch({ type: 'ADD_ONYX_ARRAY', payload: res.data[0] });\n console.log(res.data);\n } catch (error) {\n dispatch({\n type: 'SET_ONYX_ERROR',\n payload: error,\n });\n }\n };\n\nexport const verifyElhubApiCall =\n (url, ssn, addResidence, streetName, buildingNumber, meterNumber, zipCode) =>\n async (dispatch) => {\n let sanitizedStreetName = streetName && sanitizeString(streetName);\n if (sanitizedStreetName === null) {\n sanitizedStreetName = streetName;\n }\n dispatch({ type: 'SET_ADD_RESIDENCE_LOADING', loading: true });\n let params = '';\n let buildingNumberParam = '';\n if (ssn && ssn.length === 11) {\n params =\n '?personID=' +\n ssn +\n (zipCode != null ? '&zipCode=' + zipCode : '') +\n (sanitizedStreetName ? '&streetName=' + sanitizedStreetName : '') +\n (meterNumber ? '&meterNumber=' + meterNumber : '');\n\n buildingNumberParam = '&buildingNumber=*';\n } else if (ssn && ssn.length === 9) {\n params =\n '?organizationNumber=' +\n ssn +\n (zipCode != null ? '&zipCode=' + zipCode : '') +\n (sanitizedStreetName ? '&streetName=' + sanitizedStreetName : '') +\n (meterNumber ? '&meterNumber=' + meterNumber : '');\n\n buildingNumberParam = '&buildingNumber=*';\n }\n\n try {\n let res = await axios.get(url + '/api/onyx/meteringpoints' + params + buildingNumberParam);\n console.log(res);\n dispatch({ type: 'SET_ONYX_RESULT', payload: [res.data[0]] });\n dispatch({ type: 'SET_ONYX_RESPONSE', onyxResponse: true });\n dispatch({ type: 'SET_ADD_RESIDENCE_LOADING', loading: false });\n } catch (error) {\n dispatch({\n type: 'SET_ONYX_ERROR',\n payload: error,\n });\n }\n };\n\nexport const createOrders = (url, salesModuleSales, orderModuleApiUrl) => async (dispatch) => {\n try {\n await axios.post(url + '/api/v1/Order/CreateOrders', salesModuleSales).then((result) => {\n dispatch({ type: 'SET_SALESMODULE_SALE_RESULT', payload: result });\n });\n } catch (error) {\n try {\n let body = {\n User: salesModuleSales.seller.name,\n Payload: JSON.stringify(salesModuleSales),\n Error: false,\n };\n await axios.post(`${orderModuleApiUrl}/api/v2/ironforge/payload`, body);\n } catch (error) {\n //do nothing if this fails\n }\n dispatch({\n type: 'SET_ERROR_CREATE_ORDER',\n payload: error,\n });\n }\n};\nexport const createStorkundeOrders = (url, salesModuleSales) => async (dispatch) => {\n try {\n dispatch({ type: 'SET_STORKUNDE_LOADING', payload: true });\n await axios.post(url + '/api/v1/Order/CreateOrders', salesModuleSales).then((result) => {\n dispatch({ type: 'ADD_CREATED_ORDER', payload: result });\n dispatch({ type: 'SET_STORKUNDE_LOADING', payload: false });\n });\n } catch (error) {\n console.log(error);\n error.config.data = JSON.parse(error.config.data);\n dispatch({ type: 'ADD_FAILED_ORDER', payload: error });\n dispatch({ type: 'SET_STORKUNDE_LOADING', payload: false });\n }\n};\n\nexport const getStatistics = (url, info) => async (dispatch) => {\n dispatch({ type: 'RESET_COUNT' }); //fjerner tidligere fra staten, slik at de ikke blir hengende igjen.\n try {\n dispatch({ type: 'SET_STATISTICS_LOADING', bool: true });\n let res = await axios.post(url + '/api/v1/ironforge/statistics', info);\n dispatch({ type: 'SET_STATISTICS', payload: res.data });\n dispatch({ type: 'SET_STATISTICS_LOADING', bool: false });\n } catch (error) {\n dispatch({\n type: 'SET_ERROR',\n payload: error,\n });\n dispatch({ type: 'SET_STATISTICS_LOADING', bool: false });\n }\n};\n\nexport const getCreditConfirmation = (url, ssn, phone, brand, isBedrift) => async (dispatch) => {\n try {\n dispatch({ type: 'SET_CREDIT_CHECK_LOADING', bool: true });\n let type = isBedrift ? 'Company' : '';\n let shortHand = brand === 'FKAS' ? 'FK' : 'TK';\n let res = await axios.post(url + '/api/v1/creditcheck/check', {\n ssn,\n phone: isBedrift ? null : phone,\n brand: shortHand,\n salesType: type,\n });\n dispatch({ type: 'SET_CREDIT_CHECK', payload: res.data });\n dispatch({ type: 'SET_CREDIT_CHECK_LOADING', bool: false });\n } catch (error) {\n dispatch({ type: 'SET_CREDIT_CHECK_LOADING', bool: false });\n dispatch({\n type: 'SET_ERROR',\n payload: error,\n });\n }\n};\n\n// TODO: Sparkle\nexport const getCreditConfirmationMobile = (url, ssn, phone, brand) => async (dispatch) => {\n try {\n let type = 'Mobile';\n let shortHand = brand === 'FKAS' ? 'FK' : 'TK';\n let res = await axios.post(url + '/api/v1/creditcheck/check', {\n ssn,\n phone: phone,\n brand: shortHand,\n salesType: type,\n });\n dispatch({ type: 'SET_CREDIT_CHECK_MOBILE', payload: res.data });\n } catch (error) {\n dispatch({\n type: 'SET_ERROR',\n payload: error,\n });\n }\n};\n\nexport const getBonusCampaignsByTags = (url, producthubTags) => async (dispatch) => {\n try {\n let tagParams = producthubTags.map((tag) => ['productHubTags', tag]);\n let params = new URLSearchParams(tagParams);\n let res = await axios.get(url + '/api/v1/Bonus/BonusCampaigns/ByTag', { params });\n dispatch({\n type: 'SET_BONUS_CAMPAIGNS',\n payload: res.data,\n });\n return res.data;\n } catch (error) {\n dispatch({\n type: 'SET_ERROR',\n payload: error,\n });\n }\n};\n\nexport const getStoreName = (url, identityServerId) => async (dispatch) => {\n try {\n let res = await axios.post(url + '/api/producthub/storenamebyid/' + identityServerId);\n dispatch({ type: 'SET_STORE_NAME', name: res.data });\n } catch (error) {\n dispatch({ type: 'SET_ERROR', payload: error });\n }\n};\n\nexport const getSellerStoreNames = (url, body) => async (dispatch) => {\n try {\n let res = await axios.post(url + '/api/producthub/storenamesbyid', { storeIds: body });\n dispatch({ type: 'SET_SELLER_STORE_NAMES', payload: res.data });\n } catch (error) {\n dispatch({ type: 'SET_ERROR', payload: error });\n dispatch({ type: 'SET_ERROR_CHECK_PH', payload: [true, { status: 'N/A', ping: 'N/A' }] });\n }\n};\nexport const getStoreNames = (url, body) => async (dispatch) => {\n try {\n let res = await axios.post(url + '/api/producthub/storenamesbyid', { storeIds: body });\n dispatch({ type: 'SET_STORE_NAMES', payload: res.data });\n } catch (error) {\n dispatch({ type: 'SET_ERROR', payload: error });\n }\n};\n\nexport const getSiteList =\n (url, ssn, isBedrift, firstName, lastName, invoiceAddress, invoiceZipCode) =>\n async (dispatch) => {\n try {\n dispatch({ type: 'SET_SITE_LOADING', bool: true });\n let res = await axios.post(url + '/api/v1/ironforge/siteList', {\n ssn,\n isBedrift,\n firstName,\n lastName,\n invoiceAddress,\n invoiceZipCode,\n });\n console.log(res);\n if (invoiceAddress != null && res && Array.isArray(res.data)) {\n if (res.data.length > 0) {\n res.data.map((item) => dispatch({ type: 'ADD_TO_SITE_LIST', payload: item }));\n }\n } else {\n dispatch({ type: 'SET_SITE_LIST', payload: res.data });\n }\n dispatch({ type: 'SET_SITE_LOADING', bool: false });\n } catch (error) {\n dispatch({ type: 'SET_ERROR', payload: error });\n dispatch({ type: 'SET_SITE_LOADING', bool: false });\n }\n };\n\nexport const getInvoiceAddress = (url, ssn) => async (dispatch) => {\n try {\n dispatch({ type: 'SET_SITE_LOADING', bool: true });\n let res = await axios.post(url + '/api/v1/ironforge/getInvoiceAddress', { ssn });\n if (res.data !== null) {\n dispatch({ type: 'SET_BEDRIFT_INVOICE_ADDRESS', payload: res.data });\n }\n dispatch({ type: 'SET_SITE_LOADING', bool: false });\n } catch (error) {\n dispatch({ type: 'SET_ERROR', payload: error });\n dispatch({ type: 'SET_SITE_LOADING', bool: false });\n }\n};\n\nexport const getActiveDeliveryPoints = (url, ssn, isBedrift, brand) => async (dispatch) => {\n try {\n let res = await axios.post(url + '/api/v1/ironforge/getActiveDeliveryPoints', {\n ssn,\n isBedrift,\n brand,\n });\n dispatch({ type: 'SET_ACTIVE_DELIVERYPOINTS', payload: res.data });\n } catch (error) {}\n};\n\n// TODO: sparkle ?\nexport const getEInvoiceReference = (url, ssn, brand) => async (dispatch) => {\n try {\n const result = await axios.post(`${url}/api/EInvoiceReferences/${brand}`, { ssn });\n let eInvoiceReference = result.data;\n dispatch({\n type: ACTIONS.SET_E_INVOICE_OBJECT,\n payload: eInvoiceReference,\n });\n } catch (e) {\n console.error(`Error: Failed to get eInvoice reference: ${e.message}`);\n // throw (e); // Handle error instead ;)\n }\n};\n\nexport const getCommissionCampaigns = (url) => async (dispatch) => {\n try {\n let res = await axios.get(url + '/api/v1/CommissionCampaign');\n dispatch({ type: 'SET_COMMISSION_CAMPAIGNS', payload: res.data });\n } catch (error) {\n dispatch({\n type: 'SET_ERROR',\n payload: error,\n });\n }\n};\n\nexport const getSellerCount =\n (url, newSale, extraProduct, title, fromDate, toDate, storeIds) => async (dispatch) => {\n try {\n if (extraProduct === true) {\n let res = await axios.post(url + '/api/v1/ironforge/sellercountExtraProductAccepted', {\n newSale,\n extraProduct,\n title,\n fromDate,\n toDate,\n storeIds,\n });\n dispatch({ type: 'SET_SELLER_COUNT', payload: res.data });\n dispatch({ type: 'SET_SELLER_COUNT_OPEN', open: title + newSale + extraProduct });\n } else {\n let res = await axios.post(url + '/api/v1/ironforge/sellercount', {\n newSale,\n extraProduct,\n title,\n fromDate,\n toDate,\n storeIds,\n });\n dispatch({ type: 'SET_SELLER_COUNT', payload: res.data });\n dispatch({ type: 'SET_SELLER_COUNT_OPEN', open: title + newSale + extraProduct });\n }\n } catch (error) {\n dispatch({\n type: 'SET_ERROR',\n payload: error,\n });\n }\n };\n\nexport const getProductFromMoment = (url, momentId, brand) => async (dispatch) => {\n try {\n dispatch({ type: 'SET_PRICELIST_LOADING', bool: true });\n let res = await axios.post(`${url}/api/v1/ironforge/getMomentProduct`, { momentId, brand });\n dispatch({ type: 'SET_MOMENT_PRODUCT', payload: res.data });\n dispatch({ type: 'SET_PRICELIST_LOADING', bool: false });\n } catch (error) {\n dispatch({ type: 'SET_PRICELIST_LOADING', bool: false });\n dispatch({\n type: 'SET_ERROR',\n payload: error,\n });\n }\n};\n\nexport const getProductPresentationFromMoment = (url, momentId, brand) => async (dispatch) => {\n try {\n dispatch({ type: 'SET_PRICELIST_LOADING', bool: true });\n let res = await axios.post(`${url}/api/v1/ironforge/getMomentProductPresentation`, {\n momentId,\n brand,\n });\n dispatch({ type: 'SET_MOMENT_PRODUCT_PRESENTATION', payload: res.data });\n dispatch({ type: 'SET_PRICELIST_LOADING', bool: false });\n } catch (error) {\n dispatch({ type: 'SET_PRICELIST_LOADING', bool: false });\n dispatch({\n type: 'SET_ERROR',\n payload: error,\n });\n }\n};\n\nexport const getProductWithPrices =\n (url, productHubId, agreement = null) =>\n async (dispatch) => {\n try {\n dispatch({ type: 'SET_PRICELIST_LOADING', bool: true });\n if (agreement !== 'AGREEMENT') {\n let res = await axios.get(url + '/api/producthub/productwithpriceinfo/' + productHubId);\n dispatch({ type: 'SET_PRODUCT_PRICEINFO', payload: res.data });\n }\n dispatch(getProductPriceListElCert(url, productHubId));\n dispatch({ type: 'SET_PRICELIST_LOADING', bool: false });\n } catch (error) {\n dispatch({\n type: 'SET_ERROR',\n payload: error,\n });\n }\n };\n\nexport const getProductPriceListElCert = (url, productHubId) => async (dispatch) => {\n try {\n const res = await axios.get(url + '/api/producthub/product/' + productHubId + '/pricelist');\n dispatch({\n type: 'SET_PRODUCT_PRICEINFO_EL_CERT',\n payload: res.data.value,\n });\n } catch (error) {\n dispatch({\n type: 'SET_ERROR',\n payload: error,\n });\n }\n};\n\n// TODO: sparkle\n/*export const getErateAccount = (url, ssn) => async dispatch => {\n try {\n const erateAccount = await axios.get(url + '/api/Erate/CheckIfCustomerExists?ssn=' + ssn)\n dispatch({\n type: ACTIONS.SET_ERATE_ACCOUNT,\n payload: erateAccount.data\n })\n }\n catch (error) {\n\n dispatch({\n type: \"SET_ERROR\",\n payload: error\n })\n }\n}\n\n// TODO: sparkle\nexport const getErateAccountInfo = (url, accountId) => async dispatch => {\n try {\n const accountInfo = await axios.get(url + '/api/Erate/AccountInfo/' + accountId)\n dispatch({\n type: ACTIONS.SET_ERATE_ACCOUNT_INFO,\n payload: accountInfo.data\n })\n }\n catch (error) {\n dispatch({\n type: \"SET_ERROR\",\n payload: error\n })\n\n }\n}*/\n\n// check to see if the user has opted out of messages displaying automatically res.data\nexport const checkSeen = (url, id) => async (dispatch) => {\n try {\n const res = await axios.get(url + '/api/AddedChanges/' + id + '/0');\n\n dispatch({ type: 'SET_ADDED_CHANGES_SEEN', payload: res.data });\n dispatch({ type: 'SET_ADDED_CHANGES_LOADED', payload: true });\n } catch (error) {\n console.log('Added changes error');\n // Ordermodule warning checker\n dispatch({ type: 'SET_ERROR_CHECK_ODM', payload: [true, { status: 'N/A', ping: 'N/A' }] });\n }\n};\n\nexport const searchSeller = (url, searchParam) => async (dispatch) => {\n try {\n const res = await axios.get(url + '/api/v1/ironforge/searchSellers?searchParam=' + searchParam);\n\n return res.data;\n } catch (error) {\n console.log(error);\n }\n};\n\nexport const checkOrgNr = (url, orgNr) => async (dispatch) => {\n try {\n const res = await axios.get(url + '/api/BrReg/' + orgNr);\n return res.data;\n } catch (error) {\n console.log(error);\n }\n};\nexport const retrieveGroupId = (url, dealID) => async (dispatch) => {\n try {\n dispatch({ type: 'SET_IRISK_LOADING', payload: true });\n const res = await axios.post(url + '/api/Irisk/Trades', {\n DealIds: [parseInt(dealID)],\n });\n\n console.log(res);\n dispatch({ type: 'GET_IRISK_GROUPID', payload: res.data.tradeCollectionId });\n dispatch({ type: 'SET_IRISK_LOADING', payload: false });\n } catch (error) {\n console.log(error);\n dispatch({ type: 'SET_IRISK_LOADING', payload: false });\n }\n};\nexport const addToExistingIrisk = (url, dealID, groupID) => async (dispatch) => {\n try {\n dispatch({ type: 'SET_IRISK_LOADING', payload: true });\n const res = await axios.post(url + '/api/Irisk/Trades/AddToExisting/' + groupID, {\n DealIds: [parseInt(dealID)],\n });\n dispatch({ type: 'SET_IRISK_ALERT', payload: true });\n dispatch({ type: 'SET_IRISK_LOADING', payload: false });\n\n console.log(res);\n } catch (error) {\n console.log('DealId er allerede lagt til i groupId.');\n dispatch({ type: 'SET_IRISK_ALERT', payload: false });\n dispatch({ type: 'SET_IRISK_LOADING', payload: false });\n\n console.log(error);\n }\n};\n\nexport const getAllStores = (url) => async (dispatch) => {\n try {\n const res = await axios.get(url + '/api/producthub/getAllStores');\n dispatch({\n type: 'SET_ALL_STORES',\n payload: res.data,\n });\n } catch (error) {\n dispatch({\n type: 'SET_ERROR',\n payload: error,\n });\n }\n};\n\n// TODO: sparkle\n/*export const getIsActiveMobile = (url, phoneNr) => async dispatch => {\n try {\n const res = await axios.get(`${url}/api/erate/hasactivesubscription/${phoneNr}`)\n return res.data.active\n } catch (error) {\n return false\n }\n}*/\n\nexport const getIsActiveMobile = (url, phoneNr) => async (dispatch) => {\n try {\n const res = await axios.post(`${url}/api/sparkle/getIsActiveBySsn/`, { phoneNr: phoneNr });\n return res.data.active; // active?\n } catch (error) {\n return false;\n }\n};\n\nexport const getDefaultPortingDate = (url) => async (dispatch) => {\n try {\n const res = await axios.get(`${url}/api/workingDays/8`);\n dispatch({ type: 'SET_DEFAULT_PORTINGDATE', payload: res.data });\n } catch (error) {\n dispatch({\n type: 'SET_ERROR',\n payload: error,\n });\n }\n};\n\nexport const errorProducthub = (url, body) => async (dispatch) => {\n const checkPing = new Date();\n try {\n await axios.post(url + '/api/producthub/storenamesbyid', { storeIds: body });\n const end = new Date();\n dispatch({\n type: 'SET_ERROR_CHECK_PH',\n payload: [false, { status: 'Kjører', ping: end - checkPing }],\n });\n } catch (error) {\n console.log('Producthub:');\n const end = new Date();\n console.log(error);\n dispatch({\n type: 'SET_ERROR_CHECK_PH',\n payload: [true, { status: 'Feil', ping: end - checkPing }],\n });\n }\n};\n\nexport const errorOrdermodule = (url) => async (dispatch) => {\n const checkPing = new Date();\n try {\n await axios.get(url + '/api/AddedChanges/' + 0 + '/0');\n const end = new Date();\n dispatch({\n type: 'SET_ERROR_CHECK_ODM',\n payload: [false, { status: 'Kjører', ping: end - checkPing }],\n });\n } catch (error) {\n console.log('Ordermodule:');\n console.log(error);\n const end = new Date();\n dispatch({\n type: 'SET_ERROR_CHECK_ODM',\n payload: [true, { status: 'Feil', ping: end - checkPing }],\n });\n }\n};\n\nfunction sanitizeString(string) {\n if (string != null) {\n let sanitizedString = string.trim();\n sanitizedString.replace(/\\s\\s+/g, ' ');\n return sanitizedString;\n } else {\n return string;\n }\n}\n\nexport const sendExcelStatistics = (url, email, stats) => async (dispatch) => {\n const options = {\n headers: { Accept: 'application/json' },\n };\n const result = await axios.post(\n url,\n {\n email: email,\n saleStats: stats,\n },\n options,\n );\n return result.status;\n};\n\n/// Calls AddSaleStats endpoint, which calls on SendExcelStatistics\nexport const addSaleStatsQueue = (url, email, body) => async (dispatch) => {\n try {\n const options = {\n headers: { Accept: 'application/json' },\n };\n const result = await axios.post(\n `${url}/api/v1/Ironforge/AddSaleStatsQueue`,\n {\n email: email,\n saleStats: body,\n },\n options,\n );\n\n return result.status;\n } catch (error) {\n dispatch({ type: 'ERROR_EXCEL_EXPORT', bool: true });\n }\n};\n\nexport const getAccountAndEnergiKonto =\n (url, ssn, isBedrift, brand, isStorkunde = false) =>\n async (dispatch) => {\n try {\n const result = await axios.post(`${url}/api/v1/SendAfi/getAccountAndEnergiKonto`, {\n SsnOrOrgNr: ssn,\n IsBedrift: isBedrift,\n Brand: brand,\n });\n if (isStorkunde) {\n return result.data;\n } else {\n dispatch({ type: 'SET_ACCOUNT_IDS', payload: result.data });\n }\n console.log(result);\n } catch (error) {\n dispatch({\n type: 'SET_ERROR',\n payload: error,\n });\n }\n };\n\nexport const CreateImportStatistic =\n (url, importName, orderIds, sellerId, salesType) => async (dispatch) => {\n try {\n await axios.post(url + '/api/v1/Order/CreateImportStatistic', {\n importName: importName,\n orderIds: orderIds,\n sellerId: sellerId,\n salesType: salesType,\n });\n } catch (error) {\n console.log(error);\n }\n };\n\nexport const GetImportStatistics = (url, body) => async (dispatch) => {\n try {\n const res = await axios.post(url + '/api/v1/Ironforge/GetImportStatistics', body);\n return res;\n } catch (error) {\n console.log(error);\n }\n};\nexport const GetImportStatisticOrders = (url, importId) => async (dispatch) => {\n try {\n const res = await axios.get(url + '/api/v1/Ironforge/GetImportStatisticOrders/' + importId);\n return res.data;\n } catch (error) {\n console.log(error);\n }\n};\nexport const ValidateTobbMembershipNumber = (url, medlemsnummer) => async (dispatch) => {\n try {\n const res = await axios.get(`${url}/api/v1/Tobb/VerifyMembershipNumber/${medlemsnummer}`);\n return res.data;\n } catch (error) {\n console.log(error);\n }\n};\n","export const CHOSEN_DISTRIBUTION_METHOD = {\n sameAsBefore: 0,\n paper: 1,\n eInvoice: 2,\n email: 3,\n ehf: 4,\n electronic: 5,\n};\n\nexport function isCampaignProduct(addonProductId, addonProducts) {\n return (\n addonProducts && addonProducts.find((item) => item.id === addonProductId).availableCampaigns\n );\n}\n\nexport const getAdressesInSameAccount = (state) => {\n if (!state.activeDeliveryPoints) return null;\n let allAddresses = {};\n for (const residence of state.residence) {\n const selectedAccount = state.activeDeliveryPoints.find(\n (p) => p.reference === residence.malepunktID,\n );\n if (selectedAccount == null) {\n if (!allAddresses['Ingen EK']) allAddresses['Ingen EK'] = [];\n allAddresses['Ingen EK'].push(residence.address);\n continue;\n }\n if (!allAddresses[selectedAccount.energiKontoNummer]) {\n allAddresses[selectedAccount.energiKontoNummer] = state.activeDeliveryPoints\n .filter((p) => p.energiKontoNummer === selectedAccount.energiKontoNummer)\n .map((p) => p.address);\n }\n }\n return (\n \n {Object.keys(allAddresses).map(\n (a) =>\n allAddresses[a] && (\n
    \n {a}: {allAddresses[a].join(', ')}\n
    \n ),\n )}\n
    \n );\n};\n\nexport function getPingColor(ping) {\n let color;\n\n if (ping === 'N/A') {\n color = 'yellow';\n } else if (ping > 1500 && ping < 5000) {\n color = 'yellow';\n } else if (ping > 5000) {\n color = 'red';\n } else {\n color = 'green';\n }\n\n return color;\n}\n\nexport function extractBirthYear(personnummer) {\n // The first six digits of the personnummer represent the birth date in the format DDMMYY.\n // Split\n let pno = personnummer;\n let year = pno.substring(4, 6);\n let ind = pno.substring(6, 9);\n let yearno = Number(year);\n\n if (ind > 0 && ind < 500) {\n yearno += 1900;\n } else if (ind > 499 && ind < 750 && year > 55 && year < 100) {\n yearno += 1800;\n } else if (ind > 499 && ind < 999 && year >= 0 && year < 40) {\n yearno += 2000;\n } else if (ind > 899 && ind < 999 && year > 39 && year < 100) {\n yearno += 1900;\n } else {\n yearno += 1900;\n }\n\n return yearno;\n}\n\nexport const getStatusColor = (statusID) => {\n const red = [\n 300, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 414, 413, 416, 415, 417,\n 418, 419,\n ];\n const yellow = [101, 102, 301];\n if (red.includes(statusID)) return 'red';\n if (yellow.includes(statusID)) return 'yellow';\n return 'green';\n};\n\nexport const FormatOrgnameToLowerCase = (str) => {\n // Split the string into words\n const words = str.toLowerCase().split(/\\s+/);\n\n // Capitalize the first letter of each word\n const capitalizedWords = words.map((word, index) => {\n if (index === words.length - 1 && word === 'as') {\n return 'AS';\n } else {\n const firstLetter = word.charAt(0).toUpperCase();\n const restOfWord = word.slice(1);\n return firstLetter + restOfWord;\n }\n });\n\n return capitalizedWords.join(' ');\n};\n\nexport const getStatusMessage = (statusID) => {\n let status = '';\n\n switch (statusID) {\n case 0:\n status = 'Ready';\n break;\n\n case 100:\n status = 'InProgress';\n break;\n\n case 101:\n status = 'AwaitingCustomerApproval';\n break;\n\n case 102:\n status = 'AwaitingElhub';\n break;\n\n case 103:\n status = 'AwaitingPorting';\n break;\n\n case 200:\n status = 'Done';\n break;\n\n case 300:\n status = 'Cancelled';\n break;\n\n case 301:\n status = 'SendtToTm';\n break;\n\n case 400:\n status = 'UnknownError';\n break;\n\n case 401:\n status = 'CreditFailed';\n break;\n\n case 402:\n status = 'MDMFailed';\n break;\n\n case 403:\n status = 'CreateCustomerFailed';\n break;\n\n case 404:\n status = 'ElhubFailed';\n break;\n\n case 405:\n status = 'AfiFailed';\n break;\n\n case 406:\n status = 'BadCredit';\n break;\n\n case 407:\n status = 'CreateEnergiKontoFailed';\n break;\n\n case 408:\n status = 'SetStartDateFailed';\n break;\n\n case 409:\n status = 'VerifyPersonFailed';\n break;\n\n case 410:\n status = 'MissingMeterNumber';\n break;\n\n case 411:\n status = 'AfiTimeout';\n break;\n\n case 412:\n status = 'RejectedElhub';\n break;\n\n case 413:\n status = 'AfiSynchronizationError';\n break;\n\n case 414:\n status = 'CreateMobileUserFailed';\n break;\n\n case 415:\n status = 'SignUpPortingFailed';\n break;\n\n case 416:\n status = 'SignUpNewMobileNumberFailed';\n break;\n\n case 417:\n status = 'ReserveNewMobileNumberFailed';\n break;\n\n case 418:\n status = 'GetDefaultPortDateFailed';\n break;\n\n case 419:\n status = 'VerifySSNFailed';\n break;\n\n case 600:\n status = 'TestSale';\n break;\n\n case 701:\n status = 'AfiDistrubutionChangeFailed';\n break;\n\n default:\n status = 'Code not found';\n }\n\n return status;\n};\n\nexport const calcWorkingDays = (fromDate, days) => {\n let count = 0;\n while (count < days) {\n fromDate.setDate(fromDate.getDate() + 1);\n if (fromDate.getDay() !== 0 && fromDate.getDay() !== 6 && !isHoliday(fromDate))\n // Skip weekends & holidays\n count++;\n }\n return fromDate;\n};\n\nexport const isHoliday = (date) => {\n const dayOfEaster = getDateOfEaster(date.getFullYear());\n\n if (date.getDate() === 1 && date.getMonth() === 0) return true; // 1. nyttårsdag\n\n if (date.getDate() === 1 && date.getMonth() === 4) return true; // 1. mai\n\n if (date.getDate() === 17 && date.getMonth() === 4) return true; // 17. mai\n\n if (date.getDate() === 24 && date.getMonth() === 11) return true; // Julaften\n\n if (date.getDate() === 25 && date.getMonth() === 11) return true; // 1. juledag\n\n if (date.getDate() === 26 && date.getMonth() === 11) return true; // 2. juledag\n\n if (getDayOfYear(date) === getDayOfYear(dayOfEaster) - 3) return true; // Skjærtorsdag\n\n if (getDayOfYear(date) === getDayOfYear(dayOfEaster) - 2) return true; // Langfredag\n\n if (getDayOfYear(date) === getDayOfYear(dayOfEaster) + 1) return true; // 2. påskedag\n\n if (getDayOfYear(date) === getDayOfYear(dayOfEaster) + 39) return true; // Kristi himmelfartsdag\n\n if (getDayOfYear(date) === getDayOfYear(dayOfEaster) + 49) return true; // 1. pinsedag\n\n return false;\n};\n\nexport const getDateOfEaster = (year) => {\n const a = year % 19;\n const b = Math.floor(year / 100);\n const c = year % 100;\n const d = Math.floor(b / 4);\n const e = b % 4;\n const f = Math.floor((b + 8) / 25);\n const g = Math.floor((b - f + 1) / 3);\n const h = (19 * a + b - d - g + 15) % 30;\n const i = Math.floor(c / 4);\n const k = c % 4;\n const l = (32 + 2 * e + 2 * i - h - k) % 7;\n const m = Math.floor((a + 11 * h + 22 * l) / 451);\n const n = Math.floor((h + l - 7 * m + 114) / 31);\n const p = ((h + l - 7 * m + 114) % 31) + 1;\n\n return new Date(year, n - 1, p);\n};\n\nexport const getDayOfYear = (date) => {\n const now = date || new Date();\n const start = new Date(now.getFullYear(), 0, 0);\n const diff = now - start;\n const oneDay = 1000 * 60 * 60 * 24;\n const day = Math.floor(diff / oneDay);\n\n return day;\n};\nexport const calculatePrices = (item = null, monthly, denomination, no4 = null) => {\n let price =\n item.priceInfoElCert !== null &&\n item.priceInfoElCert !== undefined &&\n item.priceInfoElCert.find((p) => {\n if (monthly) {\n return p.name.includes('Månedlig');\n } else {\n return p.name.includes('Påslag strøm') || p.name.includes('Strømpris');\n }\n });\n if (price) {\n if (denomination) {\n return price.denomination;\n } else {\n return no4 ? price?.vatExclusivePrice : price.vatInclusivePrice;\n }\n } else {\n return 0;\n }\n};\n","import { useEffect, useState } from 'react';\nimport Paper from '@mui/material/Paper';\nimport Input from './Input';\nimport Grid from '@mui/material/Grid';\nimport { useSelector } from 'react-redux';\n//import { getCreditConfirmation, getCreditConfirmationMobile } from '../../Redux/ApiCalls';\nimport { useDispatch } from 'react-redux';\nimport Divider from '@mui/material/Divider';\nimport environment from '../../environment';\nimport Checkbox from '@mui/material/Checkbox';\nimport FormGroup from '@mui/material/FormGroup';\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport '../../Stylesheets/PersonalInformation/PersonalInformation.css';\nimport identityServerStore from '../../IdentityServer/store/index';\nimport InputPostBox from './InputPostBox';\nimport Box from '@mui/material/Box';\nimport { Typography } from '@mui/material';\nimport { getSiteList, getAccountAndEnergiKonto } from '../../Redux/ApiCalls';\nimport Button from '@mui/material/Button';\n//import CreditCheck from './CreditCheck';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport moment from 'moment';\nimport Alert from '@mui/material/Alert';\nimport { extractBirthYear } from '../../utils/helperFunctions';\n\nfunction PersonalInformation() {\n const state = useSelector((state) => state.reducer);\n const dispatch = useDispatch();\n const search = sessionStorage.getItem('search') ?? '';\n const name = search\n ? new URLSearchParams(search).get('name') === null\n ? state.name\n : new URLSearchParams(search).get('name').replace(/\\s\\s+/g, ' ')\n : state.name;\n const ssn = search ? new URLSearchParams(search).get('ssn') : state.ssn;\n const phone = search ? new URLSearchParams(search).get('phone') : state.phone;\n const email = search ? new URLSearchParams(search).get('email') : state.email;\n const otherEmailRecipient = search\n ? new URLSearchParams(search).get('otherEmailRecipient')\n : state.otherEmailRecipient;\n const invoiceAddress = state.invoiceAddress;\n const invoicePostCode = state.invoicePostCode;\n const contactPerson = state.contactPerson;\n const isBedrift = environment.isBedrift === 'true';\n const [overrideCredit, setOverrideCredit] = useState(false);\n const [overrideAccept, setOverrideAccept] = useState(false);\n const [overrideFreeze, setOverrideFreeze] = useState(false);\n const [emailCheckBoxChecked, setEmailCheckBoxChecked] = useState(state?.noEmail || false);\n\n // useEffect(() => {\n // if (state.ssn && state.phone && !isBedrift) {\n // dispatch(getCreditConfirmation(state.creditUrl, state.ssn, state.phone, state.brand, isBedrift))\n // dispatch(getCreditConfirmationMobile(state.creditUrl, state.ssn, state.phone, state.brand))\n // }\n // // eslint-disable-next-line\n // }, [state.ssn, state.phone, isBedrift]);\n\n //Checking for customers that are too young too order\n useEffect(() => {\n if (state.ssn?.length === 11 && !isBedrift) {\n let day = state.ssn.substring(0, 2);\n if (parseInt(state.ssn.substring(0, 2)) > 31) {\n //Check for D-number\n day = (parseInt(state.ssn.substring(0, 2)) - 40).toString();\n if (day.length === 1) day = '0' + day;\n }\n\n let year = extractBirthYear(state.ssn);\n\n let eighteenYearsAgo = moment().subtract(18, 'years');\n let stringAge = day + state.ssn.substring(2, 4) + year;\n let formattedValue = moment(stringAge, 'DDMMYYYY');\n dispatch({\n type: 'SET_IS_TOO_YOUNG_TO_ORDER',\n bool: moment(formattedValue).isAfter(eighteenYearsAgo),\n });\n }\n // eslint-disable-next-line\n }, [state.ssn, isBedrift]);\n\n // const handleCreditCheck = () => {\n // state.ssn &&\n // dispatch(getCreditConfirmation(state.creditUrl, state.ssn, state.phone, state.brand, isBedrift))\n // }\n\n const handleOverrideCredit = () => {\n setOverrideCredit(!overrideCredit);\n dispatch({ type: 'SET_OVERRIDE_CREDIT', bool: !overrideCredit });\n };\n\n const handleOverrideAccept = () => {\n setOverrideAccept(!overrideAccept);\n dispatch({ type: 'SET_OVERRIDE_ACCEPT', bool: !overrideAccept });\n };\n\n const handleOverrideFreeze = () => {\n setOverrideFreeze(!overrideFreeze);\n dispatch({ type: 'SET_OVERRIDE_FREEZE', bool: !overrideFreeze });\n };\n\n const manualSearch = () => {\n if (state.ssn && state.ssn.toString().length === 11) {\n //person\n let firstName = state.name ? state.name.trim().split(' ').slice(0, -1).join(' ') : null;\n let lastName = state.name ? state.name.trim().split(' ').slice(-1).join(' ') : null;\n dispatch(getSiteList(state.conductorUrl, state.ssn, false, firstName, lastName, null, null));\n }\n };\n\n const manualSearchBedrift = () => {\n if (isBedrift && state.ssn && state.ssn.toString().length === 9) {\n dispatch(getSiteList(state.conductorUrl, state.ssn, true, null, null, null, null));\n dispatch(getAccountAndEnergiKonto(state.sendAfiUrl, state.ssn, isBedrift, state.brand));\n }\n };\n\n const invoiceSearch = () => {\n dispatch(\n getSiteList(\n state.conductorUrl,\n state.ssn,\n true,\n null,\n null,\n state.invoiceAddress,\n state.invoicePostCode,\n ),\n );\n };\n\n const handleCheckboxChange = (e) => {\n if (!isBedrift) {\n setEmailCheckBoxChecked(e.target.checked);\n //console.log(e.target.checked)\n dispatch({ type: 'SET_NO_EMAIL', bool: e.target.checked });\n }\n };\n\n return (\n :not(style)': { m: 1, width: 128, height: 128 },\n }}\n >\n \n \n {environment.isBedrift === 'true' ? 'Bedriftsinformasjon' : 'Personinformasjon'}\n \n \n \n \n \n \n {/* {(isBedrift && state.creditCheck === null) &&\n <>\n {state.creditCheckLoading ?\n \n :\n \n }\n \n }\n */}\n\n {((isBedrift && Array.isArray(identityServerStore.getState().auth.user.profile.store)\n ? identityServerStore.getState().auth.user.profile.store.includes('367')\n : identityServerStore.getState().auth.user.profile.store === '367') ||\n (isBedrift &&\n Array.isArray(identityServerStore.getState().auth.user.profile.storeleader)\n ? identityServerStore.getState().auth.user.profile.storeleader.includes('367')\n : identityServerStore.getState().auth.user.profile.storeleader === '367') ||\n (isBedrift &&\n Array.isArray(identityServerStore.getState().auth.user.profile.storeleader)\n ? identityServerStore.getState().auth.user.profile.storeleader.includes('59')\n : identityServerStore.getState().auth.user.profile.storeleader === '59') ||\n (isBedrift &&\n Array.isArray(identityServerStore.getState().auth.user.profile.storeleader)\n ? identityServerStore.getState().auth.user.profile.storeleader.includes('59')\n : identityServerStore.getState().auth.user.profile.storeleader === '60') ||\n (identityServerStore.getState().auth.user.profile.role &&\n identityServerStore\n .getState()\n .auth.user.profile.role.includes('ironforge:can_override_creditcheck'))) && (\n
    \n \n \n }\n label=\"Overstyr kreditt\"\n />\n \n
    \n )}\n {((isBedrift && Array.isArray(identityServerStore.getState().auth.user.profile.store)\n ? identityServerStore.getState().auth.user.profile.store.includes('367')\n : identityServerStore.getState().auth.user.profile.store === '367') ||\n (isBedrift &&\n Array.isArray(identityServerStore.getState().auth.user.profile.storeleader)\n ? identityServerStore.getState().auth.user.profile.storeleader.includes('367')\n : identityServerStore.getState().auth.user.profile.storeleader === '367') ||\n (identityServerStore.getState().auth.user.profile.role &&\n identityServerStore\n .getState()\n .auth.user.profile.role.includes('ironforge:can_override_accept'))) && (\n
    \n \n \n }\n label=\"Overstyr aksept\"\n />\n \n
    \n )}\n {((!isBedrift &&\n (Array.isArray(identityServerStore.getState().auth.user.profile.store)\n ? identityServerStore.getState().auth.user.profile.store.includes('125')\n : identityServerStore.getState().auth.user.profile.store === '125')) ||\n (!isBedrift &&\n (Array.isArray(identityServerStore.getState().auth.user.profile.storeleader)\n ? identityServerStore.getState().auth.user.profile.storeleader.includes('125')\n : identityServerStore.getState().auth.user.profile.storeleader === '125')) ||\n (identityServerStore.getState().auth.user.profile.role &&\n identityServerStore\n .getState()\n .auth.user.profile.role.includes('ironforge:can_override_freeze'))) && (\n
    \n \n \n }\n label=\"Overstyr nedkjøling\"\n />\n \n
    \n )}\n
    \n
    \n\n \n \n \n {isBedrift && (\n <>\n {state.siteLoading ? (\n \n ) : (\n \n Søk\n \n )}\n \n )}\n \n {isBedrift && (\n \n \n \n )}\n \n \n \n \n \n \n {!isBedrift && (\n \n \n \n }\n label=\"Har ikke e-post\"\n />\n \n \n )}\n {isBedrift && (\n \n \n \n )}\n \n {state.isTooYoungToOrder && (\n \n Personen er for ung til å bestille\n \n )}\n {!isBedrift && state.hitFolkeRegister === false && (\n <>\n \n *Ikke treff i folkeregisteret på kombinasjonen navn og personnummer\n \n \n \n )}\n \n

    Fakturainformasjon

    \n \n \n \n \n \n \n \n \n {isBedrift &&\n !state.siteLoading &&\n state.ssn &&\n state.invoiceAddress &&\n state.invoicePostCode?.length === 4 && (\n \n Søk på fakturaadresse\n \n )}\n \n \n {isBedrift && (\n
    \n \n
    \n )}\n
    \n \n );\n}\n\nexport default PersonalInformation;\n","import { useEffect, useState } from 'react';\nimport '../../Stylesheets/PersonalInformation/Input.css';\nimport InputBase from '@mui/material/InputBase';\nimport { useDispatch } from 'react-redux';\nimport { getPostArea } from '../../Redux/ApiCalls';\n\nfunction AddResidenceInput({ label, placeholder, type, setZipCode, initialValue }) {\n const dispatch = useDispatch();\n const [value, setValue] = useState(initialValue ? initialValue : '');\n\n const handleChange = (e) => {\n if (\n type === 'addResidenceZipCode' ||\n type === 'addResidenceMeterNumber' ||\n type === 'addResidenceMeterPointId'\n )\n e.target.value = e.target.value.split(' ').join(''); // Remove spaces so they don't prevent users from pasting a number with accidental whitespace\n\n if (type === 'addResidenceZipCode' && !e.target.value.match('^[0-9]{0,4}$')) {\n return;\n } else if (type === 'addResidenceMeterNumber' && !e.target.value.match('^[0-9]*$')) {\n return;\n } else if (type === 'addResidenceMeterPointId' && !e.target.value.match('^[0-9]*$')) {\n return;\n }\n setValue(e.target.value);\n checkDispatch(e.target.value);\n };\n\n const checkDispatch = (value) => {\n if (type === 'addResidenceAddress') {\n dispatch({ type: 'SET_ADD_RESIDENCE', address: value });\n } else if (type === 'addResidenceZipCode' && value.toString().length === 4) {\n dispatch({ type: 'SET_ADD_RESIDENCE', zipCode: value });\n dispatch(getPostArea(value));\n setZipCode(true);\n } else if (type === 'addResidenceZipCode') {\n dispatch({ type: 'SET_ADD_RESIDENCE', zipCode: value });\n setZipCode(false);\n } else if (type === 'addResidenceMeterNumber') {\n dispatch({ type: 'SET_ADD_RESIDENCE', meterNumber: value });\n } else if (type === 'addResidenceMeterPointId') {\n dispatch({ type: 'SET_ADD_RESIDENCE', meterPointId: value });\n }\n };\n\n useEffect(() => {\n if (initialValue) {\n if (type === 'addResidenceAddress') {\n dispatch({ type: 'SET_ADD_RESIDENCE', address: value });\n } else if (type === 'addResidenceZipCode' && value.toString().length === 4) {\n dispatch({ type: 'SET_ADD_RESIDENCE', zipCode: value });\n dispatch(getPostArea(value));\n setZipCode(true);\n }\n }\n // eslint-disable-next-line\n }, []);\n\n return (\n
    \n
    {label}
    \n \n
    \n );\n}\n\nexport default AddResidenceInput;\n","import Grid from '@mui/material/Grid';\nimport React from 'react';\nimport { useSelector } from 'react-redux';\nimport { useDispatch } from 'react-redux';\n\nfunction AddResidenceResult({\n handleClose,\n currentAddress,\n currentIndex,\n currentlyManuallyAdded,\n verifyElhub,\n}) {\n const state = useSelector((state) => state.reducer);\n const dispatch = useDispatch();\n\n const addNewResidence = (item, index) => {\n dispatch({\n type: 'ADD_TO_MANUALLY_ADDED_SITES',\n newItem: {\n address:\n item.addressV1.streetName +\n (item.addressV1.buildingNumber ? ' ' + item.addressV1.buildingNumber : '') +\n (item.addressV1.buildingLetter ? item.addressV1.buildingLetter : ''),\n zipCode: item.addressV1.zipCode,\n postArea: item.addressV1.city,\n meterNumber: item.meterIdentification,\n meterPointId: item.meteringPointIdentification,\n manuallyAdded: true,\n elhubHit: true,\n },\n });\n dispatch({ type: 'SET_ONYX_RESPONSE', onyxResponse: false });\n handleClose();\n };\n\n const addNewResidenceWithoutMeterNumber = () => {\n dispatch({\n type: 'ADD_TO_MANUALLY_ADDED_SITES',\n newItem: {\n address: state.addResidence && state.addResidence.address,\n zipCode: state.addResidence && state.addResidence.zipCode,\n postArea: state.addResidence && state.addResidence.postArea,\n meterNumber: null,\n meterPointId: null,\n manuallyAdded: true,\n },\n });\n dispatch({ type: 'SET_ONYX_RESPONSE', onyxResponse: false });\n handleClose();\n };\n\n const updateSite = (item, index) => {\n dispatch({\n type: 'UPDATE_SITE',\n newItem: {\n address: state.addResidence && state.addResidence.address,\n meterNumber: item.meterIdentification,\n meterPointId: item.meteringPointIdentification,\n index: currentIndex,\n manuallyAdded: currentlyManuallyAdded,\n elhubHit: true,\n elhubDataCore: item,\n },\n });\n dispatch({ type: 'SET_ONYX_RESPONSE', onyxResponse: false });\n handleClose();\n };\n\n const updateSiteWithoutOnyx = () => {\n dispatch({\n type: 'UPDATE_SITE',\n newItem: {\n address: state.addResidence && state.addResidence.address,\n meterNumber: state.addResidence && state.addResidence.meterNumber,\n meterPointId: state.addResidence && state.addResidence.meterPointId,\n index: currentIndex,\n manuallyAdded: currentlyManuallyAdded,\n },\n });\n dispatch({ type: 'SET_ONYX_RESPONSE', onyxResponse: false });\n handleClose();\n };\n\n return state.onyxResult &&\n state.onyxResult.length !== 0 &&\n state.onyxResult[0] !== undefined &&\n !state.onyxError ? (\n \n \n \n

    Resultater fra elhub:

    \n
    \n
    \n {state.onyxResult.map((item, index) => (\n <>\n \n \n
    \n {item && (\n <>\n

    \n {item.addressV1.streetName}{' '}\n {item.addressV1.buildingNumber != null && item.addressV1.buildingNumber}{' '}\n {item.addressV1.buildingLetter != null && item.addressV1.buildingLetter}\n

    \n

    \n {item.addressV1 && item.addressV1.zipCode}{' '}\n {item.addressV1 && item.addressV1.city}\n

    \n

    Målernr: {item.meterIdentification}

    \n \n )}\n
    \n
    \n
    \n \n \n {currentAddress ? (\n updateSite(item, index)}\n >\n Oppdater boligen\n \n ) : (\n addNewResidence(item, index)}\n >\n Legg til boligen\n \n )}\n \n \n \n ))}\n
    \n ) : verifyElhub ? (\n \n \n

    Vi fant ingen strømmåler som passer søket.

    \n
    \n
    \n ) : (\n \n \n \n

    Vi fant ingen strømmåler som passer søket.

    \n {currentAddress ? (\n

    Ønsker du å legge til manuelt angitt målernummer?

    \n ) : (\n

    Ønsker du å legge til boligen uten målernummer?

    \n )}\n
    \n
    \n \n \n
    \n {currentAddress ? (\n
    \n

    Målernummer: {state.addResidence && state.addResidence.meterNumber}

    \n

    \n Målepunkt ID: {state.addResidence && state.addResidence.meterPointId}\n

    \n

    \n
    \n ) : (\n
    \n

    {state.addResidence && state.addResidence.address}

    \n

    \n {state.addResidence && state.addResidence.zipCode}{' '}\n {state.addResidence && state.addResidence.postArea}\n

    \n

    \n
    \n )}\n
    \n
    \n
    \n \n \n {currentAddress ? (\n \n Legg til manuelt angitt målernummer\n \n ) : (\n \n Legg til boligen uten målernummer\n \n )}\n \n \n
    \n );\n}\n\nexport default AddResidenceResult;\n","import React, { useState } from 'react';\nimport Dialog from '@mui/material/Dialog';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport CloseIcon from '@mui/icons-material/Close';\nimport '../../Stylesheets/CustomerResidences/AddResidence.css';\nimport Grid from '@mui/material/Grid';\nimport { useSelector } from 'react-redux';\nimport { useDispatch } from 'react-redux';\nimport AddResidenceInput from './AddResidenceInput';\nimport { findResidence, verifyElhubApiCall } from '../../Redux/ApiCalls';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport AddResidenceResult from './AddResidenceResult';\nimport ArrowBackIcon from '@mui/icons-material/ArrowBack';\nimport environment from '../../environment';\n\nfunction AddResidence({\n open,\n handleClose,\n currentAddress,\n currentZipCode,\n currentIndex,\n currentlyManuallyAdded,\n currentMeterNumber,\n verifyElhub,\n}) {\n const state = useSelector((state) => state.reducer);\n const [zipCode, setZipCode] = useState(false);\n const dispatch = useDispatch();\n let address = verifyElhub ? currentAddress : state.addResidence && state.addResidence.address;\n let matches = address && address.match(/(\\d+)/);\n let buildingNumber = matches && address.substring(matches.index);\n let streetName = matches && address.substring(0, matches.index);\n const isBedrift = environment.isBedrift === 'true';\n\n const handleFindResidence = () => {\n dispatch(\n findResidence(\n state.orderModuleApiUrl,\n state.ssn,\n state.addResidence,\n streetName != null ? streetName : state.addResidence?.address,\n buildingNumber,\n currentMeterNumber,\n null,\n ),\n );\n };\n\n const handleVerifyElhub = () => {\n dispatch(\n verifyElhubApiCall(\n state.orderModuleApiUrl,\n state.ssn,\n state.addResidence,\n streetName != null ? streetName : currentAddress,\n buildingNumber,\n currentMeterNumber,\n currentZipCode,\n ),\n );\n };\n\n const goBack = () => {\n dispatch({ type: 'SET_ONYX_RESPONSE', onyxResponse: false });\n };\n\n return (\n \n \n \n \n {state.onyxResponse ? (\n \n \n \n \n \n

    \n Tilbake til søk\n

    \n
    \n
    \n ) : (\n

    \n {verifyElhub\n ? 'Verifiser mot elhub'\n : currentAddress\n ? 'Legg til målernummer'\n : isBedrift\n ? 'Legg til anlegg'\n : 'Legg til bolig'}\n

    \n )}\n
    \n
    \n \n \n \n
    \n \n {state.addResidenceLoading ? (\n
    \n \n
    \n ) : state.onyxResponse || state.onyxError ? (\n \n ) : verifyElhub ? (\n \n \n \n \n Verifiser mot elhub\n \n \n \n \n ) : (\n \n \n \n \n \n \n \n \n \n \n \n {zipCode && state.addResidence.postArea &&

    {state.addResidence.postArea}

    }\n
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n Søk etter strømmåler\n \n \n \n
    \n )}\n
    \n \n );\n}\n\nexport default AddResidence;\n","import { useEffect, useState } from 'react';\nimport Paper from '@mui/material/Paper';\nimport '../../Stylesheets/CustomerResidences/CustomerResidences.css';\nimport Grid from '@mui/material/Grid';\nimport { useSelector } from 'react-redux';\nimport { useDispatch } from 'react-redux';\nimport {\n getEInvoiceReference,\n getSiteList,\n getAccountAndEnergiKonto,\n getInvoiceAddress,\n} from '../../Redux/ApiCalls';\nimport AddResidence from './AddResidence';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport environment from '../../environment';\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport Table from '@mui/material/Table';\nimport TableBody from '@mui/material/TableBody';\nimport TableCell from '@mui/material/TableCell';\nimport TableContainer from '@mui/material/TableContainer';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport CheckIcon from '@mui/icons-material/Check';\nimport Button from '@mui/material/Button';\n\nfunction CustomerResidences() {\n const state = useSelector((state) => state.reducer);\n const dispatch = useDispatch();\n const [open, setOpen] = useState(false);\n const [currentAddress, setCurrentAddress] = useState();\n const [currentZipCode, setCurrentZipCode] = useState();\n const [currentIndex, setCurrentIndex] = useState();\n const [currentlyManuallyAdded, setCurrentlyManuallyAdded] = useState();\n const [currentMeterNumber, setCurrentMeterNumber] = useState();\n const [verifyElhub, setVerifyElhub] = useState();\n const isBedrift = environment.isBedrift === 'true';\n\n const handleClickOpen = () => {\n setOpen(true);\n };\n\n const handleClose = () => {\n setCurrentAddress(null);\n setCurrentZipCode(null);\n setCurrentIndex(null);\n setCurrentlyManuallyAdded(null);\n setCurrentMeterNumber(null);\n setVerifyElhub(false);\n setOpen(false);\n };\n\n useEffect(() => {\n if (isBedrift && state.ssn && state.ssn.toString().length === 9) {\n //bedrift\n //Gets the invoice address, invoice zip code and name automatically\n dispatch(getInvoiceAddress(state.conductorUrl, state.ssn));\n } else if (state.ssn && state.ssn.toString().length === 11) {\n //person\n let firstName = state.name ? state.name.trim().split(' ').slice(0, 1).join(' ') : null;\n let lastName = state.name ? state.name.trim().split(' ').slice(-1).join(' ') : null;\n dispatch(getSiteList(state.conductorUrl, state.ssn, false, firstName, lastName, null, null));\n dispatch(getAccountAndEnergiKonto(state.sendAfiUrl, state.ssn, isBedrift, state.brand));\n dispatch(\n getEInvoiceReference(\n state.orderModuleApiUrl,\n state.ssn,\n (state.brand = 'FKAS' ? 'FK' : 'TK'),\n ),\n );\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [state.ssn]);\n\n const openAddMeterNumber = (item, index) => {\n setCurrentAddress(item.address);\n setCurrentZipCode(item.zipCode);\n setCurrentMeterNumber(null);\n setVerifyElhub(false);\n setCurrentIndex(index);\n setCurrentlyManuallyAdded(item.manuallyAdded);\n handleClickOpen();\n };\n\n const handleVerifyElhub = (item, index) => {\n setCurrentAddress(item.address);\n setCurrentZipCode(item.zipCode);\n setCurrentMeterNumber(item.meterNumber);\n setVerifyElhub(true);\n setCurrentIndex(index);\n setCurrentlyManuallyAdded(item.manuallyAdded);\n handleClickOpen();\n };\n\n return (\n :not(style)': { m: 1, width: 128, height: 128 },\n }}\n >\n \n
    \n \n \n \n {isBedrift ? 'Kundens anlegg' : 'Kundens strømavtaler'}\n \n \n \n \n \n \n
    \n \n \n \n \n Addresse\n Postnr/poststed\n Målernummer\n MålepunktId\n Aktiv måler\n {!isBedrift && Treff i folkeregister}\n Treff i elhub\n Ordrestatus\n \n \n \n {state.siteList &&\n state.siteList.concat(state.manuallyAddedSites).map(\n (item, index) =>\n item &&\n item.address !== null &&\n item.address !== '' && (\n \n \n {item.address}\n \n \n {item.zipCode} {item.postArea}\n \n \n {item.meterNumber === null || item.meterNumber === '' ? (\n openAddMeterNumber(item, index)}\n >\n Søk mot elhub\n \n ) : (\n item.meterNumber\n )}\n \n {item.meterPointId}\n \n {item.activeOnBrand === 'Trondelagkraft'\n ? 'TrøndelagKraft'\n : item.activeOnBrand}\n \n {!isBedrift && (\n \n {item.foundInPublicRegistry && (\n \n )}\n \n )}\n \n {item.elhubHit ? (\n \n ) : state.ssn && item.meterNumber ? (\n handleVerifyElhub(item, index)}\n >\n Verifiser mot elhub\n \n ) : (\n item.elhubHit\n )}\n \n \n {item.orderStatus === 'null' ? '' : item.orderStatus}\n \n \n ),\n )}\n \n
    \n
    \n {state.manuallyAddedSites.length > 0 && (\n \n Anlegg manuelt lagt til\n \n )}\n
    \n\n {state.siteLoading && (\n \n \n Leter etter adresser\n \n )}\n
    \n
    \n \n \n );\n}\n\nexport default CustomerResidences;\n","import { Paper, Box } from '@mui/material';\nimport '../../Stylesheets/CustomerResidences/ResidenceContainer.css';\nimport Typography from '@mui/material/Typography';\nimport Grid from '@mui/material/Grid';\nimport DeleteIcon from '@mui/icons-material/Delete';\nimport { useDispatch } from 'react-redux';\n\nfunction OtherProductsContainer({ product, index }) {\n const dispatch = useDispatch();\n\n const deleteFromMobileUsers = () => {\n dispatch({ type: 'DELETE_MOBILE_USER', index });\n };\n\n return (\n \n \n {product && (\n <>\n {`${product.firstName} ${product.lastName} (${product.header})`}\n deleteFromMobileUsers(index)}\n />\n \n \n Fødselsdato\n \n {product.birthDate}\n \n \n \n Tlf\n \n {product.newNumber ? 'Ønsker nytt nummer' : product.phoneNumber}\n \n \n \n Email\n \n {product.email}\n \n \n {product.ratePlanName && (\n \n Produkt\n \n {product.ratePlanName}\n \n \n )}\n {product.serviceStatus && (\n \n Status\n \n {product.serviceStatus}\n \n \n )}\n \n \n )}\n \n \n );\n}\n\nexport default OtherProductsContainer;\n","import Button from '@mui/material/Button';\nimport Dialog from '@mui/material/Dialog';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogActions from '@mui/material/DialogActions';\nimport IconButton from '@mui/material/IconButton';\nimport CloseIcon from '@mui/icons-material/Close';\nimport { useEffect, useState } from 'react';\nimport TextField from '@mui/material/TextField';\nimport Box from '@mui/material/Box';\nimport '../../Stylesheets/AddMobileProducts/Users.css';\nimport { Divider } from '@mui/material';\nimport 'react-datepicker/dist/react-datepicker.css';\nimport { useDispatch } from 'react-redux';\nimport FormGroup from '@mui/material/FormGroup';\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport Checkbox from '@mui/material/Checkbox';\nimport Grid from '@mui/material/Grid';\nimport { getBirthDateFromSSN } from '../../utils/Methods';\nimport { useSelector } from 'react-redux';\n\nexport default function CustomizedDialogs({ open, setOpen }) {\n const dispatch = useDispatch();\n const state = useSelector((state) => state.reducer);\n const [user, setUser] = useState({\n name: '',\n birthDate: '',\n email: '',\n phoneNumber: '',\n firstName: '',\n lastName: '',\n header: 'Bruker',\n newNumber: false,\n isOwner: false,\n });\n const birthDateRegex = /^\\d\\d.\\d\\d.\\d\\d\\d\\d$/;\n const phoneRegex = /^[0-9]{8}$/;\n const emailRegex =\n /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n const [userValidated, setUserValidated] = useState(false);\n const [checked, setChecked] = useState(false);\n\n const handleUserChange = (event) => {\n if (event.target.name === 'phoneNumber' && event.target.value.length > 8) {\n return;\n } else if (\n event.target.name === 'birthDate' &&\n (event.target.value.length === 2 || event.target.value.length === 5) &&\n event.target.value < event.target.defaultValue\n ) {\n setUser({ ...user, [event.target.name]: event.target.value });\n } else if (\n event.target.name === 'birthDate' &&\n (event.target.value.length === 2 || event.target.value.length === 5)\n ) {\n setUser({ ...user, [event.target.name]: event.target.value.toString() + '.' });\n } else if (event.target.name === 'birthDate' && event.target.value.length > 10) {\n return;\n } else {\n setUser({ ...user, [event.target.name]: event.target.value });\n }\n };\n\n const addUser = () => {\n if (userValidated) {\n user.firstName = user.name !== null ? user.name.split(' ')[0].trim() : '';\n user.lastName = user.name.split(' ').slice(1).join(' ').trim();\n dispatch({ type: 'ADD_TO_MOBILE_USERS', mobileUser: user });\n setUser({\n name: '',\n birthDate: '',\n email: '',\n phoneNumber: '',\n firstName: '',\n lastName: '',\n header: 'Bruker',\n newNumber: false,\n isOwner: false,\n });\n setOpen(false);\n }\n };\n\n const setUserSameAsOwner = () => {\n setChecked(!checked);\n if (!checked) {\n setUser({\n name: state.name !== null ? state.name : user.firstName,\n birthDate: state.ssn !== null ? getBirthDateFromSSN(state.ssn) : user.birthDate,\n email: state.email !== null ? state.email : user.email,\n newNumber: false,\n phoneNumber: state.phone !== null ? state.phone : user.phoneNumber,\n isOwner: true,\n header: 'Abonnementseier',\n });\n } else {\n setUser({\n name: '',\n birthDate: '',\n email: '',\n phoneNumber: '',\n newNumber: false,\n isOwner: false,\n header: 'Bruker',\n });\n }\n };\n\n useEffect(() => {\n if (\n user.name.length > 0 &&\n user.birthDate.length === 10 &&\n birthDateRegex.test(user.birthDate) &&\n (emailRegex.test(user.email.trim()) || user.email === '' || user.email === null) &&\n (user.newNumber === true || phoneRegex.test(user.phoneNumber))\n ) {\n setUserValidated(true);\n } else {\n setUserValidated(false);\n }\n //eslint-disable-next-line\n }, [user]);\n\n return (\n
    \n setOpen(false)} aria-labelledby=\"customized-dialog-title\" open={open}>\n \n Legg til bruker\n setOpen(false)}\n sx={{\n position: 'absolute',\n right: 8,\n top: 8,\n color: (theme) => theme.palette.grey[500],\n }}\n >\n \n \n \n \n \n \n \n \n \n }\n label=\"Samme som eier av abonnement\"\n />\n 0}\n placeholder=\"Ola Nordmann\"\n />\n \n \n {user.newNumber === false && (\n \n )}\n \n \n \n setUser({ ...user, newNumber: false })}\n />\n }\n label=\"Bruk eksisterende nummer\"\n />\n setUser({ ...user, newNumber: true })}\n />\n }\n label=\"Opprett nytt nummer (99,-)\"\n />\n \n \n \n \n \n \n \n \n \n \n
    \n );\n}\n","import { useEffect, useState } from 'react';\nimport Paper from '@mui/material/Paper';\nimport { useSelector } from 'react-redux';\nimport { useDispatch } from 'react-redux';\n//import { getErateAccount, getErateAccountInfo } from '../../Redux/ApiCalls'; //Remove when no longer needed\nimport Grid from '@mui/material/Grid';\nimport Box from '@mui/material/Box';\n//import environment from '../../environment';\nimport OtherProductsContainer from './OtherProductsContainer';\nimport '../../Stylesheets/CustomerResidences/CustomerResidences.css';\nimport Typography from '@mui/material/Typography';\nimport { getBirthDateFromSSN } from '../../utils/Methods';\nimport AddUser from '../AddMobileProducts/AddUser';\n\nfunction CurrentProducts() {\n const state = useSelector((state) => state.reducer);\n const dispatch = useDispatch();\n //const customerDetail = state.mdmInfo && state.mdmInfo.item[0].mdM_API.customeR_DETAIL.item;\n const owner = {\n firstName: state.name ? (state.name !== null ? state.name.split(' ')[0].trim() : '') : '',\n lastName: state.name ? state.name.split(' ').slice(1).join(' ').trim() : '',\n header: 'Abonnementseier',\n phoneNumber: state.phone,\n email: state.email,\n birthDate: state.ssn && state.ssn.length === 11 ? getBirthDateFromSSN(state.ssn) : '',\n newNumber: false,\n };\n const [openAddUser, setOpenAddUser] = useState(false);\n\n // TODO: sparkle\n /*useEffect(() => {\n if (state.ssn) {\n state.mdmInfo && customerDetail.map((item) => (\n dispatch(getProductsByRefId(state.sendAfiUrl, item.reF_ID))\n ))\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [state.mdmInfo]);*/\n\n /*useEffect(() => {\n useEffect(() => {\n if (state.ssn) {\n dispatch(getErateAccount(environment.orderModuleApiUrl, state.ssn))\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [state.ssn])\n\n useEffect(() => {\n if (state.erateAccount) {\n dispatch(getErateAccountInfo(environment.orderModuleApiUrl, state.erateAccount.accountId))//state.erateAccount.accountId\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [state.erateAccount])*/\n\n useEffect(() => {\n state.erateAccountInfo &&\n state.erateAccountInfo.map((item) =>\n dispatch({\n type: 'ADD_TO_MOBILE_USERS',\n mobileUser: {\n firstName: item.ownerFirstName,\n lastName: item.ownerLastName,\n header: item.isAccountOwner === 'Y' ? 'Abonnementseier' : 'Bruker',\n phoneNumber: item.phoneNumber,\n email: item.ownerEmail,\n birthDate: item.birthday\n ? item.birthday.substring(8, 10) +\n '.' +\n item.birthday.substring(5, 7) +\n '.' +\n item.birthday.substring(0, 4)\n : '',\n ratePlanName: item.ratePlanName,\n serviceStatus: item.serviceStatus,\n newNumber: false,\n },\n }),\n );\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [state.erateAccountInfo]);\n\n useEffect(() => {\n if (owner.firstName && owner.firstName !== '' && owner.lastName && owner.lastName !== '') {\n state.mobileUsers.some(\n (elem) => elem.firstName === owner.firstName && elem.lastName === owner.lastName,\n )\n ? !state.mobileUsers.some((elem) => elem.ratePlanName) &&\n dispatch({\n type: 'UPDATE_MOBILE_USER',\n mobileUser: owner,\n index: state.mobileUsers.findIndex(\n (elem) => elem.firstName === owner.firstName && elem.lastName === owner.lastName,\n ),\n })\n : dispatch({ type: 'ADD_TO_MOBILE_USERS', mobileUser: owner });\n }\n // eslint-disable-next-line\n }, [state.name, state.ssn, state.phone, state.email]);\n\n return (\n :not(style)': { m: 1 } }}>\n \n \n \n \n Mobilbrukere\n \n \n \n setOpenAddUser(true)}\n >\n Legg til bruker\n \n \n \n \n {state.mobileUsers &&\n state.mobileUsers.map((product, index) => (\n \n ))}\n \n \n \n \n );\n}\n\nexport default CurrentProducts;\n","import { useState, useEffect } from 'react';\nimport Paper from '@mui/material/Paper';\nimport '../../Stylesheets/AddProducts/ResidenceContainerModal.css';\nimport RadioButtonUncheckedIcon from '@mui/icons-material/RadioButtonUnchecked';\nimport CheckCircleIcon from '@mui/icons-material/CheckCircle';\nimport Grid from '@mui/material/Grid';\nimport { useDispatch } from 'react-redux';\nimport { useSelector } from 'react-redux';\nimport environment from '../../environment';\nimport Box from '@mui/material/Box';\n\nfunction ResidenceContainerModal({\n address,\n zipCode,\n city,\n malernummer,\n malepunktID,\n updateItem,\n producthubId,\n freg,\n preg,\n elhubHit,\n elhubDataCore,\n disabled = false,\n}) {\n const [chosen, setChosen] = useState(updateItem && updateItem.address === address ? true : false);\n const dispatch = useDispatch();\n // eslint-disable-next-line\n const [avtale, setAvtale] = useState();\n const state = useSelector((state) => state.reducer);\n const [invoiceLabel, setInvoiceLabel] = useState(null);\n const isBedrift = environment.isBedrift === 'true';\n const [aarsforbruk, setAarsforbruk] = useState(0);\n\n useEffect(() => {\n setAarsforbruk(estimate());\n // eslint-disable-next-line\n }, []);\n\n const estimate = () => {\n if (malepunktID === null) return 0;\n let aafk =\n state?.onyxArray &&\n state?.onyxArray?.filter((o) => o?.meteringPointIdentification === malepunktID)[0]\n ?.estimatedAnnualConsumption;\n if (aafk > 0) return aafk;\n aafk = state?.siteList\n ? typeof state?.siteList.filter((o) => o?.meterPointId === malepunktID)[0]?.elhubDataCore ===\n 'undefined'\n ? 0\n : state?.siteList?.filter((o) => o?.meterPointId === malepunktID)[0]?.elhubDataCore\n ?.estimatedAnnualConsumption\n : 0;\n return aafk || 0;\n };\n\n const chooseResidence = (e) => {\n if (e.target.name === 'Fakturamerke') {\n handleChangeInvoiceLabel(e);\n return;\n }\n if (chosen === false) {\n dispatch({\n type: 'ADD_TO_RESIDENCE',\n residence: {\n address,\n zipCode,\n city,\n producthubId,\n malernummer,\n malepunktID,\n invoiceLabel,\n elhubDataCore,\n },\n });\n } else {\n let index = state.residence.findIndex(\n (item) =>\n item.address === address &&\n item.zipCode === zipCode &&\n item.producthubId === producthubId &&\n item.city === city,\n );\n dispatch({ type: 'REMOVE_FROM_RESIDENCE', index: index });\n }\n setChosen(!chosen);\n };\n\n useEffect(() => {\n updateItem &&\n chosen &&\n dispatch({\n type: 'ADD_TO_RESIDENCE',\n residence: {\n address: updateItem.address,\n zipCode: updateItem.zipCode,\n city: updateItem.city,\n producthubId: producthubId,\n invoiceLabel,\n },\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useEffect(() => {\n if (producthubId) {\n const found =\n state.powerProducts && state.powerProducts.find((item) => item.id === producthubId);\n if (found) {\n setAvtale(found.name);\n }\n } else {\n const found =\n state.productList && state.productList.find((item) => item.reference === malepunktID);\n if (found) {\n setAvtale(found.name);\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [state.productList]);\n\n const handleChangeInvoiceLabel = (e) => {\n setInvoiceLabel(e.target.value === '' ? null : e.target.value);\n if (chosen === true) {\n let index = state.residence.findIndex(\n (item) =>\n item.address === address &&\n item.zipCode === zipCode &&\n item.producthubId === producthubId &&\n item.city === city,\n );\n dispatch({\n type: 'UPDATE_RESIDENCE',\n index: index,\n item: {\n invoiceLabel: e.target.value === '' ? null : e.target.value,\n },\n });\n }\n };\n\n return (\n :not(style)': { m: 1, width: 128, height: 128 },\n }}\n >\n \n \n \n {disabled ? (\n <>\n ) : (\n <>\n {chosen ? (\n \n ) : (\n \n )}\n \n )}\n \n \n
    \n

    {address}

    \n

    \n {zipCode} {city}\n

    \n
    \n
    \n {elhubHit === true && (\n \n
    \n

    Estimert årsforbruk: {aarsforbruk} kWh

    \n
    \n
    \n )}\n {isBedrift && (\n \n
    \n \n
    \n
    \n )}\n
    \n
    \n {freg ? (\n

    Hentet fra folkeregisteret

    \n ) : preg ? (\n

    Hentet fra eiendomsregisteret

    \n ) : (\n

    Målernummer: {malernummer}

    \n )}\n
    \n \n \n );\n}\n\nexport default ResidenceContainerModal;\n","import { useEffect, useRef, useState } from 'react';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { getForutsigbarEstimatedPrice } from '../Redux/ApiCalls';\nimport axios from 'axios';\n\nexport default function ForutsigbarBetalingEstimate() {\n const [loading, setLoading] = useState(false);\n const [estimate, setEstimate] = useState(null);\n const dispatch = useDispatch();\n const state = useSelector((state) => state.reducer);\n const CancelToken = axios.CancelToken;\n let cancelSource = useRef(CancelToken.source());\n\n useEffect(() => {\n if (cancelSource.current) cancelSource.current.cancel();\n if (!state.residence || state.residence.length === 0) setEstimate(null);\n\n if (state.residence && state.residence.length > 0) {\n cancelSource.current = CancelToken.source();\n setLoading(true);\n let sites = getSitesFromResidences().map((s) => ({\n meterPointId: s.meterPointId,\n estimatedConsumption: s.elhubDataCore?.estimatedAnnualConsumption,\n priceAreaName: s.elhubDataCore?.priceAreaName,\n missingElhubData: s.elhubDataCore === null || s.elhubDataCore === undefined,\n energiKontoNummer: findEk(s.meterPointId),\n }));\n\n const foundCache = state.forutsigbarBetalingCache[sites.map((s) => s.meterPointId).join(',')];\n if (foundCache) {\n setEstimate(foundCache);\n setLoading(false);\n return;\n }\n\n getForutsigbarEstimatedPrice(sites, state.ssn, 0, 2, cancelSource.current)\n .then((v) => {\n setEstimate(v);\n dispatch({\n type: 'ADD_TO_FORUTSIGBAR_BETALING_CACHE',\n payload: { [sites.map((s) => s.meterPointId).join(',')]: v },\n });\n })\n .catch(() => setEstimate('-'))\n .finally(() => setLoading(false));\n }\n }, [state.residence]);\n\n function findEk(meterPointId) {\n if (!state.activeDeliveryPoints) return null;\n const dp = state.activeDeliveryPoints.filter((ad) => ad.reference === meterPointId);\n if (dp.length > 0) return dp[0].energiKontoNummer;\n return null;\n }\n\n function getSitesOnSelectedEK(ek) {\n // Get meterPoints on selected energiKontoer\n const meterPoints = state.activeDeliveryPoints\n .filter((ad) => ek === ad.energiKontoNummer)\n .map((ad) => ad.reference);\n return state.siteList.filter((s) => meterPoints.includes(s.meterPointId));\n }\n\n function getSitesFromResidences() {\n const meterPoints = state.residence.map((r) => r.malepunktID);\n const manualSites = state.manuallyAddedSites.filter((s) => s.elhubHit === true);\n\n // Find meters on same ek:\n const activeEks = state.activeDeliveryPoints\n .filter((d) => meterPoints.includes(d.reference))\n .map((d) => d.energiKontoNummer);\n const otherActiveSites = state.activeDeliveryPoints\n .filter((s) => activeEks.includes(s.energiKontoNummer) && !meterPoints.includes(s.reference))\n .map((s) => s.reference);\n\n return state.siteList\n .concat(manualSites)\n .filter((s) => meterPoints.concat(otherActiveSites).includes(s.meterPointId));\n }\n\n if (loading)\n return (\n \n \n \n );\n\n return {estimate && {estimate},-};\n}\n","import { useState, useEffect } from 'react';\nimport Paper from '@mui/material/Paper';\nimport '../../Stylesheets/AddProducts/ModalChoices.css';\nimport RadioButtonUncheckedIcon from '@mui/icons-material/RadioButtonUnchecked';\nimport CheckCircleIcon from '@mui/icons-material/CheckCircle';\nimport Grid from '@mui/material/Grid';\nimport { useDispatch } from 'react-redux';\nimport '../../Stylesheets/AddProducts/ResidenceContainerModal.css';\nimport { useSelector } from 'react-redux';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport { isCampaignProduct } from '../../utils/helperFunctions';\nimport Box from '@mui/material/Box';\nimport {\n isForutsigbarBetaling,\n isMarketplaceExtraProduct,\n isMinBedrift,\n isMinBedriftPriceElement,\n isLive,\n findLivePrices,\n isStromSmart,\n isPuls,\n shouldShowPuls,\n} from '../../utils/Methods';\nimport ForutsigbarBetalingEstimate from '../ForutsigbarBetalingEstimate';\nimport environment from '../../environment';\nimport { add } from 'lodash';\nimport { fi } from 'date-fns/locale';\n\nfunction AddonProductContainer({\n name,\n updateItem,\n addonProductId,\n setCampaignOpen,\n setChosenAddonProductId,\n setPriceInfoOpen,\n autoSelect = false,\n disabled = false,\n setPulsOpen,\n}) {\n const [chosen, setChosen] = useState(\n updateItem?.extraProducts.some((item) => item.id === addonProductId),\n );\n const dispatch = useDispatch();\n const state = useSelector((state) => state.reducer);\n const addonObject = useSelector((state) =>\n state.reducer.addonProducts.find((item) => item.id === addonProductId),\n );\n disabled = disabled || (isMarketplaceExtraProduct(952) && state.residence.length === 0);\n\n useEffect(() => {\n if (state.residence.length > 0) {\n disabled = false;\n }\n }, [state.residence]);\n const isBedrift = environment.isBedrift === 'true';\n\n const brand = state.brand ?? 'FKAS';\n const isAddonProductForutsigbarBetaling = isForutsigbarBetaling(addonProductId);\n\n const choose = () => {\n if (!disabled) {\n if (!chosen) {\n if (!isMarketplaceExtraProduct(addonProductId)) {\n dispatch({\n type: 'ADD_TO_CHOSEN_ADDON_PRODUCTS',\n chosenAddonProduct: { name, id: addonProductId, campaigns: [] },\n });\n }\n if (isMarketplaceExtraProduct(addonProductId) && state.residence.length > 0) {\n const latestResidence = state.residence[state.residence.length - 1];\n dispatch({\n type: 'ADD_MARKETPLACE_ORDER',\n marketplaceOrder: {\n name,\n id: addonProductId,\n sku: name,\n amount: 1,\n shippingAddress: latestResidence.address,\n shippingPostCode: latestResidence.zipCode,\n shippingCity: latestResidence.city,\n },\n });\n }\n if (addonObject.priceInfo?.priceElements.some((e) => e.editable || e.optional)) {\n setPriceInfoOpen(true);\n setChosenAddonProductId(addonProductId);\n }\n if (isCampaignProduct(addonProductId, state.addonProducts)) {\n dispatch({\n type: 'SET_ADDON_PRODUCT_CAMPAIGNS',\n payload: state.addonProducts.find((item) => item.id === addonProductId)\n .availableCampaigns,\n });\n setCampaignOpen(true);\n setChosenAddonProductId(addonProductId);\n }\n } else if (chosen) {\n if (shouldShowPuls(addonProductId, brand)) {\n //checking if we have puls added as well. If so, remove it too.\n const puls = state.chosenAddonProducts.find((a) => isPuls(a.id, brand));\n if (puls) {\n dispatch({ type: 'REMOVE_FROM_CHOSEN_ADDON_PRODUCTS', id: puls.id });\n }\n }\n dispatch({ type: 'REMOVE_FROM_CHOSEN_ADDON_PRODUCTS', id: addonProductId });\n setCampaignOpen(false);\n\n setChosenAddonProductId();\n }\n setChosen(!chosen);\n }\n };\n\n useEffect(() => {\n updateItem &&\n chosen &&\n dispatch({\n type: 'ADD_TO_CHOSEN_ADDON_PRODUCTS',\n chosenAddonProduct: {\n name,\n id: addonProductId,\n campaigns: updateItem.extraProducts.find((item) => item.id === addonProductId).campaigns,\n },\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useEffect(() => {\n if (autoSelect) choose();\n }, [autoSelect]);\n\n function findMinBedriftPrice() {\n try {\n return state.chosenAddonProducts\n .find((a) => a.id === addonProductId)\n .priceElements.find((p) => isMinBedriftPriceElement(p.id))?.price;\n } catch (e) {\n return null;\n }\n }\n function findLivePrice() {\n return findLivePrices(addonProductId, state);\n }\n\n return (\n :not(style)': { m: 1, width: 128, height: 128 },\n }}\n >\n \n \n \n {disabled ? (\n <>\n ) : (\n <>\n {chosen ? (\n \n ) : (\n \n )}\n \n )}\n \n \n {addonObject && addonObject.isLoadingPriceInfo && (\n \n )}\n
    \n

    {name}

    \n \n \n {isAddonProductForutsigbarBetaling ? : null}\n \n {isMinBedrift(addonProductId) && (\n {findMinBedriftPrice() ?? '--'} kr/mnd\n )}\n {isLive(addonProductId) && (\n <>\n {findLivePrice() ? (\n \n {' '}\n {findLivePrice().firstGroupTotal.toFixed(0).replace('.', ',')}kr/stk +{' '}\n {findLivePrice().secondGroupTotal.toFixed(0).replace('.', ',')}kr/mnd\n \n ) : (\n '--'\n )}\n \n )}\n
    \n \n {addonObject && addonObject.campaigns && addonObject.campaigns[0] !== undefined && (\n

    \n {\n state.addonProductCampaigns.find((item) => item.id === addonObject.campaigns[0])\n .name\n }\n

    \n )}\n {addonObject && addonObject.campaigns && addonObject.campaigns[0] === undefined && (\n

    Ingen kampanje valgt

    \n )}\n
    \n
    \n \n {/* Forutsigbar betaling doesn't have a price element */}\n {!isAddonProductForutsigbarBetaling && addonObject?.isPriceInfoLoading ? (\n
    \n \n
    \n ) : null}\n \n );\n}\n\nexport default AddonProductContainer;\n","import { useState, useEffect } from 'react';\nimport Paper from '@mui/material/Paper';\nimport '../../Stylesheets/AddProducts/ModalChoices.css';\nimport RadioButtonUncheckedIcon from '@mui/icons-material/RadioButtonUnchecked';\nimport CheckCircleIcon from '@mui/icons-material/CheckCircle';\nimport Grid from '@mui/material/Grid';\nimport { useDispatch } from 'react-redux';\nimport { useSelector } from 'react-redux';\nimport Box from '@mui/material/Box';\n\nfunction CampaignContainerModal({ name, id, updateItem, priceElementId }) {\n const [chosen, setChosen] = useState(\n updateItem && updateItem.productCampaign && updateItem.productCampaign.name === name\n ? true\n : false,\n );\n const dispatch = useDispatch();\n const state = useSelector((state) => state.reducer);\n\n const choose = () => {\n if (chosen === false) {\n dispatch({\n type: 'SET_PRODUCT_CAMPAIGN',\n campaign: { name, months: null, price: null, id, priceElementId },\n });\n } else if (chosen === true) {\n dispatch({ type: 'SET_PRODUCT_CAMPAIGN', campaign: null });\n }\n setChosen(!chosen);\n };\n\n useEffect(() => {\n if (state.productCampaign && state.productCampaign.name !== name) {\n setChosen(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [state.productCampaign]);\n\n useEffect(() => {\n updateItem &&\n chosen &&\n dispatch({\n type: 'SET_PRODUCT_CAMPAIGN',\n campaign: {\n name: updateItem.productCampaign.name,\n months: updateItem.productCampaign.months,\n price: updateItem.productCampaign.price,\n id: updateItem.productCampaign.id,\n priceElementId: updateItem.productCampaign.priceElementId,\n },\n });\n // eslint-disable-next-line\n }, []);\n\n return (\n :not(style)': { m: 1, width: 128, height: 128 },\n }}\n >\n \n \n \n {chosen ? (\n \n ) : (\n \n )}\n \n \n
    \n

    {name}

    \n
    \n
    \n
    \n
    \n \n );\n}\n\nexport default CampaignContainerModal;\n","import { useState, useEffect } from 'react';\nimport Paper from '@mui/material/Paper';\nimport '../../Stylesheets/AddProducts/ModalChoices.css';\nimport RadioButtonUncheckedIcon from '@mui/icons-material/RadioButtonUnchecked';\nimport CheckCircleIcon from '@mui/icons-material/CheckCircle';\nimport Grid from '@mui/material/Grid';\nimport { useDispatch } from 'react-redux';\nimport { useSelector } from 'react-redux';\nimport ACTIONS from '../../Redux/Actions';\nimport { CHOSEN_DISTRIBUTION_METHOD } from '../../utils/helperFunctions';\nimport Box from '@mui/material/Box';\n\nfunction InvoiceContainerModal({ name, setSeparateInvoice }) {\n const [chosen, setChosen] = useState(false);\n const dispatch = useDispatch();\n const state = useSelector((state) => state.reducer);\n\n const choose = () => {\n if (chosen === false && name === 'Separat faktura') {\n dispatch({\n type: 'SET_INVOICE',\n invoice: {\n name: name,\n accountId: state.accountIds[0]?.refID ? state.accountIds[0]?.refID : null,\n refId: null,\n iscuId: null,\n },\n });\n setSeparateInvoice(true);\n } else if (chosen === false) {\n dispatch({\n type: 'SET_INVOICE',\n invoice: { name: name, accountId: null, refId: null, iscuId: null },\n });\n setSeparateInvoice(false);\n } else if (chosen === true) {\n dispatch({ type: 'SET_INVOICE', invoice: null });\n setSeparateInvoice(false);\n }\n\n if (\n name === 'Separat faktura' &&\n state.chosenDistributionMethod === CHOSEN_DISTRIBUTION_METHOD.sameAsBefore\n ) {\n dispatch({\n type: ACTIONS.SET_CHOSEN_DISTRIBUTION_METHOD,\n payload: CHOSEN_DISTRIBUTION_METHOD.paper,\n }); //cannot be same as before on new invoice\n }\n setChosen(!chosen);\n };\n\n useEffect(() => {\n if (state.invoice && state.invoice.name !== name) {\n setChosen(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [state.invoice]);\n\n return (\n :not(style)': { m: 1, width: 128, height: 128 },\n }}\n >\n \n \n \n {chosen ? (\n \n ) : (\n \n )}\n \n \n
    \n

    {name}

    \n

    Detaljer

    \n
    \n
    \n
    \n
    \n \n );\n}\n\nexport default InvoiceContainerModal;\n","import { useState, useEffect } from 'react';\nimport Paper from '@mui/material/Paper';\nimport '../../Stylesheets/AddProducts/ModalChoices.css';\nimport RadioButtonUncheckedIcon from '@mui/icons-material/RadioButtonUnchecked';\nimport CheckCircleIcon from '@mui/icons-material/CheckCircle';\nimport Grid from '@mui/material/Grid';\nimport { useDispatch } from 'react-redux';\nimport { useSelector } from 'react-redux';\nimport Box from '@mui/material/Box';\n\nfunction StartDateContainerModal({ name, updateItem }) {\n const [chosen, setChosen] = useState(\n updateItem && updateItem.startDate.name === name ? true : false,\n );\n const dispatch = useDispatch();\n const state = useSelector((state) => state.reducer);\n\n const choose = () => {\n if (chosen === false && name === 'Oppstartsdato') {\n dispatch({ type: 'SET_START_DATE', startDate: { name: name, date: new Date() } });\n } else if (chosen === false) {\n dispatch({ type: 'SET_START_DATE', startDate: { name: name, date: null } });\n } else if (chosen === true) {\n dispatch({ type: 'SET_START_DATE', startDate: null });\n }\n setChosen(!chosen);\n };\n\n useEffect(() => {\n if (state.startDate && state.startDate.name !== name) {\n setChosen(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [state.startDate]);\n\n useEffect(() => {\n updateItem &&\n chosen &&\n dispatch({\n type: 'SET_START_DATE',\n startDate: { name: name, date: updateItem.startDate.date },\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n :not(style)': { m: 1, width: 128, height: 128 },\n }}\n >\n \n \n \n {chosen ? (\n \n ) : (\n \n )}\n \n \n
    \n

    {name}

    \n {name === '14 dagers oppstart' && (\n

    Detaljer

    \n )}\n {name === 'Oppstartsdato' &&

    Velg dato for oppstart

    }\n
    \n
    \n
    \n
    \n \n );\n}\n\nexport default StartDateContainerModal;\n","import { useState, useEffect } from 'react';\nimport Paper from '@mui/material/Paper';\nimport '../../Stylesheets/AddProducts/ModalChoices.css';\nimport RadioButtonUncheckedIcon from '@mui/icons-material/RadioButtonUnchecked';\nimport CheckCircleIcon from '@mui/icons-material/CheckCircle';\nimport Grid from '@mui/material/Grid';\nimport { useDispatch } from 'react-redux';\nimport { useSelector } from 'react-redux';\nimport Box from '@mui/material/Box';\n\nfunction AccountIdContainerModal({ account }) {\n const [chosen, setChosen] = useState(false);\n const dispatch = useDispatch();\n const state = useSelector((state) => state.reducer);\n\n const choose = () => {\n if (chosen === false) {\n dispatch({\n type: 'SET_INVOICE',\n invoice: {\n name: state.invoice.name,\n accountId: account.accountId,\n refId: account.customerId,\n iscuId: account.externalId,\n },\n });\n } else if (chosen === true) {\n dispatch({\n type: 'SET_INVOICE',\n invoice: { name: state.invoice.name, accountId: null, refId: null, iscuId: null },\n });\n }\n setChosen(!chosen);\n };\n\n useEffect(() => {\n if (state.invoice && state.invoice.accountId !== account.accountId) {\n setChosen(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [state.accountId]);\n\n return (\n :not(style)': { m: 1, width: 128, height: 128 },\n }}\n >\n \n \n \n {chosen ? (\n \n ) : (\n \n )}\n \n \n
    \n

    {account.accountId}

    \n
    \n
    \n
    \n
    \n \n );\n}\n\nexport default AccountIdContainerModal;\n","import { useState } from 'react';\nimport Paper from '@mui/material/Paper';\nimport '../../Stylesheets/AddProducts/ModalChoices.css';\nimport RadioButtonUncheckedIcon from '@mui/icons-material/RadioButtonUnchecked';\nimport CheckCircleIcon from '@mui/icons-material/CheckCircle';\nimport Grid from '@mui/material/Grid';\nimport { useDispatch } from 'react-redux';\nimport '../../Stylesheets/AddProducts/ResidenceContainerModal.css';\nimport { useSelector } from 'react-redux';\nimport Box from '@mui/material/Box';\nimport { distinctArray } from '../../utils/Methods';\n\nfunction AddonProductsCampaignContainerModal({ addonProductId, setCampaignOpen }) {\n const [chosen, setChosen] = useState(false);\n const dispatch = useDispatch();\n const state = useSelector((state) => state.reducer);\n\n const choose = (addonProductCampaignId, campaignName) => {\n if (chosen === false) {\n dispatch({\n type: 'ADD_CAMPAIGN_TO_ADDON_PRODUCTS',\n campaign: { addonProductId, addonProductCampaignId, campaignName },\n });\n setCampaignOpen(false);\n } else if (chosen === true) {\n dispatch({\n type: 'REMOVE_CAMPAIGN_FROM_ADDON_PRODUCTS',\n campaign: { addonProductId, addonProductCampaignId, campaignName },\n });\n setCampaignOpen(false);\n }\n\n setChosen(!chosen);\n };\n\n const chooseNothing = () => {\n setCampaignOpen(false);\n };\n\n return (\n :not(style)': { m: 1, width: 128, height: 128 },\n }}\n >\n {state.addonProductCampaigns &&\n state.addonProductCampaigns.length > 0 &&\n distinctArray(state.addonProductCampaigns, 'campaignId').map(\n (item) =>\n state.filteredCampaigns.some((campaign) => campaign.campaignId === item.campaignId) ===\n true && (\n choose(item.campaignId, item.campaignName)}\n className=\"container\"\n key={item.campaignId}\n >\n \n \n {chosen ? (\n \n ) : (\n \n )}\n \n \n
    \n

    {item.campaignName}

    \n
    \n
    \n
    \n \n ),\n )}\n \n \n \n {chosen ? (\n \n ) : (\n \n )}\n \n \n
    \n

    Fortsett uten kampanje

    \n
    \n
    \n
    \n
    \n \n );\n}\n\nexport default AddonProductsCampaignContainerModal;\n","import Paper from '@mui/material/Paper';\nimport '../Stylesheets/AddProducts/ModalChoices.css';\nimport RadioButtonUncheckedIcon from '@mui/icons-material/RadioButtonUnchecked';\nimport CheckCircleIcon from '@mui/icons-material/CheckCircle';\nimport Grid from '@mui/material/Grid';\nimport { useMemo } from 'react';\nimport Box from '@mui/material/Box';\n\nconst RadioCheckbox = ({ title, subtitle, selected, value, disabled, onChange }) => {\n const checked = useMemo(() => selected, [selected]);\n\n const handleCheckBoxClicked = () => {\n if (disabled) return;\n\n onChange(value);\n };\n\n return (\n :not(style)': { m: 1, width: 128, height: 128 },\n }}\n >\n \n \n \n {!disabled && (\n <>\n {checked ? (\n \n ) : (\n \n )}\n \n )}\n \n \n
    \n

    {title}

    \n {subtitle !== undefined &&

    {subtitle}

    }\n
    \n
    \n
    \n \n \n );\n};\n\nexport default RadioCheckbox;\n","import '../../Stylesheets/AddProducts/AddPowerOrder.css';\nimport '../../Stylesheets/AddProducts/InputDateComponent.css';\nimport '../../Stylesheets/AddProducts/ProductPriceComponent.css';\n\n// Part of EUI\n\nfunction InputSelectComponent({ title, values, selectedValue, changedValue, denomination }) {\n return (\n
    \n

    {title}

    \n
    \n changedValue(e)}\n >\n \n {values.map((profile, index) => (\n \n ))}\n \n\n

    {denomination}

    \n
    \n\n
    \n

    \n
    \n
    \n );\n}\n\nexport default InputSelectComponent;\n","import '../../Stylesheets/AddProducts/ProductPriceComponent.css';\nimport DatePicker from 'react-datepicker';\n\nfunction FixedPriceComponent({\n title,\n value,\n changedValue,\n denomination,\n extraInfo,\n type = 'text',\n}) {\n return (\n <>\n {type === 'text' && (\n
    \n

    {title}

    \n
    \n changedValue(e)}\n value={value}\n type={'text'}\n />\n

    {denomination}

    \n
    \n\n
    \n

    \n

    {extraInfo}

    \n
    \n
    \n )}\n {type === 'date' && (\n
    \n

    {title}

    \n
    \n \n\n

    {denomination}

    \n
    \n\n
    \n

    \n
    \n
    \n )}\n \n );\n}\n\nexport default FixedPriceComponent;\n","import { useState } from 'react';\nimport Grid from '@mui/material/Grid';\nimport TextField from '@mui/material/TextField';\nimport FormGroup from '@mui/material/FormGroup';\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport Checkbox from '@mui/material/Checkbox';\nimport Button from '@mui/material/Button'; // Import Button component\nimport { useDispatch, useSelector } from 'react-redux';\nimport Typography from '@mui/material/Typography';\nimport CheckCircleOutlineIcon from '@mui/icons-material/CheckCircleOutline';\nimport CancelOutlinedIcon from '@mui/icons-material/CancelOutlined';\nimport { ValidateTobbMembershipNumber } from '../../Redux/ApiCalls';\n\nfunction TOBB() {\n const [membershipNumber, setMembershipNumber] = useState(null);\n const [error, setError] = useState(true);\n const [checked, setChecked] = useState(false);\n const [verificationResult, setVerificationResult] = useState(null); // To store the result of verification\n const tobbRegex = '^[0-9]*$'; //Nine digits and nothing else\n const dispatch = useDispatch();\n const state = useSelector((state) => state.reducer);\n const [isValidated, setIsValidated] = useState(false); // New state to track validation status\n\n const handleChange = (e) => {\n if (!e.target.value.match(tobbRegex) || e.target.value.length > 9) {\n setError(true); // Set error to true if the input is not valid\n return;\n }\n\n setMembershipNumber(e.target.value);\n setError(false); // Set error to false when there are 9 valid numbers\n setIsValidated(false); // Reset the validation status when the input changes\n };\n\n const handleChecked = () => {\n if (checked === false) {\n dispatch({ type: 'SET_TOBB_MEMBERSHIP', tobbMembershipNumber: null });\n setMembershipNumber(null);\n }\n setChecked(!checked);\n setVerificationResult(null); // Reset the verification result when the checkbox is toggled\n };\n\n async function verifyTobbId(tobbId) {\n if (!tobbId) {\n return false;\n }\n let validTobb = await dispatch(ValidateTobbMembershipNumber(state.conductorUrl, tobbId));\n return !!validTobb;\n }\n\n const handleValidateClick = async () => {\n if (membershipNumber && membershipNumber.length === 9) {\n setError(false); // Set error to false before starting the verification\n const isValid = await verifyTobbId(membershipNumber);\n if (!isValid) {\n setError(true); // Set error back to true if the verification result is false\n }\n setVerificationResult(isValid);\n isValid ? setIsValidated(true) : setIsValidated(false); // Update the validation status after verification\n } else {\n setVerificationResult(null);\n }\n };\n\n const shouldShowButton = membershipNumber;\n\n return (\n <>\n

    TOBB kortnummer

    \n \n {!checked && (\n <>\n \n {shouldShowButton && !isValidated && (\n \n Valider\n \n )}\n \n )}\n \n }\n label=\"Har ikke kortnummer\"\n />\n \n \n {/* Show the \"Valid\" component only when the number has been verified */}\n {verificationResult !== null && membershipNumber && }\n \n );\n}\n\nconst Valid = ({ valid }) => {\n if (valid === true) {\n return (\n \n Kortnummer er gyldig\n \n );\n } else if (valid === false) {\n return (\n \n Kortnummer er ikke gyldig\n \n );\n } else {\n return null; // Return null when the verification result is null or not available\n }\n};\n\nexport default TOBB;\n","import { useState } from 'react';\nimport TextField from '@mui/material/TextField';\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport Switch from '@mui/material/Switch';\n\nfunction Freetext({ setFreeText }) {\n const [show, setShow] = useState(false);\n\n const handleChange = (e) => {\n setFreeText(e.target.value);\n };\n\n return (\n <>\n

    Fritekst tilbud

    \n\n setShow(!show)}\n name=\"Vis fritekst\"\n color=\"primary\"\n />\n }\n />\n\n {show && (\n \n )}\n \n );\n}\n\nexport default Freetext;\n","const PRODUCT_CONSTANTS = {\n ADVANTAGE_POINTS: {\n MIN: 0,\n MAX: 1500,\n },\n};\n\nexport { PRODUCT_CONSTANTS };\n","import { useEffect, useState } from 'react';\nimport '../../Stylesheets/AddProducts/ModalChoices.css';\nimport RadioButtonUncheckedIcon from '@mui/icons-material/RadioButtonUnchecked';\nimport CheckCircleIcon from '@mui/icons-material/CheckCircle';\nimport Grid from '@mui/material/Grid';\nimport { useDispatch } from 'react-redux';\nimport '../../Stylesheets/AddProducts/ResidenceContainerModal.css';\nimport { useSelector } from 'react-redux';\nimport ACTIONS from '../../Redux/Actions';\nimport * as _ from 'lodash';\nimport {\n isMinBedrift,\n isMinBedriftPriceElement,\n minBedriftPriceElementIdFk,\n minBedriftPriceElementIdTk,\n} from '../../utils/Methods';\nimport Select from '@mui/material/Select';\nimport MenuItem from '@mui/material/MenuItem';\nimport { PRODUCT_CONSTANTS } from '../../constants/product-constants';\n\nfunction PriceInfoInput({ priceElement, onChange }) {\n return (\n <>\n onChange(e, priceElement.id)}\n />\n \n );\n}\n\nfunction AddonProductsPriceElementModal({ addonProductId, onConfirm }) {\n const dispatch = useDispatch();\n const state = useSelector((state) => state.reducer);\n const addonProduct = useSelector((state) =>\n state.reducer.addonProducts.find((p) => p.id === addonProductId),\n );\n\n const initialMinBedriftPricing = getInitialMinBedriftPricing();\n\n const defaultTermDays =\n addonProduct?.priceInfo?.minimumTermDays ||\n (addonProduct?.priceInfo?.minimumTermMonths && addonProduct?.priceInfo?.minimumTermMonths * 30);\n\n const [priceElements, setPriceElements] = useState(getInitialPricing());\n const [minimumTermDays, setMinimumTermDays] = useState(defaultTermDays);\n\n const minBedriftPrices = ['19', '39', '48', '49', '59', '79', '99'];\n\n function getInitialPricing() {\n const priceInfo = addonProduct ? addonProduct.priceInfo : null;\n\n return (\n priceInfo != null &&\n priceInfo.priceElements.map((p) => {\n return {\n ...p,\n id: p.priceElementDefinitionId,\n priceElementId: p.priceElementDefinitionId,\n price: parseFloat(p.pricing.price) * p.factor,\n chosen: !p.optional || state.brand === 'TKAS',\n };\n })\n );\n }\n\n function getInitialMinBedriftPricing() {\n if (isMinBedrift(addonProductId)) {\n return (\n addonProduct.priceInfo.priceElements\n .filter((p) => isMinBedriftPriceElement(p.priceElementDefinitionId))[0]\n ?.pricing?.price.toString() ?? ''\n );\n }\n }\n\n const handleChange = (e, id) => {\n let targetValue = e.target.value;\n if (targetValue > PRODUCT_CONSTANTS.ADVANTAGE_POINTS.MAX) {\n return;\n }\n if (targetValue === '') {\n targetValue = '0';\n }\n if (targetValue.startsWith('0') && targetValue.length > 1) {\n targetValue = targetValue.slice(1);\n }\n let newPriceElements = priceElements.map((p) => {\n if (p.id === id) {\n return { ...p, [e.target.name]: targetValue, chosen: true };\n }\n return p;\n });\n setPriceElements(newPriceElements);\n };\n\n const handleChoose = (id) => {\n let newPriceElements = priceElements.map((p) => {\n if (p.id === id) {\n return { ...p, chosen: !p.chosen };\n }\n return p;\n });\n setPriceElements(newPriceElements);\n };\n\n const resetPricing = () => {\n setPriceElements(getInitialPricing());\n };\n\n const handleContinue = () => {\n const newPriceElements = priceElements\n .filter(\n (p) =>\n !p.optional ||\n state.brand === 'TKAS' ||\n !_.isEqual(\n p,\n getInitialPricing().find((i) => p.id === i.id),\n ),\n )\n .map((p) => {\n return { ...p, price: parseFloat(p.price) / p.factor };\n });\n dispatch({\n type: ACTIONS.SET_CHOSEN_ADDON_PRODUCT_PRICE,\n priceElements: newPriceElements,\n addonProductId,\n });\n dispatch({\n type: ACTIONS.SET_CHOSEN_ADDON_PRODUCT_MINIMUM_TERM_DAYS,\n minimumTermDays: minimumTermDays === defaultTermDays ? null : minimumTermDays,\n addonProductId,\n });\n onConfirm(addonProductId);\n };\n\n const handleSubmit = (e) => {\n e.preventDefault();\n handleContinue();\n };\n\n // every button has to have type='button' or they will call the submit function of form\n return (\n
    \n \n

    Prisinformasjon

    \n {isMinBedrift(addonProductId) && (\n <>\n Månedspris: \n \n handleChange(\n e,\n state.brand === 'TKAS' ? minBedriftPriceElementIdTk : minBedriftPriceElementIdFk,\n )\n }\n size={'small'}\n value={priceElements\n .filter((p) => isMinBedriftPriceElement(p.id))[0]\n .price.toString()}\n >\n {minBedriftPrices.map((p) => (\n \n {/* Dirty code to add (Virke) to the price option 48 */}\n {p} {p === '48' ? ' (Virke)' : ''}\n \n ))}\n {initialMinBedriftPricing}\n \n  kr/mnd\n \n )}\n {!_.isEmpty(priceElements) &&\n priceElements\n .filter((p) => !isMinBedrift(addonProductId) || !isMinBedriftPriceElement(p.id))\n .map((p, i) => (\n
    \n handleChoose(p.id)}\n disabled={!p.optional || state.brand === 'TKAS'}\n >\n {p.chosen || !p.optional ? (\n \n ) : (\n \n )}\n \n
    \n {p.name} \n {' ' + p.denomination}\n

    {` (max ${PRODUCT_CONSTANTS.ADVANTAGE_POINTS.MAX} )`}

    \n
    \n
    \n ))}\n {!!(\n addonProduct?.priceInfo?.minimumTermDays || addonProduct?.priceInfo?.minimumTermMonths\n ) && (\n <>\n

    Bindingstid

    \n
    \n Bindingstid i dager:{' '}\n setMinimumTermDays(e.target.value)}\n />\n
    \n \n )}\n
    \n \n \n \n \n
    \n );\n}\n\nexport default AddonProductsPriceElementModal;\n","import Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport * as _ from 'lodash';\nimport AddonProductPriceInfoModal from './AddonProductPriceElementModal';\nimport Dialog from '@mui/material/Dialog';\nimport { useSelector } from 'react-redux';\n\ntype props = {\n isOpen: boolean;\n chosenAddonProductId: any;\n handleConfirmPriceInfo: (addonProductId: any) => void;\n};\n\nexport function AddonProductPriceDialog({\n isOpen,\n chosenAddonProductId,\n handleConfirmPriceInfo,\n}: props) {\n const state = useSelector((state: any) => state.reducer);\n\n return (\n \n \n \n Velg priser for{' '}\n {!_.isEmpty(state?.chosenAddonProducts) &&\n state.chosenAddonProducts.find((item: any) => item.id === chosenAddonProductId)?.name}\n \n \n \n \n );\n}\n","import { useState, useEffect } from 'react';\nimport Paper from '@mui/material/Paper';\nimport '../../Stylesheets/AddProducts/ModalChoices.css';\nimport RadioButtonUncheckedIcon from '@mui/icons-material/RadioButtonUnchecked';\nimport CheckCircleIcon from '@mui/icons-material/CheckCircle';\nimport Grid from '@mui/material/Grid';\nimport { useDispatch } from 'react-redux';\nimport '../../Stylesheets/AddProducts/ResidenceContainerModal.css';\nimport { useSelector } from 'react-redux';\nimport Box from '@mui/material/Box';\nimport { isPuls } from '../../utils/Methods';\nimport * as _ from 'lodash';\n\nfunction AddonPulsContainerModal({ addonProductId, setPulsOpen }) {\n const [chosenItems, setChosenItems] = useState({});\n const dispatch = useDispatch();\n const state = useSelector((state) => state.reducer);\n\n const brand = state.brand ?? 'FKAS';\n\n const choose = (pulsId, name) => {\n const isSelected = !!chosenItems[pulsId];\n const updatedChosenItems = isSelected ? {} : { [pulsId]: true };\n\n setChosenItems(updatedChosenItems);\n\n dispatch({\n type: isSelected ? 'REMOVE_FROM_CHOSEN_ADDON_PRODUCTS' : 'ADD_TO_CHOSEN_ADDON_PRODUCTS',\n chosenAddonProduct: { name, id: pulsId },\n });\n\n if (isSelected) {\n dispatch({\n type: 'REMOVE_FROM_CHOSEN_ADDON_PRODUCTS',\n chosenAddonProduct: { name, id: pulsId },\n });\n }\n };\n useEffect(() => {\n if (chosenItems && Object.keys(chosenItems)?.length > 0) {\n setPulsOpen(false);\n }\n }, [chosenItems, setPulsOpen]);\n\n const chooseNothing = () => {\n const selectedItemIds = Object.keys(chosenItems);\n\n selectedItemIds.forEach((id) => {\n const selectedItem = state.addonProducts.find((item) => item.id === id);\n if (selectedItem) {\n dispatch({\n type: 'REMOVE_FROM_CHOSEN_ADDON_PRODUCTS',\n chosenAddonProduct: { name: selectedItem.name, id: selectedItem.id },\n });\n }\n });\n\n setChosenItems({});\n setPulsOpen(false);\n };\n return (\n :not(style)': { m: 1, width: 128, height: 128 },\n }}\n >\n {state.addonProducts &&\n state.addonProducts.length > 0 &&\n state.addonProducts\n .filter((i) => isPuls(i.id, brand))\n .map((item) => (\n choose(item.id, item.name)}\n className=\"container\"\n key={item.id}\n >\n \n \n {chosenItems[item.id] ? (\n \n ) : (\n \n )}\n \n \n
    \n

    {item.name}

    \n
    \n
    \n
    \n \n ))}\n \n \n \n {_.isEmpty(chosenItems) ? (\n \n ) : (\n \n )}\n \n \n
    \n

    Fortsett uten PULS-måler

    \n
    \n
    \n
    \n
    \n \n );\n}\n\nexport default AddonPulsContainerModal;\n","import { useState, useEffect, useMemo } from 'react';\nimport Dialog from '@mui/material/Dialog';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport CloseIcon from '@mui/icons-material/Close';\nimport Divider from '@mui/material/Divider';\nimport Grid from '@mui/material/Grid';\nimport { useSelector } from 'react-redux';\nimport ResidenceContainerModal from './ResidenceContainerModal';\nimport AddonProductContainer from './AddonProductContainer';\nimport CampaignContainerModal from './CampaignContainerModal';\nimport InvoiceContainerModal from './InvoiceContainerModal';\nimport StartDateContainerModal from './StartDateContainerModal';\nimport AccountIdContainerModal from './AccountIdContainerModal';\nimport * as _ from 'lodash';\nimport { useDispatch } from 'react-redux';\nimport DatePicker from 'react-datepicker';\nimport 'react-datepicker/dist/react-datepicker.css';\nimport '../../Stylesheets/AddProducts/AddPowerOrder.css';\nimport { registerLocale } from 'react-datepicker';\nimport nb from 'date-fns/locale/nb';\nimport {\n getProductPriceListById,\n getBonusCampaignsByTags,\n getProductWithPrices,\n retrieveGroupId,\n addToExistingIrisk,\n getProductFromMoment,\n getProductPresentationFromMoment,\n} from '../../Redux/ApiCalls';\nimport TextField from '@mui/material/TextField';\nimport AddonProductCampaignContainerModal from './AddonProductCampaignContainerModal';\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport Modal from '@mui/material/Modal';\nimport ACTIONS from '../../Redux/Actions';\nimport {\n CHOSEN_DISTRIBUTION_METHOD,\n getAdressesInSameAccount,\n isCampaignProduct,\n} from '../../utils/helperFunctions';\nimport RadioCheckbox from '../RadioCheckbox';\nimport environment from '../../environment';\nimport {\n calculateFornybar,\n isForutsigbarBetaling,\n isMarketplaceExtraProduct,\n isLive,\n isStromSmart,\n isPuls,\n shouldShowPuls,\n isPowerInsurance,\n} from '../../utils/Methods';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport Tooltip from '@mui/material/Tooltip';\nimport { Button } from '@mui/material';\nimport { ThemeProvider, createTheme } from '@mui/material/styles';\nimport InputSelectComponent from './InputSelectComponent';\nimport FixedPriceComponent from './FixedPriceComponent';\nimport TOBB from './TOBB';\nimport Freetext from './Freetext';\nimport { AddonProductPriceDialog } from './AddonProductPriceDialog';\nimport AddonPulsContainerModal from './AddonPulsContainerModal';\n\nregisterLocale('nb', nb);\n\nfunction AddPowerOrder({ open, handleClose, id, name, updateItem, updateIndex }) {\n const state = useSelector((state) => state.reducer);\n const dispatch = useDispatch();\n const [startDate, setStartDate] = useState(null);\n const selectedProduct =\n useSelector((state) => state.reducer.powerProducts)?.find(\n (p) => p?.id === id || updateItem?.id === p.id,\n ) ?? null;\n const [eBNumber, setEbNumber] = useState(updateItem?.eBNumber ?? '');\n const bonusCampaigns = useSelector((state) => state.reducer.bonusCampaigns);\n const isSasBonusProduct = open && (bonusCampaigns.some((bc) => bc.bonusTypeId === 3) ?? false);\n const [campaignOpen, setCampaignOpen] = useState(false);\n const [addonPriceInfoOpen, setAddonPriceInfoOpen] = useState(false);\n const [chosenAddonProductId, setChosenAddonProductId] = useState();\n const distributionMethod = state.chosenDistributionMethod;\n const eInvoiceRefFound = useMemo(() => state.eInvoice?.found ?? false, [state.eInvoice]);\n const isBedrift = environment.isBedrift === 'true';\n const [priceInfoList, setPriceInfoList] = useState([]);\n const [fornybar, setFornybar] = useState(false);\n const [bindingTime, setBindingTime] = useState(false);\n const [overrideBindingTimeValue, setOverrideBindingTimeValue] = useState(0);\n const [ehfRecipient, setEhfRecipient] = useState(null);\n const [ehfRecipientError, setEhfRecipientError] = useState(false);\n const [iRiskDealID, setIRiskDealID] = useState('');\n const [iRiskGroupID, setIRiskGroupID] = useState('');\n // Fixed prices\n const [fixedPriceEndDate, setFixedPriceEndDate] = useState(new Date());\n const [fixedPriceVolume, setFixedPriceVolume] = useState(0);\n const [fixedPriceComment, setFixedPriceComment] = useState('');\n const [fixedPriceUsageProfileValues] = useState([\n {\n ConsumptionProfileId: 1001,\n ConsumptionProfileName: 'FK Balansert',\n ConsumptionProfileDescription: 'Forbruksprofil som fordeler årsvolumet flatt gjennom året',\n },\n {\n ConsumptionProfileId: 1000,\n ConsumptionProfileName: 'Flatprofil',\n ConsumptionProfileDescription: 'Standard forbruksprofil',\n },\n ]);\n const [fixedPriceUsageProfile, setFixedPriceUsageProfile] = useState(null);\n const [showAsVariable, setShowAsVariable] = useState(false);\n const [separateInvoice, setSeparateInvoice] = useState(false);\n const [freeText, setFreeText] = useState('');\n const [priceError, setPriceError] = useState(false);\n const [livePrices, setLivePrices] = useState(false);\n const [stromSmartPrices, setStromSmartPrices] = useState(false);\n const [pulsOpen, setPulsOpen] = useState(false);\n\n const brand = state.brand ?? 'FKAS';\n\n useEffect(() => {\n if (\n open &&\n selectedProduct?.tags !== undefined &&\n selectedProduct?.tags !== null &&\n selectedProduct.tags.length > 0\n ) {\n dispatch(getBonusCampaignsByTags(state.conductorUrl, selectedProduct.tags));\n }\n }, [open, selectedProduct, state.conductorUrl, dispatch]);\n\n useEffect(() => {\n setEbNumber(updateItem?.eBNumber ?? '');\n }, [updateItem]);\n\n useEffect(() => {\n const agreement = state.powerProducts\n .filter((item) => item.id === id)\n .map((item) => item.productCategory)\n .join();\n open && dispatch(getProductWithPrices(state.orderModuleApiUrl, id, agreement));\n open && setPriceInfoList([]);\n // eslint-disable-next-line\n }, [open]);\n\n useEffect(() => {\n open &&\n state.productPriceinfo &&\n dispatch(\n getProductFromMoment(state.conductorUrl, state.productPriceinfo?.externalId, state.brand),\n );\n open &&\n state.productPriceinfo &&\n dispatch(\n getProductPresentationFromMoment(\n state.conductorUrl,\n state.productPriceinfo?.externalId,\n state.brand,\n ),\n );\n // eslint-disable-next-line\n }, [state.productPriceinfo]);\n\n useEffect(() => {\n open &&\n state.momentProductPresentation &&\n setShowAsVariable(\n state.momentProductPresentation.priceElements.some(\n (item) => item.name === 'Variabel Strømpris',\n ),\n );\n // eslint-disable-next-line\n }, [state.momentProductPresentation]);\n\n useEffect(() => {\n removeFornybar();\n state.momentProduct &&\n state.momentProduct?.priceElementDefinitions?.filter((item) => item.externalId === 'FORNYBAR')\n .length !== 0 &&\n state.momentProduct?.priceElementDefinitions?.filter(\n (item) => item.externalId === 'FORNYBAR',\n )[0].optional === true &&\n addFornybar(\n state.momentProduct?.priceElementDefinitions?.filter(\n (item) => item.externalId === 'FORNYBAR',\n ),\n );\n //eslint-disable-next-line\n }, [state.momentProduct]);\n\n const handleConfirmPriceInfo = (addonProductId) => {\n setAddonPriceInfoOpen(false);\n if (isCampaignProduct(addonProductId)) {\n setCampaignOpen(true);\n }\n };\n\n const addOrder = () => {\n if (iRiskGroupID !== '' && iRiskDealID !== '') {\n addToExistingPlis();\n }\n\n let bonusCampaignDtos =\n bonusCampaigns?.map((bc) => ({\n id: bc.id,\n bonusTypeId: bc.bonusTypeId,\n })) ?? null;\n\n dispatch({ type: 'SET_ORDER_INITIATED', orderInitiated: true });\n state.residence.forEach(\n (element) =>\n dispatch({\n type: 'ADD_TO_POWER_ORDERS',\n powerOrder: {\n id: id,\n product: name,\n address: element.address,\n zipCode: element.zipCode,\n city: element.city,\n meterIdentification: element.malernummer,\n meteringPointIdentification: element.malepunktID,\n extraProducts: state.chosenAddonProducts,\n invoice: state.invoice,\n startDate: state.startDate,\n productCampaign: state.productCampaign,\n eBNumber: eBNumber,\n bonusCampaigns: bonusCampaignDtos,\n priceElementList: priceInfoList,\n priceInfo: state.productPriceinfo,\n priceInfoElCert: state.productPriceInfoElCert,\n priceInfoMoment: state.momentProduct,\n minimumTermDays: bindingTime ? overrideBindingTimeValue : null,\n thirdPartyEhf:\n state.chosenDistributionMethod === 4 && ehfRecipientError === false\n ? ehfRecipient\n : null,\n invoiceLabel: element.invoiceLabel,\n iRiskDealID: iRiskDealID,\n iRiskGroupID: iRiskGroupID,\n fixedPrice:\n fixedPriceUsageProfile !== null\n ? {\n agreedVolume: fixedPriceVolume,\n consumptionProfileId: fixedPriceUsageProfile.ConsumptionProfileId,\n consumptionProfileName: fixedPriceUsageProfile.ConsumptionProfileName,\n consumptionProfileDescription:\n fixedPriceUsageProfile.ConsumptionProfileDescription,\n endDate: fixedPriceEndDate,\n comment: fixedPriceComment,\n }\n : null,\n showAsVariable: showAsVariable,\n separateInvoice: separateInvoice,\n elhubDataCore: element.elhubDataCore,\n tobbMembershipNumber: state.tobbMembershipNumber,\n freeText: freeText,\n },\n }),\n dispatch(getProductPriceListById(state.orderModuleApiUrl, id)),\n );\n dispatch({ type: 'RESET_RESIDENCE' });\n setEbNumber('');\n handleClose();\n };\n const iriskChange = (e) => {\n let value = e.target.value;\n if (e.target.name === 'iRiskDealId') {\n setIRiskDealID(e.target.value);\n dispatch({\n type: 'SET_IRISK_DEALID',\n payload: value === '' ? null : value,\n });\n } else if (e.target.name === 'iRiskGroupId') {\n setIRiskGroupID(e.target.value);\n dispatch({\n type: 'SET_IRISK_GROUPID',\n payload: value === '' ? null : value,\n });\n }\n };\n\n const hentGroupId = () => {\n dispatch(retrieveGroupId(state.orderModuleApiUrl, iRiskDealID));\n };\n const addToExistingPlis = () => {\n dispatch(addToExistingIrisk(state.orderModuleApiUrl, iRiskDealID, iRiskGroupID));\n };\n\n useEffect(() => {\n setIRiskGroupID(state.retrievedIRiskGroupId);\n }, [state.retrievedIRiskGroupId]);\n\n const updateOrder = () => {\n let bonusCampaignDtos =\n bonusCampaigns?.map((bc) => ({\n id: bc.id,\n bonusTypeId: bc.bonusTypeId,\n })) ?? null;\n dispatch({\n type: 'UPDATE_POWER_ORDER',\n item: {\n id: updateItem.id,\n product: updateItem.product,\n address: state.residence[0].address,\n zipCode: state.residence[0].zipCode,\n city: state.residence[0].city,\n meterIdentification: state.residence[0].malernummer,\n meteringPointIdentification: state.residence[0].malepunktID,\n extraProducts: state.chosenAddonProducts,\n invoice: state.invoice,\n startDate: state.startDate,\n productCampaign: state.productCampaign,\n eBNumber: eBNumber,\n bonusCampaigns: bonusCampaignDtos,\n priceElementList: priceInfoList,\n priceInfo: state.productPriceinfo,\n priceInfoElCert: state.productPriceInfoElCert,\n priceInfoMoment: state.momentProduct,\n minimumTermDays: bindingTime ? overrideBindingTimeValue : null,\n iRiskDealID: iRiskDealID,\n iRiskGroupID: iRiskGroupID,\n thirdPartyEhf:\n state.chosenDistributionMethod === 4 && ehfRecipientError === false ? ehfRecipient : null,\n invoiceLabel: state.residence[0].invoiceLabel,\n },\n index: updateIndex,\n fixedPrice:\n fixedPriceUsageProfile !== null\n ? {\n agreedVolume: fixedPriceVolume,\n consumptionProfileId: fixedPriceUsageProfile.ConsumptionProfileId,\n consumptionProfileName: fixedPriceUsageProfile.ConsumptionProfileName,\n consumptionProfileDescription: fixedPriceUsageProfile.ConsumptionProfileDescription,\n endDate: fixedPriceEndDate,\n comment: fixedPriceComment,\n }\n : null,\n });\n setEbNumber('');\n handleClose();\n };\n\n const handleDateSelect = (date) => {\n setStartDate(new Date(date));\n dispatch({\n type: 'SET_START_DATE',\n startDate: { name: 'Oppstartsdato', date: new Date(date) },\n });\n };\n\n const handleFixedPriceEndDateSelect = (date) => {\n setFixedPriceEndDate(new Date(date));\n };\n\n const handleSelectedComponent = (e) => {\n setFixedPriceUsageProfile(fixedPriceUsageProfileValues[e.target.value]);\n };\n\n const handleFixedPriceVolume = (e) => {\n if (!isNaN(e.target.value)) {\n setFixedPriceVolume(e.target.value);\n }\n };\n const handleFixedPriceComment = (e) => {\n setFixedPriceComment(e.target.value);\n };\n\n const handleDistributionMethodChange = (selectedIndex) => {\n dispatch({\n type: ACTIONS.SET_CHOSEN_DISTRIBUTION_METHOD,\n payload: selectedIndex,\n });\n };\n\n const handleEbNumberChange = (event) => {\n setEbNumber(event.target.value);\n };\n\n const handleCampaignClose = () => {\n setCampaignOpen(false);\n };\n\n const handlePriceinfoChange = (event, item, blur) => {\n const inputValue = event.target.value.trim();\n if (inputValue === '' || inputValue.toLowerCase() === 'nan') {\n event.target.classList.add('error-border');\n setPriceError(true);\n } else {\n setPriceError(false);\n event.target.classList.remove('error-border');\n }\n // validation when !focus\n if (blur) {\n let value = item.factor === 1 ? parseInt(event.target.value) : parseFloat(event.target.value);\n value = Math.min(value, item.pricing.maxPrice * item.factor);\n value = Math.max(value, item.pricing.minPrice * item.factor);\n event.target.value = item.factor === 1 ? value.toString() : value.toFixed(2).toString();\n }\n let priceElementId = item.priceElementDefinitionId;\n let factor = item.factor;\n let externalId = item.externalId;\n var rgx = /^[0-9]*(\\.?|,?)[0-9]*$/;\n if (!event.target.value.match(rgx)) {\n return;\n }\n let index = 0;\n if (priceInfoList.some((item) => item.name === event.target.name)) {\n index = priceInfoList.findIndex((element) => element.name === event.target.name);\n let newList = [...priceInfoList];\n if (\n state.momentProduct.priceElementDefinitions.some(\n (item) =>\n item.name === event.target.name &&\n (factor === 100\n ? (item.pricing.price * item.factor).toFixed(2).toString() ===\n event.target.value.toString().replace(',', '.')\n : item.pricing.price.toString() === event.target.value.toString().replace(',', '.')),\n )\n ) {\n newList.splice(index, 1);\n } else {\n newList[index] = {\n name: event.target.name,\n price: event.target.value.replace(',', '.'),\n priceElementId: newList[index].priceElementId,\n factor: factor,\n externalId: externalId,\n };\n }\n setPriceInfoList(newList);\n } else {\n setPriceInfoList([\n ...priceInfoList,\n {\n name: event.target.name,\n price: event.target.value.replace(',', '.'),\n priceElementId: priceElementId,\n factor: factor,\n externalId: externalId,\n },\n ]);\n }\n };\n\n const addFornybar = (list) => {\n if (!priceInfoList.some((item) => item.externalId === 'FORNYBAR')) {\n let theList = priceInfoList;\n list.map(\n (item) =>\n (theList = theList.concat({\n name: item.name,\n price: item.pricing.price,\n priceElementId: item.priceElementDefinitionId,\n factor: item.factor,\n externalId: item.externalId,\n })),\n );\n setFornybar(true);\n setPriceInfoList(theList);\n }\n };\n\n const removeFornybar = () => {\n const newList = priceInfoList.filter((item) => item.externalId !== 'FORNYBAR');\n setFornybar(false);\n setPriceInfoList(newList);\n };\n\n const handleBindingTimeChange = (event) => {\n var rgx = '^[0-9]*$';\n if (!event.target.value.match(rgx)) {\n return;\n }\n setOverrideBindingTimeValue(event.target.value);\n };\n\n const handleChangeEHFRecipient = (e) => {\n if (e.target.value.match('^[0-9]{0,9}$')) {\n setEhfRecipient(e.target.value);\n\n if (e.target.value.toString().length !== 0 && e.target.value.toString().length !== 9) {\n setEhfRecipientError(true);\n } else {\n setEhfRecipientError(false);\n }\n } else {\n return;\n }\n };\n const tooOldForTrippel = (id) => {\n if (id === 71 || id === 124) {\n if (state.ssn != null) {\n const personnummer = state.ssn.slice(0, 6);\n if (getAgeFromPersonNr(personnummer) > 65) {\n return true;\n }\n }\n } else {\n return false;\n }\n };\n const getAgeFromPersonNr = (ssn) => {\n const currentYear = new Date().getFullYear().toString();\n let day = ssn.slice(0, 2);\n const month = ssn.slice(2, 4);\n let year = ssn.slice(4, 6);\n\n if (day >= 41) {\n //d-nummer\n day = day - 40;\n }\n\n if (year < currentYear.slice(2, 4)) {\n year = currentYear.slice(0, 2) + year; //futureproof :)\n } else {\n year = currentYear.slice(0, 2) - 1 + year; //futureproof :)\n }\n const birthDate = new Date(`${year}-${month}-${day}`);\n const ageInMilliseconds = new Date() - new Date(birthDate);\n return Math.floor(ageInMilliseconds / 1000 / 60 / 60 / 24 / 365); // convert to years\n };\n\n const isDisabled =\n state.startDate === null ||\n state.invoice === null ||\n state.isCreatingEnergikonto === true ||\n distributionMethod === -1 ||\n (state.productPriceinfo !== null &&\n state.productPriceinfo.name === 'Fastpris' &&\n fixedPriceUsageProfile === null) ||\n priceError;\n\n const handleLivePrice = (addonProductId) => {\n if (isLive(addonProductId) && livePrices === false) {\n const priceElements = state.addonProducts.find((item) => item.id === addonProductId)\n ?.priceInfo?.priceElements;\n if (priceElements) {\n const transformedPriceElements = priceElements.map((p) => ({\n ...p,\n id: p.priceElementDefinitionId,\n priceElementId: p.priceElementDefinitionId,\n price: parseFloat(p.pricing.price) * p.factor,\n chosen: !p.optional || state.brand === 'TKAS',\n }));\n\n dispatch({\n type: 'SET_CHOSEN_ADDON_PRODUCT_PRICE',\n priceElements: transformedPriceElements,\n addonProductId,\n });\n\n setLivePrices(true);\n }\n }\n };\n const handleStromSmartPrices = (addonProductId) => {\n if (isStromSmart(addonProductId, brand) && stromSmartPrices === false) {\n const priceElements = state.addonProducts.find((item) => item.id === addonProductId)\n ?.priceInfo?.priceElements;\n if (priceElements) {\n const transformedPriceElements = priceElements.map((p) => ({\n ...p,\n id: p.priceElementDefinitionId,\n priceElementId: p.priceElementDefinitionId,\n price: parseFloat(p.pricing.price) * p.factor,\n chosen: !p.optional || state.brand === 'TKAS',\n }));\n dispatch({\n type: 'SET_CHOSEN_ADDON_PRODUCT_PRICE',\n priceElements: transformedPriceElements,\n addonProductId,\n });\n setStromSmartPrices(true);\n }\n }\n };\n\n useEffect(() => {\n if (\n chosenAddonProductId !== null &&\n chosenAddonProductId !== undefined &&\n shouldShowPuls(chosenAddonProductId, brand) &&\n campaignOpen === false\n ) {\n setPulsOpen(true);\n }\n }, [chosenAddonProductId, campaignOpen, brand]);\n\n const handlePulsClose = () => {\n setPulsOpen(false);\n };\n\n // remove duplicates in available campaigns on state.powerProducts\n // and wash them against the filtered campaigns\n // { campaignId: number, campaignName: string }\n const powerProductAvailableCampaigns = useMemo(() => {\n const campaigns = state.powerProducts.find((item) => item.id === id)?.availableCampaigns ?? [];\n return campaigns.reduce((acc, campaign) => {\n const matchingFilteredCampaign = state.filteredCampaigns?.find(\n (c) => c.campaignId === campaign.campaignId,\n );\n if (!acc.some((c) => c.campaignId === campaign.campaignId) && matchingFilteredCampaign) {\n return [\n ...acc,\n {\n campaignId: matchingFilteredCampaign.campaignId, //Important. This is the ProductHubId.\n campaignName: campaign.campaignName,\n },\n ];\n }\n return acc;\n }, []);\n }, [state.powerProducts, state.filteredCampaigns, id]);\n\n return (\n \n \n \n \n {updateItem ? updateItem.product : name}\n \n \n \n \n \n \n\n \n\n \n

    \n Velg adresse for avtalen *\n

    \n {state.isPowerStore &&\n state.siteList &&\n state.siteList\n .concat(state.manuallyAddedSites)\n .filter(\n (item) =>\n item.elhubHit === true &&\n (item.meterNumber !== null || item.meterNumber !== '') &&\n !state.activeDeliveryPoints.some((element) => element.meterId === item.meterNumber),\n )\n .map((item, index) => (\n
    \n \n
    \n ))}\n {/* Om man har taggen Elhubhit så skal kun adresser med elhubHit komme opp som alternativ i bestilling. */}\n {!state.isPowerStore &&\n state.siteList &&\n state.siteList\n .concat(state.manuallyAddedSites)\n .filter((item) => item !== null && item !== undefined)\n .map((item, index) =>\n selectedProduct?.tags?.some((tag) => tag === 'ElhubHit') && !item.elhubHit ? (\n \n Produktet kan bare bestilles for anlegg med elhubtreff.\n \n }\n arrow\n >\n
    \n \n
    \n \n ) : (\n
    \n \n
    \n ),\n )}\n {state.chosenAddonProducts.find((p) => isForutsigbarBetaling(p.id)) &&\n state.residence.length > 0 && (\n
    \n Forutsigbar betaling vil gjelde for alle adresser på energikonto:{' '}\n {getAdressesInSameAccount(state)}\n
    \n )}\n\n {selectedProduct?.tags?.some((tag) => tag === 'TOBB') && }\n\n

    Tilleggstjenester

    \n \n {state.addonProducts &&\n state.addonProducts\n .filter((i) => !isPuls(i.id, brand))\n .map((item, index) =>\n tooOldForTrippel(item.id) ? (\n \n Strømforsikring er ikke tilgjengelig for kunder over 65 år.\n \n }\n arrow\n >\n \n \n \n \n ) : (\n \n \n \n ),\n )}\n \n\n \n \n \n \n Velg kampanje for{' '}\n {!_.isEmpty(state?.chosenAddonProducts) &&\n state.chosenAddonProducts.find((item) => item.id === chosenAddonProductId)?.name}\n \n \n \n \n \n \n \n \n \n PULS-måler\n \n \n \n \n \n {chosenAddonProductId != null &&\n !isPowerInsurance(chosenAddonProductId) &&\n (isStromSmart(chosenAddonProductId, brand) ? (\n handleStromSmartPrices(chosenAddonProductId)\n ) : isLive(chosenAddonProductId) ? (\n handleLivePrice(chosenAddonProductId)\n ) : (\n \n \n \n ))}\n\n {state.momentProduct !== null && isBedrift && state.priceListLoading === false ? (\n
    \n

    Prisinformasjon

    \n {state.momentProduct &&\n state.momentProduct?.priceElementDefinitions?.map(\n (item, index) =>\n item.externalId !== 'FORNYBAR' &&\n item.name !== 'Bruddgebyr' &&\n item.name !== 'Variabelt bruddgebyr' && (\n
    \n {item.name === 'Fastpris Strøm' && showAsVariable\n ? 'Variabel strømpris'\n : item.name}\n : {}\n {item.editable ? (\n element.name === item.name)\n ? priceInfoList.find((element) => element.name === item.name) !==\n undefined\n ? priceInfoList.find((element) => element.name === item.name).price\n : item.denomination === 'øre/kWh'\n ? (item.pricing.price * item.factor).toFixed(2)\n : item.pricing.price\n : item.denomination === 'øre/kWh'\n ? (item.pricing.price * item.factor).toFixed(2)\n : item.pricing.price\n }\n className=\"PriceinfoInput\"\n onChange={(e) => handlePriceinfoChange(e, item, false)}\n onBlur={(e) => handlePriceinfoChange(e, item, true)}\n >\n ) : item.denomination === 'øre/kWh' ? (\n (item.pricing.price * item.factor).toFixed(2)\n ) : (\n item.pricing.price\n )}{' '}\n {item.denomination}{' '}\n {priceInfoList.some(\n (element) =>\n element.name === item.name &&\n element.price.toString() !==\n (item.factor === 100\n ? (item.pricing.price * item.factor).toFixed(2).toString()\n : item.pricing.price),\n ) && (\n
    \n {item.denomination === 'øre/kWh'\n ? (item.pricing.price * item.factor).toFixed(2)\n : item.price}{' '}\n {item.denomination}\n
    \n )}\n {item.editable && item.pricing.maxPrice !== null && (\n \n Makspris{' '}\n {item.denomination === 'øre/kWh'\n ? (item.pricing.maxPrice * item.factor).toFixed(2)\n : item.pricing.maxPrice}{' '}\n {item.denomination}\n \n )}\n
    \n ),\n )}\n\n
    \n {state.momentProduct &&\n state.momentProduct?.priceElementDefinitions?.filter(\n (item) => item.externalId === 'FORNYBAR',\n ).length !== 0 &&\n state.momentProduct.priceElementDefinitions.filter(\n (item) => item.externalId === 'FORNYBAR',\n )[0].optional === true && (\n
    \n Fornybar: {}\n \n addFornybar(\n state.momentProduct.priceElementDefinitions.filter(\n (item) => item.externalId === 'FORNYBAR',\n ),\n )\n }\n >\n Ja\n \n \n Nei\n \n {' '}Pris:{' '}\n {calculateFornybar(\n state.momentProduct.priceElementDefinitions.filter(\n (item) => item.externalId === 'FORNYBAR',\n ),\n )}{' '}\n øre/kWh\n {' '}{' '}\n {calculateFornybar(\n state.momentProduct.priceElementDefinitions.filter(\n (item) => item.externalId !== 'FORNYBAR',\n ),\n ) === 0 &&\n ' (' +\n calculateFornybar(\n state.momentProduct.priceElementDefinitions.filter(\n (item) => item.externalId === 'FORNYBAR',\n ),\n ) +\n 'øre/kWh totalt)'}\n
    \n )}\n
    \n {state.momentProduct &&\n (state.momentProduct?.productDefinitionId === 25439 ||\n state.momentProduct?.productDefinitionId === 1002607) && (\n <>\n \n

    Fastpris

    \n
    \n handleFixedPriceVolume(e)}\n />\n handleFixedPriceComment(e)}\n />\n handleFixedPriceEndDateSelect(e)}\n />\n handleSelectedComponent(e)}\n />\n
    \n \n )}\n\n
    \n

    Bindingstid

    \n {state.productPriceinfo && state.productPriceinfo.minimumTermMonths !== null && (\n
    \n
    \n {`Bindingstid på produktet: ${\n bindingTime\n ? overrideBindingTimeValue\n : state.productPriceinfo.minimumTermMonths * 30\n } dager`}\n
    \n
    \n {state.productPriceinfo.overrideMinimumTerm === true && (\n
    \n {`Overstyr bindingstid på produktet: `}\n setBindingTime(true)}\n >\n Ja\n \n setBindingTime(false)}\n >\n Nei\n \n {bindingTime && (\n
    \n Antall dager bindingstid:{' '}\n handleBindingTimeChange(e)}\n />\n
    \n )}\n
    \n )}\n
    \n
    \n )}\n
    \n
    \n ) : (\n isBedrift && (\n
    \n

    Prisinformasjon

    \n \n

    Finner prisinformasjon...

    \n
    \n )\n )}\n {/*IRISK IDs*/}\n {isBedrift && selectedProduct?.tags?.some((item) => item === 'IRisk') && (\n <>\n \n \n IRisk\n \n \n \n {state.iRiskLoading ? (\n \n ) : (\n <>\n iriskChange(e)}\n name=\"iRiskDealId\"\n variant=\"outlined\"\n label=\"IRiskDealID\"\n sx={styleOutline}\n InputLabelProps={{\n shrink: true,\n disableAnimation: true,\n style: {\n fontSize: 17,\n fontWeight: 'bolder',\n color: '#000',\n },\n }}\n />\n iriskChange(e)}\n name=\"iRiskGroupId\"\n variant=\"outlined\"\n label=\"IRiskGroupID\"\n key=\"IRiskGroupID\"\n sx={styleOutline}\n display=\"inline-flex\"\n InputLabelProps={{\n shrink: true,\n disableAnimation: true,\n style: {\n fontSize: 17,\n fontWeight: 'bolder',\n color: '#000',\n },\n }}\n />\n \n \n Opprett GroupID\n \n \n {state.iRiskAlert === true && 'yay'}\n {state.iRiskAlert === false && 'nay'}\n \n )}\n \n \n )}\n
    \n

    Kampanje

    \n \n {powerProductAvailableCampaigns.map((item, index) => (\n \n ))}\n \n
    \n\n

    \n Fakturaavtale*\n

    \n \n \n \n \n\n {state.invoice && state.invoice.name === 'Eksisterende fakturaavtale' && (\n \n {state.accountIds.map((item, index) => (\n \n \n \n ))}\n \n )}\n\n

    \n Distribusjonsmetode*\n

    \n \n {state.invoice && state.invoice.name === 'Eksisterende fakturaavtale' && (\n \n )}\n \n {}\n {isBedrift ? (\n \n ) : (\n \n )}\n \n \n {state.chosenDistributionMethod === 4 && isBedrift && (\n
    \n

    \n \n
    \n )}\n

    \n Oppstartsdato*\n

    \n \n {!state.isPowerStore && (\n \n )}\n \n \n\n {state.startDate && state.startDate.name === 'Oppstartsdato' && (\n
    \n

    Velg dato for oppstart

    \n handleDateSelect(date)} //when day is clicked\n className=\"datePicker\"\n locale=\"nb\"\n dateFormat=\"P\"\n />\n
    \n )}\n\n {isBedrift && }\n\n {/* {isBedrift &&\n
    \n

    Bindingstid

    \n \n \n \n \n \n {(state.bindingTime && state.bindingTime.name === 'Velg') &&\n \n \n \n \n }\n
    \n } */}\n\n {isSasBonusProduct && (\n \n

    SAS EuroBonus nummer

    \n \n
    \n )}\n {updateItem ? (\n \n Oppdater bestilling\n \n ) : (\n \n Legg i bestilling\n \n )}\n
    \n \n );\n}\n\nconst styleOutline = {\n '& .MuiOutlinedInput-root': {\n '&.Mui-focused fieldset': {\n borderColor: 'black',\n },\n marginRight: 2,\n },\n};\n\nconst style = {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n width: 400,\n bgcolor: 'background.paper',\n border: '2px solid #000',\n boxShadow: 24,\n p: 4,\n};\n\nconst iriskTheme = createTheme({\n components: {\n MuiButton: {\n styleOverrides: {\n root: {\n backgroundColor: '#FF5500',\n color: '#fff',\n paddingRight: 17,\n fontSize: 12,\n\n marginLeft: 5,\n textTransform: 'none',\n borderRadius: 25,\n boxShadow: 20,\n cursor: 'pointer',\n '&:hover': {\n backgroundColor: '#72A138',\n color: '#fff',\n },\n },\n },\n },\n },\n});\n\nexport default AddPowerOrder;\n","import { useSelector } from 'react-redux';\nimport InputLabel from '@mui/material/InputLabel';\nimport MenuItem from '@mui/material/MenuItem';\nimport FormControl from '@mui/material/FormControl';\nimport Select from '@mui/material/Select';\n\nfunction ExtraProductSelector({ extraProducts, setExtraProducts }) {\n const state = useSelector((state) => state.reducer);\n\n const addExtraProduct = (extraProduct) => {\n setExtraProducts(extraProducts.concat(extraProduct));\n };\n\n return (\n \n \n Tilleggsprodukter\n \n \n \n );\n}\n\nexport default ExtraProductSelector;\n","import List from '@mui/material/List';\nimport ListItem from '@mui/material/ListItem';\nimport ListItemAvatar from '@mui/material/ListItemAvatar';\nimport ListItemText from '@mui/material/ListItemText';\nimport Avatar from '@mui/material/Avatar';\nimport IconButton from '@mui/material/IconButton';\nimport DeleteIcon from '@mui/icons-material/Delete';\nimport AddShoppingCartIcon from '@mui/icons-material/AddShoppingCart';\n\nfunction ExtraProductList({ extraProducts, setExtraProducts }) {\n const deleteExtraProduct = (index) => {\n var array = [...extraProducts]; // make a separate copy of the array\n if (index !== -1) {\n array.splice(index, 1);\n setExtraProducts(array);\n }\n };\n\n return (\n \n {extraProducts.length > 0 &&\n extraProducts.map((item, index) => (\n deleteExtraProduct(index)}>\n \n \n }\n >\n \n \n \n \n \n \n \n ))}\n \n );\n}\n\nexport default ExtraProductList;\n","import { useState } from 'react';\nimport { useSelector } from 'react-redux';\nimport InputLabel from '@mui/material/InputLabel';\nimport MenuItem from '@mui/material/MenuItem';\nimport FormControl from '@mui/material/FormControl';\nimport Select from '@mui/material/Select';\nimport { Alert } from '@mui/material';\n\nfunction CampaignSelector({ campaigns, setCampaigns, mobileProduct = null }) {\n const state = useSelector((state) => state.reducer);\n const [onlyOneAlert, setOnlyOneAlert] = useState(false);\n\n const addCampaign = (campaign) => {\n if (campaigns.length === 0) {\n setOnlyOneAlert(false);\n setCampaigns(campaigns.concat(campaign));\n } else {\n setOnlyOneAlert(true);\n }\n };\n\n const filteredCampaigns =\n state.mobileCampaigns &&\n state.mobileCampaigns?.filter((campaign) => {\n const campaignGb = parseInt(campaign.name.match(/\\d+GB/i)?.[0]?.match(/\\d+/)?.[0] ?? 0, 10);\n const isCampaignWithStromfordel = campaign.name?.includes('Strømfordel');\n const isMobileProductWithStromfordel = mobileProduct?.includes('GB');\n\n if (isMobileProductWithStromfordel && isCampaignWithStromfordel) {\n const match = mobileProduct?.match(/(\\d+)s*/i);\n if (match) {\n const number = parseInt(match[1], 10);\n return campaignGb === number;\n } else {\n return false;\n }\n }\n return (\n (!isMobileProductWithStromfordel && !isCampaignWithStromfordel) ||\n (!isCampaignWithStromfordel && !campaigns.some((elem) => elem.id === campaign.id))\n );\n });\n\n return (\n <>\n \n \n Kampanjer\n \n \n \n {onlyOneAlert && (\n \n Kan bare velge en kampanje per hovedprodukt\n \n )}\n \n );\n}\n\nexport default CampaignSelector;\n","import List from '@mui/material/List';\nimport ListItem from '@mui/material/ListItem';\nimport ListItemAvatar from '@mui/material/ListItemAvatar';\nimport ListItemText from '@mui/material/ListItemText';\nimport Avatar from '@mui/material/Avatar';\nimport IconButton from '@mui/material/IconButton';\nimport DeleteIcon from '@mui/icons-material/Delete';\nimport AddShoppingCartIcon from '@mui/icons-material/AddShoppingCart';\n\nfunction CampaignList({ campaigns, setCampaigns }) {\n const deleteCampaign = (index) => {\n var array = [...campaigns]; // make a separate copy of the array\n if (index !== -1) {\n array.splice(index, 1);\n setCampaigns(array);\n }\n };\n\n return (\n \n {campaigns.length > 0 &&\n campaigns.map((item, index) => (\n deleteCampaign(index)}>\n \n \n }\n >\n \n \n \n \n \n \n \n ))}\n \n );\n}\n\nexport default CampaignList;\n","export const InvoicePrices = {\n Paper: 8.32,\n MobilePaper: 8.04\n };","import { useMemo, useState } from 'react';\nimport Dialog from '@mui/material/Dialog';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport CloseIcon from '@mui/icons-material/Close';\nimport Divider from '@mui/material/Divider';\nimport Grid from '@mui/material/Grid';\nimport 'react-datepicker/dist/react-datepicker.css';\nimport '../../Stylesheets/AddProducts/AddPowerOrder.css';\nimport { registerLocale } from 'react-datepicker';\nimport nb from 'date-fns/locale/nb';\nimport TrapFocus from '@mui/base/TrapFocus';\nimport Button from '@mui/material/Button';\nimport { useDispatch, useSelector } from 'react-redux';\nimport ACTIONS from '../../Redux/Actions';\nimport '../../Stylesheets/AddMobileProducts/AddMobileOrder.css';\nimport Box from '@mui/material/Box';\nimport InputLabel from '@mui/material/InputLabel';\nimport MenuItem from '@mui/material/MenuItem';\nimport FormControl from '@mui/material/FormControl';\nimport Select from '@mui/material/Select';\nimport Typography from '@mui/material/Typography';\nimport List from '@mui/material/List';\nimport ListItem from '@mui/material/ListItem';\nimport ListItemAvatar from '@mui/material/ListItemAvatar';\nimport ListItemText from '@mui/material/ListItemText';\nimport IconButton from '@mui/material/IconButton';\nimport DeleteIcon from '@mui/icons-material/Delete';\nimport Avatar from '@mui/material/Avatar';\nimport PersonIcon from '@mui/icons-material/Person';\nimport ExtraProductSelector from './ExtraProductSelector';\nimport ExtraProductList from './ExtraProductList';\nimport { Radio, RadioGroup } from '@mui/material';\nimport moment from 'moment';\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport DatePicker from 'react-datepicker';\nimport {\n calcWorkingDays,\n CHOSEN_DISTRIBUTION_METHOD,\n isHoliday,\n} from '../../utils/helperFunctions';\nimport { getIsActiveMobile } from '../../Redux/ApiCalls';\nimport Alert from '@mui/material/Alert';\nimport CampaignSelector from './CampaignSelector';\nimport CampaignList from './CampaignList';\nimport { InvoicePrices } from '../../utils/Prices';\nimport { is } from 'date-fns/locale';\nimport { isDate } from 'lodash';\nregisterLocale('nb', nb);\n\nfunction AddMobileOrder({ openMobile, handleCloseMobile, id, name }) {\n const state = useSelector((state) => state.reducer);\n const [users, setUsers] = useState([]);\n const [filterList, setFilterList] = useState([]);\n const dispatch = useDispatch();\n const [choosenDistribution, setChoosenDistribution] = useState(\n state.mobileOrders.length > 0 ? state.mobileOrders[0].DistributionMethodEnum : '2',\n );\n const eInvoiceRefFound = useMemo(() => state.eInvoice?.found ?? false, [state.eInvoice]);\n const product = state.mobileProducts.find((item) => item.id === id);\n const [showUngAlert, setShowUngAlert] = useState(false);\n const [extraProducts, setExtraProducts] = useState([]);\n const today = new Date();\n const thirtyYearsAgo = new Date(new Date().setYear(today.getFullYear() - 30));\n const [startDate, setStartDate] = useState(null);\n const [portingDate, setPortingDate] = useState({\n type: 'default',\n date:\n state.defaultPortingDate !== null\n ? moment(state.defaultPortingDate)\n : calcWorkingDays(new Date(), 8),\n });\n const [isAlreadyActive, setIsAlreadyActive] = useState(false);\n const [isAlreadyActiveLoading, setIsAlreadyActiveLoading] = useState(false);\n const [campaigns, setCampaigns] = useState([]);\n\n const close = () => {\n setShowUngAlert(false);\n setIsAlreadyActive(false);\n setUsers([]);\n setExtraProducts([]);\n setStartDate(null);\n setPortingDate({\n type: 'default',\n date:\n state.defaultPortingDate !== null\n ? moment(state.defaultPortingDate)\n : calcWorkingDays(new Date(), 8),\n });\n setFilterList([]);\n handleCloseMobile();\n setCampaigns([]);\n };\n\n const handleAddMobileOrder = () => {\n const invoiceAdress = state.siteList.filter((site) => site.foundInPublicRegistry);\n const name = state.name.split(' ');\n const order = {\n SSN: state.ssn,\n FullName: state.name,\n FirstName: name[0].trim(),\n LastName: name.slice(1).join(' ').trim(),\n Phone: state.phone,\n Email: state.email,\n Address: invoiceAdress.address,\n ZipCode: invoiceAdress.zipCode,\n City: state.InvoiceCity,\n DistributionMethodEnum: choosenDistribution,\n Users: users.map((user) => {\n return {\n isOwner: user.isOwner,\n BirthDate: user.birthDate,\n Email: user.email,\n Product: user.product,\n Campaigns: campaigns,\n MobileNumber: user.newNumber ? null : user.phoneNumber,\n ExtraProducts: extraProducts,\n FirstName: user.name.split(' ')[0].trim(),\n LastName: user.name.split(' ').slice(1).join(' ').trim(),\n PortingDate: portingDate.date,\n Name: user.name,\n NewNumber: user.newNumber,\n };\n }),\n BrandID: 1,\n Seller: state.seller,\n Store: state.store,\n SalesTypeId: 1,\n EInvoiceReference: eInvoiceRefFound ? state.eInvoice.reference : null,\n InvoiceCity: state.InvoiceCity,\n };\n\n if (users.length > 0) {\n dispatch({\n type: ACTIONS.ADD_TO_MOBILE_ORDERS,\n payload: order,\n });\n dispatch({ type: 'SET_ORDER_INITIATED', orderInitiated: true });\n close();\n }\n setUsers([]);\n setExtraProducts([]);\n setStartDate(null);\n setPortingDate({\n type: 'default',\n date:\n state.defaultPortingDate !== null\n ? moment(state.defaultPortingDate)\n : calcWorkingDays(new Date(), 8),\n });\n setFilterList([]);\n };\n\n const switchDistributionEnum = (id) => {\n switch (id) {\n case '1':\n return `Post (${InvoicePrices.MobilePaper} kr/faktura)`;\n case '5':\n return 'Elektronisk (0 kr/faktura';\n default:\n return 'Allerede valgt';\n }\n };\n\n const deleteUser = (object, i) => {\n setFilterList(filterList.filter((element) => element === object));\n setUsers(users.filter((item, index) => index !== i));\n };\n\n async function addUser(item, index) {\n if (\n product.name.startsWith('Ung') &&\n moment(item.birthDate, 'DD.MM.YYYY') < moment(thirtyYearsAgo)\n ) {\n setShowUngAlert(true);\n } else if (!item.newNumber) {\n setIsAlreadyActiveLoading(true);\n let isActive = await dispatch(getIsActiveMobile(state.orderModuleApiUrl, item.phoneNumber));\n if (isActive) {\n setIsAlreadyActive(true);\n setIsAlreadyActiveLoading(false);\n } else {\n setShowUngAlert(false);\n setIsAlreadyActive(false);\n setFilterList(filterList.concat(item));\n setUsers(\n users.concat({\n name: item.firstName + ' ' + item.lastName,\n birthDate: item.birthDate,\n email: item.email,\n phoneNumber: item.newNumber ? null : item.phoneNumber,\n newNumber: item.newNumber,\n product: product,\n extraProducts: [],\n isOwner: item.header === 'Abonnementseier' ? true : false,\n portingDate: {\n type: 'default',\n date:\n state.defaultPortingDate !== null\n ? moment(state.defaultPortingDate)\n : calcWorkingDays(new Date(), 8),\n },\n }),\n );\n setIsAlreadyActiveLoading(false);\n }\n } else {\n if (!filterList.some((element) => element === item)) {\n setShowUngAlert(false);\n setIsAlreadyActive(false);\n setFilterList(filterList.concat(item));\n setUsers(\n users.concat({\n name: item.firstName + ' ' + item.lastName,\n birthDate: item.birthDate,\n email: item.email,\n phoneNumber: item.newNumber ? null : item.phoneNumber,\n newNumber: item.newNumber,\n product: product,\n extraProducts: [],\n isOwner: item.header === 'Abonnementseier' ? true : false,\n portingDate: {\n type: 'default',\n date:\n state.defaultPortingDate !== null\n ? moment(state.defaultPortingDate)\n : calcWorkingDays(new Date(), 8),\n },\n }),\n );\n }\n }\n }\n\n const handleDateSelect = (date) => {\n setStartDate(new Date(date));\n setPortingDate({ type: 'custom', date: date });\n };\n\n const isWeekday = (date) => {\n const day = date.getDay();\n return day !== 0 && day !== 6;\n };\n const nonWorkingDays = (date) => {\n return !isHoliday(date) && isWeekday(date);\n };\n\n return (\n \n \n \n \n \n

    \n {name} {product.recPrice && '(' + product.recPrice + ' kr/mnd)'}\n

    \n
    \n
    \n \n \n \n
    \n\n \n \n \n Brukere\n \n Brukere\n \n \n {showUngAlert && (\n \n *Kan ikke bestille Ung abonnementer for personer over 30 år\n \n )}\n {isAlreadyActive && (\n \n *Mobilnummeret er allerede aktivt\n \n )}\n \n {isAlreadyActiveLoading && (\n Sjekker om nummeret er aktivt\n )}\n {users.map((item, index) => (\n deleteUser(item, index)}\n >\n \n \n }\n >\n \n \n \n \n \n \n \n ))}\n \n \n \n \n Kampanjer\n \n \n \n \n \n \n \n \n \n \n Tilleggsprodukter\n \n \n \n \n \n \n \n \n \n \n {users.some((user) => user.phoneNumber != null) && (\n <>\n \n Oppstartsdato\n \n \n setPortingDate({\n type: e.target.value,\n date:\n e.target.value === 'default'\n ? state.defaultPortingDate !== null\n ? moment(state.defaultPortingDate)\n : calcWorkingDays(new Date(), 8)\n : startDate,\n })\n }\n >\n }\n label={'8 virkedager frem i tid'}\n />\n }\n label={'Egendefinert'}\n />\n \n\n {portingDate.type === 'custom' && (\n handleDateSelect(date)} //when day is clicked\n className=\"datePickerMobile\"\n locale=\"nb\"\n dateFormat=\"P\"\n popperPlacement=\"top-end\"\n maxDate={calcWorkingDays(new Date(), 60)}\n minDate={calcWorkingDays(new Date(), 8)}\n filterDate={nonWorkingDays}\n />\n )}\n {portingDate.type === 'default' && (\n \n {calcWorkingDays(portingDate.date).format('DD/MM/YYYY')}\n \n )}\n \n )}\n \n \n Distribusjonsmetode\n \n <>\n {state.mobileOrders.length > 0 ? (\n switchDistributionEnum(state.mobileOrders[0].DistributionMethodEnum)\n ) : (\n <>\n setChoosenDistribution(e.target.value)}\n >\n {eInvoiceRefFound && (\n }\n label={'eFaktura'}\n />\n )}\n {!eInvoiceRefFound && (\n }\n label={'E-post'}\n />\n )}\n }\n label={'Post'}\n />\n \n \n {choosenDistribution === '1' ? InvoicePrices.MobilePaper + ' kr/faktura' : '0 kr/faktura'}\n \n \n \n )}\n \n\n {users.length > 0 && (\n \n Legg til i bestilling\n \n )}\n \n \n
    \n );\n}\n\nexport default AddMobileOrder;\n","import { useEffect, useState } from 'react';\nimport Dialog from '@mui/material/Dialog';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport CloseIcon from '@mui/icons-material/Close';\nimport Divider from '@mui/material/Divider';\nimport Grid from '@mui/material/Grid';\nimport { useDispatch, useSelector } from 'react-redux';\nimport ResidenceContainerModal from './ResidenceContainerModal';\nimport AddonProductContainer from './AddonProductContainer';\nimport * as _ from 'lodash';\nimport 'react-datepicker/dist/react-datepicker.css';\nimport '../../Stylesheets/AddProducts/AddPowerOrder.css';\nimport DatePicker, { registerLocale } from 'react-datepicker';\nimport nb from 'date-fns/locale/nb';\nimport {\n addToExistingIrisk,\n getAddonProductPriceInfo,\n getProductFromMoment,\n getProductPresentationFromMoment,\n} from '../../Redux/ApiCalls';\nimport AddonProductCampaignContainerModal from './AddonProductCampaignContainerModal';\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport Modal from '@mui/material/Modal';\nimport ACTIONS from '../../Redux/Actions';\nimport {\n CHOSEN_DISTRIBUTION_METHOD,\n getAdressesInSameAccount,\n isCampaignProduct,\n} from '../../utils/helperFunctions';\nimport {\n getAgeFromSSN,\n isForutsigbarBetaling,\n isLive,\n isStromSmart,\n shouldShowPuls,\n isPuls,\n} from '../../utils/Methods';\nimport Tooltip from '@mui/material/Tooltip';\nimport StartDateContainerModal from './StartDateContainerModal';\nimport { AddonProductPriceDialog } from './AddonProductPriceDialog';\nimport AddonPulsContainerModal from './AddonPulsContainerModal';\n\nregisterLocale('nb', nb);\n\nfunction AddAddonOrder({ open, handleClose, updateItem, updateIndex, id }) {\n const state = useSelector((state) => state.reducer);\n const dispatch = useDispatch();\n const [eBNumber, setEbNumber] = useState(updateItem?.eBNumber ?? '');\n const bonusCampaigns = useSelector((state) => state.reducer.bonusCampaigns);\n const [campaignOpen, setCampaignOpen] = useState(false);\n const [addonPriceInfoOpen, setAddonPriceInfoOpen] = useState(false);\n const [chosenAddonProductId, setChosenAddonProductId] = useState();\n const [startDate, setStartDate] = useState(null);\n const distributionMethod = state.chosenDistributionMethod;\n const [priceInfoList, setPriceInfoList] = useState([]);\n const [iRiskDealID, setIRiskDealID] = useState('');\n const [iRiskGroupID, setIRiskGroupID] = useState('');\n const [showAsVariable, setShowAsVariable] = useState(false);\n const name = 'Tilleggstjeneste';\n const [livePrices, setLivePrices] = useState(false);\n const [stromSmartPrices, setStromSmartPrices] = useState(false);\n const [pulsOpen, setPulsOpen] = useState(false);\n\n const brand = state.brand ?? 'FKAS';\n\n useEffect(() => {\n setEbNumber(updateItem?.eBNumber ?? '');\n }, [updateItem]);\n\n useEffect(() => {\n if (open) {\n dispatch(getAddonProductPriceInfo(state.orderModuleApiUrl, id));\n setPriceInfoList([]);\n dispatch({\n type: 'SET_INVOICE',\n invoice: { name: 'Eksisterende', accountId: null, refId: null },\n });\n dispatch({\n type: ACTIONS.SET_CHOSEN_DISTRIBUTION_METHOD,\n payload: CHOSEN_DISTRIBUTION_METHOD.sameAsBefore,\n });\n }\n // eslint-disable-next-line\n }, [open]);\n\n useEffect(() => {\n open &&\n state.productPriceinfo &&\n dispatch(\n getProductFromMoment(state.conductorUrl, state.productPriceinfo?.externalId, state.brand),\n );\n open &&\n state.productPriceinfo &&\n dispatch(\n getProductPresentationFromMoment(\n state.conductorUrl,\n state.productPriceinfo?.externalId,\n state.brand,\n ),\n );\n // eslint-disable-next-line\n }, [state.productPriceinfo]);\n\n useEffect(() => {\n open &&\n state.momentProductPresentation &&\n setShowAsVariable(\n state.momentProductPresentation.priceElements.some(\n (item) => item.name === 'Variabel Strømpris',\n ),\n );\n // eslint-disable-next-line\n }, [state.momentProductPresentation]);\n\n const handleConfirmPriceInfo = (addonProductId) => {\n setAddonPriceInfoOpen(false);\n if (isCampaignProduct(addonProductId)) {\n setCampaignOpen(true);\n }\n };\n\n const handleLivePrice = (addonProductId) => {\n if (isLive(addonProductId) && livePrices === false) {\n const priceElements = state.addonProducts.find((item) => item.id === addonProductId)\n ?.priceInfo?.priceElements;\n if (priceElements) {\n const transformedPriceElements = priceElements.map((p) => ({\n ...p,\n id: p.priceElementDefinitionId,\n priceElementId: p.priceElementDefinitionId,\n price: parseFloat(p.pricing.price) * p.factor,\n chosen: !p.optional || state.brand === 'TKAS',\n }));\n\n dispatch({\n type: 'SET_CHOSEN_ADDON_PRODUCT_PRICE',\n priceElements: transformedPriceElements,\n addonProductId,\n });\n\n setLivePrices(true);\n }\n }\n };\n const handleStromSmartPrices = (addonProductId) => {\n if (isStromSmart(addonProductId, brand) && stromSmartPrices === false) {\n const priceElements = state.addonProducts.find((item) => item.id === addonProductId)\n ?.priceInfo?.priceElements;\n if (priceElements) {\n const transformedPriceElements = priceElements.map((p) => ({\n ...p,\n id: p.priceElementDefinitionId,\n priceElementId: p.priceElementDefinitionId,\n price: parseFloat(p.pricing.price) * p.factor,\n chosen: !p.optional || state.brand === 'TKAS',\n }));\n dispatch({\n type: 'SET_CHOSEN_ADDON_PRODUCT_PRICE',\n priceElements: transformedPriceElements,\n addonProductId,\n });\n setStromSmartPrices(true);\n }\n }\n };\n useEffect(() => {\n if (\n chosenAddonProductId !== null &&\n chosenAddonProductId !== undefined &&\n shouldShowPuls(chosenAddonProductId, brand) &&\n campaignOpen === false\n ) {\n setPulsOpen(true);\n }\n }, [chosenAddonProductId, campaignOpen, brand]);\n\n const handleDateSelect = (date) => {\n setStartDate(new Date(date));\n dispatch({\n type: 'SET_START_DATE',\n startDate: { name: 'Oppstartsdato', date: new Date(date) },\n });\n };\n\n const addOrder = () => {\n if (iRiskGroupID !== '' && iRiskDealID !== '') {\n addToExistingPlis();\n }\n\n let bonusCampaignDtos =\n bonusCampaigns?.map((bc) => ({\n id: bc.id,\n bonusTypeId: bc.bonusTypeId,\n })) ?? null;\n\n dispatch({ type: 'SET_ORDER_INITIATED', orderInitiated: true });\n state.residence.forEach((element) => {\n let foundSiteList = state.siteList.filter((s) => s.meterPointId === element.malepunktID);\n const selectedAccount =\n state.activeDeliveryPoints?.find((p) => p.reference === element.malepunktID) ?? null;\n return dispatch({\n type: 'ADD_TO_ADDON_ORDERS',\n addonOrders: {\n id: chosenAddonProductId,\n product: name,\n address: element.address,\n zipCode: element.zipCode,\n city: element.city,\n meterIdentification: element.malernummer,\n meteringPointIdentification: element.malepunktID,\n extraProducts: state.chosenAddonProducts,\n invoice: {\n ...state.invoice,\n accountId: selectedAccount?.energiKontoNummer ?? null,\n },\n startDate: state.startDate,\n productCampaign: state.productCampaign,\n eBNumber: eBNumber,\n bonusCampaigns: bonusCampaignDtos,\n priceElementList: priceInfoList,\n priceInfo: state.productPriceinfo,\n priceInfoElCert: state.productPriceInfoElCert,\n priceInfoMoment: state.momentProduct,\n minimumTermDays: null,\n thirdPartyEhf: null,\n invoiceLabel: element.invoiceLabel,\n iRiskDealID: iRiskDealID,\n iRiskGroupID: iRiskGroupID,\n siteInfo: foundSiteList.length > 0 ? foundSiteList[0] : null,\n showAsVariable: showAsVariable,\n },\n });\n });\n dispatch({ type: 'RESET_RESIDENCE' });\n setEbNumber('');\n handleClose();\n };\n\n const addToExistingPlis = () => {\n dispatch(addToExistingIrisk(state.orderModuleApiUrl, iRiskDealID, iRiskGroupID));\n };\n\n useEffect(() => {\n setIRiskGroupID(state.retrievedIRiskGroupId);\n }, [state.retrievedIRiskGroupId]);\n\n const updateOrder = () => {\n let bonusCampaignDtos =\n bonusCampaigns?.map((bc) => ({\n id: bc.id,\n bonusTypeId: bc.bonusTypeId,\n })) ?? null;\n dispatch({\n type: 'UPDATE_POWER_ORDER',\n item: {\n id: updateItem.id,\n product: updateItem.product,\n address: state.residence[0].address,\n zipCode: state.residence[0].zipCode,\n city: state.residence[0].city,\n meterIdentification: state.residence[0].malernummer,\n meteringPointIdentification: state.residence[0].malepunktID,\n extraProducts: state.chosenAddonProducts,\n invoice: state.invoice,\n startDate: state.startDate,\n productCampaign: state.productCampaign,\n eBNumber: eBNumber,\n bonusCampaigns: bonusCampaignDtos,\n priceElementList: priceInfoList,\n priceInfo: state.productPriceinfo,\n priceInfoElCert: state.productPriceInfoElCert,\n priceInfoMoment: state.momentProduct,\n minimumTermDays: null,\n iRiskDealID: null,\n iRiskGroupID: iRiskGroupID,\n thirdPartyEhf: null,\n invoiceLabel: state.residence[0].invoiceLabel,\n },\n index: updateIndex,\n });\n setEbNumber('');\n handleClose();\n };\n\n const handleCampaignClose = () => {\n setCampaignOpen(false);\n };\n const handlePulsClose = () => {\n setPulsOpen(false);\n };\n\n const tooOldForTrippel = (id) => {\n if (id === 71 || id === 124) {\n if (state.ssn != null) {\n const personnummer = state.ssn.slice(0, 6);\n if (getAgeFromSSN(personnummer) > 65) {\n return true;\n }\n }\n } else {\n return false;\n }\n };\n\n const onlySteddi = () => state.chosenAddonProducts?.every((p) => isForutsigbarBetaling(p.id));\n\n return (\n \n \n \n \n {name}\n \n \n \n \n \n \n\n \n\n \n

    \n Velg adresse for avtalen *\n

    \n {state.isPowerStore &&\n state.siteList &&\n state.siteList.concat(state.manuallyAddedSites).map((item, index) => (\n
    \n \n
    \n ))}\n {!state.isPowerStore &&\n state.siteList &&\n state.siteList.concat(state.manuallyAddedSites).map((item, index) => (\n
    \n \n
    \n ))}\n {state.chosenAddonProducts.find((p) => isForutsigbarBetaling(p.id)) &&\n state.residence.length > 0 && (\n
    \n Forutsigbar betaling vil gjelde for alle adresser på energikonto:{' '}\n {getAdressesInSameAccount(state)}\n
    \n )}\n

    \n Tilleggstjenester*\n

    \n \n {state.addonProducts &&\n state.addonProducts\n .filter((item) => item.id === id)\n .map((item, index) => {\n const tooOld = tooOldForTrippel(item.id);\n const addonContainer = (\n \n \n \n );\n\n return tooOld ? (\n \n Strømforsikring er ikke tilgjengelig for kunder over 65 år.\n \n }\n arrow\n >\n {addonContainer}\n \n ) : (\n addonContainer\n );\n })}\n \n \n \n \n \n Velg kampanje for{' '}\n {!_.isEmpty(state?.chosenAddonProducts) &&\n state.chosenAddonProducts.find((item) => item.id === chosenAddonProductId)?.name}\n \n \n \n \n \n \n \n \n \n PULS-måler\n \n \n \n \n \n {chosenAddonProductId && (\n \n {isLive(chosenAddonProductId) ? (\n handleLivePrice(chosenAddonProductId)\n ) : isStromSmart(chosenAddonProductId, brand) ? (\n handleStromSmartPrices(chosenAddonProductId)\n ) : (\n \n )}\n \n )}\n

    \n Oppstartsdato*\n

    \n \n {onlySteddi() ? (\n <>\n \n \n ) : (\n <>\n \n \n \n )}\n \n {state.startDate && state.startDate.name === 'Oppstartsdato' && (\n
    \n

    Velg dato for oppstart

    \n handleDateSelect(date)} //when day is clicked\n className=\"datePicker\"\n locale=\"nb\"\n dateFormat=\"P\"\n />\n
    \n )}\n {updateItem ? (\n \n Oppdater bestilling\n \n ) : (\n \n Legg i bestilling\n \n )}\n
    \n \n );\n}\n\nconst style = {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n width: 400,\n bgcolor: 'background.paper',\n border: '2px solid #000',\n boxShadow: 24,\n p: 4,\n};\n\nexport default AddAddonOrder;\n","import { useEffect } from 'react';\nimport { getBonusCampaignsByTags } from '../../Redux/ApiCalls';\nimport ACTIONS from '../../Redux/Actions';\nimport { getAdressesInSameAccount } from '../../utils/helperFunctions';\nimport { useDispatch, useSelector } from 'react-redux';\nimport Grid from '@mui/material/Grid';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport CloseIcon from '@mui/icons-material/Close';\nimport DialogContent from '@mui/material/DialogContent';\nimport ResidenceContainerModal from './ResidenceContainerModal';\nimport Divider from '@mui/material/Divider';\nimport Dialog from '@mui/material/Dialog';\nimport { isMarketplaceExtraProduct } from '../../utils/Methods';\n\nfunction AddMarketplaceOrder({ open, handleClose, id, name, updateItem, updateIndex }) {\n const state = useSelector((state) => state.reducer);\n const dispatch = useDispatch();\n const selectedProduct =\n useSelector((state) => state.reducer.addonProducts)?.find(\n (product) => product?.id === id || updateItem?.id,\n ) ?? null;\n //const distributionMethod = state.chosenDistributionMethod;\n // needed?\n useEffect(() => {\n if (\n open &&\n selectedProduct?.tags !== undefined &&\n selectedProduct?.tags !== null &&\n selectedProduct.tags.length > 0\n ) {\n dispatch(getBonusCampaignsByTags(state.conductorUrl, selectedProduct.tags));\n }\n }, [open, selectedProduct, state.conductorUrl, dispatch]);\n const addOrder = () => {\n dispatch({ type: 'SET_ORDER_INITIATED', orderInitiated: true });\n state.residence.forEach((element) => {\n return dispatch({\n type: 'ADD_MARKETPLACE_ORDER',\n marketplaceOrder: {\n id: id,\n name: selectedProduct.name,\n sku: selectedProduct.name,\n amount: 1,\n shippingAddress: element.address,\n shippingPostCode: element.zipCode,\n shippingCity: element.city,\n },\n });\n });\n if (state.chosenDistributionMethod === -1) {\n dispatch({ type: ACTIONS.SET_CHOSEN_DISTRIBUTION_METHOD, payload: 0 });\n }\n dispatch({ type: 'RESET_RESIDENCE' });\n handleClose();\n };\n /*const updateOrder = () => {\n dispatch({\n type: \"UPDATE_MARKETPLACE_ORDER\",\n item: {\n },\n index: updateIndex // needed??\n })\n handleClose()\n }*/\n return (\n \n \n \n \n {name}\n \n \n \n \n \n \n \n \n

    \n Velg adresse å sende tilbud til*\n

    \n {state.siteList.concat(state.manuallyAddedSites) &&\n state.siteList.concat(state.manuallyAddedSites).map((item, index) => (\n
    \n \n
    \n ))}\n {state.chosenAddonProducts.find((p) => isMarketplaceExtraProduct(p.id)) && (\n
    \n Valg adressen du vil sende tilbud til: {getAdressesInSameAccount(state)}{' '}\n
    \n )}\n \n Legg i bestilling\n \n {/*{updateItem ? (\n \n Oppdater bestilling\n \n ) : (\n \n Legg i bestilling\n \n )}*/}\n
    \n \n );\n}\nexport default AddMarketplaceOrder;\n","import '../../Stylesheets/AddProducts/AddOrder.css';\nimport AddPowerOrder from './AddPowerOrder';\nimport AddMobileOrder from '../AddMobileProducts/AddMobileOrder';\nimport AddAddonOrder from './AddAddonOrder';\nimport AddMarketplaceOrder from './AddMarketplaceOrder';\n\nfunction AddOrder({\n open,\n handleClose,\n id,\n name,\n type,\n updateItem,\n updateIndex,\n openMobile,\n handleCloseMobile,\n openAddon,\n handleCloseAddon,\n openMarketplace,\n handleCloseMarketplace,\n}) {\n return (\n
    \n {type === 'Strømavtaler' && (\n \n )}\n {type === 'Mobilabonnement' && (\n \n )}\n {type === 'Tilleggsprodukter' && (\n \n )}\n {type === 'Markedsplass tilbud' && (\n \n )}\n
    \n );\n}\n\nexport default AddOrder;\n","import Dialog from '@mui/material/Dialog';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport CloseIcon from '@mui/icons-material/Close';\nimport Divider from '@mui/material/Divider';\nimport Grid from '@mui/material/Grid';\nimport { useSelector } from 'react-redux';\nimport CircularProgress from '@mui/material/CircularProgress';\n\nfunction ShowDetails({ open, handleClose, name }) {\n const state = useSelector((state) => state.reducer);\n\n return (\n \n \n \n \n

    {name && name}

    \n
    \n
    \n \n \n \n
    \n\n \n\n \n {state.showDetailsIsLoading === true ? (\n
    \n \n

    Laster informasjon...

    \n
    \n ) : (\n
    \n )}\n \n \n );\n}\n\nexport default ShowDetails;\n","import { useState } from 'react';\nimport '../../Stylesheets/AddProducts/ListItem.css';\nimport Grid from '@mui/material/Grid';\nimport AddOrder from './AddOrder';\nimport ShowDetails from './ShowDetails';\nimport Divider from '@mui/material/Divider';\nimport { useDispatch } from 'react-redux';\nimport { getProductInfo } from '../../Redux/ApiCalls';\nimport { useSelector } from 'react-redux';\nimport { Typography } from '@mui/material';\nimport StarBorderIcon from '@mui/icons-material/StarBorder';\nimport StarIcon from '@mui/icons-material/Star';\nimport environment from '../../environment';\n\nfunction ListItem({\n id,\n name,\n type,\n price,\n internalName,\n isBookmarked = null,\n toggleBookmark = null,\n}) {\n const state = useSelector((state) => state.reducer);\n const [open, setOpen] = useState(false);\n const [openMobile, setOpenMobile] = useState(false);\n const [openDetails, setOpenDetails] = useState(false);\n const [openAddon, setOpenAddon] = useState(false);\n const [openMarketplace, setOpenMarketplace] = useState(false);\n const dispatch = useDispatch();\n const isBedrift = environment.isBedrift === 'true';\n\n const handleClickOpen = () => {\n dispatch({ type: 'RESET_CHOICES' });\n setOpen(true);\n };\n\n const handleClickOpenAddon = () => {\n dispatch({ type: 'RESET_CHOICES' });\n setOpenAddon(true);\n };\n\n const handleClickOpenMarketplace = () => {\n dispatch({ type: 'RESET_CHOICES_FOR_MARKETPLACE' });\n setOpenMarketplace(true);\n };\n\n const handleClose = () => {\n setOpen(false);\n };\n\n const handleClickOpenMobile = () => {\n if (state.name === null || state.name === '' || state.ssn === null || state.ssn === '') {\n window.scrollTo(0, 0);\n return;\n }\n setOpenMobile(true);\n };\n\n const handleCloseMobile = () => {\n setOpenMobile(false);\n };\n\n const handleCloseAddon = () => {\n setOpenAddon(false);\n };\n\n const handleCloseMarketplace = () => {\n setOpenMarketplace(false);\n };\n\n const handleClickOpenDetails = () => {\n dispatch(\n getProductInfo(\n state.orderModuleApiUrl,\n id,\n state.brand,\n type === 'Mobilabonnement',\n false,\n isBedrift,\n type === 'Tilleggsprodukter',\n ),\n );\n setOpenDetails(true);\n };\n\n const handleCloseDetails = () => {\n setOpenDetails(false);\n };\n\n const handleAddToOrder = () => {\n if (type === 'Strømavtaler') handleClickOpen();\n else if (type === 'Mobilabonnement') handleClickOpenMobile();\n else if (type === 'Tilleggsprodukter') handleClickOpenAddon();\n else if (type === 'Markedsplass tilbud') handleClickOpenMarketplace();\n };\n\n return (\n
    \n \n \n {isBookmarked !== null && toggleBookmark !== null && (\n toggleBookmark(id)}>\n {isBookmarked ? : }\n \n )}\n \n

    \n {name && name} {price && '(' + price + ' kr/mnd)'}\n

    \n {internalName !== null && internalName !== undefined && internalName !== '' && (\n \n ({internalName})\n \n )}\n
    \n
    \n \n
    \n
    Vis detaljer
    \n
    \n
    \n \n \n \n
    \n \n \n \n
    \n );\n}\n\nexport default ListItem;\n","import React, { useState, useEffect } from 'react';\nimport Paper from '@mui/material/Paper';\nimport ExpandLessIcon from '@mui/icons-material/ExpandLess';\nimport ExpandMoreIcon from '@mui/icons-material/ExpandMore';\nimport '../../Stylesheets/AddProducts/DropdownList.css';\nimport ListItem from './ListItem';\nimport { useDispatch } from 'react-redux';\nimport { useSelector } from 'react-redux';\nimport Box from '@mui/material/Box';\nimport environment from '../../environment';\nimport identityServerStore from '../../IdentityServer/store/index';\nimport { isMarketplaceExtraProduct } from '../../utils/Methods';\nimport { isPuls } from '../../utils/Methods';\n\nfunction DropdownList({ name, method, filteredList }) {\n const [expand, setExpand] = useState(true);\n const [bookmarked, setBookmarked] = useState([]);\n const dispatch = useDispatch();\n const state = useSelector((state) => state.reducer);\n\n const brand = state.brand ?? 'FKAS';\n\n const filteredListNoMarketplace = filteredList?.filter(\n (item) => !isMarketplaceExtraProduct(item.id),\n );\n const filteredListMarketplace = filteredList?.filter((item) =>\n isMarketplaceExtraProduct(item.id),\n );\n\n const sortPowerProducts = (a, b) => {\n if (bookmarked.includes(a.id) && bookmarked.includes(b.id))\n return bookmarked.indexOf(a.id) - bookmarked.indexOf(b.id);\n if (bookmarked.includes(a.id)) return -1;\n if (bookmarked.includes(b.id)) return 1;\n return a.name > b.name ? 1 : -1; //Default to alphabetical order\n };\n\n const sortMobileProducts = (a, b) => {\n // Sort by tags (Strømfordel/Medlem/Ung/...), and then by price\n let tagA = a.tags?.length !== 0 ? a.tags[0] : 'Vanlig'; // Default to \"Vanlig\" tag\n let tagB = b.tags?.length !== 0 ? b.tags[0] : 'Vanlig';\n if (tagA > tagB) return 1;\n if (tagA < tagB) return -1;\n return a.recPrice - b.recPrice;\n };\n\n function toggleBookmark(itemId) {\n let newBookmarked = [...bookmarked];\n if (bookmarked.includes(itemId)) {\n newBookmarked.splice(bookmarked.indexOf(itemId), 1); //Remove bookmark\n } else {\n newBookmarked.push(itemId); //Add bookmark\n }\n setBookmarked(newBookmarked);\n localStorage.setItem(`${name}_bookmarked`, JSON.stringify(newBookmarked)); //Update localstorage\n }\n\n const handleExpand = () => {\n setExpand(!expand);\n };\n\n useEffect(() => {\n method && dispatch(method);\n try {\n // Fetch bookmarks from localstorage\n setBookmarked(JSON.parse(localStorage.getItem(`${name}_bookmarked`)) || []);\n } catch (e) {\n // In case JSON.parse fails due to bad formatting\n setBookmarked([]);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n :not(style)': { m: 1, width: 128, height: 128 },\n }}\n >\n \n \n

    {name}

    \n {expand ? (\n \n ) : (\n \n )}\n
    \n {expand && (\n
    \n {name === 'Strømavtaler' &&\n filteredList &&\n filteredList\n .filter((item) => item.brand === state.brand)\n .sort(sortPowerProducts)\n .map((item) => (\n
    \n {(item.id !== 837 ||\n (item.id === 837 &&\n identityServerStore.getState().auth.user.profile.role &&\n identityServerStore\n .getState()\n .auth.user.profile.role.includes('CanSellFixedPriceIronforge'))) && (\n \n )}\n
    \n ))}\n {name === 'Mobilabonnement' &&\n filteredList &&\n filteredList\n .filter((item) => item.brand === 'FKAS')\n .sort(sortMobileProducts)\n .map((item) => (\n
    \n \n
    \n ))}\n {name === 'Tilleggsprodukter' &&\n filteredListNoMarketplace &&\n filteredListNoMarketplace\n .sort(sortPowerProducts)\n .filter((i) => !isPuls(i?.id, brand))\n .map((item) => (\n
    \n \n
    \n ))}\n {name === 'Markedsplass tilbud' &&\n filteredListMarketplace &&\n filteredListMarketplace.sort(sortPowerProducts).map((item) => (\n
    \n \n
    \n ))}\n
    \n )}\n \n \n );\n}\n\nexport default DropdownList;\n","import { useEffect, useState } from 'react';\nimport '../../Stylesheets/AddProducts/AddProducts.css';\nimport SearchIcon from '@mui/icons-material/Search';\nimport DropdownList from './DropdownList';\nimport { useSelector } from 'react-redux';\nimport { useDispatch } from 'react-redux';\nimport {\n getFilteredPowerProducts,\n getFilteredAddonProducts,\n getFilteredCampaigns,\n getFilteredMobileProducts,\n getFilteredMobileExtraProducts,\n getMobileCampaigns,\n} from '../../Redux/ApiCalls';\nimport environment from '../../environment';\nimport { isMarketplaceExtraProduct } from '../../utils/Methods';\n\nfunction AddProducts() {\n const state = useSelector((state) => state.reducer);\n const dispatch = useDispatch();\n\n const handleChange = (e) => {\n dispatch({ type: 'FILTER_LISTS', value: e.target.value });\n };\n\n useEffect(() => {\n if (state.brand && state.activeStore)\n if (environment.isBedrift === 'true') {\n dispatch(\n getFilteredPowerProducts(\n state.orderModuleApiUrl,\n state.brand,\n state.activeStore.identityServerId,\n 'B',\n ),\n );\n dispatch(\n getFilteredAddonProducts(\n state.orderModuleApiUrl,\n state.brand,\n state.activeStore.identityServerId,\n 'B',\n ),\n );\n dispatch(\n getFilteredCampaigns(\n state.orderModuleApiUrl,\n state.brand,\n state.activeStore.identityServerId,\n 'B',\n ),\n );\n } else {\n dispatch(\n getFilteredPowerProducts(\n state.orderModuleApiUrl,\n state.brand,\n state.activeStore.identityServerId,\n 'P',\n ),\n );\n dispatch(\n getFilteredAddonProducts(\n state.orderModuleApiUrl,\n state.brand,\n state.activeStore.identityServerId,\n 'P',\n ),\n );\n dispatch(\n getFilteredCampaigns(\n state.orderModuleApiUrl,\n state.brand,\n state.activeStore.identityServerId,\n 'P',\n ),\n );\n state.brand &&\n state.activeStore &&\n dispatch(\n getFilteredMobileProducts(\n state.orderModuleApiUrl,\n 'FKAS',\n state.activeStore.identityServerId,\n 'P',\n ),\n );\n state.brand &&\n state.activeStore &&\n dispatch(\n getFilteredMobileExtraProducts(\n state.orderModuleApiUrl,\n 'FKAS',\n state.activeStore.identityServerId,\n 'P',\n ),\n );\n state.brand &&\n state.activeStore &&\n dispatch(getMobileCampaigns(state.activeStore.identityServerId));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [state.brand, state.activeStore]);\n\n const [isAnyMarketplace, setIsMarketplace] = useState(false);\n\n useEffect(() => {\n if (state.addonProducts?.length > 0) {\n const hasMarketplaceProducts = state.addonProducts.some((product) =>\n isMarketplaceExtraProduct(product.id),\n );\n setIsMarketplace(hasMarketplaceProducts);\n }\n }, [state.addonProducts]);\n\n return (\n
    \n
    \n

    Legg til produkter i bestillingen

    \n
    \n handleChange(event)}\n />\n \n
    \n {state.brand && (\n <>\n \n {environment.isBedrift === 'false' && (\n \n )}\n \n {environment.isBedrift === 'false' && isAnyMarketplace && (\n \n )}\n \n )}\n
    \n
    \n );\n}\n\nexport default AddProducts;\n","import Dialog from '@mui/material/Dialog';\nimport DialogContent from '@mui/material/DialogContent';\nimport { useDispatch } from 'react-redux';\nimport Grid from '@mui/material/Grid';\nimport { useSelector } from 'react-redux';\n\nfunction Confirm({ open, handleClose, item, index, deleteType }) {\n const dispatch = useDispatch();\n const state = useSelector((state) => state.reducer);\n\n const removePowerOrder = () => {\n dispatch({ type: 'REMOVE_POWER_ORDER', index: index });\n handleClose();\n };\n\n const removeAddonOrder = () => {\n dispatch({ type: 'REMOVE_ADDON_ORDER', index: index });\n handleClose();\n };\n\n const removeMarketplaceOrder = () => {\n dispatch({ type: 'REMOVE_MARKETPLACE_ORDER', index: index });\n handleClose();\n };\n\n const removeMobileOrder = () => {\n dispatch({ type: 'REMOVE_MOBILE_ORDER', index: index });\n handleClose();\n };\n\n const deleteClicked = () => {\n switch (deleteType) {\n case 'mobile':\n removeMobileOrder();\n break;\n case 'addon':\n removeAddonOrder();\n break;\n case 'marketplace':\n removeMarketplaceOrder();\n break;\n default:\n case 'power':\n removePowerOrder();\n break;\n }\n };\n\n return (\n \n \n

    Slette {item && item.product} fra bestillinger?

    \n \n \n \n Slett fra bestilling\n \n \n \n \n \n \n
    \n \n );\n}\n\nexport default Confirm;\n","import { useEffect, useState } from 'react';\nimport { useSelector } from 'react-redux';\nimport ErrorOutlineIcon from '@mui/icons-material/ErrorOutline';\nimport environment from '../../environment';\nimport Grow from '@mui/material/Grow';\nimport List from '@mui/material/List';\nimport ListItem from '@mui/material/ListItem';\nimport ListItemText from '@mui/material/ListItemText';\nimport { emailRegex } from '../../utils/RegexLib';\nimport { isForutsigbarBetaling } from '../../utils/Methods';\n\nexport const isValidOrder = (state, hasSteddi) => {\n const updateInvoiceAddressValid =\n (!state.invoiceAddress && !state.invoicePostCode) ||\n (!!state.invoiceAddress === !!state.invoicePostCode &&\n state.invoiceAddress.length > 0 &&\n state.invoicePostCode.length === 4 &&\n state.invoicePostCode !== '0000');\n\n // Require email for forutsigbar betaling\n if (\n state.powerOrders.find((o) => o.extraProducts.find((e) => isForutsigbarBetaling(e.id))) ||\n state.addonOrders.find((o) => o.extraProducts.find((e) => isForutsigbarBetaling(e.id)))\n ) {\n if (state.email === null || !emailRegex.test(state.email)) return false;\n }\n\n const checkedOrCorrectEmail =\n environment.isBedrift === 'false'\n ? state.noEmail === true || (state.email?.length > 0 && state.email?.match(emailRegex))\n : true;\n\n const contactPersonEmail =\n environment.isBedrift === 'true'\n ? state.otherEmailRecipient !== null &&\n state.otherEmailRecipient !== '' &&\n state.otherEmailRecipient?.length > 0 &&\n state.otherEmailRecipient?.match(emailRegex)\n : true;\n return (\n state.name &&\n checkedOrCorrectEmail &&\n contactPersonEmail &&\n ((state.ssn && state.ssn.length === 11) ||\n (state.ssn && state.ssn.length === 9 && environment.isBedrift === 'true')) &&\n state.phone &&\n state.phone.length === 8 &&\n (state.email === null || state.email.match(emailRegex)) &&\n updateInvoiceAddressValid &&\n !(state.mobileOrders.length > 0 && (state.email === null || state.email === '')) &&\n !(\n state.mobileOrders?.length > 0 &&\n (state.invoiceAddress === null || state.invoiceAddress === '') &&\n (state.invoicePostCode === null || state.invoicePostCode === '')\n ) &&\n !state.isTooYoungToOrder\n );\n};\n\nconst OrderValidationError = () => {\n const [error, setError] = useState(false);\n const [hasSteddi, setHasSteddi] = useState(false);\n const state = useSelector((state) => state.reducer);\n const isBedrift = environment.isBedrift === 'true';\n\n useEffect(() => {\n setError(!isValidOrder(state, hasSteddi));\n }, [state]);\n\n useEffect(() => {\n const hasSteddi =\n state.powerOrders.find((o) => o.extraProducts.find((e) => isForutsigbarBetaling(e.id))) ||\n state.addonOrders.find((o) => o.extraProducts.find((e) => isForutsigbarBetaling(e.id)));\n setHasSteddi(hasSteddi);\n }, [state.powerOrders, state.addonOrders]);\n\n return (\n <>\n \n
    \n \n {(state.mobileOrders.length > 0 && (state.email === null || state.email === '')) ||\n (state.marketplaceOrders > 0 && (state.email === null || state.email === '')) ? (\n \n \n \n E-post må være fylt ut for å sende inn mobilbestillinger.\n \n \n \n ) : state.mobileOrders?.length > 0 &&\n (state.invoiceAddress === null || state.invoiceAddress === '') &&\n (state.invoicePostCode === null || state.invoicePostCode === '') ? (\n \n \n \n Fakturainformasjon må være fylt ut for å sende inn mobilbestillinger.\n \n \n \n ) : (\n \n \n \n Navn, {isBedrift ? organisasjonsnummer : personnummer},{' '}\n {isBedrift && kontaktperson e-post} og mobilnummer må være fylt ut.\n \n \n \n \n E-post må være fylt ut korrekt{' '}\n {!hasSteddi && (\n <>\n eller{' '}\n {isBedrift ? (\n <>tomt\n ) : (\n <>\n \"Har ikke e-post\" må være huket av\n \n )}\n \n )}\n \n \n \n \n Hvis fakturaadresse er fylt ut må både postnummer og adresse fylles\n ut.\n \n \n \n \n Personen må være over 18 år for å bestille.\n \n \n \n )}\n
    \n
    \n \n );\n};\n\nexport default OrderValidationError;\n","import { findLivePrices, isLive } from '../../utils/Methods';\nimport { useSelector } from 'react-redux';\n\ntype AddonPriceSummaryProps = {\n item: any;\n};\nexport function AddonPriceSummary({ item }: AddonPriceSummaryProps) {\n const state = useSelector((state: any) => state.reducer);\n const renderLivePrices = (extraProduct: any) => {\n const livePrices = findLivePrices(extraProduct, state);\n if (!livePrices) return null; // Handle case where live prices are not available\n\n return (\n
    \n

    Pulsmåler: {livePrices.firstGroupTotal} kr/stk

    \n

    Abonnement: {livePrices.secondGroupTotal} kr/mnd

    \n
    \n );\n };\n\n return (\n <>\n
    \n {item.extraProducts?.map((extraProduct: any) => (\n
    \n

    {extraProduct.name}:

    \n {isLive(extraProduct.id) && renderLivePrices(extraProduct.id)}\n {!isLive(extraProduct.id) && extraProduct.priceElements?.map((priceElement: any) => (\n

    \n {priceElement.name}: {priceElement.price} {priceElement.denomination}\n

    \n ))}\n
    \n ))}\n
    \n \n );\n}\n","import { calculateFornybar } from '../../utils/Methods';\nimport moment from 'moment';\nimport { AddonPriceSummary } from './AddonPriceSummary';\n\ntype PriceSummaryBedriftProps = {\n item: any;\n};\n\nfunction calculateElCert(number1: number, number2: number, number3: number) {\n return (number1 - number2 + number3).toFixed(2);\n}\n\nexport function PriceSummaryBedrift({ item }: PriceSummaryBedriftProps) {\n const isAddon = item.product === 'Tilleggstjeneste';\n\n if (isAddon) {\n return ;\n }\n\n return (\n <>\n
    \n {item?.priceInfoMoment?.priceElementDefinitions?.map((priceInfo: any, index: any) =>\n (priceInfo.externalId === 'PAASLAG' ||\n priceInfo.name === 'Strøm påslag fast pakkepris') &&\n item.priceInfoElCert?.find(\n (elCert: any) => elCert.name === 'Påslag inkl. elsertifikater',\n ) !== undefined ? (\n
    \n {item.priceElementList?.find((element: any) => element.name === priceInfo.name) !==\n undefined\n ? (priceInfo.externalId === 'PAASLAG'\n ? 'Påslag inkl. elsertifikater: '\n : 'Strøm påslag fast pakkepris: ') +\n calculateElCert(\n item.priceInfoElCert.find(\n (elCert: any) => elCert.name === 'Påslag inkl. elsertifikater',\n ).vatExclusivePrice,\n priceInfo.pricing.price * priceInfo.factor,\n parseFloat(\n item.priceElementList.find((element: any) => element.name === priceInfo.name)\n .price,\n ),\n ) +\n ' ' +\n priceInfo.denomination\n : 'Påslag inkl. elsertifikater: ' +\n item.priceInfoElCert.find(\n (elCert: any) => elCert.name === 'Påslag inkl. elsertifikater',\n ).vatExclusivePrice +\n ' ' +\n priceInfo.denomination}\n
    \n ) : (\n priceInfo.externalId !== 'FORNYBAR' &&\n priceInfo.name !== 'Bruddgebyr' &&\n priceInfo.name !== 'Variabelt bruddgebyr' && (\n
    \n {priceInfo.name === 'Fastpris Strøm' && item.showAsVariable\n ? 'Variabel strømpris'\n : priceInfo.name}{' '}\n {': '}\n {item.priceElementList.find((element: any) => element.name === priceInfo.name) !==\n undefined\n ? ' ' +\n item.priceElementList.find((element: any) => element.name === priceInfo.name)\n .price\n : priceInfo.denomination === 'øre/kWh'\n ? ' ' + (priceInfo.pricing.price * priceInfo.factor).toFixed(1)\n : ' ' + priceInfo.pricing.price}{' '}\n {priceInfo.denomination}\n
    \n )\n ),\n )}\n {item.priceElementList.filter((item: any) => item.externalId === 'FORNYBAR').length !==\n 0 ? (\n
    \n Fornybar: Ja{' '}\n {calculateFornybar(\n item.priceInfoMoment?.priceElementDefinitions.filter(\n (item: any) => item.externalId === 'FORNYBAR',\n ),\n ) !== 0 &&\n ' (' +\n calculateFornybar(\n item.priceInfoMoment.priceElementDefinitions.filter(\n (item: any) => item.externalId === 'FORNYBAR',\n ),\n ) +\n ' øre/kWh totalt)'}\n
    \n ) : (\n
    Fornybar: Nei
    \n )}\n Bindingstid i dager:{' '}\n {item.minimumTermDays !== null\n ? item.minimumTermDays\n : item.priceInfo.minimumTermMonths * 30}{' '}\n {item.minimumTermDays !== null && ' (overstyrt av selger)'}\n {item.fixedPrice !== null && (\n
    \n

    Fastpris:

    \n {item.fixedPrice?.facilityVolume\n ? `Årsvolum anlegg: ${item.fixedPrice?.facilityVolume} kWh`\n : ' '}\n

    \n Avtalt årsvolum: {item.fixedPrice?.agreedVolume} kWh

    \n Kommentar: {item.fixedPrice?.comment}\n

    \n Sluttdato: {moment(item.fixedPrice?.endDate).format('DD/MM/YYYY')}\n

    \n Forbruksprofil: {item.fixedPrice?.consumptionProfileName}\n
    \n )}\n
    \n \n \n );\n}\n","import Box from '@mui/material/Box';\nimport Grid from '@mui/material/Grid';\nimport Typography from '@mui/material/Typography';\nimport { useEffect, useCallback } from 'react';\nimport { calculatePrices } from '../../utils/helperFunctions';\nimport { isPuls, isStromSmart } from '../../utils/Methods';\nimport { useSelector } from 'react-redux';\n\nfunction PriceSummary({\n product,\n extraProduct,\n extraProductPrice,\n addon = false,\n onPriceChange,\n mobile = false,\n addToSummary,\n index,\n chosenAddons = null,\n powerProducts = null,\n}) {\n const state = useSelector((state) => state.reducer);\n\n const brand = state.brand ?? 'FKAS';\n\n let productTags =\n !mobile &&\n powerProducts.filter((item, index) => {\n if (item.id === product.id) {\n return item.tags;\n }\n });\n let no4 =\n !mobile && productTags !== null && productTags !== undefined\n ? productTags[0]?.tags.includes('NO4')\n : false;\n\n let monthlyPrice =\n !mobile && product.priceInfoElCert !== null && product.priceInfoElCert !== undefined\n ? calculatePrices(product, true, false, no4)\n : mobile\n ? product.Users[0].Product.data.priceIncVat\n : 0;\n\n let surcharge =\n !mobile && product.priceInfoElCert !== null && product.priceInfoElCert !== undefined\n ? calculatePrices(product, false, false, no4)\n : 0;\n\n const handleAddToSummary = useCallback(\n (power, name, price, priceSur, denomination1, denomination2, addon, item, index, priceType) => {\n // Call the addToSummary function passed down as a prop\n addToSummary(\n power,\n name,\n price,\n priceSur,\n denomination1,\n denomination2,\n addon,\n item,\n index,\n monthlyPrice,\n priceType,\n );\n },\n [addToSummary],\n );\n\n useEffect(() => {\n let deno1;\n let deno2;\n\n if (mobile) {\n if (product.Users !== null && product.Users !== undefined)\n handleAddToSummary(\n false,\n product.Users[0].Product.name,\n monthlyPrice,\n null,\n 'kr/mnd',\n null,\n addon,\n product,\n index,\n false,\n );\n } else {\n if (\n product.priceInfoElCert !== null &&\n product.priceInfoElCert !== undefined &&\n product.priceInfoElCert.length > 1\n ) {\n deno1 = calculatePrices(product, true, true, no4);\n deno2 = calculatePrices(product, false, true, no4);\n handleAddToSummary(\n true,\n product.product,\n monthlyPrice,\n surcharge,\n deno1,\n deno2,\n addon,\n product,\n index,\n product.priceInfoElCert[0].priceType === 'FIXED',\n );\n }\n }\n }, [product, addToSummary]);\n\n return (\n \n {!mobile ? (\n \n \n \n Oppstartdato: \n \n \n \n {product.startDate.date != null\n ? new Date(product.startDate.date).toLocaleDateString('no-NO')\n : product.startDate.name}\n \n \n \n \n {product.product}\n \n \n \n Månedsbeløp: \n \n \n \n {monthlyPrice === 0\n ? 'Ikke tilgjengelig'\n : monthlyPrice + ' ' + calculatePrices(product, true, true, no4)}\n \n \n \n Påslag:\n \n \n \n {surcharge === 0\n ? 'Ikke tilgjengelig'\n : surcharge + ' ' + calculatePrices(product, false, true, no4)}\n \n \n\n {addon && (\n <>\n \n \n Valgte tilleggstjenester\n \n \n {extraProduct.map((product, index) => {\n const matchingPrice = extraProductPrice.find(\n (priceProduct) => priceProduct.id === product.id,\n );\n const priceelements =\n matchingPrice && matchingPrice?.priceInfo?.priceElements?.length > 1;\n let price;\n let denomination = '';\n if (\n extraProduct !== null &&\n extraProduct !== undefined &&\n extraProduct.length > 0\n ) {\n const prod = extraProduct.find(\n (priceProduct) => priceProduct.id === product.id,\n );\n if (prod?.id === 755 || prod?.id === 621) {\n return;\n }\n\n if (prod && prod?.id == 726) {\n price = -1;\n denomination = 'øre/kWh';\n } else if (prod && isPuls(prod.id, brand)) {\n var pulsProduct = extraProductPrice.find((p) => p.id === prod.id);\n var pulsPriceElements = pulsProduct?.priceInfo?.priceElements?.filter(\n (p) => p.name !== 'Bruddgebyr',\n );\n price = pulsPriceElements.reduce(\n (total, element) => total + element.pricing?.price / element.factor,\n 0,\n );\n denomination = pulsPriceElements[0].denomination;\n } else if (\n prod &&\n prod.priceElements !== null &&\n prod.priceElements !== undefined &&\n prod.priceElements.length > 0\n ) {\n price = prod.priceElements[0].price;\n if (isStromSmart(prod.id, brand)) price = price * 1.25;\n denomination =\n matchingPrice && matchingPrice?.priceInfo?.priceElements[0]?.denomination;\n } else {\n price =\n matchingPrice &&\n (priceelements\n ? matchingPrice?.priceInfo?.priceElements[1]?.pricing?.price *\n matchingPrice?.priceInfo?.priceElements[1]?.factor +\n matchingPrice?.priceInfo?.priceElements[0]?.pricing?.price *\n matchingPrice?.priceInfo?.priceElements[0]?.factor\n : matchingPrice?.priceInfo?.priceElements[0]?.pricing?.price *\n matchingPrice?.priceInfo?.priceElements[0]?.factor *\n 1.25);\n price = isStromSmart(prod.id, brand) ? price * 1.25 : price;\n denomination =\n matchingPrice && matchingPrice?.priceInfo?.priceElements[0]?.denomination;\n }\n }\n\n return (\n <>\n \n {product.name}\n \n \n \n {price !== undefined && denomination !== undefined\n ? price.toFixed(2) + ' ' + denomination\n : ''}\n \n \n \n );\n })}\n \n )}\n \n \n ) : (\n \n \n \n Porteringsdato: \n \n \n \n {product?.Users[0]?.PortingDate != null\n ? new Date(product?.Users[0]?.PortingDate)?.toLocaleDateString('no-NO')\n : ''}\n \n \n \n \n {product.Users[0].Product.name}\n \n \n \n Månedsbeløp: \n \n \n \n {monthlyPrice + ' kr/mnd'}\n \n \n {addon && (\n <>\n \n \n Valgte tilleggstjenester\n \n \n {product?.Users[0]?.ExtraProducts?.map((product, index) => {\n const price = product?.data?.monthlyFeeIncVat;\n const denomination = 'kr/mnd';\n\n return (\n <>\n \n {product?.name}\n \n \n \n {price !== undefined && denomination !== undefined\n ? price + ' ' + denomination\n : ''}\n \n \n \n );\n })}\n \n )}\n \n \n )}\n \n );\n}\n\nexport default PriceSummary;\n","import Grid from '@mui/material/Grid';\nimport moment from 'moment/moment';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport { useSelector } from 'react-redux';\nimport { PriceSummaryBedrift } from './PriceSummaryBedrift';\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport PriceSummary from './PriceSummary';\nimport { calculatePrices } from '../../utils/helperFunctions';\nimport { round } from 'lodash';\nimport React from \"react\";\nimport { InvoicePrices } from \"../../utils/Prices\";\n\nexport default function PowerOrderSummary({ items, category, isBedrift, addToSummary }) {\n const state = useSelector((state) => state.reducer);\n\n const distributionMethodEnum = (num) => {\n switch (num) {\n case 1:\n return 'Papirfaktura';\n case 2:\n return 'E-faktura';\n case 3:\n return 'E-post';\n default:\n return 'Ukjent';\n }\n };\n\n let totalMonthlyPrice = (item, index, mobile = false) => {\n let price = 0;\n\n if (mobile) {\n price = item.Users[0].Product?.data?.priceIncVat || 0;\n price += extraProductPrices(index, true, true);\n } else if (item?.priceInfoElCert?.length > 0) {\n price = calculatePrices(item, true, false, noMVA(item));\n price += extraProductPrices(index, false, false);\n }\n return price;\n };\n\n let totalSurcharge = (item, index) => {\n if (item.priceInfoElCert !== null) {\n return (\n calculatePrices(item, false, false, noMVA(item)) + extraProductPrices(index, true, false)\n );\n } else {\n return 0;\n }\n };\n\n let noMVA = (item) => {\n return state.powerProducts.some((i) => item.id === i.id && i.tags?.includes('NO4'));\n };\n\n let extraProductPrices = (index, sur, mobile) => {\n let total = 0;\n if (\n !mobile &&\n state.powerOrders[index]?.extraProducts !== undefined &&\n state.powerOrders[index]?.extraProducts?.length > 0\n ) {\n state.powerOrders[index].extraProducts.map((product) => {\n const matchingPrice =\n state.addonProducts &&\n state.addonProducts.find((priceProduct) => priceProduct.id === product.id);\n const priceelements = matchingPrice && matchingPrice?.priceInfo?.priceElements?.length > 1;\n const price =\n matchingPrice &&\n (priceelements\n ? matchingPrice?.priceInfo?.priceElements[1]?.pricing?.price *\n matchingPrice?.priceInfo?.priceElements[1]?.factor +\n matchingPrice?.priceInfo?.priceElements[0]?.pricing?.price *\n matchingPrice?.priceInfo?.priceElements[0]?.factor\n : matchingPrice?.priceInfo?.priceElements[0]?.pricing?.price *\n matchingPrice?.priceInfo?.priceElements[0]?.factor);\n const denomination =\n matchingPrice && matchingPrice?.priceInfo?.priceElements[0]?.denomination;\n if (denomination === 'kr/dag' && !sur) {\n total += price * 30; // assuming 30 days in a month\n }\n if (denomination === 'kr/mnd' && !sur) {\n total += price * 1.25;\n }\n if (denomination === 'øre/kWh' && sur) {\n total += price * 1.25; //Temporary fix for surcharge while we wait for the correct price\n }\n });\n } else if (\n mobile &&\n state.mobileOrders[index] !== undefined &&\n state.mobileOrders[index]?.Users[0]?.ExtraProducts !== null\n ) {\n state.mobileOrders[index].Users[0].ExtraProducts.map((product) => {\n total += product?.data?.monthlyFeeIncVat;\n });\n }\n if (\n !mobile &&\n sur &&\n state.powerOrders[index].extraProducts !== null &&\n state.powerOrders[index].extraProducts.length > 0\n ) {\n state.powerOrders[index].extraProducts.map((product) => {\n if (product.id === 726) {\n total += -1;\n }\n });\n }\n return round(total, 3);\n };\n\n return (\n \n {items &&\n items.map((item, index) => (\n \n \n Bestilling {index + 1} av {items.length} ({category})\n \n \n Addresse:{' '}\n \n {item.address}, {item.zipCode} {item.city}\n \n \n {isBedrift && item.meterIdentification && (\n \n Målernummer: {item.meterIdentification}\n \n )}\n {isBedrift && item.meteringPointIdentification && (\n \n Målepunkt ID: {item.meteringPointIdentification}\n \n )}\n\n {item.productCampaign && (\n
    \n \n \n Kampanje:\n \n \n
    \n {item.productCampaign.name}\n
    \n
    \n
    \n
    \n
    \n )}\n\n
    \n \n \n Tilleggsprodukter:\n \n \n {JSON.stringify(item.extraProducts) !== JSON.stringify([]) ? (\n item.extraProducts.map((extraProductId) => (\n
    \n {extraProductId.name}\n {extraProductId.id === 124 && ' (Pris 2 kr/dag)'}\n {extraProductId.id === 71 && ' (Pris 2 kr/dag)'}\n {extraProductId.id === 217 && ' (Pris 1 kr/dag)'}\n {extraProductId.id === 208 && ' (Pris 1,5 kr/dag)'}\n {extraProductId.id === 89 && ' (Pris 1 kr/dag)'}\n {extraProductId.id === 621 &&\n ` (${\n extraProductId.minimumTermDays === null\n ? '6 måneder'\n : extraProductId.minimumTermDays + ' dager'\n }, ${\n extraProductId.priceElements[0].price +\n extraProductId.priceElements[0].denomination\n } bruddgebyr)`}\n {extraProductId.id === 718 &&\n ` (${\n extraProductId.priceElements[0].price +\n extraProductId.priceElements[0].denomination\n })`}\n
    \n ))\n ) : (\n Ingen\n )}\n
    \n
    \n
    \n\n
    \n Produkt: {item.product}\n
    \n
    \n Ønsket oppstartsdato:\n \n {item.startDate.date === null\n ? '14 dagers oppstart (' + moment().add(14, 'days').format('DD/MM/YYYY') + ')'\n : moment(item.startDate.date).format('DD/MM/YYYY')}\n \n
    \n {item.tobbMembershipNumber && (\n
    \n TOBB Kortnummer: \n {item.tobbMembershipNumber}\n
    \n )}\n\n

    \n {isBedrift ? (\n <>\n \n\n {item.freeText?.length > 0 && (\n
    \n Fritekst tilbud:\n
    {item.freeText}
    \n
    \n )}\n {state.powerOrders &&\n state.powerOrders.map(\n (item) =>\n item.iRiskGroupID !== (null || '') && (\n
    \n IRiskGroupId: {item.iRiskGroupID}\n
    \n ),\n )}\n \n ) : (\n
    \n
    \n {state.summaryDetails[index] ? (\n \n ) : (\n
    \n \n
    \n )}\n
    \n {!isBedrift && (\n \n \n Oppsummering\n \n \n \n 0}\n extraProduct={item.extraProducts}\n extraProductPrice={state.addonProducts}\n product={item}\n onPriceChange={(monthlyPrice, surcharge) => {\n totalMonthlyPrice += monthlyPrice;\n totalSurcharge += surcharge;\n }}\n addToSummary={addToSummary}\n index={index}\n chosenAddons={state.chosenAddonProducts}\n powerProducts={state.powerProducts}\n />\n \n\n {item && (\n <>\n \n \n Total månedsbeløp:\n \n \n\n {item.priceInfoElCert !== null &&\n item?.priceInfoElCert[0]?.priceType === 'FIXED' ? (\n <>\n \n \n {totalMonthlyPrice(item, index, false) + ' kr/mnd'}\n \n \n\n \n \n {item.priceInfoElCert !== null &&\n item?.priceInfoElCert[0]?.priceType === 'FIXED'\n ? 'Total strømpris:'\n : 'Total påslag:'}\n \n \n\n \n \n {totalSurcharge(item, index) + ' øre/kWh'}\n \n \n\n \n \n Du betaler spotpris for strømmen\n \n \n \n ) : (\n <>\n \n \n {totalMonthlyPrice(item, index, false) + ' kr/mnd'}\n \n \n\n \n \n {item.priceInfoElCert !== null &&\n item?.priceInfoElCert[0]?.priceType === 'FIXED'\n ? 'Total strømpris:'\n : 'Total påslag:'}\n \n \n\n \n \n {totalSurcharge(item, index) + ' ' + 'øre/kWh'}\n \n \n \n )}\n\n {state.chosenDistributionMethod === 1 && (\n <>\n \n \n {distributionMethodEnum(state.chosenDistributionMethod)}\n \n \n \n {InvoicePrices.Paper} kr/stk\n \n \n )}\n \n )}\n \n \n )}\n
    \n )}\n \n ))}\n
    \n );\n}\n","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport moment from 'moment';\nimport { Box, Typography, CircularProgress, Grid, Paper } from '@mui/material';\nimport { getDate } from 'date-fns';\nimport { AddonPriceSummary } from './AddonPriceSummary';\nimport { isForutsigbarBetaling } from '../../utils/Methods';\n\ntype AddressV1 = {\n streetName: string;\n streetCode: string | null;\n buildingNumber: string;\n buildingLetter: string | null;\n zipCode: string;\n city: string;\n country: string;\n cadastreData: unknown | null;\n};\n\ntype TaxationProfile = {\n consumptionCode: string;\n naceDivisionCode: string;\n};\n\ntype ElhubDataCore = {\n lastMeterReadingDate: string;\n lastResortDate: string;\n meteringPointIdentification: string;\n gridOwnerID: string;\n addressV1: AddressV1;\n gridAreaID: string;\n meteringPointType: string;\n meterReadingCharacteristics: string;\n settlementMethod: string;\n closureStatus: string | null;\n meterIdentification: string;\n taxationProfile: TaxationProfile;\n estimatedAnnualConsumption: number;\n priceAreaName: string;\n};\n\ntype SiteInfo = {\n address: string;\n zipCode: string;\n postArea: string;\n meterNumber: string;\n meterPointId: string;\n orderStatus: string;\n foundInPublicRegistry: boolean;\n name: string;\n activeOnBrand: string | null;\n elhubHit: boolean;\n bregHit: string | null;\n elhubDataCore: ElhubDataCore;\n};\n\ntype ExtraProduct = {\n name: string;\n id: number;\n campaigns: Array;\n};\n\ntype Invoice = {\n name: string;\n accountId: string | null;\n refId: string | null;\n};\n\ntype StartDate = {\n name: string;\n date: string | null;\n};\n\ntype Item = {\n id?: string; // Now included and marked as optional since it was undefined\n product: string;\n address: string;\n zipCode: string;\n city: string;\n meterIdentification: string;\n meteringPointIdentification: string;\n extraProducts: ExtraProduct[];\n invoice: Invoice;\n startDate: StartDate;\n productCampaign: null | {\n name: string;\n };\n eBNumber: string;\n bonusCampaigns: Array;\n priceElementList: Array;\n priceInfo: unknown | null;\n priceInfoElCert: unknown | null;\n priceInfoMoment: unknown | null;\n minimumTermDays: number | null;\n thirdPartyEhf: unknown | null;\n invoiceLabel: string | null;\n iRiskDealID: string;\n iRiskGroupID: string;\n siteInfo: SiteInfo;\n showAsVariable: boolean;\n tobbMembershipNumber: null | string;\n freeText: null | string;\n};\n\ninterface AddonOrderSummaryProps {\n items: Item[];\n category: string;\n isBedrift: boolean;\n}\n\nexport const AddonOrderSummary: React.FC = ({\n items,\n category,\n isBedrift,\n}) => {\n const state = useSelector((state: any) => state.reducer);\n const hasStartDay = (item: Item): string => {\n if (item.extraProducts.some((extraProduct) => isForutsigbarBetaling(extraProduct.id))) {\n return 'Umiddelbar oppstart';\n }\n\n if (item?.startDate?.date === null) {\n return '14 dagers oppstart';\n } else {\n return moment(item.startDate?.date).format('DD/MM/YYYY');\n }\n };\n return (\n \n {items.map((item, index) => (\n \n \n Bestilling {index + 1} av {items.length} ({category})\n \n \n Addresse:{' '}\n \n {item.address}, {item.zipCode} {item.city}\n \n \n\n {isBedrift && (\n <>\n {item.meterIdentification && (\n \n Målernummer:{' '}\n \n {item.meterIdentification}\n \n \n )}\n {item.meteringPointIdentification && (\n \n Målepunkt ID:{' '}\n \n {item.meteringPointIdentification}\n \n \n )}\n \n )}\n\n {item.productCampaign && (\n \n \n Kampanje:{' '}\n \n {item.productCampaign.name}\n \n \n \n )}\n\n \n \n Tilleggsprodukter:\n {item.extraProducts.length > 0 ? (\n item.extraProducts.map((extraProductId: any) => (\n \n \n {extraProductId.name}\n \n \n ))\n ) : (\n \n Ingen\n \n )}\n \n \n {isBedrift && }\n\n \n \n Produkt:{' '}\n \n {item.product}\n \n \n \n\n \n \n Ønsket oppstartsdato: {hasStartDay(item)}\n \n \n\n {item.tobbMembershipNumber && (\n \n \n TOBB Kortnummer:{' '}\n \n {item.tobbMembershipNumber}\n \n \n \n )}\n\n {isBedrift ? (\n <>\n {item.freeText && (\n \n \n Fritekst tilbud:{' '}\n \n {item.freeText}\n \n \n \n )}\n {state.powerOrders.map(\n (order: any) =>\n order.iRiskGroupID && (\n \n \n IRiskGroupId:{' '}\n \n {order.iRiskGroupID}\n \n \n \n ),\n )}\n \n ) : state.summaryAddonDetails && state.summaryAddonDetails[index] ? (\n \n \n \n \n \n \n \n ) : null}\n \n ))}\n \n );\n};\n","import { useDispatch, useSelector } from 'react-redux';\nimport './seller-and-store-summary.css';\nimport { useEffect } from 'react';\nimport identityServerStore from '../../IdentityServer/store';\n\ntype Store = {\n identityServerId: number;\n name: string | null;\n};\n\ntype DefaultRootState = {\n reducer: {\n seller?: { name?: string; email?: string };\n activeStore?: Store;\n sellerStores?: { identityServerId: number; name: string }[];\n brand?: string;\n };\n};\n\ntype SellerAndStoreSummaryProps = {\n sellerName?: string;\n sellerEmail?: string;\n activeStore?: Store;\n sellerStores?: Store[];\n brand?: string;\n};\n\nfunction SellerAndStoreSummaryItem({ label, value }: { label: string; value: string }) {\n return (\n
  • \n {label}:\n {value}\n
  • \n );\n}\n\nfunction SellerAndStoreSummary() {\n const dispatch = useDispatch();\n const { sellerEmail, sellerName, activeStore, sellerStores, brand } = useSelector<\n DefaultRootState,\n SellerAndStoreSummaryProps\n >((state) => ({\n sellerName: state.reducer?.seller?.name,\n sellerEmail: state.reducer?.seller?.email,\n activeStore: state.reducer?.activeStore,\n sellerStores: state.reducer?.sellerStores,\n brand: state.reducer?.brand,\n }));\n\n // Handle the case where the seller name and email are not set\n useEffect(() => {\n if (!sellerName || !sellerEmail) {\n const profile = identityServerStore.getState().auth.user.profile as {\n sub: string;\n email: string;\n 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname': string;\n 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname': string;\n store: string | string[];\n };\n\n const isFkas = brand === null || brand === 'FKAS';\n\n dispatch({\n type: 'SET_SELLER',\n seller: {\n identityServerId: profile.sub,\n name:\n profile['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname'] +\n ' ' +\n profile['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname'],\n email: profile.email,\n },\n sellerStores: profile.store\n ? Array.isArray(profile.store)\n ? profile.store.map((o) => ({ identityServerId: parseInt(o), name: null }))\n : [{ identityServerId: parseInt(profile.store), name: null }]\n : [\n {\n identityServerId: isFkas ? 5 : 309,\n name: isFkas ? 'fjordkraft.no' : 'trondelagkraft.no',\n },\n ],\n });\n }\n }, [sellerEmail, sellerName, brand, dispatch]);\n\n // Handle the case where the store name is not set\n useEffect(() => {\n if (activeStore) {\n return;\n }\n\n if (sellerStores && sellerStores.length > 0) {\n dispatch({ type: 'SET_ACTIVE_STORE', activeStore: sellerStores[0] });\n }\n }, [activeStore, sellerStores, dispatch]);\n\n return (\n
      \n \n \n \n
    \n );\n}\n\nexport { SellerAndStoreSummary };\n","import { useSelector } from 'react-redux';\nimport { isForutsigbarBetaling } from '../../utils/Methods';\n\nexport function ForutsigbarBetalingConvertsationTemplate() {\n const state = useSelector((state: any) => state.reducer);\n\n function hasOrderedForutsigbarBetaling() {\n const foundInPowerOrders = state.powerOrders.some((order: any) =>\n order.extraProducts.some((ep: any) => isForutsigbarBetaling(ep.id)),\n );\n const foundInAddonOrders = state.addonOrders.some((order: any) =>\n order.extraProducts.some((ep: any) => isForutsigbarBetaling(ep.id)),\n );\n return foundInPowerOrders || foundInAddonOrders;\n }\n\n if (!hasOrderedForutsigbarBetaling()) {\n return <>;\n }\n\n const brand = state.brand == 'FKAS' ? 'Fjordkraft' : 'TrøndelagKraft';\n\n return (\n
    \n

    Opplysningsplikt ved tilbud om finansielle tjenester i telefonsamtale

    \n

    \n Skal leses opp for kunden før registrering av ordren!\n

    \n

    \n Siden Forutsigbar betaling er en finansiell tjeneste er det en del informasjon jeg er nødt\n til å gå gjennom med deg, før jeg registrerer og sender deg et uforpliktende tilbud.\n

    \n

    \n Steddi er et selskap i samme konsern som {brand}, og jeg representerer begge selskapene.\n Steddi tilbyr betalingsadministrasjon og kredittjenester til deres kunder. Steddi holder til\n i Folke Bernadottes vei 38 i Fyllingsdalen i Bergen, i samme lokaler som {brand}.\n

    \n

    \n Forutsigbar Betaling er en kredittjeneste hvor Steddi jevnlig beregner dine forventede\n strømkostnader for en periode på inntil 12 måneder, fordeler kostnadene dine i like\n månedsbeløp og fakturerer dette månedsbeløpet til deg. Denne fordelingen av kostnadene\n innebærer at Steddi i perioder gir kreditt til deg som kunde, og i andre perioder vil du\n kunne ha et tilgodebeløp. Det påløper ingen renter i forbindelse med denne kredittjenesten.\n Prisen for tjenesten er 59 kroner per måned. På priseksempel ved 10 000 kr over 3 måneder\n vil kostnaden for deg som kunde være på 177 kroner dersom du mottar fakturaen din\n elektronisk. Omregnet 10 177 kroner vil effektiv rente være 7,31 %\n

    \n

    \n Tjenesten forutsetter at du er privatkunde og har minst en aktiv strømavtale hos {brand}.\n Samlet årsforbruk kan ikke overstige 50 000 kWh, og du kan ha inntil 3 målere tilknyttet\n tjenesten.\n

    \n

    \n Du har 14 dagers angrerett. Dersom du ønsker å benytte deg av denne må du gi beskjed om\n dette innen 14 dager fra avtaleinngåelse. Virkningen av å benytte angreretten vil være som\n at avtalen aldri ble inngått. Det betyr at du må tilbakebetale eventuell kreditt som er\n benyttet, og vi tilbakebetaler eventuelle kostnader til deg.\n

    \n

    \n Når jeg registrerer tilbudet, så vil du motta en SMS fra Steddi med lenke til\n bestillingsside hvor du inngår avtalen med elektronisk signering. Her får du all relevant\n informasjon tjenesten, og komplette avtalevilkår.\n

    \n
    \n );\n}\n","import Dialog from '@mui/material/Dialog';\nimport DialogContent from '@mui/material/DialogContent';\nimport { useDispatch, useSelector } from 'react-redux';\nimport Grid from '@mui/material/Grid';\nimport '../../Stylesheets/Order/Summary.css';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport moment from 'moment';\nimport environment from '../../environment';\nimport { calculatePrices, CHOSEN_DISTRIBUTION_METHOD } from '../../utils/helperFunctions';\nimport {\n FormControl,\n FormControlLabel,\n FormHelperText,\n FormLabel,\n InputLabel,\n MenuItem,\n Radio,\n RadioGroup,\n Select,\n} from '@mui/material';\nimport React, { createRef, useCallback, useEffect, useRef, useState } from 'react';\nimport { getCommissionCampaigns, getProductInfo } from '../../Redux/ApiCalls';\nimport SignaturePad from 'react-signature-pad-wrapper';\nimport identityServerStore from '../../IdentityServer/store';\nimport PowerOrderSummary from './PowerOrderSummary';\nimport Typography from '@mui/material/Typography';\nimport Box from '@mui/material/Box';\nimport PriceSummary from './PriceSummary';\nimport { round } from 'lodash/math';\nimport { AddonOrderSummary } from './AddonOrderSummary';\nimport { isPuls, isStromSmart } from '../../utils/Methods';\nimport { SellerAndStoreSummary } from './SellerAndStoreSummary';\nimport { ForutsigbarBetalingConvertsationTemplate } from './ForutsigbarBetalingConvertsationTemplate';\nimport { InvoicePrices } from '../../utils/Prices';\n\nfunction Summary({ open, handleClose }) {\n const dispatch = useDispatch();\n const state = useSelector((state) => state.reducer);\n const commissionCampaigns = useSelector((state) => state.reducer.commissionCampaigns);\n const isBedrift = environment.isBedrift === 'true';\n const [selectedCommissionCampaign, setSelectedCommissionCampaign] = useState(0);\n const [showCommissionCampaignError, setShowCommissionCampaignError] = useState(false);\n const [isTMStore, setIsTMStore] = useState(false);\n const [currentExtraProduct, setCurrentExtraProduct] = useState();\n const dialogRef = createRef();\n const requireCommissionCampaign =\n isTMStore &&\n ((state.powerOrders && state.powerOrders.length > 0) ||\n (state.addonOrders && state.addonOrders.length > 0));\n\n // Digital signature\n const [chosenConfirm, setChosen] = useState('sms');\n const signaturePadComp = useRef({});\n const [imageURL, setImageURL] = useState();\n\n const clear = () => {\n signaturePadComp.current.clear();\n };\n\n const user = identityServerStore?.getState().auth.user;\n\n const brand = state.brand ?? 'FKAS';\n\n const submitOrder = async () => {\n switch (chosenConfirm) {\n case 'sms':\n addOrders(false);\n break;\n case 'epost':\n addOrders(true);\n break;\n case 'signature':\n setImageURL(await signaturePadComp.current.toDataURL('image/png', 0.5));\n break;\n default:\n console.log('Error setting order');\n }\n };\n\n // Runs every time an image is submited and ready\n useEffect(() => {\n if (imageURL != null) {\n addOrders(false);\n }\n\n // eslint-disable-next-line\n }, [imageURL]);\n\n useEffect(() => {\n dispatch(getCommissionCampaigns(state.conductorUrl));\n //eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useEffect(() => {\n // List of store ids of TM stores that need to select commissionCampaign\n const tmStores = [20, 646, 27, 645, 612, 329, 719, 896, 788, 789];\n if (state.activeStore?.identityServerId) {\n setIsTMStore(tmStores.includes(parseInt(state.activeStore.identityServerId)));\n }\n }, [state.activeStore]);\n\n // resets signature image selector to sms when overide is selected\n useEffect(() => {\n if (state.overrideAccept) {\n setChosen('sms');\n }\n }, [state.overrideAccept]);\n\n const changeConfirm = (selectedWay) => {\n switch (selectedWay.target.value) {\n case 'epost':\n setChosen('epost');\n break;\n case 'sms':\n setChosen('sms');\n break;\n case 'signature':\n setChosen('signature');\n break;\n default:\n console.log('Error');\n }\n };\n\n function preparePowerOrders(\n powerOrders,\n invoiceAddress,\n invoicePostCode,\n email,\n chosenDistributionMethod,\n postBoxAddress,\n coAddress,\n attAddress,\n contactPerson,\n isBedrift,\n ) {\n let sale = [];\n let checkDate = new Date();\n checkDate.setDate(checkDate.getDate() + 14);\n var momentDate = moment(checkDate, 'MM/D/YYYY');\n\n for (var i = 0; i < powerOrders.length; i++) {\n let clone = JSON.parse(JSON.stringify(powerOrders[i].priceElementList));\n for (var x = 0; x < clone.length; x++) {\n if (clone[x].factor === 100 && clone[x].externalId !== 'FORNYBAR') {\n let shala = (parseFloat(powerOrders[i].priceElementList[x].price) / 100).toFixed(4);\n clone[x].price = parseFloat(shala);\n }\n }\n\n let extraProducts = [];\n powerOrders[i].extraProducts.forEach((element) => {\n let campaignList = [];\n element?.campaigns?.forEach((campaign) => {\n campaignList.push({\n campaignId: campaign.campaignId,\n campaignName: campaign.campaignName,\n });\n });\n extraProducts.push({\n id: element.id,\n campaigns: campaignList.length === 0 ? null : campaignList,\n priceElementList: element.priceElements,\n minimumTermDays: element.minimumTermDays,\n minimumTermMonths: element.minimumTermMonths,\n });\n });\n\n sale.push({\n deliveryPoint: {\n address: powerOrders[i].address,\n zipCode: powerOrders[i].zipCode,\n city: powerOrders[i].city,\n meteringPointIdentification: powerOrders[i].meteringPointIdentification,\n meterIdentification: powerOrders[i].meterIdentification,\n ...(powerOrders[i].siteInfo?.elhubDataCore ?? {}),\n },\n productId: powerOrders[i].id,\n startUpDate: powerOrders[i].startDate.date,\n extraProducts: extraProducts,\n campaign: powerOrders[i].productCampaign\n ? {\n campaignId: powerOrders[i].productCampaign.id,\n campaignName: powerOrders[i].productCampaign.name,\n }\n : null,\n accountId: powerOrders[i].invoice?.accountId,\n iSCUCustomerId: powerOrders[i].invoice?.iscuId,\n momentCustomerId: powerOrders[i].invoice?.refId,\n bonusCampaigns: powerOrders[i].bonusCampaigns,\n rightOfWithDrawal:\n powerOrders[i].startDate.name === '14 dagers oppstart'\n ? true\n : momentDate.isSame(moment(powerOrders[0].startDate.date), 'day') ||\n moment(powerOrders[0].startDate.date) > momentDate,\n priceElementList: clone,\n minimumTermDays:\n powerOrders[i].minimumTermDays !== null ? powerOrders[i].minimumTermDays : null,\n invoiceLabel: powerOrders[i].invoiceLabel,\n invoiceDetailsCore: isBedrift\n ? {\n address:\n invoiceAddress && invoiceAddress.length > 0\n ? invoiceAddress\n : powerOrders[i].address,\n zipCode:\n invoicePostCode && invoicePostCode.length > 0\n ? invoicePostCode\n : powerOrders[i].zipCode,\n email: email === null ? email : email.trim(),\n distributionMethod:\n chosenDistributionMethod !== CHOSEN_DISTRIBUTION_METHOD.sameAsBefore\n ? chosenDistributionMethod\n : null,\n postBoxAddress:\n postBoxAddress !== null && postBoxAddress.length > 0 ? postBoxAddress : null,\n co: coAddress !== null && coAddress.length > 0 ? coAddress : null,\n att: attAddress !== null && attAddress.length > 0 ? attAddress : null,\n eInvoiceReference: powerOrders[i].thirdPartyEhf,\n }\n : null,\n contactPerson: contactPerson,\n iRiskDealId: powerOrders[i].iRiskDealId,\n iRiskGroupId: powerOrders[i].iRiskGroupId,\n fixedPriceCore: powerOrders[i].fixedPrice != null ? powerOrders[i].fixedPrice : null,\n separateInvoice: powerOrders[i].separateInvoice,\n freeText: powerOrders[i].freeText?.trim() === '' ? null : powerOrders[i].freeText,\n });\n }\n return sale;\n }\n\n function prepareMarketplaceOrders(\n marketplaceOrders,\n invoiceAddress,\n invoicePostCode,\n email,\n chosenDistributionMethod,\n postBoxAddress,\n coAddress,\n attAddress,\n contactPerson,\n isBedrift,\n ) {\n let sale = [];\n\n for (let i = 0; i < marketplaceOrders.length; i++) {\n // vil alle dp få pulsmåler tilbud?\n sale.push({\n // fjerne properties som er null?\n // addressen må settes enten av powersaledata som har ekstraproduktet\n // eller av standalone marketplace order\n // sett marketplaceOrders[i].address etc. sammen med powerOrders?\n deliveryPoint: {\n address: marketplaceOrders[i].shippingAddress, // TODO: blir dette rett?\n zipCode: marketplaceOrders[i].shippingPostCode, // midlertidig\n city: marketplaceOrders[i].shippingCity, // midlertidig\n meteringPointIdentification: null,\n meterIdentification: null,\n // tomt obj her?\n },\n sku: marketplaceOrders[i].name,\n amount: marketplaceOrders[i].amount,\n shippingAddress: marketplaceOrders[i].shippingAddress,\n shippingPostCode: marketplaceOrders[i].shippingPostCode,\n shippingCity: marketplaceOrders[i].shippingCity,\n productId: marketplaceOrders[i].id,\n startUpDate: null,\n chosenDistributionMethod: marketplaceOrders[i].chosenDistributionMethod,\n extraProducts: [],\n campaign: null, // vil vi ha kampanje? er det noe som kan brukes sammen med coupons?\n accountId: null,\n iSCUCustomerId: null,\n momentCustomerId: null,\n bonusCampaigns: [],\n rightOfWithDrawal: null,\n priceElementList: [],\n minimumTermDays: null,\n invoiceLabel: null, // brukes bare på powersale\n invoiceDetailsCore: null,\n contactPerson: null,\n iRiskDealId: null,\n iRiskGroupId: null,\n fixedPriceCore: null,\n separateInvoice: false, // bruke deg?\n freeText: null, // bruke deg til internal og/eller customer notes på order offeR?\n });\n }\n\n return sale;\n }\n\n const addOrders = (contractMail) => {\n if (\n isTMStore &&\n state.powerOrders &&\n state.powerOrders.length > 0 &&\n (selectedCommissionCampaign == null || selectedCommissionCampaign === 0)\n ) {\n setShowCommissionCampaignError(true);\n if (dialogRef.current) {\n dialogRef.current.scrollTo({\n top: 0,\n behavior: 'smooth',\n });\n }\n return;\n }\n\n if (contractMail) {\n dispatch({ type: 'SET_CONTRACT_BY_MAIL' });\n }\n\n let sales = preparePowerOrders(\n state.powerOrders,\n state.invoiceAddress,\n state.invoicePostCode,\n state.email,\n state.chosenDistributionMethod,\n state.postBoxAddress,\n state.coAddress,\n state.attAddress,\n state.contactPerson,\n isBedrift,\n );\n\n let addonSales = preparePowerOrders(\n state.addonOrders,\n state.invoiceAddress,\n state.invoicePostCode,\n state.email,\n state.chosenDistributionMethod,\n state.postBoxAddress,\n state.coAddress,\n state.attAddress,\n state.contactPerson,\n isBedrift,\n );\n\n // kanskje bare ha deg utenfor?\n let marketplaceSales = prepareMarketplaceOrders(\n state.marketplaceOrders,\n state.invoiceAddress,\n state.invoicePostCode,\n state.email,\n state.chosenDistributionMethod,\n state.postBoxAddress,\n state.coAddress,\n state.attAddress,\n state.contactPerson,\n isBedrift,\n );\n\n let mobileSalesList = [];\n if (state.mobileOrders.length > 0) {\n for (var m = 0; m < state.mobileOrders.length; m++) {\n let users = [];\n for (var u = 0; u < state.mobileOrders[m].Users.length; u++) {\n let extraProducts = [];\n state.mobileOrders[m].Users[u].ExtraProducts.map(\n (elem) => (extraProducts = extraProducts.concat({ id: elem.id })),\n );\n users.push({\n IsOwner: state.mobileOrders[m].Users[u].isOwner,\n ProductHubId: state.mobileOrders[m].Users[u].Product.id,\n Campaign:\n state.mobileOrders[m].Users[u].Campaigns.length > 0\n ? {\n campaignId: state.mobileOrders[m].Users[u].Campaigns[0].id,\n campaignName: state.mobileOrders[m].Users[u].Campaigns[0].name,\n }\n : null,\n MobileNumber: state.mobileOrders[m].Users[u].MobileNumber,\n BirthDate: state.mobileOrders[m].Users[u].BirthDate,\n Email: state.mobileOrders[m].Users[u].Email,\n ExtraProducts: extraProducts,\n FirstName: state.mobileOrders[m].Users[u].FirstName,\n LastName: state.mobileOrders[m].Users[u].LastName,\n PortingDate:\n state.mobileOrders[m].Users[u].MobileNumber !== null\n ? state.mobileOrders[m].Users[u].PortingDate\n : null,\n });\n }\n let mobileSale = {\n ProductId: state.mobileOrders[m].Users[0].ProductHubId,\n SSN: state.mobileOrders[m].SSN,\n FirstName: state.mobileOrders[m].FirstName,\n LastName: state.mobileOrders[m].LastName,\n Fullname: state.mobileOrders[m].Fullname,\n Phone: state.mobileOrders[m].Phone,\n Email: state.email === null ? state.email : state.email.trim(),\n ChosenDistributionMethod: state.mobileOrders[m].DistributionMethodEnum,\n Seller: state.seller,\n Store: state.activeStore,\n EInvoiceReference: state.mobileOrders[m].EInvoiceReference,\n SalesTypeId: state.mobileOrders[m].SalesTypeId,\n Users: users,\n Accepted: false,\n Address: state.invoiceAddress,\n zipCode: state.invoicePostCode,\n InvoiceCity: state.invoiceCity,\n OverrideCredit: state.overrideCredit,\n CreditCheckResult: state.creditCheck\n ? state.creditCheck.creditStatus === 1\n ? 1\n : null\n : null,\n };\n\n mobileSalesList = mobileSalesList.concat(mobileSale);\n }\n }\n\n let salesModuleSales = [];\n if (\n state.powerOrders.length > 0 ||\n state.addonOrders.length > 0 ||\n state.marketplaceOrders.length > 0\n ) {\n // TODO: sjekk at denne funker\n const firstOrder =\n state.powerOrders.length > 0\n ? state.powerOrders[0]\n : state.addonOrders.length > 0\n ? state.addonOrders[0]\n : state.marketplaceOrders.length > 0\n ? state.marketplaceOrders[0]\n : undefined;\n salesModuleSales = {\n commissionCampaign: selectedCommissionCampaign === 0 ? null : selectedCommissionCampaign,\n ssn: state.ssn,\n firstName: isBedrift ? null : state.name.trim().split(' ').slice(0, -1).join(' '),\n lastName: isBedrift ? null : state.name.trim().split(' ').slice(-1).join(' '),\n fullName: isBedrift ? state.name : null,\n organizationNumber: isBedrift ? state.ssn : null,\n phone: state.phone,\n noEmail: isBedrift ? null : state.noEmail,\n email: state.email === null ? state.email : state.email.trim(),\n address:\n state.invoiceAddress && state.invoiceAddress.length > 0\n ? state.invoiceAddress\n : firstOrder.address,\n zipCode:\n state.invoicePostCode && state.invoicePostCode.length > 0\n ? state.invoicePostCode\n : firstOrder.zipCode,\n city: firstOrder.city,\n brandId: state.brand === 'FKAS' ? 1 : 2,\n seller: state.seller,\n store: state.activeStore,\n sale: sales,\n addonSale: addonSales,\n mdmId: state.mdmId,\n accepted: false,\n chosenDistributionMethod:\n state.chosenDistributionMethod !== CHOSEN_DISTRIBUTION_METHOD.sameAsBefore\n ? state.chosenDistributionMethod\n : null,\n creditCheckResult: state.creditCheck\n ? state.creditCheck.creditStatus === 1\n ? 1\n : null\n : null,\n salesTypeId: environment.isBedrift === 'true' ? 2 : 1,\n contractMail: contractMail,\n overrideCredit: state.overrideCredit,\n postBoxAddress:\n state.postBoxAddress !== null && state.postBoxAddress.length > 0\n ? state.postBoxAddress\n : null,\n co: state.coAddress !== null && state.coAddress.length > 0 ? state.coAddress : null,\n att: state.attAddress !== null && state.attAddress.length > 0 ? state.attAddress : null,\n overrideAccept: chosenConfirm === 'signature' ? true : state.overrideAccept,\n digitalSignature: chosenConfirm === 'signature' ? imageURL : null,\n otherEmailRecipient: state.otherEmailRecipient,\n mobileSale: mobileSalesList,\n tobbMembershipNumber: state.tobbMembershipNumber,\n marketplaceSale: marketplaceSales,\n overrideFreeze: state.overrideFreeze,\n eInvoiceReference: state.eInvoice?.reference ?? null,\n };\n } else {\n salesModuleSales = {\n ssn: state.ssn,\n firstName: isBedrift ? null : state.name.trim().split(' ').slice(0, -1).join(' '),\n lastName: isBedrift ? null : state.name.trim().split(' ').slice(-1).join(' '),\n fullName: isBedrift ? state.name : null,\n email: state.email === null ? state.email : state.email.trim(),\n phone: state.phone,\n brandId: state.brand === 'FKAS' ? 1 : 2,\n mobileSale: mobileSalesList,\n overrideAccept: chosenConfirm === 'signature' ? true : state.overrideAccept,\n digitalSignature: chosenConfirm === 'signature' ? imageURL : null,\n contractMail: contractMail,\n salesTypeId: environment.isBedrift === 'true' ? 2 : 1,\n };\n }\n\n setSalesModuleSales(salesModuleSales);\n };\n\n const handleSelectedCommissionCampaignChange = (event) => {\n setShowCommissionCampaignError(false);\n console.log('Ny verdi: ' + event.target.value);\n setSelectedCommissionCampaign(event.target.value);\n };\n\n const setSalesModuleSales = (salesModuleSales) => {\n dispatch({ type: 'SET_SALESMODULE_SALES', salesModuleSales: salesModuleSales });\n };\n\n const showExtraProductInfoMobile = (extraProduct, index, ind) => {\n dispatch({\n type: 'SET_SHOW_DETAILS',\n payload: null,\n });\n setCurrentExtraProduct({ index: index, name: extraProduct.name, ind: ind });\n dispatch(\n getProductInfo(state.orderModuleApiUrl, extraProduct.id, state.brand, false, true, false),\n );\n };\n const distributionMethodEnum = (num) => {\n switch (num) {\n case 1:\n return 'Papirfaktura';\n break;\n case 2:\n return 'E-faktura';\n break;\n case 3:\n return 'E-post';\n default:\n return 'Ukjent';\n break;\n }\n };\n let extraProductPrices = (index, sur, mobile) => {\n let total = 0;\n if (\n !mobile &&\n state.powerOrders[index]?.extraProducts !== undefined &&\n state.powerOrders[index]?.extraProducts?.length > 0\n ) {\n state.powerOrders[index].extraProducts.map((product) => {\n const matchingPrice =\n state.addonProducts &&\n state.addonProducts.find((priceProduct) => priceProduct.id === product.id);\n const priceelements = matchingPrice && matchingPrice?.priceInfo?.priceElements?.length > 1;\n const price =\n matchingPrice &&\n (priceelements\n ? matchingPrice?.priceInfo?.priceElements[1]?.pricing?.price *\n matchingPrice?.priceInfo?.priceElements[1]?.factor +\n matchingPrice?.priceInfo?.priceElements[0]?.pricing?.price *\n matchingPrice?.priceInfo?.priceElements[0]?.factor\n : matchingPrice?.priceInfo?.priceElements[0]?.pricing?.price *\n matchingPrice?.priceInfo?.priceElements[0]?.factor);\n const denomination =\n matchingPrice && matchingPrice?.priceInfo?.priceElements[0]?.denomination;\n if (denomination === 'kr/dag' && !sur) {\n total += price * 30; // assuming 30 days in a month\n }\n if (denomination === 'kr/mnd' && !sur) {\n total += price * 1.25;\n }\n if (denomination === 'øre/kWh' && sur) {\n total += price * 1.25; //Temporary fix for surcharge while we wait for the correct price\n }\n });\n } else if (\n mobile &&\n state.mobileOrders[index] !== undefined &&\n state.mobileOrders[index]?.Users[0]?.ExtraProducts !== null\n ) {\n state.mobileOrders[index].Users[0].ExtraProducts.map((product) => {\n total += product?.data?.monthlyFeeIncVat;\n });\n }\n if (\n !mobile &&\n sur &&\n state.powerOrders[index].extraProducts !== null &&\n state.powerOrders[index].extraProducts.length > 0\n ) {\n state.powerOrders[index].extraProducts.map((product) => {\n if (product.id === 726) {\n total += -1;\n }\n });\n }\n return round(total, 3);\n };\n\n let noMVA = (item) => {\n return state.powerProducts.some((i) => item.id === i.id && i.tags?.includes('NO4'));\n };\n let totalMonthlyPrice = (item, index, mobile = false) => {\n let price = 0;\n if (mobile) {\n price = item.Users[0].Product?.data?.priceIncVat || 0;\n price += extraProductPrices(index, true, true);\n } else if (item?.priceInfoElCert?.length > 0) {\n price = calculatePrices(item, true, false, noMVA(item));\n price += extraProductPrices(index, false, false);\n }\n return price;\n };\n\n let totalSurcharge = (item, index) => {\n if (item.priceInfoElCert !== null) {\n return (\n calculatePrices(item, false, false, noMVA(item)) + extraProductPrices(index, true, false)\n );\n } else {\n return 0;\n }\n };\n\n const addToSummary = useCallback(\n (\n power,\n name,\n price,\n priceSur,\n denomination1,\n denomination2,\n addon,\n item,\n index,\n totMo,\n priceType,\n factor,\n ) => {\n let totalM;\n let totalS;\n\n if (power) {\n totalM = addon ? price + extraProductPrices(index, false, false) : totMo;\n totalS = priceSur + extraProductPrices(index, true, false);\n } else {\n totalM = addon ? price + extraProductPrices(index, false, true) : totMo;\n totalS = 0;\n }\n let addonName,\n addonPrice,\n extraDeno,\n campaignId = null;\n\n let epLIST = [];\n if (addon && power) {\n item.extraProducts.forEach((product) => {\n const matchingPrice = state.addonProducts.find(\n (priceProduct) => priceProduct.id === product.id,\n );\n const priceElements =\n matchingPrice && matchingPrice?.priceInfo?.priceElements?.length > 1;\n const addonProducts = state.chosenAddonProducts;\n let price;\n let lade = false;\n if (addonProducts !== null && addonProducts !== undefined && addonProducts.length > 0) {\n const prod = addonProducts.find((priceProduct) => priceProduct?.id === product?.id);\n if (prod?.id === 755 || prod?.id === 621) {\n return;\n }\n if (\n prod &&\n prod.priceElements !== null &&\n prod.priceElements !== undefined &&\n prod.priceElements.length > 0\n ) {\n price = prod.priceElements[0].price;\n extraDeno = matchingPrice && matchingPrice?.priceInfo?.priceElements[0]?.denomination;\n } else if (prod && prod?.id === 726) {\n price = -1;\n extraDeno = 'øre/kWh';\n lade = true;\n } else if (isPuls(prod?.id, brand)) {\n var pulsPriceElements = matchingPrice?.priceInfo?.priceElements?.filter(\n (p) => p.name !== 'Bruddgebyr',\n );\n price = pulsPriceElements.reduce(\n (total, element) => total + element.pricing?.price / element.factor,\n 0,\n );\n\n extraDeno = pulsPriceElements[0].denomination;\n } else {\n price =\n matchingPrice &&\n (priceElements\n ? matchingPrice?.priceInfo?.priceElements[1]?.pricing?.price *\n matchingPrice?.priceInfo?.priceElements[1]?.factor +\n matchingPrice?.priceInfo?.priceElements[0]?.pricing?.price *\n matchingPrice?.priceInfo?.priceElements[0]?.factor\n : matchingPrice?.priceInfo?.priceElements[0]?.pricing?.price *\n matchingPrice?.priceInfo?.priceElements[0]?.factor);\n extraDeno = matchingPrice && matchingPrice?.priceInfo?.priceElements[0]?.denomination;\n }\n }\n\n addonName = product.name;\n addonPrice = price;\n if (isStromSmart(product.id, brand)) addonPrice = addonPrice * 1.25;\n if (extraDeno === 'øre/kWh' && !lade) {\n addonPrice = addonPrice * 1.25;\n }\n if (product?.campaigns !== null && product?.campaigns?.length > 0) {\n campaignId = product.campaigns[0].campaignId;\n }\n\n let extraProductObj = {\n name: addonName,\n price: addonPrice,\n denomination: extraDeno,\n campaigns:\n power && campaignId\n ? [\n {\n campaignId: campaignId,\n },\n ]\n : null,\n };\n epLIST.push(extraProductObj);\n });\n }\n\n if (addon && !power) {\n item.Users !== null &&\n item.Users[0].ExtraProducts.map((product) => {\n let extraProductObj = {\n name: product.name,\n price: product.data.monthlyFeeIncVat,\n denomination: 'kr/mnd',\n campaigns: null,\n };\n\n epLIST.push(extraProductObj);\n });\n }\n let campaignTexts = [];\n if (power && item.extraProducts !== null && item.extraProducts.length > 0) {\n item.extraProducts.forEach((product) => {\n if (product.campaigns !== null && product?.campaigns?.length > 0) {\n product.campaigns.forEach((campaign) => {\n campaignTexts.push(campaign.campaignName);\n });\n }\n });\n }\n if (\n !power &&\n item.Users[0]?.Campaigns !== null &&\n item.Users[0]?.Campaigns !== undefined &&\n item?.Users[0]?.Campaigns.length > 0\n ) {\n item.Users[0].Campaigns.forEach((product) => {\n if (\n product.name !== null &&\n product.campaigns !== null &&\n product.campaigns !== undefined &&\n product.campaigns.length > 0\n ) {\n campaignTexts.push(product.name);\n }\n });\n }\n\n const order = {\n product: name,\n quantity: 1,\n priceMonthly: price,\n priceSurcharge: priceSur,\n denominationMonthly: denomination1,\n denominationSurcharge: denomination2,\n extraProducts: epLIST,\n totalMonthly: totalM,\n totalSurcharges: !priceType ? totalS : 0,\n totalPowerPrice: priceType ? totalS : 0,\n distribution: distributionMethodEnum(chosenConfirm),\n newNumber: !power ? item.Users[0].NewNumber : null,\n campaignTexts: campaignTexts,\n fixed: priceType,\n };\n if (power) {\n dispatch({ type: 'ADD_SUMMARY_POWER_ORDER', summaryPowerOrders: order });\n } else {\n dispatch({ type: 'ADD_SUMMARY_MOBILE_ORDER', summaryMobileOrders: order });\n }\n },\n [state.powerOrders, state.mobileOrders],\n );\n\n return (\n \n \n

    Oppsummering

    \n\n {requireCommissionCampaign && (\n \n Provisjonskampanje\n \n {commissionCampaigns.map((item) => (\n \n {item.name}\n \n ))}\n \n {showCommissionCampaignError && (\n Provisjonskampanje kreves\n )}\n \n )}\n\n \n\n \n \n {state.mobileOrders &&\n state.mobileOrders.map((item, index) => (\n \n {item.Users.map((user, ind) => (\n <>\n \n Bestilling (Mobilabonnement)\n \n
    \n Produkt:{' '}\n \n {item.Users[0].Product.name} ({item.Users[0].Product.data.priceIncVat} kr/mnd)\n \n
    \n
    \n \n \n Bruker:\n \n \n
    \n {user.Name}\n
    \n \n \n {user.Campaigns.length > 0 ? (\n Kampanje: \n ) : (\n Ingen kampanje valgt\n )}\n \n \n {user.Campaigns.map((campaign) => (\n <>\n {campaign.name}\n
    \n \n ))}\n
    \n
    \n \n \n {user.ExtraProducts.length > 0 ? (\n Tilleggstjenester: \n ) : (\n Ingen tillegstjenester valgt\n )}\n \n \n {user.ExtraProducts.map((extraProduct) => (\n <>\n \n showExtraProductInfoMobile(extraProduct, index, ind)\n }\n >\n {extraProduct.name} ({extraProduct.data.monthlyFeeIncVat}{' '}\n kr/mnd){' '}\n {extraProduct.data.monthlyFeeIncVat &&\n ' + Etablering: ' +\n extraProduct.data.initialFeeIncVat +\n ' kr/mnd'}\n \n
    \n \n ))}\n
    \n
    \n {user.MobileNumber != null && !user.NewNumber && (\n \n \n Porteringsdato:\n \n \n {user.PortingDate !== null ? (\n \n {moment(user.PortingDate).format('DD/MM/YYYY')}\n \n ) : (\n 8 virkedager frem i tid\n )}\n \n \n )}\n
    \n
    \n
    \n
    \n {state.showDetails &&\n currentExtraProduct &&\n currentExtraProduct.index === index &&\n currentExtraProduct.ind === ind && (\n \n
    \n {currentExtraProduct.name}\n
    \n
    \n
    \n )}\n
    \n {state.summaryDetailsMobile[index] ? (\n \n ) : (\n
    \n \n
    \n )}\n {!isBedrift && (\n \n \n Oppsummering\n \n \n \n 0\n }\n extraProduct={item.Users[0].ExtraProducts}\n extraProductPrice={item.Users[0].ExtraProducts}\n product={item}\n onPriceChange={(monthlyPrice, surcharge) => {\n totalMonthlyPrice += monthlyPrice;\n totalSurcharge += surcharge;\n }}\n mobile={true}\n addToSummary={addToSummary}\n index={index}\n />\n \n {item && (\n <>\n \n \n Total månedsbeløp:\n \n \n \n \n {totalMonthlyPrice(item, index, true) + ' kr/mnd'}\n \n \n \n )}\n {item && item.Users[0].NewNumber && (\n <>\n \n Nytt nummer\n \n \n 99 kr \n \n \n )}\n {state.chosenDistributionMethod === 1 && (\n <>\n \n \n {distributionMethodEnum(state.chosenDistributionMethod)}\n \n \n \n \n {InvoicePrices.MobilePaper} kr/stk{' '}\n \n \n \n )}\n \n \n )}\n
    \n

    \n \n ))}\n \n ))}\n\n {!isBedrift && (\n
    \n
    \n Jeg bekrefter at jeg har informert kunde om følgende:\n
    \n
      \n
    • De viktigste egenskapene til varen eller tjenesten
    • \n
    • Samlet pris
    • \n
    • Informasjon om angreretten
    • \n
    • Avtalens varighet og evt. oppsigelsestid eller minste bindingstid
    • \n
    • Vilkårene for å si opp avtalen (eks bruddgebyr, miste trumfpoeng)
    • \n
    • Kredittsjekk blir utført
    • \n {state.powerOrders && state.powerOrders?.length > 0 && (\n
    • 24 timer frys periode og tilhørende sms-påminnelse
    • \n )}\n
    \n
    \n )}\n\n \n\n
    \n \n {state.overrideAccept === false && (\n <>\n \n Bekreftelsesmetode:\n \n }\n label={'Send kontrakt på SMS'}\n />\n }\n label={'Send kontrakt på epost'}\n />\n\n {user.profile.role && user.profile.role.includes('digitalSignature') && (\n }\n label={'Signer digitalt'}\n />\n )}\n \n \n \n )}\n\n \n {chosenConfirm === 'signature' ? (\n
    \n
    \n \n
    \n
    \n ) : (\n <>\n )}\n {chosenConfirm === 'signature' ? (\n \n ) : (\n <>\n )}\n\n {state.overrideAccept ? (\n addOrders(true)}\n >\n Send bestilling (Aksept er overstyrt)\n \n ) : (\n \n Send inn\n \n )}\n \n
    \n
    \n
    \n
    \n \n );\n}\n\nexport default Summary;\n","import { useEffect } from 'react';\nimport Button from '@mui/material/Button';\nimport Dialog from '@mui/material/Dialog';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogActions from '@mui/material/DialogActions';\nimport { useSelector } from 'react-redux';\nimport Table from '@mui/material/Table';\nimport TableBody from '@mui/material/TableBody';\nimport TableCell from '@mui/material/TableCell';\nimport TableContainer from '@mui/material/TableContainer';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport Paper from '@mui/material/Paper';\nimport { useDispatch } from 'react-redux';\nimport FilledInput from '@mui/material/FilledInput';\nimport InputAdornment from '@mui/material/InputAdornment';\nimport FormControl from '@mui/material/FormControl';\n\nexport default function CalculateFastpris({ open, handleClose }) {\n const state = useSelector((state) => state.reducer);\n const dispatch = useDispatch();\n const onlyNumbersRegex = /^(\\s*|\\d+)$/;\n\n const handleChange = (index, e) => {\n if (e.target.value.match(onlyNumbersRegex)) {\n dispatch({\n type: 'UPDATE_POWER_ORDER',\n index: index,\n item: {\n fixedPrice: {\n facilityVolume: e.target.value,\n agreedVolume: state.powerOrders[index].fixedPrice.agreedVolume,\n consumptionProfileId: state.powerOrders[index].fixedPrice.consumptionProfileId,\n consumptionProfileName: state.powerOrders[index].fixedPrice.consumptionProfileName,\n consumptionProfileDescription:\n state.powerOrders[index].fixedPrice.consumptionProfileDescription,\n endDate: state.powerOrders[index].fixedPrice.endDate,\n comment: state.powerOrders[index].fixedPrice.comment,\n },\n },\n });\n }\n };\n\n const calculate = () => {\n let total = 0;\n let estimatedAnnualConsumptionList = [];\n state.powerOrders.forEach((item, index) => {\n if (\n state.momentProduct?.productDefinitionId === 25439 ||\n state.momentProduct?.productDefinitionId === 1002607\n ) {\n total += item.elhubDataCore?.estimatedAnnualConsumption\n ? item.elhubDataCore?.estimatedAnnualConsumption\n : 0;\n estimatedAnnualConsumptionList = estimatedAnnualConsumptionList.concat({\n annualConsumption: item.elhubDataCore?.estimatedAnnualConsumption\n ? item.elhubDataCore?.estimatedAnnualConsumption\n : 0,\n percentage: null,\n yearlyVolume: null,\n agreedVolume: parseInt(item.fixedPrice?.agreedVolume),\n powerOrderIndex: index,\n });\n }\n });\n\n estimatedAnnualConsumptionList.forEach((item, index) => {\n estimatedAnnualConsumptionList[index].percentage =\n (estimatedAnnualConsumptionList[index].annualConsumption / total) * 100 !== Infinity &&\n !isNaN(parseFloat((estimatedAnnualConsumptionList[index].annualConsumption / total) * 100))\n ? (estimatedAnnualConsumptionList[index].annualConsumption / total) * 100\n : 0;\n });\n estimatedAnnualConsumptionList.forEach((item, index) => {\n let yearlyVolume = 0;\n if (estimatedAnnualConsumptionList[index].percentage !== 0) {\n yearlyVolume = (\n (estimatedAnnualConsumptionList[index].agreedVolume *\n estimatedAnnualConsumptionList[index].percentage) /\n 100\n ).toFixed(0);\n }\n estimatedAnnualConsumptionList[index].yearlyVolume = yearlyVolume;\n dispatch({\n type: 'UPDATE_POWER_ORDER',\n index: estimatedAnnualConsumptionList[index].powerOrderIndex,\n item: {\n fixedPrice: {\n facilityVolume: yearlyVolume,\n agreedVolume:\n state.powerOrders[estimatedAnnualConsumptionList[index].powerOrderIndex].fixedPrice\n .agreedVolume,\n consumptionProfileId:\n state.powerOrders[estimatedAnnualConsumptionList[index].powerOrderIndex].fixedPrice\n .consumptionProfileId,\n consumptionProfileName:\n state.powerOrders[estimatedAnnualConsumptionList[index].powerOrderIndex].fixedPrice\n .consumptionProfileName,\n consumptionProfileDescription:\n state.powerOrders[estimatedAnnualConsumptionList[index].powerOrderIndex].fixedPrice\n .consumptionProfileDescription,\n endDate:\n state.powerOrders[estimatedAnnualConsumptionList[index].powerOrderIndex].fixedPrice\n .endDate,\n comment:\n state.powerOrders[estimatedAnnualConsumptionList[index].powerOrderIndex].fixedPrice\n .comment,\n },\n },\n });\n });\n };\n\n useEffect(() => {\n if (open === true) {\n calculate();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open]);\n\n return (\n
    \n \n \n Kalkuler fastpris\n \n \n \n \n \n \n Addresse\n MålepunktId\n Avtalt årsvolum\n Årsvolum anlegg\n \n \n \n {state.powerOrders\n .filter(\n (item) =>\n item.priceInfoMoment?.productDefinitionId === 25439 ||\n item.priceInfoMoment?.productDefinitionId === 1002607,\n )\n .map((item, index) => (\n \n \n {item.address}, {item.zipCode} {item.city}\n \n {item.meteringPointIdentification}\n {item.fixedPrice?.agreedVolume} kWh\n \n \n kWh}\n aria-describedby=\"filled-weight-helper-text\"\n inputProps={{\n 'aria-label': 'weight',\n }}\n value={item.fixedPrice.facilityVolume}\n onChange={(e) => handleChange(index, e)}\n />\n \n \n \n ))}\n \n
    \n
    \n
    \n \n \n \n \n
    \n );\n}\n","import Grid from \"@mui/material/Grid\";\nimport moment from \"moment/moment\";\nimport CloseIcon from \"@mui/icons-material/Close\";\n\nexport default function OrderPowerOrder({orders, brand, type, onDelete}) {\n return (\n <>\n {orders.map((item, index) =>\n
    \n
    \n \n \n

    {item.product}

    \n
    \n \n

    {item.address}

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

    Tilleggsprodukter:

    \n
    \n {JSON.stringify(item.extraProducts) !== JSON.stringify([]) ?\n \n
    \n {item.extraProducts.map((item => {\n return (\n

    {item.name}

    \n );\n }))}\n
    \n
    \n :\n \n

    Ingen

    \n
    }\n
    \n\n {item.productCampaign &&\n \n \n

    Kampanje:

    \n
    \n \n
    \n

    {item.productCampaign.name}

    \n
    \n
    \n
    \n }\n\n \n \n

    Fakturaavtale:

    \n
    \n \n {item.invoice &&\n

    {item.invoice.name}

    \n }\n
    \n
    \n\n \n \n

    Oppstartsdato:

    \n
    \n \n {item.startDate.name === 'Oppstartsdato' ?\n

    {moment(item.startDate.date).format('DD.MM.YYYY')}

    \n :\n

    {item.startDate.name}

    \n }\n
    \n
    \n\n {item.bonusCampaigns.map(bonusCampaign =>\n <>\n {bonusCampaign.bonusTypeId === 3 &&\n \n \n

    Eurobonus Nummer:

    \n
    \n \n\n

    {item.eBNumber}

    \n\n
    \n\n
    \n }\n )}\n\n \n {/* Temporary removed because it does not work properly */}\n {/*
    handleClickOpen(item, index)}>\n \n

    Rediger valg

    \n
    */}\n\n
    onDelete(item, index, type)}>\n \n

    Fjern fra bestilling

    \n
    \n
    \n
    \n
    \n )}\n \n )\n}","import Grid from \"@mui/material/Grid\";\nimport CloseIcon from \"@mui/icons-material/Close\";\n\nexport default function OrderMobileOrder({orders, brand, onDelete, name}) {\n return (\n <>\n {orders.map((item, index) =>\n
    \n {item.Users.map((user, userIndex) => (\n
    \n\n \n \n

    {user.Product.name} ({user.Product.recPrice} kr/mnd)

    \n
    \n \n

    {user.Name}

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

    Kampanje:

    \n
    \n {JSON.stringify(user.Campaigns) !== JSON.stringify([]) ?\n \n
    \n {user.Campaigns.map((campaign => {\n return (\n

    {campaign.name}

    \n );\n }))}\n
    \n
    \n :\n \n

    Ingen

    \n
    }\n
    \n\n \n \n

    Mobilnummer:

    \n
    \n \n {user.newNumber ?

    Nytt nummer

    :\n

    {user.NewNumber ? 'Nytt nummer 99,-' : user.MobileNumber}

    \n }\n
    \n
    \n\n \n \n

    Tilleggsprodukter:

    \n
    \n {JSON.stringify(user.ExtraProducts) !== JSON.stringify([]) ?\n \n
    \n {user.ExtraProducts.map((extraProduct => {\n return (\n

    {extraProduct.name} ({extraProduct.recPrice} kr/mnd) {extraProduct.initPrice && (' + Etablering: ' + extraProduct.initPrice + ' kr/mnd')}

    \n );\n }))}\n
    \n
    \n :\n \n

    Ingen

    \n
    }\n
    \n\n \n \n

    Email:

    \n
    \n \n {

    {user.Email}

    }\n
    \n
    \n\n \n \n

    Abonnementseier:

    \n
    \n \n {

    {name}

    }\n
    \n
    \n\n \n {/*
    handleClickOpenUpdateMobileUser(item, index)}>\n \n

    Rediger valg

    \n
    */}\n\n
    onDelete(item, index, 'mobile')}>\n \n

    Fjern fra bestilling

    \n
    \n
    \n
    \n ))}\n
    \n )}\n \n )\n}","import Grid from '@mui/material/Grid';\nimport CloseIcon from '@mui/icons-material/Close';\nfunction OrderMarketplaceOrder({ orderOffers, brand, type, onDelete }) {\n return (\n <>\n {orderOffers.map((item, index) => (\n
    \n
    \n \n \n

    {item.name}

    \n
    \n \n

    {item.shippingAddress}

    \n
    \n

    \n {item.shippingPostCode} {item.shippingCity}\n

    \n
    \n
    \n \n
    onDelete(item, index, type)}>\n \n

    \n Fjern fra bestilling\n

    \n
    \n
    \n
    \n
    \n ))}\n \n );\n}\nexport default OrderMarketplaceOrder;\n","import { useEffect, useState } from 'react';\nimport '../../Stylesheets/Order/Order.css';\nimport { useSelector } from 'react-redux';\nimport { useDispatch } from 'react-redux';\nimport Confirm from './Confirm';\nimport OrderValidationError, { isValidOrder } from './OrderValidationError';\nimport Summary from './Summary';\nimport CalculateFastpris from './CalculateFastpris';\nimport {\n getPostArea,\n getProductInfoSummary,\n getProductInfoSummaryMobile,\n} from '../../Redux/ApiCalls';\nimport OrderPowerOrder from './OrderPowerOrder';\nimport OrderMobileOrder from './OrderMobileOrder';\nimport OrderMarketplaceOrder from '../AddonProduct/OrderMarketplaceOrder';\n\nfunction Order() {\n const state = useSelector((state) => state.reducer);\n const dispatch = useDispatch();\n const [openConfirm, setOpenConfirm] = useState(false);\n const [openSummary, setOpenSummary] = useState(false);\n const [openCalculateFastpris, setOpenCalculateFastpris] = useState(false);\n const [deleteItem, setDeleteItem] = useState();\n const [deleteIndex, setDeleteIndex] = useState();\n const [deleteType, setDeleteType] = useState();\n const [fixedPriceButton, setFixedPriceButton] = useState(\n state.powerOrders &&\n state.powerOrders.some(\n (item) =>\n item.priceInfoMoment?.productDefinitionId === 25439 ||\n item.priceInfoMoment?.productDefinitionId === 1002607,\n ),\n );\n\n const handleClickOpenConfirm = (item, index, type) => {\n setDeleteItem(item);\n setDeleteIndex(index);\n setDeleteType(type);\n setOpenConfirm(true);\n };\n\n const handleCloseConfirm = () => {\n setOpenConfirm(false);\n };\n const getInvoiceCity = (zip) => {\n dispatch(getPostArea(zip, true));\n };\n const handleClickOpenSummary = () => {\n if (isValidOrder(state)) {\n getInvoiceCity(state.invoicePostCode);\n setOpenSummary(true);\n dispatch({ type: 'SET_SHOW_DETAILS', payload: null });\n dispatch({ type: 'RESET_SUMMARY_DETAILS' });\n dispatch({ type: 'RESET_ADDON_SUMMARY_DETAILS' });\n dispatch({ type: 'RESET_SUMMARY_DETAILS_MOBILE' });\n dispatch({ type: 'RESET_SUMMARY_ORDER' });\n\n // eslint-disable-next-line\n const joinedPowerOrders = (state.powerOrders ?? []).concat(state.addonOrders);\n joinedPowerOrders &&\n joinedPowerOrders.map((item) => {\n dispatch(\n getProductInfoSummary(\n state.orderModuleApiUrl,\n item.id,\n state.brand,\n item.productCampaign,\n state.filteredCampaigns,\n item.extraProducts,\n item?.product === 'Tilleggstjeneste',\n ),\n );\n });\n // eslint-disable-next-line\n state.mobileOrders &&\n state.mobileOrders.map((item) => {\n dispatch(\n getProductInfoSummaryMobile(\n state.orderModuleApiUrl,\n item.Users[0].Product.id,\n state.brand,\n ),\n );\n });\n }\n };\n\n const handleClickCloseSummary = () => {\n setOpenSummary(false);\n };\n\n const handleClickOpenCalculateFastpris = () => {\n setOpenCalculateFastpris(true);\n };\n\n const handleClickCloseCalculateFastpris = () => {\n setOpenCalculateFastpris(false);\n setFixedPriceButton(false);\n };\n\n useEffect(() => {\n window.scrollTo(0, 0);\n if (\n JSON.stringify(state.powerOrders) === JSON.stringify([]) &&\n JSON.stringify(state.mobileOrders) === JSON.stringify([]) &&\n JSON.stringify(state.addonOrders) === JSON.stringify([]) &&\n JSON.stringify(state.marketplaceOrders) === JSON.stringify([])\n ) {\n dispatch({ type: 'SET_ORDER_INITIATED', orderInitiated: false });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [state.powerOrders, state.mobileOrders, state.addonOrders]);\n\n return (\n
    \n

    Bestilling

    \n {(JSON.stringify(state.powerOrders) !== JSON.stringify([]) ||\n JSON.stringify(state.mobileUsers) !== JSON.stringify([]) ||\n JSON.stringify(state.addonOrders) !== JSON.stringify([]) ||\n JSON.stringify(state.marketplaceOrders) !== JSON.stringify([])) && (\n
    \n

    Strømavtaler

    \n \n {state.addonOrders?.length > 0 && (\n <>\n

    Tilleggstjenester

    \n \n \n )}\n\n {state.mobileOrders.length > 0 && (\n <>\n

    Mobilabonnement

    \n \n \n )}\n\n {state.marketplaceOrders.length > 0 && (\n <>\n

    Markedsplass tilbud

    \n \n \n )}\n\n {openConfirm && (\n \n )}\n
    \n )}\n \n {fixedPriceButton ? (\n \n Kalkuler fastpris\n \n ) : (\n <>\n \n Gå videre\n \n {state.powerOrders &&\n state.powerOrders.some(\n (item) =>\n item.priceInfoMoment?.productDefinitionId === 25439 ||\n item.priceInfoMoment?.productDefinitionId === 1002607,\n ) &&\n fixedPriceButton === false && (\n \n Kalkuler fastpris\n \n )}\n \n )}\n \n \n
    \n );\n}\n\nexport default Order;\n","import * as React from 'react';\nimport List from '@mui/material/List';\nimport ListItem from '@mui/material/ListItem';\nimport ListItemText from '@mui/material/ListItemText';\nimport MenuItem from '@mui/material/MenuItem';\nimport Menu from '@mui/material/Menu';\nimport KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';\nimport { useSelector } from 'react-redux';\nimport { useDispatch } from 'react-redux';\nimport { makeStyles } from '@mui/styles';\n\nexport default function SelectStore() {\n const state = useSelector((state) => state.reducer);\n const dispatch = useDispatch();\n const classes = useStyles();\n const [SelectStoreAnchorEl, SetSelectStoreAnchorEl] = React.useState(null);\n const open = Boolean(SelectStoreAnchorEl);\n\n const changeActiveStore = (identityServerId) => {\n let new_store = state.sellerStores.filter((s) => s.identityServerId === identityServerId)[0];\n if (new_store) {\n dispatch({ type: 'SET_ACTIVE_STORE', activeStore: new_store });\n }\n };\n\n const handleClickListItem = (event) => {\n if (state.sellerStores?.length > 1) {\n SetSelectStoreAnchorEl(event.currentTarget);\n }\n };\n\n const handleMenuItemClick = (index, store) => {\n changeActiveStore(store.identityServerId);\n SetSelectStoreAnchorEl(null);\n };\n\n const handleClose = () => {\n SetSelectStoreAnchorEl(null);\n };\n\n return (\n \n \n \n \n {state.sellerStores && state.sellerStores.length > 1 ? : ''}\n \n \n \n {state.activeStore &&\n state.sellerStores &&\n state.sellerStores.map((store, index) =>\n store === state.activeStore ? (\n ''\n ) : (\n handleMenuItemClick(index, store)}\n >\n {store.name ? store.name : 'StoreId: ' + store.identityServerId}\n \n ),\n )}\n \n \n );\n}\n\nconst useStyles = makeStyles((theme) => ({\n menuList: {\n borderRadius: '4px !important',\n },\n}));\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATgAAABCCAYAAADDscp5AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA0nSURBVHgB7Z3hdds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+IhgXXhArCRWKmTGucb9r63Z0v1YhoFjDMc5yDXHUUCIIwP2h1c6FLJoZwkoKtYUTbkGArQRCE0awgAWh9tEqwAfMUDIemoY9gwx3NudnJZODPS6XUURG6R7Iya7DbuWkQBCEJSQRcG/dCN4kiqzbRQtsjscZVQrv0DawrRO6GA0EQToj/A+8FqdIDyTu+AAAAAElFTkSuQmCC\"","import Grid from '@mui/material/Grid';\nimport '../Stylesheets/ReceiptOrder.css';\nimport Typography from '@mui/material/Typography';\nimport { List, ListItemText } from '@mui/material';\nimport moment from 'moment/moment';\nimport Divider from '@mui/material/Divider';\nimport { useSelector } from 'react-redux';\n\nexport default function PlacingOrderPowerOrder({ item, index }) {\n const state = useSelector((state) => state.reducer);\n\n return (\n <>\n \n \n Produktnavn\n \n \n {item.product}\n \n \n {item.productCampaign && (\n \n \n Produktkampanje\n \n \n {item.productCampaign?.name}\n \n \n )}\n \n \n Adresse\n \n \n {item.address}\n \n \n \n \n Tilleggsprodukter\n \n \n {JSON.stringify(item.extraProducts) !== JSON.stringify([]) ? (\n \n {item.extraProducts.map((item) => {\n return {item.name};\n })}\n \n ) : (\n 'Ingen'\n )}\n \n \n \n \n Fakturaavtale\n \n \n {item.invoice?.name}\n \n \n \n \n Oppstartsdato\n \n \n {item.startDate && item.startDate.date === null\n ? item.startDate.name\n : moment(state.startDate.date).format('DD.MM.YYYY')}\n \n \n \n \n Ordre-Id\n \n \n {state.salesModuleSaleResult &&\n state.salesModuleSaleResult.length !== 0 &&\n state.salesModuleSaleResult[0].data[index].id}\n \n \n {state.powerOrders &&\n state.powerOrders.map(\n (item) =>\n item.iRiskGroupID && (\n \n \n IRiskGroupID\n \n \n
    {item.iRiskGroupID}
    \n \n
    \n ),\n )}\n \n \n );\n}\n","import { useEffect } from 'react';\nimport '../Stylesheets/ReceiptOrder.css';\nimport Fjordkraft_logo from '../Images/Fjordkraft_logo.png';\nimport Trondelagkraft_logo from '../Images/Trondelagkraft_logo.png';\nimport Paper from '@mui/material/Paper';\nimport { useDispatch, useSelector } from 'react-redux';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport { createOrders } from '../Redux/ApiCalls';\nimport Grid from '@mui/material/Grid';\nimport moment from 'moment';\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport { Button, List, ListItemText } from '@mui/material';\nimport Image from 'mui-image';\nimport { createTheme, ThemeProvider } from '@mui/material/styles';\nimport { yellow } from '@mui/material/colors';\nimport PlacingOrderPowerOrder from './PlacingOrderPowerOrder';\nimport environment from '../environment';\nimport { round } from 'lodash/math';\nimport Divider from '@mui/material/Divider';\n\nfunction PlacingOrder() {\n const state = useSelector((state) => state.reducer);\n const dispatch = useDispatch();\n\n useEffect(() => {\n dispatch(createOrders(state.conductorUrl, state.salesModuleSales, state.orderModuleApiUrl));\n //eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const backFromReceipt = () => {\n dispatch({ type: 'BACK_FROM_RECEIPT' });\n };\n\n const resetReducer = () => {\n window.location.reload();\n };\n\n const tryAgain = () => {\n dispatch({ type: 'CLEAR_ERROR_CREATE_ORDER' });\n dispatch({ type: 'SET_PLACING_ORDER_LOADING', placingOrderLoading: true });\n dispatch(createOrders(state.conductorUrl, state.salesModuleSales, state.orderModuleApiUrl));\n };\n const isBedrift = environment.isBedrift === 'true';\n\n return (\n
    \n \n \n \n \n \n \n\n \n {state.placingOrderLoading ? (\n
    \n \n \n Fullfører bestilling\n \n
    \n ) : !state.errorCreateOrder ? (\n <>\n {/* Overskriften*/}\n \n Bestillingen er fullført!\n \n \n {state.overrideAccept ? (\n 'Aksept er overstyrt'\n ) : (\n <>\n {state.salesModuleSales.digitalSignature !== null\n ? 'Ordre akseptert via digital signatur'\n : `Kontrakt er sendt til kunde på ${\n state.contractByMail === true\n ? `mail: ${\n state.otherEmailRecipient\n ? state.otherEmailRecipient\n : state.email && state.email\n }`\n : `telefon: ${state.phone && state.phone}`\n }`}\n \n )}\n \n {state.powerOrders &&\n state.powerOrders.map((item, index) => (\n <>\n \n \n Produktnavn\n \n \n {item.product}\n \n
    \n {item.productCampaign && (\n \n \n Produktkampanje\n \n \n {item.productCampaign?.name}\n \n \n )}\n \n \n Adresse\n \n \n {item.address}\n \n \n \n \n Tilleggsprodukter\n \n \n {JSON.stringify(item.extraProducts) !== JSON.stringify([]) ? (\n \n {item.extraProducts.map((item) => {\n return {item.name};\n })}\n \n ) : (\n 'Ingen'\n )}\n \n \n \n \n Fakturaavtale\n \n \n {item.invoice.name}\n \n \n \n \n Oppstartsdato\n \n \n {item.startDate && item.startDate.date === null\n ? item.startDate.name\n : moment(state.startDate.date).format('DD.MM.YYYY')}\n \n \n \n \n Ordre-Id\n \n \n {state.salesModuleSaleResult &&\n state.salesModuleSaleResult.length !== 0 &&\n state.salesModuleSaleResult[0].data[index].id}\n \n \n {state.powerOrders &&\n state.powerOrders.map(\n (item) =>\n item.iRiskGroupID && (\n \n \n IRiskGroupID\n \n \n
    {item.iRiskGroupID}
    \n \n \n ),\n )}\n {!isBedrift && (\n \n \n Oppsummering\n \n {state.summaryPowerOrders[index] && (\n <>\n \n \n {state.summaryPowerOrders[index].product}\n \n \n \n \n Månedsbeløp:\n \n \n {round(state.summaryPowerOrders[index].priceMonthly, 3) +\n ' ' +\n 'kr/mnd'}\n \n \n \n \n Påslag:\n \n \n {round(state.summaryPowerOrders[index].priceSurcharge, 3) +\n ' ' +\n 'øre/kWh'}\n \n \n {state.summaryPowerOrders[index].extraProducts !== null && (\n <>\n \n Valgte tilleggstjenester\n \n {state.summaryPowerOrders[index].extraProducts.map(\n (product, i) => (\n \n \n {product.name}\n \n \n {round(product.price, 3) + ' ' + product.denomination}\n \n \n ),\n )}\n \n )}\n \n \n Total månedsbeløp:\n \n \n {round(state.summaryPowerOrders[index].totalMonthly, 3) +\n ' ' +\n 'kr/mnd'}\n \n \n \n \n {state.summaryPowerOrders[index].totalSurcharges !== 0\n ? 'Total påslag:'\n : 'Total strømpris:'}\n \n \n {(state.summaryPowerOrders[index].totalSurcharges !== 0\n ? round(state.summaryPowerOrders[index].totalSurcharges, 3)\n : round(state.summaryPowerOrders[index].totalPowerPrice, 3)) +\n ' ' +\n 'øre/kWh'}\n \n \n \n {state.summaryPowerOrders[index].campaignTexts !== null &&\n state.summaryPowerOrders[index].campaignTexts.length > 0 &&\n state.summaryPowerOrders[index].campaignTexts.map(\n (campaign) => (\n \n {campaign}\n \n ),\n )}\n \n \n )}\n \n )}\n \n \n ))}\n {state.addonOrders &&\n state.addonOrders.map((item, index) => (\n \n ))}\n {state.mobileOrders.length > 0 && (\n <>\n \n \n Mobilabonnementer\n \n \n \n )}\n {state.mobileOrders &&\n state.mobileOrders.map((item, index) =>\n item.Users.map((user, i) => (\n <>\n \n \n Navn\n \n \n {user.Name}\n \n \n \n \n Produkt\n \n \n {user.Product.name} ({user.Product.recPrice} kr/mnd)\n \n \n \n \n Nummer\n \n \n {user.NewNumber ? 'Nytt nummer (99,-)' : user.MobileNumber}\n \n \n {!user.NewNumber && (\n \n \n Porteringsdato\n \n \n {user.PortingDate\n ? moment(user.PortingDate).format('DD.MM.YYYY')\n : ''}\n \n \n )}\n \n \n Kampanje\n \n \n {JSON.stringify(user.Campaigns) !== JSON.stringify([]) ? (\n \n {user.Campaigns.map((campaign) => {\n return {campaign.name};\n })}\n \n ) : (\n 'Ingen'\n )}\n \n \n \n \n Tilleggsprodukter\n \n \n {JSON.stringify(user.ExtraProducts) !== JSON.stringify([]) ? (\n \n {user.ExtraProducts.map((extraProduct) => {\n return (\n \n {extraProduct.name} ({extraProduct.recPrice} kr/mnd){' '}\n {extraProduct.initPrice &&\n ' + Etablering: ' + extraProduct.initPrice + ' kr/mnd'}\n \n );\n })}\n \n ) : (\n 'Ingen'\n )}\n \n \n {!isBedrift && state.summaryMobileOrders[index] !== null && (\n \n \n Oppsummering\n \n {state.summaryMobileOrders[index] && (\n <>\n \n \n {state.summaryMobileOrders[index].product}\n \n \n \n \n Månedsbeløp:\n \n \n {round(state.summaryMobileOrders[index].priceMonthly, 3) +\n ' ' +\n state.summaryMobileOrders[index].denominationMonthly}\n \n \n {state.summaryMobileOrders[index].extraProducts !== null && (\n <>\n \n Valgte tilleggstjenester\n \n {state.summaryMobileOrders[index].extraProducts.map(\n (product, i) => (\n \n \n {product.name}\n \n \n {round(product.price, 3) + ' ' + product.denomination}\n \n \n ),\n )}\n \n )}\n \n \n Total månedsbeløp:\n \n \n {round(state.summaryMobileOrders[index].totalMonthly, 3) +\n state.summaryMobileOrders[index].denominationMonthly}\n \n \n {state.summaryMobileOrders[index].newNumber === true && (\n \n \n Nytt nummer\n \n \n 99 kr\n \n \n )}\n \n )}\n \n )}\n \n )),\n )}\n \n ) : (\n \n \n Det har oppstått en feil\n \n \n {state.errorCreateOrder && state.errorCreateOrder.message}\n \n {state.errorCreateOrder && state.errorCreateOrder.message === 'Network Error' && (\n \n Databasen er midlertidig utilgjengelig, vent et par minutter og prøv igjen\n \n )}\n \n Prøv igjen\n \n \n )}\n \n \n \n {!state.placingOrderLoading && state.errorCreateOrder ? (\n \n Gå tilbake\n \n ) : (\n \n Lukk\n \n )}\n \n \n \n \n \n
    \n );\n}\n\nexport default PlacingOrder;\n\nconst theme = createTheme({\n palette: {\n primary: yellow,\n },\n});\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALgAAAAfCAYAAABUKgeRAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAxeSURBVHgB7VwLtFVFGf4uVyx5CyRmAYYYhkaY0srSKDOVMJZQakUFq9UqTMoeBLrSWqViVthTxAqh0t5maoGKBRdLBCoQUMoSuMobLngfXN5s/+/MP5z/zJ1zzr7AXfde1v7W+hb7zOyZPXvmm3/+f/ZcgBRIkqRC2F14UiT9ZuEh4d+F5yNDhvYAEesw4TThCuHeJI9NwgeFXxTelRRij3ASMmRoqxCBDhTOUavcXOwXjkKGDG0RIs5LhDXJkeM+YQUyZGgjOMFfiDDfJ//MEv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4XFr+BLd9Rr+X1uwM3iNMf24lDi7Na+GsIBkuRdUmrzbI49bY7UFdFru0zdwLfsqk15g6wx0UYrvJ32bSudxzkvmPNAQtB7f66Jtyi22RpjHg9Esnn03r9WM4P9ufxNunbWHs8EPznM/D9QnraUTeZ67Sd5mDvJB4DycPYyhO9vmaxnx/WI3W+hK4Mznso0PaBsYHXsgevo8bTB+EOzbE7+FWKX8Pv4Ceb36vDer14HiN1Tq9NeezuIKN1HffpG1sNHVsNHWHh/B477XaHv/hjXXXRP0tES2X3bR/mcPThI+idcBlm5E9rQLFQzHz8BcnJl+USzO39I71STeuXrRO3D+n1aGF85OLSzW39CgwHkIKg1oG6KfDGQlOAIqMgxeKge/QT8v/B24yeNA3pc/aS9P5jj7gZL1D9Pm02tYo0KD11bopAE5MGigfwHJiDNX6Whp0F2lEOYac5HS3/Dj5NrJP/4viOysh/PsxzuH7rY7eRYEn6XE5Wh/dkaEU6PbRgjO4ZPBJw1apv+9FfklfhcI/JG/3KHZOmkta2j8erkHroxYZSoHbh7+B6ye6SAzoKHAK339cosC5/bcbGTK0M4R/DRMjjxS05z8MiaKYD86vmmn/qmeC+OBVyNCWQVdkHFxcRR/bW236vAxwuaU2G/Gg8PiDCHxuM3zwS5GhvYGBJc/IHPf/h81xtyRlSIWj+VO5doVXAGSoilc1c8jfAAAAAElFTkSuQmCC\"","import * as React from 'react';\nimport { useEffect, useState } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { ClickAwayListener, Typography } from '@mui/material';\nimport Box from '@mui/material/Box';\nimport axios from 'axios';\nimport identityServerStore from '../IdentityServer/store/index';\nimport '../Stylesheets/Buttons.css';\nimport '../Stylesheets/HomeContent.css';\nimport ArrowBackIosNew from '@mui/icons-material/ArrowBackIosNew';\nimport ArrowForwardIos from '@mui/icons-material/ArrowForwardIos';\nimport environment from '../environment';\n\n// Gets system messages from AddedChangesText api endpoint,\n// regarding changes done to the UI the user should be aware of.\n// Automatically pops up unless user has specified it.\n// This is implemented in IronForge, Stormwind and MoltenCore,\n// and centrally configured in MoltenCore, to get access:\n// add your subId in OrderModuleInterface>SideBar.js>addedChangesDelegates const\nexport default function AddedChanges() {\n const state = useSelector((state) => state.reducer);\n const dispatch = useDispatch();\n const [displayText, setDisplayText] = useState([]); // messages to be displayed\n const [currentText, setCurrentText] = useState(''); // the text that's displayed now\n const [createdAt, setCreatedAt] = useState([]); // array of dates\n const [createdAtIndex, setCreatedAtIndex] = useState(-1); // index that corresponds to displayText array\n const [currentPage, setCurrentPage] = useState(-1); // index of the page currently viewing\n const [isBedrift, setIsBedrift] = useState(environment.isBedrift);\n\n const url = state.orderModuleApiUrl + '/api/AddedChanges';\n const textUrl = state.orderModuleApiUrl + '/api/AddedChangesText/';\n //const url = 'https://localhost:44391/api/AddedChanges'\n //const textUrl = 'https://localhost:44391/api/AddedChangesText/'\n\n useEffect(() => {\n setIsBedrift(!isBedrift);\n // eslint-disable-next-line\n }, [environment.isBedrift]);\n\n useEffect(() => {\n getAndSetChanges();\n dispatch({ type: 'SET_ADDEDCHANGES_LIST', payload: displayText });\n\n return function cleanUp() {\n setDisplayText([]);\n };\n // eslint-disable-next-line\n }, []);\n\n useEffect(() => {\n if (state.addedChangesSeen === false && state.addedChangesLoading === true) {\n dispatch({ type: 'SET_SHOW_ADDEDCHANGES', bool: true });\n dispatch({ type: 'SET_ADDEDCHANGES_LIST', payload: displayText });\n }\n // eslint-disable-next-line\n }, [state.addedChangesLoading]);\n\n // fetches system messages and creates an array used for list\n const getAndSetChanges = () => {\n axios\n .get(textUrl + 'all/0?isBedrift=' + isBedrift)\n .then((res) => {\n textAndDateSplitter(res.data);\n })\n .catch((err) => {\n //console.log(err)\n });\n };\n\n // opt out of automatic displaying\n const setSeen = (viewedBool) => {\n axios\n .post(\n url +\n '/' +\n identityServerStore.getState().auth.user.profile.sub +\n '/0?viewed=' +\n viewedBool,\n )\n .then(function (response) {\n //console.log(response)\n })\n .catch(function (error) {\n //console.log(error)\n });\n };\n\n // pagination for text\n const paginate = (array, pageSize, pageNumber) => {\n return array.slice((pageNumber - 1) * pageSize, pageNumber * pageSize);\n };\n\n // y/m/d --> d/m/y\n const dateTimeHelper = (date) => {\n if (date) {\n let splitDate = date.split('.').shift().split(' ');\n return splitDate.shift().split('-').reverse().join('.');\n }\n };\n\n // for syncing the text and date arrays\n const textAndDateSplitter = (array) => {\n let textHolder = [];\n let dateHolder = [];\n let textResult = [];\n let dateResult = [];\n\n for (let i = 0; i < array.length; i++) {\n let split = array[i].split('|');\n textHolder.push(split[0]);\n dateHolder.push(split[1]);\n }\n\n textHolder.forEach((text) => {\n if (text !== '') {\n textResult.push(text);\n dateResult.push(dateHolder[textHolder.indexOf(text)]);\n }\n });\n\n setterHelper(textResult, dateResult);\n };\n\n const setterHelper = (tArray, dArray) => {\n setDisplayText(tArray);\n setCurrentText(paginate(tArray, 1, tArray.length));\n setCreatedAt(dArray);\n setCreatedAtIndex(dArray.length - 1);\n setCurrentPage(tArray.length);\n };\n\n // display previous text\n const onBackClick = () => {\n if (currentPage > 1) {\n setCurrentText(paginate(displayText, 1, currentPage - 1));\n setCurrentPage(currentPage - 1);\n setCreatedAtIndex(createdAtIndex - 1);\n }\n };\n\n // display next text\n const onForwardClick = () => {\n if (currentPage < displayText.length) {\n setCurrentText(paginate(displayText, 1, currentPage + 1));\n setCurrentPage(currentPage + 1);\n setCreatedAtIndex(createdAtIndex + 1);\n }\n };\n\n return (\n <>\n \n {state.addedChanges && (\n dispatch({ type: 'SET_SHOW_ADDEDCHANGES', bool: false })}\n >\n \n \n \n

    👨‍🔧 Nye endringer 👩‍🔧

    \n
    \n \n {' '}\n Publisert: \n {createdAt[createdAtIndex] && dateTimeHelper(createdAt[createdAtIndex])}\n \n \n {currentText}\n \n \n {\n setSeen(true);\n dispatch({ type: 'SET_SHOW_ADDEDCHANGES', bool: false });\n }}\n >\n Takk for info!\n \n \n \n \n )}\n
    \n \n );\n}\n","import Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport KeyboardDoubleArrowRightIcon from '@mui/icons-material/KeyboardDoubleArrowRight';\nimport KeyboardDoubleArrowLeftIcon from '@mui/icons-material/KeyboardDoubleArrowLeft';\nimport React, { useEffect, useState } from 'react';\nimport '../Stylesheets/StatusSidebar.css';\nimport List from '@mui/material/List';\nimport { Badge, ListItem, Slide } from '@mui/material';\nimport ListItemText from '@mui/material/ListItemText';\nimport FiberManualRecordIcon from '@mui/icons-material/FiberManualRecord';\nimport ListItemAvatar from '@mui/material/ListItemAvatar';\nimport Divider from '@mui/material/Divider';\n// import QuestionMarkIcon from '@mui/icons-material/QuestionMark';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { errorOrdermodule, errorProducthub } from '../Redux/ApiCalls';\nimport { getPingColor } from '../utils/helperFunctions';\nimport CircularProgress from '@mui/material/CircularProgress';\n\nfunction StatusSidebar() {\n const state = useSelector((state) => state.reducer);\n const dispatch = useDispatch();\n\n const [show, setShow] = useState(false);\n const [faq] = useState(false);\n const [hover, setHover] = useState(false);\n const [errors, setErrors] = useState(false);\n\n // Run a test when its opened\n const handleShow = () => {\n if (!show) {\n state.sellerStores &&\n dispatch(\n errorProducthub(state.orderModuleApiUrl, [state.sellerStores[0].identityServerId]),\n );\n dispatch(errorOrdermodule(state.orderModuleApiUrl));\n }\n setShow(!show);\n };\n\n // Resets the hover effect when closed\n useEffect(() => {\n if (!show) setHover(false);\n setErrors((state.errorPH[0] && !state.errorODM[0]) || state.errorODM[0]);\n // eslint-disable-next-line\n }, [show]);\n\n useEffect(() => {\n setErrors((state.errorPH[0] && !state.errorODM[0]) || state.errorODM[0]);\n }, [state.errorPH, state.errorODM]);\n\n return (\n <>\n {show ? (\n <>\n \n \n \n \n {\n // setFaq(!faq)}/>\n }\n \n Salgsløyper status\n \n \n {!faq && (\n \n \n \n \n \n \n \n \n \n \n \n \n \n {state.errorPH[1].ping === 'N/A' ? (\n \n ) : (\n \n )}\n \n \n \n \n \n\n \n \n {state.errorODM[1].ping === 'N/A' ? (\n \n ) : (\n \n )}\n \n \n \n \n \n \n \n )}\n {faq && (\n \n FAQ\n \n \n \n En modul er nede, hva kan jeg gjøre for å fikse det?\n \n \n Ingenting. Det er ingenting du som bruker kan gjøre for å fikse dette, det\n beste du kan gjøre er å ikke prøve å gjøre et salg igjen eller trykke på\n flere knapper.\n \n \n \"Insanity is doing the same thing over and over and expecting different\n results\"\n \n \n \n \n \n Jeg ser en modul er nede, hvordan rapporterer jeg dette?\n \n \n Ikke lag en jirasak på at en av modulene som er vist her er\n nede, IT er på saken og vi visste nok om feilen før deg.\n \n \n
    \n Hvis du har andre problemer som ikke kan ha en sammenheng med at en av\n modulene er nede, vil vi selvfølgelig ha beskjed.\n
    \n
    \n \n \n \n Hva gjør egentlig de forskjellige modulene?\n \n \n Kort fortalt så har Producthub alt som har med produkter å gjøre, så denne\n er nede vil du ikke kunne få se produkter eller butikker.\n \n \n
    \n Ordremodulen er hovedåren som store deler av salgsløypene og andre systemer\n flyter gjennom, hvis denne er nede vil du ikke få gjennom noe.\n
    \n
    \n \n \n \n Hva skal jeg gjøre imens problemene løses?\n \n \n Hvis jobben din direkte påvirkes av dette problemet er det nok bare til å\n lene seg tilbake å smøre seg med tålmodighet.\n \n \n
    \n For dere som er dårlig på det området så kommer det en liste med forslag\n under:\n
    \n
    \n \n
      \n
    • Se i taket
    • \n
    • Hent deg kaffe
    • \n
    • Ta 10 pushups
    • \n
    • \n Hent deg energidrikk (Utvikling sin favoritt)\n
    • \n
    • Gå og ta på litt gress
    • \n
    • Send en melding til Erlend og si han er kjekk og flink
    • \n
    • La oppdateringen til pc'en som du har utsatt i en uke nå oppdatere
    • \n
    • Ta 5 pushups til, bare 10 var i det minste laget
    • \n
    • Se i taket igjen, kanskje noe har endret seg
    • \n
    • Se hvor mange skriveleifer du finner i denne teksten
    • \n
    \n
    \n
    \n )}\n
    \n setShow(!show)}>\n \n \n
    \n
    \n \n ) : (\n handleShow()}\n style={{ width: 'fit-content', position: 'absolute', cursor: 'pointer' }}\n >\n \n setHover(true)}\n onMouseLeave={(e) => setHover(false)}\n />\n \n \n )}\n \n );\n}\n\nexport default StatusSidebar;\n","import { useDispatch, useSelector } from 'react-redux';\nimport Grid from '@mui/material/Grid';\nimport PersonalInformation from './PersonalInformation/PersonalInformation';\nimport CustomerResidences from './CustomerResidences/CustomerResidences';\nimport CurrentProducts from './CurrentProducts/CurrentProducts';\nimport AddProducts from './AddProducts/AddProducts';\nimport Order from './Order/Order';\nimport SelectStore from './SelectStore';\nimport React, { useEffect, useRef, useState } from 'react';\nimport '../Stylesheets/HomeContent.css';\nimport PlacingOrder from './PlacingOrder';\nimport identityServerStore from '../IdentityServer/store/index';\nimport EqualizerIcon from '@mui/icons-material/Equalizer';\nimport { Link } from 'react-router-dom';\nimport { getActiveDeliveryPoints, getSellerStoreNames } from '../Redux/ApiCalls';\nimport AddedChanges from './AddedChanges';\nimport LogoutIcon from '@mui/icons-material/Logout';\nimport { signoutRedirect } from '../IdentityServer/utils/identityServer/oidcService';\nimport UploadFileIcon from '@mui/icons-material/UploadFile';\nimport MenuIcon from '@mui/icons-material/Menu';\nimport { Button, ListItemIcon, MenuItem, MenuList, Popover } from '@mui/material';\nimport ListItemText from '@mui/material/ListItemText';\nimport { makeStyles } from '@mui/styles';\nimport FeedIcon from '@mui/icons-material/Feed';\nimport Typography from '@mui/material/Typography';\nimport environment from '../environment';\nimport StatusSidebar from './StatusSidebar';\n\nfunction HomeContent() {\n const hasFetchedSellerStoreNames = useRef(false);\n const state = useSelector((state) => state.reducer);\n const dispatch = useDispatch();\n const [showMenuItems, setShowMenuItems] = useState(false);\n const [menuAnchor, setMenuAnchor] = useState(null);\n const classes = useStyles();\n const isBedrift = environment.isBedrift === 'true';\n\n const changeBrand = (brand) => {\n let url = brand === 'FKAS' ? '?brand=FKAS' : '?brand=TKAS';\n window.location.replace(url);\n };\n\n const changeUrl = (newUrl) => {\n window.location.replace(newUrl);\n };\n\n const handleMenuClick = (event) => {\n setMenuAnchor(event.currentTarget);\n setShowMenuItems(true);\n };\n const handleMenuClose = () => {\n setMenuAnchor(null);\n setShowMenuItems(false);\n };\n\n const onClickAddedChanges = () => {\n setShowMenuItems(false);\n if (state.addedChanges === false) {\n dispatch({ type: 'SET_SHOW_ADDEDCHANGES', bool: true });\n } else {\n dispatch({ type: 'SET_SHOW_ADDEDCHANGES', bool: false });\n }\n };\n\n //Update stores names\n useEffect(() => {\n if (state?.sellerStores?.length > 0 && !hasFetchedSellerStoreNames.current) {\n dispatch(\n getSellerStoreNames(\n state.orderModuleApiUrl,\n state.sellerStores.map((o) => o.identityServerId),\n ),\n );\n hasFetchedSellerStoreNames.current = true;\n }\n }, [dispatch, state.orderModuleApiUrl, state.sellerStores]);\n\n // Set state.activeStore to default — only if it's not already set\n useEffect(() => {\n if (state.activeStore?.name) {\n return;\n }\n\n if (state.sellerStores) {\n dispatch({ type: 'SET_ACTIVE_STORE', activeStore: state.sellerStores[0] });\n }\n }, [state.activeStore, state.sellerStores, dispatch]);\n\n useEffect(() => {\n if (!isBedrift) {\n var checkIfPowerStore =\n state.allStores &&\n state.activeStore &&\n state.allStores.find((item) => item.id === state.activeStore.identityServerId);\n checkIfPowerStore !== null &&\n checkIfPowerStore !== undefined &&\n dispatch({ type: 'SET_IS_POWER_STORE', bool: checkIfPowerStore.parentId === 427 });\n }\n // eslint-disable-next-line\n }, [state.activeStore, state.allStores]);\n\n useEffect(() => {\n state.conductorUrl &&\n state.ssn &&\n !isBedrift &&\n dispatch(getActiveDeliveryPoints(state.conductorUrl, state.ssn, false, state.brand));\n //eslint-disable-next-line\n }, [state.ssn]);\n\n return (\n \n {identityServerStore.getState().auth.user.profile.store ? (\n <>\n {state.placingOrder ? (\n \n ) : (\n \n \n {state.brand === 'FKAS' && (\n \n )}\n {state.brand === 'TKAS' && (\n \n )}\n {!isBedrift && (\n changeUrl('https://ironforge-bedrift.fjordkraft.no')}\n >\n Bytt til Bedrift\n \n )}\n {isBedrift && (\n changeUrl('https://ironforge.fjordkraft.no')}\n >\n Bytt til Privat\n \n )}\n\n \n\n \n\n \n \n {identityServerStore.getState().auth.user.profile.role &&\n identityServerStore\n .getState()\n .auth.user.profile.role.includes('storkunder') && (\n \n \n \n \n \n Importer anlegg\n \n \n )}\n\n \n \n \n \n \n Statistikk\n \n \n \n \n \n \n Endringslogg\n \n {\n signoutRedirect();\n }}\n >\n \n \n \n Logg ut\n \n \n \n\n \n \n \n \n \n
    \n \n \n {!isBedrift && }\n
    \n \n
    \n {state && state.orderInitiated && (\n \n \n \n )}\n
    \n
    \n )}\n \n ) : (\n <>\n \n Ingen tilgang. Er du logget inn med riktig bruker?{' '}\n {\n signoutRedirect();\n }}\n size=\"large\"\n variant=\"contained\"\n startIcon={}\n >\n Logg ut og prøv på nytt\n \n \n \n )}\n
    \n );\n}\nconst useStyles = makeStyles((theme) => ({\n menuList: {\n borderRadius: '4px !important',\n },\n}));\n\nexport default HomeContent;\n","import { useState, useEffect, useMemo } from 'react';\nimport Accordion from '@mui/material/Accordion';\nimport AccordionSummary from '@mui/material/AccordionSummary';\nimport AccordionDetails from '@mui/material/AccordionDetails';\nimport { useSelector } from 'react-redux';\nimport ExpandMoreIcon from '@mui/icons-material/ExpandMore';\nimport Grid from '@mui/material/Grid';\nimport { useDispatch } from 'react-redux';\nimport { getSellerCount } from '../../Redux/ApiCalls';\nimport moment from 'moment';\nimport useSWR from 'swr';\nimport environment from '../../environment';\nimport axios from 'axios';\n\nexport const StatisticsAccordionElement = ({ title, statsObject, storeIdSales }) => {\n return (\n \n \n }\n aria-controls=\"panel1a-content\"\n id=\"panel1a-header\"\n >\n \n \n
    {title}
    \n
    \n \n
    {statsObject.count}
    \n
    \n
    \n \n {!storeIdSales && (\n \n \n {statsObject.orderIds &&\n statsObject.orderIds.map((orderId, key) => (\n \n ))}\n \n \n )}\n \n
    \n );\n};\n\nexport const StatisticsAccordionElementStoreId = ({\n title,\n statsObject,\n newSale,\n extraProduct,\n fromDate,\n toDate,\n storeIds,\n}) => {\n const state = useSelector((state) => state.reducer);\n const dispatch = useDispatch();\n const [match, setMatch] = useState(false);\n const [showSeller, setShowSeller] = useState(false);\n const [currentSeller, setCurrentSeller] = useState();\n\n const fire = (expanded) => {\n if (expanded === false) {\n dispatch(\n getSellerCount(\n state.conductorUrl,\n newSale,\n extraProduct,\n title,\n fromDate\n ? moment(fromDate).set({ hour: 0, minute: 0, second: 0, millisecond: 0 }).format()\n : null,\n toDate\n ? moment(toDate).set({ hour: 23, minute: 59, second: 59, millisecond: 0 }).format()\n : null,\n storeIds,\n ),\n setMatch(true),\n );\n } else {\n setMatch(false);\n }\n };\n\n const showOrderIds = (item) => {\n setShowSeller(true);\n setCurrentSeller(item);\n };\n\n const back = () => {\n setShowSeller(false);\n setCurrentSeller();\n };\n\n useEffect(() => {\n setMatch(state.sellerCountOpen === title + newSale + extraProduct);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [state.sellerCountOpen]);\n\n return (\n \n fire(match)} className=\"Accordion\">\n }\n aria-controls=\"panel2a-content\"\n id=\"panel2a-header\"\n >\n \n \n
    {title}
    \n
    \n \n
    {statsObject.count}
    \n
    \n
    \n \n {showSeller ? (\n \n {currentSeller && (\n
    \n

    \n {currentSeller.seller}{' '}\n \n

    \n \n {currentSeller.orderIds.map((item, index) => (\n \n ))}\n \n
    \n )}\n
    \n ) : (\n \n {state.sellerCount &&\n state.sellerCount.map((item, index) => (\n
    showOrderIds(item)}>\n {item.seller}: {item.count}\n
    \n ))}\n
    \n )}\n
    \n
    \n );\n};\n\nexport const StatisticsAccordionExtraProduct = ({ title, statsObject }) => {\n return (\n \n \n \n \n \n
    {title}
    \n
    \n \n
    {statsObject.count}
    \n
    \n
    \n
    \n
    \n
    \n );\n};\n\nconst CopyOrderIdButton = ({ orderId }) => {\n const state = useSelector((state) => state.reducer);\n\n const { data } = useSWR(\n `${environment.conductorUrl}/api/v1/ironforge/getBrandByOrderId/${orderId}`,\n (url) => axios.get(url).then((res) => res.data),\n );\n\n const url = useMemo(() => {\n if (data && data.brandId === 2) {\n return `https://stormwind.trondelagkraft.no/?orderid=${orderId}`;\n }\n\n return `${state.stormwindUrl}?orderid=${orderId}`;\n }, [data, orderId, state.stormwindUrl]);\n\n return (\n \n \n {orderId}\n \n \n );\n};\n\nconst statisticStyle = {\n iconStyling: {\n marginLeft: 3,\n },\n numStyling: {\n marginRight: 6,\n },\n};\n","import DatePicker from 'react-datepicker';\nimport ArrowForwardIcon from '@mui/icons-material/ArrowForward';\nimport { useDispatch, useSelector } from 'react-redux';\nimport Grid from '@mui/material/Grid';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport {\n StatisticsAccordionElement,\n StatisticsAccordionExtraProduct,\n} from './StatisticsAccordionElement';\nimport { StatisticsAccordionElementStoreId } from './StatisticsAccordionElement';\nimport { addSaleStatsQueue } from '../../Redux/ApiCalls';\nimport moment from 'moment/moment';\nimport { useEffect, useState } from 'react';\n\nfunction Content(props) {\n const dispatch = useDispatch();\n const state = useSelector((state) => state.reducer);\n const [isDisabled, setIsDisabled] = useState(false);\n const [showSuccessText, setShowSuccessText] = useState(false);\n const [showButton, setShowButton] = useState(false);\n\n useEffect(() => {\n if (\n props.salesType.length < 1 ||\n (props.salesType.length === 1 && props.salesType.every((e) => e === 4))\n ) {\n setShowButton(false);\n }\n // set allowed\n else if (props.salesType.every((e) => e === 1 || e === 2 || e === 4 || e === 7)) {\n setShowButton(true);\n } else {\n setShowButton(false);\n }\n }, [props.salesType]);\n\n const onDisableButton = async () => {\n setIsDisabled(true);\n setTimeout(function () {\n setIsDisabled(false);\n }, 7000);\n };\n console.log(props);\n\n const sendExcel = async () => {\n let salesTypeFilter = props.salesType.filter((t) => ![3, 4, 5, 6].includes(t)); // filterer ut alle ulovlige salgstyper for stats. 3 & 4 trenges aldri\n await onDisableButton();\n let statsResp = await dispatch(\n addSaleStatsQueue(state.conductorUrl, state.seller.email, {\n identityServerId: state.seller.identityServerId,\n fromDate: props.fromDate,\n toDate: props.toDate,\n storeIds:\n props.storeIds.length > 0\n ? props.storeIds\n : state.ownerStores?.map((s) => parseInt(s.storeId)) ?? props.allStores,\n sellerOrStoreOwner: props.sellerOrStoreOwner,\n salesType: salesTypeFilter,\n }),\n );\n if (statsResp !== 200) {\n setIsDisabled(false);\n }\n if (statsResp === 200) {\n setShowSuccessText(true);\n }\n return statsResp;\n };\n\n return (\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n\n {state.statisticsLoading === false ? (\n
    \n \n {state.statistics &&\n props.salesType.some((element) => element === 1) &&\n props.sellerOrStoreOwner === 1 && (\n
    \n \n
    {`Nysalg`}
    \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n )}\n\n {state.statistics &&\n props.salesType.some((element) => element === 2) &&\n props.sellerOrStoreOwner === 1 && (\n
    \n \n
    {`Produktbytte`}
    \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n )}\n {state.statistics &&\n props.salesType.some((element) => element === 5) &&\n props.sellerOrStoreOwner === 1 && (\n
    \n \n
    {`Tilleggsprodukter nysalg`}
    \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n )}\n\n {state.statistics &&\n props.salesType.some((element) => element === 6) &&\n props.sellerOrStoreOwner === 1 && (\n
    \n \n
    {`Tilleggsprodukter produktbytte:`}
    \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n )}\n\n {state.statistics &&\n props.salesType.some((element) => element === 7) &&\n props.sellerOrStoreOwner === 1 && (\n
    \n \n
    {`Mobilsalg`}
    \n \n \n \n \n \n \n \n
    \n
    \n )}\n\n {state.statistics &&\n props.salesType.some((element) => element === 1) &&\n props.sellerOrStoreOwner === 2 && (\n
    \n \n
    {`Nysalg`}
    \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n )}\n\n {state.statistics &&\n props.salesType.some((element) => element === 2) &&\n props.sellerOrStoreOwner === 2 && (\n
    \n \n
    {`Produktbytte`}
    \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n )}\n\n {state.statistics &&\n props.salesType.some((element) => element === 5) &&\n props.sellerOrStoreOwner === 2 && (\n
    \n \n
    {`Tilleggsprodukt nysalg`}
    \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n )}\n\n {state.statistics &&\n props.salesType.some((element) => element === 6) &&\n props.sellerOrStoreOwner === 2 && (\n
    \n \n
    {`Tilleggsprodukt produktbytte`}
    \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n )}\n {state.statistics &&\n props.salesType.some((element) => element === 7) &&\n props.sellerOrStoreOwner === 2 && (\n
    \n \n
    {`Mobilsalg`}
    \n \n \n \n \n \n \n \n
    \n
    \n )}\n
    \n
    \n ) : (\n \n \n
    \n \n
    \n
    \n
    \n )}\n\n {state.statistics && (\n
    \n {isDisabled &&

    Sender inn forespørsel...

    }\n {showSuccessText &&

    Etterspørselen din har blitt mottatt, og blir sendt på epost

    }\n {!state.errorExcel && showButton && (\n sendExcel()}\n >\n Send stats på mail\n \n )}\n
    \n )}\n
    \n );\n}\nexport default Content;\n","import { useState, useEffect } from 'react';\nimport AddShoppingCartIcon from '@mui/icons-material/AddShoppingCart';\nimport SwipeRightIcon from '@mui/icons-material/SwipeRight';\nimport AddBoxIcon from '@mui/icons-material/AddBox';\nimport AddBusinessIcon from '@mui/icons-material/AddBusiness';\nimport { useSelector } from 'react-redux';\nimport AodIcon from '@mui/icons-material/Aod';\n\nfunction Options(props) {\n const [store, setStore] = useState([]);\n const state = useSelector((state) => state.reducer);\n const options = [\n { enum: 1, title: 'Nysalg', image: },\n { enum: 2, title: 'Produktbytte', image: },\n { enum: 3, title: 'Tilleggsprodukter', image: },\n { enum: 4, title: 'Velg butikker', image: },\n { enum: 5, title: 'Nysalg' },\n { enum: 6, title: 'Produktbytte' },\n { enum: 7, title: 'Mobilsalg', image: },\n ];\n\n useEffect(() => {\n props.salesType && !props.salesType.some((element) => element === 4) && setStore([]);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [props.salesType]);\n\n const handleStore = (storeId) => {\n const children = state.ownerStores.filter((s) => s.parentId === storeId).map((s) => s.storeId);\n if (store.some((element) => element === storeId)) {\n const filteredStores = store.filter((element) => ![storeId, ...children].includes(element));\n setStore(filteredStores);\n let array = [];\n filteredStores.map((item) => (array = array.concat(item)));\n props.setChosenStores(array);\n } else {\n setStore(store.concat([storeId, ...children]));\n let array = [];\n store.concat([storeId, ...children]).map((item) => (array = array.concat(item)));\n props.setChosenStores(array);\n }\n };\n\n return (\n
    \n {options.map(\n (item, index) =>\n !(item.enum === 4 && props.sellerOrStoreOwner === 1) &&\n item.enum !== 5 &&\n item.enum !== 6 && (\n
    \n props.updateSalesType(item.enum)}\n style={\n props.salesType.some((element) => element === item.enum)\n ? { backgroundColor: 'lightgrey', color: '#fff' }\n : {}\n }\n >\n
    {item.image}
    \n
    {item.title}
    \n \n {item.enum === 3 && props.salesType.some((element) => element === 3) && (\n
    \n props.updateSalesType(5)}\n style={\n props.salesType.some((element) => element === 5)\n ? { backgroundColor: 'lightgrey', color: '#fff' }\n : {}\n }\n >\n
    \n
    {options[4].title}
    \n \n props.updateSalesType(6)}\n style={\n props.salesType.some((element) => element === 6)\n ? { backgroundColor: 'lightgrey', color: '#fff' }\n : {}\n }\n >\n
    \n
    {options[5].title}
    \n \n
    \n )}\n {item.enum === 4 &&\n props.salesType.some((element) => element === 4) &&\n state.stores &&\n state.ownerStores &&\n state.ownerStores.map((item, index) => (\n handleStore(item.storeId)}\n style={\n store.some((element) => element === item.storeId)\n ? { backgroundColor: 'lightgrey', color: '#fff' }\n : {}\n }\n >\n
    \n
    {item.name}
    \n \n ))}\n
    \n ),\n )}\n
    \n );\n}\n\nexport default Options;\n","import AccessibilityNewIcon from '@mui/icons-material/AccessibilityNew';\nimport StoreIcon from '@mui/icons-material/Store';\nimport Options from './Options';\nimport identityServerStore from '../../IdentityServer/store/index';\nimport UploadFileIcon from '@mui/icons-material/UploadFile';\nfunction SellerOrStoreOwner(props) {\n return (\n
    \n props.setSellerOrStoreOwner(1)}\n style={\n props.sellerOrStoreOwner === 1 ? { backgroundColor: 'lightgrey', color: '#fff' } : {}\n }\n >\n
    \n \n
    \n
    Selger
    \n \n {props.sellerOrStoreOwner === 1 && (\n \n )}\n\n
    \n\n props.setSellerOrStoreOwner(2)}\n style={\n props.sellerOrStoreOwner === 2 ? { backgroundColor: 'lightgrey', color: '#fff' } : {}\n }\n disabled={identityServerStore.getState().auth.user.profile.storeleader === undefined}\n >\n
    \n \n
    \n
    Butikkeier
    \n \n {props.sellerOrStoreOwner === 2 && (\n \n )}\n {props.importRole && (\n <>\n
    \n props.setImport('yup')}\n style={props.showImport ? { backgroundColor: 'lightgrey', color: '#fff' } : {}}\n disabled={identityServerStore.getState().auth.user.profile.storeleader === undefined}\n >\n
    \n \n
    \n
    Import
    \n \n \n )}\n
    \n );\n}\n\nexport default SellerOrStoreOwner;\n","import Typography from '@mui/material/Typography';\nimport Box from '@mui/material/Box';\nimport { List, ListItem } from '@mui/material';\nimport ListItemText from '@mui/material/ListItemText';\nimport { useState } from 'react';\nimport moment from 'moment';\nimport '../../../Stylesheets/Statistics/Import/ImportStatistics.css';\nimport { GetImportStatisticOrders } from '../../../Redux/ApiCalls';\nimport { useDispatch } from 'react-redux';\nimport { DataGrid } from '@mui/x-data-grid';\nimport { getStatusColor, getStatusMessage } from '../../../utils/helperFunctions';\nimport FiberManualRecordIcon from '@mui/icons-material/FiberManualRecord';\n\nfunction ImportStatistics({ importData, url }) {\n const dispatch = useDispatch();\n const [selectedImportOrders, setSelectedImportOrders] = useState([]);\n const [selectedImport, setSelectedImport] = useState(null);\n const [showPrivate, setShowPrivate] = useState(false);\n\n const columns = [\n {\n field: 'orderStatus',\n headerName: 'Status',\n width: 150,\n renderCell: (params) => (\n
    \n {\n \n }\n {getStatusMessage(params.value)}\n
    \n ),\n },\n { field: 'firstName', headerName: 'First name', width: 130, hide: !showPrivate },\n { field: 'lastName', headerName: 'Last name', width: 130, hide: !showPrivate },\n { field: 'organizationName', headerName: 'Organisasjons navn', width: 220, hide: showPrivate },\n { field: 'organizationNr', headerName: 'Organisasjons nummer', width: 180, hide: showPrivate },\n { field: 'ssn', headerName: 'Fødselsdato', width: 130, hide: !showPrivate },\n { field: 'sellerName', headerName: 'Selger', width: 180 },\n { field: 'storeName', headerName: 'Butikk', width: 140 },\n ];\n\n const handleSelectImport = async (importSelected) => {\n setSelectedImport(importSelected.importName);\n setShowPrivate(importSelected.salesType === 1);\n const res = await dispatch(GetImportStatisticOrders(url, importSelected.id));\n\n if (res != null) {\n setSelectedImportOrders(res);\n }\n };\n\n const handleShowStormwind = (param) => {\n window.open('https://stormwind.fjordkraft.no/?orderId=' + param.row.id);\n };\n\n return (\n \n
    \n
    \n \n {importData.map((importD, index) => (\n handleSelectImport(importD)}\n className=\"importStatListItem\"\n key={index}\n >\n \n \n \n ))}\n \n
    \n
    \n \n {selectedImport}\n \n \n
    \n
    \n
    \n );\n}\n\nexport default ImportStatistics;\n","import { useState, useEffect } from 'react';\nimport '../../Stylesheets/Statistics/ImprovedStatistics.css';\nimport { useSelector } from 'react-redux';\nimport Content from './Content';\nimport SellerOrStoreOwner from './SellerOrStoreOwner';\nimport identityServerStore from '../../IdentityServer/store/index';\nimport { useDispatch } from 'react-redux';\nimport { getStoreNames, getStatistics, GetImportStatistics } from '../../Redux/ApiCalls';\nimport moment from 'moment';\nimport HomeIcon from '@mui/icons-material/Home';\nimport { Link } from 'react-router-dom';\nimport ImportStatistics from './Import/ImportStatistics';\n\nfunction ImprovedStatistics() {\n const state = useSelector((state) => state.reducer);\n const [sellerOrStoreOwner, setSellerOrStoreOwner] = useState(0);\n const [salesType, setSalesType] = useState([]);\n const [allStores] = useState(\n identityServerStore.getState().auth.user.profile.storeleader\n ? typeof identityServerStore.getState().auth.user.profile.storeleader === 'string'\n ? [identityServerStore.getState().auth.user.profile.storeleader]\n : identityServerStore.getState().auth.user.profile.storeleader\n : [],\n );\n\n const [importRole] = useState(\n identityServerStore.getState().auth.user.profile.role &&\n identityServerStore.getState().auth.user.profile.role.includes('storkunder'),\n );\n\n const [chosenStores, setChosenStores] = useState([]);\n const initialFromDate = moment().startOf('day').toDate();\n const [fromDate, setFromDate] = useState(initialFromDate);\n const [toDate, setToDate] = useState(new Date());\n const [showImport, setShowImport] = useState(false);\n const [importData, setImportData] = useState([]);\n const dispatch = useDispatch();\n\n const handleSetSellerOrStoreOwner = (number) => {\n setSellerOrStoreOwner(number);\n setSalesType([]);\n setShowImport(false);\n };\n\n const handleImportSet = async (data) => {\n setShowImport(!showImport);\n setSellerOrStoreOwner(0);\n setSalesType([]);\n };\n\n const handleFromDate = (date) => {\n setFromDate(date);\n showImport && updateSalesType();\n };\n\n const handleToDate = (date) => {\n setToDate(date);\n showImport && updateSalesType();\n };\n\n useEffect(() => {\n // Parse child stores of store chains the user is leader for\n if (!state.allStores) {\n return;\n }\n if (!state.stores) {\n dispatch({ type: 'SET_OWNER_STORES', payload: state.stores });\n return;\n }\n const storeIds = state.stores.map((s) => s.storeId);\n const childStores = state.allStores\n .filter((s) => storeIds.includes(s.parentId) && !storeIds.includes(s.id))\n .map((s) => ({ storeId: s.id, name: s.name, parentId: s.parentId }));\n dispatch({ type: 'SET_OWNER_STORES', payload: [...state.stores, ...childStores] });\n // eslint-disable-next-line\n }, [state.stores, state.allStores]);\n\n useEffect(() => {\n allStores.length > 0 && dispatch(getStoreNames(state.orderModuleApiUrl, allStores));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [allStores]);\n\n useEffect(() => {\n salesType.length !== 0 &&\n dispatch(\n getStatistics(state.conductorUrl, {\n identityServerId: state.seller.identityServerId,\n fromDate: fromDate ? fromDate : null,\n toDate: toDate ? toDate : null,\n storeIds:\n chosenStores.length > 0\n ? chosenStores\n : state.ownerStores?.map((s) => s.storeId) ?? allStores,\n sellerOrStoreOwner: sellerOrStoreOwner,\n salesType: salesType,\n }),\n );\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [fromDate, toDate, chosenStores]);\n\n const callStatistics = (salesType) => {\n salesType.length !== 0 &&\n dispatch(\n getStatistics(state.conductorUrl, {\n identityServerId: state.seller.identityServerId,\n fromDate: fromDate\n ? moment(fromDate).set({ hour: 0, minute: 0, second: 0, millisecond: 0 }).format()\n : null,\n toDate: toDate\n ? moment(toDate).set({ hour: 23, minute: 59, second: 59, millisecond: 0 }).format()\n : null,\n storeIds:\n chosenStores.length > 0\n ? chosenStores\n : state.ownerStores?.map((s) => s.storeId) ?? allStores,\n sellerOrStoreOwner: sellerOrStoreOwner,\n salesType: salesType,\n }),\n );\n };\n\n const getImportStatistics = async () => {\n setImportData([]);\n\n const res = await dispatch(\n GetImportStatistics(state.conductorUrl, {\n identityServerId: state.seller.identityServerId,\n fromDate: fromDate\n ? moment(fromDate)\n .set({\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0,\n })\n .format()\n : null,\n toDate: toDate\n ? moment(toDate).set({ hour: 23, minute: 59, second: 59, millisecond: 0 }).format()\n : null,\n storeIds:\n chosenStores.length > 0\n ? chosenStores\n : state.ownerStores?.map((s) => s.storeId) ?? allStores,\n sellerOrStoreOwner: sellerOrStoreOwner,\n salesType: salesType,\n }),\n );\n\n if (res.data != null && res.status === 200) {\n console.log(res);\n setImportData(res.data);\n }\n };\n\n const updateSalesType = (salesTypeEnum) => {\n if (showImport) {\n getImportStatistics(salesType.concat(salesTypeEnum));\n } else {\n if (salesType.some((element) => element === salesTypeEnum)) {\n setSalesType(salesType.filter((element) => element !== salesTypeEnum));\n } else {\n if (salesTypeEnum !== 4 && salesTypeEnum !== 3) {\n setSalesType(salesType.concat(salesTypeEnum));\n callStatistics(salesType.concat(salesTypeEnum));\n } else {\n setSalesType(salesType.concat(salesTypeEnum));\n }\n }\n }\n };\n\n return (\n
    \n
    \n
    \n \n
    \n\n
    \n
    {state.seller?.name}
    \n\n \n \n \n
    \n\n
    \n 0 ? chosenStores : allStores ?? []}\n />\n\n {showImport && }\n
    \n
    \n );\n}\n\nexport default ImprovedStatistics;\n","import Typography from '@mui/material/Typography';\nimport Box from '@mui/material/Box';\nimport { useEffect, useState } from 'react';\n\nfunction StorkundeList({ listData }) {\n const [adresseShow, setAdresseShow] = useState();\n\n useEffect(() => {\n if (listData['Anleggsadresse'] === '' || typeof listData['Anleggsadresse'] === 'undefined') {\n setAdresseShow('Ingen adresse');\n } else {\n setAdresseShow(listData['Anleggsadresse']);\n }\n // eslint-disable-next-line\n }, []);\n\n return (\n <>\n \n \n \n {adresseShow}\n \n \n {listData['MålepktId']}\n \n \n \n \n );\n}\nconst storkundeListStyle = {\n typographyPStyle: {\n fontSize: 15,\n textAlign: 'center',\n display: 'block',\n },\n typographyPLargerStyle: {\n textAlign: 'center',\n fontSize: 15,\n display: 'block',\n },\n paperStyle: {\n border: 1,\n fontFamily: 'Arial',\n borderRadius: 1,\n backgroundColor: '#f4f4f5',\n width: '200px',\n height: '100px',\n margin: 1,\n ':hover': {\n backgroundColor: '#d3d2d2',\n cursor: 'pointer',\n },\n },\n headerStyle: {\n display: 'block',\n },\n};\nexport default StorkundeList;\n","import Grid from '@mui/material/Grid';\nimport Typography from '@mui/material/Typography';\nimport { useDispatch, useSelector } from 'react-redux';\nimport environment from '../../../environment';\n\nfunction StorkundeSalgsId({ salgsData }) {\n const stateStorkunde = useSelector((state) => state.StorkundeReducer);\n const dispatch = useDispatch();\n const isBedrift = environment.isBedrift === 'true';\n\n const handleKundeClick = () => {\n dispatch({ type: 'SET_ANLEGG_LIST', payload: salgsData });\n dispatch({ type: 'SET_PAGINATION_TOTAL' });\n dispatch({ type: 'SET_PAGINATION_CURRENT', payload: 1 });\n };\n return (\n <>\n \n \n \n {salgsData.SalgsID}\n \n \n \n \n {isBedrift ? (\n salgsData.anleggene[0].Firmanavn\n ) : (\n <>{salgsData.anleggene[0]['Fornavn'] + ' ' + salgsData.anleggene[0]['Etternavn']}\n )}\n \n \n \n ({salgsData.anleggene.length})\n \n \n \n );\n}\n\nconst storkundeStyle = {\n storkundeItem: {\n border: 1,\n borderRadius: 2,\n padding: 2,\n margin: 0.5,\n ':hover': {\n cursor: 'pointer',\n backgroundColor: 'lightgray',\n },\n },\n};\nexport default StorkundeSalgsId;\n","import React from 'react';\nimport { ListItem, ListItemAvatar } from '@mui/material';\nimport Tooltip, { tooltipClasses } from '@mui/material/Tooltip';\nimport WarningAmberIcon from '@mui/icons-material/WarningAmber';\nimport ListItemText from '@mui/material/ListItemText';\nimport { styled } from '@mui/material/styles';\n\nconst WarningToolTip = styled(({ className, ...props }) => (\n \n))(({ theme }) => ({\n [`& .${tooltipClasses.tooltip}`]: {\n backgroundColor: '#f5f5f9',\n color: 'rgba(0, 0, 0, 0.87)',\n maxWidth: 220,\n fontSize: theme.typography.pxToRem(12),\n border: '1px solid #dadde9',\n },\n}));\n\nfunction StorkundeWarningItem({ item, handleWarningClick, index }) {\n return (\n <>\n \n {'Mangler: '}\n {item.isMissing.map((m) => m + ' ')}\n \n }\n >\n handleWarningClick(item)}\n >\n \n \n \n \n ({item.isMissing.length}) {item.name}\n \n \n \n \n );\n}\n\nconst storkundeStyle = {\n listItemStyle: {\n border: 1,\n ':hover': {\n backgroundColor: 'lightgrey',\n cursor: 'pointer',\n },\n },\n headers: {\n textAlign: 'center',\n marginTop: 2,\n color: '#FF5500',\n fontFamily: 'Arial',\n },\n dialogStyle: {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n bgcolor: 'background.paper',\n border: '2px solid #000',\n boxShadow: 24,\n },\n paperStyle: {\n border: 1,\n borderColor: '#FF5500',\n width: 1,\n textAlign: 'center',\n backgroundColor: '#f5f5f5',\n margin: 1,\n ':hover': {\n backgroundColor: '#d3d2d2',\n cursor: 'pointer',\n },\n display: 'inline',\n },\n};\n\nexport default StorkundeWarningItem;\n","import '../../../Stylesheets/Storkunde/Items/InputField.css';\nimport DatePicker from 'react-datepicker';\nimport SearchIcon from '@mui/icons-material/Search';\n\nfunction InputField({\n searchButton = '',\n clicked,\n labelData,\n inputValue,\n changed,\n type,\n optionsArray = [],\n disabled = false,\n error = false,\n}) {\n // Takes 3 different input types\n // text, dropdown and date\n // for dropdown an array of options needs to be supplied\n\n // To disable the input set prop disabled = true\n // To set error set prop error = true\n // Default they are both set to false\n\n return (\n
    \n {type === 'text' && (\n <>\n {searchButton !== '' ? (\n <>\n \n
    \n \n
    \n \n
    \n
    \n \n ) : (\n <>\n \n \n \n )}\n \n )}\n\n {type === 'date' && (\n
    \n \n \n
    \n )}\n\n {type === 'dropdown' && (\n <>\n \n \n \n )}\n
    \n );\n}\n\nexport default InputField;\n","import Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport Divider from '@mui/material/Divider';\nimport List from '@mui/material/List';\nimport { ListItem, ListItemIcon } from '@mui/material';\nimport AccountCircleIcon from '@mui/icons-material/AccountCircle';\nimport ListItemText from '@mui/material/ListItemText';\nimport PersonAddAltIcon from '@mui/icons-material/PersonAddAlt';\nimport React, { useState } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { searchSeller } from '../../../Redux/ApiCalls';\nimport '../../../Stylesheets/Storkunde/Items/InputField.css';\nimport InputField from '../Items/InputField';\n\nfunction StorkundeSellerSearch({ sellerName, sellerMail, sellerCode, selectedSeller }) {\n const dispatch = useDispatch();\n const state = useSelector((state) => state.reducer);\n\n // Seller search\n const [sellerSearch, setSellerSearch] = useState([]);\n const [sellerSearchText, setSellerSearchText] = useState('');\n\n // Search for sellers based on name\n const handleInputFieldClick = async () => {\n setSellerSearch([]);\n const res = await dispatch(searchSeller(state.conductorUrl, sellerSearchText));\n if (res !== undefined) {\n setSellerSearch(res);\n }\n };\n\n return (\n <>\n \n setSellerSearchText(e.target.value)}\n type={'text'}\n />\n \n\n \n \n \n Nåværende valgt\n \n \n \n \n \n \n \n {sellerCode.toString() === state.seller.identityServerId && (\n \n )}\n \n \n \n Søkeresultat [{sellerSearch.length}]\n \n \n {sellerSearch.map((seller, index) => (\n selectedSeller([seller.name, seller.email, seller.identityServerId])}\n sx={storkundeSingleStyle.sellerSearchListItem}\n >\n \n \n \n \n {seller.identityServerId.toString() === state.seller.identityServerId && (\n \n )}\n \n ))}\n \n \n \n );\n}\nconst storkundeSingleStyle = {\n dividerStyle: {\n margin: 1,\n },\n boxStyle: {\n display: 'block',\n marginTop: 2,\n },\n\n textFieldStyle: {\n margin: 0.6,\n },\n buttonStyle: {\n padding: 1,\n paddingLeft: 3,\n paddingRight: 3,\n border: 1,\n borderRadius: '20px',\n backgroundColor: '#f0f0f0',\n borderColor: '#d3d3d3',\n color: 'black',\n width: '200px',\n },\n sellerSearchListItem: {\n borderTop: 1,\n borderColor: 'lightgray',\n ':hover': {\n backgroundColor: '#90b75f',\n cursor: 'pointer',\n },\n },\n buttonNextStyle: {\n marginLeft: 3,\n border: 1,\n padding: 1,\n backgroundColor: '#1f4d79',\n color: 'white',\n borderColor: '#173a5b',\n ':hover': {\n backgroundColor: '#2d7cc7',\n },\n },\n formStyle: {\n borderRadius: '25px',\n border: 1,\n padding: 0.5,\n },\n boxComponentStyle: {\n height: '90%',\n overflowY: 'auto',\n },\n headerStyle: {\n margin: 3,\n },\n};\nexport default StorkundeSellerSearch;\n","import Box from '@mui/material/Box';\nimport SearchIcon from '@mui/icons-material/Search';\nimport Divider from '@mui/material/Divider';\nimport Typography from '@mui/material/Typography';\nimport List from '@mui/material/List';\nimport {\n FormControl,\n Input,\n InputAdornment,\n ListItem,\n ListItemIcon,\n ToggleButton,\n ToggleButtonGroup,\n} from '@mui/material';\nimport ShoppingCartOutlinedIcon from '@mui/icons-material/ShoppingCartOutlined';\nimport ListItemText from '@mui/material/ListItemText';\nimport AddShoppingCartOutlinedIcon from '@mui/icons-material/AddShoppingCartOutlined';\nimport React, { useEffect, useState } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { getAssumedProductsBySSN, getFilteredPowerProducts } from '../../../Redux/ApiCalls';\nimport environment from '../../../environment';\nimport HistoryIcon from '@mui/icons-material/History';\nimport FindInPageIcon from '@mui/icons-material/FindInPage';\nimport '../../../Stylesheets/Storkunde/Items/StorkundeProductSearch.css';\nimport '../../../Stylesheets/Storkunde/Items/InputField.css';\nimport CircularProgress from '@mui/material/CircularProgress';\n\nfunction StorkundeProductSearch({ productName, product, SSN, selectedProduct }) {\n const dispatch = useDispatch();\n const isBedrift = environment.isBedrift === 'true';\n const state = useSelector((state) => state.reducer);\n\n // product search\n const [productSearch, setProductSearch] = useState([]);\n const [searchField, setSearchField] = useState('');\n const [notFoundProducts, setNotFoundProducts] = useState(false);\n const [assumedProducts, setAssumedProducts] = useState([]);\n const [localProductList, setLocalProductList] = useState([]);\n const [toggleSelected, setToggleSelected] = useState('search');\n const [productTried, setProductTried] = useState(false);\n const [storeHolder, setStoreHolder] = useState(state.activeStore);\n\n // Toogle between search results and historic products used\n const handleToggle = (e, string) => {\n if (string !== toggleSelected && string !== null) {\n setToggleSelected(string);\n }\n };\n\n useEffect(() => {\n handleGetAssumed(SSN);\n // eslint-disable-next-line\n }, []);\n\n // Check for assumed products\n const handleGetAssumed = async (SSN) => {\n const res = await dispatch(getAssumedProductsBySSN(state.conductorUrl, SSN));\n setAssumedProducts(res);\n };\n\n // Search for products bases on store\n const handleProductSearchByStore = async (store) => {\n const storeArray = store.split(',');\n setStoreHolder({\n identityServerId: storeArray[0],\n name: storeArray[1],\n });\n setProductTried(true);\n\n if (storeArray[0] !== '') {\n setNotFoundProducts(false);\n setProductSearch([]);\n dispatch(\n getFilteredPowerProducts(\n state.orderModuleApiUrl,\n state.brand,\n storeArray[0],\n isBedrift ? 'B' : 'P',\n ),\n );\n }\n };\n\n // Search handler for products\n const handleSearchProducts = (searchString) => {\n let localArray = [];\n\n // Search for searched list\n if (searchString.target.value !== '' && productSearch.length !== 0) {\n if (localProductList.length > 0 && searchField.length < searchString.target.value.length) {\n // Search from already existing search\n localProductList.forEach((prod) => {\n if (prod.name.toLowerCase().includes(searchString.target.value.toLowerCase())) {\n localArray.push(prod);\n }\n });\n setLocalProductList(localArray);\n } else {\n productSearch.forEach((prod) => {\n if (prod.name.toLowerCase().includes(searchString.target.value.toLowerCase())) {\n localArray.push(prod);\n }\n });\n setLocalProductList(localArray);\n }\n } else {\n // Reset to regular\n setLocalProductList([]);\n }\n\n setSearchField(searchString.target.value);\n };\n\n // Checks if a search has occurred\n useEffect(() => {\n setProductSearch(state.powerProducts);\n\n setProductTried(false);\n // eslint-disable-next-line\n }, [state.powerProducts]);\n\n // Checks if a product search has any results\n useEffect(() => {\n if (productSearch !== null) {\n if (productSearch.length === 0) {\n setNotFoundProducts(true);\n }\n }\n // eslint-disable-next-line\n }, [productSearch]);\n\n return (\n <>\n \n \n \n \n \n \n Nåværende valgt\n \n \n \n \n \n \n \n \n \n {searchField.length > 0 ? (\n \n {toggleSelected === 'search'\n ? 'Søkeresultat [' + localProductList.length + ']'\n : 'Tidligere produkter på denne organisasjonen [' + localProductList.length + ']'}\n \n ) : (\n \n {toggleSelected === 'search'\n ? 'Søkeresultat [' + productSearch.length + ']'\n : 'Tidligere produkter på denne organisasjonen [' + assumedProducts.length + ']'}\n \n )}\n \n \n \n \n \n \n \n \n \n\n \n \n \n \n }\n />\n \n \n \n {notFoundProducts && productSearch.length === 0 && productTried === true && (\n <>\n {toggleSelected === 'history' && assumedProducts.length === 0 ? (\n <>\n \n Ingen foreslåtte produkter funnet\n \n \n ) : (\n <>\n )}\n \n )}\n\n \n {productTried && productSearch.length === 0 ? (\n \n \n \n ) : (\n \n {productSearch.length === 0 && toggleSelected !== 'history' && (\n Ingen produkter funnet\n )}\n \n )}\n {(localProductList.length !== 0 || searchField.length > 0) &&\n toggleSelected !== 'history' ? (\n <>\n {localProductList.map((product, index) => (\n selectedProduct([product.id, product.name, storeHolder])}\n className={'storkundeProductSearchListItem'}\n >\n \n \n \n \n \n ))}\n {localProductList.length === 0 && (\n \n Ingen produkter som passer søket\n \n )}\n \n ) : (\n <>\n {toggleSelected === 'history' ? (\n <>\n {assumedProducts.map((product, index) => (\n selectedProduct([product, null])}\n className={'storkundeProductSearchListItem'}\n >\n \n \n \n \n \n ))}\n {assumedProducts.length === 0 && (\n \n \n Ingen historikk funnet på denne organisasjonen\n \n \n )}\n \n ) : (\n <>\n {productSearch.map((product, index) => (\n selectedProduct([product.id, product.name, storeHolder])}\n className={'storkundeProductSearchListItem'}\n >\n \n \n \n \n \n ))}\n \n )}\n \n )}\n \n \n \n \n );\n}\n\nexport default StorkundeProductSearch;\n","import Box from '@mui/material/Box';\nimport { ListItem, ListItemIcon } from '@mui/material';\nimport Typography from '@mui/material/Typography';\nimport StoreIcon from '@mui/icons-material/Store';\nimport React from 'react';\nimport { useSelector } from 'react-redux';\nimport '../../../Stylesheets/Storkunde/Items/InputField.css';\nimport List from '@mui/material/List';\nimport ListItemText from '@mui/material/ListItemText';\nimport AddBusinessOutlinedIcon from '@mui/icons-material/AddBusinessOutlined';\n\nfunction StorkundeStoreSelect({ storeName, storeCode, selectedStore }) {\n const state = useSelector((state) => state.reducer);\n\n return (\n <>\n \n \n Nåværende valgt\n \n \n \n \n \n \n \n \n \n \n Dine registrerte butikker\n \n \n \n \n {state.sellerStores.map((store, index) => (\n selectedStore([store.name, store.identityServerId])}\n key={index}\n className={'storkundeProductSearchListItem'}\n >\n \n \n \n \n \n ))}\n \n \n \n );\n}\n\nexport default StorkundeStoreSelect;\n","import Typography from '@mui/material/Typography';\nimport React, { useState } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport Box from '@mui/material/Box';\nimport { Button, Container } from '@mui/material';\nimport SaveIcon from '@mui/icons-material/Save';\nimport '../../../Stylesheets/Storkunde/Items/StorkundeData.css';\nimport InputField from '../Items/InputField';\nimport environment from '../../../environment';\nimport EditIcon from '@mui/icons-material/Edit';\nimport StorkundeSellerSearch from './StorkundeSellerSearch';\nimport StorkundeProductSearch from './StorkundeProductSearch';\nimport StorkundeStoreSelect from './StorkundeStoreSelect';\nimport { getProducthubProductById } from '../../../Redux/ApiCalls';\n\nfunction StorkundeData(props) {\n const dispatch = useDispatch();\n const stateStorkunde = useSelector((state) => state.StorkundeReducer);\n const state = useSelector((state) => state.reducer);\n const isBedrift = environment.isBedrift === 'true';\n const item = stateStorkunde.storkundeItemSelected;\n const storkundeSelected = stateStorkunde.storkunde[item.SalgsID - 1];\n const [saved, setSaved] = useState(false);\n\n // 0 --> Common data\n // 1 --> Anlegg data\n // 2 --> Search for seller\n // 3 --> Search for product\n const [showSalgsIdData, setShowSalgsIData] = useState('anlegg');\n\n // Invoice\n const [invoiceText, setInvoiceText] = useState(item['Fakturamerke']);\n const [invoiceGroup, setInvoiceGroup] = useState(item['Fakturagruppe']);\n\n // Anlegg\n const [anleggAddress, setAnleggAdress] = useState(item['Anleggsadresse']);\n const [anleggPostnr, setAnleggPostnr] = useState(item['Anleggspostnr']);\n const [meterNr, setMeterNr] = useState(item['Målernummer']);\n const [meterId, setMeterId] = useState(item['MålepktId']);\n\n // Sale\n const [product, setProduct] = useState(item['ProduktHub']);\n const [productName, setProductName] = useState(null);\n\n const [startupDate, setStartupDate] = useState(item['Oppstartsdato']);\n const [mailRef, setMailReference] = useState(item['Mailreferanse']);\n\n // Add on\n const [fixedPrice, setFixedPrice] = useState(item['Fastbeløp']);\n const [surcharge, setSurcharge] = useState(item['Påslag']);\n\n // Common\n const [customerNr, setCustomerNr] = useState(storkundeSelected.customerNr);\n const [energiKonto, setEnergiKonto] = useState(storkundeSelected.energiKonto);\n\n const [invoiceAddress, setInvoiceAddress] = useState(storkundeSelected.invoiceAddress);\n const [invoicePostnr, setInvoicePostnr] = useState(storkundeSelected.invoicePostnr);\n\n const [sellerCode, setSellerCode] = useState(storkundeSelected.sellerCode);\n const [sellerName, setSellerName] = useState(storkundeSelected.sellerName);\n const [sellerMail, setSellerMail] = useState(null);\n\n const [storeName, setStoreName] = useState(storkundeSelected.storeName);\n const [storeCode, setStoreCode] = useState(storkundeSelected.storeCode);\n\n const [SSN] = useState(storkundeSelected.SSN);\n const [invoiceType, setInvoiceType] = useState(storkundeSelected.invoiceType);\n const [invoiceCategory, setInvoiceCategory] = useState(storkundeSelected.invoiceCategory);\n const [brand, setBrand] = useState(storkundeSelected.brand);\n\n // Arrays\n const [invoiceCategoryChoices] = useState([\n 'FBM30',\n 'FBM45',\n 'FBEMG60',\n 'FBM60',\n 'FBM90',\n 'TB14',\n 'TBM30',\n ]);\n const [brandChoices] = useState(['FK', 'TK']);\n const [invoiceTypeChoices] = useState(['EHF', 'eInvoice', 'Email', 'Papir']);\n\n const handleCommonSave = () => {\n // Get the whole salgsID block\n const salgsID = storkundeSelected;\n\n item['Fakturamerke'] = invoiceText;\n item['Fakturagruppe'] = invoiceGroup;\n\n item['Anleggsadresse'] = anleggAddress;\n item['Anleggspostnr'] = anleggPostnr;\n item['Målernummer'] = meterNr;\n item['MålepktId'] = meterId;\n\n item['ProduktHub'] = product;\n item['Oppstartsdato'] = startupDate;\n item['Mailreferanse'] = mailRef;\n\n // Find correct anlegg\n salgsID.anleggene[salgsID.anleggene.map((a) => a.swID).indexOf(item.swID)] = item;\n\n salgsID.sellerCode = sellerCode;\n salgsID.sellerName = sellerName;\n\n salgsID.storeName = storeName;\n salgsID.storeCode = storeCode;\n\n salgsID.invoiceCategory = invoiceCategory;\n salgsID.invoiceType = invoiceType;\n salgsID.brand = brand;\n\n // console.log(salgsID)\n dispatch({\n type: 'UPDATE_STORKUNDE_ITEM',\n payload: [storkundeSelected, storkundeSelected.SalgsID],\n });\n setSaved(true);\n };\n\n // Selecting\n const handleChanged = (e, type) => {\n switch (type) {\n case 'Målepunkt Id':\n !isNaN(e.target.value) && e.target.value.length < 19 && setMeterId(e.target.value);\n break;\n\n case 'Målepunkt Nr':\n !isNaN(e.target.value) && e.target.value.length < 17 && setMeterNr(e.target.value);\n break;\n\n case 'Anleggs adresse':\n setAnleggAdress(e.target.value);\n break;\n\n case 'Anleggs postnr':\n !isNaN(e.target.value) && e.target.value.length < 5 && setAnleggPostnr(e.target.value);\n break;\n\n case 'Produkt':\n !isNaN(e.target.value) && setProduct(e.target.value);\n break;\n\n case 'Merkevare':\n setBrand(e.target.value);\n break;\n\n case 'Oppstartsdato':\n setStartupDate(e);\n break;\n\n case 'Forsendelsesmåte':\n setInvoiceType(e.target.value);\n break;\n\n case 'Kontokategori':\n setInvoiceCategory(e.target.value);\n break;\n\n case 'Mailreferanse':\n setMailReference(e.target.value);\n break;\n\n case 'Fakturamerke':\n setInvoiceText(e.target.value);\n break;\n\n case 'Fakturagruppe':\n setInvoiceGroup(e.target.value);\n break;\n\n case 'Kundenr':\n !isNaN(e.target.value) && setCustomerNr(e.target.value);\n break;\n\n case 'Energikonto':\n !isNaN(e.target.value) && setEnergiKonto(e.target.value);\n break;\n\n case 'Fakturaadresse':\n setInvoiceAddress(e.target.value);\n break;\n\n case 'Fakturapostnr':\n !isNaN(e.target.value) && e.target.value.length < 5 && setInvoicePostnr(e.target.value);\n break;\n\n case 'Fastpris':\n !isNaN(e.target.value) && setFixedPrice(e.target.value);\n break;\n\n case 'Påslag':\n setSurcharge(e.target.value);\n break;\n\n default:\n console.log('No corresponding data value found');\n }\n };\n\n const handleEditSeller = (seller) => {\n setSellerName(seller[0]);\n setSellerMail(seller[1]);\n setSellerCode(seller[2]);\n };\n\n const handleEditStore = (store) => {\n setStoreName(store[0]);\n setStoreCode(store[1]);\n };\n\n const handleEditProduct = (product) => {\n setProduct(product[0]);\n\n if (product[1] === null) {\n setProductName('Søker...');\n searchForProduct(product[0]);\n } else {\n setProductName(product[1]);\n // Set the store that was used to find product\n // TODO add store in assumed products return\n setStoreCode(product[2].identityServerId);\n setStoreName(product[2].name);\n }\n };\n\n const searchForProduct = async (productId) => {\n const res = await dispatch(getProducthubProductById(state.orderModuleApiUrl, productId));\n if (res !== undefined) {\n setProductName(res.name);\n } else {\n setProductName('Navn ikke funnet');\n }\n };\n\n return (\n <>\n \n {showSalgsIdData !== 'anlegg' ? (\n setShowSalgsIData(showSalgsIdData === 'seller' ? 'common' : 'anlegg')}\n >\n Tilbake\n \n ) : (\n \n )}\n {showSalgsIdData === 'common' && (\n <>\n \n \n Organisasjonsdata\n \n handleChanged(e, 'Kundenr')}\n type={'text'}\n />\n handleChanged(e, 'Energikonto')}\n type={'text'}\n />\n \n \n \n Selger{' '}\n setShowSalgsIData('seller')}\n style={{ cursor: 'pointer' }}\n />\n \n \n \n \n \n \n Butikk{' '}\n \n \n \n \n \n \n Faktura adresse\n \n handleChanged(e, 'Fakturaadresse')}\n type={'text'}\n />\n handleChanged(e, 'Fakturapostnr')}\n type={'text'}\n />\n \n \n \n Diverse\n \n handleChanged(e, 'Merkevare')}\n type={'dropdown'}\n />\n handleChanged(e, 'Forsendelsesmåte')}\n type={'dropdown'}\n />\n {stateStorkunde.isStorkunde && (\n handleChanged(e, 'Kontokategori')}\n type={'dropdown'}\n />\n )}\n \n \n )}\n {showSalgsIdData === 'anlegg' && (\n <>\n \n \n Anleggsinformasjon\n \n handleChanged(e, 'Målepunkt Id')}\n type={'text'}\n />\n handleChanged(e, 'Målepunkt Nr')}\n type={'text'}\n />\n handleChanged(e, 'Anleggs adresse')}\n type={'text'}\n />\n handleChanged(e, 'Anleggs postnr')}\n type={'text'}\n />\n \n \n \n Salg{' '}\n setShowSalgsIData('product')}\n style={{ cursor: 'pointer' }}\n />\n \n handleChanged(e, 'Produkt')}\n type={'text'}\n disabled={true}\n />\n handleChanged(e, 'Oppstartsdato')}\n type={'date'}\n />\n\n {isBedrift && stateStorkunde.isStorkunde && (\n <>\n handleChanged(e, 'Mailreferanse')}\n type={'text'}\n />\n handleChanged(e, 'Fakturagruppe')}\n type={'text'}\n />\n handleChanged(e, 'Fakturamerke')}\n type={'text'}\n />\n \n )}\n \n \n \n Tilleggsinformasjon\n \n handleChanged(e, 'Fastpris')}\n type={'text'}\n />\n handleChanged(e, 'Påslag')}\n type={'text'}\n />\n \n \n {saved && (\n <>\n \n Endringer er lagret{' '}\n \n \n \n )}\n \n \n \n )}\n\n {showSalgsIdData === 'seller' && (\n \n handleEditSeller(e)}\n />\n \n )}\n\n {showSalgsIdData === 'product' && (\n \n handleEditProduct(e)}\n />\n \n )}\n\n {showSalgsIdData === 'store' && (\n \n handleEditStore(e)}\n />\n \n )}\n \n \n );\n}\nconst storkundeDataStyle = {\n buttonStyle: {\n margin: 2,\n border: 1,\n float: 'right',\n borderRadius: '25px',\n backgroundColor: '#FF5500',\n padding: '15px 80px',\n color: 'white',\n ':hover': {\n backgroundColor: '#72a138',\n },\n },\n sellerSearchListItem: {\n ':hover': {\n backgroundColor: '#90b75f',\n cursor: 'pointer',\n },\n },\n buttonStyleSeller: {\n padding: 1,\n paddingLeft: 3,\n paddingRight: 3,\n border: 1,\n margin: 1,\n borderRadius: '20px',\n backgroundColor: '#f0f0f0',\n borderColor: '#d3d3d3',\n color: 'black',\n width: '200px',\n },\n gridItemContainerStyle: {\n borderBottom: 1,\n padding: 2,\n },\n boxComponentStyle: {\n height: '100%',\n overflowY: 'auto',\n },\n};\nexport default StorkundeData;\n","import { Button, FormControl, InputLabel, ListItem, MenuItem, Select } from '@mui/material';\nimport Typography from '@mui/material/Typography';\nimport Divider from '@mui/material/Divider';\nimport Box from '@mui/material/Box';\nimport TextField from '@mui/material/TextField';\nimport { useState } from 'react';\nimport DatePicker from 'react-datepicker';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { searchSeller } from '../../../Redux/ApiCalls';\nimport List from '@mui/material/List';\nimport ListItemText from '@mui/material/ListItemText';\nimport Grid from '@mui/material/Grid';\nimport SaveIcon from '@mui/icons-material/Save';\n\nfunction StorkundeChanges() {\n const stateStorkunde = useSelector((state) => state.StorkundeReducer);\n const state = useSelector((state) => state.reducer);\n const dispatch = useDispatch();\n\n // States\n const [fakMerke, setFakMerke] = useState('');\n const [fakForfall, setfakForfall] = useState('');\n const [oppstartsDato, setOppstartsDato] = useState('');\n const [fakGruppe, setFakGruppe] = useState('');\n\n // Update checker\n const [merkeUpdate, setMerkeUpdate] = useState(false);\n const [forfallUpdate, setForfallUpdate] = useState(false);\n const [oppstartUpdate, setOppstartUpdate] = useState(false);\n const [sellerUpdate, setSellerUpdate] = useState(false);\n const [gruppeUpdate, setGruppeUpdate] = useState(false);\n\n // Select seller\n const [sellerSearch, setSellerSearch] = useState([]);\n const [sellerSearchText, setSellerSearchText] = useState('');\n const [selectedSearch, setSelectedSearch] = useState(null);\n\n const handleSellerSearch = async () => {\n setSellerSearch([]);\n const res = await dispatch(searchSeller(state.conductorUrl, sellerSearchText));\n setSellerSearch(res);\n };\n\n const handleSellerSave = () => {\n stateStorkunde.anleggList.anleggene.forEach((anl) => {\n anl['seller'] = {\n identityServerId: sellerSearch[selectedSearch].identityServerId,\n name: sellerSearch[selectedSearch].name,\n email: sellerSearch[selectedSearch].email,\n };\n });\n setSellerUpdate(true);\n };\n\n const handleFakturamerke = () => {\n if (fakMerke !== '') {\n stateStorkunde.anleggList.anleggene.forEach((anl) => {\n anl['Fakturamerke'] = fakMerke;\n });\n setMerkeUpdate(true);\n }\n };\n\n const handleFakturaForfall = () => {\n if (fakForfall !== '') {\n stateStorkunde.anleggList.anleggene.forEach((anl) => {\n anl['Kontokategori'] = fakForfall;\n });\n setForfallUpdate(true);\n }\n };\n\n const handleDateSet = () => {\n if (oppstartsDato !== '') {\n stateStorkunde.anleggList.anleggene.forEach((anl) => {\n anl['Oppstartsdato'] = oppstartsDato;\n });\n setOppstartUpdate(true);\n }\n };\n\n const handleFakturaGruppe = () => {\n if (fakGruppe !== '') {\n stateStorkunde.anleggList.anleggene.forEach((anl) => {\n anl['Fakturagruppe'] = fakGruppe;\n });\n setGruppeUpdate(true);\n }\n };\n\n return (\n <>\n {stateStorkunde.anleggList.length !== 0 ? (\n \n \n \n setFakMerke(e.target.value)}\n />\n \n \n \n {merkeUpdate && (\n <>\n \n

    Lagret

    \n \n )}\n
    \n
    \n \n \n setFakGruppe(e.target.value)}\n />\n \n \n \n {gruppeUpdate && (\n <>\n \n

    Lagret

    \n \n )}\n
    \n
    \n\n \n \n \n Sett kontokategori\n setfakForfall(e.target.value)}\n >\n FBM30\n FBM45\n FBEMG60\n \n \n \n \n \n {forfallUpdate && (\n <>\n \n

    Lagret

    \n \n )}\n
    \n
    \n\n \n \n setOppstartsDato(date)}\n locale=\"nb\"\n placeholderText={'Velg en dato'}\n dateFormat=\"P\"\n />\n \n \n \n {oppstartUpdate && (\n <>\n \n

    Lagret

    \n \n )}\n
    \n
    \n\n \n \n setSellerSearchText(e.target.value)}\n />\n \n \n \n \n \n \n \n Endre selger\n \n {sellerUpdate && (\n <>\n \n

    Lagret

    \n \n )}\n
    \n \n

    \n Her kan du sette samme selger for ALLE anlegg på denne salgsIden\n

    \n \n

    Funnet [{sellerSearch.length}]

    \n \n \n \n {sellerSearch.map((seller, index) => (\n {\n setSelectedSearch(index);\n }}\n sx={[\n storkundeChangesStyle.sellerSearchListItem,\n { backgroundColor: selectedSearch === index && '#90b75f' },\n ]}\n >\n \n \n ))}\n \n \n \n
    \n
    \n
    \n ) : (\n <>\n Velg en salgsId før du kan redigere\n \n )}\n \n );\n}\nexport default StorkundeChanges;\n\nconst storkundeChangesStyle = {\n sellerSearchListItem: {\n ':hover': {\n backgroundColor: '#90b75f',\n cursor: 'pointer',\n },\n },\n buttonStyle: {\n padding: 1,\n paddingLeft: 3,\n paddingRight: 3,\n border: 1,\n borderRadius: '20px',\n backgroundColor: '#f0f0f0',\n borderColor: '#d3d3d3',\n color: 'black',\n width: '200px',\n },\n gridItemContainerStyle: {\n borderBottom: 1,\n padding: 2,\n },\n textFieldStyle: {\n width: '200px',\n },\n};\n","import Grid from '@mui/material/Grid';\nimport Typography from '@mui/material/Typography';\nimport environment from '../../../environment';\nimport FiberManualRecordIcon from '@mui/icons-material/FiberManualRecord';\n\nfunction OrderFailItem({ orderFail }) {\n const isBedrift = environment.isBedrift === 'true';\n\n return (\n \n \n \n \n {isBedrift ? (\n orderFail.config.data.fullName\n ) : (\n <>{orderFail.config.data.firstName + ' ' + orderFail.config.data.lastName} \n )}\n \n \n \n \n Feilet:{' '}\n {orderFail.response.data.Message} \n \n \n \n \n \n MåleptkId: {orderFail.config.data.sale[0].deliveryPoint.meteringPointIdentification}\n \n \n \n );\n}\nexport default OrderFailItem;\n","import Grid from '@mui/material/Grid';\nimport Typography from '@mui/material/Typography';\nimport environment from '../../../environment';\nimport FiberManualRecordIcon from '@mui/icons-material/FiberManualRecord';\nimport '../../../Stylesheets/Storkunde/Items/StorkundeOrderFeedback.css';\nimport { getStatusColor, getStatusMessage } from '../../../utils/helperFunctions';\nimport { useEffect, useState } from 'react';\n\nfunction OrderCreatedItem({ orderSucc }) {\n const isBedrift = environment.isBedrift === 'true';\n const [nameOrg, setNameOrg] = useState('');\n\n // Checks for problems with customer not being returned\n useEffect(() => {\n if (orderSucc.customer === null) {\n setNameOrg('Feil ved oppdatering av kunde');\n } else {\n setNameOrg(orderSucc.customer.organizationName);\n }\n // eslint-disable-next-line\n }, []);\n\n return (\n <>\n \n \n \n \n {isBedrift ? (\n nameOrg\n ) : (\n <>{orderSucc.customer.firstName + ' ' + orderSucc.customer.lastName}\n )}\n \n \n\n \n \n {' '}\n Status:{' '}\n \n {getStatusMessage(orderSucc.orderStatusId)}\n \n \n \n\n \n \n Ordre id:{' '}\n \n {orderSucc.id}\n \n \n \n \n \n );\n}\nexport default OrderCreatedItem;\n","import Box from '@mui/material/Box';\nimport React, { useEffect, useState } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { CreateImportStatistic, createStorkundeOrders } from '../../../Redux/ApiCalls';\nimport Divider from '@mui/material/Divider';\nimport Grid from '@mui/material/Grid';\nimport OrderFailItem from '../OrderFeedback/OrderFailItem';\nimport OrderCreatedItem from '../OrderFeedback/OrderCreatedItem';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport Fjordkraft_logo from '../../../Images/Fjordkraft_logo.png';\nimport Paper from '@mui/material/Paper';\nimport '../../../Stylesheets/Storkunde/Storkunde.css';\nimport CheckCircleIcon from '@mui/icons-material/CheckCircle';\nimport CancelIcon from '@mui/icons-material/Cancel';\nimport environment from '../../../environment';\nimport moment from 'moment/moment';\nimport { delay } from 'lodash';\n\nfunction StorkundeOrder() {\n const isBedrift = environment.isBedrift === 'true';\n const stateStorkunde = useSelector((state) => state.StorkundeReducer);\n const state = useSelector((state) => state.reducer);\n const dispatch = useDispatch();\n const [packedOrders, setPackedOrders] = useState([]);\n const [localStateArray] = useState(stateStorkunde.storkunde);\n const [errorOrder] = useState('');\n\n const [totalCreated, setTotalCreated] = useState(0);\n const [totalError, setTotalError] = useState(0);\n\n // Different stages for completing orders needs to be done before moving on to next stage\n // Stage 0: Create new energikonto if not told otherwise\n // Stage 1: Orders ready for packing\n // When all these stages are completed the order will be sent\n\n const [orderStagesCompleted, setOrderStagesCompleted] = useState(0);\n\n useEffect(() => {\n // Check for stages\n\n if (orderStagesCompleted === 0) {\n // Pack orders\n stateStorkunde.storkunde.forEach((salgsIdBlokk) => {\n handlePackingOrders(salgsIdBlokk);\n });\n }\n // eslint-disable-next-line\n }, [orderStagesCompleted]);\n\n useEffect(() => {\n if (stateStorkunde.createdOrders.length !== 0) {\n setTotalCreated(\n (totalCreated) =>\n totalCreated +\n stateStorkunde.createdOrders[stateStorkunde.createdOrders.length - 1].data.length,\n );\n }\n }, [stateStorkunde.createdOrders]);\n\n useEffect(() => {\n if (stateStorkunde.failedOrders.length !== 0) {\n setTotalError(\n (totalError) =>\n totalError +\n stateStorkunde.failedOrders[stateStorkunde.failedOrders.length - 1].config.data.sale\n .length,\n );\n }\n }, [stateStorkunde.failedOrders]);\n\n const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));\n\n // Creates the orders when packed\n useEffect(() => {\n if (\n orderStagesCompleted === 1 &&\n stateStorkunde.storkundeLoading === false &&\n stateStorkunde.failedOrders.length + stateStorkunde.createdOrders.length !==\n packedOrders.length\n )\n {\n // delay added to not overrun order creating\n async function createOrder() {\n await delay(500);\n dispatch(\n createStorkundeOrders(\n state.conductorUrl,\n packedOrders[stateStorkunde.failedOrders.length + stateStorkunde.createdOrders.length],\n ),\n );\n }\n createOrder();\n }\n // eslint-disable-next-line\n }, [stateStorkunde.storkundeLoading, orderStagesCompleted]);\n\n useEffect(() => {\n if (\n stateStorkunde.failedOrders.length + stateStorkunde.createdOrders.length ===\n stateStorkunde.storkunde.length &&\n !stateStorkunde.storkundeLoading\n ) {\n console.log('Create import stat');\n let orderIds = [];\n\n stateStorkunde.createdOrders.forEach((c) => {\n c.data.forEach((d) => {\n orderIds.push(d.id);\n });\n });\n const salesType = isBedrift ? (stateStorkunde.isStorkunde ? 3 : 2) : 1;\n dispatch(\n CreateImportStatistic(\n state.conductorUrl,\n stateStorkunde.importName != null\n ? stateStorkunde.importName\n : stateStorkunde.storkunde[0].fullName,\n orderIds,\n state.seller.identityServerId,\n salesType,\n ),\n );\n }\n // eslint-disable-next-line\n }, [stateStorkunde.failedOrders, stateStorkunde.createdOrders, stateStorkunde.storkundeLoading]);\n\n let fakturaType = 1;\n\n const handlePackingOrders = async (salg) => {\n let ordren = [];\n\n if (salg.invoiceType === 'EHF') {\n fakturaType = 4;\n } else if (salg.invoiceType === 'eInvoice') {\n fakturaType = 2;\n } else if (salg.invoiceType === 'Email') {\n fakturaType = 3;\n } else if (salg.invoiceType === 'Papir') {\n fakturaType = 1;\n }\n\n salg.anleggene.forEach((anl, index) => {\n // Handle time diff\n // Formats the date to NOT include timezones\n // TODO find better/permanent solution\n let datoen;\n\n if (typeof anl['Oppstartsdato'] !== 'undefined' || anl['Oppstartsdato'] === '') {\n datoen = new Date(anl['Oppstartsdato']);\n datoen = new Date(datoen.getFullYear(), datoen.getMonth(), datoen.getDate(), 0, 0, 0);\n datoen = moment(datoen).format('YYYY-MM-DDTHH:mm:ss');\n } else {\n datoen = new Date();\n datoen = moment(datoen.date).format('YYYY-MM-DDTHH:mm:ss');\n }\n\n ordren.push({\n deliveryPoint: {\n address:\n typeof anl['Anleggsadresse'] === 'undefined'\n ? !isBedrift\n ? anl['Adresse']\n : null\n : anl['Anleggsadresse'],\n zipCode:\n typeof anl['Anleggspostnr'] === 'undefined'\n ? !isBedrift\n ? anl['Postnr']\n : null\n : anl['Anleggspostnr'],\n city: null,\n meterIdentification:\n typeof anl['Målernummer'] === 'undefined' ? null : anl['Målernummer'],\n meteringPointIdentification:\n typeof anl['MålepktId'] === 'undefined' ? null : anl['MålepktId'],\n },\n extraProducts: [],\n productId: typeof anl['ProduktHub'] === 'undefined' ? null : anl['ProduktHub'],\n startUpDate: datoen,\n accountId: salg.energiKonto,\n MomentCustomerId: salg.customerNr,\n rightOfWithDrawal: !stateStorkunde.isStorkunde,\n priceElementList: anl['priceElementList'],\n minimumTermDays: null,\n bonusCampaigns: [],\n campaign: null,\n invoiceDetailsCore: {\n address: salg.invoiceAddress,\n zipCode: salg.invoicePostnr,\n email: typeof anl['Epost'] === 'undefined' ? null : anl['Epost'],\n distributionMethod: fakturaType,\n postBoxAddress: null,\n co: null,\n att: null,\n },\n separateInvoice: salg.energiKonto ? false : true,\n isStorkunde: stateStorkunde.isStorkunde,\n invoiceLabel: typeof anl['Fakturamerke'] === 'undefined' ? null : anl['Fakturamerke'],\n invoiceGroup: typeof anl['Fakturagruppe'] === 'undefined' ? null : anl['Fakturagruppe'],\n contactPerson: typeof anl['Kontaktperson'] === 'undefined' ? null : anl['Kontaktperson'],\n invoiceCategory: stateStorkunde.isStorkunde ? salg.invoiceCategory : null,\n mailRef: typeof anl['Mailreferanse'] === 'undefined' ? null : anl['Mailreferanse'],\n });\n });\n\n let salesModuleSales = {\n commissionCampaign: null,\n ssn: salg['SSN'],\n firstName: isBedrift ? null : salg.firstName,\n lastName: isBedrift ? null : salg.lastName,\n fullName: isBedrift ? salg.fullName : null,\n organizationNumber: isBedrift ? salg['SSN'] : null,\n phone: salg.phone,\n email: salg.email,\n address: salg.invoiceAddress,\n zipCode: salg.invoicePostnr,\n city: null,\n brandId: salg.brand === 'FK' ? 1 : 2,\n seller: { identityServerId: salg.sellerCode, name: salg.sellerName, email: null },\n store: { identityServerId: salg.storeCode, name: salg.storeName },\n sale: ordren,\n mdmId: null,\n accepted: false,\n chosenDistributionMethod: fakturaType,\n creditCheckResult: null,\n salesTypeId: stateStorkunde.isStorkunde ? 3 : isBedrift ? 2 : 1,\n contractMail: false,\n overrideCredit: stateStorkunde.isStorkunde,\n postBoxAddress: null,\n co: null,\n att: null,\n overrideAccept: stateStorkunde.isStorkunde ? true : salg.overrideAccept,\n digitalSignature: null,\n overrideReceiptOrSms: stateStorkunde.isStorkunde,\n isStorkunde: stateStorkunde.isStorkunde,\n };\n\n setPackedOrders((packedOrders) => [...packedOrders, salesModuleSales]);\n\n // Go to next stage when done\n if (salg.SalgsID === stateStorkunde.storkunde.length) {\n setOrderStagesCompleted((orderStagesCompleted) => orderStagesCompleted + 1);\n }\n };\n\n return (\n <>\n \n \"Fjordkraft\n :not(style)': { m: 1, width: 128, height: 128 },\n }}\n >\n \n {stateStorkunde.failedOrders.length + stateStorkunde.createdOrders.length !==\n stateStorkunde.storkunde.length ? (\n \n \n

    \n Behandler ordre{' '}\n {stateStorkunde.failedOrders.length + stateStorkunde.createdOrders.length + 1} av{' '}\n {packedOrders.length}\n

    \n
    \n ) : (\n \n

    {errorOrder}

    \n

    Ordrestatus

    \n\n \n

    Opprettet [{totalCreated}] anlegg

    \n \n \n \n \n {stateStorkunde.createdOrders.map((orderSucc, index) => (\n \n {orderSucc.data.map((order, index2) => (\n \n ))}\n \n ))}\n \n \n
    \n \n

    Feilet [{totalError}] anlegg

    \n \n \n \n \n {stateStorkunde.failedOrders.map((orderFail, index) => (\n \n ))}\n \n \n
    \n
    \n )}\n
    \n
    \n \n \n );\n}\n\nexport default StorkundeOrder;\n","import Typography from '@mui/material/Typography';\nimport ArrowCircleLeftIcon from '@mui/icons-material/ArrowCircleLeft';\nimport ArrowCircleRightIcon from '@mui/icons-material/ArrowCircleRight';\nimport Box from '@mui/material/Box';\nimport Divider from '@mui/material/Divider';\nimport React, { useEffect, useState } from 'react';\nimport Paper from '@mui/material/Paper';\nimport UploadFileIcon from '@mui/icons-material/UploadFile';\nimport environment from '../../environment';\nimport Grid from '@mui/material/Grid';\nimport {\n Button,\n Collapse,\n FormControl,\n Input,\n InputAdornment,\n ListItem,\n Pagination,\n Table,\n TableBody,\n TableCell,\n TableContainer,\n TableHead,\n TableRow,\n} from '@mui/material';\nimport WarningAmberIcon from '@mui/icons-material/WarningAmber';\nimport SearchIcon from '@mui/icons-material/Search';\nimport List from '@mui/material/List';\nimport ListItemText from '@mui/material/ListItemText';\nimport Fjordkraft_logo from '../../Images/Fjordkraft_logo.png';\nimport CheckCircleIcon from '@mui/icons-material/CheckCircle';\nimport CancelIcon from '@mui/icons-material/Cancel';\nimport ExpandMoreIcon from '@mui/icons-material/ExpandMore';\n\nfunction StorkundeTutorial() {\n const isBedrift = environment.isBedrift === 'true';\n const [tutorialStage, setTutorialStage] = useState(0);\n\n useEffect(() => {\n if (tutorialStage < 0) {\n setTutorialStage(0);\n } else if (tutorialStage > 2) {\n setTutorialStage(2);\n }\n }, [tutorialStage]);\n\n return (\n <>\n \n Hvordan importere fra en fil\n \n Bruk pilene under for å manøvrere deg gjennom de forskjellige delene\n \n \n \n setTutorialStage(tutorialStage - 1)}\n />\n setTutorialStage(tutorialStage + 1)}\n />\n \n \n\n \n {tutorialStage === 0 && (\n \n \n Steg 1: Valg av fil og opplasting\n \n \n \n

    Storkunde import

    \n \n

    {environment.isBedrift === 'true' ? 'Bedrift' : 'Privat'}

    \n\n \n \n \n \n \n \n
    \n
    \n \n \n Her vil du få en kjapp opplæring om hvordan du skal importere filer til bruk av\n oppretting av ordre. Husk at ingenting er lagret eller opprettet før du trykker på{' '}\n Lag ordre knappen, så du kan fint prøve deg rundt uten å skade noe.\n

    I dette steget er det 2 mulige knapper å trykke på.{' '}\n Velg fil som lar deg importere en exelfil, og{' '}\n Lag Ordre som tar all importert og endret data til oppretting av\n ordre.\n
    Ved bruk av Velg fil er det viktig at daten som kommer inn\n er helt korrekt strukturert i forhold til hva som er forventet. Nedenfor kan du se\n en tabell over datafelter som aksepteres. Ikke alle felter er nødvending å fylles ut\n for at en import kan fullføres, men det er noen unntak. Disse er markert med rød\n ramme. Det er også noen små men betydelige forskjeller mellom import av{' '}\n Privat og Bedrift kunde, nedenfor vises{' '}\n {isBedrift ? 'Bedrift' : 'Privat'}.\n
    \n
    \n MERK at bare fordi importen ikke trenger all data for å importere,\n så betyr ikke det at det er nok data for å få fullført en ordre. Det er derfor mulig\n at man må komme med oppdatert informasjon ved en senere anledning.\n \n
    \n \n \n \n \n \n SalgsID\n {isBedrift ? (\n <>\n Orgnummer\n Firmanavn\n Kontaktperson\n Kontokategori\n Fakturagruppe\n \n ) : (\n <>\n Personnummer\n Fornavn\n Etternavn\n \n )}\n Adresse\n Postnr\n Epost\n Mobilnummer\n Målernummer\n MålepktId\n {isBedrift && (\n <>\n Anleggsadresse\n Anleggspostnr\n ProduktHub\n Butikknavn\n Butikkkode\n Sellernavn\n Sellerkode\n Fakturatype\n Kundenummer\n \n )}\n Oppstartsdato\n {!isBedrift && OverstyrAksept}\n {isBedrift && (\n <>\n Merke\n Energikonto\n Fakturamerke\n Fastbeløp\n Påslag\n \n )}\n \n \n \n \n 1\n {isBedrift ? (\n <>\n 927578503\n Bilmekanikeren AS\n Ola Nordmann\n FBM30\n Gruppe 1\n \n ) : (\n <>\n 2007196956785\n Neil\n Armstrong\n \n )}\n\n Nøstegaten 30\n 5010\n epost.adresse@gmail.com\n 42069137\n 6978631480805470\n 70705750002941284478\n {isBedrift && (\n <>\n Mekanikerveien 2\n 0683\n 374\n BRS-123\n 84852357\n Seller Selgersen\n 784313567\n EHF\n 54156876\n \n )}\n 29.02.2022\n {!isBedrift && Nei}\n {isBedrift && (\n <>\n FK\n 654654484\n Fritekst merke\n 60\n 1.8\n \n )}\n \n \n 2\n {isBedrift ? (\n <>\n 985284876\n Vaffelhuset AS\n Vaffelmannen\n FBEMG60\n Gruppe 1\n \n ) : (\n <>\n 2902196056785\n Kari\n Nordmann\n \n )}\n Vaffelgaten 1\n 5680\n vaffel.mannen@hotmail.com\n 46895753\n 6667863980105270\n 70705750009413814705\n {isBedrift && (\n <>\n Vaffelgaten 1\n 5680\n 463\n BRS-123\n 84852357\n Ola Nordmann\n 654665465\n Papir\n 78235786\n \n )}\n\n 30.03.2029\n {!isBedrift && Ja}\n {isBedrift && (\n <>\n FK\n 545754644\n Vaffel er best\n 49\n 0.26\n \n )}\n \n \n
    \n
    \n
    \n \n {isBedrift ? (\n \n \n Her\n {' '}\n kan du laste ned en mal for Bedrift\n \n ) : (\n \n \n Her\n {' '}\n kan du laste ned en mal for Privat\n \n )}\n \n
    \n )}\n\n {tutorialStage === 1 && (\n \n \n Steg 2: Oversikt\n \n \n \n \n

    Alle importerte anlegg

    \n\n \n
    \n\n \n \n \n \n {1}\n \n \n \n \n {isBedrift ? 'Bilmekanikeren AS' : 'Neil Armstrong'}\n \n \n \n (2)\n \n \n \n \n \n {2}\n \n \n \n \n {isBedrift ? 'Vaffelhuset AS' : 'Ola Nordmann'}\n \n \n \n (3)\n \n \n \n
    \n \n \n I dette steget har vi fullført en import og ser nå på en oversikt over alle\n salgsIdene som ble importert\n \n \n Den valgte salgsIden er markert med grønn bakgrunn, for å velge en salgsId trykker\n man bare på den. (Ikke mulig i demoen)\n \n \n SalgsId blokken inneholder fra venstre av SalgsId, i midten er{' '}\n {isBedrift ? 'Firmanavnet' : 'Fornavn og Etternavn'}, og til\n høyre i paranteser er totale Antall anlegg registrert på den\n salgsIden.\n \n \n {' '}\n Det er også 2 ikoner helt oppe til høyre, disse er for advarsler og endringer av\n flere anlegg på samme tid, de vil bli snakket mer om senere.\n \n \n\n \n \n \n \n \n

    Alle anlegg på salgsId: [1]

    \n
    \n \n \n \n \n \n }\n />\n \n \n \n \n \n
    \n
    \n\n \n \n \n \n <>\n \n Nøstegaten 30\n \n \n \n 70705750002941284478\n \n \n \n \n \n \n \n <>\n \n Ingen adresse\n \n \n\n \n 70705750002941284478\n \n \n \n \n \n
    \n
    \n
    \n \n \n Her ser vi alle anlegg på den valgte salgsIden, de viser adressen hvis tilgjengelig\n og målepunktId. Det er her og mulig å søke på målepunkt id med søkefeltet i midten,\n hvis det er mange anlegg. Det er og mulig å bla i sidene ved bruk av knappene til\n høyre\n \n \n Ved å trykke på de individuelle anleggene kan du se flere detaljer og eventuelt\n endre på deler av informasjonen som ble importert\n \n \n
    \n )}\n {tutorialStage === 2 && (\n \n \n Steg 3: Oppretting av ordre\n \n \n \n Når du er fornøyd med importen og alt skal være klart trykker på du{' '}\n Lag Ordre knappen som vist i første steg.
    Det blir da prøvd\n å opprette ordre. Du blir til slutt presentert en status side, hvor du kan se hva\n som gikk og hva som eventuelt ikke gikk bra.\n
    \n
    \n \n \n \n \"Fjordkraft\n \n\n \n \n \n

    Ordrestatus

    \n \n

    Opprettet [1]

    \n \n \n \n \n \n \n \n \n {isBedrift ? 'Vaffelhuset AS' : 'Neil Armstrong'}\n \n \n \n \n [1]\n \n \n \n\n \n \n \n \n \n \n
    \n \n

    Feilet [1]

    \n \n \n\n \n \n \n \n \n {isBedrift ? 'Bilmekanikeren AS' : 'Ola Nordmann'}\n \n \n \n \n [1]\n \n \n \n \n \n \n\n \n \n \n \n \n Error: 404\n \n \n\n \n \n Målepkt id: 70705750002941284478\n \n \n \n \n \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n \n \n Du er nå ferdig med importen og ordrene som ikke gikk gjennom bør gjøres endringer\n på.
    MoltenCore kan brukes til endringer av importert data og feilhåndtering.\n
    \n
    \n \n )}\n \n \n );\n}\n\nexport default StorkundeTutorial;\n\nconst storkundeListStyle = {\n typographyPStyle: {\n fontSize: 15,\n textAlign: 'center',\n display: 'block',\n },\n typographyPLargerStyle: {\n textAlign: 'center',\n fontSize: 15,\n display: 'block',\n },\n paperStyle: {\n border: 1,\n fontFamily: 'Arial',\n borderRadius: 1,\n backgroundColor: '#f4f4f5',\n width: '200px',\n height: '100px',\n margin: 1,\n ':hover': {\n backgroundColor: '#d3d2d2',\n cursor: 'pointer',\n },\n },\n headerStyle: {\n display: 'block',\n },\n};\n\nconst storkundeStyle = {\n storkundeItem: {\n border: 1,\n borderRadius: 2,\n padding: 2,\n margin: 0.5,\n ':hover': {\n cursor: 'pointer',\n backgroundColor: 'lightgray',\n },\n },\n formStyle: {\n borderRadius: '25px',\n border: 1,\n padding: 0.5,\n },\n listItemStyle: {\n border: 1,\n ':hover': {\n backgroundColor: 'lightgrey',\n cursor: 'pointer',\n },\n },\n buttonStyle: {\n border: 1,\n borderRadius: '20px',\n backgroundColor: '#f0f0f0',\n borderColor: '#838383',\n color: 'black',\n width: '200px',\n },\n};\nconst storkundeTutorial = {\n arrowIcon: {\n ':hover': {\n cursor: 'pointer',\n color: 'gray',\n },\n },\n};\n\nconst storkundeOrderFailItem = {\n expandIconsStyle: {\n ':hover': {\n cursor: 'pointer',\n },\n },\n listItemStyle: {\n borderRadius: 2,\n border: 1,\n padding: 2,\n marginTop: 0.5,\n },\n};\nconst storkundeOrdreCreatedStyle = {\n expandIconsStyle: {\n ':hover': {\n cursor: 'pointer',\n },\n },\n listItemStyle: {\n borderRadius: 2,\n border: 1,\n padding: 2,\n marginTop: 0.5,\n },\n};\n","import Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport React, { useEffect, useState } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Button, FormControl, InputLabel, MenuItem, Select } from '@mui/material';\nimport {\n checkOrgNr,\n getAccountAndEnergiKonto,\n getProducthubProductById,\n} from '../../../Redux/ApiCalls';\nimport environment from '../../../environment';\nimport '../../../Stylesheets/AddProducts/AddPowerOrder.css';\nimport '../../../Stylesheets/Storkunde/Items/StorkundeSingleAnlegg.css';\nimport InputField from '../Items/InputField';\nimport CancelIcon from '@mui/icons-material/Cancel';\nimport StorkundeProductSearch from './StorkundeProductSearch';\nimport StorkundeSellerSearch from './StorkundeSellerSearch';\nimport StorkundeStoreSelect from './StorkundeStoreSelect';\nimport { FormatOrgnameToLowerCase } from '../../../utils/helperFunctions';\n\nfunction StorkundeAddSingleAnlegg() {\n const stateStorkunde = useSelector((state) => state.StorkundeReducer);\n const state = useSelector((state) => state.reducer);\n const dispatch = useDispatch();\n const isBedrift = environment.isBedrift === 'true';\n\n const [salgsIder] = useState(stateStorkunde.storkunde);\n const [stage, setStage] = useState(0);\n const [latestSwId, setLatestSwId] = useState(0);\n const [created, setCreated] = useState(false);\n\n // Arrays\n const [invoiceCategoryChoices] = useState([\n 'FBM30',\n 'FBM45',\n 'FBEMG60',\n 'FBM60',\n 'FBM90',\n 'TB14',\n 'TBM30',\n ]);\n const [brandChoices] = useState(['FK', 'TK']);\n const [invoiceTypeChoices] = useState(['EHF', 'eInvoice', 'Email', 'Papir']);\n\n // BrReg search\n const [loadingBrReg, setLoadingBrReg] = useState(false);\n const [brRegError, setBrRegError] = useState(false);\n\n const [newAnleggObj, setNewAnleggObj] = useState(\n stateStorkunde.singleAnlegg !== {}\n ? {\n SSN: '',\n organizationName: '',\n contact: null,\n adress: null,\n postnr: null,\n email: null,\n tlf: null,\n meternr: null,\n meterId: null,\n anleggAdress: null,\n anleggPostnr: null,\n product: null,\n productName: null,\n storeName: null,\n storeCode: null,\n sellerName: state.seller.name,\n sellerCode: state.seller.identityServerId,\n sellerEmail: state.seller.email,\n invoiceType: 'EHF',\n startDate: new Date(),\n brand: 'FK',\n mailRef: null,\n customerNumber: null,\n invoiceCategory: 'FBM30',\n invoiceText: null,\n invoiceGroup: null,\n fixedPrice: null,\n surcharge: null,\n energyAccount: null,\n salgsId: 1,\n firstName: '',\n lastName: '',\n isNewSalgsID: false,\n }\n : stateStorkunde.singleAnlegg,\n );\n\n // Saves the data to store while moving between stages\n const handleSaveToStateObj = (stage) => {\n setStage(stage);\n dispatch({ type: 'UPDATE_SINGLE_ANLEGG', payload: newAnleggObj });\n };\n\n const handleAddStorkunde = () => {\n setCreated(true);\n\n // check if store was left empty\n if (newAnleggObj.storeCode === null) {\n // Empty set the default\n setNewAnleggObj((newAnleggObj) => ({\n ...newAnleggObj,\n storeCode: state.activeStore.identityServerId,\n }));\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, storeName: state.activeStore.name }));\n }\n\n // check if seller was left empty\n if (newAnleggObj.sellerCode === null) {\n setNewAnleggObj((newAnleggObj) => ({\n ...newAnleggObj,\n sellerCode: state.seller.identityServerId,\n }));\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, sellerName: state.seller.name }));\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, sellerEmail: state.seller.email }));\n }\n\n const PELArray = [];\n // check price element list\n if (newAnleggObj.fixedPrice !== null && newAnleggObj.fixedPrice !== '') {\n PELArray.push({\n priceElementId: 607,\n price: newAnleggObj.fixedPrice,\n name: 'Månedlig fastbeløp Strøm',\n externalId: 'MAANEDSBELOEP',\n });\n }\n if (newAnleggObj.surcharge !== null && newAnleggObj.surcharge !== '') {\n PELArray.push({\n priceElementId: 608,\n price: newAnleggObj.surcharge,\n name: 'Strøm Påslag',\n externalId: 'PAASLAG',\n });\n }\n const storkunde = {\n SalgsID: newAnleggObj.salgsId,\n anleggene: [\n {\n Adresse: newAnleggObj.adress === '' ? null : newAnleggObj.adress,\n Anleggsadresse: newAnleggObj.anleggAdress === '' ? null : newAnleggObj.anleggAdress,\n Anleggspostnr: newAnleggObj.anleggPostnr === '' ? null : newAnleggObj.anleggPostnr,\n Butikkkode:\n newAnleggObj.storeCode === null\n ? state.activeStore.identityServerId\n : newAnleggObj.storeCode,\n Butikknavn:\n newAnleggObj.storeCode === null ? state.activeStore.name : newAnleggObj.storeName,\n Epost: newAnleggObj.email === '' ? null : newAnleggObj.email,\n Fakturamerke: newAnleggObj.invoiceText === '' ? null : newAnleggObj.invoiceText,\n Fakturagruppe: newAnleggObj.invoiceGroup === '' ? null : newAnleggObj.invoiceGroup,\n Firmanavn: newAnleggObj.organizationName === '' ? null : newAnleggObj.organizationName,\n Kundenummer: newAnleggObj.customerNumber === '' ? null : newAnleggObj.customerNumber,\n Energikonto: newAnleggObj.energyAccount === '' ? null : newAnleggObj.energyAccount,\n Mailreferanse: newAnleggObj.mailRef === '' ? null : newAnleggObj.mailRef,\n Oppstartsdato: newAnleggObj.startDate,\n Fornavn: newAnleggObj.firstName === '' ? null : newAnleggObj.firstName,\n Etternavn: newAnleggObj.lastName === '' ? null : newAnleggObj.lastName,\n Målernummer: newAnleggObj.meternr === '' ? null : newAnleggObj.meternr,\n MålepktId: newAnleggObj.meterId === '' ? null : newAnleggObj.meterId,\n SSN: newAnleggObj.SSN,\n Mobilnummer: newAnleggObj.tlf === '' ? null : newAnleggObj.tlf,\n Postnr: newAnleggObj.postnr === '' ? null : newAnleggObj.postnr,\n ProduktHub: newAnleggObj.product,\n SalgsID: newAnleggObj.salgsId,\n priceElementList: PELArray,\n Sellerkode:\n newAnleggObj.sellerCode === null\n ? state.seller.identityServerId\n : newAnleggObj.sellerCode,\n Sellernavn:\n newAnleggObj.sellerCode === null ? state.seller.name : newAnleggObj.sellerName,\n seller:\n newAnleggObj.sellerCode === null\n ? {\n identityServerId: state.seller.identityServerId,\n email: state.seller.email,\n name: state.seller.name,\n }\n : {\n identityServerId: newAnleggObj.sellerCode,\n email: newAnleggObj.sellerEmail,\n name: newAnleggObj.sellerName,\n },\n store:\n newAnleggObj.storeCode === null\n ? {\n identityServerId: state.activeStore.identityServerId,\n name: state.activeStore.name,\n }\n : { identityServerId: newAnleggObj.storeCode, name: newAnleggObj.storeName },\n swID: latestSwId + 1,\n },\n ],\n\n energiKonto: newAnleggObj.energyAccount === '' ? null : newAnleggObj.energyAccount,\n customerNr: newAnleggObj.customerNumber,\n SSN: newAnleggObj.SSN,\n sellerName: newAnleggObj.sellerCode === null ? state.seller.name : newAnleggObj.sellerName,\n sellerCode:\n newAnleggObj.sellerCode === null ? state.seller.identityServerId : newAnleggObj.sellerCode,\n\n storeName: newAnleggObj.storeCode === null ? state.activeStore.name : newAnleggObj.storeName,\n storeCode:\n newAnleggObj.storeCode === null\n ? state.activeStore.identityServerId\n : newAnleggObj.storeCode,\n\n invoiceAddress: newAnleggObj.adress === '' ? null : newAnleggObj.adress,\n invoicePostnr: newAnleggObj.postnr === '' ? null : newAnleggObj.postnr,\n\n fullName: isBedrift ? newAnleggObj.organizationName : null,\n phone: newAnleggObj.tlf === '' ? null : newAnleggObj.tlf,\n email: newAnleggObj.email === '' ? null : newAnleggObj.email,\n\n overrideCredit: false,\n overrideAccept: false,\n\n brand: newAnleggObj.brand,\n invoiceType: newAnleggObj.invoiceType === '' ? null : newAnleggObj.invoiceType,\n invoiceCategory: newAnleggObj.invoiceCategory === '' ? null : newAnleggObj.invoiceCategory,\n };\n\n if (newAnleggObj.salgsId > salgsIder.length) {\n // New salesid\n dispatch({ type: 'ADD_STORKUNDE', payload: storkunde });\n } else {\n // Salgsid exists\n dispatch({\n type: 'ADD_TO_EXISTING_STORKUNDE',\n payload: [newAnleggObj.salgsId, storkunde.anleggene[0]],\n });\n }\n\n dispatch({ type: 'UPDATE_SINGLE_ANLEGG', payload: {} });\n\n dispatch({ type: 'TOGGLE_SINGLE_ANLEGG_MODAL', bool: false });\n };\n\n // Sets the selected store\n const handleStoreSet = (store) => {\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, storeName: store[0] }));\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, storeCode: store[1] }));\n };\n\n // Searches for org data based on orgnr\n // Checks for corrects input and response\n const handleSearchByOrgnr = async (SSN) => {\n setBrRegError(false);\n if (!isNaN(SSN)) {\n setLoadingBrReg(true);\n const res = await dispatch(checkOrgNr(state.orderModuleApiUrl, SSN));\n\n if (res !== '' && res !== null) {\n setNewAnleggObj((newAnleggObj) => ({\n ...newAnleggObj,\n organizationName: FormatOrgnameToLowerCase(res.navn),\n }));\n setNewAnleggObj((newAnleggObj) => ({\n ...newAnleggObj,\n adress: res.forretningsadresse.adresse[0],\n }));\n setNewAnleggObj((newAnleggObj) => ({\n ...newAnleggObj,\n postnr: res.forretningsadresse.postnummer,\n }));\n } else {\n setBrRegError('Ingen organisasjonsdata funnet');\n }\n } else {\n setBrRegError('Organisasjonsnummer kan bare inneholde tall');\n }\n\n setLoadingBrReg(false);\n };\n\n // Checs moment for customer data\n const handleCheckMomentId = async (SSN) => {\n const res = await dispatch(\n getAccountAndEnergiKonto(state.sendAfiUrl, SSN, isBedrift, state.brand, true),\n );\n\n let momentCustomerId = null;\n if (res !== null && res !== '' && res !== undefined) {\n if (res[0]?.customerId !== null || typeof res[0]?.customerId !== undefined) {\n momentCustomerId = res[0]?.customerId;\n } else {\n console.error(\"Error: customerId not found\");\n }\n }\n\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, customerNumber: momentCustomerId }));\n };\n\n // When an org nr is supplied it will run a search for the name\n useEffect(() => {\n if (\n newAnleggObj.SSN !== null &&\n newAnleggObj.SSN.toString().length === (isBedrift ? 9 : 11) &&\n newAnleggObj.salgsId > salgsIder.length\n ) {\n // run check for org name\n\n isBedrift && handleSearchByOrgnr(newAnleggObj.SSN);\n handleCheckMomentId(newAnleggObj.SSN);\n }\n // eslint-disable-next-line\n }, [newAnleggObj.SSN]);\n\n const searchForProduct = async (productId) => {\n const res = await dispatch(getProducthubProductById(state.orderModuleApiUrl, productId));\n if (res !== undefined) {\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, productName: res.name }));\n } else {\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, productName: 'Navn ikke funnet' }));\n }\n };\n\n // If an existing salgsId is selected it will automatically set the SSN which belongs to it, this can't be changed\n useEffect(() => {\n if (newAnleggObj.salgsId <= salgsIder.length) {\n setNewAnleggObj((newAnleggObj) => ({\n ...newAnleggObj,\n isNewSalgsID: false,\n }));\n\n // change SSN and other stuff\n setNewAnleggObj((newAnleggObj) => ({\n ...newAnleggObj,\n SSN: salgsIder[newAnleggObj.salgsId - 1].anleggene[0].SSN,\n }));\n\n isBedrift &&\n setNewAnleggObj((newAnleggObj) => ({\n ...newAnleggObj,\n organizationName: salgsIder[newAnleggObj.salgsId - 1].anleggene[0].Firmanavn,\n }));\n\n !isBedrift &&\n setNewAnleggObj((newAnleggObj) => ({\n ...newAnleggObj,\n firstName: salgsIder[newAnleggObj.salgsId - 1].anleggene[0].Fornavn,\n }));\n\n !isBedrift &&\n setNewAnleggObj((newAnleggObj) => ({\n ...newAnleggObj,\n lastName: salgsIder[newAnleggObj.salgsId - 1].anleggene[0].Etternavn,\n }));\n setNewAnleggObj((newAnleggObj) => ({\n ...newAnleggObj,\n customerNumber: salgsIder[newAnleggObj.salgsId - 1].customerNr,\n }));\n\n setNewAnleggObj((newAnleggObj) => ({\n ...newAnleggObj,\n invoiceType: salgsIder[newAnleggObj.salgsId - 1].invoiceType,\n }));\n\n setNewAnleggObj((newAnleggObj) => ({\n ...newAnleggObj,\n brand: salgsIder[newAnleggObj.salgsId - 1].brand,\n }));\n\n setNewAnleggObj((newAnleggObj) => ({\n ...newAnleggObj,\n invoiceCategory: salgsIder[newAnleggObj.salgsId - 1].invoiceCategory,\n }));\n\n setNewAnleggObj((newAnleggObj) => ({\n ...newAnleggObj,\n energyAccount: salgsIder[newAnleggObj.salgsId - 1].energiKonto,\n }));\n\n setNewAnleggObj((newAnleggObj) => ({\n ...newAnleggObj,\n phone: salgsIder[newAnleggObj.salgsId - 1].phone,\n }));\n\n setNewAnleggObj((newAnleggObj) => ({\n ...newAnleggObj,\n email: salgsIder[newAnleggObj.salgsId - 1].email,\n }));\n\n setNewAnleggObj((newAnleggObj) => ({\n ...newAnleggObj,\n contact: salgsIder[newAnleggObj.salgsId - 1].contact,\n }));\n\n setNewAnleggObj((newAnleggObj) => ({\n ...newAnleggObj,\n adress: salgsIder[newAnleggObj.salgsId - 1].invoiceAddress,\n }));\n setNewAnleggObj((newAnleggObj) => ({\n ...newAnleggObj,\n postnr: salgsIder[newAnleggObj.salgsId - 1].invoicePostnr,\n }));\n\n //isBedrift && handleSearchByOrgnr(salgsIder[newAnleggObj.salgsId - 1].anleggene[0].SSN);\n //handleCheckMdm(salgsIder[newAnleggObj.salgsId - 1].anleggene[0].SSN)\n } else {\n // Clear\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, SSN: '' }));\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, organizationName: '' }));\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, customerNumber: '' }));\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, energyAccount: '' }));\n\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, adress: '' }));\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, postnr: '' }));\n\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, meterId: '' }));\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, meternr: '' }));\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, anleggAdress: '' }));\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, anleggPostnr: '' }));\n\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, brand: 'FK' }));\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, startDate: new Date() }));\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, invoiceType: 'EHF' }));\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, invoiceCategory: 'FBM30' }));\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, mailRef: '' }));\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, invoiceGroup: '' }));\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, invoiceText: '' }));\n\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, contact: '' }));\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, email: '' }));\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, tlf: '' }));\n\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, fixedPrice: '' }));\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, surcharge: '' }));\n\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, firstName: '' }));\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, lastName: '' }));\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, isNewSalgsID: true }));\n }\n // eslint-disable-next-line\n }, [newAnleggObj.salgsId]);\n\n const handleProductSelect = (product) => {\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, product: product[0] }));\n\n if (product[1] === null) {\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, productName: 'Søker...' }));\n searchForProduct(product[0]);\n } else {\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, productName: product[1] }));\n\n // Set the store that was used to find product\n // TODO add store in assumed products return\n setNewAnleggObj((newAnleggObj) => ({\n ...newAnleggObj,\n storeCode: product[2].identityServerId,\n }));\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, storeName: product[2].name }));\n }\n };\n\n // Set the selected seller from search\n const handleSelectSeller = (seller) => {\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, sellerName: seller[0] }));\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, sellerEmail: seller[1] }));\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, sellerCode: seller[2] }));\n };\n\n // Checks for the latest swID for identification\n useEffect(() => {\n // Get latest swID\n if (salgsIder.length > 0) {\n const storkunden = stateStorkunde.storkunde[stateStorkunde.storkunde.length - 1];\n\n setLatestSwId(storkunden.anleggene[storkunden.anleggene.length - 1].swID);\n } else {\n setLatestSwId(0);\n }\n\n // eslint-disable-next-line\n }, [stateStorkunde.storkunde]);\n\n // Type controller\n const handleChanged = (e, type) => {\n console.log(type);\n let regged = null;\n\n switch (type) {\n case 'SSN':\n regged = e.target.value.toString().replace(/\\s/g, '');\n\n (isBedrift\n ? !isNaN(regged) && regged.length < 10\n : !isNaN(regged) && e.target.value.length < 12) &&\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, SSN: regged }));\n\n break;\n\n case 'Organisasjonsnavn':\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, organizationName: e.target.value }));\n break;\n\n case 'Kundenummer':\n !isNaN(e.target.value) &&\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, customerNumber: e.target.value }));\n break;\n\n case 'Energikonto':\n !isNaN(e.target.value) &&\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, energyAccount: e.target.value }));\n break;\n\n case 'Adresse':\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, adress: e.target.value }));\n break;\n\n case 'Postnr':\n !isNaN(e.target.value) &&\n e.target.value.length < 5 &&\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, postnr: e.target.value }));\n break;\n\n case 'Målepunkt Id':\n !isNaN(e.target.value) && e.target.value.length < 19 && e.target.value.length === 8\n ? setNewAnleggObj((newAnleggObj) => ({\n ...newAnleggObj,\n meterId: 7070575000 + e.target.value,\n }))\n : setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, meterId: e.target.value }));\n break;\n\n case 'Målepunkt Nr':\n !isNaN(e.target.value) &&\n e.target.value.length < 17 &&\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, meternr: e.target.value }));\n break;\n\n case 'Anleggs adresse':\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, anleggAdress: e.target.value }));\n break;\n\n case 'Anleggs postnr':\n !isNaN(e.target.value) &&\n e.target.value.length < 5 &&\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, anleggPostnr: e.target.value }));\n break;\n\n case 'Merkevare':\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, brand: e.target.value }));\n break;\n\n case 'Oppstartsdato':\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, startDate: e }));\n break;\n\n case 'Forsendelsesmåte':\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, invoiceType: e.target.value }));\n break;\n\n case 'Kontokategori':\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, invoiceCategory: e.target.value }));\n break;\n\n case 'Mailreferanse':\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, mailRef: e.target.value }));\n break;\n\n case 'Fakturamerke':\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, invoiceText: e.target.value }));\n break;\n\n case 'Fakturagruppe':\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, invoiceGroup: e.target.value }));\n break;\n\n case 'Kontaktperson':\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, contact: e.target.value }));\n break;\n\n case 'Email':\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, email: e.target.value }));\n break;\n\n case 'Telefonnummer':\n !isNaN(e.target.value) &&\n e.target.value.length < 9 &&\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, tlf: e.target.value }));\n break;\n\n case 'Fornavn':\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, firstName: e.target.value }));\n break;\n\n case 'Etternavn':\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, lastName: e.target.value }));\n break;\n\n case 'Fastpris':\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, fixedPrice: e.target.value }));\n break;\n\n case 'Påslag':\n setNewAnleggObj((newAnleggObj) => ({ ...newAnleggObj, surcharge: e.target.value }));\n break;\n\n default:\n console.log('No corresponding data value found');\n }\n };\n\n return (\n <>\n {stage === 0 && (\n <>\n \n \n \n SalgsId\n \n setNewAnleggObj((newAnleggObj) => ({\n ...newAnleggObj,\n salgsId: e.target.value,\n }))\n }\n >\n {salgsIder.map((id, index) => (\n \n {id.SalgsID}\n \n ))}\n {salgsIder.length + 1}\n \n \n\n \n \n {isBedrift ? 'Organisasjonsinformasjon' : 'Personinformasjon'}\n \n {isBedrift ? (\n <>\n handleChanged(e, 'SSN')}\n type={'text'}\n disabled={newAnleggObj.salgsId <= salgsIder.length || loadingBrReg}\n error={newAnleggObj.SSN === null || newAnleggObj.SSN === ''}\n />\n handleChanged(e, 'Organisasjonsnavn')}\n type={'text'}\n disabled={newAnleggObj.salgsId <= salgsIder.length || loadingBrReg}\n error={\n newAnleggObj.organizationName === null ||\n newAnleggObj.organizationName === ''\n }\n />\n \n ) : (\n <>\n handleChanged(e, 'SSN')}\n type={'text'}\n disabled={newAnleggObj.salgsId <= salgsIder.length || loadingBrReg}\n error={newAnleggObj.SSN === null || newAnleggObj.SSN === ''}\n />\n handleChanged(e, 'Fornavn')}\n type={'text'}\n disabled={newAnleggObj.salgsId <= salgsIder.length || loadingBrReg}\n error={newAnleggObj.firstName === null || newAnleggObj.firstName === ''}\n />\n\n handleChanged(e, 'Etternavn')}\n type={'text'}\n disabled={newAnleggObj.salgsId <= salgsIder.length || loadingBrReg}\n error={newAnleggObj.lastName === null || newAnleggObj.lastName === ''}\n />\n \n )}\n handleChanged(e, 'Kundenummer')}\n type={'text'}\n disabled={newAnleggObj.salgsId <= salgsIder.length || loadingBrReg}\n />\n handleChanged(e, 'Energikonto')}\n type={'text'}\n disabled={newAnleggObj.salgsId <= salgsIder.length || loadingBrReg}\n />\n \n\n \n \n Fakturaadresse\n \n handleChanged(e, 'Adresse')}\n type={'text'}\n disabled={newAnleggObj.salgsId <= salgsIder.length || loadingBrReg}\n />\n handleChanged(e, 'Postnr')}\n type={'text'}\n disabled={newAnleggObj.salgsId <= salgsIder.length || loadingBrReg}\n />\n \n\n \n \n Anleggsinformasjon\n \n handleChanged(e, 'Målepunkt Id')}\n type={'text'}\n />\n handleChanged(e, 'Målepunkt Nr')}\n type={'text'}\n />\n handleChanged(e, 'Anleggs adresse')}\n type={'text'}\n />\n handleChanged(e, 'Anleggs postnr')}\n type={'text'}\n />\n \n\n \n \n Salg\n \n handleChanged(e, 'Merkevare')}\n type={'dropdown'}\n disabled={newAnleggObj.salgsId <= salgsIder.length || loadingBrReg}\n />\n handleChanged(e, 'Forsendelsesmåte')}\n type={'dropdown'}\n disabled={newAnleggObj.salgsId <= salgsIder.length || loadingBrReg}\n />\n handleChanged(e, 'Oppstartsdato')}\n type={'date'}\n />\n\n {isBedrift && (\n <>\n handleChanged(e, 'Kontokategori')}\n type={'dropdown'}\n />\n handleChanged(e, 'Mailreferanse')}\n type={'text'}\n />\n handleChanged(e, 'Fakturagruppe')}\n type={'text'}\n />\n \n )}\n handleChanged(e, 'Fakturamerke')}\n type={'text'}\n />\n \n \n \n Kontaktinformasjon\n \n {isBedrift && (\n <>\n handleChanged(e, 'Kontaktperson')}\n type={'text'}\n disabled={newAnleggObj.salgsId <= salgsIder.length || loadingBrReg}\n />\n \n )}\n handleChanged(e, 'Email')}\n type={'text'}\n disabled={newAnleggObj.salgsId <= salgsIder.length || loadingBrReg}\n />\n handleChanged(e, 'Telefonnummer')}\n type={'text'}\n disabled={newAnleggObj.salgsId <= salgsIder.length || loadingBrReg}\n />\n \n \n \n Tilleggsinformasjon\n \n handleChanged(e, 'Fastpris')}\n type={'text'}\n />\n handleChanged(e, 'Påslag')}\n type={'text'}\n />\n \n \n \n \n )}\n {stage === 1 && (\n \n \n \n Valg av selger\n \n \n handleSelectSeller(e)}\n />\n \n )}\n\n {stage === 2 && (\n \n \n \n Valg av produkt\n \n \n handleProductSelect(e)}\n />\n \n )}\n {stage === 3 && (\n \n \n \n Valg av tilhørende butikk\n \n \n handleStoreSet(e)}\n />\n \n )}\n \n {stage === 0 && (\n \n handleSaveToStateObj(newAnleggObj.isNewSalgsID ? 1 : 2)}\n disabled={\n isBedrift\n ? newAnleggObj.SSN.toString().length !== 9 ||\n newAnleggObj.organizationName.length === 0\n : newAnleggObj.SSN.toString().length !== 11 ||\n (newAnleggObj.firstName.length === 0 && newAnleggObj.lastName.length === 0)\n }\n sx={storkundeSingleStyle.buttonNextStyle}\n >\n Neste\n \n \n )}\n {stage === 1 && (\n <>\n handleSaveToStateObj(0)}\n sx={storkundeSingleStyle.buttonNextStyle}\n >\n Tilbake\n \n handleSaveToStateObj(2)}\n sx={[storkundeSingleStyle.buttonNextStyle, { marginLeft: 1 }]}\n >\n Neste\n \n \n )}\n {stage === 2 && (\n <>\n handleSaveToStateObj(newAnleggObj.isNewSalgsID ? 1 : 0)}\n sx={storkundeSingleStyle.buttonNextStyle}\n >\n Tilbake\n \n {newAnleggObj.isNewSalgsID ? (\n <>\n {newAnleggObj.storeCode !== null ? (\n handleAddStorkunde()}\n sx={[storkundeSingleStyle.buttonNextStyle, { marginLeft: 1 }]}\n >\n Legg til anlegg\n \n ) : (\n handleSaveToStateObj(3)}\n sx={[storkundeSingleStyle.buttonNextStyle, { marginLeft: 1 }]}\n >\n Neste\n \n )}\n \n ) : (\n handleAddStorkunde()}\n sx={[storkundeSingleStyle.buttonNextStyle, { marginLeft: 1 }]}\n >\n Legg til anlegg\n \n )}\n \n )}\n {stage === 3 && (\n <>\n handleSaveToStateObj(2)}\n sx={storkundeSingleStyle.buttonNextStyle}\n disabled={created}\n >\n Tilbake\n \n handleAddStorkunde()}\n sx={[storkundeSingleStyle.buttonStyle, { float: 'right' }]}\n disabled={created}\n >\n Legg til\n \n \n )}\n {brRegError !== false && (\n \n \n {brRegError}\n \n )}\n \n \n );\n}\n\nconst storkundeSingleStyle = {\n dividerStyle: {\n margin: 1,\n },\n boxStyle: {\n display: 'block',\n marginTop: 2,\n },\n\n textFieldStyle: {\n margin: 0.6,\n },\n buttonStyle: {\n padding: 1,\n paddingLeft: 3,\n paddingRight: 3,\n border: 1,\n borderRadius: '20px',\n backgroundColor: '#f0f0f0',\n borderColor: '#d3d3d3',\n color: 'black',\n width: '200px',\n },\n sellerSearchListItem: {\n borderTop: 1,\n borderColor: 'lightgray',\n ':hover': {\n backgroundColor: '#90b75f',\n cursor: 'pointer',\n },\n },\n buttonNextStyle: {\n marginLeft: 3,\n border: 1,\n padding: 1,\n backgroundColor: '#1f4d79',\n color: 'white',\n borderColor: '#173a5b',\n ':hover': {\n backgroundColor: '#2d7cc7',\n },\n },\n formStyle: {\n borderRadius: '25px',\n border: 1,\n padding: 0.5,\n },\n boxComponentStyle: {\n height: '90%',\n overflowY: 'auto',\n },\n headerStyle: {\n margin: 3,\n },\n};\nexport default StorkundeAddSingleAnlegg;\n","import { Link } from 'react-router-dom';\nimport HomeIcon from '@mui/icons-material/Home';\nimport {\n Button,\n Drawer,\n FormControl,\n IconButton,\n Input,\n InputAdornment,\n Pagination,\n} from '@mui/material';\nimport Box from '@mui/material/Box';\nimport Paper from '@mui/material/Paper';\nimport Grid from '@mui/material/Grid';\nimport environment from '../../environment';\nimport { useDispatch, useSelector } from 'react-redux';\nimport * as XLSX from 'xlsx';\nimport React, { useEffect, useState } from 'react';\nimport UploadFileIcon from '@mui/icons-material/UploadFile';\nimport StorkundeList from './StorkundeItems/StorkundeList';\nimport StorkundeSalgsId from './StorkundeItems/StorkundeSalgsId';\nimport WarningAmberIcon from '@mui/icons-material/WarningAmber';\nimport StorkundeWarningItem from './Sidebar/StorkundeWarningItem';\nimport '../../Stylesheets/Storkunde/Storkunde.css';\nimport List from '@mui/material/List';\nimport { makeStyles } from '@mui/styles';\nimport SearchIcon from '@mui/icons-material/Search';\nimport StorkundeData from './StorkundeItems/StorkundeData';\nimport StorkundeChanges from './Sidebar/StorkundeChanges';\nimport StorkundeOrder from './StorkundeItems/StorkundeOrder';\nimport Typography from '@mui/material/Typography';\nimport {\n checkOrgNr,\n createSystemLogs,\n getAccountAndEnergiKonto,\n searchSeller,\n} from '../../Redux/ApiCalls';\nimport HelpOutlineIcon from '@mui/icons-material/HelpOutline';\nimport StorkundeTutorial from './StorkundeTutorial';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport Dialog from '@mui/material/Dialog';\nimport StorkundeAddSingleAnlegg from './StorkundeItems/StorkundeAddSingleAnlegg';\nimport ChangeCircleIcon from '@mui/icons-material/ChangeCircle';\nimport Tooltip from '@mui/material/Tooltip';\n\nfunction Storkunde() {\n const stateStorkunde = useSelector((state) => state.StorkundeReducer);\n const state = useSelector((state) => state.reducer);\n const dispatch = useDispatch();\n const isBedrift = environment.isBedrift === 'true';\n\n const [productGroup, setProductGroups] = useState([]);\n const [productLoading, setProductLoading] = useState(false);\n const [showingAnlegg, setShowingAnlegg] = useState([]);\n const [openWarning, setOpenWarning] = useState(false);\n const [anleggLoading, setAnleggLoading] = useState(false);\n const [openEdit, setOpenEdit] = useState(false);\n const classes = useStyles();\n const [showTut, setShowTut] = useState(false);\n\n // Forcing the loop to go to next if it is shown the same salgsId\n const [salgsIdForcer, setSalgsIdForcer] = useState(false);\n\n const [searchAnlegg, setSearchAnlegg] = useState('');\n\n const [anleggHolder, setAnleggHolder] = useState([]);\n const [importHolder, setImportHolder] = useState([]);\n const [counterId, setCounterId] = useState(0);\n const [varselArray, setVarselArray] = useState([]);\n\n const [lastSalgsIdHolder, setLastSalgsIdHolder] = useState(0);\n\n // maps for salgsId\n const [invoiceAdressMap, setInvoiceAdressMap] = useState(new Map());\n const [mdmMap, setMdmMap] = useState(new Map());\n const [storeMap, setStoreMap] = useState(new Map());\n const [sellerMap, setSellerMap] = useState(new Map());\n\n // map for searched sellers\n const [searchSellersMap, setSearchedSellersMap] = useState(new Map());\n\n // SalgsID holder\n const sitesBySalgsIdMap = new Map();\n\n useEffect(() => {\n if (searchAnlegg !== '') {\n // Search\n dispatch({ type: 'SEARCH_KUNDELIST', payload: searchAnlegg });\n } else {\n dispatch({ type: 'RESET_SEARCHLIST' });\n }\n\n // eslint-disable-next-line\n }, [searchAnlegg]);\n\n // Checks on entry if its storkunde or regular bedrift\n useEffect(() => {\n isBedrift && dispatch({ type: 'SET_IS_STORKUNDE', bool: true });\n // eslint-disable-next-line\n }, []);\n\n useEffect(() => {\n if (typeof stateStorkunde.anleggList.anleggene !== 'undefined') {\n if (stateStorkunde.searchList.length !== 0 || searchAnlegg.length > 0) {\n // Currently searching\n setAnleggLoading(true);\n setShowingAnlegg(stateStorkunde.searchList.slice(0, 15));\n // Update pageination\n dispatch({ type: 'SET_PAGINATION_SEARCH' });\n dispatch({ type: 'SET_PAGINATION_CURRENT', payload: 1 });\n } else {\n setAnleggLoading(true);\n setShowingAnlegg(stateStorkunde.anleggList.anleggene.slice(0, 15));\n }\n }\n // eslint-disable-next-line\n }, [dispatch, stateStorkunde.anleggList, stateStorkunde.searchList]);\n\n useEffect(() => {\n setAnleggLoading(false);\n }, [showingAnlegg]);\n\n const handleItemSave = () => {\n let endRange = stateStorkunde.pagination * 15;\n let startRange = endRange - 15;\n\n // Check if currently searching\n setShowingAnlegg(stateStorkunde.anleggList.anleggene.slice(startRange, endRange));\n };\n\n const handleWarningClick = (item) => {\n dispatch({\n type: 'SET_SHOW_STORKUNDE_ITEM',\n payload: [item.SalgsID, item.swID],\n });\n };\n\n const handlePagination = (event, value) => {\n setAnleggLoading(true);\n dispatch({ type: 'SET_PAGINATION_CURRENT', payload: value });\n\n let endRange = value * 15;\n let startRange = endRange - 15;\n\n // Run boi\n setShowingAnlegg(stateStorkunde.anleggList.anleggene.slice(startRange, endRange));\n };\n\n useEffect(() => {\n if (!productLoading) {\n productGroup.forEach((pg) => {\n dispatch({ type: 'ADD_STORKUNDE', payload: pg });\n });\n setProductGroups([]);\n }\n // eslint-disable-next-line\n }, [productLoading]);\n\n useEffect(() => {\n if (importHolder.length > anleggHolder.length) {\n handleCreateSales(importHolder[anleggHolder.length]);\n }\n\n if (anleggHolder.length === importHolder.length) {\n // Ferdig\n\n for (const anlegg of anleggHolder) {\n handleCreateToMap(anlegg);\n }\n\n sitesBySalgsIdMap.forEach((value, key) => {\n setProductGroups((productGroup) => [...productGroup, value]);\n });\n dispatch({ type: 'SET_WARNING_STORKUNDE', payload: varselArray });\n setProductLoading(false);\n }\n // eslint-disable-next-line\n }, [lastSalgsIdHolder, importHolder, salgsIdForcer]);\n\n // Gets invoice data from BrReg\n const handleCheckForInvoiceAddress = async (anlegg) => {\n // Check if aleady in map\n if (!invoiceAdressMap.has(anlegg.SSN)) {\n const res = await dispatch(checkOrgNr(state.orderModuleApiUrl, anlegg.SSN));\n setInvoiceAdressMap(invoiceAdressMap.set(anlegg.SSN, res));\n }\n };\n /*\n // Gets invoice data from BrReg\n const handleCheckForInvoiceAddressPrivate = async (anlegg) => {\n // Check if aleady in map\n if (!invoiceAdressMap.has(anlegg.SSN)) {\n const res = await dispatch(checkOrgNr(state.orderModuleApiUrl, anlegg.SSN))\n setInvoiceAdressMap(invoiceAdressMap.set(anlegg.SSN, res))\n }\n }\n */\n\n // Checs moment for customer data\n const\n handleCheckMomentId = async (anlegg) => {\n // Gjør sjekk på om sjekket før\n if (!mdmMap.has(anlegg.SSN)) {\n const res = await dispatch(\n getAccountAndEnergiKonto(state.sendAfiUrl, anlegg.SSN, isBedrift, state.brand, true),\n );\n\n let momentCustomerId = null;\n if (res !== null && res !== '' && res !== undefined) {\n if (res[0]?.customerId !== null || typeof res[0]?.customerId !== undefined) {\n momentCustomerId = res[0]?.customerId;\n } else {\n // Finds the first correct id\n console.error(\"Error: customerId not found\");\n }\n\n if (momentCustomerId === null) {\n await createSystemLogs(\n state.orderModuleApiUrl,\n 'Import Checkmoment no momentCustomerId Found',\n `SSN: ${anlegg.SSN} SalgsId: ${anlegg.SalgsID}`,\n );\n }\n } else {\n await createSystemLogs(\n state.orderModuleApiUrl,\n 'Import Checkmoment no response',\n `SSN: ${anlegg.SSN} SalgsId: ${anlegg.SalgsID}`,\n );\n console.log('Feil ved søk i moment');\n }\n\n setMdmMap(mdmMap.set(anlegg.SSN, momentCustomerId));\n }\n };\n\n const handleCheckStore = async (anlegg) => {\n if (!storeMap.has(anlegg.SalgsID)) {\n // Setting store\n if (typeof anlegg['Butikkkode'] !== 'undefined') {\n // Take given store\n setStoreMap(\n storeMap.set(anlegg.SalgsID, {\n identityServerId: anlegg['Butikkkode'],\n name: anlegg['Butikknavn'],\n }),\n );\n } else {\n // Take default store\n setStoreMap(storeMap.set(anlegg.SalgsID, state.activeStore));\n }\n }\n };\n\n const handleCheckSeller = async (anlegg) => {\n // Check if id supplied\n if (typeof anlegg['Sellerkode'] !== 'undefined') {\n // HERE\n // Has code, check if in map\n if (!searchSellersMap.has(anlegg['Sellerkode'])) {\n // Does not have, do a search\n // NOT\n const res = await dispatch(searchSeller(state.conductorUrl, anlegg['Sellerkode']));\n\n if (res.length > 0) {\n // Found a seller\n // Add to map\n setSellerMap(\n sellerMap.set(anlegg.SalgsID, {\n identityServerId: res[0].identityServerId,\n email: res[0].email,\n name: res[0].name,\n }),\n );\n\n // Add to searched map\n setSearchedSellersMap(\n searchSellersMap.set(res[0]['identityServerId'], {\n identityServerId: res[0].identityServerId,\n email: res[0].email,\n name: res[0].name,\n }),\n );\n } else {\n // No result found, only use the code\n // Add to map\n setSellerMap(\n sellerMap.set(anlegg.SalgsID, {\n identityServerId: anlegg['Sellerkode'],\n email: null,\n name: null,\n }),\n );\n\n // Add to searched map\n setSearchedSellersMap(\n searchSellersMap.set(isBedrift ? anlegg.SSN : anlegg.SSN, {\n identityServerId: anlegg['Sellerkode'],\n email: null,\n name: null,\n }),\n );\n }\n } else {\n // HERE\n // Has in map\n setSellerMap(sellerMap.set(anlegg.SalgsID, searchSellersMap.get(anlegg['Sellerkode'])));\n }\n } else {\n // Not supplied, take logged in user\n setSellerMap(sellerMap.set(anlegg.SalgsID, state.seller));\n }\n };\n\n const handleCreateToMap = (anlegg) => {\n if (!sitesBySalgsIdMap.has(anlegg['SalgsID'])) {\n // Does not exist\n // Ads data from the first anlegg on each salgsID\n\n sitesBySalgsIdMap.set(anlegg['SalgsID'], {\n SalgsID: anlegg['SalgsID'],\n anleggene: [anlegg],\n energiKonto: typeof anlegg.Energikonto === 'undefined' ? null : anlegg.Energikonto,\n customerNr: mdmMap.get(anlegg.SSN),\n SSN: anlegg.SSN,\n sellerName: sellerMap.get(anlegg.SalgsID).name,\n sellerCode: sellerMap.get(anlegg.SalgsID).identityServerId,\n\n storeName: storeMap.get(anlegg.SalgsID).name,\n storeCode: storeMap.get(anlegg.SalgsID).identityServerId,\n\n invoiceAddress:\n typeof anlegg.Adresse === 'undefined' || typeof anlegg.Postnr === 'undefined'\n ? isBedrift\n ? invoiceAdressMap.get(anlegg.SSN).forretningsadresse.adresse[0]\n : null\n : anlegg.Adresse,\n invoicePostnr:\n typeof anlegg.Adresse === 'undefined' || typeof anlegg.Postnr === 'undefined'\n ? isBedrift\n ? invoiceAdressMap.get(anlegg.SSN).forretningsadresse.postnummer\n : null\n : anlegg.Postnr,\n\n // Private\n firstName: typeof anlegg.Fornavn === 'undefined' ? null : anlegg.Fornavn,\n lastName: typeof anlegg.Etternavn === 'undefined' ? null : anlegg.Etternavn,\n\n // Bedrift\n fullName: typeof anlegg.Firmanavn === 'undefined' ? null : anlegg.Firmanavn,\n\n // Contact\n phone: typeof anlegg['Mobilnummer'] === 'undefined' ? null : anlegg['Mobilnummer'],\n email: typeof anlegg['Epost'] === 'undefined' ? null : anlegg['Epost'],\n\n contact: typeof anlegg['Kontaktperson'] === 'undefined' ? null : anlegg['Kontaktperson'],\n\n // Other common data\n brand: typeof anlegg['Merke'] === 'undefined' ? 'FK' : anlegg['Merke'],\n invoiceCategory:\n typeof anlegg['Kontokategori'] === 'undefined' ? 'FBM30' : anlegg['Kontokategori'],\n invoiceType: typeof anlegg['Fakturatype'] === 'undefined' ? 'Papir' : anlegg['Fakturatype'],\n\n overrideAccept:\n typeof anlegg['OverstyrAksept'] === 'undefined'\n ? false\n : anlegg['OverstyrAksept'].toLowerCase().replace(' ', '') === 'ja',\n });\n } else {\n // Add to existing product\n let objektet = sitesBySalgsIdMap.get(anlegg['SalgsID']);\n\n objektet.anleggene.push(anlegg);\n }\n };\n\n const handleCreateSales = async (anlegg) => {\n // Creates a warning summary of missing elements\n const objWarning = {\n isMissing: [],\n isMissingCrit: [],\n SalgsID: anlegg['SalgsID'],\n name: anlegg['Anleggsadresse']\n ? anlegg['Anleggsadresse']\n : anlegg['Adresse1'] && anlegg['Adresse1'] !== ' '\n ? anlegg['Adresse1']\n : 'Ingen Adresse',\n };\n\n if (isBedrift) {\n anlegg.SSN = anlegg.Orgnummer;\n } else {\n anlegg.SSN = anlegg.Personnummer;\n }\n\n // Do checks\n\n // remove spaces from imported fields\n anlegg.SSN = anlegg.SSN.toString().replace(/\\s/g, '');\n anlegg.Kundenummer =\n anlegg.Kundenummer !== undefined\n ? anlegg.Kundenummer.toString().replace(/\\s/g, '')\n : undefined;\n anlegg.Mobilnummer =\n anlegg.Mobilnummer !== undefined\n ? anlegg.Mobilnummer.toString().replace(/\\s/g, '')\n : undefined;\n anlegg.Energikonto =\n anlegg.Energikonto !== undefined\n ? anlegg.Energikonto.toString().replace(/\\s/g, '')\n : undefined;\n anlegg['Målernummer'] =\n anlegg['Målernummer'] !== undefined\n ? anlegg['Målernummer'].toString().replace(/\\s/g, '')\n : undefined;\n anlegg['MålepktId'] =\n anlegg['MålepktId'] !== undefined\n ? anlegg['MålepktId'].toString().replace(/\\s/g, '')\n : undefined;\n\n objWarning.isMissing = checkForWarings(anlegg);\n\n anlegg.swID = counterId;\n // add to warning handler\n objWarning.swID = counterId;\n\n if (anlegg['Anleggsadresse'] === '' || typeof anlegg['Anleggsadresse'] === 'undefined') {\n objWarning.Name = 'Ingen adresse';\n } else {\n objWarning.Name = anlegg['Anleggsadresse'];\n }\n\n setVarselArray(varselArray.concat(objWarning));\n\n // TODO fix dis\n let mid = counterId;\n mid += 1;\n setCounterId(mid);\n\n // Bedrift\n // Only do the checks once for each slagsId\n if (lastSalgsIdHolder !== anlegg.SalgsID && isBedrift) {\n // Check brReg\n await handleCheckForInvoiceAddress(anlegg);\n\n // check mdm\n if (typeof anlegg['Kundenummer'] === 'undefined') {\n await handleCheckMomentId(anlegg);\n } else {\n if (!mdmMap.has(anlegg.SSN)) {\n setMdmMap(mdmMap.set(anlegg.SSN, anlegg['Kundenummer']));\n }\n }\n\n await handleCheckSeller(anlegg);\n handleCheckStore(anlegg);\n }\n\n // Privat\n // Only do the checks once for each slagsId\n if (lastSalgsIdHolder !== anlegg.SalgsID && !isBedrift) {\n // Check brReg\n //await handleCheckForInvoiceAddressPrivate(anlegg)\n\n // check mdm\n if (typeof anlegg['Kundenummer'] === 'undefined') {\n await handleCheckMomentId(anlegg);\n } else {\n if (!mdmMap.has(anlegg.SSN)) {\n setMdmMap(mdmMap.set(anlegg.SSN, anlegg['Kundenummer']));\n }\n }\n\n await handleCheckSeller(anlegg);\n handleCheckStore(anlegg);\n }\n\n const PELArray = [];\n\n // Check for pricelist element\n if (typeof anlegg['Fastbeløp'] !== 'undefined' && anlegg['Fastbeløp'] !== '') {\n PELArray.push({\n priceElementId: 103,\n price: anlegg['Fastbeløp'],\n name: 'Månedlig fastbeløp Strøm',\n externalId: 'MAANEDSBELOEP',\n });\n }\n if (typeof anlegg['Påslag'] !== 'undefined' && anlegg['Påslag'] !== '') {\n PELArray.push({\n priceElementId: 104,\n price: anlegg['Påslag'],\n name: 'Strøm Påslag',\n externalId: 'PAASLAG',\n });\n }\n\n anlegg.priceElementList = PELArray;\n setAnleggHolder(anleggHolder.concat(anlegg));\n setLastSalgsIdHolder(anlegg.SalgsID);\n if (lastSalgsIdHolder === anlegg.SalgsID) {\n setSalgsIdForcer(!salgsIdForcer);\n }\n };\n\n const setFromImport = async (event) => {\n setProductLoading(true);\n\n let importname = event.target.files[0].name;\n importname = importname.split('.')[0];\n\n dispatch({ type: 'SET_IMPORT_NAME', payload: importname });\n\n const data = await event.target.files[0].arrayBuffer();\n\n const workbook = XLSX.read(data, { cellDates: true });\n const first_worksheet = workbook.Sheets[workbook.SheetNames[0]];\n\n const rows = XLSX.utils.sheet_to_json(first_worksheet, { header: 0 });\n setImportHolder(rows);\n\n // Set data fields\n // Take first for general data\n };\n\n const checkForWarings = (anlegg) => {\n // Check update\n if (typeof stateStorkunde.anleggList.anleggene !== 'undefined') {\n handleItemSave();\n }\n\n const mangler = [\n 'MålepktId',\n 'Kontokategori',\n 'Målernummer',\n 'Energikonto',\n 'Fakturagruppe',\n 'Kundenummer',\n 'Fakturatype',\n 'ProduktHub',\n ];\n const warnings = [];\n for (const m of mangler) {\n if (anlegg[m] === '' || !anlegg[m]) {\n warnings.push(m);\n }\n }\n return warnings;\n };\n\n return (\n <>\n \n \n \n \n setShowTut(true)}\n sx={{\n margin: 2,\n color: 'white',\n fontSize: '50px',\n float: 'right',\n cursor: 'pointer',\n }}\n />\n \n\n :not(style)': { m: 1, width: 128, height: 128 },\n }}\n >\n \n

    Importering av flere anlegg

    \n \n \n

    \n {environment.isBedrift === 'true'\n ? stateStorkunde.isStorkunde\n ? 'Storkunde'\n : 'Bedrift'\n : 'Privat'}\n

    \n {isBedrift && stateStorkunde.storkunde.length === 0 && (\n \n \n dispatch({ type: 'SET_IS_STORKUNDE', bool: !stateStorkunde.isStorkunde })\n }\n >\n \n \n
    \n )}\n \n\n \n \n \n dispatch({ type: 'SHOW_ORDER_PAGE', bool: true })}\n disabled={\n stateStorkunde.failedOrders.length > 0 ||\n stateStorkunde.createdOrders.length > 0 ||\n stateStorkunde.storkunde.length === 0\n }\n >\n Lag ordre\n \n {isBedrift && stateStorkunde.isStorkunde && (\n dispatch({ type: 'TOGGLE_SINGLE_ANLEGG_MODAL', bool: true })}\n >\n Legg til ett anlegg\n \n )}\n \n \n \n\n \n \n

    Alle importerte anlegg

    \n\n setOpenWarning(true)}\n />\n
    \n {productLoading && (\n \n \n \n )}\n \n {stateStorkunde.storkunde.map((kunde, index) => (\n \n ))}\n \n
    \n\n \n \n \n \n

    \n Alle anlegg på salgsId: [\n {stateStorkunde.anleggList.length !== 0\n ? stateStorkunde.anleggList.SalgsID\n : 'Ingen valgt'}\n ]\n

    \n
    \n \n setSearchAnlegg(e.target.value)}\n >\n \n \n \n }\n />\n \n \n \n {stateStorkunde.anleggList.length !== 0 && (\n \n )}\n \n
    \n
    \n\n \n {!anleggLoading && (\n <>\n {showingAnlegg.map((anlegg, index) => (\n \n dispatch({\n type: 'SET_SHOW_STORKUNDE_ITEM',\n payload: [anlegg.SalgsID, anlegg.swID],\n })\n }\n >\n \n \n ))}\n\n {searchAnlegg.length !== 0 && showingAnlegg.length === 0 && (\n Ingen anlegg funnet på søket\n )}\n \n )}\n \n
    \n \n\n dispatch({ type: 'TOGGLE_SINGLE_ANLEGG_MODAL', bool: false })}\n >\n \n \n\n setOpenWarning(false)}\n >\n \n

    Varsler

    \n \n {stateStorkunde.storkundeWarning\n .filter((warning) => warning.isMissing.length > 0)\n .map((warning, index) => (\n \n ))}\n \n
    \n \n setOpenEdit(false)}\n >\n

    Endringer

    \n \n \n\n \n dispatch({\n type: 'RESET_SHOW_STORKUNDE_ITEM',\n payload: null,\n })\n }\n >\n {stateStorkunde.storkundeItemSelected !== null && (\n \n )}\n \n\n \n \n \n\n setShowTut(false)}>\n \n \n \n );\n}\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n height: '100% !important',\n width: '35% !important',\n borderRadius: '0px !important',\n paddingLeft: '0px !important',\n overflowX: 'hidden',\n },\n orderWorking: {\n height: '100% !important',\n width: '100% !important',\n borderRadius: '0px !important',\n overflowX: 'hidden',\n paddingLeft: 0,\n },\n single: {\n height: '100% !important',\n minWidth: '35% !important',\n },\n}));\n\nconst storkundeStyle = {\n listItemStyle: {\n border: 1,\n ':hover': {\n backgroundColor: 'lightgrey',\n cursor: 'pointer',\n },\n },\n formStyle: {\n borderRadius: '25px',\n border: 1,\n padding: 0.5,\n },\n buttonStyle: {\n marginLeft: 2,\n border: 1,\n borderRadius: '20px',\n backgroundColor: '#f0f0f0',\n borderColor: '#838383',\n color: 'black',\n width: '200px',\n },\n};\n\nexport default Storkunde;\n","import { Switch, Route } from 'react-router-dom';\nimport HomeContent from './HomeContent';\nimport ImprovedStatistics from './Statistics/ImprovedStatistics';\nimport Storkunde from './Storkunde/Storkunde';\nimport { useEffect } from 'react';\nimport identityServerStore from '../IdentityServer/store';\nimport { checkSeen, getAllStores, getDefaultPortingDate } from '../Redux/ApiCalls';\nimport { useDispatch, useSelector } from 'react-redux';\nimport environment from '../environment';\n\nexport default function ReactRouter() {\n const state = useSelector((state) => state.reducer);\n const dispatch = useDispatch();\n const isBedrift = environment.isBedrift === 'true';\n const search = sessionStorage.getItem('search') ?? '';\n\n\n useEffect(() => {\n const profile = identityServerStore.getState().auth.user.profile;\n const sellerHasMultipleStores = Array.isArray(profile.store);\n const brand = new URLSearchParams(search).get('brand');\n\n dispatch(checkSeen(state.orderModuleApiUrl, profile.sub));\n dispatch({\n type: 'SET_SELLER',\n seller: {\n identityServerId: profile.sub,\n name:\n profile['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname'] +\n ' ' +\n profile['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname'],\n email: profile.email,\n },\n sellerStores: profile.store\n ? sellerHasMultipleStores\n ? profile.store.map((o) => ({ identityServerId: parseInt(o), name: null }))\n : [{ identityServerId: parseInt(profile.store), name: null }]\n : [\n {\n identityServerId: brand === null || brand === 'FKAS' ? 5 : 309,\n name: null,\n },\n ],\n });\n\n dispatch({ type: 'SET_BRAND', brand: brand === null ? 'FKAS' : brand });\n dispatch(getAllStores(state.orderModuleApiUrl));\n !isBedrift && dispatch(getDefaultPortingDate(state.orderModuleApiUrl));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n );\n}\n","import React from 'react';\nimport '../Stylesheets/Buttons.css';\nimport { store } from '../Redux/Store';\nimport { Provider } from 'react-redux';\nimport ReactRouter from './ReactRouter';\nimport { BrowserRouter as Router } from 'react-router-dom';\n\nfunction Home() {\n return (\n \n \n \n \n \n \n \n );\n}\n\nexport default Home;\n","import Home from '../../Components/Home';\n\nconst Frontpage = () => {\n return ;\n};\n\nexport default Frontpage;\n","import { useEffect } from 'react';\nimport { signinRedirectCallback } from '../utils/identityServer/oidcService';\nimport { useHistory } from 'react-router-dom';\nimport React from 'react';\n\nconst SigninOidc = () => {\n const history = useHistory();\n\n useEffect(() => {\n const signinAsync = async () => {\n signinRedirectCallback().finally(() => {\n history.push(sessionStorage.getItem('lastRoute') || '/');\n });\n };\n signinAsync();\n }, [history]);\n\n return
    ;\n};\n\nexport default SigninOidc;\n","import React, { useEffect } from 'react';\nimport { signoutRedirectCallback } from '../utils/identityServer/oidcService';\nimport { useHistory } from 'react-router-dom';\n\nconst SignoutOidc = () => {\n const history = useHistory();\n useEffect(() => {\n async function signoutAsync() {\n console.log('Signing out...');\n await signoutRedirectCallback();\n history.push('/');\n }\n signoutAsync();\n }, [history]);\n\n return
    ;\n};\n\nexport default SignoutOidc;\n","import React, { useEffect, useState } from 'react';\n\nfunction SigninError() {\n const [show, setShow] = useState(false);\n\n useEffect(() => {\n let timer = setTimeout(() => setShow(true), 4000);\n return () => {\n clearTimeout(timer);\n };\n }, []);\n\n return (\n
    \n {show && (\n
    \n
    \n

    Beklager

    \n

    \n Du har ikke de nødvendige rettighetene til å logge inn på denne siden, vennligst kontakt\n systemadministrator.\n

    \n
    \n )}\n
    \n );\n}\n\nexport default SigninError;\n","import { useSelector } from 'react-redux';\nimport { Route } from 'react-router-dom';\nimport { loadUserFromStorage } from '../utils/identityServer/oidcService';\nimport React, { useEffect } from 'react';\nimport store from '../store';\nimport SigninError from '../../Components/SigninError';\nimport { useLocation } from 'react-router-dom';\n\nexport const PrivateRoute = ({ component: Component, ...rest }) => {\n let loading = useSelector((state) => state.auth.isLoadingUser);\n let user = useSelector((state) => state.auth.user);\n const search = useLocation().search;\n useEffect(() => {\n if (search) {\n sessionStorage.setItem('search', search);\n }\n // fetch current user from cookies\n loadUserFromStorage(store);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // const isMoltenCoreUser = () => {\n // return roles.some((role) => role === \"molten_core_user\")\n // }\n\n //const roles = useSelector((state) => state.auth.user ? rolesAsArray(state.auth.user.profile.role) : [])\n\n // function rolesAsArray(roles) {\n // if (Array.isArray(roles)) return roles\n // return [roles]\n // }\n\n const waitForUserIsLoaded = () => {\n if (!loading && !!user /*&& isMoltenCoreUser()*/) {\n return (\n <>\n } />\n \n );\n } else {\n return (\n <>\n } />\n \n );\n }\n };\n\n return waitForUserIsLoaded();\n};\n","import FrontPage from '../pages/FrontPage';\nimport signinOidc from '../pages/signinOidc';\nimport signoutOidc from '../pages/signoutOidc';\nimport { PrivateRoute } from './privateRoute';\nimport { Switch, Route } from 'react-router-dom';\n\nconst routes = (\n \n \n \n \n \n);\n\nexport default routes;\n","import './App.css';\nimport AuthProvider from './IdentityServer/utils/identityServer/authProvider';\nimport { Provider } from 'react-redux';\nimport userManager from './IdentityServer/utils/identityServer/oidcService';\nimport store from './IdentityServer/store';\nimport { BrowserRouter } from 'react-router-dom';\nimport routes from './IdentityServer/routes/routes';\nimport axios from 'axios';\n\nconst params = new URLSearchParams(window.location.search);\naxios.defaults.headers.common['Brand'] = params.has(\"brand\") ? params.get(\"brand\") : \"FKAS\";\n\nfunction App() {\n return (\n
    \n \n \n \n \n \n
    \n );\n}\n\nexport default App;\n","const reportWebVitals = (onPerfEntry) => {\n if (onPerfEntry && onPerfEntry instanceof Function) {\n import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\n getCLS(onPerfEntry);\n getFID(onPerfEntry);\n getFCP(onPerfEntry);\n getLCP(onPerfEntry);\n getTTFB(onPerfEntry);\n });\n }\n};\n\nexport default reportWebVitals;\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './App';\nimport reportWebVitals from './reportWebVitals';\n\nReactDOM.render(, document.getElementById('root'));\n\n// If you want to start measuring performance in your app, pass a function\n// to log results (for example: reportWebVitals(console.log))\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\nreportWebVitals();\n"],"sourceRoot":""}